/* Keep the decision, hand and controls in one desktop view. */
.claim-set {
  display: none;
}
@media (min-width: 801px) {
  .board {
    --rack-space: 166px;
    --hand-space: 158px;
    --action-room: 100px;
    --centre-gap: 144px;
    --river-height: 36px;
    --focus-space: 182px;
    --flow-gap: 10px;
    min-height: 720px;
    height: calc(100dvh - 174px);
  }
  .seat-top {
    top: 12px;
  }
  .seat .opponent-rack {
    gap: 6px;
  }
  .seat .rack-line {
    padding: 4px 4px 6px;
    gap: 8px;
  }
  .seat .rack-line .backs .back {
    width: 26px;
    height: 34px;
  }
  .seat .tile.tiny {
    --tile-w: 30px;
    --tile-h: 40px;
  }
  .seat .bonus-row .tile.tiny {
    --tile-w: 27px;
    --tile-h: 36px;
  }
  .seat-left,
  .seat-right {
    top: calc((100% - var(--action-room) - var(--hand-space)) * 0.55 + 38px);
  }
  .table-center {
    inset: var(--rack-space) 194px calc(var(--hand-space) + var(--action-room));
    container-type: size;
  }
  .discard-stage {
    --visible-top: min(2, var(--top-rows));
    --visible-bottom: min(2, var(--bottom-rows));
    --discard-h: min(
      var(--river-height),
      calc((100cqw - var(--centre-gap) - 2 * var(--stage-col-gap) - 8px) / var(--side-columns)),
      calc((100cqw - 8px) / 5.84),
      calc(
        (100cqh - 2 * var(--flow-gap) - 12px) / (var(--visible-top) + var(--visible-bottom) + 5.84)
      ),
      calc(
        (100cqh - 2 * var(--flow-gap) - 8px - var(--focus-space)) /
          (var(--visible-top) + var(--visible-bottom))
      )
    );
    height: 100%;
    min-height: 0;
    grid-template-rows:
      calc(var(--visible-top) * var(--discard-h) + 4px) minmax(var(--focus-space), 1fr)
      calc(var(--visible-bottom) * var(--discard-h) + 4px);
    row-gap: var(--flow-gap);
  }
  .discard-zone {
    min-height: 0;
    min-width: 0;
    overflow: auto;
    padding: 2px;
    scrollbar-width: thin;
    scrollbar-color: #78987966 transparent;
  }
  .discard-top,
  .discard-bottom {
    justify-content: flex-start;
  }
  .discard-top {
    flex-direction: column-reverse;
  }
  .discard-left,
  .discard-right {
    justify-content: center;
  }
  .discard-pile {
    flex-shrink: 0;
  }
  .desktop-focus {
    grid-area: 2 / 2;
    align-self: center;
    justify-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: min(100%, 174px);
    text-align: center;
    color: #eee5cf;
  }
  .focus-caption {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #c6d5bf;
  }
  .is-decision .focus-caption {
    color: #f0d598;
  }
  .focus-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 5px 12px;
    min-height: 0;
    border-radius: 8px;
  }
  .focus-tile .tile.focus-face {
    --tile-w: 57px;
    --tile-h: 76px;
  }
  .is-decision .focus-tile {
    background: radial-gradient(ellipse, #e4c47824, transparent 72%);
  }
  .focus-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
  }
  .focus-player {
    font-size: 12px;
    color: #c2d2bf;
    line-height: 1.3;
  }
  .focus-wall {
    min-height: 28px;
    padding: 4px 8px;
    margin-top: 3px;
    font-size: 11px;
    background: transparent;
    color: #a9c1ad;
    border-radius: 4px;
  }
  .focus-wall b {
    color: #d6dfc9;
    font-size: 12px;
  }
  .focus-wall:hover {
    background: #ffffff09;
  }
  .focus-wind {
    font-family: serif;
    font-size: 34px;
    color: #d3bd8a;
  }
  .hand-zone {
    bottom: calc(var(--action-room) + 12px);
  }
  .hand-topline {
    margin-bottom: 16px;
  }
  .own-tiles {
    min-height: 0;
  }
  .table-turn-bar {
    flex-direction: column;
    justify-content: center;
    min-height: var(--action-room);
    padding: 8px 16px;
    gap: 7px;
  }
  .table-turn-bar .move-actions {
    order: -1;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    width: 100%;
    gap: 8px;
  }
  .table-turn-bar .turn-status {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 8px;
    text-align: center;
  }
  .table-turn-bar .turn-status strong {
    font-size: 13px;
  }
  .table-turn-bar .turn-status p {
    display: block;
    font-size: 12px;
    margin: 0;
  }
  .table-turn-bar .primary,
  .table-turn-bar .call-button,
  .table-turn-bar .ghost {
    min-height: 44px;
    min-width: 84px;
  }
  .table-turn-bar .claim-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 12px;
  }
  .claim-set {
    display: inline-flex;
    gap: 0;
    pointer-events: none;
  }
  .claim-set .tile.claim-face {
    --tile-w: 21px;
    --tile-h: 28px;
  }
}
@media (min-width: 801px) and (max-width: 950px) {
  .table-center {
    left: 166px;
    right: 166px;
  }
  .board {
    --centre-gap: 132px;
    --river-height: 32px;
  }
}
@media (min-width: 801px) and (max-height: 900px) {
  .topbar {
    height: 64px;
  }
  .workspace {
    padding-top: 12px;
  }
  .table-toolbar {
    margin-bottom: 8px;
  }
  .board {
    height: calc(100dvh - 130px);
    min-height: 650px;
    --rack-space: 148px;
    --hand-space: 164px;
    --river-height: 31px;
    --focus-space: 132px;
    --flow-gap: 6px;
  }
  .seat .player-name small {
    display: none;
  }
  .seat .rack-front .tai-badge {
    min-height: 32px;
    padding: 3px 6px;
  }
  .seat .rack-line .backs .back {
    width: 24px;
    height: 30px;
  }
  .seat .opponent-rack {
    gap: 4px;
  }
  .desktop-focus {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 4px 8px;
    align-items: center;
  }
  .desktop-focus:not(:has(.focus-tile)) {
    display: flex;
  }
  .focus-caption,
  .focus-wall {
    grid-column: 1 / -1;
  }
  .focus-tile {
    grid-column: 1;
    grid-row: 2 / 4;
    padding: 4px 7px;
  }
  .focus-name {
    grid-column: 2;
    align-self: end;
    text-align: left;
  }
  .focus-player {
    grid-column: 2;
    align-self: start;
    text-align: left;
  }
  .focus-tile .tile.focus-face {
    --tile-w: 48px;
    --tile-h: 64px;
  }
}
@media (min-width: 801px) and (max-height: 760px) {
  .board {
    min-height: 598px;
    --rack-space: 144px;
    --hand-space: 136px;
    --action-room: 92px;
    --river-height: 24px;
    --focus-space: 116px;
    --flow-gap: 4px;
  }
  .hand-zone .bonus-row .tile.tiny {
    --tile-w: 23px;
    --tile-h: 31px;
  }
  .hand-topline .tai-meter {
    display: none;
  }
  .own-tiles > .tile {
    --tile-w: 36px;
  }
  .desktop-focus {
    gap: 2px 6px;
  }
  .focus-tile .tile.focus-face {
    --tile-w: 42px;
    --tile-h: 56px;
  }
  .focus-caption {
    font-size: 9px;
  }
  .focus-name {
    font-size: 13px;
  }
}
