@font-face {
  font-family: 'Comic Neue';
  src: url('/assets/fonts/ComicNeue-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Comic Neue';
  src: url('/assets/fonts/ComicNeue-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper:#f8f4eb;
  --white:#fffefb;
  --ink:#173534;
  --muted:#465d58;
  --teal:#186252;
  --deep:#104c40;
  --mint:#e1eee5;
  --line:#cadbd2;
  --amber:#f8e9c2;
  --rose:#f8e7e3;
  --warn:#763524;
  --indigo:#405888;
  font-family:'Comic Sans MS','Comic Neue',cursive;
}
*{box-sizing:border-box}
html{min-width:280px;background:var(--paper)}
body{margin:0;color:var(--ink);font-size:1.125rem;line-height:1.5}
[hidden]{display:none!important}
button,input,textarea{font:inherit}
button{cursor:pointer}
button:disabled{cursor:default;opacity:.65}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #2264a2;outline-offset:4px}
h1,h2,h3,p{margin:0}
h1,h2,h3{line-height:1.16}
h1{font-size:clamp(2.25rem,6vw,4.05rem);letter-spacing:-.036em}
h2{font-size:1.25rem}
a{color:var(--deep)}
.masthead{background:var(--white);border-bottom:1px solid var(--line)}
.mast-inner{width:min(1170px,100% - 2.6rem);margin:auto;min-height:72px;display:flex;justify-content:space-between;align-items:center;gap:1rem}
.brand{display:inline-flex;align-items:center;gap:.66rem;text-decoration:none;color:var(--ink);font-size:1.45rem;font-weight:700;white-space:nowrap}
.mark,.wave{display:inline-flex;align-items:center;justify-content:center;gap:4px;background:var(--teal);border-radius:12px;width:39px;height:39px}
.mark i,.wave i{width:4px;height:14px;background:#f7fffa;border-radius:6px}
.mark i:nth-child(2),.wave i:nth-child(2){height:22px}
.mark i:nth-child(3),.wave i:nth-child(3){height:10px}
#account-actions{display:flex;align-items:center;gap:1rem}
.account-name{color:var(--muted);font-size:1rem}
#app{width:min(1170px,100% - 2.6rem);margin:0 auto;padding:clamp(1.4rem,4vw,3.3rem) 0 3rem}
.loading{text-align:center;color:var(--muted);padding:2rem 0}
.eyebrow,.category{color:var(--deep);font-size:1rem;font-weight:700;letter-spacing:.05em}
.eyebrow{margin-bottom:.55rem}
.muted{color:var(--muted)}
.button{display:inline-flex;justify-content:center;align-items:center;min-height:46px;padding:.58rem 1.1rem;border:1px solid var(--teal);border-radius:12px;color:white;background:var(--teal);font-weight:700;text-align:center}
.button:hover:not(:disabled){background:var(--deep)}
.button.ghost{color:var(--deep);background:transparent;border-color:#a6c6b8}
.button.ghost:hover:not(:disabled){background:var(--mint)}
.button.small{min-height:38px;padding:.37rem .76rem;font-size:1rem}
.notice{color:var(--warn);font-weight:700;margin:.6rem 0 0}
.notice:empty{display:none}
.login-layout{display:grid;grid-template-columns:1fr 1.08fr;border:1px solid var(--line);border-radius:26px;background:var(--white);overflow:hidden;min-height:535px}
.login-copy{align-self:center;padding:clamp(1.4rem,5vw,3.7rem)}
.login-copy h1{margin-bottom:.85rem}
.login-art{display:block;width:100%;height:100%;min-height:340px;object-fit:cover;object-position:50% 50%;background:#146052}
.login-form{display:grid;gap:1rem;margin-top:1.4rem}
.login-form .button{width:max-content}
.field{display:grid;gap:.32rem}
.field label{font-weight:700}
input:not([type=radio]),textarea{width:100%;min-width:0;border:1px solid #91b2a5;border-radius:10px;padding:.65rem .8rem;color:var(--ink);background:#fff;min-height:46px}
textarea{min-height:115px;resize:vertical}
.catalog-head{display:flex;justify-content:space-between;align-items:flex-end;gap:1.15rem;margin-bottom:1.45rem}
.catalog-head h1{margin-bottom:.45rem}
.count{flex:none;white-space:nowrap;background:var(--mint);border:1px solid #b4d3c4;border-radius:999px;padding:.38rem .85rem;color:var(--deep);font-weight:700}
.catalog{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem}
.tile{display:flex;flex-direction:column;min-width:0;padding:0;border:1px solid var(--line);border-radius:17px;overflow:hidden;background:var(--white);color:var(--ink);text-align:left}
.tile:not(:disabled):hover{border-color:var(--teal);box-shadow:0 5px 16px #15352a18}
.tile img{display:block;width:100%;aspect-ratio:1.7;object-fit:cover;background:#dcece3}
.tile-body{padding:.9rem;display:grid;gap:.3rem;width:100%;flex:1}
.tile h2{font-size:1.2rem;overflow-wrap:anywhere}
.tile.done{background:#e7e7e4;border-color:#c7c6c1;color:#535955;opacity:1}
.tile.done img{filter:grayscale(1);opacity:.58}
.tile.done .category{color:#575f5b}
.tile-status{font-size:.95rem;font-weight:700}
.resume{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.9rem 1.2rem;margin-bottom:1.1rem;border:1px solid #b7d4c6;border-radius:15px;background:var(--mint)}
.results-history{margin-top:1.4rem;border-top:1px solid var(--line);padding-top:1rem}
.results-history summary{font-weight:700;cursor:pointer}
.history{display:flex;flex-wrap:wrap;gap:.6rem;margin-top:.7rem}
.panel{border:1px solid var(--line);border-radius:22px;background:var(--white);padding:clamp(1.25rem,4vw,2.35rem)}
.narrow{max-width:720px;margin:0 auto}
.screen-title{font-size:clamp(1.95rem,5vw,3rem);margin-bottom:.75rem;overflow-wrap:anywhere}
.actions{display:flex;flex-wrap:wrap;align-items:center;gap:.7rem;margin-top:1.25rem}
.steps{margin:1.3rem 0;padding-left:1.3em}
.steps li{padding-left:.35rem;margin-bottom:.72rem}
.steps li::marker{color:var(--teal);font-weight:700}
.steps strong{font-size:1.18rem}
.parent-note{padding:.87rem 1.1rem;background:var(--mint);border-radius:12px}
.parent-note h2{margin-bottom:.25rem}
.round-art{display:block;width:100%;aspect-ratio:2.6;object-fit:cover;border-radius:14px;margin-bottom:1.1rem;max-height:250px}
.listening .wave{margin-bottom:.75rem}
.wave.playing i{animation:wave .68s ease-in-out infinite alternate}
.wave.playing i:nth-child(2){animation-delay:.14s}
.wave.playing i:nth-child(3){animation-delay:.32s}
@keyframes wave{to{transform:scaleY(1.6)}}
.audio-progress,.quiz-progress{width:100%;height:.65rem;display:block;accent-color:var(--teal);margin:1rem 0}
.pause{text-align:center}
.pause .button{margin-top:.8rem}
.clock{display:block;margin:1rem auto 1.15rem;background:var(--mint);color:var(--deep);border-radius:17px;font-weight:700;min-width:4ch;width:max-content;padding:.12em .38em;font-size:clamp(3.8rem,12vw,6.6rem);font-variant-numeric:tabular-nums;line-height:1.2}
.question-title{font-size:clamp(1.6rem,4.5vw,2.55rem);margin:.65rem 0 1.05rem;overflow-wrap:anywhere}
.question-form .muted{margin-top:.45rem}
.options{display:grid;gap:.62rem}
.choice{display:flex;align-items:center;gap:.65rem;padding:.7rem .75rem;border:1px solid var(--line);border-radius:11px;cursor:pointer;min-height:48px}
.choice:has(input:checked){background:var(--mint);border-color:var(--teal)}
.choice input{width:20px;height:20px;flex:none;margin:0;accent-color:var(--teal)}
.choice-letter{font-weight:700;color:var(--deep)}
.question-actions{justify-content:space-between}
.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.62rem;margin:1.2rem 0}
.stat{padding:.6rem .75rem;background:var(--mint);border-radius:12px;overflow-wrap:anywhere}
.stat strong{font-size:1.08rem}
.stat p{font-size:.98rem;color:var(--muted)}
.answer-list{margin:.9rem 0}
.answer-detail{padding:.72rem 0;border-top:1px solid var(--line)}
.answer-detail summary{cursor:pointer;font-weight:700;overflow-wrap:anywhere}
.answer-detail p{margin:.25rem 0 0 .95rem;overflow-wrap:anywhere}
.badge{display:inline-block;margin-left:.4rem;font-size:.92rem;padding:.1rem .45rem;border-radius:.4rem;background:var(--mint);color:var(--deep)}
.badge.review{background:var(--amber);color:#62480e}
.badge.incorrect{background:var(--rose);color:var(--warn)}
.mail-state{font-size:1rem}
@media(max-width:960px){.catalog{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:670px){
  #app,.mast-inner{width:calc(100% - 1.7rem)}
  .mast-inner{min-height:62px}
  .brand{font-size:1.2rem}
  .mark{height:34px;width:34px}
  .account-name{display:none}
  .login-layout{grid-template-columns:1fr;min-height:unset;border-radius:18px}
  .login-art{max-height:190px;min-height:0}
  .catalog{grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}
  .catalog-head,.resume{align-items:flex-start;flex-direction:column}
  .tile-body{padding:.58rem;gap:.2rem}
  .tile h2{font-size:1.02rem}
  .category,.tile-status{font-size:.9rem}
  .stats{gap:.36rem}
  .stat{padding:.42rem}
  .stat strong{font-size:.96rem}
  .stat p{font-size:.9rem}
}
@media(prefers-reduced-motion:reduce){*{animation:none!important}}
