*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{margin:0;height:100%;width:100%;overflow:hidden;overscroll-behavior:none;font-family:system-ui,-apple-system,"Noto Sans JP",sans-serif;color:#fff6e8;background:#d6523e}body{position:fixed;inset:0;background:radial-gradient(ellipse at 35% 15%,#e56548 0,#d6523e 55%,#bd3b30 100%)}button{display:flex;align-items:center;justify-content:center;min-height:52px;width:100%;padding:12px 16px;text-align:center;border:2px solid #fff2da;border-radius:14px;background:#fff6e8;color:#6c281f;font:750 17px/1.25 system-ui,-apple-system,sans-serif;cursor:pointer;touch-action:manipulation;user-select:none;-webkit-user-select:none;box-shadow:0 4px 0 #8e2a2440}button.primary{background:#652720;border-color:#652720;color:#fff8e7}button:active{transform:translateY(2px);box-shadow:0 2px 0 #8e2a2440}button:focus-visible{outline:3px solid #ffeaad;outline-offset:3px}#app{height:100%;height:100dvh;width:100%;max-width:500px;margin:auto;display:flex;flex-direction:column;gap:10px;padding:max(16px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left))}header{flex:none;text-align:center}h1{font-size:clamp(26px,7.4vw,37px);font-weight:900;line-height:1.15;letter-spacing:.02em;margin:4px 0 0;text-shadow:0 2px 0 #a9302540}.board{display:flex;justify-content:center;align-items:center;flex:1;min-height:0;min-width:0}canvas{display:block;flex:none;width:var(--board-size,320px);height:var(--board-size,320px);touch-action:none;user-select:none;-webkit-user-select:none}section{flex:none}p{margin:0}.buttons{display:grid;grid-template-columns:1fr 1fr;gap:11px}.best{text-align:center;font-size:16px;font-weight:650;line-height:1.5}.best:empty{display:none}#title-best{margin:0 0 14px}#rules p{font-size:17px;line-height:1.7;margin:0 0 14px;text-align:left}#hud{margin-top:16px}.readouts{display:flex;align-items:baseline;justify-content:space-between;gap:12px;font-size:16px;font-variant-numeric:tabular-nums}.readouts strong{font-size:32px;font-weight:850;letter-spacing:-.035em}.timer-track{height:7px;border-radius:6px;background:#8a2a2850;margin-top:9px;overflow:hidden}#timer-fill{height:100%;background:#ffedb9;transform-origin:left;border-radius:6px}#app[data-screen=play] h1,#app[data-screen=result] h1{font-size:20px;line-height:1.3}#app[data-screen=play] .title-break,#app[data-screen=result] .title-break{display:none}#app[data-screen=result]{gap:9px}#result-summary{text-align:center}.result-score{font-size:19px;font-weight:750;line-height:1.25;white-space:nowrap;margin:4px 0 12px}.result-score strong{display:block;font-size:clamp(66px,20vw,88px);font-weight:950;letter-spacing:-.065em;font-variant-numeric:tabular-nums;line-height:1.08;margin:2px 0}.result-score strong span{font-size:.48em;letter-spacing:-.025em;margin-left:3px}#comment{font-size:17px;line-height:1.6;white-space:pre-line;font-weight:600;text-wrap:pretty}#result-best{margin-top:10px}#app[data-screen=result] .board{flex:1;opacity:.92}#app[data-screen=result] canvas{filter:drop-shadow(0 1px 0 #fff2)}[hidden]{display:none!important}@media(max-height:660px){#app{gap:8px;padding-top:max(10px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom))}h1{font-size:29px}.result-score strong{font-size:62px}.result-score{margin-bottom:7px}#comment{font-size:15px;line-height:1.5}#result-best{margin-top:6px}button{min-height:47px;font-size:16px}.buttons{gap:8px}#rules p{font-size:16px;line-height:1.55}}@media(max-height:540px) and (min-width:600px){#app{max-width:980px;display:grid;grid-template-columns:minmax(220px,1fr) minmax(260px,1fr);grid-template-rows:auto 1fr auto;column-gap:25px;padding:14px 24px;align-items:center}.board{grid-column:1;grid-row:1/4;width:100%;height:100%}header{grid-column:2;grid-row:1}#title-controls,#rules,#result-actions{grid-column:2;grid-row:3}#result-summary{grid-column:2;grid-row:2}.result-score{font-size:16px;display:flex;align-items:baseline;justify-content:center;gap:8px;margin:0 0 6px}.result-score strong{font-size:55px;display:inline;margin:0}#comment{font-size:14px;line-height:1.4}#result-best{font-size:14px;margin-top:6px}#app[data-screen=result] h1{font-size:18px}#hud{margin-top:24px}#rules p{font-size:16px}button{min-height:45px;font-size:16px}.buttons{gap:8px}.readouts strong{font-size:30px}}

#app[data-screen=rules] .board{display:none}#app[data-screen=rules] h1{font-size:21px;line-height:1.3}#app[data-screen=rules] .title-break{display:none}#rules{flex:1;min-height:0;display:flex;flex-direction:column;gap:12px}.guide-panels{flex:1;min-height:0;display:grid;grid-template-rows:repeat(3,minmax(0,1fr));gap:10px}.guide-card{min-height:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.02fr);align-items:center;gap:12px;padding:6px 10px 6px 4px;border:1px solid #fff0cf50;border-radius:18px;background:#94372a19}.guide-picture{min-width:0;min-height:0;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden}.guide-card p{font-size:clamp(15px,4.2vw,20px)!important;font-weight:750;text-align:center!important;line-height:1.55!important;margin:0!important}.guide-canvas{touch-action:manipulation;pointer-events:none}.guide-card:nth-child(2){background:#ffe7ba12}@media(max-height:620px){#app[data-screen=rules]{gap:7px}.guide-panels{gap:6px}#rules{gap:8px}.guide-card{padding-top:2px;padding-bottom:2px;border-radius:14px}.guide-card p{font-size:16px!important}}@media(max-height:540px) and (min-width:600px){#app[data-screen=rules]{display:flex;max-width:980px}#app[data-screen=rules] header{flex:none}#rules{width:100%;gap:8px}.guide-panels{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:minmax(0,1fr);gap:12px}.guide-card{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:0;padding:3px 6px 10px}.guide-card p{font-size:16px!important;line-height:1.35!important}#rules #back{align-self:center;width:min(340px,100%)} }

html,body{color:#382619;background-color:#cda66e}body{background-image:linear-gradient(110deg,#fff8df25,#4c2c110c),var(--table-image);background-size:auto,512px 1024px;background-position:0 0}h1{color:#3d261a;text-shadow:0 1px 1px #fff8e9bd}button{border-color:#78503360;background:#fff8eae8;color:#56331e;box-shadow:0 4px 0 #5835142e}button.primary{background:#603923;border-color:#603923;color:#fff9e8}button:focus-visible{outline-color:#6a432c}.best{color:#3d261a;text-shadow:0 1px 1px #fff8e9bd}#hud{padding:10px 13px 12px;border-radius:16px;background:#fff9e6d9;border:1px solid #fff9e6e6;box-shadow:0 3px 12px #54381512}.timer-track{background:#603b251f}#timer-fill{background:#814328}#result-summary{padding:10px 14px;background:#fff8e9ed;border:1px solid #fffdf2bd;border-radius:19px;box-shadow:0 3px 18px #4f33141c}#comment{color:#4b2e1b}.guide-card,.guide-card:nth-child(2){background:#fff7e7b8;border-color:#fff9edd9;color:#432a1c}.guide-picture{border-radius:14px;background-image:var(--table-image);background-size:256px 512px}#app[data-screen=result] canvas{filter:none}@media(max-height:540px) and (min-width:600px){#hud{margin-top:16px}#result-summary{padding:7px 10px}}

header{position:relative}.sound-toggle{position:absolute;top:0;right:0;width:36px;min-height:36px;height:36px;padding:7px;border-radius:10px;border-width:1px;background:#fff8eacc;box-shadow:none}.sound-toggle svg{width:21px;height:21px;display:block}.sound-toggle[aria-pressed=true]{opacity:.65}
#score-form{margin-bottom:10px;text-align:left}#score-form label{display:block;font-size:16px;font-weight:700;margin-bottom:6px}.registration{display:grid;grid-template-columns:minmax(0,1fr) 84px;gap:8px}#nickname{width:100%;min-width:0;min-height:48px;border:1px solid #785033;border-radius:10px;background:#fffaf1;color:#382619;padding:10px 12px;font:16px/1.5 system-ui;touch-action:manipulation;user-select:text;-webkit-user-select:text}#register-status{font-size:14px;line-height:1.5;margin-top:6px;overflow-wrap:anywhere}button:disabled{opacity:.55;cursor:default}.result-ranking{margin-bottom:10px}#app[data-screen=result]{overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}#app[data-screen=result] .board{min-height:120px}#result-actions{padding-bottom:12px}#ranking-dialog{width:min(580px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:18px;border:1px solid #78503360;border-radius:16px;background:#fff8ea;color:#382619;overflow-y:auto;overscroll-behavior:contain}#ranking-dialog::backdrop{background:#26180ca6}.ranking-header{display:flex;align-items:center;justify-content:space-between;gap:12px}.ranking-header h2{margin:0;font-size:24px}.ranking-header button{width:auto;min-width:76px}.ranking-description,#ranking-status{font-size:16px;line-height:1.5;margin:16px 0}.ranking-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:16px}.rank-column{width:52px}.score-column{width:88px}.ranking-table :is(th,td){text-align:center;vertical-align:middle;padding:12px 6px;border-bottom:1px solid #78503340;overflow-wrap:anywhere;white-space:normal;line-height:1.5}.ranking-table td:last-child{font-variant-numeric:tabular-nums}.ranking-table th{font-size:14px}#title-controls .ranking-open{grid-column:1/-1}@media(max-height:540px) and (min-width:600px){#app[data-screen=result]{align-items:start;grid-template-rows:auto auto auto}#app[data-screen=result] .board{position:sticky;top:0;height:calc(100dvh - 28px);min-height:200px}#result-summary{margin-bottom:10px}}
