:root {
  --bg1: #0f1f3a;
  --bg2: #183d72;
  --card: rgba(9, 17, 34, 0.9);
  --line: rgba(255, 255, 255, 0.18);
  --text: #f7fbff;
  --muted: #cfdefe;
  --ok: #39d98a;
  --bad: #ff6b6b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Nunito', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 15%, #2f5ca3 0%, transparent 45%),
    radial-gradient(circle at 88% 80%, #6f2a4f 0%, transparent 36%),
    linear-gradient(160deg, var(--bg1), var(--bg2));
  display: grid;
  place-items: center;
}

body.app-body {
  --bg1: #f5f6f8;
  --bg2: #f5f6f8;
  --card: #ffffff;
  --line: #d9dce3;
  --text: #111827;
  --muted: #6b7280;
  --ok: #15803d;
  --bad: #b91c1c;
  background: #f5f6f8;
  color: var(--text);
  place-items: start center;
  padding: 32px 20px 48px;
}

.landing-shell {
  width: min(1120px, 94vw);
  display: grid;
  gap: 1rem;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.9fr);
  gap: 1.2rem;
  align-items: stretch;
}

.landing-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.landing-lead {
  max-width: 58ch;
}

.landing-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.landing-note {
  margin-top: 0.85rem;
}

.landing-panel {
  display: grid;
  gap: 0.8rem;
}

.landing-feature {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.07);
  padding: 1rem;
}

.landing-feature h2 {
  margin-bottom: 0.45rem;
}

.landing-feature p,
.landing-meta-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.landing-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.landing-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.arcade-shell {
  width: min(980px, 94vw);
  display: grid;
  gap: 1rem;
}

body.app-body .arcade-shell {
  width: min(960px, 100%);
  gap: 16px;
}

.auth-stage,
.workspace-stage {
  display: grid;
  gap: 1rem;
}

.shell-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  gap: 1rem;
  align-items: center;
}

body.app-body .shell-topbar {
  gap: 12px;
}

.shell-title {
  font-size: clamp(1.4rem, 3.6vw, 2.4rem);
}

body.app-body .shell-title,
body.app-body h1 {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.shell-copy {
  max-width: 54ch;
  margin-bottom: 0;
}

.auth-panel {
  display: grid;
  gap: 0.7rem;
  justify-items: end;
  text-align: right;
}

.auth-profile {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  justify-items: end;
}

.auth-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(159, 255, 233, 0.45);
  background: rgba(255, 255, 255, 0.08);
}

body.app-body .auth-avatar {
  border: 1px solid var(--line);
  background: #f3f4f6;
}

.auth-copy {
  min-width: 0;
}

.auth-user-name,
.auth-user-email {
  margin: 0;
}

.auth-user-name {
  font-weight: 900;
}

.auth-user-email {
  color: var(--muted);
  word-break: break-word;
}

.auth-status {
  min-height: 1.1rem;
  margin: 0;
}

.auth-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.auth-stage {
  width: min(440px, 100%);
  margin: 8vh auto 0;
  padding: 0;
}

body.app-body .auth-stage {
  width: min(400px, 100%);
  margin: 48px auto 0;
}

.auth-gate {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.app-body .auth-gate {
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.auth-gate h2,
.auth-gate p {
  margin-top: 0;
}

.auth-card {
  display: grid;
  gap: 0.9rem;
  padding: 0;
}

body.app-body .auth-card {
  gap: 12px;
  padding: 0;
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem;
}

.auth-switch-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  padding: 0.7rem 0.8rem;
  cursor: pointer;
}

body.app-body .auth-switch-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--muted);
  font-weight: 700;
}

.auth-switch-btn.active {
  background: rgba(69, 239, 212, 0.14);
  color: var(--text);
  border-color: rgba(69, 239, 212, 0.32);
}

body.app-body .auth-switch-btn.active {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

.auth-inline-status {
  margin: 0;
  color: #ffd6a6;
}

body.app-body .auth-inline-status {
  color: #b45309;
}

.auth-gate-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
}

.auth-login-grid {
  grid-template-columns: minmax(0, 1fr);
}

.auth-compact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-submit {
  width: 100%;
  justify-content: center;
}

.auth-gate-note {
  margin-top: 0.7rem;
  color: var(--muted);
}

.auth-gate-note a {
  color: #9fffea;
  font-weight: 800;
}

.signup-form {
  display: grid;
  gap: 0.8rem;
}

.signup-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.signup-field {
  display: grid;
  gap: 0.35rem;
}

.signup-field label {
  font-weight: 800;
  color: var(--muted);
}

body.app-body .signup-field label {
  font-weight: 700;
  font-size: 0.92rem;
}

body.app-body .signup-field input,
body.app-body .chapter-config select,
body.app-body .review-chat-input,
body.app-body textarea,
body.app-body select {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  padding: 10px 12px;
  box-shadow: none;
}

