/* gcp:css/fit.css — one-screen scale. Loaded last so it wins over breakpoint px. */

.seat-backs, .seat-backs .n { display: none !important; }

#app.table-view {
  overflow: hidden;
  height: var(--app-vh, 100dvh);
  max-height: var(--app-vh, 100dvh);
  max-width: none;
  width: 100%;
}

#app.table-view .table-stage {
  min-height: 0;
  overflow: hidden;
}

#app.table-view .stage-board {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#app.table-view .felt {
  flex: 1 1 0;
  min-height: 0;
  container-type: size;
  --card-w: calc(var(--card-base-w) * var(--table-scale) * var(--felt-size, 1));
  --card-h: calc(var(--card-base-h) * var(--table-scale) * var(--felt-size, 1));
  --card-mini-w: var(--card-w);
  --card-mini-h: var(--card-h);
}

#app.table-view .hand-dock,
#app.table-view .toolbar,
#app.table-view .bk-toolbar,
#app.table-view .status-bar,
#app.table-view .bk-names-row,
#app.table-view .sg-coach,
#app.table-view .gk-coach,
#app.table-view .bl-bunts-live {
  flex-shrink: 0;
}
#app.table-view .info-bar {
  height: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  overflow: visible;
  flex-shrink: 0;
  z-index: 55;
}
#app.table-view .info-bar .table-msg {
  position: absolute;
  left: 50%;
  top: -36px;
  transform: translateX(-50%);
  z-index: 55;
  white-space: nowrap;
}

/* Chrome uses --ui-scale; cards keep --table-scale */
#app.table-view .toolbar,
#app.table-view .bk-toolbar {
  padding: calc(5px * var(--ui-scale)) calc(8px * var(--ui-scale));
  gap: calc(6px * var(--ui-scale));
  z-index: 50;
  border-bottom: 0;
}
#app.table-view .toolbar:has(.bk-more),
#app.table-view .bk-toolbar:has(.bk-more) {
  z-index: 70;
}

#app.table-view .btn-icon {
  width: var(--tap);
  height: var(--tap);
  min-width: var(--tap);
  min-height: var(--tap);
}

#app.table-view .bk-scorechip {
  min-height: max(28px, calc(32px * var(--ui-scale)));
  font-size: max(10px, calc(11px * var(--ui-scale)));
  padding: calc(3px * var(--ui-scale)) calc(8px * var(--ui-scale));
}
#app.table-view .bk-scorechip b {
  font-size: max(13px, calc(15px * var(--ui-scale)));
}

#app.table-view .score-chip,
#app.table-view .hand-open-chip {
  font-size: max(11px, var(--type-sm));
  padding: calc(3px * var(--ui-scale)) calc(8px * var(--ui-scale));
}

#app.table-view .bk-names {
  min-height: max(28px, calc(34px * var(--ui-scale)));
  padding: calc(3px * var(--ui-scale)) calc(6px * var(--ui-scale));
}
#app.table-view .bk-names .ts-player,
#app.table-view .ts-player {
  font-size: max(11px, calc(13px * var(--ui-scale)));
  padding: calc(2px * var(--ui-scale)) calc(8px * var(--ui-scale));
}

#app.table-view .status-bar {
  gap: calc(5px * var(--ui-scale));
  padding: calc(4px * var(--ui-scale)) calc(8px * var(--ui-scale));
}
#app.table-view .player-status {
  padding: calc(5px * var(--ui-scale)) calc(7px * var(--ui-scale));
}
#app.table-view .ps-head { margin-bottom: calc(3px * var(--ui-scale)); }
#app.table-view .ps-name { font-size: max(11px, calc(13px * var(--ui-scale))); }
#app.table-view .ps-lab { font-size: max(9px, calc(11px * var(--ui-scale))); }
#app.table-view .ps-metric { min-height: 0; }
#app.table-view .ps-num {
  font-size: max(13px, calc(16px * var(--ui-scale)));
  padding: calc(2px * var(--ui-scale)) calc(6px * var(--ui-scale));
}
#app.table-view .ps-metric.score .ps-num,
#app.table-view .ps-board.solo .ps-num {
  font-size: max(15px, calc(20px * var(--ui-scale)));
}

#app.table-view .trick-name {
  font-size: max(10px, calc(11px * var(--ui-scale)));
  padding: calc(2px * var(--ui-scale)) calc(7px * var(--ui-scale));
}

#app.table-view .felt-cta {
  font-size: max(14px, calc(15px * var(--ui-scale)));
  padding: calc(6px * var(--ui-scale)) calc(14px * var(--ui-scale));
  bottom: max(16px, calc(20px * var(--ui-scale)));
}

