:root {
  --bg: #f4efe6;
  --bg-deep: #efe5d3;
  --surface: rgba(255, 250, 241, 0.82);
  --surface-strong: rgba(255, 249, 238, 0.95);
  --surface-border: rgba(126, 93, 35, 0.18);
  --text: #2b241d;
  --muted: #746759;
  --brand: #0f766e;
  --brand-soft: #d1f1e7;
  --accent: #b45309;
  --danger: #a61b29;
  --party-red: #a21d2c;
  --party-red-soft: rgba(162, 29, 44, 0.14);
  --gold: #c68b1d;
  --gold-soft: rgba(198, 139, 29, 0.18);
  --shadow: 0 18px 45px rgba(77, 57, 26, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font-ui: "Segoe UI Variable", "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 30%),
    radial-gradient(circle at center top, rgba(162, 29, 44, 0.12), transparent 38%),
    radial-gradient(circle at right 10% top 12%, rgba(198, 139, 29, 0.16), transparent 25%),
    linear-gradient(180deg, #fbf5eb 0%, var(--bg) 45%, var(--bg-deep) 100%);
}

.page-glow {
  position: fixed;
  inset: auto;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  filter: blur(44px);
  opacity: 0.4;
  pointer-events: none;
}

.page-glow-left {
  top: -8rem;
  left: -6rem;
  background: rgba(15, 118, 110, 0.22);
}

.page-glow-right {
  right: -8rem;
  top: 8rem;
  background: rgba(180, 83, 9, 0.18);
}

.motion-enabled .page-glow-left {
  animation: glow-float 9.5s ease-in-out infinite;
}

.motion-enabled .page-glow-right {
  animation: glow-float 11s ease-in-out infinite reverse;
}

.shell {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.hero,
.panel {
  position: relative;
  backdrop-filter: blur(14px);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(198, 139, 29, 0.24), rgba(162, 29, 44, 0.12), rgba(15, 118, 110, 0.18));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  padding: 30px;
  background:
    linear-gradient(180deg, rgba(255, 251, 244, 0.94), rgba(250, 242, 229, 0.84)),
    radial-gradient(circle at top right, rgba(198, 139, 29, 0.12), transparent 34%),
    radial-gradient(circle at left top, rgba(162, 29, 44, 0.08), transparent 28%);
  animation: rise-in 0.55s ease-out both;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 10px;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1,
.panel h2 {
  margin: 0;
  line-height: 1.15;
}

.hero h1 {
  font-size: clamp(2rem, 3vw, 3.3rem);
  max-width: 12ch;
}

.hero-text,
.panel-desc,
.status-message,
.empty-state,
.config-summary,
.preview-meta,
.history-meta {
  color: var(--muted);
}

.hero-text {
  max-width: 56ch;
  font-size: 1rem;
  line-height: 1.7;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hero-title-only {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 42px 30px;
}

.hero-copy-centered {
  display: grid;
  justify-items: center;
  gap: 24px;
  text-align: center;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

.hero-title-only .brand-title {
  width: 100%;
  max-width: none !important;
  text-align: center;
  white-space: normal !important;
  margin: 0 auto;
  justify-self: center;
}

.hero-action-area {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-action-buttons {
  width: 100%;
  margin-top: 0;
  justify-content: center;
}

.hero-action-buttons .button {
  min-width: 180px;
}

.hero-status-message {
  min-height: 1.6rem;
  color: var(--muted);
  text-align: center;
}

.motion-toggle {
  flex: 0 0 auto;
  min-width: 0;
  min-height: 30px;
  padding: 4px 9px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(43, 36, 29, 0.78);
  background: linear-gradient(135deg, rgba(255, 249, 238, 0.86), rgba(241, 247, 244, 0.74));
  border: 1px solid rgba(126, 93, 35, 0.12);
  box-shadow: 0 4px 12px rgba(77, 57, 26, 0.06);
  opacity: 0.76;
}

.motion-toggle:hover {
  opacity: 1;
}

.stat-card,
.result-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.95), rgba(244, 236, 219, 0.7));
  border: 1px solid rgba(126, 93, 35, 0.12);
}

.stat-value {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.panel {
  margin-top: 20px;
  padding: 24px;
  animation: rise-in 0.55s ease-out both;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.upload-form,
.config-form {
  display: grid;
  gap: 16px;
}

.upload-dropzone {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 8px;
  padding: 26px 18px;
  border: 1.5px dashed rgba(15, 118, 110, 0.35);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(209, 241, 231, 0.5), rgba(255, 250, 241, 0.9));
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: rgba(15, 118, 110, 0.72);
  background: linear-gradient(180deg, rgba(209, 241, 231, 0.88), rgba(255, 250, 241, 0.98));
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.14);
  transform: translateY(-1px);
}

.upload-dropzone input {
  display: none;
}

.upload-file-name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 249, 238, 0.92);
  border: 1px solid rgba(126, 93, 35, 0.14);
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 600;
  max-width: min(100%, 34rem);
  overflow-wrap: anywhere;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.92rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(126, 93, 35, 0.18);
  border-radius: var(--radius-md);
  background: rgba(255, 251, 245, 0.96);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(15, 118, 110, 0.18);
  border-color: rgba(15, 118, 110, 0.45);
}

.button {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  position: relative;
  overflow: hidden;
  color: white;
  background: linear-gradient(135deg, #0f766e, #155e75);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.18);
}

.motion-enabled .button.primary::after {
  content: "";
  position: absolute;
  inset: -20% auto -20% -35%;
  width: 38%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0));
  transform: skewX(-18deg);
  animation: shimmer-slide 3.8s ease-in-out infinite;
}

