:root{color-scheme:light;--ink:#203c43;--paper:#f8f4e8;--red:#a9412d;--muted:#52605a;--rule:#cbc6b5;--serif:Georgia,"Yu Mincho","Hiragino Mincho ProN","Noto Serif CJK JP","MS PMincho",serif;--sans:"Instrument Sans","Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,system-ui,sans-serif;font:16px/1.45 var(--sans);color:var(--ink);background:var(--paper);-webkit-text-size-adjust:100%}
*{box-sizing:border-box}
body{margin:0;min-height:100svh;background:radial-gradient(ellipse at 10% 30%,#fff9e975,transparent 67%),var(--paper)}
[hidden]{display:none!important}
button,a,#pad{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
button{color:inherit;font:inherit;cursor:pointer}
button:focus-visible,a:focus-visible,#pad:focus-visible{outline:3px solid #bc5632;outline-offset:3px}
.icons{position:absolute;width:0;height:0;overflow:hidden}
.glyph{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.topbar{border-bottom:1px solid var(--ink);padding-top:env(safe-area-inset-top)}
.topinner,.layout,footer>div{width:min(calc(100% - 72px),1160px);margin-inline:auto}
.topinner{min-height:66px;display:flex;align-items:center;justify-content:space-between;gap:14px}
.studio{display:flex;align-items:center;gap:9px;font:700 25px/1 var(--serif);letter-spacing:-.045em}
.fish{color:var(--red);width:40px;height:32px}
.tools{display:flex;align-items:center;gap:3px}
.tools button{min-width:42px;min-height:42px;display:grid;place-items:center;background:none;border:0;border-radius:6px}
.tools button:hover{background:#e9e5d7}
#language{font:750 15px/1 var(--sans);margin-left:5px;border-left:1px solid var(--rule);border-radius:0;padding-left:13px}
#sound .on-wave{display:none}#sound[aria-pressed=true] .on-wave{display:block}#sound[aria-pressed=true] .off-wave{display:none}
.layout{display:grid;grid-template-columns:minmax(225px,.67fr) minmax(410px,1.38fr);gap:clamp(28px,4vw,68px);align-items:center;padding:clamp(22px,4vh,48px) 0}
.english-title{margin:0 0 12px;color:var(--red);font:750 13px/1.3 var(--sans);letter-spacing:.19em}
h1,h2,p,dl,dd{margin:0}h1{font:900 clamp(48px,5.6vw,83px)/1.12 var(--serif);letter-spacing:-.075em;white-space:normal;line-break:strict}
h1 span{display:inline-block}h1 span:first-child{display:block}
h1 i{display:inline-block;width:.29em;height:.29em;border:.073em solid var(--red);border-radius:50%;margin-left:.025em;vertical-align:.01em}
html[lang=en] .english-title{display:none}html[lang=en] h1 span:first-child{display:inline;margin-right:.12em}html[lang=en] h1 i{display:none}
.lede{font-size:clamp(13px,1.3vw,16px);line-height:1.8;color:var(--muted);font-weight:550;margin-top:18px;text-wrap:pretty}
.records{max-width:315px;margin-top:clamp(24px,4vh,54px);border-top:2px solid var(--ink);border-bottom:1px solid var(--ink)}
.records dt{font-size:13px;font-weight:700;letter-spacing:.04em}.attempt{padding:17px 0 15px}.attempt dt{color:var(--muted)}.attempt dd{font:600 clamp(36px,4.4vw,62px)/1.12 var(--serif);letter-spacing:-.05em;font-variant-numeric:lining-nums tabular-nums}
.personal{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--rule);padding:11px 0;gap:6px}.personal dt{display:flex;align-items:center;gap:7px;color:var(--muted)}.personal .glyph{width:16px;height:16px}
.personal dd{font:600 20px/1 var(--serif);white-space:nowrap}
.game{min-width:0;border:1.5px solid var(--ink);border-radius:14px;overflow:hidden;background:#d9e5d5;box-shadow:0 4px 0 #203c433d;isolation:isolate}
.tableau{position:relative;isolation:isolate;height:clamp(350px,min(39vw,58svh),520px);overflow:hidden}
#stage{display:block;width:100%;height:100%}
#phase{position:absolute;left:17px;top:15px;pointer-events:none;color:#fff8e7;background:#294743;border:1px solid #203c4370;border-radius:4px;padding:5px 11px;font-size:12px;line-height:1.4;font-weight:700;letter-spacing:.06em}
[data-state=result] #phase{visibility:hidden}
#pad{background:#233f46;color:#fff8e8;position:relative;text-align:center;padding:13px clamp(20px,3vw,40px) 17px;cursor:ew-resize;touch-action:none;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none;border-top:2px solid var(--ink);outline-offset:-4px}
#pad[data-press=true]{background:#294952}#pad[aria-disabled=true]{cursor:default}
.pad-title{font-weight:700;letter-spacing:.075em;font-size:15px;margin-bottom:4px}
.pad-ends{display:flex;align-items:center;gap:15px;max-width:550px;margin:auto}
.pad-ends>span:not(.rail){font-size:13px;color:#e5e6d6;min-width:2.4em;font-weight:600}
.rail{flex:1;height:24px;position:relative;display:block;pointer-events:none}
.grooves{position:absolute;inset:8px 0;background:repeating-linear-gradient(90deg,#98aaa5 0 1px,transparent 1px 7px);border-block:1px solid #bdc6b9aa}
#pressureCue{position:absolute;left:clamp(17px,var(--grip-position,22%),calc(100% - 17px));top:50%;transform:translate(-50%,-50%);width:35px;height:20px;border:1px solid #1b3237;border-radius:6px;background:linear-gradient(90deg,transparent 0 34%,#c4ba9e 35% 38%,transparent 39% 48%,#c4ba9e 49% 52%,transparent 53% 62%,#c4ba9e 63% 66%,transparent 67%),#faeed2;box-shadow:0 2px 0 #102f36}
.result{position:relative;width:100%;padding:13px clamp(12px,3vw,27px);background:#fff9ed;border-top:1.5px solid var(--ink);overflow-wrap:anywhere}
#result-ad{width:320px;margin:0 0 16px calc((100% - 320px)/2);text-align:center;line-height:0}
#result-ad small{display:block;margin-bottom:3px;color:var(--muted);font-size:10px;line-height:14px}
#result-ad .admax-ads{width:320px;height:50px;vertical-align:top}
[data-state=result] #pad{display:none}
.result-actions{max-width:520px;margin-inline:auto}

.result-row,.result-actions{display:flex;align-items:center;gap:10px;justify-content:space-between}.result h2,#rules h2{font:800 25px/1.24 var(--serif)}
#resultWeight{font:700 25px/1.2 var(--serif);white-space:nowrap;color:var(--red)}#reason{font-size:14px;line-height:1.55;margin:6px 0 10px}
.result-actions button,.primary,.secondary{border-radius:6px;min-height:42px;border:1px solid var(--ink);padding:6px 14px;font-weight:750}
.primary{background:var(--ink);color:var(--paper)}.primary:hover{background:#32525a}#again{flex:1}
.secondary{background:transparent;display:flex;align-items:center;justify-content:center;gap:6px}.secondary .glyph{width:17px;height:17px}
#shareStatus:not(:empty){margin-top:5px;font-size:13px;white-space:pre-line;overflow-wrap:anywhere;user-select:text}
footer>div{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--rule);min-height:43px;padding-bottom:env(safe-area-inset-bottom);color:var(--muted);gap:10px}footer small,footer a{font-size:12px}a{color:inherit;text-underline-offset:3px}
#rules{width:min(390px,calc(100% - 34px));max-height:86svh;background:var(--paper);color:var(--ink);border:1.5px solid var(--ink);border-radius:12px;padding:23px;box-shadow:0 4px 0 #142e3370}
#rules::backdrop{background:#17313988}
#rules ol{padding-left:1.5em;line-height:1.65;margin:14px 0}#rules li+li{margin-top:7px}.keys{font-size:13px;color:var(--muted);margin:10px 0 18px}#closeRules{width:100%}
@media(max-width:760px){
 .topinner,.layout,footer>div{width:min(calc(100% - 28px),540px)}.topinner{min-height:48px}.studio{font-size:20px;gap:5px}.fish{width:32px;height:26px}.tools button{min-width:37px}
 .layout{display:block;padding:13px 0 12px}.intro{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:12px}
 .english-title{font-size:10px;letter-spacing:.16em;margin-bottom:3px}h1{font-size:clamp(26px,7.15vw,41px);line-height:1.18;white-space:nowrap}h1 span:first-child{display:inline}.lede{font-size:clamp(12px,2.85vw,14px);line-height:1.42;margin-top:6px;max-width:26em}
 .records{margin:0;padding-left:12px;border:0;border-left:1px solid var(--rule);min-width:81px;text-align:right;max-width:37%}
 .attempt{padding:0}.records dt{font-size:11px;letter-spacing:0}.attempt dd{font-size:clamp(23px,6.45vw,36px);line-height:1.2;white-space:nowrap}
 .personal{border:0;display:block;padding:2px 0 0}.personal dt{font-size:10px;justify-content:flex-end;gap:3px}.personal .glyph{width:11px;height:11px}.personal dd{font-size:15px}
 .tableau{height:clamp(240px,calc(100vh - 282px),146vw);height:clamp(240px,calc(100svh - 282px),146vw);max-height:590px}#phase{left:11px;top:10px;padding:4px 8px;font-size:11px}
 #pad{padding:12px 20px 15px}.pad-title{font-size:14px}.pad-ends{gap:10px}footer>div{min-height:34px}.game{border-radius:12px}
}
@media(max-width:355px){.topinner,.layout,footer>div{width:calc(100% - 18px)}.records{padding-left:5px;min-width:76px}.attempt dd{font-size:clamp(19px,6vw,23px)}.personal dt{white-space:nowrap}.lede{font-size:11px}.tableau{height:clamp(210px,calc(100svh - 255px),145vw)}}
@media(min-width:761px) and (max-height:600px){.topinner{min-height:48px}.layout{padding-block:13px}.tableau{height:clamp(230px,52svh,330px)}.records{margin-top:15px}}
@media(max-width:760px){
 [data-state=result] .tableau{--result-height:clamp(132px,calc(100vh - 364px),126vw);height:var(--result-height)}
 @supports (height:100svh){[data-state=result] .tableau{--result-height:clamp(132px,calc(100svh - 364px),126vw)}}
 /* Make room above the score without moving the retry button after a country lookup or loader error. */
 [data-state=result] .game:has(#result-ad:not([hidden])) .tableau{height:calc(min(590px,var(--result-height)) - 83px)}
}
