:root{font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif;color:#182e4b;background:#f1f4f8;font-size:16px;line-height:1.7}*{box-sizing:border-box}body{margin:0}header{background:#182e4b;color:#fff;padding:22px max(24px,calc((100vw - 1180px)/2));display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:flex;gap:14px;align-items:center}.seal{border:1px solid #92aecf;border-radius:8px;padding:0 12px;font-family:serif;font-size:36px}h1{font-size:24px;margin:0;font-weight:650;letter-spacing:.06em}header p{font-size:14px;margin:0;color:#bed0e4}#network{font-size:14px}main{max-width:1228px;margin:auto;padding:24px}.setup{border:1px solid #becde0;background:#e7eef8;display:flex;align-items:center;gap:24px;padding:18px 22px;border-radius:12px;margin-bottom:24px}.setup p{margin:5px 0 0;font-size:14px;color:#455b75}.setup>div{flex:1}.workspace{display:grid;grid-template-columns:260px 1fr;gap:26px}aside{padding:8px 4px}label{display:block;margin:16px 0 7px;font-size:14px;font-weight:600}select{width:100%;padding:13px 10px;color:inherit;background:white;border:1px solid #a8b7cc;border-radius:8px;font-size:16px}button{font:inherit;cursor:pointer;min-height:48px;padding:10px 20px;border-radius:8px;background:#fff;border:1px solid #a3b4ca;color:#182e4b;touch-action:manipulation}button:hover:not(:disabled){border-color:#204f8c;background:#eef4fc}button:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #d47814;outline-offset:3px}button:disabled{opacity:.55;cursor:default}.primary{background:#214f88;color:white;border-color:#214f88}.primary:hover:not(:disabled){background:#16385f;color:white}aside .primary{width:100%;margin-top:20px}.eyebrow{font-size:14px;font-weight:700;letter-spacing:.12em;color:#56708f;margin:0}.small{font-size:14px;color:#5c6d82}.stat{border-top:1px solid #ccd5e2;border-bottom:1px solid #ccd5e2;padding:18px 0;margin:22px 0}.stat span{display:block;font-size:14px}.stat strong{display:block;margin-top:6px;font-size:18px}details{font-size:14px}summary{cursor:pointer;font-weight:600;padding:12px 0}article{background:#fff;border:1px solid #dbe2ec;border-radius:16px;padding:28px 34px;min-width:0;box-shadow:0 5px 18px #14243a05}.qtop{display:flex;justify-content:space-between;gap:16px;font-size:14px;color:#576d88}progress{display:block;width:100%;height:5px;margin:15px 0 26px;accent-color:#275c99}.badge{background:#e8eff9;padding:3px 9px;border-radius:5px;font-size:14px}.context{color:#50647e;font-size:15px;margin:18px 0}.quote{font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:27px;line-height:2;letter-spacing:.04em;background:#f5f7fb;border-left:4px solid #244e84;padding:22px 24px;margin:20px 0;overflow-wrap:anywhere}mark{color:#133f76;background:#dfeafa;border-bottom:3px solid #32639f;padding:2px 1px}.choices{border:0;margin:20px 0;padding:0}.choices legend{font-size:16px;font-weight:650;margin-bottom:10px}.row{display:flex;flex-wrap:wrap;gap:10px}.choice{flex:1;min-width:100px}.choice[aria-pressed=true]{background:#214f88;color:#fff;border-color:#214f88}.choice.correct{border:2px solid #147454;background:#e8f6ee;color:#14583f}.choice.incorrect{border:2px solid #b44737;background:#fff0eb;color:#92362a}.actions{margin-top:26px;display:flex;gap:12px;flex-wrap:wrap}.feedback{margin-top:24px;padding:22px;background:#f1f7fc;border-radius:10px}.feedback h3{margin:0 0 14px;font-size:20px}.feedback p{margin:10px 0}.direction{display:flex;gap:12px;align-items:center;flex-wrap:wrap;font-size:18px;font-weight:700}.direction span{border:1px solid #aac0d9;background:white;padding:8px 13px;border-radius:6px}.guide{background:white;border:1px solid #dbe2ec;border-radius:10px;margin-top:20px;padding:6px 22px}.guide p,.guide li{font-size:15px}a{color:#23599b;overflow-wrap:anywhere}footer{padding:26px 0 8px;font-size:14px;color:#6b7c91}.score{font-size:52px;margin:16px 0;color:#214f88}.summaryrow{border-bottom:1px solid #dae2ed;padding:12px 0}h2{font-size:22px;margin:14px 0}#storageNotice{color:#9e382f}@media(max-width:760px){header{padding:18px}h1{font-size:20px}main{padding:14px}.workspace{grid-template-columns:1fr}aside{display:grid;grid-template-columns:1fr 1fr;gap:8px 16px}aside label{margin:0}aside select{grid-row:3}aside .eyebrow,aside .primary,aside .small,aside .stat,aside details{grid-column:1/-1}aside .primary{margin:5px 0}aside .stat{margin:0;padding:10px 0}article{padding:20px}.quote{font-size:23px;padding:18px}.setup{flex-direction:column;align-items:stretch;gap:12px}#network{max-width:90px}.choices .row{gap:8px}.choice{padding:10px}.qtop{flex-wrap:wrap}}@media print{header,.setup,aside,.guide,footer,.actions{display:none}.workspace{display:block}article{border:0;box-shadow:none}}
/* A bright notebook palette, using rounded fonts already on the device. */
:root{font-family:"Hiragino Maru Gothic ProN","Hiragino Maru Gothic Pro",ui-rounded,"Yu Gothic",-apple-system,sans-serif;color:#39334f;background:#f7f8ff;line-height:1.8}
body{background-image:radial-gradient(#aca2c530 1px,transparent 1px);background-size:22px 22px}
header{background:white;color:#58419d;border-bottom:5px solid #f2bd4e}
.seal{font-family:inherit;font-weight:800;background:#6851bd;color:white;border:0;border-radius:18px;box-shadow:4px 4px 0 #f5c75e;transform:rotate(-5deg)}
h1{font-size:27px;font-weight:800}header p{color:#756387}#network{color:#62518a;background:#f2edff;padding:6px 13px;border-radius:30px}
.setup{background:#edfaf6;border-color:#b3dbcd;border-left:6px solid #25826e;border-radius:18px}.setup strong{color:#216b57}.setup p{color:#4d6e63}
.workspace{grid-template-columns:280px 1fr;align-items:start}
aside{padding:20px;background:white;border:1px solid #e0d8ed;border-radius:23px}
select{font-family:inherit;background:#faf8ff;border-color:#cbbde2;border-radius:12px}
button{font-weight:700;border-radius:15px;border-color:#cbbde2;color:#604887;box-shadow:0 3px 0 #e0d8ec;transition:transform .12s,background .12s}
button:hover:not(:disabled){background:#f0eaff;border-color:#9175be;transform:translateY(-1px)}
button:active:not(:disabled){transform:translateY(2px);box-shadow:none}
.primary,.choice[aria-pressed=true]{background:#6851bd;border-color:#6851bd;color:white;box-shadow:0 4px 0 #4d3895}
.primary:hover:not(:disabled){background:#5742a6;color:white}
.eyebrow{color:#71569a;font-weight:800}.small{color:#73647f}
.stat{border:1px solid #ebcf8f;background:#fff7e2;border-radius:16px;padding:15px;color:#76571e}
article{border-color:#e0d7ed;border-top:6px solid #9b81d4;border-radius:25px;box-shadow:0 6px 0 #e8e0f1}
.qtop{color:#78668b}.qtop>span:first-child{font-weight:800;color:#7151a0}
progress{height:10px;border-radius:10px;overflow:hidden;accent-color:#ecb53e;background:#f1edf7}
progress::-webkit-progress-bar{background:#f1edf7;border-radius:10px}
progress::-webkit-progress-value{background:#ecb53e;border-radius:10px}
progress::-moz-progress-bar{background:#ecb53e;border-radius:10px}
.badge{background:#fff0c9;color:#7a5717;border:1px solid #efd38f;border-radius:30px;padding:4px 13px;font-weight:700}
.context{font-size:16px;color:#6d5e79}
.quote{font-family:inherit;font-weight:600;line-height:2;background:#fffaf0;border:2px solid #eccd89;border-radius:20px;box-shadow:3px 4px 0 #f8efd9}
mark{background:#ffe5a3;color:#85400e;border-color:#d98e23;border-radius:4px;padding:2px 3px}
.choices legend{font-weight:800;color:#72529e}.choices:nth-of-type(2) legend{color:#207462}.choices:nth-of-type(3) legend{color:#8b6118}
.choices:nth-of-type(2) .choice[aria-pressed=true]{background:#217968;color:white;border-color:#217968;box-shadow:0 3px 0 #195d50}
.choices:nth-of-type(3) .choice[aria-pressed=true]{background:#f7cc72;color:#5f4317;border-color:#d2a44f;box-shadow:0 3px 0 #d2a44f}
.choices .choice.correct{background:#e6f7ee;color:#1d6553;border:2px solid #25866c;opacity:1;box-shadow:0 3px 0 #bfe1d2}
.choices .choice.incorrect{background:#fff0e9;color:#903f2a;border:2px solid #b96349;opacity:1;box-shadow:0 3px 0 #eccbbb}
.feedback{background:#f6f0ff;border:1px solid #dccfed;border-radius:20px}.feedback h3{color:#70529e;font-size:22px}
.direction span{background:#eaf8f2;border-color:#b8dacd;color:#216854;border-radius:14px}
.direction span:last-child{background:#fff3d4;border-color:#e4c682;color:#7c5817}
.guide{border-color:#e1d8ec;border-radius:18px}summary{color:#715789}a{color:#684aa1}.score{color:#6851bd;font-weight:800}.summaryrow{border-bottom:1px dashed #ded0e9}footer{color:#81718e}
@media(max-width:760px){h1{font-size:21px}.workspace{grid-template-columns:1fr}aside{padding:18px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}aside .stat{padding:12px}#network{max-width:105px}.quote{font-size:23px}}
@media(prefers-reduced-motion:reduce){button{transition:none}}
@media print{body{background:white}article{border:0;box-shadow:none}}
[hidden]{display:none!important}
body[data-screen="title"] main{display:flex;flex-direction:column}
.title-screen{order:-1;display:grid;grid-template-columns:minmax(0,1fr) 330px;align-items:center;gap:40px;padding:35px 30px 42px;margin-bottom:26px;background:linear-gradient(140deg,#f0e9ff 0%,#fff 60%,#fff3cc 100%);border:2px solid #e0d5ef;border-radius:32px;box-shadow:0 8px 0 #e6ddf0}
.title-intro{text-align:center;padding:20px 0;animation:title-enter .65s ease-out both}
.title-kicker{font-size:15px;color:#6c5885;font-weight:700}
.game-title{font-size:clamp(38px,6vw,68px);line-height:1.35;letter-spacing:.04em;margin:25px 0;color:#6242a4;text-shadow:0 4px 0 white}
.game-title>span{display:block;font-size:.68em}
.game-title strong{display:block;font-size:1.45em;font-weight:900;position:relative}
.title-star{display:inline-block;font-size:.45em;color:#bd851c;vertical-align:middle;margin-left:10px;animation:star-turn 1s ease-out both}
.title-tags{display:flex;gap:12px;justify-content:center;margin:22px 0}
.title-tags span{border-radius:30px;padding:7px 18px;background:#e8ddff;color:#63468e;font-weight:800;transform:rotate(-5deg);box-shadow:0 3px 0 #d7c4f0}
.title-tags span:nth-child(2){background:#dff5eb;color:#256752;transform:rotate(4deg);box-shadow:0 3px 0 #bbdecf}
.title-tags span:nth-child(3){background:#ffedb9;color:#77520e;transform:rotate(-3deg);box-shadow:0 3px 0 #eed294}
.game-menu{width:100%;padding:23px;border-radius:24px;box-shadow:0 5px 0 #e1d6ed}
.game-menu #start{font-size:22px;min-height:66px;border-radius:20px;letter-spacing:.03em}
.game-menu .stat{font-size:14px;margin:16px 0}.game-menu .stat strong{font-size:16px}
body:not([data-screen="title"]) .setup,body:not([data-screen="title"]) .guide,body:not([data-screen="title"]) footer{display:none}
#playScreen{display:block;max-width:900px;margin:0 auto}
#exercise{position:relative;isolation:isolate}
#exercise:focus{outline:none}
body[data-screen="question"] #exercise{animation:page-enter .28s ease-out}
.verdict-effect{min-height:440px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.verdict-effect h2{font-size:42px}.verdict-effect p{font-size:18px}
.burst-mark{font-size:120px;line-height:1.2;font-weight:800;animation:stamp-in .55s cubic-bezier(.2,1.5,.4,1) both}
.win{color:#217b62}.learn{color:#7955aa}
.answer-heading{text-align:center;padding:0 0 14px;animation:page-enter .35s ease-out}
.answer-heading h2{font-size:32px;color:#6546a0;margin:5px 0}
.answer-heading p{margin:6px 0}
.answer-symbol{font-size:70px;font-weight:800;color:#22816a;line-height:1.2;animation:stamp-in .5s ease-out both}
.answer-quote{font-size:23px}
.answer-checks{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px}
.answer-checks>div{border-radius:15px;padding:13px 16px;min-width:0}
.answer-checks span,.answer-checks strong,.answer-checks small{display:block}
.answer-checks span{font-size:14px;font-weight:700}.answer-checks strong{font-size:17px;margin:5px 0}.answer-checks small{font-size:14px}
.matched{background:#eaf8ef;border:1px solid #b5dac8;color:#23654f}.review{background:#fff4df;border:1px solid #e8cc92;color:#78591e}
.answer-actions{justify-content:center}.answer-actions button{font-size:20px;min-width:240px;min-height:58px}
.confetti{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:2;border-radius:24px}
.confetti i{position:absolute;left:var(--x);top:-20px;width:9px;height:17px;background:var(--color);opacity:0;animation:confetti-fall 1.5s ease-out var(--delay) both}
@keyframes title-enter{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
@keyframes star-turn{from{transform:rotate(-75deg) scale(.4)}to{transform:rotate(0) scale(1)}}
@keyframes page-enter{from{opacity:.2;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes stamp-in{0%{opacity:0;transform:scale(.3) rotate(-15deg)}65%{opacity:1;transform:scale(1.15) rotate(3deg)}100%{transform:scale(1) rotate(0)}}
@keyframes confetti-fall{0%{opacity:0;transform:translateY(0) rotate(0)}12%{opacity:1}85%{opacity:1}100%{opacity:0;transform:translateY(520px) rotate(var(--turn))}}
@media(max-width:760px){.title-screen{grid-template-columns:1fr;gap:12px;padding:20px}.title-intro{padding:0}.game-title{font-size:44px;margin:12px 0}.title-kicker{font-size:14px}.title-tags{margin:12px 0}.game-menu{display:block;padding:18px}.game-menu label{margin:12px 0 6px}.game-menu #start{margin-top:18px}.game-menu .stat{margin-top:18px}.verdict-effect{min-height:360px}.answer-heading h2{font-size:28px}.answer-quote{font-size:21px}}
@media(prefers-reduced-motion:reduce){.title-intro,.title-star,.burst-mark,.answer-heading,.answer-symbol,body[data-screen="question"] #exercise{animation:none}.confetti{display:none}}
@media print{.title-screen,.confetti{display:none!important}#playScreen{display:block!important}}

/* Compact download control; feedback appears only when needed. */
.setup{border:0;background:transparent;padding:0;flex-wrap:wrap;gap:12px}.setup [hidden]{display:none}.setup #offline{flex-basis:100%;margin:0}
