/* ═══════════════════════════════════════════════════════
   LA CHOUETTE – LIVE  |  Design "Taverne & Bois"
   Layout mobile plein écran : plateau full-width
   Police : Cinzel (titres) + Nunito (texte)
═══════════════════════════════════════════════════════ */

:root {
  --wood-dark:  #3b1c08;
  --wood-mid:   #7a3f18;
  --wood-light: #b06030;
  --wood-edge:  #5c2e0e;
  --felt:       #0f3a2f;
  --felt-light: #1a5040;
  --triangle-dark:  rgba(58,22,6,.75);
  --triangle-light: rgba(245,225,180,.80);
  --gold:       #d4a94a;
  --gold-light: #f0cc72;
  --gold-dark:  #9a6e1c;
  --ivory:      #f5ead0;
  --red:        #b82b1c;
  --red-light:  #e03522;
  --green-chip: #2e7d32;
  --text:       #f0e8d0;
  --muted:      #7a9a8a;
  --panel-bg:   rgba(10,35,25,.85);
  --panel-border: rgba(200,170,100,.25);
  --shadow-deep: 0 8px 32px rgba(0,0,0,.55);
  --checker-box-top:   #f0ead8;
  --checker-box-bot:   #cec4a4;
  --checker-cap-top:   #5dc45a;
  --checker-cap-bot:   #2a7a28;
  --touch-min: 44px;
  --bottom-bar-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { touch-action: manipulation; background-color: #0e0b07; }

body {
  font-family: 'Nunito', sans-serif;
  background-color: #0e0b07;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 0%, #2a1a08 0%, transparent 70%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23c9954a' fill-opacity='0.018'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  overflow-x: hidden;
}

/* ══════════════ BOUTONS ══════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  min-height: var(--touch-min);
  border-radius: 10px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  border: none;
  transition: filter .15s, transform .1s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.95); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-gold {
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold-dark) 100%);
  color: #1a0e00;
  box-shadow: 0 3px 10px rgba(0,0,0,.35);
}
.btn-gold:hover { filter: brightness(1.1); }
.btn-danger {
  background: linear-gradient(180deg, #e03522, #8a1a10);
  color: #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,.35);
}
.btn-danger:hover { filter: brightness(1.1); }
.btn-ghost {
  background: rgba(255,255,255,.09);
  color: var(--text);
  border: 1px solid var(--panel-border);
}
.btn-ghost:hover { background: rgba(255,255,255,.14); }
.btn-sm { padding: 8px 12px; font-size: .82rem; min-height: 38px; }
.btn-full { width: 100%; margin-top: 0; }

/* ══════════════════════════════════════════════════════
   LAYOUT MOBILE (< 1200px) — PLATEAU PLEIN ÉCRAN
══════════════════════════════════════════════════════ */

.game-layout {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100dvh;
  padding-bottom: var(--bottom-bar-h);
}

.player-strip {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(10,35,25,.92);
  border-bottom: 1px solid var(--panel-border);
  min-height: 52px;
  flex-shrink: 0;
}
.player-strip.captain-strip {
  border-bottom: none;
  border-top: 1px solid var(--panel-border);
}
.strip-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(145deg, #f5e3bf, #c49655);
  color: #1c0e04;
  font-family: 'Cinzel', serif;
  font-size: .9rem;
  font-weight: 900;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}
.strip-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.strip-avatar.cap { background: linear-gradient(145deg, #6de069, #2a7a28); color: #fff; }
.strip-info { flex: 1; min-width: 0; }
.strip-name {
  font-family: 'Cinzel', serif;
  font-size: .82rem;
  font-weight: 700;
  color: var(--ivory);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.strip-role {
  font-size: .75rem;
  color: var(--muted);
  font-style: italic;
}
.strip-cube {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.strip-cube img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.4));
}
.strip-cube-label {
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  font-weight: 700;
  color: var(--gold-light);
}
.strip-score {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 900;
  color: var(--gold);
  min-width: 24px;
  text-align: right;
}
.strip-leave {
  font-size: 1.1rem;
  opacity: .5;
  text-decoration: none;
  padding: 4px;
  -webkit-tap-highlight-color: transparent;
}
.strip-leave:hover { opacity: 1; }

.player-strip.active-turn {
  background: rgba(20,60,40,.95);
  border-color: rgba(93,196,90,.5);
  box-shadow: 0 0 12px rgba(93,196,90,.2);
}
.player-strip.active-turn.box-strip {
  border-color: rgba(245,234,208,.4);
  box-shadow: 0 0 12px rgba(245,234,208,.15);
}

.center-stage {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.turn-banner-mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  background: rgba(10,35,25,.85);
  gap: 8px;
  flex-shrink: 0;
}
.game-title-mobile {
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.round-badge-mobile {
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
}

.dice-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 6px 0;
  align-items: center;
  background: rgba(10,35,25,.7);
  flex-shrink: 0;
  min-height: 64px;
}
.die {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(145deg, #f7eed9, #d8c8a8);
  color: #1a0e00;
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.65), 0 5px 14px rgba(0,0,0,.5);
  border: 2px solid rgba(180,140,60,.3);
  animation: dieIn .25s ease;
}
@keyframes dieIn {
  from { transform: scale(.7) rotate(-15deg); opacity:0; }
  to   { transform: scale(1) rotate(0deg);  opacity:1; }
}

#bearoff-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: 'Cinzel', serif;
  padding: 4px 0;
  background: rgba(10,35,25,.7);
  flex-shrink: 0;
}
#bearoff-toggle > div:first-child {
  font-size: .62rem !important;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}
#btn-bearoff-left,
#btn-bearoff-right {
  min-height: 36px !important;
  padding: 5px 14px !important;
  font-size: .72rem !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  border: 1px solid var(--panel-border) !important;
}

.board-outer {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 3px;
  padding: 2px 3px 3px;
  background: rgba(10,35,25,.6);
  overflow: visible;
}
.board-wrap {
  width: 100%;
  min-width: 0;
  border-radius: 6px;
  overflow: visible;
  box-shadow: 0 8px 32px rgba(0,0,0,.8);
  align-self: center;
  flex-shrink: 0;
  position: relative;
}
/* trait central : rebords via board-wrap::after, plateau via .board::after */
.board-wrap::after {
  content: '';
  position: absolute;
  top: -24px; bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: #0d0a06;
  z-index: 0;
  pointer-events: none;
}



/* off-col : caché sur mobile, app.js place les cartes directement */
.off-col { display: none; }

