:root {
  color-scheme: light;
  --ink: #152f3a;
  --muted: #526873;
  --teal: #087f78;
  --teal-dark: #066660;
  --teal-soft: #e6f4f1;
  --line: #d9e4e2;
  --bg: #f4f8f7;
  --white: #fff;
  --focus: #0b7771;
  --shadow: 0 8px 24px rgba(21, 47, 58, .07);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; }
button, input, select { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 68px;
  padding: 10px max(20px, calc((100% - 1120px)/2));
  display: flex;
  align-items: center;
  gap: 18px;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; flex: none; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: var(--teal-soft); display: grid; place-items: center; font-size: 20px; }
.brand-copy strong, .brand-copy small { display: block; }
.brand-copy strong { font-size: 14px; line-height: 1.1; font-weight: 800; }
.brand-copy small { margin-top: 3px; color: var(--teal-dark); font-size: 9px; letter-spacing: 2px; font-weight: 800; }
.main-nav { display: flex; align-items: center; justify-content: center; gap: 3px; flex: 1; min-width: 0; }
.main-nav a { white-space: nowrap; text-decoration: none; color: #3e5862; padding: 9px 10px; border-radius: 9px; font-size: 12px; font-weight: 650; }
.main-nav a:hover, .main-nav a[aria-current="page"] { background: #edf5f3; color: var(--teal-dark); }
.main-nav .nav-cta { background: var(--teal); color: white; }
.main-nav .nav-cta:hover { background: var(--teal-dark); color: white; }
.header-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.save-status { color: var(--muted); font-size: 11px; white-space: nowrap; }
.page { width: min(1120px, 100%); margin: 0 auto; padding: 24px 22px 16px; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 750; text-decoration: none; cursor: pointer; }
.button-primary { background: var(--teal); color: white; }
.button-primary:hover { background: var(--teal-dark); }
.button-secondary { background: var(--teal-soft); color: var(--teal-dark); }
.button-quiet { min-height: 36px; padding: 7px 10px; background: #f0f4f3; color: #46606a; font-size: 11px; }
.button-large { min-height: 48px; padding-inline: 20px; }
.button:disabled, input:disabled, select:disabled { cursor: not-allowed; opacity: .65; }
.full { width: 100%; }
.eyebrow { color: var(--teal-dark); font-size: 10px; letter-spacing: 1.5px; font-weight: 850; }
.eyebrow-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #36a58c; }
h1, h2, h3, p { margin-top: 0; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(230px, .7fr);
  align-items: center;
  gap: 28px;
  padding: 34px 40px;
  border: 1px solid #d4e8e3;
  border-radius: 20px;
  background: linear-gradient(110deg, #eaf5f2, #fff 70%);
}
.hero-copy { max-width: 650px; }
.hero h1 { margin: 10px 0; font-size: clamp(34px, 4.4vw, 52px); line-height: 1.08; letter-spacing: -1.8px; }
.hero h1 span { color: var(--teal); }
.hero-copy > p { max-width: 560px; margin-bottom: 17px; color: #425b65; font-size: 16px; }
.hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.text-link { color: var(--teal-dark); font-size: 13px; font-weight: 700; text-underline-offset: 3px; }
.hero-card { position: relative; max-width: 300px; justify-self: end; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.86); box-shadow: var(--shadow); }
.hero-card-icon { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 14px; border-radius: 10px; background: var(--teal-soft); color: var(--teal-dark); font-size: 18px; }
.hero-card .eyebrow { margin-bottom: 4px; }
.hero-card strong { display: block; margin-bottom: 5px; font-size: 16px; }
.hero-card p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.practice-section { margin-top: 24px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: #eef5f3; }
.section-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 16px; }
.section-intro h2 { margin: 4px 0 0; font-size: clamp(22px, 2.8vw, 30px); line-height: 1.2; letter-spacing: -.5px; }
.section-intro > p { max-width: 460px; margin: 0; color: var(--muted); font-size: 13px; }
.practice-intro { align-items: center; }
.practice-label, .local-badge { display: inline-flex; align-items: center; min-height: 32px; padding: 6px 10px; border-radius: 99px; background: white; color: var(--teal-dark); font-size: 10px; font-weight: 800; white-space: nowrap; }
.workspace { display: grid; grid-template-columns: minmax(275px, 340px) minmax(0, 1fr); align-items: stretch; gap: 14px; }
.panel { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 3px 12px rgba(21,47,58,.035); }
.setup-panel { align-self: start; }
.section-heading { margin-bottom: 14px; }
.section-heading h3, .panel h3 { margin: 3px 0 0; font-size: 18px; }
.field { min-width: 0; margin: 0 0 12px; }
.field-note { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.field label, .answer-form label { display: block; margin: 0 0 5px; color: #28444f; font-size: 12px; font-weight: 750; }
.field select, .nickname-details input, .answer-form input {
  width: 100%; min-width: 0; min-height: 44px; border: 1px solid #cbd9d6; border-radius: 9px;
  padding: 9px 11px; background: white; color: var(--ink);
}
.field select:focus, .nickname-details input:focus, .answer-form input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8,127,120,.12); }
.difficulty-field { margin-top: 0; }
.difficulty-progress { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 6px; margin: 7px 0; }
.difficulty-step { display: block; min-width: 0; padding: 7px 3px; border: 1px solid var(--line); border-radius: 8px; background: #f8faf9; color: var(--muted); text-align: center; font-size: 10px; line-height: 1.35; }
.difficulty-step strong { display: block; color: inherit; font-size: 11px; }
.difficulty-step.active { border-color: #55a99c; background: var(--teal-soft); color: #075c56; }
.difficulty-step.unlocked { border-color: #a8d7c7; background: #eff8f4; color: #226c59; }
.difficulty-step.locked { background: #f3f5f4; color: #5d6f74; }
.difficulty-note, .coverage-note, .challenge-status { margin: 7px 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.setup-details, .secondary-details { border-top: 1px solid var(--line); padding-top: 9px; margin-top: 10px; }
.setup-details summary, .secondary-details summary { min-height: 32px; color: var(--teal-dark); font-size: 12px; font-weight: 750; cursor: pointer; }
.setup-details summary span, .summary-count { margin-left: 5px; color: var(--muted); font-size: 10px; font-weight: 550; }
.setup-details input { margin-top: 8px; }
.nickname-details { margin-top: 6px; }
.setup-panel .button { margin-top: 10px; }
.challenge-status { min-height: 0; margin: 9px 0 0; }
.coverage-footnote { margin: 10px 2px 0; color: var(--muted); font-size: 11px; }
.question-panel { min-height: 420px; display: flex; flex-direction: column; }
.question-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pill { display: inline-flex; align-items: center; border-radius: 99px; padding: 6px 9px; background: #eaf4f2; color: var(--teal-dark); font-size: 10px; font-weight: 800; }
.question-count { color: var(--muted); font-size: 11px; font-weight: 700; }
.question-content { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 26px 14px 18px; text-align: center; }
.question-content.self-check-content { align-items: stretch; justify-content: flex-start; text-align: left; }
.self-check-note { width: 100%; margin: 8px 0 0; padding: 10px 12px; border-radius: 9px; background: #eef6f4; color: #35515a; font-size: 12px; }
.empty-illustration { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 10px; border-radius: 14px; background: var(--teal-soft); color: var(--teal-dark); font-size: 23px; }
.question-content h3 { margin: 0 0 7px; font-size: 21px; }
.question-content > p { max-width: 500px; margin-bottom: 12px; color: var(--muted); font-size: 13px; }
.question-prompt { margin: 14px 0 8px; font-size: clamp(19px,2.3vw,26px); line-height: 1.4; white-space: pre-line; }
.question-context { max-width: 540px; color: var(--muted); font-size: 13px; }
.example-box { width: 100%; max-width: 390px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8faf9; text-align: left; }
.example-box strong { color: var(--teal-dark); font-size: 12px; }
.example-box p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.hint-area { margin: 4px 0 10px; }
.button-hint { min-height: 38px; padding: 7px 11px; border: 1px solid #eadcae; background: #fff8e8; color: #634d12; font-size: 12px; }
.hint-message { margin: 8px 0 0; padding: 10px 12px; border-radius: 9px; background: #fff8e8; color: #604e21; font-size: 12px; }
.answer-form { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; }
.answer-row { display: flex; gap: 9px; }
.answer-row input { flex: 1; }
.answer-row .button { white-space: nowrap; }
.input-hint { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.feedback { margin-top: 11px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; line-height: 1.55; }
.feedback strong { display: block; margin-bottom: 4px; }
.feedback.correct { border-color: #b7dfce; background: #edf8f2; color: #205943; }
.feedback.incorrect { border-color: #efc8c8; background: #fff3f2; color: #853b3b; }
.feedback.invalid { border-color: #e9d89e; background: #fff9e8; color: #69541c; }
.feedback .explanation { margin-top: 8px; color: #344e57; }
.question-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.hidden { display: none !important; }
.section-block { margin-top: 32px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.compact-intro { align-items: center; margin-bottom: 10px; }
.compact-intro > p { max-width: 480px; }
.journey-summary, .achievement-summary { margin: 5px 0; color: var(--teal-dark); font-weight: 750; font-size: 13px; }
.journey-position { margin: 3px 0 10px; color: var(--muted); font-size: 12px; }
.secondary-details { margin-top: 11px; }
.secondary-details summary { min-height: 34px; }
.journey-map-wrap { overflow: hidden; margin-top: 8px; padding: 12px; border-radius: 12px; background: #f4f8f7; }
.journey-map { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.journey-checkpoint { position: relative; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.journey-checkpoint.completed { border-color: #a8d7c7; background: #f4fbf7; }
.journey-checkpoint.available { border-color: #62aa9d; }
.journey-checkpoint.locked, .journey-checkpoint.planned { background: #f8faf9; }
.checkpoint-marker { display: none; }
.checkpoint-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.checkpoint-heading h3 { margin: 0; font-size: 14px; }
.checkpoint-landmark { color: var(--teal-dark); font-size: 13px; }
.checkpoint-status { border-radius: 99px; padding: 3px 7px; background: var(--teal-soft); color: var(--teal-dark); font-size: 10px; font-weight: 750; }
.checkpoint-copy > p, .checkpoint-copy dl { margin: 7px 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.checkpoint-copy dl { margin-bottom: 0; }
.checkpoint-copy dl > div { margin-top: 5px; }
.checkpoint-copy dt { color: var(--ink); font-weight: 750; }
.checkpoint-copy dd { margin: 1px 0 0; }
.checkpoint-availability { padding: 7px; border-left: 2px solid #a9d6ce; background: #f4f9f7; }
.stats-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; }
.stat-card { position: relative; min-width: 0; min-height: 82px; display: flex; align-items: center; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.stat-icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--teal-soft); color: var(--teal-dark); font-size: 10px; font-weight: 800; }
.stat-card p { margin: 0 0 2px; color: var(--muted); font-size: 11px; }
.stat-card strong { font-size: 20px; line-height: 1.1; }
.accuracy-card { flex-wrap: wrap; }
.accuracy-card .progress-track { flex: 0 0 100%; height: 5px; overflow: hidden; border-radius: 99px; background: #e8efed; }
.progress-fill { height: 100%; width: 0; border-radius: inherit; background: var(--teal); transition: width .25s ease; }
.class-points-summary { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 10px; padding: 12px 14px; border: 1px solid #cfe2dd; border-radius: 11px; background: #f4f9f7; }
.class-points-summary > div { display: flex; align-items: center; gap: 10px; flex: none; }
.class-points-summary strong { color: var(--teal-dark); font-size: 12px; }
.class-points-summary span { color: var(--ink); font-size: 19px; font-weight: 800; }
.class-points-summary p { margin: 0; color: var(--muted); font-size: 11px; }
.progress-message { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.achievement-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 9px; margin-top: 8px; }
.achievement-card { display: flex; align-items: flex-start; gap: 9px; min-width: 0; min-height: 86px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.achievement-card.earned { border-color: #d6ca96; background: #fffdf5; }
.achievement-card.locked { background: #f8faf9; }
.achievement-icon { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #f1f4f3; font-size: 15px; }
.achievement-copy { min-width: 0; }
.achievement-status { color: var(--muted); font-size: 9px; font-weight: 750; }
.achievement-card.earned .achievement-status { color: #6f5a20; }
.achievement-copy h3 { margin: 2px 0; font-size: 12px; }
.achievement-copy p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.achievement-celebration { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 12px; border: 1px solid #cfe2dd; border-radius: 10px; background: #f5faf8; }
.celebration-mark { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--teal-soft); color: var(--teal-dark); }
.celebration-copy { flex: 1; min-width: 0; }
.celebration-copy strong { display: block; font-size: 13px; }
.celebration-copy p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.achievement-celebration .button { min-height: 38px; padding: 7px 11px; }
.leaderboard-section { margin-bottom: 20px; }
.leaderboard-panel { max-width: 760px; }
.leaderboard-heading h3 { margin: 0 0 3px; font-size: 16px; }
.leaderboard-heading p { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.score-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 12px; }
.score-row strong { color: var(--teal-dark); }
.muted { color: var(--muted); font-size: 12px; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 2px 4px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.footer-brand .brand-mark { width: 32px; height: 32px; font-size: 16px; }
.footer-brand .brand-copy strong { font-size: 12px; }
.footer-brand .brand-copy small { font-size: 7px; }
.back-top { color: var(--teal-dark); font-weight: 750; text-decoration: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1080px) {
  .site-header { flex-wrap: wrap; gap: 8px 14px; padding-inline: 18px; }
  .main-nav { order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; }
  .header-tools { margin-left: auto; }
}
@media (max-width: 860px) {
  .page { padding: 18px 16px 12px; }
  .hero { grid-template-columns: minmax(0,1fr) minmax(190px,.65fr); padding: 28px; gap: 18px; }
  .workspace { grid-template-columns: minmax(245px,.8fr) minmax(0,1.2fr); }
  .practice-section { padding: 19px; }
  .stats-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .achievement-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .journey-map { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 680px) {
  html { scroll-padding-top: 12px; }
  .site-header { position: static; padding: 9px 12px; gap: 6px 8px; }
  .brand { gap: 7px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-copy strong { font-size: 12px; }
  .header-tools { gap: 5px; }
  .save-status { display: none; }
  .header-tools .button { min-height: 34px; padding: 5px 8px; font-size: 10px; }
  .main-nav { gap: 2px; padding: 2px 0 4px; scrollbar-width: thin; }
  .main-nav a { padding: 8px 9px; font-size: 11px; }
  .page { padding: 12px; }
  .hero { grid-template-columns: 1fr; padding: 23px 20px; border-radius: 15px; }
  .hero-card { display: none; }
  .hero h1 { font-size: clamp(34px,9vw,44px); letter-spacing: -1.2px; }
  .hero-copy > p { font-size: 14px; }
  .hero-actions { gap: 12px; }
  .practice-section { margin-top: 15px; padding: 15px 11px; border-radius: 14px; }
  .section-intro, .compact-intro { align-items: flex-start; flex-direction: column; gap: 7px; }
  .practice-intro { gap: 8px; }
  .section-intro h2 { font-size: 24px; }
  .practice-label, .local-badge { min-height: 28px; }
  .workspace { grid-template-columns: 1fr; gap: 10px; }
  .panel { padding: 15px; }
  .setup-panel { order: 0; }
  .question-panel { order: 1; min-height: 350px; }
  .difficulty-progress { gap: 4px; }
  .difficulty-step { padding: 6px 2px; font-size: 9px; }
  .difficulty-step strong { font-size: 10px; }
  .answer-row { flex-direction: column; }
  .answer-row .button { width: 100%; }
  .section-block { margin-top: 16px; padding: 15px 12px; border-radius: 13px; }
  .journey-map { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .stat-card { min-height: 70px; padding: 9px; gap: 7px; }
  .stat-icon { width: 28px; height: 28px; }
  .stat-card p { font-size: 10px; }
  .stat-card strong { font-size: 18px; }
  .class-points-summary { align-items: flex-start; flex-direction: column; gap: 5px; padding: 10px; }
  .class-points-summary p { font-size: 10px; }
  .achievement-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .achievement-card { min-height: 0; padding: 9px; gap: 7px; }
  .achievement-icon { width: 27px; height: 27px; font-size: 13px; }
  .achievement-copy h3 { font-size: 11px; }
  .achievement-copy p { font-size: 9px; }
  .achievement-celebration { align-items: flex-start; flex-wrap: wrap; }
  .celebration-copy { flex-basis: calc(100% - 48px); }
  .leaderboard-panel { padding: 13px; }
  footer { flex-wrap: wrap; }
}
@media (max-width: 380px) {
  .brand-copy strong { font-size: 11px; }
  .header-tools .button { font-size: 9px; }
  .hero { padding-inline: 16px; }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .stats-grid, .achievement-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 60px; }
  .difficulty-step { font-size: 8px; }
  .difficulty-step strong { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Journey, avatar, medal interaction, active navigation, and achievement celebration */
.main-nav a[aria-current="location"] {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 3px 9px rgba(8,127,120,.18);
}
.main-nav a[aria-current="location"]:hover { background: var(--teal-dark); color: #fff; }
.journey-intro { align-items: center; }
.journey-identity {
  display: flex; align-items: center; gap: 13px; margin: 10px 0 3px;
  padding: 12px 14px; border: 1px solid #d4e8e3; border-radius: 13px;
  background: linear-gradient(100deg,#edf8f4,#fff);
}
.detective-badge {
  flex: none; display: grid; place-items: center; width: 52px; height: 52px;
  border: 2px solid #b9ded5; border-radius: 16px; background: #fff;
  font-size: 29px;
}
.detective-copy { flex: 1; min-width: 0; }
.detective-copy strong { display: block; color: var(--ink); font-size: 14px; }
.detective-copy span { display: block; color: var(--muted); font-size: 11px; line-height: 1.4; }
.avatar-picker { display: flex; flex-direction: column; gap: 3px; color: var(--muted); font-size: 10px; font-weight: 700; }
.avatar-picker select { min-height: 38px; max-width: 190px; padding: 6px 28px 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); font: inherit; }
.avatar-note { margin: 0 0 8px 66px; color: var(--muted); font-size: 10px; }
.journey-position { margin: 0; }
.journey-summary { margin: 12px 0 5px; color: var(--ink); font-size: 14px; }
.journey-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 9px 0 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.journey-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #dfe7e5; border: 1px solid #aabbb6; }
.legend-dot.completed { background: #138578; border-color: #08766b; }
.legend-dot.current { background: #ffd267; border: 2px solid #a36808; box-shadow: 0 0 0 3px #fff0c9; }
.legend-dot.locked { background: #e6e9e8; }
.legend-dot.planned { background: white; border-style: dashed; }
.journey-map-wrap {
  position: relative; isolation: isolate; overflow: visible; min-height: 390px;
  margin-top: 7px; padding: 14px 18px; border: 1px solid #dce9e5;
  border-radius: 15px; background: linear-gradient(145deg,#f0f8f5,#f6f8f6 58%,#f3f8fb);
}
.journey-route { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.route-future, .route-progress { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.route-future { stroke: #9ebeb6; stroke-width: 8; stroke-dasharray: 3 15; }
.route-progress { stroke: #087f78; stroke-width: 8; stroke-dasharray: 0 1000; transition: stroke-dasharray .35s ease; }
.route-mobile { display: none; }
.journey-map {
  position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr));
  grid-template-rows: repeat(2,minmax(150px,auto)); grid-template-areas: "dock streak cove" "castle lookout treasure";
  gap: 50px 7%; list-style: none; margin: 0; padding: 0;
}
.journey-checkpoint { position: relative; min-width: 0; min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.journey-checkpoint:nth-child(3n+2), .journey-checkpoint:nth-child(4), .journey-checkpoint:nth-child(5), .journey-checkpoint:nth-child(6) { transform: none; grid-column: auto; grid-row: auto; }
.journey-checkpoint:nth-child(1) { grid-area: dock; }
.journey-checkpoint:nth-child(2) { grid-area: streak; }
.journey-checkpoint:nth-child(3) { grid-area: cove; }
.journey-checkpoint:nth-child(4) { grid-area: treasure; }
.journey-checkpoint:nth-child(5) { grid-area: lookout; }
.journey-checkpoint:nth-child(6) { grid-area: castle; }
.map-location {
  position: relative; display: block; min-height: 144px; border: 1px solid #cfddda; border-radius: 16px;
  background: rgba(255,255,255,.96); box-shadow: 0 6px 16px rgba(21,47,58,.08);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.map-location > summary {
  display: flex; align-items: center; gap: 10px; min-height: 142px; padding: 13px;
  list-style: none; cursor: pointer;
}
.map-location > summary::-webkit-details-marker { display: none; }
.map-location > summary::marker { content: ""; }
.map-location:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(21,47,58,.12); }
.checkpoint-marker {
  flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 17px;
  background: #edf3f2; color: var(--muted); font-size: 30px; box-shadow: inset 0 0 0 1px rgba(21,47,58,.06);
}
.checkpoint-main { min-width: 0; flex: 1; }
.checkpoint-main h3 { margin: 0 0 7px; color: var(--ink); font-size: 13px; line-height: 1.25; }
.checkpoint-status { display: inline-flex; align-items: center; gap: 4px; border-radius: 99px; padding: 4px 7px; background: #eff2f1; color: #455b61; font-size: 9px; font-weight: 800; line-height: 1.2; }
.checkpoint-expand { flex: none; align-self: flex-start; color: var(--muted); font-size: 15px; line-height: 1; }
.map-location[open] .checkpoint-expand { transform: rotate(180deg); }
.journey-checkpoint.completed .map-location { border-color: #62aa91; background: #f6fcf8; }
.journey-checkpoint.completed .checkpoint-marker { background: #d8f0e4; color: #176c4d; }
.journey-checkpoint.completed .checkpoint-status { background: #e1f5e9; color: #176c4d; }
.journey-checkpoint.available .map-location { border: 2px solid #d69b2c; background: #fffdf7; box-shadow: 0 0 0 5px rgba(255,207,92,.25), 0 8px 22px rgba(127,91,20,.12); }
.journey-checkpoint.available .checkpoint-marker { background: #ffedbd; color: #7a510d; }
.journey-checkpoint.available .checkpoint-status { background: #fff0ca; color: #704a0b; }
.journey-checkpoint.locked .checkpoint-marker, .journey-checkpoint.planned .checkpoint-marker { filter: grayscale(1); opacity: .68; }
.journey-checkpoint.locked .checkpoint-status { background: #edf0ef; color: #5b6c70; }
.journey-checkpoint.planned .map-location { border-style: dashed; }
.checkpoint-details {
  position: absolute; z-index: 5; top: calc(100% - 7px); left: 5px; right: 5px; padding: 12px;
  border: 1px solid #c7d8d3; border-radius: 11px; background: #fff;
  box-shadow: 0 12px 25px rgba(21,47,58,.17); color: var(--ink);
}
.checkpoint-details p { margin: 0 0 7px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.checkpoint-details dl { display: grid; gap: 6px; margin: 0; font-size: 10px; line-height: 1.4; }
.checkpoint-details dt { font-weight: 800; }
.checkpoint-details dd { margin: 1px 0 0; color: var(--muted); }
.journey-disclaimer { margin: 9px 2px 0; color: var(--muted); font-size: 11px; }
.medal-intro { align-items: center; }
.medal-section .achievement-summary { margin: 0 0 13px; color: var(--teal-dark); font-size: 13px; }
.achievement-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; }
.award-card { position: relative; min-width: 0; border: 1px solid #dbe4e2; border-radius: 13px; background: #fbfcfc; box-shadow: 0 4px 11px rgba(21,47,58,.04); }
.award-trigger {
  width: 100%; min-height: 100px; display: flex; align-items: center; gap: 10px; padding: 12px;
  border: 0; border-radius: inherit; background: transparent; color: var(--ink); text-align: left; cursor: pointer;
}
.award-icon {
  flex: none; display: grid; place-items: center; width: 49px; height: 49px; border: 2px solid #c4d1ce;
  border-radius: 50%; background: #edf1f0; color: #617176; font-size: 25px; filter: grayscale(.82);
}
.award-copy { display: block; min-width: 0; flex: 1; }
.award-status { display: block; margin-bottom: 3px; color: var(--muted); font-size: 9px; font-weight: 850; text-transform: uppercase; letter-spacing: .45px; }
.award-name { display: block; color: var(--ink); font-size: 12px; font-weight: 850; line-height: 1.25; }
.award-date { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.25; }
.award-caret { flex: none; align-self: flex-start; color: var(--muted); font-size: 13px; }
.award-card.earned { border-color: #e3cb87; background: linear-gradient(145deg,#fff9e7,#fff 76%); }
.award-card.earned .award-icon { border-color: #d3a52f; background: radial-gradient(circle,#fff5c9,#f0bf46); color: #694908; filter: none; box-shadow: 0 3px 9px rgba(164,116,17,.18); }
.award-card.earned:nth-child(3n+2) .award-icon { border-color: #98b7ba; background: radial-gradient(circle,#f5ffff,#a9ced0); color: #345e64; }
.award-card.earned:nth-child(3n) .award-icon { border-color: #c6865d; background: radial-gradient(circle,#fff5ee,#d99d72); color: #673c27; }
.award-card.earned .award-status { color: #77540d; }
.award-detail {
  display: none; padding: 0 12px 12px; color: #435b62; font-size: 11px; line-height: 1.45;
}
.award-detail p { margin: 0; }
.award-card:hover .award-detail, .award-card.detail-open .award-detail, .award-trigger:focus-visible + .award-detail { display: block; }
.award-card.detail-open { z-index: 3; box-shadow: 0 8px 18px rgba(21,47,58,.12); }
.award-card:hover .award-trigger, .award-card.detail-open .award-trigger { border-radius: 13px 13px 0 0; }
.achievement-celebration {
  position: fixed; z-index: 50; right: 20px; bottom: 20px; width: min(450px,calc(100vw - 32px));
  display: flex; align-items: center; gap: 13px; padding: 16px;
  border: 1px solid #dfc35e; border-radius: 16px;
  background: linear-gradient(135deg,#fff9df,#fff 68%); box-shadow: 0 16px 42px rgba(21,47,58,.25);
  animation: reward-pop .22s ease-out;
}
.celebration-mark { flex: none; width: 58px; height: 58px; border: 2px solid #d8ad3c; border-radius: 50%; background: radial-gradient(circle,#fff5c9,#edc65c); color: #604710; font-size: 33px; }
.celebration-copy { flex: 1; min-width: 0; }
.celebration-kicker { display: block; color: #7a5a12; font-size: 9px; font-weight: 850; letter-spacing: .6px; text-transform: uppercase; }
.celebration-copy strong { display: block; margin: 2px 0; color: var(--ink); font-size: 15px; }
.celebration-copy b { display: block; color: var(--teal-dark); font-size: 13px; }
.celebration-copy p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.achievement-celebration .button { min-height: 40px; padding: 8px 12px; }
@keyframes reward-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 900px) {
  .achievement-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .journey-map { gap: 38px 4%; }
  .map-location > summary { gap: 7px; padding: 10px; }
  .checkpoint-marker { width: 46px; height: 46px; border-radius: 14px; font-size: 26px; }
}
@media (max-width: 680px) {
  .journey-identity { align-items: flex-start; flex-wrap: wrap; gap: 9px; }
  .detective-badge { width: 46px; height: 46px; border-radius: 14px; font-size: 25px; }
  .detective-copy { padding-top: 2px; }
  .avatar-picker { flex: 0 0 100%; margin-left: 55px; }
  .avatar-picker select { max-width: none; width: 100%; }
  .avatar-note { margin-left: 0; }
  .journey-map-wrap { min-height: 0; padding: 10px; }
  .journey-route { display: none; }
  .journey-map {
    display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: none;
    grid-template-areas: "dock" "streak" "cove" "treasure" "lookout" "castle";
    gap: 9px; padding-left: 16px;
  }
  .journey-map::before {
    content: ""; position: absolute; z-index: -1; top: 25px; bottom: 25px; left: 30px;
    border-left: 4px dotted #9ebeb6;
  }
  .journey-map::after {
    content: ""; position: absolute; z-index: -1; top: 25px; left: 30px;
    height: var(--journey-progress,0%); border-left: 4px solid #087f78;
  }
  .journey-checkpoint:nth-child(1),.journey-checkpoint:nth-child(2),.journey-checkpoint:nth-child(3),
  .journey-checkpoint:nth-child(4),.journey-checkpoint:nth-child(5),.journey-checkpoint:nth-child(6) { grid-area: auto; }
  .map-location { min-height: 80px; }
  .map-location > summary { min-height: 78px; padding: 9px; }
  .checkpoint-marker { width: 46px; height: 46px; }
  .checkpoint-main h3 { margin-bottom: 4px; }
  .checkpoint-details { position: static; margin: 0 9px 10px 64px; padding: 9px; box-shadow: none; }
  .achievement-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .award-trigger { min-height: 88px; gap: 7px; padding: 8px; }
  .award-icon { width: 39px; height: 39px; font-size: 20px; }
  .award-name { font-size: 11px; }
  .award-detail { padding: 0 9px 10px; font-size: 10px; }
  .achievement-celebration { right: 10px; bottom: 10px; width: calc(100vw - 20px); gap: 9px; padding: 12px; }
  .celebration-mark { width: 45px; height: 45px; font-size: 26px; }
  .celebration-copy strong { font-size: 13px; }
  .achievement-celebration .button { min-height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .map-location:hover { transform: none; }
  .route-progress { transition: none; }
  .achievement-celebration { animation: none !important; }
}
/* MMD 2.0 journey, profile and medal collection */
.journey-map-wrap { position: relative; min-height: 430px; overflow: hidden; padding: 24px; border: 1px solid #cde8de; border-radius: 24px; background: radial-gradient(ellipse at 18% 15%,#f7ffdf 0 7%,transparent 7.5%),radial-gradient(ellipse at 80% 78%,#fff0c8 0 9%,transparent 9.5%),linear-gradient(145deg,#dff7f2,#b8e8ee); }
.island-shore { fill: #bde6a6; stroke: #8ccf93; stroke-width: 5; }
.island-shore-lower { fill: #d2eaa1; stroke: #a5d47f; }
.journey-route { inset: 0; width: 100%; height: 100%; opacity: .95; }
.route-future { fill: none; stroke: #fffdf0; stroke-width: 13; stroke-linecap: round; stroke-dasharray: 3 18; }
.route-progress { fill: none; stroke: #087f78; stroke-width: 9; stroke-linecap: round; stroke-dasharray: 0 1000; transition: stroke-dasharray .5s ease; }
.route-mobile { display: none; }
.journey-map { position: absolute; inset: 12px 20px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); grid-template-rows: 1fr 1fr; align-items: center; gap: 16px 5%; padding: 0; }
.journey-checkpoint:nth-child(4) { grid-column: 3; grid-row: 2; }
.journey-checkpoint:nth-child(5) { grid-column: 2; grid-row: 2; }
.journey-checkpoint:nth-child(6) { grid-column: 1; grid-row: 2; }
.map-location { border: 1px solid rgba(111,159,117,.4); border-radius: 18px; background: rgba(255,255,255,.94); box-shadow: 0 8px 20px rgba(25,89,78,.13); }
.journey-checkpoint.available .map-location { border: 2px solid #d99c32; box-shadow: 0 0 0 5px rgba(255,211,98,.28),0 8px 20px rgba(25,89,78,.14); }
.journey-checkpoint.earned-elsewhere .map-location { border-style: dashed; opacity: .86; }
.checkpoint-marker { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 16px; background: #e8f4c7; color: #4f7727; }
.journey-checkpoint.available .checkpoint-marker { background: #ffe8a8; }
.journey-checkpoint.completed .checkpoint-marker { background: #d5f2e6; }
.checkpoint-status { font-weight: 750; }
.journey-checkpoint.planned { opacity: .72; }
.journey-checkpoint.earned-elsewhere .checkpoint-status { color: #755b8a; }
.profile-layout { display: grid; grid-template-columns: minmax(210px,.75fr) minmax(0,2fr); gap: 24px; padding: 24px; }
.profile-avatar-column { display: grid; align-content: start; justify-items: center; text-align: center; }
.avatar-preview { --avatar-skin:#c9875d; --avatar-hair:#38251e; --avatar-jacket:#087f78; --avatar-bg:#dff4e8; display:grid; place-items:center; width: min(230px,100%); aspect-ratio:1; border:5px solid white; border-radius:28px; background:radial-gradient(circle at 75% 20%,#fff 0 5%,transparent 5.5%),var(--avatar-bg); box-shadow:0 10px 25px rgba(21,47,58,.14); }
.avatar-preview svg { width:82%; height:82%; }
.avatar-preview .avatar-skin { fill:var(--avatar-skin); }
.avatar-preview .avatar-hair { fill:var(--avatar-hair); }
.avatar-preview .avatar-coat { fill:var(--avatar-jacket); }
.avatar-preview .avatar-glass { fill:none; stroke:#173d4a; stroke-width:4; }
.profile-controls { display:grid; gap:16px; align-content:start; }
.avatar-controls { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.avatar-controls .field { margin:0; }
.profile-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.profile-stats article { display:grid; gap:4px; padding:12px; border:1px solid var(--line); border-radius:14px; background:#f7fbf9; }
.profile-stats span { color:var(--muted); font-size:12px; }
.profile-stats strong { color:var(--teal-dark); font-size:22px; }
.profile-class-field { max-width:260px; margin:0; }
.medal-tools { display:grid; grid-template-columns:minmax(220px,2fr) repeat(2,minmax(150px,1fr)); gap:14px; align-items:end; padding:16px; }
.medal-tools .field { margin:0; }
.achievement-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.award-card { min-width:0; border-radius:18px; overflow:hidden; background:rgba(255,255,255,.96); transition:transform .18s ease,box-shadow .18s ease; }
.award-card:hover { transform:translateY(-2px); box-shadow:0 12px 25px rgba(21,47,58,.12); }
.award-trigger { width:100%; min-height:120px; border:0; background:transparent; text-align:left; }
.award-icon { width:58px; height:58px; border-width:3px; box-shadow:inset 0 0 0 4px rgba(255,255,255,.42),0 4px 8px rgba(0,0,0,.12); }
.award-card.locked .award-icon { filter:grayscale(.7); opacity:.75; }
.award-card.earned { border-color:#e2c36b; background:linear-gradient(150deg,#fffbed,#fff); }
.award-detail { display:none !important; }
.medal-pagination { display:flex; justify-content:center; align-items:center; gap:14px; margin-top:18px; }
.medal-collection-progress { display:block; width:100%; height:12px; margin:0 0 18px; overflow:hidden; border:0; border-radius:999px; appearance:none; background:#e4ece8; }
.medal-collection-progress::-webkit-progress-bar { border-radius:999px; background:#e4ece8; }
.medal-collection-progress::-webkit-progress-value { border-radius:999px; background:linear-gradient(90deg,#087f78,#efbd45); transition:width .25s ease; }
.medal-collection-progress::-moz-progress-bar { border-radius:999px; background:linear-gradient(90deg,#087f78,#efbd45); }
.medal-pagination span { min-width:125px; text-align:center; color:var(--muted); font-weight:700; }
.medal-dialog { width:min(480px,calc(100vw - 28px)); max-width:none; padding:0; border:1px solid #dce7df; border-radius:24px; color:var(--ink); box-shadow:0 24px 90px rgba(12,39,48,.3); }
.medal-dialog::backdrop { background:rgba(15,37,48,.58); backdrop-filter:blur(3px); }
.medal-dialog-content { position:relative; display:grid; justify-items:center; gap:10px; padding:32px; text-align:center; }
.dialog-close { position:absolute; top:12px; right:14px; width:40px; height:40px; border:0; border-radius:50%; background:#eff5f2; color:var(--ink); font-size:26px; cursor:pointer; }
.dialog-medal-icon { display:grid; place-items:center; width:92px; height:92px; border:4px solid #e0bd54; border-radius:50%; background:radial-gradient(circle,#fff5c8,#efc655); font-size:48px; box-shadow:0 8px 20px rgba(141,103,18,.18); }
.medal-dialog-content h2,.medal-dialog-content p { margin:0; }
.dialog-medal-status { color:var(--teal-dark); font-weight:800; }
.dialog-requirement { display:grid; gap:4px; width:100%; margin:8px 0 !important; padding:14px; border-radius:14px; background:#f4f8f6; text-align:left; }
.dialog-medal-progress { color:var(--muted); font-size:14px; }
.leaderboard-podium { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; align-items:end; margin-bottom:16px; }
.podium-card { display:grid; justify-items:center; gap:5px; min-height:126px; padding:16px 10px; border:1px solid #dde7e5; border-radius:18px 18px 10px 10px; background:linear-gradient(#fff,#f4f9f7); text-align:center; }
.podium-card.rank-1 { min-height:156px; border-color:#dfbd57; background:linear-gradient(#fff9de,#fff); }
.podium-card.rank-2 { border-color:#b5c7c9; }
.podium-card.rank-3 { border-color:#d3a17c; }
.podium-avatar { display:grid; place-items:center; width:46px; height:46px; border:2px solid currentColor; border-radius:50%; background:#eaf5ef; font-size:25px; }
.podium-rank { font-size:12px; font-weight:850; text-transform:uppercase; }
.podium-name { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:750; }
.podium-score { color:var(--teal-dark); font-weight:850; }
.leaderboard-list { display:grid; gap:8px; }
.score-row { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:12px 14px; border:1px solid var(--line); border-radius:13px; background:white; }
.profile-section,.medal-section { scroll-margin-top:90px; }
@media (max-width:900px) { .achievement-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } .journey-map-wrap { min-height:430px; } }
@media (max-width:680px) {
  .profile-layout { grid-template-columns:1fr; padding:16px; }
  .avatar-preview { width:min(180px,70vw); }
  .avatar-controls { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .profile-stats { gap:7px; }
  .profile-stats article { padding:9px; }
  .medal-tools { grid-template-columns:1fr 1fr; }
  .medal-search-field { grid-column:1/-1; }
  .achievement-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .award-trigger { min-height:102px; }
  .award-icon { width:48px; height:48px; }
  .journey-map-wrap { min-height:650px; padding:14px; }
  .journey-route { display:block; }
  .route-desktop { display:none; }
  .route-mobile { display:block; }
  .journey-route { width:100%; height:100%; }
  .journey-map { inset:12px 16px; grid-template-columns:1fr; grid-template-rows:repeat(6,1fr); gap:3px; padding:0 0 0 28px; }
  .journey-checkpoint:nth-child(n) { grid-column:1; grid-row:auto; }
  .journey-checkpoint:nth-child(even) { margin-left:18%; }
  .journey-checkpoint:nth-child(odd) { margin-right:18%; }
  .journey-checkpoint .map-location > summary { min-height:70px; }
  .medal-pagination { gap:7px; }
  .medal-pagination .button { padding:9px 10px; font-size:12px; }
  .leaderboard-podium { gap:6px; }
  .podium-card { padding:12px 5px; }
  .podium-name { font-size:12px; }
}
@media (prefers-reduced-motion: reduce) {
  .award-card:hover { transform:none; }
  .route-progress,.award-card { transition:none; }
  .medal-dialog::backdrop { backdrop-filter:none; }
}
/* Keep the primary section active state consistent with all other navigation links. */
.main-nav .nav-cta:not([aria-current="location"]) { background: transparent; color: #3e5862; }
.main-nav .nav-cta:not([aria-current="location"]):hover { background: #edf5f3; color: var(--teal-dark); }




/* Achievement Hall */
.ladder-overview { display:grid; grid-template-columns:minmax(230px,.8fr) minmax(0,1.2fr); gap:20px; align-items:center; margin:14px 0; padding:20px; border:1px solid #c8dfd8; border-radius:18px; background:linear-gradient(135deg,#f2fbf8,#fff9e8); }
.ladder-overview-main,.ladder-question-stats { display:grid; gap:9px; }
.ladder-overview-main>strong { color:var(--teal-dark); font-size:19px; }
.ladder-question-stats strong { color:#24464c; font-size:14px; }
.ladder-question-stats span,.ladder-question-stats small,.ladder-question-stats p { color:var(--muted); font-size:11px; line-height:1.5; }
.ladder-question-stats p { margin:0; }
.ladder-overview progress { width:100%; height:11px; accent-color:#198879; }
.next-milestone { color:#77551b; font-size:12px; font-weight:750; }
.medal-tools { display:grid; grid-template-columns:minmax(220px,1.5fr) repeat(2,minmax(160px,1fr)); align-items:end; gap:12px; margin:14px 0; }
.achievement-sections { display:grid; gap:12px; }
.achievement-band { border:1px solid #d6e2de; border-radius:16px; background:#fff; overflow:hidden; }
.achievement-band>summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:15px 18px; cursor:pointer; list-style:none; background:linear-gradient(100deg,#f0f7f4,#fbf5e9); }
.achievement-band>summary::-webkit-details-marker { display:none; }
.achievement-band>summary:focus-visible { outline:3px solid #1f7c76; outline-offset:-3px; }
.achievement-band>summary strong { display:block; color:#174a4d; font-size:16px; }
.achievement-band>summary small { display:block; margin-top:2px; color:var(--muted); font-size:11px; }
.band-count { flex:none; padding:6px 10px; border-radius:99px; background:#fff; color:#52696b; font-size:11px; font-weight:750; }
.achievement-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; padding:14px; }
.award-card { min-width:0; min-height:178px; border:1px solid #d9e1de; border-radius:15px; background:#fbfdfc; transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease; }
.award-card.earned { border-color:#d6b960; background:linear-gradient(160deg,#fffdf6,#f6fff9); box-shadow:0 4px 12px #9e87421a; }
.award-card.planned { background:#faf8ff; }
.award-card.available { border-color:#a6d6c5; }
.award-card:hover { transform:translateY(-2px); box-shadow:0 8px 18px #31535218; }
.award-trigger { display:flex; width:100%; height:100%; min-height:176px; align-items:center; flex-direction:column; justify-content:flex-start; gap:6px; padding:10px 8px; border:0; border-radius:inherit; background:transparent; color:inherit; text-align:center; cursor:pointer; }
.award-trigger:focus-visible { outline:3px solid #127c73; outline-offset:2px; }
.award-icon { display:grid; width:92px; height:104px; place-items:center; }
.medal-art { display:block; width:84px; height:96px; overflow:visible; filter:saturate(.9); }
.medal-art.is-earned { filter:drop-shadow(0 4px 3px #61482627); }
.medal-art.is-locked { filter:grayscale(.72) saturate(.55); opacity:.76; }
.award-copy { display:grid; min-width:0; gap:3px; justify-items:center; }
.award-status { color:#56676b; font-size:10px; font-weight:750; }
.award-card.earned .award-status { color:#7a5d14; }
.award-name { color:#213b40; font-size:12px; font-weight:800; line-height:1.3; }
.award-progress,.award-date { color:#6d7d7e; font-size:10px; }
.dialog-medal-icon { display:grid; width:136px; height:150px; place-items:center; margin:0 auto 8px; }
.dialog-medal-icon .medal-art { width:126px; height:142px; }
.achievement-celebration { align-items:center; gap:14px; padding:16px; border:1px solid #e7cc76; border-radius:17px; background:linear-gradient(120deg,#fffdf1,#effbf6); box-shadow:0 12px 36px #233a3724; }
.celebration-mark { display:grid; width:86px; height:96px; place-items:center; flex:none; background:transparent; color:inherit; }
.celebration-mark .medal-art { width:82px; height:94px; }
@media (max-width:1080px) { .achievement-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media (max-width:760px) { .ladder-overview { grid-template-columns:1fr; gap:14px; padding:15px; } .medal-tools { grid-template-columns:1fr 1fr; } .medal-search-field { grid-column:1/-1; } .achievement-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; } }
@media (max-width:560px) { .medal-tools { grid-template-columns:1fr; } .medal-search-field { grid-column:auto; } .achievement-band>summary { align-items:flex-start; padding:12px; } .achievement-band>summary strong { font-size:14px; } .band-count { font-size:10px; } .achievement-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:9px; } .award-card { min-height:162px; } .award-trigger { min-height:160px; } .award-icon { width:78px; height:91px; } .medal-art { width:73px; height:86px; } .award-name { font-size:12px; } .dialog-medal-icon { width:116px; height:130px; } .dialog-medal-icon .medal-art { width:108px; height:122px; } }
@media (prefers-reduced-motion:reduce) { .award-card { transition:none; } .award-card:hover { transform:none; } }


/* Student profile and single-choice avatar gallery */
.profile-privacy-note,.profile-storage-note { margin:8px 0 14px; color:var(--muted); font-size:12px; line-height:1.55; }
.profile-layout { display:grid; grid-template-columns:minmax(230px,.72fr) minmax(0,1.28fr); align-items:start; gap:22px; padding:20px; }
.profile-preview-card { display:grid; justify-items:center; align-content:start; gap:10px; min-width:0; padding:20px 16px; border:1px solid #d6e8e1; border-radius:18px; background:linear-gradient(155deg,#eefaf6,#fff6df); text-align:center; }
.profile-preview-card>.eyebrow { color:var(--teal-dark); }
.profile-preview-card h3 { margin:0; color:#20474b; font-size:22px; overflow-wrap:anywhere; }
.profile-preview-card>p { margin:0; color:var(--muted); font-weight:700; }
.profile-preview-card .profile-stats { width:100%; margin-top:8px; }
.profile-preview-card .profile-stats article { min-width:0; }
.profile-preview-card .profile-stats span { font-size:10px; }
.profile-preview-card .profile-stats strong { font-size:17px; }
.avatar-preview { display:grid; width:min(100%,210px); aspect-ratio:1; place-items:center; overflow:hidden; border:5px solid #fff; border-radius:50%; background:#e8f5f0; box-shadow:0 8px 22px #284c3d1c; }
.student-avatar-art { display:block; width:100%; height:100%; object-fit:contain; }
.avatar-fallback { display:grid; place-items:center; font-size:56px; }
.profile-controls { display:grid; min-width:0; gap:14px; }
.profile-required-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.profile-required-fields .field { margin:0; }
.avatar-fieldset { min-width:0; margin:0; padding:0; border:0; }
.avatar-fieldset legend { margin-bottom:3px; color:#25474b; font-size:14px; font-weight:800; }
.avatar-fieldset .field-note { margin:0 0 10px; }
.avatar-gallery { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:9px; }
.avatar-option { position:relative; display:block; width:100%; min-width:0; aspect-ratio:1; overflow:hidden; padding:3px; border:2px solid #d9e5e1; border-radius:17px; background:#fff; cursor:pointer; touch-action:manipulation; transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease; }
.avatar-option:hover { transform:translateY(-2px); border-color:#7ebdaf; box-shadow:0 5px 14px #2556491c; }
.avatar-option:focus-visible { outline:3px solid #155f5a; outline-offset:2px; }
.avatar-option[aria-checked="true"],.avatar-option.selected { border-color:#087f78; box-shadow:0 0 0 3px #087f7833,0 6px 16px #2556491c; }
.avatar-option img { display:block; width:100%; height:100%; border-radius:12px; object-fit:contain; background:#fbfdfc; }
.avatar-selected-check { position:absolute; right:5px; bottom:5px; display:grid; width:23px; height:23px; place-items:center; border:2px solid #fff; border-radius:50%; background:#087f78; color:white; font-size:14px; font-weight:900; opacity:0; transform:scale(.7); transition:opacity .15s ease,transform .15s ease; }
.avatar-option[aria-checked="true"] .avatar-selected-check { opacity:1; transform:scale(1); }
.profile-message { min-height:1.4em; margin:0; color:#536b69; font-size:12px; line-height:1.5; }
.profile-message.profile-error { color:#9a3e36; font-weight:700; }
.profile-message.profile-success { color:#176e58; font-weight:700; }
.profile-save-button { justify-self:start; min-width:190px; }
.profile-save-button:disabled { cursor:not-allowed; opacity:.55; box-shadow:none; transform:none; }
.profile-storage-note { margin:0; }
.journey-profile-tag { margin-left:auto; padding:7px 11px; border-radius:99px; background:#eff7f4; color:#326760; font-size:11px; font-weight:750; }
.detective-badge img { width:100%; height:100%; object-fit:contain; border-radius:50%; }
.podium-avatar-art,.score-avatar-art { display:inline-block; flex:none; width:50px; height:50px; object-fit:contain; border:2px solid #c5e5dc; border-radius:50%; background:#fff; vertical-align:middle; }
.score-avatar-art { width:36px; height:36px; margin-right:8px; }
.score-row>span { display:flex; align-items:center; }
@media (max-width:900px) {
 .profile-layout { grid-template-columns:1fr; }
 .profile-preview-card { grid-template-columns:auto 1fr; justify-items:start; text-align:left; align-items:center; }
 .profile-preview-card>.eyebrow { grid-column:1/-1; }
 .profile-preview-card .avatar-preview { grid-column:1; grid-row:2/span 3; width:130px; }
 .profile-preview-card .profile-stats { grid-column:1/-1; }
}
@media (max-width:600px) {
 .profile-layout { padding:13px; gap:16px; }
 .profile-preview-card { padding:14px 12px; }
 .profile-preview-card .avatar-preview { width:104px; }
 .profile-required-fields { grid-template-columns:1fr; gap:10px; }
 .avatar-gallery { grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
 .avatar-option { border-radius:14px; }
 .avatar-option img { border-radius:10px; }
 .profile-save-button { width:100%; }
 .journey-profile-tag { display:none; }
 .podium-avatar-art { width:40px; height:40px; }
}
@media (prefers-reduced-motion:reduce) {
 .avatar-option,.avatar-selected-check { transition:none; }
 .avatar-option:hover { transform:none; }
}