#app.table-view .bk-bidbar .btn {
  min-height: max(40px, calc(44px * var(--ui-scale)));
  font-size: max(14px, calc(16px * var(--ui-scale)));
  padding: calc(8px * var(--ui-scale)) calc(16px * var(--ui-scale));
}

#app.table-view .sg-coach,
#app.table-view .gk-coach {
  margin: 0 calc(6px * var(--ui-scale)) calc(6px * var(--ui-scale));
  padding: calc(8px * var(--ui-scale)) calc(10px * var(--ui-scale));
  gap: calc(8px * var(--ui-scale));
}
#app.table-view .sg-coach-kicker { font-size: max(10px, calc(10px * var(--ui-scale))); }
#app.table-view .sg-coach-title { font-size: max(13px, calc(15px * var(--ui-scale))); }
#app.table-view .sg-coach-body {
  font-size: max(12px, calc(13px * var(--ui-scale)));
  max-height: 4.6em;
  overflow: hidden;
}
#app.table-view .table-stage.view-hand .sg-coach-body {
  max-height: 6.4em;
}

#app.table-view .hand-dock {
  max-height: none;
  padding: calc(4px * var(--ui-scale))
           max(calc(8px * var(--ui-scale)), var(--sar))
           max(calc(8px * var(--ui-scale)), var(--sab))
           max(calc(8px * var(--ui-scale)), var(--sal));
  --card-w: calc(var(--card-base-w) * var(--table-scale) * var(--hand-size, 1));
  --card-h: calc(var(--card-base-h) * var(--table-scale) * var(--hand-size, 1));
  --card-mini-w: var(--card-w);
  --card-mini-h: var(--card-h);
}
#app.table-view .hand-row {
  max-height: calc(var(--card-h) * 2.05 + 36px);
  --card-w: calc(var(--card-base-w) * var(--table-scale) * var(--hand-size, 1));
  --card-h: calc(var(--card-base-h) * var(--table-scale) * var(--hand-size, 1));
  --card-mini-w: var(--card-w);
  --card-mini-h: var(--card-h);
}

/* Felt cards follow the same card token */
#app.table-view .felt.hand-cloth {
  --felt-card-w: calc(var(--card-w) * 1.12);
  --felt-card-h: calc(var(--card-h) * 1.12);
  --felt-pile-w: calc(var(--card-w) * 0.9);
  --felt-pile-h: calc(var(--card-h) * 0.9);
  overflow: hidden;
}
#app.table-view .table-stage.view-sabeeta .felt.hand-cloth {
  overflow: visible;
}
/* Hand: piles sit in their own column so table melds cannot cover the stock. */
#app.table-view .table-stage.view-hand .felt.hand-cloth .hand-felt {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
}
#app.table-view .table-stage.view-hand .meld-board {
  min-height: 0;
  min-width: 0;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  align-content: flex-start;
  padding-bottom: 52px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

html[data-layout="phone"] #app.table-view {
  background: var(--bg);
}
html[data-layout="phone"] #app.table-view .toolbar,
html[data-layout="phone"] #app.table-view .bk-toolbar {
  flex-wrap: nowrap;
  background-color: var(--bg);
  padding: max(8px, var(--sat)) max(6px, var(--sar)) 6px max(6px, var(--sal));
  gap: 4px;
}
html[data-layout="tablet-land"] #app.table-view .toolbar,
html[data-layout="tablet-land"] #app.table-view .bk-toolbar {
  background: var(--bg);
  padding: 8px 8px 6px;
}
html[data-layout="phone"] #app.table-view .toolbar .scores {
  flex-wrap: nowrap;
  min-width: 0;
  overflow: hidden;
}
html[data-layout="phone"] #app.table-view .game-now {
  font-size: 12px;
  max-width: 8em;
}
html[data-layout="phone"] #app.table-view .toolbar-tools {
  margin-inline-start: 0;
}
html[data-layout="phone"] #app.table-view .table-bar > [data-act="autoplay"] {
  flex-shrink: 0;
}
html[data-layout="phone"] #app.table-view .table-stage.view-sabeeta .status-bar.n4 {
  grid-template-columns: 1fr 1fr !important;
  gap: 4px;
  padding: 3px 6px 4px;
}
html[data-layout="phone"] #app.table-view .table-stage.view-sabeeta .player-status {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  min-height: 0;
}
html[data-layout="phone"] #app.table-view .table-stage.view-sabeeta .ps-head {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
  gap: 3px;
}
html[data-layout="phone"] #app.table-view .table-stage.view-sabeeta .ps-name {
  font-size: 12px;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html[data-layout="phone"] #app.table-view .table-stage.view-sabeeta .ps-hearts { display: none; }
