/* The game UI should not turn a pointer drag into a page selection. */
html {
  -webkit-user-select:none;
  user-select:none;
}
input, textarea, [contenteditable]:not([contenteditable="false"]) {
  -webkit-user-select:text;
  user-select:text;
}

/* Keep first/last action outlines inside the scroll viewport in every mode. */
.layout-v2 #legalActions { padding:8px 6px; box-sizing:border-box; scroll-padding-block:8px; }
/* U390: scale the ORIGINAL sprite, not a conventional CSS icon size.
   Sources are 1086x1448 with 3x4 equal square cells. */
.layout-v2 .player > .player-portrait {
 --portrait-original-height:1448px; --portrait-scale:.25;
 --portrait-cell:calc(var(--portrait-original-height) / 4 * var(--portrait-scale));
 width:var(--portrait-cell); height:var(--portrait-cell);
 min-width:var(--portrait-cell); max-width:var(--portrait-cell);
 min-height:var(--portrait-cell); max-height:var(--portrait-cell);
 box-sizing:border-box; flex-shrink:0; background-origin:border-box;
 background-size:auto calc(var(--portrait-original-height) * var(--portrait-scale))!important;
}
@media (min-width:701px) and (min-height:800px) {
 .layout-v2 .player > .player-portrait {
  --portrait-scale:.30;
 }
}
@media (max-width:700px) {
 .layout-v2 .player > .player-portrait {
  --portrait-scale:.10;
 }
}
/* U137: local-seat table; overrides are scoped to an initialized game. */
.match-notice {
 position:fixed; left:50%; top:50%; transform:translate(-50%,-50%);
 z-index:85; display:grid; gap:4px; width:max-content; max-width:calc(100vw - 32px);
 padding:12px 20px; border:1px solid var(--gold); border-radius:12px;
 background:#17251bf5; color:#f2dfb4; box-shadow:0 8px 32px #0009;
 text-align:center; font:14px/1.4 var(--font-ui); box-sizing:border-box;
}
.match-notice strong { font-size:18px; }
.match-notice span { min-width:0; overflow-wrap:anywhere; }
.match-notice:focus-visible { outline:3px solid white; outline-offset:3px; }
.match-notice.critical { min-width:min(390px, calc(100vw - 32px)); padding:18px 26px; font-size:16px; border-width:2px; }
.match-notice.critical strong { font-size:22px; }
.pregame .match-notice { display:none; }
body:has(#endRecap:not(.hidden)) .match-notice { visibility:hidden; pointer-events:none; }
.layout-v2 #turnStatusHome { display:none; }
.layout-v2 .table-wrap { grid-row:2; }
.layout-v2 #replayPanel { grid-row:1; }
.layout-v2 .player { min-height:0; }
.layout-v2 .hand-count { position:absolute; top:79px; left:10px; font-size:14px; background:#1b292d; border-radius:5px; padding:2px 4px; z-index:2; }
.layout-v2 .player-hand>.card { min-height:0; }
.layout-v2 #actionPages[hidden] { display:none; }
.layout-v2 .banner-rail { overflow:visible; }
.table-details { width:min(900px,calc(100vw - 24px)); }
.table-details .lower-grid { margin-top:16px; }
#tableToolControls { margin:16px 0; }
.layout-v2 main { width:calc(100% - 24px); max-width:1800px; display:grid; grid-template-columns:minmax(0,1fr) minmax(340px,.85fr); gap:10px; margin:8px auto; }
.layout-v2 .topbar { padding:6px 12px; gap:8px; }
.layout-v2 .topbar .brand p { display:none; }
.layout-v2 .topbar h1 { font-size:20px; }
.layout-v2 .mode-tabs { flex-wrap:wrap; gap:4px; }
.layout-v2 .table-wrap { grid-column:1/-1; padding:8px; background:radial-gradient(ellipse at center,#294347,#142a30); border:0; }
.layout-v2 .game-table { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); grid-template-rows:minmax(170px,auto) 64px minmax(100px,auto); gap:8px; min-height:0; padding:0; overflow:visible; }
.layout-v2 .game-table::before { display:none; }
.layout-v2 .player { grid-area:1 / var(--opponent-column); min-width:0; height:auto; padding:6px; grid-template-columns:76px minmax(0,1fr); grid-template-rows:44px 24px auto; grid-template-areas:"avatar head" "hand stats" "set-zone set-zone"; gap:4px; background:linear-gradient(130deg,rgba(var(--player-color-rgb),.18),#20363a); overflow:visible; }
.layout-v2 .player.local-seat { grid-area:3 / 1 / 4 / -1; grid-template-columns:76px 170px minmax(0,1fr); grid-template-rows:44px 32px; grid-template-areas:"avatar head set-zone" "hand stats set-zone"; background:linear-gradient(130deg,rgba(var(--player-color-rgb),.24),#293d39); }
.layout-v2 .player.missing-player { display:none; }
.layout-v2 .player[hidden] { display:none !important; }
.table-match-brief[hidden], .ftue-three .table-match-brief { display:none; }
.layout-v2 .table-match-brief:not([hidden]) {
  grid-row:1;
  grid-column:2;
  align-self:stretch;
  min-width:0;
  padding:clamp(6px,1vw,16px);
  border:1px solid #ad915666;
  border-radius:10px;
  background:linear-gradient(135deg,#203334,#182524);
  overflow-wrap:anywhere;
}
.layout-v2 #gameTable[data-seat-count="2"] > .table-match-brief { grid-column:1 / 3; }
.table-match-brief h2 { margin:0 0 .35em; color:#f2d48e; font-size:1.15em; }
.table-match-brief p { margin:.35em 0; }
.table-match-brief ul { list-style:none; margin:.25em 0 .65em; padding:0; }
.table-match-brief li { display:flex; justify-content:space-between; gap:.35em; border-bottom:1px solid #ad915640; }
.table-match-brief li b { color:#ffe18b; }
#tableTournamentPanels h3 { margin:.5em 0 .2em; color:#bee0cf; font-size:1em; }
@media (min-width:1000px) {
 .layout-v2 #gameTable[data-seat-count="2"] > .table-match-brief { grid-column:1 / 5; }
 .layout-v2 #gameTable[data-seat-count="3"] > .table-match-brief { grid-column:3 / 5; }
}
@media (max-width:700px) {
 .layout-v2:not([data-mobile-pane="table"]) #gameTable > .table-match-brief { grid-column:1; grid-row:auto; }
}
.layout-v2 .player-portrait { width:68px; height:68px; min-width:0; }
.layout-v2 .player-head { display:flex; align-items:start; gap:4px; min-width:0; }
.layout-v2 .player-head h3 { font-size:16px; }
.layout-v2 .player-head p { font-size:14px; }
.layout-v2 .player-head p.player-activity { max-width:220px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:#e6d19d; }
.layout-v2 .player-head-actions { margin-left:auto; }
.layout-v2 .player-stats { display:flex; flex-wrap:wrap; gap:4px 8px; font-size:14px; }
.layout-v2 .relative-score { display:none; }
.layout-v2 .player .hand-title,.layout-v2 .player .set-title { display:none; }
.layout-v2 .player-hand { position:relative; z-index:3; overflow:visible; height:24px; gap:0; }
.layout-v2 .player-hand>.card,.layout-v2 .player-hand.hand-overflow>.card { flex:0 0 16px; width:16px; height:22px; min-width:0; padding:0; margin-right:-8px; background:repeating-linear-gradient(45deg,#455f61 0 3px,#c8b27b 4px 5px); border:1px solid #cab380; }
.layout-v2 .player-hand>.card>* { display:none; }
.layout-v2 .human-player .player-hand { visibility:hidden; }
.layout-v2 .set-zone { min-width:0; }
/* Reserve the hand-count line instead of painting it over the first Set ID. */
@media(min-width:701px) {
 .layout-v2 .player:not(.local-seat) .set-zone { padding-top:30px; }
}

/* U238: action subjects are deliberately compact and never inherit board portrait geometry. */
.layout-v2 .bot-log-heading .action-log-portrait,
.layout-v2 .turn-log-option .action-log-target {
  display:inline-block!important; grid-area:auto!important; place-self:auto!important;
  width:30px!important; min-width:30px!important; max-width:30px!important;
  height:30px!important; min-height:30px!important; max-height:30px!important;
  flex:0 0 30px!important; aspect-ratio:1!important; margin:0!important;
  border:1px solid #cbb56e; border-radius:50%; background-size:auto 400%;
  box-shadow:0 1px 5px #0009;
}
.layout-v2 .turn-log-option .action-log-target { align-self:center; opacity:.92; }
.layout-v2 .turn-action-summary .action-sigil-icon {
  width:1.55em; height:1.55em; margin:0 .1em; padding:2px;
  vertical-align:-.36em; border:1px solid #cbb56e88; border-radius:50%;
  background:radial-gradient(circle at 35% 30%,#fff7d6,#4b442c);
  box-shadow:0 1px 3px #0009;
}
.layout-v2 .hand-reveal-toggle { cursor:pointer; border:1px solid #cbb56e; color:#f4d98d; }
.layout-v2 .sets { max-height:none; overflow:visible; display:grid; grid-template-columns:repeat(auto-fill,minmax(92px,130px)); justify-content:start; align-content:start; gap:5px; }
.layout-v2 .local-seat .sets { grid-template-columns:repeat(auto-fill,minmax(120px,150px)); }
.layout-v2 .set { min-width:0; padding:5px; display:flex; flex-wrap:wrap; gap:3px; }
.layout-v2 .set-main { min-width:0; flex:1; }
.layout-v2 .set p,.layout-v2 .maturity-gate-label { display:none; }
.layout-v2 .set-number { font-size:14px; }
.layout-v2 .set-kamons { justify-content:center; gap:2px; }
.layout-v2 .set-kamon,.layout-v2 .set-kamon-fallback { width:29px; height:29px; object-fit:contain; }
.layout-v2 .set-meta strong { display:flex; flex-wrap:wrap; gap:3px; font-size:14px; }
.layout-v2 .set.seal { border-color:var(--gold); background:#a58b4826; }
.attached-special { display:inline-flex; border:1px solid var(--gold); border-radius:50%; width:26px; height:26px; align-items:center; justify-content:center; }
.attached-special img { width:22px; justify-self:center; box-sizing:border-box; width:min(100%,36px); height:30px;
 max-width:100%; max-height:none; margin:0; padding:0; object-fit:contain; }
.layout-v2 .center-mark { position:static; transform:none; grid-area:2 / 1; width:auto; height:auto; display:flex; flex-wrap:wrap; align-items:center; justify-content:start; gap:8px; }
.layout-v2 .center-mark .discard-pile { position:relative; left:auto; top:auto; transform:none; width:60px; height:60px; }
.layout-v2 .center-mark .center-resources { position:static; display:flex; flex-direction:column; font-size:14px; }
.layout-v2 #centerDealer { display:none; }
.layout-v2 .center-emblem { width:38px; height:38px; font-size:25px; }
.layout-v2 .banner-rail { position:absolute; left:auto; right:14px; top:auto; bottom:116px; width:auto; height:76px; display:flex; align-items:center; flex-direction:row; gap:8px; }
.layout-v2 #handPanel { grid-column:1; grid-row:auto; min-width:0; margin:0; }
.layout-v2 #actionPanel { grid-column:2; grid-row:auto; min-width:0; margin:0; }
.layout-v2 #actionPanel:has(+ #handPanel) { grid-row:3; }
.layout-v2 #handPanel { grid-row:3; }
.layout-v2 .section-heading h2 { font-size:16px; }
.layout-v2 .section-heading .eyebrow { display:none; }
.layout-v2 .action-context { font-size:14px; }
.layout-v2 .hand-content { display:block; }
.layout-v2 #humanHand { display:flex; flex-wrap:nowrap; overflow:visible; gap:0; justify-content:center; }
.layout-v2 #humanHand>.card { flex:0 1 100px; min-width:40px; aspect-ratio:63/88; height:auto; margin-left:-8px; }
.layout-v2 #humanHand>.card:hover { z-index:3; }
.layout-v2 #cardInspector { display:none; }
.layout-v2.inspector-open #cardInspector { display:block; position:fixed; width:min(410px,calc(100vw - 24px)); max-height:min(560px,calc(100dvh - 24px)); overflow-x:hidden; overflow-y:auto; z-index:90; pointer-events:auto; background:var(--panel); box-shadow:0 8px 25px #0008; font-size:var(--ui-min); }
.inspector-close { float:right; min-width:32px; min-height:32px; padding:2px; }
.layout-v2 #legalActions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); max-height:none; overflow:visible; gap:5px; }
.layout-v2.compact-actions #legalActions { grid-template-columns:repeat(3,minmax(0,1fr)); }
.layout-v2 #legalActions [hidden] { display:none!important; }
.layout-v2:not(.expanded-actions) .action-button .action-reason { display:none; }
.layout-v2:not(.expanded-actions) .action-button small { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.layout-v2:not(.expanded-actions) .action-button.end-turn { grid-column:1/-1; }
.layout-v2:not(.expanded-actions) .action-button.end-turn :is(small,.action-token-preview,.action-group-hint) { display:none; }
.layout-v2:not(.expanded-actions) .action-button.end-turn .action-icon { width:24px; height:24px; }
.layout-v2:not(.expanded-actions) .action-button.end-turn .action-icon svg { width:18px; height:18px; }
.layout-v2 .action-button { min-width:0; font-size:14px; }
.layout-v2 #actionPages { display:flex; flex-wrap:wrap; gap:4px; align-items:center; margin:6px 0; font-size:14px; }
.layout-v2 #actionGroups { display:flex; flex-wrap:wrap; align-items:center; gap:4px; }
.layout-v2 #actionPages button { font-size:14px; padding:5px 8px; }
.layout-v2 #actionPages [aria-pressed=true] { background:var(--gold); color:#16282c; }
.layout-v2 #actionDensityToggle.is-active { background:var(--gold); color:#16282c; box-shadow:0 0 0 2px #d4ae6755; }
.layout-v2 :is(.action-button,.response-choice-button).required-choice:not(:disabled) {
 outline:3px solid #fff7df; outline-offset:-4px;
 box-shadow:0 0 0 2px rgba(244,211,138,.72), 0 0 18px rgba(244,211,138,.42);
 filter:brightness(1.04);
 animation:required-choice-pulse 2.25s ease-in-out infinite;
}
.layout-v2 :is(.action-button,.response-choice-button).required-choice:focus-visible {
 outline-offset:-5px;
}
@keyframes required-choice-pulse {
 50% { outline-color:#f4d38a; box-shadow:0 0 0 4px rgba(244,211,138,.92), 0 0 30px rgba(244,211,138,.72); filter:brightness(1.18); }
}
@media (prefers-reduced-motion:reduce) {
 .layout-v2 :is(.action-button,.response-choice-button).required-choice:not(:disabled) { animation:none; }
}
.layout-v2 .seal-action-mark { display:inline-block; flex:none; width:20px; height:20px; vertical-align:middle; }
.action-token-gain {
 display:inline-flex; flex:none; align-items:center; gap:.3em; margin-inline-start:auto;
 padding:.12em .4em; border:1px solid #d1ad5d99; border-radius:6px;
 background:#4a371d; color:#ffe6a1; font-size:var(--ui-min); font-weight:800; line-height:1.2;
 white-space:nowrap;
}
.action-token-gain > .token-pip { flex:none; width:.7em; height:.7em; }
.layout-v2 .action-button.leads-to-seal,
.layout-v2 .choice-target:has(.leads-to-seal) {
 border-color:#eac76a; background-color:#5a4227;
 box-shadow:inset 3px 0 #eac76a;
}
.layout-v2 .set.banner-earned { border-color:#f0c65d; background:linear-gradient(135deg,rgba(var(--player-color-rgb),.42),#6f5729cc 60%,#253b35); box-shadow:inset 0 0 0 1px #ffe08a99,0 0 15px rgba(var(--player-color-rgb),.32); }
.layout-v2 .set-banner-earned { order:20; display:inline-flex; align-items:center; flex:0 0 auto; margin-left:1px; padding:1px 4px; border:1px solid #f0c65dcc; border-radius:999px; color:#ffe8a9; background:#5c421ed9; font-size:10px; line-height:16px; white-space:nowrap; }
.layout-v2 .set.seal-without-banner { background:linear-gradient(135deg,#6d6a5d66,#273d3b); border-style:dashed; }
.layout-v2 .set-banner-missing { display:inline-flex; align-items:center; margin-left:4px; padding:2px 5px; border:1px dashed #b8ad8a99; border-radius:999px; color:#d5cdb5; font-size:11px; white-space:nowrap; }
.layout-v2 .banner-inspector-flag { display:grid; place-items:center; width:58px; height:72px; background:#d2bd91; border-radius:8px; overflow:hidden; }
.layout-v2 .banner-inspector-flag img { width:100%; height:100%; object-fit:contain; }
.layout-v2 .lower-grid { grid-column:1/-1; }
.layout-v2 #replayPanel,.layout-v2 #rulesPanel { grid-column:1/-1; }
@media(max-width:700px){
 .layout-v2 main { grid-template-columns:minmax(0,1fr); width:calc(100% - 12px); }
 .layout-v2 .game-table { grid-template-columns:1fr; grid-template-rows:repeat(3,minmax(110px,auto)) 80px minmax(115px,auto); }
 .layout-v2 .player { grid-column:1; grid-row:var(--opponent-column); grid-template-columns:68px 1fr; grid-template-rows:40px 26px auto; }
 .layout-v2 .player.local-seat { grid-area:5/1; grid-template-columns:68px 1fr; grid-template-rows:40px 26px auto; grid-template-areas:"avatar head" "hand stats" "set-zone set-zone"; }
 .layout-v2 .center-mark { grid-area:4/1; max-width:45%; }
 .layout-v2 .banner-rail { bottom:135px; max-width:50%; gap:4px; }
 .layout-v2 .player-portrait { width:56px; height:56px; }
 .layout-v2 #handPanel,.layout-v2 #actionPanel:has(+ #handPanel) { grid-column:1; grid-row:auto; }
 .layout-v2 #handPanel { order:1; }.layout-v2 #actionPanel { order:2; }.layout-v2 .lower-grid { order:3; }
}
.layout-v2 .topbar { display:flex; flex-wrap:nowrap; align-items:center; min-height:48px; }
.table-view-controls { display:flex; flex:none; gap:4px; }
.table-view-controls button { display:grid; place-items:center; min-width:36px; min-height:36px; padding:4px; }
.table-view-controls button[hidden] { display:none; }
#gameSpeedButton rect { fill:currentColor; opacity:.24; }
#gameSpeedButton[data-level] rect:first-child,
#gameSpeedButton:is([data-level="2"],[data-level="3"],[data-level="4"],[data-level="5"]) rect:nth-child(2),
#gameSpeedButton:is([data-level="3"],[data-level="4"],[data-level="5"]) rect:nth-child(3),
#gameSpeedButton:is([data-level="4"],[data-level="5"]) rect:nth-child(4),
#gameSpeedButton[data-level="5"] rect:nth-child(5) { opacity:1; }
#topFullscreenToggle[aria-pressed="false"] .fullscreen-exit,
#topFullscreenToggle[aria-pressed="true"] .fullscreen-enter { display:none; }
@media (max-width:700px) {
 .table-view-controls button { min-height:40px; }
}
.layout-v2 .brand .mon { width:32px; height:32px; font-size:24px; }
.layout-v2 .mode-tabs { margin-left:auto; }
.layout-v2 .status { display:none; }
.layout-v2 .status.version-warning { display:block; }
.layout-v2 .player-head { flex-wrap:wrap; align-content:start; }
.layout-v2 .player-head h3,.layout-v2 .player-head p { margin:0; }
.layout-v2 .player-head .turn-status { position:absolute; top:64px; left:88px; width:auto; right:8px; margin:0; padding:2px 5px; }
.layout-v2 .player-head .turn-status small { display:none; }
.layout-v2 .player-head .turn-status strong { font:14px var(--font-ui); }
.layout-v2 .player.active .player-stats { padding-top:16px; }
.layout-v2 .player .player-hand { align-self:start; display:flex; margin-top:0; }
.layout-v2 .player .player-hand > .card.compact-card { height:22px; min-height:0; }
.layout-v2 .center-mark .center-turn,.layout-v2 .center-mark .center-emblem,.layout-v2 .center-mark #centerMessage { position:static; transform:none; }
.layout-v2 .center-mark #centerMessage { display:none; }
.layout-v2 .banner-sash { width:52px; min-height:68px; grid-template-rows:50px auto; }
.layout-v2 .banner-sash-flag { width:40px; height:50px; }
.layout-v2 .banner-sash::before { height:64px; }
.layout-v2 .banner-sash::after { width:48px; }
.layout-v2 .banner-sash-flag b,.layout-v2 .banner-sash-owner { font-size:14px; }
.layout-v2 .banner-sash-flag small,.layout-v2 .banner-rail-title,.layout-v2 .banner-rail-summary { display:none; }
.layout-v2 #handPanel,.layout-v2 #actionPanel { padding:10px; }
.layout-v2 .section-heading { margin-bottom:6px; }
.layout-v2 #humanHand > .card { min-height:0; height:154px; max-width:110px; }
.layout-v2 #humanHand .card-art { width:64px; height:64px; }
.layout-v2 #humanHand .card-kind,.layout-v2 #humanHand .card-title { display:none; }
.layout-v2 #humanHand .card > b { font-size:14px; }
.layout-v2 #humanHand .card-tag { font-size:12px; }
.layout-v2 #legalActions .action-button { padding:6px; }
.layout-v2 #legalActions .action-button small { font-size:14px; }
.layout-v2 #legalActions .end-turn { grid-column:1/-1; }
.layout-v2 .action-context { margin:2px 0; }
.layout-v2 .local-seat .player-head .turn-status { top:44px; left:88px; right:auto; max-width:300px; }
.layout-v2 .center-mark .center-resources { transform:none; max-width:none; }
.layout-v2 .center-mark { grid-column:1/3; }
.layout-v2 .hand-count { top:78px; }
body { --ui-min:12px; }
body[data-text-size="tiny"] { --ui-min:11px; }
body[data-text-size="small"] { --ui-min:12px; }
body[data-text-size="normal"] { --ui-min:14px; }
body[data-text-size="large"] { --ui-min:16px; }
body[data-text-size="extra-large"] { --ui-min:18px; }
.layout-v2[data-text-size="extra-large"] :is(.player-identity,.action-context,.action-reason) { overflow-wrap:anywhere; }
.layout-v2[data-text-size="extra-large"] .player-identity h3 { white-space:normal; }
@media (min-width:1000px) {
 .layout-v2[data-text-size="extra-large"] main .player.local-seat:is(.sets-1,.sets-2,.sets-3) .sets {
  grid-template-columns:repeat(var(--set-count),minmax(0,1fr));
 }
 .layout-v2[data-text-size="extra-large"] main .player .set-meta strong {
  font-size:12px; line-height:14px;
 }
}
.layout-v2 .player.active::after,
.layout-v2.joined-player-hand main:has(.player.local-seat.active):has(#handPanel:not(.hidden))::after {
 content:""; z-index:1; box-sizing:border-box; pointer-events:none;
 border:8px solid #fff7df; border-radius:18px;
 box-shadow:0 0 12px var(--turn-frame-color,#efd28b), 0 0 24px color-mix(in srgb,var(--turn-frame-color,#efd28b) 72%,transparent);
}
.layout-v2 .player.active { isolation:isolate; }
/* The panel clips its contents. Paint the frame inside that clipping edge. */
.layout-v2 .player.active::after { position:absolute; inset:0; --turn-frame-color:var(--player-color); }
.layout-v2 .player.active > :not(.player-portrait):not(.character-bubble) { z-index:2; }
.layout-v2 .player.active > .character-bubble { position:absolute; z-index:90; }
.layout-v2 .player.active > .player-portrait { position:relative; z-index:2; }
.layout-v2.joined-player-hand main::after { display:none; }
.layout-v2.joined-player-hand main:has(.player.local-seat.active):has(#handPanel:not(.hidden)) .player.local-seat.active,
.layout-v2.joined-player-hand main:has(.player.local-seat.active):has(#handPanel:not(.hidden)) #handPanel { position:relative; z-index:2; }
@media (min-width:1000px) {
 .layout-v2.joined-player-hand main:has(.player.local-seat.active):has(#handPanel:not(.hidden))::after {
  display:block; grid-area:3/1/5/4; align-self:stretch; margin:-7px -7px -3px;
  --turn-frame-color:var(--local-turn-frame-color,#efd28b);
 }
 .layout-v2.joined-player-hand main:has(#handPanel:not(.hidden)) .player.local-seat.active::after { content:none; }
}
 .layout-v2 .player.active::after,
 .layout-v2.joined-player-hand main:has(.player.local-seat.active):has(#handPanel:not(.hidden))::after { animation:active-seat-pulse 2.4s ease-in-out infinite; }
 @keyframes active-seat-pulse {
  0%,100% { border-color:#fff7df; box-shadow:0 0 12px var(--turn-frame-color,#efd28b),0 0 24px color-mix(in srgb,var(--turn-frame-color,#efd28b) 72%,transparent); }
  50% { border-color:var(--turn-frame-color,#efd28b); box-shadow:0 0 20px var(--turn-frame-color,#efd28b),0 0 38px color-mix(in srgb,var(--turn-frame-color,#efd28b) 88%,transparent); }
 }
body.animations-disabled .player.active::after,
body.animations-disabled.joined-player-hand main:has(.player.local-seat.active):has(#handPanel:not(.hidden))::after { animation:none!important; }
@media (prefers-reduced-motion:reduce) {
 body:not(.force-animations):not(.animations-disabled) .player.active::after,
 body:not(.force-animations):not(.animations-disabled).joined-player-hand main:has(.player.local-seat.active):has(#handPanel:not(.hidden))::after,
 body:not(.force-animations):not(.animations-disabled) .player.active > .player-portrait::after { animation:none!important; }
}
.layout-v2 .set-zone .sets > .no-sets { grid-column:1/-1; width:max-content; max-width:100%; }
.layout-v2[data-text-size="extra-large"] #actionPanel > .section-heading { flex-wrap:wrap; }
.layout-v2[data-text-size="extra-large"] #actionPanel > .section-heading > :first-child { flex:1 1 22ch; min-width:0; }
.layout-v2[data-text-size="extra-large"] #actionPanel .action-context { text-wrap:pretty; }
.layout-v2[data-text-size="extra-large"] #actionPages { row-gap:6px; }
.layout-v2[data-text-size="extra-large"] #actionPanel .action-header-tools {
 flex:0 1 auto; min-width:0; justify-content:flex-start; align-items:center; gap:4px;
}
.layout-v2[data-text-size="extra-large"] #actionPanel .action-header-tools :is(button,select) {
 min-height:30px; height:auto; padding:3px 6px; font-size:13px;
}
.layout-v2[data-text-size="extra-large"] #actionPanel #actionPages {
 display:flex; flex-wrap:wrap; align-items:center; gap:5px 10px; margin-block:4px;
}
.layout-v2[data-text-size="extra-large"] #actionPanel #actionPages[hidden] { display:none; }
.layout-v2[data-text-size="extra-large"] #actionPanel :is(#actionGroups,#actionTargets) {
 max-width:100%; min-width:0; flex:0 1 auto; flex-wrap:wrap; gap:4px;
}
.layout-v2[data-text-size="extra-large"] #actionPanel #actionPages button {
 font-size:13px; min-height:28px; padding:3px 6px; white-space:nowrap;
}
.layout-v2[data-text-size="extra-large"] #actionPanel #actionTargets .player-portrait {
 width:24px; height:24px; min-width:24px; max-width:24px;
}
.layout-v2[data-text-size="extra-large"] #actionPanel #legalActions { grid-auto-rows:max-content; }
body.layout-v2[data-text-size="extra-large"] #actionPanel #legalActions .action-button:not(.end-turn) {
 height:auto; max-height:none; overflow:visible; align-self:stretch;
 min-height:0; padding:8px; box-sizing:border-box;
}
body.layout-v2[data-text-size="extra-large"] #actionPanel #legalActions .action-title strong {
 white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere;
}
body.layout-v2[data-text-size="extra-large"] #actionPanel #legalActions .action-detail {
 display:block; white-space:normal; overflow:visible; overflow-wrap:anywhere;
}
.layout-v2 .player[data-banner-points="1"] .banner { background:#b8dfd1; color:#183c33; }
.layout-v2 .player[data-banner-points="2"] .banner { background:#f4d47f; color:#453117; }
.layout-v2 .player[data-banner-points="3"] .banner { background:#edb9e8; color:#482144; }
.layout-v2 .player :is(.leader-mark,.runner-up-mark) { font-size:1.25em; }
.layout-v2 .token-counter .token-near-seal { scale:1.18; filter:brightness(1.35); }
.layout-v2 main .player .set .token-counter .token-pip.token-near-seal {
 display:block; flex:none; width:9px; height:9px;
 outline:1px solid #fff0b0; outline-offset:0; margin-inline:1px;
}
.layout-v2 .discard-drawer { width:min(740px,100vw); box-sizing:border-box; }
.layout-v2 .discard-cards { grid-template-columns:repeat(auto-fill,minmax(min(100%,148px),1fr)); }
.layout-v2 .discard-card-entry { min-width:0; padding:4px; }
.layout-v2 .discard-card-entry .card {
 width:100%; max-width:none; min-width:0; box-sizing:border-box;
 cursor:pointer;
}
.layout-v2 .discard-card-entry .card.special :is(.card-kind,.card-tags) { display:none; }
.layout-v2 .discard-card-entry .card :is(b,.card-title) { overflow-wrap:normal; }
.layout-v2.inspector-open:has(#discardDrawer:not(.hidden)) #cardInspector { z-index:105; }
body.layout-v2.inspector-open #cardInspector:has(.card-inspector-head,.set-inspector-head) {
 width:min(calc(270px + 10 * var(--ui-min)),calc(100vw - 24px));
 max-height:min(680px,calc(100dvh - 24px));
}
.layout-v2 #cardInspector :is(.card-inspector-head small,.card-inspector-effect,.card-inspector-facts span,
 .card-inspector-facts b,.set-inspector-card figcaption,.set-inspector-history summary,
 .set-inspector-history ol,.set-inspector-history p) {
 font-size:var(--ui-min); line-height:1.3;
}
.layout-v2.inspector-open #cardInspector:has(.set-inspector-head,.negative-status-inspector) { z-index:10005; }
#cardInspector .negative-status-inspector { grid-template-columns:minmax(0,1fr); padding-inline-end:2.6rem; }
.layout-v2 #cardInspector .card-inspector-lore { font-size:var(--ui-min)!important; }
.layout-v2 #cardInspector :is(.card-inspector-head,.set-inspector-head) h3 {
 font-size:calc(var(--ui-min) * 1.25);
}
.match-notice:is(.critical,[data-terminal]) {
 width:min(620px,100%); padding:14px 22px; font-size:clamp(14px,2vw,19px);
 box-shadow:0 0 26px #f3cf7866,0 8px 32px #0009;
}
.match-notice:is(.critical,[data-terminal]) strong { font-size:clamp(22px,3vw,32px); }
.banner-award-flight {
 position:fixed!important; margin:0!important; z-index:10004;
 pointer-events:none!important; filter:drop-shadow(0 0 8px #c7a7ff);
}
.layout-v2 .player:is(.active,.human-player) > .player-portrait { position:relative; overflow:visible; }
.layout-v2 .player.human-player::before { content:none; }
.layout-v2 .player.human-player > .player-portrait::before {
 content:"Player"; position:absolute; z-index:4; inset:auto auto calc(100% - 2px) 50%;
 transform:translateX(-50%); padding:3px 7px; border:1px solid #fff9; border-radius:999px;
 background:var(--player-color,#efd28b); color:#17130a; font:800 clamp(10px,0.85em,15px)/1 system-ui,sans-serif;
 white-space:nowrap; pointer-events:none;
}
.layout-v2 .player.active > .player-portrait::after {
 content:""; position:absolute; z-index:3; inset:-15px; pointer-events:none;
 background:var(--player-color,#efd28b); transform-origin:center; will-change:transform,opacity,filter;
 filter:drop-shadow(0 0 4px var(--player-color,#efd28b));
 mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='black' stroke-linecap='round'%3E%3Cpath stroke-width='13' d='M86 19C65 -1 34 0 15 20 0 37 1 64 17 82 33 100 62 103 82 86 99 72 102 45 90 27 83 16 70 8 57 5'/%3E%3Cpath stroke-width='3' d='M78 12C57 1 35 4 18 23 5 40 6 65 21 81M32 93C51 103 79 91 91 70 98 57 97 46 94 39'/%3E%3C/svg%3E") center / contain no-repeat;
 animation:active-brush-pulse 3.2s ease-in-out infinite, active-brush-turn 30s linear infinite;
}
.layout-v2 .player.active:not(.human-player) > .player-portrait::after {
 animation:active-brush-pulse 3.2s ease-in-out infinite, active-brush-turn 30s linear infinite;
}
@keyframes active-brush-pulse { 0%,100% { opacity:.92; filter:drop-shadow(0 0 3px var(--player-color,#efd28b)); } 50% { opacity:.58; filter:drop-shadow(0 0 11px var(--player-color,#efd28b)); } }
@keyframes active-brush-turn { to { transform:rotate(1turn); } }
@media (prefers-reduced-motion:reduce) {
 body:not(.force-animations):not(.animations-disabled) .layout-v2 .player.active > .player-portrait::after,
 body:not(.force-animations):not(.animations-disabled) .layout-v2 .player.active:not(.human-player) > .player-portrait::after { animation:none; }
}
.layout-v2 .player .house-badge .landing-clan-flag {
 display:inline-block; width:14px; height:18px; vertical-align:middle; margin-inline-end:3px;
}
.layout-v2 .player .house-badge .landing-clan-flag svg { width:100%; height:100%; }
.layout-v2[data-text-size="extra-large"] #legalActions :is(.action-button,.turn-log-option) {
 height:auto; min-height:72px; white-space:normal; overflow-wrap:anywhere;
}
body.layout-v2[data-text-size="extra-large"] #legalActions .action-button :is(
 strong,small,.action-detail,.action-reason,.action-score,.action-tier,.action-token-preview,.action-group-hint
),
body.layout-v2[data-text-size="extra-large"] #legalActions .turn-log-option :is(.turn-action-title,.turn-action-summary) {
 font-size:18px; line-height:1.25;
}
.layout-v2[data-text-size="extra-large"] #legalActions .action-button small { -webkit-line-clamp:unset; }
@media (max-width:700px) {
 .layout-v2[data-text-size="extra-large"] #legalActions { grid-template-columns:minmax(0,1fr); }
}
@media (min-width:1000px) {
 .layout-v2[data-text-size="extra-large"] main .player.local-seat .banner-score-full { display:none; }
 .layout-v2[data-text-size="extra-large"] main .player.local-seat .banner-score-short { display:inline; }
 .layout-v2[data-text-size="extra-large"] main .player.local-seat .player-head-actions .banner {
  inset:auto auto 4px 16px!important; max-width:100px; font-size:14px;
 }
 .layout-v2[data-text-size="extra-large"] main .player.local-seat .player-identity > .player-head-actions {
  margin-top:0; justify-content:flex-end;
 }
}
.layout-v2 .sigil-highlight-toggle { min-width:25px; min-height:24px; }
#handOrderControls :is([data-hand-order="first"],[data-hand-order="second"]) svg { rotate:90deg; }
.named-card-flight:is(.motion-token,.motion-token-stolen) {
 filter:drop-shadow(0 0 6px #f4d47f);
}
.layout-v2 :is(.player-stats,.player-head p,.banner,.hand-count,.set-state,.set-prestige,.set-number,.token-counter,.no-sets,.banner-sash-owner,.center-turn,.center-resources span,.card-tag,.card b,.action-button strong,.action-button small,.action-reason,.action-context,.action-score,.action-tier,.action-header-tools,.turn-budget,.attach-map-toggle,.mode-tabs button,#actionPages button,#actionPages span) { font-size:var(--ui-min); }
.layout-v2 .player-stats { line-height:1.15; }
.layout-v2 #humanHand>.card { height:170px; }
body[data-tag-style="icons"] .card .card-tag :is(.tag-label-long,.tag-label-short) { display:none; }
body[data-tag-style="icons"] .card .card-tag i { display:inline; font-size:var(--ui-min); margin:0; border:0; }
body[data-tag-style="icons"] .card .card-tags { display:flex; justify-content:center; }
body[data-tag-style="icons"] .card .card-tag { display:block; min-width:18px; padding:2px; }
.player-portrait:is(.mood-thinking,.mood-furious,.mood-challenging) { background-size:auto 400%; }
.portrait-sheet-v1:is(.mood-thinking,.mood-furious,.mood-challenging) { background-image:url('/assets/portraits-ukiyoe-v1-extra.png?v=U2140'); }
.portrait-sheet-v2:is(.mood-thinking,.mood-furious,.mood-challenging) { background-image:url('/assets/portraits-ukiyoe-v2-extra.png?v=U2140'); }
.portrait-sheet-v3:is(.mood-thinking,.mood-furious,.mood-challenging) { background-image:url('/assets/portraits-ukiyoe-v3-extra.png?v=U2140'); }
.portrait-sheet-v4:is(.mood-thinking,.mood-furious,.mood-challenging) { background-image:url('/assets/portraits-ukiyoe-v4-extra.png?v=U2140'); }
.portrait-sheet-v5:is(.mood-thinking,.mood-furious,.mood-challenging) { background-image:url('/assets/portraits-ukiyoe-v5-extra.png?v=U2140'); }
.portrait-sheet-v6:is(.mood-thinking,.mood-furious,.mood-challenging) { background-image:url('/assets/portraits-ukiyoe-v6-extra.png?v=U2140'); }
.portrait-sheet-v7:is(.mood-thinking,.mood-furious,.mood-challenging) { background-image:url('/assets/portraits-ukiyoe-v7-extra.png?v=U2140'); }
.portrait-sheet-v8:is(.mood-thinking,.mood-furious,.mood-challenging) { background-image:url('/assets/portraits-ukiyoe-v8-extra.png?v=U2140'); }
.portrait-sheet-v9:is(.mood-thinking,.mood-furious,.mood-challenging) { background-image:url('/assets/portraits-ukiyoe-v9-extra.png?v=U2140'); background-size:auto 400%; }
.portrait-sheet-v10:is(.mood-thinking,.mood-furious,.mood-challenging) { background-image:url('/assets/portraits-ukiyoe-v10-extra.png?v=U2140'); background-size:auto 400%; }
.portrait-sheet-v11:is(.mood-thinking,.mood-furious,.mood-challenging) { background-image:url('/assets/portraits-ukiyoe-v11-extra.png?v=U2140'); background-size:auto 400%; }
.player-portrait.mood-thinking { background-position-x:0%; }
.player-portrait.mood-furious { background-position-x:50%; }
.player-portrait.mood-challenging { background-position-x:100%; }
.player-portrait:is(.mood-thinking,.mood-furious,.mood-challenging).portrait-row-0 { background-position-y:0%; }
.player-portrait:is(.mood-thinking,.mood-furious,.mood-challenging).portrait-row-1 { background-position-y:33.333%; }
.player-portrait:is(.mood-thinking,.mood-furious,.mood-challenging).portrait-row-2 { background-position-y:66.667%; }
.player-portrait:is(.mood-thinking,.mood-furious,.mood-challenging).portrait-row-3 { background-position-y:100%; }
/* Match v9's non-uniform row margins for the extra-pose sheet. */
.portrait-sheet-v10:is(.mood-thinking,.mood-furious,.mood-challenging).portrait-row-0 { background-position-y:0%; }
.portrait-sheet-v11:is(.mood-thinking,.mood-furious,.mood-challenging).portrait-row-0 { background-position-y:0%; }
.portrait-sheet-v10:is(.mood-thinking,.mood-furious,.mood-challenging).portrait-row-1 { background-position-y:33.333%; }
.portrait-sheet-v11:is(.mood-thinking,.mood-furious,.mood-challenging).portrait-row-1 { background-position-y:33.333%; }
.portrait-sheet-v10:is(.mood-thinking,.mood-furious,.mood-challenging).portrait-row-2 { background-position-y:66.667%; }
.portrait-sheet-v11:is(.mood-thinking,.mood-furious,.mood-challenging).portrait-row-2 { background-position-y:66.667%; }
.portrait-sheet-v10:is(.mood-thinking,.mood-furious,.mood-challenging).portrait-row-3 { background-position-y:100%; }
.portrait-sheet-v11:is(.mood-thinking,.mood-furious,.mood-challenging).portrait-row-3 { background-position-y:100%; }
/* v8 extra row 3 follows the same correction; v3/Sumire stays at 100%. */
.character-presentation .player-portrait { --character-size:min(410px,calc(100vw - 64px),calc(100dvh - 240px)); width:var(--character-size); height:var(--character-size); min-width:0; max-width:none; min-height:0; max-height:none; aspect-ratio:1 / 1; flex:none; margin:16px auto; border-radius:12px; }
.character-presentation .character-favorite-kamons { margin-top:18px; padding-top:10px; border-top:1px solid var(--line); }
.character-presentation .character-favorite-kamons > div { display:flex; align-items:center; gap:8px; }
.character-presentation .character-favorite-kamons img { display:block; width:63px; height:63px; object-fit:contain; }
.character-presentation { width:min(970px,calc(100vw - 24px)); box-sizing:border-box; position:fixed; z-index:230; margin:0; }
.character-presentation .character-lore { max-width:72ch; margin-inline:auto; }
.character-presentation > .player-portrait { display:block; }
/* The detail dialog owns its entrance motion. Mood still selects the expression. */
.character-presentation .player-portrait { animation:none; }
#kuzuriChronicle { width:min(850px,calc(100vw - 24px)); box-sizing:border-box; }
#kuzuriChronicleBody { max-width:72ch; margin:auto; line-height:1.55; }
#kuzuriChronicleBody .kuzuri-kicker { color:var(--muted); margin:4px 0 14px; }
#kuzuriChronicleBody :is(details,.kuzuri-locked) { margin-block:8px; padding:10px 14px; border:1px solid var(--line); border-radius:10px; }
#kuzuriChronicleBody :is(summary,h3) { color:var(--gold); font-weight:700; }
#kuzuriChronicleBody summary { cursor:pointer; }
#kuzuriChronicleBody .kuzuri-locked h3 { margin:0; font-size:inherit; }
#kuzuriChronicleBody .kuzuri-locked span { color:var(--muted); }
.kuzuri-landscape { height:clamp(120px,24vw,220px); margin-top:10px; border-radius:8px; background:#24231d url('/assets/branding/yuzuri-landscape.png') center 75%/cover; }
.kuzuri-portraits,.kuzuri-guilds { display:flex; flex-wrap:wrap; justify-content:center; gap:12px; margin-block:12px; }
.kuzuri-portraits figure { margin:0; display:flex; flex-direction:column; align-items:center; gap:6px; flex:0 1 180px; min-width:0; text-align:center; }
#kuzuriChronicle .chronicle-portrait {
 display:block; position:static; width:100%; height:auto; aspect-ratio:1;
 min-width:0; min-height:0; max-width:none; max-height:none; transform:none;
 box-sizing:border-box; border:1px solid var(--gold); border-radius:6px;
 background-repeat:no-repeat; animation:none; margin:0;
}
@media (max-width:560px) {
 .kuzuri-portraits figure { flex-basis:calc((100% - 12px) / 2); }
}
.kuzuri-guilds .landing-clan-flag { width:34px; height:44px; color:var(--guild-color); }
.kuzuri-guilds svg { width:100%; height:100%; }
.yuzuri-chronicle-art { margin:12px 0; }
.yuzuri-chronicle-art > figcaption { text-align:center; color:var(--muted); }
#landingProgress { width:min(1040px,calc(100vw - 24px)); box-sizing:border-box; }
#landingProgressBody { display:grid; gap:12px; }
.landing-progress-footer { display:flex; justify-content:flex-end; margin-top:12px; }
#landingProgress .landing-progress-level { padding:12px; border:1px solid var(--line); border-radius:10px; }
#landingProgress .landing-progress-level h3 { margin:0; }
#landingProgress .landing-progress-level p { display:flex; justify-content:space-between; flex-wrap:wrap; gap:4px 12px; }
#landingProgress .landing-character-grade progress { inline-size: 100%; accent-color: #e5bb62; }
#landingProgress .landing-character-grade { margin-block-start: .75rem; }
#landingProgress .landing-progress-details > summary { cursor:pointer; color:var(--accent); font-weight:650; }
#landingProgress .reward-history { margin-block-start:.75rem; }
#landingProgress .reward-history p { margin-block:.4rem; }
#landingProgress .reward-history table { border-collapse:collapse; max-inline-size:24rem; inline-size:100%; }
#landingProgress .reward-history th, #landingProgress .reward-history td { text-align:start; padding:.2rem .45rem; border-block-end:1px solid var(--line); }
#landingProgress .reward-history :is(th,td):last-child { text-align:end; }
#landingProgress progress { width:100%; accent-color:var(--gold); }
#landingProgress .landing-progress-favorites { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr)); gap:8px; }
#landingProgress .landing-progress-favorites > div { display:grid; align-content:start; justify-items:center; text-align:center; gap:4px; padding:10px; border:1px solid var(--line); border-radius:10px; }
#landingProgress .landing-progress-art { display:grid; place-items:center; min-height:58px; }
#landingProgress .landing-progress-art .landing-portrait { position:static; width:54px; height:54px; min-width:54px; max-width:54px; min-height:54px; max-height:54px; border:2px solid var(--gold); border-radius:50%; }
#landingProgress .landing-progress-art .landing-clan-flag { width:42px; height:54px; color:var(--guild-color,var(--gold)); }
#landingProgress .landing-progress-art :is(img,svg) { display:block; width:100%; height:100%; object-fit:contain; }
#landingProgress .landing-progress-art img { width:54px; height:54px; border-radius:5px; }
#landingProgress .human-progress-card > div { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr)); gap:10px; }
#landingProgress .human-progress-card span { display:grid; gap:3px; overflow-wrap:anywhere; }
#landingProgress :is(.human-progress-card small,.content-progress p) { font-size:var(--ui-min); }
.xp-face-wrap[role="button"] { cursor:pointer; border-radius:50%; }
#xpBoardCount { font-size:.86rem; color:var(--gold); }
#xpBoardAdjustment { color:var(--ink); }
.setup-portrait { position:relative; }
.character-unlocked-badge {
 position:absolute; z-index:2; inset:auto auto 4px 50%; translate:-50% 0;
 padding:2px 5px; border-radius:999px; background:#f0d89e; color:#291b0e;
 font-size:10px; font-weight:700; line-height:1.2; white-space:nowrap; pointer-events:none;
}
.end-recap-unlocks { position:relative; margin:.4rem 1rem; }
#endRecapUnlockRows { display:grid; gap:6px; }
.discovery-fireworks { position:absolute; inset:0; z-index:2; overflow:hidden; pointer-events:none; }
.discovery-fireworks canvas { display:block; width:100%; height:100%; }
.end-recap-unlocks .discovery-fireworks { inset:-30px 0; }
#endRecapUnlockRows > div {
 display:flex; align-items:center; gap:10px; padding:8px;
 border:1px solid var(--gold); border-radius:8px;
}
.end-recap-unlocks .end-recap-unlock-face { width:46px; height:46px; flex:none; }
.player-portrait.locked-portrait {
 display:inline-block; position:relative; aspect-ratio:1;
 background:radial-gradient(ellipse at center,#5c574a,#292821) !important;
}
.locked-portrait::before {
 content:""; position:absolute; inset:12% 7% 0; background:#000;
 clip-path:polygon(10% 100%,14% 82%,22% 72%,38% 65%,40% 55%,34% 49%,30% 35%,32% 23%,39% 14%,50% 10%,61% 14%,68% 23%,70% 35%,66% 49%,60% 55%,62% 65%,78% 72%,86% 82%,90% 100%);
}
#setupGuildDiscoveryRows { display:grid; grid-template-columns:repeat(auto-fit,minmax(175px,1fr)); gap:8px; margin-block-start:8px; }
#setupGuildDiscoveryRows > div { display:flex; align-items:center; gap:8px; }
#setupGuildDiscoveryRows .guild-discovery-face { width:36px; height:36px; flex:none; }

/* Recap: essentials first; match and career details expand on demand. */
.layout-v2 #endRecap .end-recap-player { grid-template-columns:66px minmax(0,1fr) auto; gap:8px; padding:12px; align-content:start; }
.layout-v2 #endRecap .recap-character,.layout-v2 #endRecap .end-recap-player.winner .recap-character { width:62px; height:62px; }
.layout-v2 #endRecap .recap-portrait,.layout-v2 #endRecap .end-recap-player.winner .recap-portrait { width:60px; height:60px; min-width:60px; max-width:60px; min-height:60px; max-height:60px; }
#endRecap .end-recap-identity > strong { font-size:15px; }
#endRecap .end-recap-score strong { font-size:26px; }
#endRecap .recap-indicative { display:none; }
.recap-match-details { grid-column:1 / -1; border-top:1px solid #c5b57d33; padding-top:8px; }
.recap-match-details summary,.recap-career summary,.recap-details summary { cursor:pointer; color:#d9c393; font-size:12px; padding:3px 0; }
.recap-match-details summary > span { float:right; color:#a9a28c; }
.recap-match-details .end-recap-breakdown { margin-top:8px; border:0; padding-top:0; }
.recap-career { margin:8px 16px 14px; padding:10px 12px; border:1px solid #c5b57d44; border-radius:10px; }
.recap-end-reason { max-width:55%; font-size:12px; color:#bfb59b; text-align:right; }
.recap-end-reason summary { cursor:pointer; }
.recap-honorees { min-width:0; flex:1; }
.recap-honorees > strong { display:block; }
.end-recap-outcome .recap-affiliation { display:flex; align-items:center; flex-wrap:wrap; gap:4px 12px; margin-top:4px; font-size:12px; color:#cec3a6; text-align:left; }
.recap-affiliation-guild { display:inline-flex!important; align-items:center; gap:5px; }
.recap-affiliation-guild .landing-clan-flag { width:15px; height:20px; }
.recap-honourable { margin-top:8px; padding-top:7px; border-top:1px solid #c5b57d33; }
.recap-honourable > strong { font:600 13px Georgia,serif; color:#d9c89f; }
.recap-runner-identity { display:flex; align-items:center; gap:4px 10px; flex-wrap:wrap; margin-top:5px; font-size:12px; }
.recap-runner-identity .recap-affiliation { margin-top:0; }
.recap-affiliation .recap-affiliation-guild .landing-clan-flag { color:var(--guild-color,#d8c79e); }
.recap-end-reason span { display:block; margin-top:6px; }
.recap-level-up { margin:8px 16px; padding:10px 12px; border:1px solid #e4c56c; border-radius:10px; color:#f6dfa1; background:#c5a74522; font:600 16px Georgia,serif; }
.recap-level-up { display:flex; align-items:center; gap:10px; }
.recap-level-up .recap-level-face { width:42px; height:42px; min-width:42px; max-width:42px; min-height:42px; max-height:42px; flex:none; border:1px solid #c5aa67; border-radius:50%; }
.recap-level-up > div > span { display:block; margin-top:4px; font:12px/1.4 system-ui,sans-serif; }
#endRecap .recap-human-label { display:inline-block; color:#d8ecd5; background:#36594288; border:1px solid #8db59288; border-radius:9px; padding:2px 6px; font:11px/1.3 system-ui,sans-serif; margin:3px 3px 3px 0; }
#endRecapUnlockRows { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
#endRecapUnlockRows > div { margin:0; padding:12px; min-width:0; background:linear-gradient(135deg,#a3833330,#1e251e55); border-radius:12px; }
#endRecapUnlockRows strong { font:600 16px/1.35 Georgia,serif; color:#f1dfa9; }
#endRecapUnlockRows button { margin-top:6px; padding:5px 12px; border-radius:16px; font-size:12px; }
#endRecap .content-progress { margin:4px 16px; padding:12px; border:1px solid #c5b57d55; border-radius:10px; background:#aa8c3020; }
@media(max-width:600px) {
  .recap-end-reason { max-width:100%; }
  #endRecapUnlockRows { grid-template-columns:1fr; }
  .layout-v2 #endRecap .end-recap-player { grid-template-columns:54px minmax(0,1fr) auto; padding:10px; }
  .layout-v2 #endRecap .recap-character,.layout-v2 #endRecap .end-recap-player.winner .recap-character { width:50px; height:50px; }
  .layout-v2 #endRecap .recap-portrait,.layout-v2 #endRecap .end-recap-player.winner .recap-portrait { width:48px; height:48px; min-width:48px; max-width:48px; min-height:48px; max-height:48px; }
}
.xp-face-wrap[role="button"]:focus-visible { outline:2px solid var(--gold); outline-offset:3px; }
.layout-v2 .set-kamon,.layout-v2 .set-kamon-fallback { border:1px solid #c4ab79; border-radius:3px; padding:2px; width:24px; height:32px; margin-left:-7px; background:#d8c79e; }
.layout-v2 .set-kamon:first-child { transform:rotate(-7deg); }
.layout-v2 .set-kamon:last-child { transform:rotate(7deg); }
.layout-v2 .set.seal .set-kamon { margin-left:-7px; }
.layout-v2 .set.trip { border-color:#cbb56e; box-shadow:inset 0 0 0 1px #cbb56e66; }
.layout-v2 .set.trip .set-state::before { content:'✓ '; color:#f2d689; }
.layout-v2 .set.seal .set-state::before { content:'◆ '; color:#f2d689; }
.layout-v2 .player-hand .card,.layout-v2 #humanHand .card { opacity:1; isolation:isolate; }
.layout-v2 .player-hand .card::before,.layout-v2 #humanHand .card::before { content:""; position:absolute; inset:0; z-index:1; border-radius:inherit; background:#000; opacity:.24; pointer-events:none; transition:opacity .18s ease; }
.layout-v2 .player-hand .card > :not(.inspector-corner),
.layout-v2 #humanHand .card > :not(.inspector-corner) { position:relative; z-index:2; }
.layout-v2 .player-hand .card::after,.layout-v2 #humanHand .card::after { z-index:3; }
.layout-v2 .player-hand .card.new-card::before,.layout-v2 #humanHand .card.new-card::before,
.layout-v2 #humanHand .card:is(:hover,:focus,[aria-pressed=true])::before { opacity:0; }
.layout-v2 .card.new-card { box-shadow:0 0 0 2px #f5d783; }
.out-of-play { border:1px dashed #b6a77f; border-radius:5px; padding:5px; color:#d8c79e; font-size:var(--ui-min); }
.named-card-flight { pointer-events:none; z-index:10004; color:#edd296; font-size:26px; }
.named-card-flight .card { width:100%; min-width:0; height:100%; min-height:0; box-sizing:border-box; justify-content:center; gap:0; padding:3px; }
.named-card-flight .card-art,.named-card-flight .card-mon { width:clamp(24px,62%,72px); height:clamp(24px,62%,72px); }
.named-card-flight .card > b,.named-card-flight .card-kind,.named-card-flight .card-title,.named-card-flight .card-tags,.named-card-flight .hidden-card small,.named-card-flight .card-rarity-code { display:none; }
.named-card-flight .card-rarity { display:none; }
.named-card-flight.motion-pile-flight { filter:drop-shadow(0 2px 4px #0009); }
.named-card-flight.motion-pile-flight .motion-card-front { padding:3px; box-sizing:border-box; border:1px solid #ead9b1; border-radius:4px; background:linear-gradient(145deg,#e6d8b7,#b9a980); }
.layout-v2.expanded-actions #actionPanel {
 position:relative; z-index:65; margin-top:-2%; height:102%; background-color:rgba(32,35,31,.9); box-shadow:0 6px 24px #0008;
 display:flex; flex-direction:column; min-width:0; max-height:calc(100dvh - 16px);
 overflow:hidden; box-sizing:border-box;
}
.layout-v2.expanded-actions :is(.action-trajectory-layer,.supply-flow-layer,.banner-award-route,.motion-route-layer) { z-index:64; }
@media (min-width:701px) and (max-width:999px) {
 .layout-v2 main { container-type:inline-size; }
 .layout-v2.expanded-actions #actionPanel { margin-inline-start:calc(100% - 100cqw); }
}
.layout-v2.expanded-actions #actionPanel.hidden { display:none; }
.layout-v2.expanded-actions #legalActions { flex:1; min-height:0; overflow:auto; align-content:start; gap:10px; }
.layout-v2.expanded-actions #legalActions .action-button { min-height:78px; }
body>#cardInspector { display:none; }
.character-bubble { position:absolute; top:42px; left:142px; right:auto; z-index:8; padding:8px 12px; border:1px solid #cbb480; border-radius:12px 12px 12px 0; background:#ede0c2; color:#27231a; font:var(--ui-min)/1.3 var(--font-ui); box-shadow:0 4px 16px #0005; }
.layout-v2 .set { display:grid; grid-template-columns:20px minmax(0,1fr); align-items:center; gap:0; padding:4px; }
.layout-v2 .set-number { position:static; max-width:none; overflow-wrap:normal; align-self:start; }
.layout-v2 .set-number .set-prestige { display:none; }
.layout-v2 .set-main { display:grid; gap:2px; }
.layout-v2 .set-meta { display:block; }
.layout-v2 .set-meta strong { flex-wrap:nowrap; white-space:nowrap; overflow:visible; gap:2px; }
.layout-v2 .set-attachment { overflow:visible; }
.layout-v2 .attached-special { width:20px; height:20px; }
.layout-v2 .attached-special img { width:18px; height:18px; }
.layout-v2 .sets { flex:none; }
.layout-v2 .player.local-seat { min-height:min-content; grid-template-rows:auto auto; }
.layout-v2 .local-seat .set-zone { min-height:min-content; }
.layout-v2 .banner-rail { position:static; grid-area:2/2/3/4; justify-self:end; align-self:center; }
.layout-v2 #humanHand>.card { height:154px; }
#replayLibraryControls { display:flex; flex-wrap:wrap; margin-top:16px; }
#replayLibraryControls label,#replayLibraryControls select { width:100%; }
.layout-v2 .local-seat .player-head { border:0; }
.layout-v2 .local-seat .player-head-actions { position:absolute; top:7px; right:7px; z-index:9; }
.layout-v2 .local-seat .player-head .banner { position:static!important; inset:auto!important; }
.layout-v2 .local-seat .player-head .turn-status { top:auto; bottom:4px; left:270px; max-width:none; right:6px; }
.layout-v2 .local-seat .player-stats { align-self:end; padding:0; }
#mobileTableNav { display:flex; position:sticky; top:48px; z-index:40; justify-content:center; gap:6px; padding:5px 8px; background:#111714ed; border-bottom:1px solid #c7a45c44; backdrop-filter:blur(8px); }
#mobileTableNav button { min-height:34px; padding:5px 12px; font-size:13px; }
#mobileTableNav [aria-pressed=true] { background:var(--gold); color:#202a27; }
.layout-v2 .game-panel-nav { position:fixed; right:max(14px,env(safe-area-inset-right)); bottom:max(14px,env(safe-area-inset-bottom)); z-index:85; display:flex; align-items:center; gap:5px; max-width:min(720px,calc(100vw - 28px)); padding:5px 7px; border:1px solid #d4ae6780; border-radius:999px; background:#111916ed; box-shadow:0 5px 20px #0009; backdrop-filter:blur(10px); }
.layout-v2 .game-panel-nav.hidden { display:none!important; }
.layout-v2 .game-panel-nav button { display:grid; place-items:center; min-width:36px; min-height:36px; padding:3px 8px; border-radius:999px; font-size:18px; line-height:1; }
.layout-v2 .game-panel-nav button[aria-pressed=true] { color:#17231e; background:var(--gold); border-color:#f0d58d; box-shadow:0 0 0 2px #f0d58d44; }
.layout-v2 .game-panel-review-tabs { display:flex; min-width:0; max-width:calc(100vw - 125px); gap:4px; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin; }
.layout-v2 .game-panel-review-tabs button { min-width:max-content; min-height:34px; padding:4px 9px; font-size:12px; }
#turnSeatMarker {
 position:fixed; z-index:79; pointer-events:none; color:var(--turn-cue-color,#e6c66e);
}
#turnSeatMarker > span {
 display:block; position:absolute; left:0; top:0; width:var(--marker-depth); height:var(--marker-span);
 transform:translate(-50%,-50%) rotate(var(--marker-angle,0deg));
 filter:drop-shadow(0 1px 1px #111917) drop-shadow(0 0 3px currentColor);
}
#turnSeatMarker[data-side=right] { --marker-angle:180deg; }
#turnSeatMarker[data-side=top] { --marker-angle:90deg; }
#turnSeatMarker[data-side=bottom] { --marker-angle:-90deg; }
#turnSeatMarker > span > i {
 position:absolute; inset:0 51% 0 0; background:currentColor;
 clip-path:polygon(0 0,35% 0,100% 50%,35% 100%,0 100%,65% 50%);
}
#turnSeatMarker > span > i:last-child { inset:0 0 0 51%; }
#turnSeatMarker > span > i:first-child { animation:turn-marker-alternate 1.2s ease-in-out infinite; }
@keyframes turn-marker-alternate {
  0%,23%,86%,100% { opacity:0; }
  36%,70% { opacity:1; }
}
.turn-transfer-ring {
 position:absolute; inset:4px; z-index:8; pointer-events:none; border-radius:inherit;
 border:3px solid color-mix(in srgb, var(--player-color) 68%, white);
 box-shadow:inset 0 0 20px var(--player-color), 0 0 12px var(--player-color);
}
.turn-transfer-ring.arriving {
 border-width:4px;
 box-shadow:inset 0 0 34px var(--player-color), 0 0 20px var(--player-color);
}
#turnHandoffNotice {
 order:-1; position:static; box-sizing:border-box; max-width:100%;
 padding:.35em .85em; border:1px solid var(--turn-cue-color,#e6c66e); border-radius:8px;
 background:color-mix(in srgb,var(--turn-cue-color,#e6c66e) 14%,#18211c);
 color:#fff4d5; font-size:max(16px,var(--ui-min)); line-height:1.25; font-weight:800; text-align:center;
 box-shadow:0 0 12px color-mix(in srgb,var(--turn-cue-color,#e6c66e) 35%,transparent);
}
:is(#turnSeatMarker,#turnHandoffNotice)[hidden],
:is(.landing-active,.pregame,.preparation-open) :is(#turnSeatMarker,#turnHandoffNotice) { display:none; }
.animations-disabled #turnSeatMarker > span > i:first-child { animation:none; }
@media (prefers-reduced-motion: reduce) {
 body:not(.force-animations) #turnSeatMarker > span > i:first-child { animation:none; }
}
.layout-v2 #tableNotices {
 position:fixed; left:var(--notice-center-x,50%); top:var(--notice-center-y,50dvh); transform:translate(-50%,-50%);
 z-index:85; width:min(620px,var(--notice-zone-width,calc(100vw - 24px))); display:grid; justify-items:center; gap:6px;
 pointer-events:none;
}
.layout-v2 #tableNotices > :is(.round-banner,.match-notice,#toast) {
 position:static; transform:none; max-width:100%; box-sizing:border-box;
 text-align:center; overflow-wrap:anywhere;
}
.layout-v2 #tableNotices > .round-banner { order:-1; }
.layout-v2 #tableNotices .match-notice { pointer-events:auto; }
.layout-v2 #tableNotices #toast:not(.show) { display:none; }
.layout-v2 #tableNotices:has(.match-notice:not(.hidden)) > :is(.match-notice,#toast) { padding-block:5px; }
.layout-v2 #toast.toast-personal { border-color:color-mix(in srgb,var(--toast-player-color,#83c9ba) 72%,white 28%); background:color-mix(in srgb,var(--toast-player-color,#285c3a) 32%,#17231e 68%); box-shadow:0 0 0 2px color-mix(in srgb,var(--toast-player-color,#83c9ba) 30%,transparent),var(--shadow); }
@media (max-width:700px) and (orientation:portrait) {
 .layout-v2 #tableNotices {
  inset:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right))
        max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
  margin:auto; width:auto; max-width:440px; height:max-content; transform:none;
  grid-template-columns:minmax(0,1fr);
 }
 .layout-v2 #tableNotices[data-viewport-zoom] {
  inset:var(--notice-view-y) auto auto var(--notice-view-x);
  margin:0; width:calc(var(--notice-view-width) - 16px);
  max-height:calc(var(--notice-view-height) - 16px);
  transform:translate(-50%,-50%);
  overflow:auto; overscroll-behavior:contain;
 }
 .layout-v2 #tableNotices[data-viewport-zoom] > :is(.round-banner,.match-notice,#toast) {
  pointer-events:auto;
 }
 .layout-v2 #tableNotices[data-viewport-zoom] .round-banner {
  font-size:clamp(13px,calc(var(--notice-view-width) / 10),22px); letter-spacing:.08em;
 }
 .layout-v2 #tableNotices > :is(.round-banner,.match-notice,#toast) {
  min-width:0; padding-inline:12px; white-space:normal;
 }
 .layout-v2 #tableNotices > :is(.match-notice,#toast) {
  font-size:max(14px,var(--ui-min)); line-height:1.35;
 }
 .layout-v2 #tableNotices .match-notice strong { font-size:calc(var(--ui-min) + 4px); }
 .layout-v2 #tableNotices .match-notice:is(.critical,[data-terminal]) strong {
  font-size:calc(var(--ui-min) + 6px);
 }
 .layout-v2 #gameTable > .player > .character-bubble {
  position:relative; inset:auto; grid-column:1/-1; order:10;
  align-self:start; width:fit-content; min-width:0; max-width:100%;
  margin-top:4px; padding:5px 7px; box-sizing:border-box;
  font-size:max(12px,var(--ui-min)); text-align:start; overflow-wrap:anywhere;
  transform:none; animation:none;
 }
}
[data-anchor$=":support"]:has(> .reserve-gain) { position:relative; }
.reserve-gain {
 position:absolute; bottom:100%; left:50%; transform:translateX(-50%); z-index:2;
 background:#272117; color:#ffdc83; border-radius:4px; padding:1px 4px; pointer-events:none;
}
/* Give the centered card a clear reading area. Incoming actions already supply
   their own caption below it; keep the general notice stack above the card. */
body.layout-v2:has(.central-card-reveal) #tableNotices {
 inset:auto auto calc(50% + min(140px,21vh) + 12px) 50%;
 z-index:10006; transform:translateX(-50%); margin:0;
 width:min(620px,calc(100vw - 24px));
 max-height:calc(50dvh - min(140px,21vh) - 24px);
 overflow:auto;
}
.banner-score-short { display:none; }
@media(max-width:700px) {
 .layout-v2 .game-panel-nav { left:max(8px,env(safe-area-inset-left)); right:max(8px,env(safe-area-inset-right)); bottom:max(8px,env(safe-area-inset-bottom)); max-width:none; justify-content:center; gap:3px; padding:4px; }
 .layout-v2 .game-panel-nav button { min-width:42px; min-height:42px; padding:3px; }
 .layout-v2 .game-panel-review-tabs { flex:1; max-width:none; }
 .layout-v2 .game-panel-review-tabs button { min-height:40px; padding:4px 8px; }
 .layout-v2 #mobileTableNav { display:flex; justify-content:center; gap:8px; padding:4px; }
 .layout-v2 #mobileTableNav button { min-height:40px; font-size:var(--ui-min); }
 .layout-v2 #mobileTableNav [aria-pressed=true] { background:var(--gold); color:#202a27; }
 .layout-v2.inspector-open #cardInspector { width:calc(100vw - 20px); max-height:calc(88dvh - 16px); }
 .layout-v2.inspector-open #cardInspector[data-set-id] { max-height:calc(100dvh - 12px); }
 .layout-v2.inspector-open #cardInspector[data-set-id] { scrollbar-width:none; }
 .layout-v2.inspector-open #cardInspector[data-set-id]::-webkit-scrollbar { display:none; }
 .layout-v2 .topbar { padding:4px 6px; gap:5px; }
 .layout-v2 .brand { display:none; }
 .layout-v2 .mode-tabs { margin:0; flex-wrap:nowrap; width:100%; }
 .layout-v2 .mode-tabs button { min-height:40px; font-size:var(--ui-min); padding:4px 8px; }
 .layout-v2 .tab[data-mode=live] { display:none; }
 .layout-v2 main { margin:4px auto; gap:6px; }
 .layout-v2 .table-wrap { padding:4px; }
 .layout-v2 .game-table { grid-template-columns:repeat(3,minmax(0,1fr)); grid-template-rows:minmax(240px,auto) 64px auto; gap:2px; }
 .layout-v2 .player { grid-area:1 / var(--opponent-column); display:flex; flex-direction:column; padding:4px; gap:2px; }
 .layout-v2 .player .player-portrait { width:48px; height:48px; align-self:center; margin:0; }
 .layout-v2 .player-head { display:block; border:0; }
 .layout-v2 .player-head h3 { font-size:var(--ui-min); line-height:1.2; overflow-wrap:anywhere; }
 .layout-v2 .player-head p { display:none; }
 .layout-v2 .player-head-actions { position:static; margin:3px 0 0; }
 .layout-v2 .player-head .banner { white-space:normal; font-size:var(--ui-min); padding:1px 2px; }
 .layout-v2 .banner-score-full { display:none; }
 .layout-v2 .banner-score-short { display:inline; white-space:nowrap; }
 .layout-v2 .player-head .moves-button { display:none; }
 .layout-v2 .player-stats { padding:0; font-size:var(--ui-min); gap:2px; }
 .layout-v2 .player-stats span { font-size:var(--ui-min); }
 .layout-v2 .hand-count { position:static; align-self:start; }
 .layout-v2 .player .player-hand { display:none; }
 .layout-v2 .sets { grid-template-columns:1fr; gap:2px; }
 .layout-v2 .set { grid-template-columns:20px 1fr; padding:2px; }
 .layout-v2 .set-main { gap:0; }
 .layout-v2 .set-kamons { height:18px; }
 .layout-v2 .set-meta strong { min-height:16px; line-height:16px; }
 .layout-v2 .attached-special,.layout-v2 .attached-special img { width:16px; height:16px; }
 .layout-v2 .set-attachment { line-height:0; }
 .layout-v2 .set-zone { gap:2px; }
 .layout-v2 .player-zone-title { margin:0; line-height:16px; }
 .layout-v2 .set-kamon,.layout-v2 .set-kamon-fallback { width:17px; height:18px; padding:1px; margin-left:-3px; }
 .layout-v2 .set-meta strong { gap:2px; }
 .layout-v2 .set-state { font-size:var(--ui-min); }
 .layout-v2 .set.trip .set-state::before,.layout-v2 .set.seal .set-state::before { position:absolute; right:2px; top:0; }
 .layout-v2 .token-pip { width:4px; height:5px; }
 .layout-v2 .token-counter { padding:1px; }
 .layout-v2 .player.local-seat { grid-area:3/1/4/-1; display:grid; grid-template-columns:56px minmax(0,1fr); grid-template-rows:auto auto auto; grid-template-areas:'avatar head' 'hand stats' 'set-zone set-zone'; }
 .layout-v2 .local-seat .sets { grid-template-columns:repeat(4,minmax(0,1fr)); }
 .layout-v2 .local-seat .player-head .banner { position:static; }
 .layout-v2 .local-seat .set-zone { min-height:0; }
 .layout-v2 .player-head .turn-status { display:none; }
 .layout-v2 .center-mark { grid-area:2/1/3/2; display:grid; grid-template-columns:1fr 1fr; gap:2px; max-width:none; }
 .layout-v2 .center-mark .discard-pile { width:40px; height:40px; }
 .layout-v2 .center-mark .center-emblem,.layout-v2 .center-turn,.layout-v2 .out-of-play { display:none; }
 .layout-v2 .center-mark .center-resources { grid-column:1/-1; font-size:var(--ui-min); }
 .layout-v2 .banner-rail { grid-area:2/2/3/4; max-width:none; gap:0; height:64px; }
 .layout-v2 .banner-sash { width:38px; min-height:58px; grid-template-rows:40px auto; }
 .layout-v2 .banner-sash-flag { width:28px; height:40px; }
 .layout-v2 .banner-sash::after { width:33px; }
 .layout-v2 .banner-sash::before { height:55px; }
 /* Tavolo is the continuous mobile composition: board, hand, then actions. */
 .layout-v2[data-mobile-pane=table] #handPanel,.layout-v2[data-mobile-pane=table] #actionPanel { display:block; }
 .layout-v2[data-mobile-pane=hand] .table-wrap,.layout-v2[data-mobile-pane=actions] .table-wrap { display:none; }
 .layout-v2[data-mobile-pane=hand] #actionPanel,.layout-v2[data-mobile-pane=actions] #handPanel { display:none; }
 .layout-v2[data-mobile-pane=hand] #handPanel { grid-area:auto/1; order:0; }
 .layout-v2[data-mobile-pane=actions] #actionPanel { grid-area:auto/1; order:1; }
 .layout-v2 #legalActions { grid-template-columns:1fr; }
 .layout-v2 #humanHand>.card { flex:1 1 78px; min-width:0; margin-left:-24px; height:154px; }
 .layout-v2 #humanHand>.card:first-child { margin-left:0; }
 .layout-v2 #humanHand>.card:is(:focus,:hover,[aria-pressed=true]) { flex:0 0 108px; z-index:4; }
 .layout-v2 #humanHand>.card .card-art { width:48px; height:48px; }
 .layout-v2 #humanHand>.card>b { display:block; width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
 .layout-v2 #humanHand>.card:is(:focus,:hover,[aria-pressed=true]) { flex-basis:128px; }
 .layout-v2 #humanHand .card-tag { max-width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
 .layout-v2 #actionPages { gap:3px; }
 .layout-v2 #actionPages button { min-height:36px; padding:4px 6px; }
 .layout-v2 .player { overflow:visible; }
 .layout-v2 .character-bubble { top:46px; left:50%; right:auto; width:max-content; min-width:180px; max-width:min(320px,calc(100vw - 24px)); transform:translateX(-50%); padding:7px 11px; text-align:center; white-space:normal; overflow-wrap:break-word; z-index:90; }
 .layout-v2 #replayPanel { flex-wrap:wrap; font-size:var(--ui-min); }
 .layout-v2 #replayPanel .transport { min-width:0; width:100%; }
 .layout-v2 #replaySlider { min-width:20px; width:100%; }
}
@media(min-width:701px) { #mobileTableNav { display:none; } }
@media(prefers-reduced-motion:no-preference){.character-bubble{animation:portrait-reaction .2s ease-out}}
.layout-v2.force-animations .character-bubble { animation:portrait-reaction .2s ease-out; }
@keyframes character-shake { 20%,60%{transform:translateX(-5px) rotate(-1deg)} 40%,80%{transform:translateX(5px) rotate(1deg)} }
@keyframes character-bounce { 35%{transform:translateY(-7px) scale(1.04)} 70%{transform:translateY(2px)} }
@keyframes character-focus { 50%{transform:scale(1.05)} }
@keyframes character-challenge { 40%{transform:translateX(6px) scale(1.04)} }
@keyframes character-victory { 30%{transform:translateY(-9px) scale(1.06)} 55%{transform:rotate(-2deg)} 75%{transform:rotate(2deg)} }
@media(prefers-reduced-motion:no-preference) {
 .character-reaction-shake .player-portrait { animation:character-shake .55s ease-out!important; }
 .character-reaction-bounce .player-portrait { animation:character-bounce .62s ease-out!important; }
 .character-reaction-focus .player-portrait { animation:character-focus .5s ease-out!important; }
 .character-reaction-challenge .player-portrait { animation:character-challenge .55s ease-out!important; }
 .character-reaction-victory .player-portrait { animation:character-victory .72s ease-out!important; }
}
.layout-v2.force-animations .character-reaction-shake .player-portrait { animation:character-shake .55s ease-out!important; }
.layout-v2.force-animations .character-reaction-bounce .player-portrait { animation:character-bounce .62s ease-out!important; }
.layout-v2.force-animations .character-reaction-focus .player-portrait { animation:character-focus .5s ease-out!important; }
.layout-v2.force-animations .character-reaction-challenge .player-portrait { animation:character-challenge .55s ease-out!important; }
.layout-v2.force-animations .character-reaction-victory .player-portrait { animation:character-victory .72s ease-out!important; }

/* U146: use tall desktop viewports for the table; keep 1280x720 compact. */
@media (min-width:701px) {
 .layout-v2 .player-portrait { width:82px; height:82px; }
 .layout-v2 .player { grid-template-columns:94px minmax(0,1fr); grid-template-rows:58px 28px auto; }
 .layout-v2 .player.local-seat { grid-template-columns:104px 190px minmax(0,1fr); grid-template-rows:58px 36px; }
 .layout-v2 .hand-count { top:94px; }
 .layout-v2 .local-seat .player-head .banner { left:116px; top:66px; }
 .layout-v2 .local-seat .player-head .turn-status { left:294px; }
 .layout-v2 #humanHand { gap:4px; }
 .layout-v2 #humanHand>.card { margin-left:0; flex-basis:108px; }
}

@media (min-width:701px) and (min-height:800px) {
 .layout-v2 .table-wrap { min-height:min(620px,calc(100dvh - 330px)); }
 .layout-v2 .game-table { height:100%; grid-template-rows:minmax(240px,1fr) 84px minmax(180px,.65fr); }
 .layout-v2 .player-portrait { width:92px; height:92px; }
 .layout-v2 .player { grid-template-columns:104px minmax(0,1fr); grid-template-rows:66px 30px auto; padding:8px; }
 .layout-v2 .player.local-seat { grid-template-columns:120px 220px minmax(0,1fr); grid-template-rows:66px 40px; }
 .layout-v2 .local-seat .player-head .banner { left:132px; top:74px; }
 .layout-v2 .local-seat .player-head .turn-status { left:340px; }
 .layout-v2 #humanHand { gap:8px; }
 .layout-v2 #humanHand>.card { flex-basis:118px; max-width:132px; }
}

/* U147: one stable desktop anchor for the sashimono rail. */
@media (min-width:701px) {
 .layout-v2 .banner-rail {
   position:absolute;
   right:12px;
   top:50%;
   bottom:auto;
   transform:translateY(-50%);
   display:flex;
   align-items:flex-start;
   justify-content:flex-end;
   gap:6px;
   width:auto;
   height:94px;
   max-width:42%;
   z-index:5;
   overflow:visible;
 }
 .layout-v2 .banner-sash {
   zoom:1;
   width:56px;
   min-height:88px;
   grid-template-rows:58px auto;
   gap:2px;
   flex:0 0 56px;
 }
 .layout-v2 .banner-sash::before { left:4px; top:1px; width:3px; height:84px; }
 .layout-v2 .banner-sash::after { left:4px; top:1px; width:50px; height:6px; }
 .layout-v2 .banner-sash-flag { width:44px; height:58px; margin-left:8px; }
 .layout-v2 .banner-sash-flag {
   border:0;
   border-radius:0;
   background:linear-gradient(160deg,#d2b56f,#765629 74%,#4b371a);
   -webkit-mask:url('/assets/sashimono-flag.svg') center/100% 100% no-repeat;
   mask:url('/assets/sashimono-flag.svg') center/100% 100% no-repeat;
   box-shadow:none;
 }
 .layout-v2 .banner-sash-flag::before { display:none; }
 .layout-v2 .banner-sash-owner { max-width:56px; line-height:1.05; }
 .layout-v2 #humanHand>.card { height:174px; }
}

.layout-v2 .end-recap-backdrop {
 background:radial-gradient(ellipse at center,#294347 0%,#142a30 58%,#081015 100%);
 backdrop-filter:blur(3px);
}
.layout-v2 .setup-dialog {
 background:linear-gradient(145deg,rgba(38,66,63,.98),rgba(20,42,48,.98));
 border-color:rgba(199,164,92,.55);
}

/* U154: the action dock shares the lower half with the local player. */
body.layout-v2 {
 background:
  radial-gradient(ellipse at 50% 36%,rgba(66,105,78,.34),transparent 58%),
  radial-gradient(circle at 18% 12%,rgba(173,131,69,.08),transparent 26rem),
  linear-gradient(115deg,#101b16,#182b21 46%,#0d1712);
 background-size:auto;
}
#actionTargets { display:flex; flex-wrap:wrap; align-items:center; gap:5px; flex-basis:100%; }
#actionTargets button { padding:3px 6px; }
#actionTargets .player-portrait { width:32px; height:32px; min-width:32px; max-width:32px; margin:0; }
.layout-v2 .end-recap-player .recap-portrait { width:88px; height:88px; min-width:88px; max-width:88px; min-height:88px; max-height:88px; aspect-ratio:1 / 1; flex:none; }
.layout-v2 .end-recap-player { grid-template-columns:94px minmax(0,1fr) auto; }
.layout-v2 .recap-character { width:90px; height:90px; padding:0; border:0; border-radius:50%; background:transparent; }
.layout-v2 .end-recap-player.winner { grid-template-columns:106px minmax(0,1fr) auto; }
.layout-v2 .end-recap-player.winner .recap-character { width:102px; height:102px; }
.layout-v2 .end-recap-player.winner .recap-portrait { width:100px; height:100px; min-width:100px; max-width:100px; min-height:100px; max-height:100px; }
.layout-v2 #discardTooltip { display:none; }
.layout-v2 #legalActions .filter-empty { grid-column:1/-1; font-size:var(--ui-min); }
@media(min-width:1000px) {
 .layout-v2 main { grid-template-columns:repeat(6,minmax(0,1fr)); grid-template-rows:auto auto auto minmax(0,1fr); align-items:start; height:calc(100dvh - 68px); min-height:0; }
 .layout-v2 .table-wrap,.layout-v2 .game-table { display:contents; }
 .layout-v2 .player:not(.local-seat) { grid-row:1; grid-column:calc(var(--opponent-column) * 2 - 1) / span 2; min-height:210px; height:100%; align-self:stretch; }
 .layout-v2 .player.local-seat { grid-area:3/1/4/4; grid-template-columns:104px minmax(150px,1fr); grid-template-rows:auto auto auto; grid-template-areas:'avatar head' 'hand stats' 'set-zone set-zone'; min-height:145px; }
 .layout-v2 .local-seat .player-head .banner { position:static; }
 .layout-v2 .local-seat .player-stats { align-self:center; }
 .layout-v2 .local-seat .player-head-actions { left:146px; right:auto; top:68px; }
 .layout-v2 .center-mark { grid-area:2/1/3/4; min-height:86px; }
 .layout-v2 main .banner-rail { grid-area:2/4/3/7; }
 .layout-v2 #handPanel { grid-area:4/1/5/4; }
 .layout-v2 #actionPanel,.layout-v2 #actionPanel:has(+ #handPanel) { grid-area:3/4/5/7; align-self:stretch; min-height:0; }
 .layout-v2 #legalActions { align-content:start; }
 .layout-v2 #handPanel { align-self:start; }
 .layout-v2.expanded-actions #actionPanel:has(+ #handPanel),
 .layout-v2.expanded-actions #actionPanel { grid-column:1/-1; }
 .layout-v2.expanded-actions #legalActions { grid-template-columns:repeat(4,minmax(0,1fr)); }
 .layout-v2.expanded-actions #actionPages { display:grid; grid-template-columns:1fr; align-items:start; }
 .layout-v2.expanded-actions #actionGroups,.layout-v2.expanded-actions #actionTargets { flex-wrap:wrap; }
 .layout-v2 #replayPanel { grid-area:auto/1/auto/7; }
 .layout-v2 .no-sets { margin:0; }
}
@media(min-width:1000px) and (max-height:799px) {
 .layout-v2 main { gap:6px; }
 .layout-v2 .player:not(.local-seat) { min-height:150px; }
 .layout-v2 .center-mark { min-height:72px; }
 .layout-v2 .player.local-seat { min-height:126px; grid-template-columns:88px minmax(160px,1fr) minmax(140px,1fr); grid-template-rows:auto 24px; grid-template-areas:'avatar head set-zone' 'hand stats set-zone'; }
 .layout-v2 main .banner-sash { grid-template-rows:58px 14px; width:46px; flex-basis:46px; }
 .layout-v2 main .banner-sash .banner-sash-flag { width:46px; height:58px; }
 .layout-v2 #bannerRail .banner-sash-owner { font-size:10px; letter-spacing:-.02em; }
 .layout-v2 .player.sets-5:not(.local-seat) .sets { --set-min:98px; --set-max:110px; gap:5px; }
 .layout-v2 .player.sets-6:not(.local-seat) .sets { --set-min:82px; --set-max:92px; gap:4px; }
 .layout-v2 .player:is(.sets-7,.sets-8):not(.local-seat) .sets { --set-min:70px; --set-max:80px; gap:4px; }
 .layout-v2 .player.sets-5.local-seat .sets { --set-min:96px; --set-max:106px; gap:5px; }
 .layout-v2 .player.sets-6.local-seat .sets { --set-min:80px; --set-max:90px; gap:4px; }
 .layout-v2 .player:is(.sets-7,.sets-8).local-seat .sets { --set-min:68px; --set-max:78px; gap:4px; }
}
@media(min-width:1450px) {
 .layout-v2.expanded-actions #legalActions { grid-template-columns:repeat(5,minmax(0,1fr)); }
 .layout-v2 #actionPages { flex-wrap:nowrap; }
 .layout-v2 #actionTargets { margin-left:auto; flex:0 0 auto; flex-wrap:nowrap; }
 .layout-v2.expanded-actions #actionPages { grid-template-columns:minmax(0,1fr) auto; align-items:center; }
 .layout-v2.expanded-actions #actionGroups,.layout-v2.expanded-actions #actionTargets { flex-wrap:nowrap; }
}

/* U153: status belongs to identity; end-turn is a bounded control. */
.layout-v2 .player .player-head .player-identity .turn-status {
 position:static; inset:auto; display:flex; width:fit-content; max-width:100%;
 margin:4px 0 0; padding:2px 5px; white-space:normal;
}
.layout-v2 .player .player-head .player-identity .turn-status strong { overflow-wrap:normal; line-height:1.3; }
.layout-v2 .player .player-head .player-identity .turn-status .player-name { white-space:nowrap; }
.layout-v2 .player.local-seat .player-head .player-identity .turn-status strong {
 font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.layout-v2 .player.local-seat .player-head .player-identity .turn-status div { overflow:hidden; }
.layout-v2 .player-stat[data-board-resource] { display:inline-flex; align-items:center; gap:5px; }
.layout-v2 .player-stat[data-board-resource] i { display:flex; width:auto; height:auto; flex:0 0 auto; }
.layout-v2 .player-stat[data-board-resource] b { position:static; flex:0 0 auto; line-height:1; }
.layout-v2 .player-stat[data-board-resource] svg { display:block; flex:none; }
.layout-v2 .table-match-copy { flex:1; }
.layout-v2 .center-mark #centerMessage { white-space:nowrap; font-size:12px; }
/* Outlines use no layout space and do not intercept board interactions. */
body.layout-bounds :is(.player,.player-head,.player-identity,.player-stats,.player-head-actions,.set-zone,.sets,.center-mark,.table-match-info,.table-deck-rack,#handPanel,#actionPanel) {
 outline:1px dashed #ff8adc; outline-offset:-1px;
}
body.layout-bounds :is(.player-identity,.sets,.table-match-info,#handPanel) { outline-color:#66efff; }
body.layout-bounds :is(.table-match-copy,#bannerRail,#actionPanel > .section-heading,#legalActions) {
 outline:1px dashed #66efff; outline-offset:-1px;
}
body.layout-bounds :is(.banner-overview,.banner-sash,.action-header-tools,#actionPages,.turn-command-strip,#legalActions .action-button) {
 outline:1px dashed #ffcf70; outline-offset:-1px;
}
/* Identity may grow when a long turn label wraps; statistics must follow it. */
@media(min-width:1000px) {
 .layout-v2 main .player.local-seat { grid-template-rows:max-content auto; }
 .layout-v2 .player.local-seat .player-head { min-height:min-content; }
}
.layout-v2 .player.active .player-stats { padding-top:0; }
.layout-v2 #legalActions .action-button.end-turn {
 justify-self:start; width:fit-content; min-width:min(160px,100%); max-width:min(280px,100%);
}

/* U152: speech bubbles follow their content, not the entire player panel. */
.layout-v2 .character-bubble {
 right:auto; width:max-content; max-width:min(320px,calc(100% - 150px));
 white-space:normal; overflow-wrap:anywhere;
}
@media(max-width:700px) {
 .layout-v2 .character-bubble { left:64px; max-width:calc(100% - 72px); }
}

/* U171: bounded Set tiles; a single Set must not stretch across the board. */
@media(min-width:701px) {
 .layout-v2 .player .sets {
   --set-min:92px; --set-max:130px;
   display:flex; flex-wrap:wrap; justify-content:flex-start;
   align-content:flex-start; align-items:flex-start; gap:6px;
 }
 .layout-v2 .player.local-seat .sets { --set-min:120px; --set-max:150px; }
 .layout-v2 .player .sets > .set {
   box-sizing:border-box; flex:0 1 var(--set-max); width:var(--set-max);
   min-width:min(100%,var(--set-min)); max-width:var(--set-max);
 }
 .layout-v2 .player.many-sets:not(.local-seat) .sets { --set-min:76px; --set-max:92px; gap:4px; }
 .layout-v2 .player.many-sets.local-seat .sets { --set-min:72px; --set-max:82px; gap:4px; }
 .layout-v2 .player.many-sets .set { grid-template-columns:15px minmax(0,1fr); padding:2px; }
 .layout-v2 .player.many-sets .set-number { font-size:12px; }
 .layout-v2 .player.many-sets .set-kamon,
 .layout-v2 .player.many-sets .set-kamon-fallback { width:23px; height:29px; margin-left:-8px; padding:1px; }
 .layout-v2 .player.many-sets .set-kamons { gap:0; }
 .layout-v2 .player.many-sets .set-meta strong { font-size:12px; gap:1px; }
 .layout-v2 .player.many-sets .set-banner-earned,
 .layout-v2 .player.many-sets .set-banner-missing { padding:1px 3px; font-size:10px; }
 .layout-v2 #legalActions { grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; }
 .layout-v2 #legalActions .action-button { padding:4px; }
 .layout-v2:not(.expanded-actions) #legalActions .action-button:not(.end-turn) { height:84px; overflow:hidden; }
 .layout-v2 #legalActions .action-icon { width:24px; height:24px; margin:0; border-radius:5px; }
 .layout-v2 #legalActions .action-icon svg { width:16px; height:16px; }
 .layout-v2 #legalActions .action-button strong { line-height:1.08; }
 .layout-v2 #legalActions .action-button small { margin-top:2px; line-height:1.08; -webkit-line-clamp:2; }
 .layout-v2 #legalActions .action-token-preview,
 .layout-v2 #legalActions .action-group-hint { line-height:1.05; }
 .layout-v2 #humanHand>.card { height:148px; }
}

/* U150: dialog portraits must outrank desktop thumbnail rules. */
.pregame { min-height:100dvh; background:radial-gradient(ellipse at center,#294347,#142a30 65%,#081015); }
.pregame main { visibility:hidden; }
#setupBackdrop { background:radial-gradient(ellipse at center,#294347,#142a30 65%,#081015); }
#characterPresentation .player-portrait {
 width:min(var(--character-size),100%); height:auto;
 min-width:0; max-width:none; min-height:0; max-height:none; aspect-ratio:1; flex:none;
}
#characterPresentation .character-relationship .relationship-face {
 width:min(90px,25%); height:auto;
 flex:0 0 min(90px,25%); margin:0;
}
#characterPresentation[open] {
 position:fixed; z-index:240; left:16px; right:auto; top:12px; bottom:auto;
 width:min(560px,calc(50vw - 24px)); max-height:calc(100dvh - 74px); margin:0;
 box-shadow:0 18px 60px #000b; backdrop-filter:blur(16px);
}
#characterPresentation > header { cursor:grab; touch-action:none; user-select:none; }
#characterPresentation.character-dragging > header { cursor:grabbing; }
#characterPresentation::backdrop { display:none; }
@media (max-width:700px) {
 #characterPresentation[open] { width:calc(100vw - 24px); }
}
.layout-v2 .end-recap-backdrop { background:rgba(6,12,10,.48); backdrop-filter:blur(8px); }
.layout-v2 .end-recap { width:min(1120px,calc(100vw - 28px)); background:linear-gradient(145deg,rgba(38,43,36,.88),rgba(21,24,20,.9)); backdrop-filter:blur(16px); }
.layout-v2 .banner-rail {
 position:static; inset:auto; transform:none; grid-area:2/1/3/-1;
 height:auto; max-width:100%; margin:0; padding:0;
 align-self:center; justify-self:end; margin-right:5%;
}
.layout-v2 main .banner-rail { grid-area:2/1/3/-1; justify-self:end; margin-right:5%; }
.layout-v2 .turn-sequence { display:inline-grid; place-items:center; min-width:1.35em; height:1.35em; margin:0 4px 0 0; padding:0 3px; border:1px solid #d4ae6777; border-radius:999px; color:#f0d58d; background:#17211fcc; font:700 11px/1 var(--font-ui); vertical-align:middle; }
.layout-v2 .player-identity h3 { display:inline; margin:0; }
.layout-v2 #actionTargets [data-target]:not([data-target="all"]) { position:relative; }
.layout-v2 #actionTargets .turn-order-badge { position:absolute; right:-3px; top:-4px; min-width:14px; height:14px; display:grid; place-items:center; border:1px solid #ead8aa; border-radius:50%; color:#1b211d; background:#e8d49d; font-size:9px; line-height:1; }
.layout-v2 .bot-turn-log { display:grid; gap:7px; padding:8px; border:1px solid #d4ae6744; border-radius:8px; background:#121c1a99; }
.layout-v2 .bot-turn-log>strong { color:#f0d58d; }
.layout-v2 .bot-log-heading { display:flex; align-items:center; gap:6px; min-width:0; }
.layout-v2 .bot-log-heading>span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.layout-v2 .action-log-portrait { width:28px; height:28px; min-width:28px; max-width:28px; border-width:1px; margin:0; }
.layout-v2 .turn-log-option strong,.layout-v2 #legalActions .action-title strong { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.layout-v2 .turn-action-summary { display:block; margin-top:3px; color:#d9c992; font-size:.62rem; line-height:1.35; }
.layout-v2 .action-sigil-icon { display:inline-block; width:1.2em; height:1.2em; margin:0 .04em; vertical-align:-.22em; object-fit:contain; }
.layout-v2 .action-clan-symbol { display:inline-block; width:18px; height:18px; padding:1px; margin:0 3px 0 0; vertical-align:-4px; object-fit:contain; border:1px solid #dac79b; border-radius:3px; box-sizing:border-box; }
.layout-v2 .action-tag-mode { display:inline-flex; align-items:center; gap:3px; }
.layout-v2 .action-tag-mode span { font-size:var(--ui-min); color:var(--muted); }
.layout-v2 .set-number { position:relative; }
.layout-v2 .set-lock { display:block; width:max-content; margin-top:2px; font-style:normal; font-size:.72em; line-height:1; filter:drop-shadow(0 1px 1px #0009); }
.layout-v2 .turn-action-details { margin-top:3px; color:var(--muted); font-size:.62rem; line-height:1.35; }
.layout-v2 .turn-action-details summary { width:max-content; cursor:pointer; color:#c9b88d; font-size:.58rem; }
.layout-v2 .turn-action-details>span,.layout-v2 .turn-action-details>small { display:block; margin-top:3px; }
.layout-v2 .banner-sash { zoom:1; width:56px; min-height:0; flex:0 0 56px; grid-template-rows:70px 16px; gap:0; }
.layout-v2 .banner-sash::before,.layout-v2 .banner-sash::after { display:none; }
.layout-v2 .banner-sash .banner-sash-flag {
 grid-row:1; width:56px; height:70px; margin:0; padding:0;
 background:none; border:0; box-shadow:none; filter:none;
 mask:none; -webkit-mask:none; display:block;
}
.layout-v2 .banner-sash-flag .sashimono-art { position:absolute; inset:0; width:100%; height:100%; }
.layout-v2 .banner-sash .banner-sash-flag::before,.layout-v2 .banner-sash .banner-sash-flag::after { display:none; }
.layout-v2 .banner-sash-flag b { position:absolute; left:23%; top:39%; width:58%; text-align:center; color:#352613; font-size:var(--ui-min); }
.layout-v2 .banner-sash-owner { grid-row:2; font-size:12px; white-space:nowrap; }
.layout-v2 .banner-sash.next .banner-sash-flag { outline:1px solid #e8d9a9; outline-offset:-1px; border-radius:3px; }
.layout-v2 .banner-sash.claimed .sashimono-art { opacity:.9; }
.layout-v2 .banner-sash.claimed .banner-sash-flag b { color:#352613; text-shadow:0 1px 1px #fff1be; }
.layout-v2 .banner-sash.claimed .banner-sash-owner { color:var(--player-color,#f1d58d); }
.layout-v2 .banner-rail { gap:3px; }
.layout-v2 .banner-sash { width:60px; flex-basis:60px; }
.layout-v2 .banner-sash .banner-sash-flag { width:54px; }
.layout-v2 .banner-sash-owner { max-width:60px; overflow:visible; font-size:11px; }
.layout-v2 .banner-sequence-arrow { flex:0 0 12px; align-self:center; color:#efd28b; font:700 22px/1 Georgia,serif; text-align:center; text-shadow:0 1px 4px #000; }
.layout-v2 .banner-sash:focus-visible { outline:2px solid var(--gold); outline-offset:3px; border-radius:6px; }
.layout-v2 #reducedMotionNotice { margin:6px 0; padding:6px 8px; border:1px solid #d4ae6777; border-radius:6px; color:#f2d995; background:#5b472533; font-size:var(--ui-min); }
@media(max-width:700px) {
 .layout-v2 .banner-sash { width:38px; flex-basis:38px; grid-template-rows:48px 16px; }
 .layout-v2 .banner-sash .banner-sash-flag { width:38px; height:48px; }
}

/* U174: use the pixels available on large desktop displays instead of leaving
   the game at its 1280x720 density. Explicit text-size choices remain useful. */
@media (min-width:1600px) and (min-height:900px) {
 .layout-v2 main { width:calc(100% - 20px); max-width:2200px; gap:14px; margin:10px auto; }
 .layout-v2 .table-wrap { padding:12px; }
 .layout-v2 .game-table { grid-template-rows:minmax(250px,auto) 90px minmax(180px,auto); gap:10px; }
 .layout-v2 .player { grid-template-columns:116px minmax(0,1fr); grid-template-rows:76px 34px auto; padding:10px; }
 .layout-v2 .player.local-seat { grid-template-columns:132px 240px minmax(0,1fr); grid-template-rows:76px 46px; grid-template-areas:'avatar head set-zone' 'hand stats set-zone'; }
 .layout-v2 .player-portrait { width:104px; height:104px; }
 .layout-v2 .hand-count { top:108px; }
 .layout-v2 .local-seat .player-head-actions { left:150px; right:auto; top:78px; }
 .layout-v2 .local-seat .player-head .turn-status { left:372px; }
 .layout-v2 #humanHand { gap:10px; }
 .layout-v2 #humanHand>.card { flex-basis:132px; max-width:144px; height:194px; }
 .layout-v2 .player:not(.local-seat) .sets { --set-min:102px; --set-max:145px; }
 .layout-v2 .player.sets-5:not(.local-seat) .sets { --set-min:104px; --set-max:116px; gap:5px; }
 .layout-v2 .player.sets-6:not(.local-seat) .sets { --set-min:88px; --set-max:98px; gap:4px; }
 .layout-v2 .player:is(.sets-7,.sets-8):not(.local-seat) .sets { --set-min:74px; --set-max:84px; gap:4px; }
 .layout-v2 .player:not(.local-seat) .set-zone { padding-top:36px; }
 .layout-v2 .player.local-seat .sets { --set-min:132px; --set-max:165px; }
 .layout-v2 #handPanel,.layout-v2 #actionPanel { padding:14px; }
 .layout-v2 #legalActions { gap:8px; }
}

/* U186: Set density changes gradually; only 7+ Sets use the emergency compact form. */
.layout-v2 .player.sets-5 .set-kamon,.layout-v2 .player.sets-5 .set-kamon-fallback { width:28px; height:36px; margin-left:-9px; }
.layout-v2 .player.sets-6 .set-kamon,.layout-v2 .player.sets-6 .set-kamon-fallback { width:24px; height:31px; margin-left:-8px; }
.layout-v2 .player:is(.sets-7,.sets-8) .token-counter { min-width:0; padding:1px 3px; }
.layout-v2 .player:is(.sets-7,.sets-8) .token-counter .token-pip,
.layout-v2 .player:is(.sets-7,.sets-8) .token-counter em { display:none; }
.layout-v2 .player:is(.sets-7,.sets-8) .token-counter::before { content:'●' attr(data-count); color:#f0d486; font-size:10px; line-height:14px; }
.layout-v2 .player:is(.sets-7,.sets-8) .set { position:relative; grid-template-columns:minmax(0,1fr); padding:2px; }
.layout-v2 .player:is(.sets-7,.sets-8) .set-number { position:absolute; left:3px; top:3px; z-index:2; font-size:12px; }
.layout-v2 .player:is(.sets-7,.sets-8) .set-main { grid-column:1; width:100%; }
.layout-v2 .player:is(.sets-7,.sets-8) .set-kamons { padding-left:10px; gap:0; }
.layout-v2 .player:is(.sets-7,.sets-8) .set-kamon,
.layout-v2 .player:is(.sets-7,.sets-8) .set-kamon-fallback { width:20px; height:27px; margin-left:-7px; padding:1px; }
.layout-v2 .player:is(.sets-7,.sets-8) .set-banner-earned { max-width:23px; padding:1px 2px; overflow:hidden; font-size:9px; }
.layout-v2 .player:is(.sets-7,.sets-8) .set-meta strong { max-width:100%; overflow:hidden; font-size:12px; gap:1px; }

@media(max-width:900px) {
 .end-game-player-stats,.end-game-details { grid-template-columns:1fr; }
}

@media(min-width:1000px) and (max-height:799px) {
 .layout-v2 .player.local-seat .sets { --set-min:82px; --set-max:100px; gap:4px; }
 .layout-v2 .player.local-seat .set { padding:3px; }
 .layout-v2 .player.local-seat .set-kamon,
 .layout-v2 .player.local-seat .set-kamon-fallback { width:22px; height:28px; margin-left:-7px; padding:1px; }
}

.layout-v2 #actionPanel.terminal-actions .action-header-tools { display:none; }
.layout-v2 #actionPanel.terminal-actions #legalActions { display:block; }
.layout-v2 #actionPanel.terminal-actions { font-size:14px; }
.layout-v2 #actionPanel.terminal-actions .end-game-panel { gap:9px; }
.layout-v2 #actionPanel.terminal-actions .end-game-lead,
.layout-v2 #actionPanel.terminal-actions .end-game-player-stats li,
.layout-v2 #actionPanel.terminal-actions .end-game-details section { padding:8px 10px; }
.layout-v2 #actionPanel.terminal-actions .end-game-player-stats { gap:7px; }
.layout-v2 #actionPanel.terminal-actions .end-game-player-stats li { gap:4px; font-size:13px; line-height:1.35; }
.layout-v2 #actionPanel.terminal-actions .end-game-lead p,
.layout-v2 #actionPanel.terminal-actions .end-game-details ol,
.layout-v2 #actionPanel.terminal-actions .end-game-details ul { font-size:13px; line-height:1.4; }
.layout-v2 #actionPanel.terminal-actions .end-game-player-stats li>strong .player-name { color:var(--player-color)!important; }

/* U187: bounded one-row Set geometry and genuinely distinct action densities. */
@media(min-width:701px) {
 .layout-v2 .player .sets {
   display:grid; grid-auto-rows:auto; grid-auto-flow:row;
   gap:var(--set-gap,5px); overflow:visible;
 }
 .layout-v2 .player.sets-1 .sets { grid-template-columns:repeat(1,minmax(0,var(--set-max))); }
 .layout-v2 .player.sets-2 .sets { grid-template-columns:repeat(2,minmax(0,var(--set-max))); }
 .layout-v2 .player.sets-3 .sets { grid-template-columns:repeat(3,minmax(0,var(--set-max))); }
 .layout-v2 .player.sets-4 .sets { grid-template-columns:repeat(4,minmax(0,var(--set-max))); }
 .layout-v2 .player.sets-5 .sets { grid-template-columns:repeat(5,minmax(0,var(--set-max))); }
 .layout-v2 .player.sets-6 .sets { grid-template-columns:repeat(6,minmax(0,var(--set-max))); }
 .layout-v2 .player.sets-7 .sets { grid-template-columns:repeat(7,minmax(0,var(--set-max))); }
 .layout-v2 .player.sets-8 .sets { grid-template-columns:repeat(8,minmax(0,var(--set-max))); }
 .layout-v2 .player .sets>.set {
   box-sizing:border-box; width:auto; min-width:0; max-width:none;
 }
 .layout-v2 .player.sets-5 .sets {
   grid-template-columns:repeat(5,minmax(var(--set-min),1fr));
   width:100%;
 }
 .layout-v2:not(.compact-actions) #legalActions { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .layout-v2:not(.compact-actions):not(.expanded-actions) #legalActions .action-button:not(.end-turn) {
   height:auto; min-height:76px; overflow:visible;
 }
 .layout-v2.compact-actions #legalActions { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
.layout-v2.compact-actions #legalActions .action-button { min-height:54px; height:auto; overflow:visible; padding:4px 5px; }
.layout-v2.compact-actions:not(.expanded-actions) #legalActions .action-button:not(.end-turn) { height:58px; min-height:58px; }
.layout-v2.compact-actions #legalActions .action-detail,
.layout-v2.compact-actions #legalActions .action-reason { display:none!important; }
.layout-v2.compact-actions #legalActions .action-choice-card { display:block!important; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#d9c992; }
.layout-v2.compact-actions #legalActions .action-button strong { font-size:12px; line-height:1.08; }
.layout-v2.compact-actions #legalActions .action-score { font-size:10px; }
.layout-v2.compact-actions #legalActions :is(.action-token-preview,.action-group-hint) {
 display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:10px;
}
.layout-v2 .turn-log-button {
 display:inline-flex; align-items:center; gap:3px; min-width:30px; padding:2px 6px;
 color:#e8d39a; background:rgba(199,164,92,.08); border-color:rgba(199,164,92,.42);
 border-radius:999px; font-size:12px; line-height:1;
}
.layout-v2 .turn-log-button b { font-size:10px; }
.layout-v2 .turn-log-option { grid-template-columns:24px 25px minmax(0,1fr) 30px; }
.layout-v2 .named-card-flight>.card { box-sizing:border-box; width:100%; height:100%; min-height:0; }
.layout-v2 .motion-pending { visibility:hidden!important; pointer-events:none!important; }
.layout-v2 .motion-arrived { animation:motion-arrived .2s ease-out both; }
.layout-v2 .character-bubble { transition:opacity .18s ease-out, transform .18s ease-out; }
.layout-v2 .character-bubble.is-leaving { opacity:0; transform:translateY(-4px) scale(.98); pointer-events:none; }
@keyframes motion-arrived { from { opacity:0; } to { opacity:1; } }
.layout-v2 #actionPanel.motion-waiting { visibility:visible!important; pointer-events:none!important; }
.layout-v2 .matching-card-highlight { outline:2px solid #fff4bd!important; outline-offset:2px; filter:brightness(1.16); box-shadow:0 0 0 3px #fff4bd55,0 0 16px #fff4bd88!important; }
@media(prefers-reduced-motion:reduce) {
 .layout-v2 .motion-arrived { animation:none; }
 .layout-v2 .character-bubble { transition:none; }
}
.layout-v2 .honor-rank { position:relative; display:inline-block; }
.layout-v2 .honor-powerup {
 position:absolute; left:50%; bottom:calc(100% + 2px); z-index:10; pointer-events:none;
 color:#fff1a8; font:900 15px/1 var(--font-ui); white-space:nowrap;
 text-shadow:0 2px 5px #172019,0 0 10px #f0c85b99;
 animation:honor-powerup .9s cubic-bezier(.18,.76,.28,1) both;
}
@keyframes honor-powerup {
 0% { opacity:0; transform:translate(-50%,5px) scale(.76); }
 14% { opacity:1; transform:translate(-50%,1px) scale(1.05); }
 68% { opacity:1; transform:translate(-50%,-15px) scale(1); }
 100% { opacity:0; transform:translate(-50%,-24px) scale(.96); }
}
@media(prefers-reduced-motion:reduce) { .layout-v2 .honor-powerup { animation:none; } }
.layout-v2 #actionPanel.terminal-actions .end-game-player-stats li>div { gap:2px 8px; }
.layout-v2 #actionPanel.terminal-actions .end-game-details { gap:7px; }
.layout-v2 #actionPanel.terminal-actions .end-game-details ol,
.layout-v2 #actionPanel.terminal-actions .end-game-details ul { gap:3px; }
@media(min-width:1200px) {
 .layout-v2 #actionPanel.terminal-actions .end-game-details section:last-child ul { grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:16px; }
}
.layout-v2 #actionPanel.terminal-actions .end-game-player-stats li>div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:center; }
.layout-v2 #actionPanel.terminal-actions .end-game-player-stats li>div>span,
.layout-v2 #actionPanel.terminal-actions .end-game-details .mission-owner>b,
.layout-v2 #actionPanel.terminal-actions .end-game-details .mission-owner>span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.layout-v2 #actionPanel.terminal-actions .end-game-details .mission-owner { display:grid; grid-template-columns:minmax(0,1fr) minmax(70px,38%); align-items:baseline; gap:4px; min-width:0; }

/* Six Sets fill the available board width once each tile can remain readable. */
@media(min-width:701px) {
 .layout-v2 .player .set-zone { container:player-sets / inline-size; }
 @container player-sets (min-width:580px) {
  .layout-v2 .player.sets-6 .sets {
   --set-min:90px; gap:5px;
   width:100%; grid-template-columns:repeat(6,minmax(var(--set-min),1fr));
  }
 }
}

/* U240: logged actions use the available width, while compact mode stays genuinely compact. */
.layout-v2 .bot-log-heading .action-log-portrait,
.layout-v2 .turn-log-option .action-log-target {
  width:40px!important; min-width:40px!important; max-width:40px!important;
  height:40px!important; min-height:40px!important; max-height:40px!important;
  flex-basis:40px!important;
}
.layout-v2 .bot-log-heading .player-portrait,
.layout-v2 .turn-log-option .player-portrait { background-size:auto 400%!important; }
.layout-v2 .turn-log-option { grid-template-columns:24px 25px minmax(0,1fr) 40px; }
.layout-v2 .bot-turn-log { grid-template-columns:minmax(0,1fr); align-items:stretch; gap:6px; }
.layout-v2 .bot-turn-log>.bot-log-heading,
.layout-v2 .bot-turn-log>small { grid-column:1/-1; }
.layout-v2 .turn-log-option { min-height:62px; padding:6px; }
.layout-v2 .turn-action-summary .action-sigil-icon {
  width:32px; height:32px; margin:0 2px; padding:3px; vertical-align:-11px;
  border:1px solid #ead9ab; border-radius:50%; box-shadow:0 1px 4px #000b;
}
.layout-v2 .turn-action-summary .sigil-s1 { background:#778393; }
.layout-v2 .turn-action-summary .sigil-s2 { background:#426f48; }
.layout-v2 .turn-action-summary .sigil-s3 { background:#a94b2d; }
.layout-v2 .turn-action-summary .sigil-s4 { background:#75547c; }
.layout-v2 .turn-action-summary .sigil-s5 { background:#387493; }
.layout-v2 .turn-action-summary .sigil-s6 { background:#3d414c; }
.layout-v2 .turn-action-summary .sigil-s7 { background:#896a35; }
.layout-v2 .turn-action-summary .sigil-s8 { background:#52665c; }
.layout-v2 .turn-log-option.action-draw,.layout-v2 .action-button.action-draw {
  border-color:#477a9d; background:linear-gradient(145deg,#183849a8,#18261f);
}
.layout-v2 .turn-log-option.action-exchange,.layout-v2 .action-button.action-exchange {
  border-color:#a47d44; background:linear-gradient(145deg,#46331e9c,#211f17);
}
.layout-v2 .bot-turn-log .turn-log-option {
  border-color:var(--line);
  background:rgba(255,255,255,.025);
}
.layout-v2 .bot-turn-log {
  border-color:var(--line);
}
.layout-v2.compact-actions .bot-turn-log { grid-template-columns:minmax(0,1fr); align-items:stretch; gap:4px; padding:5px; }
.layout-v2.compact-actions .turn-log-option { grid-template-columns:20px 22px minmax(0,1fr); min-height:48px; padding:4px; }
.layout-v2.compact-actions .turn-log-option .action-log-target { display:none!important; }
.layout-v2.compact-actions .turn-log-option .action-icon { width:20px; height:20px; }
.layout-v2.compact-actions .turn-log-option .action-icon svg { width:13px; height:13px; }
.layout-v2.compact-actions .turn-log-option strong { font-size:11px; }
.layout-v2.compact-actions .turn-action-summary { margin-top:1px; font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.layout-v2.compact-actions .turn-action-details { display:none; }
@media(min-width:701px) {
  .layout-v2 #actionPanel { min-height:0; max-height:calc(100dvh - 24px); overflow:auto; }
  .layout-v2.expanded-actions .bot-turn-log { grid-template-columns:minmax(0,1fr); align-items:stretch; gap:10px; }
}
@media(max-width:820px) {
  .layout-v2 .bot-turn-log { grid-template-columns:1fr; }
}
#handOrderControls { display:flex; justify-content:flex-end; flex-wrap:wrap; align-items:center; gap:5px; margin-top:8px; }
#handOrderControls button { display:grid; place-items:center; width:30px; height:30px; padding:4px; }
#handOrderControls button[aria-pressed=true] { color:#17251f; background:#d6be83; }
.layout-v2 #humanHand .card-rarity { position:static; display:block; align-self:center; margin:4px 0 0; font-size:12px; transform:none; }
.layout-v2 #humanHand .card-rarity-stars { letter-spacing:1px; }
.layout-v2 .turn-action-title .action-icon { display:grid; place-items:center; box-sizing:border-box; padding:0; }
.layout-v2 .turn-action-title .action-icon svg { display:block; margin:0; }
/* Compact text keeps its own typography beside the action title. */
.layout-v2 .turn-action-title strong { min-width:0; display:block; }
.layout-v2 .turn-action-title strong .player-name { display:inline; white-space:nowrap; }
.layout-v2 :is(.brief-action,.turn-log-option:has(strong[title^="Dishonor"])) .turn-action-text { display:flex; align-items:center; flex-wrap:wrap; gap:2px 10px; }
.layout-v2 :is(.brief-action,.turn-log-option:has(strong[title^="Dishonor"])) .turn-action-title { flex:0 0 auto; }
.layout-v2 :is(.brief-action,.turn-log-option:has(strong[title^="Dishonor"])) .turn-action-summary { margin:0; }
.layout-v2 :is(.brief-action,.turn-log-option:has(strong[title^="Dishonor"])) .turn-action-details { flex-basis:100%; }
/* Readable sequence and docked, player-colored review navigation. */
.layout-v2 #actionPanel>.game-panel-nav { position:static; inset:auto; order:5; flex:0 0 auto; align-self:flex-end; max-width:100%; margin-top:7px; box-sizing:border-box; }
/* Review is a floating utility, never a row reserved inside the action panel. */
.layout-v2 #gamePanelNav {
  position:fixed; left:auto; right:max(14px,env(safe-area-inset-right));
  bottom:max(14px,env(safe-area-inset-bottom)); z-index:110;
  width:36px; min-height:36px; max-width:calc(100vw - 72px);
  margin:0; padding:0; border:0; background:transparent; box-shadow:none;
  backdrop-filter:none; box-sizing:border-box;
}
.layout-v2 #gamePanelNav>:not(#gamePanelNavToggle) { display:none; }
.layout-v2 #gamePanelNav #gamePanelNavToggle {
  width:36px; height:36px; min-width:36px; min-height:36px; padding:0;
  border-radius:50%; background:#18221df2; border:1px solid #827044;
}
.layout-v2 #gamePanelNav.dock-expanded {
  width:max-content; height:36px; display:flex; flex-wrap:nowrap; align-items:center; justify-content:flex-end;
  gap:4px; padding:3px 44px 3px 6px; border:1px solid #827044;
  border-radius:14px; background:#18221df2; box-shadow:0 5px 20px #0009;
}
.layout-v2 #gamePanelNav.dock-expanded>:not(#gamePanelNavToggle) { display:flex; }
.layout-v2 #gamePanelNav.dock-expanded #gamePanelNavToggle { position:absolute; bottom:-1px; right:-1px; }
.layout-v2 #gamePanelNav.dock-expanded #gamePanelReviewTabs { flex-wrap:nowrap; justify-content:flex-start; min-width:0; overflow-x:auto; scrollbar-width:none; }
.layout-v2 #gamePanelNav.dock-expanded button:not(#gamePanelNavToggle) { min-width:28px; min-height:28px; height:28px; padding:2px 7px; font-size:12px; white-space:nowrap; flex-shrink:0; }
@media(max-width:650px) {
  .layout-v2 #gamePanelNav.dock-expanded #gamePanelFollow { max-width:92px; overflow:hidden; text-overflow:ellipsis; display:block; }
  .music-dock.dock-expanded .music-label { display:none; }
}
.layout-v2 .game-panel-review-tabs button[class*=player-color] { color:var(--player-color); background:rgba(var(--player-color-rgb),.18); border-color:rgba(var(--player-color-rgb),.5); }
.layout-v2 .game-panel-review-tabs button.own-actions-tab { background:#354d45; color:#e9f3ed; }
.layout-v2 .game-panel-review-tabs button[aria-pressed=true] { outline:2px solid var(--player-color,#e3ce97); outline-offset:-2px; }
.layout-v2 #actionTargets .filter-player-portrait { display:block; grid-area:auto; place-self:auto; width:32px; height:32px; min-width:32px; max-width:32px; margin:0; }
.layout-v2 #legalActions .player-name { color:var(--player-color); }
.layout-v2 #legalActions .bot-turn-log>.turn-log-option { position:relative; }
.layout-v2 #legalActions .bot-turn-log>.turn-log-option:nth-of-type(2) { --sequence-indent:8px; }
.layout-v2 #legalActions .bot-turn-log>.turn-log-option:nth-of-type(3) { --sequence-indent:16px; }
.layout-v2 #legalActions .bot-turn-log>.turn-log-option:nth-of-type(4) { --sequence-indent:24px; }
.layout-v2 #legalActions .bot-turn-log>.turn-log-option:nth-of-type(5) { --sequence-indent:32px; }
.layout-v2 #legalActions .bot-turn-log>.turn-log-option:nth-of-type(n+6) { --sequence-indent:40px; }
.layout-v2 #legalActions .bot-turn-log>.turn-log-option:not(:first-of-type)::before { content:'↳'; position:absolute; left:-10px; top:-8px; color:#d9c58b; font:700 15px/1 var(--font-ui); pointer-events:none; }
/* U244: chronological full-width register, with compact bookend actions. */
.layout-v2 #legalActions .bot-turn-log>.turn-log-option { margin-left:var(--sequence-indent,0px); }
.layout-v2 #legalActions .bot-turn-log>.turn-log-option:nth-of-type(2) { --sequence-indent:12px; }
.layout-v2 #legalActions .bot-turn-log>.turn-log-option:nth-of-type(3) { --sequence-indent:24px; }
.layout-v2 #legalActions .bot-turn-log>.turn-log-option:nth-of-type(4) { --sequence-indent:36px; }
.layout-v2 #legalActions .bot-turn-log>.turn-log-option:nth-of-type(5) { --sequence-indent:48px; }
.layout-v2 #legalActions .bot-turn-log>.turn-log-option:nth-of-type(6) { --sequence-indent:60px; }
.layout-v2 #legalActions .bot-turn-log>.turn-log-option:nth-of-type(n+7) { --sequence-indent:60px; }
@media(max-width:700px) {
 .layout-v2 #legalActions .bot-turn-log>.turn-log-option { margin-left:min(var(--sequence-indent,0px),12px); }
}
.layout-v2 #legalActions .bot-turn-log,.layout-v2.compact-actions #legalActions .bot-turn-log,.layout-v2.expanded-actions #legalActions .bot-turn-log { grid-template-columns:minmax(0,1fr); gap:5px; padding:6px; }
.layout-v2 #legalActions .bot-log-heading { display:none; }
.layout-v2 #actionPrompt { display:flex; align-items:center; gap:9px; }
.layout-v2 #actionPrompt .action-log-portrait { grid-area:auto; place-self:auto; display:inline-block; width:52px; height:52px; min-width:52px; max-width:52px; flex:0 0 52px; margin:0; }
.layout-v2 .turn-action-title { display:flex; align-items:center; gap:6px; }
.layout-v2 .turn-action-title .action-icon { flex:0 0 24px; width:24px; height:24px; }
.layout-v2 #legalActions .turn-log-option { min-height:72px; padding:5px 7px; }
.layout-v2 #legalActions .turn-log-option.brief-action { min-height:48px; }
.layout-v2 #legalActions .brief-action .action-log-target { display:none!important; }
.layout-v2 #legalActions .turn-log-option .action-log-target { width:46px!important; height:46px!important; min-width:46px!important; max-width:46px!important; min-height:46px!important; max-height:46px!important; }
.layout-v2 #legalActions .turn-action-visuals { width:auto; flex-wrap:nowrap; }
.layout-v2 #legalActions .turn-log-option { grid-template-columns:54px minmax(0,1fr) auto; }
/* U243: sequenced log tiles, left-side identity and directional card routes. */
.layout-v2 .turn-log-option,.layout-v2.compact-actions .turn-log-option { grid-template-columns:40px minmax(0,1fr) 46px; align-items:start; }
.layout-v2 .turn-action-identity { display:flex; flex-direction:column; align-items:center; gap:5px; }
.layout-v2 .turn-log-option .move-number { display:grid; place-items:center; box-sizing:border-box; width:26px; height:26px; padding:0; margin:0; font:800 14px/1 var(--font-ui); }
.layout-v2 .turn-action-text { min-width:0; }
.layout-v2 .turn-card-route { display:flex; align-items:center; gap:2px; }
.layout-v2 .turn-card-route b { font:800 16px/1 var(--font-ui); }
.layout-v2 .route-out { color:#ffb6a1; }
.layout-v2 .route-in { color:#b6e5be; }
.layout-v2 .turn-action-visuals { width:46px; }
.layout-v2 .bot-log-heading>span:not(.player-portrait) { display:none; }
.layout-v2 .bot-log-heading>.player-portrait { overflow:hidden; }
@media(min-width:1000px) {
 .layout-v2 .bot-turn-log>.sequence-even { margin-top:7px; margin-bottom:-7px; }
 .layout-v2 .bot-turn-log { padding-bottom:15px; }
}
/* U242: independent board/hand rows and bounded, full-width turn register. */
@media(min-width:1000px) {
 .layout-v2 #actionPanel { display:flex; flex-direction:column; overflow:hidden; height:100%; max-height:none; }
 .layout-v2 #legalActions { flex:1; min-height:0; overflow-y:auto; overflow-x:hidden; align-content:start; }
 .layout-v2 #legalActions>.bot-turn-log { grid-column:1/-1; width:100%; box-sizing:border-box; }
 .layout-v2 .bot-turn-log,.layout-v2.compact-actions .bot-turn-log,.layout-v2.expanded-actions .bot-turn-log { grid-template-columns:repeat(2,minmax(0,1fr)); align-content:start; }
 .layout-v2 #handPanel { min-height:0; max-height:100%; overflow:auto; }
 .layout-v2 .local-seat .player-head-actions { left:auto; right:10px; top:10px; }
 .layout-v2 .player:not(.local-seat) .player-hand { transform:translate(3px,12px); height:33px; }
 .layout-v2 .player:not(.local-seat) .player-hand>.card { flex-basis:24px; width:24px; height:33px; margin-right:-12px; }
 .layout-v2 .player:not(.local-seat) .hand-count { top:120px; left:13px; }
 .layout-v2 .player:not(.local-seat) .set-zone { padding-top:42px; }
}
.layout-v2 .turn-action-summary .action-sigil-icon { width:20px; height:20px; padding:2px; vertical-align:-6px; }
.layout-v2 .turn-action-card { display:inline-block; width:28px; height:28px; object-fit:contain; vertical-align:middle; margin:0 3px; border:1px solid #dac79b; border-radius:3px; }
.layout-v2.compact-actions .turn-action-card { display:none; }
.layout-v2 .turn-action-visuals { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:3px; width:40px; }
@media(max-width:700px) {
 .layout-v2[data-mobile-pane=table] #handPanel { display:block; }
 .layout-v2[data-mobile-pane=table] #humanHand { overflow-x:auto; overflow-y:hidden; justify-content:flex-start; padding:0 3px 5px; scrollbar-width:thin; }
 .layout-v2[data-mobile-pane=table] #humanHand>.card { height:118px; max-width:82px; }
 .layout-v2[data-mobile-pane=table] #humanHand .card-art { width:42px; height:42px; }
}
.terminal-hand-popover-cards { display:flex; flex-wrap:wrap; gap:8px; padding:2px; }
.terminal-hand-popover-cards .card { flex:0 0 92px; width:92px; min-height:132px; }

/* Compact face chips use sharpened 2x sprite sheets; board/presentation portraits remain HD. */
:where(.layout-v2 .action-log-portrait,.layout-v2 #actionTargets .player-portrait).portrait-sheet-v1 { background-image:url('/assets/portraits-small-v1.png?v=U2140'); background-size:auto 400%; }
:where(.layout-v2 .action-log-portrait,.layout-v2 #actionTargets .player-portrait).portrait-sheet-v2 { background-image:url('/assets/portraits-small-v2.png?v=U2140'); background-size:auto 400%; }
:where(.layout-v2 .action-log-portrait,.layout-v2 #actionTargets .player-portrait).portrait-sheet-v3 { background-image:url('/assets/portraits-small-v3.png?v=U2140'); background-size:auto 400%; }
:where(.layout-v2 .action-log-portrait,.layout-v2 #actionTargets .player-portrait).portrait-sheet-v4 { background-image:url('/assets/portraits-small-v4.png?v=U2140'); background-size:auto 400%; }
:where(.layout-v2 .action-log-portrait,.layout-v2 #actionTargets .player-portrait).portrait-sheet-v5 { background-image:url('/assets/portraits-small-v5.png?v=U2140'); background-size:auto 400%; }
:where(.layout-v2 .action-log-portrait,.layout-v2 #actionTargets .player-portrait).portrait-sheet-v6 { background-image:url('/assets/portraits-small-v6.png?v=U2140'); background-size:auto 400%; }
:where(.layout-v2 .action-log-portrait,.layout-v2 #actionTargets .player-portrait).portrait-sheet-v7 { background-image:url('/assets/portraits-small-v7.png?v=U2140'); background-size:auto 400%; }
:where(.layout-v2 .action-log-portrait,.layout-v2 #actionTargets .player-portrait).portrait-sheet-v8 { background-image:url('/assets/portraits-small-v8.png?v=U2140'); background-size:auto 400%; }
:where(.layout-v2 .action-log-portrait,.layout-v2 #actionTargets .player-portrait).portrait-sheet-v9 { background-image:url('/assets/portraits-small-v9.png?v=U2140'); background-size:auto 400%; }
:where(.layout-v2 .action-log-portrait,.layout-v2 #actionTargets .player-portrait).portrait-sheet-v10 { background-image:url('/assets/portraits-small-v10.png?v=U2140'); background-size:auto 400%; }
:where(.layout-v2 .action-log-portrait,.layout-v2 #actionTargets .player-portrait).portrait-sheet-v11 { background-image:url('/assets/portraits-small-v11.png?v=U2140'); background-size:auto 400%; }
:where(.layout-v2 .action-log-portrait,.layout-v2 #actionTargets .player-portrait).portrait-sheet-v1:is(.mood-thinking,.mood-furious,.mood-challenging) { background-image:url('/assets/portraits-small-v1-extra.png?v=U2140'); }
:where(.layout-v2 .action-log-portrait,.layout-v2 #actionTargets .player-portrait).portrait-sheet-v2:is(.mood-thinking,.mood-furious,.mood-challenging) { background-image:url('/assets/portraits-small-v2-extra.png?v=U2140'); background-size:auto 400%; }
:where(.layout-v2 .action-log-portrait,.layout-v2 #actionTargets .player-portrait).portrait-sheet-v3:is(.mood-thinking,.mood-furious,.mood-challenging) { background-image:url('/assets/portraits-small-v3-extra.png?v=U2140'); }
:where(.layout-v2 .action-log-portrait,.layout-v2 #actionTargets .player-portrait).portrait-sheet-v4:is(.mood-thinking,.mood-furious,.mood-challenging) { background-image:url('/assets/portraits-small-v4-extra.png?v=U2140'); }
:where(.layout-v2 .action-log-portrait,.layout-v2 #actionTargets .player-portrait).portrait-sheet-v5:is(.mood-thinking,.mood-furious,.mood-challenging) { background-image:url('/assets/portraits-small-v5-extra.png?v=U2140'); }
:where(.layout-v2 .action-log-portrait,.layout-v2 #actionTargets .player-portrait).portrait-sheet-v6:is(.mood-thinking,.mood-furious,.mood-challenging) { background-image:url('/assets/portraits-small-v6-extra.png?v=U2140'); }
:where(.layout-v2 .action-log-portrait,.layout-v2 #actionTargets .player-portrait).portrait-sheet-v7:is(.mood-thinking,.mood-furious,.mood-challenging) { background-image:url('/assets/portraits-small-v7-extra.png?v=U2140'); }
:where(.layout-v2 .action-log-portrait,.layout-v2 #actionTargets .player-portrait).portrait-sheet-v8:is(.mood-thinking,.mood-furious,.mood-challenging) { background-image:url('/assets/portraits-small-v8-extra.png?v=U2140'); }
:where(.layout-v2 .action-log-portrait,.layout-v2 #actionTargets .player-portrait).portrait-sheet-v9:is(.mood-thinking,.mood-furious,.mood-challenging) { background-image:url('/assets/portraits-small-v9-extra.png?v=U2140'); background-size:auto 400%; }
:where(.layout-v2 .action-log-portrait,.layout-v2 #actionTargets .player-portrait).portrait-sheet-v10:is(.mood-thinking,.mood-furious,.mood-challenging) { background-image:url('/assets/portraits-small-v10-extra.png?v=U2140'); background-size:auto 400%; }
:where(.layout-v2 .action-log-portrait,.layout-v2 #actionTargets .player-portrait).portrait-sheet-v11:is(.mood-thinking,.mood-furious,.mood-challenging) { background-image:url('/assets/portraits-small-v11-extra.png?v=U2140'); background-size:auto 400%; }

/* Preserve side-by-side sigils; crowded hands overlap by at most 10px. */
/* Recap sections retain their natural height; badge text never splits. */
.layout-v2 #endRecapPlayers { flex:0 0 auto; min-height:auto; grid-auto-rows:auto; }
.layout-v2 #endRecapPlayers .end-recap-player { height:auto; min-height:min-content; align-content:start; }
.layout-v2 #endRecapPlayers .end-recap-breakdown { align-items:center; gap:5px; }
.layout-v2 #endRecapPlayers .end-recap-breakdown>span { flex:0 0 auto; display:inline-flex; align-items:baseline; gap:3px; white-space:nowrap; line-height:1.3; padding:3px 5px; }
.layout-v2 #endRecapHumanProgress { position:static; flex:0 0 auto; margin-top:4px; }
.layout-v2 #endRecap .end-recap-head,.layout-v2 #endRecap .end-recap-outcome,.layout-v2 #endRecap .end-recap-formula,.layout-v2 #endRecap>footer { flex-shrink:0; }
.layout-v2 #endRecapHumanProgress .human-progress-card small,.layout-v2 #endRecapHumanProgress .human-progress-card b { white-space:normal; overflow-wrap:anywhere; }
.layout-v2 #legalActions.chart-view { display:flex; overflow:hidden; }
.layout-v2 #legalActions > .match-stats-table { grid-column:1/-1; min-width:0; }
.match-stats-table .stats-table { min-width:34rem; font-size:var(--ui-min,.75rem); }
.match-stats-table .stats-table thead th { white-space:normal; }
.advancement-chart { grid-column:1/-1; display:flex; flex-direction:column; min-width:0; min-height:0; width:100%; height:100%; gap:5px; }
.advancement-chart svg { display:block; flex:1 1 0; min-height:0; width:100%; height:100%; font:12px system-ui; fill:#e2d7be; }
.advancement-chart>div,.chart-marker-legend { flex:0 0 auto; }
.chart-marker-legend { font-size:12px; color:#d9cdb5; }
.chart-legend { display:flex; flex-wrap:wrap; gap:10px; font-size:13px; }
.chart-legend span { color:var(--player-color); }
.chart-reveal { animation:chart-reveal 1.8s ease-out both; }
@keyframes chart-reveal { from { clip-path:inset(0 100% 0 0); } to { clip-path:inset(0 0 0 0); } }
@media(prefers-reduced-motion:reduce) { .chart-reveal { animation:none; } }
@media(min-width:701px) {
 .layout-v2 .player.sets-6 .sets { width:100%; grid-template-columns:repeat(6,minmax(0,1fr)); gap:3px; }
 .layout-v2 .player.sets-6 .sets>.set { position:relative; display:block; min-width:0; padding:3px; }
 .layout-v2 .player.sets-6 .set-number { position:absolute; top:3px; left:3px; font-size:11px; }
 .layout-v2 .player.sets-6 .set-kamons { padding-left:10px; gap:0; }
 .layout-v2 .player.sets-6 .set-kamon,.layout-v2 .player.sets-6 .set-kamon-fallback { width:22px; height:28px; margin-left:-6px; }
 .layout-v2 .player.sets-6 .set-meta strong { flex-wrap:wrap; font-size:11px; gap:2px; }
 .layout-v2 .player.sets-6 .token-counter { min-width:0; padding:1px 2px; }
 .layout-v2 .player.sets-6 .token-counter :is(.token-pip,em) { display:none; }
 .layout-v2 .player.sets-6 .token-counter::before { content:'●' attr(data-count); color:#f0d486; font-size:10px; }
 .layout-v2 .player.sets-6 .set-banner-earned { font-size:9px; padding:0 2px; margin:0; }
}
.layout-v2:not(.compact-actions):not(.expanded-actions) #legalActions .action-button:not(.end-turn) { height:auto; min-height:100px; padding:7px 8px; overflow:hidden; }
.layout-v2:not(.compact-actions) #legalActions .action-button { font-size:13px; }
.layout-v2:not(.compact-actions) #legalActions .action-button strong { font-size:13px; line-height:1.18; }
.layout-v2:not(.compact-actions) #legalActions .action-button :is(.action-detail,.action-token-preview,.action-group-hint,small) { font-size:12px; line-height:1.2; }
.layout-v2 #legalActions .action-button .action-detail { margin-top:1px; line-height:1.08; }
.layout-v2.compact-actions:not(.expanded-actions) #legalActions .action-button:not(.end-turn) { height:auto; min-height:68px; overflow:hidden; }
.layout-v2 .local-seat .set-zone>.player-head-actions { position:static; inset:auto; align-self:flex-end; flex:0 0 auto; margin-top:7px; padding:2px 0; z-index:auto; }
.layout-v2 .local-seat .set-zone>.player-head-actions .banner { position:static!important; }
.layout-v2 #humanHand>.card:not(.has-card-labels):has(.card-sigil) { height:auto; min-height:194px; padding-bottom:10px; }
.layout-v2 #humanHand>.card:not(.has-card-labels):has(.card-sigil) .card-tags { flex-shrink:0; }
.layout-v2 #humanHand { overflow-x:auto; overflow-y:hidden; justify-content:safe center; padding:14px 6px 6px; }
.layout-v2 #humanHand>.card.selection-glow,.layout-v2 #humanHand>.card.move-card-subject { transform:translateY(-7px); }
.layout-v2 #humanHand>.card { box-sizing:border-box; min-width:116px; margin-left:0; }
.layout-v2 #humanHand.hand-crowded { gap:0; }
.layout-v2 .mode-tabs { flex-wrap:nowrap; min-width:0; }
.layout-v2 .diagnostic-lights { flex:1 1 0; min-width:0; }
.layout-v2 .diagnostic-chip { font-size:9px; padding:3px; min-height:42px; }
.layout-v2 .diagnostic-chip-label { font-size:9px; }
.layout-v2 #humanHand.hand-crowded>.card:not(.hand-visual-last) { margin-right:-10px; }
.layout-v2 #humanHand .card-tags:has(.card-sigil:not(.card-label-sigil)) { display:flex; flex-wrap:nowrap; gap:2px; }
.layout-v2 #humanHand .card-sigil:not(.card-label-sigil) { flex-shrink:0; }
.layout-v2 #humanHand>.card.has-card-labels>.card-tags { position:absolute!important; z-index:3; left:.2rem; top:auto; bottom:.1rem; width:6.45rem; min-height:3.34rem; margin:0; display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-start; gap:.06rem; }
.layout-v2 #humanHand>.card.has-card-labels>.card-tags .card-label-sigil { width:6.45rem; height:1.64rem; margin:0; padding:0; border:0; border-radius:0; background:transparent; display:grid; grid-template-columns:3.25rem minmax(0,1fr); gap:.22rem; align-items:center; }
/* The name and sigils take their natural height. Only the crest uses the remaining space. */
.layout-v2[data-table-layout="desktop"] #humanHand > .card.has-card-labels:not(.compact-card) {
 display:grid; grid-template-rows:minmax(0,1fr) auto auto auto; row-gap:2px; justify-items:center;
}
.layout-v2[data-table-layout="desktop"] #humanHand > .card.has-card-labels > :is(.card-art,.card-mon) {
 grid-row:1; align-self:center; height:100%!important; width:auto!important; max-height:80px; max-width:100%;
 min-height:0; aspect-ratio:1; object-fit:contain;
}
.layout-v2[data-table-layout="desktop"] #humanHand > .card.has-card-labels > b {
 grid-row:2; margin:0; max-width:100%; line-height:1.1; text-align:center; overflow-wrap:anywhere;
}
.layout-v2[data-table-layout="desktop"] #humanHand > .card.has-card-labels > .card-rarity {
 grid-row:3; position:static!important; margin:0;
}
.layout-v2[data-table-layout="desktop"] #humanHand > .card.has-card-labels > .card-tags {
 grid-row:4; position:static!important; min-height:0; width:100%; align-self:end;
}
.layout-v2[data-table-layout="desktop"] #humanHand > .card.has-card-labels > .card-tags .card-label-sigil {
 width:100%; max-width:6.45rem; height:1.3rem; grid-template-columns:min(48%,3.25rem) minmax(0,1fr);
}
.layout-v2 #legalActions > .turn-command-strip:has(> .turn-command-end:only-child) {
 align-self:start; justify-self:start; margin:0; padding:0; border:0;
}
#actionPanel.draw-only-actions :is(.selection-highlight-toggle,#expandActions) {
 display:none;
}
#legalActions .action-shared-sigils {
 display:inline-flex; align-items:center; flex:none; gap:2px;
 font-size:.75em; line-height:1.4; color:var(--gold);
}
@media(max-width:700px) {
 .layout-v2 #humanHand>.card { min-width:100px; }
 .layout-v2 #humanHand>.card:not(.has-card-labels):has(.card-sigil) { min-height:160px; }
 .layout-v2 #humanHand .card-sigil:not(.card-label-sigil) { width:32px; height:32px; }
 body { --ui-min:13px; }
}

/* Sealed Sets form a visibly locked block; IDs/anchors keep their identity. */
.layout-v2 .player .set.seal .set-meta strong { flex-wrap:nowrap; white-space:nowrap; overflow:visible; }
.layout-v2 .player .set.seal .set-banner-earned { flex:0 0 auto; max-width:none; overflow:visible; }
.layout-v2 main .banner-rail { position:relative; padding-top:38px; height:auto; }
.banner-overview { position:absolute; top:0; left:0; right:0; display:grid; gap:3px; text-align:center; color:var(--gold); }
.banner-overview strong { font-size:13px; }
.banner-overview small { display:block; font-size:11px; color:var(--muted); }
.table-deck-rack button:focus-visible { outline:2px solid #fff0bd; outline-offset:4px; }
.table-deck-rack button:hover { filter:brightness(1.12); cursor:pointer; }
.layout-v2 .player .set.seal {
 background:linear-gradient(135deg,#76602b,#42371e);
 border:2px solid #dfbd61; border-left:6px solid #f2cf72;
 box-shadow:inset 0 0 0 1px #fff1bc33,inset 0 -8px 20px #1d170d66;
}
.layout-v2 .player .set.seal-without-banner { background:linear-gradient(135deg,#66604d,#37362c); border-color:#bdb18a; }
.layout-v2 .player .set.seal .set-kamons { gap:0; padding-left:12px; }
.layout-v2 .player .set.seal :is(.set-kamon,.set-kamon-fallback) { transform:none; margin-left:-12px; border-radius:2px; }
.layout-v2 .player .set .set-kamons {
 --mini-width:30px;
 --mini-height:40px;
 padding-left:0;
 gap:1px;
 min-width:0;
 height:var(--mini-height);
}
.layout-v2 .player.many-sets .set .set-kamons { --mini-width:29px; --mini-height:37px; }
.layout-v2 .player.sets-5 .set .set-kamons { --mini-width:35px; --mini-height:45px; }
.layout-v2 .player.sets-6 .set .set-kamons { --mini-width:28px; --mini-height:35px; }
.layout-v2 .player:is(.sets-7,.sets-8) .set .set-kamons { --mini-width:25px; --mini-height:34px; }
@media (max-width:700px) {
 .layout-v2 .player .set .set-kamons { --mini-width:22px; --mini-height:23px; }
}
.layout-v2 .player .set .set-kamons > :is(.set-kamon,.set-kamon-fallback) {
 box-sizing:border-box;
 flex:none;
 min-width:0;
 width:min(var(--mini-width),calc((100% - 2px) / 3));
 width:round(down,min(var(--mini-width),calc((100% - 2px) / 3)),1px);
 height:var(--mini-height);
 margin:0;
 padding:0;
 outline-offset:-2px !important;
 transform:none;
}
.layout-v2 .player:is(.many-sets,.sets-5,.sets-6,.sets-7,.sets-8) .sets {
 grid-template-columns:repeat(auto-fit,minmax(min(100%,128px),1fr));
}
.layout-v2 .player .set:not(.seal) .set-kamons {
 gap:5px;
 padding-inline:2px;
 height:calc(var(--mini-height) + 4px);
}
.layout-v2 .player .set:not(.seal) .set-kamons > :is(.set-kamon,.set-kamon-fallback) {
 width:min(var(--mini-width),calc((100% - 10px) / 3));
 width:round(down,min(var(--mini-width),calc((100% - 10px) / 3)),1px);
}
.layout-v2 .player .set:not(.seal) .set-kamons > :first-child { transform:rotate(-4deg); }
.layout-v2 .player .set:not(.seal) .set-kamons > :last-child { transform:rotate(4deg); }
.layout-v2 .player .set.seal .set-kamons { gap:0; }
.layout-v2 .player .set.seal .set-kamons > :is(.set-kamon,.set-kamon-fallback) + :is(.set-kamon,.set-kamon-fallback) {
 margin-left:-10px;
}
.layout-v2.inspector-open #cardInspector:has(.set-inspector-head) { width:min(320px,calc(100vw - 24px)); max-height:min(390px,calc(100dvh - 24px)); }
#cardInspector .set-inspector-head { cursor:grab; touch-action:none; user-select:none; }
#cardInspector .set-inspector-head:active { cursor:grabbing; }
#cardInspector .set-inspector-card { flex-basis:70px; }
#cardInspector .set-inspector-card-meta { min-height:0; }
#cardInspector .set-inspector-card-art { aspect-ratio:1; }
#cardInspector .set-inspector-card-art img { object-fit:contain; }
#cardInspector:has(.set-inspector-head) .card-inspector-effect { margin:.25rem 0; font-size:.7rem; line-height:1.2; }
.layout-v2 .player .set.set-group-start { position:relative; }
.layout-v2 .player .set.set-group-start::after {
 content:''; position:absolute; left:-5px; top:12%; bottom:12%; width:1px;
 background:#dfcf9d99; pointer-events:none;
}
/* Table centre: match identity on the left, three physical piles on the right. */
.layout-v2 #handPanel > .section-heading { flex-wrap:wrap; gap:8px; }
.layout-v2 #handPanel .section-heading-tools { min-width:0; max-width:100%; flex-wrap:wrap; }
.layout-v2 #handPanel .section-heading-tools > * { max-width:100%; }
.layout-v2 .center-mark {
 display:flex; flex-wrap:wrap; justify-content:flex-start; align-items:center;
 gap:16px; max-width:none; min-height:132px; padding:12px 18px;
 border:0; border-radius:0; background:none; box-shadow:none;
}
.table-match-info { display:flex; align-items:center; gap:12px; min-width:0; flex:0 1 170px; }
.table-match-copy { display:grid; gap:5px; min-width:0; }
.layout-v2 .center-mark .center-turn { display:inline-block; position:static; transform:none; justify-self:start; font-size:13px; padding:4px 7px; }
.layout-v2 .center-mark #centerMessage { display:block; font-size:13px; line-height:1.3; color:var(--ink); }
.layout-v2 .center-mark #centerDealer { font-size:11px; color:var(--muted); }
.layout-v2 .center-mark .center-emblem { display:grid; position:static; transform:none; flex:0 0 48px; width:48px; height:48px; }
.table-deck-rack { display:flex; align-items:flex-start; gap:22px; padding:0 8px; }
.table-pile { display:flex; flex-direction:column; align-items:center; gap:7px; }
.table-pile:last-child { margin-left:8px; }
.pile-label { color:var(--gold); font-size:11px; font-weight:700; letter-spacing:.06em; }
#inspectDiscardPile { padding:0 3px; line-height:inherit; white-space:nowrap; }
.layout-v2 .local-seat .player-identity > .player-stats {
 grid-area:auto; position:static; align-self:start;
 margin:8px 0 0; padding:0; flex-wrap:wrap; gap:8px;
}
.layout-v2 .local-seat .player-stats > [data-show-moves] {
 flex:none; margin:0; align-self:center;
}
.layout-v2 .local-seat .player-identity > .player-stats:has([data-show-moves]) {
 gap:4px; align-items:center;
}
.layout-v2 #actionPanel .turn-command-strip .action-button {
 font-size:var(--ui-min); line-height:1.25; height:auto;
 min-height:2.25em; white-space:normal; overflow-wrap:anywhere;
}
.layout-v2 .local-seat .player-identity > .player-head-actions {
 position:static; inset:auto; margin:3px 0 0; padding:0;
 display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-start; gap:7px;
}
.layout-v2 .local-seat .player-identity > .player-head-actions .banner { position:static!important; }
@media (min-width:1000px) {
 .layout-v2 .player.local-seat > .player-portrait { --portrait-scale:.30; }
 .layout-v2 .local-seat .player-identity > .player-head-actions .banner {
  position:absolute!important; inset:auto auto 1px 16px!important; z-index:3;
  max-width:145px; box-sizing:border-box; white-space:nowrap;
 }
 .layout-v2 .player.local-seat .hand-count { position:absolute; left:112px; top:102px; }
 .layout-v2 .player.local-seat .dishonor-portrait-mark { left:10px; top:88px; }
}
@media (min-width:1000px) and (min-height:800px) {
 .layout-v2 .player.local-seat > .player-portrait { --portrait-scale:.40; margin-top:-14px; }
 .layout-v2 main .player.local-seat:not(.human-player) > .player-portrait { margin-top:-20px; }
 .layout-v2 .player.local-seat .hand-count { left:140px; top:112px; }
 .layout-v2 .player.local-seat .dishonor-portrait-mark { top:105px; }
}

@media (min-width:1000px) and (max-width:1399px) {
 .layout-v2[data-text-size="extra-large"] main .player:not(.local-seat) .player-head {
  display:grid;
  grid-template-columns:minmax(0,1fr) max-content;
  align-content:start;
 }
 .layout-v2[data-text-size="extra-large"] main .player:not(.local-seat) .player-head-actions {
  grid-area:1/2;
  align-self:start;
 }
 .layout-v2[data-text-size="extra-large"] main .player:not(.local-seat) .banner-score-full { display:none; }
 .layout-v2[data-text-size="extra-large"] main .player:not(.local-seat) .banner-score-short { display:inline; }
 .layout-v2 main .player:not(.local-seat) .player-hand > .no-sets { display:none; }
 .layout-v2[data-text-size="extra-large"] #legalActions .action-button-head {
  flex-wrap:wrap;
  justify-content:flex-start;
  row-gap:4px;
 }
 .layout-v2[data-text-size="extra-large"] #legalActions .action-button-head > .action-title {
  flex:1 0 100%;
 }
}
@media (min-width:1000px) {
 .layout-v2 main .player.local-seat { grid-template-columns:155px clamp(200px,14.6vw,280px) minmax(0,1fr); grid-template-rows:minmax(0,1fr); grid-template-areas:'avatar head set-zone'; align-items:start; }
 .layout-v2 .player.local-seat .player-head { min-height:0; height:auto; align-self:start; }
 .layout-v2 main .player.local-seat:not(.human-player) > .player-portrait { align-self:start; }
 /* The single-row desktop grid has no named hand cell. Anchor the covered
    hand to the portrait instead of letting CSS Grid create an implicit cell. */
 .layout-v2 main .player.local-seat .player-hand {
  grid-area:auto; position:absolute; left:118px; bottom:2px;
  width:32px; height:20px; margin:0; padding:0; transform:none;
 }
 .layout-v2 main .player.local-seat .player-hand > .card {
  position:absolute; left:0; top:0; width:16px; height:20px;
  box-sizing:border-box; margin:0; padding:0;
 }
 .layout-v2 main .player.local-seat .player-hand > .card:nth-child(2) { left:8px; }
 .layout-v2 main .player.local-seat .player-hand > .card:nth-child(n+3) { left:16px; }
 .layout-v2 main .player.local-seat:not(.human-player) .hand-count {
  top:auto; left:154px; bottom:2px;
 }
 .layout-v2 main .player.local-seat:not(.human-player) .banner-score-full { display:none; }
 .layout-v2 main .player.local-seat:not(.human-player) .banner-score-short { display:inline; }
 /* The Set area must fit the fixed player row, not impose its min-content height. */
 .layout-v2 main .player.local-seat .set-zone {
  min-height:0; height:100%; max-height:100%; box-sizing:border-box;
  margin:0; padding:0; align-self:stretch; justify-content:flex-start;
 }
 .layout-v2 main .player.local-seat .sets {
  flex:0 0 auto; width:100%; min-height:0; margin:0;
  align-content:start; align-items:start; row-gap:4px;
 }
 .layout-v2 main .player.local-seat.sets-5 .set .set-kamons {
  --mini-width:32px; --mini-height:40px;
 }
 .layout-v2 main .player.local-seat.many-sets .set-meta strong { font-size:12px; line-height:14px; }
}
/* Reserve the second Set row before it is needed. */
@media (min-width:1000px) {
 body.layout-v2 main {
  grid-template-rows:clamp(240px,32vh,310px) 100px 160px minmax(0,1fr);
  height:calc(100dvh - 68px);
 }
 .layout-v2 main .player:not(.local-seat) { height:100%; min-height:0; max-height:100%; box-sizing:border-box; }
 .layout-v2 main .player:not(.local-seat) .set-zone { padding-top:16px; }
 .layout-v2 main .player.dense-sets:not(.local-seat) .set-zone { padding-top:4px; }
 .layout-v2 main .player:not(.local-seat) .player-hand { transform:translate(3px,0); height:25px; }
 .layout-v2 main .player:not(.local-seat) .player-hand > .card {
  flex-basis:18px; width:18px; height:25px; margin-right:-9px;
 }
 .layout-v2 main .player:not(.local-seat) .hand-count {
  grid-area:hand; position:static; align-self:center; justify-self:end; margin:0;
 }
 .layout-v2 .player:not(.local-seat) .sets { align-content:start; }
 .layout-v2 main .player.local-seat { height:160px; min-height:0; box-sizing:border-box; }
 .layout-v2 main #handPanel { align-self:stretch; height:100%; min-height:0; max-height:100%; overflow:hidden; box-sizing:border-box; }
 .layout-v2 main #handPanel .hand-content { min-height:0; }
 .layout-v2 main .center-mark { min-height:0; height:100px; box-sizing:border-box; }
}
@media (min-width:1400px) and (min-height:850px) {
 .layout-v2 main .player:not(.local-seat) {
  grid-template-columns:136px minmax(0,1fr);
  grid-template-rows:94px 34px minmax(0,1fr);
 }
 .layout-v2 main .player:not(.local-seat) > .player-portrait { --portrait-scale:.35; }
}
.layout-v2.inspector-open #cardInspector:has(.card-inspector-head) { width:min(320px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); }
#cardInspector .card-inspector-head { cursor:grab; touch-action:none; user-select:none; }
#cardInspector .card-inspector-head:active { cursor:grabbing; }
.layout-v2 #legalActions .turn-log-option { min-height:48px; padding:4px 6px; }
.layout-v2 #legalActions .turn-action-identity { position:relative; height:32px; gap:0; }
.layout-v2 #legalActions .turn-log-option .action-log-target { width:30px!important; height:30px!important; min-width:30px!important; max-width:30px!important; min-height:30px!important; max-height:30px!important; }
.layout-v2 #legalActions .turn-action-identity .move-number { position:absolute; left:-4px; top:-4px; z-index:2; width:16px; height:16px; font-size:10px; background:var(--panel); border-radius:50%; }
.layout-v2 #legalActions .turn-log-option { grid-template-columns:32px minmax(0,1fr) auto; }
.layout-v2 #legalActions .turn-action-summary { font-size:11px; line-height:1.15; }
@media (min-width:1000px) {
 .layout-v2 .table-deck-rack { margin-left:70px; }
 .layout-v2 .center-mark { min-height:100px; padding-block:4px; }
 .layout-v2 .player .player-head h3 { white-space:nowrap; overflow-wrap:normal; font-size:clamp(12px,1vw,16px); }
 .layout-v2 #handPanel > .section-heading { gap:4px; }
 .layout-v2 #handPanel .section-heading-tools { width:100%; display:flex; align-items:center; flex-wrap:nowrap; gap:5px; }
 .layout-v2 #handOrderControls { margin:0 0 0 auto; flex-wrap:nowrap; gap:3px; }
 .layout-v2 #handOrderControls button { width:24px; height:24px; padding:2px; }
 .layout-v2 #handPanel .turn-budget { font-size:11px; }
 .layout-v2 #humanHand { overflow:hidden; }
}
.player-stat[data-board-resource] { cursor:pointer; }
.player-stat[data-board-resource] svg { width:19px; height:19px; }
.local-seat .player-stat[data-board-resource] svg { width:25px; height:25px; }
.player-stat[data-loyalty-target] { outline:2px dashed #f4d47f; outline-offset:2px; }
[data-support-source], .set[data-support-target] { outline:2px dashed #83c9a2; outline-offset:2px; }
.set[data-support-target], .set[data-support-target] [data-card-name] { cursor:pointer; }
.layout-v2 .center-mark .discard-pile,
.layout-v2 .center-mark .table-deck-back {
 display:block; position:relative; left:auto; top:auto; transform:none;
 width:66px; height:88px; box-sizing:border-box; border:1px solid #b99c60;
 border-radius:7px; box-shadow:3px 3px 0 #29382c,4px 4px 0 #8a805d,6px 6px 12px #0006;
}
.layout-v2 .center-mark .discard-pile { background:rgba(13,27,21,.65); }
.layout-v2 .center-mark .discard-mini { width:54px; height:74px; transform:translate(-50%,-50%); }
.layout-v2 .center-mark .discard-mini:not(:last-child) { transform:translate(calc(-50% - 3px),calc(-50% - 2px)) rotate(-5deg); }
.layout-v2 .center-mark .discard-badge { right:-6px; bottom:-5px; font-size:12px; }
.layout-v2 .center-mark .table-deck-back {
 background:#25261e url('/assets/back-cards.png') center/100% 100% no-repeat;
 padding:68px 2px 0; color:#fff0bd; font-size:11px; font-weight:800;
 text-align:center; white-space:nowrap; text-shadow:0 1px 3px #000;
}
.layout-v2 .center-mark .table-deck-back::before { content:''; position:absolute; inset:65px 0 0; background:#151b17dd; border-radius:0 0 6px 6px; }
.layout-v2 .center-mark .table-deck-back { isolation:isolate; }
.layout-v2 .center-mark .table-deck-back::before { z-index:-1; }
.layout-v2 .center-mark .out-of-play { filter:saturate(.45); border-style:dashed; }
@media(max-width:700px) {
 .layout-v2 .center-mark { padding:10px; gap:12px; height:auto; }
 .table-deck-rack { gap:17px; margin-left:0; }
 .layout-v2 .center-mark .table-deck-back,.layout-v2 .center-mark .discard-pile { width:55px; height:76px; }
 .layout-v2 .center-mark .table-deck-back { padding-top:57px; font-size:10px; }
 .layout-v2 .center-mark .discard-mini { width:45px; height:64px; }
}
@media(max-width:999px) {
 .layout-v2 .game-table { grid-template-rows:minmax(240px,auto) auto auto auto; }
 .layout-v2 .center-mark { grid-area:2/1/3/-1; width:auto; min-width:0; height:auto; min-height:132px; align-self:stretch; }
 .layout-v2 main .banner-rail { grid-area:3/1/4/-1; justify-self:center; margin:8px 0; max-width:100%; }
 .layout-v2 .player.local-seat { grid-area:4/1/5/-1; }
}
@media(min-width:701px) and (max-width:999px) {
 .layout-v2 .player:not(.local-seat) { grid-template-columns:64px minmax(0,1fr); grid-template-rows:auto auto auto; }
 .layout-v2 .player:not(.local-seat) > .player-portrait { width:60px; height:60px; min-width:60px; }
 .layout-v2 .player:not(.local-seat) .player-head-actions { position:static; margin-top:5px; }
 .layout-v2 .player:not(.local-seat) .player-head h3 { overflow-wrap:anywhere; }
}
/* Keep the central strip from consuming the hand's vertical budget. */
@media(min-width:1000px) {
 .layout-v2 .center-mark { min-height:98px; padding:4px 12px; flex-wrap:nowrap; gap:12px; }
 .layout-v2 .table-match-info { flex:0 0 230px; }
 .layout-v2 .table-pile { gap:3px; }
 .layout-v2 .table-deck-rack { position:relative; inset-block-start:-4px; gap:18px; }
 .layout-v2 .table-match-copy { position:relative; inset-inline-start:-3px; }
 .layout-v2 .center-mark :is(.table-deck-back,.discard-pile) { width:52px; height:69px; }
 .layout-v2 .center-mark .table-deck-back { padding-top:50px; }
 .layout-v2 .center-mark .table-deck-back::before { inset:49px 0 0; }
 .layout-v2 .center-mark .discard-mini { width:43px; height:59px; }
 .layout-v2 main .banner-rail { padding-top:24px; min-height:0; margin-block:0; }
 .layout-v2 .banner-overview { display:flex; flex-wrap:wrap; justify-content:center; align-items:baseline; gap:3px 10px; }
 .layout-v2 .banner-overview strong { font-size:12px; }
 .layout-v2 .banner-overview small { font-size:11px; }
 .layout-v2 main .banner-sash { grid-template-rows:54px 14px; min-height:0; }
 .layout-v2 main .banner-sash .banner-sash-flag { width:42px; height:54px; }
}
@media(min-width:1000px) and (max-height:799px) {
 .layout-v2 .center-mark { min-height:84px; padding-block:2px; }
 .layout-v2 .center-mark :is(.table-deck-back,.discard-pile) { width:44px; height:57px; }
 .layout-v2 .center-mark .table-deck-back { padding-top:39px; font-size:10px; }
 .layout-v2 .center-mark .table-deck-back::before { inset:38px 0 0; }
 .layout-v2 .center-mark .discard-mini { width:36px; height:49px; }
 .layout-v2 main .banner-rail { padding-top:20px; }
 .layout-v2 main .banner-sash { grid-template-rows:44px 12px; }
 .layout-v2 main .banner-sash .banner-sash-flag { width:34px; height:44px; }
}

/* U9658: 7-9 Sets share the existing panel budget; never create a loose third row. */
@media (min-width:701px) {
 .layout-v2 main .player.dense-sets .sets {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr));
  grid-auto-rows:auto; gap:3px; width:100%; align-content:start;
 }
 .layout-v2 main .player.dense-sets .sets > .set {
  width:auto; min-width:0; max-width:none; min-height:0;
  grid-template-columns:12px minmax(0,1fr); padding:1px; gap:0;
 }
 .layout-v2 main .player.dense-sets .set-number {
  position:static; grid-column:1; grid-row:1; align-self:start;
  font-size:10px; line-height:12px; max-width:none;
 }
 .layout-v2 main .player.dense-sets .set-main { grid-column:2; min-width:0; gap:1px; }
 .layout-v2 main .player.dense-sets .set.seal { border-block-width:1px; }
 .layout-v2 main .player.dense-sets .set .set-kamons {
  --mini-width:21px; --mini-height:26px;
 }
 .layout-v2 main .player.dense-sets .set:not(.seal) .set-kamons {
  padding-inline:1px; gap:3px; height:calc(var(--mini-height) + 2px);
 }
 .layout-v2 main .player.dense-sets .set:not(.seal) .set-kamons > :is(.set-kamon,.set-kamon-fallback) {
  width:round(down,min(var(--mini-width),calc((100% - 8px) / 3)),1px);
 }
 .layout-v2 main .player.dense-sets .set .set-meta strong {
  min-height:15px; font-size:11px; line-height:15px; gap:2px; white-space:nowrap;
  align-items:center; overflow:visible;
 }
 .layout-v2 main .player.dense-sets .set-state { font-size:12px; line-height:15px; }
 .layout-v2 main .player.dense-sets .set-state::before { display:none; }
 .layout-v2 main .player.dense-sets .token-counter {
  min-height:0; min-width:0; padding:0 2px; border:0; line-height:12px;
 }
 .layout-v2 main .player.dense-sets .token-counter :is(.token-pip,em) { display:none; }
 .layout-v2 main .player.dense-sets .token-counter.zero { display:none; }
 .layout-v2 main .player.dense-sets .token-counter::before {
  content:'●' attr(data-count); font-size:10px; line-height:12px; color:#f0d486;
 }
 .layout-v2 main .player.dense-sets :is(.set-banner-earned,.set-banner-missing) {
  max-width:none; margin-left:0; padding:0 2px; font-size:10px; line-height:12px;
 }
 .layout-v2 main .player.dense-sets .set-attachment:empty { display:none; }
 .layout-v2 main .player.dense-sets .attached-special { width:12px; height:12px; }
 .layout-v2 main .player.dense-sets .attached-special img { width:10px; height:10px; }
 .layout-v2 main .player.dense-sets .maturity-gate-label { display:none; }
}
@container player-sets (min-width:420px) {
 .layout-v2 main .player.dense-sets:not(.sets-9) .sets { grid-template-columns:repeat(4,minmax(0,1fr)); }
 .layout-v2 main .player.dense-sets:not(.sets-9) .set .set-kamons { --mini-width:25px; --mini-height:34px; }
}

/* Yuzuri v0.9.6: canonical emblem and packaging art, no change to table geometry. */
.layout-v2 .brand > .brand-logo {
 width:36px; height:36px; flex:0 0 36px; object-fit:contain;
}
.layout-v2 .brand h1 { color:#f2e3c3; font-family:Georgia,serif; font-weight:700; letter-spacing:.08em; }
.layout-v2.pregame {
 background:#191a18 url('/assets/branding/yuzuri-landscape.png') center bottom / min(1600px,100vw) auto no-repeat;
}
.layout-v2 .setup-dialog > .end-recap-head {
 background:linear-gradient(100deg,#191a18f5,#191a18d9),url('/assets/branding/yuzuri-landscape.png') center 52% / cover;
 border-bottom-color:#a52a30;
}

.layout-v2 .setup-brand { display:flex; align-items:center; gap:8px; margin-bottom:6px; color:#f2e3c3; font:700 22px/1 Georgia,serif; letter-spacing:.06em; }
.layout-v2 .setup-brand img { width:32px; height:32px; object-fit:contain; }
.layout-v2 .setup-brand small { display:inline-block; font:12px Georgia,serif; letter-spacing:normal; }

/* Packaging accents stay behind menu content, never above controls or cards. */
body.layout-v2 {
 --ink:#f2e3c3; --muted:#c4bba6; --panel:#20231f;
 --yuzuri-red:#aa2931; --yuzuri-sage:#7d9074;
 background:radial-gradient(ellipse at 50% 36%,#36423466,transparent 60%),#191d19;
}
.layout-v2 .topbar {
 background-color:#191a18;
 background-image:linear-gradient(90deg,#191a18f2,#191a18d9),url('/assets/branding/yuzuri-flowers-seamless.png?v=U9671');
 background-repeat:no-repeat,repeat-x;
 background-position:center,left bottom;
 background-size:100% 100%,auto 64px;
 border-bottom-color:#c9b48b66;
}
.layout-v2 .brand > .brand-logo { width:36px; height:36px; object-fit:contain; }
.layout-v2 .setup-dialog,
.layout-v2 .game-settings,
.layout-v2 #tableTools {
 background-color:#20231f;
 background-image:linear-gradient(#20231fe8,#20231fe8),url('/assets/branding/yuzuri-flowers-seamless.png?v=U9671');
 background-repeat:no-repeat,repeat-x;
 background-position:center,bottom left;
 background-size:100% 100%,auto 140px;
 border-color:#c9b48b88;
}
.layout-v2 .setup-dialog > .end-recap-head { border-bottom-color:var(--yuzuri-red); }
.layout-v2 .setup-dialog button.primary,
.layout-v2 .setup-open { background:#8d252c; border-color:#be5960; color:#fff0d6; }
.layout-v2.pregame {
 background-color:#191a18;
 background-image:url('/assets/branding/yuzuri-flowers-seamless.png?v=U9671'),url('/assets/branding/yuzuri-landscape.png');
 background-position:left bottom,center bottom;
 background-size:auto clamp(180px,25vh,280px),min(1600px,100vw) auto;
 background-repeat:repeat-x,no-repeat;
}

/* U9666: quiet packaging artwork on the playing interface, behind all controls. */
.layout-v2 #actionPanel {
 background-color:#20231f;
 background-image:linear-gradient(#20231ff5,#20231feb),url('/assets/branding/yuzuri-flowers-seamless.png?v=U9671');
 background-repeat:no-repeat,repeat-x;
 background-position:center,left bottom;
 background-size:100% 100%,auto 160px;
 border-color:#c9b48b55;
}

/* U9667: one visual guild frame for identity and hand; grid/anchors stay separate. */
.layout-v2 .player .banner, .layout-v2 .player .set-meta strong { font-weight:900; }

body[data-text-size="extra-large"] #endRecap :is(
 .end-recap-outcome,.end-recap-why,.end-recap-player,.end-recap-houses,
 .end-recap-human-progress,.end-recap-unlocks,footer
) { font-size:var(--ui-min); line-height:1.35; overflow-wrap:anywhere; }
body[data-text-size="extra-large"] #endRecap :is(
 p,small,summary,table,.eyebrow,.recap-affiliation,.recap-human-label,
 .end-recap-outcome strong,.end-recap-outcome span,.end-recap-identity > strong,
 .end-recap-score span,.end-recap-breakdown span,.end-recap-houses li strong,
 .human-progress-card b
) { font-size:var(--ui-min); line-height:1.3; }
body[data-text-size="extra-large"] #endRecap :is(.end-recap-score span,.end-recap-houses li strong) {
 white-space:normal;
}
body[data-text-size="extra-large"] #endRecap .end-recap-identity > strong { flex-wrap:wrap; }
body[data-text-size="extra-large"] #endRecap .end-recap-score { max-width:10ch; }
.layout-v2 .player .dishonor-portrait-mark { font-size:16px; transform:translate(-2px,-9px); }
.layout-v2 .player .dishonor-portrait-mark b { font-size:12px; }
.layout-v2 #handPanel > .section-heading > div:first-child { display:none; }
.layout-v2 #handPanel { display:flex; flex-direction:column; }
.layout-v2 #handPanel > .hand-content { flex:1; min-height:0; order:1; }
.layout-v2 #handPanel > .section-heading { order:0; margin:0; flex:0 0 auto; justify-content:flex-end; }
.layout-v2 #humanHand { padding:9px 8px 12px; box-sizing:border-box; }
.layout-v2 #humanHand > .card { transform-origin:50% 90%; transition:transform .2s ease; }
.layout-v2 #humanHand:not(.hand-resting) > .card { transform:rotate(var(--fan-angle,0deg)); }
.layout-v2 #humanHand.hand-resting > .card { transform:none; }
@media (min-width:1000px) {
 .layout-v2 main .player:not(.local-seat):is(.sets-4,.sets-5,.sets-6) .set-zone { padding-top:0; }
 .layout-v2 main .player:is(.sets-4,.sets-5,.sets-6) .sets {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:3px;
 }
 .layout-v2 main .player:is(.sets-4,.sets-5,.sets-6) .set .set-kamons { --mini-width:28px; --mini-height:35px; }
 .layout-v2 main .player:not(.local-seat):is(.sets-4,.sets-5,.sets-6) .set { padding-block:1px; }
 .layout-v2 main .player:not(.local-seat) .player-hand { height:30px; overflow:visible; }
 .layout-v2 main .player:not(.local-seat) .player-hand > .card {
  width:21px; height:30px; min-height:0; min-width:0; flex:0 0 21px;
  margin-right:-12px; transform:none; transform-origin:50% 95%;
  transition:transform .2s ease, margin .2s ease;
 }
 .layout-v2 main .player:not(.local-seat).active .player-hand > .card {
  margin-right:-7px; transform:rotate(var(--fan-angle,0deg));
 }
}
.layout-v2 .player-hand .card.hidden-card {
 background:#25261e url('/assets/back-cards.png') center/100% 100% no-repeat;
 padding:0;
}
.layout-v2 .player-hand .card.hidden-card > * { visibility:hidden; }
.layout-v2 .token-supply { display:grid; grid-template-columns:48px auto; align-items:center; width:max-content; gap:0 4px; margin-top:2px; color:#f4d47f; }
.layout-v2 .token-supply svg { grid-row:1 / 3; width:48px; height:48px; }
.layout-v2 .token-supply b { font-size:16px; line-height:18px; }
.layout-v2 .token-supply small { font-size:10px; line-height:12px; }
@media(min-width:1000px) {
 .layout-v2.joined-player-hand main .player.local-seat { border-bottom:0; border-radius:12px 12px 0 0; box-shadow:none; }
 .layout-v2.joined-player-hand main #handPanel { margin-top:-14px; height:calc(100% + 14px); max-height:calc(100% + 14px); border:1px solid var(--player-color); border-top:0; border-radius:0 0 12px 12px; background:linear-gradient(130deg,rgba(var(--player-color-rgb),.10),#20231f); padding-top:4px; }
 .layout-v2.joined-player-hand main .player.local-seat .dishonor-portrait-mark { top:70px; }
 .layout-v2 .table-match-info { align-self:flex-start; }
 .layout-v2 .table-match-copy { position:relative; padding-top:0; }
}
@media(min-width:1000px) and (min-height:800px) {
 .layout-v2.joined-player-hand main .player.local-seat .dishonor-portrait-mark { top:86px; }
}
@media(prefers-reduced-motion:reduce) { .layout-v2 #humanHand > .card { transition:none; } }

.layout-v2 .token-supply { position:relative; display:block; width:48px; height:48px; }
.layout-v2 .token-supply b { position:absolute; left:50%; top:28px; transform:translateX(-50%); color:#fff0bf; font-size:14px; text-shadow:0 1px 2px #211508; }
.layout-v2 .token-supply small { display:none; }
.layout-v2 .player.local-seat .dishonor-portrait-mark { position:absolute; left:12px; }
@media(min-width:1000px) and (max-height:799px) {
 .layout-v2.joined-player-hand main #handPanel { margin-top:-6px; height:calc(100% + 6px); max-height:calc(100% + 6px); }
}

/* U9898: keep the active seat stable when the text scale or viewport changes.
   The portrait brush stays inside the portrait box; identity copy cannot create
   an implicit grid row and push the hand/sets outside the player area. */
.layout-v2 .player { min-width:0; overflow:hidden; }
.layout-v2 .player-head,
.layout-v2 .player-identity,
.layout-v2 .player-head h3,
.layout-v2 .player-head p { min-width:0; }
.layout-v2 .player-head h3 { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.layout-v2 .player-head p { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.layout-v2 .set-zone,
.layout-v2 .set-zone > .sets { min-width:0; max-width:100%; }
.layout-v2 .set-zone > .no-sets,
.layout-v2 .set-zone .sets > .no-sets {
 display:block; width:100%; max-width:100%; min-width:0;
 white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.layout-v2 .player.active::after {
 border-width:6px; border-radius:inherit;
}
.layout-v2 .player.active > .player-portrait::after { inset:-7px; }
@media (min-width:701px) and (max-width:999px) {
 .layout-v2 .player.local-seat { min-width:0; overflow:hidden; }
 .layout-v2 .player.local-seat .player-head,
 .layout-v2 .player.local-seat .player-identity { min-width:0; }
 .layout-v2 .player.local-seat .player-head h3 { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
 .layout-v2 .player.local-seat .set-zone { min-width:0; max-width:100%; overflow:hidden; }
}

/* U9668: durable front door and resource feedback independent of motion speed. */
.layout-v2 #tokenSupply { flex:0 0 48px; z-index:6; isolation:isolate; }
.layout-v2 .table-match-info #centerMessage { white-space:normal; overflow-wrap:anywhere; }
.layout-v2 .table-match-copy { z-index:4; }
.layout-v2 .center-mark .center-emblem { z-index:1; }
.named-card-flight:is(.motion-token,.motion-token-stolen) { z-index:10004; }
.landing-active > .topbar { visibility:hidden; }
.landing-active main { visibility:hidden; }
.landing-page.hidden { display:none; }
.landing-page {
 position:fixed; inset:0; z-index:170; display:grid; grid-template-columns:minmax(190px,260px) minmax(320px,1fr) minmax(190px,260px);
 align-items:start; gap:clamp(20px,4vw,80px); padding:clamp(30px,8vh,90px) clamp(20px,5vw,100px) 60px;
 color:#f2e3c3; background-color:#191a18;
 background-image:linear-gradient(#191a183d,#191a183d),url('/assets/branding/yuzuri-landscape.png');
 background-position:center,center bottom; background-size:100% 100%,100vw auto; background-repeat:no-repeat;
 overflow:auto;
}
.landing-hero { text-align:center; display:flex; flex-direction:column; align-items:center; gap:12px; min-width:0; }
body:is([data-text-size="large"],[data-text-size="extra-large"]) :is(
 .landing-hero button,.landing-hero a,.landing-hero select,.landing-hero label,
 .landing-board li,.landing-board li small,.landing-board > small,
 .landing-board p,.landing-page footer,.game-settings label,.game-settings select,
 .game-settings button,.game-settings p,#setupDialog label,#setupDialog select,
 #setupDialog button,#setupDialog p,#xpBoard small
) { font-size:var(--ui-min); line-height:1.35; }
body:is([data-text-size="large"],[data-text-size="extra-large"]) .landing-board {
 min-width:0; overflow-wrap:anywhere;
}
body:is([data-text-size="large"],[data-text-size="extra-large"]) .landing-person-detail { flex-wrap:wrap; }
body:is([data-text-size="large"],[data-text-size="extra-large"]) .landing-board .end-recap-houses li small {
 white-space:normal!important; font-size:var(--ui-min)!important;
}
.landing-logo { width:round(nearest,clamp(117px,15.6vh,182px),2px); height:round(nearest,clamp(117px,15.6vh,182px),2px); object-fit:contain; }
.landing-hero h1 { margin:0; font:700 clamp(60px,7vw,108px)/1 Georgia,serif; letter-spacing:.035em; }
.landing-subtitle { margin:0; padding:10px 36px 0; border-top:2px solid #ad2932; font:700 clamp(24px,2.7vw,40px)/1.15 Georgia,serif; }
.landing-motto { max-width:580px; margin:6px 0 10px; font-size:clamp(12px,1.1vw,17px); text-transform:uppercase; letter-spacing:.035em; }
.landing-language { display:flex; gap:6px; }
.landing-language [aria-pressed=true] { border-color:#f2e3c3; background:#4b5946; }
.landing-tutorial { font-size:14px; }
.landing-hero #landingStart { min-width:200px; background:#8d252c; border-color:#c15b63; font-size:20px; padding:12px 24px; }
.landing-hero #landingStart small { font-size:12px; margin-left:8px; }
.landing-links { display:flex; gap:8px; }
.landing-effects { display:flex; justify-content:center; flex-wrap:wrap; gap:6px; max-width:100%; }
.landing-effects :is(select,button) {
  min-height:34px; padding:.35rem .55rem; color:#f3e4c5;
  background:#171914; border:1px solid #b9995d80; border-radius:6px;
}
.landing-board { margin-top:65px; padding:20px; border:1px solid #c9b48b70; border-radius:12px; background:#191a18dc; box-shadow:0 8px 30px #0004; }
.landing-board h2 { margin:0 0 16px; font:700 20px Georgia,serif; }
.landing-board ul,.landing-board ol { list-style:none; margin:0; padding:0; display:grid; gap:14px; }
.landing-board li { display:flex; justify-content:space-between; align-items:baseline; gap:12px; font-size:14px; }
.landing-board li span { min-width:0; }
.landing-board li b { white-space:nowrap; }
.landing-board > small { display:block; margin-top:16px; color:#c4bba6; font-size:11px; }
.landing-page footer { position:absolute; bottom:0; left:0; right:0; display:flex; justify-content:space-between; gap:12px; padding:12px 24px; background:#191a18db; font-size:11px; }
@media(max-width:1000px) {
 .landing-page { grid-template-columns:1fr; padding:24px 16px 60px; }
 .landing-board { display:none; }
 .landing-hero { gap:10px; }
 .landing-logo { width:112px; height:112px; }
 .landing-hero h1 { font-size:clamp(56px,14vw,90px); }
 .landing-page footer { flex-wrap:wrap; justify-content:center; padding:10px; }
}

.landing-active { overflow:hidden; }
@media(max-width:1000px) {
 .landing-page { background-size:100% 100%,auto clamp(280px,43vh,420px); }
}

/* U9669: portraits and house standards use the game's existing roster/colours. */
.landing-language { flex-wrap:wrap; justify-content:center; }
.landing-clan-label { display:inline-flex; align-items:center; gap:10px; }
.landing-clan-flag { display:inline-flex; flex:0 0 auto; width:25px; height:33px; color:var(--guild-color,#d8c79e); }
.landing-clan-flag svg { width:100%; height:100%; filter:drop-shadow(1px 2px 2px #0007); }
.end-recap-houses .guild-identity .landing-clan-flag { display:inline-flex; align-items:center; width:20px; height:27px; flex:0 0 20px; color:var(--guild-color,#d8c79e); }
#xpBoard .end-recap-houses li,.landing-board .end-recap-houses li { grid-template-columns:minmax(0,1fr) auto; gap:2px 6px; }
#xpBoard .end-recap-houses li > span,.landing-board .end-recap-houses li > span { display:contents; }
#xpBoard .end-recap-houses li > span > b,.landing-board .end-recap-houses li > span > b { grid-column:2; grid-row:1; align-self:center; text-align:right; white-space:nowrap; }
#xpBoard .end-recap-houses li > span > small,.landing-board .end-recap-houses li > span > small { grid-column:1 / -1; text-align:right; }
.end-recap-houses .guild-identity { flex-wrap:nowrap; min-width:0; gap:5px; }
.end-recap-houses .guild-identity strong { white-space:nowrap; }

.layout-v2 main .player .set .token-counter .token-pip.recent-token {
 display:inline-block; flex:none; min-width:6px; min-height:6px;
 outline:1px solid #fff4b0; box-shadow:0 0 5px 1px #efbb55;
}
.landing-board li.landing-person { display:grid; grid-template-columns:54px minmax(0,1fr); align-items:center; gap:10px; }
.landing-board .landing-portrait { grid-area:auto; grid-column:1; grid-row:1; position:static; transform:none; align-self:center; justify-self:start; display:block; width:54px; height:54px; min-width:54px; max-width:54px; min-height:54px; max-height:54px; margin:0; border:2px solid var(--guild-color,#d8c79e); border-radius:50%; background-color:#c9b48b; }
.landing-person > div { grid-column:2; grid-row:1; min-width:0; }
.landing-person strong { font-size:13px; line-height:1.25; }
.landing-person-detail { display:flex; align-items:center; justify-content:space-between; gap:6px; margin-top:4px; font-size:11px; }
.landing-person-detail > span { display:inline-flex; align-items:center; gap:4px; }
.landing-person-detail .landing-clan-flag { width:14px; height:18px; }

.landing-board li.landing-clan-row { align-items:center; }

.layout-v2 #handPanel .turn-budget { margin-inline-end:auto; white-space:normal; }
.layout-v2 #handPanel .turn-budget:empty { display:none; }
.layout-v2 #handPanel .section-heading-tools {
  width:auto; flex-wrap:wrap; justify-content:flex-end; margin-inline-start:auto;
}
.attached-special { cursor: pointer; }
.layout-v2 :is(.action-detail, .turn-action-summary) .action-sigil-label {
  width: 26px;
  height: 17px;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  vertical-align: -4px;
}
.set.special-protected .attached-special {
  --protection-badge-size: 28px;
  box-sizing: border-box;
  flex: none;
  width: var(--protection-badge-size);
  height: var(--protection-badge-size);
  border: 2px solid var(--gold);
  background: #000;
  overflow: hidden;
}
.set.special-protected .attached-special img {
  display: block;
  width: calc(var(--protection-badge-size) - 4px);
  height: calc(var(--protection-badge-size) - 4px);
}
.layout-v2 .set.special-protected .attached-special { --protection-badge-size: 24px; }
@media (max-width: 700px) {
  .layout-v2 .set.special-protected .attached-special { --protection-badge-size: 20px; }
}
.layout-v2 main .player.dense-sets .set.special-protected .attached-special {
  --protection-badge-size: 16px;
  width: var(--protection-badge-size);
  height: var(--protection-badge-size);
}
.layout-v2 main .player.dense-sets .set.special-protected .attached-special img {
  width: calc(var(--protection-badge-size) - 4px);
  height: calc(var(--protection-badge-size) - 4px);
}
#actionCount.match-action-count-redundant { display: none; }
/* Shared public inventory inside the removed-card drawer. */
.special-public-summary { grid-column:1/-1; width:100%; overflow-x:auto; font-size:12px; }
.special-public-summary table { width:100%; border-collapse:collapse; margin:6px 0; }
.special-public-summary th, .special-public-summary td { padding:4px 6px; text-align:left; border-bottom:1px solid var(--line); }
.special-public-summary p { font-size:11px; color:var(--muted); }

/* Local identity, resources and score have independent grid cells. */
@media (max-width:999px) {
 .layout-v2 .player.local-seat > .player-head-actions { position:static; grid-column:1/-1; justify-content:flex-start; margin:4px 0; }
 .layout-v2 .player.local-seat > .player-head-actions .banner { position:static!important; }
}
@media (min-width:701px) {
 .layout-v2 main .player.local-seat {
  grid-template-columns:155px clamp(200px,14.6vw,280px) minmax(0,1fr);
  grid-template-rows:max-content max-content minmax(max-content,1fr);
  grid-template-areas:'avatar head set-zone' 'avatar stats set-zone' 'avatar score set-zone';
  gap:5px 12px; overflow:visible; align-content:start;
 }
 .layout-v2 main .player.local-seat > .player-stats {
  position:static; grid-area:stats; margin:0; padding:0; gap:4px;
  align-self:end; flex-wrap:wrap;
 }
 .layout-v2 main .player.human-player.local-seat > .player-portrait {
  align-self:start;
  margin-block-start:12px;
 }
 .layout-v2 main .player.local-seat > .player-head-actions {
  position:static; grid-area:score; margin:0; padding:0;
  justify-content:flex-start; align-items:center; align-self:start; gap:5px;
 }
 .layout-v2 main .player.local-seat > .player-head-actions .banner {
  position:static!important; inset:auto!important; max-width:none;
 }
 .layout-v2 main .player.local-seat .player-head { display:block; padding:0; }
 .layout-v2 main .player.local-seat .player-head p { line-height:1.3; }
 .layout-v2 main .player.local-seat .player-head h3 { display:flex; flex-wrap:nowrap; white-space:nowrap; gap:4px; overflow:hidden; }
 .layout-v2 main .player.local-seat .player-head .player-name { min-width:0; overflow:hidden; text-overflow:ellipsis; }
 .layout-v2 main .player.local-seat .player-head p { white-space:nowrap; overflow-wrap:normal; overflow:hidden; text-overflow:ellipsis; }
 .layout-v2 main .player.local-seat > .hand-count { position:absolute; inset:auto auto 8px 152px; width:max-content; height:auto; }
 .layout-v2 main .player.local-seat > .player-head-actions { min-height:22px; }
 .layout-v2 main .player.local-seat .player-identity .turn-status { margin-top:5px; }
 .layout-v2.joined-player-hand main #handPanel { margin-top:0; height:100%; max-height:100%; }
}
@media (min-width:1000px) {
 body.layout-v2.joined-player-hand:not(.landing-active) {
  display:flex; flex-direction:column; height:100dvh; min-height:0;
 }
 body.layout-v2.joined-player-hand:not(.landing-active) > .topbar { flex:none; }
 body.layout-v2.joined-player-hand:not(.landing-active) > #tableViewport {
  flex:1; min-height:0; display:flow-root;
 }
 body.layout-v2.joined-player-hand:not(.landing-active) #tableViewport > main {
  --table-vertical-margin:8px;
  --center-strip-height:94px;
  height:calc(100% - 2 * var(--table-vertical-margin));
  margin-block:var(--table-vertical-margin);
  grid-template-rows:clamp(240px,32vh,310px) var(--center-strip-height) minmax(160px,max-content) minmax(0,1fr);
 }
 .layout-v2.joined-player-hand main .center-mark {
  height:var(--center-strip-height,94px);
  min-height:0; padding-block:0;
 }
 .layout-v2 .center-mark .table-match-info {
  flex:0 0 clamp(280px,18vw,310px);
  align-self:stretch; gap:8px;
 }
 .layout-v2 .center-mark .table-match-copy { align-content:center; align-self:stretch; }
 .layout-v2 .center-mark .table-deck-rack { flex:none; margin-inline-start:0; gap:14px; padding-inline:0; }
 .layout-v2 .center-mark .table-match-info #centerMessage {
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
 }
 .layout-v2 main .player.local-seat {
  height:auto; min-height:160px; align-self:stretch;
 }
 .layout-v2 main .player.local-seat .set-zone { height:auto; max-height:none; }
 .layout-v2 main .player.human-player.local-seat > .player-portrait {
  --portrait-scale:.34;
  justify-self:start;
  margin-block-start:4px;
 }
}
@media (min-width:1000px) and (min-height:800px) {
 .layout-v2 main .player.human-player.local-seat > .player-portrait {
  --portrait-scale:.43;
  margin-block-start:-19px;
  margin-inline-start:-2px;
 }
}
@media (min-width:1000px) and (max-height:799px) {
 body.layout-v2.joined-player-hand:not(.landing-active) #tableViewport > main { --center-strip-height:84px; }
}
@media (min-width:701px) and (max-width:999px) {
 .layout-v2 main .player.local-seat { height:auto; min-height:165px; max-height:none; }
}
@media (max-width:700px) {
 .layout-v2 main .player.local-seat {
  grid-template-rows:auto auto auto auto;
  grid-template-areas:'avatar head' 'stats stats' 'score score' 'set-zone set-zone';
  row-gap:8px; overflow:visible;
 }
 .layout-v2 main .player.human-player.local-seat > .player-portrait { align-self:start; margin-block-start:12px; }
 .layout-v2 main .player.local-seat.active > .player-portrait::after { inset:-6px; }
 .layout-v2 main .player.local-seat > .player-stats { grid-area:stats; position:static; margin:0; padding:0; }
 .layout-v2 main .player.local-seat > .player-head-actions { grid-area:score; }
 .layout-v2 main .player.local-seat .player-head { display:block; height:auto; min-height:0; }
}
.layout-v2 .player.active > .player-portrait::after {
 inset:-16px; aspect-ratio:1;
 mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120' fill='none' stroke='black' stroke-linecap='round'%3E%3Cpath stroke-width='8' d='M94 23C76 7 48 7 28 22 9 37 6 64 18 85 31 106 59 113 81 102 103 92 113 67 105 44 102 36 98 29 92 24'/%3E%3Cpath stroke-width='2' d='M85 17C62 5 35 15 20 36M22 92C41 112 72 113 94 92M108 60C110 80 97 100 80 107'/%3E%3C/svg%3E") center/contain no-repeat;
}
.layout-v2 .player.local-seat > .player-head-actions { flex-wrap:nowrap; white-space:nowrap; }
.layout-v2 .player.local-seat .turn-log-button { flex:0 0 auto; white-space:nowrap; width:max-content; }
.layout-v2 main .player.local-seat > .player-head-actions > .hand-count {
 position:static; flex:none; align-self:center; margin:0; width:max-content;
}
.layout-v2 main .player.local-seat > .player-head-actions:has(.hand-count) .banner-score-full { display:none; }
.layout-v2 main .player.local-seat > .player-head-actions:has(.hand-count) .banner-score-short { display:inline; }
.layout-v2 main .player.local-seat .sets:has(> .no-sets):not(:has(> .new-set-preview)) {
 grid-template-columns:minmax(0,1fr);
 width:100%;
}
.layout-v2 #handPanel .turn-budget {
 flex:0 0 auto; max-width:100%; white-space:nowrap; overflow-wrap:normal; line-height:1.3;
 overflow-x:auto;
}
.layout-v2 #handPanel .section-heading-tools {
 max-width:100%; min-width:0;
}
/* Keep the stacked table scrollable on mobile without a page scrollbar. */
html:has(> body.layout-v2.joined-player-hand:not(.landing-active)) { scrollbar-width:none; }

/* The three lanes share the table's middle row. Each has its own width budget. */
.layout-v2 .table-center-strip {
 grid-area:2/1/4/-1;
 display:grid;
 grid-template-columns:minmax(0,1fr);
 min-width:0;
 gap:6px;
}
.layout-v2 .table-center-strip { position:relative; top:-3px; }
.layout-v2 .table-center-strip > :is(.center-mark,.table-message-zone,#bannerRail) {
 grid-area:auto;
 position:relative;
 inset:auto;
 transform:none;
 width:auto;
 min-width:0;
 max-width:none;
 margin:0;
 justify-self:stretch;
}
.layout-v2 .table-center-strip .center-mark { display:flex; }
.layout-v2 .table-message-zone { min-height:34px; }
.layout-v2 .table-center-strip #bannerRail { justify-content:center; padding-inline:4px; }
#bannerRail .banner-sash {
 flex:0 1 64px;
 width:auto;
 min-width:0;
}
#bannerRail .banner-sash .banner-sash-flag { max-width:100%; margin-inline:auto; }
#bannerRail .banner-sash-owner { min-width:0; max-width:100%; overflow:hidden; text-overflow:ellipsis; }
#bannerRail .banner-sequence-arrow { flex-basis:clamp(5px,.6vw,12px); min-width:0; }
body.layout-bounds .table-center-strip { outline:1px dashed #ff8adc; outline-offset:-1px; }
body.layout-bounds .table-message-zone { outline:1px dashed #66efff; outline-offset:-1px; }

@media (min-width:1000px) {
 .layout-v2 .table-center-strip {
  grid-area:2/1/3/-1;
  grid-template-columns:repeat(3,minmax(0,1fr));
  align-self:stretch;
  gap:0;
 }
 .layout-v2 .table-center-strip > :is(.center-mark,.table-message-zone,#bannerRail) { align-self:stretch; }
 .layout-v2 .table-center-strip .center-mark { height:auto; }
 .layout-v2 .table-center-strip > :is(.table-message-zone,#bannerRail) { border-inline-start:1px solid #d8c79e26; }
 .layout-v2 .table-center-strip #bannerRail { padding-top:25px; gap:3px; }
 .layout-v2 .table-center-strip .banner-overview { inset-inline:5px; gap:0 8px; }
 .layout-v2 .table-center-strip .banner-overview small { font-size:10px; }
}
@media (min-width:1500px) and (min-height:800px) {
 .layout-v2 .table-center-strip #bannerRail { padding-top:17px; }
 .layout-v2 .table-center-strip #bannerRail .banner-sash { grid-template-rows:60px 14px; }
 .layout-v2 .table-center-strip #bannerRail .banner-sash-flag { width:48px; height:60px; }
}
@media (min-width:1000px) and (max-width:1599px) {
 .layout-v2 .table-center-strip .center-mark {
  display:grid;
  grid-template-columns:34px 36px minmax(0,1fr);
  grid-template-rows:25px minmax(0,1fr);
  gap:2px 8px;
  padding:0 10px;
 }
 .layout-v2 .table-center-strip .table-match-info { display:contents; }
 .layout-v2 .table-center-strip .table-match-copy {
  grid-area:1/1/2/-1;
  display:flex;
  align-items:center;
  gap:7px;
 }
 .layout-v2 .table-center-strip .center-mark .center-turn { flex:none; padding:2px 5px; line-height:1.15; }
 .layout-v2 .table-center-strip .center-emblem {
  grid-area:2/1;
  width:34px; height:34px;
  align-self:center;
 }
 .layout-v2 .table-center-strip #tokenSupply {
  grid-area:2/2;
  width:36px; height:36px;
  margin:0; align-self:center;
 }
 .layout-v2 .table-center-strip #tokenSupply svg { width:100%; height:100%; }
 .layout-v2 .table-center-strip #tokenSupply b { top:21px; font-size:11px; }
 .layout-v2 .table-center-strip .table-deck-rack { grid-area:2/3; gap:10px; align-self:center; }
 .layout-v2 .table-center-strip .table-pile { gap:1px; margin:0; }
 .layout-v2 .table-center-strip .pile-label { font-size:10px; line-height:12px; }
 .layout-v2 .table-center-strip :is(.table-deck-back,.discard-pile) { width:35px; height:35px; }
 .layout-v2 .table-center-strip .table-deck-back { padding-top:23px; font-size:9px; }
 .layout-v2 .table-center-strip .table-deck-back::before { inset:22px 0 0; }
 .layout-v2 .table-center-strip .discard-mini { width:26px; height:32px; }
}
@media (min-width:1000px) and (max-height:799px) {
 .layout-v2 .table-center-strip #bannerRail { padding-top:19px; }
}

.layout-v2 .player.human-player.local-seat > .turn-sequence {
 position:absolute;
 inset:8px auto auto 8px;
 z-index:8;
 margin:0;
}
.layout-v2 .player.human-player.local-seat .player-identity {
 display:grid;
 grid-template-columns:minmax(0,1fr);
 align-content:start;
 gap:4px;
}
.layout-v2 main .player.human-player.local-seat .player-head h3 {
 display:flex;
 align-items:center;
 min-height:24px;
 overflow:visible;
}
.layout-v2 .player.human-player.local-seat .player-head h3 > .player-name {
 min-width:0;
 overflow:hidden;
 text-overflow:ellipsis;
}
.layout-v2[data-table-layout="desktop"] main .player.human-player.local-seat .player-head h3 {
 flex-wrap:wrap;
}
.layout-v2[data-table-layout="desktop"] main .player.human-player.local-seat .player-head h3 > .player-name {
 flex:0 0 auto;
 max-width:100%;
 white-space:normal;
 overflow-wrap:anywhere;
}
.layout-v2 .player.human-player.local-seat .player-identity .turn-status { margin:0; }
.layout-v2 .player.human-player.local-seat .player-head :is(.leader-mark,.runner-up-mark,.winner-mark) {
 width:24px;
 height:24px;
 line-height:1;
}
body.layout-bounds .player.human-player .player-identity > :is(h3,p,.turn-status) {
 outline:1px dashed #ffcf70;
 outline-offset:-1px;
}
@media (min-width:701px) {
 .layout-v2 main .player:not(.local-seat) > .player-portrait { align-self:start; }
}
@media (min-width:1000px) {
 .layout-v2 main .player.human-player.local-seat > .player-portrait {
  --portrait-scale:.36;
  margin-inline-start:-5px;
  margin-block-start:0;
 }
 .layout-v2 main .player.human-player.local-seat > .turn-sequence { inset:3px auto auto 3px; }
 .layout-v2 #actionPanel { padding-inline:8px; }
 .layout-v2 #actionPanel #legalActions { padding-inline:4px; column-gap:6px; }
 .layout-v2 #legalActions .action-title strong {
  white-space:normal;
  overflow:visible;
  overflow-wrap:break-word;
 }
}
@media (min-width:1000px) and (min-height:800px) {
 .layout-v2 main .player.human-player.local-seat > .player-portrait {
  --portrait-scale:.45;
  margin-inline-start:-7px;
  margin-block-start:-21px;
 }
}

/* Tablet landscape: compact cards keep the entire hand in the table pane. */
.tablet-player-details { display:none; }
.tablet-action-row { display:contents; }
.tablet-action-info { display:none; }
@media (any-hover:hover) {
 .tablet-player-details:not([open]):has(summary:hover) { z-index:20; }
 .tablet-player-details:not([open]):has(summary:hover)::details-content { content-visibility:visible; }
}
@media (orientation:landscape) and (pointer:coarse) and (min-width:701px) and (max-width:1400px) {
 .layout-v2 main #humanHand,
 .layout-v2 main #humanHand.hand-crowded { min-width:0; gap:5px; padding:8px 6px 10px; }
 .layout-v2 main #humanHand > .card,
 .layout-v2 main #humanHand > .card:not(.has-card-labels):has(.card-sigil) {
  flex:0 0 70px; width:70px; min-width:70px; height:104px; min-height:104px;
  padding:4px; margin-inline:0;
 }
 .layout-v2 main #humanHand.hand-crowded > .card:not(.hand-visual-last) { margin-right:0; }
 .layout-v2 main #humanHand:not(.hand-resting) > .card { transform:none; }
 .layout-v2 main #humanHand .card-art { width:44px; height:44px; }
 .layout-v2 main #humanHand > .card.has-card-labels:not(.compact-card) .card-art {
  width:44px!important; height:44px!important;
 }
 .layout-v2 main #humanHand > .card > b { font-size:11px; overflow-wrap:anywhere; }
 .layout-v2 main #humanHand .card.has-card-labels .card-mini-description { display:none!important; }
 .layout-v2 main #humanHand .card-sigil:not(.card-label-sigil) {
  box-sizing:border-box; width:22px; height:18px; margin:0; padding:0; font-size:12px;
 }
 .layout-v2 main #humanHand .card-sigil .sigil-art {
  display:block; width:17px; height:12px; object-fit:contain;
 }
 .layout-v2 main #humanHand > .card.has-card-labels:not(.compact-card) > .card-tags {
  position:static!important; width:100%; min-height:0; margin-top:auto;
  flex-direction:column; flex-wrap:nowrap; overflow:hidden; flex-shrink:0;
 }
 .layout-v2 main #humanHand > .card.has-card-labels > .card-tags .card-label-sigil {
  width:100%; height:16px; grid-template-columns:20px minmax(0,1fr); gap:2px;
 }
 .layout-v2 main #humanHand .card-label-sigil small { font-size:7px; }
}
@media (orientation:landscape) and (pointer:coarse) and (min-width:1000px) and (max-width:1400px) {
 body.layout-v2.joined-player-hand:not(.landing-active) #tableViewport > main {
  grid-template-rows:clamp(176px,24vh,210px) var(--center-strip-height) minmax(160px,max-content) minmax(0,1fr);
 }
 .layout-v2 main .player.human-player.local-seat {
  grid-template-columns:88px minmax(112px, .55fr) minmax(0, 1.45fr);
  column-gap:6px;
 }
 .layout-v2 main .player .player-stats { gap:2px 4px; }
 .layout-v2 main .player :is(.player-stats,.player-stats span,.banner,.hand-count) {
  font-size:11px; line-height:1.2;
 }
 .layout-v2 main .player .player-head-actions { gap:3px; }
 .layout-v2 main .player.human-player.local-seat > .player-portrait {
  --portrait-scale:.25;
  margin-block-start:0;
 }
 .layout-v2 main .player.local-seat .set-kamons > :is(.set-kamon,.set-kamon-fallback) {
  object-fit:contain;
 }
 .layout-v2 main .player .set .set-kamons { gap:1px; padding-inline:0; }
 .layout-v2 main .player .set .set-kamons > :is(.set-kamon,.set-kamon-fallback) {
  width:min(36px, calc((100% - 2px) / 3)); margin-inline:0;
 }
}
@media (orientation:landscape) and (pointer:coarse) and (min-width:1000px) and (max-width:1400px) and (max-height:799px) {
 body.layout-v2.joined-player-hand:not(.landing-active) #tableViewport > main {
  grid-template-rows:162px var(--center-strip-height) minmax(120px,max-content) minmax(0,1fr);
 }
}
 body.layout-v2.minimal-interface[data-text-size="normal"] { --ui-min:14px; }
 .layout-v2.minimal-interface main .player-head h3 { font-size:14px; }
 .layout-v2.minimal-interface main .player.human-player.local-seat .player-head h3 { flex-wrap:wrap; gap:2px 4px; }
 .layout-v2.minimal-interface main .player.human-player.local-seat .player-head h3 > .player-name { white-space:normal; }
 .layout-v2.minimal-interface main .player .player-identity > p:not(.player-activity),
 .layout-v2.minimal-interface main .player .player-head-actions .banner,
 .layout-v2.minimal-interface main .player .hand-count:not(button),
 .layout-v2.minimal-interface main .player-stats > :not(.tablet-player-details):not([data-board-resource]):not([data-anchor]) { display:none; }
 .layout-v2.minimal-interface main .tablet-player-details { display:block; position:relative; font:12px/1.3 var(--font-ui); }
 .layout-v2.minimal-interface main .tablet-player-details[open] { z-index:20; }
 .minimal-interface .tablet-player-details summary {
  display:flex; align-items:center; gap:5px; cursor:pointer; width:max-content;
  padding:4px 6px; border:1px solid var(--line); border-radius:5px;
  font-variant-numeric:tabular-nums;
 }
 .minimal-interface .tablet-player-details summary::after { content:"▸"; color:var(--gold); }
 .minimal-interface .tablet-player-details[open] summary::after { content:"▾"; }
 .minimal-interface .tablet-player-details ul {
  position:absolute; inset:auto auto 100% 0; min-width:max-content; margin:0; padding:8px 12px;
  list-style:none; background:#202621; border:1px solid var(--gold); border-radius:8px;
 }
 .layout-v2.minimal-interface main .player:not(.local-seat) .tablet-player-details ul { inset:100% auto auto 0; }
 body.layout-v2.minimal-interface[data-text-size="extra-large"] #legalActions .action-button :is(strong,small,.action-detail,.action-score,.action-tier),
 body.layout-v2.minimal-interface[data-text-size="extra-large"] #legalActions .turn-log-option :is(.turn-action-title,.turn-action-summary) {
  font-size:13px; line-height:1.2;
 }
 .layout-v2.minimal-interface #legalActions .tablet-action-row {
  display:grid; position:relative; grid-template-columns:minmax(0,1fr); min-width:0;
 }
 .layout-v2.minimal-interface #legalActions .tablet-action-row > .action-button { width:100%; min-height:44px; height:auto; }
 .layout-v2.minimal-interface #legalActions .tablet-action-row > .action-button > .action-detail { display:none!important; }
 .layout-v2.minimal-interface #legalActions .tablet-action-info { display:block; width:28px; min-height:28px; padding:0; }
.minimal-interface .player:not(.local-seat) .player-identity {
 display:flex; flex-wrap:nowrap; align-items:center; gap:4px; min-width:0;
}
.minimal-interface .player:not(.local-seat) .player-identity > .turn-sequence {
 position:static; flex:none; margin:0;
}
.minimal-interface .player:not(.local-seat) .player-identity > .player-activity { display:none; }
.minimal-interface .player:not(.local-seat) .player-identity h3 {
 display:flex; flex-wrap:nowrap; white-space:nowrap; min-width:0; gap:3px;
}
.minimal-interface .player:not(.local-seat) .player-identity h3 > .player-name {
 min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.minimal-interface .player:not(.local-seat) .player-identity h3 > :not(.player-name) { flex-shrink:0; }
.minimal-interface .player:not(.local-seat) .player-stats { flex-wrap:nowrap; align-items:center; gap:4px; }
@media (max-width:700px) {
 .layout-v2 .topbar .mode-tabs {
  flex:1 1 0; width:auto; flex-wrap:wrap; overflow:visible; gap:3px;
 }
 .layout-v2 .topbar .mode-tabs button {
  min-height:30px; padding:3px 5px; font-size:12px;
 }
 .layout-v2 .topbar #diagnosticLights { display:none; }
 .layout-v2.minimal-interface .player:not(.local-seat) .player-stats {
  flex-wrap:wrap; min-width:0; gap:2px; justify-content:flex-start;
 }
 .layout-v2.minimal-interface .player:not(.local-seat) .tablet-player-details,
 .layout-v2.minimal-interface .player:not(.local-seat) .player-stat {
  font-size:10px; flex:0 0 auto;
 }
 .layout-v2.minimal-interface .player:not(.local-seat) .tablet-player-details summary { padding:2px 4px; gap:3px; }
 .layout-v2.minimal-interface .player:not(.local-seat) .tablet-player-details summary::after { margin:-2px -4px 0 0; }
 .layout-v2.minimal-interface .player:not(.local-seat) .player-stat[data-board-resource] { gap:2px; padding:1px 3px; }
 .layout-v2.minimal-interface .player:not(.local-seat) .player-stat[data-board-resource] svg { width:13px; height:13px; }
}
@media (max-width:420px) {
 .layout-v2 .table-center-strip .table-match-info { flex:1 0 100%; gap:8px; }
 .layout-v2 .table-center-strip .table-match-copy { flex:1 1 auto; }
 .layout-v2 .table-center-strip .table-match-info #centerMessage { overflow-wrap:normal; }
 .layout-v2 .table-center-strip #tokenSupply { flex:none; }
 .layout-v2 main .player:not(.local-seat).sets-6 .set-zone > .sets {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:3px;
 }
 .layout-v2 main .player:not(.local-seat).sets-6 .sets > .set {
  display:block; position:relative; width:100%; min-width:0; min-height:39px;
  box-sizing:border-box; padding:2px 2px 2px 3px;
 }
 .layout-v2 main .player:not(.local-seat).sets-6 .set .set-kamons {
  --mini-width:14px; --mini-height:18px; gap:1px; padding:0;
 }
 .layout-v2 main .player:not(.local-seat).sets-6 .set .set-kamons > :is(.set-kamon,.set-kamon-fallback) {
  margin:0; transform:none; object-fit:contain;
 }
 .layout-v2 main .player:not(.local-seat).sets-6 .set-number {
  position:absolute; inset:auto auto 3px 3px; font-size:9px; line-height:11px;
 }
 .layout-v2 main .player:not(.local-seat).sets-6 .set-meta { margin-left:10px; }
 .layout-v2 main .player:not(.local-seat).sets-6 .set-meta strong {
  flex-wrap:nowrap; gap:1px; min-height:11px; font-size:9px; line-height:11px;
 }
 .layout-v2 main .player:not(.local-seat).sets-6 .set-state::before { display:none; }
 .layout-v2 main .player:not(.local-seat).sets-6 .set-meta :is(.token-counter,.set-banner-earned) { display:none; }
 .layout-v2 main .player:not(.local-seat).sets-6 .set .inspector-corner { z-index:4; }
 .layout-v2 .topbar { gap:3px; padding:3px 4px; }
 .layout-v2 .topbar .table-view-controls { gap:2px; }
 .layout-v2 .topbar .table-view-controls button,
 .layout-v2 .topbar .mode-tabs button { min-width:26px; min-height:28px; padding:2px 3px; }
 .layout-v2 .topbar .table-view-controls svg { width:16px; height:16px; }
 .layout-v2 .topbar :is(#landingHome,#openSetup > span:first-child,#diagnosticsToggle) { font-size:0; }
 .layout-v2 .topbar :is(#landingHome,#openSetup > span:first-child,#diagnosticsToggle)::before { font-size:15px; }
 .layout-v2 .topbar #landingHome::before { content:"⌂"; }
 .layout-v2 .topbar #openSetup > span:first-child::before { content:"＋"; }
 .layout-v2 .topbar #diagnosticsToggle::before { content:"◉"; }
 .layout-v2.minimal-interface main .player:not(.local-seat) .player-head,
 .layout-v2.minimal-interface main .player:not(.local-seat) .player-identity { width:100%; min-width:0; }
 .layout-v2.minimal-interface main .player:not(.local-seat) { position:relative; }
 .layout-v2.minimal-interface main .player:not(.local-seat) .player-identity > .turn-sequence {
  position:absolute; top:7px; left:6px;
 }
 .layout-v2.minimal-interface main .player:not(.local-seat) .player-identity h3 { flex:1; }
 .layout-v2.minimal-interface main .player:not(.local-seat) .player-identity h3 > .player-name {
  font-size:12px; width:100%;
 }
 .layout-v2.minimal-interface main .player:not(.local-seat) .house-badge {
  position:absolute; top:6px; right:6px; font-size:0; padding:0; gap:0; border:0; background:none;
 }
 .layout-v2.minimal-interface main .player:not(.local-seat) .house-badge .landing-clan-flag {
  width:12px; height:15px; margin:0;
 }
 .layout-v2.minimal-interface main .player:not(.local-seat) .house-badge:has(.landing-clan-flag)::before { content:none; }
 .layout-v2.minimal-interface main .player:not(.local-seat) .house-badge .landing-clan-flag ~ .landing-clan-flag { display:none; }
 .layout-v2.minimal-interface main .player:not(.local-seat) .player-identity :is(.leader-mark,.runner-up-mark) { display:none; }
}
.minimal-interface .tablet-player-details summary::after {
 align-self:flex-start; margin:-4px -6px 0 0; padding:0 4px;
}
.layout-v2.minimal-interface #legalActions .tablet-action-info {
 position:absolute; inset:1px 1px auto auto; z-index:2;
 border-radius:0 7px 0 8px; color:var(--gold);
}
#minimalActionFilters { display:none; }
#portraitHandFilters { display:none; }
.banner-overview-short { display:none; }
.portrait-nav-setting { display:none; }
.table-zone-toggle { display:none; }
#mobileTableNav :is([data-mobile-pane=opponents],[data-mobile-pane=player]) { display:none; }
@media (max-width:700px) and (orientation:portrait), (min-width:701px) and (max-width:1100px) and (pointer:coarse) and (orientation:portrait) {
 .portrait-nav-setting { display:flex; align-items:center; gap:8px; }
 .layout-v2 #mobileTableNav {
  display:flex; position:fixed; inset:auto 4px clamp(56px,15dvh,125px) auto; z-index:40;
  flex-direction:column; gap:6px; padding:0; border:0; background:none; backdrop-filter:none;
 }
 .layout-v2 #mobileTableNav [data-mobile-pane] {
  display:grid; place-items:center; width:44px; height:44px; min-height:44px;
  padding:0; border-radius:50%; font-size:0;
 }
 .layout-v2 #mobileTableNav button::before { font-size:18px; }
 .layout-v2[data-portrait-nav-side=left] #mobileTableNav { left:4px; right:auto; }
 #mobileTableNav [data-mobile-pane=opponents]::before { content:"♟"; }
 #mobileTableNav [data-mobile-pane=table]::before { content:"家"; }
 #mobileTableNav [data-mobile-pane=hand]::before { content:"▤"; }
 #mobileTableNav [data-mobile-pane=player]::before { content:"♙"; }
 #mobileTableNav [data-mobile-pane=actions]::before { content:"☷"; }
 #mobileTableNav [data-mobile-pane=recap]::before { content:"⚑"; }
 .layout-v2[data-mobile-pane=table] #tableViewport > main {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); grid-template-rows:none;
  grid-auto-rows:auto; height:auto; min-height:0; gap:4px;
 }
 .layout-v2[data-mobile-pane=table] :is(.table-wrap,#gameTable) { display:contents; }
 .layout-v2[data-mobile-pane=table] #gameTable > .player:not(.local-seat) {
  grid-row:1; min-height:0; height:auto; gap:1px;
 }
 .layout-v2[data-table-layout=phone-portrait][data-mobile-pane=table] #gameTable:has(> .player.active) > .player:not(.local-seat) {
  margin-block-end:10px;
 }
 .layout-v2[data-table-layout=phone-portrait][data-mobile-pane=table] #gameTable:has(> .player.active) > .player.local-seat {
  margin-block-start:17px;
 }
 .layout-v2.minimal-interface #gameTable > .player:not(.local-seat) .player-stats [data-board-resource] { display:none; }
 .layout-v2[data-mobile-pane=table] #gameTable > .table-center-strip { grid-area:2/1/3/-1; top:0; gap:2px; }
 .layout-v2[data-mobile-pane=table] main > #handPanel { grid-area:3/1/4/-1; }
 .layout-v2[data-mobile-pane=table] #gameTable > .player.local-seat {
  grid-area:4/1/5/-1; min-height:0; grid-template-rows:auto auto auto; gap:3px; padding:5px;
 }
 .layout-v2[data-mobile-pane=table] #tableViewport > main > #actionPanel {
  grid-area:5/1/6/-1; width:100%; min-width:0; max-width:none; justify-self:stretch;
 }
 .layout-v2 :is(.player,.table-center-strip,#handPanel,#actionPanel) { scroll-margin-top:55px; }
 .layout-v2 #gameTable > .player.local-seat .sets { grid-template-columns:repeat(3,minmax(0,1fr)); gap:3px; }
 .layout-v2 #gameTable > .player.local-seat .set .set-kamons { --mini-height:23px; }
 .layout-v2 #gameTable > .player.local-seat .set-zone { padding:0; }
 .layout-v2 #handPanel > .section-heading { display:flex; flex-flow:row nowrap; align-items:center; padding:2px; gap:3px; }
 .layout-v2 #handPanel .section-heading-tools { display:flex; width:auto; flex:1 0 auto; flex-flow:row nowrap; align-items:center; justify-content:flex-end; gap:2px; }
 .layout-v2 #handPanel .section-heading-tools button { min-height:22px; padding:1px 3px; }
 .layout-v2 #handPanel .section-heading-tools #handOrderControls { margin:0 0 0 auto; gap:2px; flex-wrap:nowrap; }
 .layout-v2 #handPanel #handOrderControls button { width:21px; height:22px; }
 .layout-v2 #handPanel .turn-budget[data-compact],
 .layout-v2 #handPanel #handOrderControls small[data-compact] { font-size:0; white-space:nowrap; }
 .layout-v2 #handPanel :is(.turn-budget,#handOrderControls small)[data-compact]::before {
  content:attr(data-compact); font-size:10px; font-variant-numeric:tabular-nums;
 }
 .layout-v2 #handPanel { padding:4px; }
 .layout-v2 #portraitHandFilters { display:block; }
 #portraitHandFilters > summary {
  display:grid; place-items:center; list-style:none; width:40px; height:36px;
  border:1px solid var(--line); border-radius:5px; color:var(--gold); cursor:pointer;
 }
 #portraitHandFilters > summary::-webkit-details-marker { display:none; }
 #portraitHandFilters .minimal-filter-panel {
  position:fixed; inset:auto 12px 24dvh auto;
  width:min(270px,calc(100vw - 24px)); box-sizing:border-box;
  max-height:65dvh; z-index:60;
 }
 .layout-v2 #portraitHandFilters #sigilHighlights:not([hidden]) {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px;
 }
 .layout-v2 #portraitHandFilters #sigilHighlights button {
  width:100%; min-width:0; min-height:48px; padding:4px;
  grid-template-rows:auto auto; gap:2px; font-size:13px; line-height:1.1;
 }
 #portraitHandFilters .sigil-highlight-toggle::after { content:attr(aria-label); }
 .layout-v2 #portraitHandFilters #attachMapToggle {
  min-height:44px; margin-block:6px; padding-inline:8px;
 }
 .layout-v2 #portraitHandFilters #handOrderControls {
  justify-content:space-between; margin:0; padding-top:6px; border-top:1px solid var(--line);
 }
 .layout-v2 #portraitHandFilters #handOrderControls button { width:44px; height:44px; }
 .layout-v2 #portraitHandFilters #handOrderControls small[data-compact] { font-size:11px; }
 .layout-v2 #portraitHandFilters #handOrderControls small[data-compact]::before { content:none; }
 .layout-v2 #gameTable > .player.local-seat .set-meta strong { font-size:11px; line-height:1.1; }
 .layout-v2 #gameTable > .player.local-seat .sets > .set { min-height:0; padding-block:2px; }
 .layout-v2 #gameTable > .player.human-player.local-seat > .turn-sequence {
  inset:27px auto auto 6px;
 }
 .layout-v2.minimal-interface #gameTable > .player.local-seat .player-identity .turn-status { display:none; }
 .layout-v2 .table-center-strip .center-mark {
  display:flex; flex-wrap:nowrap; min-height:0; height:auto; gap:6px; padding:4px 5px;
 }
 .layout-v2 .table-center-strip .table-match-info { flex:1 1 0; gap:5px; }
 .layout-v2 .table-center-strip .table-match-copy { gap:1px; }
 .layout-v2 .table-center-strip .center-emblem { display:none; }
 .layout-v2 .table-center-strip .center-turn { font-size:11px; padding:2px 4px; }
 .layout-v2 .table-center-strip #centerMessage { font-size:11px; line-height:1.1; }
 .layout-v2 .table-center-strip #tokenSupply { width:30px; height:32px; margin:0; }
 .layout-v2 .table-center-strip #tokenSupply svg { width:30px; height:32px; }
 .layout-v2 .table-center-strip #tokenSupply b { font-size:10px; }
 .layout-v2 .table-center-strip .table-deck-rack { flex:none; gap:5px; padding:0; margin:0; }
 .layout-v2 .table-center-strip .table-pile { gap:1px; margin:0; }
 .layout-v2 .table-center-strip .pile-label { font-size:9px; letter-spacing:0; line-height:11px; }
 .layout-v2 .table-center-strip :is(.table-deck-back,.discard-pile) { width:34px; height:44px; }
 .layout-v2 .table-center-strip .table-deck-back { padding-top:30px; font-size:8px; }
 .layout-v2 .table-center-strip .table-deck-back::before { inset:29px 0 0; }
 .layout-v2 .table-center-strip .discard-mini { width:28px; height:36px; }
 .layout-v2 .table-center-strip .table-message-zone { min-height:0; }
 .layout-v2 .table-center-strip #bannerRail { margin:0; height:auto; min-height:0; }
 .layout-v2 .table-center-strip #bannerRail .banner-overview { font-size:10px; line-height:1.15; margin:0; }
 .layout-v2 .table-center-strip #bannerRail .banner-overview > :is(strong,small) { display:none; }
 .layout-v2 .table-center-strip #bannerRail .banner-overview-short {
  display:block; white-space:nowrap; color:var(--gold); font-size:11px; font-weight:750;
 }
 .layout-v2 .table-center-strip #bannerRail .banner-sash {
  grid-template-rows:31px 9px; min-height:0;
 }
 .layout-v2 .table-center-strip #bannerRail .banner-sash-flag { width:26px; height:31px; }
 .layout-v2 .table-center-strip #bannerRail .banner-sash-flag b {
  top:36%; left:0; width:100%; color:#251505; background:#ffe6a0;
  border-radius:2px; font:800 10px/1.05 system-ui,sans-serif; text-shadow:none;
 }
 .layout-v2 .table-center-strip #bannerRail .claimed .banner-sash-flag b { z-index:2; color:#251505; background:transparent; }
 .layout-v2 .table-center-strip #bannerRail .banner-sash::before { height:36px; }
 .layout-v2 .table-center-strip > .center-mark {
  display:grid; grid-template-columns:minmax(0,1fr) auto minmax(44px,1fr);
 }
 .layout-v2 .table-center-strip .table-match-info { min-width:0; }
 .layout-v2 .table-center-strip .table-deck-rack { justify-self:center; }
 .layout-v2 .table-center-strip .center-mark > .table-zone-toggle {
  position:relative; justify-self:end; width:44px; height:44px; font-size:13px;
  background:linear-gradient(225deg,var(--gold) 5px,transparent 5px) right top / 9px 9px no-repeat,
    #282d28 url("/assets/sashimono-flag.svg") center 3px / 24px 28px no-repeat;
 }
 .layout-v2 .table-center-strip .center-mark > .table-zone-toggle::after {
  content:attr(data-count); position:absolute; inset:auto 0 1px;
  text-align:center; color:#fff0c2; font-size:11px; text-shadow:0 1px 2px #000;
 }
 .layout-v2 .table-center-strip[data-zone-expanded=false] #bannerRail { display:none; }
 .layout-v2 .table-zone-toggle {
  display:inline-grid; place-items:center; flex:none; width:32px; height:32px;
  padding:0; border-radius:3px 3px 7px 3px; color:var(--gold); background:#282d28;
 }
 .layout-v2 .table-zone-toggle::before { content:"◥"; }
 .layout-v2 .table-zone-toggle[aria-expanded=true]::before { content:"▾"; }
 .layout-v2 .center-mark > .table-zone-toggle::before { justify-self:end; align-self:start; }
 .layout-v2 .table-center-strip .center-mark > .table-zone-toggle[data-next-score]:not([data-next-score=""])::before {
  content:attr(data-next-score); position:absolute; inset:10px auto auto 50%;
  transform:translateX(-50%); color:#271905; font:800 12px/1.2 var(--font-ui);
  text-shadow:0 0 2px #fff1c0;
 }
 .layout-v2 .player .player-head > .table-zone-toggle { margin-inline-start:auto; }
 .layout-v2 #gameTable > .player { position:relative; }
 .layout-v2 #gameTable > .player .player-head > .table-zone-toggle {
  position:absolute; top:6px; right:6px;
 }
 .layout-v2 #gameTable > .player:not(.local-seat) .player-head > .table-zone-toggle {
  inset:19px auto auto 3px; width:28px; height:24px;
 }
 .layout-v2 #gameTable > .player.local-seat .player-head { padding-inline-end:34px; }
 .layout-v2 .player[data-zone-expanded=false] .set-zone,
 .layout-v2 #handPanel[data-zone-expanded=false] .hand-content,
 .layout-v2 #actionPanel[data-zone-expanded=false] #legalActions { display:none; }
 .layout-v2 #handPanel > .section-heading > .table-zone-toggle {
  display:inline-grid; width:40px; height:36px; font-size:16px;
 }
 .layout-v2 #handPanel > .section-heading > .table-zone-toggle::before { content:"▾"; }
 .layout-v2 #handPanel > .section-heading > .table-zone-toggle[aria-expanded=true]::before { content:"▴"; }
 .layout-v2 #handPanel .section-heading-tools { flex:0 0 auto; }
 .layout-v2 #actionPanel > .section-heading { flex-wrap:wrap; }
}
/* Short touch windows use the navigation tabs; portrait alone stacks all zones. */
.layout-v2[data-table-layout=phone-landscape] #mobileTableNav { display:flex; position:static; }
.layout-v2[data-table-layout=phone-landscape] #mobileTableNav button { min-height:44px; }
.layout-v2[data-table-layout=phone-landscape] .mode-tabs,
.layout-v2[data-table-layout=tablet-portrait] .mode-tabs { scrollbar-width:none; }
.layout-v2[data-table-layout=phone-landscape]:is([data-mobile-pane=hand],[data-mobile-pane=actions]) .table-wrap { display:none; }
.layout-v2[data-table-layout=phone-landscape][data-mobile-pane=hand] #actionPanel,
.layout-v2[data-table-layout=phone-landscape][data-mobile-pane=actions] #handPanel { display:none; }
.layout-v2[data-table-layout=phone-landscape] main > :is(#handPanel,#actionPanel) { grid-column:1/-1; min-width:0; }
.layout-v2:is([data-table-layout=tablet-portrait],[data-table-layout=phone-landscape]) #gameTable > .player:not(.local-seat) {
 display:flex; flex-direction:column; align-items:stretch; justify-content:start;
 min-height:0; max-height:none; height:auto; gap:4px; padding:5px;
}
.layout-v2:is([data-table-layout=tablet-portrait],[data-table-layout=phone-landscape]) #gameTable > .player:not(.local-seat) > .player-portrait {
 width:62px; height:62px; min-width:0; align-self:center; --portrait-scale:.17;
}
.layout-v2:is([data-table-layout=tablet-portrait],[data-table-layout=phone-landscape]) #gameTable > .player:not(.local-seat) .player-hand { display:none; }
.layout-v2:is([data-table-layout=tablet-portrait],[data-table-layout=phone-landscape]) #gameTable > .player:not(.local-seat) .set-zone { padding:0; }
.layout-v2:is([data-table-layout=tablet-portrait],[data-table-layout=phone-landscape]) #gameTable > .player:not(.local-seat) .sets {
 grid-template-columns:repeat(3,minmax(0,1fr)); gap:3px; align-content:start;
}
.layout-v2:is([data-table-layout=tablet-portrait],[data-table-layout=phone-landscape]) #gameTable > .player:not(.local-seat) .sets > .set {
 display:block; position:relative; width:100%; min-width:0; min-height:42px; padding:2px 3px;
}
.layout-v2:is([data-table-layout=tablet-portrait],[data-table-layout=phone-landscape]) #gameTable > .player:not(.local-seat) .set-kamons {
 --mini-width:18px; --mini-height:21px; padding:0; gap:1px;
}
.layout-v2:is([data-table-layout=tablet-portrait],[data-table-layout=phone-landscape]) #gameTable > .player:not(.local-seat) .set-kamons > :is(.set-kamon,.set-kamon-fallback) { margin:0; }
.layout-v2:is([data-table-layout=tablet-portrait],[data-table-layout=phone-landscape]) #gameTable > .player:not(.local-seat) .set-meta strong { font-size:11px; line-height:1.15; }
.layout-v2 .minimal-filter-panel,
.layout-v2.inspector-open #cardInspector { background:#2b302d; opacity:1; }
.layout-v2 .minimal-filter-close { min-width:44px; min-height:44px; }
.layout-v2 .player-facts-panel {
 position:fixed; inset:auto 12px 20dvh auto; width:min(255px,calc(100vw - 24px));
 box-sizing:border-box; max-height:65dvh; font-size:14px;
}
.layout-v2 .tablet-player-details .player-facts-panel ul {
 position:static; min-width:0; padding:0; border:0; background:none;
}
.layout-v2.minimal-interface:is([data-table-layout=tablet-landscape],[data-table-layout=phone-landscape]) .table-zone-toggle {
 display:inline-grid; place-items:center; flex:none; width:36px; height:36px; padding:0;
 color:var(--gold); background:#282d28;
}
.layout-v2.minimal-interface:is([data-table-layout=tablet-landscape],[data-table-layout=phone-landscape]) .table-zone-toggle::before { content:"◥"; }
.layout-v2.minimal-interface:is([data-table-layout=tablet-landscape],[data-table-layout=phone-landscape]) .table-zone-toggle[aria-expanded=true]::before { content:"▾"; }
.layout-v2.minimal-interface:is([data-table-layout=tablet-landscape],[data-table-layout=phone-landscape]) .center-mark > .table-zone-toggle {
 position:absolute; inset:2px 2px auto auto; z-index:4;
}
.layout-v2.minimal-interface:is([data-table-layout=tablet-landscape],[data-table-layout=phone-landscape]) .table-center-strip[data-zone-expanded=false] #bannerRail > :not(.banner-overview),
.layout-v2.minimal-interface:is([data-table-layout=tablet-landscape],[data-table-layout=phone-landscape]) .player[data-zone-expanded=false] .set-zone,
.layout-v2.minimal-interface:is([data-table-layout=tablet-landscape],[data-table-layout=phone-landscape]) #handPanel[data-zone-expanded=false] .hand-content,
.layout-v2.minimal-interface:is([data-table-layout=tablet-landscape],[data-table-layout=phone-landscape]) #actionPanel[data-zone-expanded=false] #legalActions {
 display:none;
}
@media (min-width:1000px) and (orientation:landscape) {
 body.layout-v2.joined-player-hand[data-table-fit]:not([data-table-fit=""]):not(.landing-active) #tableViewport > main {
  zoom:var(--table-fit-scale,1);
  height:calc((100dvh - var(--table-topbar-height,48px)) / var(--table-fit-scale,1) - 2 * var(--table-vertical-margin,8px));
 }
}
.minimal-interface #actionPanel { position:relative; }
.minimal-interface #actionPanel > .turn-command-strip {
 flex:0 0 auto; flex-wrap:nowrap; margin:4px 0 0; padding-top:4px; padding-inline-end:36px;
}
.layout-v2.minimal-interface #actionPanel > .turn-command-strip > .action-button {
 flex:1 1 0; min-width:0; min-height:36px; padding:4px 6px;
 font-size:12px; line-height:1.2;
}
.minimal-interface #actionPanel:has(> .turn-command-strip) #legalActions {
 flex:1 1 auto; min-height:0; overflow-y:auto;
}
@media (max-width:999px) {
 .layout-v2 main #humanHand,
 .layout-v2 main #humanHand.hand-crowded { gap:4px; padding:6px; }
 .layout-v2 main #humanHand > .card,
 .layout-v2 main #humanHand > .card:not(.has-card-labels):has(.card-sigil) {
  flex:0 0 82px; width:82px; min-width:82px; height:118px; min-height:118px;
  margin-inline:0; padding:4px;
 }
 .layout-v2 main #humanHand.hand-crowded > .card:not(.hand-visual-last) { margin-right:0; }
 .layout-v2 main #humanHand:not(.hand-resting) > .card { transform:none; }
 .layout-v2 main #humanHand > .card.has-card-labels:not(.compact-card) .card-art {
  width:44px!important; height:44px!important;
 }
 .layout-v2 main #humanHand > .card > b { font-size:11px; line-height:1.1; }
 .layout-v2 main #humanHand > .card.has-card-labels:not(.compact-card) > .card-tags {
  position:static!important; width:100%; min-height:0; margin-top:auto; flex-shrink:0;
 }
 .layout-v2 main #humanHand > .card.has-card-labels > .card-tags .card-label-sigil {
  width:100%; height:15px; grid-template-columns:18px minmax(0,1fr); gap:2px;
 }
 .layout-v2 main #humanHand .card-sigil .sigil-art { width:16px; height:12px; }
 .layout-v2 main #humanHand .card.has-card-labels .card-mini-description { display:none!important; }
}
@media (max-width:700px) and (orientation:portrait) {
 .layout-v2[data-mobile-pane=table] #gameTable > .player.human-player.local-seat {
  grid-template-areas:"avatar head" "avatar stats" "set-zone set-zone";
  grid-template-columns:56px minmax(0,1fr); grid-template-rows:auto auto auto;
  gap:3px 5px;
 }
 .layout-v2 #gameTable > .player.human-player.local-seat > .player-portrait {
  align-self:end; margin-block:0;
 }
 .layout-v2 #gameTable > .player.human-player.local-seat > .player-stats {
  flex-wrap:nowrap; align-items:center; align-self:end; gap:3px; min-width:0;
 }
 .layout-v2 #gameTable > .player.human-player.local-seat > .player-stats :is(summary,.player-stat) {
  font-size:11px; line-height:1.2; padding:2px 4px; gap:3px;
 }
 .layout-v2.minimal-interface #gameTable > .player.human-player.local-seat > .player-head-actions:not(:has([data-show-turn-log],.hand-reveal-toggle)) {
  display:none;
 }
 .layout-v2.minimal-interface #gameTable > .player.human-player.local-seat > .player-head-actions:has([data-show-turn-log],.hand-reveal-toggle) {
  position:absolute; inset:6px 41px auto auto; margin:0;
 }
 .layout-v2.minimal-interface #gameTable > .player.human-player.local-seat:has(> .player-head-actions :is([data-show-turn-log],.hand-reveal-toggle)) > .player-head {
  padding-inline-end:76px;
 }
 .layout-v2:not(.minimal-interface)[data-mobile-pane=table] #gameTable > .player.human-player.local-seat {
  grid-template-areas:"avatar head" "avatar stats" "score score" "set-zone set-zone";
  grid-template-rows:auto auto auto auto;
 }
 .layout-v2 #gameTable > .player .sets > .set {
  display:block; position:relative; min-width:0; padding:2px;
 }
 .layout-v2 #gameTable > .player .set > .set-main { width:100%; min-width:0; gap:0; }
 .layout-v2 #gameTable > .player .set .set-kamons {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1px; padding:0;
  height:auto; align-items:center; justify-items:center;
 }
 .layout-v2 #gameTable > .player .set .set-kamons > :is(.set-kamon,.set-kamon-fallback),
 .layout-v2 #gameTable > .player .set.seal .set-kamons > :is(.set-kamon,.set-kamon-fallback) + :is(.set-kamon,.set-kamon-fallback) {
  width:var(--portrait-set-card-width,100%); height:auto; aspect-ratio:4 / 5;
  max-height:var(--portrait-set-card-height,34px); margin:0;
  object-fit:contain; transform:none;
 }
 .layout-v2 #gameTable > .player:not(.local-seat) .set .set-kamons {
  --portrait-set-card-width:min(46%,36px);
  --portrait-set-card-height:40px;
  display:flex; justify-content:center; gap:0; padding:2px 3px 0;
 }
 .layout-v2 #gameTable > .player:not(.local-seat) .set .set-kamons > :is(.set-kamon,.set-kamon-fallback) {
  flex:none; transform-origin:center 85%;
 }
 .layout-v2 #gameTable > .player:not(.local-seat) .set .set-kamons > :is(.set-kamon,.set-kamon-fallback) + :is(.set-kamon,.set-kamon-fallback) {
  margin-inline-start:max(-20%,-13px);
 }
 .layout-v2 #gameTable > .player:not(.local-seat) .set .set-kamons > :first-child:not(:only-child) { transform:rotate(-7deg); }
 .layout-v2 #gameTable > .player:not(.local-seat) .set .set-kamons > :last-child:not(:only-child) { transform:rotate(7deg); }
 .layout-v2 #gameTable > .player .set .set-number {
  position:absolute; inset:auto auto 2px 2px; font-size:9px; line-height:11px;
 }
 .layout-v2 #gameTable > .player .set .set-meta { margin-inline-start:11px; }
 .layout-v2 #gameTable > .player .set .set-meta strong {
  gap:2px; min-height:12px; font-size:9px; line-height:12px;
 }
 .layout-v2 #gameTable > .player .set .set-state { font-size:8px; }
 .layout-v2 main #humanHand > .card.has-card-labels:not(.compact-card) > .card-tags {
  display:flex; flex-flow:row nowrap; gap:3px;
 }
 .layout-v2 main #humanHand > .card.has-card-labels > .card-tags:has(.card-label-sigil) .card-label-sigil {
  display:block; flex:1 1 0; min-width:0; height:27px;
 }
 .layout-v2 main #humanHand .card-label-sigil small { display:none; }
 .layout-v2 main #humanHand .card-label-sigil .sigil-art {
  display:block; width:100%; height:27px; object-fit:contain;
 }
 body.layout-v2.minimal-interface #actionPanel #legalActions .action-title strong,
 body.layout-v2.minimal-interface #actionPanel #legalActions .turn-log-option :is(.turn-action-title,.turn-action-summary) {
  font-size:clamp(11px,var(--ui-min),12px); line-height:1.2;
 }
}
.minimal-interface #actionPanel > .section-heading {
 display:flex; align-items:flex-start; justify-content:space-between; gap:6px; margin-bottom:4px;
}
.minimal-interface #actionPanel > .section-heading > div:first-child { min-width:0; }
.minimal-interface #actionContext { margin:2px 0 0; font-size:11px; }
.minimal-interface #legalActions .tablet-action-row .action-score { display:none; }
.minimal-interface #legalActions .tablet-action-row > .action-button { min-height:44px; padding-block:4px; padding-inline-end:31px; }
.minimal-interface #legalActions .tablet-action-row .action-button-head { padding-inline-end:24px; }
:is(.minimal-interface,[data-compact-action-controls]) #minimalActionFilters { display:block; flex:none; }
#minimalActionFilters summary {
 cursor:pointer; list-style:none; padding:3px 7px; border:1px solid var(--line); border-radius:5px;
}
#minimalActionFilters summary::after { content:" ▾"; color:var(--gold); }
.minimal-filter-panel {
 position:absolute; z-index:15; inset:38px 6px auto; max-height:calc(100% - 48px); overflow:auto;
 padding:8px; border:1px solid var(--line); border-radius:8px; background:#202621;
 box-shadow:0 5px 15px #0009;
}
.minimal-filter-handle {
 display:flex; justify-content:space-between; align-items:center; gap:8px;
 cursor:grab; touch-action:none; margin-bottom:5px; color:var(--gold);
}
.minimal-filter-close { cursor:pointer; }
:is(.minimal-interface,[data-compact-action-controls]) #minimalActionFilters .action-header-tools { justify-content:flex-start; gap:4px; }
:is(.minimal-interface,[data-compact-action-controls]) #minimalActionFilters #actionPages { display:flex; flex-wrap:wrap; gap:5px; margin-top:5px; }
:is(.minimal-interface,[data-compact-action-controls]) #minimalActionFilters #actionPages[hidden] { display:none; }
@media (orientation:landscape) and (pointer:coarse) and (min-width:1000px) and (max-width:1400px) {
 .layout-v2.minimal-interface main .player:not(.local-seat) {
  grid-template-columns:70px minmax(0,1fr); column-gap:4px;
 }
 .layout-v2.minimal-interface main .player:not(.local-seat) > .player-portrait {
  --portrait-scale:.18; margin-inline-start:-5px;
 }
 .layout-v2.minimal-interface > .topbar { padding-block:3px; min-height:44px; }
 body.layout-v2.minimal-interface.joined-player-hand:not(.landing-active) #tableViewport > main {
  --center-strip-height:94px;
 }
 .layout-v2.minimal-interface .table-center-strip .center-mark {
  grid-template-columns:32px 34px minmax(0,1fr); grid-template-rows:21px minmax(0,1fr);
  gap:0 6px; padding-inline:8px;
 }
 .layout-v2.minimal-interface .table-center-strip .table-match-copy { align-self:center; }
 .layout-v2.minimal-interface .table-center-strip .table-deck-rack {
  justify-content:center; gap:8px; margin:0;
 }
 .layout-v2.minimal-interface .table-center-strip :is(.table-deck-back,.discard-pile) {
  width:42px; height:55px; aspect-ratio:auto;
 }
 .layout-v2.minimal-interface .table-center-strip .table-deck-back { padding-top:39px; }
 .layout-v2.minimal-interface .table-center-strip .table-deck-back::before { inset:38px 0 0; }
 .layout-v2.minimal-interface main .player:not(.local-seat).sets-6 {
  grid-template-rows:38px 20px minmax(0,1fr);
 }
 .layout-v2.minimal-interface main .player:not(.local-seat).sets-6 .sets {
  grid-template-columns:repeat(3,minmax(0,1fr)); gap:2px; padding:0;
 }
 .layout-v2.minimal-interface main .player:not(.local-seat).sets-6 .set-kamons { --mini-height:17px; }
 .layout-v2.minimal-interface main .player:not(.local-seat).sets-6 .sets > .set { padding-block:0; }
 .layout-v2.minimal-interface main .player:not(.local-seat).sets-6 .set-meta strong { line-height:12px; min-height:12px; }
}
@media (orientation:landscape) and (pointer:coarse) and (min-width:1000px) and (max-width:1400px) and (max-height:740px) {
 .layout-v2.minimal-interface main #humanHand > .card.has-card-labels:not(.compact-card) .card-art {
  width:38px!important; height:38px!important;
 }
 .layout-v2.minimal-interface main .player:not(.local-seat) .set-zone { padding-top:0; }
 .layout-v2.minimal-interface main .player:not(.local-seat):not(.sets-6) .set .set-kamons { --mini-height:23px; }
}
@media (orientation:landscape) and (pointer:coarse) and (min-width:1000px) and (max-width:1100px) and (max-height:799px) {
 body.layout-v2.joined-player-hand:not(.expanded-actions) #tableViewport > main :is(.player.local-seat,#handPanel) {
  width:120%; max-width:none;
 }
 body.layout-v2.joined-player-hand:not(.expanded-actions) #tableViewport > main #actionPanel {
  width:80%; justify-self:end;
 }
 body.layout-v2.joined-player-hand:not(.expanded-actions) #tableViewport > main:has(.player.local-seat.active):has(#handPanel:not(.hidden))::after {
  width:calc(120% + 7px);
 }
 .layout-v2 main .player:not(.local-seat) {
  grid-template-rows:68px 22px minmax(0,1fr);
 }
 .layout-v2 main .player:not(.local-seat) > .player-portrait { --portrait-scale:.19; }
 .layout-v2 main .player:not(.local-seat) .set-zone { padding-top:0; }
 .layout-v2 main .player:not(.local-seat) .set .set-kamons { --mini-height:24px; }
 .layout-v2 main .player:not(.local-seat) .sets { overflow-y:auto; min-height:0; }
 .layout-v2:not(.expanded-actions) #actionPanel #legalActions { grid-template-columns:minmax(0,1fr); }
 .layout-v2 main #humanHand > .card,
 .layout-v2 main #humanHand > .card:not(.has-card-labels):has(.card-sigil) {
  flex-basis:80px; width:80px; min-width:80px; height:116px; min-height:116px;
 }
}


.layout-v2 .topbar:has(> #tournamentTableTitle:not([hidden])) .mode-tabs {
  order: 0;
  flex-basis: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

@media (max-width: 700px) {
  .layout-v2 .topbar:has(> #tournamentTableTitle:not([hidden])) {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }
  .layout-v2 .topbar:has(> #tournamentTableTitle:not([hidden])) > .brand {
    grid-area: 1 / 1;
    max-inline-size: 38vw;
  }
  .layout-v2 .topbar:has(> #tournamentTableTitle:not([hidden])) > .brand > div {
    min-inline-size: 0;
  }
  .layout-v2 .topbar:has(> #tournamentTableTitle:not([hidden])) .match-id-badge {
    max-inline-size: 100%;
  }
  .layout-v2 .topbar:has(> #tournamentTableTitle:not([hidden])) > .table-view-controls { grid-area: 2 / 1; }
  .layout-v2 .topbar:has(> #tournamentTableTitle:not([hidden])) > .mode-tabs { grid-area: 2 / 2; }
  .layout-v2 .topbar:has(> #tournamentTableTitle:not([hidden])) > .status { grid-column: 1 / -1; }
  .layout-v2 .topbar > #tournamentTableTitle:not([hidden]) {
    grid-area: 1 / 2;
    max-inline-size: 100%;
    padding-inline: 7px;
  }
}

/* The incoming crest occupies its final position in the resulting Set. */
.attach-comparison, .attach-composition, .attach-result, .attach-incoming, .attach-token-route {
  display:inline-flex; align-items:center;
}
.attach-comparison { align-self:stretch; flex-wrap:wrap; justify-content:space-between; gap:3px 8px; }
.attach-composition { gap:4px; color:#d1c6ad; }
.attach-composition .guide-kamon { display:block; width:23px; height:23px; object-fit:contain; margin:0; padding:0;
 border-radius:3px; box-sizing:border-box;
 /* Keep both sigil colors from the shared inline frame at thumbnail scale. */
 border-width:1px!important; outline:none!important; }
.attach-composition img.guide-kamon:not(.wildcard) { background:var(--guide-crest-ground,var(--cream-card)); }
.attach-outgoing { opacity:1; }
.attach-result { gap:2px; }
.attach-incoming { outline:1px solid #a8d9aa; outline-offset:1px; border-radius:3px; }
.attach-token-route { gap:4px; font-size:.72rem; line-height:1.2; }
.token-counter[data-one-from-seal]::after {
  content:""; display:inline-block; width:7px; height:7px; flex:none;
  border:1px dashed #ffe5a6; border-radius:2px; box-sizing:border-box;
}
.layout-v2 .center-mark .out-of-play::after {
  content:""; position:absolute; top:0; left:0; width:clamp(14px,1.2vw,21px); aspect-ratio:1;
  background:#454b50 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23fff' stroke-width='1.8'%3E%3Ccircle cx='9' cy='9' r='5.4'/%3E%3Cpath d='m5.2 12.8 7.6-7.6'/%3E%3C/svg%3E") center/contain no-repeat;
  border-radius:3px 0 6px 0; pointer-events:none;
}

@media (max-width:420px) {
  .layout-v2 main .player:not(.local-seat).sets-6 .set-meta .token-counter[data-one-from-seal] {
    display:inline-flex; padding:0 2px;
  }
  .attach-composition .guide-kamon { width:16px; height:16px; }
}

@media (min-width:1000px) and (orientation:landscape) {
 body.layout-v2.joined-player-hand[data-table-compact]:not(.landing-active) #tableViewport > main {
  grid-template-rows:clamp(150px,23vh,215px) minmax(64px,var(--center-strip-height)) minmax(0,max-content) minmax(150px,1fr);
 }
 .layout-v2[data-table-fit]:not([data-table-fit=""]) #actionPanel > .turn-command-strip {
  flex:none; margin:4px 0 0; padding:4px 36px 0 0; flex-wrap:nowrap;
 }
 .layout-v2[data-table-fit]:not([data-table-fit=""]) #actionPanel > .turn-command-strip > .action-button {
  flex:1 1 0; min-width:0; min-height:36px; padding:4px 6px; font-size:12px;
 }
 .layout-v2[data-table-layout="tablet-landscape"][data-table-fit] #actionPanel > .turn-command-strip > .action-button {
  min-height:var(--table-touch-target,44px);
 }
}


@media (min-width:1000px) and (max-width:1280px) and (orientation:landscape) {
 .layout-v2[data-table-compact] #gameTable > .player.human-player.local-seat {
  grid-template-columns:66px minmax(0,1fr);
  grid-template-areas:"avatar head" "avatar stats" "avatar score" "set-zone set-zone";
  grid-template-rows:auto auto auto minmax(0,1fr);
  align-content:start;
  gap:3px 8px;
 }
 .layout-v2[data-table-compact] #gameTable > .player.human-player.local-seat > .player-portrait {
  --portrait-scale:.17;
  align-self:start;
  margin:3px 0 0;
 }
 .layout-v2[data-table-compact] #gameTable .player.local-seat .player-head h3 {
  flex-wrap:wrap; overflow:hidden; gap:2px 5px;
 }
 .layout-v2[data-table-compact] #gameTable .player.local-seat .player-head h3 > .player-name {
  max-width:100%; white-space:normal; overflow-wrap:anywhere;
 }
 .layout-v2[data-table-compact] #gameTable .player.local-seat > :is(.player-stats,.player-head-actions) {
  flex-wrap:wrap; gap:2px 4px;
 }
 .layout-v2[data-table-compact] #gameTable .player .set-zone {
  min-width:0; min-height:0; overflow:auto; padding:2px;
  scrollbar-width:thin;
 }
 .layout-v2[data-table-compact] #gameTable .player .set-zone > .sets {
  grid-template-columns:repeat(auto-fit,minmax(min(100%,95px),1fr));
  gap:4px; min-width:0;
 }
 .layout-v2[data-table-compact] #gameTable .player .set-meta strong {
  flex-wrap:wrap; gap:2px; line-height:1.15;
 }
 .layout-v2[data-table-compact] #gameTable .player .set .token-counter { gap:1px; padding:1px 2px; }
 .layout-v2[data-table-compact] #gameTable .player .set .token-counter > .token-pip { width:7px; height:7px; }
 .layout-v2[data-table-compact] #gameTable .player .set-kamons {
  gap:1px; padding-inline:0; min-width:0;
 }
 .layout-v2[data-table-compact] #gameTable .player .set-kamons > :is(.set-kamon,.set-kamon-fallback) {
  width:min(30px,calc((100% - 2px) / 3)); margin-inline:0;
 }
}

.layout-v2[data-table-fit]:not([data-table-fit=""]) #gameTable .player-head h3 {
 font-size:clamp(12px,calc(var(--ui-min) + 2px),20px);
}
.layout-v2[data-table-fit]:not([data-table-fit=""]) #actionPanel .action-title strong {
 font-size:clamp(12px,var(--ui-min),18px);
}

/* Give the opponents the taller row on compact touch tables. */
body.layout-v2.joined-player-hand[data-table-layout="tablet-landscape"][data-table-compact]:not(.landing-active) #tableViewport > main {
 grid-template-rows:clamp(171px,29vh,248px) minmax(64px,var(--center-strip-height)) minmax(0,max-content) minmax(150px,1fr);
}
.layout-v2[data-table-layout="tablet-landscape"] #gameTable > .player {
 position:relative;
}
.layout-v2[data-table-layout="tablet-landscape"] #gameTable > .player > .player-head {
 padding-inline-end:calc(var(--table-touch-target) + 6px);
}
.layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #gameTable > .player.human-player.local-seat {
 grid-template-rows:minmax(var(--table-touch-target),auto) auto minmax(0,1fr);
 grid-template-areas:"avatar head" "avatar stats" "set-zone set-zone";
}
.layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #gameTable > .player.human-player.local-seat > .player-head-actions {
 grid-area:head; justify-self:end; margin-inline-end:calc(var(--table-touch-target) + 6px);
}
.layout-v2.minimal-interface[data-table-layout="tablet-landscape"][data-table-compact] #gameTable > .player.human-player.local-seat > .player-head-actions {
 display:none;
}
.layout-v2:not(.minimal-interface)[data-table-layout="tablet-landscape"][data-table-compact] #gameTable > .player.human-player.local-seat,
.layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #gameTable > .player.human-player.local-seat:has(> .player-head-actions :is([data-show-turn-log],.hand-reveal-toggle)) {
 grid-template-areas:"avatar head" "avatar stats" "score score" "set-zone set-zone";
 grid-template-rows:auto auto auto minmax(0,1fr);
}
.layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #gameTable > .player.human-player.local-seat:has(> .player-head-actions :is([data-show-turn-log],.hand-reveal-toggle)) > .player-head-actions {
 display:flex; grid-area:score; position:static; justify-self:start; margin:0;
}
.layout-v2[data-table-layout="tablet-landscape"] #gameTable > .player > .player-head > .table-zone-toggle {
 position:absolute; inset:4px 4px auto auto; margin:0; z-index:8;
}
.layout-v2[data-table-layout="tablet-landscape"] #tableViewport :is(
 button:not([hidden]), select, .tablet-player-details > summary,
 #minimalActionFilters > summary, .inspector-corner
) {
 min-inline-size:var(--table-touch-target,44px);
 min-block-size:var(--table-touch-target,44px);
 box-sizing:border-box;
}
.layout-v2[data-table-layout="tablet-landscape"] #tableViewport :is(
 .table-zone-toggle,.tablet-action-info
) {
 inline-size:var(--table-touch-target,44px); block-size:var(--table-touch-target,44px);
}
.layout-v2[data-table-layout="tablet-landscape"] #legalActions .tablet-action-row {
 grid-template-columns:minmax(0,1fr) var(--table-touch-target,44px);
}
.layout-v2[data-table-layout="tablet-landscape"] #legalActions .tablet-action-row > .action-button,
.layout-v2[data-table-layout="tablet-landscape"] #legalActions .tablet-action-row .action-button-head {
 padding-inline-end:6px;
}
.layout-v2[data-table-layout="tablet-landscape"] #legalActions .tablet-action-row > .tablet-action-info {
 position:static; align-self:start;
}
.layout-v2[data-table-layout="tablet-landscape"] :is(.set,.card) > .inspector-corner {
 inset:0 0 auto auto; border:0; clip-path:none; background:transparent;
}
.layout-v2[data-table-layout="tablet-landscape"] :is(.set,.card) > .inspector-corner::before {
 content:""; position:absolute; inset:0 0 auto auto; inline-size:18px; block-size:18px;
 background:#171a16d9; clip-path:polygon(0 0,100% 0,100% 100%);
 pointer-events:none;
}
.layout-v2[data-table-layout="tablet-landscape"] #gameTable :is(.player-portrait,.player-stat,summary) {
 flex-shrink:0;
}
.layout-v2[data-table-layout="tablet-landscape"] .center-mark:has(> .table-zone-toggle) {
 padding-inline-end:calc(var(--table-touch-target,44px) + 5px);
}

.layout-v2[data-table-layout="tablet-landscape"] #handPanel .section-heading {
 position:relative; padding-inline-end:calc(var(--table-touch-target) + 6px);
 min-block-size:var(--table-touch-target); flex-wrap:nowrap;
}
.layout-v2[data-table-layout="tablet-landscape"] #handPanel .section-heading > .table-zone-toggle {
 position:absolute; inset:0 0 auto auto;
}
.layout-v2[data-table-layout="tablet-landscape"] #portraitHandFilters {
 display:block; flex:none;
}
.layout-v2[data-table-layout="tablet-landscape"] #portraitHandFilters > summary {
 display:grid; place-items:center; cursor:pointer; list-style:none; min-block-size:var(--table-touch-target);
 min-inline-size:var(--table-touch-target); border:1px solid var(--line); border-radius:5px;
}
.layout-v2[data-table-layout="tablet-landscape"] #portraitHandFilters .minimal-filter-panel {
 position:fixed; z-index:45; max-height:45dvh;
}
.layout-v2[data-table-layout="tablet-landscape"] #portraitHandFilters #sigilHighlights {
 flex-wrap:wrap;
}
.layout-v2[data-table-layout="tablet-landscape"] .table-center-strip .center-mark {
 display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-rows:minmax(0,1fr);
 align-items:center; gap:6px;
}
.layout-v2[data-table-layout="tablet-landscape"] .center-mark .table-match-info {
 display:grid; grid-area:1/1; grid-template-columns:repeat(2,minmax(0,1fr));
 grid-template-rows:auto var(--table-touch-target); gap:2px; min-width:0; align-self:center;
}
.layout-v2[data-table-layout="tablet-landscape"] .center-mark .table-match-copy {
 grid-area:1 / 1 / 2 / -1; display:grid; min-width:0; inset:auto; gap:1px;
}
.layout-v2[data-table-layout="tablet-landscape"] .center-mark .table-match-info > .center-emblem {
 grid-area:2 / 1; margin:0; justify-self:center;
}
.layout-v2[data-table-layout="tablet-landscape"] .center-mark .table-match-info > #tokenSupply {
 grid-area:2 / 2; margin:0; justify-self:center;
}
.layout-v2[data-table-layout="tablet-landscape"] .center-mark .table-deck-rack {
 display:flex; grid-area:1/2; align-items:end; gap:4px;
}
.layout-v2[data-table-layout="tablet-landscape"] .center-mark .table-pile {
 display:grid; grid-template-rows:var(--table-touch-target) var(--table-touch-target); justify-items:center;
}
.layout-v2[data-table-layout="tablet-landscape"] .center-mark .table-pile > .pile-label { align-self:center; }
.layout-v2[data-table-layout="tablet-landscape"] .center-mark .table-pile > :is(.table-deck-back,.discard-pile) {
 width:var(--table-touch-target); height:var(--table-touch-target); padding-block-end:0;
 position:relative; inset:auto; transform:none;
}
.layout-v2[data-table-layout="tablet-landscape"] .center-mark .table-pile > .table-deck-back { padding-block-start:24px; }
.layout-v2[data-table-layout="tablet-landscape"] .center-mark .table-pile > .table-deck-back::before { inset:24px 0 0; }
.layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #gameTable > .player:not(.local-seat) {
 grid-template-rows:minmax(var(--table-touch-target),auto) minmax(var(--table-touch-target),auto) minmax(0,1fr);
}

.layout-v2[data-table-layout="tablet-landscape"] > .topbar :is(button:not([hidden]),select) {
 min-inline-size:44px; min-block-size:44px;
}
.layout-v2[data-table-layout="tablet-landscape"] #gameTable > .player:not(.local-seat) .house-badge:has(.landing-clan-flag) {
 font-size:0; padding-inline:3px;
}

.layout-v2[data-table-layout="tablet-landscape"] > .topbar .brand {
 max-inline-size:170px; gap:6px;
}
.layout-v2[data-table-layout="tablet-landscape"] > .topbar .brand > div { min-width:0; }
.layout-v2[data-table-layout="tablet-landscape"] > .topbar #matchIdBadge { max-inline-size:100%; }

/* Keep the tablet toolbar on one row while preserving its touch targets. */
.layout-v2[data-table-layout="tablet-landscape"] > .topbar:not(:has(> #tournamentTableTitle:not([hidden]))) {
 padding-block:2px; gap:4px;
}
.layout-v2[data-table-layout="tablet-landscape"] > .topbar .brand > div {
 display:flex; align-items:center; gap:2px;
}
.layout-v2[data-table-layout="tablet-landscape"] > .topbar #matchIdBadge {
 font-size:0; padding:0; min-inline-size:44px;
}
.layout-v2[data-table-layout="tablet-landscape"] > .topbar #matchIdBadge::after {
 content:"▣"; font-size:14px;
}
.layout-v2[data-table-layout="tablet-landscape"] > .topbar .mode-tabs {
 margin-inline-start:0; gap:2px; scrollbar-width:none;
}

.layout-v2[data-table-layout="tablet-landscape"] #gameTable > .player.local-seat.sets-6 .set-zone > .sets {
 grid-template-columns:repeat(6,minmax(0,1fr)); gap:3px;
}
.layout-v2[data-table-layout="tablet-landscape"] #gameTable > .player.local-seat.sets-6 .set-zone .set {
 min-width:0;
}
.layout-v2[data-table-layout="tablet-landscape"] main #humanHand,
.layout-v2[data-table-layout="tablet-landscape"] main #humanHand.hand-crowded {
 gap:4px; padding:4px 6px 6px;
}
.layout-v2[data-table-layout="tablet-landscape"] main #humanHand > .card,
.layout-v2[data-table-layout="tablet-landscape"] main #humanHand > .card:not(.has-card-labels):has(.card-sigil) {
 flex:0 0 86px; width:86px; min-width:86px; height:120px; min-height:120px; margin-inline:0;
}
.layout-v2[data-table-layout="tablet-landscape"] main #humanHand > .card.has-card-labels:not(.compact-card) .card-art {
 width:54px!important; height:54px!important;
}

.layout-v2[data-table-layout="tablet-landscape"] {
 --table-tab-width:calc(var(--table-touch-target,44px) * 26 / 44);
}
/* The Set body and its details corner occupy separate columns on touch tables. */
.layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #gameTable .player .sets > .set {
 position:relative; display:grid; --detail-hit:var(--table-tab-width);
 grid-template-columns:minmax(0,1fr) var(--detail-hit);
 grid-template-rows:max(var(--detail-hit),44px);
 min-height:var(--detail-hit); padding:0 0 0 3px; gap:0;
}
.layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #gameTable .player .sets > .set .set-number {
 position:absolute; inset:2px auto auto 3px; font-size:9px; line-height:1;
}
.layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #gameTable .player .sets > .set .set-main {
 grid-area:1/1; width:100%; align-self:center; gap:1px; overflow:hidden;
}
.layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #gameTable .player .sets > .set .set-kamons {
 padding-inline-start:9px; justify-content:flex-start;
}
.layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #gameTable .player .sets > .set .set-meta {
 margin:0; min-width:0;
}
.layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #gameTable .player .sets > .set .set-meta strong {
 font-size:10px; flex-wrap:nowrap; gap:2px;
}
.layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #gameTable .player .sets > .set .token-counter {
 min-width:0; padding:1px 2px;
}
.layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #gameTable .player .sets > .set .token-counter > :is(i,em) { display:none; }
.layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #gameTable .player .sets > .set .token-counter::before {
 content:attr(data-count); font-size:10px; line-height:1;
}
.layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #tableViewport #gameTable .player .sets > .set > .inspector-corner {
 position:relative; grid-area:1/2; inset:auto; border:0; background:transparent; z-index:2; justify-self:end; align-self:start;
 min-inline-size:var(--detail-hit); min-block-size:var(--table-touch-target); inline-size:var(--detail-hit); block-size:var(--table-touch-target);
}
.layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #tableViewport #gameTable .player .sets > .set > .inspector-corner::before {
 inline-size:10px; block-size:10px; background:var(--gold);
}
.layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #gameTable > .player:not(.local-seat) {
 grid-template-rows:38px minmax(var(--table-touch-target),auto) minmax(0,1fr);
}
.layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #gameTable .player:not(.local-seat) .set-zone > .sets {
 grid-template-columns:repeat(3,minmax(0,1fr));
}
.layout-v2.minimal-interface[data-table-layout="tablet-landscape"][data-table-compact] #gameTable > .player.human-player.local-seat:not(:has(> .player-head-actions [data-show-turn-log])) {
 grid-template-columns:64px minmax(0,1fr) auto var(--table-tab-width);
 grid-template-rows:auto minmax(var(--table-touch-target),auto);
 grid-template-areas:"avatar head stats ." "set-zone set-zone set-zone set-zone";
}
.layout-v2.minimal-interface[data-table-layout="tablet-landscape"][data-table-compact] #gameTable > .player.human-player.local-seat:not(:has(> .player-head-actions [data-show-turn-log])) > .player-head {
 padding-inline-end:0;
}
.layout-v2.minimal-interface[data-table-layout="tablet-landscape"][data-table-compact] #gameTable .player.human-player.local-seat > .set-zone {
 margin-inline-end:0;
}
.layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #gameTable .player.local-seat .set-zone > .sets {
 grid-template-columns:repeat(auto-fit,minmax(min(100%,148px),1fr));
}
.layout-v2[data-table-layout="tablet-landscape"] #handPanel > .section-heading #turnBudget {
 align-self:center; flex:1; min-width:0; white-space:nowrap; text-overflow:ellipsis; overflow:hidden;
}

