:root {
  color-scheme: light;
  --navy: #07183f;
  --ink: #102856;
  --muted: #58709a;
  --paper: #effaff;
  --surface: #ffffff;
  --line: #d3e6f3;
  --blue: #1976ef;
  --blue-deep: #0f59bd;
  --blue-pale: #e7f3ff;
  --green: #23bf70;
  --green-deep: #13884c;
  --gold: #ffb414;
  --gold-pale: #fff5d5;
  --pink: #d15372;
  --pink-pale: #fff0f3;
  font-family: "Trebuchet MS", "Aptos", sans-serif;
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; background: var(--paper); }
button, input, textarea { font: inherit; }
button { min-height: 44px; padding: 10px 15px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); cursor: pointer; font-weight: 800; }
button:hover:not(:disabled) { background: var(--blue-pale); }
button:disabled { cursor: wait; opacity: .6; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
a { color: inherit; text-underline-offset: 4px; }
input, textarea { width: 100%; min-width: 0; min-height: 50px; padding: 11px 13px; border: 2px solid #bfd9ed; border-radius: 7px; background: #fff; color: var(--navy); font-size: 17px; }
textarea { resize: vertical; line-height: 1.4; }
input:focus, textarea:focus { border-color: var(--blue); outline: 3px solid #c7e5ff; }
label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 800; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.app { width: min(100%, 1320px); min-height: 100vh; margin: 0 auto; padding: 0 28px 34px; }
.top { display: flex; align-items: center; min-height: 84px; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--navy); text-decoration: none; font-size: 28px; font-weight: 900; }
.brand-mountain, .auth-mountain { width: 48px; height: 42px; object-fit: contain; }
.brand-mountain { filter: invert(47%) sepia(31%) saturate(1051%) hue-rotate(119deg) brightness(89%) contrast(91%); }
.desktop-nav { display: flex; align-items: center; gap: 6px; margin: 0 auto; }
.desktop-nav button { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; border: 0; background: transparent; color: var(--muted); }
.desktop-nav button img, .icon-button img, .sidebar-heading img, .mobile-nav img { width: 21px; height: 21px; object-fit: contain; }
.desktop-nav img[src$="trophy.svg"], .sidebar-heading img[src$="trophy.svg"], .mobile-nav img[src$="trophy.svg"] { filter: invert(72%) sepia(90%) saturate(678%) hue-rotate(350deg) brightness(103%) contrast(101%); }
.desktop-nav button[aria-pressed="true"] { background: var(--blue-pale); color: var(--blue); }
.account { display: flex; align-items: center; gap: 8px; min-width: 0; margin-left: auto; }
.nickname { max-width: 18ch; overflow: hidden; color: var(--navy); text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 800; }
.icon-button { display: grid; width: 42px; min-height: 42px; place-items: center; padding: 0; }

.auth-view { width: min(100%, 760px); margin: 0 auto; padding: 90px 0 54px; display: grid; grid-template-columns: 1fr minmax(300px, 360px); align-items: center; gap: 76px; }
.auth-intro h1, h1, h2 { margin: 0; color: var(--navy); font-family: "Trebuchet MS", "Aptos", sans-serif; font-weight: 900; }
.auth-intro h1, h1 { font-size: 40px; line-height: 1.06; }
.auth-mountain { width: 78px; height: 68px; margin-bottom: 20px; }
.auth-box { padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 14px 34px rgba(38, 103, 150, .12); }
.segment { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: -4px -4px 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.segment button { min-height: 38px; padding: 8px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; color: var(--muted); }
.segment button[aria-selected="true"] { border-bottom-color: var(--blue); color: var(--blue); }
.form-stack { display: grid; gap: 7px; }.form-stack label:not(:first-child) { margin-top: 8px; }
.form-message { min-height: 21px; margin: 4px 0; color: var(--pink); font-size: 14px; line-height: 1.4; }
.primary { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: 0 4px 0 var(--blue-deep); }
.primary:hover:not(:disabled) { background: #1065d7; }
.wide { width: 100%; }
.eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 900; letter-spacing: 0; }

.practice-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; padding-top: 26px; }
.practice-main { min-width: 0; }
.journey-hero { position: relative; min-height: 278px; overflow: hidden; border-radius: 8px; background: #dff3ff; isolation: isolate; }
.journey-copy { position: relative; z-index: 2; width: min(60%, 560px); padding: 34px; }
.journey-copy h1 { max-width: 17ch; overflow-wrap: anywhere; font-size: 38px; }
.journey-progress { margin: 13px 0 18px; color: #45628f; font-size: 17px; line-height: 1.35; }
.journey-meter { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; color: var(--navy); font-size: 15px; }
.journey-art { position: absolute; z-index: 1; inset: 0 0 0 auto; width: 66%; height: 100%; object-fit: cover; object-position: right top; }
.journey-hero::after { display: none; }
progress { display: block; width: 100%; height: 12px; overflow: hidden; border: 0; border-radius: 99px; background: #c8dced; }
progress::-webkit-progress-bar { background: #c8dced; } progress::-webkit-progress-value { background: var(--green); } progress::-moz-progress-bar { background: var(--green); }
.status-screen { padding: 62px 18px; text-align: center; }.status-screen h2 { font-size: 28px; }.status-screen p, .muted { color: var(--muted); font-size: 14px; line-height: 1.55; }
.question { width: min(100%, 760px); margin: -12px auto 0; padding: 26px 34px; position: relative; border: 1px solid #e1edf6; border-radius: 8px; background: #fff; box-shadow: 0 16px 34px rgba(31, 97, 147, .13); text-align: center; }
.mode-label { display: inline-block; margin: 0 0 17px; padding: 6px 10px; border-radius: 99px; background: var(--blue-pale); color: var(--blue); font-size: 12px; font-weight: 900; }
#word { margin: 16px 0 26px; overflow-wrap: anywhere; font-size: 44px; line-height: 1.12; }
.answer-form { width: min(100%, 530px); margin: 0 auto; text-align: left; }.answer-form .form-message, .round-message { text-align: center; }
.text-button { min-height: 36px; margin-top: 11px; border: 0; background: transparent; color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.correction { width: min(100%, 530px); margin: 20px auto 0; padding-top: 19px; border-top: 1px solid var(--line); text-align: left; }
.score-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }.score-line strong { color: var(--blue); font-size: 24px; }.score-line span { color: var(--muted); font-size: 13px; text-align: right; }
.typed-label { margin: 13px 0 5px; color: var(--muted); font-size: 12px; font-weight: 900; }.annotated, .expected { min-height: 30px; margin: 0; padding: 10px 12px; overflow-wrap: anywhere; border-radius: 5px; font-size: 17px; }.annotated { border: 1px solid var(--line); background: #f8fcff; }.expected { border: 1px solid #f1cf70; background: var(--gold-pale); }.annotated .error { background: #f8cbd5; color: #712239; text-decoration: underline 2px; }.annotated .case { background: #cdeaff; color: #125176; text-decoration: underline 2px; }.annotated .error-case { background: #f8cbd5; color: #712239; text-decoration: underline 2px var(--blue); }.annotated .missing { display: inline-block; padding: 1px 4px; margin: 0 2px; border-bottom: 2px solid var(--gold); background: #ffe29a; color: #70500a; font-size: 16px; font-weight: 900; line-height: 1; }
.deductions { display: grid; gap: 6px; padding: 0; margin: 16px 0 8px; list-style: none; }.deduction { position: relative; padding-left: 17px; color: var(--muted); font-size: 13px; line-height: 1.4; }.deduction::before { position: absolute; left: 0; content: "•"; color: var(--pink); }.deduction.case::before { color: var(--blue); }.deduction.skip::before, .deduction.wrong::before { color: var(--gold); }

.dashboard-sidebar { display: grid; gap: 18px; position: sticky; top: 16px; }.sidebar-section { padding: 20px; border: 1px solid #d9eaf5; border-radius: 8px; background: rgba(255,255,255,.94); box-shadow: 0 10px 24px rgba(31, 97, 147, .08); }.sidebar-heading { display: flex; align-items: center; gap: 9px; }.sidebar-heading h2 { margin: 0; font-size: 21px; }.sidebar-heading img { width: 24px; height: 24px; }.sidebar-link { min-height: 32px; margin-left: auto; padding: 4px 0; border: 0; background: transparent; color: var(--blue); font-size: 13px; }.sidebar-message { min-height: 19px; margin: 13px 0 4px; color: var(--muted); font-size: 13px; }.sidebar-rank-list { padding: 0; margin: 4px 0 0; list-style: none; }.sidebar-rank-list li { display: grid; grid-template-columns: 25px minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 42px; border-top: 1px solid var(--line); font-size: 14px; }.sidebar-rank-list li:first-child { color: var(--navy); }.sidebar-rank-list li span:first-child { color: var(--muted); font-weight: 900; }.sidebar-rank-list strong { overflow-wrap: anywhere; }.sidebar-rank-list span:last-child { color: var(--muted); font-size: 12px; font-weight: 800; white-space: nowrap; }.sidebar-badges { display: flex; flex-wrap: wrap; gap: 7px; }.sidebar-badge { padding: 7px 9px; border: 1px solid #f2cf72; border-radius: 99px; background: var(--gold-pale); color: #735408; font-size: 12px; font-weight: 900; }.sidebar-empty { color: var(--muted); font-size: 13px; line-height: 1.4; }

.result { max-width: 720px; margin: 18px auto; padding: 24px 0; text-align: center; }.medal-art { display: block; width: 108px; height: 108px; margin: 0 auto 10px; object-fit: contain; }.result > p:not(.eyebrow) { color: var(--muted); line-height: 1.5; }.result-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 24px 0; padding: 18px 0; border-block: 1px solid var(--line); }.result-stats strong { display: block; color: var(--navy); font-size: 25px; }.result-stats span { color: var(--muted); font-size: 12px; }.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.ranking-heading, .progress-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 30px; }.ranking-heading h2, .progress-heading h2 { font-size: 31px; }.ranking-actions { display: flex; gap: 8px; align-items: center; }.rank-list, .history { padding: 0; margin: 23px 0; list-style: none; }.rank-list li { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 60px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fff; }.rank-list li:first-child { border-top: 3px solid var(--gold); background: var(--gold-pale); }.place { color: var(--muted); font-size: 20px; font-weight: 900; }.rank-list strong { overflow-wrap: anywhere; }.points { color: var(--muted); font-size: 13px; font-weight: 900; white-space: nowrap; }.total-points { color: var(--blue); font-size: 22px; }.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 8px; }.badge { padding: 8px 10px; border: 1px solid #f1cf70; border-radius: 99px; background: var(--gold-pale); color: #735408; font-size: 13px; font-weight: 900; }.history li { display: flex; justify-content: space-between; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); }.history span { color: var(--muted); font-size: 13px; text-align: right; }
footer { display: flex; justify-content: space-between; margin-top: 38px; padding: 20px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
#confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; } #confetti i { position: absolute; left: 50%; bottom: 38%; width: 8px; height: 13px; background: var(--color); animation: burst .85s ease-out forwards; } @keyframes burst { from { transform: translate(0,0) rotate(0); opacity: 1; } to { transform: translate(var(--x),var(--y)) rotate(220deg); opacity: 0; } }
.mobile-nav { display: none; }

@media (max-width: 980px) { .app { padding-inline: 20px; }.desktop-nav { gap: 0; }.desktop-nav button { padding-inline: 10px; }.practice-grid { grid-template-columns: minmax(0,1fr) 300px; }.journey-copy { width: 67%; } }
@media (max-width: 760px) { body { padding-bottom: 84px; }.app { padding: 0 0 18px; }.top { min-height: 70px; padding: 0 18px; }.brand { font-size: 25px; }.brand-mountain { width: 39px; height: 35px; }.desktop-nav { display: none; }.account { margin-left: auto; }.nickname { max-width: 14ch; }.practice-grid { display: block; padding-top: 0; }.journey-hero { min-height: 236px; border-radius: 0; }.journey-copy { width: 73%; padding: 28px 18px; }.journey-copy h1 { font-size: 32px; }.journey-progress { max-width: 18ch; margin: 10px 0 15px; font-size: 15px; }.journey-art { width: 78%; }.journey-hero::after { background: linear-gradient(90deg, #dff3ff 4%, rgba(223,243,255,.82) 45%, rgba(223,243,255,.08) 82%); }.question { width: calc(100% - 28px); margin: -8px auto 0; padding: 28px 18px; }.mode-label { margin-bottom: 13px; } #word { font-size: 34px; }.dashboard-sidebar { gap: 0; position: static; margin: 22px 14px 0; border: 1px solid #d9eaf5; border-radius: 8px; background: #fff; box-shadow: 0 10px 24px rgba(31,97,147,.08); }.sidebar-section { padding: 18px; border: 0; border-radius: 0; box-shadow: none; }.sidebar-section + .sidebar-section { border-top: 1px solid var(--line); }.result { padding-inline: 18px; }.ranking-heading, .progress-heading { padding: 24px 18px 0; }.ranking-heading h2, .progress-heading h2 { font-size: 28px; }.rankingView, #rankingView, #progressView { padding-inline: 18px; }.rank-list, .history, #rankStatus, #rankingNote, #progressStatus, .badges { margin-inline: 18px; }.mobile-nav { position: fixed; z-index: 12; inset: auto 0 0; display: grid; grid-template-columns: repeat(3,1fr); min-height: 70px; padding: 6px 12px max(6px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); box-shadow: 0 -7px 20px rgba(31,97,147,.08); }.mobile-nav button { display: grid; min-height: 54px; place-items: center; gap: 2px; padding: 4px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 11px; }.mobile-nav button img { width: 22px; height: 22px; }.mobile-nav button[aria-pressed="true"] { background: var(--blue-pale); color: var(--blue); }.mobile-nav button[aria-pressed="true"] img { filter: invert(41%) sepia(92%) saturate(2184%) hue-rotate(203deg) brightness(96%) contrast(95%); } footer { margin: 24px 18px 0; }.auth-view { display: grid; grid-template-columns: 1fr; gap: 32px; padding: 54px 20px; }.auth-intro h1 { font-size: 36px; }.auth-box { box-shadow: none; } }
@media (max-width: 390px) { .top { flex-wrap: wrap; align-content: center; gap: 4px; min-height: 96px; padding-block: 9px; }.account { margin-left: auto; }.nickname { max-width: 20ch; }.journey-copy { width: 79%; }.journey-copy h1 { font-size: 30px; }.journey-art { width: 82%; }.result-stats { gap: 4px; }.result-stats strong { font-size: 21px; }.points { font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; scroll-behavior:auto !important; transition-duration:.01ms !important; } #confetti { display:none; } }

/* Shared tokens used by the separately authored admin shell. */
.brand-mark { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 7px; background: var(--blue); color: #fff; font-size: 20px; font-weight: 900; }
.gold { border-color: #e6c563; background: var(--gold-pale); color: #745311; }
.remove svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }

.form-message:empty { display: none; }
.answer-form .primary { margin-top: 14px; }
.journey-hero .journey-art { width: 100%; }
.sidebar-message:empty { display: none; }
.sidebar-badges { align-items: center; }
.sidebar-badge-art { width: 56px; height: 56px; flex: 0 0 auto; object-fit: contain; }

/* The first visit opens onto the same real mountain journey, with one focused sign-in tool. */
body:has(#authView:not([hidden])) { background: #dff3ff; }
.app:has(#authView:not([hidden])) { width: 100%; max-width: none; padding: 0; }
.auth-view { position: relative; min-height: 100svh; width: 100%; margin: 0; padding: 96px 24px 64px; display: grid; grid-template-columns: minmax(0, 380px); justify-content: center; align-content: center; gap: 0; background: #dff3ff url("/glosor/assets/mountain-journey.png") center center / cover no-repeat; isolation: isolate; }
.auth-intro { position: absolute; top: 28px; left: max(24px, calc((100% - 1320px) / 2 + 28px)); display: flex; align-items: center; gap: 10px; color: var(--navy); }
.auth-intro .auth-mountain { width: 45px; height: 40px; margin: 0; filter: invert(47%) sepia(31%) saturate(1051%) hue-rotate(119deg) brightness(89%) contrast(91%); }
.auth-intro .eyebrow { display: none; }
.auth-intro h1 { font-size: 28px; }
.auth-box { position: relative; width: 100%; padding: 24px; background: rgba(255, 255, 255, .96); }

@media (max-width: 760px) {
  body { padding-bottom: 0; }
  body:has(#mobileNav:not([hidden])) { padding-bottom: 84px; }
  .auth-view { min-height: 100svh; padding: 104px 20px 40px; align-content: center; background-position: 61% center; }
  .auth-intro { top: 22px; left: 20px; }
  .auth-intro h1 { font-size: 25px; }
}
