:root{--paper:#f5f1e8;--surface:#fffdf7;--ink:#23392e;--muted:#718074;--line:#dcded1;--green:#174b3a;--green-light:#e4eee4;--wood:#c79657;--wood-light:#e3c48f;--danger:#a13932;--gold:#b48638;--radius:12px;--shadow:0 12px 36px #28372b0a;font-family:var(--font-ui);color:var(--ink);background:var(--paper);font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button,a,input{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:default;opacity:.45}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--gold);outline-offset:3px}a{color:inherit}button{color:inherit}input{width:100%;border:1px solid var(--line);border-radius:8px;padding:13px 14px;color:var(--ink);background:#fff;min-width:0}input:focus{border-color:var(--green)}input::placeholder{color:#91998f}.site-header{height:88px;max-width:1536px;margin:auto;padding:0 40px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line)}.wordmark{font-family:var(--font-ui);font-size:34px;letter-spacing:-2px;text-decoration:none;font-weight:700;display:flex;align-items:center;gap:18px}.wordmark span{font-family:inherit;font-weight:400;letter-spacing:0;font-size:17px;border-left:1px solid var(--line);padding-left:18px}.header-right{display:flex;align-items:center;gap:20px}.prototype-tag{font-size:12px;color:var(--muted)}.connection{display:flex;align-items:center;gap:7px;font-size:11px;white-space:nowrap;color:var(--muted)}.connection i{width:6px;height:6px;border-radius:50%;background:#a9b5a5}.connection.online i{background:#4d9661}.connection.offline{color:var(--danger)}.connection.offline i{background:var(--danger)}.icon-button{width:34px;height:34px;border:1px solid var(--line);border-radius:50%;background:transparent;font-family:var(--font-ui);font-size:19px;flex-shrink:0}.icon-button:hover{background:var(--green-light)}#main{max-width:1536px;margin:auto;padding:32px 40px 24px;min-height:calc(100vh - 150px)}.site-footer{max-width:1536px;margin:auto;padding:20px 40px 28px;display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:11px;gap:16px}.text-button{background:transparent;border:0;padding:4px 0;font-size:inherit;text-decoration:underline;text-underline-offset:4px}.button{min-height:44px;padding:12px 18px;border:1px solid var(--line);border-radius:8px;background:var(--surface);font-size:13px;font-weight:600;display:inline-flex;justify-content:center;align-items:center;gap:8px;text-decoration:none;transition:background .15s,transform .15s}.button:hover:not(:disabled){background:var(--green-light)}.button:active:not(:disabled){transform:translateY(1px)}.button.primary{background:var(--green);color:#fff;border-color:var(--green)}.button.primary:hover:not(:disabled){background:#25634b}.button.small{min-height:36px;padding:8px 12px;font-size:12px}.button.danger{color:var(--danger)}.eyebrow{text-transform:uppercase;letter-spacing:2px;color:var(--muted);font-weight:600;font-size:10px}.muted{color:var(--muted)}h1,h2,h3,p{margin-top:0}h1,h2{font-family:var(--font-ui);font-weight:400;letter-spacing:-1px}h1{font-size:54px;line-height:1.1}h2{font-size:28px;line-height:1.2}h3{font-size:14px;font-weight:600}p{line-height:1.65;font-size:14px}.notice{border:1px solid #d8afa1;background:#fff0e8;color:#833e31;font-size:13px;padding:12px 16px;border-radius:8px;margin-bottom:20px}.notice[hidden],.toast[hidden]{display:none}.loading-screen{text-align:center;min-height:60vh;display:flex;align-items:center;justify-content:center;flex-direction:column;color:var(--muted)}.loading-mark{font-family:var(--font-ui);letter-spacing:-4px;font-size:60px;color:var(--green)}.loading-screen p{margin:12px}.landing{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(320px,.95fr);gap:64px;align-items:center;max-width:1140px;margin:50px auto}.landing-copy h1{margin:20px 0}.landing-copy>p{max-width:400px;color:var(--muted);font-size:16px}.landing-badges{display:flex;flex-wrap:wrap;gap:8px;margin:24px 0}.landing-badges span{font-size:11px;padding:7px 10px;border:1px solid var(--line);border-radius:4px}.landing-board{width:min(100%,440px);margin:20px auto 0;opacity:.95;filter:drop-shadow(0 16px 20px #5c412b13)}.entry-panel{background:var(--surface);padding:32px;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}.entry-panel h2{margin:12px 0 24px}.field{display:grid;gap:8px;margin-bottom:20px}.field label{font-size:12px;font-weight:600}.field small{font-size:11px;color:var(--muted);line-height:1.5}.entry-panel .button{width:100%}.separator{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:11px;margin:24px 0}.separator:before,.separator:after{content:"";height:1px;background:var(--line);flex:1}.join-row{display:flex;gap:8px}.join-row input{letter-spacing:3px;text-transform:uppercase}.entry-panel .join-row .button{width:auto;min-width:110px}.identity-line{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px;font-size:13px;gap:8px}.identity-line span{min-width:0;overflow-wrap:anywhere}.identity-line .text-button{font-size:11px;color:var(--muted)}.room-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:24px}.room-heading h1{font-size:34px;margin:8px 0}.room-heading p{font-size:12px;color:var(--muted);margin:8px 0 0}.room-code{font-family:var(--font-ui);letter-spacing:3px;font-weight:600}.room-tools{display:flex;align-items:center;gap:8px;padding-top:8px}.room-status{display:inline-flex;align-items:center;gap:8px;color:var(--green);background:var(--green-light);border-radius:4px;padding:6px 8px;font-size:10px;letter-spacing:.5px}.waiting-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:24px}.waiting-table{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:28px;position:relative}.waiting-table h2{font-size:25px;margin-bottom:8px}.waiting-table>p{color:var(--muted);font-size:12px;max-width:460px}.seats-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:28px 0}.seat-pick{border:1px solid var(--line);border-radius:8px;min-height:115px;background:#faf9f3;padding:16px;text-align:left;display:flex;gap:12px;align-items:flex-start;position:relative}.seat-pick.empty{border-style:dashed}.seat-pick.mine{border-color:var(--green);background:#f0f5ec}.seat-dot{width:12px;height:12px;display:inline-block;border-radius:50%;background:var(--seat);box-shadow:inset 0 0 0 1px #00000012;flex-shrink:0;margin-top:3px}.seat-copy{display:grid;gap:8px;min-width:0}.seat-copy strong{font-size:14px;overflow-wrap:anywhere}.seat-copy span{font-size:11px;color:var(--muted)}.ready-badge{font-size:10px;color:var(--green);margin-left:auto;white-space:nowrap}.waiting-actions{border-top:1px solid var(--line);padding-top:20px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}.waiting-actions p{font-size:11px;color:var(--muted);margin:0;flex:1;min-width:150px}.sidebar{display:flex;flex-direction:column;gap:16px;min-width:0}.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}.panel-title{padding:18px 20px 14px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:8px}.panel-title h2{font:600 13px var(--font-ui);letter-spacing:0;margin:0}.panel-title small{font-size:10px;color:var(--muted)}.panel-body{padding:16px 20px}.panel-body p{font-size:12px;margin-bottom:8px}.panel-body p:last-child{margin-bottom:0}.chat-list{max-height:245px;min-height:100px;overflow:auto;padding:16px 20px;display:flex;flex-direction:column;gap:12px;scrollbar-width:thin}.chat-item{font-size:12px;line-height:1.5;overflow-wrap:anywhere}.chat-item strong{font-size:11px}.chat-item time{font-size:9px;color:var(--muted);margin-left:8px}.chat-item p{font-size:12px;margin:3px 0 0;white-space:pre-wrap;line-height:1.5}.chat-empty{font-size:12px;color:var(--muted);line-height:1.6;margin:0}.chat-form{display:flex;gap:8px;padding:12px;border-top:1px solid var(--line)}.chat-form input{padding:10px 12px;font-size:12px}.chat-form button{width:40px;min-height:40px;padding:0;flex-shrink:0}.game-layout{display:grid;grid-template-columns:minmax(0,1fr) 312px;gap:24px}.table-column{min-width:0}.table-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:12px}.round-title{font-size:13px;font-weight:600}.deck-stat{display:flex;gap:12px;font-size:11px;color:var(--muted)}.deck-stat b{color:var(--ink);font-weight:600}.board-wrap{position:relative;background:#e7d4b4;border:1px solid #ba955f;border-radius:var(--radius);padding:10px;box-shadow:0 8px 20px #4d3c2510}.board-wrap:after{content:"";pointer-events:none;position:absolute;inset:6px;border:1px solid #b78a4a40;border-radius:8px}.board-svg{display:block;width:100%;height:auto;max-height:70vh;aspect-ratio:1;user-select:none}.board-svg .space{fill:#b08958;stroke:#987044;stroke-width:1}.board-svg .space-inner{fill:#c8a879}.board-svg .start{fill:#b79e75;stroke:var(--seat);stroke-width:3}.board-svg .marble{fill:var(--seat);stroke:#ffffffb0;stroke-width:1.5;filter:url(#marble-shadow)}.board-svg .marble-number{fill:#fff;font-size:10px;font-weight:700;text-anchor:middle;dominant-baseline:central;pointer-events:none}.board-svg .marble-number.light{fill:#4d402b}.board-svg .home-space{stroke:var(--seat);stroke-width:1.5;fill:#ffffff38}.board-svg .base-space{fill:#c29c64;stroke:var(--seat);stroke-width:1.5}.board-svg .seat-label{font-size:12px;fill:#4c442f;text-anchor:middle;font-weight:600}.board-svg .board-center{fill:#66553a;text-anchor:middle}.board-svg .target-halo{stroke:#ffffff;stroke-width:4;fill:#ffffff30}.board-svg .target{stroke:#263c2e;stroke-width:3;fill:#f5edb75e;cursor:pointer;animation:target-pulse 1.8s infinite}.board-svg [role=button]:focus{outline:none}.board-svg [role=button]:focus .target{stroke:#fff;stroke-width:5}.board-key{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:12px 0}.player-chip{border:1px solid var(--line);background:var(--surface);border-radius:8px;padding:12px 10px;min-width:0}.player-chip.current{border-color:var(--green);box-shadow:inset 0 3px var(--green)}.player-name{display:flex;align-items:center;gap:6px;min-width:0;font-size:11px;font-weight:600}.player-name .seat-dot{width:8px;height:8px;margin:0}.player-name>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.player-details{margin-top:7px;font-size:10px;color:var(--muted);display:flex;justify-content:space-between;gap:4px}.player-sub{font-size:9px;margin-top:6px;color:var(--green);min-height:11px}.hand-panel{margin-top:20px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:20px}.hand-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.hand-heading h2{font:600 14px var(--font-ui);letter-spacing:0;margin:0}.hand-heading span{color:var(--muted);font-size:10px}.hand{display:flex;gap:10px;overflow-x:auto;padding:4px 2px 12px;scrollbar-width:thin}.playing-card{min-width:88px;width:104px;height:142px;flex-shrink:0;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#fffdf7;border:1px solid #cfd2c2;border-radius:8px;color:var(--green);box-shadow:0 3px 0 #e8e6dc;padding:12px 8px;transition:transform .15s,border-color .15s,background .15s;text-align:center}.playing-card:before,.playing-card:after{position:absolute;content:attr(data-symbol);font:600 12px var(--font-ui)}.playing-card:before{top:8px;left:9px}.playing-card:after{bottom:8px;right:9px;transform:rotate(180deg)}.playing-card:hover:not(:disabled){transform:translateY(-4px);border-color:var(--green)}.playing-card.selected{border:2px solid var(--green);background:var(--green-light);transform:translateY(-3px)}.playing-card.unplayable{opacity:.5}.playing-card:disabled{opacity:1}.playing-card.unplayable:disabled{opacity:.45}.card-value{font-family:var(--font-ui);font-size:44px;line-height:1;letter-spacing:-2px}.card-value.special{font-size:20px;letter-spacing:-.5px}.card-caption{font-size:9px;line-height:1.45;color:var(--muted);margin-top:10px;max-width:85px}.hand-hint{font-size:11px;color:var(--muted);line-height:1.6;margin:8px 0 0}.action-panel{padding:20px;border:1px solid #a7b7a4;background:#f4f7ee;border-radius:var(--radius)}.action-panel h2{font-size:23px;margin:10px 0}.action-panel p{font-size:12px;color:var(--muted);margin-bottom:12px}.action-options{display:flex;flex-direction:column;gap:8px;max-height:340px;overflow:auto;scrollbar-width:thin}.action-option{border:1px solid #c5cfbf;background:var(--surface);border-radius:6px;padding:11px 12px;min-height:42px;text-align:left;font-size:12px;line-height:1.4}.action-option:hover:not(:disabled){border-color:var(--green);background:var(--green-light)}.action-controls{display:flex;gap:8px;margin-top:16px}.action-controls .button{flex:1;padding-left:8px;padding-right:8px}.action-status{font-size:11px;color:var(--green);margin-top:12px}.turn-icon{font-family:var(--font-ui);font-size:28px;color:var(--green);line-height:1}.log-list{padding:8px 20px;max-height:240px;overflow:auto;scrollbar-width:thin}.log-item{font-size:11px;line-height:1.6;padding:9px 0;border-bottom:1px solid #e6e7df;overflow-wrap:anywhere}.log-item:last-child{border-bottom:0}.log-index{font:10px var(--font-ui);color:var(--muted);margin-right:8px}.stats-row{display:flex;justify-content:space-between;gap:12px;font-size:11px;padding:12px 20px;border-top:1px solid var(--line);color:var(--muted)}.winner-panel{border-color:var(--gold);background:#fff7df}.winner-panel .eyebrow{color:#87601f}.winner-panel h2{color:#7a551b}.team-score{display:flex;gap:20px;margin-top:14px}.team-score div{font-size:11px;color:var(--muted)}.team-score b{display:block;font:24px var(--font-ui);color:var(--ink);margin-top:4px}.spectator-banner{background:var(--green-light);padding:12px 16px;border-radius:8px;font-size:12px;margin-bottom:16px}.skip-link{position:absolute;left:12px;top:-60px;z-index:20;background:var(--green);color:#fff;padding:12px}.skip-link:focus{top:12px}dialog{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--ink);width:min(650px,calc(100% - 32px));max-height:85vh;padding:28px;box-shadow:0 20px 80px #0003}dialog::backdrop{background:#18362780;backdrop-filter:blur(3px)}.dialog-top{display:flex;justify-content:space-between;gap:16px}.dialog-top h2{margin:10px 0 20px}.help-steps{font-size:13px;line-height:1.7;padding-left:20px;margin:0 0 24px}.help-steps li{padding:4px 0}.help-cards{display:grid;grid-template-columns:80px 1fr;gap:0 16px;margin-bottom:24px;font-size:12px}.help-cards dt,.help-cards dd{border-top:1px solid var(--line);padding:10px 0;margin:0;line-height:1.6}.help-cards dt{font-weight:600;color:var(--green)}.toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);background:var(--green);color:#fff;padding:12px 20px;font-size:13px;border-radius:8px;z-index:30;box-shadow:var(--shadow);max-width:calc(100% - 32px);text-align:center}.inline-note{font-size:11px;color:var(--muted);line-height:1.6;margin-top:16px}.room-summary{display:flex;gap:24px;margin:20px 0 0}.room-summary span{font-size:11px;color:var(--muted)}.room-summary strong{display:block;font-size:20px;font-family:var(--font-ui);color:var(--ink);margin-bottom:5px}.empty-hand{font-size:13px;color:var(--muted);padding:16px 0;margin:0}.copy-fallback{font:11px var(--font-ui);overflow-wrap:anywhere;margin:12px 0 0}.copy-fallback a{color:var(--green)}@keyframes target-pulse{50%{fill:#ffffffa0;stroke:#526a42}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}@media(min-width:1500px){.game-layout{grid-template-columns:minmax(0,1fr) 350px}.board-svg{max-height:72vh}}@media(max-width:1100px){.site-header{padding:0 24px}#main{padding:24px}.site-footer{padding:20px 24px}.landing{gap:32px;margin:32px auto}.landing-copy h1{font-size:44px}.game-layout{grid-template-columns:minmax(0,1fr) 280px;gap:16px}.waiting-layout{grid-template-columns:minmax(0,1fr) 300px;gap:16px}.playing-card{width:90px;min-width:80px;height:132px}.board-wrap{padding:4px}.player-chip{padding:10px 7px}.player-details{font-size:9px}.hand-panel{padding:16px}.room-tools .button{padding:10px 12px}.prototype-tag{display:none}}@media(max-width:850px){.landing{gap:28px;grid-template-columns:1fr 1fr}.landing-board{max-width:330px}.landing-copy h1{font-size:38px}.entry-panel{padding:24px}.game-layout{grid-template-columns:minmax(0,1fr) 260px;gap:12px}.panel-title{padding:16px}.panel-body{padding:16px}.action-panel{padding:16px}.board-key{gap:4px}.player-details{display:block}.player-details span{display:block;margin-top:3px}.player-chip{padding:10px 6px}.player-name{font-size:10px}.hand-heading{align-items:flex-start;gap:8px}.hand-heading span{max-width:125px;text-align:right;line-height:1.4}.hand{gap:8px}.playing-card{width:76px;min-width:76px;height:122px}.card-value{font-size:38px}.card-value.special{font-size:17px}.card-caption{font-size:8px}.waiting-layout{grid-template-columns:1fr 280px}.waiting-table{padding:20px}.seat-pick{padding:12px;gap:8px}.ready-badge{position:absolute;right:12px;bottom:12px}}@media(max-width:700px){.site-header{height:68px;padding:0 16px}.wordmark{font-size:28px;gap:12px}.wordmark span{font-size:14px;padding-left:12px}.header-right{gap:12px}.connection{font-size:10px}.icon-button{width:30px;height:30px}.site-footer{padding:18px 16px;align-items:flex-start;font-size:10px}#main{padding:24px 16px 16px;min-height:calc(100vh - 130px)}.landing{grid-template-columns:1fr;margin:0;gap:24px;max-width:480px}.landing-copy h1{font-size:38px;margin:14px 0}.landing-copy>p{font-size:14px;margin-bottom:12px}.landing-badges{margin:16px 0 0}.landing-board{display:none}.entry-panel{padding:24px}.room-heading{margin-bottom:20px;gap:12px;flex-wrap:wrap}.room-heading h1{font-size:29px}.room-tools{padding-top:0;width:100%;justify-content:flex-start}.room-tools .button{min-height:36px;font-size:11px;padding:8px 12px}.waiting-layout,.game-layout{grid-template-columns:1fr;gap:20px}.waiting-table{padding:20px}.seats-grid{margin:20px 0;gap:8px}.seat-pick{min-height:108px}.waiting-layout>.sidebar{display:grid;grid-template-columns:1fr}.game-layout>.sidebar{display:contents}.game-layout .action-panel{grid-row:1}.table-column{display:contents}.table-toolbar{grid-row:2;margin:0}.board-wrap{grid-row:3;margin-top:-8px}.board-key{grid-row:4;margin:-8px 0 0;gap:6px}.hand-panel{grid-row:5;margin-top:0}.player-details{display:flex;font-size:9px}.player-name{font-size:10px}.player-chip{padding:10px 8px}.player-sub{font-size:8px}.board-svg{max-height:none}.action-panel{padding:16px}.action-panel h2{font-size:23px;margin:6px 0}.action-panel p{margin-bottom:8px;font-size:11px}.action-options{display:grid;grid-template-columns:1fr 1fr;gap:6px;max-height:180px}.action-option{font-size:11px;padding:10px;min-height:40px}.action-controls{margin-top:12px}.action-status{margin-top:8px;font-size:10px}.turn-icon{display:none}.hand{gap:8px;padding-bottom:8px}.playing-card{width:88px;min-width:88px;height:128px}.card-value{font-size:40px}.card-caption{font-size:9px}.card-value.special{font-size:18px}.panel.log-panel{grid-row:6}.panel.chat-panel{grid-row:7}.chat-list{max-height:220px;min-height:80px}.log-list{max-height:180px}.team-score{margin-top:10px}.room-summary{gap:28px}.deck-stat{font-size:10px;gap:10px}.round-title{font-size:12px}dialog{padding:20px}.help-cards{grid-template-columns:66px 1fr;gap:0 12px}.hand-heading span{max-width:170px}.winner-panel{grid-row:1}.waiting-actions .button{flex:1}.player-details span{margin-top:0}.landing-copy .eyebrow{font-size:9px}}@media(max-width:380px){.wordmark span{display:none}.site-header .connection{font-size:9px}.seats-grid{grid-template-columns:1fr}.seat-pick{min-height:82px}.ready-badge{top:16px;bottom:auto}.board-key{grid-template-columns:1fr 1fr}.player-details{justify-content:flex-start;gap:10px}.player-name{font-size:11px}.entry-panel{padding:20px}.room-tools{gap:6px}.room-heading h1{font-size:26px}.hand-heading span{font-size:9px}.playing-card{width:76px;min-width:76px;height:120px}.action-options{grid-template-columns:1fr}.join-row .button{min-width:80px!important}.header-right{gap:8px}}

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:700px){.waiting-layout,.game-layout{grid-template-columns:minmax(0,1fr)}.hand-panel,.board-wrap,.action-panel{min-width:0}.board-key{grid-template-columns:repeat(4,minmax(0,1fr))}.table-toolbar{flex-wrap:wrap;gap:6px}.room-heading p{overflow-wrap:anywhere}}
@media(max-width:380px){.board-key{grid-template-columns:repeat(2,minmax(0,1fr))}}

