.question-image-placeholder {
  display: none;
  min-height: 220px;
  place-items: center;
  color: #527089;
  font-weight: 700;
  background: linear-gradient(100deg, #f5f9fc 25%, #e9f3f8 45%, #f5f9fc 65%);
  background-size: 200% 100%;
  animation: question-image-shimmer 1.2s linear infinite;
}
.question-image-loading .question-image-placeholder, .question-image-error .question-image-placeholder { display: grid; }
.question-image-loading img, .question-image-error img { display: none; }
@keyframes question-image-shimmer { to { background-position-x: -200%; } }
button[aria-busy="true"] { cursor: wait; opacity: .72; }
:root {
  color-scheme: light;
  --bg: #f7fbff;
  --panel: rgba(255, 255, 255, .92);
  --text: #111827;
  --muted: #667085;
  --line: #d7e2ee;
  --red: #ff4b4b;
  --red-dark: #dc2626;
  --blue: #2563eb;
  --teal: #0f9f8f;
  --amber: #d97706;
  --shadow: 0 18px 44px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 7%, rgba(96, 165, 250, .18), transparent 26%),
    radial-gradient(circle at 88% 0%, rgba(45, 212, 191, .20), transparent 24%),
    linear-gradient(135deg, #f8fbff 0%, #eef8f7 100%);
}

button, input, select {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 44px;
  padding: 10px 14px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

button:hover {
  transform: translateY(-1px);
  border-color: #b8c4d2;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
}

button.primary, .primary {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

button.primary:hover { background: var(--red-dark); }

.ghost {
  background: rgba(255,255,255,.72);
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.full { width: 100%; }

#ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: .62;
}

.login-screen {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  overflow: hidden;
}

.login-panel {
  width: min(1160px, 100%);
  min-height: min(760px, calc(100vh - 56px));
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, .82fr);
  gap: 22px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, .30);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.88), rgba(236,248,255,.74)),
    linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,.20));
  box-shadow: 0 28px 80px rgba(15, 23, 42, .12);
  backdrop-filter: blur(18px);
}

.brand-mark {
  margin: 0 0 8px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
}

.login-panel h1 {
  margin: 0 0 12px;
  font-size: 22px;
}

.summit-hero {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, .22);
  background: #071521;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.44),
    0 24px 60px rgba(15, 23, 42, .16);
}

.summit-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.summit-copy {
  position: relative;
  z-index: 8;
  width: min(520px, 86%);
  padding: 34px 36px;
}

.summit-copy .brand-mark {
  color: #fff;
  font-size: clamp(68px, 9vw, 132px);
  line-height: .86;
  text-shadow:
    0 4px 34px rgba(0,0,0,.34),
    0 1px 0 rgba(255,255,255,.16);
}

.summit-copy h1 {
  margin: 12px 0 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.02;
  letter-spacing: 0;
}

.summit-copy p:not(.brand-mark) {
  width: min(720px, 100%);
  margin: 28px 0 0;
  color: rgba(255,255,255,.92);
  font-size: clamp(18px, 2.4vw, 30px);
  font-weight: 700;
  line-height: 1.42;
  text-shadow: 0 3px 22px rgba(0,0,0,.48);
}

.mountain-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 3;
  perspective: 900px;
}

.sky-orbit {
  position: absolute;
  width: 220px;
  height: 220px;
  left: 76%;
  top: -24px;
  transform: translateX(-50%);
  border-radius: 999px;
  background:
    radial-gradient(circle at 42% 42%, rgba(255,255,255,.92) 0 12%, rgba(254,240,138,.68) 13% 28%, rgba(251,191,36,.24) 29% 48%, transparent 65%);
  opacity: .72;
  box-shadow:
    0 0 70px rgba(254, 240, 138, .36),
    0 0 150px rgba(251, 191, 36, .18);
  animation: sunPulse 7.4s ease-in-out infinite;
  z-index: 1;
}

.sky-orbit::before,
.sky-orbit::after {
  content: "";
  position: absolute;
  inset: -22px;
  border-radius: inherit;
  border: 2px solid rgba(251, 191, 36, .24);
}

.sky-orbit::after {
  inset: -42px;
  border-color: rgba(251, 146, 60, .12);
}

.peak {
  position: absolute;
  left: 50%;
  bottom: -80px;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 12px 0 18px 0;
  pointer-events: none;
}

.peak-back {
  width: 680px;
  height: 680px;
  left: 80%;
  bottom: -320px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.34) 0 20%, transparent 21%),
    linear-gradient(145deg, rgba(185,204,221,.22), rgba(39,53,68,.30));
  opacity: .42;
  filter: blur(1px);
  z-index: 1;
}

.peak-main {
  width: 940px;
  height: 940px;
  left: 68%;
  bottom: -508px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.70) 0 12%, rgba(255,255,255,.18) 13% 22%, transparent 23%),
    linear-gradient(145deg, rgba(226,237,247,.26) 0%, rgba(71,85,105,.34) 48%, rgba(8,13,23,.38) 100%);
  box-shadow: -34px 34px 70px rgba(6, 12, 22, .20);
  opacity: .72;
  z-index: 1;
}

.snow-cap {
  position: absolute;
  left: calc(50% - 34px);
  top: 210px;
  width: 146px;
  height: 104px;
  clip-path: polygon(50% 0, 100% 100%, 68% 78%, 50% 100%, 33% 78%, 0 100%);
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(219,234,254,.28));
  filter: drop-shadow(0 12px 28px rgba(15,23,42,.20));
  opacity: .44;
  z-index: 2;
}

.trail {
  position: absolute;
  left: 15%;
  bottom: -8px;
  width: 760px;
  height: 600px;
  transform: rotate(-5deg) translateZ(0);
  z-index: 5;
}

.trail::before {
  content: "";
  position: absolute;
  left: 34px;
  bottom: 42px;
  width: 660px;
  height: 520px;
  clip-path: polygon(0 92%, 12% 82%, 24% 72%, 36% 62%, 48% 51%, 60% 39%, 73% 27%, 86% 14%, 100% 2%, 96% 11%, 84% 25%, 70% 38%, 58% 51%, 46% 63%, 32% 76%, 17% 88%, 3% 100%);
  background:
    linear-gradient(135deg, rgba(255,255,255,.38), rgba(255,255,255,.05)),
    linear-gradient(90deg, rgba(15,23,42,.18), transparent);
  filter: blur(1.2px);
  opacity: .54;
  box-shadow: inset 0 22px 36px rgba(255,255,255,.20);
}

.trail::after {
  content: "";
  position: absolute;
  left: 42px;
  bottom: 10px;
  width: 520px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(15,23,42,.14), transparent 68%);
  opacity: .18;
  transform: rotate(-8deg);
}

