/* Indices en ligne, lisibles même lorsque les cartes se recouvrent. */
.card .corner small { display:inline; margin-left:2px; }
.game-surface .card.small .corner { left:2px; top:3px; font-size:11px; white-space:nowrap; }
.game-surface .card.small .corner small { display:inline; font-size:9px; margin-left:1px; }
.discard-mode-cards .game-surface .discards { height:128px!important; max-height:128px!important; min-height:128px!important; grid-auto-rows:24px; row-gap:0; padding-bottom:28px; }
.discard-mode-cards .game-surface .discards .card.small { height:48px; }
.discard-mode-compact .game-surface .discards { height:108px!important; max-height:108px!important; min-height:108px!important; grid-auto-rows:22px; row-gap:3px; padding-bottom:4px; }
.discard-mode-compact .game-surface .discards .card.small { height:22px; box-shadow:none; border-radius:3px; }
.discard-mode-compact .discards .pip,.discard-mode-compact .discards .card-foot { display:none; }
.discard-mode-compact .game-surface .discards .corner { position:static; padding:3px 2px; display:block; text-align:center; font-size:13px; line-height:14px; }
.discard-mode-compact .game-surface .discards .corner small { font-size:11px; }
.game-surface .card-backs { height:24px; min-height:24px; flex-wrap:nowrap; overflow:hidden; }
.game-surface .card-back { height:24px; flex-shrink:1; }
.game-surface .group-list { height:20px; min-height:20px; flex-wrap:nowrap; overflow:auto; }
.game-surface .group-list>span { white-space:nowrap; }
.kami-stick-slot { height:22px; min-height:22px; }
.kami-stick-slot .kami-stick,.game-surface .own-discards>.kami-stick-slot .kami-stick { margin:6px auto; }
.game-surface .own-groups { height:30px; flex-wrap:nowrap; overflow:auto; }
.game-surface .hand { min-height:120px; height:120px; flex-wrap:nowrap; justify-content:safe center; align-items:center; padding:16px 12px 20px; overflow-x:auto; overflow-y:hidden; }
.game-surface .hand-card { flex-shrink:0; transform:translateY(var(--fan-y,0)); }
.game-surface .hand-card+.hand-card { margin-left:-12px; }
.game-surface .hand-card.just-drawn { margin-left:18px!important; }
.hand-layout-fan .game-surface .hand-card { transform:translateY(var(--fan-y,0)) rotate(var(--fan-angle,0deg)); transform-origin:50% 100%; }
.hand-layout-fan .game-surface .hand-card:hover,.hand-layout-fan .game-surface .hand-card.selected { transform:translateY(calc(var(--fan-y,0px) - 10px)) rotate(var(--fan-angle,0deg)); z-index:2; }
.hand-layout-overlap .game-surface .hand-card:hover,.hand-layout-overlap .game-surface .hand-card.selected { transform:translateY(-10px); z-index:2; }
.game-surface .hand-card.locked:hover { transform:translateY(var(--fan-y,0)) rotate(var(--fan-angle,0deg)); }
.game-surface .action-rail { height:190px; max-height:190px; overflow:auto; padding:3px; }
.game-surface .action-rail .status { flex-shrink:0; }
.game-surface .action-rail .actions { flex-shrink:0; max-height:none; }
.game-surface .table-center { flex-direction:column; gap:5px; }
.forest-total { display:flex; justify-content:center; align-items:baseline; gap:7px; font:12px Arial,sans-serif; margin:0; }
.forest-total strong { font:21px Georgia,serif; min-width:2ch; }
.forest-total small { font-size:10px; }
.forest-cross { display:grid; grid-template-columns:40px 68px 40px; grid-template-rows:20px 40px 20px; gap:4px; width:156px; height:88px; }
.forest-pile { display:flex; justify-content:center; align-items:center; gap:5px; font:10px Arial,sans-serif; }
.pile-north { grid-column:2; grid-row:1; }
.pile-south { grid-column:2; grid-row:3; }
.pile-west { grid-column:1; grid-row:2; }
.pile-east { grid-column:3; grid-row:2; }
.pile-back { width:13px; height:18px; background:repeating-linear-gradient(45deg,#345644 0px,#345644 3px,#587557 3px,#587557 4px); border:1px solid #c4c6a5; border-radius:2px; box-shadow:2px 1px #ced0ad,4px 2px #6c8065; }
.pile-back.empty { background:none; border-style:dashed; opacity:.45; box-shadow:none; }
.central-indicator { grid-row:2; grid-column:2; display:flex; align-items:center; justify-content:center; }
.central-indicator>span:not(.card) { display:none; }
.indicator-caption { font:9px Arial,sans-serif; }
.extra-indicators { height:38px; min-height:38px; display:flex; gap:4px; align-items:center; justify-content:center; }
.extra-indicators .card.small { height:34px; width:24px; }
.extra-indicators .small .pip { font-size:13px; top:16px; }
.game-surface .table-center .pot { margin:0; min-height:14px; }
.capture-slot { height:56px; min-height:56px; width:100%; display:flex; justify-content:center; align-items:center; }
.capture-slot .capture-offer { margin:0; gap:8px; }
.capture-slot .capture-offer>span { max-width:90px; font-size:11px; }
.capture-slot .capture-offer .card.small { width:34px; height:48px; }
.capture-slot .capture-offer .small .pip { top:21px; }
.briefing-dialog { width:min(650px,calc(100% - 28px)); }
.briefing-summary { font:14px/1.7 Arial,sans-serif; }
.briefing-dialog .actions { margin-bottom:0; justify-content:flex-end; }
.standings .winner { background:#e9efd9; }
.winner-label { display:inline-block; margin-left:9px; font-size:10px; color:#43633d; }
@media(max-width:760px) {
 .game-surface .table-center { flex-direction:column; }
 .game-surface .hand { padding-left:5px; padding-right:5px; }
}
@media(max-width:520px) {
 .game-surface .action-rail { height:160px; max-height:160px; }
 .game-surface .hand { height:108px; min-height:108px; }
 .briefing-dialog .score-lines>div { flex-wrap:wrap; gap:5px; }
}
@media(prefers-reduced-motion:reduce) { .game-surface .hand-card { transition:none; } }

/* La défausse personnelle reste devant la Main, sans ajouter une troisième
   rangée au plateau central. Les informations restent dans des zones réservées. */
@media(min-width:761px) { .game-table .seat.west,.game-table .seat.east { grid-row:1/3; } }
.game-surface .player-heading { display:grid; grid-template-columns:minmax(0,1fr) 250px auto; align-items:center; gap:12px; }
.game-surface .player-heading .own-discards { position:static; transform:none; width:250px; margin:0; grid-row:auto; grid-column:auto; text-align:center; }
.game-surface .player-heading .own-discards>span { display:block; font:11px Arial,sans-serif; color:#fff3dd; margin-bottom:4px; }
.game-surface .seat-title { padding:4px 8px; }
.game-surface .seat-title .portrait { width:24px; height:24px; flex-basis:24px; }
.game-surface .seat-title small { margin-top:2px; font-size:9px; }
.game-surface .card-backs { height:18px; min-height:18px; margin:4px 0; }
.game-surface .card-back { height:18px; }
.game-surface .group-list { height:14px; min-height:14px; font-size:10px; }
.game-surface .discard-label { margin:4px 0 3px; font-size:10px; }
.kami-stick-slot { height:14px; min-height:14px; }
.kami-stick-slot .kami-stick { margin:2px auto; }
.game-surface .own-groups { height:24px; margin-top:0; }
.game-surface .own-groups span { padding:2px 6px; font-size:12px; line-height:16px; white-space:nowrap; }
.game-surface .hand { height:130px; min-height:130px; }
.game-surface .action-rail { height:154px; max-height:154px; }
.game-surface .action-rail { position:relative; gap:6px; overflow-x:hidden; }
.hand-play-area { grid-template-columns:minmax(0,1fr) 230px; }
.game-surface .action-rail .status { display:block; font-size:11px; line-height:1.4; }
.game-surface .action-rail .status-dot { display:none; }
.game-surface .action-rail .timer { display:inline-block; margin:3px 0 0 4px; padding:3px 5px; }
.game-surface .action-rail:has(.capture-offer) .status { padding-right:42px; min-height:48px; }
.game-surface .action-rail .capture-slot { position:absolute; z-index:4; top:6px; right:8px; width:36px; height:48px; min-height:0; }
.game-surface .action-rail .capture-offer>span:not(.card) { display:none; }
.game-surface .action-rail .actions { gap:5px; }
.game-surface .action-rail button { min-height:30px; padding:7px 9px; }
.game-surface .action-rail .status { position:sticky; top:0; z-index:3; background:var(--felt-dark); }
.game-surface .action-rail .capture-slot:empty { height:0; min-height:0; }
.game-surface .action-rail .extra-indicators { height:auto; min-height:0; max-height:38px; }
.app-shell.discard-mode-compact .game-surface .discards { height:80px!important; min-height:80px!important; max-height:80px!important; grid-auto-rows:16px; row-gap:2px; }
.discard-mode-compact .game-surface .discards .card.small { height:16px; }
.discard-mode-compact .game-surface .discards .corner { padding:1px; font-size:12px; line-height:12px; }
.discard-mode-compact .game-surface .discards .corner small { font-size:10px; }
.forest-cross { grid-template-rows:16px 30px 16px; height:70px; }
.central-indicator .card.small { width:24px; height:34px; }
.central-indicator .small .pip { font-size:15px; top:14px; }
.table-auto .game-surface,.table-compact .game-surface { padding-bottom:10px; }
.table-auto .game-surface .game-table,.table-compact .game-surface .game-table { padding:4px; }
.app-shell.table-auto .game-surface .player-zone,.app-shell.table-compact .game-surface .player-zone { padding-top:8px; padding-bottom:4px; margin-top:0; }
.table-compact .game-surface .hand { height:110px; min-height:110px; }
.table-compact .game-surface .hand .card { --hand-card:clamp(43px,3.7vw,52px); }
.table-compact .game-surface .action-rail { height:134px; max-height:134px; }
.table-compact .game-surface .card-backs { height:12px; min-height:12px; margin:2px 0; }
.table-compact .game-surface .card-back { height:12px; }
@media(min-width:761px) { .game-surface .player-heading { grid-template-columns:minmax(0,1fr) 250px minmax(0,1fr); } .game-surface .position-badge { justify-self:end; } }
@media(max-width:760px) {
 .hand-play-area { grid-template-columns:minmax(0,1fr) 180px; }
 .game-surface .player-heading { grid-template-columns:minmax(0,1fr) auto; }
 .game-surface .player-heading .own-discards { grid-row:2; grid-column:1/3; justify-self:center; }
 .game-surface .hand { height:120px; min-height:120px; }
}
@media(max-width:520px) { .hand-play-area { grid-template-columns:1fr; } }

/* Repérer les exemplaires de la carte sélectionnée, sans déplacer les défausses. */
.app-shell .game-surface .discards .card.small.matching-discard {
  background:#fff0ad;
  border-color:#987026;
}
.app-shell .game-surface .discards .card.small.matching-discard:not(.capturable) {
  outline:2px solid #ffcf59;
  outline-offset:-2px;
  box-shadow:inset 0 0 0 1px #fff8dc,0 0 6px #ffd87380;
}