.button.ghost {
  color: var(--text);
  background: rgba(255, 249, 238, 0.92);
  border: 1px solid rgba(126, 93, 35, 0.18);
}

.button.danger {
  color: white;
  background: linear-gradient(135deg, #be123c, #9f1239);
}

.content-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}

.bank-list,
.history-list,
.result-details {
  display: grid;
  gap: 14px;
}

.bank-card,
.history-card,
.answer-review {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  border: 1px solid rgba(126, 93, 35, 0.12);
}

.bank-card header,
.history-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.bank-title,
.history-title {
  margin: 0;
  font-size: 1.08rem;
}

.meta-grid,
.result-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.meta-chip,
.type-pill,
.nav-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(209, 241, 231, 0.65);
  color: #0d5f58;
  font-size: 0.88rem;
}

.type-pill {
  cursor: pointer;
  border: 1px solid transparent;
}

.type-pill.active {
  background: rgba(15, 118, 110, 0.14);
  border-color: rgba(15, 118, 110, 0.3);
}

.bank-actions,
.history-actions,
.question-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.preview {
  min-height: 260px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.preview-question {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 250, 241, 0.95);
  border: 1px solid rgba(126, 93, 35, 0.12);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.type-count-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.type-count-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(126, 93, 35, 0.12);
  background: rgba(255, 251, 245, 0.92);
}

.type-count-card strong {
  font-size: 0.96rem;
}

.type-count-card .preview-meta {
  margin: 0;
}

.exam-panel,
.result-panel {
  scroll-margin-top: 24px;
}

.exam-head,
.exam-meta {
  align-items: center;
}

.exam-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  white-space: nowrap;
  font-weight: 700;
}

.exam-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
}

.question-stage {
  display: grid;
  align-content: start;
  gap: 12px;
}

.exam-nav {
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: 70vh;
  overflow: auto;
  padding-right: 4px;
}

.nav-pill {
  justify-content: flex-start;
  background: rgba(255, 250, 241, 0.94);
  border: 1px solid rgba(126, 93, 35, 0.12);
  cursor: pointer;
}

.nav-pill.current {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.16), rgba(198, 139, 29, 0.14));
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.08);
}

.nav-pill.answered {
  color: #0f766e;
}

.question-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 420px;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.96), rgba(248, 241, 227, 0.92));
  border: 1px solid rgba(126, 93, 35, 0.14);
  font-size: 1.08rem;
}

.question-card > * {
  position: relative;
  z-index: 1;
}

.question-tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(198, 139, 29, 0.16), rgba(162, 29, 44, 0.08));
  color: #9a4c09;
  font-size: 0.96rem;
  box-shadow: inset 0 0 0 1px rgba(198, 139, 29, 0.14);
}

