.play-row .summary { margin: 5px 0; }
#hint { margin: 9px 2px 6px; }
#bets { margin: 10px 2px 0; }
.play:active:enabled, .spot:active:enabled, .chip:active:enabled { transform: translateY(1px); filter: brightness(1.23); }
.play:disabled { opacity: 1; color: #d0b993; background: #40352d; border-color: #74614b; }
.spot:focus-visible { outline-offset: -3px; }
.roulette-numbers .spot.selected:focus-visible { box-shadow: inset 0 0 0 4px #211523; }
@media (max-width: 760px), (max-height: 500px) and (max-width: 1024px) {
  body {
    --safe-top: max(env(safe-area-inset-top, 0px), var(--bebeto-safe-top, 0px));
    --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--bebeto-safe-bottom, 0px));
    --safe-left: max(env(safe-area-inset-left, 0px), var(--bebeto-safe-left, 0px));
    --safe-right: max(env(safe-area-inset-right, 0px), var(--bebeto-safe-right, 0px));
    height: 100vh; height: 100dvh; min-height: 0; overflow: hidden;
    display: grid; grid-template-rows: auto minmax(0, 1fr);
    padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  }
  header { width: 100%; height: 43px; margin-block: 0; }
  main {
    width: 100%; height: 100%; min-height: 0; margin-block: 0; display: grid; grid-template-rows: auto minmax(0, 1fr);
    padding: 6px clamp(6px, 2.5vw, 14px) 5px;
  }
  .heading { margin-bottom: 5px; gap: 8px; }
  .heading h1 { font-size: clamp(1.45rem, 6.1vw, 2.1rem); }
  .bank { padding: 2px 6px; min-width: 76px; }
  .bank strong { font-size: .98rem; }
  .table-layout { min-height: 0; grid-template: minmax(0, 1fr) auto / minmax(0, 1fr); gap: 5px; }
  .game-board {
    min-height: 0; height: 100%; overflow-y: auto; overscroll-behavior: contain;
    scrollbar-width: thin; scroll-padding-block: 8px; padding: 7px;
  }
  #stage { min-height: 0; }
  .wheel-stage { padding: 6px; gap: clamp(18px, 8vw, 50px); }
  .wheel-rim { width: clamp(90px, 18dvh, 160px); }
  .wheel-result { gap: 2px; }
  .result-number { width: 45px; font-size: 1.6rem; }
  .outside { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 5px; }
  .outside .spot { min-height: 38px; overflow-wrap: anywhere; }
  .roulette-numbers { margin-top: 5px; }
  #hint { font-size: .72rem; min-height: 1.4em; }
  aside {
    align-self: end; position: static; padding: 7px 9px;
    background: linear-gradient(120deg, #2d2229, #211921); border-color: #675348;
  }
  .chip-row { display: flex; align-items: center; gap: 8px; }
  .chip-row h2 { font-size: .64rem; margin: 0; max-width: 65px; }
  #chips { flex: 1; gap: 6px; justify-content: flex-end; }
  .chip { width: 38px; max-width: 42px; }
  .play-row { display: grid; grid-template-columns: minmax(66px, .35fr) minmax(0, 1fr); align-items: center; gap: 8px; margin-top: 7px; }
  .play-row .summary { display: grid; gap: 0; padding: 0 4px; margin: 0; line-height: 1.15; }
  .summary strong { font-size: 1.16rem; }
  .play { min-height: 44px; font-size: 1rem; }
  .tools { margin: 5px 0 0; }
  .tools button { min-height: 29px; }
  #bets { max-height: none; overflow: visible; }
  #receipt { margin: 0; }
  #receipt:not(:empty) { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 5px; }
  #receipt .receipt-line { gap: 4px; margin: 0; font-size: .77rem; }
  #receipt>span, #receipt small { font-size: .67rem; }
}
@media (orientation: landscape) and (min-width: 500px) and (max-height: 500px) and (max-width: 1024px) {
  header { height: 32px; }
  header a, header button { min-height: 28px; }
  header img { height: 23px; width: 23px; }
  main { padding-block: 3px; }
  .heading h1 { font-size: 1.45rem; }
  .heading .bank { display: flex; align-items: center; gap: 6px; }
  .table-layout { grid-template: minmax(0, 1fr) / minmax(0, 1fr) minmax(171px, 31%); }
  aside { align-self: start; }
  .chip-row { display: block; }
  .chip-row h2 { max-width: none; margin-bottom: 5px; }
  #chips { gap: 3px; justify-content: space-between; }
  .chip { width: 30px; min-width: 23px; max-width: 37px; }
  .play-row { grid-template-columns: auto minmax(0, 1fr); gap: 3px; }
  .tools button { font-size: .65rem; overflow-wrap: anywhere; }
  .wheel-rim { width: clamp(74px, 25dvh, 112px); }
}