.off-card {
  width: calc((4 / 13) * 100% - 6px);
  background: linear-gradient(135deg, var(--wood-mid), var(--wood-dark));
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,.5);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  padding: 2px 6px;
  flex-shrink: 0;
  box-sizing: border-box;
  margin: 2px 0;
  min-height: 0;
  max-height: 24px;
}
.off-card.target { outline: 2px solid #5dc45a; outline-offset: -2px; }
.off-spacer { flex-shrink: 0; background: linear-gradient(135deg, var(--wood-mid), var(--wood-dark)); border-radius: 6px; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.center-line {
  display: block;
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  background: #0d0a06;
  z-index: 20;
  pointer-events: none;
}
.off-card.drag-over { outline: 3px solid #fff; outline-offset: -3px; }
.off-lbl { display: none; }
.off-num {
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  flex-shrink: 0;
}
.off-checkers {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 1px;
  overflow: hidden;
  max-height: 24px;
  flex: 1;
}
.off-checker-slice {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.off-checker-slice.box {
  background: radial-gradient(circle at 35% 35%, #f0ead8, #cec4a4);
  box-shadow: 0 1px 2px rgba(0,0,0,.4);
}
.off-checker-slice.captain {
  background: radial-gradient(circle at 35% 35%, #5dc45a, #2a7a28);
  box-shadow: 0 1px 2px rgba(0,0,0,.4);
}
.off-checker-slice::before, .off-checker-slice::after { display: none; }

.board {
  background: var(--wood-mid);
  padding: 10px 10px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
}
.board::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: #0d0a06;
  z-index: 1;
  pointer-events: none;
}
body.phase-role-selection .board::after,
body.phase-role-selection .board-wrap::after,
body.phase-initial-roll .board::after,
body.phase-initial-roll .board-wrap::after,
body.phase-round-finished .board::after,
body.phase-round-finished .board-wrap::after,
body.phase-finished .board::after,
body.phase-finished .board-wrap::after {
  display: none;
}


.board-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr) 26px repeat(6, 1fr);
  gap: 0;
  min-height: 110px;
}
.board-divider {
  height: 28px;
  background: linear-gradient(180deg, var(--wood-dark), var(--wood-mid), var(--wood-dark));
  margin: 1px 0;
  border-radius: 3px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.5);
  position: relative;
  display: flex;
  align-items: center;
}
.board-brand {
  position: absolute;
  display: flex;
  align-items: center;
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  font-weight: 700;
  color: rgba(248, 226, 180, .55);
  letter-spacing: .08em;
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
}
.board-brand-left  { left: 25%; transform: translateX(-50%); }
.board-brand-right { left: 75%; transform: translateX(-50%); }
.point-labels-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr) 26px repeat(6, 1fr);
  gap: 0;
  padding: 1px 0;
  background: var(--wood-mid);
}
.point-label-num {
  text-align: center;
  font-size: .55rem;
  color: rgba(255,255,255,.65);
  font-weight: 700;
  pointer-events: none;
  line-height: 1.4;
}
.point-label { display: none; }

.bar-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: #c8aa82;
  border-radius: 0;
  gap: 3px;
  padding: 3px 2px;
  cursor: default;
  box-shadow: inset 2px 0 4px rgba(0,0,0,.5), inset -2px 0 4px rgba(0,0,0,.5);
  position: relative;
}