.question-stem {
  margin: 0 0 18px;
  font-size: 1.36rem;
  line-height: 1.8;
}

.option-list {
  display: grid;
  gap: 12px;
}

.option-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(126, 93, 35, 0.12);
  background: rgba(255, 251, 245, 0.96);
  cursor: pointer;
  font-size: 1.08rem;
  line-height: 1.7;
}

.option-card.selected {
  border-color: rgba(15, 118, 110, 0.45);
  background: linear-gradient(135deg, rgba(209, 241, 231, 0.72), rgba(248, 250, 240, 0.96));
  box-shadow: 0 14px 24px rgba(15, 118, 110, 0.08);
}

.option-marker {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(15, 118, 110, 0.12);
  font-weight: 700;
  font-size: 1rem;
}

.question-card textarea {
  min-height: 170px;
  resize: vertical;
  font-size: 1.06rem;
  line-height: 1.8;
}

.status-pill.ok {
  background: rgba(209, 241, 231, 0.74);
  color: #0d5f58;
}

.status-pill.bad {
  background: rgba(254, 226, 226, 0.8);
  color: #991b1b;
}

.status-pill.info {
  background: rgba(254, 243, 199, 0.85);
  color: #92400e;
}

.answer-review p {
  margin: 8px 0 0;
  line-height: 1.75;
  font-size: 1.02rem;
}

.answer-review strong {
  color: var(--text);
}

.feedback-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.feedback-burst-core,
.feedback-burst-ring,
.feedback-spark {
  position: absolute;
}

.feedback-burst-core {
  top: 18px;
  right: 18px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
}

.feedback-burst-ring {
  top: 22px;
  right: 20px;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  border: 2px solid transparent;
  opacity: 0;
}

.feedback-burst-ring-secondary {
  width: 148px;
  height: 148px;
  top: 2px;
  right: 0;
}

.feedback-spark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  opacity: 0;
}

.feedback-spark-1 { top: 38px; right: 108px; }
.feedback-spark-2 { top: 84px; right: 54px; }
.feedback-spark-3 { top: 44px; right: 28px; }
.feedback-spark-4 { top: 110px; right: 102px; }

.motion-enabled .question-card-motion-ok {
  animation: celebrate-pop 680ms cubic-bezier(0.22, 1, 0.36, 1);
}

.motion-enabled .question-card-motion-bad {
  animation: warning-shake 560ms cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.motion-enabled .question-card-motion-ok .feedback-burst-core {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.96), rgba(20, 184, 166, 0.88));
  color: #f5fffd;
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.24);
  animation: burst-tag-in 760ms ease-out forwards;
}

.motion-enabled .question-card-motion-ok .feedback-burst-ring {
  border-color: rgba(15, 118, 110, 0.28);
  animation: pulse-ring-ok 860ms ease-out forwards;
}

.motion-enabled .question-card-motion-ok .feedback-burst-ring-secondary {
  border-color: rgba(45, 212, 191, 0.22);
  animation-delay: 80ms;
}

.motion-enabled .question-card-motion-ok .feedback-spark {
  background: radial-gradient(circle, rgba(45, 212, 191, 0.95) 0%, rgba(15, 118, 110, 0.08) 72%);
  animation: sparkle-rise 920ms ease-out forwards;
}

.motion-enabled .question-card-motion-bad .feedback-burst-core {
  background: linear-gradient(135deg, rgba(153, 27, 27, 0.96), rgba(239, 68, 68, 0.88));
  color: #fff7f7;
  box-shadow: 0 14px 28px rgba(153, 27, 27, 0.22);
  animation: burst-tag-in 740ms ease-out forwards;
}

.motion-enabled .question-card-motion-bad .feedback-burst-ring {
  border-color: rgba(239, 68, 68, 0.24);
  animation: pulse-ring-bad 820ms ease-out forwards;
}

.motion-enabled .question-card-motion-bad .feedback-spark {
  background: radial-gradient(circle, rgba(248, 113, 113, 0.95) 0%, rgba(185, 28, 28, 0.08) 72%);
  animation: sparkle-burst 760ms ease-out forwards;
}

