/* Hot Hand. The whole look: the table, the door, the pages. */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--ui); color: var(--ink); overflow: hidden;
  background: color-mix(in oklab, var(--field), var(--hot) calc(var(--heat, 0) * 100%));
  transition: background-color .5s;
}
/* the suits, drifting across the field */
body::before {
  content: ""; position: fixed; inset: -200px; z-index: 0; pointer-events: none; opacity: .09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' font-size='64' fill='%23fff' text-anchor='middle'%3E%3Ctext x='50' y='72'%3E%E2%99%A0%3C/text%3E%3Ctext x='150' y='72'%3E%E2%99%A5%3C/text%3E%3Ctext x='50' y='172'%3E%E2%99%A6%3C/text%3E%3Ctext x='150' y='172'%3E%E2%99%A3%3C/text%3E%3C/svg%3E");
  background-size: 200px 200px; animation: drift 30s linear infinite; transform: rotate(-12deg);
}
@keyframes drift { to { background-position: 200px 400px; } }
@media (prefers-reduced-motion: reduce) { *, body::before { animation: none !important; transition: none !important; } }

#app { position: relative; z-index: 1; height: 100%; height: 100svh; padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left); }
#top { display: none; }
#stage { position: relative; height: 100%; overflow: hidden; }
button { font-family: inherit; cursor: pointer; color: inherit; }
button:disabled { cursor: default; }
.lab { font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--ink-dim); }