.layout-v2.minimal-interface[data-table-layout="tablet-landscape"][data-table-compact] #gameTable .player.local-seat .house-badge:has(.landing-clan-flag) {
 font-size:0; padding-inline:3px;
}
.layout-v2.minimal-interface[data-table-layout="tablet-landscape"][data-table-compact] #gameTable .player.local-seat .player-identity {
 gap:1px;
}
.layout-v2.minimal-interface[data-table-layout="tablet-landscape"][data-table-compact] #gameTable .player.local-seat .tablet-player-details > summary {
 padding-inline:3px; gap:1px; white-space:nowrap;
}
.layout-v2.minimal-interface[data-table-layout="tablet-landscape"][data-table-compact] #gameTable .player.local-seat .player-stat {
 padding-inline:2px; gap:2px;
}
.layout-v2.minimal-interface[data-table-layout="tablet-landscape"][data-table-compact] #gameTable > .player.human-player.local-seat:not(:has(> .player-head-actions [data-show-turn-log])) {
 grid-template-rows:auto auto; align-items:center;
}

.layout-v2[data-table-layout="tablet-landscape"] .table-center-strip {
 grid-template-columns:minmax(0,1fr) minmax(0,1fr);
}
.layout-v2[data-table-layout="tablet-landscape"] .table-center-strip > .center-mark { grid-area:1 / 1; }
.layout-v2[data-table-layout="tablet-landscape"] .table-center-strip > .table-message-zone {
 position:absolute; inset:0 auto 0 50%; transform:translateX(-50%);
 width:min(38%,420px); border:0; pointer-events:none;
}
.layout-v2[data-table-layout="tablet-landscape"] .table-center-strip > #bannerRail {
 grid-area:1 / 2; min-width:0; padding-inline:8px;
}
.layout-v2[data-table-layout="tablet-landscape"] .center-mark .table-deck-rack {
 gap:clamp(6px,1vw,14px);
}
.layout-v2[data-table-layout="tablet-landscape"] .center-mark .table-pile {
 grid-template-columns:minmax(var(--table-touch-target),60px);
}
.layout-v2[data-table-layout="tablet-landscape"] .center-mark .table-pile > :is(.table-deck-back,.discard-pile) {
 width:100%;
}
.layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #gameTable .player.local-seat > .player-stats {
 align-self:start;
}
.layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #gameTable .player .sets > .set .set-kamons {
 display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:2px;
 width:100%; box-sizing:border-box; height:30px; min-height:0;
}
.layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #gameTable .player .sets > .set .set-kamons > :is(.set-kamon,.set-kamon-fallback) {
 justify-self:center; box-sizing:border-box; width:min(100%,36px); height:30px;
 max-width:100%; max-height:none; margin:0; padding:0; object-fit:contain;
}
@media (min-height:710px) {
 body.layout-v2.joined-player-hand[data-table-layout="tablet-landscape"][data-table-compact]:not(.landing-active) #tableViewport > main {
  grid-template-rows:clamp(240px,34vh,275px) minmax(64px,var(--center-strip-height)) minmax(0,max-content) minmax(150px,1fr);
 }
 .layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #gameTable .player:not(.local-seat) .set-zone > .sets {
  grid-template-columns:repeat(2,minmax(0,1fr));
 }
}