.motion-enabled .question-card-motion-ok .option-card.correct,
.motion-enabled .question-card-motion-ok .option-card.missed,
.motion-enabled .question-card-motion-bad .option-card.wrong,
.motion-enabled .question-card-motion-bad .option-card.missed {
  animation: answer-card-pop 620ms ease-out;
}

.hidden {
  display: none !important;
}

.empty-state {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 249, 238, 0.9);
  border: 1px dashed rgba(126, 93, 35, 0.22);
}

@keyframes celebrate-pop {
  0% {
    transform: translateY(12px) scale(0.97);
    box-shadow: 0 0 0 rgba(15, 118, 110, 0);
  }
  55% {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 26px 46px rgba(15, 118, 110, 0.16);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes warning-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

@keyframes burst-tag-in {
  0% {
    opacity: 0;
    transform: translate3d(0, -10px, 0) scale(0.82);
  }
  55% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1.06);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes pulse-ring-ok {
  0% {
    opacity: 0.55;
    transform: scale(0.42);
  }
  100% {
    opacity: 0;
    transform: scale(1.36);
  }
}

@keyframes pulse-ring-bad {
  0% {
    opacity: 0.5;
    transform: scale(0.42);
  }
  100% {
    opacity: 0;
    transform: scale(1.3);
  }
}

@keyframes sparkle-rise {
  0% {
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(0.5);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(-14px, -20px, 0) scale(1.5);
  }
}

@keyframes sparkle-burst {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.45);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(16px, 8px, 0) scale(1.35);
  }
}

@keyframes answer-card-pop {
  0% {
    transform: scale(0.96);
  }
  60% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes glow-float {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, 12px, 0) scale(1.04);
  }
}

@keyframes shimmer-slide {
  0% {
    transform: translateX(-135%);
  }
  100% {
    transform: translateX(135%);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero,
  .content-grid,
  .exam-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy-centered {
    max-width: none;
  }

  .hero-stats,
  .meta-grid,
  .result-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exam-nav {
    grid-auto-flow: column;
    grid-auto-columns: minmax(150px, 1fr);
    overflow-x: auto;
    max-height: none;
    padding-bottom: 6px;
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 12px 10px 24px;
  }

  .hero,
  .panel,
  .question-card {
    padding: 14px;
  }

  .hero {
    gap: 14px;
  }

  .hero-copy-centered {
    gap: 12px;
  }

  .hero h1 {
    max-width: none;
  }

  .hero-title-only {
    padding: 18px 12px;
  }

  .hero-status-message {
    min-height: 1.2rem;
    font-size: 0.94rem;
  }

  .hero-stats,
  .meta-grid,
  .result-summary {
    grid-template-columns: 1fr;
  }

  .panel-head,
  .bank-card header,
  .history-card header {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
  }

  .panel-kicker,
  .eyebrow {
    margin-bottom: 6px;
    font-size: 0.74rem;
  }

  .exam-head {
    gap: 10px;
  }

  .exam-meta {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.95rem;
  }

  .exam-layout,
  .question-stage {
    gap: 10px;
  }

  .exam-nav {
    gap: 8px;
    grid-auto-columns: minmax(108px, 1fr);
    padding-bottom: 2px;
  }

  .nav-pill {
    padding: 7px 10px;
    font-size: 0.8rem;
  }

  .question-card {
    min-height: 0;
    padding: 14px;
    font-size: 0.98rem;
  }

  .question-tag {
    margin-bottom: 8px;
    padding: 5px 9px;
    font-size: 0.84rem;
  }

  .question-stem {
    margin-bottom: 12px;
    font-size: 1.12rem;
    line-height: 1.6;
  }

  .option-list {
    gap: 8px;
  }

  .option-card {
    gap: 10px;
    padding: 12px 12px;
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .option-marker {
    width: 32px;
    height: 32px;
    font-size: 0.92rem;
  }

  .question-card textarea {
    min-height: 120px;
    font-size: 0.98rem;
    line-height: 1.65;
  }

  .answer-review {
    margin-top: 12px;
    padding: 14px;
  }

  .answer-review p {
    margin-top: 6px;
    font-size: 0.94rem;
    line-height: 1.6;
  }

  .motion-toggle {
    min-height: 28px;
    padding: 4px 8px;
    font-size: 0.66rem;
  }

  .question-actions {
    padding: 10px;
    gap: 8px;
    border-radius: 14px;
  }

  .question-actions .button {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 0.96rem;
  }
}

.content-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 20px;
}

.button:disabled,
.type-pill:disabled,
.option-card:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.bank-card.selected {
  border-color: rgba(15, 118, 110, 0.36);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.12);
}

