:root { --ink:#35291f; --muted:#715c4a; --red:#a93c2a; --rust:#963725; --paper:#fffaed; --rule:#574436; --dot:#dccfb0; font-family:"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,system-ui,sans-serif; color:var(--ink); background:#f6edda; font-synthesis:none; }
* { box-sizing:border-box; }
body, figure, p, h1 { margin:0; }
body { min-height:100svh; background:radial-gradient(ellipse at 19% 8%,#fff8e8 8%,transparent 48%),#f6edda; }
[hidden] { display:none!important; }
a,button,input { color:inherit; font:inherit; }
button { cursor:pointer; }
button:disabled { opacity:.48; cursor:default; }
:focus-visible { outline:3px solid #226b87; outline-offset:4px; }
h1:focus { outline:none; }
.mast { border-bottom:1.5px solid var(--rule); background:var(--paper); }
.mast > div { max-width:1140px; padding:0 clamp(18px,4vw,52px); min-height:48px; margin:auto; display:flex; align-items:center; justify-content:space-between; gap:1em; }
.mast a,.mast span { font-size:.83rem; font-weight:750; }
.mast a { min-height:44px; display:inline-flex; align-items:center; gap:.55em; text-decoration:underline; text-underline-offset:3px; }
main { max-width:1140px; margin:auto; padding:clamp(24px,6vh,66px) clamp(18px,4vw,52px) 48px; }
.home { display:grid; grid-template-columns:1fr 1fr; gap:clamp(24px,7vw,80px); align-items:center; }
.intro h1 { font-weight:900; font-size:clamp(2.6rem,5.2vw,4.25rem); line-height:1.04; letter-spacing:-.08em; }
.intro h1 strong { display:inline-block; color:var(--red); font-weight:900; }
.intro p,.round > p { margin-top:15px; line-height:1.75; font-size:1rem; }
.intro p { font-weight:650; }
.intro .challenge-line { margin:0 0 8px; color:var(--muted); font-size:clamp(1rem,2vw,1.25rem); font-weight:750; }
.example { width:min(100%,400px); display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:8px; margin:24px 0 0; color:var(--muted); }
.example div { min-width:0; text-align:center; }
.example canvas { display:block; width:100%; height:auto; }
.example div span { font-weight:700; font-size:.8rem; }
.example-arrow { font-size:1.45rem; }
.sheet { background:var(--paper); border:1.5px solid var(--rule); border-radius:8px; box-shadow:3px 4px 0 #554335; }
.selection { padding:clamp(20px,4vw,34px); }
fieldset { border:0; padding:0; margin:0 0 22px; min-width:0; }
legend { font-size:clamp(1.5rem,3vw,2rem); font-weight:900; letter-spacing:-.04em; margin:0 0 15px; }
.choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.choice { position:relative; }
.choice input { position:absolute; opacity:0; width:1px; height:1px; }
.choice span { min-height:52px; padding:7px 2px; border:1px solid #b09c81; border-radius:4px; background:#fffdf7; display:flex; align-items:center; justify-content:center; text-align:center; font-size:clamp(.85rem,1.7vw,1.03rem); font-weight:750; line-height:1.37; cursor:pointer; white-space:pre-line; }
.choice input:checked + span { background:var(--ink); color:var(--paper); border-color:var(--ink); }
.choice input:focus-visible + span { outline:3px solid #226b87; outline-offset:2px; }
.primary,.secondary { min-height:46px; padding:10px 17px; display:inline-flex; justify-content:center; align-items:center; border:1.5px solid var(--ink); border-radius:5px; font-size:.98rem; font-weight:800; text-align:center; text-decoration:none; }
.primary { background:var(--red); color:white; box-shadow:2px 3px 0 var(--ink); }
.secondary { background:var(--paper); }
.primary:not(:disabled):hover,.secondary:not(:disabled):hover { filter:brightness(.94); }
.selection .primary { width:100%; }
.text-button { min-height:42px; padding:6px 5px; background:none; border:0; color:#644734; font-size:.88rem; font-weight:700; text-decoration:underline; text-underline-offset:4px; }
.round { max-width:800px; margin:auto; text-align:center; }
.round h1 { font-size:clamp(1.55rem,4.4vw,2.9rem); font-weight:850; letter-spacing:-.045em; line-height:1.3; }
.round > p { margin:9px auto 15px; }
.specimen,.workspace,.comparison figure { background-color:#fffaf0; background-image:radial-gradient(circle,var(--dot) .8px,transparent 1px); background-size:17px 17px; }
.specimen,.workspace { width:min(100%, min(52svh,430px)); min-width:min(100%,235px); margin:16px auto 8px; aspect-ratio:1; position:relative; }
.specimen { display:grid; place-content:center; overflow:hidden; }
.specimen img { position:absolute; inset:10% 12% 18%; width:76%; height:72%; object-fit:contain; filter:drop-shadow(1px 3px 1px #50352142); }
.timer { position:absolute; bottom:12px; left:0; width:100%; color:var(--rust); font-size:.86rem; font-weight:700; }
.timer b { font-size:1.65rem; }
.timer-track { position:absolute; bottom:0; left:0; width:100%; height:5px; }
.timer-track i { display:block; background:var(--rust); width:100%; height:100%; transform-origin:left; }
#paper { width:100%; height:100%; position:absolute; inset:0; touch-action:none; cursor:crosshair; border-radius:7px; }
#paper-hint { position:absolute; inset:45% 0 auto; pointer-events:none; color:#80735c; font-weight:700; }
.key-help { clip-path:inset(50%); position:absolute; width:1px; height:1px; overflow:hidden; }
#paper:focus-visible ~ .key-help { clip-path:none; width:auto; height:auto; bottom:3px; left:3px; right:3px; background:#fffaf3f5; font-size:.74rem; color:#544538; padding:2px; }
.actions { display:flex; gap:10px; align-items:center; justify-content:center; flex-wrap:wrap; margin:16px auto 5px; }
.notice { color:var(--rust); font-size:.85rem!important; font-weight:650; }
.notice:empty { display:none; }
.selection .notice { margin-top:12px; }
.score { color:var(--red); font-weight:850; line-height:1.1!important; }
.score strong { font-size:clamp(3.7rem,10vw,6.5rem); font-weight:900; letter-spacing:-.09em; margin:0 .08em; font-variant-numeric:tabular-nums; }
.score b { font-size:clamp(1.4rem,3.7vw,2.35rem); }
.comparison { display:grid; grid-template-columns:1fr 1fr; gap:clamp(10px,2.5vw,22px); }
.comparison figure { padding:clamp(9px,2vw,20px); min-width:0; }
.comparison figcaption { margin-bottom:3px; font-size:clamp(.84rem,2.1vw,1.2rem); font-weight:800; }
.comparison .mine { border-color:var(--rust); }
.mine figcaption { color:var(--red); }
.comparison canvas { display:block; width:100%; height:auto; filter:drop-shadow(1px 3px 1px #68493042); }
.round > .judge-note { color:var(--muted); font-size:.85rem; }
.again { margin-top:5px; }
.notice textarea { width:100%; max-width:700px; font:inherit; }
@media(max-width:700px) { .home { grid-template-columns:1fr; gap:24px; } .intro { position:relative; } .intro h1 { font-size:clamp(2.5rem,11vw,4.25rem); } .example { margin-top:10px; max-width:270px; } .selection { padding:20px; } main { padding-top:22px; } }
@media(max-width:440px) { .home { gap:18px; } .example { max-width:240px; } .intro p { font-size:.93rem; margin-top:8px; } .choice span { min-height:44px; } .selection { padding:17px; } fieldset { margin-bottom:15px; } .comparison { gap:7px; } .comparison figure { padding:8px 4px; box-shadow:2px 3px 0 #554335; } .actions { gap:7px; } .primary,.secondary { padding:9px 11px; font-size:.9rem; } }
