/* PokerFun presentation layer. Kept separate from the original styles so the
   backed-up design and game rules remain easy to compare and restore. */
:root {
  --ink: #08120f;
  --surface: #11231c;
  --surface-raised: #1b3026;
  --felt: #124b35;
  --felt-light: #206d4a;
  --line: rgba(226, 207, 155, .25);
  --cream: #fff8e7;
  --soft: #d2dfd4;
  --accent: #edcd7a;
  --accent-deep: #b88738;
}

html { scroll-behavior: smooth; }
body {
  color: var(--cream);
  background:
    radial-gradient(ellipse at 50% -16%, rgba(53, 131, 86, .34), transparent 55%),
    radial-gradient(ellipse at 100% 60%, rgba(154, 104, 43, .1), transparent 42%),
    #07110d;
}
button, input { font: inherit; }
.phone-control-icon, #phone-settings-toggle { display: none; }
.header-settings-wrap, .header-settings { display: contents; }
button:focus-visible, input:focus-visible, select:focus-visible, [role="button"]:focus-visible {
  outline: 3px solid #f5d989;
  outline-offset: 3px;
}

#game-header {
  max-width: 1260px;
  min-height: 88px;
  padding: .85rem clamp(.8rem, 2vw, 1.5rem);
  gap: .7rem 1.5rem;
  border-bottom: 1px solid rgba(238, 212, 155, .13);
}
.brand-lockup { display: flex; align-items: center; gap: .75rem; flex: 0 0 auto; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(240, 208, 128, .72);
  border-radius: 16px;
  background: linear-gradient(145deg, #30684a, #0a2419);
  color: var(--accent);
  box-shadow: inset 0 1px rgba(255,255,255,.2), 0 8px 22px rgba(0,0,0,.28);
  font-family: Georgia, serif;
  font-size: 2rem;
  line-height: 1;
}
.brand-mark, .start-mark { overflow: hidden; border-radius: 50%; }
.brand-mark img, .start-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.brand-kicker {
  display: block;
  margin-bottom: .12rem;
  color: #c9b27d;
  font-size: .64rem;
  font-weight: 850;
  letter-spacing: .19em;
  text-transform: uppercase;
}
.title {
  color: var(--cream);
  background: none;
  -webkit-text-fill-color: currentColor;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.45rem, 2.3vw, 1.9rem);
  letter-spacing: -.035em;
  line-height: 1;
}
.game-info { gap: .4rem; }
.mode-selector {
  margin-right: .35rem;
  padding: .25rem;
  border: 1px solid rgba(228, 215, 177, .2);
  border-radius: 999px;
  background: #0a1b14;
}
.mode-btn {
  min-height: 38px;
  padding-inline: 1rem;
  border-radius: 999px;
  color: #d6ded5;
  font-weight: 750;
}
.mode-btn.active {
  color: #231908;
  background: linear-gradient(180deg, #ffe7a4, #d9aa4e);
  box-shadow: 0 2px 9px rgba(0,0,0,.32);
}
.sound-toggle, .restart-game {
  min-height: 38px;
  border: 1px solid rgba(226, 207, 155, .17);
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  color: #f1e6ce;
}
.sound-toggle:hover, .restart-game:hover { background: rgba(255,255,255,.11); }
.level-info {
  gap: .42rem;
  margin-left: .3rem;
  border: 1px solid rgba(226, 207, 155, .2);
  border-radius: 999px;
  background: rgba(0,0,0,.24);
  color: var(--accent);
  font-weight: 750;
}
.hand-count, .blind-display { color: #e6e6d7; }

#game-table {
  max-width: 1120px;
  min-height: 520px;
  margin-block: .9rem .4rem;
  border: 1px solid #aa874b;
  border-radius: 32px;
  background:
    radial-gradient(ellipse at 50% 48%, rgba(37, 118, 77, .9) 0%, rgba(16, 78, 51, .98) 57%, #0a3423 100%);
  box-shadow:
    0 0 0 5px #0b1c15,
    0 0 0 7px rgba(195, 155, 83, .32),
    0 30px 75px rgba(0,0,0,.55),
    inset 0 0 0 9px rgba(0,0,0,.18),
    inset 0 0 60px rgba(0,0,0,.28);
}
.player-info, .human-area .player-info {
  min-height: 290px;
  border: 1px solid rgba(234, 210, 153, .24);
  border-radius: 20px;
  background: linear-gradient(150deg, rgba(14, 35, 25, .95), rgba(6, 24, 17, .82));
  box-shadow: inset 0 1px rgba(255,255,255,.06), 0 14px 30px rgba(0,0,0,.22);
}
.bot-area .player-info { border-top-color: rgba(243, 209, 133, .52); }
.human-area .player-info { border-top-color: rgba(192, 224, 190, .48); }
.photo-container {
  width: 86px;
  height: 86px;
  border: 3px solid #d9bc73;
  box-shadow: 0 0 0 5px rgba(230, 199, 119, .12), 0 9px 18px rgba(0,0,0,.35);
}
.photo-plus[hidden] { display: none !important; }
.human-avatar { position: relative; }
.human-avatar .photo-upload-trigger { transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.human-avatar .photo-upload-trigger:hover,
.human-avatar .photo-upload-trigger:focus-visible {
  border-color: #fff0ad;
  box-shadow: 0 0 0 5px rgba(255, 224, 146, .25), 0 9px 22px rgba(0,0,0,.4);
  transform: translateY(-2px);
}
@media (hover: hover) and (pointer: fine) {
  .human-avatar::after {
    content: attr(data-photo-action);
    position: absolute;
    z-index: 20;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(3px);
    padding: .35rem .55rem;
    border: 1px solid #e7ca7e;
    border-radius: 7px;
    background: #10241a;
    color: #fff3d0;
    box-shadow: 0 6px 16px rgba(0,0,0,.4);
    font-size: .7rem;
    font-weight: 800;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease, transform 150ms ease;
  }
  .human-avatar:hover::after,
  .human-avatar:focus-within::after { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.player-name { color: var(--cream); font-family: Georgia, serif; font-size: 1.28rem; letter-spacing: -.02em; }
.bot-title { color: #bcd1be; font-size: .78rem; letter-spacing: .04em; }
.stack-display { color: #cbd8cd; font-size: .88rem; }
.stack-display .stack-amount, #bot-stack.stack-amount {
  color: #ffe1a0;
  font-size: 1.13rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stack-display .stack-amount span { color: inherit; font: inherit; }
.hole-cards { margin-block: .7rem; }
.hand-strength { color: #e8dcbb; font-weight: 700; }

.community-area {
  min-height: 365px;
  padding: clamp(1rem, 2.5vw, 2rem);
  padding-bottom: clamp(1rem, 2.5vw, 2rem);
  gap: clamp(.45rem, 1.5vh, .85rem);
  border: 1px solid rgba(235, 219, 167, .35);
  border-radius: 42% / 48%;
  background: radial-gradient(ellipse at center, rgba(43, 128, 83, .38), rgba(4, 41, 27, .22) 75%);
  box-shadow: inset 0 0 0 7px rgba(0,0,0,.09), inset 0 0 44px rgba(0,0,0,.19);
}
.community-area > .dealer-button {
  position: absolute;
  z-index: 2;
  width: 38px;
  height: 38px;
  margin: 0;
  border: 3px solid #fff8df;
  border-radius: 50%;
  background: radial-gradient(circle at 33% 25%, #fffef1, #ead9ab 73%, #ae8549);
  color: #49321a;
  box-shadow: 0 0 0 2px rgba(113, 73, 31, .7), 0 6px 14px rgba(0,0,0,.4), inset 0 1px 1px #fff;
  font-size: .82rem;
  font-weight: 950;
  pointer-events: none;
}
.community-area > .dealer-bot { left: 12px; top: 50%; transform: translateY(-50%); }
.community-area > .dealer-human { right: 12px; top: 50%; transform: translateY(-50%); }
.pot-display { margin-bottom: .15rem; }
.pot-chips {
  min-width: 160px;
  justify-content: center;
  border-color: #d6b66a;
  border-radius: 16px;
  background: #091911;
  box-shadow: inset 0 1px rgba(255,255,255,.09), 0 8px 20px rgba(0,0,0,.25);
}
.pot-label { color: #c6d5c8; font-size: .7rem; font-weight: 850; }
.pot-amount { color: #ffdd8a; font-variant-numeric: tabular-nums; font-size: 1.55rem; }
.felt-wagers {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: .6rem;
  min-height: 46px;
}
.felt-wagers[hidden], .felt-wager[hidden] { display: none; }
.felt-wager { display: flex; min-width: 0; align-items: center; gap: .4rem; }
.opponent-wager { justify-self: start; }
.player-wager { justify-self: end; flex-direction: row-reverse; text-align: right; }
.felt-wager .chip-stack { min-width: 0; min-height: 32px; flex: 0 0 auto; gap: 0; }
.felt-wager .chip-column + .chip-column { margin-left: -11px; }
.felt-wager .poker-chip { width: 28px; height: 28px; margin-top: -20px; }
.wager-caption { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; white-space: nowrap; }
.wager-caption span { color: #d1e4d1; font-size: .58rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.wager-caption strong { color: #ffe19a; font-size: .9rem; font-variant-numeric: tabular-nums; }
.chip-legend { opacity: .83; }
.community-cards { min-height: 92px; gap: clamp(.25rem, 1vw, .6rem); flex-wrap: nowrap; }
.community-cards:empty { min-height: 0; }
.community-cards .card { width: clamp(56px, 6vw, 74px); }
.hole-cards .card { width: clamp(47px, 5vw, 58px); }
.card { border-radius: 7px; }
.card.red { color: #ad3027; }
.phase-indicator { margin-top: .1rem; padding: .2rem .55rem; background: none; color: #d8e8d6; font-size: .72rem; font-weight: 850; }
.stage-track {
  display: flex;
  width: min(310px, 90%);
  align-items: center;
  gap: .35rem;
}
.stage-track span {
  flex: 1;
  padding-top: .35rem;
  border-top: 3px solid rgba(221, 232, 212, .27);
  color: #bbcfbd;
  font-size: .64rem;
  font-weight: 780;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}
.stage-track span.active { border-color: #ffe092; color: #fff1c4; }
.stage-track span.completed { border-color: #8ecc9a; color: #d4edce; }
.table-status { min-height: 1.35em; color: #fff5d6; font-size: .86rem; font-weight: 740; text-align: center; }
.community-area .hand-result-inline {
  border-color: #e2c27e;
  background: rgba(4, 21, 14, .96);
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
}
.community-area .hand-result-inline p { color: #fff2cc; }
.community-area:has(.hand-result-inline.show) { padding-bottom: 5.5rem; }
.bot-subtitle { max-width: 88%; }

.sidebar {
  min-height: 104px;
  grid-template-columns: 125px 1fr;
  border-color: rgba(228, 210, 157, .17);
  background: rgba(5, 22, 15, .8);
}
.sidebar h3 { color: #f5d68e; font-size: .74rem; }
.hand-log { max-height: 86px; color: #d8e1d5; line-height: 1.45; }
.hand-entry + .hand-entry { margin-top: .3rem; }

.sidebar .history-open {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  width: 100%;
  padding: .55rem .6rem;
  border: 1px solid rgba(245, 214, 142, .36);
  border-radius: 10px;
  color: #f5d68e;
  background: rgba(15, 43, 30, .9);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}
.sidebar .history-open:hover, .sidebar .history-open:focus-visible { border-color: #f5d68e; background: #1b4d35; }
.sidebar .history-open span { font-size: 1.1rem; line-height: 1; }
.hand-log { display: flex; align-items: center; overflow: hidden; }
.hand-log .hand-entry { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-dialog { z-index: 1700; }
.utility-panel.history-panel { width: min(880px, calc(100vw - 24px)); max-height: min(88dvh, 850px); overflow: auto; }
.history-layout { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(0, 1.5fr); gap: 1rem; min-height: 300px; }
.history-list { display: flex; flex-direction: column; gap: .45rem; max-height: 58dvh; overflow-y: auto; }
.history-list button { width: 100%; padding: .7rem; border: 1px solid rgba(245, 214, 142, .24); border-radius: 10px; color: #eee2c8; background: rgba(7, 27, 19, .9); text-align: left; line-height: 1.4; cursor: pointer; }
.history-list button:hover, .history-list button:focus-visible, .history-list button[aria-current="true"] { border-color: #e7c66b; background: #1a4733; }
.history-detail { min-width: 0; max-height: 58dvh; overflow-y: auto; padding: .9rem 1rem; border: 1px solid rgba(245, 214, 142, .22); border-radius: 12px; background: rgba(4, 18, 12, .72); }
.history-detail h3 { margin: 0 0 .8rem; color: #f5d68e; font-size: 1.05rem; line-height: 1.4; }
.history-detail ol { margin: 0; padding-left: 1.35rem; }
.history-detail li { padding: .35rem .2rem .5rem; color: #e5e9dc; line-height: 1.45; overflow-wrap: anywhere; }
.history-detail li::marker { color: #e7c66b; }
.history-detail .history-street { display: block; margin-bottom: .15rem; color: #e7c66b; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.history-detail .analyze-hand { display: block; margin: 1.2rem 0 .2rem; width: 100%; }
.history-detail button { min-height: 44px; padding: .65rem 1rem; border: 1px solid #c6a95e; border-radius: 9px; background: #194d36; color: #fff3d1; font: inherit; cursor: pointer; }
.history-detail button:focus-visible, .history-detail summary:focus-visible { outline: 2px solid #ffe59c; outline-offset: 3px; }
.analysis-body { font-size: 1rem; line-height: 1.55; overflow-wrap: anywhere; }
.analysis-body p { margin: .65rem 0; color: #e8eee5; }
.analysis-body details { padding: .6rem .7rem; margin: .7rem 0; border: 1px solid #45614e; border-radius: 9px; }
.analysis-body summary { cursor: pointer; color: #f7dda0; font-weight: 700; min-height: 30px; }
.analysis-body .analysis-caption, .analysis-caption { color: #bdcfbf; font-size: .9rem; }
.analysis-body .analysis-warning { padding: .7rem; background: #443520; color: #ffe2a5; border-radius: 8px; }
.analysis-verdict { color: #f7dda0; font-size: 1.3rem; margin: .6rem 0; }
.analysis-decision { margin: 1rem 0; padding-top: .5rem; border-top: 1px solid #45614e; }
.analysis-decision h4 { color: #f5d68e; margin: .4rem 0; }
.analysis-cards { font-family: ui-monospace, monospace; font-weight: 700; letter-spacing: .04em; }
.analysis-body .analysis-event { color: #c7d5c9; font-size: .9rem; }
.analysis-body progress { display: block; width: 100%; margin: .9rem 0; accent-color: #e7c66b; }
.analysis-body a { display: inline-block; color: #f5d68e; padding: .7rem 0; }
.analysis-toolbar { position: sticky; top: -.9rem; z-index: 1; padding: .4rem 0; background: #091d13; }
.analysis-quick-summary { padding: .8rem 1rem; margin: .7rem 0 1rem; background: #173c29; border: 1px solid #a68c50; border-radius: 12px; }
.analysis-body .analysis-summary-label { margin: 0; color: #efdba9; font-weight: 700; }
.analysis-quick-summary .analysis-verdict { margin: .25rem 0; }
@media (max-width: 620px) {
  .history-layout { grid-template-columns: 1fr; }
  .history-list { max-height: 24dvh; }
  .history-detail { max-height: 46dvh; }
}
@media (orientation: landscape) and (max-height: 600px) {
  .sidebar { display: grid; }
}

.controls-panel {
  display: block;
  width: min(960px, calc(100% - 24px));
  min-height: 0;
  margin: .65rem auto 1.5rem;
  padding: .75rem 1rem .9rem;
  border: 1px solid rgba(230, 197, 122, .42);
  border-radius: 18px;
  background: linear-gradient(140deg, rgba(15, 32, 23, .97), rgba(8, 22, 15, .97));
}
.mobile-hand-tray { display: none; }
.controls-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .5rem;
  color: #f4dfae;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.controls-heading #action-context { color: #cbd9c9; letter-spacing: .02em; text-transform: none; }
.action-buttons { display: grid; grid-template-columns: 105px 130px minmax(0, 1fr); gap: .55rem; align-items: stretch; }
.action-btn { min-height: 70px; border-radius: 12px; font-size: .9rem; }
.fold-btn { border: 1px solid #a7625e; background: #682b2b; }
.check-btn { border: 1px solid #809b88; background: #30463a; }
.call-btn { border: 1px solid #eac57b; background: linear-gradient(#f9dd95, #d6a74b); }
.raise-slider-wrapper {
  display: grid;
  grid-template-columns: auto minmax(90px, 1fr) 122px;
  grid-template-rows: auto auto;
  grid-template-areas: 'label range action' 'presets presets action';
  gap: .38rem .7rem;
  min-width: 0;
  padding: .35rem .45rem .35rem .75rem;
  border: 1px solid rgba(234, 215, 170, .18);
  border-radius: 13px;
  background: rgba(255,255,255,.035);
}
.raise-slider-wrapper label { grid-area: label; align-self: center; color: #dbe5d9; font-size: .82rem; white-space: nowrap; }
.raise-slider-wrapper label strong { color: #ffdc8c; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
#raise-slider { grid-area: range; width: 100%; accent-color: #f1ca70; }
.raise-presets { grid-area: presets; display: flex; flex-wrap: wrap; gap: .3rem; }
.raise-presets button {
  min-height: 28px;
  padding: .25rem .6rem;
  border: 1px solid rgba(232, 213, 165, .33);
  border-radius: 999px;
  background: rgba(255,255,255,.055);
  color: #f2ebd5;
  font-size: .72rem;
  font-weight: 770;
  cursor: pointer;
}
.raise-presets button:hover:not(:disabled) { border-color: #f1cc7b; background: rgba(240, 203, 116, .13); }
.raise-presets button.selected:not(:disabled) { border-color: #f6d58a; background: #e6bf70; color: #20180e; box-shadow: 0 0 0 2px rgba(230, 191, 112, .18); }
.raise-presets button:disabled { opacity: .38; cursor: not-allowed; }
.raise-btn { grid-area: action; min-width: 0; min-height: 0; background: linear-gradient(#eac479, #bf8d37); }
.bet-preview { margin-top: .48rem; color: #f2ddaa; font-size: .81rem; font-weight: 700; line-height: 1.35; text-align: center; }
.new-hand-btn { width: 100%; min-height: 58px; background: linear-gradient(#ffe09a, #d6a44a); }
.controls-panel.hand-finished .action-buttons,
.controls-panel.hand-finished .controls-heading,
.controls-panel.hand-finished .bet-preview { display: none; }
.controls-panel.hand-finished:not(:has(.new-hand-btn.visible)) { display: none; }

.character-picker { background: rgba(3, 12, 8, .94); }
.character-picker-panel {
  border-color: rgba(234, 203, 132, .56);
  background: radial-gradient(ellipse at 50% 0%, #20392b, #0a1710 75%);
  box-shadow: 0 30px 100px #000;
}
.picker-heading h2 { font-family: Georgia, serif; letter-spacing: -.04em; }
.character-card {
  border-color: color-mix(in srgb, var(--character-color) 48%, #8c9e87);
  background: linear-gradient(150deg, color-mix(in srgb, var(--character-color) 16%, #1a2a20), #0a1710 74%);
  box-shadow: inset 0 1px rgba(255,255,255,.06);
}
.character-medallion { box-shadow: 0 0 0 3px rgba(255,255,255,.06), 0 8px 20px rgba(0,0,0,.4); }
.character-copy h3 { font-family: Georgia, serif; font-size: 1.18rem; letter-spacing: -.025em; }
.character-copy strong { color: color-mix(in srgb, var(--character-color) 65%, white); }
.character-copy p { color: #d7e0d6; }
.opponent-progress { color: #f5d991; }
.character-actions button { border-radius: 9px; }
.choose-character { background: linear-gradient(#fbe2a1, #d3a44e); }
.completed-badge { border: 1px solid rgba(173, 245, 182, .43); }

.start-card {
  position: relative;
  overflow: hidden;
  width: min(590px, 100%);
  padding: clamp(1.25rem, 3vw, 1.9rem);
  border-color: rgba(239, 211, 143, .6);
  background:
    radial-gradient(circle at 50% -10%, rgba(82, 155, 101, .28), transparent 48%),
    linear-gradient(155deg, #1a3828, #091911 78%);
}
.start-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, transparent, #f0d084 48%, transparent); }
.start-mark { width: 90px; margin-bottom: .85rem; box-shadow: 0 0 0 5px rgba(245,211,126,.1), 0 12px 30px rgba(0,0,0,.45); }
.start-card h2 { font-family: Georgia, serif; font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: -.055em; }
.start-card p { color: #d8e4d8; }
.start-card .eyebrow { color: #f0d48f; font-size: .7rem; letter-spacing: .16em; }
.start-card h2.start-brand-title { margin: .35rem 0 .2rem; font-size: clamp(3rem, 6vw, 4rem); line-height: 1.02; letter-spacing: -.07em; text-shadow: 0 6px 25px rgba(0,0,0,.32); }
.start-brand-title span { color: #f3cf7c; }
.start-card .start-tagline { margin: .35rem 0 .55rem; color: #f8e7ba; font: 600 1.15rem Georgia, serif; }
.start-card .start-instructions { max-width: 42ch; margin-bottom: 1.45rem; font-size: .94rem; }
.start-choices { gap: .75rem; }
.start-choice { min-height: 99px; padding: .8rem 1.1rem; grid-template-rows: auto auto auto; border-radius: 17px; }
.start-choice-featured {
  border-color: #f0d084;
  background: linear-gradient(115deg, #265a3b, #123724 78%);
  box-shadow: inset 0 1px rgba(255,255,255,.16), 0 10px 24px rgba(0,0,0,.24), 0 0 0 1px rgba(243,205,119,.1);
}
.start-choice:last-child { background: linear-gradient(115deg, #23362c, #13251c); }
.start-choice-eyebrow { grid-column: 1; grid-row: 1; color: #e8c87a; font-size: .62rem; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.start-choice-title { grid-column: 1; grid-row: 2; font-size: clamp(1.23rem, 3.4vw, 1.52rem); }
.start-choice-detail { grid-column: 1; grid-row: 3; font-size: .86rem; }
.start-choice-arrow { display: grid; place-items: center; grid-column: 2; grid-row: 1 / 4; align-self: center; justify-self: center; width: 32px; height: 32px; border: 1px solid rgba(247,221,156,.5); border-radius: 50%; background: rgba(240,205,132,.11); }
.start-choice-arrow svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.start-choice:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(0,0,0,.32); }
.start-choice-featured:hover { border-color: #fff0b2; }
.custom-opponent-card[hidden] { display: none !important; }
@media (max-width: 420px) {
  .start-card { padding: 1.15rem; }
  .start-mark { width: 74px; }
  .start-card .eyebrow { font-size: .61rem; letter-spacing: .12em; }
  .start-card h2.start-brand-title { font-size: clamp(2.35rem, 9vw, 3rem); }
  .start-card .start-tagline { font-size: 1.03rem; }
  .start-card .start-instructions { margin-bottom: 1.1rem; }
  .start-choice { min-height: 92px; padding: .7rem .85rem; }
  .start-choice-detail { font-size: .79rem; }
}

@media (min-width: 901px) {
  #app {
    height: 100dvh;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: .55rem;
    padding-bottom: .65rem;
  }
  #game-header { min-height: 0; padding-block: .55rem; gap: .45rem 1rem; }
  #game-table {
    height: 100%;
    min-height: 0;
    margin-block: 0;
    grid-template-columns: clamp(195px, 19vw, 230px) minmax(0, 1fr) clamp(195px, 19vw, 230px);
    grid-template-rows: minmax(0, 1fr) auto 58px;
    gap: .7rem;
    padding: .8rem;
  }
  .player-info, .human-area .player-info { min-height: clamp(235px, calc(100dvh - 415px), 285px); gap: .55rem; padding: .7rem; }
  .photo-container { width: clamp(69px, 10vh, 82px); height: clamp(69px, 10vh, 82px); }
  .hole-cards { margin-block: .3rem; }
  .community-area { min-height: 0; gap: .35rem; padding: .7rem 1rem; }
  .community-area:has(.hand-result-inline.show) { padding-bottom: 5rem; }
  .community-cards { min-height: 100px; }
  .sidebar { min-height: 0; padding: .35rem .85rem; }
  .sidebar { grid-template-columns: 155px minmax(0, 1fr); align-items: center; }
  .sidebar .history-open { min-height: 38px; padding: .3rem .6rem; white-space: nowrap; line-height: 1.2; }
  .hand-log { max-height: 68px; }
  .felt-wagers { min-height: 40px; }
  .controls-panel { position: relative; left: auto; bottom: auto; transform: none; margin-block: 0; padding: .55rem .85rem; }
  .action-btn { min-height: 60px; }
  .community-area:has(.hand-result-inline.show) .felt-wagers,
  .community-area:has(.hand-result-inline.show) .chip-legend,
  .community-area:has(.hand-result-inline.show) .stage-track,
  .community-area:has(.hand-result-inline.show) .phase-indicator { display: none; }
  .character-medallion { width: clamp(62px, 9vh, 76px); }
  .character-copy h3 { font-size: clamp(1.12rem, 2vh, 1.24rem); }
  .character-copy p { font-size: clamp(.87rem, 1.6vh, .97rem); }
  .opponent-progress { font-size: clamp(.77rem, 1.4vh, .88rem); }
  .character-actions button { font-size: .8rem; }
}

@media (min-width: 901px) and (max-height: 700px) {
  #app { gap: .35rem; padding-bottom: .4rem; }
  #game-header { padding-block: .35rem; }
  #game-table { padding: .55rem; gap: .45rem; grid-template-rows: minmax(0, 1fr) auto 54px; }
  .player-info, .human-area .player-info { min-height: 0; gap: .3rem; padding: .45rem; }
  .photo-container { width: 58px; height: 58px; }
  .hole-cards .card { width: 48px; }
  .community-area { gap: .2rem; padding: .35rem .65rem; }
  .community-cards { min-height: 0; }
  .community-cards .card { width: 58px; }
  .pot-chips { padding: .25rem .6rem; }
  .pot-display .chip-stack { min-height: 32px; }
  .felt-wagers { min-height: 32px; }
  .stage-track span { padding-top: .15rem; }
  .controls-panel { padding: .4rem .65rem; }
  .action-btn { min-height: 52px; }
  .controls-heading { margin-bottom: .3rem; }
  .bet-preview { margin-top: .3rem; }
}

@media (min-width: 901px) and (max-width: 1100px) {
  #game-header { display: grid; grid-template-columns: auto minmax(0, 1fr); min-height: 0; padding-block: .55rem; }
  .game-info { min-width: 0; gap: .25rem; }
  .mode-selector { margin-right: 0; }
  .mode-btn, .sound-toggle, .restart-game { padding-inline: .55rem; font-size: .74rem; }
  .level-info { margin-left: 0; font-size: .78rem; }
}

@media (max-width: 900px) {
  #game-table { max-width: 720px; min-height: 0; margin-top: .7rem; }
  .player-info, .human-area .player-info { min-height: 0; }
  .community-area { min-height: 270px; border-radius: 28px; }
  .controls-panel { width: min(720px, calc(100% - 16px)); margin: 0; padding: .65rem; }
  body { padding-bottom: calc(182px + env(safe-area-inset-bottom, 0px)); }
  .action-buttons { grid-template-columns: 82px 108px minmax(0, 1fr); }
  .action-btn { min-height: 60px; }
  .raise-slider-wrapper { grid-template-columns: auto minmax(60px,1fr) 90px; }
  .community-cards .card { width: clamp(48px, 8.5vw, 62px); }
  .hole-cards .card { width: clamp(42px, 7vw, 50px); }
  .community-area > .dealer-button { width: 34px; height: 34px; font-size: .72rem; }
  .community-area > .dealer-bot { top: 12px; left: 12px; transform: none; }
  .community-area > .dealer-human { top: auto; right: 12px; bottom: 12px; transform: none; }
  .community-area:has(.hand-result-inline.show) > .dealer-human { bottom: calc(5.5rem + 12px); }
}

@media (max-width: 620px) {
  #game-header { align-items: center; gap: .35rem .4rem; padding-block: .55rem; }
  #game-header .brand-lockup { flex-basis: 100%; justify-content: center; }
  #game-header .mode-selector { order: 1; margin-left: auto; margin-right: 0; }
  #game-header .mode-btn, #game-header .restart-game, #phone-settings-toggle {
    display: inline-grid; place-items: center; width: 44px; height: 44px; min-height: 44px;
    padding: 0; font-size: 1.3rem;
  }
  #game-header .desktop-control-label { display: none; }
  #game-header .phone-control-icon { display: inline; line-height: 1; }
  #game-header .restart-game { order: 2; }
  #game-header .header-settings-wrap { display: block; position: relative; order: 3; margin-right: auto; }
  #phone-settings-toggle { border: 1px solid var(--line); border-radius: 50%; color: var(--cream); background: var(--surface); font-weight: 850; cursor: pointer; }
  #header-settings { display: none; position: absolute; z-index: 100; top: calc(100% + 8px); right: 0; width: 210px;
    padding: .55rem; border: 1px solid var(--accent-deep); border-radius: 12px; background: #10251b; box-shadow: 0 12px 35px #000a; }
  #header-settings.phone-open { display: grid; gap: .4rem; }
  #header-settings .sound-toggle { width: 100%; min-height: 44px; text-align: left; padding: .55rem .75rem; font-size: .85rem; }
  #game-header .level-info { order: 4; }
  .game-info { display: contents; }
  .brand-mark { width: 43px; height: 43px; border-radius: 13px; font-size: 1.65rem; }
  .brand-kicker { font-size: .56rem; }
  .mode-selector { margin: 0 0 0 auto; }
  .mode-btn { min-height: 36px; padding-inline: .65rem; font-size: .78rem; }
  .sound-toggle, .restart-game { min-height: 34px; padding-inline: .46rem; font-size: .68rem; }
  .level-info { flex-basis: 100%; justify-content: center; margin-left: 0; min-height: 28px; }
  #game-table { width: calc(100% - .5rem); margin-top: .35rem; margin-bottom: .6rem; padding: .4rem; gap: .38rem; border-radius: 22px; }
  .player-info, .human-area .player-info { gap: .5rem; padding: .45rem .55rem; }
  .player-name { font-size: 1.05rem; }
  .photo-container { width: 50px; height: 50px; }
  .felt-wagers { min-height: 36px; gap: .15rem; }
  .felt-wager { gap: .18rem; }
  .felt-wager .chip-column + .chip-column { margin-left: -13px; }
  .felt-wager .poker-chip { width: 25px; height: 25px; margin-top: -18px; }
  .wager-caption span { font-size: .52rem; }
  .wager-caption strong { font-size: .76rem; }
  .community-area { min-height: 182px; padding: .6rem .4rem; gap: .28rem; }
  .community-area:has(.hand-result-inline.show) { padding-bottom: 6.2rem; }
  .community-area:has(.hand-result-inline.show) > .dealer-human { bottom: calc(6.2rem + 8px); }
  .pot-chips { padding-block: .35rem; }
  .chip-legend { font-size: .61rem; }
  .community-cards { min-height: 69px; gap: .2rem; }
  .community-cards:empty { min-height: 0; }
  .community-cards .card { width: clamp(40px, 12.5vw, 50px); }
  .hole-cards .card { width: clamp(38px, 11vw, 44px); }
  .phase-indicator { padding-block: .1rem; }
  .table-status { font-size: .73rem; }
  .stage-track span { font-size: .57rem; }
  .sidebar { min-height: 70px; }
  .controls-panel { bottom: max(6px, env(safe-area-inset-bottom, 0px)); width: calc(100% - 12px); padding: .55rem; }
  .mobile-hand-tray {
    display: flex;
    align-items: center;
    gap: .6rem;
    min-height: 42px;
    margin-bottom: .35rem;
    padding-bottom: .35rem;
    border-bottom: 1px solid rgba(240, 213, 152, .2);
    color: #f4dc9b;
    font-size: .7rem;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
  }
  .mobile-hand-tray .hole-cards { min-height: 0; margin: 0; gap: .2rem; }
  .mobile-stack { margin-left: auto; color: #d8e4d3; font-size: .68rem; font-weight: 700; letter-spacing: 0; white-space: nowrap; }
  .mobile-stack strong { margin-left: .18rem; color: #ffe1a0; font-size: .93rem; font-weight: 850; font-variant-numeric: tabular-nums; }
  .mobile-hand-tray .card { width: 28px; }
  .mobile-hand-tray .card-rank { font-size: .77rem; }
  .mobile-hand-tray .card-suit { font-size: .95rem; }
  .controls-heading { margin-bottom: .4rem; font-size: .66rem; }
  .action-buttons { grid-template-columns: 1fr 1fr; gap: .38rem; }
  .action-btn { min-height: 40px; padding: .45rem .65rem; }
  .raise-slider-wrapper { grid-column: 1 / -1; grid-template-columns: auto minmax(70px,1fr) 102px; grid-template-areas: 'label range action' 'presets presets presets'; padding: .35rem .45rem; gap: .25rem .45rem; }
  .raise-slider-wrapper label { font-size: .72rem; }
  .raise-slider-wrapper label strong { font-size: .86rem; }
  .raise-presets { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .2rem; }
  .raise-presets button { min-height: 32px; padding-inline: .12rem; font-size: .64rem; white-space: nowrap; }
  body { padding-bottom: calc(190px + env(safe-area-inset-bottom, 0px)); }
  .character-picker-panel { padding: 1rem; }
  .character-card { padding: .8rem; }
  .character-copy h3 { font-size: 1.13rem; }
  .character-copy p { font-size: .9rem; }
}

@media (max-width: 360px) {
  .brand-lockup { width: auto; }
  .title { font-size: 1.35rem; }
  .mode-selector { flex: 0 0 auto; }
  .mode-btn { padding-inline: .5rem; }
  .raise-slider-wrapper { grid-template-columns: auto minmax(50px,1fr) 84px; }
  .raise-presets button { padding-inline: .06rem; font-size: .59rem; }
  /* On the narrowest phones, a fixed action bar obscures most of the felt. */
  .controls-panel { position: relative; left: auto; bottom: auto; transform: none; margin: .45rem auto 1rem; }
  body { padding-bottom: env(safe-area-inset-bottom, 0px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .action-btn, .character-card, .character-medallion img { transition: none; }
}

/* Earned opponent portraits share a five-frame photo sheet; future frames
   stay hidden behind locked gallery slots. */
.progress-portrait {
  background-size: 500% auto;
  background-repeat: no-repeat;
  background-color: #0b1510;
}
.progress-portrait[hidden], #portrait-viewer-image[hidden], #portrait-gallery[hidden] { display: none !important; }
#bot-photo-progress { --portrait-position-y: top; position: absolute; inset: 0; z-index: 1; border-radius: 50%; }
.character-medallion { position: relative; }
.character-medallion .progress-portrait { --portrait-position-y: top; position: absolute; inset: 0; display: block; border-radius: 50%; }
#portrait-viewer-progress {
  --portrait-position-y: top;
  width: min(100%, 57.6dvh, 520px);
  max-height: min(72dvh, 650px);
  margin-inline: auto;
  aspect-ratio: 4 / 5;
  background-size: 500% auto;
}
#portrait-viewer-image {
  height: min(72dvh, 650px);
  aspect-ratio: auto;
  object-fit: contain;
}
.portrait-viewer-panel { width: min(620px, 96vw, calc(100dvh - 190px)); }
.portrait-viewer-footer.single-image { grid-template-columns: minmax(0, 1fr); }
.portrait-gallery {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 58px));
  justify-content: center;
  gap: clamp(.25rem, 1vw, .55rem);
  padding: .8rem .75rem .1rem;
}
.portrait-gallery-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: 2px solid #5b6d61;
  border-radius: 9px;
  background: #18251e;
  color: #e7d5a0;
  cursor: pointer;
}
.portrait-gallery-item.selected { border-color: #f4d16f; box-shadow: 0 0 0 2px rgba(244,209,111,.3); }
.portrait-gallery-item:focus-visible { outline: 3px solid #f4d16f; outline-offset: 2px; }
.portrait-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait-gallery-item .progress-portrait { --portrait-position-y: top; position: absolute; inset: 0; }
.portrait-gallery-item:disabled { cursor: not-allowed; border-color: #4b504a; background: linear-gradient(150deg,#27322a,#0d1711); }
.portrait-lock { display: block; font-size: clamp(.9rem, 3vw, 1.25rem); line-height: 1.15; }
.portrait-gallery-item small { display: block; font-size: .6rem; font-weight: 800; }

.utility-dialog {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow-y: auto;
  background: rgba(2, 8, 5, .92);
  backdrop-filter: blur(10px);
}
.utility-dialog[hidden] { display: none !important; }
#photo-manager, #voice-picker { z-index: 1700; }
.utility-panel {
  width: min(620px, 100%);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid rgba(239, 210, 140, .58);
  border-radius: 20px;
  color: #fff8e7;
  background: linear-gradient(150deg, #1b3427, #091810);
  box-shadow: 0 25px 80px #000;
}
.utility-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.utility-heading h2 { margin: 0; font: 700 clamp(1.35rem, 4vw, 1.8rem) Georgia, serif; }
.utility-heading button { flex: none; width: 44px; height: 44px; border: 1px solid #a0ab9c; border-radius: 50%; color: #fff; background: #24382d; font-size: 1.5rem; cursor: pointer; }
.utility-panel > p { color: #d8e4d8; line-height: 1.5; }
.utility-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.history-actions { margin-bottom: .8rem; }
.history-clear-confirmation { padding: .8rem; margin-bottom: .8rem; border: 1px solid #c98b72; border-radius: 10px; background: #30251e; }
.history-clear-confirmation[hidden] { display: none; }
.history-actions button:disabled { opacity: .5; cursor: default; }
.utility-actions button, .photo-slot button { min-height: 42px; padding: .5rem .75rem; border: 1px solid #e6c979; border-radius: 9px; color: #1b180d; background: #e7ca7e; font-weight: 800; cursor: pointer; }
.utility-actions button + button, .photo-slot .photo-slot-reset { color: #f4e9cf; background: #2b4133; border-color: #809a83; }
.utility-status { min-height: 1.4em; color: #ffe7a5 !important; font-weight: 750; }
.custom-opponent-card { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: .85rem; margin: .7rem 0 1rem; padding: .8rem; border: 1px solid rgba(231, 202, 126, .55); border-radius: 15px; background: linear-gradient(105deg, #1d3729, #0d2419); box-shadow: 0 10px 24px rgba(0,0,0,.2); }
.custom-opponent-card > img { width: 64px; height: 64px; border: 2px solid #d9ba70; border-radius: 50%; object-fit: cover; object-position: center top; background: #10251b; }
.custom-opponent-copy { min-width: 0; }
.custom-opponent-copy .eyebrow { color: #eccd82; }
.custom-opponent-copy h3 { margin: .08rem 0; color: #fff9e8; font: 700 1.2rem Georgia, serif; }
.custom-opponent-copy p { margin: 0; color: #d9e0cf; font-size: .85rem; line-height: 1.35; }
.custom-opponent-copy .custom-progress { margin-top: .2rem; color: #f3d890; font-size: .75rem; font-weight: 800; }
.custom-complete { margin-left: .45rem; color: #bdf0ca; font: 800 .65rem system-ui, sans-serif; white-space: nowrap; }
.custom-opponent-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: .45rem; }
.custom-opponent-actions button { min-height: 38px; padding: .42rem .65rem; border: 1px solid #8fa892; border-radius: 8px; color: #f8f1d8; background: #274334; font-weight: 750; cursor: pointer; }
.custom-opponent-actions #custom-opponent-play { color: #201c0f; border-color: #e6c979; background: #e7ca7e; }
.custom-form-fields, .custom-style-fields { display: grid; gap: .7rem; margin: 1rem 0; }
.custom-form-fields label, .custom-style-fields label { display: grid; gap: .3rem; color: #f5e7c5; font-weight: 700; }
.custom-form-fields input { min-height: 42px; padding: .5rem .65rem; border: 1px solid #8ba18e; border-radius: 8px; color: #fff; background: #10261b; font: inherit; }
.custom-style-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; }
.custom-style-fields label { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.custom-style-fields input { grid-column: 1 / -1; width: 100%; accent-color: #e7ca7e; }
.custom-style-fields output { padding: .1rem .4rem; border-radius: 6px; color: #f8e6b2; background: rgba(231, 202, 126, .12); text-align: right; white-space: nowrap; }
.custom-style-fields small { grid-column: 1 / -1; color: #cad8cb; font-size: .76rem; font-weight: 500; line-height: 1.32; }
.custom-generator-panel { width: min(900px, 100%); }
.custom-generator-layout { display: grid; grid-template-columns: minmax(0, 1fr) 194px; align-items: start; gap: 1.1rem; }
.custom-generator-main { min-width: 0; }
.custom-generator-side { display: grid; gap: .55rem; padding: .9rem; border: 1px solid rgba(231, 202, 126, .38); border-radius: 14px; background: rgba(255,255,255,.04); }
.custom-generator-side img { width: 100%; max-height: 190px; aspect-ratio: 1; border-radius: 12px; object-fit: cover; object-position: center top; background: #0d2518; }
.custom-generator-side strong { color: #f8e6b2; font-size: .95rem; }
.custom-generator-side p { margin: 0; color: #cfddcf; font-size: .78rem; line-height: 1.35; }
.custom-generator-side button { min-height: 42px; padding: .55rem .7rem; border: 1px solid #e6c979; border-radius: 9px; color: #201b0f; background: #e7ca7e; font-weight: 800; cursor: pointer; }
.custom-generator-side button + button { border-color: #8fa892; color: #f8f1d8; background: #274334; }
@media (min-width: 901px) {
  .character-picker-panel { display: flex; flex-direction: column; height: auto; max-height: calc(100dvh - 1rem); overflow-y: auto; }
  .character-picker-panel > p, .custom-opponent-card { flex: none; }
  .character-grid { flex: none; grid-template-rows: none; grid-auto-rows: auto; }
  .character-card { min-height: 214px; }
  .custom-opponent-card { margin: 0 0 .6rem; padding: .5rem .7rem; }
  .custom-opponent-card > img { width: 54px; height: 54px; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .character-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 901px) {
  .character-card { position: relative; min-height: 0; }
  .character-card .character-medallion { position: absolute; top: .55rem; left: .55rem; width: 52px; }
  .character-card .character-copy h3, .character-card .character-copy strong { display: block; margin-left: 62px; }
  .character-card .character-copy p { margin-top: .85rem; }
}
@media (min-width: 901px) and (max-height: 700px) {
  .character-picker-panel { padding: .65rem; }
  .character-card { padding: .55rem; gap: .3rem; }
  .character-card .character-medallion { width: 46px; }
  .character-card .character-copy h3, .character-card .character-copy strong { margin-left: 54px; }
  .character-copy h3 { font-size: 1.05rem; }
  .character-copy strong { font-size: .83rem; }
  .character-copy p { font-size: .85rem; }
  .character-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.photo-slot-list { display: grid; gap: .5rem; }
.photo-slot { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; align-items: center; gap: .55rem; padding: .45rem; border: 1px solid rgba(225, 207, 156, .27); border-radius: 11px; background: rgba(255,255,255,.035); }
.photo-slot img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; object-position: center top; }
.photo-slot .photo-slot-placeholder { filter: grayscale(1); opacity: .45; }
.photo-slot strong, .photo-slot span { display: block; }
.photo-slot strong { font-size: .9rem; }
.photo-slot span { margin-top: .1rem; color: #d0d9cb; font-size: .73rem; line-height: 1.3; }
@media (max-width: 540px) {
  .custom-opponent-card { grid-template-columns: 54px minmax(0, 1fr); }
  .custom-opponent-card > img { width: 54px; height: 54px; }
  .custom-opponent-actions { grid-column: 1 / -1; justify-content: stretch; }
  .custom-opponent-actions button { flex: 1 1 110px; }
  .custom-style-fields { grid-template-columns: 1fr; }
  .photo-slot { grid-template-columns: 46px minmax(0, 1fr) auto; }
  .photo-slot img { width: 46px; height: 46px; grid-row: 1 / span 2; }
  .photo-slot > div { grid-row: 1 / span 2; }
  .photo-slot-reset { grid-column: 3; }
  .utility-actions button { flex: 1 1 140px; }
  .bet-preview { font-size: .75rem; }
}
@media (max-width: 700px) {
  .custom-generator-layout { grid-template-columns: 1fr; }
  .custom-generator-side { grid-row: 1; grid-template-columns: 64px minmax(0, 1fr) auto auto; align-items: center; }
  .custom-generator-side img { width: 64px; height: 64px; grid-row: 1 / span 2; }
  .custom-generator-side p { grid-column: 2 / -1; }
  .custom-generator-side button { grid-row: 3; }
  .custom-generator-side button:first-of-type { grid-column: 2; }
  .custom-generator-side button:last-of-type { grid-column: 3 / -1; }
}
@media (max-width: 420px) {
  .custom-generator-side { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .custom-generator-side img { width: 56px; height: 56px; }
  .custom-generator-side button:first-of-type { grid-column: 1 / 3; }
  .custom-generator-side button:last-of-type { grid-column: 3; }
}

/* Betting follows the player cards and precedes history in normal flow.
   It must never float over the cards on phones or tablets. */
#game-table > #game-controls {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  bottom: auto;
  transform: none;
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
}
#game-table > .sidebar { grid-row: 3; }
#game-table .mobile-hand-tray { display: none; }
#save-status:not([hidden]) {
  flex-basis: 100%;
  color: #ffcf86;
  font-size: .85rem;
  line-height: 1.4;
  margin: .25rem 0 0;
}
@media (max-width: 900px) {
  body { padding-bottom: env(safe-area-inset-bottom, 0px); }
  #game-table { grid-template-rows: repeat(5, auto); }
  #game-table > #game-controls { grid-row: 4; }
  #game-table > .sidebar { grid-row: 5; }
}