.field-hint {
  color: var(--muted);
}

.option-card {
  width: 100%;
  text-align: left;
}

.question-card .preview-meta,
.question-card .field span {
  font-size: 1rem;
}

.question-actions {
  position: relative;
  margin-top: 0;
  padding: 14px 16px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.98), rgba(251, 242, 229, 0.96)),
    linear-gradient(90deg, rgba(198, 139, 29, 0.06), rgba(162, 29, 44, 0.05));
  border: 1px solid rgba(126, 93, 35, 0.12);
  box-shadow: 0 10px 22px rgba(77, 57, 26, 0.1);
  justify-content: flex-start;
}

.question-actions .button {
  flex: 0 1 auto;
  min-width: 136px;
  min-height: 50px;
  font-size: 1.05rem;
}

.option-card.readonly {
  cursor: default;
}

.nav-pill.draft {
  color: #9a4c09;
}

.answer-review {
  margin-top: 18px;
}

.result-details .answer-review {
  margin-top: 0;
}

code {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: #0d5f58;
}


.nav-pill.ok {
  background: rgba(209, 241, 231, 0.88);
  border-color: rgba(15, 118, 110, 0.24);
  color: #0d5f58;
}

.nav-pill.bad {
  background: rgba(254, 226, 226, 0.88);
  border-color: rgba(185, 28, 28, 0.18);
  color: #991b1b;
}

.nav-pill.info {
  background: rgba(254, 243, 199, 0.92);
  border-color: rgba(180, 83, 9, 0.22);
  color: #92400e;
}

.question-card.question-card-ok {
  border-color: rgba(15, 118, 110, 0.32);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.08), 0 18px 38px rgba(15, 118, 110, 0.08);
}

.question-card.question-card-bad {
  border-color: rgba(185, 28, 28, 0.26);
  box-shadow: inset 0 0 0 1px rgba(185, 28, 28, 0.06), 0 18px 38px rgba(185, 28, 28, 0.07);
}

.question-card.question-card-info {
  border-color: rgba(180, 83, 9, 0.26);
  box-shadow: inset 0 0 0 1px rgba(180, 83, 9, 0.06), 0 18px 38px rgba(180, 83, 9, 0.06);
}

.option-card.correct {
  border-color: rgba(15, 118, 110, 0.48);
  background: linear-gradient(135deg, rgba(209, 241, 231, 0.88), rgba(240, 253, 250, 0.96));
  box-shadow: 0 14px 24px rgba(15, 118, 110, 0.12);
}

.option-card.missed {
  border-color: rgba(15, 118, 110, 0.38);
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.98), rgba(255, 251, 235, 0.94));
}

.option-card.wrong {
  border-color: rgba(185, 28, 28, 0.34);
  background: linear-gradient(135deg, rgba(254, 226, 226, 0.96), rgba(255, 244, 244, 0.98));
  box-shadow: 0 14px 24px rgba(185, 28, 28, 0.08);
}

.option-card.correct .option-marker,
.option-card.missed .option-marker {
  background: rgba(15, 118, 110, 0.18);
  color: #0d5f58;
}

.option-card.wrong .option-marker {
  background: rgba(185, 28, 28, 0.14);
  color: #991b1b;
}

.auth-panel,
.security-panel {
  animation-delay: 0.05s;
}

.auth-form {
  max-width: 420px;
}

.status-message {
  min-height: 1.5rem;
}

#admin-content {
  display: grid;
  gap: 0;
}

.stat-card .stat-value {
  word-break: break-word;
}


.brand-title {
  max-width: none !important;
  white-space: nowrap;
  font-size: clamp(1.2rem, 2vw, 2.3rem) !important;
  letter-spacing: 0;
}

