.stage { max-width:640px; margin:24px auto; }
/* No.93: reserve both wrapped instructions and their Japanese ruby. */
.turnbar { --tb-msg-lines:2; --tb-st-lines:2; --tb-rt:11px; --tb-st-rt:11px; }
:root:lang(en) .turnbar { --tb-rt:0px; --tb-st-rt:0px; --tb-msg-lines:3; }
@media(min-width:641px){.turnbar {--tb-msg-lines:2;--tb-st-lines:1;} :root:lang(en) .turnbar{--tb-msg-lines:2;}}
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.form-grid label { display:grid; gap:8px; font-weight:600; }
select { width:100%; min-height:44px; font:inherit; color:var(--ink); background:var(--surface); border:2px solid var(--line-strong); border-radius:6px; padding:8px; }
fieldset { border:1px solid var(--line); border-radius:6px; margin:16px 0; padding:12px; }
fieldset label { display:flex; align-items:center; min-height:44px; gap:8px; }
input[type=checkbox] { width:22px; height:22px; }
#table { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:12px 0; }
.seat { border:2px solid var(--line); border-radius:6px; padding:8px; background:var(--surface); min-width:0; }
.seat.current { border-color:var(--accent); }
.seat-head { display:flex; justify-content:space-between; flex-wrap:wrap; gap:4px; font-size:14px; margin-bottom:8px; }
.dice-row { display:flex; gap:4px; flex-wrap:wrap; min-height:36px; }
.stage .die { width:28px; height:28px; flex:none; filter:var(--shadow-piece); border-radius:6px; }
.covered { display:grid; place-items:center; width:24px; height:28px; border:1px solid var(--line-strong); border-radius:5px; color:var(--ink-sub); background:var(--bg); font-size:18px; }
#bid { padding:10px 12px; border-left:4px solid var(--accent); background:var(--surface); margin:8px 0; min-height:52px; display:flex; align-items:center; font-weight:600; }
#remaining { margin:8px 0; font-size:14px; color:var(--ink-sub); }
.quantity { display:flex; align-items:center; justify-content:center; gap:16px; margin:8px 0; }
#quantity { min-width:36px; text-align:center; font-size:24px; font-weight:700; }
#faces { display:grid; grid-template-columns:repeat(6,1fr); gap:8px; margin:12px 0; }
.face-btn { min-width:0; min-height:48px; padding:4px; border:2px solid var(--line-strong); border-radius:6px; background:var(--surface); cursor:pointer; }
.stage .face-btn .die { width:32px; height:32px; filter:none; margin:auto; }
.face-btn[aria-pressed=true] { border:3px solid var(--accent); background:var(--bg); }
.actions,.toolbar { display:flex; flex-wrap:wrap; gap:8px; }
.actions .btn { flex:1; }
.toolbar { margin:16px 0 8px; }
#handoff { border:2px solid var(--accent); background:var(--surface); padding:16px; margin:12px 0; }
#reveal { border:2px solid var(--line-strong); background:var(--surface); padding:12px; border-radius:6px; margin:12px 0; }
#reveal h2 { margin:0 0 8px; font-size:18px; }
#result { border:2px solid var(--accent); border-radius:6px; padding:16px; margin-top:16px; background:var(--surface); }
#history { padding-left:24px; font-size:14px; }
.howto { margin:24px 0; }.howto img { width:100%; max-width:640px; border:1px solid var(--line); border-radius:6px; }
.table-scroll { overflow-x:auto; }.article th,.article td { padding:10px; vertical-align:top; }
button:focus-visible,select:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
#table .seat { animation:arrive 180ms ease-out; }@keyframes arrive { from { transform:translateY(3px); } to {transform:translateY(0);} }
@media(prefers-reduced-motion:reduce){#table .seat {animation:none;}}
@media(max-width:374px){.seat-head {font-size:14px;}.stage .die {width:24px;height:24px;}.covered {width:24px;height:30px;} #faces {gap:8px;}.stage .face-btn .die{width:28px;height:28px;}}

/* Public call, hidden opponents and visible own dice have distinct roles. */
#play{border:1px solid var(--line);border-radius:6px;padding:12px;background:var(--surface)}
#table{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0;background:#28654c url("assets/dice/felt.webp") center/420px;padding:10px;border-radius:6px}
.seat{flex:1;min-width:80px;color:#fff8ea;background:transparent;border-color:#fff8ea80;padding:8px}
.seat.current{border-color:#f5d66f}.seat.own{order:2;flex-basis:100%;border-color:#f5d66f}
.seat-head{font-size:14px;gap:5px}.seat-role{font-size:14px;margin-bottom:5px}
.dice-row{justify-content:center;gap:8px;min-height:40px}.die-tile{display:grid;justify-items:center;min-width:0;width:42px;padding:2px;border:2px solid transparent;border-radius:6px;font-size:14px}
.stage .die-tile .die{width:38px;height:38px;filter:none;border-radius:0}.die-tile b{line-height:1.2}.die-tile.matching{border-color:#f5d66f;background:#f5d66f22}
.own .die-tile{width:64px;font-size:16px;cursor:pointer}.stage .own .die-tile .die{width:60px;height:60px}
.covered{width:32px;height:36px;background:#173f32;border-color:#fff8ea99;color:#fff8ea}
#bid{display:grid;grid-template-columns:1fr auto;gap:4px 8px;padding:10px;margin:0;min-height:84px;border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:5px;background:var(--bg)}
.call-by{font-size:16px}.call-value{grid-column:2;grid-row:1/3;display:flex;align-items:center;gap:8px;font-size:17px}.stage .call-value .die{width:42px;height:42px;filter:none}.call-value b{font-size:28px}.call-scope{font-size:14px;font-weight:400}
#known{font-size:14px;line-height:1.5;margin:8px 0}.draft-title{font-size:16px;margin:12px 0 6px}.draft{display:flex;justify-content:center;align-items:center;gap:8px;min-height:48px;border:1px dashed var(--line-strong);border-radius:6px;font-size:16px}.stage .draft .die{width:32px;height:32px;filter:none}.draft b{font-size:22px}
.quantity-label{display:block;font-size:14px;margin-top:10px}.quantity{gap:8px;margin:6px 0}.quantity .btn{min-width:44px;min-height:44px}#quantity{width:76px;min-height:44px;font:inherit;font-size:20px;border:2px solid var(--line-strong);border-radius:6px;text-align:center;background:var(--surface);color:var(--ink)}
#quantities{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}.quantity-btn{min-width:44px;min-height:44px;font-size:17px;font-weight:600;border:1px solid var(--line-strong);border-radius:6px;background:var(--surface);color:var(--ink);cursor:pointer}.quantity-btn[aria-pressed=true]{border:2px solid var(--accent);background:var(--accent-soft)}
#faces{margin:10px 0}.face-btn{min-height:48px}.face-btn:disabled{opacity:.5;border-style:dashed;cursor:default}
.decision-actions{display:flex;gap:8px;flex-wrap:wrap}.decision-actions .btn{flex:1;min-height:48px;font-size:17px;white-space:normal}.draft-tools{display:flex;gap:8px;margin-top:8px;justify-content:center}.draft-tools .btn{font-size:16px;min-height:44px}
#cpu-next,#next{width:100%;min-height:48px;margin-top:10px}.reveal-count{display:flex;align-items:center;gap:8px;font-size:18px}.stage .reveal-count .die{width:36px;height:36px;filter:none}.options summary{font-size:16px;padding:10px 0}.toolbar .btn{min-height:44px;font-size:16px}
select{font-size:16px;min-height:44px;padding-right:28px}.language-link{margin-left:auto}
#table .seat{animation:none}.rolling .own .die-tile{animation:roll-dice .26s ease-out}.calling #bid{animation:call-dice .18s ease-out}.opening #reveal,.opening #table{animation:reveal-dice .22s ease-out}
@keyframes roll-dice{0%{transform:translateY(-6px) rotate(-12deg)}60%{transform:translateY(2px) rotate(7deg)}100%{transform:translateY(0) rotate(0)}}@keyframes call-dice{from{transform:translateY(4px)}to{transform:translateY(0)}}@keyframes reveal-dice{from{opacity:.5}to{opacity:1}}
.howto{margin:24px 0}.howto img{display:block;max-width:460px;margin:auto;filter:var(--img-dim)}.howto figcaption{font-size:16px;line-height:1.6}
@media(max-width:480px){#play{padding:10px}#table{padding:8px}.seat{padding:6px;min-width:64px}.seat-head{display:block}.seat-head span{display:block;margin-top:3px}.seat-role{font-size:14px}.own .seat-head{display:flex}.own .die-tile{width:46px}.stage .own .die-tile .die{width:42px;height:42px}.own .dice-row{gap:6px}.call-value{font-size:15px;gap:5px}.call-value b{font-size:25px}.stage .call-value .die{width:36px;height:36px}.call-by{font-size:15px}#faces{gap:8px}.stage .face-btn .die{width:28px;height:28px}.form-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.rolling .own .die-tile,.calling #bid,.opening #reveal,.opening #table{animation:none}}

/* Reduce duplicate labels so the choice and decision stay near the dice. */
.seat.own .seat-role{display:none}.seat:not(.own){display:grid;grid-template-columns:36px minmax(0,1fr);align-items:center;gap:4px 6px}
.seat:not(.own) .seat-head{grid-column:1/-1;margin-bottom:4px}.seat:not(.own) .seat-role{grid-column:2;grid-row:2;margin:0}.seat:not(.own) .dice-row{grid-column:1;grid-row:2;min-height:36px}
.draft-title{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);margin:0}.draft{min-height:36px;margin-top:8px}
.quantity-label{margin:0}.turnbar{--tb-st-lines:1}.stage .own .die-tile .die{width:56px;height:56px}
@media(max-width:480px){.seat-head{display:flex}.seat-head span{margin:0}.stage .own .die-tile .die{width:38px;height:38px}.quantity{gap:8px}}

.revealed #table{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.revealed .seat:not(.own){display:block}.revealed .seat.own{order:0}.revealed .seat .dice-row{gap:4px;justify-content:start}.revealed .seat .die-tile{width:42px;font-size:16px}.stage .revealed .seat .die-tile .die{width:34px;height:34px}
@media(max-width:480px){.revealed .seat .die-tile{width:32px;padding:1px;border-width:1px;font-size:14px}.stage .revealed .seat .die-tile .die{width:28px;height:28px}}

/* Avoid a second padded frame reducing the six touch targets below 44px. */
.stage{padding:10px}#play{padding:0;border:0}
@media(max-width:480px){#play:not(.revealed) .seat:not(.own){grid-template-columns:minmax(0,1fr)}#play:not(.revealed) .seat:not(.own) .dice-row{grid-column:1;grid-row:2;justify-content:center}#play:not(.revealed) .seat:not(.own) .seat-role{grid-column:1;grid-row:3;text-align:center;word-break:keep-all}}