.trail span {
  position: absolute;
  width: 150px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, .36);
  border-radius: 11px 20px 15px 9px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(230,238,247,.82) 58%, rgba(149,166,184,.72) 100%),
    linear-gradient(90deg, rgba(255,255,255,.55), rgba(255,255,255,.04));
  box-shadow:
    0 22px 32px rgba(6,12,22,.32),
    0 4px 0 rgba(60,72,86,.24),
    inset 0 1px 0 rgba(255,255,255,.92);
  transform-origin: center;
  opacity: 0;
  filter: blur(4px);
  animation: snowStepReveal .74s cubic-bezier(.18,.78,.24,1) forwards;
}

.trail span::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 16px;
  top: 5px;
  height: 1px;
  background: rgba(255,255,255,.55);
  box-shadow: 0 9px 18px rgba(255,255,255,.30);
}

.trail span:nth-child(1) { left: 4px; bottom: 34px; --step-transform: rotate(-9deg) perspective(150px) rotateX(10deg); animation-delay: .55s; }
.trail span:nth-child(2) { left: 104px; bottom: 112px; --step-transform: rotate(-8deg) perspective(150px) rotateX(10deg); animation-delay: 1s; }
.trail span:nth-child(3) { left: 214px; bottom: 198px; --step-transform: rotate(-7deg) perspective(150px) rotateX(10deg); animation-delay: 1.45s; }
.trail span:nth-child(4) { left: 336px; bottom: 288px; --step-transform: rotate(-6deg) perspective(150px) rotateX(10deg); animation-delay: 1.9s; }
.trail span:nth-child(5) { left: 468px; bottom: 382px; --step-transform: rotate(-5deg) perspective(150px) rotateX(10deg); animation-delay: 2.35s; }
.trail span:nth-child(6) { left: 606px; bottom: 480px; --step-transform: rotate(-4deg) perspective(150px) rotateX(10deg); animation-delay: 2.8s; }

.flag-pole {
  position: absolute;
  left: calc(50% + 216px);
  top: 150px;
  width: 5px;
  height: 150px;
  border-radius: 999px;
  background: linear-gradient(180deg, #e5e7eb, #334155 54%, #111827);
  transform: translateY(42px) rotate(-10deg) scaleY(.2);
  transform-origin: bottom center;
  z-index: 8;
  opacity: 0;
  box-shadow: 0 12px 24px rgba(6,12,22,.28);
  animation: polePlant 10.2s cubic-bezier(.17,.84,.33,1) forwards;
}

.summit-flag {
  position: absolute;
  left: calc(50% + 222px);
  top: 148px;
  z-index: 9;
  width: 142px;
  height: 76px;
  transform-origin: left center;
  opacity: 0;
  animation: flagReveal 10.2s cubic-bezier(.17,.84,.33,1) forwards;
}

.summit-flag::before {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 10%, 84% 50%, 100% 90%, 0 100%);
  background:
    linear-gradient(90deg, rgba(255,255,255,.22), transparent 28%),
    linear-gradient(135deg, #ff4b4b, #ef4444 58%, #f97316);
  box-shadow: 0 14px 28px rgba(220, 38, 38, .24);
  transform-origin: left center;
  animation: flagClothWave 2.8s ease-in-out 9.35s infinite;
}

.summit-flag span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 32px;
  font-weight: 950;
  letter-spacing: 0;
  text-shadow: 0 2px 8px rgba(127,29,29,.28);
  transform: translateX(-5px);
}

.climber-back {
  position: absolute;
  left: calc(50% + 98px);
  top: 292px;
  z-index: 7;
  width: 220px;
  height: 360px;
  transform-origin: 50% 92%;
  transform: translate(-480px, 274px) rotate(-13deg) scale(.66);
  animation: cinematicClimb 10.2s cubic-bezier(.19,.74,.20,1) forwards;
  filter: drop-shadow(0 26px 34px rgba(6,12,22,.50));
}

.climber-back picture,
.climber-back img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.climber-back img {
  display: block;
  object-fit: contain;
  object-position: center bottom;
  opacity: .98;
}

.climber-silhouette {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 118px;
  height: 288px;
  transform: translateX(-50%);
  display: block;
  opacity: .92;
  filter: blur(.1px);
}

.climber-silhouette::before,
.climber-silhouette::after {
  content: "";
  position: absolute;
}