/* Present execution and inspection as one tile with adjacent touch targets. */
.layout-v2.minimal-interface[data-table-layout="tablet-landscape"] #legalActions .tablet-action-row {
 gap:0; border:1px solid var(--line); border-radius:7px; background:var(--panel);
}
.layout-v2.minimal-interface[data-table-layout="tablet-landscape"] #legalActions .tablet-action-row > .action-button {
 border-color:transparent; background:transparent;
}
.layout-v2.minimal-interface[data-table-layout="tablet-landscape"] #legalActions .tablet-action-row > .tablet-action-info {
 border:0; background:transparent; box-shadow:none; padding:2px; text-align:right;
 display:flex; align-items:flex-start; justify-content:flex-end; font-size:11px;
}

.layout-v2[data-table-layout="tablet-landscape"] #actionPanel .section-heading :is(#minimalActionFilters > summary,.table-zone-toggle) {
 display:grid; place-items:center; background:transparent; box-shadow:none; border-color:transparent; padding:0;
}
.layout-v2[data-table-layout="tablet-landscape"] #minimalActionFilters > summary::after { content:none; }

@media (min-height:710px) {
 .layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #gameTable .player:not(.local-seat) .set-zone > .sets {
  height:auto; max-height:none; overflow:visible;
 }
}