html[data-layout="phone"] #app.table-view .table-stage.view-sabeeta .sb-pass-corner {
  top: 6px;
  inset-inline-start: 6px;
  padding: 4px 6px 5px;
  gap: 3px;
}
html[data-layout="phone"] #app.table-view .table-stage.view-sabeeta .sb-end-stack {
  top: 6px;
  inset-inline-end: 6px;
  gap: 4px;
  max-width: min(46%, 128px);
}
html[data-layout="phone"] #app.table-view .table-stage.view-sabeeta .sb-pass-lab {
  font-size: 9px;
  max-width: 96px;
}
html[data-layout="phone"] #app.table-view .table-stage.view-sabeeta .sb-pass-corner button.pcard.mini,
html[data-layout="phone"] #app.table-view .table-stage.view-sabeeta .sb-pass-corner .pcard.mini {
  width: 22px;
  height: 31px;
}
html[data-layout="phone"] #app.table-view .table-stage.view-sabeeta .sb-dbl-corner {
  padding: 4px 7px 5px;
}
html[data-layout="phone"] #app.table-view .table-stage.view-sabeeta .sb-dbl-row {
  font-size: 11px;
}
html[data-layout="phone"] #app.table-view .table-stage.view-sabeeta .ps-pens { display: inline-flex; }
html[data-layout="phone"] #app.table-view .table-stage.view-sabeeta .taken-pile.sb-trophies { display: none; }
html[data-layout="phone"] #app.table-view .table-stage.view-sabeeta .sb-hearts { display: none; }
html[data-layout="phone"] #app.table-view .table-stage.view-sabeeta .ps-star { font-size: 11px; }
html[data-layout="phone"] #app.table-view .table-stage.view-sabeeta .ps-board.solo {
  flex-direction: row;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
html[data-layout="phone"] #app.table-view .table-stage.view-sabeeta .ps-lab { display: none; }
html[data-layout="phone"] #app.table-view .table-stage.view-sabeeta .ps-metric { min-height: 0; gap: 0; }
html[data-layout="phone"] #app.table-view .table-stage.view-sabeeta .ps-num,
html[data-layout="phone"] #app.table-view .table-stage.view-sabeeta .ps-metric.score .ps-num,
html[data-layout="phone"] #app.table-view .table-stage.view-sabeeta .ps-board.solo .ps-num {
  font-size: 14px;
  padding: 1px 6px 2px;
  min-width: 1.4em;
}
html[data-layout="phone"] #app.table-view .table-stage.view-sabeeta .ps-delta {
  font-size: 10px;
  align-self: center;
}

/* Trick cards sit as a cluster in the middle of the cloth — they do not pin to the rail. */
#app.table-view .trick-area.seats-4 {
  width: auto;
  max-width: min(70%, 520px);
  height: auto;
  min-height: 0;
  align-self: center;
  margin: auto;
  flex: 0 0 auto;
  padding: 8px 10px;
  gap: calc(12px * var(--felt-size, 1)) calc(22px * var(--felt-size, 1));
  grid-template-columns: auto auto auto;
  grid-template-rows: auto auto auto;
}
#app.table-view .trick-area.seats-3 {
  width: auto;
  max-width: min(72%, 420px);
  align-self: center;
  margin: auto;
  flex: 0 0 auto;
}
#app.table-view .trick-p .pcard,
#app.table-view .trick-p .trick-slot,
#app.table-view .trick-p.team-us .pcard,
#app.table-view .trick-p.team-us .trick-slot {
  width: calc(clamp(42px, min(12cqh, 10cqi), 96px) * var(--felt-size, 1));
  height: auto;
  aspect-ratio: 5 / 7;
  min-width: 0;
}
#app.table-view .trick-p.team-them .pcard,
#app.table-view .trick-p.team-them .trick-slot {
  width: calc(clamp(38px, min(10cqh, 8.5cqi), 82px) * var(--felt-size, 1));
  height: auto;
  aspect-ratio: 5 / 7;
}
#app.table-view .trick-p .taken-pile .pcard,
#app.table-view .trick-p.team-us .taken-pile .pcard,
#app.table-view .trick-p.team-them .taken-pile .pcard {
  width: 24%;
  min-width: calc(22px * var(--felt-size, 1));
  max-width: calc(32px * var(--felt-size, 1));
  height: auto;
  aspect-ratio: 5 / 7;
}
#app.table-view .trick-p.team-us { min-width: 0; }
#app.table-view .trick-p.team-them { min-width: 0; }