/* card stock: every button is cut from the deck */
.stock {
  border: 0; border-radius: 12px; background: var(--stock); color: var(--navy);
  font-weight: 700; font-size: 20px; letter-spacing: .08em; padding: 0 28px; min-height: 60px; min-width: 240px;
  box-shadow: 0 6px 0 var(--deeper), 0 0 0 2px var(--navy) inset;
  transition: transform .1s, box-shadow .1s;
}
.stock:hover { transform: translateY(-2px); }
.stock:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--deeper), 0 0 0 2px var(--navy) inset; }
.stock.play { font-size: 30px; min-height: 84px; min-width: 280px; }
.stock.small { font-size: 15px; min-height: 48px; min-width: 0; padding: 0 18px; }
.stock.on { background: var(--navy); color: var(--stock); box-shadow: 0 6px 0 var(--deeper), 0 0 0 2px var(--stock) inset; }
.textlink { background: none; border: 0; font-weight: 700; font-size: 14px; letter-spacing: .14em; padding: 14px 10px; min-height: 44px; color: var(--ink); }
.textlink:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- the door */
.hh-rain { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.hh-raincard {
  position: absolute; top: 0; left: var(--x); width: clamp(70px, 13vw, 150px); border-radius: 6%;
  box-shadow: 0 8px 18px rgba(60,0,20,.35);
  animation: fall var(--d) linear var(--delay) infinite; opacity: .5;
}
@keyframes fall {
  from { transform: translate(-50%, -160%) rotate(var(--r0)) scale(var(--s)); }
  to { transform: translate(-50%, calc(100svh + 60%)) rotate(var(--r1)) scale(var(--s)); }
}
.hh-fan { z-index: 0; position: absolute; right: -4vw; bottom: -9svh; width: min(62vw, 64svh); aspect-ratio: 1.25; pointer-events: none; }
.hh-fan img { position: absolute; bottom: 0; left: 30%; width: 44%; border-radius: 6%; transform-origin: 50% 120%; box-shadow: 0 10px 30px rgba(60,0,20,.5); animation: fan 3.2s ease-in-out infinite alternate; }
.hh-fan img:nth-child(1) { --a: -24deg; --b: -30deg; }
.hh-fan img:nth-child(2) { --a: -2deg; --b: 2deg; animation-delay: -.8s; }
.hh-fan img:nth-child(3) { --a: 20deg; --b: 27deg; animation-delay: -1.6s; }
@keyframes fan { from { transform: rotate(var(--a)); } to { transform: rotate(var(--b)) translateY(-3%); } }

.door {
  z-index: 1; position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr auto auto; gap: 14px;
  padding: max(0px, env(safe-area-inset-top)) 0 0;
}
.door-band { background: var(--navy); overflow: hidden; border-bottom: 3px solid var(--stock); }
.door-bandrun { display: flex; width: max-content; animation: band 16s linear infinite; }
.door-bandrun span { font-weight: 700; font-size: 22px; padding: 8px 14px; color: var(--stock); }
.door-bandrun span:nth-child(3n) { color: var(--sky); }
@keyframes band { to { transform: translateX(-50%); } }
.door-head { align-self: center; padding: 0 20px; }
.door-kicker { font-weight: 700; letter-spacing: .14em; font-size: clamp(12px, 3.4vw, 18px); }
.door-mark { margin: 6px 0 10px; font-weight: 700; line-height: .82; font-size: min(clamp(76px, 27vw, 230px), 19svh); letter-spacing: -.04em; text-shadow: 0 .06em 0 var(--deeper); animation: thump 1.1s ease-in-out infinite; transform-origin: 0 60%; }
.door-mark span { display: block; }
.door-mark span:nth-child(2) { color: var(--navy); text-shadow: 0 .06em 0 var(--stock); }
@keyframes thump { 0%, 100% { transform: scale(1) rotate(-3deg); } 12% { transform: scale(1.035) rotate(-3deg); } 24% { transform: scale(1) rotate(-3deg); } }
.door-line { font-weight: 700; font-size: clamp(18px, 5.2vw, 30px); }
.door-acts { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 0 20px; }
.door-row { display: flex; gap: 10px; flex-wrap: wrap; }
.door-streak { font-weight: 700; letter-spacing: .14em; font-size: 14px; background: var(--navy); padding: 6px 12px; border-radius: 8px; }
.door-feet { display: flex; gap: 4px; padding: 0 10px max(0px, env(safe-area-inset-bottom)); flex-wrap: wrap; background: var(--navy); border-top: 3px solid var(--stock); }
.door-kicker, .door-line { display: table; background: var(--navy); padding: 4px 10px; border-radius: 8px; }
@media (min-width: 900px) and (min-height: 560px) {
  .door { grid-template-rows: auto 1fr auto auto; }
  .door-head, .door-acts { padding: 0 6vw; }
  .door-feet { padding: 0 calc(6vw - 10px); }
  .door-mark { font-size: min(21vw, 25svh); }
  .hh-fan { right: 2vw; width: min(46vw, 84svh); }
}
/* a phone on its side: the name on the left, the buttons on the right */
@media (max-height: 560px) and (min-aspect-ratio: 5/4) {
  .door { grid-template-columns: 1fr auto; grid-template-rows: auto 1fr auto; column-gap: 16px; row-gap: 6px; }
  .door-band, .door-feet { grid-column: 1 / -1; }
  .door-bandrun span { font-size: 16px; padding: 4px 12px; }
  .door-head { padding: 0 0 0 max(20px, env(safe-area-inset-left)); }
  .door-acts { align-self: center; padding: 0 max(20px, env(safe-area-inset-right)) 0 0; gap: 12px; }
  .door-mark { font-size: 22svh; margin: 4px 0 8px; }
  .door-line { font-size: 17px; }
  .stock.play { min-height: 60px; font-size: 24px; min-width: 240px; }
  .textlink { padding: 8px 10px; min-height: 40px; }
}

/* --------------------------------------------------------------- the pages */
.page { position: absolute; inset: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: max(22px, env(safe-area-inset-top)) 20px max(22px, env(safe-area-inset-bottom)); }
.page > * { flex-shrink: 0; }
.page-title { margin: 0; font-size: clamp(34px, 9vw, 64px); letter-spacing: -.02em; text-shadow: 0 .06em 0 var(--deeper); text-align: center; }
.how-list { list-style: none; margin: 0; padding: 0; width: min(100%, 760px); display: grid; gap: 10px; }
.how-list li { display: flex; align-items: center; gap: 16px; background: var(--deep); border-radius: 12px; padding: 10px 16px; }
.how-list img { width: clamp(44px, 12vw, 70px); border-radius: 6%; flex-shrink: 0; transform: rotate(-4deg); }
.how-list li:nth-child(even) img { transform: rotate(5deg); }
.how-list p { margin: 0; font-weight: 700; font-size: clamp(16px, 4.4vw, 22px); line-height: 1.25; }
.tweak { width: min(100%, 760px); background: var(--deep); border-radius: 12px; padding: 14px 16px; display: grid; gap: 10px; }
.tweak-label { font-weight: 700; font-size: 18px; }
.tweak-opts { display: flex; gap: 10px; flex-wrap: wrap; }
.tweak-note { font-size: 14px; color: var(--ink-dim); }

.result { justify-content: center; gap: 12px; }
.res-kicker, .res-next, .res-rank { font-weight: 700; letter-spacing: .14em; font-size: clamp(12px, 3.4vw, 16px); text-align: center; }
.res-rank:empty { display: none; }
.res-rank { background: var(--navy); padding: 8px 14px; border-radius: 8px; }
.res-money { font-weight: 700; line-height: .9; white-space: nowrap; font-size: min(clamp(64px, 21vw, 190px), calc(140vw / var(--n, 6)), 30svh); letter-spacing: -.04em; text-shadow: 0 .06em 0 var(--deeper); animation: land .5s cubic-bezier(.2,1.6,.4,1); text-align: center; }
@keyframes land { from { transform: scale(.4) rotate(-8deg); opacity: 0; } }
.res-line { font-weight: 700; font-size: clamp(18px, 5vw, 28px); text-align: center; }
.res-line.up { color: var(--stock); } .res-line.down { color: var(--navy); background: var(--stock); padding: 2px 12px; border-radius: 8px; }
.res-ticks, .hh-track { display: grid; grid-template-columns: repeat(39, 1fr); gap: 2px; width: min(100%, 620px); }
.res-ticks i, .hh-track i { height: 12px; border-radius: 2px; background: rgba(82,6,29,.45); }
.res-ticks i.hit, .hh-track i.hit { background: var(--stock); }
.res-ticks i.miss, .hh-track i.miss { background: var(--navy); }
.res-ticks i.face, .hh-track i.face { background: var(--sky); height: 5px; align-self: center; }
.hh-track i.now { background: var(--sky); animation: blink .9s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }
.res-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(100%, 620px); }
.res-stat { background: var(--deep); border-radius: 12px; padding: 10px 6px; text-align: center; display: grid; gap: 2px; }
.res-stat b { font-size: clamp(20px, 6vw, 34px); }
.res-stat span { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--ink-dim); }
.res-acts { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; width: min(100%, 620px); }
.res-acts .play { flex-basis: 100%; }