.climber-silhouette::before {
  left: 22px;
  top: 16px;
  width: 76px;
  height: 236px;
  border-radius: 42px 42px 28px 28px;
  background:
    radial-gradient(circle at 50% 4%, #101827 0 10%, transparent 11%),
    radial-gradient(ellipse at 23% 42%, #273244 0 18%, transparent 19%),
    linear-gradient(180deg, #0c1220 0%, #172033 34%, #0b1020 100%);
  clip-path: polygon(39% 0, 60% 0, 72% 18%, 76% 38%, 91% 55%, 74% 68%, 69% 100%, 54% 100%, 49% 68%, 42% 100%, 27% 100%, 23% 68%, 8% 55%, 24% 38%, 28% 18%);
  box-shadow:
    inset 18px 0 22px rgba(255,255,255,.08),
    inset -20px -20px 30px rgba(0,0,0,.34);
}

.climber-silhouette::after {
  left: 28px;
  top: 64px;
  width: 62px;
  height: 84px;
  border-radius: 28px 24px 22px 22px;
  background:
    linear-gradient(135deg, rgba(251,113,133,.75), rgba(127,29,29,.50)),
    linear-gradient(180deg, #7f1d1d, #111827);
  box-shadow:
    -42px 34px 0 -24px rgba(12,18,32,.92),
    42px 34px 0 -24px rgba(12,18,32,.92),
    0 26px 26px rgba(0,0,0,.28);
}

.base-cloud {
  position: absolute;
  border-radius: 999px;
  background: rgba(255,255,255,.70);
  filter: blur(.3px);
}

.cloud-one {
  width: 210px;
  height: 54px;
  left: 34px;
  bottom: 42px;
}

.cloud-two {
  width: 260px;
  height: 64px;
  right: 42px;
  bottom: 86px;
}

@keyframes sunPulse {
  0%, 100% {
    transform: translateX(-50%) scale(1);
    box-shadow:
      0 0 70px rgba(254, 240, 138, .36),
      0 0 150px rgba(251, 191, 36, .18);
  }
  50% {
    transform: translateX(-50%) scale(1.035);
    box-shadow:
      0 0 92px rgba(254, 240, 138, .46),
      0 0 190px rgba(251, 191, 36, .24);
  }
}

@keyframes snowStepReveal {
  0% {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(18px) scale(.72);
  }
  54% {
    opacity: 1;
    filter: blur(1px);
    transform: var(--step-transform) translateY(-4px) scale(1.03);
    box-shadow:
      0 24px 34px rgba(6,12,22,.34),
      0 4px 0 rgba(60,72,86,.24),
      0 0 24px rgba(255,255,255,.28),
      inset 0 1px 0 rgba(255,255,255,.95);
  }
  100% {
    opacity: .96;
    filter: blur(0);
    transform: var(--step-transform);
  }
}

@keyframes cinematicClimb {
  0% {
    transform: translate(-480px, 274px) rotate(-13deg) scale(.66);
    filter: drop-shadow(0 20px 28px rgba(6,12,22,.42));
  }
  15% {
    transform: translate(-386px, 208px) rotate(-11deg) scale(.70);
  }
  30% {
    transform: translate(-286px, 136px) rotate(-9deg) scale(.74);
  }
  46% {
    transform: translate(-176px, 58px) rotate(-7deg) scale(.80);
  }
  62% {
    transform: translate(-78px, -12px) rotate(-5deg) scale(.87);
  }
  70% {
    transform: translate(-26px, -42px) rotate(-3deg) scale(.92);
  }
  82% {
    transform: translate(2px, -58px) rotate(-2deg) scale(.96);
  }
  88% {
    transform: translate(14px, -54px) rotate(5deg) scale(.96);
  }
  92% {
    transform: translate(18px, -56px) rotate(-4deg) scale(.96);
  }
  100% {
    transform: translate(18px, -56px) rotate(-4deg) scale(.96);
    filter: drop-shadow(0 30px 42px rgba(6,12,22,.55));
  }
}

@keyframes polePlant {
  0%, 82% {
    opacity: 0;
    transform: translateY(46px) rotate(-18deg) scaleY(.18);
  }
  90% {
    opacity: 1;
    transform: translateY(10px) rotate(-8deg) scaleY(.80);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(-5deg) scaleY(1);
  }
}

@keyframes flagReveal {
  0%, 90% {
    opacity: 0;
    transform: translateY(14px) scaleX(.12) skewY(-5deg);
  }
  96% {
    opacity: 1;
    transform: translateY(0) scaleX(.92) skewY(4deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scaleX(1) skewY(-2deg);
  }
}

@keyframes flagClothWave {
  0%, 100% { transform: skewY(-3deg) scaleX(1); }
  50% { transform: skewY(4deg) scaleX(1.035); }
}

.login-form, .account-form {
  display: grid;
  gap: 14px;
}

.auth-card {
  border: 1px solid rgba(148, 163, 184, .30);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.92));
  padding: 24px;
  align-self: center;
  box-shadow: 0 20px 48px rgba(15, 23, 42, .10);
}

.auth-heading {
  margin-bottom: 18px;
}

.auth-heading h2 {
  margin: 0 0 6px;
  font-size: 30px;
  line-height: 1.15;
}

.auth-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.auth-tabs, .ladder-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid #dbe5ef;
  margin-bottom: 16px;
}

.auth-tab, .ladder-tab, .log-tab {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  min-height: 42px;
  padding: 8px 4px;
}

.auth-tab.active, .ladder-tab.active, .log-tab.active {
  color: var(--text);
  border-bottom: 2px solid var(--text);
}

.auth-pane { display: none; }
.auth-pane.active { display: grid; }

.inline-form {
  display: grid;
  grid-template-columns: 1fr 132px;
  gap: 10px;
  align-items: end;
}

label {
  display: grid;
  gap: 8px;
  color: #344054;
  font-size: 14px;
  font-weight: 800;
}

input, select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f3f6fa;
  color: #111827;
}

.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 286px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 18px;
  border-right: 1px solid rgba(148, 163, 184, .28);
  background: rgba(255, 255, 255, .92);
}

.account-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 28px;
  border-bottom: 1px solid #e5e7eb;
}

.account-mini strong { display: block; }
.account-mini span { color: var(--muted); font-size: 13px; }

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #10b981);
  font-weight: 900;
}

.avatar.small { width: 28px; height: 28px; font-size: 13px; }
.avatar.large { width: 80px; height: 80px; font-size: 30px; }

.side-nav {
  display: grid;
  gap: 10px;
  padding-top: 28px;
}

.sidebar-clock {
  display: grid;
  gap: 6px;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(241,248,255,.82));
  box-shadow: 0 12px 26px rgba(15, 23, 42, .06);
}

.sidebar-clock span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sidebar-clock strong {
  font-size: 20px;
  line-height: 1.1;
}

.sidebar-logout {
  width: 100%;
  margin-top: 14px;
}

.study-timer-widget {
  position: fixed;
  right: 18px;
  top: 48%;
  z-index: 80;
  display: grid;
  grid-template-columns: 26px auto;
  gap: 8px 10px;
  align-items: center;
  min-width: 138px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 999px 10px 10px 999px;
  background:
    radial-gradient(circle at 18px 50%, rgba(255,75,75,.18), transparent 34px),
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(236,248,255,.84));
  box-shadow: 0 18px 42px rgba(15, 23, 42, .14);
  backdrop-filter: blur(14px);
}

.study-timer-widget.hidden { display: none; }

.timer-orbit {
  grid-row: 1 / span 2;
  width: 26px;
  height: 26px;
  border: 3px solid rgba(255, 75, 75, .24);
  border-top-color: var(--red);
  border-radius: 999px;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.78);
  animation: timerOrbit 3.8s linear infinite;
}

.study-timer-widget span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.05;
}

.study-timer-widget strong {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  line-height: 1.05;
  letter-spacing: 0;
}

@keyframes timerOrbit {
  to { transform: rotate(360deg); }
}

.nav-item {
  justify-content: flex-start;
  background: transparent;
}

.nav-item.active {
  border-color: rgba(255, 75, 75, .38);
  background: #fff5f5;
  color: var(--red-dark);
}

.main {
  padding: 28px min(42px, 4vw) 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.topbar .brand-mark {
  font-size: 24px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.view {
  display: none;
  animation: viewIn .28s ease both;
}

.view.active { display: block; }

@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-panel {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  padding: 30px;
  border: 1px solid rgba(148, 163, 184, .30);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(235,252,255,.90), rgba(228,255,247,.88));
  box-shadow: var(--shadow);
}

.hero-panel h1, .section-head h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-panel p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: min(440px, 100%);
}

.hero-actions .primary {
  min-height: 56px;
  padding: 0 24px;
  border-radius: 17px;
  font-size: 17px;
  line-height: 1.2;
  white-space: nowrap;
}

.hero-actions .hero-daily {
  min-width: 230px;
}

.hero-actions .hero-practice {
  min-width: 152px;
}

.module-grid, .practice-cards, .task-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

#view-practice .practice-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.metric {
  min-height: 118px;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, .30);
  border-radius: 8px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 12px 26px rgba(15, 23, 42, .05);
}

.metric span {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.metric strong {
  display: block;
  margin-top: 14px;
  font-size: 28px;
}

.module-card {
  min-height: 132px;
  padding: 18px;
  text-align: left;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 12px 26px rgba(15, 23, 42, .05);
}

.module-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.module-card span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.leaderboard, .panel, .test-box {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, .30);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .06);
}

.input-mode-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.input-mode-panel h2 {
  margin: 0 0 6px;
}

.input-mode-panel p {
  margin: 0;
  line-height: 1.6;
}

.mode-segment {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 6px;
  padding: 6px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #f8fafc;
}

.mode-segment button {
  border-color: transparent;
  background: transparent;
}