#app.table-view .trick-area.seats-6 {
  width: min(70%, 78cqh);
  height: min(78%, 70cqi);
  max-width: none;
  min-height: 0;
  align-self: center;
  margin: auto;
  flex: 0 0 auto;
}
@media (max-width: 859px) {
  #app.table-view .trick-area.seats-6 {
    width: min(460px, 94%);
    height: min(340px, 50vh);
    min-height: 260px;
    flex: 0 0 auto;
  }
}
#app.table-view .trick-area.seats-6 .trick-p .pcard,
#app.table-view .trick-area.seats-6 .trick-p .trick-slot {
  width: calc(clamp(44px, min(12cqh, 10cqi), 96px) * var(--felt-size, 1));
  height: auto;
  aspect-ratio: 5 / 7;
}

@media (max-height: 820px) {
  #app.table-view .ps-lab { display: none; }
  #app.table-view .sg-coach-body { max-height: 3.2em; }
  #app.table-view .table-stage.view-hand .sg-coach-body { max-height: 5.4em; }
}

/* 358: compact chrome so 16 cards + scores fit without overlap */
@media (max-width: 859px) {
  #app.table-view .header { display: none; }

  #app.table-view .table-stage:is(.view-sergeant, .view-kanz) .status-bar,
  #app.table-view .table-stage:is(.view-sergeant, .view-kanz) .status-bar.sg-status {
    gap: 4px;
    padding: 3px 4px 4px;
  }
  #app.table-view .table-stage:is(.view-sergeant, .view-kanz) .player-status {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
    padding: 4px 5px 5px;
    min-height: 0;
  }
  #app.table-view .table-stage:is(.view-sergeant, .view-kanz) .ps-head {
    margin: 0;
    width: 100%;
    min-width: 0;
    align-items: flex-start;
  }
  #app.table-view .table-stage:is(.view-sergeant, .view-kanz) .ps-name {
    font-size: 12px;
    letter-spacing: 0;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    text-overflow: unset;
  }
  #app.table-view .table-stage:is(.view-sergeant, .view-kanz) .ps-board,
  #app.table-view .table-stage:is(.view-sergeant, .view-kanz) .ps-board.sg-inline {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 3px;
    width: 100%;
    flex-shrink: 0;
  }
  #app.table-view .table-stage:is(.view-sergeant, .view-kanz) .ps-lab { display: none; }
  #app.table-view .table-stage:is(.view-sergeant, .view-kanz) .ps-metric { min-height: 0; gap: 0; }
  #app.table-view .table-stage:is(.view-sergeant, .view-kanz) .ps-num {
    font-size: 12px;
    padding: 1px 5px;
    min-width: 1.3em;
  }
  #app.table-view .table-stage:is(.view-sergeant, .view-kanz) .ps-metric.score .ps-num { font-size: 14px; }
  #app.table-view .table-stage:is(.view-sergeant, .view-kanz) .hand-row {
    max-height: none;
    overflow: visible;
    padding-block: 18px 8px;
    gap: 12px 4px;
    align-items: flex-end;
    align-content: flex-end;
  }
  #app.table-view .table-stage:is(.view-sergeant, .view-kanz) .hand-dock {
    max-height: none;
    overflow: visible;
    flex: 0 0 auto;
    padding: 2px 4px 12px;
  }
  #app.table-view .table-stage:is(.view-sergeant, .view-kanz) .felt {
    min-height: 0;
    padding-bottom: 6px;
  }
  #app.table-view .table-stage:is(.view-sergeant, .view-kanz) .trick-area.seats-3 {
    flex: 0 1 auto;
    width: min(96%, 420px);
    padding-bottom: 4px;
  }
  #app.table-view .table-stage.view-kanz .kanz-side-tag { font-size: 9px; padding: 1px 6px; }
  #app.table-view .table-stage.view-kanz .seat-nl { left: 6%; top: 24px; }
  #app.table-view .table-stage.view-kanz .seat-nr { right: 6%; top: 24px; }
  #app.table-view .table-stage.view-kanz .seat-sr { bottom: 2px; right: 2px; }
  #app.table-view .table-stage.view-kanz .kanz-pair-rail.north { left: 4%; right: 4%; height: 30px; top: 18px; }
  #app.table-view .table-stage.view-kanz .status-bar.kanz-vs2,
  #app.table-view .table-stage.view-kanz .status-bar.kanz-vs1 { gap: 4px; }
  #app.table-view .table-stage:is(.view-sergeant, .view-kanz) .actions { padding-top: 4px; }
  #app.table-view .table-stage:is(.view-sergeant, .view-kanz) .trick-p .pcard,
  #app.table-view .table-stage:is(.view-sergeant, .view-kanz) .trick-p .trick-slot {
    width: calc(clamp(40px, min(12cqh, 13cqi), 68px) * var(--felt-size, 1));
    height: auto;
    aspect-ratio: 5 / 7;
  }
  #app.table-view .table-stage:is(.view-sergeant, .view-kanz) .sg-coach-kicker,
  #app.table-view .table-stage:is(.view-sergeant, .view-kanz) .sg-coach-body { display: none; }
  #app.table-view .table-stage:is(.view-sergeant, .view-kanz) .sg-coach {
    margin: 0 4px 4px;
    padding: 5px 8px;
    gap: 6px;
    border-radius: 10px;
  }
  #app.table-view .table-stage:is(.view-sergeant, .view-kanz) .sg-coach-title {
    font-size: 12px;
    line-height: 1.25;
  }
  #app.table-view .table-stage:is(.view-sergeant, .view-kanz) .bk-hukm-corner {
    min-width: 0;
    padding: 4px 6px 3px;
    top: 4px;
    inset-inline-start: 4px;
  }
  #app.table-view .table-stage:is(.view-sergeant, .view-kanz) .bk-hukm-corner .bk-hukm-sym { font-size: 18px; }
  #app.table-view .table-stage:is(.view-sergeant, .view-kanz) .bk-hukm-nm { font-size: 9px; }

  /* 8-card deals (Baloot, 6-player Kout): one row, slightly smaller */
  #app.table-view .table-stage.hand-8 .hand-row {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 6px 3px;
    max-height: none;
    overflow: visible;
    padding-block: 16px 6px;
  }
  #app.table-view .table-stage.hand-8 .suit-gap {
    flex: 0 0 2px;
    width: 2px;
    min-width: 2px;
    overflow: hidden;
    pointer-events: none;
  }
  #app.table-view .table-stage.hand-8 .hand-row .pcard {
    width: var(--card-w);
    height: var(--card-h);
    min-width: 18px;
    flex: 0 0 auto;
  }
}

