:root {
  --bg-base: #151312;
  --bg-elevated: #1e1b19;
  --bg-surface: #26211e;
  --bg-input: #171412;
  --border: color-mix(in srgb, var(--text) 8%, transparent);
  --border-strong: color-mix(in srgb, var(--text) 14%, transparent);
  --text: #f5efe8;
  --muted: #b3a69b;
  --accent: #c48a4a;
  --accent-soft: color-mix(in srgb, var(--accent) 22%, transparent);
  --accent-text: #ffe9d2;
  --danger: #d06b63;
  --danger-soft: color-mix(in srgb, var(--danger) 18%, transparent);
  --highlight: #d7b37f;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

@supports not (color: color-mix(in srgb, white 50%, black)) {
  :root {
    --border: rgba(245, 239, 232, 0.08);
    --border-strong: rgba(245, 239, 232, 0.14);
    --accent-soft: rgba(196, 138, 74, 0.22);
    --danger-soft: rgba(208, 107, 99, 0.18);
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.data-load-warning {
  margin: 0;
  padding: 14px 18px;
  background: rgba(248, 113, 113, 0.15);
  border-bottom: 1px solid rgba(248, 113, 113, 0.4);
  color: #fecaca;
  font-size: 14px;
  line-height: 1.55;
}

.data-load-warning code {
  font-size: 0.9em;
  color: #e5e7eb;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--text);
  background: var(--bg-base);
  background-image:
    radial-gradient(ellipse 120% 80% at 0% -20%, rgba(196, 138, 74, 0.12), transparent 55%),
    radial-gradient(ellipse 90% 60% at 100% 0%, rgba(255, 233, 210, 0.035), transparent 50%);
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: inherit;
}

button {
  border: 0;
  border-radius: var(--radius-md);
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

button:hover {
  background: #d89b57;
  box-shadow: 0 4px 14px rgba(196, 138, 74, 0.28);
}

button:active {
  transform: scale(0.98);
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button.secondary {
  background: var(--bg-surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}

button.secondary:hover {
  background: #312b27;
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

button.danger {
  background: var(--danger-soft);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.35);
  box-shadow: none;
}

button.danger:hover {
  background: rgba(248, 113, 113, 0.28);
  color: #fff;
}

button.active {
  outline: 0;
  background: var(--accent-soft);
  color: var(--accent-text);
  border-color: rgba(196, 138, 74, 0.45);
}

button.secondary.active {
  box-shadow: inset 0 0 0 1px rgba(196, 138, 74, 0.4);
}

input,
select,
textarea {
  width: 100%;
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #3f3f46;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea {
  resize: vertical;
  min-height: 72px;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

label input,
label select,
label textarea {
  margin-top: 8px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: -0.01em;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(260px, 300px) 1fr;
  min-height: 100vh;
  max-width: 1600px;
  margin: 0 auto;
}

.sidebar {
  padding: 20px 18px 28px;
  border-right: 1px solid var(--border);
  background: rgba(25, 21, 18, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.sidebar-brand {
  margin-bottom: 16px;
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--accent-text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.15s ease, transform 0.12s ease;
}

.home-link::before {
  content: '←';
  font-size: 14px;
}

.home-link:hover {
  color: #fff3e2;
  transform: translateX(-1px);
}

.home-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

.sidebar-brand h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.brand-tagline {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  max-width: 28ch;
}

.content {
  padding: 20px 22px 36px;
  min-width: 0;
}

.panel-inline-actions {
  margin-top: 10px;
}

.ghost-btn {
  width: 100%;
}

.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-top: 12px;
  box-shadow: var(--shadow-sm);
}

.panel:first-of-type {
  margin-top: 0;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.tips-title {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.tips ul {
  padding-left: 18px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.muted {
  color: var(--muted);
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 4px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.overview-card {
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
    var(--bg-elevated);
  box-shadow: var(--shadow-sm);
}

.overview-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}

.overview-value {
  display: block;
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.overview-note {
  color: var(--muted);
  font-size: 13px;
}

.quick-dim-panel {
  margin-bottom: 14px;
}

.quick-dim-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.quick-dim-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.quick-dim-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.quick-dim-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dim-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: none;
}

.dim-chip:hover {
  background: #302925;
}

.dim-chip.active {
  background: rgba(196, 138, 74, 0.16);
  border-color: rgba(196, 138, 74, 0.35);
  color: var(--accent-text);
}

.dim-chip-name {
  font-size: 13px;
  font-weight: 600;
}

.dim-chip-count {
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-pill,
.static-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(196, 138, 74, 0.08);
  border: 1px solid rgba(196, 138, 74, 0.18);
  color: var(--accent-text);
  box-shadow: none;
}

.filter-pill:hover {
  background: rgba(196, 138, 74, 0.16);
}

.filter-pill-x {
  color: var(--muted);
}

.empty-hint {
  color: var(--muted);
  font-size: 13px;
}

.result-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.result-count {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.result-label {
  font-size: 14px;
}

.daily-date {
  font-size: 13px;
  color: var(--muted);
}

.daily-panel {
  padding: 14px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.daily-panel:has(#dailyRecommendToggle:checked) {
  border-color: rgba(196, 138, 74, 0.34);
  box-shadow:
    0 0 0 1px rgba(196, 138, 74, 0.1),
    var(--shadow-sm);
  background: linear-gradient(145deg, rgba(196, 138, 74, 0.08) 0%, var(--bg-elevated) 48%);
}

.daily-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.daily-card-main {
  min-width: 0;
  flex: 1;
}

.daily-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.daily-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
  background: var(--accent-soft);
  border: 1px solid rgba(196, 138, 74, 0.32);
  padding: 3px 8px;
  border-radius: 6px;
}

.daily-chip {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 999px;
}

.daily-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

.daily-desc {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.daily-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
  cursor: pointer;
}

.daily-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.daily-switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.daily-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, #e4e4e7 0%, #a1a1aa 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), background 0.22s ease;
}

.daily-switch input:checked + .daily-switch-track {
  background: rgba(196, 138, 74, 0.45);
  border-color: rgba(196, 138, 74, 0.55);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

.daily-switch input:checked + .daily-switch-track .daily-switch-thumb {
  transform: translateX(20px);
  background: linear-gradient(180deg, #fff9f2 0%, #f0dcc8 100%);
  box-shadow: 0 2px 6px rgba(196, 138, 74, 0.35);
}

.daily-switch input:focus-visible + .daily-switch-track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.daily-switch:hover .daily-switch-track {
  border-color: #52525b;
}

.recommend-controls {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
}

.test-panel {
  margin-top: 18px;
}

.test-panel-head {
  margin-bottom: 16px;
}

.test-panel-head .daily-badge {
  margin-bottom: 10px;
}

.test-panel-head .daily-title {
  margin-bottom: 8px;
}

.test-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.test-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.test-panel-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.view-toggle {
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.view-toggle button {
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  box-shadow: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
}

.view-toggle button:hover {
  background: var(--bg-surface);
  color: var(--text);
  box-shadow: none;
}

.view-toggle button.secondary.active {
  background: var(--bg-surface);
  color: var(--accent-text);
  border-color: var(--border-strong);
  box-shadow: none;
}

.cards-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: rgba(196, 138, 74, 0.26);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

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

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 2px;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tag-dim {
  background: rgba(196, 138, 74, 0.14);
  color: #f4dac0;
  border: 1px solid rgba(196, 138, 74, 0.24);
}

.tag-trigger {
  background: rgba(215, 179, 127, 0.12);
  color: #ead4b2;
  border: 1px solid rgba(215, 179, 127, 0.2);
}

.card-header > div:last-child.tag {
  flex-shrink: 0;
  background: var(--bg-surface);
  color: var(--muted);
  border: 1px solid var(--border);
}

.english-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 8px;
}

.english-row .english {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.english {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.speak-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.cards-view .speak-btn {
  background: var(--accent-soft);
  color: var(--accent-text);
  border: 1px solid rgba(196, 138, 74, 0.28);
}

.cards-view .speak-btn:hover {
  background: rgba(196, 138, 74, 0.24);
  color: #fff;
  box-shadow: none;
}

.chinese {
  color: var(--muted);
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.55;
}

.scene-line {
  font-size: 13px;
  color: #e4d6c8;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
}

.card-details {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.card-details summary {
  cursor: pointer;
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 600;
}

.card-details[open] summary {
  margin-bottom: 10px;
}

.meta {
  display: grid;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.meta strong {
  color: #efe3d6;
  font-weight: 600;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.card-actions button {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  padding: 9px 12px;
}

.active-soft {
  background: rgba(196, 138, 74, 0.12) !important;
  border-color: rgba(196, 138, 74, 0.28) !important;
  color: var(--accent-text) !important;
}

.status-tag {
  white-space: nowrap;
}

.status-新 {
  background: rgba(56, 189, 248, 0.12);
  color: #bae6fd;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.status-需复习 {
  background: rgba(251, 113, 133, 0.12);
  color: #fecdd3;
  border: 1px solid rgba(251, 113, 133, 0.24);
}

.status-熟悉 {
  background: rgba(34, 197, 94, 0.14);
  color: #bbf7d0;
  border: 1px solid rgba(34, 197, 94, 0.24);
}

.empty-card {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  background: var(--bg-elevated);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  font-size: 14px;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

tbody tr {
  transition: background 0.12s ease;
}

tbody tr:hover {
  background: rgba(196, 138, 74, 0.06);
}

tbody tr:last-child td {
  border-bottom: 0;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-surface);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px solid var(--border-strong);
}

.quiz-view {
  margin-top: 8px;
}

.quiz-shell {
  display: grid;
  gap: 16px;
}

.quiz-card,
.quiz-intro {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.quiz-intro {
  gap: 18px;
}

.quiz-intro-head {
  display: grid;
  gap: 10px;
  align-content: start;
}

.quiz-intro-head .daily-badge {
  justify-self: start;
}

.quiz-kicker {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 10px;
}

.quiz-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.35;
  letter-spacing: -0.03em;
}

.quiz-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.quiz-hint {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(196, 138, 74, 0.08);
  border: 1px solid rgba(196, 138, 74, 0.14);
  color: #eadac9;
  font-size: 13px;
}

.quiz-progress-wrap {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}

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

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

.quiz-progress-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--bg-input);
  overflow: hidden;
  border: 1px solid var(--border);
}

.quiz-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(196, 138, 74, 0.72), rgba(215, 179, 127, 0.95));
}

.quiz-options {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.quiz-input-wrap {
  margin-top: 18px;
}

.quiz-input-label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.quiz-answer-input {
  min-height: 110px;
  resize: vertical;
  line-height: 1.7;
}

.quiz-input-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: none;
}

.quiz-option:hover {
  background: #312b27;
}

.quiz-option:disabled {
  cursor: default;
}

.quiz-option-marker {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-text);
  font-size: 12px;
  flex-shrink: 0;
}

.quiz-option-text {
  line-height: 1.6;
}

.quiz-option.correct {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.22);
}

.quiz-option.wrong {
  background: rgba(251, 113, 133, 0.12);
  border-color: rgba(251, 113, 133, 0.22);
}

.quiz-feedback {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  line-height: 1.6;
}

.quiz-feedback.correct {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.2);
}

.quiz-feedback.wrong {
  background: rgba(251, 113, 133, 0.08);
  border-color: rgba(251, 113, 133, 0.18);
}

.quiz-feedback p {
  margin: 8px 0 0;
  color: var(--muted);
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.quiz-side-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.quiz-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.quiz-meta-card {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  padding: 14px;
}

.quiz-meta-card strong {
  display: block;
  font-size: 1.15rem;
  line-height: 1.2;
  margin-bottom: 6px;
  color: var(--text);
}

.quiz-meta-card span {
  color: var(--muted);
  font-size: 12px;
}

.quiz-cta {
  margin-top: 18px;
}

.quiz-result-card {
  gap: 14px;
}

.wrong-list-wrap {
  margin-top: 22px;
}

.wrong-list-title {
  margin: 0 0 12px;
  font-size: 1rem;
}

.wrong-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.wrong-item {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  padding: 14px;
}

.wrong-item-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.wrong-item-main {
  font-weight: 700;
  line-height: 1.5;
}

.wrong-item-sub,
.wrong-item-note,
.quiz-success-note {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.empty-quiz .quiz-intro {
  min-height: 0;
  display: grid;
  align-content: start;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  min-width: 220px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(29, 24, 21, 0.94);
  border: 1px solid rgba(196, 138, 74, 0.2);
  color: var(--text);
  box-shadow: var(--shadow-md);
}

.hidden {
  display: none !important;
}

.site-beian {
  position: relative;
  z-index: 2;
  margin: -18px auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.site-beian-copy {
  line-height: 1.6;
}

.site-beian-separator {
  opacity: 0.65;
}

.site-beian a {
  color: inherit;
  text-decoration: none;
}

.site-beian a:hover {
  color: var(--accent);
  text-decoration: underline;
}

@media (max-width: 960px) {
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .content {
    padding: 20px 18px 32px;
  }
}

@media (max-width: 720px) {
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-col,
  .test-controls,
  .test-actions {
    grid-template-columns: 1fr;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .recommend-controls {
    grid-template-columns: 1fr;
  }

  .quiz-meta-grid {
    grid-template-columns: 1fr;
  }

  .view-toggle {
    justify-content: stretch;
  }

  .view-toggle button {
    flex: 1;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding: 20px 16px 24px;
  }

  .content {
    padding: 16px 14px 28px;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }
}