@media (min-width:1000px) {
 .layout-v2.minimal-interface[data-table-layout="tablet-landscape"][data-table-compact] #handPanel .section-heading {
  min-height:20px; min-block-size:20px; padding-inline-end:var(--table-touch-target);
 }
 .layout-v2.minimal-interface[data-table-layout="tablet-landscape"][data-table-compact] #handPanel .section-heading-tools {
  position:absolute; inset:var(--table-touch-target) 0 auto auto; z-index:2;
 }
 .layout-v2.minimal-interface[data-table-layout="tablet-landscape"][data-table-compact] #handPanel .hand-content {
  margin-inline-end:calc(var(--table-tab-width) + 2px);
 }
 .layout-v2[data-table-layout="tablet-landscape"][data-table-compact] .table-center-strip {
  grid-template-columns:minmax(0,36fr) minmax(0,29fr) minmax(0,35fr);
 }
 .layout-v2[data-table-layout="tablet-landscape"][data-table-compact] .table-center-strip > .table-message-zone {
  grid-area:1/2; position:static; transform:none; width:auto;
 }
 .layout-v2[data-table-layout="tablet-landscape"][data-table-compact] .table-center-strip > #bannerRail { grid-area:1/3; }
 .layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #tableNotices {
  grid-template-columns:minmax(0,1fr); gap:2px;
 }
 .layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #tableNotices > :is(.match-notice,#toast,.round-banner) {
  min-width:0; max-width:100%; padding:4px 8px; font-size:13px; line-height:1.2; white-space:normal;
 }
 .layout-v2[data-table-layout="tablet-landscape"][data-table-compact] #tableNotices .match-notice strong { font-size:15px; }
 .layout-v2.minimal-interface[data-table-layout="tablet-landscape"][data-table-compact] #legalActions .tablet-action-row {
  grid-template-columns:minmax(0,1fr) var(--table-tab-width);
 }
 .layout-v2.minimal-interface[data-table-layout="tablet-landscape"][data-table-compact] #tableViewport #legalActions .tablet-action-info {
  min-inline-size:0; inline-size:100%;
 }
}