html[data-layout="tablet-land"] .table-stage:is(.view-sergeant, .view-kanz) .hand-dock {
  max-height: none !important;
  overflow: visible;
}
html[data-layout="tablet-land"] .table-stage:is(.view-sergeant, .view-kanz) .hand-row {
  flex-wrap: wrap !important;
  overflow-x: hidden !important;
  max-height: calc(var(--card-h) * 2.2 + 24px);
}
html[data-layout="tablet-land"] .table-stage:is(.view-sergeant, .view-kanz) .actions {
  flex-shrink: 0;
  position: relative;
  z-index: 6;
}
html[data-layout="tablet-land"] .table-stage:is(.view-sergeant, .view-kanz) .status-bar {
  gap: 4px;
  padding: 2px 6px;
}
html[data-layout="tablet-land"] .table-stage:is(.view-sergeant, .view-kanz) .player-status {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 3px 6px;
}
html[data-layout="tablet-land"] .table-stage:is(.view-sergeant, .view-kanz) .ps-head { margin: 0; }
html[data-layout="tablet-land"] .table-stage:is(.view-sergeant, .view-kanz) .ps-lab { display: none; }
html[data-layout="tablet-land"] .table-stage:is(.view-sergeant, .view-kanz) .ps-board,
html[data-layout="tablet-land"] .table-stage:is(.view-sergeant, .view-kanz) .ps-board.sg-inline {
  flex-direction: row;
  gap: 4px;
}
html[data-layout="tablet-land"] .table-stage:is(.view-sergeant, .view-kanz) .ps-num { font-size: 13px; padding: 1px 5px; }
html[data-layout="tablet-land"] .table-stage:is(.view-sergeant, .view-kanz) .ps-metric.score .ps-num { font-size: 15px; }
html[data-layout="tablet-land"] .table-stage:is(.view-sergeant, .view-kanz) .sg-coach-kicker,
html[data-layout="tablet-land"] .table-stage:is(.view-sergeant, .view-kanz) .sg-coach-body { display: none; }

#app.table-view .end-mask,
#app.table-view .stage-board .end-mask {
  z-index: 80;
}
#app.table-view .victory-overlay,
#app.table-view .kout-celeb-mask {
  z-index: 90;
}
@media (max-width: 859px) {
  #app.table-view .stage-board .end-mask {
    position: fixed;
    inset: 0;
    padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
  }
}
html[data-layout="tablet-land"] .stage-board .end-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
}
#app.table-view .end-mask .btn.primary {
  min-height: 44px;
  min-width: 8.5em;
  touch-action: manipulation;
}