.bar-hinge-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}
.bar-hinge {
  width: 26px;
  height: 52px;
  background: url('/chouette_live/public/img/hinge.webp') center/cover no-repeat;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(0,0,0,.9);
}
.bar-hinge::before, .bar-hinge::after { display: none; }
.bar-hinge-sep { display: none; }
.bar-hinge-gap { display: none; }
.bar-center.inverted { justify-content: flex-end; }
.bar-center.target { outline: 3px solid #5dc45a; outline-offset: -3px; }
.point.target-combined { outline: 3px solid #e07820; outline-offset: -3px; background: rgba(224,120,32,.15); }
.bar-center.clickable { cursor: pointer; box-shadow: inset 0 0 0 2px rgba(214,177,94,.5); }
.bar-center.clickable:hover { box-shadow: inset 0 0 0 3px var(--gold); }
.bar-title { font-family: 'Cinzel', serif; font-size: .5rem; font-weight: 700; color: #3b1c08; letter-spacing: .05em; }
.bar-pills { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.bar-checkers { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.bar-pill { font-size: .55rem; color: var(--muted); background: rgba(255,255,255,.07); border-radius: 999px; padding: 1px 3px; white-space: nowrap; }

.point {
  position: relative;
  min-height: 110px;
  overflow: hidden;
  border: none;
  background: var(--wood-mid);
  cursor: pointer;
  padding: 0;
  min-width: 20px;
}
.point::before {
  content: '';
  position: absolute;
  left: 10%; right: 10%; top: 0; bottom: 25%;
  clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
  transition: opacity .15s;
}
.point.inverted::before { top: 25%; bottom: 0; clip-path: polygon(50% 0%, 0% 100%, 100% 100%); }
.point.dark::before  { background: var(--triangle-dark); }
.point.light::before { background: var(--triangle-light); }
.point.selected { box-shadow: inset 0 0 0 2px var(--gold); border-radius: 4px; }
.point.target   { box-shadow: inset 0 0 0 2px #5dc45a;    border-radius: 4px; }
.point.drag-over { box-shadow: inset 0 0 0 3px #fff; border-radius: 4px; background: rgba(255,255,255,.12); }
.off-card.drag-over { outline: 3px solid #fff; outline-offset: -3px; }
.point.clickable::after {
  content: ''; position: absolute; inset: 0;
  background: transparent; border-radius: 4px; pointer-events: none;
}

.tokens {
  position: absolute; left: 0; right: 0;
  display: flex; flex-direction: column;
  align-items: center; gap: 2px; z-index: 2; padding: 2px 0;
}
.tokens.top    { top: 0; }
.tokens.bottom { bottom: 0; }
.checker {
  width: 20px; height: 20px;
  border-radius: 50%; flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,.5);
  border: none;
  background-size: cover;
  background-repeat: no-repeat;
}
.checker.box {
  background: radial-gradient(circle at 35% 35%, var(--checker-box-top), var(--checker-box-bot));
}
.checker.captain {
  background: radial-gradient(circle at 35% 35%, var(--checker-cap-top), var(--checker-cap-bot));
}
/* Pions WebP — gérés dynamiquement par app.js selon les préférences du joueur */
.checker-extra { font-size: .6rem; color: rgba(255,255,255,.85); font-weight: 700; text-align: center; }

.move-footer {
  display: flex; align-items: center;
  padding: 4px 6px;
  background: rgba(10,35,25,.85);
  border-top: 1px solid var(--panel-border);
  flex-shrink: 0;
}
.move-footer-inner {
  display: flex; align-items: center;
  gap: 8px; background: #fff;
  border: 1px solid rgba(214,177,94,.25);
  border-radius: 7px; padding: 5px 10px; flex: 1;
}
.move-info { color: #5a4030; font-size: .6rem; flex: 1; line-height: 1.2; }
.winner-chip {
  font-family: 'Cinzel', serif; font-weight: 700; font-size: .82rem;
  color: var(--gold); background: rgba(212,169,74,.15);
  border: 1px solid var(--gold-dark); border-radius: 999px; padding: 4px 12px;
  animation: pulseGold 1.5s ease-in-out infinite;
}
@keyframes pulseGold {
  0%,100% { box-shadow: 0 0 0 0 rgba(212,169,74,.4); }
  50%      { box-shadow: 0 0 0 8px rgba(212,169,74,0); }
}

/* ══════════════════════════════════════════════════════
   GAME HEADER (portrait mobile)
══════════════════════════════════════════════════════ */
.game-header {
  display: flex;
  align-items: center;
  height: 52px;
  background: rgba(10,35,25,.97);
  border-bottom: 1px solid var(--panel-border);
  padding: 0 8px;
  flex-shrink: 0;
  gap: 6px;
  z-index: 100;
}
.gh-player {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  min-width: 0;
}
.gh-player.me { flex-direction: row-reverse; }
.gh-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(145deg, #f5e3bf, #c49655);
  color: #1c0e04;
  font-family: 'Cinzel', serif;
  font-size: .82rem;
  font-weight: 900;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}
.gh-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.gh-avatar.me-av { background: linear-gradient(145deg, #6de069, #2a7a28); color: #fff; }
.gh-info { flex: 1; min-width: 0; }
.gh-player.me .gh-info { text-align: right; }
.gh-name {
  font-family: 'Cinzel', serif;
  font-size: .7rem;
  font-weight: 700;
  color: var(--ivory);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gh-role {
  font-size: .6rem;
  color: var(--muted);
  font-style: italic;
}
.gh-score {
  font-family: 'Cinzel', serif;
  font-size: .95rem;
  font-weight: 900;
  color: var(--gold);
  flex-shrink: 0;
}
.gh-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 1px;
  min-width: 64px;
}
.gh-cube {
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  font-weight: 900;
  color: var(--gold-light);
  line-height: 1;
}
.gh-cube-max {
  font-family: 'Cinzel', serif;
  font-size: .52rem;
  font-weight: 700;
  color: var(--gold-dark);
  white-space: nowrap;
}
.gh-round {
  font-family: 'Cinzel', serif;
  font-size: .55rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.game-header.active-opp .gh-player.opp .gh-name { color: #5dc45a; }
.game-header.active-me  .gh-player.me  .gh-name { color: #5dc45a; }

/* ══════════════════════════════════════════════════════
   BOTTOM BAR
══════════════════════════════════════════════════════ */
.bottom-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-bar-h);
  background: rgba(10,25,20,.97);
  border-top: 1px solid var(--panel-border);
  display: flex;
  z-index: 300;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: 'Cinzel', serif;
  font-size: .58rem;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color .15s, background .15s;
  padding: 6px 4px;
}
.bottom-tab .tab-icon { font-size: 1.2rem; line-height: 1; }
.bottom-tab.active {
  color: var(--gold-light);
  background: rgba(214,177,94,.1);
  border-top: 2px solid var(--gold);
}

/* ══════════════════════════════════════════════════════
   PANELS SECONDAIRES
══════════════════════════════════════════════════════ */
.side-panel {
  display: none;
  flex-direction: column;
  gap: 12px;
  background: transparent;
  border-top: none;
  padding: 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 55vh;
}
.side-panel.panel-open { display: flex; }
.mobile-tabs { display: none !important; }
#landscape-left, #landscape-right { display: none; }

.player-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fdfbf0;
  background-image: radial-gradient(#eceae0 1px, transparent 1px);
  background-size: 20px 20px;
  border: none;
  border-radius: 20px;
  padding: 10px 12px;
  box-shadow: 0 0 0 2px #3d2008, 0 0 0 4px #8a5f20, 0 0 0 6px #3d2008, 0 8px 20px rgba(0,0,0,.6);
  color: #1a0e04;
  margin-bottom: 5px;
}
.box-header { border-top: none; }
.captain-header { border-top: 3px solid var(--checker-cap-top); }
.player-header.active-turn {
  outline-offset: 2px; transform: scale(1.02);
  transition: transform .2s, box-shadow .2s; z-index: 2; position: relative;
}
.box-header.active-turn { box-shadow: 0 0 0 2px #3d2008, 0 0 0 4px #8a5f20, 0 0 0 6px #3d2008, 0 0 14px rgba(245,234,208,.4), 0 8px 20px rgba(0,0,0,.6); }
.captain-header.active-turn { box-shadow: 0 0 0 2px #3d2008, 0 0 0 4px #8a5f20, 0 0 0 6px #3d2008, 0 0 14px rgba(93,196,90,.4), 0 8px 20px rgba(0,0,0,.6); }

.player-avatar {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: linear-gradient(145deg, #f5e3bf, #c49655);
  color: #1c0e04; font-family: 'Cinzel', serif;
  font-size: 1.1rem; font-weight: 900;
  display: grid; place-items: center; flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0,0,0,.4); overflow: hidden;
}
.player-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.captain-avatar { background: linear-gradient(145deg, #6de069, #2a7a28); color: #fff; }
.player-info-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.player-info { display: flex; align-items: baseline; gap: 4px; overflow: hidden; }
.player-cube-row { display: flex; align-items: center; padding-left: 2px; margin-top: -4px; margin-left: -6px; }
.cube-die-img { width: 36px; height: 36px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }
.player-name { font-family: 'Cinzel', serif; font-size: .88rem; font-weight: 700; color: #1a0e04; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; min-width: 0; }
.player-role { font-family: 'Nunito', sans-serif; font-size: .7rem; font-weight: 400; font-style: italic; color: #7a5c2e; white-space: nowrap; flex-shrink: 0; }
.player-header .player-name span { color: #1a0e04; }
.player-score { font-family: 'Cinzel', serif; font-size: 1.1rem; font-weight: 900; color: var(--gold-dark); text-shadow: none; min-width: 28px; text-align: right; }

.resolve-block {
  background: #fdfbf0;
  background-image: radial-gradient(#eceae0 1px, transparent 1px);
  background-size: 20px 20px;
  border: none;
  border-radius: 20px;
  box-shadow: 0 0 0 2px #3d2008, 0 0 0 4px #8a5f20, 0 0 0 6px #3d2008, 0 8px 20px rgba(0,0,0,.6);
  padding: 12px;
  display: flex; flex-direction: column; gap: 8px; color: #1a0e04;
  margin-bottom: 5px;
}
.resolve-title { font-family: 'Cinzel', serif; font-size: .85rem; color: var(--gold) !important; font-weight: 700; margin-bottom: 2px; }

.duels-block {
  background: #fdfbf0;
  background-image: radial-gradient(#eceae0 1px, transparent 1px);
  background-size: 20px 20px;
  border: none;
  border-radius: 20px;
  box-shadow: 0 0 0 2px #3d2008, 0 0 0 4px #8a5f20, 0 0 0 6px #3d2008, 0 8px 20px rgba(0,0,0,.6);
  padding: 12px; flex: 1;
  overflow-y: auto; -webkit-overflow-scrolling: touch; color: #1a0e04;
  margin-bottom: 5px;
}
.duels-title { font-family: 'Cinzel', serif; font-size: .85rem; color: var(--gold) !important; font-weight: 700; margin-bottom: 8px; }
.global-offer-wrap { background: rgba(255,255,255,.04); border: 1px solid var(--panel-border); border-radius: 10px; padding: 8px; margin-bottom: 8px; }
.global-note { color: #1c1c1c !important; font-size: .82rem; }
.global-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.global-tag { padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid var(--panel-border); font-size: .75rem; color: var(--muted); }
.duel-card { background: rgba(255,255,255,.04); border: 1px solid var(--panel-border); border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; }
.duel-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.duel-name { font-weight: 700; font-size: .9rem; color: #1c1c1c !important; }
.duel-badge { background: linear-gradient(180deg, var(--gold-light), var(--gold-dark)); color: #1a0e00; font-weight: 900; font-size: .8rem; padding: 3px 10px; border-radius: 999px; font-family: 'Cinzel', serif; }
.duel-status-text { font-size: .78rem; color: #1c1c1c !important; margin-bottom: 6px; }
.duel-btns { display: flex; flex-wrap: wrap; gap: 4px; }

.team-block { background: #fdfbf0; background-image: radial-gradient(#eceae0 1px, transparent 1px); background-size: 20px 20px; border: none; border-radius: 20px; box-shadow: 0 0 0 2px #3d2008, 0 0 0 4px #8a5f20, 0 0 0 6px #3d2008, 0 8px 20px rgba(0,0,0,.6); padding: 12px; color: #1a0e04; margin-bottom: 5px; }
.team-title { font-family: 'Cinzel', serif; font-size: .88rem; color: var(--gold) !important; font-weight: 700; margin-bottom: 8px; }
.supporter-item { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.04); border: 1px solid var(--panel-border); border-radius: 10px; padding: 8px 10px; margin-bottom: 5px; }
.supporter-av { width: 34px; height: 34px; border-radius: 8px; background: linear-gradient(145deg, #f5e3bf, #c49655); color: #1c0e04; font-family: 'Cinzel', serif; font-size: .85rem; font-weight: 900; display: grid; place-items: center; flex-shrink: 0; }
.supporter-meta { flex: 1; min-width: 0; }
.supporter-name { font-weight: 700; font-size: .82rem; color: #1c1c1c !important; }
.supporter-stake { font-size: .7rem; color: var(--muted); }
.supporter-badge { font-size: .68rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.badge-active   { background: rgba(46,125,50,.25); color: #81c784; border:1px solid rgba(46,125,50,.4); }
.badge-inactive { background: rgba(183,28,28,.2);  color: #ef9a9a; border:1px solid rgba(183,28,28,.4); }

.chat-block { background: #fdfbf0; background-image: radial-gradient(#eceae0 1px, transparent 1px); background-size: 20px 20px; border: none; border-radius: 20px; box-shadow: 0 0 0 2px #3d2008, 0 0 0 4px #8a5f20, 0 0 0 6px #3d2008, 0 8px 20px rgba(0,0,0,.6); padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 6px; color: #1a0e04; }
.chat-title { font-family: 'Cinzel', serif; font-size: .88rem; color: var(--gold) !important; font-weight: 700; }
.chat-note { font-size: .72rem; color: #1c1c1c !important; }
.chat-messages { flex: 1; min-height: 80px; max-height: 160px; overflow-y: auto; -webkit-overflow-scrolling: touch; background: rgba(0,0,0,.07); border: 1px solid var(--panel-border); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.chat-msg { font-size: .78rem; line-height: 1.4; padding-bottom: 4px; border-bottom: 1px solid rgba(0,0,0,.06); color: #1c1c1c; }
.chat-msg:last-child { border-bottom: none; }
.chat-msg strong { color: #2eb450; }
.chat-form { display: flex; flex-direction: row; gap: 5px; align-items: center; }
.chat-form input { flex: 1; min-width: 0; background: #f9f9f9; border: 1px solid rgba(214,177,94,.3); border-radius: 10px; color: #1c1c1c; padding: 8px 12px; font-family: 'Nunito', sans-serif; font-size: .88rem; outline: none; min-height: var(--touch-min); }
.chat-form input:focus { border-color: var(--gold-dark); }

#btn-next-turn, #btn-new-round { display: none !important; }
#turn-label, #phase-chip, #game-id-label { display: none !important; }
#round-badge { color: inherit; font: inherit; }

#roll-overlay { touch-action: none; }
#undo-validate-wrap button { min-width: var(--touch-min); min-height: var(--touch-min); }

/* ══════════════════════════════════════════════════════
   DESKTOP (≥ 1200px)
══════════════════════════════════════════════════════ */
@media (min-width: 1200px) {
  body { padding-bottom: 0; }

  .game-layout {
    display: grid;
    grid-template-columns: 280px 1fr 300px;
    gap: 14px;
    padding: 4px 18px 20px;
    max-width: 1600px;
    margin: 0 auto;
    min-height: auto;
    flex-direction: unset;
    align-items: start;
  }

  .player-strip { display: none !important; }
  .bottom-bar   { display: none !important; }
  .turn-banner-mobile { display: none !important; }
  .game-header  { display: none !important; }

  .turn-banner { display: flex !important; justify-content: center; margin: 0; padding: 4px 0; }
  #bearoff-toggle { background: transparent !important; }

  .side-panel {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    max-height: none;
    padding: 10px;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }
  .side-panel.panel-open { display: flex !important; }

  .side-left   { grid-column: 1; grid-row: 1; align-self: center; padding: 10px; }
  .center-stage { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; gap: 4px; padding: 4px 8px; }
  .side-right  { grid-column: 3; grid-row: 1; align-self: center; padding: 10px; }
  #captain-panel { display: flex !important; }
  #captain-panel .score-recap  { display: none !important; }
  #captain-panel .cube-panel   { display: none !important; }
  #box-panel { display: flex !important; max-height: none !important; overflow-y: auto !important; }
  #box-panel .acc-block        { display: none !important; }
  #box-panel .desktop-only-card { display: none !important; }

  /* ── Plateau desktop ── */
  .board-outer { flex-direction: row !important; gap: 24px; padding: 24px; background: linear-gradient(145deg, #c8aa82 0%, #8a5c2a 40%, #3b1c08 60%, #8a5c2a 80%, #c8aa82 100%); align-items: stretch; border-radius: 16px; box-shadow: 0 0 0 2px #c8a040, 0 0 0 4px #3b1c08, 0 0 0 6px #c8a040, 0 16px 48px rgba(0,0,0,.9); position: relative; }

  .center-line { display: block; left: calc(24px + 70px + 24px + (100% - 236px) / 2); }

  .board-wrap  { flex: 1; min-width: 0; border-radius: 6px; box-shadow: 0 12px 48px rgba(0,0,0,.8); }
  .off-col { display: flex !important; flex-direction: column; width: auto; min-width: 70px; max-width: 70px; justify-content: space-between; gap: 20px; }
  .off-card { flex-direction: column !important; width: auto !important; flex: 1; min-height: 0; padding: 8px; max-height: none !important; border-radius: 10px; box-shadow: 0 6px 16px rgba(0,0,0,.5); justify-content: flex-start !important; align-items: center !important; }
  .off-lbl { display: block !important; font-size: .5rem; color: rgba(255,255,255,.65); text-align: center; }
  .off-num { font-size: 1.5rem; }
  .off-checkers { max-height: none; flex-direction: column; }
  .off-checker-slice { width: 44px; height: 7px; }

  .board { padding: 14px 14px; }
  .board-row { grid-template-columns: repeat(6, 1fr) 56px repeat(6, 1fr); gap: 0; min-height: 220px; }
  .point-labels-row { grid-template-columns: repeat(6, 1fr) 56px repeat(6, 1fr); gap: 4px; }
  .point-label-num { font-size: .68rem; }
  .point { min-height: 220px; }
  .board-divider { height: 16px; }
  .checker { width: 32px; height: 32px; border-width: 2px; }
  .die { width: 58px; height: 58px; font-size: 1.6rem; }
  .dice-row { display: none !important; }

  .move-footer { background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.10)), repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0px, rgba(255,255,255,.03) 6px, rgba(0,0,0,.03) 12px, rgba(0,0,0,.03) 18px), linear-gradient(135deg, #6b3f22, #4a2b16); border: 1px solid rgba(214,177,94,.35); padding: 5px; border-radius: 10px; margin-top: 10px; }
  .move-info { font-size: .82rem; }

  .player-avatar { width: 56px; height: 56px; font-size: 1.3rem; }
  .cube-die-img { width: 40px; height: 40px; }
  .player-name { font-size: .95rem; }

  .turn-banner { justify-content: center; margin-bottom: 0; margin-top: 0; }
  .turn-banner-ribbon { display: flex; align-items: center; justify-content: center; gap: 8px; background: none; height: auto; padding: 4px 0; }
  .turn-banner-owl { font-size: 1.8rem; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); flex-shrink: 0; margin-top: 18px; }
  .turn-banner-content { text-align: center; position: relative; z-index: 2; margin-top: 10px; }
  .game-title { font-family: 'Cinzel', serif; font-size: 1rem; font-weight: 900; color: var(--gold); letter-spacing: .12em; text-transform: uppercase; text-shadow: 0 1px 4px rgba(0,0,0,.6); margin-bottom: 1px; display: block !important; }
  .turn-banner-sub { font-family: 'Cinzel', serif; font-size: .9rem; font-weight: 900; color: var(--gold-light); letter-spacing: .08em; text-transform: uppercase; text-shadow: 0 2px 6px rgba(0,0,0,.8); }
  #phase-chip  { display: none !important; }
  #turn-label  { display: none !important; }

  #bearoff-toggle { margin-bottom: 8px; margin-top: 0; }
  #btn-bearoff-left, #btn-bearoff-right { min-height: var(--touch-min) !important; padding: 8px 18px !important; font-size: .78rem !important; }
}

/* ══════════════ FIXES CRITIQUES ══════════════ */

.cube-die-img,
img[src*="videau"] {
  max-width: 40px !important;
  max-height: 40px !important;
  width: 40px !important;
  height: 40px !important;
  object-fit: contain;
  flex-shrink: 0;
}

.strip-cube img {
  max-width: 32px !important;
  max-height: 32px !important;
  width: 32px !important;
  height: 32px !important;
}

.supporter-item img[src*="videau"] {
  max-width: 28px !important;
  max-height: 28px !important;
  width: 28px !important;
  height: 28px !important;
}

.player-avatar img,
.player-avatar {
  max-width: 48px !important;
  max-height: 48px !important;
}

.bottom-bar {
  z-index: 9000 !important;
  pointer-events: all !important;
}
.bottom-tab {
  pointer-events: all !important;
  z-index: 9001 !important;
}

.game-layout {
  padding-bottom: calc(var(--bottom-bar-h) + 8px) !important;
}

#roll-overlay {
  z-index: 8000 !important;
}

@supports (padding: max(0px)) {
  body {
    padding-left:   env(safe-area-inset-left);
    padding-right:  env(safe-area-inset-right);
  }
  .bottom-bar {
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(var(--bottom-bar-h) + env(safe-area-inset-bottom));
  }
}
/* ══════════════════════════════════════════════════════
   MOBILE PAYSAGE — Plateau uniquement
══════════════════════════════════════════════════════ */
@media (max-width: 1199px) and (orientation: portrait) {
  .board-wrap::after {
    top: 0;
    bottom: 0;
  }
}

@media (max-width: 1199px) and (orientation: landscape) {

  body { padding-left: 0 !important; padding-right: 0 !important; }

  /* Cacher éléments inutiles en paysage */
  .turn-banner-mobile, #bearoff-toggle, .move-footer, .bottom-bar, .side-panel,
  #strip-box, #strip-captain, #dice-zone, .game-header { display: none !important; }

  /* Sorties visibles en paysage : largeur réduite */
  .off-card { width: 22% !important; max-height: none !important; }

  /* ── Panneau gauche paysage dédié ── */
  #landscape-left {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: 1fr auto 1fr !important;
    width: 160px !important;
    min-width: 160px !important;
    flex-shrink: 0 !important;
    background: rgba(10,25,20,.95) !important;
    height: 100dvh !important;
    overflow: hidden !important;
    order: 1 !important;
  }

  #ls-opp {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .ls-manche {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  #ls-me {
    grid-column: 1 !important;
    grid-row: 3 !important;
  }



  .ls-player {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
    gap: 4px !important;
    padding: 8px 4px !important;
  }

  .ls-avatar {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    background: linear-gradient(145deg, #f5e3bf, #c49655) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: 'Cinzel', serif !important;
    font-size: 1rem !important;
    font-weight: 900 !important;
    color: #1c0e04 !important;
    flex-shrink: 0 !important;
  }

  .ls-avatar img { width: 100% !important; height: 100% !important; object-fit: cover !important; }

  .ls-name {
    font-family: 'Cinzel', serif !important;
    font-size: .65rem !important;
    font-weight: 700 !important;
    color: var(--ivory) !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 82px !important;
  }

  .ls-cube-img { width: 32px !important; height: 32px !important; object-fit: contain !important; }

  .ls-title {
    font-size: .5rem !important;
    color: var(--gold) !important;
    font-family: 'Cinzel', serif !important;
    font-weight: 600 !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 82px !important;
  }
  .ls-score {
    font-family: 'Cinzel', serif !important;
    font-size: .8rem !important;
    font-weight: 900 !important;
    color: var(--gold-light) !important;
  }
  .ls-avatar-me {
    background: linear-gradient(145deg, #6de069, #2a7a28) !important;
  }



  .ls-cube-label {
    font-family: 'Cinzel', serif !important;
    font-size: .7rem !important;
    font-weight: 700 !important;
    color: var(--gold-light) !important;
  }

  .ls-badge {
    font-family: 'Cinzel', serif !important;
    font-size: .55rem !important;
    font-weight: 700 !important;
    padding: 1px 6px !important;
    border-radius: 999px !important;
  }

  .ls-badge-box {
    background: rgba(245,234,208,.15) !important;
    color: var(--ivory) !important;
    border: 1px solid rgba(245,234,208,.3) !important;
  }

  .ls-badge-cap {
    background: rgba(93,196,90,.15) !important;
    color: #5dc45a !important;
    border: 1px solid rgba(93,196,90,.3) !important;
  }

  .ls-manche {
    font-family: 'Cinzel', serif !important;
    font-size: .6rem !important;
    font-weight: 700 !important;
    color: var(--gold) !important;
    text-align: center !important;
    width: 100% !important;
    padding: 3px 0 !important;
    border-top: 1px solid var(--panel-border) !important;
    border-bottom: 1px solid var(--panel-border) !important;
    flex-shrink: 0 !important;
  }

  .strip-info { display: flex !important; flex-direction: column !important; align-items: center !important; }
  .strip-name { font-size: .6rem !important; text-align: center !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; max-width: 80px !important; }

  .game-layout {
    display: flex !important; flex-direction: row !important;
    padding: 0 !important; margin: 0 !important;
    width: 100vw !important; height: 100dvh !important;
    min-height: 0 !important; overflow: hidden !important;
    align-items: stretch !important; position: relative !important;
  }



  .center-stage {
    flex: 1 !important; min-width: 0 !important;
    display: flex !important; flex-direction: column !important;
    overflow: hidden !important; height: 100dvh !important;
    order: 2 !important;
    max-width: calc(100vw - 270px) !important;
  }

  #landscape-left  { order: 1 !important; }
  #board-panel      { order: 2 !important; flex: 1 !important; min-width: 0 !important; max-width: calc(100vw - 250px) !important; height: 100dvh !important; overflow: hidden !important; display: flex !important; flex-direction: column !important; }
  #landscape-right  { order: 3 !important; }
  .side-panel       { display: none !important; order: 99 !important; }

  .board-outer {
    flex: 1 !important; min-height: 0 !important;
    padding: 2px !important; background: transparent !important;
    display: flex !important; flex-direction: column !important;
    height: 100% !important;
  }

  .board-wrap {
    flex: 1 !important; width: 100% !important;
    min-height: 0 !important; border-radius: 4px !important;
    overflow: hidden !important; height: 100% !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.8) !important;
  }

  .board {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .board-row {
    flex: 1 !important;
    min-height: 0 !important;
  }

  .point {
    min-height: 0 !important;
  }

  .move-footer { display: none !important; height: 0 !important; }

  /* Dés plus petits en paysage */
  #dice-float .die { width: 36px !important; height: 36px !important; font-size: 1rem !important; }

  .strip-avatar { width: 48px !important; height: 48px !important; border-radius: 50% !important; }
  .strip-cube { flex-direction: column !important; align-items: center !important; }
  .strip-cube img { width: 32px !important; height: 32px !important; }
  .strip-cube-label { font-size: .7rem !important; }
  .player-strip.active-turn { background: rgba(20,60,40,.98) !important; }
  .player-strip.active-turn.box-strip { background: rgba(30,25,15,.98) !important; }

  /* ── Panneau droit : score + cube max ── */
  #landscape-right {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    width: 90px !important;
    min-width: 90px !important;
    background: rgba(10,25,20,.95) !important;
    height: 100dvh !important;
    padding: 12px 6px !important;
    box-sizing: border-box !important;
    order: 3 !important;
  }
  .ls-right-title {
    font-family: 'Cinzel', serif !important;
    font-size: .55rem !important;
    font-weight: 700 !important;
    color: var(--gold) !important;
    text-transform: uppercase !important;
    letter-spacing: .06em !important;
    text-align: center !important;
  }
  .ls-right-score {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 2px !important;
    width: 100% !important;
    padding: 8px 0 !important;
    border-top: 1px solid var(--panel-border) !important;
    border-bottom: 1px solid var(--panel-border) !important;
  }
  .ls-right-pts {
    font-family: 'Cinzel', serif !important;
    font-size: 1.4rem !important;
    font-weight: 900 !important;
    color: var(--gold-light) !important;
    line-height: 1 !important;
  }
  .ls-right-sep {
    font-size: .8rem !important;
    color: var(--muted) !important;
  }
  .ls-right-match {
    font-family: 'Cinzel', serif !important;
    font-size: .5rem !important;
    font-weight: 700 !important;
    color: var(--muted) !important;
    text-align: center !important;
  }
  .ls-right-cube {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 2px !important;
  }
  .ls-right-cube-label {
    font-size: .5rem !important;
    color: var(--muted) !important;
    text-transform: uppercase !important;
    font-family: 'Cinzel', serif !important;
  }
  .ls-right-cube-val {
    font-family: 'Cinzel', serif !important;
    font-size: .9rem !important;
    font-weight: 900 !important;
    color: var(--gold-dark) !important;
  }
  .ls-right-crawford {
    font-family: 'Cinzel', serif !important;
    font-size: .5rem !important;
    color: #e03522 !important;
    font-weight: 700 !important;
    text-align: center !important;
  }
  /* ANCIEN landscape-right ignoré */
  #DUMMY_OLD {
    display: flex !important;
    flex-direction: column !important;
    width: 110px !important;
    min-width: 110px !important;
    flex-shrink: 0 !important;
    background: rgba(10,25,20,.95) !important;
    height: 100dvh !important;
    overflow: hidden !important;
    z-index: 600 !important;
    position: relative !important;
  }

  /* Adversaires — haut, 2 colonnes */
  #landscape-opponents {
    flex: 1 !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 4px !important;
    padding: 6px !important;
    overflow-y: auto !important;
    align-content: start !important;
  }

  /* Chat vocal — bas fixe */
  #landscape-voice {
    flex-shrink: 0 !important;
    border-top: 1px solid var(--panel-border) !important;
    padding: 6px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px !important;
    background: rgba(10,25,20,.98) !important;
  }

  #ls-voice-status {
    font-size: .55rem !important;
    color: var(--muted) !important;
    text-align: center !important;
    font-family: 'Cinzel', serif !important;
  }

  #ls-voice-btn {
    background: linear-gradient(180deg, var(--gold-light), var(--gold-dark)) !important;
    color: #1a0e00 !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 4px 8px !important;
    font-family: 'Cinzel', serif !important;
    font-size: .55rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    width: 100% !important;
  }

  #ls-voice-participants {
    font-size: .5rem !important;
    color: var(--muted) !important;
    text-align: center !important;
    width: 100% !important;
  }

  .landscape-opponent {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 2px !important;
    background: rgba(255,255,255,.04) !important;
    border-radius: 6px !important;
    padding: 4px 2px !important;
  }

  .landscape-opponent-avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    background: linear-gradient(145deg, #f5e3bf, #c49655) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: 'Cinzel', serif !important;
    font-size: .9rem !important;
    font-weight: 900 !important;
    color: #1c0e04 !important;
  }

  .landscape-opponent-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .landscape-opponent-cube img {
    width: 22px !important;
    height: 22px !important;
    object-fit: contain !important;
  }

  .landscape-opponent-label {
    font-family: 'Cinzel', serif !important;
    font-size: .55rem !important;
    font-weight: 700 !important;
    color: var(--gold-light) !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 70px !important;
  }

  .landscape-divider {
    width: 60px !important;
    height: 1px !important;
    background: var(--panel-border) !important;
    margin: 2px 0 !important;
  }
}
/* ══════════════════════════════════════════════════════
   PANEL CUBE
══════════════════════════════════════════════════════ */
.cube-panel {
  display: none;
  background: linear-gradient(135deg, rgba(212,169,74,.12), rgba(212,169,74,.04));
  border: 1px solid rgba(212,169,74,.3);
  border-radius: 16px;
  padding: 14px 12px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: 0 0 0 1px rgba(212,169,74,.08), 0 4px 16px rgba(0,0,0,.3);
}
.cube-panel-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.cube-panel-icon { font-size: 1.6rem; line-height: 1; }
.cube-panel-val {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--gold-light);
  line-height: 1;
  text-shadow: 0 0 20px rgba(212,169,74,.4);
}
.cube-panel-lbl {
  font-size: .58rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 2px;
}
.cube-panel-max {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  flex-shrink: 0;
}
.cube-max-label {
  font-size: .55rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.cube-max-val {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 900;
  color: var(--gold-dark);
}

/* ══════════════════════════════════════════════════════
   SCORE RECAP
══════════════════════════════════════════════════════ */
.score-recap {
  background: #fdfbf0;
  background-image: radial-gradient(#eceae0 1px, transparent 1px);
  background-size: 20px 20px;
  border: none;
  border-radius: 20px;
  box-shadow: 0 0 0 2px #3d2008, 0 0 0 4px #8a5f20, 0 0 0 6px #3d2008, 0 8px 20px rgba(0,0,0,.6);
  padding: 14px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #1a0e04;
}
.score-recap-title {
  font-family: 'Cinzel', serif;
  font-size: .8rem;
  font-weight: 700;
  color: var(--gold-dark);
  text-align: center;
  letter-spacing: .06em;
}
.score-recap-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.score-recap-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.score-recap-player.right { align-items: center; }
.score-recap-name {
  font-family: 'Cinzel', serif;
  font-size: .7rem;
  font-weight: 700;
  color: #3a2010;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
  text-align: center;
}
.score-recap-pts {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold-dark);
  line-height: 1;
  text-align: center;
}
.score-recap-sep {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  padding: 0 6px;
}
.sr-cube-max-label {
  font-size: .52rem;
  color: #7a5c2e;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-family: 'Cinzel', serif;
  font-weight: 600;
}
.sr-cube-max-val {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--gold-dark);
  line-height: 1;
}
.score-recap-match {
  text-align: center;
  font-size: .72rem;
  color: #7a5c2e;
  font-family: 'Cinzel', serif;
  font-weight: 600;
}
.crawford-badge {
  display: inline-block;
  background: rgba(176,43,28,.15);
  border: 1px solid rgba(176,43,28,.4);
  color: #b82b1c;
  font-size: .6rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 6px;
  font-family: 'Nunito', sans-serif;
}
.rounds-track {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
  padding-top: 2px;
  border-top: 1px solid rgba(58,32,16,.15);
}
.round-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: .6rem;
  font-weight: 900;
  flex-shrink: 0;
}
.round-dot.win {
  background: linear-gradient(145deg, #6de069, #2a7a28);
  color: #fff;
  box-shadow: 0 2px 6px rgba(42,122,40,.4);
}
.round-dot.loss {
  background: linear-gradient(145deg, #e03522, #8a1a10);
  color: #fff;
  box-shadow: 0 2px 6px rgba(138,26,16,.4);
}
.round-dot.current {
  background: rgba(212,169,74,.15);
  border: 2px dashed var(--gold-dark);
  color: var(--gold-dark);
}
.round-dot.pending {
  background: rgba(58,32,16,.08);
  border: 1px solid rgba(58,32,16,.2);
  color: rgba(58,32,16,.3);
}

/* Carte joueur desktop uniquement */
.desktop-only-card { display: none; }
@media (min-width: 1200px) {
  .desktop-only-card { display: flex !important; }
  #box-panel .desktop-only-card { display: flex !important; }
}

/* ══════════ OFF-NUM POSITION SELON BEAR-OFF ══════════ */
/* bear-off droite : les 2 sont bons, rien à changer */
/* bear-off gauche : corriger les 2 cartes */
.board-outer.bearoff-left #off-opp-card .off-num { order: -1; }
.board-outer.bearoff-left #off-me-card  .off-num { order: -1; }
.off-card {
  display: flex;
  flex-direction: row;
  align-items: center;
}

/* Avatar image dans game-header */
.gh-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

/* ══════════════════════════════════════════════════════
   PANNEAU LATERAL DESKTOP (gauche + droite)
══════════════════════════════════════════════════════ */
.lp-avatar-wrap {
  display: flex; justify-content: center; padding: 8px 0 4px;
}
.lp-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(145deg, #f5e3bf, #c49655);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--gold-dark);
  box-shadow: 0 0 0 2px #3d2008, 0 0 0 4px #8a5f20, 0 4px 12px rgba(0,0,0,.5);
}
.lp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.lp-name {
  font-family: 'Cinzel', serif; font-size: .85rem; font-weight: 700;
  color: var(--ivory); text-align: center; margin-top: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lp-title {
  font-family: 'Cinzel', serif; font-size: .6rem; font-style: italic;
  color: var(--gold); text-align: center; margin-bottom: 4px;
}
.lp-score {
  font-family: 'Cinzel', serif; font-size: 1.8rem; font-weight: 900;
  color: var(--gold-light); text-align: center; line-height: 1;
}
.lp-score-max { font-size: .85rem; color: var(--muted); font-weight: 400; }
.lp-section-lbl {
  font-family: 'Cinzel', serif; font-size: .55rem; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: .08em;
  text-align: center; margin: 10px 0 4px;
  border-top: 1px solid var(--panel-border); padding-top: 8px;
}
.lp-cube-row {
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.lp-cube-img { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }
.lp-cube-val { font-family: 'Cinzel', serif; font-size: .95rem; font-weight: 900; color: var(--gold-light); }
.lp-cube-sub { font-size: .5rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.lp-cube-max { font-size: .55rem; color: var(--muted); text-align: center; margin-top: 4px; }
.lp-rounds {
  display: flex; flex-wrap: wrap; gap: 5px; justify-content: center;
  padding: 6px 0;
}
.lp-scores-recap {
  font-family: 'Cinzel', serif; font-size: .65rem; color: var(--gold);
  text-align: center;
}
/* ══ PANNEAU GAUCHE DESKTOP : même style carte crème que droite ══ */
@media (min-width: 1200px) {
  #box-panel {
    background: #fdfbf0 !important;
    background-image: radial-gradient(#eceae0 1px, transparent 1px) !important;
    background-size: 20px 20px !important;
    border-radius: 20px !important;
    box-shadow: 0 0 0 2px #3d2008, 0 0 0 4px #8a5f20, 0 0 0 6px #3d2008, 0 8px 20px rgba(0,0,0,.6) !important;
    padding: 12px !important;
    max-height: none !important;
    overflow-y: auto !important;
  }
  #box-panel .lp-name   { color: #1a0e04 !important; }
  #box-panel .lp-title  { color: var(--gold-dark) !important; }
  #box-panel .lp-score  { color: var(--gold-dark) !important; }
  #box-panel .lp-score-max { color: #7a5c2e !important; }
  #box-panel .lp-section-lbl { color: #7a5c2e !important; border-top-color: rgba(58,32,16,.15) !important; }
  #box-panel .lp-cube-val  { color: var(--gold-dark) !important; }
  #box-panel .lp-cube-sub  { color: #7a5c2e !important; }
  #box-panel .lp-cube-max  { color: #7a5c2e !important; }
  #box-panel .lp-scores-recap { color: var(--gold-dark) !important; }
}

/* ══ PANNEAU DROIT DESKTOP : même style carte crème ══ */
@media (min-width: 1200px) {
  #captain-panel {
    background: #fdfbf0 !important;
    background-image: radial-gradient(#eceae0 1px, transparent 1px) !important;
    background-size: 20px 20px !important;
    border-radius: 20px !important;
    box-shadow: 0 0 0 2px #3d2008, 0 0 0 4px #8a5f20, 0 0 0 6px #3d2008, 0 8px 20px rgba(0,0,0,.6) !important;
    padding: 12px !important;
    max-height: none !important;
    overflow-y: auto !important;
  }
  #captain-panel .cube-panel  { display: none !important; }
  #captain-panel .score-recap { display: none !important; }
  #captain-panel .desktop-only-card { display: none !important; }
  #captain-panel .lp-name   { color: #1a0e04 !important; }
  #captain-panel .lp-title  { color: var(--gold-dark) !important; }
  #captain-panel .lp-score  { color: var(--gold-dark) !important; }
  #captain-panel .lp-score-max { color: #7a5c2e !important; }
  #captain-panel .lp-section-lbl { color: #7a5c2e !important; border-top-color: rgba(58,32,16,.15) !important; }
  #captain-panel .lp-cube-val  { color: var(--gold-dark) !important; }
  #captain-panel .lp-cube-sub  { color: #7a5c2e !important; }
  #captain-panel .lp-cube-max  { color: #7a5c2e !important; }
  #captain-panel .lp-scores-recap { color: var(--gold-dark) !important; }
  .lp-avatar-me {
    background: linear-gradient(145deg, #6de069, #2a7a28) !important;
  }
}

/* Masquer éléments desktop-only en mobile */
@media (max-width: 1199px) {
  .lp-avatar-wrap, .lp-name, .lp-title, .lp-score,
  .lp-section-lbl, .lp-cube-row, .lp-cube-max,
  .lp-rounds, .lp-scores-recap { display: none !important; }
}

/* ══ TITRE DESKTOP ══ */
.board-title-desktop { display: none; }
@media (min-width: 1200px) {
  .board-title-desktop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: transparent;
    padding: 6px 20px;
    flex-shrink: 0;
  }
  .btd-owl { font-size: 1.4rem; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); margin-top: 4px; }
  .btd-content { display: flex; flex-direction: column; align-items: center; gap: 1px; }
  .btd-title {
    font-family: 'Cinzel', serif; font-size: 1rem; font-weight: 900;
    color: var(--gold); letter-spacing: .12em; text-transform: uppercase;
    text-shadow: 0 1px 4px rgba(0,0,0,.6);
  }
  .btd-sub {
    font-family: 'Cinzel', serif; font-size: .8rem; font-weight: 700;
    color: var(--gold-light); letter-spacing: .08em; text-transform: uppercase;
    text-shadow: 0 2px 6px rgba(0,0,0,.8);
  }
}
/* ══════════════ TIMERS ══════════════ */

/* Barre portrait - cachée par défaut, visible uniquement en portrait mobile */
#timer-bar-portrait {
  display: none;
}
@media (max-width: 1199px) and (orientation: portrait) {
  #timer-bar-portrait {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    background: #0e2a1a;
    padding: 5px 10px;
    width: 100%;
    box-sizing: border-box;
  }
}
/* En mode Zen : masquer la barre même en portrait */
body[data-timer-mode="zen"] #timer-bar-portrait { display: none !important; }
.timer-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  flex: 1;
  justify-content: center;
}
.timer-active { background: #0e2a1a; border: 1.5px solid #5dc45a; }
.timer-pause  { background: #0e1a0a; border: 1px solid rgba(200,160,64,.4); opacity: .75; }
.timer-name   { font-family: 'Cinzel', serif; font-size: .65rem; font-weight: 700; }
.timer-time   { font-size: .85rem; font-weight: 700; }
.timer-active .timer-name,
.timer-active .timer-time { color: #5dc45a; }
.timer-pause  .timer-name,
.timer-pause  .timer-time { color: rgba(200,160,64,.7); }
.timer-mode-badge {
  font-family: 'Cinzel', serif;
  font-size: .65rem;
  font-weight: 700;
  color: var(--gold-light);
  background: #2a1a08;
  border: 1px solid rgba(200,160,64,.5);
  border-radius: 12px;
  padding: 3px 8px;
  white-space: nowrap;
  text-align: center;
}
/* Alerte timer */
.timer-alert .timer-time { color: #e03522 !important; animation: timer-blink .6s infinite; }
@keyframes timer-blink { 0%,100% { opacity:1; } 50% { opacity:.3; } }

/* Paysage : dans landscape-right */
.ls-timer-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 10px;
  width: 100%;
  box-sizing: border-box;
}
.ls-timer-active { background: #0e2a1a; border: 1.5px solid #5dc45a; }
.ls-timer-pause  { background: #0e1a0a; border: 1px solid rgba(200,160,64,.3); opacity: .75; }
.ls-timer-name   { font-family: 'Cinzel', serif; font-size: .55rem; font-weight: 700; }
.ls-timer-time   { font-size: .85rem; font-weight: 700; }
.ls-timer-active .ls-timer-name,
.ls-timer-active .ls-timer-time { color: #5dc45a; }
.ls-timer-pause  .ls-timer-name,
.ls-timer-pause  .ls-timer-time { color: rgba(200,160,64,.7); }
.ls-timer-mode-badge {
  font-family: 'Cinzel', serif;
  font-size: .6rem;
  font-weight: 700;
  color: var(--gold-light);
  background: #2a1a08;
  border: 1px solid rgba(200,160,64,.5);
  border-radius: 10px;
  padding: 3px 6px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

/* Desktop : dans panneaux latéraux */
.desktop-timer-pill {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  border-radius: 20px;
  margin: 6px auto 0;
  font-weight: 700;
  font-size: .85rem;
  width: 80%;
}
@media (min-width: 1200px) {
  body:not([data-timer-mode="zen"]) .desktop-timer-pill { display: flex; }
}
.desktop-timer-active { background: #0e2a1a; border: 1.5px solid #5dc45a; color: #5dc45a; }
.desktop-timer-pause  { background: #0e1a0a; border: 1px solid rgba(200,160,64,.3); color: rgba(200,160,64,.7); opacity: .75; }
.desktop-timer-mode {
  font-size: 1.1rem;
  text-align: center;
  padding: 4px 0;
  cursor: default;
}

/* Masquer timers en mode Zen */
body[data-timer-mode="zen"] #timer-bar-portrait,
body[data-timer-mode="zen"] #timer-opp-landscape,
body[data-timer-mode="zen"] #timer-me-landscape,
body[data-timer-mode="zen"] #timer-mode-landscape,
body[data-timer-mode="zen"] #timer-opp-desktop,
body[data-timer-mode="zen"] #timer-me-desktop { display: none !important; }