.mode-segment button.active {
  border-color: var(--red);
  background: #fff1f1;
  color: var(--red-dark);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.section-head h2, .panel h2 {
  margin: 0;
  font-size: 24px;
}

.section-head span {
  color: var(--muted);
}

.rank-list {
  display: grid;
  gap: 10px;
}

.rank-row {
  display: grid;
  grid-template-columns: 46px 1fr 120px 120px 120px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.rank-row.top {
  border-color: #facc15;
  background: #fffde9;
}

.rank-badge {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #f2f4f7;
}

.rank-row.top .rank-badge {
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.tear-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  perspective: 1400px;
}

.known-choice-stage {
  margin-bottom: 22px;
}

.tear-card {
  position: relative;
  min-height: 330px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 0;
  text-align: left;
  color: inherit;
  transform-style: preserve-3d;
  isolation: isolate;
}

.tear-face, .tear-half {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(148, 163, 184, .30);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
  backface-visibility: hidden;
  will-change: transform, opacity;
}

.tear-face {
  z-index: 1;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(135deg, rgba(255,255,255,.97), rgba(240,249,255,.92)),
    repeating-linear-gradient(105deg, rgba(37, 99, 235, .045) 0 1px, transparent 1px 13px);
  transform: translateZ(26px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg));
  pointer-events: none;
}

.tear-card.orange .tear-face {
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(255,247,237,.94)),
    repeating-linear-gradient(105deg, rgba(249, 115, 22, .05) 0 1px, transparent 1px 13px);
}

.tear-half {
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,.96), rgba(234,247,255,.88));
}

.tear-half.left {
  clip-path: polygon(0 0, 51% 0, 47% 7%, 52% 15%, 46% 22%, 52% 30%, 47% 40%, 52% 49%, 46% 58%, 52% 67%, 47% 77%, 51% 86%, 47% 94%, 50% 100%, 0 100%);
  transform-origin: 100% 50%;
}

.tear-half.right {
  clip-path: polygon(49% 0, 100% 0, 100% 100%, 50% 100%, 53% 94%, 49% 86%, 53% 77%, 48% 67%, 54% 58%, 48% 49%, 53% 40%, 48% 30%, 54% 22%, 48% 15%, 53% 7%);
  transform-origin: 0 50%;
}

.tear-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  z-index: 4;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.96), rgba(37,99,235,.55), transparent);
}

.tear-card.tearing .tear-face { animation: cardCompress .24s ease both; }
.tear-card.tearing .tear-half { opacity: 1; }
.tear-card.tearing .tear-half.left { animation: tearLeft .58s cubic-bezier(.16, .84, .21, 1) both; }
.tear-card.tearing .tear-half.right { animation: tearRight .58s cubic-bezier(.16, .84, .21, 1) both; }
.tear-card.tearing .tear-line { animation: tearFlash .38s ease both; }

@keyframes cardCompress {
  to { opacity: .08; transform: translateZ(2px) scale(.98); }
}

@keyframes tearLeft {
  0% { transform: translateX(0) translateZ(30px) rotateY(0deg) rotateZ(0deg); opacity: 1; }
  45% { transform: translateX(-58px) translateZ(82px) rotateY(-26deg) rotateZ(-4deg); opacity: .96; }
  100% { transform: translateX(-240px) translateY(18px) translateZ(10px) rotateY(-58deg) rotateZ(-14deg); opacity: 0; }
}

@keyframes tearRight {
  0% { transform: translateX(0) translateZ(30px) rotateY(0deg) rotateZ(0deg); opacity: 1; }
  45% { transform: translateX(58px) translateZ(82px) rotateY(26deg) rotateZ(4deg); opacity: .96; }
  100% { transform: translateX(240px) translateY(18px) translateZ(10px) rotateY(58deg) rotateZ(14deg); opacity: 0; }
}

@keyframes tearFlash {
  35% { transform: scaleY(1); opacity: 1; }
  100% { opacity: 0; }
}

.card-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.card-row strong {
  display: block;
  font-size: 28px;
  margin-bottom: 8px;
}

.card-row em {
  display: block;
  color: var(--muted);
  font-style: normal;
  line-height: 1.7;
}

.icon-tile {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  font-size: 24px;
  font-weight: 900;
}

.orange .icon-tile {
  background: linear-gradient(135deg, #f97316, #ff4b4b);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.chip-row span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 800;
}

.chip-row.orange span {
  color: #c2410c;
  background: #fff7ed;
}

.cta {
  display: block;
  border-radius: 8px;
  padding: 12px 14px;
  text-align: center;
  color: #fff;
  background: var(--red);
  font-weight: 900;
}

.split-layout, .workspace {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 18px;
  margin-top: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.notice {
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 750;
}

.notice.success {
  background: #ecfdf5;
  color: #047857;
}

.report-grid {
  display: grid;
  gap: 10px;
}

.report-grid div, .metric {
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.report-grid span, .metric span {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}

.report-grid strong, .metric strong {
  font-size: 28px;
}

.workspace {
  align-items: start;
}

.question-image {
  min-height: 380px;
  padding: 28px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.8;
}

.question-image img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.question-float-tools {
  position: static;
  z-index: auto;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  margin: 10px 0 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  cursor: default;
  user-select: none;
}

.question-float-tools.dragging {
  cursor: default;
  box-shadow: none;
}

.question-float-tools .float-grip {
  display: none;
}

.question-float-tools button {
  width: auto;
  min-height: 36px;
  margin-top: 0;
  padding: 7px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, .42);
  background: rgba(255,255,255,.86);
  color: #0f172a;
  font-weight: 800;
  font-size: 12px;
  line-height: 1.2;
}

.question-float-tools button:hover {
  border-color: rgba(37, 99, 235, .50);
  color: #1457d9;
  transform: translateY(-1px);
}

.question-float-tools button:last-child {
  color: #be123c;
}

.answer-panel {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: auto;
  z-index: 5;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, .30);
  border-radius: 8px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .10);
  backdrop-filter: blur(12px);
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.choice-grid button {
  min-height: 58px;
  border-radius: 12px;
  font-size: 20px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}

.choice-grid .selected {
  border-color: var(--red);
  background: #fff1f1;
  color: var(--red-dark);
  box-shadow: 0 12px 28px rgba(255, 75, 75, .16);
}

.part-answer-shell {
  display: grid;
  gap: 14px;
  margin: 16px 0;
}

.part-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.part-tabs button {
  min-height: 38px;
  padding: 8px 12px;
  background: #f8fafc;
}

.part-tabs button.active {
  border-color: var(--red);
  background: #fff1f1;
  color: var(--red-dark);
}

.part-answer-fields {
  display: grid;
  gap: 12px;
}

.part-field {
  display: none;
}

.part-field.active {
  display: grid;
}

.part-field textarea {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 12px;
  background: #f3f6fa;
}

.part-field input {
  margin-top: 10px;
}

.handwriting-shell {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.handwriting-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.handwriting-toolbar button.active {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.handwriting-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.handwriting-toolbar input[type="range"] {
  width: 92px;
  accent-color: var(--blue);
}

.handwriting-toolbar input[type="color"] {
  width: 42px;
  height: 42px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.handwriting-canvas-wrap {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      to bottom,
      #ffffff 0,
      #ffffff 39px,
      #dbeafe 40px,
      #ffffff 41px
    );
  touch-action: auto;
}

#handwriting-canvas {
  display: block;
  width: 100%;
  height: 310px;
  cursor: crosshair;
  touch-action: none;
}

.expand-answer-btn {
  margin: 12px 0;
  border-style: dashed;
}

.answer-panel.expanded-writing {
  position: fixed;
  right: 18px;
  top: 18px;
  width: min(720px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  z-index: 120;
  background:
    radial-gradient(circle at 92% 0%, rgba(37,99,235,.10), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,251,255,.94));
  box-shadow: 0 28px 80px rgba(15, 23, 42, .22);
}

.answer-panel.expanded-writing .part-field textarea,
.answer-panel.expanded-writing .subjective-answer textarea {
  min-height: min(54vh, 520px);
  font-size: 18px;
  line-height: 1.7;
}

.answer-panel.expanded-writing #handwriting-canvas {
  height: min(58vh, 560px);
}

.answer-panel.expanded-writing .handwriting-canvas-wrap {
  box-shadow: inset 0 0 0 1px rgba(37,99,235,.10), 0 18px 36px rgba(15,23,42,.08);
}

.handwriting-final textarea {
  min-height: 82px;
}

.subjective-answer textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 12px;
  background: #f3f6fa;
}

