/* ========================================
   CSS Variables
   ======================================== */
:root {
  --bg: #f0f2f5;
  --card: #ffffff;
  --primary: #4f46e5;
  --primary-light: #eef2ff;
  --primary-hover: #4338ca;
  --success: #16a34a;
  --success-light: #dcfce7;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --text: #1f2937;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
  --transition: all 0.2s ease;
}

/* ========================================
   Reset & Base
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ========================================
   Header
   ======================================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.logo svg {
  border-radius: 9px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
  flex-shrink: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-date {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.header-greeting {
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
}

/* Install-to-home-screen button (Android Chrome) */
.install-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
}
.install-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(99, 102, 241, 0.45); }
.install-btn:active { transform: translateY(0); }
.install-btn[hidden] { display: none; }

/* iOS share-sheet tip banner */
.install-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1400px;
  margin: 12px auto 0;
  padding: 10px 14px;
  background: linear-gradient(135deg, #eef2ff, #faf5ff);
  border: 1px solid #e0e7ff;
  border-radius: 12px;
  color: #4338ca;
  font-size: 13px;
  font-weight: 500;
}
.install-tip svg { flex-shrink: 0; color: #6366f1; }
.install-tip span { flex: 1; line-height: 1.4; }
.install-tip b { color: #4f46e5; }
.install-tip-close {
  border: none;
  background: transparent;
  color: #6366f1;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
}
.install-tip[hidden] { display: none; }

/* ========================================
   Main Grid Layout
   ======================================== */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  padding: 20px 32px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ========================================
   Card
   ======================================== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.card-title svg {
  color: var(--primary);
  flex-shrink: 0;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-ghost {
  background: var(--border-light);
  color: var(--text-muted);
}
.btn-ghost:hover {
  background: var(--border);
  color: var(--text);
}

.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-success:hover {
  background: #15803d;
}

.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
}
.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========================================
   Plan Section
   ======================================== */
.plan-section {
  grid-column: 1;
  grid-row: 1;
}

.plan-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-select {
  padding: 5px 28px 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.plan-body {
  padding: 20px;
  flex: 1;
}

/* Empty state */
.plan-empty {
  text-align: center;
  padding: 24px 0;
}

.plan-empty-icon {
  margin-bottom: 12px;
  color: var(--text-light);
}

.plan-empty h3 {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 4px;
}

.plan-empty p {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 20px;
}

/* Plan form */
.plan-form {
  max-width: 480px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: #fff;
  transition: var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Plan overview */
.plan-overview {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.plan-overview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.plan-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.plan-dates {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Progress bar */
.progress-section {
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.progress-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.progress-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.progress-pct {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.progress-bar {
  height: 10px;
  background: rgba(79, 70, 229, 0.15);
  border-radius: 5px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #818cf8);
  border-radius: 5px;
  transition: width 0.5s ease;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-card {
  background: var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  text-align: center;
}

.stat-card .stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.stat-card .stat-name {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.stat-card.stat-today {
  background: var(--primary-light);
}
.stat-card.stat-today .stat-value {
  color: var(--primary);
}

.stat-card.stat-done {
  background: var(--success-light);
}
.stat-card.stat-done .stat-value {
  color: var(--success);
}

/* Today's target */
.today-target {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-radius: var(--radius);
  padding: 20px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.today-target-left .today-label {
  font-size: 13px;
  opacity: 0.85;
}

.today-target-left .today-num {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
}

.today-target-left .today-desc {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 2px;
}

.today-checkin {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.today-checkin input {
  width: 60px;
  padding: 6px 8px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  background: #fff;
}

.today-checkin input:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-checkin {
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  padding: 10px 20px;
  font-size: 15px;
}
.btn-checkin:hover {
  background: #fef3c7;
  color: var(--warning);
}

.checked-in-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.2);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
}

/* Plan actions */
.plan-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ========================================
   Pomodoro Section
   ======================================== */
.pomodoro-section {
  grid-column: 2;
  grid-row: 1;
}

.pomodoro-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.pomodoro-mode-tabs {
  display: flex;
  gap: 4px;
  background: var(--border-light);
  border-radius: var(--radius-sm);
  padding: 3px;
  width: 100%;
}

.mode-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.mode-tab.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.mode-tab[data-mode="break"].active {
  color: var(--success);
}

/* Ring */
.pomodoro-ring-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pomodoro-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: var(--border-light);
  stroke-width: 10;
}

.ring-progress {
  fill: none;
  stroke: var(--primary);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s linear, stroke 0.3s ease;
}

.ring-progress.break-mode {
  stroke: var(--success);
}

.pomodoro-center {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.pomodoro-time {
  font-size: 36px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.pomodoro-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* Controls */
.pomodoro-controls {
  display: flex;
  gap: 8px;
  width: 100%;
}

.btn-pomodoro {
  flex: 1;
  padding: 10px;
}

/* Stats */
.pomodoro-stats {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: center;
}

.pomodoro-stat {
  text-align: center;
  background: var(--success-light);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
}

.pomodoro-stat .stat-num {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--success);
}

.pomodoro-stat .stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* Pomodoro Settings */
.pomodoro-settings {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  background: var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.pomo-setting-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.pomo-setting-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pomo-setting-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.pomo-setting-group input[type="number"] {
  width: 64px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  background: #fff;
}

.pomo-setting-group input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.pomo-timer-type {
  flex: 1;
}

.pomo-timer-type-toggle {
  display: flex;
  gap: 4px;
  background: #fff;
  border-radius: 6px;
  padding: 3px;
  border: 1px solid var(--border);
}

.ptt-btn {
  border: none;
  background: transparent;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: var(--transition);
}

.ptt-btn.active {
  background: var(--primary);
  color: #fff;
}

.ptt-btn:hover:not(.active) {
  color: var(--text);
}

/* ========================================
   Timeline Section
   ======================================== */
.timeline-section {
  grid-column: 1;
  grid-row: 2;
}

.timeline-legend {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-done { background: var(--success); }
.dot-today { background: var(--primary); border: 2px solid var(--primary); }
.dot-miss { background: var(--danger); }
.dot-future { background: var(--border); }

.timeline-body {
  padding: 20px;
  flex: 1;
  max-height: 340px;
  overflow-y: auto;
}

.timeline-empty {
  text-align: center;
  padding: 40px 0;
  color: var(--text-light);
  font-size: 14px;
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.day-cell {
  border-radius: var(--radius-sm);
  padding: 10px;
  border: 1px solid var(--border);
  background: #fff;
  transition: var(--transition);
  cursor: default;
  position: relative;
}

.day-cell:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.day-cell .day-date {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.day-cell .day-weekday {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.day-cell .day-target {
  font-size: 12px;
  color: var(--text-muted);
}

.day-cell .day-target strong {
  color: var(--text);
  font-size: 16px;
}

.day-cell .day-status {
  font-size: 11px;
  margin-top: 4px;
  font-weight: 600;
}

/* Day cell states */
.day-cell.state-done {
  background: var(--success-light);
  border-color: var(--success);
}
.day-cell.state-done .day-status { color: var(--success); }

.day-cell.state-today {
  background: var(--primary-light);
  border-color: var(--primary);
  border-width: 2px;
}
.day-cell.state-today .day-status { color: var(--primary); }

.day-cell.state-miss {
  background: var(--danger-light);
  border-color: #fca5a5;
}
.day-cell.state-miss .day-status { color: var(--danger); }

.day-cell.state-future {
  background: var(--border-light);
  border-color: var(--border);
}
.day-cell.state-future .day-status { color: var(--text-light); }

.day-cell.state-not-started {
  background: #f9fafb;
  border-style: dashed;
}
.day-cell.state-not-started .day-status { color: var(--text-light); }

/* ========================================
   Checklist Section
   ======================================== */
.checklist-section {
  grid-column: 2;
  grid-row: 2;
}

.checklist-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.checklist-input-row {
  display: flex;
  gap: 8px;
}

.checklist-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  transition: var(--transition);
}

.checklist-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.checklist-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checklist-progress .progress-bar {
  flex: 1;
  height: 8px;
}

.checklist-progress .progress-fill {
  background: var(--success);
}

.checklist-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.checklist-filters {
  display: flex;
  gap: 4px;
  align-items: center;
}

.filter-btn {
  border: none;
  background: transparent;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition);
}

.filter-btn.active {
  background: var(--primary-light);
  color: var(--primary);
}

.filter-btn:hover:not(.active) {
  background: var(--border-light);
}

.btn-clear {
  margin-left: auto;
}

.checklist-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 300px;
  overflow-y: auto;
  flex: 1;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--border-light);
  transition: var(--transition);
}

.checklist-item:hover {
  background: var(--border);
}

.checklist-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  background: #fff;
}

.checklist-checkbox.checked {
  background: var(--success);
  border-color: var(--success);
}

.checklist-checkbox svg {
  width: 12px;
  height: 12px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s;
}

.checklist-checkbox.checked svg {
  opacity: 1;
}

.checklist-text {
  flex: 1;
  font-size: 14px;
  color: var(--text);
  word-break: break-word;
}

.checklist-item.done .checklist-text {
  text-decoration: line-through;
  color: var(--text-light);
}

.checklist-delete {
  border: none;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  opacity: 0;
  transition: var(--transition);
}

.checklist-item:hover .checklist-delete {
  opacity: 1;
}

.checklist-delete:hover {
  color: var(--danger);
  background: var(--danger-light);
}

.checklist-empty {
  text-align: center;
  padding: 24px 0;
  color: var(--text-light);
  font-size: 13px;
}

/* ========================================
   Toast
   ======================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--text);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  max-width: 320px;
}

.toast.toast-success {
  background: var(--success);
}

.toast.toast-warning {
  background: var(--warning);
}

.toast.toast-error {
  background: var(--danger);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   Scrollbar
   ======================================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
  .pomodoro-section { grid-column: 1; grid-row: 2; }
  .checklist-section { grid-column: 1; grid-row: 3; }
  .timeline-section { grid-column: 1; grid-row: 4; }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .app-header {
    padding: 12px 16px;
  }
  .header-greeting {
    display: none;
  }
  .main-grid {
    padding: 12px 16px 24px;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .today-target {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .timeline-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
}

/* ========================================
   Tab Bar
   ======================================== */
.tab-bar {
  display: flex;
  gap: 4px;
  padding: 8px 32px 0;
  max-width: 1400px;
  margin: 0 auto;
  background: transparent;
}

.tab {
  display: flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
}

.tab:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.03);
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab svg {
  flex-shrink: 0;
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ========================================
   English Module - Sub Tabs
   ======================================== */
.sub-tabs {
  display: flex;
  gap: 4px;
  padding: 16px 32px 0;
  max-width: 1400px;
  margin: 0 auto;
  overflow-x: auto;
  white-space: nowrap;
}

.eng-data-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 1400px;
  margin: 10px auto 0;
  padding: 8px 32px;
  font-size: 12px;
}
.eng-data-hint {
  color: var(--text-muted);
  background: var(--border-light);
  padding: 5px 10px;
  border-radius: 999px;
}
.eng-data-status {
  color: var(--primary);
  font-weight: 600;
}

.sub-tab {
  border: none;
  background: var(--border-light);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sub-tab svg {
  flex-shrink: 0;
}

.sub-tab:hover {
  background: var(--border);
  color: var(--text);
}

.sub-tab.active {
  background: var(--primary);
  color: #fff;
}

/* English Content */
.english-content {
  padding: 20px 32px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ========================================
   English Module - Toolbar
   ======================================== */
.eng-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.eng-search {
  flex: 1;
  min-width: 160px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  transition: var(--transition);
}

.eng-search:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.eng-filters {
  display: flex;
  gap: 4px;
  background: var(--border-light);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.eng-filter {
  border: none;
  background: transparent;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition);
}

.eng-filter.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* ========================================
   English Module - Add Form
   ======================================== */
.eng-add-form {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  display: none;
}

.eng-add-form.show {
  display: block;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.eng-add-form h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.eng-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.eng-form-row.single {
  grid-template-columns: 1fr;
}

.eng-form-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.eng-form-field input,
.eng-form-field select,
.eng-form-field textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  font-family: inherit;
  resize: vertical;
}

.eng-form-field input:focus,
.eng-form-field select:focus,
.eng-form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.eng-form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}

/* ========================================
   English Module - Source Tags
   ======================================== */
.source-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.source-tag.kaoyan {
  background: #fef3c7;
  color: #92400e;
}

.source-tag.cet {
  background: #dbeafe;
  color: #1e40af;
}

.source-tag.custom {
  background: var(--success-light);
  color: var(--success);
}

/* ========================================
   English Module - Flash Cards
   ======================================== */
.flashcard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.flashcard {
  perspective: 1200px;
  height: 180px;
  cursor: pointer;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
}

.flashcard.flipped .flashcard-inner {
  transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--shadow);
}

.flashcard-front {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
}

.flashcard-front .fc-word {
  font-size: 26px;
  font-weight: 800;
  text-align: center;
}

.flashcard-front .fc-sub {
  font-size: 13px;
  text-align: center;
  opacity: 0.8;
  margin-top: 6px;
}

.flashcard-front .fc-hint {
  font-size: 11px;
  text-align: center;
  opacity: 0.5;
  margin-top: auto;
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
}

.flashcard-back {
  background: var(--card);
  color: var(--text);
  transform: rotateY(180deg);
  border: 1px solid var(--border);
}

.flashcard-back .fc-meaning {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.flashcard-back .fc-example {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
}

.flashcard-back .fc-example-trans {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 3px;
  line-height: 1.4;
}

.flashcard-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
}

.flashcard-actions .fc-delete {
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.flashcard-actions .fc-delete:hover {
  background: rgba(220, 38, 38, 0.8);
  color: #fff;
}

.flashcard-back .flashcard-actions .fc-delete {
  background: var(--border-light);
  color: var(--text-light);
}

.flashcard-back .flashcard-actions .fc-delete:hover {
  background: var(--danger-light);
  color: var(--danger);
}

.fc-source-tag {
  position: absolute;
  bottom: 8px;
  right: 8px;
}

.flashcard-front .fc-source-tag .source-tag {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
}

/* ========================================
   English Module - Sentence Cards
   ======================================== */
.sentence-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sentence-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.sentence-card:hover {
  box-shadow: var(--shadow-lg);
}

.sentence-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--primary-light);
  border-bottom: 1px solid var(--border-light);
}

.sentence-card-head .sc-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

.sentence-card-head .sc-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sentence-card-body {
  padding: 16px;
}

.sentence-en {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 10px;
}

.sentence-translation {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: none;
}

.sentence-card.expanded .sentence-translation {
  display: block;
}

.sentence-analysis {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  background: var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: none;
}

.sentence-card.expanded .sentence-analysis {
  display: block;
}

.sc-toggle {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.sc-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.sc-delete {
  border: none;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
}

.sc-delete:hover {
  color: var(--danger);
  background: var(--danger-light);
}

/* Sentence detail sections */
.sentence-detail {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.sentence-section {
  margin-bottom: 14px;
}

.sentence-section:last-child {
  margin-bottom: 0;
}

.ss-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  padding: 2px 8px;
  background: var(--primary-light);
  border-radius: 4px;
  display: inline-block;
}

.sentence-trunk {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  background: #fef9c3;
  border-left: 3px solid #eab308;
  padding: 8px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.6;
}

.sentence-phrases,
.sentence-words {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sp-item,
.sw-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 10px;
  background: var(--border-light);
  border-radius: var(--radius-sm);
}

.sp-phrase {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}

.sp-meaning {
  font-size: 13px;
  color: var(--text-muted);
}

.sw-word {
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
  flex-shrink: 0;
}

.sw-meaning {
  font-size: 13px;
  color: var(--text-muted);
}

/* ========================================
   English Module - Logic Words (grouped)
   ======================================== */
.logic-group {
  margin-bottom: 20px;
}

.logic-group-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logic-group-title .lg-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--border-light);
  padding: 2px 8px;
  border-radius: 10px;
}

.logic-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
}

.logic-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: var(--transition);
  position: relative;
}

.logic-item:hover {
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.logic-item .li-phrase {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
}

.logic-item .li-meaning {
  font-size: 13px;
  color: var(--text);
  margin-top: 2px;
}

.logic-item .li-example {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 6px;
  line-height: 1.5;
}

.logic-item .li-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  opacity: 0;
  transition: var(--transition);
}

.logic-item:hover .li-delete {
  opacity: 1;
}

.logic-item .li-delete:hover {
  color: var(--danger);
  background: var(--danger-light);
}

.logic-item .li-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

/* ========================================
   English Module - Confuse Words
   ======================================== */
.confuse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 16px;
}

.confuse-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.confuse-card:hover {
  box-shadow: var(--shadow-lg);
}

.confuse-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.confuse-side {
  padding: 16px;
}

.confuse-side.left {
  background: linear-gradient(135deg, #eef2ff, #f0f7ff);
  border-right: 1px solid var(--border);
}

.confuse-side.right {
  background: linear-gradient(135deg, #fef3c7, #fff7ed);
}

.confuse-word {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.confuse-meaning {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.confuse-example {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 8px;
  line-height: 1.5;
}

.confuse-note {
  padding: 12px 16px;
  background: var(--border-light);
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}

.confuse-note strong {
  color: var(--primary);
}

.confuse-actions {
  position: absolute;
}

.confuse-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
}

.cc-delete {
  border: none;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  font-size: 14px;
  transition: var(--transition);
}

.cc-delete:hover {
  color: var(--danger);
  background: var(--danger-light);
}

.cc-head-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.cc-edit, .cc-ai {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  transition: var(--transition);
}
.cc-edit:hover { color: var(--primary); border-color: var(--primary); }
.cc-ai:hover { color: #7c3aed; border-color: #7c3aed; }

.confuse-ai-result {
  margin: 10px 12px 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #f5f3ff, #eef2ff);
  border: 1px solid #e0d4ff;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
}
.ai-mn-head { font-weight: 700; color: #6d28d9; margin-bottom: 4px; }
.ai-mn-pair { font-weight: 700; margin-bottom: 6px; }
.ai-mn-block { margin-bottom: 6px; }
.ai-mn-label {
  display: inline-block;
  font-weight: 700;
  color: #7c3aed;
  margin-right: 4px;
}
.ai-mn-actions { margin-top: 8px; text-align: right; }
.ai-mn-empty { color: var(--text-muted); }

/* ========================================
   English Module - Essay Templates
   ======================================== */
.template-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.template-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.template-card:hover {
  box-shadow: var(--shadow-lg);
}

.template-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--primary-light);
}

.template-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}

.template-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.template-body {
  padding: 16px;
}

.template-content {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
}

.template-content em {
  color: var(--primary);
  font-style: normal;
  font-weight: 600;
  background: var(--primary-light);
  padding: 1px 4px;
  border-radius: 3px;
}

.tc-delete {
  border: none;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: var(--transition);
}

.tc-delete:hover {
  color: var(--danger);
  background: var(--danger-light);
}

/* ========================================
   English Module - Empty State
   ======================================== */
.eng-empty {
  text-align: center;
  padding: 48px 0;
  color: var(--text-light);
}

.eng-empty svg {
  margin-bottom: 12px;
  color: var(--border);
}

.eng-empty p {
  font-size: 14px;
}

/* ========================================
   English Module - Stats Bar
   ======================================== */
.eng-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.eng-stat {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 6px;
}

.eng-stat .es-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.eng-stat .es-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* ========================================
   English Module - Responsive
   ======================================== */
@media (max-width: 768px) {
  .tab-bar {
    padding: 8px 16px 0;
  }
  .sub-tabs {
    padding: 12px 16px 0;
  }
  .english-content {
    padding: 16px 16px 24px;
  }
  .eng-form-row {
    grid-template-columns: 1fr;
  }
  .confuse-grid {
    grid-template-columns: 1fr;
  }
  .flashcard-grid {
    grid-template-columns: 1fr;
  }
  .logic-items {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Plan - Task Title Mode (New)
   ======================================== */

/* Mode toggle for count/title input */
.mode-toggle {
  display: flex;
  gap: 4px;
  background: var(--border-light);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.mode-toggle-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.mode-toggle-btn.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Textarea for task titles */
.plan-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
  resize: vertical;
  transition: var(--transition);
  line-height: 1.7;
}

.plan-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.label-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.form-hint {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* 标题模式：加号逐条添加 */
.task-add-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.task-level-group {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}
.task-level-opt {
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.task-level-opt:hover { border-color: var(--primary); }
.task-level-opt.active {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}
.task-add-bar {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.task-add-input {
  flex: 1 1 auto;
  box-sizing: border-box;
  padding: 14px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font-size: 16px;
  line-height: 1.4;
}
.task-add-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-light);
}
.task-add-btn {
  flex: 0 0 auto;
  height: auto;
  padding: 0 22px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
}
.draft-task-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.draft-task-empty {
  font-size: 13px;
  color: var(--text-muted);
  padding: 10px 0;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 8px;
}
.draft-task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 8px;
}
.draft-task-item.lvl-1 { border-left-color: var(--primary, #4f6df5); }
.draft-task-item.lvl-2 { border-left-color: #36cfc9; }
.draft-task-item.lvl-3 { border-left-color: #ffa940; }
.dt-level {
  flex: 0 0 auto;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--bg, #f0f2f5);
  color: var(--text-muted);
  white-space: nowrap;
}
.dt-title {
  flex: 1 1 auto;
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dt-del {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
}
.dt-del:hover {
  color: var(--danger, #ff4d4f);
  background: var(--danger-light, #fff1f0);
}
.dt-add-sub {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dt-add-sub:hover { background: var(--primary-light, #eef2ff); }
.draft-sub-input {
  margin-left: 24px;
  background: var(--bg, #f7f8fa);
}
.draft-sub-input.lvl-2 { border-left-color: #36cfc9; }
.draft-sub-input.lvl-3 { border-left-color: #ffa940; }
.dt-sub-input {
  flex: 1 1 auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 14px;
  background: var(--card);
  color: var(--text);
}
.dt-sub-input:focus { outline: none; border-color: var(--primary); }
.dt-sub-confirm, .dt-sub-cancel {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dt-sub-confirm { background: var(--primary); color: #fff; }
.dt-sub-confirm:hover { opacity: .9; }
.dt-sub-cancel { background: var(--border-light); color: var(--text-muted); }
.dt-sub-cancel:hover { background: var(--danger-light, #fff1f0); color: var(--danger, #ff4d4f); }

/* Today's task list */
.today-tasks {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.today-tasks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--primary-light);
  border-bottom: 1px solid var(--border-light);
}

.today-tasks-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.today-tasks-progress {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

.today-tasks-list {
  padding: 8px;
  max-height: 360px;
  overflow-y: auto;
}

/* Task item - hierarchical */
.task-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  user-select: none;
}

.task-item:hover {
  background: var(--border-light);
}

.task-item.level-1 .task-title {
  font-weight: 700;
  font-size: 14px;
}

.task-item.level-2 {
  padding-left: 28px;
}

.task-item.level-2 .task-title {
  font-weight: 600;
  font-size: 14px;
}

.task-item.level-3 {
  padding-left: 44px;
}

.task-item.level-3 .task-title {
  font-weight: 500;
  font-size: 13px;
  color: var(--text-muted);
}

.task-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  background: #fff;
  margin-top: 1px;
}

.task-checkbox:hover {
  border-color: var(--primary);
}

.task-checkbox.checked {
  background: var(--success);
  border-color: var(--success);
}

.task-checkbox svg {
  width: 12px;
  height: 12px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s;
}

.task-checkbox.checked svg {
  opacity: 1;
}

/* Level tag badge */
.task-level-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.task-level-tag.tag-l1 {
  background: #eef2ff;
  color: var(--primary);
}

.task-level-tag.tag-l2 {
  background: #fef3c7;
  color: #92400e;
}

.task-level-tag.tag-l3 {
  background: var(--border-light);
  color: var(--text-muted);
}

/* Level selector in plan-detail task tree */
.task-level-select {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 1px;
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.task-level-select:focus { outline: none; border-color: var(--primary); }
.task-level-select.tls-l1 { background: #eef2ff; color: var(--primary); border-color: #c7d2fe; }
.task-level-select.tls-l2 { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.task-level-select.tls-l3 { background: #f3f4f6; color: var(--text-muted); border-color: var(--border); }

/* Add-sub-level button + inline child title editor in plan-detail task tree */
.task-add-child {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  color: var(--primary);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  margin-left: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.task-add-child:hover { background: var(--primary); color: #fff; border-color: transparent; }
.child-title-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  background: var(--card);
  color: var(--text);
  font-size: 14px;
}
.child-title-input:focus { outline: none; }
.child-title-ok {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border: none;
  border-radius: 6px;
  background: #16a34a;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.task-title {
  flex: 1;
  word-break: break-word;
  line-height: 1.5;
}

.task-item.completed .task-title {
  text-decoration: line-through;
  color: var(--text-light);
}

.task-empty {
  text-align: center;
  padding: 20px 0;
  color: var(--text-light);
  font-size: 13px;
}

/* Timeline day tasks */
.day-tasks {
  margin-top: 4px;
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.4;
}

.day-task-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.day-task-more {
  font-size: 10px;
  color: var(--text-light);
  font-style: italic;
}

/* ========================================
   Voice Input Section
   ======================================== */
.voice-input-section {
  margin-bottom: 16px;
  text-align: center;
}

.voice-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  font-size: 14px;
  border: 2px solid var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 24px;
  transition: var(--transition);
}

.voice-btn:hover {
  background: var(--primary);
  color: #fff;
}

.voice-btn.recording {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}

.voice-hint {
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--primary);
  text-align: center;
}

/* ========================================
   Focus Statistics Section
   ======================================== */
.focus-stats-section {
  width: 100%;
  margin-top: 4px;
}

.focus-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.fs-card {
  text-align: center;
  border-radius: var(--radius-sm);
  padding: 8px;
}

.fs-card.fs-today { background: var(--primary-light); }
.fs-card.fs-week { background: var(--success-light); }
.fs-card.fs-count { background: var(--warning-light); }
.fs-card.fs-all { background: var(--border-light); }

.fs-card.fs-today .fs-value { color: var(--primary); }
.fs-card.fs-week .fs-value { color: var(--success); }
.fs-card.fs-count .fs-value { color: var(--warning); }
.fs-card.fs-all .fs-value { color: var(--text); }

.fs-value {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.fs-label {
  font-size: 10px;
  color: var(--text-muted);
}

.focus-chart {
  background: var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.focus-chart-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.focus-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 80px;
}

.focus-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.focus-bar-track {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.focus-bar-fill {
  width: 80%;
  background: var(--primary);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  transition: height 0.3s ease;
  position: relative;
}

.focus-bar-fill.today {
  background: var(--success);
}

.focus-bar-num {
  font-size: 9px;
  color: #fff;
  font-weight: 700;
  padding-top: 2px;
}

.focus-bar-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
}

.focus-bar-label.today {
  color: var(--success);
  font-weight: 700;
}

/* ========================================
   Life Tools Tab
   ======================================== */
.life-content {
  padding: 20px 32px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.memo-section, .accounting-section {
  max-width: 900px;
  margin: 0 auto;
}

/* ========================================
   Countdown Module (倒数纪念日)
   ======================================== */
.countdown-section {
  max-width: 900px;
  margin: 0 auto;
}
.countdown-body {
  padding: 20px;
}
.cd-add-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cd-add-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.cd-name-input {
  flex: 1 1 240px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font-size: 15px;
}
.cd-name-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
.cd-date-input {
  flex: 0 0 auto;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font-size: 15px;
}
.cd-emoji-pick {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.cd-emoji-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}
.cd-emoji-btn:hover {
  border-color: var(--primary);
}
.cd-emoji-btn.active {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.12);
}
.cd-mode-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.cd-mode-btn {
  padding: 10px 16px;
  border: none;
  background: var(--card);
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}
.cd-mode-btn + .cd-mode-btn {
  border-left: 1px solid var(--border);
}
.cd-mode-btn.active {
  background: var(--primary);
  color: #fff;
}
.cd-add-btn {
  flex: 0 0 auto;
  border-radius: 10px;
}
.cd-empty {
  text-align: center;
  padding: 36px 0;
  color: var(--text-light);
  font-size: 14px;
}
.cd-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cd-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}
.cd-item:hover {
  border-color: var(--primary);
}
.cd-highlight {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(236, 72, 153, 0.10));
  border-color: var(--primary);
}
.cd-emoji {
  font-size: 30px;
  flex: 0 0 auto;
  width: 44px;
  text-align: center;
}
.cd-info {
  flex: 1 1 auto;
  min-width: 0;
}
.cd-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cd-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.cd-number {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: var(--primary);
}
.cd-num {
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.cd-unit {
  font-size: 15px;
  font-weight: 600;
}
.cd-highlight .cd-number {
  color: var(--accent, #ec4899);
}
.cd-delete {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: var(--text-light);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition);
}
.cd-delete:hover {
  color: var(--danger);
  background: var(--danger-light, rgba(239, 68, 68, 0.1));
}
.cd-sub-label {
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
  margin: 2px 4px 14px;
}

/* ========================================
   Memo Module
   ======================================== */
.memo-body {
  padding: 20px;
  flex: 1;
}

.memo-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.memo-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
  resize: none;
  transition: var(--transition);
}

.memo-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.memo-search-row {
  margin-bottom: 12px;
}

.memo-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
}

.memo-search:focus {
  outline: none;
  border-color: var(--primary);
}

.memo-empty {
  text-align: center;
  padding: 32px 0;
  color: var(--text-light);
  font-size: 14px;
}

.memo-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 500px;
  overflow-y: auto;
}

.memo-item {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: var(--transition);
  position: relative;
}

.memo-item.pinned {
  border-left: 4px solid var(--primary);
}

.memo-item:hover {
  box-shadow: var(--shadow);
}

.memo-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 8px;
}

.memo-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.memo-time {
  font-size: 11px;
  color: var(--text-muted);
}

.memo-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

.memo-btn {
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 12px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.memo-btn:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
}

.memo-delete:hover {
  color: var(--danger);
}

/* ========================================
   Accounting Module
   ======================================== */
.accounting-body {
  padding: 20px;
  flex: 1;
}

.acct-summary-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.acct-summary-item {
  text-align: center;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
}

.acct-summary-item.total { background: var(--primary-light); }
.acct-summary-item.income { background: var(--success-light); }
.acct-summary-item.expense { background: var(--danger-light); }
.acct-summary-item.net { background: var(--border-light); }

.acct-summary-item .as-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.acct-summary-item .as-value {
  font-size: 18px;
  font-weight: 800;
}

.acct-summary-item.total .as-value { color: var(--primary); }
.acct-summary-item.income .as-value { color: var(--success); }
.acct-summary-item.expense .as-value { color: var(--danger); }
.acct-summary-item.net.positive .as-value { color: var(--success); }
.acct-summary-item.net.negative .as-value { color: var(--danger); }

/* Account cards */
.acct-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.acct-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  transition: var(--transition);
  cursor: default;
  position: relative;
}

.acct-card:hover {
  box-shadow: var(--shadow);
}

.acct-card.add-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-style: dashed;
  border-color: var(--border);
  color: var(--text-muted);
  cursor: pointer;
  min-height: 80px;
  font-size: 13px;
  gap: 4px;
}

.acct-card.add-card:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.acct-card-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.acct-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.acct-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acct-card-del {
  border: none;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
  border-radius: 4px;
}

.acct-card-del:hover {
  color: var(--danger);
  background: var(--danger-light);
}

.acct-balance {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.acct-balance.negative {
  color: var(--danger);
}

/* Transaction form */
.acct-form-toggle {
  margin-bottom: 12px;
}

.acct-txn-form {
  background: var(--border-light);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.atf-type-toggle {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.atf-type-btn {
  flex: 1;
  border: 2px solid var(--border);
  background: #fff;
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.atf-type-btn.expense.active {
  border-color: var(--danger);
  background: var(--danger-light);
  color: var(--danger);
}

.atf-type-btn.income.active {
  border-color: var(--success);
  background: var(--success-light);
  color: var(--success);
}

.atf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.atf-row.single {
  grid-template-columns: 1fr;
}

.atf-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.atf-field input, .atf-field select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
}

.atf-field input:focus, .atf-field select:focus {
  outline: none;
  border-color: var(--primary);
}

.atf-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* Filters */
.acct-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.acct-filter-sel, .acct-filter-month {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  background: #fff;
}

/* Transaction list */
.acct-txn-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.acct-date-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
  margin-top: 8px;
}

.acct-date-summary {
  display: flex;
  gap: 8px;
}

.day-income { color: var(--success); font-weight: 600; }
.day-expense { color: var(--danger); font-weight: 600; }

.acct-txn-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.acct-txn-item:hover {
  background: var(--border-light);
}

.atx-left {
  flex: 1;
}

.atx-category {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.atx-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.atx-cat-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  line-height: 1.5;
}

.atx-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.atx-amount {
  font-size: 16px;
  font-weight: 800;
}

.atx-amount.income { color: var(--success); }
.atx-amount.expense { color: var(--danger); }

.atx-delete {
  border: none;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
  border-radius: 4px;
  opacity: 0;
  transition: var(--transition);
}

.acct-txn-item:hover .atx-delete {
  opacity: 1;
}

.atx-delete:hover {
  color: var(--danger);
  background: var(--danger-light);
}

.atx-edit {
  border: none;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
  border-radius: 4px;
  opacity: 0;
  transition: var(--transition);
}

.acct-txn-item:hover .atx-edit {
  opacity: 1;
}

.atx-edit:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.acct-empty {
  text-align: center;
  padding: 32px 0;
  color: var(--text-light);
  font-size: 14px;
}

.acct-error {
  padding: 24px;
  background: var(--danger-light, #fff1f0);
  border: 1px solid var(--danger, #ff4d4f);
  color: var(--danger, #ff4d4f);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
}

/* Monthly expense breakdown by category */
.acct-breakdown {
  margin: 14px 0 4px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.ab-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.ab-total {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light);
}
.ab-empty {
  font-size: 13px;
  color: var(--text-light);
  padding: 6px 0;
}
.ab-row {
  display: grid;
  grid-template-columns: 56px 1fr 64px 36px;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
}
.ab-cat {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ab-bar-wrap {
  height: 8px;
  background: var(--bg-subtle, #f0f0f3);
  border-radius: 4px;
  overflow: hidden;
}
.ab-bar {
  height: 100%;
  border-radius: 4px;
  transition: width .4s ease;
  min-width: 2px;
}
.ab-amt {
  font-size: 12px;
  color: var(--text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ab-pct {
  font-size: 12px;
  color: var(--text-light);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Budget block */
.acct-budget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.ab-budget-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.ab-budget-row .acct-filter-sel {
  flex: 1;
}

.ab-budget-bar-wrap {
  height: 8px;
  background: var(--border-light, #eee);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}

.ab-budget-bar {
  height: 100%;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.ab-budget-bar.over {
  background: linear-gradient(90deg, #f5222d, #ff7875);
}

.ab-budget-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

.ab-budget-text.over {
  color: var(--danger);
  font-weight: 600;
}

.atf-req {
  color: var(--danger);
  font-weight: 600;
}

/* ========================================
   English - Daily Sentence Card
   ======================================== */
.daily-sentence-card {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.daily-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.daily-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.daily-date {
  font-size: 12px;
  opacity: 0.8;
}

.daily-en {
  font-size: 16px;
  line-height: 1.7;
  font-weight: 600;
  margin-bottom: 8px;
}

.daily-trans {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.9;
}

/* ========================================
   English - Template Group
   ======================================== */
.template-group {
  margin-bottom: 24px;
}

.template-group-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tg-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--border-light);
  padding: 2px 8px;
  border-radius: 10px;
}

/* ========================================
   English - Import Preview
   ======================================== */
.import-preview {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.import-image-preview {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.import-text-preview {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

/* Responsive for accounting */
@media (max-width: 768px) {
  .life-content {
    padding: 16px 16px 24px;
  }
  .acct-summary-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .acct-cards {
    grid-template-columns: 1fr;
  }
  .atf-row {
    grid-template-columns: 1fr;
  }
  .focus-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .cd-item {
    flex-wrap: wrap;
    gap: 10px;
  }
  .cd-number {
    order: 3;
    flex: 1 1 100%;
    justify-content: flex-end;
  }
}

/* ============================================================
   Daily Pick Card (英语每日推荐)
   ============================================================ */
.daily-pick-card {
  background: linear-gradient(135deg, #eef2ff 0%, #f0fdf4 100%);
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.dp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.dp-badge {
  background: #4f6df5;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
}
.dp-date {
  font-size: 12px;
  color: #6b7280;
}
.dp-word {
  font-size: 22px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 4px;
}
.dp-sub {
  font-size: 14px;
  color: #475569;
  margin-bottom: 4px;
}
.dp-tag {
  display: inline-block;
  background: #e0e7ff;
  color: #4f6df5;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  margin-left: 4px;
}
.dp-highlight {
  font-size: 15px;
  color: #dc2626;
  font-weight: 600;
  margin-bottom: 4px;
}
.dp-example {
  font-size: 13px;
  color: #475569;
  font-style: italic;
  margin-top: 6px;
  line-height: 1.5;
}
.dp-trans {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}
.dp-compare {
  display: flex;
  align-items: center;
  gap: 16px;
}
.dp-side {
  flex: 1;
}
.dp-vs {
  font-size: 14px;
  font-weight: 800;
  color: #dc2626;
  background: #fee2e2;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dp-note {
  font-size: 13px;
  color: #475569;
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.6);
  border-radius: 8px;
}
.dp-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}
.dp-content {
  font-size: 13px;
  color: #475569;
  line-height: 1.6;
  max-height: 120px;
  overflow-y: auto;
}
.dp-content em {
  color: #4f6df5;
  font-weight: 600;
  font-style: normal;
  background: #eef2ff;
  padding: 0 4px;
  border-radius: 4px;
}

/* Import Bar + Paste Box */
.eng-import-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.paste-import-box {
  background: var(--border-light);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
}
.paste-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.5;
}
.paste-import-box textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}
.paste-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* ========================================
   周期记账 (Recurring)
   ======================================== */
.acct-recurring {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
}

.acct-recurring-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.ar-title svg {
  color: #7c3aed;
  background: #f3e8ff;
  padding: 5px;
  border-radius: 9px;
  box-sizing: content-box;
  flex-shrink: 0;
}

.ar-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-light);
  font-size: 13px;
  background: var(--border-light);
  border-radius: var(--radius-sm);
}

.ar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ar-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: var(--transition);
}

.ar-rule:hover {
  border-color: #c4b5fd;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.08);
}

.ar-rule.ar-paused {
  opacity: 0.55;
  background: var(--border-light);
}

.ar-rule-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3e8ff;
}

.ar-rule-main {
  flex: 1;
  min-width: 0;
}

.ar-rule-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ar-rule-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ar-rule-amount {
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

.ar-rule-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
  font-size: 12px;
  color: var(--text-muted);
}

.ar-cycle-tag {
  background: #eef2ff;
  color: var(--primary);
  padding: 1px 8px;
  border-radius: 20px;
  font-weight: 600;
}

.ar-cat-tag {
  padding: 1px 8px;
  border-radius: 20px;
  font-weight: 600;
}

.ar-next {
  color: var(--text-light);
}

.ar-rule-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.ar-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.ar-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.ar-apply {
  color: var(--primary);
  border-color: #c7d2fe;
  background: var(--primary-light);
}

.ar-apply:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.ar-edit, .ar-del {
  padding: 5px 8px;
  font-size: 13px;
}

.ar-del:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-light);
}

.ar-form {
  margin-top: 12px;
}

/* ========================================
   Card title icon badge (polished look)
   ======================================== */
.card-title svg {
  color: var(--primary);
  background: var(--primary-light);
  padding: 5px;
  border-radius: 9px;
  box-sizing: content-box;
  flex-shrink: 0;
}

/* ============================================================
   生理期预测 (Period Prediction)
   ============================================================ */
.period-body { padding: 18px 20px 22px; }

.per-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.per-stat {
  background: linear-gradient(135deg, #fff1f6, #fde7f3);
  border: 1px solid #fbd3e6;
  border-radius: 14px;
  padding: 14px 14px 12px;
  text-align: center;
}
.per-stat-label { font-size: 12px; color: #b23a7a; font-weight: 600; }
.per-stat-value { font-size: 19px; color: #d6336c; font-weight: 700; margin: 6px 0 2px; line-height: 1.2; }
.per-stat-value b { font-size: 23px; }
.per-stat-sub { font-size: 12px; color: #9c6b86; }

.per-bar-wrap { margin: 6px 0 20px; }
.per-bar {
  position: relative;
  display: flex;
  height: 16px;
  border-radius: 999px;
  overflow: hidden;
  background: #f1f3f5;
}
.per-seg { height: 100%; }
.per-seg-mens { background: #f06595; }
.per-seg-foll { background: #ffd8e6; }
.per-seg-ovul { background: #f783ac; }
.per-seg-lute { background: #fae0e7; }
.per-marker {
  position: absolute;
  top: -4px;
  width: 4px;
  height: 24px;
  background: #212529;
  border-radius: 2px;
  transform: translateX(-2px);
  box-shadow: 0 0 0 2px #fff;
}
.per-bar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  font-size: 12px;
  color: #868e96;
  align-items: center;
}
.per-bar-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.per-dot-mens { background: #f06595; }
.per-dot-foll { background: #ffd8e6; }
.per-dot-ovul { background: #f783ac; }
.per-dot-lute { background: #fae0e7; }
.per-phase-now { margin-left: auto; color: #d6336c; font-weight: 600; }

.per-detail {
  background: var(--card-soft, #f8f9fb);
  border-radius: 12px;
  padding: 6px 14px;
  margin-bottom: 18px;
}
.per-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-light, #eef0f3);
  font-size: 14px;
}
.per-detail-row:last-child { border-bottom: none; }
.per-detail-row span { color: var(--text-muted, #868e96); }
.per-detail-row b { color: var(--text, #212529); font-weight: 600; }

.per-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}
.per-field { display: flex; flex-direction: column; gap: 6px; }
.per-field label { font-size: 13px; font-weight: 600; color: var(--text, #212529); }
.per-field-row { display: flex; align-items: center; gap: 8px; }
.per-field input[type="number"] {
  width: 90px;
  padding: 8px 10px;
  border: 1px solid var(--border, #dee2e6);
  border-radius: 10px;
  font-size: 14px;
}
.per-mini-btn {
  border: 1px solid #f3c0d8;
  background: #fff0f6;
  color: #d6336c;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.per-hint { font-size: 11px; color: var(--text-muted, #868e96); }

.per-record { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.per-record-btn { width: 100%; justify-content: center; }
.per-record-row { display: flex; gap: 8px; }
.per-record-row input[type="date"] {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--border, #dee2e6);
  border-radius: 10px;
  font-size: 14px;
}

.per-history h4 { font-size: 14px; color: var(--text, #212529); margin: 4px 0 8px; }
.per-history ul { list-style: none; padding: 0; margin: 0; }
.per-history li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  background: var(--card-soft, #f8f9fb);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 14px;
}
.per-h-date { color: var(--text, #212529); }
.per-del {
  border: none;
  background: transparent;
  color: #f06595;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.per-privacy {
  font-size: 12px;
  color: var(--text-muted, #868e96);
  text-align: center;
  margin: 16px 0 0;
}

@media (max-width: 560px) {
  .per-stats { grid-template-columns: 1fr; }
  .per-settings { grid-template-columns: 1fr; }
}

/* ============================================================
   翻译 (Translate)
   ============================================================ */
.translate-body { padding: 18px 20px 22px; }
.tx-langs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.tx-select {
  flex: 1;
  padding: 9px 10px;
  border: 1px solid var(--border, #dee2e6);
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  color: var(--text, #212529);
}
.tx-swap {
  border: 1px solid var(--border, #dee2e6);
  background: var(--card-soft, #f8f9fb);
  color: var(--primary, #4f6df5);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.tx-swap:hover { transform: rotate(180deg); }
.tx-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border, #dee2e6);
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
  color: var(--text, #212529);
  background: #fff;
}
.tx-input:focus { outline: none; border-color: var(--primary, #4f6df5); box-shadow: 0 0 0 3px var(--primary-light, #eef2ff); }
.tx-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}
.tx-count { font-size: 12px; color: var(--text-muted, #868e96); margin-right: auto; }
.tx-output {
  min-height: 90px;
  background: var(--card-soft, #f8f9fb);
  border: 1px solid var(--border-light, #eef0f3);
  border-radius: 12px;
  padding: 14px 16px;
}
.tx-placeholder, .tx-loading { color: var(--text-muted, #868e96); font-size: 14px; }
.tx-result {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text, #212529);
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 10px;
}
.tx-error { color: #e03131; font-size: 14px; }
.tx-copy { margin-top: 4px; }
.tx-foot { font-size: 11px; color: var(--text-muted, #868e96); margin-top: 10px; text-align: center; }

/* ---- Dictionary card ---- */
.dict-output { margin-top: 14px; }
.dict-loading, .dict-placeholder { color: var(--text-muted, #868e96); font-size: 14px; }
.dict-card {
  background: #fff;
  border: 1px solid var(--border-light, #eef0f3);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 4px 14px rgba(79, 109, 245, 0.05);
}
.dict-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dashed var(--border-light, #eef0f3);
  padding-bottom: 10px;
  margin-bottom: 12px;
}
.dict-word-block { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.dict-word { font-size: 22px; font-weight: 700; color: var(--text, #212529); }
.dict-phon { font-size: 14px; color: var(--primary, #4f6df5); font-family: Georgia, 'Times New Roman', serif; }
.dict-pos { font-size: 12px; color: #fff; background: var(--primary, #4f6df5); padding: 2px 8px; border-radius: 6px; }
.dict-audio {
  border: 1px solid var(--border, #dee2e6);
  background: var(--card-soft, #f8f9fb);
  border-radius: 50%;
  width: 38px; height: 38px;
  font-size: 16px; cursor: pointer; flex-shrink: 0;
  transition: all 0.15s ease;
}
.dict-audio:hover { background: var(--primary-light, #eef2ff); transform: scale(1.05); }
.dict-cn { font-size: 15px; color: var(--text, #212529); margin-bottom: 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.dc-label { font-size: 11px; color: var(--text-muted, #868e96); background: var(--card-soft, #f8f9fb); padding: 2px 7px; border-radius: 6px; }
.dict-freq { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.dict-freq.freq-high { background: #ffe3e3; color: #c92a2a; }
.dict-freq.freq-mid { background: #fff3bf; color: #e67700; }
.dict-freq.freq-low { background: #e6fcf5; color: #0ca678; }
.dict-section { margin-top: 12px; }
.ds-title { font-size: 13px; font-weight: 700; color: var(--primary, #4f6df5); margin-bottom: 6px; }
.ds-freq { font-size: 13px; color: var(--text-muted, #868e96); margin-bottom: 4px; }
.ds-list { margin: 4px 0 0; padding-left: 18px; }
.ds-list li { font-size: 13px; color: var(--text, #212529); margin-bottom: 3px; }
.ds-ex { margin: 6px 0; font-size: 13px; }
.ds-ex-en { color: var(--text, #212529); font-style: italic; }
.ds-ex-zh { color: var(--text-muted, #868e96); }
.ds-defs { margin: 4px 0 0; padding-left: 18px; }
.ds-defs li { font-size: 13px; color: var(--text, #212529); margin-bottom: 6px; line-height: 1.6; }
.dd-pos { font-size: 11px; color: #fff; background: var(--primary, #4f6df5); padding: 1px 6px; border-radius: 5px; margin-right: 4px; }
.dd-ex { color: var(--text-muted, #868e96); font-size: 12px; margin-top: 2px; padding-left: 4px; }
.ds-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.ds-chip { font-size: 12px; background: var(--card-soft, #f8f9fb); border: 1px solid var(--border-light, #eef0f3); color: var(--text, #212529); padding: 4px 9px; border-radius: 8px; }
.ds-chip.root { background: #f3f0ff; border-color: #e5dbff; color: #6741d9; }
.ds-chip-label { font-size: 11px; color: var(--text-muted, #868e96); margin-right: 2px; align-self: center; }
.ds-chip.syn { background: #e6fcf5; border-color: #c3fae8; color: #0ca678; }
.ds-chip.ant { background: #fff0f6; border-color: #ffdeeb; color: #c2255c; }
.dict-rare { background: linear-gradient(180deg, #fff9db 0%, #fffdf5 100%); border: 1px solid #ffe8a3; border-radius: 10px; padding: 10px 12px; }
.dict-rare .ds-title { color: #e67700; }
.dict-actions { display: flex; gap: 10px; margin-top: 16px; }

/* ---- 词库浏览器（自己挑词） ---- */
.lex-bank {
  margin-top: 18px;
  border-top: 1px dashed var(--border-light, #eef0f3);
  padding-top: 16px;
}
.lex-bank-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; margin-bottom: 10px;
}
.lex-bank-title { font-size: 14px; font-weight: 700; color: var(--text, #212529); }
.lex-search {
  flex: 1; min-width: 140px; max-width: 240px;
  padding: 7px 12px; font-size: 13px;
  border: 1px solid var(--border, #dee2e6); border-radius: 9px;
  background: var(--card-soft, #f8f9fb); color: var(--text, #212529);
}
.lex-search:focus { outline: none; border-color: var(--primary, #4f6df5); }
.lex-cats { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.lex-cat {
  padding: 5px 12px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border-light, #eef0f3); border-radius: 999px;
  background: var(--card, #fff); color: var(--text-muted, #868e96); cursor: pointer;
  transition: all 0.15s ease;
}
.lex-cat:hover { border-color: var(--primary, #4f6df5); color: var(--primary, #4f6df5); }
.lex-cat.active { background: var(--primary, #4f6df5); border-color: transparent; color: #fff; }
.lex-words {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}
.lex-word {
  padding: 9px 10px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border-light, #eef0f3); border-radius: 10px;
  background: var(--card-soft, #f8f9fb); color: var(--text, #212529);
  cursor: pointer; transition: all 0.15s ease; text-align: left;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lex-word:hover {
  border-color: var(--primary, #4f6df5);
  background: var(--primary-light, #eef2ff); color: var(--primary, #4f6df5);
  transform: translateY(-1px);
}
.lex-empty { font-size: 13px; color: var(--text-muted, #868e96); padding: 8px 0; }

/* ---- 生词本 ---- */
.card-hint { font-size: 12px; color: var(--text-muted, #868e96); font-weight: 500; margin-left: auto; }
.vocab-body { padding: 4px 0; }
.vocab-stats { display: flex; gap: 18px; font-size: 13px; color: var(--text-muted, #868e96); margin-bottom: 14px; }
.vocab-stats b { color: var(--primary, #4f6df5); }
.vocab-list { display: flex; flex-direction: column; gap: 10px; }
.vocab-card {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--border-light, #eef0f3);
  border-radius: 12px; padding: 12px 14px;
  transition: all 0.15s ease;
}
.vocab-card.mastered { background: #f4fcf6; border-color: #d3f9d8; }
.vocab-card.mastered .vocab-word { text-decoration: line-through; opacity: 0.7; }
.vocab-main { flex: 1; min-width: 0; }
.vocab-word { font-size: 16px; font-weight: 700; color: var(--text, #212529); display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.vocab-phon { font-size: 12px; color: var(--primary, #4f6df5); font-family: Georgia, serif; font-weight: 400; }
.vocab-pos { font-size: 11px; color: #fff; background: var(--primary, #4f6df5); padding: 1px 7px; border-radius: 5px; }
.vocab-cn { font-size: 13px; color: var(--text, #212529); margin-top: 2px; }
.vocab-ex { font-size: 12px; color: var(--text-muted, #868e96); font-style: italic; margin-top: 2px; }
.vocab-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.vc-btn {
  border: 1px solid var(--border, #dee2e6); background: #fff; color: var(--primary, #4f6df5);
  font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 8px; cursor: pointer;
  transition: all 0.15s ease;
}
.vc-btn:hover { background: var(--primary-light, #eef2ff); }
.vc-btn.on { background: #e6fcf5; border-color: #63e6be; color: #0ca678; }
.vc-btn.del { color: #e03131; border-color: #ffc9c9; padding: 6px 9px; }
.vc-btn.del:hover { background: #fff5f5; }

/* ---- 易混词：单侧（来自加入易混词） ---- */
.confuse-card.single { border-style: dashed; }
.confuse-card.single .confuse-side.right.single-add {
  display: flex; align-items: center; justify-content: center;
}
.cc-add-pair {
  border: 1px dashed var(--primary, #4f6df5); background: var(--primary-light, #eef2ff);
  color: var(--primary, #4f6df5); font-size: 12px; font-weight: 600;
  padding: 8px 12px; border-radius: 8px; cursor: pointer;
}
.cc-add-pair:hover { background: #e0e7ff; }

/* ============================================================
   Sidebar Layout
   ============================================================ */
.app-layout {
  display: flex;
  min-height: calc(100vh - 72px);
}
.sidebar {
  width: 224px;
  flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 12px;
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
}
.side-nav { display: flex; flex-direction: column; gap: 6px; }
.side-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: none;
  background: transparent;
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  width: 100%;
}
.side-item svg { flex-shrink: 0; color: var(--text-light); transition: var(--transition); }
.side-item:hover { background: var(--border-light); color: var(--text); }
.side-item.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.32);
}
.side-item.active svg { color: #fff; }
.side-foot { padding: 10px 8px; }
.side-ver { font-size: 11px; color: var(--text-light); font-weight: 500; }

.content-area {
  flex: 1;
  min-width: 0;
  padding: 24px 32px 40px;
  overflow-y: auto;
}

/* ============================================================
   Plan Task Tree (主 → 次 → 小)
   ============================================================ */
.task-tree { margin-top: 6px; }
.tree-group { position: relative; }
.tree-lv1 { margin: 0; }
.tree-lv2 { margin-left: 22px; border-left: 2px dashed var(--border); padding-left: 14px; }
.tree-lv3 { margin-left: 22px; border-left: 2px dotted #e9d5ff; padding-left: 14px; }
.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--border-light);
  margin: 6px 0;
  cursor: pointer;
  transition: var(--transition);
}
.task-item:hover { background: #eef2ff; }
.task-item.completed { opacity: 0.6; }
.task-item.completed .task-title { text-decoration: line-through; }
.task-item.level-1 { background: linear-gradient(135deg, #eef2ff, #f5f3ff); font-weight: 700; }
.task-item.level-2 { background: #f8fafc; }
.task-item.level-3 { background: #fdfcff; }
.task-level-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  flex-shrink: 0;
}
.tag-l1 { background: #4f46e5; color: #fff; }
.tag-l2 { background: #7c3aed; color: #fff; }
.tag-l3 { background: #a855f7; color: #fff; }
.task-title { font-size: 14px; }

/* ============================================================
   Pomodoro focus link
   ============================================================ */
.pomo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 10px;
  flex-wrap: wrap;
}
.pomo-link-label-ico { font-size: 18px; }
.pomo-link-select {
  flex: 1;
  min-width: 160px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  background: var(--card);
  color: var(--text);
}
.pomo-link-select:focus { outline: none; border-color: var(--primary); }
.pomo-link-current { font-size: 13px; color: var(--primary); font-weight: 600; width: 100%; }

/* ============================================================
   身材管理 Body
   ============================================================ */
.body-body { padding: 4px 2px; }
.body-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.body-stat {
  background: var(--border-light);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}
.bs-value { font-size: 26px; font-weight: 800; color: var(--primary); }
.bs-value.down { color: var(--success); }
.bs-value.up { color: var(--danger); }
.bs-unit { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-left: 2px; }
.bs-name { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.body-chart {
  background: var(--border-light);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
}
.body-chart-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.bw-svg { width: 100%; height: 180px; display: block; }
.bw-dot { fill: #4f46e5; stroke: #fff; stroke-width: 1.5; }
.bw-axis { fill: var(--text-light); font-size: 11px; text-anchor: middle; }
.body-chart-hint { color: var(--text-muted); font-size: 13px; padding: 30px 0; text-align: center; }
.body-row-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.body-subtitle { font-size: 15px; margin-bottom: 10px; color: var(--text); }
.body-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.body-form-field { display: flex; flex-direction: column; gap: 4px; }
.body-form-field label { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.body-form-field input, .body-form-field select {
  padding: 9px 10px; border: 1px solid var(--border); border-radius: 9px;
  font-size: 14px; background: var(--card); color: var(--text);
}
.body-form-field input:focus, .body-form-field select:focus { outline: none; border-color: var(--primary); }
.body-list { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow-y: auto; }
.body-item {
  position: relative;
  background: var(--border-light);
  border-radius: 10px;
  padding: 10px 34px 10px 12px;
}
.bi-main { font-size: 14px; }
.bi-main strong { font-size: 16px; color: var(--text); }
.bi-date { font-size: 12px; color: var(--text-light); margin-left: 6px; }
.bi-kcal { font-size: 12px; color: var(--warning); font-weight: 600; margin-left: 6px; }
.bi-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.bi-del {
  position: absolute; top: 8px; right: 8px;
  border: none; background: transparent; color: var(--text-light);
  font-size: 18px; cursor: pointer; line-height: 1;
}
.bi-del:hover { color: var(--danger); }
.body-empty { color: var(--text-muted); font-size: 13px; padding: 12px; text-align: center; }
.body-profile { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border); font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.body-profile input { width: 70px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 7px; }

/* ============================================================
   锻炼 Workout
   ============================================================ */
.workout-body { padding: 4px 2px; }
.wk-intro { color: var(--text-muted); font-size: 14px; margin-bottom: 14px; }
.wk-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.wk-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--card); color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: var(--transition);
}
.wk-chip:hover { border-color: var(--primary); }
.wk-chip.active { background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(79,70,229,.3); }
.wk-chip-ico { font-size: 16px; }
.wk-actions { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.wk-count { font-size: 13px; color: var(--text-muted); }
.wk-empty { color: var(--text-muted); font-size: 14px; padding: 40px; text-align: center; background: var(--border-light); border-radius: 12px; }
.wk-group { margin-bottom: 18px; }
.wk-group-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.wk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.wk-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px; cursor: pointer; transition: var(--transition);
}
.wk-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.wk-card-head { display: flex; justify-content: space-between; align-items: center; }
.wk-name { font-size: 16px; font-weight: 700; }
.wk-level { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.lv-easy { background: #dcfce7; color: #16a34a; }
.lv-hard { background: #fee2e2; color: #dc2626; }
.wk-target { font-size: 12px; color: var(--text-muted); margin: 6px 0; }
.wk-meta { font-size: 13px; color: var(--primary); font-weight: 600; }
.wk-open { font-size: 12px; color: var(--text-light); margin-top: 8px; }
.wk-modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; }
.wk-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(3px); }
.wk-modal-card {
  position: relative; z-index: 1; background: #ffffff; border-radius: 18px;
  padding: 24px; width: min(520px, 92vw); min-width: 280px; min-height: 200px;
  max-height: 88vh; overflow-y: auto; box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  color: #1f2937; box-sizing: border-box;
}
.wk-modal-close { position: absolute; top: 14px; right: 14px; border: none; background: var(--border-light); width: 32px; height: 32px; border-radius: 50%; font-size: 20px; cursor: pointer; color: var(--text-muted); }
.wk-modal-head { display: flex; align-items: center; gap: 10px; }
.wk-modal-head h3 { font-size: 20px; }
.wk-modal-target { color: var(--text-muted); font-size: 13px; margin: 6px 0; }
.wk-modal-meta { color: var(--primary); font-weight: 700; font-size: 14px; margin-bottom: 12px; }
.wk-video-wrap { margin: 8px 0 14px; }
.wk-video { width: 100%; border-radius: 12px; background: #000; display: block; }
.wk-video-note { font-size: 11px; color: var(--text-light); margin: 6px 0; }
.wk-yt { text-decoration: none; }
.wk-steps-title { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.wk-steps { padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.wk-steps li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.wk-step-num { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--primary-light); color: var(--primary); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* ============================================================
   助眠 Sleep
   ============================================================ */
.sleep-body { padding: 4px 2px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sl-block { background: var(--border-light); border-radius: 16px; padding: 18px; }
.sl-block-wide { grid-column: 1 / -1; }
.sl-block-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.sl-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.sl-cat {
  padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--card); font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text);
  transition: var(--transition);
}
.sl-cat:hover { border-color: var(--primary); }
.sl-cat.active { background: var(--primary); color: #fff; border-color: transparent; }
.sl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.sl-sound {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px;
  transition: var(--transition); display: flex; flex-direction: column; gap: 8px;
}
.sl-sound.on { border-color: var(--primary); box-shadow: 0 4px 12px rgba(79,70,229,.18); background: var(--primary-light); }
.sl-sound-toggle {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%;
  border: none; background: transparent; cursor: pointer; padding: 0; text-align: left;
}
.sl-sound-name { font-size: 14px; font-weight: 700; color: var(--text); }
.sl-sound-state { font-size: 11px; color: var(--text-light); }
.sl-sound.on .sl-sound-state { color: var(--primary); }
.sl-sound-vol { width: 100%; }
.sl-sound-range { width: 100%; accent-color: #4f46e5; cursor: pointer; }
.sl-sound-range:disabled { opacity: .4; }
.sl-volume { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.sl-volume input[type=range] { flex: 1; accent-color: #4f46e5; }
.sl-timer { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; font-size: 13px; color: var(--text-muted); }
.sl-timer-label { font-weight: 600; color: var(--text); }
.sl-timer-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.sl-timer-btn {
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--card); font-size: 12px; font-weight: 600; cursor: pointer; color: var(--text); transition: var(--transition);
}
.sl-timer-btn:hover { border-color: var(--primary); }
.sl-timer-btn.active { background: var(--primary); color: #fff; border-color: transparent; }
.sl-timer-off { color: var(--text-light); }
.sl-timer-display { font-weight: 700; color: var(--primary); min-width: 70px; }
.sl-breath-timer { margin-bottom: 16px; }
.sl-num {
  width: 64px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card); font-size: 13px; font-weight: 600; color: var(--text); transition: var(--transition);
}
.sl-num:focus { outline: none; border-color: var(--primary); }
.sl-timer-unit { font-size: 13px; color: var(--text-muted); }
.sl-presets-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.sl-breath-pick { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.sl-pat {
  padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--card); font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text);
}
.sl-pat.active { background: var(--primary); color: #fff; border-color: transparent; }
.breath-stage { position: relative; height: 240px; display: flex; align-items: center; justify-content: center; }
.breath-stage.lock { height: 200px; }
.breath-circle {
  width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #a5b4fc, #4f46e5 70%);
  transform: scale(0.7); transition: transform 1s ease-in-out;
  box-shadow: 0 0 60px rgba(79, 70, 229, 0.45);
}
.breath-circle.in { transform: scale(1.08); }
.breath-circle.out { transform: scale(0.7); }
.breath-circle.hold { transform: scale(1.08); }
.breath-center { position: absolute; text-align: center; pointer-events: none; }
.breath-label { font-size: 18px; font-weight: 700; color: var(--text); }
.breath-count { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.breath-quote { text-align: center; color: var(--text-muted); font-size: 14px; margin-top: 12px; font-style: italic; }
.breath-quote.lock { color: rgba(255,255,255,.85); }

/* 人声引导开关 */
.sl-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; user-select: none; margin-left: auto; }
.sl-switch input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.sl-switch span { white-space: nowrap; }
.sleep-lock .sl-switch { color: rgba(255,255,255,.85); }
.sleep-lock {
  position: fixed; inset: 0; z-index: 400; background: linear-gradient(160deg, #0f172a, #1e1b4b 60%, #312e81);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 0; color: #fff;
  padding: 6vh 0 0; overflow: hidden;
}
/* 关键修复：.sleep-lock 设了 display:flex，会覆盖浏览器默认的 [hidden]{display:none}，
   导致锁屏遮罩一直显示、盖住侧边栏。这里显式补回隐藏规则。 */
.sleep-lock[hidden] { display: none; }
.sl-lock-breath-stage[hidden],
.sl-breath-pick[hidden],
.sl-breath-timer[hidden],
.breath-quote.lock[hidden] { display: none; }
.sl-lock-top { display: flex; flex-direction: column; align-items: center; gap: 12px; flex: 0 0 auto; }
.sl-lock-sound { font-size: 15px; color: rgba(255,255,255,.9); text-align: center; max-width: 80vw; }
.sl-lock-timer { font-size: 14px; color: rgba(165,180,252,.95); font-weight: 700; }
.sl-lock-actions { display: flex; gap: 12px; margin-top: 14px; }
.sl-lock-actions .btn-primary { background: #4f46e5; }
.sl-lock-actions .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }

.sl-lock-panel-toggle {
  margin-top: auto; margin-bottom: 10px; background: rgba(255,255,255,.12); color: #fff;
  border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 10px 22px;
  font-size: 14px; font-weight: 700; cursor: pointer; backdrop-filter: blur(8px);
  display: flex; align-items: center; gap: 8px; transition: var(--transition);
}
.sl-lock-panel-toggle:hover { background: rgba(255,255,255,.18); }
.sl-lock-chevron { font-size: 11px; opacity: .8; }
.sl-lock-panel {
  width: 100%; flex: 1 1 auto; overflow-y: auto; background: rgba(15, 23, 42, .92);
  border-top: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(18px);
}
.sl-lock-panel[hidden] { display: none; }
.sl-lock-panel-inner { padding: 18px 22px 26px; max-width: 760px; margin: 0 auto; }
.sleep-lock .sl-cats { justify-content: center; margin-bottom: 14px; }
.sleep-lock .sl-cat { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.sleep-lock .sl-cat.active { background: #4f46e5; }
.sleep-lock .sl-sound { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.15); }
.sleep-lock .sl-sound.on { background: rgba(79,70,229,.25); border-color: #6366f1; }
.sleep-lock .sl-sound-name { color: #fff; }
.sleep-lock .sl-sound-state { color: rgba(255,255,255,.65); }
.sleep-lock .sl-sound.on .sl-sound-state { color: #a5b4fc; }
.sleep-lock .sl-volume { color: rgba(255,255,255,.8); margin-top: 14px; }
.sleep-lock .sl-timer { color: rgba(255,255,255,.8); margin-top: 14px; }
.sleep-lock .sl-timer-label { color: #fff; }
.sleep-lock .sl-timer-btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.sleep-lock .sl-timer-btn.active { background: #4f46e5; }
.sleep-lock .sl-timer-display { color: #a5b4fc; }
.sleep-lock .sl-breath-timer { color: rgba(255,255,255,.8); margin-top: 14px; }
.sleep-lock .sl-num { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.sleep-lock .sl-timer-unit { color: rgba(255,255,255,.7); }
.sleep-lock .sl-lock-grid { margin-bottom: 6px; }
.sl-lock-panel .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.sl-lock-panel .btn-primary { background: #4f46e5; }
.sl-lock-breath { margin-top: 16px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 14px; }
.sl-lock-breath-toggle {
  width: 100%; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: #fff; border-radius: 10px; padding: 10px; font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--transition);
}
.sl-lock-breath-toggle:hover { background: rgba(255,255,255,.16); }
.sl-lock-breath-toggle.active { background: rgba(79,70,229,.35); border-color: #6366f1; }
.sl-lock-breath-stage { margin: 14px 0 6px; }
.sleep-lock .sl-pat { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.sleep-lock .sl-pat.active { background: #4f46e5; }
.sleep-lock .breath-label { color: #fff; }
.sleep-lock .breath-count { color: rgba(255,255,255,.7); }
.sleep-lock .breath-quote { color: rgba(255,255,255,.85); margin-top: 10px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .app-layout { flex-direction: column; min-height: auto; }
  .sidebar {
    width: 100%; height: auto; position: static; flex-direction: row;
    overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border); padding: 8px;
  }
  .side-nav { flex-direction: row; gap: 4px; }
  .side-item { width: auto; white-space: nowrap; padding: 10px 14px; }
  .side-item span { display: none; }
  .side-foot { display: none; }
  .content-area { padding: 16px 14px 32px; }
  .body-stats { grid-template-columns: repeat(2, 1fr); }
  .body-row-grid { grid-template-columns: 1fr; }
  .sleep-body { grid-template-columns: 1fr; }
}

