/* ===================================================================
   税务师打卡系统 - 独立样式
   本文件不再改动
   =================================================================== */

/* ====== Header ====== */
.header { text-align: center; padding: 20px 0 16px; }
.header h1 {
  font-size: 22px; font-weight: 800;
  background: linear-gradient(135deg, #9b72cf, #f48fb1);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 4px; line-height: 1.3;
}
.header p { color: var(--muted); font-size: 13px; }

/* ====== Target Cards ====== */
.target-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px;
  margin-bottom: 10px; position: relative; z-index: 1;
}
.target-total-row {
  margin-bottom: 10px; position: relative; z-index: 1;
}
.target-total-row .target-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; text-align: center;
  position: relative; overflow: hidden;
  box-shadow: 0 2px 10px rgba(155,114,207,0.06);
}
.target-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 12px; text-align: center;
  position: relative; overflow: hidden;
  box-shadow: 0 2px 10px rgba(155,114,207,0.06);
}
.target-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.target-card.tc-total::before { background: linear-gradient(90deg, #9b72cf, #f48fb1); }
.target-card.tc-s1::before { background: linear-gradient(90deg, #9b72cf, #c39dff); }
.target-card.tc-s2::before { background: linear-gradient(90deg, #f48fb1, #f8bbd0); }
.target-card.tc-s3::before { background: linear-gradient(90deg, #ffb74d, #ffe0b2); }
.tc-label { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.tc-done { font-size: 22px; font-weight: 800; color: var(--text); line-height: 1; display: flex; justify-content: center; align-items: flex-end; gap: 4px; }
.tc-done .time-block { display: inline-flex; align-items: flex-end; }
.tc-done .time-num { font-size: 22px; font-weight: 800; line-height: 1; }
.tc-done .time-unit { font-size: 10px; font-weight: 600; color: var(--muted); line-height: 1; margin-bottom: 1px; margin-left: 1px; }
.tc-target { font-size: 11px; color: var(--muted); margin-top: 1px; }
.tc-bar-bg { height: 4px; background: var(--lavender); border-radius: 2px; margin-top: 8px; }
.tc-bar-fill { height: 100%; border-radius: 2px; transition: width 0.5s; }
.tc-total .tc-bar-fill { background: linear-gradient(90deg, #9b72cf, #f48fb1); }
.tc-s1 .tc-bar-fill { background: linear-gradient(90deg, #9b72cf, #c39dff); }
.tc-s2 .tc-bar-fill { background: linear-gradient(90deg, #f48fb1, #f8bbd0); }
.tc-s3 .tc-bar-fill { background: linear-gradient(90deg, #ffb74d, #ffe0b2); }
.tc-bar-pct { font-size: 11px; color: var(--muted); margin-top: 3px; font-weight: 600; }
.tc-remain { font-size: 11px; margin-top: 5px; padding: 2px 8px; border-radius: 6px; display: inline-block; font-weight: 600; }
.tc-remain .time-block { display: inline-flex; align-items: flex-end; }
.tc-remain .time-num { font-size: 13px; font-weight: 800; line-height: 1; }
.tc-remain .time-unit { font-size: 8px; font-weight: 600; line-height: 1; margin-bottom: 1px; margin-left: 1px; }
.tc-remain.on-track { background: rgba(129,199,132,0.12); color: #66bb6a; }
.tc-remain.over { background: rgba(244,143,177,0.12); color: #e91e63; }

/* ====== Countdown ====== */
.countdown-bar {
  background: linear-gradient(135deg, rgba(155,114,207,0.08), rgba(244,143,177,0.08));
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 16px;
  margin-bottom: 16px; text-align: center;
  box-shadow: 0 2px 12px rgba(155,114,207,0.08);
  position: relative; z-index: 1;
}
.countdown-label {
  font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 8px;
}
.countdown-numbers {
  display: flex; justify-content: center; align-items: baseline; gap: 6px; margin-bottom: 8px;
}
.cd-days {
  font-size: 42px; font-weight: 800;
  background: linear-gradient(135deg, #9b72cf, #f48fb1);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  line-height: 1;
}
.cd-unit-text {
  font-size: 16px; color: var(--muted); font-weight: 600;
}
.countdown-dates {
  font-size: 12px; color: var(--muted); margin-top: 4px;
}
.countdown-dates span {
  background: var(--lavender); color: var(--accent); padding: 2px 8px;
  border-radius: 6px; font-weight: 600;
}

/* ====== Streak ====== */
.streak-bar {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 16px; font-size: 14px;
  box-shadow: 0 2px 10px rgba(155,114,207,0.06);
  position: relative; z-index: 1;
}
.streak-bar .fire { font-size: 20px; }
.streak-bar .num { font-size: 20px; font-weight: 800; color: var(--pink-deep); }

/* Streak Stats */
.streak-stats {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 16px; font-size: 12px; color: var(--muted);
  position: relative; z-index: 1;
}
.streak-stats-item { font-weight: 500; }
.streak-stats-item strong {
  color: var(--accent); font-weight: 700; font-size: 13px;
}
.streak-stats-divider { color: var(--border); font-size: 10px; }

/* ====== Calendar ====== */
.calendar-section {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 16px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(155,114,207,0.06);
  position: relative; z-index: 1;
}
.calendar-header {
  padding: 14px 16px; display: flex; align-items: center;
  justify-content: space-between; cursor: pointer;
  -webkit-user-select: none; user-select: none;
}
.calendar-header:active { background: rgba(155,114,207,0.04); }
.calendar-header .ch-left { font-size: 15px; font-weight: 700; }
.calendar-header .ch-arrow { color: var(--muted); font-size: 16px; transition: transform 0.2s; }
.calendar-header .ch-arrow.open { transform: rotate(180deg); }
.cal-nav {
  display: none; align-items: center; justify-content: space-between;
  padding: 6px 12px 10px;
}
.cal-nav.show { display: flex; }
.cal-nav-btn {
  width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card);
  color: var(--accent); font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.15s;
  -webkit-appearance: none; line-height: 1;
}
.cal-nav-btn:active { background: var(--lavender); transform: scale(0.92); }
.cal-nav-center { display: flex; align-items: center; gap: 8px; }
.cal-nav-month { font-size: 15px; font-weight: 700; color: var(--text); min-width: 70px; text-align: center; }
.cal-nav-center .cal-nav-grid-spacer { flex: 1; }
.cal-nav-btn.grid-btn {
  font-size: 14px; width: 34px; height: 34px;
  border: none; background: rgba(155,114,207,0.08);
}
.cal-nav-btn.grid-btn.active {
  background: linear-gradient(135deg, #9b72cf, #f48fb1); color: #fff;
}
.calendar-body { display: none; padding: 0 0 14px; }
.calendar-body.open { display: block; }
.cal-year {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 0; padding: 0 12px;
}
.cal-year::-webkit-scrollbar { display: none; }
.cal-month {
  flex: 0 0 100%; scroll-snap-align: start;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 8px; box-sizing: border-box;
}
.cal-month-name { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 6px; text-align: center; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 3px; }
.cal-wd { font-size: 10px; color: var(--muted); text-align: center; line-height: 1.6; font-weight: 600; }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-day {
  width: 100%; aspect-ratio: 1; border-radius: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 11px; color: var(--muted); position: relative; line-height: 1;
}
.cal-day.empty { visibility: hidden; }
.cal-day.today {
  font-weight: 800; color: var(--accent);
  background: rgba(155,114,207,0.1);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.cal-day.today::after {
  content: ''; position: absolute; bottom: 3px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent);
  animation: todayPulse 1.5s ease-in-out infinite;
}
@keyframes todayPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.6); }
}
.cal-day.today.checked {
  background: linear-gradient(135deg, #9b72cf, #f48fb1);
  color: #fff; font-weight: 800; box-shadow: none;
}
.cal-day.today.checked::after { background: #fff; }
.cal-day.checked {
  background: linear-gradient(135deg, #9b72cf, #f48fb1);
  color: #fff; font-weight: 600;
}
.cal-day.exam {
  background: linear-gradient(135deg, #ffb74d, #ff9800);
  color: #fff; font-weight: 700;
}
.cal-day.gray-period { background: #e8e8e8; color: #bbb; }
.cal-day.gray-period.checked {
  background: linear-gradient(135deg, #9b72cf, #f48fb1); color: #fff; font-weight: 600;
}
.cal-day.gray-period.today {
  background: rgba(155,114,207,0.1);
  box-shadow: inset 0 0 0 1.5px var(--accent);
  color: var(--accent); font-weight: 800;
}
.cal-day.gray-period.today::after { background: var(--accent); }
.cal-day.gray-period.today.checked {
  background: linear-gradient(135deg, #9b72cf, #f48fb1);
  color: #fff; font-weight: 800; box-shadow: none;
}
.cal-day.gray-period.today.checked::after { background: #fff; }
.cal-day.gray-period.exam {
  background: linear-gradient(135deg, #ffb74d, #ff9800); color: #fff; font-weight: 700;
}
.cal-legend {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 10px; font-size: 11px; color: var(--muted); padding: 0 12px; flex-wrap: wrap;
}
.cal-legend-item { display: flex; align-items: center; gap: 4px; }
.cal-legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.cal-legend-dot.dot-empty { background: var(--bg); border: 1px solid var(--border); }
.cal-legend-dot.dot-full { background: linear-gradient(135deg, #9b72cf, #f48fb1); }
.cal-legend-dot.dot-exam { background: linear-gradient(135deg, #ffb74d, #ff9800); }
.cal-legend-dot.dot-today {
  background: rgba(155,114,207,0.15);
  box-shadow: inset 0 0 0 1.5px var(--accent); position: relative;
}
.cal-legend-dot.dot-today::after {
  content: ''; position: absolute; bottom: 1px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}
.cal-legend-dot.dot-gray { background: #e8e8e8; }
.cal-year.grid-view {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  overflow-x: auto; padding: 0 12px; -webkit-overflow-scrolling: touch;
}
.cal-year.grid-view .cal-month {
  flex: none; cursor: pointer; transition: transform 0.15s;
  box-sizing: border-box;
}
.cal-year.grid-view .cal-month:active { transform: scale(0.96); }
.cal-year.grid-view .cal-month-name { font-size: 11px; }
.cal-year.grid-view .cal-weekdays { gap: 1px; }
.cal-year.grid-view .cal-wd { font-size: 9px; }
.cal-year.grid-view .cal-days { gap: 1px; }
.cal-year.grid-view .cal-day { font-size: 9px; border-radius: 3px; }
.cal-year.grid-view .cal-day.today::after { width: 3px; height: 3px; bottom: 2px; }
@media(max-width:420px){
  .cal-year.grid-view { grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 8px; }
  .cal-year.grid-view .cal-month { padding: 8px 4px; }
  .cal-year.grid-view .cal-month-name { font-size: 11px; }
  .cal-year.grid-view .cal-wd { font-size: 8px; }
  .cal-year.grid-view .cal-day { font-size: 8px; border-radius: 3px; }
  .cal-year.grid-view .cal-day.today::after { width: 3px; height: 3px; bottom: 2px; }
  .cal-legend { gap: 6px; font-size: 10px; }
  .cal-legend-dot { width: 8px; height: 8px; }
  .target-grid { gap: 6px; }
  .target-card { padding: 10px 6px; }
  .tc-done .time-num { font-size: 18px; }
  .tc-done .time-unit { font-size: 8px; }
}

/* ====== Sections & Form ====== */
.section {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 16px; margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(155,114,207,0.06);
  position: relative; z-index: 1;
}
.section h3 { font-size: 16px; margin-bottom: 16px; font-weight: 700; }
.section .form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.section .form-group label { font-size: 13px; color: var(--muted); font-weight: 500; }
.section .form-group input, .section .form-group textarea {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text);
  padding: 11px 14px; font-size: 15px; outline: none; font-family: inherit;
  -webkit-appearance: none; width: 100%; box-sizing: border-box;
}

.section .form-group input:focus, .section .form-group textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(155,114,207,0.1);
}
.subject-times { display: flex; gap: 8px; margin-bottom: 16px; }
.subject-input {
  flex: 1; background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 6px; text-align: center;
}
.subject-input .s-label { font-size: 11px; font-weight: 600; margin-bottom: 6px; display: block; }
.subject-input.s1 .s-label { color: #9b72cf; }
.subject-input.s2 .s-label { color: #f48fb1; }
.subject-input.s3 .s-label { color: #ffb74d; }
.subject-input input {
  background: transparent; border: none; border-bottom: 1px solid var(--border);
  color: var(--text); text-align: center;
  font-size: 20px; font-weight: 700; width: 100%; max-width: 64px;
  padding: 4px 0; outline: none; -webkit-appearance: none;
}
.subject-input input:focus { border-bottom-color: var(--accent); }
.subject-input .s-unit { font-size: 11px; color: var(--muted); margin-top: 2px; display: block; }

/* ====== Filter + Search ====== */
.filter-row { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tab {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 500;
  color: var(--muted); cursor: pointer; transition: all 0.15s;
  -webkit-appearance: none; min-height: 36px;
}
.tab.active, .tab:active {
  background: linear-gradient(135deg, #9b72cf, #f48fb1);
  border-color: transparent; color: #fff;
}
.search-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 0 12px; margin-bottom: 12px;
}
.search-bar svg { flex-shrink: 0; color: var(--muted); }
.search-bar input {
  background: transparent; border: none; color: var(--text);
  font-size: 14px; padding: 10px 0; outline: none; width: 100%;
  -webkit-appearance: none;
}
.search-bar input::placeholder { color: var(--muted); }
.search-info { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
mark { background: rgba(155,114,207,0.2); color: #9b72cf; border-radius: 2px; padding: 0 2px; font-weight: 600; }

/* ====== Day Card ====== */
.day-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 12px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(155,114,207,0.05);
}
.day-header {
  padding: 14px 16px; display: flex; align-items: center;
  justify-content: space-between; cursor: pointer;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(155,114,207,0.03), rgba(244,143,177,0.03));
  -webkit-user-select: none; user-select: none; min-height: 48px;
}
.day-header:active { background: linear-gradient(90deg, rgba(155,114,207,0.08), rgba(244,143,177,0.08)); }
.dh-left { display: flex; flex-direction: column; gap: 6px; }
.dh-top { display: flex; align-items: center; gap: 10px; }
.dh-date { font-weight: 700; font-size: 15px; }
.dh-total { font-size: 12px; color: #9b72cf; font-weight: 600; background: var(--lavender); padding: 2px 8px; border-radius: 6px; }
.dh-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.dh-arrow { color: var(--muted); font-size: 16px; transition: transform 0.2s; flex-shrink: 0; }
.dh-arrow.open { transform: rotate(180deg); }
.day-body { display: none; }
.day-body.open { display: block; }

/* ====== Entry ====== */
.entry { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.entry:last-child { border-bottom: none; }
.entry-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.entry-time { font-size: 12px; color: var(--muted); font-weight: 500; }
.entry-actions { display: flex; gap: 2px; }
.entry-content {
  font-size: 15px; font-weight: 600; color: var(--text);
  margin-bottom: 8px; padding: 10px 12px;
  background: linear-gradient(90deg, rgba(155,114,207,0.06), rgba(244,143,177,0.04));
  border-left: 3px solid #9b72cf; border-radius: 0 10px 10px 0; line-height: 1.6;
  word-break: break-all; overflow-wrap: break-word; white-space: pre-wrap;
}
.entry-subjects { display: flex; gap: 6px; flex-wrap: wrap; }
.entry-sub { font-size: 12px; padding: 3px 10px; border-radius: 8px; font-weight: 600; }
.entry-sub.es1 { background: rgba(155,114,207,0.1); color: #9b72cf; }
.entry-sub.es2 { background: rgba(244,143,177,0.1); color: #f48fb1; }
.entry-sub.es3 { background: rgba(255,183,77,0.1); color: #ff9800; }
.today-tag {
  display: inline-block; background: linear-gradient(135deg, #9b72cf, #f48fb1);
  color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 4px;
  margin-left: 6px; vertical-align: middle;
}

/* ====== Actions bar ====== */
.actions-bar { display: flex; gap: 10px; margin-bottom: 16px; position: relative; z-index: 1; }
.actions-bar .btn { flex: 1; }

/* ====== Cloud choice cards ====== */
.cloud-choice-grid { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.cloud-choice-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 16px; cursor: pointer;
  transition: all 0.15s; -webkit-tap-highlight-color: transparent;
}
.cloud-choice-card:active { transform: scale(0.97); background: var(--lavender); }
.cloud-choice-card .cc-icon { font-size: 28px; flex-shrink: 0; }
.cloud-choice-card .cc-text h4 { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.cloud-choice-card .cc-text p { font-size: 12px; color: var(--muted); }
.cloud-choice-card.cloud-card { border-color: rgba(155,114,207,0.3); }
.cloud-choice-card.cloud-card:active { border-color: var(--accent); }

/* ====== Cloud import preview ====== */
.diff-section { margin-top: 12px; }
.diff-list {
  max-height: 180px; overflow-y: auto; border: 1px solid var(--border);
  border-radius: 10px; padding: 8px; background: var(--bg);
  margin-bottom: 10px; font-size: 12px;
}
.diff-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 4px; border-bottom: 1px solid rgba(0,0,0,0.04);
}
.diff-item:last-child { border-bottom: none; }
.diff-item .di-tag {
  font-size: 10px; font-weight: 700; padding: 1px 6px;
  border-radius: 4px; flex-shrink: 0; min-width: 28px; text-align: center;
}
.diff-item .di-tag.tag-add { background: rgba(102,187,106,0.15); color: #43a047; }
.diff-item .di-tag.tag-overwrite { background: rgba(255,183,77,0.15); color: #ef6c00; }
.diff-item .di-tag.tag-same { background: rgba(0,0,0,0.05); color: var(--muted); }
.diff-item .di-date { font-weight: 600; color: var(--text); min-width: 72px; }
.diff-item .di-content { color: var(--muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.diff-item .di-arrow { color: var(--muted); font-size: 11px; flex-shrink: 0; }
.diff-item .di-new-content { color: var(--accent); font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.diff-summary { font-size: 13px; color: var(--text); font-weight: 600; padding: 8px 0; text-align: center; }
.import-mode-row { display: flex; gap: 10px; margin-bottom: 12px; }
.import-mode-btn {
  flex: 1; padding: 10px; border-radius: 10px; border: 1.5px solid var(--border);
  background: var(--card); font-size: 13px; font-weight: 600; cursor: pointer;
  text-align: center; transition: all 0.15s; -webkit-appearance: none;
}
.import-mode-btn.active { border-color: var(--accent); background: rgba(155,114,207,0.08); color: var(--accent); }
.import-mode-btn:active { transform: scale(0.96); }
.cloud-info-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; margin-bottom: 12px; font-size: 12px;
}
.cloud-info-bar .ci-label { color: var(--muted); }
.cloud-info-bar .ci-value { font-weight: 700; color: var(--text); }
.empty-state { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty-state .emoji { font-size: 44px; margin-bottom: 10px; }
.empty-state .msg { font-size: 14px; }

/* ====== Records section ====== */
.records-section { position: relative; z-index: 1; margin-bottom: 20px; }
.records-section h3 { font-size: 16px; margin-bottom: 14px; font-weight: 700; }

/* ====== Timer ====== */
.timer-section {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 16px; margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(155,114,207,0.06);
  position: relative; z-index: 1; overflow: hidden;
}
.timer-section::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #9b72cf, #f48fb1);
}
.timer-section h3 { font-size: 16px; margin-bottom: 14px; font-weight: 700; }
.timer-subject-select { display: flex; gap: 8px; margin-bottom: 16px; }
.timer-sub-btn {
  flex: 1; padding: 10px 6px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--card);
  font-size: 13px; font-weight: 600; cursor: pointer;
  text-align: center; transition: all 0.15s;
  -webkit-appearance: none; color: var(--muted);
  -webkit-tap-highlight-color: transparent;
}
.timer-sub-btn:active { transform: scale(0.96); }
.timer-sub-btn.active-s1 { border-color: #9b72cf; background: rgba(155,114,207,0.1); color: #9b72cf; box-shadow: 0 0 0 3px rgba(155,114,207,0.1); }
.timer-sub-btn.active-s2 { border-color: #f48fb1; background: rgba(244,143,177,0.1); color: #f48fb1; box-shadow: 0 0 0 3px rgba(244,143,177,0.1); }
.timer-sub-btn.active-s3 { border-color: #ff9800; background: rgba(255,152,0,0.1); color: #ff9800; box-shadow: 0 0 0 3px rgba(255,152,0,0.1); }
.timer-sub-btn.disabled { opacity: 0.4; pointer-events: none; }
.timer-display { text-align: center; margin-bottom: 16px; }
.timer-time {
  font-size: 52px; font-weight: 800; font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #9b72cf, #f48fb1);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  line-height: 1.1; letter-spacing: 2px;
  font-family: 'SF Mono', 'Menlo', 'PingFang SC', monospace;
}
.timer-time.paused { animation: timerBlink 1s ease-in-out infinite; }
@keyframes timerBlink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.timer-status {
  font-size: 13px; color: var(--muted); margin-top: 6px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.timer-status .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.timer-status .dot.running { background: #66bb6a; animation: pulse 1.5s infinite; }
.timer-status .dot.paused { background: #ffb74d; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } }
.timer-btns { display: flex; gap: 10px; margin-bottom: 12px; }
.timer-btns .btn { flex: 1; }
.btn-timer-start { background: linear-gradient(135deg, #66bb6a, #43a047); box-shadow: 0 4px 12px rgba(102,187,106,0.3); }
.btn-timer-pause { background: linear-gradient(135deg, #ffb74d, #ff9800); box-shadow: 0 4px 12px rgba(255,183,77,0.3); }
.btn-timer-resume { background: linear-gradient(135deg, #66bb6a, #43a047); box-shadow: 0 4px 12px rgba(102,187,106,0.3); }
.btn-timer-stop { background: linear-gradient(135deg, #ef9a9a, #e57373); box-shadow: 0 4px 12px rgba(239,154,154,0.3); }
.timer-sessions { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
.timer-sessions-title { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.timer-session-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; background: var(--bg); border-radius: 10px;
  margin-bottom: 6px; font-size: 13px;
}
.timer-session-item:last-child { margin-bottom: 0; }
.tsi-left { display: flex; align-items: center; gap: 8px; }
.tsi-sub { font-size: 11px; padding: 2px 8px; border-radius: 6px; font-weight: 600; }
.tsi-sub.es1 { background: rgba(155,114,207,0.1); color: #9b72cf; }
.tsi-sub.es2 { background: rgba(244,143,177,0.1); color: #f48fb1; }
.tsi-sub.es3 { background: rgba(255,183,77,0.1); color: #ff9800; }
.tsi-time { font-weight: 700; color: var(--text); }
.tsi-right { display: flex; align-items: center; gap: 6px; }
.tsi-duration { font-weight: 700; color: var(--accent); }
.tsi-del {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 14px; padding: 4px; border-radius: 6px; -webkit-appearance: none;
}
.tsi-del:active { background: rgba(244,143,177,0.15); color: #e91e63; }
.bg-warning {
  background: linear-gradient(135deg, rgba(255,183,77,0.15), rgba(255,152,0,0.1));
  border: 1px solid rgba(255,183,77,0.3);
  border-radius: 10px; padding: 10px 14px;
  font-size: 12px; color: #e65100; margin-bottom: 12px;
  display: none; align-items: center; gap: 6px;
}
.bg-warning.show { display: flex; }

/* 时间输入框文字居中 — 已移至 common.css */

/* ====== 计时专注模式（已简化：仅保留滚动居中） ====== */
.timer-focus-backdrop {
  display: none;
}

/* ====== 日期 + 时间图标行 ====== */
.date-time-row {
  display: flex; align-items: center; gap: 8px;
}
.date-time-row input[type="date"] {
  flex: 1; min-width: 0;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text);
  padding: 11px 14px; font-size: 15px; outline: none;
  font-family: inherit; -webkit-appearance: none;
}
.date-time-row input[type="date"]:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(155,114,207,0.1);
}
.time-icon-btn {
  flex-shrink: 0; width: 40px; height: 40px;
  border-radius: 10px; border: 1px dashed var(--border);
  background: var(--bg); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s;
  -webkit-appearance: none; -webkit-tap-highlight-color: transparent;
}
.time-icon-btn:active {
  background: var(--lavender); border-color: var(--accent); color: var(--accent);
}
.time-icon-btn.has-time {
  border-style: solid; border-color: rgba(155,114,207,0.3);
  background: rgba(155,114,207,0.06); color: var(--accent);
}
.time-display-tag {
  flex-shrink: 0;
  font-size: 13px; font-weight: 700; color: var(--accent);
  background: rgba(155,114,207,0.08);
  padding: 6px 10px; border-radius: 8px;
  font-variant-numeric: tabular-nums;
}

/* ====== 桌面端适配 ====== */
@media (min-width: 768px) {
  /* 目标卡片网格 — 4列布局 */
  .target-grid { gap: 14px; }
  .target-card { padding: 18px 16px; }
  .tc-done .time-num { font-size: 26px; }

  /* 倒计时 — 更大字号 */
  .cd-days { font-size: 56px; }

  /* 计时器 — 更宽敞 */
  .timer-time { font-size: 64px; }
  .timer-subject-select { gap: 12px; }
  .timer-sub-btn { padding: 12px 10px; font-size: 14px; }

  /* 打卡表单 — 加宽 */
  .section { padding: 24px 24px; }
  .subject-times { gap: 12px; }
  .subject-input { padding: 16px 10px; }
  .subject-input input { font-size: 24px; max-width: 80px; }

  /* 日历 — 卡片更宽 */
  .cal-day { font-size: 13px; }
  .cal-year.grid-view { grid-template-columns: repeat(4, 1fr); gap: 10px; }

  /* 记录卡片 hover */
  .day-card { transition: box-shadow 0.2s, transform 0.2s; }
  .day-card:hover { box-shadow: 0 4px 16px rgba(155,114,207,0.12); }

  /* Tab hover */
  .tab:hover {
    background: var(--lavender);
    border-color: var(--accent);
    color: var(--accent);
  }
  .tab.active:hover {
    background: linear-gradient(135deg, #9b72cf, #f48fb1);
    color: #fff;
  }

  /* 筛选行 */
  .filter-row { gap: 8px; }

  /* 搜索框 hover */
  .search-bar:hover { border-color: rgba(155,114,207,0.3); }

  /* 云端选择卡片 hover */
  .cloud-choice-card:hover { background: var(--lavender); border-color: var(--accent); }
  .cloud-choice-card.cloud-card:hover { border-color: var(--accent); }
}