.formula-helper {
  margin: 14px 0;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.formula-helper summary {
  font-weight: 900;
  cursor: pointer;
}

.formula-helper button {
  margin: 10px 8px 0 0;
}

.formula-pdf-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0;
}

.formula-pdf-tools span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.formula-open {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid color-mix(in oklch, var(--blue), white 45%);
  border-radius: var(--radius);
  color: color-mix(in oklch, var(--blue), black 12%);
  background: color-mix(in oklch, var(--blue), white 91%);
  text-decoration: none;
  font-weight: 900;
}

.formula-pdf-frame {
  width: 100%;
  height: min(54vh, 520px);
  min-height: 360px;
  border: 1px solid rgba(129, 154, 184, .34);
  border-radius: var(--radius);
  background: #fff;
}

.answer-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.grading-progress {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid color-mix(in oklch, var(--blue), white 72%);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--blue), white 93%), rgba(255,255,255,.88));
  color: color-mix(in oklch, var(--blue), black 16%);
}

.grading-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 900;
}

.grading-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(37, 99, 235, .14);
}

.grading-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  transition: width 260ms var(--ease-out);
}

.grading-progress p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.answer-sheet {
  position: fixed;
  right: 12px;
  top: 108px;
  z-index: 85;
  width: 250px;
  border: 1px solid rgba(129, 154, 184, .34);
  border-radius: var(--radius);
  background: rgba(255,255,255,.94);
  box-shadow: 0 16px 38px rgba(24, 38, 60, .14);
  backdrop-filter: blur(14px);
  transition: transform 220ms var(--ease-out);
}

.answer-sheet.collapsed {
  transform: translateX(calc(100% - 48px));
}

.answer-sheet-toggle {
  position: absolute;
  left: -44px;
  top: 12px;
  width: 44px;
  min-height: 96px;
  padding: 8px 6px;
  writing-mode: vertical-rl;
  letter-spacing: 0;
  border-radius: var(--radius) 0 0 var(--radius);
  border-right: 0;
  color: #fff;
  background: linear-gradient(180deg, var(--blue), var(--teal));
}

.answer-sheet-body {
  padding: 14px;
}

.answer-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.answer-sheet-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.answer-sheet-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  max-height: min(54vh, 430px);
  overflow: auto;
  padding-right: 2px;
}

.answer-sheet-grid button {
  min-height: 36px;
  padding: 0;
  border-radius: 7px;
  font-size: 13px;
  background: #fff;
}

.answer-sheet-grid button.current {
  border-color: var(--blue);
  color: #1d4ed8;
  background: #eff6ff;
}

.answer-sheet-grid button.draft {
  border-color: #fbbf24;
  color: #92400e;
  background: #fffbeb;
}

.answer-sheet-grid button.pending {
  border-color: #93c5fd;
  color: #1d4ed8;
  background: #dbeafe;
}

.answer-sheet-grid button.submitted {
  border-color: #86efac;
  color: #047857;
  background: #ecfdf5;
}

.answer-sheet-grid button.wrong {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fff1f2;
}

.paper-report-box {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(129, 154, 184, .26);
}

.paper-report-box > div:first-child {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.paper-report-box strong {
  font-size: 14px;
}

.paper-report-box span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.paper-report-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.paper-report-actions button {
  min-height: 36px;
  border-radius: 8px;
  font-size: 13px;
}

.grade-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 150;
  width: min(360px, calc(100vw - 36px));
  padding: 14px 16px;
  border: 1px solid rgba(129, 154, 184, .34);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,251,255,.94));
  box-shadow: 0 20px 48px rgba(24, 38, 60, .18);
  animation: toastIn 220ms var(--ease-out) both;
}

.grade-toast strong,
.grade-toast span {
  display: block;
}

.grade-toast span {
  margin-top: 4px;
  color: var(--muted);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.feedback-box {
  margin-top: 14px;
}

.feedback-box:empty { display: none; }

.feedback-grid {
  display: grid;
  gap: 10px;
}

.feedback-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

.feedback-tabs button {
  min-height: 38px;
  border-radius: 999px;
  padding: 8px 14px;
}

.feedback-tabs button.active {
  border-color: var(--red);
  background: #fff1f1;
  color: var(--red-dark);
}

.feedback-pane {
  display: none;
}

.feedback-pane.active {
  display: block;
}

.feedback-grid div {
  padding: 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.feedback-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.feedback-grid p {
  margin: 6px 0 0;
  line-height: 1.6;
}

.part-feedback-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.part-feedback-list details {
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
}

.part-feedback-list summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--ink);
}

.sentence-feedback-list,
.point-link-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.sentence-feedback-card,
.point-link-card {
  border: 1px solid #dbeafe;
  background: #ffffff;
  border-radius: 8px;
  padding: 12px;
}

.sentence-feedback-card span,
.point-link-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 6px;
}

.sentence-feedback-card p,
.point-link-card p {
  margin: 6px 0 0;
}

.feedback-evidence {
  color: var(--muted);
}

.knowledge-gap-list {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.knowledge-gap {
  border: 1px solid #dbeafe;
  background: #ffffff;
  border-radius: 8px;
  padding: 12px;
}

.knowledge-gap strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  margin-bottom: 8px;
}

.knowledge-gap p {
  margin: 6px 0 0;
}

.knowledge-gap p span {
  display: inline;
  margin-right: 6px;
  color: var(--muted);
}