/* Phone: plaques on the cloth; hand and actions never share a strip */
html[data-layout="tablet-land"] .bk-ticker.n6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
html[data-layout="tablet-land"] .bk-ticker.n4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
html[data-layout="tablet-land"] .bk-ticker.n6 .tk {
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  padding: 3px 6px;
}
html[data-layout="phone"] #app.table-view .hand-row {
  padding-block: 22px 6px;
}
html[data-layout="phone"] #app.table-view .bk-names-row { display: none; }
html[data-layout="phone"] #app.table-view .bk-ticker { display: none !important; }
html[data-layout="phone"] #app.table-view .seat-s { display: none; }
html[data-layout="phone"] #app.table-view .felt.auction-on .seat-s {
  display: flex;
  bottom: 6px;
}
html[data-layout="phone"] #app.table-view .felt.auction-on.seats-4 { padding-bottom: 52px; }
html[data-layout="phone"] #app.table-view .felt.auction-on.seats-6 { padding-bottom: 50px; }
html[data-layout="phone"] #app.table-view .felt.auction-on .trick-area.seats-6,
html[data-layout="phone"] #app.table-view .felt.auction-on .trick-area.seats-4 {
  min-height: 0;
  height: auto;
}
html[data-layout="phone"] #app.table-view .seat-bid {
  font-size: 10px;
  padding: 2px 7px;
  max-width: 7em;
}
@media (max-height: 520px) {
  #app.table-view .bk-ticker { display: none !important; }
  #app.table-view .felt.auction-on .seat-s { display: flex; bottom: 4px; }
}
html[data-layout="phone"] #app.table-view .seat-plaque {
  font-size: 10px;
  padding: 3px 6px 3px 5px;
  gap: 4px;
}
html[data-layout="phone"] #app.table-view .seat-who { max-width: 6.5em; }
html[data-layout="phone"] #app.table-view .buyer-puck { display: none; }
html[data-layout="phone"] #app.table-view .header { display: none !important; }
html[data-layout="phone"] #app.table-view .felt {
  flex: 1 1 0;
  min-height: 72px;
  max-height: none;
}
html[data-layout="phone"] #app.table-view .hand-dock {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  z-index: 8;
  max-height: min(48vh, calc(var(--card-h) * 2.45 + 120px));
}
html[data-layout="phone"] #app.table-view .hand-row {
  max-height: calc(var(--card-h) * 2.2 + 40px);
  overflow: visible;
  flex-shrink: 0;
  min-height: var(--card-h);
  position: relative;
  z-index: auto;
  padding-block: 28px 8px;
}
html[data-layout="phone"] #app.table-view .sg-coach,
html[data-layout="phone"] #app.table-view .gk-coach,
html[data-layout="phone"] #app.table-view .bl-bunts-live {
  flex-shrink: 0;
  position: relative;
  z-index: auto;
  margin: 0 6px 6px;
  padding: 4px 8px;
  gap: 6px;
  align-items: center;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 42%, transparent);
}
html[data-layout="phone"] #app.table-view .sg-coach-title { font-size: 13px; line-height: 1.2; }
html[data-layout="phone"] #app.table-view .sg-coach-kicker { font-size: 9px; }
html[data-layout="phone"] #app.table-view .sg-coach-body {
  max-height: 1.35em;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.3;
}
html[data-layout="phone"] #app.table-view .hand-dock:has(.gk-coach, .sg-coach, .bl-bunts-live),
html[data-layout="phone"] #app.table-view .hand-dock:has(.actions:not(:empty) button) {
  max-height: none;
  overflow: visible;
  flex-shrink: 0;
}
html[data-layout="phone"] #app.table-view .hand-dock:has(.gk-coach, .sg-coach) .hand-row,
html[data-layout="phone"] #app.table-view .hand-dock:has(.gk-coach, .sg-coach):has(.actions:not(:empty) button) .hand-row,
html[data-layout="phone"] #app.table-view .table-stage.hand-8 .hand-dock:has(.gk-coach, .sg-coach) .hand-row {
  padding-block: 4px 8px;
  overflow: visible;
  max-height: none;
  min-height: var(--card-h);
  flex-shrink: 0;
  z-index: auto;
}
html[data-layout="phone"] #app.table-view .table-stage.hand-8 .hand-row {
  flex-wrap: nowrap;
  justify-content: center;
  overflow: visible;
  padding-block: 16px 6px;
  gap: 6px 2px;
}
html[data-layout="phone"] #app.table-view .table-stage.hand-8 .hand-row .pcard {
  flex: 0 1 auto;
  width: var(--card-w);
  min-width: 26px;
  height: auto;
  aspect-ratio: 5 / 7;
}
html[data-layout="phone"] #app.table-view .bl-bunts-note {
  display: none;
}
#app.table-view .hand-dock > .actions {
  flex-shrink: 0;
  position: relative;
  z-index: 8;
  padding: 6px 8px 4px;
}
#app.table-view .hand-dock > .actions:empty {
  display: none;
  padding: 0;
  margin: 0;
  height: 0;
}
html[data-layout="phone"] #app.table-view .hand-dock:has(.actions:not(:empty) button) .hand-row {
  max-height: none;
  overflow: visible;
  padding-bottom: 8px;
}
html[data-layout="phone"] #app.table-view .table-stage:not(.view-hand):not(.hand-8) .hand-dock:has(.actions:not(:empty) button) .hand-row {
  flex-wrap: wrap;
}
html[data-layout="phone"] #app.table-view .table-stage.hand-8 .hand-dock:has(.actions:not(:empty) button) .hand-row {
  flex-wrap: nowrap;
  overflow: visible;
  max-height: none;
}
html[data-layout="phone"] #app.table-view .table-stage.view-hand .hand-dock {
  overflow: visible;
  max-height: none;
  gap: 6px;
}
html[data-layout="phone"] #app.table-view .table-stage.view-hand:not(.hand-zoom) .hand-row {
  flex-wrap: nowrap;
  justify-content: safe center;
  align-items: flex-end;
  overflow-x: auto;
  overflow-y: visible;
  max-height: none;
  padding-block: 32px 10px;
  padding-inline: 42px;
  gap: 0;
  scrollbar-width: none;
}
html[data-layout="phone"] #app.table-view .table-stage.view-hand:not(.hand-zoom) .hand-dock:has(.gk-coach, .sg-coach) .hand-row {
  padding-block: 12px 10px;
}
html[data-layout="phone"] #app.table-view .table-stage.view-hand:not(.hand-zoom) .hand-row::-webkit-scrollbar { display: none; }
html[data-layout="phone"] #app.table-view .table-stage.view-hand:not(.hand-zoom) .hand-flat {
  display: flex;
  flex-wrap: nowrap;
  max-width: none;
  --hand-overlap: 0.64;
  gap: 0 8px;
  overflow: visible;
  padding-inline: 0;
  justify-content: flex-start;
}
html[data-layout="phone"] #app.table-view .table-stage.view-hand:not(.hand-zoom) .hand-loose {
  display: flex;
  flex-wrap: nowrap;
  padding: 4px 2px 2px;
}
html[data-layout="phone"] #app.table-view .table-stage.view-hand:not(.hand-zoom) .hand-meld-g {
  padding: 28px 6px 4px;
}
html[data-layout="phone"] #app.table-view .table-stage.view-hand:not(.hand-zoom) .hand-drawn {
  position: sticky;
  inset-inline-end: 0;
  margin-inline-start: 8px;
  padding: 0 6px 0 10px;
  align-self: flex-end;
}
html[data-layout="phone"] #app.table-view .table-stage.view-hand .hand-dock:has(.actions:not(:empty) button) .hand-row,
html[data-layout="phone"] #app.table-view .table-stage.view-hand:not(.hand-zoom) .hand-dock:has(.actions:not(:empty) button) .hand-row {
  max-height: none;
  padding-bottom: 10px;
}
html[data-layout="phone"] #app.table-view .table-stage.view-hand .hand-felt-actions {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -72%);
  width: max-content;
  max-width: calc(100% - 96px);
  padding: 4px 8px;
  z-index: 16;
}
html[data-layout="phone"] #app.table-view .table-stage.view-hand .felt.hand-cloth {
  padding-bottom: 44px;
}
html[data-layout="phone"] #app.table-view .table-stage.view-hand .meld-board {
  padding-bottom: 8px;
}
html[data-layout="phone"] #app.table-view .bk-won {
  bottom: 8px;
  max-width: 34%;
}
html[data-layout="phone"] #app.table-view .bk-won.team-us { inset-inline-start: 8px; }
html[data-layout="phone"] #app.table-view .bk-won.team-them { inset-inline-end: 8px; }
html[data-layout="phone"] #app.table-view .felt.seats-6 .seat-sw {
  bottom: 30%;
  left: 4px;
  right: auto;
}
html[data-layout="phone"] #app.table-view .felt.seats-6 .seat-se {
  bottom: 30%;
  right: 4px;
  left: auto;
}
html[data-layout="phone"] #app.table-view .felt.seats-6 .bk-won {
  bottom: 6px;
  max-width: 42%;
}
html[data-layout="phone"] #app.table-view .felt.seats-6 .bk-won.team-us { inset-inline-start: 6px; }
html[data-layout="phone"] #app.table-view .felt.seats-6 .bk-won.team-them { inset-inline-end: 6px; }
html[data-layout="phone"] #app.table-view .felt.seats-6 .won-back {
  width: 14px;
  height: 20px;
  margin-inline-end: -8px;
}