.board { list-style: none; margin: 0; padding: 0; width: min(100%, 620px); display: grid; gap: 6px; }
.board li { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; background: var(--deep); border-radius: 10px; padding: 12px 14px; font-weight: 700; font-size: 18px; }
.board li.muted { display: block; font-weight: 500; }
.board li.me { background: var(--stock); color: var(--navy); }
.board .n { overflow-wrap: anywhere; }
.credits h3 { margin: 6px 0 0; font-size: 14px; letter-spacing: .14em; width: min(100%, 760px); }
.credit-list { list-style: none; margin: 0; padding: 0; width: min(100%, 760px); display: grid; gap: 6px; }
.credit-list li { background: var(--deep); border-radius: 10px; padding: 10px 14px; font-size: 16px; line-height: 1.35; }
.credit-list a { color: var(--stock); font-weight: 700; }
.credit-list .lic { display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 700; background: var(--navy); padding: 2px 8px; border-radius: 6px; }

.sheet { position: fixed; inset: 0; z-index: 20; background: rgba(82,6,29,.8); display: grid; place-items: center; padding: 20px; }
.sheet[hidden] { display: none; }
.sheet-body { background: var(--field); border: 3px solid var(--stock); border-radius: 16px; padding: 22px; width: min(100%, 440px); display: grid; gap: 14px; justify-items: stretch; }
.sheet-body h2 { margin: 0; font-size: 22px; }
.sheet-body p { margin: 0; font-weight: 500; font-size: 17px; line-height: 1.3; }
.sheet-body .stock { min-width: 0; }
.name-input { width: 100%; padding: 14px; font: inherit; font-weight: 700; font-size: 20px; border-radius: 10px; border: 2px solid var(--navy); background: var(--stock); color: var(--navy); }
#toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translate(-50%, 30px); opacity: 0; z-index: 30; pointer-events: none;
  background: var(--navy); color: var(--stock); font-weight: 700; padding: 12px 18px; border-radius: 10px; transition: transform .2s, opacity .2s; text-align: center; }