.input-risk {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.raw-ai-json {
  max-height: 520px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 10px 0 0;
  padding: 14px;
  border: 1px solid rgba(129, 154, 184, .34);
  border-radius: var(--radius);
  background: #07111f;
  color: #dbeafe;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
}

.mark-scheme {
  background: rgba(255,255,255,.80);
}

.mark-summary {
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 900;
}

.mark-image-scroll {
  max-height: 430px;
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 10px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.90));
}

.mark-image-button {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(15,23,42,.08);
  cursor: zoom-in;
}

.mark-image-button:hover {
  transform: none;
  box-shadow: 0 16px 34px rgba(15,23,42,.14);
}

.mark-image-button img {
  display: block;
  width: 100%;
  height: auto;
}

.mark-image-hint {
  margin: 10px 0 0;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 58px 24px 24px;
  background: rgba(8,13,23,.78);
  backdrop-filter: blur(10px);
}

.image-modal.hidden { display: none; }

.image-modal button {
  position: absolute;
  right: 22px;
  top: 18px;
}

.image-modal img {
  max-width: min(1120px, 96vw);
  max-height: 86vh;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 90px rgba(0,0,0,.36);
}

.locked-mark {
  padding: 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

.locked-mark strong {
  display: block;
  margin-bottom: 8px;
}

.locked-mark p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.mark-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid #e5e7eb;
}

.mark-point {
  display: block;
  margin-bottom: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eff6ff;
  color: #075985;
  line-height: 1.55;
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(52, 1fr);
  gap: 4px;
  overflow-x: auto;
}

.heat-cell {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: #eef2f7;
}

.heat-1 { background: #dbe4ee; }
.heat-2 { background: #b8c2cf; }
.heat-3 { background: #7d8796; }
.heat-4 { background: #344054; }

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.bar-chart {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 82px;
  gap: 10px;
  align-items: center;
}

.bar-row div {
  height: 12px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #14b8a6);
}

.bar-row strong {
  text-align: right;
}

.analysis-list {
  display: grid;
  gap: 10px;
}

.analysis-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.analysis-row strong,
.analysis-row span {
  display: block;
}

.analysis-row span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.analysis-row-button {
  width: 100%;
  border-color: #e5e7eb;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.analysis-row-button.active,
.analysis-row-button:hover {
  border-color: rgba(20, 184, 166, .45);
  background: #f0fdfa;
}

.topic-drilldown {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(240px, .95fr);
  gap: 12px;
}

.topic-drilldown-list,
.topic-drilldown-detail {
  display: grid;
  align-content: start;
  gap: 10px;
}

.topic-drilldown-detail {
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
}

.topic-drilldown-head {
  display: grid;
  gap: 2px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.topic-drilldown-head span,
.tag-row span {
  color: var(--muted);
  font-size: 13px;
}

.tag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
}

.tag-row:last-child {
  border-bottom: 0;
}

.tag-row strong {
  display: block;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, .38);
  backdrop-filter: blur(8px);
}

.modal-card {
  width: min(620px, 100%);
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, .35);
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow);
}

.modal-card h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.modal-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.modal-mode-grid button {
  min-height: 150px;
  text-align: left;
  padding: 18px;
}

.modal-mode-grid strong,
.modal-mode-grid span {
  display: block;
}

.modal-mode-grid strong {
  font-size: 20px;
  margin-bottom: 8px;
}

.modal-mode-grid span {
  color: var(--muted);
  line-height: 1.6;
}

.log-list {
  display: grid;
  gap: 12px;
}

.log-row {
  display: grid;
  grid-template-columns: 1fr 200px 140px;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: rgba(255,255,255,.92);
}

@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    display: grid;
    gap: 14px;
  }
  .side-nav {
    grid-template-columns: repeat(3, 1fr);
    padding-top: 0;
  }
  .module-grid, .practice-cards, .metric-grid, .task-grid, .tear-stage, .split-layout, .workspace, .form-grid, .analytics-grid, .topic-drilldown {
    grid-template-columns: 1fr;
  }
  .login-panel {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 12px;
  }
  .summit-hero {
    min-height: 520px;
  }
  .summit-poster {
    object-position: center top;
  }
  .summit-copy {
    padding: 28px 24px;
  }
  .summit-flag {
    left: calc(50% + 156px);
    top: 118px;
    width: 112px;
    height: 62px;
  }
  .flag-pole {
    left: calc(50% + 150px);
    top: 120px;
  }
  .trail {
    left: 4%;
    bottom: -20px;
    transform: rotate(-6deg) scale(.82);
    transform-origin: left bottom;
  }
  .climber-back {
    left: calc(50% + 48px);
    top: 276px;
    transform: translate(8px, -48px) rotate(-4deg) scale(.82);
  }
  .hero-panel, .section-head, .topbar {
    align-items: stretch;
    flex-direction: column;
  }
  .rank-row, .log-row {
    grid-template-columns: 1fr;
  }
  .bar-row, .mark-row {
    grid-template-columns: 1fr;
  }
  .answer-panel {
    position: static;
    max-height: none;
  }
  .input-mode-panel {
    align-items: stretch;
    flex-direction: column;
  }
  .modal-mode-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .login-screen {
    padding: 12px;
  }
  .summit-hero {
    min-height: 430px;
  }
  .summit-poster {
    object-position: 42% top;
  }
  .summit-copy {
    width: 94%;
    padding: 22px 18px;
  }
  .summit-copy .brand-mark {
    font-size: 58px;
  }
  .summit-copy h1 {
    font-size: 34px;
  }
  .summit-copy p:not(.brand-mark) {
    font-size: 15px;
  }
  .mountain-stage {
    transform: translateY(16px) scale(.86);
    transform-origin: center bottom;
  }
  .auth-card {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .summit-flag,
  .flag-pole,
  .climber-back,
  .trail span,
  .sky-orbit,
  .summit-flag::before {
    animation: none;
  }
  .summit-flag,
  .flag-pole,
  .trail span {
    opacity: 1;
  }
  .summit-flag {
    transform: translateY(0) scaleX(1) skewY(-2deg);
  }
  .climber-back {
    transform: translate(18px, -56px) rotate(-4deg) scale(.96);
  }
  .trail span {
    filter: blur(0);
    transform: var(--step-transform);
  }
}

/* ALSpark visual refinement layer */
:root {
  color-scheme: light;
  --bg: oklch(98.2% 0.012 220);
  --surface: oklch(99.2% 0.006 220);
  --surface-2: oklch(96.6% 0.018 220);
  --surface-3: oklch(93.8% 0.026 215);
  --ink: oklch(19% 0.038 255);
  --text: var(--ink);
  --muted: oklch(45% 0.04 250);
  --line: oklch(86% 0.03 230);
  --red: oklch(63% 0.23 24);
  --red-dark: oklch(54% 0.22 24);
  --blue: oklch(56% 0.18 255);
  --teal: oklch(62% 0.15 180);
  --green: oklch(58% 0.14 160);
  --warning: oklch(66% 0.16 70);
  --panel: color-mix(in oklch, white 88%, var(--surface-2));
  --shadow: 0 10px 30px rgba(24, 38, 60, .08);
  --shadow-tight: 0 4px 10px rgba(24, 38, 60, .07);
  --radius: 8px;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  color: var(--ink);
  background:
    linear-gradient(118deg, rgba(223, 236, 255, .72) 0%, rgba(247, 251, 255, .98) 36%, rgba(226, 250, 244, .74) 100%),
    linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  font-family: "Inter", "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(16, 24, 40, .035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(16, 24, 40, .028) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 72%);
  z-index: 0;
}

#ambient-canvas {
  opacity: .36;
  mix-blend-mode: multiply;
}

