*{box-sizing:border-box}html,body{margin:0;height:100%;font-family:"Noto Serif SC","Songti SC",serif;background:#f6efe8;color:#283238}body{overflow:hidden}.game-root{height:100dvh;min-height:100svh;overflow:hidden;overscroll-behavior:none;background:radial-gradient(circle at 22% 16%,rgba(255,205,179,.5),transparent 28%),radial-gradient(circle at 82% 8%,rgba(155,192,188,.32),transparent 28%),linear-gradient(135deg,#fff8ed,#e9eee9 55%,#f2e5dc);padding:10px;display:flex;flex-direction:column;gap:8px}.topbar{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 14px;background:rgba(255,255,255,.64);border:1px solid rgba(93,78,71,.16);box-shadow:0 12px 35px rgba(83,65,51,.1);backdrop-filter:blur(12px)}.eyebrow{margin:0 0 4px;letter-spacing:.14em;font-size:11px;color:#8c6f67;font-family:system-ui,sans-serif}.topbar h1{margin:0;font-size:28px;line-height:1;color:#273f43}.top-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}button,select{font:inherit}button{border:0;min-height:36px;padding:7px 12px;cursor:pointer;transition:.18s transform,.18s filter}button:active{transform:translateY(1px)}.primary{background:#345c5c;color:white;box-shadow:0 8px 18px rgba(52,92,92,.22)}.secondary{background:#b56b58;color:white}.ghost{background:rgba(255,255,255,.72);color:#415052;border:1px solid rgba(68,83,85,.2)}button:disabled{opacity:.42;cursor:not-allowed}.table-layout{flex:1;min-height:0;display:grid;grid-template-columns:270px minmax(0,1fr) 310px;gap:12px}.panel,.board{background:rgba(255,255,255,.66);border:1px solid rgba(83,65,51,.14);box-shadow:0 16px 38px rgba(70,54,45,.12);backdrop-filter:blur(12px);min-height:0}.panel{padding:10px;overflow:hidden}.left-panel{display:flex;flex-direction:column;gap:12px}.left-panel h2,.hand-head h2{margin:0;color:#2e4a4d}.summary{font-size:12px;line-height:1.45;color:#5c5550;margin:0}.field{font-size:13px;color:#65534b;display:grid;gap:5px}select{width:100%;padding:9px;border:1px solid #d2c3b8;background:#fffaf4;color:#374648}.score-grid{display:grid;gap:8px}.score-item{padding:10px;background:#fffaf4;border:1px solid #e2d4c9}.score-item b{display:flex;justify-content:space-between;color:#2e4b4f}.mini{font-size:12px;color:#806f68;margin-top:4px}.memory-box{margin-top:auto;padding:12px;background:#edf3ef;border-left:4px solid #6d9692}.memory-box h3{margin:0 0 8px}.memory-box p{font-size:13px;line-height:1.55}.board{padding:12px;display:flex;flex-direction:column;gap:12px;overflow:hidden}.opponents{display:grid;grid-template-columns:1fr 1fr;gap:10px}.opponent{display:grid;grid-template-columns:62px 1fr;gap:8px;align-items:center;padding:8px;background:rgba(255,250,244,.85);border:1px solid #e0d1c4}.avatar-wrap{width:62px;height:62px;overflow:hidden;background:#efe1d6}.avatar-wrap img{width:100%;height:100%;object-fit:cover}.opponent h3{margin:0;color:#2d474a}.opponent .stats{display:flex;gap:8px;flex-wrap:wrap;margin-top:5px}.chip{display:inline-flex;align-items:center;gap:4px;padding:4px 7px;background:#edf4f0;border:1px solid #cbded8;font-size:12px;color:#3f5658}.public-area{display:grid;grid-template-columns:1fr 1fr 1.3fr;gap:10px}.pile-card,.turn-card,.action-card{padding:10px;background:#fdf8f0;border:1px solid #e2d4c7;min-height:86px;display:flex;flex-direction:column;justify-content:center;gap:5px}.pile-card span,.turn-card span{font-size:13px;color:#7f6a5f}.pile-card strong,.turn-card strong{font-size:28px;color:#294a4d}.pile-card small,.turn-card small{color:#76665f;font-size:12px;line-height:1.4}.action-card{flex-direction:row;align-items:center;flex-wrap:wrap}.hand-zone{flex:1;min-height:0;display:flex;flex-direction:column;padding:10px;background:rgba(240,231,220,.48);border:1px dashed rgba(82,69,62,.22)}.hand-head{display:flex;justify-content:space-between;align-items:flex-end;gap:8px;margin-bottom:10px}.hand-head p:last-child{margin:0;color:#6d625c;font-size:13px}.hand{display:grid;grid-template-columns:repeat(9,minmax(52px,1fr));gap:8px;overflow:auto;padding-bottom:4px;touch-action:manipulation}.num-card{position:relative;min-height:86px;background:#fffbf4;border:2px solid #dac7b8;box-shadow:0 8px 16px rgba(87,62,47,.09);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#274548}.num-card.selected{border-color:#b45f4e;background:#fff2e7}.num-card .n{font-size:34px;font-weight:800}.num-card .count{font-size:12px;color:#7b6860}.num-card .tag{position:absolute;top:6px;right:6px;font-size:11px;background:#345c5c;color:white;padding:2px 5px}.num-card.bombable{box-shadow:0 0 0 3px rgba(181,107,88,.22),0 8px 16px rgba(87,62,47,.09)}.right-panel{display:flex;flex-direction:column;gap:10px}.dialogue-hero{min-height:126px;background:#fff8f0;border:1px solid #e0d2c6;padding:8px;display:grid;grid-template-columns:72px 1fr;gap:8px;align-items:center}.dialogue-hero img{width:72px;height:72px;object-fit:cover}.dialogue-hero h3{margin:0 0 6px;color:#2e4c4f}.dialogue-hero p{margin:0;font-size:13px;line-height:1.5;color:#5c5550}.log{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:8px;padding-right:2px}.log-entry{padding:9px 10px;background:rgba(255,250,244,.88);border-left:4px solid #9fb7b1;font-size:13px;line-height:1.45;color:#554d48}.log-entry.system{border-left-color:#b56b58}.modal{position:fixed;inset:0;background:rgba(28,34,35,.42);display:grid;place-items:center;padding:18px;z-index:9}.modal.hidden{display:none}.modal-card{position:relative;width:min(760px,96vw);max-height:86dvh;overflow:auto;background:#fffaf4;border:1px solid #d5c5b9;box-shadow:0 22px 80px rgba(26,22,19,.32);padding:24px}.close{position:absolute;top:8px;right:8px;background:#f0e5dc;color:#463f3b;min-height:34px;padding:4px 10px}.modal h2{margin-top:0;color:#2e4e51}.modal li{margin:.45em 0;line-height:1.55}.modal .tip{padding:10px;background:#edf4f0;border-left:4px solid #6a9491}@media (max-width:960px){body{overflow:auto}.game-root{overflow:auto;height:auto;min-height:100dvh}.table-layout{grid-template-columns:1fr}.panel{overflow:visible}.right-panel{min-height:260px}.public-area{grid-template-columns:1fr}.hand{grid-template-columns:repeat(5,minmax(56px,1fr));max-height:none}.opponents{grid-template-columns:1fr}.topbar{align-items:flex-start}.topbar h1{font-size:28px}}@media (max-width:520px){.game-root{padding:8px}.topbar{display:grid}.top-actions{justify-content:start}.hand{grid-template-columns:repeat(3,1fr)}.num-card{min-height:96px}.dialogue-hero{grid-template-columns:68px 1fr}.dialogue-hero img{width:68px;height:68px}.table-layout{gap:8px}.public-area{gap:8px}}

/* readability pass: action-first information hierarchy */
.focus-strip{display:grid;grid-template-columns:minmax(280px,1.2fr) minmax(360px,2fr);gap:10px;background:rgba(255,250,244,.86);border:2px solid rgba(181,107,88,.35);box-shadow:0 12px 32px rgba(72,52,42,.13);padding:10px 12px;align-items:center}.focus-main h2{margin:0 0 4px;color:#9a4f3f;font-size:24px}.focus-main p:last-child{margin:0;color:#394b4d;line-height:1.35}.focus-facts{display:grid;grid-template-columns:1fr;gap:5px}.focus-facts span{display:block;padding:6px 9px;background:#fff6ed;border-left:4px solid #b56b58;color:#493f3a;font-size:13px;line-height:1.3}.focus-facts span:nth-child(2){border-left-color:#d49a40;background:#fff8df}.focus-facts span:nth-child(3){border-left-color:#5f918d;background:#edf6f2}.turn-card{border:2px solid rgba(52,92,92,.24)}.turn-card strong{color:#9a4f3f}.action-card .secondary:not(:disabled){box-shadow:0 0 0 3px rgba(181,107,88,.14)}.timeline-head{padding:8px 2px 2px;border-bottom:1px solid rgba(83,65,51,.14)}.timeline-head h2{margin:0;color:#2f4d50;font-size:18px}.timeline-head p{margin:3px 0 0;color:#7a6a62;font-size:12px}.log{padding-top:8px}.log-entry{position:relative;display:grid;grid-template-columns:30px 1fr;gap:4px;align-items:start;border-left-color:#b7c6c0;background:#fffaf4}.log-entry b{color:#334b4e}.log-index{font-family:system-ui,sans-serif;font-size:11px;color:#9b8a80;background:#efe5dc;text-align:center;padding:2px 0;margin-top:1px}.log-entry.latest{background:#edf6f2;border-left-color:#407a76;box-shadow:inset 0 0 0 1px rgba(64,122,118,.18)}.log-entry.danger{background:#fff0ea;border-left-color:#c84e3f}.log-entry.bomb{background:#fff3cf;border-left-color:#d19623;font-weight:700}.log-entry.reveal-hit{background:#edf3ff;border-left-color:#587bbb}.score-item b span{font-family:system-ui,sans-serif;background:#345c5c;color:white;padding:2px 6px}.num-card.bombable .tag{background:#c05b42;animation:pulseBomb 1.1s ease-in-out infinite alternate}@keyframes pulseBomb{from{transform:scale(1);filter:brightness(1)}to{transform:scale(1.08);filter:brightness(1.12)}}@media (max-width:960px){.focus-strip{grid-template-columns:1fr}.focus-main h2{font-size:20px}.focus-facts span{font-size:12px}}

/* v2 reading layout: center-bottom chat, newest-first feed */
.table-layout{grid-template-columns:270px minmax(0,1fr);gap:12px}.board{min-height:0}.center-chat{flex:0 0 178px;display:grid;grid-template-columns:270px minmax(0,1fr);grid-template-rows:auto 1fr;gap:8px;overflow:hidden;background:rgba(255,255,255,.72)}.center-chat .dialogue-hero{grid-row:1 / span 2;min-height:0;height:100%;align-self:stretch}.center-chat .timeline-head{padding:2px 2px 4px}.center-chat .timeline-head h2{font-size:17px}.center-chat .log{min-height:0;overflow:auto;padding:0 2px 0 0;display:flex;flex-direction:column;gap:6px}.center-chat .log-entry{padding:7px 9px;font-size:12.5px;line-height:1.35}.log-entry.latest .log-index{background:#407a76;color:white;font-weight:800}.opponent.selected,.num-card.selected{outline:3px solid rgba(181,107,88,.35);outline-offset:2px}.action-card button:not(:disabled){position:relative}.action-card button:not(:disabled)::after{content:'可点';font-family:system-ui,sans-serif;font-size:10px;margin-left:6px;opacity:.75}.action-card button:disabled::after{content:'先选数字/角色';font-family:system-ui,sans-serif;font-size:10px;margin-left:6px;opacity:.75}.focus-main h2{font-size:22px}.focus-facts{grid-template-columns:repeat(3,minmax(0,1fr))}.focus-facts span{font-size:12.5px}.hand-zone{flex:1 1 auto}.public-area{grid-template-columns:.8fr 1fr 1.5fr}.right-panel{display:none}@media (max-width:960px){.table-layout{grid-template-columns:1fr}.center-chat{grid-template-columns:1fr;grid-template-rows:auto auto minmax(220px,360px);flex:0 0 auto}.center-chat .dialogue-hero{grid-row:auto;height:auto}.focus-facts{grid-template-columns:1fr}.action-card button:disabled::after{content:''}}@media (max-height:760px) and (min-width:961px){.center-chat{flex-basis:150px}.center-chat .dialogue-hero{grid-template-columns:60px 1fr}.center-chat .dialogue-hero img{width:60px;height:60px}.center-chat .log-entry{padding:5px 8px}.focus-strip{padding:7px 10px}.focus-main h2{font-size:19px}.focus-main p:last-child{font-size:13px}.focus-facts span{padding:4px 7px}.num-card{min-height:74px}.hand{gap:6px}}

/* v3 process-first layout: event/chat is the main readable panel */
.center-chat{flex:0 0 300px;display:grid;grid-template-columns:180px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:10px;padding:12px;background:rgba(255,255,255,.82);border:2px solid rgba(95,145,141,.24)}.center-chat .dialogue-hero{grid-row:1 / span 2;grid-template-columns:64px 1fr;align-content:start;height:auto;min-height:0;padding:10px;background:#fff8f0}.center-chat .dialogue-hero img{width:64px;height:64px}.center-chat .dialogue-hero h3{font-size:17px}.center-chat .dialogue-hero p{font-size:12.5px;line-height:1.45}.center-chat .timeline-head{padding:0 0 8px}.center-chat .timeline-head h2{font-size:22px}.center-chat .timeline-head p{font-size:13px}.center-chat .log{min-height:0;max-height:none;overflow:auto;display:flex;flex-direction:column;gap:8px;padding-right:6px}.center-chat .log-entry{display:grid;grid-template-columns:44px 96px minmax(0,1fr);gap:10px;align-items:start;padding:10px 12px;font-size:14px;line-height:1.45;border-left-width:5px}.log-index{font-size:12px;line-height:1.3;padding:3px 0;border-radius:2px}.log-speaker{color:#263f42;white-space:nowrap}.log-text{min-width:0;word-break:normal;overflow-wrap:anywhere}.center-chat .log-entry.latest{font-size:15px}.hand-zone{flex:1 1 150px}.num-card{min-height:68px}.num-card .n{font-size:30px}.opponent{grid-template-columns:54px 1fr}.avatar-wrap{width:54px;height:54px}.pile-card,.turn-card,.action-card{min-height:76px}.summary{line-height:1.35}.memory-box{padding:9px}.memory-box p{line-height:1.4}@media (max-height:760px) and (min-width:961px){.center-chat{flex-basis:260px;grid-template-columns:160px minmax(0,1fr);gap:8px;padding:10px}.center-chat .log-entry{grid-template-columns:42px 88px minmax(0,1fr);padding:8px 10px;font-size:13px}.center-chat .timeline-head h2{font-size:19px}.center-chat .dialogue-hero{grid-template-columns:52px 1fr}.center-chat .dialogue-hero img{width:52px;height:52px}.num-card{min-height:58px}.num-card .n{font-size:26px}.focus-strip{padding:6px 10px}.focus-main h2{font-size:18px}.focus-main p:last-child,.focus-facts span{font-size:12px}.pile-card strong,.turn-card strong{font-size:23px}.pile-card,.turn-card,.action-card{min-height:66px}.hand-head{margin-bottom:6px}.board{gap:8px;padding:9px}.public-area{gap:8px}.opponents{gap:8px}}@media (max-width:960px){.center-chat{grid-template-columns:1fr;grid-template-rows:auto auto minmax(320px,48vh);padding:10px}.center-chat .dialogue-hero{grid-row:auto}.center-chat .log-entry{grid-template-columns:42px 80px minmax(0,1fr);font-size:13px}.center-chat .timeline-head h2{font-size:20px}}@media (max-width:520px){.center-chat .log-entry{grid-template-columns:38px minmax(0,1fr);gap:6px}.center-chat .log-speaker{grid-column:2}.center-chat .log-text{grid-column:2}.center-chat{grid-template-rows:auto auto minmax(360px,52vh)}}

/* v3.1: prevent enlarged process panel from overlapping clickable hand */
.board{display:grid;grid-template-rows:auto auto minmax(90px,1fr) 300px;min-height:0}.hand-zone{min-height:0;overflow:hidden}.hand{min-height:0;max-height:100%;overflow:auto}.center-chat{min-height:0;align-self:stretch}@media (max-height:760px) and (min-width:961px){.board{grid-template-rows:auto auto minmax(74px,1fr) 250px}.center-chat{min-height:0}.hand-zone{padding:7px}.hand-head{margin-bottom:4px}.num-card{min-height:54px}.num-card .n{font-size:24px}.num-card .count{font-size:11px}}@media (max-width:960px){.board{display:flex}.hand-zone{overflow:visible}.hand{max-height:none}}

/* v4: right-side command/process panel; board never overlaps chat */
.game-root{height:100dvh;overflow:hidden}.command-layout{grid-template-columns:250px minmax(520px,1fr) minmax(430px,36vw);gap:10px;align-items:stretch}.command-layout .board-only{display:grid;grid-template-rows:auto auto minmax(0,1fr);gap:10px;overflow:hidden}.board-public{grid-template-columns:1fr}.board-public .pile-card{min-height:82px}.command-panel{display:grid;grid-template-rows:auto auto auto minmax(0,1fr);gap:10px;overflow:hidden;padding:10px;background:rgba(255,255,255,.76);border:2px solid rgba(181,107,88,.28)}.command-panel .focus-strip{display:block;padding:10px;background:#fffaf4;border:1px solid rgba(181,107,88,.28);box-shadow:none}.command-panel .focus-main h2{font-size:22px;margin:0 0 6px}.command-panel .focus-main p:last-child{font-size:14px;line-height:1.45}.command-panel .focus-facts{display:grid;grid-template-columns:1fr;gap:6px;margin-top:8px}.command-panel .focus-facts span{font-size:13px;line-height:1.35}.command-turn{min-height:auto;padding:10px}.command-turn strong{font-size:28px}.command-actions{min-height:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px}.command-actions button{width:100%;min-height:44px}.command-actions #drawBtn{grid-column:1 / -1}.command-chat{min-height:0;display:grid;grid-template-columns:1fr;grid-template-rows:auto auto minmax(0,1fr);gap:8px;padding:10px;background:#fffdf9;border:1px solid rgba(83,65,51,.14);overflow:hidden}.command-chat .dialogue-hero{display:grid;grid-template-columns:58px minmax(0,1fr);gap:8px;min-height:82px;height:auto;padding:8px}.command-chat .dialogue-hero img{width:58px;height:58px}.command-chat .dialogue-hero h3{font-size:17px}.command-chat .dialogue-hero p{font-size:13px;line-height:1.4}.command-chat .timeline-head{padding:0 0 6px}.command-chat .timeline-head h2{font-size:20px}.command-chat .timeline-head p{font-size:12px}.command-chat .log{min-height:0;overflow:auto;display:flex;flex-direction:column;gap:7px;padding-right:4px}.command-chat .log-entry{display:grid;grid-template-columns:42px 82px minmax(0,1fr);gap:8px;align-items:start;padding:8px 10px;font-size:13px;line-height:1.42}.hand-zone{min-height:0;overflow:hidden}.hand{min-height:0;max-height:100%;overflow:auto}.num-card{min-height:78px}.public-area:not(.board-public){display:none}.right-panel{display:none}.center-chat:not(.command-chat){display:none}@media (max-height:780px) and (min-width:1101px){.command-layout{grid-template-columns:235px minmax(500px,1fr) minmax(410px,35vw)}.topbar{padding:6px 12px}.topbar h1{font-size:25px}.command-panel{gap:7px;padding:8px}.command-panel .focus-strip{padding:8px}.command-panel .focus-main h2{font-size:19px}.command-panel .focus-main p:last-child,.command-panel .focus-facts span{font-size:12px}.command-turn strong{font-size:24px}.command-actions{gap:6px;padding:8px}.command-actions button{min-height:38px}.command-chat{padding:8px}.command-chat .dialogue-hero{min-height:68px;grid-template-columns:48px 1fr}.command-chat .dialogue-hero img{width:48px;height:48px}.command-chat .timeline-head h2{font-size:18px}.command-chat .log-entry{grid-template-columns:40px 74px minmax(0,1fr);padding:7px 9px;font-size:12.5px}.num-card{min-height:62px}.num-card .n{font-size:26px}.opponent{grid-template-columns:50px 1fr}.avatar-wrap{width:50px;height:50px}.left-panel{gap:8px}.summary{font-size:11.5px}.score-item{padding:8px}.memory-box{padding:8px}}@media (max-width:1100px){body{overflow:auto}.game-root{height:auto;min-height:100dvh;overflow:auto}.command-layout{grid-template-columns:1fr}.command-layout .board-only{display:flex}.command-panel{min-height:680px}.command-actions{grid-template-columns:1fr 1fr}.hand-zone{overflow:visible}.hand{max-height:none}.command-chat{min-height:420px}.focus-strip{grid-template-columns:1fr}}@media (max-width:520px){.command-actions{grid-template-columns:1fr}.command-chat .log-entry{grid-template-columns:38px minmax(0,1fr)}.command-chat .log-speaker,.command-chat .log-text{grid-column:2}.command-panel{min-height:760px}}

/* v4.1: reserve real vertical space for process log inside the right red-box area */
.command-panel{grid-template-rows:minmax(118px,140px) auto auto minmax(270px,1fr);gap:8px}.command-panel .focus-strip{max-height:140px;overflow:auto;padding:8px}.command-panel .focus-main h2{font-size:19px;line-height:1.15}.command-panel .focus-main p:last-child{font-size:12.5px;line-height:1.35}.command-panel .focus-facts{grid-template-columns:1fr;gap:4px;margin-top:6px}.command-panel .focus-facts span{font-size:11.5px;line-height:1.25;padding:4px 6px}.command-turn{padding:8px;min-height:64px}.command-turn strong{font-size:22px}.command-turn small{font-size:11.5px}.command-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:8px}.command-actions #drawBtn{grid-column:auto}.command-actions button{min-height:38px;padding:6px 8px;font-size:13px}.command-actions button:not(:disabled)::after,.command-actions button:disabled::after{display:block;margin-left:0;font-size:9px}.command-chat{min-height:270px}.command-chat .dialogue-hero{min-height:62px;grid-template-columns:46px minmax(0,1fr);padding:6px}.command-chat .dialogue-hero img{width:46px;height:46px}.command-chat .dialogue-hero h3{font-size:15px;margin-bottom:2px}.command-chat .dialogue-hero p{font-size:12px;line-height:1.3}.command-chat .timeline-head h2{font-size:18px}.command-chat .timeline-head p{font-size:11.5px}.command-chat .log-entry{grid-template-columns:40px 72px minmax(0,1fr);font-size:12.5px;padding:7px 9px}@media (max-height:780px) and (min-width:1101px){.command-panel{grid-template-rows:minmax(104px,124px) auto auto minmax(270px,1fr);gap:6px}.command-panel .focus-strip{max-height:124px}.command-actions{grid-template-columns:repeat(3,minmax(0,1fr))}.command-actions button{min-height:34px;font-size:12px}.command-chat{min-height:270px}.command-chat .log-entry{font-size:12px;line-height:1.32}}

/* v5: move turn/actions below hand; right column prioritizes event chat */
.command-layout .board-only{grid-template-rows:auto auto minmax(0,1fr) auto;gap:10px}.hand-command-zone{display:grid;grid-template-columns:1fr 1.35fr;gap:10px;min-height:142px;background:rgba(255,250,244,.76);border:1px solid #e2d4c7;padding:10px;overflow:hidden}.hand-command-zone .command-turn{min-height:120px;border:2px solid rgba(52,92,92,.2)}.hand-command-zone .command-turn strong{font-size:30px}.hand-command-zone .command-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:0;background:transparent;border:0;align-content:stretch}.hand-command-zone .command-actions button{min-height:48px;font-size:15px}.hand-command-zone .command-actions #drawBtn{grid-column:auto}.command-panel{grid-template-rows:auto minmax(0,1fr);gap:10px}.command-panel .focus-strip{max-height:152px}.command-panel>.command-turn,.command-panel>.command-actions{display:none}.command-chat{min-height:0;height:100%}.command-chat .dialogue-hero{min-height:74px}.command-chat .log{gap:8px}.command-chat .log-entry{font-size:13.5px;line-height:1.45}.public-area:not(.board-public){display:none!important}@media (max-height:780px) and (min-width:1101px){.command-layout .board-only{grid-template-rows:auto auto minmax(0,1fr) auto}.hand-command-zone{min-height:124px;padding:8px;gap:8px}.hand-command-zone .command-turn{min-height:106px}.hand-command-zone .command-turn strong{font-size:24px}.hand-command-zone .command-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.hand-command-zone .command-actions button{min-height:40px;font-size:12.5px}.command-panel{grid-template-rows:auto minmax(0,1fr);gap:8px}.command-panel .focus-strip{max-height:122px}.command-chat{min-height:420px}.command-chat .log-entry{font-size:13px}}@media (max-width:1100px){.hand-command-zone{grid-template-columns:1fr;min-height:auto}.hand-command-zone .command-actions{grid-template-columns:1fr 1fr}.command-panel{min-height:620px}.command-chat{min-height:480px}}@media (max-width:520px){.hand-command-zone .command-actions{grid-template-columns:1fr}.hand-command-zone .command-actions button{min-height:44px}}

/* v6: phase/actions live inside the YOUR HAND dashed box, under number cards */
.command-layout .board-only{grid-template-rows:auto auto minmax(0,1fr);gap:10px}.hand-zone{display:grid;grid-template-rows:auto auto auto minmax(0,1fr);gap:12px;overflow:hidden}.hand-zone>.hand-command-zone{display:grid;grid-template-columns:1fr 1.35fr;gap:10px;min-height:142px;background:rgba(255,250,244,.82);border:1px solid #e2d4c7;padding:10px;overflow:hidden}.hand-zone>.hand{max-height:none;overflow:visible}.hand-command-zone .command-turn{min-height:120px}.hand-command-zone .command-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.hand-command-zone .command-actions button{min-height:48px}.hand-command-zone .command-actions #drawBtn{grid-column:auto}.board-only>.hand-command-zone{display:none!important}.command-panel{grid-template-rows:auto minmax(0,1fr)}.command-chat{height:100%;min-height:0}@media (max-height:780px) and (min-width:1101px){.hand-zone{gap:8px}.hand-zone>.hand-command-zone{min-height:118px;padding:8px}.hand-command-zone .command-turn{min-height:102px}.hand-command-zone .command-actions button{min-height:38px}.hand-zone>.hand{gap:6px}.num-card{min-height:60px}}@media (max-width:1100px){.hand-zone{display:flex}.hand-zone>.hand-command-zone{grid-template-columns:1fr;min-height:auto}.hand-zone>.hand{overflow:visible}}

/* v7: authoritative MOBILE pass — full natural-flow, every container fully expands, nothing clipped */
@media (max-width:1100px){
  html,body{height:auto;overflow:auto}
  .game-root{height:auto;min-height:100dvh;overflow:visible;display:flex;flex-direction:column;gap:10px}
  .command-layout{display:flex;flex-direction:column;gap:10px;align-items:stretch}
  .panel,.board,.command-panel,.board-only,.hand-zone,.hand-command-zone,.command-chat,.center-chat,.focus-strip{overflow:visible!important;min-height:0!important;max-height:none!important;height:auto!important}
  /* board stacks naturally */
  .command-layout .board-only{display:flex!important;flex-direction:column;gap:10px}
  .opponents{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  /* HAND: show every card, wrap, never clip */
  .hand-zone{display:flex!important;flex-direction:column;gap:10px}
  .hand{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;overflow:visible!important;max-height:none!important}
  .num-card{min-height:84px}
  /* phase + actions inside hand box */
  .hand-command-zone{display:grid!important;grid-template-columns:1fr;gap:10px;min-height:0!important}
  .hand-command-zone .command-turn{min-height:0}
  .hand-command-zone .command-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:8px}
  .hand-command-zone .command-actions #drawBtn{grid-column:1 / -1}
  /* right column becomes a normal stacked section; chat grows with content */
  .command-panel{display:flex!important;flex-direction:column;gap:10px}
  .command-chat{display:flex!important;flex-direction:column;gap:8px}
  .command-chat .log{overflow:visible!important;max-height:none!important}
  .command-chat .log-entry{grid-template-columns:40px 78px minmax(0,1fr)}
  .focus-strip{display:block}
  .focus-facts{display:grid;grid-template-columns:1fr;gap:6px}
}
@media (max-width:560px){
  .opponents{grid-template-columns:1fr}
  .hand{grid-template-columns:repeat(3,1fr)}
  .num-card{min-height:92px}
  .num-card .n{font-size:30px}
  .hand-command-zone .command-actions{grid-template-columns:1fr}
  .command-chat .log-entry{grid-template-columns:36px minmax(0,1fr)}
  .command-chat .log-speaker,.command-chat .log-text{grid-column:2}
  .topbar{display:grid;gap:8px}
  .top-actions{justify-content:flex-start;flex-wrap:wrap}
}

/* v7.1: stop hand-command-zone from collapsing on mobile (children were overflowing into the panel) */
@media (max-width:1100px){
  .hand-zone{display:flex!important;flex-direction:column;gap:10px}
  .hand-zone>*{flex:0 0 auto}
  .hand-command-zone{display:flex!important;flex-direction:column;gap:10px;height:auto!important;min-height:0!important}
  .hand-command-zone>*{flex:0 0 auto;height:auto!important}
  .hand-command-zone .command-turn{display:flex;flex-direction:column;gap:4px}
  .hand-command-zone .command-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:8px;height:auto!important}
  .hand-command-zone .command-actions #drawBtn{grid-column:1 / -1}
}
@media (max-width:560px){
  .hand-command-zone .command-actions{grid-template-columns:1fr}
}

/* v7.2: on mobile, each top-level section must grow to its content (board was clipped to 457px, pushing children onto the panel) */
@media (max-width:1100px){
  .command-layout{display:flex!important;flex-direction:column;align-items:stretch}
  .command-layout>*{flex:0 0 auto!important;height:auto!important;min-height:0!important;max-height:none!important}
  .command-layout .board-only{height:auto!important;flex:0 0 auto!important}
  .command-layout .board-only>*{flex:0 0 auto!important;height:auto!important}
}

/* v8: inline target picker inside the action zone — pick number, pick person, execute, all in one place (no scroll-back-to-avatars) */
.target-picker{display:none}
.target-picker.on{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px;margin-bottom:2px;background:#fff3ea;border:1px dashed rgba(181,107,88,.5)}
.command-actions{display:flex;flex-direction:column;gap:8px}
.command-actions .target-picker.on+button,.command-actions button{width:100%}
.target-picker .tp-label{font-size:13px;color:#8a5a48;font-weight:700;width:100%}
.tp-btn{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:6px 12px;background:#fffaf4;border:2px solid #d9c6b8;color:#3a4d4e;font-size:14px;cursor:pointer}
.tp-btn img{width:30px;height:30px;object-fit:cover;border-radius:2px}
.tp-btn.selected{border-color:#b45f4e;background:#fde7db;box-shadow:0 0 0 2px rgba(181,107,88,.25)}
.tp-btn:active{transform:translateY(1px)}
/* desktop action zone keeps a tidy 2-col grid; picker spans full width */
@media (min-width:1101px){
  .hand-command-zone .command-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .hand-command-zone .command-actions .target-picker{grid-column:1 / -1;margin-bottom:0}
  .hand-command-zone .command-actions #drawBtn{grid-column:1 / -1}
}
@media (max-width:1100px){
  .target-picker.on{gap:10px;padding:10px}
  .tp-btn{flex:1 1 40%;justify-content:center;min-height:52px;font-size:15px}
  .command-actions button{min-height:50px;font-size:16px}
}