@media (min-width:1000px) {
 .layout-v2.minimal-interface[data-table-layout="tablet-landscape"][data-table-compact] main #humanHand {
  column-gap:2px; padding-inline:2px;
 }
 .layout-v2.minimal-interface[data-table-layout="tablet-landscape"][data-table-compact] main #humanHand > .card:has(~ .card) {
  margin-inline-end:-8px;
 }
 .layout-v2.minimal-interface[data-table-layout="tablet-landscape"][data-table-compact] #humanHand .hand-preview-slot {
  flex-basis:34px; height:54px; padding:2px; font-size:10px; overflow-wrap:anywhere;
 }
}

.layout-v2[data-table-layout="tablet-landscape"] #tableViewport :is(.table-zone-toggle,.tablet-action-info,#portraitHandFilters > summary,#minimalActionFilters > summary,.card > .inspector-corner) {
 box-sizing:border-box; inline-size:var(--table-tab-width); min-inline-size:var(--table-tab-width); padding-inline:0;
}
.layout-v2[data-table-layout="tablet-landscape"] #legalActions .tablet-action-row {
 grid-template-columns:minmax(0,1fr) var(--table-tab-width);
}
@media (min-width:1000px) {
 .layout-v2.minimal-interface[data-table-layout="tablet-landscape"][data-table-compact] #humanHand .hand-preview-slot:not(.action-route-target) {
  display:none;
 }
 .layout-v2.minimal-interface[data-table-layout="tablet-landscape"][data-table-compact] #humanHand .card.has-card-labels .card-art {
  width:58px!important; height:58px!important;
 }
 .layout-v2.minimal-interface[data-table-layout="tablet-landscape"][data-table-compact] #humanHand .card-label-sigil {
  grid-template-columns:21px minmax(0,1fr);
 }
 .layout-v2.minimal-interface[data-table-layout="tablet-landscape"][data-table-compact] #humanHand .card-label-sigil .sigil-art {
  width:21px; height:14px;
 }
}