html[data-layout="phone"] #app.table-view .table-stage.view-basra .felt {
  padding-top: 22px;
  padding-bottom: 40px;
}
html[data-layout="phone"] #app.table-view .table-stage.view-basra .basra-board {
  width: min(100%, 440px);
  gap: 8px;
  padding: 2px;
}
html[data-layout="phone"] #app.table-view .table-stage.view-basra .basra-floor {
  grid-template-columns: repeat(4, var(--card-w));
  gap: 12px 6px;
  min-height: 0;
  align-content: end;
}
html[data-layout="phone"] #app.table-view .table-stage.view-basra .basra-meta {
  width: 72px;
  flex-basis: 72px;
  gap: 6px;
}
html[data-layout="phone"] #app.table-view .table-stage.view-basra .basra-stock {
  width: calc(var(--card-w) * 0.62);
  height: calc(var(--card-h) * 0.62);
}
html[data-layout="phone"] #app.table-view .table-stage.view-basra .basra-stock b {
  font-size: 20px;
}
html[data-layout="phone"] #app.table-view .table-stage.view-basra .floor-who {
  font-size: 8px;
  padding: 1px 5px;
  max-width: calc(var(--card-w) - 6px);
  bottom: -6px;
}
html[data-layout="phone"] #app.table-view .table-stage.view-basra .basra-ate {
  display: none;
}
html[data-layout="phone"] #app.table-view .table-stage.view-basra .basra-score-pill {
  padding: 4px 6px;
  gap: 4px;
  max-width: 100%;
  min-height: 26px;
}
html[data-layout="phone"] #app.table-view .table-stage.view-basra .basra-score-pill .who { font-size: 10px; max-width: 5em; }
html[data-layout="phone"] #app.table-view .table-stage.view-basra .basra-score-pill .pts { font-size: 14px; }
html[data-layout="phone"] #app.table-view .table-stage.view-basra .basra-taken .pcard {
  width: 18px;
  height: 26px;
}
html[data-layout="phone"] #app.table-view .table-stage.view-basra .basra-taken .pcard + .pcard { margin-inline-start: -11px; }
html[data-layout="phone"] #app.table-view .table-stage.view-basra .felt.seats-2 {
  padding: 22px 18px 40px;
}
html[data-layout="phone"] #app.table-view .table-stage.view-basra .felt.seats-4 {
  padding: 24px 28px 40px;
}

