:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #f6f0e4;
  --muted: #a8aaa0;
  --night: #040806;
  --panel: #0b1511;
  --felt: #123b2f;
  --felt-deep: #071e18;
  --gold: #cda45f;
  --gold-bright: #f0cf8a;
  --line: #d6aa5d52;
  --danger: #d97867;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--night); color: var(--ink); }
button, input { font: inherit; }
button { border: 1px solid #e8c98270; border-radius: 12px; background: linear-gradient(145deg, #f0cf89, #b77a2e); box-shadow: inset 0 1px #fff5ca75, 0 8px 20px #0005; color: #181007; font-weight: 800; cursor: pointer; }
button:hover:not(:disabled) { filter: brightness(1.07); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { cursor: wait; opacity: .45; }
.poker-eyebrow { color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.dealer-layer { position: fixed; z-index: 20; inset: 0; pointer-events: none; }

.poker-tv { position: relative; overflow: hidden; background: radial-gradient(ellipse at 50% 68%, #281b1099 0, transparent 38%), linear-gradient(180deg, #171511, #060907 58%, #030504); }
.poker-tv::before { content: ""; position: fixed; z-index: 0; inset: 0; background: radial-gradient(ellipse at 50% 42%, #d6aa5d0b 0, transparent 34%), radial-gradient(ellipse at 50% 110%, #164b3b18 0, transparent 56%), linear-gradient(90deg, #0009, transparent 22%, transparent 78%, #0009); pointer-events: none; }
.room-ambience { position: fixed; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; }
.room-ambience::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 14% 48%, #d9943924, transparent 20%), radial-gradient(ellipse at 86% 48%, #d9943924, transparent 20%); filter: blur(2px); }
.room-glow { position: absolute; top: 18%; width: 15vw; height: 42vh; border-radius: 50%; background: radial-gradient(ellipse, #f0a84a1f 0, #c4741910 35%, transparent 72%); filter: blur(18px); }
.room-glow-left { left: 1%; }
.room-glow-right { right: 1%; }
.tv-shell { position: relative; z-index: 1; height: 100vh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: clamp(18px, 2.3vw, 38px) clamp(24px, 3vw, 54px); overflow: hidden; }
.tv-header, .tv-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.tv-title { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; gap: 2px 14px; }
.tv-title .loramic-brand-lockup,
.tv-title .hanks-brand-logo { grid-row: 1 / span 3; }
.tv-header h1 { margin: 4px 0 0; color: #f1ddae; font-family: var(--serif); font-size: clamp(32px, 3.35vw, 58px); font-weight: 500; letter-spacing: -.035em; line-height: .95; text-shadow: 0 3px 22px #d9a95026; }
.tv-header h1 span { color: var(--gold-bright); font-size: .7em; }
.tv-title p { margin: 5px 0 0 1.9em; color: #817e74; font-family: var(--serif); font-size: clamp(11px, .9vw, 15px); font-style: italic; letter-spacing: .06em; }
.table-meta { display: grid; justify-items: end; gap: 6px; color: var(--muted); text-transform: uppercase; }
.table-meta > span { font-size: clamp(10px, .75vw, 13px); letter-spacing: .16em; }
.table-meta > div { display: flex; align-items: baseline; gap: 9px; }
.table-meta small { color: #777b73; font-size: 9px; letter-spacing: .16em; }
.table-meta strong { color: var(--gold-bright); font-family: var(--serif); font-size: clamp(19px, 1.55vw, 27px); font-weight: 500; }
.table-stage { min-height: 0; display: grid; place-items: center; padding: 2vh 5vw 2.5vh; perspective: 1200px; }
.felt-table { position: relative; width: min(78vw, 1240px, calc((100vh - 250px) * 2.18)); aspect-ratio: 2.18 / 1; border: clamp(13px, 1.45vw, 22px) solid #21150d; border-radius: 48% / 50%; background: radial-gradient(ellipse at 50% 37%, #1d5945 0, var(--felt) 43%, #0b2b22 73%, var(--felt-deep)); box-shadow: inset 0 0 0 2px #f2cf7f99, inset 0 0 0 7px #170e0990, inset 0 0 85px #000b, 0 16px 0 #0c0806, 0 38px 80px #000d; transform: rotateX(1.5deg); }
.felt-table::before { content: ""; position: absolute; inset: -14px; z-index: -1; border: 1px solid #7f5b2c75; border-radius: inherit; box-shadow: inset 0 2px #67441f, 0 2px #000; }
.felt-table::after { content: "A BRIGHTER KIND OF NIGHT"; position: absolute; inset: 10%; display: grid; place-items: end center; border: 1px solid #e9c87b16; border-radius: 48% / 50%; color: #e9c87b75; font-family: var(--serif); font-size: clamp(7px, .58vw, 10px); letter-spacing: .32em; padding-bottom: 6%; }
.rail-detail { position: absolute; z-index: 0; inset: 3%; border: 1px solid #efca785c; border-radius: 48% / 50%; box-shadow: 0 0 18px #d6aa5d12; }
.table-center { position: absolute; z-index: 2; inset: 22% 23%; display: grid; align-content: center; justify-items: center; gap: clamp(8px, 1.1vh, 13px); }
.pot-block { display: grid; justify-items: center; gap: 0; }
.pot-block small { color: #9d9f94; font-size: clamp(8px, .58vw, 10px); letter-spacing: .2em; text-transform: uppercase; }
.pot-label { color: #fff2d5; font-family: var(--serif); font-size: clamp(19px, 1.65vw, 29px); font-weight: 500; line-height: 1.05; text-shadow: 0 2px 14px #000; }
.table-message { min-height: 1.35em; color: #cdd5c9; font-size: clamp(12px, .92vw, 16px); letter-spacing: .03em; text-align: center; }
.card-row { display: flex; justify-content: center; gap: clamp(6px, .6vw, 11px); }
.playing-card { position: relative; width: clamp(50px, 4.55vw, 82px); aspect-ratio: .715; display: grid; place-items: center; border: 1px solid #fffdf3; border-radius: clamp(6px, .52vw, 10px); background: linear-gradient(145deg, #fffdf8, #eee8dc); box-shadow: inset 0 -2px #d1c9bb, 0 9px 18px #0008; color: #151514; font-family: var(--serif); font-size: clamp(20px, 1.9vw, 34px); font-weight: 700; letter-spacing: -.08em; }
.playing-card::after { content: ""; position: absolute; inset: 3px; border: 1px solid #00000009; border-radius: inherit; pointer-events: none; }
.red-card { color: #a42e28; }
.winning-card { border-color: #ffe0a1; box-shadow: inset 0 0 0 2px #f2c76c, 0 0 22px #e7b9578c, 0 10px 22px #0009; transform: translateY(-3px); }
.irrelevant-card { filter: saturate(.25) brightness(.62); opacity: .62; transform: scale(.96); }
.empty-card { border-color: #dabe7e3d; background: #071d176b; box-shadow: inset 0 0 0 2px #d1a95813; }
.card-back {
  overflow: hidden;
  border-color: #d6b66e;
  background:
    radial-gradient(circle at 50% 44%, #1d5845 0, #10382d 46%, #081f19 100%);
  box-shadow: inset 0 0 0 2px #d6b66e42, inset 0 0 22px #0008, 0 9px 18px #0008;
  color: var(--gold);
}
.card-back::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid #dfbf7861;
  border-radius: calc(clamp(6px, .52vw, 10px) - 2px);
  background:
    repeating-linear-gradient(45deg, #d8b86d12 0 3px, transparent 3px 7px),
    repeating-linear-gradient(-45deg, #d8b86d0c 0 3px, transparent 3px 7px);
  pointer-events: none;
}
.hanks-card-back, .loramic-card-back { color: transparent; }
.hanks-card-back-logo, .loramic-card-back-logo {
  position: relative;
  z-index: 2;
  object-fit: contain;
}
.hanks-card-back-logo {
  width: 72%;
  max-height: 68%;
  aspect-ratio: 1;
  border: 1px solid #d8b76a70;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #081d17aa, 0 7px 16px #0008;
  filter: saturate(.92) contrast(1.06) brightness(.94);
}
.loramic-card-back-logo {
  width: 58%;
  max-height: 58%;
  filter: drop-shadow(0 5px 8px #0009);
}
.seat-cards-hidden { gap: 0; }
.seat-cards-hidden .mini-playing-card:first-child { transform: rotate(-5deg) translate(4px, 2px); }
.seat-cards-hidden .mini-playing-card + .mini-playing-card { margin-left: -16px; transform: rotate(5deg) translate(-4px, 2px); }
.seat { position: absolute; z-index: 4; width: clamp(126px, 12.4vw, 190px); min-height: clamp(58px, 5.3vw, 79px); display: grid; align-content: center; gap: 3px; padding: clamp(8px, .74vw, 12px) clamp(10px, .9vw, 14px); border: 1px solid #e6cc9857; border-radius: 999px; background: linear-gradient(180deg, #101814fa, #050a08f7); box-shadow: inset 0 1px #ffffff10, 0 12px 26px #000b; transform: translate(-50%, -50%); }
.seat > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.seat strong { overflow: hidden; color: #fff8e8; font-size: clamp(12px, .95vw, 16px); font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.seat span, .seat small { color: var(--muted); font-size: clamp(9px, .66vw, 11px); }
.seat > span { align-self: center; justify-self: center; text-transform: uppercase; letter-spacing: .12em; }
.seat-badges { display: flex; position: absolute; right: 10px; bottom: -7px; gap: 4px; }
.seat-badges i, .seat-badges em, .seat-badges b { display: grid; min-width: 22px; height: 22px; place-items: center; padding: 0 4px; border: 1px solid var(--line); border-radius: 999px; background: #efe9dd; box-shadow: 0 3px 8px #0009; color: #171511; font-size: 8px; font-style: normal; font-weight: 900; }
.seat-badges em { border-color: #ffffff24; color: #999; }
.seat-badges b { min-width: 54px; border-color: #f1cb76; background: linear-gradient(145deg, #f2d28c, #b87a2b); color: #181007; letter-spacing: .08em; }
.bot-seat .seat-badges em { border-color: #bf9850; background: #2a2114; color: #e5c77f; }
.active-seat {
  border: 3px solid var(--gold-bright);
  box-shadow: 0 0 0 4px #d6aa5d2b, 0 0 28px #d6aa5d65, 0 18px 40px #000a;
  animation: active-seat-pulse 1.45s ease-in-out infinite;
}
.seat-cards { display: flex; position: absolute; top: calc(100% + 10px); left: 50%; z-index: 3; gap: 6px; transform: translateX(-50%); pointer-events: none; }
.seat-1 .seat-cards, .seat-2 .seat-cards, .seat-3 .seat-cards { top: auto; bottom: calc(100% + 10px); }
.mini-playing-card { width: clamp(40px, 3.15vw, 58px); border-radius: 7px; font-size: clamp(16px, 1.3vw, 23px); box-shadow: 0 7px 16px #0009; }
.chip-stack { position: absolute; top: 50%; left: calc(100% + 6px); width: 26px; height: 36px; transform: translateY(-50%); }
.chip-stack i { position: absolute; left: 0; width: 25px; height: 9px; border: 1px solid #fff6; border-radius: 50%; background: repeating-linear-gradient(90deg, #ba2f2a 0 4px, #f3d4a0 4px 6px, #ba2f2a 6px 10px); box-shadow: inset 0 -2px #671511, 0 2px 3px #0009; }
.chip-stack i:nth-child(1) { bottom: 0; }
.chip-stack i:nth-child(2) { bottom: 5px; background-color: #164b3b; filter: hue-rotate(72deg); }
.chip-stack i:nth-child(3) { bottom: 10px; }
.chip-stack i:nth-child(4) { bottom: 15px; filter: hue-rotate(190deg); }
.chip-stack i:nth-child(5) { bottom: 20px; }
@keyframes active-seat-pulse {
  0%, 100% { box-shadow: 0 0 0 4px #d6aa5d24, 0 0 18px #d6aa5d55, 0 18px 40px #000a; }
  50% { box-shadow: 0 0 0 8px #f1cd8747, 0 0 38px #f1cd8790, 0 18px 40px #000a; }
}
.folded-seat { filter: saturate(.2); opacity: .55; }
.settled-seat { filter: saturate(.45); opacity: .64; }
.winning-seat {
  z-index: 7;
  border: 3px solid var(--gold-bright);
  filter: none;
  opacity: 1;
  box-shadow: 0 0 0 6px #e5b95c30, 0 0 42px #e5b95c80, 0 18px 42px #000c;
  animation: winner-seat-arrival .75s ease-out both, winner-seat-breathe 2.2s ease-in-out .75s infinite;
}
@keyframes winner-seat-arrival {
  from { transform: translate(-50%, -50%) scale(.9); opacity: .3; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes winner-seat-breathe {
  0%, 100% { box-shadow: 0 0 0 5px #e5b95c2b, 0 0 26px #e5b95c68, 0 18px 42px #000c; }
  50% { box-shadow: 0 0 0 9px #f5d58a38, 0 0 48px #f5c96998, 0 18px 42px #000c; }
}
.seat-1 { left: 18%; top: 91%; }
.seat-2 { left: 50%; top: 102%; }
.seat-3 { left: 82%; top: 91%; }
.seat-4 { left: 82%; top: 9%; }
.seat-5 { left: 50%; top: -2%; }
.seat-6 { left: 18%; top: 9%; }
.join-panel { z-index: 8; display: flex; gap: 12px; align-items: center; max-width: 340px; padding: 7px 13px 7px 7px; border: 1px solid #b9904d4f; border-radius: 12px; background: linear-gradient(140deg, #0e1713f2, #050907f2); box-shadow: inset 0 1px #ffffff0b, 0 14px 34px #0008; backdrop-filter: blur(16px); }
.join-panel img { width: clamp(62px, 6vw, 92px); border-radius: 7px; }
.join-panel div { min-width: 0; display: grid; }
.join-panel span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.join-panel strong { color: var(--gold-bright); font-family: var(--serif); font-size: clamp(24px, 2.1vw, 35px); font-weight: 500; letter-spacing: .13em; }
.join-panel small { max-width: 230px; overflow: hidden; color: #858d83; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.hand-result-visible .join-panel { opacity: .68; transition: opacity .35s ease; }
.tv-footer { min-height: 78px; display: grid; grid-template-columns: minmax(250px, auto) 1fr auto; color: var(--muted); }
.tv-footer > #statusMessage { justify-self: center; padding: 0 20px; text-align: center; }
.tv-footer button { padding: 12px 20px; border-radius: 999px; }
.tv-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.tv-actions .quiet-button { border-color: #ffffff24; background: #111b18; color: #ccd2c9; }
.tv-actions .quiet-button[aria-pressed="false"] { opacity: .62; }
.tv-actions .after-result { animation: reveal-next-hand .3s ease 1.15s both; }
@keyframes reveal-next-hand {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
.result-panel { display: grid; justify-items: center; gap: 3px; min-width: min(42vw, 620px); padding: 12px 24px 13px; border: 1px solid #f0c87570; border-radius: 16px; background: radial-gradient(ellipse at 50% 0, #d2a44b25, #07120fd9 70%); box-shadow: inset 0 1px #fff6cb22, 0 0 38px #d3a84c25, 0 15px 34px #0008; animation: result-arrival .55s cubic-bezier(.2,.85,.3,1.1) both; }
.result-panel > span { color: #b7ae99; font-size: clamp(8px, .62vw, 11px); font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.result-panel strong { color: #ffe4a7; font-family: var(--serif); font-size: clamp(24px, 2.45vw, 42px); font-weight: 500; line-height: 1.05; text-align: center; text-shadow: 0 0 24px #dcae5570; }
.result-panel small { color: #e4dbc7; font-size: clamp(11px, .82vw, 14px); letter-spacing: .05em; }
.showing-result .table-center { inset: 15% 18%; gap: clamp(9px, 1.2vh, 14px); }
@keyframes result-arrival {
  from { opacity: 0; transform: translateY(8px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.bot-panel, .table-panel { position: fixed; z-index: 30; right: clamp(24px, 3vw, 54px); bottom: 92px; width: min(430px, calc(100vw - 48px)); padding: 20px; border: 1px solid #c49b555e; border-radius: 18px; background: linear-gradient(145deg, #111b17fa, #050907fc); box-shadow: inset 0 1px #ffffff10, 0 24px 70px #000e; backdrop-filter: blur(22px); }
.bot-panel header, .table-panel header { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.bot-panel header span, .table-panel header span, .bot-table-label { color: var(--gold); font-size: 9px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.bot-panel h2, .table-panel h2 { margin: 3px 0 0; color: #f3e4c2; font-family: var(--serif); font-size: 25px; font-weight: 500; }
.bot-panel .panel-close, .table-panel .panel-close { width: 34px; height: 34px; padding: 0; border-color: #ffffff1c; background: #ffffff0a; box-shadow: none; color: #bfc2ba; font-size: 22px; }
.bot-roster { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bot-choice { min-height: 78px; display: grid; justify-items: start; padding: 11px 13px; border-color: #ffffff1e; border-radius: 12px; background: linear-gradient(150deg, #17241eee, #0a110e); box-shadow: inset 0 1px #ffffff0a; color: var(--ink); text-align: left; }
.bot-choice strong { color: #f3e5c7; font-family: var(--serif); font-size: 17px; font-weight: 500; }
.bot-choice span { color: var(--gold-bright); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.bot-choice small { color: #868d84; font-size: 10px; }
.bot-choice.seated { border-color: #cda45f4f; background: #cda45f13; }
.bot-choice:disabled { cursor: default; opacity: .42; }
.bot-table { display: grid; gap: 7px; margin-top: 16px; padding-top: 13px; border-top: 1px solid #ffffff12; }
.bot-players { display: grid; gap: 6px; }
.bot-players > small { color: #7f867e; }
.bot-players > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 9px; border-radius: 9px; background: #ffffff07; }
.bot-players > div > div { display: grid; }
.bot-players strong { color: #ebe4d6; font-size: 12px; }
.bot-players span { color: #858b83; font-size: 10px; text-transform: capitalize; }
.bot-remove { padding: 6px 10px !important; border-color: #ffffff1b; background: #151c19; box-shadow: none; color: #c9cbc5; font-size: 10px; }
.bot-error { min-height: 1.1em; margin: 9px 0 0; color: #ef9a8d; font-size: 11px; }
.bot-note { margin: 3px 0 0; color: #6f756e; font-size: 10px; }
.buy-in-settings { display: grid; gap: 8px; padding: 14px; border: 1px solid #ffffff14; border-radius: 13px; background: #ffffff06; }
.buy-in-settings > label { color: #d6d8d1; font-size: 12px; font-weight: 750; }
.buy-in-settings > small { color: #777f77; font-size: 10px; }
.buy-in-entry { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.buy-in-entry input { min-width: 0; padding: 10px 12px; border: 1px solid #ffffff22; border-radius: 9px; outline: none; background: #07100d; color: #fff0d1; font-size: 18px; font-weight: 750; }
.buy-in-entry input:focus { border-color: var(--gold); }
.buy-in-entry button, .buy-in-presets button, .fresh-round-button { padding: 9px 12px; box-shadow: none; }
.buy-in-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.buy-in-presets button { border-color: #ffffff1a; background: #15201c; color: #ced1cb; font-size: 11px; }
.scoreboard-block { display: grid; gap: 7px; margin-top: 15px; }
.scoreboard { display: grid; gap: 6px; max-height: 180px; overflow: auto; }
.scoreboard > small { color: #747c75; }
.scoreboard-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 9px 11px; border-radius: 10px; background: #ffffff07; }
.scoreboard-row strong { overflow: hidden; color: #eee6d7; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.scoreboard-row > span { color: var(--gold-bright); font-family: var(--serif); font-size: 17px; }
.scoreboard-row small { grid-column: 1 / -1; color: #7c847d; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.fresh-round-button { width: 100%; margin-top: 14px; }

.poker-phone { min-height: 100dvh; background: radial-gradient(circle at 50% -10%, #204738 0, #0a1712 38%, var(--night) 74%); }
.loramic-brand-lockup {
  display: grid;
  justify-items: center;
  gap: 3px;
  width: clamp(52px, 4.6vw, 78px);
  color: #d7c89f;
}
.loramic-brand-lockup img {
  width: clamp(38px, 3.4vw, 58px);
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 7px 16px #0008);
}
.loramic-brand-lockup strong {
  font-family: var(--serif);
  font-size: clamp(10px, .82vw, 14px);
  font-weight: 600;
  letter-spacing: .04em;
}
.hanks-brand-logo { display: none; }
.hanks-brand .loramic-brand-lockup { display: none; }
.hanks-brand .hanks-brand-logo { display: block; width: clamp(52px, 4.6vw, 78px); aspect-ratio: 1; object-fit: contain; border: 1px solid #d7a64066; border-radius: 50%; box-shadow: 0 12px 32px #0009; }
.poker-tv.hanks-brand { background: radial-gradient(circle at 14% 34%, #47311b 0, transparent 25%), radial-gradient(circle at 78% 50%, #342415 0, transparent 31%), #0c0b09; }
.poker-tv.hanks-brand .tv-title { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; }
.poker-tv.hanks-brand .tv-title .hanks-brand-logo { grid-row: 1 / span 3; }
.poker-tv.hanks-brand .felt-table { background: radial-gradient(ellipse at 50% 42%, #1f5743, #09291f 72%); }
.poker-phone.hanks-brand { background: radial-gradient(circle at 30% -8%, #523820 0, #142019 37%, #070806 76%); }
.poker-phone.hanks-brand .phone-header { grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
.poker-phone.hanks-brand .phone-header .hanks-brand-logo { grid-row: 1 / span 3; width: 58px; }
.poker-phone.hanks-brand .phone-header h1 { font-size: 34px; }
.poker-phone::before { content: ""; position: fixed; inset: 0; background: radial-gradient(circle at 18% 16%, #d6aa5d0d 0, transparent 24%), radial-gradient(circle at 84% 72%, #1f73531a 0, transparent 31%), linear-gradient(90deg, #0007, transparent 22%, transparent 78%, #0007); pointer-events: none; }
.phone-shell { position: relative; width: min(100%, 500px); min-height: 100dvh; margin: 0 auto; padding: max(22px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom)); }
.phone-header { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; gap: 3px 12px; padding: 8px 0 26px; }
.phone-header .loramic-brand-lockup,
.phone-header .hanks-brand-logo { grid-row: 1 / span 3; }
.phone-header .venue-badge { grid-column: 1 / -1; justify-self: start; margin-top: 7px; }
.phone-header h1 { margin: 1px 0 0; color: #f2dfb4; font-family: var(--serif); font-size: 38px; font-weight: 500; letter-spacing: -.04em; }
.phone-header h1 span { color: var(--gold-bright); font-size: .68em; }
.phone-header > span { color: var(--muted); font-size: 13px; }
.join-form, .player-view { display: grid; gap: 20px; }
.join-form h2 { margin: 10px 0 0; font-size: 22px; }
.join-form label { display: grid; gap: 7px; color: #cad0c5; font-size: 13px; font-weight: 700; }
.join-form input { width: 100%; padding: 15px 16px; border: 1px solid #ffffff22; border-radius: 12px; outline: none; background: #08110ee8; box-shadow: inset 0 1px 8px #0008; color: #fff; font-size: 17px; }
.join-form input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px #d6aa5d20; }
.join-form fieldset { margin: 0; padding: 0; border: 0; }
.join-form legend { margin-bottom: 10px; color: #cad0c5; font-size: 13px; font-weight: 700; }
.seat-picker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.seat-picker button { aspect-ratio: 1; display: grid; place-content: center; gap: 1px; padding: 0; border-color: #ffffff26; border-radius: 50%; background: #0d1815; box-shadow: inset 0 1px #ffffff0a; color: var(--ink); }
.seat-picker button span { font-size: 15px; line-height: 1; }
.seat-picker button small { color: #819087; font-size: 7px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.seat-picker button.selected { border-color: var(--gold); background: var(--gold); color: #171008; }
.seat-picker button.selected small { color: #493418; }
.seat-picker button:disabled { cursor: not-allowed; border-style: dashed; opacity: .35; filter: saturate(.3); }
.buy-in-field small { color: #7f8b81; font-size: 10px; font-weight: 500; line-height: 1.35; }
.join-form > button { padding: 16px; border-radius: 12px; }
.form-error { min-height: 1.2em; margin: 0; color: #ef9a8d; font-size: 13px; }
.player-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.player-summary > div { display: grid; gap: 5px; padding: 13px; border: 1px solid #ffffff14; border-radius: 12px; background: linear-gradient(150deg, #ffffff0a, #0002); }
.player-summary span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.player-summary strong { color: var(--gold-bright); font-size: 20px; }
.private-hand { position: relative; display: grid; justify-items: center; gap: 14px; padding: 26px 18px; overflow: hidden; border: 1px solid #d8ac5e66; border-radius: 24px; background: radial-gradient(circle at 50% 0, #215340, #0b2018 55%, #07120f); box-shadow: inset 0 0 70px #0006, 0 18px 45px #0005; }
.private-hand::after { content: "♠"; position: absolute; right: -20px; bottom: -43px; color: #d8b2690a; font-family: var(--serif); font-size: 150px; transform: rotate(-9deg); pointer-events: none; }
.private-hand > span { color: #ccd2c7; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.private-hand small { color: #7f8b81; }
.card-row-private { position: relative; z-index: 1; }
.card-row-private .playing-card { width: 96px; border-radius: 10px; font-size: 34px; }
.turn-prompt { padding: 15px 18px; border: 1px solid #ffffff18; border-radius: 12px; background: #ffffff07; color: #b6bdb3; text-align: center; }
.turn-prompt.your-turn { border-color: var(--gold); background: linear-gradient(100deg, #d6aa5d0d, #d6aa5d1c, #d6aa5d0d); box-shadow: 0 0 22px #d6aa5d15; color: var(--gold-bright); font-weight: 800; }
.phone-your-turn .private-hand { border-color: var(--gold-bright); box-shadow: inset 0 0 70px #0006, 0 0 0 4px #d6aa5d12, 0 18px 45px #0005; }
.phone-result { position: relative; display: grid; justify-items: center; gap: 5px; padding: 22px 20px 18px; overflow: hidden; border: 1px solid #d6aa5d70; border-radius: 19px; background: radial-gradient(circle at 50% -20%, #d2a75126, #0b1814 62%); box-shadow: inset 0 1px #fff3c91c, 0 16px 38px #0007; text-align: center; animation: result-arrival .5s cubic-bezier(.2,.85,.3,1.1) both; }
.phone-result::before { content: "♠"; position: absolute; top: -38px; right: -10px; color: #e5bd6b0b; font-family: var(--serif); font-size: 132px; transform: rotate(12deg); }
.phone-result > span { color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.phone-result h2 { position: relative; margin: 1px 0; color: #ffe5aa; font-family: var(--serif); font-size: clamp(28px, 8vw, 38px); font-weight: 500; line-height: 1.05; }
.phone-result p { position: relative; margin: 1px 0 8px; color: #c7cdc3; font-size: 13px; }
.phone-result > div { position: relative; min-width: 150px; display: grid; gap: 1px; padding-top: 10px; border-top: 1px solid #ffffff15; }
.phone-result > div small { color: #838b83; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.phone-result > div strong { color: #f4d58f; font-size: 23px; }
.phone-result[data-kind="loss"], .phone-result[data-kind="folded"] { border-color: #ffffff28; background: linear-gradient(145deg, #131c19, #09100e); }
.phone-result[data-kind="loss"] h2, .phone-result[data-kind="folded"] h2 { color: #e3ded2; }
.phone-result-win .private-hand { border-color: #e6c474; box-shadow: inset 0 0 70px #0006, 0 0 0 4px #e6c47414, 0 18px 45px #0005; }
.seat-controls { display: grid; gap: 10px; padding: 14px; border: 1px solid #ffffff18; border-radius: 17px; background: linear-gradient(145deg, #12201b, #08110e); }
.rebuy-panel { display: grid; grid-template-columns: 1fr minmax(105px, .6fr); gap: 10px; align-items: end; }
.rebuy-panel > div { display: grid; gap: 3px; align-self: center; }
.rebuy-panel > div strong { color: #f2dfb4; font-family: var(--serif); font-size: 20px; font-weight: 500; }
.rebuy-panel > div small { color: #9aa49b; font-size: 11px; }
.rebuy-panel label { display: grid; gap: 4px; color: #aeb6ad; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.rebuy-panel input { width: 100%; padding: 11px; border: 1px solid #ffffff22; border-radius: 10px; background: #07100e; color: #fff3d3; font-size: 17px; }
.rebuy-panel button { grid-column: 1 / -1; min-height: 48px; }
.leave-seat-button { min-height: 45px; }
.stack-picker-fieldset { display: grid; gap: 8px; }
.stack-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stack-picker label { position: relative; display: block; }
.stack-picker input { position: absolute; opacity: 0; pointer-events: none; }
.stack-picker label > span { height: 100%; display: grid; gap: 4px; padding: 13px; border: 1px solid #ffffff1c; border-radius: 12px; background: #0a1511; }
.stack-picker strong { color: #e9e5d9; font-size: 13px; }
.stack-picker small { color: #838b83; font-size: 10px; line-height: 1.35; }
.stack-picker input:checked + span { border-color: var(--gold); background: #d6aa5d12; box-shadow: inset 0 0 0 1px #d6aa5d25; }
.stack-picker input:disabled + span { opacity: .42; }
.phone-table-view { display: none; }
.action-panel { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.action-panel button, .raise-actions button { min-height: 54px; padding: 13px; }
.quiet-button { border-color: #ffffff20; background: linear-gradient(160deg, #1a2421, #101614); box-shadow: inset 0 1px #ffffff0c, 0 8px 18px #0004; color: #d3d6d0; }
.action-panel .quiet-button { color: #e6b3a9; }
.venue-host-controls { display: flex; }
.venue-host-controls button { width: 100%; min-height: 46px; }
.raise-button { grid-column: 1 / -1; }
.show-cards-button { grid-column: 1 / -1; }
.raise-panel { display: grid; gap: 15px; padding: 17px; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(150deg, #111f1a, #08110e); box-shadow: 0 18px 44px #0008; }
.raise-panel label { display: grid; gap: 12px; color: #c8cec4; }
.raise-panel input { width: 100%; accent-color: var(--gold); }
.raise-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 9px; }

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .active-seat, .winning-seat, .result-panel, .phone-result, .tv-actions .after-result { animation: none; }
}

@media (max-aspect-ratio: 4 / 3) and (min-width: 700px) {
  .felt-table { width: min(90vw, 1000px); }
  .tv-footer { grid-template-columns: minmax(220px, auto) 1fr auto; }
  .join-panel small { display: none; }
}

@media (max-height: 780px) and (min-width: 900px) {
  .tv-shell { padding-top: 16px; padding-bottom: 14px; }
  .tv-title p { display: none; }
  .table-stage { padding-top: 1vh; padding-bottom: 1.5vh; }
  .felt-table { width: min(77vw, 1120px, calc((100vh - 206px) * 2.18)); }
  .join-panel img { width: 62px; }
  .join-panel strong { font-size: 25px; }
  .tv-footer { min-height: 66px; }
}

@media (orientation: landscape) and (max-height: 720px) {
  .poker-phone { overflow: hidden; }
  .phone-shell { width: 100%; height: 100dvh; min-height: 0; padding: 10px 12px; }
  .phone-header { position: absolute; z-index: 3; top: 12px; left: 18px; padding: 0; pointer-events: none; }
  .phone-header .poker-eyebrow, .phone-header > span { display: none; }
  .phone-header h1 { margin: 0; font-size: 21px; text-shadow: 0 2px 8px #000; }
  .join-form { width: min(760px, 92vw); height: calc(100dvh - 20px); margin: 0 auto; grid-template-columns: 1fr 1fr; gap: 10px 14px; align-content: center; }
  .join-form h2, .join-form > button, .join-form .form-error { grid-column: 1 / -1; }
  .join-form .stack-picker-fieldset { grid-column: 1 / -1; }
  .join-form h2 { margin: 0; }
  .join-form input { padding: 10px 12px; }
  .player-view { height: calc(100dvh - 20px); display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(270px, .72fr); grid-template-rows: auto auto minmax(0, 1fr) auto auto; grid-template-areas: "table summary" "table hand" "table result" "table prompt" "table actions"; gap: 7px 10px; }
  .phone-table-view { position: relative; grid-area: table; min-height: 0; display: block; }
  .phone-felt { position: absolute; top: 50%; left: 50%; width: 100%; aspect-ratio: 1.75 / 1; overflow: hidden; border: 8px solid #24170f; border-radius: 48% / 50%; background: radial-gradient(ellipse at 50% 40%, #205b47, #0c3025 73%); box-shadow: inset 0 0 0 2px #d2aa5b88, inset 0 0 55px #0009, 0 14px 30px #0009; transform: translate(-50%, -50%); }
  .phone-felt::after { content: "POKER NIGHT"; position: absolute; inset: 8%; display: grid; place-items: end center; padding-bottom: 8%; border: 1px solid #e3bd6b1d; border-radius: inherit; color: #e1b96755; font-family: var(--serif); font-size: 8px; letter-spacing: .28em; }
  .phone-table-seat { position: absolute; z-index: 3; width: clamp(92px, 15vw, 132px); min-height: 40px; display: grid; align-content: center; padding: 6px 9px; border: 1px solid #d4b37545; border-radius: 999px; background: #07100eea; box-shadow: 0 7px 16px #0009; transform: translate(-50%, -50%); }
  .phone-table-seat strong { overflow: hidden; color: #f2ede2; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .phone-table-seat span { color: #9fa59d; font-size: 8px; }
  .phone-table-seat.active { border: 2px solid var(--gold-bright); box-shadow: 0 0 0 3px #d6aa5d25, 0 0 20px #d6aa5d55; }
  .phone-table-seat.self { background: #17271f; }
  .phone-table-seat.folded { opacity: .45; filter: saturate(.3); }
  .phone-table-seat-1 { left: 17%; top: 82%; }
  .phone-table-seat-2 { left: 50%; top: 94%; }
  .phone-table-seat-3 { left: 83%; top: 82%; }
  .phone-table-seat-4 { left: 83%; top: 18%; }
  .phone-table-seat-5 { left: 50%; top: 7%; }
  .phone-table-seat-6 { left: 17%; top: 18%; }
  .phone-table-center { position: absolute; z-index: 2; inset: 27% 18%; display: grid; align-content: center; justify-items: center; gap: 7px; }
  .phone-table-center > span { color: #d7c397; font-size: 9px; text-transform: uppercase; letter-spacing: .12em; }
  .phone-table-center > span strong { color: #fff0cb; font-family: var(--serif); font-size: 17px; }
  .phone-table-center > small { color: #c3cbc1; font-size: 9px; }
  .landscape-community { display: flex; gap: 4px; }
  .landscape-community .playing-card { width: clamp(34px, 4.8vw, 48px); border-radius: 5px; font-size: clamp(14px, 2vw, 19px); }
  .player-summary { grid-area: summary; gap: 5px; }
  .player-summary > div { gap: 2px; padding: 7px 8px; border-radius: 8px; }
  .player-summary span { font-size: 7px; }
  .player-summary strong { font-size: 14px; }
  .private-hand { grid-area: hand; grid-template-columns: auto 1fr; gap: 8px; padding: 8px 10px; border-radius: 12px; }
  .private-hand > span { align-self: center; font-size: 8px; }
  .private-hand > small { display: none; }
  .card-row-private { justify-self: end; }
  .card-row-private .playing-card { width: 48px; border-radius: 6px; font-size: 18px; }
  .phone-result { grid-area: result; align-content: center; gap: 2px; min-height: 0; padding: 8px 10px; border-radius: 11px; }
  .phone-result h2 { font-size: clamp(19px, 4vw, 27px); }
  .phone-result p { margin-bottom: 3px; font-size: 10px; }
  .phone-result > div { min-width: 110px; padding-top: 5px; }
  .phone-result > div strong { font-size: 16px; }
  .seat-controls { grid-area: actions; grid-template-columns: 1fr auto; gap: 6px; padding: 6px; border-radius: 10px; }
  .rebuy-panel { grid-template-columns: 1fr 90px auto; gap: 6px; }
  .rebuy-panel > div strong { font-size: 15px; }
  .rebuy-panel > div small { font-size: 8px; }
  .rebuy-panel label { font-size: 7px; }
  .rebuy-panel input { padding: 7px; font-size: 12px; }
  .rebuy-panel button { grid-column: auto; min-height: 38px; padding: 7px; font-size: 10px; }
  .leave-seat-button { min-height: 38px; padding: 7px 10px; font-size: 10px; }
  .turn-prompt { grid-area: prompt; padding: 8px 10px; font-size: 11px; }
  .action-panel { grid-area: actions; grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .action-panel button { min-height: 40px; padding: 7px; font-size: 11px; }
  .action-panel .raise-button, .action-panel .show-cards-button { grid-column: auto; }
  .raise-panel { position: absolute; z-index: 20; right: 12px; bottom: 10px; width: min(340px, 42vw); gap: 8px; padding: 10px; }
  #actionError { position: absolute; right: 14px; bottom: 56px; z-index: 12; max-width: 310px; margin: 0; padding: 5px 8px; border-radius: 7px; background: #160c0ae8; }
}

@media (max-width: 420px) {
  .phone-shell { padding-left: 16px; padding-right: 16px; }
  .phone-header { padding-bottom: 20px; }
  .phone-header h1 { font-size: 34px; }
  .card-row-private .playing-card { width: min(26vw, 92px); }
}


/* Poker Night pilot refinements */
.chip-stack { height: 46px; }
.chip-stack i { bottom: calc(var(--chip-index, 0) * 5px) !important; }
.chip-stack i:nth-child(6) { filter: hue-rotate(250deg); }
.chip-stack i:nth-child(7) { filter: hue-rotate(315deg); }

.community-card-reveal {
  transform-origin: 50% 50%;
  animation: community-card-reveal .78s cubic-bezier(.18,.72,.2,1) var(--reveal-delay, 0ms) both;
}
@keyframes community-card-reveal {
  0% { opacity: 0; transform: translateY(-16px) rotateY(88deg) scale(.9); filter: brightness(.55); }
  55% { opacity: 1; transform: translateY(0) rotateY(88deg) scale(1.03); filter: brightness(.8); }
  100% { opacity: 1; transform: translateY(0) rotateY(0) scale(1); filter: none; }
}

.winner-chip {
  position: absolute;
  left: var(--chip-x);
  top: -8vh;
  width: clamp(18px, 1.7vw, 30px);
  aspect-ratio: 1;
  border: 3px dashed #f5dfab;
  border-radius: 50%;
  background: radial-gradient(circle, #9d2e24 0 44%, #f4d792 45% 58%, #9d2e24 59%);
  box-shadow: 0 5px 12px #0008;
  opacity: 0;
}
.winner-celebration .winner-chip { animation: winner-chip-rain 1.65s cubic-bezier(.12,.72,.25,1) var(--chip-delay) both; }
@keyframes winner-chip-rain {
  0% { opacity: 0; transform: translateY(-4vh) rotate(0deg) scale(.7); }
  14% { opacity: 1; }
  100% { opacity: 0; transform: translateY(112vh) rotate(var(--chip-spin)) scale(1.05); }
}

@media (orientation: portrait) and (max-width: 600px) {
  .poker-phone:has(.player-view:not([hidden])) { overflow: hidden; }
  .poker-phone:has(.player-view:not([hidden])) .phone-shell {
    height: 100dvh;
    min-height: 0;
    padding: max(8px, env(safe-area-inset-top)) 12px max(8px, env(safe-area-inset-bottom));
    overflow: hidden;
  }
  .poker-phone:has(.player-view:not([hidden])) .phone-header { padding: 0 0 8px; }
  .poker-phone:has(.player-view:not([hidden])) .phone-header .poker-eyebrow,
  .poker-phone:has(.player-view:not([hidden])) .phone-header > span { display: none; }
  .poker-phone:has(.player-view:not([hidden])) .phone-header h1 { margin: 0; font-size: 25px; }
  .player-view:not([hidden]) {
    height: calc(100dvh - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    gap: 7px;
    overflow: hidden;
  }
  .player-view:not([hidden]) .phone-table-view { display: none; }
  .player-summary { gap: 6px; }
  .player-summary > div { gap: 2px; padding: 7px 6px; border-radius: 9px; }
  .player-summary span { font-size: 8px; }
  .player-summary strong { font-size: 17px; }
  .private-hand { min-height: 0; gap: 5px; padding: 10px; border-radius: 16px; }
  .private-hand > span { font-size: 9px; }
  .private-hand small { display: none; }
  .card-row-private .playing-card { width: min(28vw, 88px); font-size: 30px; }
  .turn-prompt { padding: 9px 10px; font-size: 14px; }
  .action-panel { gap: 7px; }
  .action-panel button, .raise-actions button { min-height: 49px; padding: 8px; font-size: 15px; }
  .raise-panel { position: absolute; z-index: 20; left: 12px; right: 12px; bottom: max(10px, env(safe-area-inset-bottom)); gap: 10px; padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .community-card-reveal, .winner-celebration .winner-chip { animation: none; }
}

/* Keep hole cards at a true playing-card proportion inside flexible mobile layouts. */
.card-row { align-items: center; }
.card-row-private { align-self: center; justify-self: center; }
.card-row-private .playing-card {
  flex: 0 0 auto;
  width: min(25vw, 92px);
  height: auto;
  aspect-ratio: 5 / 7;
}


/* Landscape phone QA: keep seats readable and keep between-hand controls in separate rows. */
@media (orientation: landscape) and (max-height: 720px) {
  .player-view {
    grid-template-rows: auto auto minmax(54px, 1fr) auto auto auto;
    grid-template-areas:
      "table summary"
      "table hand"
      "table result"
      "table prompt"
      "table seatcontrols"
      "table actions";
    gap: 6px 10px;
  }

  .phone-table-seat {
    width: clamp(86px, 13vw, 116px);
    min-height: 38px;
    padding: 5px 8px;
  }
  .phone-table-seat-1 { left: 22%; top: 78%; }
  .phone-table-seat-2 { left: 50%; top: 88%; }
  .phone-table-seat-3 { left: 78%; top: 78%; }
  .phone-table-seat-4 { left: 78%; top: 22%; }
  .phone-table-seat-5 { left: 50%; top: 12%; }
  .phone-table-seat-6 { left: 22%; top: 22%; }

  .private-hand {
    min-height: 72px;
    max-height: 92px;
    overflow: hidden;
  }
  .card-row-private {
    align-self: center;
    justify-self: end;
  }
  .card-row-private .playing-card {
    width: 48px;
    height: auto;
    aspect-ratio: 5 / 7;
    border-radius: 6px;
    font-size: 18px;
  }

  .phone-result {
    min-height: 54px;
    max-height: 88px;
    overflow: hidden;
  }
  .phone-result > span { font-size: 8px; }
  .phone-result h2 {
    margin: 0;
    font-size: clamp(17px, 2.5vw, 23px);
    line-height: 1;
  }
  .phone-result p {
    margin: 0;
    font-size: 9px;
    line-height: 1.15;
  }
  .phone-result > div {
    min-width: 90px;
    padding-top: 3px;
  }

  .seat-controls {
    grid-area: seatcontrols;
    grid-template-columns: 1fr;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .seat-controls .rebuy-panel { padding: 5px; }
  .leave-seat-button {
    min-height: 34px;
    padding: 5px 8px;
    font-size: 9px;
  }

  .action-panel {
    grid-area: actions;
    align-self: end;
  }
  .action-panel button {
    min-height: 36px;
    padding: 5px 7px;
  }
}


/* Privacy-first phone play: controls stay stable; the private hand lives below them. */
@media (orientation: portrait) and (max-width: 600px) {
  .poker-phone:has(.player-view:not([hidden])) { overflow-y: auto; }
  .poker-phone:has(.player-view:not([hidden])) .phone-shell {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }

  .player-view:not([hidden]) {
    height: auto;
    min-height: calc(100dvh - 48px - env(safe-area-inset-top));
    grid-template-rows: none;
    grid-auto-rows: auto;
    align-content: start;
    overflow: visible;
  }

  .player-summary { order: 1; }
  .phone-result { order: 2; }
  .turn-prompt { order: 3; }
  .action-panel {
    order: 4;
    min-height: 115px;
    grid-auto-rows: 54px;
    align-content: start;
  }
  .raise-panel { order: 4; }
  .private-hand {
    order: 5;
    min-height: 216px;
    margin-top: 8px;
    padding: 18px 12px 20px;
  }
  .private-hand > span { font-size: 10px; }
  .private-hand small {
    display: block;
    max-width: 280px;
    font-size: 9px;
    line-height: 1.35;
    text-align: center;
  }
  .seat-controls { order: 6; }
  #actionError { order: 7; }

  .action-panel .raise-button { grid-column: 1 / -1; }
  .action-panel .show-cards-button { grid-column: 1 / -1; }
}


/* Player profiles: Hank's dog avatars or a small local photo. */
.poker-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e3c27666;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #6a5132, #21170f 72%);
  box-shadow: inset 0 1px #ffffff16, 0 5px 14px #0008;
}
img.poker-avatar { object-fit: cover; }
.poker-avatar-preset {
  font-size: 25px;
  line-height: 1;
  user-select: none;
}
.avatar-hank { background: radial-gradient(circle at 34% 28%, #8a6540, #28180e 72%); }
.avatar-ace { background: radial-gradient(circle at 34% 28%, #66523b, #17140f 72%); }
.avatar-lucky { background: radial-gradient(circle at 34% 28%, #9d8e7a, #332820 72%); }
.avatar-duke { background: radial-gradient(circle at 34% 28%, #b88a52, #38200d 72%); }
.avatar-ruby { background: radial-gradient(circle at 34% 28%, #6f4b3c, #231311 72%); }
.avatar-bandit { background: radial-gradient(circle at 34% 28%, #525452, #171a18 72%); }

.profile-fieldset {
  display: grid;
  gap: 12px;
  padding: 14px !important;
  border: 1px solid #ffffff14 !important;
  border-radius: 14px !important;
  background: #ffffff05;
}
.profile-preview-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.profile-preview-row > div:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.profile-preview-row strong {
  color: #f4ead8;
  font-family: var(--serif);
  font-size: 19px;
}
.profile-preview-row small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}
.profile-preview-avatar {
  width: 58px;
  height: 58px;
}
.profile-preview-avatar.poker-avatar-preset { font-size: 34px; }
.avatar-picker {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}
.avatar-choice {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 8px 4px;
  border: 1px solid #ffffff17;
  border-radius: 12px;
  background: #09120f;
  color: #c9c0b1;
}
.avatar-choice .poker-avatar {
  width: 38px;
  height: 38px;
}
.avatar-choice .poker-avatar-preset { font-size: 22px; }
.avatar-choice small {
  overflow: hidden;
  max-width: 100%;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.avatar-choice.selected {
  border-color: var(--gold-bright);
  background: #2b2417;
  box-shadow: 0 0 0 2px #d6aa5d24;
}
.photo-picker {
  display: block !important;
  padding: 11px 13px;
  border: 1px dashed #d7b66f55;
  border-radius: 11px;
  background: #0c1511;
  color: #e3c985 !important;
  text-align: center;
  cursor: pointer;
}
.photo-picker input {
  position: absolute;
  width: 1px !important;
  height: 1px;
  padding: 0 !important;
  opacity: 0;
  pointer-events: none;
}

.seat > div:first-child { align-items: center; }
.seat-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.seat-identity .seat-avatar {
  width: clamp(28px, 2.5vw, 38px);
  height: clamp(28px, 2.5vw, 38px);
}
.seat-identity .poker-avatar-preset {
  font-size: clamp(17px, 1.55vw, 24px);
}
.seat-identity strong { min-width: 0; }

.scoreboard-profile {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.scoreboard-avatar {
  width: 28px;
  height: 28px;
}
.scoreboard-avatar.poker-avatar-preset { font-size: 17px; }
.scoreboard-row .profile-reset-button {
  grid-column: 1 / -1;
  justify-self: end;
  min-height: 0;
  padding: 5px 8px;
  border-color: #ffffff18;
  background: #161b18;
  color: #a8afa8;
  box-shadow: none;
  font-size: 9px;
}

@media (orientation: landscape) and (max-height: 720px) {
  .phone-table-seat .phone-seat-avatar {
    position: absolute;
    left: 5px;
    top: 50%;
    width: 26px;
    height: 26px;
    transform: translateY(-50%);
  }
  .phone-table-seat .phone-seat-avatar.poker-avatar-preset { font-size: 15px; }
  .phone-table-seat:has(.phone-seat-avatar) strong,
  .phone-table-seat:has(.phone-seat-avatar) > span { padding-left: 29px; }
}

@media (max-width: 390px) {
  .avatar-picker { grid-template-columns: repeat(3, 1fr); }
}


/* Poker profile v2: deterministic portrait pod + seat capsule. */
.profile-preview-avatar {
  width: 72px;
  height: 72px;
  border-width: 2px;
}
.avatar-choice .poker-avatar {
  width: 50px;
  height: 50px;
}
.avatar-choice {
  padding: 9px 5px;
}
.photo-picker {
  display: grid !important;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
}
.photo-picker button {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px dashed #d7b66f77;
  border-radius: 11px;
  background: #0c1511;
  color: #e3c985;
  box-shadow: none;
  font-weight: 800;
}
.photo-picker button:active { transform: translateY(1px); }
.photo-picker small {
  color: #7f887f;
  font-size: 9px;
  line-height: 1.35;
  text-align: center;
}
.photo-picker input {
  display: none !important;
}

.poker-tv .seat {
  width: clamp(158px, 14.5vw, 220px);
  min-height: clamp(62px, 5.6vw, 84px);
  padding-left: clamp(43px, 4.2vw, 64px);
  overflow: visible;
}
.poker-tv .seat::before {
  content: "";
  position: absolute;
  left: clamp(-22px, -1.75vw, -14px);
  top: 50%;
  width: clamp(36px, 3.7vw, 54px);
  height: clamp(40px, 4vw, 58px);
  border-radius: 999px 0 0 999px;
  background: linear-gradient(180deg, #101814fa, #050a08f7);
  transform: translateY(-50%);
  z-index: -1;
}
.poker-tv .seat > div:first-child {
  min-width: 0;
  width: 100%;
  align-items: center;
}
.poker-tv .seat-identity {
  min-width: 0;
  padding-left: 0;
}
.poker-tv .seat-identity .seat-avatar {
  position: absolute;
  left: clamp(-33px, -2.45vw, -22px);
  top: 50%;
  width: clamp(58px, 5.1vw, 76px);
  height: clamp(58px, 5.1vw, 76px);
  border: 3px solid #cda75f;
  background: #17110d;
  box-shadow: 0 0 0 4px #090b09, 0 10px 28px #000b;
  transform: translateY(-50%);
}
.poker-tv .seat-identity strong {
  max-width: clamp(70px, 7vw, 112px);
}
.poker-tv .seat > div:first-child > span {
  white-space: nowrap;
}
.poker-tv .active-seat .seat-avatar {
  border-color: #f2d28c;
  box-shadow: 0 0 0 4px #17130c, 0 0 24px #d6aa5d85, 0 10px 28px #000b;
}
.poker-tv .winning-seat .seat-avatar {
  border-color: #ffe1a0;
  box-shadow: 0 0 0 4px #17130c, 0 0 34px #e7b957a8, 0 10px 28px #000b;
}

@media (orientation: landscape) and (max-height: 720px) {
  .phone-table-seat {
    min-height: 44px;
    padding-left: 34px;
    overflow: visible;
  }
  .phone-table-seat .phone-seat-avatar {
    position: absolute;
    left: -12px;
    top: 50%;
    width: 36px;
    height: 36px;
    border: 2px solid #cda75f;
    box-shadow: 0 0 0 3px #07100e, 0 5px 14px #000b;
    transform: translateY(-50%);
  }
  .phone-table-seat:has(.phone-seat-avatar) strong,
  .phone-table-seat:has(.phone-seat-avatar) > span {
    padding-left: 0;
  }
  .phone-table-seat.active .phone-seat-avatar {
    border-color: #f2d28c;
    box-shadow: 0 0 0 3px #07100e, 0 0 16px #d6aa5d75;
  }
}

@media (max-width: 390px) {
  .profile-preview-avatar { width: 66px; height: 66px; }
  .avatar-choice .poker-avatar { width: 46px; height: 46px; }
}


/* Loramic product credit: short launch signature plus low-key persistent attribution. */
.loramic-poker-splash{
  position:fixed;
  inset:0;
  z-index:1000;
  display:grid;
  place-items:center;
  background:
    radial-gradient(circle at 50% 38%,rgba(63,91,76,.26),transparent 34%),
    #070907;
  animation:loramicPokerSplashOut 1.85s ease forwards;
  pointer-events:none;
}
.loramic-poker-splash>div{
  display:grid;
  justify-items:center;
  gap:8px;
}
.loramic-poker-splash span{
  color:#d7bb7a;
  font:900 clamp(9px,.75vw,12px)/1 system-ui,sans-serif;
  letter-spacing:.22em;
}
.loramic-poker-splash p{
  margin:10px 0 0;
  color:#777d77;
  font:750 clamp(8px,.65vw,10px)/1 system-ui,sans-serif;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.loramic-poker-splash img{
  width:clamp(72px,6vw,96px);
  height:clamp(72px,6vw,96px);
  object-fit:contain;
  border-radius:0;
  opacity:.9;
}
.loramic-poker-splash strong{
  color:#d0c4aa;
  font:650 clamp(16px,1.25vw,21px)/1 Georgia,serif;
  letter-spacing:.04em;
}
@keyframes loramicPokerSplashOut{
  0%,66%{opacity:1;visibility:visible}
  100%{opacity:0;visibility:hidden}
}
.loramic-poker-credit{
  position:fixed;
  z-index:12;
  left:50%;
  top:clamp(8px,1vh,14px);
  display:flex;
  align-items:center;
  gap:5px;
  padding:4px 7px;
  border:1px solid #d6aa5d14;
  border-radius:999px;
  background:#05070666;
  color:#7e827c;
  font:700 clamp(7px,.52vw,9px)/1 system-ui,sans-serif;
  letter-spacing:.05em;
  text-transform:uppercase;
  transform:translateX(-50%);
  pointer-events:none;
  opacity:.58;
}
.loramic-poker-credit img{
  width:16px;
  height:16px;
  border-radius:3px;
  object-fit:contain;
  opacity:.68;
}
.loramic-poker-credit strong{
  color:#a99b80;
  font-size:inherit;
  letter-spacing:.09em;
}
.venue-badge {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 250px;
  padding: 5px 10px 5px 5px;
  border: 1px solid #ffffff1c;
  border-radius: 999px;
  background: #080b09b8;
  box-shadow: 0 8px 22px #0005;
  color: #a6aaa3;
  font-size: clamp(8px, .62vw, 11px);
  letter-spacing: .025em;
  white-space: nowrap;
}
.venue-badge img {
  width: clamp(24px, 2vw, 34px);
  aspect-ratio: 1;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
}
.venue-badge strong { color: #ded8cb; font-weight: 750; }
.venue-context {
  display: grid;
  justify-items: center;
  gap: 5px;
}
.tortuga-return-button {
  min-height: 0;
  padding: 5px 11px;
  border-color: #ffffff1c;
  border-radius: 999px;
  background: #0d1512cc;
  box-shadow: none;
  color: #aaa9a1;
  font-size: clamp(8px, .58vw, 10px);
}
.poker-loramic-enquiry{
  display:grid;
  gap:4px;
  justify-items:center;
  padding:12px 14px;
  border:1px solid #d6aa5d22;
  border-radius:12px;
  background:#0b100d;
  color:#7f877f;
  text-decoration:none;
  text-align:center;
}
.poker-loramic-enquiry span{
  font-size:8px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.poker-loramic-enquiry strong{
  color:#c8ad72;
  font-size:10px;
  letter-spacing:.02em;
}
@media(prefers-reduced-motion:reduce){
  .loramic-poker-splash{animation-duration:.3s}
}


/* Final avatar/brand rendering polish. */
.poker-avatar-preset{
  background-repeat:no-repeat;
  background-color:#17110d;
}
.loramic-poker-splash img,.loramic-poker-credit img{
  filter:none;
  background:transparent;
  mix-blend-mode:normal;
}


/* Landscape showdown readability: reveal public opponent cards at their seats. */
@media (orientation: landscape) and (max-height: 720px) {
  .phone-table-seat {
    isolation: isolate;
  }
  .phone-seat-cards {
    position: absolute;
    left: 50%;
    display: flex;
    gap: 3px;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 5;
  }
  .phone-table-seat-1 .phone-seat-cards,
  .phone-table-seat-2 .phone-seat-cards,
  .phone-table-seat-3 .phone-seat-cards {
    bottom: calc(100% + 5px);
  }
  .phone-table-seat-4 .phone-seat-cards,
  .phone-table-seat-5 .phone-seat-cards,
  .phone-table-seat-6 .phone-seat-cards {
    top: calc(100% + 5px);
  }
  .phone-seat-card.playing-card {
    width: 24px;
    height: auto;
    aspect-ratio: 5 / 7;
    border-radius: 4px;
    font-size: 10px;
    box-shadow: 0 4px 10px #0009;
  }
  .phone-seat-cards-hidden { gap: 0; }
  .phone-seat-cards-hidden .phone-seat-card.playing-card {
    width: 28px;
  }
  .phone-seat-cards-hidden .phone-seat-card + .phone-seat-card {
    margin-left: -10px;
  }
  .phone-seat-cards-hidden .hanks-card-back-logo {
    width: 76%;
    max-height: 72%;
  }
  .phone-seat-cards-hidden .loramic-card-back-logo {
    width: 62%;
    max-height: 62%;
  }

  .phone-result p {
    display: -webkit-box;
    max-height: 2.35em;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .action-panel[data-count="1"] { grid-template-columns: 1fr; }
  .action-panel[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-panel[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .action-panel[data-count="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .action-panel[data-count="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .action-panel[data-count="6"] { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .action-panel[data-count="5"] button,
  .action-panel[data-count="6"] button { padding-inline: 4px; font-size: 9px; }

  .action-panel .deal-hand-button,
  .action-panel .restart-game-button {
    min-width: 0;
    white-space: nowrap;
  }
}


/* Final pre-venue landscape spacing: let seat pods extend beyond the felt without clipping. */
@media (orientation: landscape) and (max-height: 720px) {
  .phone-felt {
    overflow: visible;
  }

  .phone-table-seat-1 { left: 23%; top: 75%; }
  .phone-table-seat-2 { left: 50%; top: 85%; }
  .phone-table-seat-3 { left: 77%; top: 75%; }

  .phone-table-seat-4 { left: 77%; top: 23%; }
  .phone-table-seat-5 { left: 50%; top: 13%; }
  .phone-table-seat-6 { left: 23%; top: 23%; }

  .phone-table-seat-1 .phone-seat-cards,
  .phone-table-seat-2 .phone-seat-cards,
  .phone-table-seat-3 .phone-seat-cards {
    bottom: calc(100% + 7px);
  }
}


/* Venue polish 2026-09-27: portrait table + real bet chips */
.committed-chip-stack{pointer-events:none}.committed-chip-stack .committed-chip-amount{position:absolute;left:50%;top:calc(100% + 5px);min-width:30px;padding:2px 6px;border:1px solid #d7b56b55;border-radius:999px;background:#060a08e8;color:#f4d68f;font:850 clamp(8px,.58vw,10px)/1 system-ui,sans-serif;text-align:center;transform:translateX(-50%);box-shadow:0 4px 12px #0008}
.phone-seat-commitment{position:absolute;z-index:7;right:-13px;bottom:-10px;width:30px;height:27px;pointer-events:none}.phone-seat-commitment i{position:absolute;left:0;bottom:calc(var(--phone-chip-index,0)*3px);width:20px;height:7px;border:1px solid #f7e4b966;border-radius:50%;background:linear-gradient(90deg,#9c2a24 0 34%,#ead29c 34% 49%,#9c2a24 49% 83%,#ead29c 83%);box-shadow:0 2px 4px #0009}.phone-seat-commitment i:nth-child(1){bottom:0}.phone-seat-commitment i:nth-child(2){bottom:3px}.phone-seat-commitment i:nth-child(3){bottom:6px}.phone-seat-commitment i:nth-child(4){bottom:9px}.phone-seat-commitment i:nth-child(5){bottom:12px}.phone-seat-commitment b{position:absolute;left:21px;bottom:0;padding:2px 5px;border-radius:999px;background:#06100ce8;color:#f2cf82;font:800 8px/1 system-ui,sans-serif;box-shadow:0 2px 8px #0008}
.summary-committed strong{color:#f0ca76!important}
@media (orientation: portrait) and (max-width:600px){
  .player-view:not([hidden]){grid-template-rows:none;grid-auto-rows:auto}
  .player-view:not([hidden]) .phone-table-view{display:block!important;order:2;min-height:0;height:clamp(190px,29dvh,260px);margin:0;padding:8px;border:1px solid #d6aa5d25;border-radius:18px;background:radial-gradient(ellipse at 50% 50%,#173f32 0,#0a241c 72%,#06120e);overflow:hidden}
  .player-view:not([hidden]) .player-summary{order:1;grid-template-columns:repeat(5,minmax(0,1fr))}
  .player-view:not([hidden]) .phone-result{order:3}
  .player-view:not([hidden]) .turn-prompt{order:4}
  .player-view:not([hidden]) .action-panel{order:5}
  .player-view:not([hidden]) .raise-panel{order:5}
  .player-view:not([hidden]) .private-hand{order:6;min-height:188px}
  .player-view:not([hidden]) .seat-controls{order:7}
  .player-view:not([hidden]) #actionError{order:8}
  .phone-felt{height:100%;min-height:0;border-radius:48% / 46%;overflow:visible}
  .phone-table-center{inset:29% 20%;gap:4px}
  .landscape-community{gap:3px}
  .landscape-community .playing-card{width:clamp(27px,8.5vw,38px);border-radius:4px;font-size:clamp(11px,3.7vw,16px)}
  .phone-table-center>span{font-size:9px}.phone-table-center>small{max-width:150px;font-size:8px;text-align:center}
  .phone-table-seat{width:clamp(70px,21vw,88px);min-height:35px;padding:4px 5px;border-radius:10px}
  .phone-table-seat strong{font-size:8px}.phone-table-seat>span{font-size:6.5px;line-height:1.05}
  .phone-table-seat .phone-seat-avatar{width:25px;height:25px;left:-8px}
  .phone-table-seat-1{left:20%;top:77%}.phone-table-seat-2{left:50%;top:88%}.phone-table-seat-3{left:80%;top:77%}.phone-table-seat-4{left:80%;top:23%}.phone-table-seat-5{left:50%;top:12%}.phone-table-seat-6{left:20%;top:23%}
  .player-summary>div{padding:6px 3px}.player-summary span{font-size:7px}.player-summary strong{font-size:14px}
}


/* Tournament clock */
.tournament-clock{display:block;margin-top:4px;color:#d8b766;font:800 clamp(8px,.75vw,12px)/1.1 system-ui,sans-serif;letter-spacing:.08em;font-style:normal}
.tournament-status{display:grid;grid-template-columns:auto 1fr auto;gap:7px 10px;align-items:center;padding:10px 12px;border:1px solid #d2ab5850;border-radius:13px;background:linear-gradient(135deg,#1b160d,#0a1510);box-shadow:0 9px 24px #0005}
.tournament-status>span{color:#d9b55f;font:900 8px/1 system-ui,sans-serif;letter-spacing:.16em}
.tournament-status>strong{color:#f5ead0;font:800 12px/1.15 system-ui,sans-serif}
.tournament-status>small{color:#d8b766;font:900 11px/1 ui-monospace,SFMono-Regular,Consolas,monospace;text-align:right}
.tournament-button{border-color:#d2ab5866!important;background:linear-gradient(135deg,#3b2b11,#18241b)!important;color:#f1d28a!important}
@media (orientation:portrait) and (max-width:600px){.tournament-status{order:3}.phone-result{order:4}.turn-prompt{order:5!important}.action-panel{order:6!important}.raise-panel{order:6!important}.private-hand{order:7!important}.seat-controls{order:8!important}.player-view>#actionError{order:9!important}}


/* Hank's venue polish: clean phone ambience, visible portrait board, committed-chip reference. */
.summary-committed {
  position: relative;
  overflow: hidden;
}
.summary-chip-stack {
  position: absolute;
  right: 6px;
  bottom: 5px;
  width: 42px;
  height: 19px;
  pointer-events: none;
}
.summary-chip-stack i {
  position: absolute;
  bottom: 0;
  width: 17px;
  height: 7px;
  border: 1px solid #fff7d6a8;
  border-radius: 50%;
  background: repeating-linear-gradient(90deg, #b9342d 0 3px, #f2d58e 3px 5px, #b9342d 5px 8px);
  box-shadow: inset 0 -2px #631914, 0 2px 5px #0009;
}
.summary-chip-stack i:nth-child(1){left:0}
.summary-chip-stack i:nth-child(2){left:6px;bottom:3px;filter:hue-rotate(72deg)}
.summary-chip-stack i:nth-child(3){left:12px;bottom:6px}
.summary-chip-stack i:nth-child(4){left:18px;bottom:9px;filter:hue-rotate(185deg)}
.summary-chip-stack i:nth-child(5){left:24px;bottom:12px}

@media (orientation: portrait) and (max-width: 600px) {
  .player-view:not([hidden]) .phone-table-view {
    order: 2;
    display: block !important;
    position: relative;
    height: 178px;
    min-height: 178px;
    overflow: hidden;
    border: 1px solid #d8b2673d;
    border-radius: 20px;
    background: radial-gradient(circle at 50% 35%, #1a382d 0, #08130f 68%);
    box-shadow: inset 0 0 44px #0008, 0 12px 30px #0005;
  }
  .player-view:not([hidden]) .phone-felt {
    position: absolute;
    inset: 14px 8px;
    overflow: hidden;
    border: 6px solid #24170f;
    border-radius: 48% / 50%;
    background: radial-gradient(ellipse at 50% 38%, #24624c 0, #0b3126 68%, #061b15 100%);
    box-shadow: inset 0 0 0 1px #e0bd6b66, inset 0 0 48px #0009, 0 10px 22px #0008;
  }
  .player-view:not([hidden]) .phone-felt::after {
    content: "LORAMIC POKER NIGHT";
    position: absolute;
    inset: 9%;
    display: grid;
    place-items: end center;
    padding-bottom: 5%;
    border: 1px solid #e3bd6b1c;
    border-radius: inherit;
    color: #e2bb6960;
    font-family: var(--serif);
    font-size: 7px;
    letter-spacing: .22em;
  }
  .player-view:not([hidden]) .phone-table-seat { display: none; }
  .player-view:not([hidden]) .phone-table-center {
    position: absolute;
    z-index: 2;
    inset: 25% 7%;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 7px;
  }
  .player-view:not([hidden]) .phone-table-center > span {
    color: #cdbb91;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
  }
  .player-view:not([hidden]) .phone-table-center > span strong {
    color: #fff1ca;
    font-family: var(--serif);
    font-size: 18px;
  }
  .player-view:not([hidden]) .phone-table-center > small {
    color: #b7c1b8;
    font-size: 8px;
  }
  .player-view:not([hidden]) .landscape-community {
    display: flex;
    gap: 4px;
  }
  .player-view:not([hidden]) .landscape-community .playing-card {
    width: min(12vw, 46px);
    min-width: 34px;
    border-radius: 5px;
    font-size: clamp(13px, 4.6vw, 18px);
  }

  .player-view:not([hidden]) .phone-result { order: 3; }
  .player-view:not([hidden]) .turn-prompt { order: 4; }
  .player-view:not([hidden]) .action-panel { order: 5; }
  .player-view:not([hidden]) .raise-panel { order: 5; }
  .player-view:not([hidden]) .private-hand { order: 6; }
  .player-view:not([hidden]) .seat-controls { order: 7; }
  .player-view:not([hidden]) #actionError { order: 8; }
}


/* Tournament readability: show stack depth in big blinds. */
.summary-stack{position:relative}.summary-bb{position:absolute;right:8px;bottom:6px;color:#8fa69a!important;font-size:8px!important;font-weight:850;letter-spacing:.08em}


/* Phone interaction polish: tactile table motion and tap-for-profile details. */
.phone-table-seat[role="button"] {
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.phone-table-seat[role="button"]:active {
  transform: translate(-50%, -50%) scale(.96);
}
.phone-table-seat.active {
  animation: phone-active-seat-pulse 1.45s ease-in-out infinite;
}
.phone-card-reveal {
  transform-origin: 50% 100%;
  animation: phone-board-reveal .5s cubic-bezier(.2,.8,.25,1) var(--phone-card-delay, 0ms) both;
}
.phone-hole-deal {
  transform-origin: 50% 100%;
  animation: phone-hole-deal .48s cubic-bezier(.16,.8,.25,1) var(--phone-card-delay, 0ms) both;
}
.phone-chip-bet {
  animation: phone-chip-bet .34s cubic-bezier(.2,.85,.3,1.2) both;
}
@keyframes phone-active-seat-pulse {
  0%, 100% { box-shadow: 0 0 0 2px #d6aa5d1e, 0 0 12px #d6aa5d38; }
  50% { box-shadow: 0 0 0 4px #d6aa5d2a, 0 0 24px #d6aa5d72; }
}
@keyframes phone-board-reveal {
  0% { opacity: 0; transform: translateY(-12px) rotateY(72deg) scale(.88); filter: brightness(.6); }
  70% { opacity: 1; transform: translateY(1px) rotateY(0) scale(1.04); }
  100% { opacity: 1; transform: none; filter: none; }
}
@keyframes phone-hole-deal {
  0% { opacity: 0; transform: translateY(-18px) rotate(-5deg) scale(.85); }
  72% { opacity: 1; transform: translateY(1px) rotate(1deg) scale(1.03); }
  100% { opacity: 1; transform: none; }
}
@keyframes phone-chip-bet {
  0% { opacity: .35; transform: translate(8px, 8px) scale(.72); }
  75% { opacity: 1; transform: translate(0, 0) scale(1.08); }
  100% { opacity: 1; transform: none; }
}

.player-profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background: #020604c9;
  backdrop-filter: blur(10px);
  animation: player-profile-backdrop .18s ease both;
}
.player-profile-sheet {
  position: relative;
  width: min(430px, 94vw);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px 16px;
  padding: 22px;
  border: 1px solid #d6aa5d70;
  border-radius: 22px;
  background: radial-gradient(circle at 20% 0, #244f3d 0, #0c1d17 50%, #07100d 100%);
  box-shadow: 0 30px 80px #000c, inset 0 1px #fff1c91a;
  animation: player-profile-arrive .24s cubic-bezier(.18,.8,.25,1.08) both;
}
.player-profile-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 50%;
  border-color: #ffffff22;
  background: #07100dd9;
  color: #d9d8d0;
  font-size: 22px;
  line-height: 1;
}
.player-profile-avatar {
  align-self: center;
}
.player-profile-avatar-image {
  width: 78px;
  height: 78px;
  border: 3px solid #d5b66c;
  box-shadow: 0 0 0 4px #06100d, 0 12px 28px #0009;
}
.player-profile-heading {
  align-self: center;
  min-width: 0;
  display: grid;
  gap: 3px;
  padding-right: 34px;
}
.player-profile-heading > span {
  color: #d7b35f;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .16em;
}
.player-profile-heading h2 {
  overflow: hidden;
  margin: 0;
  color: #f4ead4;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-profile-heading small {
  color: #9ca79d;
  font-size: 11px;
}
.player-profile-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.player-profile-metrics > div {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 11px 10px;
  border: 1px solid #ffffff16;
  border-radius: 12px;
  background: #07100d99;
}
.player-profile-metrics span {
  color: #89958b;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.player-profile-metrics strong {
  color: #f1ce80;
  font-size: 20px;
}
.player-profile-metrics small {
  overflow: hidden;
  color: #a7afa7;
  font-size: 8px;
  line-height: 1.2;
  text-overflow: ellipsis;
}
@keyframes player-profile-backdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes player-profile-arrive {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
  to { opacity: 1; transform: none; }
}

@media (orientation: landscape) and (max-height: 720px) {
  .tournament-status {
    min-height: 46px;
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 5px 8px;
    padding: 7px 10px;
  }
  .tournament-status > strong {
    white-space: nowrap;
    font-size: 10px;
  }
  .tournament-status > small {
    white-space: nowrap;
    font-size: 9px;
  }
  .player-profile-sheet {
    width: min(520px, 68vw);
    grid-template-columns: auto 1fr;
    padding: 16px 18px;
  }
  .player-profile-avatar-image {
    width: 62px;
    height: 62px;
  }
  .player-profile-heading h2 {
    font-size: 24px;
  }
  .player-profile-metrics > div {
    padding: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .phone-table-seat.active,
  .phone-card-reveal,
  .phone-hole-deal,
  .phone-chip-bet,
  .player-profile-overlay,
  .player-profile-sheet {
    animation: none !important;
  }
}


/* Hank's attract mode doubles as a calm how-to surface. */
.attract-guide {
  min-width: 0;
  display: grid;
  gap: 7px;
  align-self: center;
  padding: 8px 12px;
  border: 1px solid #d6aa5d2e;
  border-radius: 13px;
  background: #08100dcc;
}
.attract-guide-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.attract-guide-steps > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
}
.attract-guide-steps b {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid #d6aa5d55;
  border-radius: 50%;
  color: #e2c47e;
  font-size: 10px;
}
.attract-guide-steps span {
  min-width: 0;
  display: grid;
  gap: 1px;
}
.attract-guide-steps strong {
  overflow: hidden;
  color: #eee5d1;
  font-size: clamp(9px, .72vw, 12px);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attract-guide-steps small {
  overflow: hidden;
  color: #89928a;
  font-size: clamp(7px, .55vw, 9px);
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attract-guide > p {
  margin: 0;
  color: #9ba39b;
  font-size: clamp(7px, .58vw, 10px);
  line-height: 1.25;
  text-align: center;
}
.attract-guide > p strong { color: #d7bc7c; }

.poker-attract-mode .tv-footer {
  grid-template-columns: minmax(250px, 340px) minmax(0, 1fr);
  gap: 14px;
}
.poker-attract-mode .join-panel {
  opacity: 1;
  border-color: #caa45a66;
}
.poker-attract-mode .active-seat {
  animation: none;
  box-shadow: 0 0 0 3px #d6aa5d26, 0 0 16px #d6aa5d38, 0 18px 40px #000a;
}
.poker-attract-mode .community-card-reveal {
  animation-duration: .9s;
}
.poker-attract-mode .seat {
  transition-duration: .45s;
}

@media (max-width: 1100px), (max-height: 700px) {
  .poker-attract-mode .tv-footer {
    grid-template-columns: minmax(210px, 290px) minmax(0, 1fr);
    gap: 9px;
  }
  .attract-guide {
    gap: 5px;
    padding: 7px 9px;
  }
  .attract-guide-steps {
    gap: 5px;
  }
  .attract-guide-steps > div {
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 5px;
  }
  .attract-guide-steps b {
    width: 18px;
    height: 18px;
    font-size: 8px;
  }
  .attract-guide-steps small {
    white-space: normal;
  }
}


/* One face-up bot hand anchors the attract-mode teaching demo. */
.poker-attract-mode .featured-demo-seat {
  z-index: 8;
  opacity: 1;
  filter: none;
  border-color: #e3c2778c;
  box-shadow: 0 0 0 3px #d6aa5d1f, 0 14px 34px #000b;
}
.poker-attract-mode .seat-cards-demo {
  gap: 8px;
}
.poker-attract-mode .seat-cards-demo .demo-playing-card {
  width: clamp(48px, 3.8vw, 68px);
  border-color: #d9b96e;
  box-shadow: 0 0 0 2px #d6aa5d1e, 0 10px 24px #000b;
}

/* Venue context stays secondary to Loramic and outside the core action grid. */
@media (orientation: portrait) and (max-width: 600px) {
  .poker-phone:has(.player-view:not([hidden])) .phone-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 6px 8px;
  }
  .poker-phone.hanks-brand .player-view:not([hidden]) .phone-felt::after {
    content: "HANK'S POKER NIGHT";
  }
  .poker-phone:has(.player-view:not([hidden])) .phone-header .loramic-brand-lockup,
  .poker-phone:has(.player-view:not([hidden])) .phone-header .hanks-brand-logo {
    grid-column: 1;
    grid-row: 1;
  }
  .poker-phone:has(.player-view:not([hidden])) .phone-header .loramic-brand-lockup {
    width: 38px;
  }
  .poker-phone:has(.player-view:not([hidden])) .phone-header .loramic-brand-lockup img {
    width: 26px;
  }
  .poker-phone:has(.player-view:not([hidden])) .phone-header .loramic-brand-lockup strong {
    font-size: 8px;
  }
  .poker-phone:has(.player-view:not([hidden])) .phone-header h1 {
    grid-column: 2;
    grid-row: 1;
  }
  .poker-phone:has(.player-view:not([hidden])) .phone-header .venue-badge {
    grid-column: 3;
    grid-row: 1;
    max-width: 142px;
    margin: 0;
    padding: 3px 7px 3px 3px;
    font-size: 7px;
  }
  .poker-phone:has(.player-view:not([hidden])) .phone-header .venue-badge img {
    width: 22px;
  }
  .player-view:not([hidden]) .venue-host-controls { order: 9; }
  .player-view:not([hidden]) > #actionError { order: 10 !important; }
}