.signup-field-full {
  grid-column: 1 / -1;
}

.signup-checkboxes {
  display: grid;
  gap: 0.55rem;
}

.signup-checkbox {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  color: var(--muted);
}

body.app-body .signup-checkbox {
  font-size: 0.92rem;
}

.signup-checkbox input {
  width: auto;
  margin-top: 0.2rem;
}

.signup-checkbox a {
  color: #9fffea;
  font-weight: 800;
}

body.app-body .signup-checkbox a,
body.app-body .legal-link {
  color: #111827;
  font-weight: 700;
}

.download-link.is-disabled,
.btn.is-disabled {
  pointer-events: none;
  opacity: 0.55;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.34);
  padding: clamp(1rem, 2.4vw, 1.8rem);
}

body.app-body .card {
  border-radius: 14px;
  box-shadow: none;
  padding: 20px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: pop 220ms ease-out;
}

h1,
h2 {
  margin: 0;
  line-height: 1.2;
}

h1 {
  font-family: 'Bungee', cursive;
  font-size: clamp(1.7rem, 4.2vw, 2.6rem);
}

h2 {
  font-size: clamp(1.2rem, 2.8vw, 1.9rem);
}

body.app-body h2 {
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 700;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  background: linear-gradient(90deg, #44efd4, #9fffea);
  color: #003246;
  font-weight: 900;
  margin: 0 0 0.8rem;
}

body.app-body .badge {
  background: #f3f4f6;
  color: #374151;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
}

.lead {
  color: var(--muted);
  margin: 0.6rem 0;
}

.mini {
  color: var(--muted);
  margin: 0.3rem 0 0.9rem;
}

.start-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chapter-config {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.4rem;
}

.chapter-config label {
  font-weight: 800;
  color: var(--muted);
}

.chapter-config select {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  padding: 0.5rem 0.55rem;
  font-family: inherit;
  font-weight: 700;
}

.chapter-config select option {
  color: #0f1f3a;
}

.chapter-status {
  margin: 0;
  min-height: 1.1rem;
}

.download-panel {
  margin-top: 1rem;
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

body.app-body .download-panel {
  background: #f9fafb;
  border-radius: 12px;
}

.download-link {
  text-decoration: none;
  text-align: center;
}

.download-link.is-disabled {
  pointer-events: none;
  opacity: 0.55;
}

.legal-link-row {
  margin-top: 0.2rem;
}

.legal-link {
  color: #9fffea;
  font-weight: 800;
  text-decoration: none;
}

.legal-link:hover,
.legal-link:focus-visible {
  text-decoration: underline;
}

.legal-divider {
  margin: 0 0.3rem;
  color: var(--muted);
}

.hud {
  display: grid;
  grid-template-columns: repeat(5, minmax(90px, 1fr));
  gap: 0.45rem;
  margin-bottom: 0.6rem;
}

.hud p {
  margin: 0;
  text-align: center;
  padding: 0.45rem 0.35rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  font-weight: 900;
  font-size: 0.86rem;
}

body.app-body .hud p {
  background: #f9fafb;
  border-color: var(--line);
}

.progress-track {
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  margin-bottom: 0.9rem;
}

body.app-body .progress-track {
  background: #e5e7eb;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #4cffb8, #ffe56e, #ff9b58);
  transition: width 320ms ease;
}

body.app-body .progress-fill {
  background: #111827;
}

.prompt {
  margin: 0.25rem 0 0.7rem;
  white-space: pre-wrap;
}

.code {
  margin: 0 0 0.8rem;
  padding: 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(69, 239, 212, 0.45);
  background: linear-gradient(180deg, rgba(4, 11, 24, 0.92), rgba(8, 16, 34, 0.95));
  color: #d7fff6;
  white-space: pre-wrap;
  font-family: 'Consolas', 'Courier New', monospace;
}

body.app-body .code {
  border-color: var(--line);
  background: #f9fafb;
  color: #111827;
}

.hidden {
  display: none;
}

.challenge-host {
  display: grid;
  gap: 0.55rem;
}

.option-grid {
  display: grid;
  gap: 0.55rem;
}

.option-btn {
  border: 0;
  border-radius: 12px;
  color: #fff;
  font-family: inherit;
  font-weight: 900;
  text-align: left;
  padding: 0.85rem 0.95rem;
  cursor: pointer;
}

.option-btn:nth-child(4n + 1) {
  background: #ef476f;
}

.option-btn:nth-child(4n + 2) {
  background: #118ab2;
}

.option-btn:nth-child(4n + 3) {
  background: #ffd166;
  color: #3a2a00;
}

.option-btn:nth-child(4n + 4) {
  background: #06d6a0;
  color: #032a1f;
}

.order-list {
  display: grid;
  gap: 0.45rem;
}

.order-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.3rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.4rem;
}

.order-item button {
  border: 0;
  border-radius: 8px;
  padding: 0.25rem 0.45rem;
  margin-left: 0.25rem;
  font-weight: 800;
}

.arrow-btn {
  width: 34px;
  height: 30px;
  font-size: 0.95rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  transition: transform 170ms ease, background 170ms ease;
}

.arrow-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.28);
}