button,
.module-card,
.tear-card,
.avatar-button,
.mark-image-button {
  -webkit-tap-highlight-color: transparent;
}

button {
  border-radius: var(--radius);
  border-color: var(--line);
  background: linear-gradient(180deg, #fff, #f7faff);
  box-shadow: none;
  transition:
    transform 150ms var(--ease-out),
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease,
    color 150ms ease;
}

button:hover {
  transform: translateY(-1px);
  border-color: color-mix(in oklch, var(--blue), white 38%);
  box-shadow: var(--shadow-tight);
}

button:active {
  transform: scale(.975);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid color-mix(in oklch, var(--blue), white 60%);
  outline-offset: 2px;
}

button.primary,
.primary {
  border-color: color-mix(in oklch, var(--red), black 4%);
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--red), white 6%), var(--red-dark));
  color: white;
  box-shadow: 0 8px 18px rgba(220, 38, 38, .20);
}

button.primary:hover,
.primary:hover {
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--red), white 2%), color-mix(in oklch, var(--red-dark), black 6%));
  box-shadow: 0 10px 22px rgba(220, 38, 38, .26);
}

.ghost {
  background: rgba(255, 255, 255, .72);
  border-color: color-mix(in oklch, var(--line), white 15%);
}

.muted {
  color: var(--muted);
}

label {
  color: color-mix(in oklch, var(--ink), white 10%);
  font-size: 13px;
  letter-spacing: 0;
}

input,
select,
textarea {
  border-color: var(--line);
  background: rgba(255, 255, 255, .78);
  color: var(--ink);
  border-radius: var(--radius);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input::placeholder,
textarea::placeholder {
  color: oklch(50% 0.04 250);
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
  border-color: color-mix(in oklch, var(--blue), white 20%);
  background: #fff;
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--blue), white 84%);
}

.login-screen {
  padding: clamp(14px, 3vw, 32px);
}

.login-panel {
  width: min(1180px, 100%);
  min-height: min(760px, calc(100dvh - 48px));
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
  gap: 14px;
  padding: 10px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .78);
  border-color: rgba(129, 154, 184, .34);
  box-shadow: 0 24px 70px rgba(27, 43, 70, .16);
  backdrop-filter: blur(18px);
}

.summit-hero {
  min-height: 690px;
  border-radius: var(--radius);
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.24);
}

.summit-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 13, 25, .20), transparent 44%),
    linear-gradient(180deg, transparent 54%, rgba(4, 13, 25, .30));
  pointer-events: none;
}

.auth-card {
  align-self: stretch;
  display: grid;
  align-content: center;
  padding: clamp(22px, 4vw, 44px);
  border-radius: var(--radius);
  border-color: rgba(129, 154, 184, .32);
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(246,250,255,.90)),
    linear-gradient(135deg, rgba(255,255,255,.50), transparent);
  box-shadow: none;
}

.auth-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
  text-wrap: balance;
}

.auth-heading p,
.hero-panel p,
.module-card span,
.card-row em,
.modal-mode-grid span {
  text-wrap: pretty;
}

.auth-tabs,
.ladder-tabs {
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.auth-tab,
.ladder-tab,
.log-tab {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 0;
}

.auth-tab.active,
.ladder-tab.active,
.log-tab.active {
  border-bottom: 0;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(16, 24, 40, .08);
}

.app {
  grid-template-columns: 264px minmax(0, 1fr);
}

.sidebar {
  padding: 22px 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(245,249,255,.88));
  backdrop-filter: blur(18px);
}

.account-mini {
  border-bottom-color: var(--line);
  padding-bottom: 20px;
}

.avatar {
  background:
    linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.30), 0 8px 16px rgba(37, 99, 235, .18);
}

.side-nav {
  gap: 8px;
  padding-top: 22px;
}

.nav-item {
  min-height: 42px;
  justify-content: flex-start;
  color: color-mix(in oklch, var(--ink), white 10%);
}

.nav-item.active {
  border-color: color-mix(in oklch, var(--red), white 42%);
  background:
    linear-gradient(180deg, #fff7f7, #fff1f2);
  color: var(--red-dark);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.75);
}

.main {
  width: min(100%, 1500px);
  padding: 24px clamp(18px, 3vw, 40px) 56px;
}

.topbar {
  min-height: 58px;
  margin-bottom: 22px;
}

.topbar .brand-mark {
  margin: 0 0 4px;
  font-size: 28px;
}

.avatar-button {
  min-height: 42px;
  background: rgba(255,255,255,.76);
}

.view {
  animation: viewIn 220ms var(--ease-out) both;
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-panel,
.leaderboard,
.panel,
.test-box {
  border-radius: var(--radius);
  border-color: rgba(129, 154, 184, .34);
  background:
    linear-gradient(180deg, rgba(255,255,255,.91), rgba(247,251,255,.82));
  box-shadow: var(--shadow);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  align-items: center;
  padding: clamp(22px, 4vw, 42px);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(37, 99, 235, .10), transparent 28%),
    linear-gradient(290deg, rgba(15, 159, 143, .10), transparent 34%);
  pointer-events: none;
}

.hero-panel > * {
  position: relative;
}

.hero-panel h1,
.section-head h1 {
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.02;
  max-width: 15ch;
  text-wrap: balance;
}

.hero-panel p {
  max-width: 58ch;
  color: color-mix(in oklch, var(--muted), var(--ink) 12%);
}

.module-grid,
.practice-cards,
.task-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.module-card,
.metric,
.rank-row,
.log-row,
.report-grid div {
  border-radius: var(--radius);
  border-color: rgba(129, 154, 184, .30);
  background:
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(248,251,255,.86));
  box-shadow: none;
}

.module-card {
  position: relative;
  min-height: 142px;
  overflow: hidden;
}

.module-card::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--red), var(--blue), var(--teal));
  transition: transform 220ms var(--ease-out);
}

.module-card:hover::after {
  transform: scaleX(1);
}

.module-card strong,
.card-row strong {
  color: var(--ink);
}

.section-head {
  align-items: end;
}

.section-head h2,
.panel h2 {
  font-size: 22px;
  line-height: 1.2;
}

.rank-row {
  min-height: 68px;
}

