:root {
  --ink: #17344a;
  --muted: #6d8491;
  --paper: #ffffff;
  --foam: #effaf9;
  --line: #dceceb;
  --teal: #0b7285;
  --teal-dark: #075d70;
  --cyan: #4cc9d5;
  --coral: #f2776b;
  --yellow: #f8c75a;
  --green: #42b883;
  --shadow: 0 24px 70px rgba(18, 72, 91, 0.12);
}

* { box-sizing: border-box; }
html { min-height: 100%; overflow-x: hidden; background: #effaf9; }
body { margin: 0; min-width: 320px; min-height: 100vh; overflow-x: hidden; color: var(--ink); font-family: Tahoma, Arial, sans-serif; background: radial-gradient(circle at 12% 10%, rgba(76,201,213,.12), transparent 28%), linear-gradient(145deg, #effaf9 0%, #f6fbf7 52%, #fffaf2 100%); }
button, a { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(242,119,107,.55); outline-offset: 3px; }
[hidden] { display: none !important; }

.ambient { position: fixed; z-index: 0; pointer-events: none; border-radius: 50%; filter: blur(1px); opacity: .7; }
.ambient-one { width: 260px; height: 260px; top: -100px; right: -80px; background: rgba(76,201,213,.13); }
.ambient-two { width: 210px; height: 210px; bottom: -90px; left: -70px; background: rgba(248,199,90,.14); }
.app-shell { position: relative; z-index: 1; width: min(calc(100% - 32px), 1080px); max-width: 100%; min-width: 0; margin: 0 auto; padding: 26px 0 18px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.brand { display: inline-flex; gap: 11px; align-items: center; color: var(--ink); text-decoration: none; }
.brand-mark { position: relative; display: grid; place-items: center; width: 43px; height: 43px; overflow: hidden; border-radius: 14px 14px 14px 4px; background: linear-gradient(145deg, var(--teal), #48c6ce); box-shadow: 0 8px 18px rgba(11,114,133,.2); transform: rotate(-4deg); }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; width: 54px; height: 20px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); transform: rotate(-12deg); }
.brand-mark::before { top: 10px; right: -16px; }
.brand-mark::after { top: 18px; left: -17px; opacity: .55; }
.brand-mark span { width: 7px; height: 7px; border-radius: 50%; background: white; box-shadow: 9px -5px 0 rgba(255,255,255,.7); }
.brand-copy { display: grid; gap: 3px; }
.brand-copy strong { font-size: 15px; letter-spacing: -.3px; }
.brand-copy small { color: var(--muted); font-size: 11px; }
.class-pill { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; color: var(--teal-dark); background: rgba(255,255,255,.75); border: 1px solid rgba(11,114,133,.1); border-radius: 999px; font-size: 12px; font-weight: 700; }
.dot, .topic-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px rgba(242,119,107,.14); }

.screen { animation: rise-in .45s ease both; }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.hero-panel { display: flex; align-items: stretch; min-height: 430px; overflow: hidden; border-radius: 30px; background: linear-gradient(122deg, #e4f8f6 0%, #f2fcf8 58%, #fff8e9 100%); box-shadow: var(--shadow); }
.hero-copy { position: relative; z-index: 2; display: flex; flex: 1.08; min-width: 0; flex-direction: column; align-items: flex-start; justify-content: center; padding: 54px clamp(28px, 6vw, 76px); }
.eyebrow { margin: 0 0 14px; color: var(--coral); font-size: 12px; font-weight: 800; letter-spacing: .8px; }
h1, h2, p { margin-top: 0; }
.hero-copy h1 { margin-bottom: 18px; font-size: clamp(31px, 5vw, 58px); line-height: 1.18; letter-spacing: -1.8px; }
.hero-copy h1 em { color: var(--teal); font-style: normal; }
.hero-lede { max-width: 430px; margin-bottom: 26px; color: #58717a; font-size: 15px; line-height: 1.9; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 20px; min-height: 52px; padding: 0 20px 0 17px; border: 0; border-radius: 16px 16px 16px 5px; color: white; background: var(--teal); box-shadow: 0 12px 22px rgba(11,114,133,.2); font-size: 14px; font-weight: 800; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.primary-button:hover { background: var(--teal-dark); transform: translateY(-2px); box-shadow: 0 15px 27px rgba(11,114,133,.25); }
.button-arrow { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 9px; background: rgba(255,255,255,.16); font-size: 18px; }
.microcopy { margin: 17px 0 0; color: #6d8491; font-size: 11px; }
.lock-icon { display: inline-block; margin-left: 5px; color: var(--coral); font-weight: 800; }
.hero-art { position: relative; flex: .92; min-width: 0; min-height: 430px; overflow: hidden; }
.hero-art::before { content: ""; position: absolute; width: 290px; height: 290px; top: 83px; right: 50%; border-radius: 50%; background: rgba(76,201,213,.2); filter: blur(1px); transform: translateX(50%); }
.orbit { position: absolute; top: 50%; right: 50%; border: 1px solid rgba(11,114,133,.2); border-radius: 50%; transform: translate(50%, -50%) rotate(-22deg); }
.orbit-large { width: 385px; height: 185px; }
.orbit-small { width: 310px; height: 140px; transform: translate(50%, -50%) rotate(27deg); border-color: rgba(242,119,107,.22); }
.water-globe { position: absolute; top: 50%; right: 50%; width: 190px; height: 190px; overflow: hidden; border-radius: 50%; background: linear-gradient(145deg, #159bad 0%, #0b7285 56%, #075d70 100%); box-shadow: inset -20px -25px 34px rgba(0,54,67,.2), 0 18px 45px rgba(11,114,133,.24); transform: translate(50%, -50%); }
.water-globe::before, .water-globe::after { content: ""; position: absolute; border-radius: 50%; background: rgba(143,218,170,.68); transform: rotate(-21deg); }
.water-globe::before { width: 93px; height: 40px; top: 34px; left: 20px; border-radius: 60% 40% 42% 58%; }
.water-globe::after { width: 67px; height: 77px; right: 18px; bottom: 29px; border-radius: 46% 54% 55% 45%; background: rgba(89,190,145,.72); }
.globe-shine { position: absolute; z-index: 2; top: 22px; left: 30px; width: 42px; height: 76px; border-radius: 50%; background: linear-gradient(90deg, rgba(255,255,255,.31), transparent); transform: rotate(31deg); }
.globe-wave { position: absolute; z-index: 3; right: -30px; width: 250px; height: 49px; border: 2px solid rgba(255,255,255,.38); border-left: 0; border-right: 0; border-radius: 50%; transform: rotate(-10deg); }
.wave-one { bottom: 39px; }
.wave-two { bottom: 62px; opacity: .5; }
.art-star { position: absolute; color: var(--yellow); font-size: 23px; text-shadow: 0 4px 9px rgba(248,199,90,.4); }
.star-a { top: 92px; right: 16%; }.star-b { bottom: 93px; left: 15%; font-size: 17px; color: var(--coral); }.star-c { top: 28%; left: 10%; font-size: 12px; }
.art-drop { position: absolute; width: 13px; height: 17px; border-radius: 80% 20% 62% 38%; background: rgba(76,201,213,.55); transform: rotate(36deg); }
.drop-a { right: 12%; bottom: 25%; }.drop-b { top: 25%; left: 20%; width: 8px; height: 11px; background: rgba(242,119,107,.5); }
.feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.feature-card { display: flex; align-items: center; gap: 12px; padding: 17px; background: rgba(255,255,255,.72); border: 1px solid rgba(220,236,235,.9); border-radius: 18px; }
.feature-icon { display: grid; flex: 0 0 39px; place-items: center; width: 39px; height: 39px; border-radius: 13px 13px 13px 4px; font-size: 12px; font-weight: 800; }.feature-icon.teal { color: var(--teal); background: #dbf5f3; }.feature-icon.coral { color: #c64f4a; background: #fff0ed; }.feature-icon.yellow { color: #9a6b0e; background: #fff5d6; font-size: 17px; }
.feature-card strong, .feature-card small { display: block; }.feature-card strong { margin-bottom: 4px; font-size: 12px; }.feature-card small { color: var(--muted); font-size: 10px; }

.quiz-screen { max-width: 900px; margin: 0 auto; }.quiz-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }.question-count { display: flex; align-items: baseline; gap: 5px; color: var(--teal); font-size: 22px; font-weight: 900; }.question-count .muted { color: #9aabb0; font-size: 12px; font-weight: 500; }.topic-chip { display: flex; align-items: center; gap: 9px; padding: 9px 13px; border-radius: 999px; color: #66818a; background: rgba(255,255,255,.75); font-size: 11px; font-weight: 800; }.topic-dot { width: 6px; height: 6px; background: var(--teal); box-shadow: 0 0 0 4px rgba(11,114,133,.12); }.progress-track { width: 100%; height: 7px; margin-bottom: 22px; overflow: hidden; border-radius: 99px; background: rgba(11,114,133,.1); }.progress-fill { width: 8.33%; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--teal), var(--cyan)); transition: width .35s ease; }
.quiz-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 18px; align-items: start; }.question-card { padding: clamp(24px, 5vw, 44px); border: 1px solid rgba(220,236,235,.95); border-radius: 26px 26px 26px 7px; background: var(--paper); box-shadow: 0 17px 50px rgba(18,72,91,.08); }.question-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; color: var(--coral); font-size: 11px; font-weight: 800; }.sparkle { color: var(--yellow); font-size: 18px; }.question-card h2 { min-height: 72px; margin-bottom: 27px; font-size: clamp(20px, 3vw, 28px); line-height: 1.65; letter-spacing: -.5px; }.answer-area { display: grid; gap: 10px; }.option-button { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 15px 15px 15px 4px; color: var(--ink); background: #fbfefd; text-align: right; transition: border-color .2s ease, background .2s ease, transform .2s ease; }.option-button:not(:disabled):hover { border-color: var(--cyan); background: #f0fbfb; transform: translateX(-3px); }.option-button:disabled { cursor: default; }.option-letter { display: grid; flex: 0 0 31px; place-items: center; width: 31px; height: 31px; border-radius: 10px; color: var(--teal); background: #e4f6f5; font-size: 12px; font-weight: 900; }.option-text { font-size: 13px; line-height: 1.45; }.option-button.correct { border-color: rgba(66,184,131,.7); background: #effbf4; }.option-button.correct .option-letter { color: #258c60; background: #ccefdc; }.option-button.wrong { border-color: rgba(242,119,107,.6); background: #fff2ef; }.option-button.wrong .option-letter { color: #c8584f; background: #ffdcd7; }.option-button.missed { border-color: rgba(66,184,131,.38); background: #f4fcf7; }
.feedback { display: flex; align-items: center; gap: 10px; min-height: 42px; margin-top: 15px; padding: 11px 13px; border-radius: 12px; font-size: 12px; line-height: 1.55; }.feedback.good { color: #277955; background: #effbf4; }.feedback.bad { color: #bd554c; background: #fff3ef; }.feedback.timeout { color: #8f6a1c; background: #fff8df; }.feedback-icon { font-size: 17px; font-weight: 900; }.tip-line { margin: 12px 5px 0; color: #8aa0a7; font-size: 11px; }.tip-line span { margin-left: 4px; color: var(--teal); font-size: 17px; vertical-align: -2px; }
.timer-card { display: flex; flex-direction: column; align-items: center; padding: 25px 14px 20px; border: 1px solid rgba(220,236,235,.9); border-radius: 24px 24px 7px 24px; background: rgba(255,255,255,.75); }.timer-ring { display: grid; place-items: center; width: 137px; height: 137px; margin: 2px 0 18px; border-radius: 50%; background: conic-gradient(var(--teal) 100%, #e4f0ef 0); transition: background .2s ease; }.timer-inner { display: grid; place-items: center; width: 111px; height: 111px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px rgba(220,236,235,.9); }.timer-inner strong { color: var(--teal); font-size: 41px; line-height: .95; }.timer-inner span { margin-top: -2px; color: #80939a; font-size: 11px; }.timer-title { margin-bottom: 6px; font-size: 13px; }.timer-hint { color: var(--muted); font-size: 10px; }.lock-note { width: 100%; margin-top: 24px; padding-top: 15px; border-top: 1px solid var(--line); color: #81969d; font-size: 10px; line-height: 1.75; text-align: center; }.lock-note span { color: var(--coral); margin-left: 4px; }
.match-intro { margin: -7px 0 15px; color: var(--muted); font-size: 11px; }.match-board { display: grid; grid-template-columns: 1fr 1.12fr; gap: 10px; }.match-column { display: grid; gap: 9px; }.match-label { color: #8ba0a6; font-size: 10px; font-weight: 800; }.match-button { min-height: 54px; padding: 10px; border: 1px solid var(--line); border-radius: 13px 13px 13px 4px; color: var(--ink); background: #fbfefd; font-size: 11px; line-height: 1.45; text-align: center; transition: .2s ease; }.match-button:not(:disabled):hover { border-color: var(--cyan); }.match-button.selected { border-color: var(--teal); color: var(--teal-dark); background: #e9f8f6; box-shadow: 0 0 0 2px rgba(11,114,133,.08); }.match-button.paired { border-color: #bce5d1; color: #26845d; background: #f0fbf4; }.match-button.wrong-pair { border-color: #f3c4bd; color: #b6574e; background: #fff3f1; }

.result-screen { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; max-width: 900px; margin: 0 auto; }.result-card { position: relative; overflow: hidden; padding: 45px 28px 30px; border-radius: 28px 28px 28px 7px; background: linear-gradient(145deg, #e5f8f5, #fff9ed); box-shadow: var(--shadow); text-align: center; }.result-card::after { content: ""; position: absolute; width: 190px; height: 190px; top: -106px; left: -66px; border: 25px solid rgba(76,201,213,.13); border-radius: 50%; }.result-card h1 { position: relative; z-index: 1; margin-bottom: 15px; font-size: clamp(27px, 4vw, 40px); letter-spacing: -1px; }.result-sparkles { position: absolute; top: 22px; left: 25%; right: 25%; display: flex; justify-content: space-between; color: var(--yellow); font-size: 23px; }.result-sparkles span:nth-child(2) { color: var(--coral); font-size: 14px; }.stars { position: relative; z-index: 1; display: flex; justify-content: center; gap: 8px; margin: 3px 0 10px; color: #d2e1df; font-size: 31px; }.stars .active { color: var(--yellow); text-shadow: 0 6px 12px rgba(248,199,90,.35); animation: star-pop .45s both; }.stars .active:nth-child(2) { animation-delay: .1s; }.stars .active:nth-child(3) { animation-delay: .2s; }@keyframes star-pop { from { opacity: .2; transform: scale(.5) rotate(-20deg); } to { opacity: 1; transform: scale(1) rotate(0); } }.result-message { margin-bottom: 17px; color: #58717a; font-size: 13px; }.score-display { direction: ltr; color: var(--teal); }.score-display strong { font-size: 72px; line-height: .9; letter-spacing: -4px; }.score-display span { color: #8ba0a6; font-size: 23px; font-weight: 700; }.score-label { margin: 8px 0 22px; color: #789099; font-size: 11px; }.result-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 23px; }.result-stats div { padding: 10px; border: 1px solid rgba(220,236,235,.9); border-radius: 13px; background: rgba(255,255,255,.7); }.result-stats strong, .result-stats span { display: block; }.result-stats strong { margin-bottom: 4px; color: var(--ink); font-size: 14px; }.result-stats span { color: var(--muted); font-size: 9px; }.result-card .primary-button { width: 100%; }.review-panel { padding: 22px 19px; border: 1px solid rgba(220,236,235,.9); border-radius: 23px 23px 7px 23px; background: rgba(255,255,255,.75); }.review-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }.review-heading strong { font-size: 13px; }.review-heading span { color: var(--muted); font-size: 10px; }.review-list { display: grid; gap: 8px; max-height: 390px; overflow: auto; padding-left: 3px; }.review-item { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 11px; background: #f7fbfa; font-size: 10px; }.review-item b { display: grid; flex: 0 0 23px; place-items: center; width: 23px; height: 23px; border-radius: 8px; color: white; background: var(--teal); font-size: 9px; }.review-item.wrong b { background: var(--coral); }.review-item span { overflow: hidden; color: #6e858c; text-overflow: ellipsis; white-space: nowrap; }.footer-note { margin: 21px 0 0; color: #8ba0a6; font-size: 10px; text-align: center; }.footer-note strong { color: var(--teal); }

@media (max-width: 720px) { .app-shell { width: min(calc(100% - 22px), 600px); padding-top: 16px; }.topbar { margin-bottom: 17px; }.brand-copy small { display: none; }.hero-panel { min-height: auto; flex-direction: column; border-radius: 24px; }.hero-copy { padding: 35px 25px 23px; }.hero-copy h1 { font-size: 36px; }.hero-lede { margin-bottom: 20px; font-size: 13px; line-height: 1.8; }.hero-art { min-height: 210px; }.hero-art::before { top: 15px; }.water-globe { width: 145px; height: 145px; }.orbit-large { width: 300px; height: 140px; }.orbit-small { width: 250px; height: 110px; }.feature-row { gap: 7px; margin-top: 11px; }.feature-card { min-width: 0; padding: 10px 7px; gap: 7px; }.feature-icon { flex-basis: 31px; width: 31px; height: 31px; border-radius: 10px 10px 10px 3px; font-size: 10px; }.feature-card strong { font-size: 10px; }.feature-card small { font-size: 8px; }.quiz-layout { grid-template-columns: 1fr; }.timer-card { order: -1; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 15px; padding: 12px 16px; border-radius: 17px; }.timer-ring { grid-row: span 2; width: 75px; height: 75px; margin: 0; }.timer-inner { width: 61px; height: 61px; }.timer-inner strong { font-size: 23px; }.timer-inner span { font-size: 8px; }.timer-title { align-self: end; font-size: 12px; }.timer-hint { align-self: start; }.lock-note { grid-column: 2; margin: 5px 0 0; padding-top: 7px; text-align: right; border-top: 1px solid var(--line); font-size: 9px; }.question-card { padding: 22px 17px 18px; border-radius: 21px 21px 21px 6px; }.question-card h2 { min-height: 0; margin-bottom: 20px; font-size: 20px; line-height: 1.6; }.option-button { min-height: 54px; }.option-text { font-size: 12px; }.result-screen { grid-template-columns: 1fr; }.review-panel { order: 2; }.review-list { max-height: 250px; }.quiz-topline { margin-bottom: 11px; }.progress-track { margin-bottom: 13px; } }
@media (max-width: 390px) { .class-pill { padding: 7px 9px; font-size: 10px; }.brand-copy strong { font-size: 13px; }.hero-copy h1 { font-size: 31px; }.feature-card { flex-direction: column; align-items: flex-start; }.feature-card small { display: none; }.match-button { font-size: 10px; padding: 8px 5px; } }

/* Student name is intentionally session-only: it is never sent or stored centrally. */
.name-field { width: min(100%, 330px); margin: -5px 0 16px; }
.name-field label { display: block; margin-bottom: 7px; color: var(--ink); font-size: 12px; font-weight: 800; }
.name-field input { width: 100%; height: 46px; padding: 0 14px; border: 1px solid rgba(11,114,133,.2); border-radius: 13px 13px 13px 4px; outline: none; color: var(--ink); background: rgba(255,255,255,.8); font-size: 13px; transition: border-color .2s ease, box-shadow .2s ease; }
.name-field input::placeholder { color: #9aadb2; }
.name-field input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(11,114,133,.1); }
.name-error { display: block; margin-top: 6px; color: #c8584f; font-size: 10px; }
.student-result-name { position: relative; z-index: 1; display: inline-block; margin: 0 auto 9px; padding: 7px 12px; border-radius: 999px; color: var(--teal-dark); background: rgba(255,255,255,.72); font-size: 12px; font-weight: 800; }
.result-sync-status { min-height: 16px; margin: -4px 0 12px; color: #5c8b7a; font-size: 10px; }
@media (max-width: 720px) { .name-field { width: 100%; max-width: 330px; } }