.brand-title-main,
.brand-title-sub {
  display: block;
  width: 100%;
  text-align: center;
}

.brand-title-main {
  white-space: nowrap;
  font-family: "STKaiti", "KaiTi", "Kaiti SC", "DFKai-SB", serif;
  font-size: clamp(0.72rem, 2.7vw, 1.9rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.brand-title-sub {
  margin-top: 0.3rem;
  white-space: nowrap;
  font-size: clamp(0.78rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-title-main::after {
  content: "";
  display: block;
  width: min(340px, 36vw);
  height: 2px;
  margin: 10px auto 0;
  background: linear-gradient(90deg, rgba(198, 139, 29, 0), rgba(198, 139, 29, 0.86), rgba(162, 29, 44, 0.26), rgba(198, 139, 29, 0));
}

.answer-review {
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.96), rgba(251, 245, 235, 0.94)),
    linear-gradient(135deg, rgba(198, 139, 29, 0.04), rgba(15, 118, 110, 0.04));
  box-shadow: inset 0 0 0 1px rgba(198, 139, 29, 0.08);
}

.compact-actions {
  margin-top: 0;
}

.history-pagination {
  justify-content: center;
  align-items: center;
  margin-top: 18px;
}

.history-pagination .meta-chip {
  min-width: 132px;
}

.summary-table-wrap {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  border: 1px solid rgba(126, 93, 35, 0.12);
}

.summary-table-head {
  display: grid;
  gap: 6px;
}

.summary-table-head h3 {
  margin: 0;
  font-size: 1.02rem;
}

.summary-table-scroll {
  overflow-x: auto;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.summary-table th,
.summary-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(126, 93, 35, 0.12);
  vertical-align: top;
}

.summary-table th {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  background: rgba(255, 248, 236, 0.92);
}

.summary-table tbody tr:last-child td {
  border-bottom: none;
}

.summary-table tbody tr:nth-child(even) {
  background: rgba(255, 251, 245, 0.72);
}

#security-body.hidden {
  display: none;
}

.history-title {
  word-break: break-word;
}

@media (max-width: 900px) {
  .brand-title {
    white-space: nowrap;
  }

  .brand-title-main {
    font-size: clamp(0.68rem, 2.45vw, 1rem);
  }
}

@media (max-width: 480px) {
  .shell {
    padding: 8px 8px 18px;
  }

  .hero,
  .panel,
  .question-card {
    padding: 12px;
    border-radius: 18px;
  }

  .brand-title {
    font-size: clamp(0.96rem, 4vw, 1.15rem) !important;
    line-height: 1.26;
  }

  .brand-title-main {
    font-size: clamp(0.64rem, 2.28vw, 0.82rem);
  }

  .brand-title-sub {
    margin-top: 0.18rem;
    font-size: clamp(0.7rem, 2.65vw, 0.92rem);
  }

  .hero-title-only {
    padding: 14px 10px;
  }

  .exam-meta {
    font-size: 0.88rem;
  }

  .exam-nav {
    grid-auto-columns: minmax(96px, 1fr);
  }

  .nav-pill {
    padding: 6px 8px;
    font-size: 0.76rem;
  }

  .question-stem {
    font-size: 1.02rem;
    line-height: 1.55;
  }

  .option-card {
    padding: 10px;
    font-size: 0.92rem;
  }

  .option-marker {
    width: 28px;
    height: 28px;
    font-size: 0.84rem;
  }

  .motion-toggle {
    min-height: 26px;
    padding: 3px 7px;
    font-size: 0.62rem;
  }

  .question-actions {
    padding: 8px;
  }

  .question-actions .button {
    min-height: 40px;
    font-size: 0.9rem;
  }
}

.motion-disabled .page-glow,
.motion-disabled .button.primary::after,
.motion-disabled .question-card,
.motion-disabled .option-card,
.motion-disabled .feedback-burst-core,
.motion-disabled .feedback-burst-ring,
.motion-disabled .feedback-spark {
  animation: none !important;
}

.motion-disabled .button,
.motion-disabled .question-card,
.motion-disabled .option-card,
.motion-disabled .nav-pill {
  transition: none !important;
}