.arrow-btn:disabled {
  opacity: 0.45;
}

.order-item.moved-up {
  animation: moveUp 210ms ease;
}

.order-item.moved-down {
  animation: moveDown 210ms ease;
}

textarea,
input,
select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 0.65rem;
  font-family: inherit;
}

.theory-editor {
  min-height: 230px;
  line-height: 1.5;
  font-size: 1rem;
  resize: vertical;
}

.theory-fill-editor {
  min-height: 150px;
}

.feedback-box {
  margin-top: 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.09);
  min-height: 80px;
  padding: 0.7rem;
}

.feedback-box.ok {
  border-color: var(--ok);
}

.feedback-box.bad {
  border-color: var(--bad);
}

.hint-box {
  margin-top: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(162, 206, 255, 0.52);
  background: rgba(85, 150, 255, 0.14);
  min-height: 62px;
  padding: 0.65rem;
}

.hint-box p {
  margin: 0;
  color: #eef6ff;
}

.model-answer {
  margin-top: 0.6rem;
  border-top: 1px solid var(--line);
  padding-top: 0.55rem;
}

.review-block {
  margin-top: 0.1rem;
}

.review-line {
  margin: 0.2rem 0;
}

.model-answer p {
  margin: 0.2rem 0;
}

.model-answer-text {
  white-space: pre-wrap;
  line-height: 1.5;
}

.model-answer-text mark {
  background: #ffe27a;
  color: #2b2000;
  border-radius: 4px;
  padding: 0 2px;
}

.review-table-wrap {
  margin-top: 0.45rem;
  overflow-x: auto;
}

.review-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.2rem;
}

.review-table th,
.review-table td {
  border: 1px solid var(--line);
  padding: 0.65rem 0.7rem;
  vertical-align: top;
  text-align: left;
  line-height: 1.45;
}