html[data-layout="phone"] #app.table-view .felt-msg {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  padding: 8px 16px;
  border-radius: 999px;
  border-width: 1.5px;
  max-width: min(86%, 260px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
}
html[data-layout="phone"] #app.table-view .table-stage.view-kanz .kanz-bidbar {
  flex-wrap: nowrap;
  gap: 6px;
}
html[data-layout="phone"] #app.table-view .table-stage.view-kanz .kanz-bidbar .btn {
  min-width: 52px;
  min-height: 44px;
  padding: 6px 10px;
}
html[data-layout="phone"] #app.table-view .table-stage.view-kanz .info-bar {
  height: 0;
  padding: 0;
  margin: 0;
}
html[data-layout="phone"] #app.table-view .table-stage.view-kanz .table-msg {
  font-size: 13px;
  padding: 4px 10px;
}

#app.table-view .table-stage.view-kanz .felt.kanz-hud > .status-bar {
  position: absolute;
  z-index: 8;
  top: 10px;
  left: 10px;
  width: min(200px, 34%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  flex-shrink: 0;
  pointer-events: none;
}
#app.table-view .table-stage.view-kanz .felt.kanz-hud .kanz-camp {
  flex-direction: column;
}
#app.table-view .table-stage.view-kanz .felt.kanz-hud .player-status {
  flex: 0 0 auto;
}
@media (max-width: 859px) {
  #app.table-view .table-stage.view-kanz .felt.kanz-hud > .status-bar {
    width: min(156px, 42%);
    top: 6px;
    left: 6px;
    gap: 4px;
  }
  #app.table-view .table-stage.view-kanz .felt.kanz-hud .player-status {
    padding: 3px 5px 4px;
  }
  #app.table-view .table-stage.view-kanz .felt.kanz-hud .ps-name { font-size: 11px; }
  #app.table-view .table-stage.view-kanz .felt.kanz-hud .kanz-hand-side b { font-size: 26px; }
}