#toast.on { transform: translate(-50%, 0); opacity: 1; }
.gad-end:empty, .gad-shelf:empty { display: none; }

/* --------------------------------------------------------------- the table */
.hh { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px;
  padding: max(10px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); }
.hh-side, .hh-ctl { display: flex; flex-direction: column; gap: 8px; flex: none; min-width: 0; }
.hh-mid { flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.hh-top { display: grid; grid-template-columns: minmax(0, 1.25fr) auto auto; gap: 8px; align-items: stretch; }
.hh-stat { background: var(--deep); border-radius: 12px; padding: 7px 12px; display: flex; flex-direction: column; justify-content: center; gap: 1px; min-width: 0; height: 62px; }
.hh-stat b { font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hh-money b { font-size: clamp(22px, 8vw, 34px); }
.hh-pays { background: var(--stock); color: var(--navy); }
.hh-pays .lab { color: var(--navy); }
.hh-pays .lab, .hh-cardno .lab { white-space: nowrap; }
.hh-stat .lab { font-size: 10px; }
.hh-track { width: 100%; }
.hh-track i { height: 8px; }

.hh-table { flex: 1; min-height: 0; position: relative; container-type: size; }
.hh-table { --cw: min(52cqw, 66cqh); }
.hh-card { display: block; width: 100%; border-radius: 6%; box-shadow: 0 6px 14px rgba(60,0,20,.4); }
.hh-pile { position: absolute; left: 50%; top: 50%; width: var(--cw); aspect-ratio: 552 / 752; transform: translate(-50%, -50%); }
.hh-pile .hh-card { position: absolute; inset: 0; height: 100%; transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .28s; }
.hh-pile .hh-card[data-depth="1"] { transform: translate(-19%, -4%) rotate(-8deg); }
.hh-pile .hh-card[data-depth="2"] { transform: translate(-33%, 0%) rotate(-15deg); }
.hh-pile .hh-card[data-depth="3"] { transform: translate(-40%, 4%) rotate(-20deg); opacity: 0; }
.hh-deck { position: absolute; left: 1cqw; top: 6cqh; width: calc(var(--cw) * .4); aspect-ratio: 552 / 752; }
.hh-deck .hh-card { position: absolute; inset: 0; height: 100%; }
.hh-deck .hh-card:nth-child(2) { transform: translate(3%, -2%); }
.hh-deck .hh-card:nth-child(3) { transform: translate(6%, -4%); }
.hh-deckn { position: absolute; left: 50%; top: -10px; z-index: 1; transform: translateX(-30%); background: var(--navy); color: var(--stock); font-weight: 700; font-size: 14px; padding: 2px 9px; border-radius: 8px; }
.hh-court { position: absolute; right: 1cqw; bottom: 6cqh; width: calc(var(--cw) * .4); aspect-ratio: 552 / 752; }
.hh-court .hh-card { position: absolute; inset: 0; height: 100%; }
.hh-court .hh-card:nth-child(1) { transform: rotate(7deg); }
.hh-court .hh-card:nth-child(2) { transform: rotate(-5deg) translate(-4%, -3%); }
.hh-court .hh-card:nth-child(3) { transform: rotate(4deg) translate(3%, -6%); }
.hh-fly { position: absolute; z-index: 5; perspective: 900px; pointer-events: none; }
.hh-flyin { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateY(180deg); }
.hh-flyin img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 6%; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 14px 26px rgba(60,0,20,.5); }
.hh-flyin .back { transform: rotateY(180deg); }

.hh-say { flex: none; min-width: 0; height: 44px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.hh-banner, .hh-pop { font-weight: 700; font-size: clamp(17px, 5vw, 24px); letter-spacing: .04em; padding: 6px 14px; border-radius: 10px; opacity: 0; transform: scale(.7); white-space: nowrap; }
.hh-banner.on, .hh-pop.on { opacity: 1; transform: scale(1); transition: transform .16s cubic-bezier(.2,1.8,.4,1), opacity .1s; }
.hh-banner.hit, .hh-pop.hit { background: var(--stock); color: var(--navy); }
.hh-banner.miss, .hh-pop.miss { background: var(--navy); color: var(--stock); }
.hh-banner.face { background: var(--sky); color: var(--navy); }
.hh.shake .hh-mid { animation: shake .3s; }
@keyframes shake { 20% { transform: translate(-7px, 3px) rotate(-1deg); } 40% { transform: translate(6px, -3px) rotate(1deg); } 60% { transform: translate(-4px, 2px); } 80% { transform: translate(3px, -1px); } }

.hh-count { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; height: 44px; }
.no-count .hh-count { visibility: hidden; }
.hh-rank { background: var(--deep); border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.hh-rank b { font-size: 15px; line-height: 1; }
.hh-rank .dots { display: flex; gap: 1px; }
.hh-rank { min-width: 0; }
.hh-rank .dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,250,240,.22); }
.hh-rank[data-n="1"] .dots i:nth-child(-n+1), .hh-rank[data-n="2"] .dots i:nth-child(-n+2), .hh-rank[data-n="3"] .dots i:nth-child(-n+3), .hh-rank[data-n="4"] .dots i { background: var(--stock); }
.hh-rank[data-n="0"] b { opacity: .35; text-decoration: line-through; }
.hh-rank.cur { box-shadow: 0 0 0 2px var(--stock) inset; }
.hh-coach { display: none; }
.has-coach .hh-coach { display: flex; align-items: center; height: 58px; background: var(--navy); border-radius: 10px; padding: 6px 12px; font-weight: 700; font-size: 15px; line-height: 1.2; }

.hh-bet { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.hh-betline { display: flex; align-items: baseline; gap: 10px; height: 34px; }
.hh-betamt { font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hh-win { margin-left: auto; font-weight: 700; font-size: 16px; white-space: nowrap; }
.hh-rail { display: grid; grid-template-columns: auto 46px minmax(0, 1fr) 46px auto; gap: 6px; align-items: center; height: 46px; }
.hh-chip { height: 46px; border: 0; border-radius: 10px; background: var(--deep); color: var(--stock); font-weight: 700; font-size: 14px; letter-spacing: .06em; padding: 0 12px; box-shadow: 0 0 0 2px rgba(255,250,240,.35) inset; }
.hh-chip.hh-step { font-size: 24px; padding: 0; }
.hh-chip.on { background: var(--stock); color: var(--navy); }
.hh-chip:active { transform: translateY(2px); }
.hh-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 46px; margin: 0; background: transparent; touch-action: none; }
.hh-slider::-webkit-slider-runnable-track { height: 12px; border-radius: 6px; background: linear-gradient(to right, var(--stock) var(--fill, 0%), var(--deeper) var(--fill, 0%)); }
.hh-slider::-moz-range-track { height: 12px; border-radius: 6px; background: var(--deeper); }
.hh-slider::-moz-range-progress { height: 12px; border-radius: 6px; background: var(--stock); }
.hh-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; margin-top: -11px; border-radius: 50%; background: var(--stock); border: 5px dashed var(--navy); box-shadow: 0 3px 0 var(--deeper); }
.hh-slider::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--stock); border: 5px dashed var(--navy); }
.hh-calls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; height: 72px; }
.hh-call { border: 0; border-radius: 12px; background: var(--stock); color: var(--navy); font-weight: 700; font-size: clamp(15px, 4.6vw, 21px); letter-spacing: .04em;
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 6px; box-shadow: 0 6px 0 var(--deeper), 0 0 0 2px var(--navy) inset; height: 66px; transition: transform .08s, box-shadow .08s, opacity .15s; }
.hh-call .glyph { font-size: 1.1em; }
.hh-call.hh-h .glyph { color: var(--field); } .hh-call.hh-l .glyph { color: var(--sky); }
.hh-call:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 1px 0 var(--deeper), 0 0 0 2px var(--navy) inset; }
.hh-call kbd { display: none; }
.busy .hh-call, .busy .hh-chip, .busy .hh-slider { opacity: .45; }
.busy[data-called="h"] .hh-h, .busy[data-called="l"] .hh-l { opacity: 1; background: var(--navy); color: var(--stock); }
.big-bet .hh-betamt { animation: pulse .5s ease-in-out infinite alternate; }
@keyframes pulse { to { transform: scale(1.08); } }
.hh-betamt { transform-origin: 0 60%; display: inline-block; }