.review-table th {
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

.review-table td mark,
.review-table th mark {
  background: #ffe27a;
  color: #2b2000;
  border-radius: 4px;
  padding: 0 2px;
}

.structured-prompt-block {
  margin-bottom: 0.9rem;
}

.math-figure-wrap {
  margin: 0.55rem 0 0.8rem;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.math-figure-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.math-figure-caption {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

.math-latex-fallback {
  margin: 0.45rem 0;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  white-space: pre-wrap;
  overflow-x: auto;
}

.review-actions {
  margin-top: 0.55rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.review-btn {
  padding: 0.45rem 0.8rem;
  font-size: 0.85rem;
}

.detail-explanation {
  margin-top: 0.6rem;
  border-top: 1px dashed var(--line);
  padding-top: 0.5rem;
}

.review-chat {
  margin-top: 0.9rem;
}

.review-chat-log {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 320px;
  overflow-y: auto;
  padding: 0.2rem 0 0.35rem;
}

.review-chat-msg {
  display: flex;
  width: 100%;
}

.review-chat-msg.user {
  justify-content: flex-end;
}

.review-chat-msg.assistant {
  justify-content: flex-start;
}

.review-chat-bubble {
  max-width: min(82%, 560px);
  border-radius: 18px;
  padding: 0.7rem 0.85rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.review-chat-msg.user .review-chat-bubble {
  border-bottom-right-radius: 6px;
  background: linear-gradient(135deg, #78b8ff, #5596ff);
  color: #081b35;
}

.review-chat-msg.assistant .review-chat-bubble {
  border-bottom-left-radius: 6px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.07));
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.review-chat-role {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.76;
}

.review-chat-bubble .review-line {
  margin: 0.15rem 0;
  line-height: 1.45;
}

.review-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  align-items: end;
  margin-top: 0.55rem;
}

.review-chat-input {
  min-height: 54px;
  max-height: 120px;
  resize: vertical;
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(9, 18, 34, 0.6);
  color: #f7f9ff;
  padding: 0.75rem 0.9rem;
  font: inherit;
}

.review-chat-actions {
  display: flex;
  align-items: flex-end;
}

.review-chat-send {
  min-width: 86px;
  align-self: stretch;
}

.actions-row {
  margin-top: 0.65rem;
  display: flex;
  gap: 0.55rem;
  justify-content: flex-end;
}

.btn {
  border: 0;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 900;
  padding: 0.7rem 1rem;
  cursor: pointer;
}

body.app-body .btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 700;
  padding: 0.68rem 0.95rem;
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(90deg, #45efd4, #9fffe9);
  color: #073848;
}

body.app-body .btn-primary {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

.btn-secondary {
  background: linear-gradient(90deg, #ffd06b, #ffe79f);
  color: #483200;
}

body.app-body .btn-secondary {
  background: #ffffff;
  color: #111827;
}

.btn-danger {
  background: linear-gradient(90deg, #ff6f6f, #ff9d75);
  color: #390b0b;
}

body.app-body .btn-danger {
  background: #ffffff;
  color: #b91c1c;
  border-color: #ef4444;
}

.btn-hint {
  background: linear-gradient(90deg, #7fb5ff, #9dd2ff);
  color: #0c2745;
}

body.app-body .btn-hint {
  background: #ffffff;
  color: #1d4ed8;
  border-color: #93c5fd;
}

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

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes moveUp {
  from {
    transform: translateY(8px);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes moveDown {
  from {
    transform: translateY(-8px);
  }
  to {
    transform: translateY(0);
  }
}

.program-editor {
  min-height: 280px;
  font-family: 'Consolas', 'Courier New', monospace;
  line-height: 1.45;
  border: 1px solid rgba(69, 239, 212, 0.45);
  background:
    linear-gradient(180deg, rgba(2, 14, 28, 0.94), rgba(6, 20, 38, 0.96)),
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.035) 0px,
      rgba(255, 255, 255, 0.035) 24px,
      rgba(255, 255, 255, 0.012) 24px,
      rgba(255, 255, 255, 0.012) 48px
    );
}

.session-review {
  margin: 1rem 0 1.15rem;
}

.session-review-grid {
  display: grid;
  gap: 0.85rem;
}

.session-review-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.07);
}

.session-card-title {
  margin: 0 0 0.75rem;
  font-weight: 900;
  font-size: 1rem;
}

.session-card-mini {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.session-metric-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.session-metric-card {
  border-radius: 14px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.session-metric-card span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.session-metric-card strong {
  font-size: 1.2rem;
}

.session-area-row {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.7rem;
}

.session-area-copy {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.session-area-label {
  font-weight: 800;
}

.session-area-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.session-area-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.session-area-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd166, #44efd4);
}

.session-band-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.session-band-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  font-weight: 800;
}

.session-band-pill.strong {
  background: rgba(68, 239, 212, 0.16);
}

.session-band-pill.good {
  background: rgba(127, 181, 255, 0.16);
}

.session-band-pill.mid {
  background: rgba(255, 209, 102, 0.18);
  color: #fff3c6;
}

.session-band-pill.weak {
  background: rgba(255, 107, 107, 0.16);
}

.session-recommendation-list {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.5rem;
}

.session-question-list {
  display: grid;
  gap: 0.65rem;
}

.session-question-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: start;
  border-radius: 14px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
}

.session-question-title,
.session-question-copy {
  margin: 0;
}

.session-question-title {
  font-weight: 900;
  margin-bottom: 0.25rem;
}

.session-question-copy {
  color: var(--muted);
}

.session-question-score {
  font-size: 1rem;
  font-weight: 900;
}

.policy-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 14%, #2f5ca3 0%, transparent 38%),
    radial-gradient(circle at 82% 24%, #1e6c68 0%, transparent 28%),
    linear-gradient(160deg, var(--bg1), var(--bg2));
  display: block;
}

.policy-shell {
  width: min(960px, 94vw);
  margin: 2rem auto;
}

.policy-card {
  display: grid;
  gap: 1rem;
}

.policy-intro {
  margin: 0;
  color: var(--text);
  line-height: 1.65;
}

.policy-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.policy-link {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}

.policy-link:hover,
.policy-link:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

.policy-section {
  display: grid;
  gap: 0.55rem;
}

.policy-section h2 {
  margin: 0;
}

.policy-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.policy-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.7;
}

.policy-note {
  color: #ffd166;
  font-weight: 800;
}

.policy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.5rem;
}

@media (max-width: 760px) {
  .landing-hero {
    grid-template-columns: 1fr;
  }

  .landing-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .shell-topbar {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    justify-items: start;
    text-align: left;
  }

  .auth-profile {
    justify-items: start;
  }

  .auth-actions {
    justify-content: flex-start;
  }

  .signup-grid {
    grid-template-columns: 1fr;
  }

  .start-grid {
    grid-template-columns: 1fr;
  }

  .hud {
    grid-template-columns: repeat(2, minmax(100px, 1fr));
  }

  .actions-row {
    justify-content: stretch;
  }

  .actions-row .btn {
    flex: 1;
  }

  .session-metric-grid,
  .session-band-grid {
    grid-template-columns: 1fr;
  }

  .auth-compact-grid {
    grid-template-columns: 1fr;
  }

}