.rank-row.top {
  border-color: color-mix(in oklch, var(--warning), white 22%);
  background:
    linear-gradient(180deg, #fffdf0, #fffbe6);
}

.rank-badge {
  background: var(--surface-2);
  font-weight: 900;
}

.tear-card {
  border-radius: var(--radius);
  transform: translateZ(0);
}

.tear-card:hover {
  transform: translateY(-2px) rotateX(.7deg);
}

.tear-face,
.tear-half {
  border-radius: var(--radius);
  border-color: rgba(129, 154, 184, .32);
}

.tear-face {
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(239,247,255,.94));
}

.tear-card.orange .tear-face {
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(255,247,237,.94));
}

.cta {
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--red), white 6%), var(--red-dark));
  box-shadow: 0 10px 22px rgba(220, 38, 38, .18);
}

.split-layout,
.workspace {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
}

.notice {
  border: 1px solid color-mix(in oklch, var(--blue), white 72%);
  background: color-mix(in oklch, var(--blue), white 90%);
  color: color-mix(in oklch, var(--blue), black 18%);
  font-weight: 800;
}

.notice.success {
  border-color: color-mix(in oklch, var(--green), white 70%);
  background: color-mix(in oklch, var(--green), white 90%);
  color: color-mix(in oklch, var(--green), black 20%);
}

.question-panel {
  min-width: 0;
}

.question-image {
  border-color: rgba(129, 154, 184, .30);
  background: #fff;
  box-shadow: var(--shadow-tight);
  overflow: hidden;
}

.question-image img {
  width: 100%;
  border-radius: 6px;
}

.answer-panel {
  border-radius: var(--radius);
  border-color: rgba(129, 154, 184, .34);
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,251,255,.92));
  box-shadow: 0 16px 38px rgba(24, 38, 60, .12);
}

.answer-panel h2 {
  margin-top: 0;
  font-size: 30px;
}

.choice-grid button {
  min-height: 62px;
  border-color: color-mix(in oklch, var(--line), white 4%);
  background: #fff;
  font-size: 21px;
  box-shadow: inset 0 -1px 0 rgba(16, 24, 40, .04);
}

.choice-grid .selected {
  border-color: color-mix(in oklch, var(--red), white 18%);
  background:
    linear-gradient(180deg, #fff7f7, #ffe9e9);
  color: var(--red-dark);
  box-shadow: 0 8px 18px rgba(220, 38, 38, .16);
}

.part-tabs button.active,
.mode-segment button.active,
.feedback-tabs button.active,
.handwriting-toolbar button.active {
  border-color: color-mix(in oklch, var(--blue), white 30%);
  background: color-mix(in oklch, var(--blue), white 88%);
  color: color-mix(in oklch, var(--blue), black 18%);
}

.handwriting-canvas-wrap,
.subjective-answer textarea,
.part-field textarea,
.handwriting-final textarea {
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(249,252,255,.92)),
    repeating-linear-gradient(to bottom, transparent 0 38px, rgba(37,99,235,.14) 39px, transparent 40px);
}

.formula-helper {
  background: rgba(255,255,255,.72);
}

.formula-helper summary {
  list-style: none;
}

.formula-helper summary::-webkit-details-marker {
  display: none;
}

.formula-helper summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 999px;
  color: white;
  background: var(--ink);
  font-size: 16px;
  line-height: 1;
}

.formula-helper[open] summary::before {
  content: "-";
}

.feedback-grid div,
.part-feedback-list details,
.locked-mark {
  border-color: rgba(129, 154, 184, .28);
  background: rgba(255,255,255,.78);
}

.mark-image-scroll {
  background:
    linear-gradient(180deg, rgba(243,248,255,.80), rgba(255,255,255,.88));
}

.image-modal {
  background: rgba(7, 15, 29, .78);
  backdrop-filter: blur(10px);
}

.study-timer-widget {
  right: 14px;
  top: 48%;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(243,248,255,.88));
  box-shadow: 0 14px 34px rgba(24, 38, 60, .16);
}

.timer-orbit {
  border-top-color: var(--red);
  animation-duration: 2.8s;
}

.modal-backdrop {
  backdrop-filter: blur(14px);
}

.modal-card {
  border-radius: var(--radius);
  border: 1px solid rgba(129, 154, 184, .34);
  background:
    linear-gradient(180deg, rgba(255,255,255,.97), rgba(247,251,255,.94));
}

@media (max-width: 980px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: auto;
    padding: 12px;
  }

  .account-mini {
    padding-bottom: 10px;
  }

  .side-nav {
    display: flex;
    overflow-x: auto;
    padding: 8px 0 0;
    scrollbar-width: none;
  }

  .side-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    flex: 0 0 auto;
    min-width: 96px;
    justify-content: center;
  }

  .sidebar-logout {
    margin-top: 8px;
  }

  .login-panel {
    grid-template-columns: 1fr;
  }

  .summit-hero {
    min-height: 420px;
  }

  .hero-panel h1,
  .section-head h1 {
    max-width: 100%;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 15px;
  }

  .main {
    padding: 16px 12px 40px;
  }

  .login-panel {
    padding: 8px;
  }

  .summit-hero {
    min-height: 330px;
  }

  .auth-card {
    padding: 18px;
  }

  .hero-panel,
  .leaderboard,
  .panel,
  .test-box {
    padding: 16px;
  }

  .choice-grid {
    grid-template-columns: 1fr 1fr;
  }

  .answer-panel h2 {
    font-size: 26px;
  }

  .study-timer-widget {
    top: auto;
    right: 10px;
    bottom: 12px;
    transform: scale(.92);
    transform-origin: right bottom;
  }

  .question-float-tools {
    width: 100%;
    padding: 0;
    justify-content: flex-start;
  }

  .question-float-tools button {
    min-height: 36px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
.campaign-banner {
  margin: 18px 24px 0;
  padding: 14px 18px;
  border: 1px solid #f0c36a;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff8e8, #fffdf7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #60430d;
}

.campaign-banner div { display: grid; gap: 3px; }
.campaign-banner b { font-variant-numeric: tabular-nums; color: #c2410c; }
.campaign-banner button { border: 0; border-radius: 10px; padding: 10px 16px; background: #0f172a; color: #fff; font-weight: 700; cursor: pointer; }
.campaign-disabled { opacity: .42; }
.campaign-disabled::after { content: " 未解锁"; font-size: 11px; }
.campaign-card { max-width: 540px; text-align: left; }
.campaign-card .primary { width: 100%; }
.campaign-kicker { color: #d97706; font-size: 13px; font-weight: 800; letter-spacing: .08em; }
.campaign-clock { margin: 20px 0; padding: 18px; border-radius: 14px; background: #0f172a; color: #fff; display: flex; justify-content: space-between; align-items: center; }
.campaign-clock strong { font-size: 28px; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.campaign-card ol { margin: 0 0 18px; padding-left: 22px; line-height: 2; }
.campaign-warning { padding: 12px 14px; border-radius: 10px; background: #fff1f2; color: #be123c; font-size: 13px; }

@media (max-width: 720px) {
  .campaign-banner { margin: 12px; align-items: flex-start; flex-direction: column; }
  .campaign-banner button { width: 100%; }
}