/* short phones: tighten the fixed rows, never the table's share */
@media (max-height: 640px) {
  .hh { gap: 5px; padding-top: max(6px, env(safe-area-inset-top)); padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .hh-side, .hh-ctl { gap: 5px; }
  .hh-stat { height: 50px; padding: 5px 10px; } .hh-stat b { font-size: 22px; } .hh-money b { font-size: clamp(20px, 7vw, 26px); }
  .hh-say { height: 34px; } .hh-count { height: 36px; } .hh-rank { gap: 2px; }
  .hh-betline { height: 28px; } .hh-betamt { font-size: 26px; }
  .hh-rail, .hh-chip, .hh-slider { height: 40px; } .hh-calls { height: 60px; } .hh-call { height: 54px; }
  .has-coach .hh-coach { height: 48px; font-size: 13px; }
}

/* a desk: money on the left, the table in the middle, the bet on the right */
@media (min-width: 900px) and (min-height: 480px), (min-width: 560px) and (min-aspect-ratio: 5/4) {
  .hh { flex-direction: row; gap: 3vw; padding: 4svh 4vw; align-items: stretch; }
  .hh-side { flex: 0 0 clamp(230px, 22vw, 340px); justify-content: center; gap: 14px; }
  .hh-ctl { flex: 0 0 clamp(300px, 26vw, 400px); justify-content: center; gap: 14px; }
  .hh-top { grid-template-columns: 1fr; gap: 14px; }
  .hh-stat { height: auto; padding: 16px 20px; gap: 6px; }
  .hh-stat b, .hh-money b { font-size: clamp(40px, 4.4vw, 68px); }
  .hh-track { grid-template-columns: repeat(13, 1fr); gap: 4px; } .hh-track i { height: 14px; }
  .hh-table { --cw: min(54cqw, 72cqh); }
  .hh-say { height: 60px; } .hh-banner, .hh-pop { font-size: 28px; }
  .hh-count { height: 64px; } .hh-rank b { font-size: 19px; }
  .hh-betline { height: 56px; } .hh-betamt { font-size: 54px; }
  .hh-calls { grid-template-columns: 1fr; height: auto; gap: 14px; }
  .hh-call { height: 76px; font-size: 24px; justify-content: flex-start; padding: 0 20px; gap: 14px; }
  .hh-call.hh-h { order: 1; } .hh-call.hh-l { order: 2; }
  .has-coach .hh-coach { height: 84px; font-size: 17px; }
}
/* a phone on its side: the same three columns, packed */
@media (max-height: 520px) and (min-aspect-ratio: 5/4) {
  .hh { gap: 14px; padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .hh-side { flex-basis: 150px; gap: 6px; } .hh-ctl { flex-basis: 272px; gap: 6px; }
  .hh-top { gap: 6px; } .hh-stat { padding: 6px 10px; gap: 2px; } .hh-stat b, .hh-money b { font-size: 26px; }
  .hh-track { gap: 3px; } .hh-track i { height: 9px; }
  .hh-table { --cw: min(52cqw, 70cqh); }
  .hh-say { height: 32px; } .hh-banner, .hh-pop { font-size: 16px; padding: 4px 10px; }
  .hh-count { height: 38px; } .hh-rank b { font-size: 14px; } .hh-rank .dots i { width: 4px; height: 4px; }
  .hh-betline { height: 30px; } .hh-betamt { font-size: 28px; }
  .hh-rail, .hh-chip, .hh-slider { height: 40px; }
  .hh-calls { gap: 9px; } .hh-call { height: 44px; font-size: 17px; box-shadow: 0 4px 0 var(--deeper), 0 0 0 2px var(--navy) inset; }
  .has-coach .hh-coach { height: 50px; font-size: 12px; }
}
/* a keyboard is likely: the calls carry their keys */
@media (min-width: 900px) and (min-height: 480px) and (hover: hover) and (pointer: fine) {
  .hh-call kbd { display: inline-grid; place-items: center; margin-left: auto; min-width: 40px; height: 40px; border-radius: 8px; background: var(--navy); color: var(--stock); font-family: inherit; font-size: 20px; font-weight: 700; box-shadow: 0 3px 0 rgba(0,0,0,.35); }
}