.mode-picker{border:0;padding:0;margin:0 0 20px;min-width:0;display:grid;gap:8px}.mode-picker legend{font-size:12px;font-weight:600;padding:0;margin-bottom:10px}.mode-choice{display:flex;align-items:flex-start;gap:10px;border:1px solid var(--line);border-radius:8px;padding:12px;cursor:pointer;background:var(--surface)}.mode-choice:has(input:checked){border-color:var(--green);background:var(--green-light)}.mode-choice input[type=radio]{width:16px;height:16px;min-width:16px;margin:2px 0 0;padding:0;accent-color:var(--green);flex-shrink:0}.mode-choice>span{display:grid;gap:5px;min-width:0}.mode-choice strong{font-size:12px;line-height:1.4}.mode-choice small{font-size:10px;color:var(--muted);line-height:1.5}.hands-stack{min-width:0}.hand-heading h2{display:flex;align-items:center;gap:8px}.hand-heading h2 .seat-dot{margin:0}.duel-hands .hand-panel{border-left:3px solid var(--seat)}.duel-hands .hand-panel.active-hand{outline:1px solid var(--green)}.duel-hands .hand-panel.active-hand .hand-heading>span{color:var(--green);font-weight:600}.inactive-hand .playing-card{background:#f7f6f0}.exchange-entry+.exchange-entry{border-top:1px solid var(--line);margin-top:14px;padding-top:2px}.team-score>div{overflow-wrap:anywhere;min-width:0}.mode-choice:focus-within{outline:2px solid var(--green);outline-offset:2px}@media(max-width:700px){.hands-stack{grid-row:5;display:flex;flex-direction:column;gap:12px}.hands-stack .hand-panel{margin-top:0;grid-row:auto}.duel-hands .hand-heading{flex-wrap:wrap;gap:8px}.duel-hands .hand-heading>span{max-width:none;text-align:left}.mode-choice{padding:10px}}

/* A fixed game table keeps the board and every private card in the same viewport. */
:root{color-scheme:light;--input:#fff;--card:#fffdf7;--card-line:#cfd2c2;--card-shadow:#e8e6dc;--inactive:#f7f6f0;--action:#f4f7ee;--action-line:#a7b7a4;--board-fill:#e7d4b4;--board-edge:#ba955f;--board-hole:#b08958;--board-hole-edge:#987044;--board-inner:#c8a879;--board-label:#4c442f;--board-center:#66553a;--board-base:#c29c64;--board-home:#ffffff38;--board-path:#ae8652;--board-target:#263c2e;--board-target-fill:#f5edb75e;--notice-bg:#fff0e8;--notice-ink:#833e31;--notice-line:#d8afa1;--winner-bg:#fff7df;--winner-ink:#7a551b}
:root[data-theme=dark]{color-scheme:dark;--paper:#141b20;--surface:#1d272e;--ink:#ecf1ed;--muted:#afbbb6;--line:#3b494e;--green:#8fd2af;--green-light:#2a413a;--wood:#927246;--wood-light:#bca27b;--danger:#f6a69d;--gold:#e7bd74;--shadow:0 12px 36px #0003;--input:#172128;--card:#26343b;--card-line:#58676b;--card-shadow:#101a20;--inactive:#202c33;--action:#20332e;--action-line:#527566;--board-fill:#343d40;--board-edge:#637069;--board-hole:#1d282d;--board-hole-edge:#708078;--board-inner:#46564e;--board-label:#e0e8df;--board-center:#d6dfd5;--board-base:#293b3b;--board-home:#ffffff10;--board-path:#859588;--board-target:#c1f2d7;--board-target-fill:#8fd2af35;--notice-bg:#462b28;--notice-ink:#ffd2bf;--notice-line:#935d52;--winner-bg:#3b3321;--winner-ink:#f3d596}
body{background:var(--paper);color:var(--ink)}input{background:var(--input)}.playing-card{background:var(--card);border-color:var(--card-line);box-shadow:0 3px 0 var(--card-shadow)}.inactive-hand .playing-card{background:var(--inactive)}.action-panel{background:var(--action);border-color:var(--action-line)}.seat-pick{background:var(--surface)}.seat-pick.mine{background:var(--green-light)}.action-option{border-color:var(--line)}.log-item{border-color:var(--line)}.notice{background:var(--notice-bg);color:var(--notice-ink);border-color:var(--notice-line)}.winner-panel{background:var(--winner-bg)}.winner-panel h2,.winner-panel .eyebrow{color:var(--winner-ink)}.button.primary{color:var(--paper)}.button.primary:hover:not(:disabled){background:var(--green);filter:brightness(1.08)}.toast{color:var(--paper)}.board-wrap{background:var(--board-fill);border-color:var(--board-edge)}.board-wrap:after{border-color:var(--board-edge);opacity:.35}.board-svg .space{fill:var(--board-hole);stroke:var(--board-hole-edge)}.board-svg .space-inner{fill:var(--board-inner)}.board-svg .start{fill:var(--board-inner)}.board-svg .home-space{fill:var(--board-home)}.board-svg .base-space{fill:var(--board-base)}.board-svg .seat-label{fill:var(--board-label)}.board-svg .board-center{fill:var(--board-center)}.board-svg .target{fill:var(--board-target-fill);stroke:var(--board-target)}.board-svg .marble-number{display:none}.board-svg .marble-node{cursor:pointer}.board-svg .marble-node.movable .marble{stroke:var(--green);stroke-width:3;filter:drop-shadow(0 0 5px var(--green))}.board-svg .marble-node:focus-visible{outline:none}.board-svg .marble-node:focus-visible .marble{stroke:var(--gold);stroke-width:4}.ghost-hints{pointer-events:none}.ghost-hints circle{fill:var(--board-target-fill);stroke:var(--green);stroke-width:2;stroke-dasharray:3 2}.ghost-hints text{fill:var(--board-label);font-size:10px;text-anchor:middle;pointer-events:none}.board-svg .drop-zone{transition:fill .15s,stroke .15s}.board-svg .drop-ready{fill:var(--green-light);stroke:var(--green);stroke-width:3}.theme-button,.icon-button{touch-action:manipulation}#theme-button{font-family:var(--font-ui);font-size:18px}
body.playing{height:100dvh;overflow:hidden}body.playing .site-header{height:48px;padding:0 18px;max-width:none}body.playing .wordmark{font-size:27px;gap:10px}body.playing .wordmark span{font-size:13px;padding-left:10px}body.playing .header-right{gap:10px}body.playing .site-footer{display:none}body.playing #main{height:calc(100dvh - 48px);min-height:0;max-width:none;padding:8px 14px}body.playing #app{height:100%;min-height:0}body.playing #notice:not([hidden]){position:fixed;top:53px;left:50%;transform:translateX(-50%);max-width:calc(100% - 24px);z-index:40;margin:0;box-shadow:var(--shadow)}.game-shell{height:100%;display:flex;flex-direction:column;min-height:0}.game-shell>.room-heading{min-height:38px;height:38px;flex:0 0 auto;align-items:center;margin:0 0 6px;gap:12px}.game-shell>.room-heading .eyebrow,.game-shell>.room-heading p{display:none}.game-shell>.room-heading h1{font-size:21px;letter-spacing:0;margin:0}.game-shell .room-tools{padding:0;width:auto;flex-wrap:nowrap}.game-shell .room-tools .button{min-height:32px;padding:6px 11px;font-size:11px}.game-shell>.game-layout{--hand-height:164px;flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 280px;grid-template-rows:minmax(0,1fr) var(--hand-height);gap:10px}.game-shell .table-column{display:flex;flex-direction:column;grid-column:1;grid-row:1;min-height:0;min-width:0}.game-shell .table-toolbar{flex:0 0 auto;min-height:20px;margin:0 0 5px;gap:8px;flex-wrap:nowrap}.game-shell .round-title{font-size:11px}.game-shell .deck-stat{font-size:10px;gap:10px}.turn-banner{display:flex;align-items:center;gap:10px;min-height:38px;padding:7px 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface);font-size:12px;flex:0 0 auto;margin-bottom:6px}.turn-banner strong{font-size:14px}.turn-banner span{color:var(--muted);font-size:11px}.turn-banner.myturn{border-color:var(--green);background:var(--green-light);box-shadow:inset 4px 0 var(--green)}.turn-banner.myturn strong{color:var(--green)}.game-shell .board-wrap{flex:1;min-height:0;min-width:0;padding:2px;display:flex;align-items:center;justify-content:center;grid-row:auto;margin:0;overflow:hidden}.game-shell .board-svg{height:100%;width:100%;max-height:none;aspect-ratio:1;object-fit:contain}.game-shell .board-key{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin:6px 0 0;flex:0 0 auto;grid-row:auto}.game-shell .player-chip{padding:6px 8px;border-radius:7px}.game-shell .player-chip.current{border-color:var(--green);box-shadow:inset 0 2px var(--green)}.game-shell .player-name{font-size:10px}.game-shell .player-details{display:flex;font-size:9px;margin-top:4px}.game-shell .player-details span{margin:0}.game-shell .player-sub{display:none}.game-shell .hands-stack{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:minmax(0,1fr);min-height:0;gap:10px}.game-shell .hands-stack.duel-hands{grid-template-columns:repeat(2,minmax(0,1fr))}.game-shell .hand-panel{margin:0;min-height:0;padding:8px 12px;display:flex;flex-direction:column;grid-row:auto;border-radius:10px}.game-shell .hand-panel.active-hand{border-color:var(--green);box-shadow:inset 0 3px var(--green)}.game-shell .hand-heading{flex:0 0 auto;align-items:center;gap:8px;margin:0 0 4px;min-height:18px;flex-wrap:nowrap}.game-shell .hand-heading h2{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.game-shell .hand-heading>span{font-size:9px;text-align:right;max-width:none;line-height:1.25}.game-shell .hand{flex:1;min-height:0;display:grid;grid-template-columns:repeat(var(--cards,6),minmax(0,96px));justify-content:center;gap:8px;padding:3px 0 5px;overflow:visible;align-items:stretch}.game-shell .playing-card{min-width:0;width:100%;height:100%;min-height:0;max-height:104px;flex-shrink:1;padding:8px 4px;touch-action:none;border-radius:7px}.game-shell .playing-card:before,.game-shell .playing-card:after{font-size:9px}.game-shell .playing-card:before{top:5px;left:6px}.game-shell .playing-card:after{bottom:5px;right:6px}.game-shell .card-value{font-size:35px}.game-shell .card-value.special{font-size:16px}.game-shell .card-caption{font-size:8px;line-height:1.2;margin-top:6px;max-width:100%}.game-shell .hand-hint{flex:0 0 auto;font-size:10px;line-height:1.3;min-height:13px;max-height:26px;overflow:hidden;margin:4px 0 0}.game-shell .empty-hand{font-size:11px;padding:14px 0;text-align:center}.game-shell .sidebar{grid-column:2;grid-row:1;min-height:0;gap:8px;overflow:hidden;display:flex;flex-direction:column}.game-shell .action-panel{padding:12px;max-height:70%;min-height:0;overflow:auto;flex:0 1 auto;grid-row:auto}.game-shell .action-panel h2{font-size:20px;margin:6px 0}.game-shell .action-panel p{font-size:11px;line-height:1.45;margin-bottom:8px}.game-shell .action-options{max-height:180px;gap:5px}.game-shell .action-option{font-size:11px;min-height:34px;padding:7px 9px}.game-shell .action-controls{margin-top:9px;gap:6px}.game-shell .action-controls .button{min-height:34px;font-size:11px;padding:7px}.game-shell .action-status{margin-top:8px;font-size:10px}.utility-tabs{display:flex;gap:5px;flex:0 0 auto}.utility-tabs button{flex:1;border:1px solid var(--line);border-radius:7px;min-height:34px;background:var(--surface);color:var(--muted);font-size:11px;padding:7px 9px}.utility-tabs button[aria-pressed=true],.utility-tabs button.active{background:var(--green-light);border-color:var(--green);color:var(--ink)}.utility-panel{flex:1;min-height:0;overflow:hidden}.utility-panel>.panel{height:100%;min-height:0;display:flex;flex-direction:column}.utility-panel .panel-title{flex:0 0 auto;padding:12px 14px}.utility-panel .chat-list,.utility-panel .log-list{max-height:none;min-height:0;flex:1;padding:10px 14px}.utility-panel .chat-form,.utility-panel .stats-row{flex:0 0 auto}.utility-panel .chat-form{padding:8px}.utility-panel .chat-form input{padding:8px 10px}.utility-panel .chat-form button{min-height:36px}.exchange-entry{margin-top:9px}.exchange-entry+.exchange-entry{margin-top:9px;padding-top:8px}.exchange-entry p{margin-bottom:6px}.exchange-entry .button{min-height:36px;padding:7px 10px;font-size:11px}.exchange-summary{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-height:18px;font-size:10px;color:var(--muted)}.exchange-summary .button{margin-left:auto;min-height:30px;padding:5px 10px;font-size:10px}.exchange-progress{display:flex;gap:5px;align-items:center;font-size:10px}.exchange-progress span{border:1px solid var(--line);padding:4px 6px;border-radius:5px}.exchange-progress .done{border-color:var(--green);background:var(--green-light)}.card-ghost{position:fixed;z-index:100;pointer-events:none;width:82px;height:112px;border:2px solid var(--green);border-radius:8px;background:var(--card);box-shadow:0 12px 28px #0004;color:var(--green);display:flex;align-items:center;justify-content:center;font:36px var(--font-ui);transform:rotate(-7deg);opacity:.96}.card-flight{position:fixed;pointer-events:none;z-index:90;width:66px;height:88px;background:var(--card);color:var(--green);border:1px solid var(--card-line);border-radius:7px;box-shadow:var(--shadow);display:flex;align-items:center;justify-content:center;font:26px var(--font-ui)}.marble-flight{pointer-events:none}.game-shell .playing-card.dragging{opacity:.25}.game-shell .board-wrap.drag-over{border-color:var(--green);box-shadow:inset 0 0 0 2px var(--green)}
@media(min-width:1500px){.game-shell>.game-layout{grid-template-columns:minmax(0,1fr) 310px}}
@media(max-width:1000px) and (min-width:721px){.game-shell>.game-layout{grid-template-columns:minmax(0,1fr) 236px;--hand-height:152px;gap:8px}.game-shell .hand-panel{padding:7px 9px}.game-shell .hand{gap:5px}.game-shell .playing-card{max-height:94px}.game-shell .card-value{font-size:30px}.game-shell .card-value.special{font-size:13px}.game-shell .hand-heading>span{font-size:8px}.game-shell .hand-heading h2{font-size:11px}}
@media(max-width:720px){body.playing .site-header{padding:0 10px}.game-shell>.room-heading{height:34px;min-height:34px;gap:6px;flex-wrap:nowrap}.game-shell>.room-heading h1{font-size:17px}.game-shell .room-code{letter-spacing:1px}.game-shell .room-tools{gap:5px}.game-shell .room-tools .button{min-height:30px;padding:5px 8px;font-size:10px}body.playing .prototype-tag{display:none}body.playing #main{padding:6px 8px}.game-shell>.game-layout{--hand-height:148px;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto var(--hand-height);gap:7px}.game-shell>.game-layout:has(.duel-hands){--hand-height:210px}.game-shell .table-column{display:flex;grid-column:1;grid-row:1}.game-shell .table-toolbar{min-height:16px;margin-bottom:3px}.game-shell .round-title{font-size:10px}.game-shell .deck-stat{font-size:9px;gap:7px}.turn-banner{min-height:31px;padding:5px 9px;margin-bottom:4px;gap:8px}.turn-banner strong{font-size:12px}.turn-banner span{font-size:10px}.game-shell .board-key{margin-top:4px;gap:4px}.game-shell .player-chip{padding:5px}.game-shell .player-name{font-size:9px;gap:4px}.game-shell .player-name .seat-dot{width:7px;height:7px}.game-shell .player-details{display:none}.game-shell .hands-stack,.game-shell .hands-stack.duel-hands{grid-row:3;grid-column:1;grid-template-columns:minmax(0,1fr);gap:6px}.game-shell .hands-stack.duel-hands{grid-template-rows:repeat(2,minmax(0,1fr))}.game-shell .hand-panel{padding:6px 8px;border-radius:8px}.game-shell .hand-heading{margin-bottom:2px;min-height:15px;gap:5px}.game-shell .hand-heading h2{font-size:11px}.game-shell .hand-heading>span{font-size:8px;max-width:56%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.game-shell .hand{gap:6px;padding:2px 0 4px;grid-template-columns:repeat(var(--cards,6),minmax(0,76px))}.game-shell .playing-card{max-height:94px;padding:7px 3px}.game-shell .card-value{font-size:30px}.game-shell .card-value.special{font-size:13px}.game-shell .card-caption{font-size:7px;line-height:1.2;margin-top:4px}.game-shell .hand-hint{font-size:9px;line-height:1.25;min-height:11px;max-height:11px;margin-top:3px;white-space:nowrap;text-overflow:ellipsis}.game-shell .duel-hands .hand-heading h2{font-size:10px}.game-shell .duel-hands .hand{gap:5px;padding:1px 0 3px}.game-shell .duel-hands .playing-card{max-height:58px;padding:5px 2px}.game-shell .duel-hands .card-value{font-size:25px}.game-shell .duel-hands .card-value.special{font-size:12px}.game-shell .duel-hands .card-caption{font-size:6px;margin-top:2px}.game-shell .duel-hands .playing-card:before,.game-shell .duel-hands .playing-card:after{font-size:7px}.game-shell .duel-hands .playing-card:before{left:4px;top:3px}.game-shell .duel-hands .playing-card:after{right:4px;bottom:3px}.game-shell .duel-hands .hand-hint{font-size:8px;line-height:1.2;min-height:9px;max-height:9px;margin-top:2px}.game-shell .sidebar{grid-column:1;grid-row:2;display:grid;grid-template-columns:minmax(0,1fr) 104px;gap:7px;overflow:visible;min-height:0;align-items:start}.game-shell .action-panel{grid-row:auto;grid-column:1;padding:7px 9px;max-height:112px;overflow:auto}.game-shell .action-panel .eyebrow{font-size:8px;letter-spacing:1px}.game-shell .action-panel h2{font-size:16px;margin:3px 0}.game-shell .action-panel p{font-size:10px;line-height:1.35;margin:3px 0}.game-shell .action-panel .turn-icon{display:none}.game-shell .action-status{font-size:9px;margin-top:4px}.game-shell .action-controls{margin-top:5px}.game-shell .action-controls .button{min-height:30px;padding:4px 7px;font-size:10px}.game-shell .action-options{grid-template-columns:repeat(2,minmax(0,1fr));max-height:90px;gap:4px}.game-shell .action-option{min-height:30px;padding:5px 7px;font-size:10px}.game-shell .utility-tabs{grid-column:2;display:flex;gap:4px;align-self:stretch}.game-shell .utility-tabs button{min-height:34px;padding:5px;line-height:1.2;font-size:10px}.game-shell .utility-panel{position:fixed;right:8px;bottom:calc(var(--hand-height,210px) + 14px);z-index:20;width:min(350px,calc(100vw - 16px));height:min(360px,50dvh);background:var(--surface);box-shadow:0 12px 40px #0005;border-radius:10px}.game-shell .exchange-entry{margin-top:4px}.game-shell .exchange-entry+.exchange-entry{margin-top:4px;padding-top:4px}.game-shell .exchange-entry .button{min-height:30px;padding:5px 7px;font-size:10px}.game-shell .exchange-summary{font-size:9px;min-height:15px;gap:5px}.game-shell .exchange-summary .button{min-height:26px;padding:3px 8px;font-size:9px}.game-shell .exchange-progress{font-size:8px;gap:3px}.game-shell .exchange-progress span{padding:3px 4px}.game-shell .team-score{margin-top:4px;gap:12px}.game-shell .team-score b{font-size:18px}.game-shell .team-score div{font-size:9px}}
@media(max-width:380px){body.playing .wordmark span{display:none}body.playing .connection{font-size:9px}.game-shell .room-tools .button{font-size:9px;padding:4px 6px}.game-shell .hand{gap:4px}.game-shell .playing-card:before,.game-shell .playing-card:after{font-size:8px}.game-shell .card-value.special{font-size:12px}.game-shell .board-key{grid-template-columns:repeat(4,minmax(0,1fr))}.game-shell .player-name{font-size:8px}.game-shell .sidebar{grid-template-columns:minmax(0,1fr) 86px}.game-shell .hand-heading>span{font-size:7px}.game-shell .hand-heading h2{font-size:10px}}
@media(max-height:600px) and (min-width:721px){body.playing .site-header{height:40px}body.playing #main{height:calc(100dvh - 40px);padding:5px 10px}.game-shell>.room-heading{height:30px;min-height:30px;margin-bottom:4px}.game-shell>.game-layout{--hand-height:118px;gap:6px}.game-shell .hand-panel{padding:5px 9px}.game-shell .hand{padding:1px 0 3px;gap:6px}.game-shell .playing-card{max-height:70px}.game-shell .card-value{font-size:26px}.game-shell .card-value.special{font-size:13px}.game-shell .card-caption{font-size:7px;margin-top:3px}.game-shell .hand-hint{font-size:8px;max-height:10px;min-height:10px;margin-top:2px}.game-shell .board-key{display:none}.turn-banner{min-height:29px;padding:4px 9px;margin-bottom:4px}.game-shell .action-panel{padding:8px}.game-shell .action-panel h2{font-size:17px}.game-shell .action-panel p{font-size:10px}.game-shell .action-options{max-height:100px}.game-shell .table-toolbar{min-height:16px;margin-bottom:3px}}
@media(prefers-reduced-motion:reduce){.card-flight,.card-ghost{transition:none!important;animation:none!important}.board-svg .target{animation:none!important}}

/* Interaction state names shared with app.js. */
.turn-banner.my-turn{border-color:var(--green);background:var(--green-light);box-shadow:inset 4px 0 var(--green)}.turn-banner.my-turn strong{color:var(--green)}.utility-tabs button[aria-expanded=true]{background:var(--green-light);border-color:var(--green);color:var(--ink)}.utility-panel{position:relative}.utility-close{position:absolute;top:8px;right:8px;z-index:2;width:26px;height:26px;font-size:17px;background:var(--surface)}.utility-panel .panel-title{padding-right:42px}.board-svg .move-guide{stroke:var(--green);stroke-width:2;stroke-dasharray:5 5;opacity:.65;pointer-events:none}.board-svg .chosen-marble .marble{stroke:var(--gold);stroke-width:4;filter:drop-shadow(0 0 5px var(--gold))}.game-shell .board-wrap.drop-ready{border-color:var(--green);box-shadow:inset 0 0 0 3px var(--green)}.game-shell .move-list{margin:7px 0;font-size:10px;color:var(--muted)}.game-shell .move-list summary{padding:4px 0;cursor:pointer}.game-shell .cancel-choice{margin-top:8px}.card-ghost{translate:-50% -50%}.dragging-card{cursor:grabbing;user-select:none}@media(max-width:720px){.game-shell .utility-panel{position:fixed}.game-shell .cancel-choice{min-height:28px;font-size:10px;padding:4px 8px;margin-top:5px}}

/* Exchange status must remain visible before each deal. */
.exchange-progress i{display:inline-block;width:12px;height:12px;flex:0 0 12px;border:1px solid var(--seat);border-radius:50%;background:transparent}.exchange-progress i.done{background:var(--seat);box-shadow:inset 0 0 0 2px var(--surface)}.game-shell:has(.exchange-panel) .player-sub{display:block;font-size:8px;margin-top:3px;min-height:10px}.game-shell:has(.exchange-panel) .board-key{display:grid}
@media(max-height:650px) and (max-width:559px){.game-shell>.game-layout:has(.duel-hands){--hand-height:178px}.game-shell .duel-hands .hand-panel{padding:5px 7px}.game-shell .duel-hands .hand-heading{min-height:13px}.game-shell .duel-hands .hand-heading h2{font-size:9px}.game-shell .duel-hands .playing-card{max-height:47px}.game-shell .duel-hands .card-value{font-size:22px}.game-shell .duel-hands .card-value.special{font-size:11px}.game-shell .duel-hands .card-caption{font-size:6px;margin-top:1px}.game-shell .duel-hands .hand-hint{margin-top:1px;font-size:7px;min-height:8px;max-height:8px}}
/* A phone turned sideways needs the hands in one row, like a small desktop. */
@media(max-height:520px) and (min-width:560px) and (max-width:720px){body.playing .site-header{height:40px}body.playing #main{height:calc(100dvh - 40px);padding:5px 8px}.game-shell>.room-heading{height:28px;min-height:28px;margin-bottom:4px}.game-shell>.game-layout,.game-shell>.game-layout:has(.duel-hands){--hand-height:112px;grid-template-columns:minmax(0,1fr) 196px;grid-template-rows:minmax(0,1fr) var(--hand-height);gap:6px}.game-shell .table-column{grid-column:1;grid-row:1}.game-shell .sidebar{grid-column:2;grid-row:1;display:flex;flex-direction:column;min-height:0;overflow:hidden;gap:5px}.game-shell .sidebar .action-panel{flex:1;max-height:none;min-height:0;padding:6px 8px}.game-shell .utility-tabs{width:100%;flex:0 0 auto}.game-shell .utility-tabs button{min-height:28px}.game-shell .hands-stack,.game-shell .hands-stack.duel-hands{grid-column:1/-1;grid-row:2;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}.game-shell .hands-stack.duel-hands{grid-template-columns:repeat(2,minmax(0,1fr))}.game-shell .hand-panel,.game-shell .duel-hands .hand-panel{padding:5px 8px}.game-shell .hand-heading,.game-shell .duel-hands .hand-heading{min-height:14px}.game-shell .hand,.game-shell .duel-hands .hand{gap:5px;padding:1px 0 3px}.game-shell .playing-card,.game-shell .duel-hands .playing-card{max-height:67px}.game-shell .card-value,.game-shell .duel-hands .card-value{font-size:25px}.game-shell .card-value.special,.game-shell .duel-hands .card-value.special{font-size:12px}.game-shell .card-caption,.game-shell .duel-hands .card-caption{font-size:6px;margin-top:2px}.game-shell .board-key{display:none}.game-shell:has(.exchange-panel) .board-key{display:grid}.turn-banner{min-height:27px;padding:4px 8px;margin-bottom:3px}.turn-banner span{font-size:9px}.turn-banner strong{font-size:11px}.game-shell .table-toolbar{min-height:14px;margin-bottom:2px}.game-shell .round-title,.game-shell .deck-stat{font-size:8px}.game-shell .exchange-summary{font-size:8px;flex-wrap:nowrap}.game-shell .exchange-summary .button{min-height:23px;font-size:8px;padding:3px 6px}.game-shell .utility-panel{height:min(260px,70dvh)}}

/* Leave a full row for the explicit exchange button, including six-card hands. */
.game-shell .hand{grid-auto-rows:minmax(0,1fr)}
@media(max-width:720px){.game-shell>.game-layout:has(.duel-hands .exchange-summary .button){--hand-height:228px}.game-shell .duel-hands .hand-panel:has(.exchange-summary .button) .playing-card{height:44px;max-height:44px}.game-shell .duel-hands .hand-panel:has(.exchange-summary .button) .card-caption{display:none}.game-shell .duel-hands .hand-panel:has(.exchange-summary .button) .exchange-summary{flex-shrink:0;min-height:26px}.game-shell .duel-hands .hand-panel:has(.exchange-summary .button) .hand{align-items:center}}
@media(max-height:520px) and (min-width:560px) and (max-width:720px){.game-shell>.game-layout:has(.duel-hands .exchange-summary .button){--hand-height:120px}.game-shell .duel-hands .hand-panel:has(.exchange-summary .button) .playing-card{height:54px;max-height:54px}}

/* Small portrait screens reserve space for the board while choosing an exchange. */
@media(max-height:650px) and (max-width:559px){body.playing .site-header{height:44px;padding:0 8px}body.playing #main{height:calc(100dvh - 44px);padding:4px 6px}.game-shell>.room-heading{height:28px;min-height:28px;margin-bottom:4px}.game-shell>.room-heading h1{font-size:15px}.game-shell .room-tools .button{min-height:26px;padding:4px 6px;font-size:9px}.game-shell:has(.exchange-panel) .turn-banner{min-height:26px;padding:4px 8px;margin-bottom:3px}.game-shell:has(.exchange-panel) .turn-banner strong{font-size:11px}.game-shell:has(.exchange-panel) .turn-banner>span{display:none}.game-shell:has(.exchange-panel) .sidebar{height:32px;min-height:32px;align-items:stretch}.game-shell:has(.exchange-panel) .sidebar>.action-panel{display:flex;align-items:center;gap:6px;min-height:32px;max-height:32px;padding:4px 6px;overflow:hidden}.game-shell:has(.exchange-panel) .sidebar>.action-panel>.eyebrow,.game-shell:has(.exchange-panel) .sidebar>.action-panel>p,.game-shell:has(.exchange-panel) .sidebar>.action-panel>.team-score{display:none}.game-shell:has(.exchange-panel) .sidebar>.action-panel>h2{font-size:10px;line-height:1.1;letter-spacing:0;margin:0;min-width:0}.game-shell:has(.exchange-panel) .utility-tabs button{min-height:32px;font-size:9px;padding:4px}.game-shell:has(.exchange-panel) .exchange-progress{margin-left:auto;gap:3px;flex-shrink:0}.game-shell:has(.exchange-panel) .exchange-progress i{height:9px;width:9px;flex-basis:9px}.game-shell>.game-layout:has(.duel-hands .exchange-summary .button){--hand-height:178px}.game-shell .duel-hands .hand-panel:has(.exchange-summary){padding:5px 7px}.game-shell .duel-hands .hand-panel:has(.exchange-summary) .hand-heading{min-height:13px;margin-bottom:2px}.game-shell .duel-hands .hand-panel:has(.exchange-summary) .hand{align-items:center;padding:1px 0 3px}.game-shell .duel-hands .hand-panel:has(.exchange-summary) .playing-card{height:30px;max-height:30px;padding:3px 2px}.game-shell .duel-hands .hand-panel:has(.exchange-summary) .card-value{font-size:20px}.game-shell .duel-hands .hand-panel:has(.exchange-summary) .card-value.special{font-size:10px}.game-shell .duel-hands .hand-panel:has(.exchange-summary) .card-caption{display:none}.game-shell .duel-hands .hand-panel:has(.exchange-summary) .playing-card:before,.game-shell .duel-hands .hand-panel:has(.exchange-summary) .playing-card:after{font-size:6px;top:2px;bottom:auto}.game-shell .duel-hands .hand-panel:has(.exchange-summary) .playing-card:after{top:auto;bottom:2px}.game-shell .duel-hands .hand-panel:has(.exchange-summary) .exchange-summary{height:26px;min-height:26px;max-height:26px;flex-shrink:0;flex-wrap:nowrap;gap:4px;font-size:8px}.game-shell .duel-hands .exchange-summary>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.game-shell .duel-hands .exchange-summary>.button{flex-shrink:0;min-height:24px;padding:3px 6px;font-size:8px}}

/* A larger board, with all private cards kept in view. */
:root{--playable:#16835b;--playable-glow:#249e6b4d;--warning:#9a671e;--warning-bg:#fff0ce;--warning-line:#d39c43;--path-fill:#f8f0a1;--path-stroke:#406d36}
:root[data-theme=dark]{--playable:#9ce8bb;--playable-glow:#72e1a361;--warning:#f4cd7b;--warning-bg:#443620;--warning-line:#d7ac55;--path-fill:#ddf3a5;--path-stroke:#b9edb8}
.game-shell .board-wrap{background:transparent;border:0;box-shadow:none;padding:0;overflow:visible}
.game-shell .board-wrap:after{display:none}
.game-shell .board-wrap.drop-ready{box-shadow:none}
.game-shell .board-wrap.drop-ready .board-surface{stroke:var(--playable);stroke-width:5}
.game-shell .board-svg .move-guide{display:none}
.game-shell .board-svg .path-hole{fill:var(--path-fill);stroke:var(--path-stroke);stroke-width:2.8;opacity:.96;pointer-events:none;filter:drop-shadow(0 0 4px var(--playable-glow))}
.game-shell .board-svg .path-hole.capture{fill:#ffe0a0;stroke:var(--warning-line)}
.game-shell .board-svg .target{animation:none;fill:var(--path-fill);stroke:var(--path-stroke);stroke-width:3}
.game-shell .board-svg .target-count{font:700 12px var(--font-ui);fill:#203925;dominant-baseline:central;text-anchor:middle;pointer-events:none;paint-order:stroke;stroke:var(--path-fill);stroke-width:2}
.game-shell .board-svg .marble-node.selectable .marble{stroke:var(--playable);stroke-width:3;filter:drop-shadow(0 0 5px var(--playable-glow))}
.game-shell .playing-card.playable:not(:disabled){opacity:1;border:2px solid var(--playable);background:var(--card);box-shadow:0 0 0 1px var(--playable-glow),0 0 13px var(--playable-glow),0 3px 0 var(--card-shadow)}
.game-shell .playing-card.playable:hover:not(:disabled){background:var(--green-light);box-shadow:0 0 0 2px var(--playable),0 0 18px var(--playable-glow);transform:translateY(-4px)}
.game-shell .playing-card.unplayable,.game-shell .playing-card.unplayable:disabled{opacity:.38;filter:saturate(.25);box-shadow:none;border-color:var(--line)}
.game-shell .playing-card.selected{opacity:1!important;filter:none;border:3px solid var(--gold)!important;background:var(--green-light);box-shadow:0 0 0 2px var(--gold),0 0 19px var(--playable-glow);transform:translateY(-3px)}
.game-shell .hand-panel.active-hand{border-color:var(--playable);box-shadow:inset 0 3px var(--playable),0 0 12px var(--playable-glow)}
.game-shell .discard-panel{border:2px solid var(--warning-line);background:var(--warning-bg)}
.game-shell .discard-panel h2,.game-shell .discard-panel .eyebrow{color:var(--warning)}
.game-shell .discard-panel .discard-icon{font-size:28px;line-height:1;color:var(--warning)}
.game-shell .turn-banner.forced-discard{border-color:var(--warning-line);background:var(--warning-bg);box-shadow:inset 4px 0 var(--warning-line)}
.game-shell .turn-banner.forced-discard strong{color:var(--warning)}
.deck-stack,.discard-pile{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:64px;min-height:28px;padding:4px 8px;background:var(--surface);border:1px solid var(--line);border-radius:6px;color:var(--ink);font-size:10px;line-height:1.1}
.deck-stack{position:relative;border-color:var(--green);box-shadow:2px 2px 0 var(--paper),3px 3px 0 var(--line),4px 4px 0 var(--paper),5px 5px 0 var(--line);margin:0 5px 5px 0}
.deck-stack b,.discard-pile b{font-size:13px;color:var(--green)}
.deck-stack:not(:disabled):hover{background:var(--green-light);border-color:var(--playable)}
.deck-stack:disabled{opacity:.65}
.round-ribbon{position:absolute;left:50%;top:12px;transform:translateX(-50%);z-index:5;display:flex;flex-direction:column;align-items:center;gap:4px;max-width:calc(100% - 32px);padding:12px 22px;border:1px solid var(--gold);border-radius:12px;background:var(--surface);box-shadow:0 8px 28px #0003;text-align:center;pointer-events:none}
.round-ribbon strong{font:25px var(--font-ui);color:var(--ink);white-space:nowrap}
.round-ribbon span{font-size:11px;color:var(--muted)}
.draw-pile{pointer-events:none;position:fixed;z-index:80;border:1px solid var(--green);border-radius:7px;background:var(--card);box-shadow:var(--shadow)}
.game-shell .draw-panel{border-color:var(--gold);background:var(--surface)}
.game-shell .draw-panel .button{width:100%;min-height:40px}
.seven-meter{display:flex;align-items:center;gap:9px;margin:9px 0;padding:8px 9px;border:1px solid var(--line);border-radius:8px;background:var(--surface)}
.seven-meter .remaining{font:32px var(--font-ui);line-height:1;color:var(--green);min-width:23px;text-align:center}
.seven-meter .segments{display:flex;gap:4px;flex:1;min-width:0}
.seven-meter .segments>*{height:7px;flex:1;background:var(--line);border-radius:3px}
.seven-meter .segments>.filled,.seven-meter .segments>.used,.seven-meter .segments>.done{background:var(--green)}
.seven-source,.swap-progress{font-size:11px;line-height:1.5;padding:7px 9px;border-radius:7px;background:var(--green-light);color:var(--ink);margin:7px 0}
.swap-progress{border-left:3px solid var(--gold)}
.confirm-actions{display:flex;align-items:center;gap:6px;margin-top:8px}
.confirm-actions .button{flex:1;min-height:36px;padding:8px;font-size:11px}
.declarations-panel{padding:10px 12px;background:var(--surface);border:1px solid var(--line);border-radius:9px}
.declarations-panel h3{margin:0 0 7px;font-size:11px}
.declarations-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.declaration-row{display:flex;align-items:center;gap:5px;min-width:0;font-size:10px}
.declaration-row .seat-dot{width:8px;height:8px;margin:0}
.exit-status{display:inline-flex;align-items:center;gap:3px;font-size:9px;line-height:1.2;font-weight:600;padding:3px 5px;border:1px solid var(--line);border-radius:4px;background:var(--paper);color:var(--ink);white-space:nowrap}
.exit-status.yes,.exit-status.has-exit{border-color:var(--playable);background:var(--green-light);color:var(--green)}
.exit-status.no,.exit-status.no-exit{color:var(--muted)}
#table-settings{width:min(510px,calc(100% - 24px));padding:24px}
#table-settings h2{font-size:26px;margin:8px 0 20px}
.settings-options{display:grid;gap:0}
.settings-options>label,.settings-options .setting-row,.settings-options .settings-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:14px 0;border-top:1px solid var(--line);font-size:13px;line-height:1.45;cursor:pointer}
.settings-options label>span{display:grid;gap:4px;min-width:0;flex:1}
.settings-options small{display:block;color:var(--muted);font-size:11px;line-height:1.4;font-weight:400}

.settings-status{font-size:11px;line-height:1.5;color:var(--muted);margin:14px 0 0}
@media(min-width:1050px){body.playing .site-header{height:44px}body.playing #main{height:calc(100dvh - 44px);padding:6px 12px}.game-shell>.room-heading{height:30px;min-height:30px;margin-bottom:4px}.game-shell>.room-heading h1{font-size:18px}.game-shell>.game-layout{--rail-hands:138px;grid-template-columns:minmax(0,1fr) clamp(380px,27vw,400px);grid-template-rows:var(--rail-hands) minmax(0,1fr);gap:10px}.game-shell>.game-layout:has(.duel-hands){--rail-hands:236px}.game-shell .table-column{grid-column:1;grid-row:1/-1}.game-shell .table-toolbar{min-height:29px;margin-bottom:5px}.game-shell .hands-stack,.game-shell .hands-stack.duel-hands{grid-column:2;grid-row:1;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:8px}.game-shell .hands-stack.duel-hands{grid-template-rows:repeat(2,minmax(0,1fr))}.game-shell .sidebar{grid-column:2;grid-row:2;gap:8px}.game-shell .action-panel{max-height:none;flex:0 1 auto;padding:11px 12px}.game-shell .action-panel h2{font-size:20px}.game-shell .hand-panel{padding:7px 10px}.game-shell .hand-heading{margin-bottom:3px;min-height:17px}.game-shell .hand-heading h2{font-size:12px}.game-shell .hand-heading>span{font-size:9px}.game-shell .hand{padding:2px 0 4px;gap:5px;grid-template-columns:repeat(var(--cards,6),minmax(0,1fr))}.game-shell .playing-card{max-height:84px;padding:6px 3px}.game-shell .card-value{font-size:30px}.game-shell .card-value.special{font-size:13px}.game-shell .card-caption{font-size:7px;margin-top:4px}.game-shell .hand-hint{font-size:9px;min-height:11px;max-height:11px;margin-top:2px;white-space:nowrap;text-overflow:ellipsis}.game-shell .duel-hands .hand-heading{min-height:15px}.game-shell .duel-hands .hand-heading h2{font-size:11px}.game-shell .duel-hands .playing-card{max-height:64px}.game-shell .duel-hands .card-value{font-size:27px}.game-shell .duel-hands .card-value.special{font-size:12px}.game-shell .duel-hands .card-caption{font-size:6px;line-height:1.15;margin-top:3px}.game-shell .duel-hands .hand-hint{font-size:8px;min-height:10px;max-height:10px}.game-shell .exchange-summary{font-size:9px;min-height:22px;flex-wrap:nowrap;gap:5px}.game-shell .exchange-summary>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.game-shell .exchange-summary .button{min-height:26px;padding:4px 8px;font-size:9px;flex-shrink:0}.game-shell .duel-hands .hand-panel:has(.exchange-summary .button) .playing-card{max-height:48px}.game-shell .duel-hands .hand-panel:has(.exchange-summary .button) .card-caption{display:none}.game-shell .board-key{gap:6px;margin-top:5px}.game-shell .player-chip{padding:7px 9px}.game-shell .player-name{font-size:11px}.game-shell .player-details{font-size:10px}.game-shell .utility-panel{min-height:0;flex:1}.game-shell .action-options{max-height:160px}}
@media(min-width:721px) and (max-width:1049px){.game-shell>.game-layout{--hand-height:124px;grid-template-columns:minmax(0,1fr) 236px;gap:8px}.game-shell .hand-panel{padding:6px 9px}.game-shell .hand-heading{min-height:16px;margin-bottom:2px}.game-shell .playing-card{max-height:76px;padding:6px 3px}.game-shell .card-value{font-size:27px}.game-shell .card-value.special{font-size:12px}.game-shell .card-caption{font-size:6px;margin-top:3px}.game-shell .hand-hint{font-size:8px;min-height:10px;max-height:10px;margin-top:2px}.game-shell .hand{gap:5px;padding:1px 0 3px}.game-shell .exchange-summary{font-size:8px;min-height:22px;flex-wrap:nowrap}.game-shell .exchange-summary .button{min-height:25px;padding:4px 6px;font-size:8px}.game-shell .hand-panel:has(.exchange-summary .button) .playing-card{max-height:54px}.game-shell .hand-panel:has(.exchange-summary .button) .card-caption{display:none}}
@media(min-width:1050px) and (max-height:650px){.game-shell>.game-layout{--rail-hands:124px}.game-shell>.game-layout:has(.duel-hands){--rail-hands:210px}.game-shell .duel-hands .playing-card{max-height:54px}.game-shell .duel-hands .hand-panel:has(.exchange-summary .button) .playing-card{max-height:40px}.game-shell .action-panel h2{font-size:17px}.game-shell .action-panel p{font-size:10px}.game-shell .seven-meter{margin:6px 0;padding:6px 8px}.game-shell .seven-meter .remaining{font-size:27px}.game-shell .action-options{max-height:100px}}
@media(max-width:720px){.round-ribbon{top:5px;padding:8px 13px;gap:2px;border-radius:9px}.round-ribbon strong{font-size:18px}.round-ribbon span{font-size:9px}.deck-stack,.discard-pile{min-height:22px;min-width:48px;padding:3px 5px;gap:4px;font-size:8px}.deck-stack b,.discard-pile b{font-size:10px}.game-shell .seven-meter{padding:5px 7px;margin:5px 0;gap:6px}.game-shell .seven-meter .remaining{font-size:22px;min-width:17px}.game-shell .seven-meter .segments{gap:3px}.game-shell .seven-meter .segments>*{height:5px}.game-shell .seven-source,.game-shell .swap-progress{font-size:9px;padding:4px 6px;margin:4px 0}.game-shell .confirm-actions{gap:4px;margin-top:5px}.game-shell .confirm-actions .button{min-height:30px;padding:5px;font-size:10px}.declarations-panel{padding:6px 8px}.declarations-panel h3{font-size:9px;margin-bottom:4px}.declaration-row{font-size:8px;gap:4px}.exit-status{font-size:7px;padding:2px 3px}#table-settings{padding:20px}.settings-options>label,.settings-options .setting-row,.settings-options .settings-row{padding:12px 0;font-size:12px}.game-shell .board-svg .target-count{font-size:13px}}
@media(max-height:650px) and (max-width:559px){.game-shell .declarations-panel{padding:4px 6px}.game-shell .declarations-panel h3{display:none}.game-shell .declarations-list{gap:3px}.game-shell .declaration-row{font-size:7px}.game-shell .exit-status{font-size:7px}.round-ribbon{top:3px;padding:5px 10px}.round-ribbon strong{font-size:15px}.round-ribbon span{font-size:8px}}

/* A combined duel hand still shows every card: six columns, up to two rows. */
.game-shell .hands-stack.merged-hands{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
.game-shell .merged-hands .hand:has(.playing-card:nth-child(n+7)){grid-template-rows:repeat(2,minmax(0,1fr));row-gap:7px}
.game-shell .merged-hands .playing-card{max-height:86px}
.game-shell .merged-hands .hand-panel:has(.exchange-summary .button) .playing-card{max-height:74px}
.target-picker{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:8px 0;padding:8px;border:1px solid var(--gold);border-radius:8px;background:var(--surface)}
.target-picker>strong,.target-picker>p{flex:0 0 100%;font-size:11px;line-height:1.4;margin:0 0 3px}
.target-picker>button{flex:1;min-height:36px;min-width:42px;padding:7px 9px;border:1px solid var(--green);border-radius:6px;background:var(--green-light);color:var(--ink);font:600 12px var(--font-ui);cursor:pointer}
.target-picker>button:hover{background:var(--green);color:var(--paper)}
@media(min-width:1050px){.game-shell>.game-layout:has(.merged-hands){--rail-hands:236px}.game-shell .hands-stack.merged-hands{grid-column:2;grid-row:1}.game-shell .merged-hands .card-value{font-size:30px}.game-shell .merged-hands .card-value.special{font-size:13px}.game-shell .merged-hands .card-caption{font-size:7px;line-height:1.2;margin-top:4px}}
@media(min-width:1050px) and (max-height:650px){.game-shell>.game-layout:has(.merged-hands){--rail-hands:210px}.game-shell .merged-hands .playing-card{max-height:72px}.game-shell .merged-hands .hand-panel:has(.exchange-summary .button) .playing-card{max-height:60px}}
@media(min-width:721px) and (max-width:1049px){.game-shell>.game-layout:has(.merged-hands){--hand-height:180px}.game-shell .merged-hands .playing-card{max-height:60px}.game-shell .merged-hands .card-caption{font-size:6px;margin-top:2px}.game-shell .merged-hands .hand-panel:has(.exchange-summary .button) .playing-card{max-height:52px}}
@media(max-width:720px){.game-shell>.game-layout:has(.merged-hands){--hand-height:210px}.game-shell>.game-layout:has(.merged-hands .exchange-summary .button){--hand-height:228px}.game-shell .hands-stack.merged-hands{grid-column:1;grid-row:3;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}.game-shell .merged-hands .playing-card{max-height:72px}.game-shell .merged-hands .card-value{font-size:29px}.game-shell .merged-hands .card-value.special{font-size:13px}.game-shell .merged-hands .card-caption{font-size:7px;margin-top:3px}.game-shell .merged-hands .hand-panel:has(.exchange-summary .button) .playing-card{height:100%;max-height:68px}.target-picker{gap:4px;margin:5px 0;padding:5px}.target-picker>strong,.target-picker>p{font-size:9px}.target-picker>button{min-height:30px;padding:4px 6px;font-size:10px}}
@media(max-height:650px) and (max-width:559px){.game-shell>.game-layout:has(.merged-hands),.game-shell>.game-layout:has(.merged-hands .exchange-summary .button){--hand-height:178px}.game-shell .merged-hands .hand-panel{padding:5px 7px}.game-shell .merged-hands .hand-heading{min-height:13px;margin-bottom:2px}.game-shell .merged-hands .hand:has(.playing-card:nth-child(n+7)){row-gap:5px}.game-shell .merged-hands .playing-card,.game-shell .merged-hands .hand-panel:has(.exchange-summary .button) .playing-card{max-height:54px;height:100%;padding:4px 2px}.game-shell .merged-hands .card-value{font-size:23px}.game-shell .merged-hands .card-value.special{font-size:11px}.game-shell .merged-hands .card-caption{font-size:6px;line-height:1.1;margin-top:2px}.game-shell .merged-hands .hand-hint{font-size:8px;min-height:9px;max-height:9px;margin-top:2px}.game-shell .merged-hands .exchange-summary{min-height:26px;max-height:26px;flex-wrap:nowrap;flex-shrink:0;font-size:8px}.game-shell .merged-hands .exchange-summary>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.game-shell .merged-hands .exchange-summary .button{min-height:24px;padding:3px 6px;font-size:8px;flex-shrink:0}}
@media(max-height:520px) and (min-width:560px) and (max-width:720px){.game-shell>.game-layout:has(.merged-hands),.game-shell>.game-layout:has(.merged-hands .exchange-summary .button){--hand-height:112px}.game-shell .hands-stack.merged-hands{grid-column:1/-1;grid-row:2}.game-shell .merged-hands .hand:has(.playing-card:nth-child(n+7)){grid-template-columns:repeat(12,minmax(0,1fr));grid-template-rows:minmax(0,1fr);gap:4px}.game-shell .merged-hands .playing-card,.game-shell .merged-hands .hand-panel:has(.exchange-summary .button) .playing-card{height:100%;max-height:64px}.game-shell .merged-hands .card-value{font-size:24px}.game-shell .merged-hands .card-value.special{font-size:11px}.game-shell .merged-hands .card-caption{font-size:6px}}

/* Physical card piles and the seven individual step segments. */
.deck-stack{min-height:36px;min-width:72px;margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;gap:8px}
.deck-stack:not(:disabled):hover{background:none;border-color:transparent}
.deck-back{position:relative;display:inline-block;flex:0 0 30px;width:30px;height:36px}
.deck-back>i{position:absolute;display:grid;place-items:center;width:25px;height:32px;top:0;left:4px;border:1px solid var(--surface);border-radius:4px;background:var(--green);color:var(--paper);box-shadow:0 1px 2px #0003;font:700 7px var(--font-ui);font-style:normal;letter-spacing:1px}
.deck-back>i:after{content:"";position:absolute;inset:3px;border:1px solid currentColor;border-radius:2px;opacity:.4}
.deck-back>i:first-child{transform:rotate(5deg)}
.deck-back>i:nth-child(2){top:2px;left:2px;transform:rotate(2deg)}
.deck-back>i:last-child{top:4px;left:0}
.deck-count{display:flex;flex-direction:column;align-items:flex-start;gap:1px;line-height:1.1}
.deck-count>b{font-size:15px;line-height:1.1;color:var(--ink)}
.deck-count>span{font-size:9px;color:var(--muted)}
.discard-pile{flex-direction:column;min-width:48px;min-height:36px;padding:3px 7px;gap:1px;border-style:dashed;background:var(--surface)}
.discard-pile>b{font-size:14px;line-height:1.1}
.discard-pile>span{font-size:8px;line-height:1.1;color:var(--muted)}
.discard-pile.needs-discard{border:2px solid var(--warning-line);background:var(--warning-bg)}
.discard-pile.needs-discard>b,.discard-pile.needs-discard>span{color:var(--warning)}
.board-wrap.discard-active .discard-center>circle{fill:var(--warning-bg);stroke:var(--warning-line);stroke-width:4;opacity:.8}
.seven-meter{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto;column-gap:9px;row-gap:5px}
.seven-meter>.remaining{grid-column:1;grid-row:1/3;white-space:nowrap;font-size:32px}
.seven-meter>.remaining>small{font:600 10px var(--font-ui);color:var(--muted);letter-spacing:0}
.seven-meter>span{grid-column:2;grid-row:1;font-size:10px;color:var(--muted);line-height:1.1}
.seven-segments{grid-column:2;grid-row:2;display:flex;gap:4px;min-width:0}
.seven-segments>i{display:block;flex:1;min-width:0;height:8px;border:1px solid var(--green);border-radius:3px;background:var(--green)}
.seven-segments>i.used{background:var(--line);border-color:var(--line);opacity:.65}
.seven-segments>i.available{background:var(--green);border-color:var(--green)}
@media(max-width:720px){.deck-stack{min-height:29px;min-width:58px;gap:5px}.deck-back{width:24px;height:29px;flex-basis:24px}.deck-back>i{width:20px;height:25px;left:4px;font-size:6px}.deck-back>i:last-child{top:4px}.deck-count>b{font-size:12px}.deck-count>span{font-size:8px}.discard-pile{min-height:29px;min-width:39px;padding:2px 5px}.discard-pile>b{font-size:12px}.discard-pile>span{font-size:7px}.seven-meter>.remaining{font-size:24px}.seven-meter>.remaining>small{font-size:8px}.seven-meter>span{font-size:9px}.seven-segments{gap:3px}.seven-segments>i{height:6px}}
@media(max-height:650px) and (max-width:559px){.deck-stack{min-height:24px}.deck-back{height:24px;flex-basis:22px;width:22px}.deck-back>i{height:21px;width:18px;left:4px;font-size:5px}.deck-back>i:nth-child(2){top:1px;left:2px}.deck-back>i:last-child{top:3px;left:0}.deck-count>b{font-size:11px}.deck-count>span{font-size:7px}.discard-pile{min-height:24px}.discard-pile>b{font-size:10px}}

/* Compact action controls keep a usable board on short portrait phones. */
@media(max-height:650px) and (max-width:559px){
  .game-shell:not(:has(.exchange-panel)) .sidebar>.action-panel{min-height:32px;max-height:70px;padding:5px 7px;overflow:auto}
  .game-shell:not(:has(.exchange-panel)) .sidebar>.action-panel>.eyebrow,
  .game-shell:not(:has(.exchange-panel)) .sidebar>.action-panel>p:not(:has(strong)),
  .game-shell:not(:has(.exchange-panel)) .sidebar>.action-panel>.team-score,
  .game-shell:not(:has(.exchange-panel)) .sidebar>.action-panel>.move-list{display:none}
  .game-shell:not(:has(.exchange-panel)) .sidebar>.action-panel>h2{font-size:12px;line-height:1.25;letter-spacing:0;margin:0}
  .game-shell:not(:has(.exchange-panel)) .sidebar>.action-panel>p:has(strong){font-size:9px;line-height:1.2;margin:3px 0 0}
  .game-shell:not(:has(.exchange-panel)) .sidebar>.action-panel>.action-options:empty{display:none}
  .game-shell:not(:has(.exchange-panel)) .sidebar>.action-panel .cancel-choice{min-height:28px;padding:4px 5px;font-size:8px;margin:0;white-space:nowrap}
  .game-shell:not(:has(.exchange-panel)) .sidebar>.action-panel:has(.seven-meter),
  .game-shell:not(:has(.exchange-panel)) .sidebar>.action-panel:has(.swap-progress){display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px;align-items:center;max-height:62px;padding:4px 6px}
  .game-shell:not(:has(.exchange-panel)) .sidebar>.action-panel:has(.seven-meter)>h2,
  .game-shell:not(:has(.exchange-panel)) .sidebar>.action-panel:has(.swap-progress)>h2{display:none}
  .game-shell .action-panel>.seven-meter{grid-column:1;grid-row:1;min-height:32px;margin:0;padding:3px 4px;column-gap:5px;row-gap:3px}
  .game-shell .action-panel>.seven-meter>.remaining{font-size:21px}
  .game-shell .action-panel>.seven-meter>.remaining>small{font-size:7px}
  .game-shell .action-panel>.seven-meter>span{font-size:7px;line-height:1}
  .game-shell .action-panel>.seven-meter .seven-segments{gap:2px}
  .game-shell .action-panel>.seven-meter .seven-segments>i{height:5px}
  .game-shell .action-panel:has(.seven-meter)>.cancel-choice,
  .game-shell .action-panel:has(.swap-progress)>.cancel-choice{grid-column:2;grid-row:1}
  .game-shell .action-panel>.swap-progress{grid-column:1;grid-row:1;margin:0;padding:4px 5px;font-size:8px;line-height:1.25}
  .game-shell:not(:has(.exchange-panel)) .sidebar>.action-panel:has(.confirm-actions){max-height:70px}
  .game-shell .action-panel>.confirm-actions{grid-column:1/-1;grid-row:2;margin:3px 0 0;gap:4px}
  .game-shell .action-panel>.confirm-actions>.button{min-height:28px;padding:4px 5px;font-size:8px;line-height:1.15}
  .game-shell .action-panel:has(.confirm-actions)>.seven-meter{display:flex;min-height:22px;padding:2px 4px;gap:5px}
  .game-shell .action-panel:has(.confirm-actions)>.seven-meter>.remaining{font-size:18px}
  .game-shell .action-panel:has(.confirm-actions)>.seven-meter>span{display:none}
  .game-shell .action-panel:has(.confirm-actions)>.seven-meter>.seven-segments{flex:1}
  .game-shell:not(:has(.exchange-panel)) .sidebar>.action-panel:has(.target-picker){max-height:112px}
  .game-shell .action-panel>.target-picker{grid-column:1/-1;grid-row:2;margin:0;padding:4px;gap:3px}
  .game-shell .action-panel>.target-picker>strong{font-size:8px;margin:0}
  .game-shell .action-panel>.target-picker>button{min-height:26px;padding:3px 4px;font-size:8px}
  .game-shell .turn-banner:not(.forced-discard)>span{font-size:9px;line-height:1.2;max-height:22px;overflow:hidden}
  .game-shell:has(.exchange-panel) .player-sub{display:none}
  .game-shell:has(.exchange-panel) .player-chip>.exit-status{display:flex;justify-content:center;font-size:7px;padding:2px 1px;margin-top:3px;max-width:100%}
}

/* Quiet card faces: one value and a separately accessible information button. */
:root{--playable-glow:#3c97651c;--path-fill:#93b68b50;--path-stroke:#72916b;--endpoint-fill:#c4d7a8;--endpoint-stroke:#547c4d}
:root[data-theme=dark]{--playable-glow:#8bcfa71a;--path-fill:#9fb99a38;--path-stroke:#a1baa0;--endpoint-fill:#9ab78e;--endpoint-stroke:#c2d2ae}
.game-shell .hand-panel{--face-height:104px;--info-size:18px;--info-bottom:6px;--face-footer:22px}
.game-shell .card-slot{position:relative;display:flex;align-items:stretch;min-height:0;min-width:0;width:100%;height:100%;max-height:var(--face-height);border-radius:7px}
.game-shell .card-slot>.playing-card{position:relative;min-width:0;min-height:0;width:100%;height:100%!important;max-height:100%!important;padding:5px 2px var(--face-footer)!important;border-width:1px;border-radius:7px;display:flex;align-items:center;justify-content:center;text-align:center}
.game-shell .playing-card:before,.game-shell .playing-card:after,.game-shell .card-caption{content:none;display:none!important}
.game-shell .card-slot>.playing-card .card-value{max-width:100%;line-height:1.1;letter-spacing:-.5px}
.game-shell .card-slot>.card-info{position:absolute;left:50%;bottom:var(--info-bottom);translate:-50% 0;z-index:2;display:grid;place-items:center;width:var(--info-size);height:var(--info-size);padding:0;border:1px solid var(--line);border-radius:50%;background:var(--surface);color:var(--muted);font:600 10px/1 var(--font-ui);cursor:help;opacity:1;touch-action:manipulation}
.game-shell .card-slot>.card-info:after{content:"";position:absolute;inset:-5px;border-radius:50%}
.game-shell .card-slot>.card-info:hover,.game-shell .card-slot>.card-info:focus-visible{color:var(--green);border-color:var(--green);background:var(--green-light)}
.game-shell .card-slot.has-selected>.card-info{border-color:var(--gold);color:var(--ink)}
.game-shell .playing-card.playable:not(:disabled){border:1px solid color-mix(in srgb,var(--green) 55%,var(--line));box-shadow:0 2px 5px var(--playable-glow);background:var(--card)}
.game-shell .playing-card.playable:hover:not(:disabled){border-color:var(--green);background:color-mix(in srgb,var(--card) 80%,var(--green-light));box-shadow:0 2px 8px var(--playable-glow);transform:translateY(-2px)}
.game-shell .playing-card.selected,.game-shell .card-slot.has-selected>.playing-card{border:2px solid var(--gold)!important;background:var(--green-light);box-shadow:0 2px 7px var(--playable-glow);transform:translateY(-1px)}
.game-shell .playing-card.unplayable,.game-shell .playing-card.unplayable:disabled{opacity:.48;filter:saturate(.4);box-shadow:none}
.game-shell .hand-panel.active-hand{border-color:color-mix(in srgb,var(--green) 55%,var(--line));box-shadow:inset 0 2px color-mix(in srgb,var(--green) 55%,var(--line))}
.turn-banner.my-turn{background:color-mix(in srgb,var(--surface) 70%,var(--green-light));border-color:color-mix(in srgb,var(--green) 45%,var(--line));box-shadow:inset 3px 0 color-mix(in srgb,var(--green) 60%,var(--line))}
.game-shell .board-svg .path-hole{fill:var(--path-fill);stroke:var(--path-stroke);stroke-width:1.6;opacity:.68;filter:none}
.game-shell .board-svg .path-hole.capture{fill:#d1bd873b;stroke:#a59b72;opacity:.72}
.game-shell .board-svg .target-halo{fill:transparent;stroke:var(--endpoint-stroke);stroke-width:1.5;opacity:.28}
.game-shell .board-svg .target{fill:var(--endpoint-fill);stroke:var(--endpoint-stroke);stroke-width:2;opacity:.85;animation:none;filter:none}
.game-shell .board-svg .target-count{display:none}
.game-shell .board-svg .marble-node.movable .marble,.game-shell .board-svg .marble-node.selectable .marble{stroke:var(--path-stroke);stroke-width:2;filter:none}
.game-shell .board-svg .chosen-marble .marble{stroke:var(--gold);stroke-width:2.5;filter:none}
#card-tooltip{position:fixed;z-index:100;max-width:min(260px,calc(100vw - 24px));width:max-content;padding:11px 13px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);box-shadow:0 8px 28px #0002;font:12px/1.5 var(--font-ui);text-align:left;pointer-events:none;overflow-wrap:anywhere}
#card-tooltip[hidden]{display:none}
#card-tooltip>strong,#card-tooltip h3{display:block;font-size:13px;line-height:1.35;margin:0 0 5px;letter-spacing:0;color:var(--ink)}
#card-tooltip p{font-size:12px;line-height:1.5;margin:0;color:var(--ink)}
.game-shell .merged-hands .hand:has(.card-slot:nth-child(n+7)){grid-template-rows:repeat(2,minmax(0,1fr));row-gap:7px}
@media(min-width:1050px){.game-shell .hand-panel{--face-height:84px;--info-size:16px;--info-bottom:5px;--face-footer:20px}.game-shell .duel-hands .hand-panel{--face-height:64px;--info-size:14px;--info-bottom:4px;--face-footer:18px}.game-shell .duel-hands .hand-panel:has(.exchange-summary .button){--face-height:48px;--info-size:12px;--info-bottom:3px;--face-footer:15px}.game-shell .merged-hands .hand-panel{--face-height:86px}.game-shell .merged-hands .hand-panel:has(.exchange-summary .button){--face-height:74px}}
@media(min-width:1050px) and (max-height:650px){.game-shell .duel-hands .hand-panel{--face-height:54px}.game-shell .duel-hands .hand-panel:has(.exchange-summary .button){--face-height:40px;--info-size:10px;--info-bottom:2px;--face-footer:12px}.game-shell .merged-hands .hand-panel{--face-height:72px}.game-shell .merged-hands .hand-panel:has(.exchange-summary .button){--face-height:60px}}
@media(min-width:721px) and (max-width:1049px){.game-shell .hand-panel{--face-height:76px;--info-size:14px;--info-bottom:4px;--face-footer:18px}.game-shell .hand-panel:has(.exchange-summary .button){--face-height:54px;--info-size:12px;--info-bottom:3px;--face-footer:15px}.game-shell .merged-hands .hand-panel{--face-height:60px}.game-shell .merged-hands .hand-panel:has(.exchange-summary .button){--face-height:52px}}
@media(max-width:720px){.game-shell .hand-panel{--face-height:94px;--info-size:16px;--info-bottom:5px;--face-footer:20px}.game-shell .duel-hands .hand-panel{--face-height:58px;--info-size:14px;--info-bottom:3px;--face-footer:17px}.game-shell .duel-hands .hand-panel:has(.exchange-summary .button){--face-height:44px;--info-size:11px;--info-bottom:2px;--face-footer:13px}.game-shell .merged-hands .hand-panel{--face-height:72px;--info-size:14px;--info-bottom:4px;--face-footer:18px}.game-shell .merged-hands .hand-panel:has(.exchange-summary .button){--face-height:68px}.game-shell .card-slot>.card-info{font-size:9px}}
@media(max-height:650px) and (max-width:559px){.game-shell .duel-hands .hand-panel{--face-height:47px;--info-size:11px;--info-bottom:2px;--face-footer:13px}.game-shell .duel-hands .hand-panel:has(.exchange-summary){--face-height:30px;--info-size:9px;--info-bottom:1px;--face-footer:10px}.game-shell .duel-hands .hand-panel:has(.exchange-summary) .card-value{font-size:15px}.game-shell .duel-hands .hand-panel:has(.exchange-summary) .card-value.special{font-size:9px}.game-shell .duel-hands .hand-panel:has(.exchange-summary) .card-slot>.card-info{font-size:7px}.game-shell .merged-hands .hand-panel,.game-shell .merged-hands .hand-panel:has(.exchange-summary .button){--face-height:54px;--info-size:12px;--info-bottom:2px;--face-footer:14px}.game-shell .merged-hands .hand:has(.card-slot:nth-child(n+7)){row-gap:5px}.game-shell .card-slot>.card-info:after{inset:-4px}}
@media(max-height:520px) and (min-width:560px) and (max-width:720px){.game-shell .hand-panel{--face-height:67px;--info-size:14px;--info-bottom:3px;--face-footer:17px}.game-shell .duel-hands .hand-panel{--face-height:67px}.game-shell .duel-hands .hand-panel:has(.exchange-summary .button){--face-height:54px;--info-size:12px;--info-bottom:2px;--face-footer:14px}.game-shell .merged-hands .hand-panel,.game-shell .merged-hands .hand-panel:has(.exchange-summary .button){--face-height:64px}.game-shell .merged-hands .hand:has(.card-slot:nth-child(n+7)){grid-template-columns:repeat(12,minmax(0,1fr));grid-template-rows:minmax(0,1fr);gap:4px}}

/* Hover brightens just the destination; route cells stay quiet. */
.game-shell .board-svg .move-target .target{fill:var(--path-fill);stroke:var(--path-stroke);stroke-width:1.4;opacity:.52}
.game-shell .board-svg .move-target .target-halo{opacity:.12}
.game-shell .board-svg .move-target.endpoint-active .target,.game-shell .board-svg .path-hole.path-end{fill:var(--endpoint-fill);stroke:var(--endpoint-stroke);stroke-width:2;opacity:.88}
.game-shell .board-svg .move-target.endpoint-active .target-halo{opacity:.3}
/* Long names fit the same quiet card face as single digits. */
.game-shell .card-slot>.playing-card .card-value.special{font-size:9.5px;white-space:nowrap}
@supports(font-size:1cqw){.game-shell .card-slot{container-type:inline-size}.game-shell .card-slot>.playing-card .card-value.special{font-size:clamp(8px,18cqw,14px)}}
