:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#fff9ed;background:#103b36;font-size:16px;line-height:1.5;font-weight:400;--paper:#fff9ed;--ink:#142c29;--accent:#f4c46a;--border:#6c8a80}*{box-sizing:border-box}body{margin:0}h1,h2,h3,p{margin:0 0 16px}h1{font-size:28px;font-weight:600;line-height:1.2}h2,h3,.rank{font-size:20px;font-weight:600;line-height:1.2}h3{margin-bottom:8px}button,input,textarea,select{font:inherit;max-width:100%}button,summary,input:not([type=radio]),textarea{min-height:44px}button,summary{cursor:pointer}button{padding:8px 16px;border:2px solid var(--border);border-radius:8px;background:var(--paper);color:var(--ink);font-weight:600;min-width:44px}button:disabled{opacity:.65;cursor:default}button.primary{background:var(--accent);border-color:#714900}button.destructive{background:#a52b32;color:var(--paper)}input:not([type=radio]),textarea{display:block;width:100%;padding:8px;border:2px solid var(--border);border-radius:8px;background:#fff;color:var(--ink)}label{display:block;margin-bottom:8px}fieldset{margin:24px 0 16px;padding:16px;border:2px solid var(--border);min-width:0}legend{font-weight:600}summary{padding:8px;font-weight:600;overflow-wrap:anywhere}input[type=radio]{width:24px;height:24px;flex-shrink:0}.radio{display:flex;gap:8px;align-items:center;min-height:44px}.shell{max-width:720px;margin:auto;padding:32px}.shell.has-game{max-width:1280px}header{display:flex;flex-wrap:wrap;gap:16px;align-items:start;margin-bottom:24px}header h1{margin:0}header .connection{margin-left:auto}header .rules{width:100%;order:2}header .rules:not([open]){width:auto;order:0}main{min-width:0}.panel,.seat{background:var(--paper);color:var(--ink);padding:24px;border:2px solid var(--border);border-radius:12px;margin-bottom:24px;overflow-wrap:anywhere;min-width:0}.panel>button,.panel>input,.panel>textarea{margin-bottom:8px}.panel>button{margin-right:8px}.panel p,.seat p{color:#425b55}.meta,.badges,.selection-label{font-size:14px;font-weight:600}.meta{font-variant-numeric:tabular-nums}.lobby-seats{list-style:none;padding:0;margin:24px 0}.lobby-seats .seat{padding:16px;margin-bottom:8px;background:#fff}.seat.current-turn{border-color:var(--accent);outline:2px solid var(--accent)}.seat.own-seat{border-style:double}.table-seats{list-style:none;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:24px 0;border:2px solid var(--border);border-radius:16px;padding:16px}.table-seats .seat{margin:0;padding:16px}.table-seats .own-seat{grid-column:1/-1;max-width:100%}.game-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:24px}.context-rail{min-width:0}.table-content{min-width:0}.cards{display:flex;flex-wrap:wrap;gap:8px}.card-group{width:72px;min-width:0;position:relative}.card{width:72px;min-height:104px;border:2px solid var(--border);border-radius:12px;background:var(--paper);color:var(--ink);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:4px;box-shadow:0 4px 16px rgba(0,0,0,.12)}button.card{padding:4px}button.card[aria-pressed=true]{border:2px solid #714900;outline:2px solid var(--accent);outline-offset:2px}.card.red{color:#9f2635}.suit{font-size:20px;font-weight:600;line-height:1.2}.badges{display:flex;flex-direction:column;line-height:1.5;color:var(--ink)}.selection-label{color:var(--ink)}.effect{font-size:14px;color:var(--ink)}.effect summary{padding:8px 4px;min-width:44px}.effect[open] p{position:absolute;z-index:3;background:var(--paper);border:2px solid var(--border);border-radius:8px;padding:16px;width:min(260px,calc(100vw - 64px));max-width:100vw;left:0;box-shadow:0 4px 16px rgba(0,0,0,.12)}.card-group:nth-child(3n) .effect[open] p{left:auto;right:0}.actions{display:flex;flex-wrap:wrap;gap:8px}.rules p{max-width:720px}.rules[open]{background:var(--paper);color:var(--ink);border-radius:12px;padding:16px}.collection{margin-bottom:24px}.collection>.panel{margin-top:8px}.public-history{border:2px solid var(--border);border-radius:12px;padding:8px}.log{max-height:320px;overflow:auto;padding-left:24px;overflow-wrap:anywhere}.log li{margin-bottom:8px}.scores{width:100%;border-collapse:collapse;margin-bottom:24px;font-variant-numeric:tabular-nums}.scores th,.scores td{text-align:left;padding:8px;border-bottom:2px solid var(--border);overflow-wrap:anywhere}.scores th{font-size:14px;font-weight:600}.scores td{font-size:16px}.error{padding:16px;border:2px solid var(--accent);border-radius:8px}.announcement:empty{display:none}.turn{font-weight:600}footer{display:flex;flex-wrap:wrap;gap:16px;margin:24px 0;color:#d1e0d9}dialog{max-width:min(560px,calc(100% - 32px));background:var(--paper);color:var(--ink);padding:24px;border:2px solid var(--border);border-radius:12px}dialog button{margin:8px 8px 0 0}dialog::backdrop{background:rgba(0,0,0,.6)}:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.panel :focus-visible,.seat :focus-visible,.rules[open] :focus-visible,dialog :focus-visible{outline-color:#714900}button:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible{position:relative;z-index:4}@media(min-width:960px){.table-seats .seat:nth-child(3){grid-column:2}.table-seats .seat:nth-child(4){grid-column:1;grid-row:2}.table-seats .own-seat{grid-column:1/-1;justify-self:center;min-width:280px}}@media(max-width:959px){.game-layout{display:block}.context-rail{margin-top:24px}.card-group,.card{width:56px}.card{min-height:88px}}@media(max-width:599px){.shell{padding:16px}.panel{padding:16px}.table-seats{padding:8px;gap:8px}.table-seats .seat{padding:8px}header{gap:8px}header .connection{margin-left:0;width:100%}.scores thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.scores,.scores tbody,.scores tr,.scores td{display:block}.scores tr{margin-bottom:16px;border:2px solid var(--border);border-radius:8px}.scores td{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}.scores td:before{content:attr(data-label);font-size:14px;font-weight:600}.effect[open] p{width:200px}.table-seats h3{font-size:20px}}@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
.effect[open] p,.card-group:nth-child(3n) .effect[open] p{position:fixed;left:16px;right:16px;bottom:16px;width:auto;max-width:560px;max-height:60vh;overflow:auto;margin:0 auto;z-index:10}
.announcement{white-space:pre-line;overflow-wrap:anywhere}
/* Lead visual-QA addendum: compact current table, preserving lobby readability. */
.has-game{padding-top:16px}.has-game header{margin-bottom:8px;gap:8px}.has-game header p{margin-bottom:0}.has-game main>.announcement{max-height:80px;overflow:auto;margin:8px 0;line-height:1.5;white-space:pre-line}.has-game main>.announcement:empty{margin:0}.has-game .table-content>h2,.has-game .turn{margin-bottom:8px}.has-game .table-seats{grid-template-columns:repeat(5,minmax(0,1fr));padding:8px;gap:8px;margin:8px 0 16px}.has-game .table-seats .seat,.has-game .table-seats .own-seat{grid-column:auto;grid-row:auto;min-width:0;max-width:100%;width:100%;padding:8px;justify-self:stretch}.has-game .table-seats h3{font-size:14px;line-height:1.5;margin-bottom:0}.has-game .table-seats p{font-size:14px;line-height:1.5;margin:0}.has-game .panel{padding:16px;margin-bottom:16px}.has-game .panel>h2{margin-bottom:8px}.has-game .empty-cards{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px;padding:8px 16px}.has-game .empty-cards h2,.has-game .empty-cards p{margin:0}.has-game .card{min-height:104px}.has-game .card .badges{line-height:1.5}.has-game .effect summary{min-height:44px}.has-game .card-group{width:56px}.has-game .card{width:56px}.has-game .cards{gap:8px}.has-game .context-rail>p{font-size:14px}.has-game .seat-status{color:#425b55}
@media(max-width:959px){.has-game .table-seats{grid-template-columns:repeat(2,minmax(0,1fr))}.has-game .table-seats .own-seat{grid-column:1/-1}.has-game .table-seats .own-seat h3,.has-game .table-seats .own-seat p{display:inline;margin-right:8px}.has-game .card{min-height:88px}}
@media(max-width:599px){.has-game header{align-items:center}.has-game header .connection{width:auto;margin-left:auto}.has-game .table-seats{padding:4px;margin-bottom:8px;gap:4px}.has-game .table-seats .seat{padding:4px 8px}.has-game .panel{padding:8px;margin-bottom:8px}.has-game .panel>h2{font-size:20px}.has-game .table-seats h3,.has-game .table-seats p{line-height:1.5}.has-game main>.announcement{max-height:64px;margin:4px 0}.has-game .cards{gap:8px}.has-game .card-group,.has-game .card{width:56px;min-width:56px;max-width:56px}.has-game .card .rank{font-size:20px}.has-game .effect summary{font-size:14px}.has-game .card .badges{font-size:14px}}
.has-game main>.announcement p{margin:0 0 4px}.has-game main>.announcement p:last-child{margin-bottom:0}
.play-zone{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:16px;min-width:0}.play-zone>.panel{min-width:0}.has-game .card .badges{white-space:nowrap}
@media(min-width:960px){.has-game .card-group,.has-game .card{width:72px}.has-game .card{min-height:104px}}
@media(max-width:599px){.play-zone{grid-template-columns:minmax(0,1fr);gap:0}}

/* Preserve source labels; narrow collections wrap instead of shrinking cards. */
.card .rank,.effect summary{white-space:nowrap;overflow-wrap:normal;word-break:normal}.effect summary{padding-inline:0;display:block;text-align:center;text-decoration:underline}
