/* Full-bleed 3D card room with walnut-and-brass panels pinned to the edges. */
:root {
  --room: #120b0b;
  --shade: rgba(14, 8, 8, 0.92);
  --panel: rgba(31, 21, 19, 0.9);
  --panel-2: rgba(46, 31, 26, 0.94);
  --line: rgba(212, 173, 98, 0.26);
  --brass: #d4ad62;
  --brass-2: #f0d28f;
  --ink: #f4ecdc;
  --muted: #b9a891;
  --good: #62c892;
  --warn: #e8b54f;
  --bad: #e2665b;
  --card: #fbf8f1;
  --red: #c22a2f;
  --black: #1b1b22;
  --on-brass: #1d130c;
  --f-display: 'Bodoni Moda', Didot, Georgia, serif;
  --f-body: 'Karla', system-ui, -apple-system, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --bar-h: 132px;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  height: 100%;
}
#app {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
#app input,
#app textarea {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}
body {
  margin: 0;
  background: var(--room);
  color: var(--ink);
  font: 15px/1.45 var(--f-body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  display: flex;
}
#stage {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  container-type: inline-size;
}
@container (max-width: 1700px) {
  #stage #actionbar {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 10px;
  }
  #stage #actionbar .center-col {
    grid-column: 1/-1;
    grid-row: 1;
  }
  #stage #actionbar .mine {
    grid-column: 1;
    grid-row: 2;
  }
  #stage #actionbar .sizer {
    grid-column: 2;
    grid-row: 2;
    width: 300px;
  }
}
@container (max-width: 640px) {
  #stage #actionbar {
    grid-template-columns: minmax(0, 1fr);
  }
  #stage #actionbar .mine {
    grid-column: 1;
    grid-row: 1;
    justify-content: flex-start;
  }
  #stage #actionbar .center-col {
    grid-row: 2;
  }
  #stage #actionbar .sizer {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
  }
  #stage #actionbar .actions {
    flex-wrap: nowrap;
    width: 100%;
  }
  #stage #actionbar .act {
    min-width: 0;
    flex: 1;
  }
}
#side {
  flex: none;
  width: 370px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #1a1110;
  border-left: 1px solid var(--line);
  overflow: hidden;
}
#coachpane {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: calc(14px + env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) 14px 18px;
}
#app.side-off #coachpane {
  display: none;
}
#app.side-off #logcol {
  flex: 1 1 auto;
  border-top: 0;
}
#app.side-off.log-off #side {
  display: none;
}
#logcol {
  flex: 0 0 34%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #150d0c;
  border-top: 1px solid var(--line);
  padding: 12px max(18px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) 18px;
}
#app.log-off #logcol {
  display: none;
}
.mobile-only,
.tbtn.mobile-only,
.sheet-close {
  display: none;
}
#sheetShade {
  position: fixed;
  inset: 0;
  z-index: 15;
  background: rgba(0, 0, 0, 0.45);
}
.log-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sheet-close {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 2px 4px;
}
#logcol .panel,
#side .panel {
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}
#scene:active {
  cursor: grabbing;
}
#labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
button,
select,
input {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--brass-2);
  outline-offset: 2px;
}
kbd {
  font: 500 0.66rem var(--f-mono);
  opacity: 0.6;
  margin-left: 6px;
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 0 4px;
}

/* top bar */
.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px 16px;
  flex-wrap: wrap;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 14px max(16px, env(safe-area-inset-left, 0px));
  background: linear-gradient(var(--shade), rgba(14, 8, 8, 0));
}
.brand {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--brass-2);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.handinfo {
  font: 500 0.76rem var(--f-mono);
  color: var(--muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.toolrow {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}
.tools-left {
  display: flex;
  gap: 4px;
  align-items: center;
}
.tbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ic {
  display: block;
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#moreBtn .ic circle {
  fill: currentColor;
}
.tbtn.arm {
  background: var(--brass);
  color: var(--on-brass);
  border-color: var(--brass);
  font-weight: 700;
}
.tools {
  margin-left: auto;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}
.tbtn {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
}
.tbtn:hover {
  border-color: var(--brass);
}
.tbtn[aria-pressed='true'] {
  background: var(--brass);
  color: var(--on-brass);
  border-color: var(--brass);
  font-weight: 700;
}
.speedpill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0 0 0 10px;
}
.speedpill span {
  color: var(--muted);
}
.speedpill select {
  appearance: none;
  -webkit-appearance: none;
  background-color: transparent;
  border: 0;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 5px 24px 5px 3px;
  line-height: 1.3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23d4ad62' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 10px 6px;
}
.speedpill select option {
  background: #1f1514;
  color: #f4ecdc;
}
.menuwrap {
  position: relative;
}
#moreBtn::after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 6px;
  margin-left: 8px;
  vertical-align: middle;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23d4ad62' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat center/10px 6px;
}
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  min-width: 240px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mitem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 0.86rem;
  cursor: pointer;
  color: var(--ink);
}
.mitem:hover {
  background: rgba(255, 255, 255, 0.06);
}
.mitem[aria-pressed]::after {
  content: 'Off';
  font: 700 0.66rem var(--f-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}
.mitem[aria-pressed='true']::after {
  content: 'On';
  background: var(--good);
  color: #0d2117;
}
.mitem[data-pill]::after {
  content: attr(data-pill);
  font: 700 0.66rem var(--f-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}
.mitem[data-on='true']::after {
  background: var(--good);
  color: #0d2117;
}
.mitem[data-pill='']::after {
  display: none;
}
#bombFlash {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 34%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  text-align: center;
  opacity: 0;
}
#bombFlash b {
  display: block;
  font: 700 clamp(1.8rem, 6cqw, 3.4rem)/1 var(--f-display);
  color: var(--brass-2);
  letter-spacing: 0.04em;
  text-shadow:
    0 4px 24px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(212, 173, 98, 0.45);
}
#bombFlash span {
  display: block;
  margin-top: 6px;
  font: 500 0.78rem var(--f-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}
#bombFlash.go {
  animation: bombIn 2.6s ease-out forwards;
}
#app.paused #bombFlash.go {
  animation-play-state: paused;
}
@keyframes bombIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
  }
  12% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.06);
  }
  20% {
    transform: translate(-50%, -50%) scale(1);
  }
  78% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -58%);
  }
}
.potlbl.bomb {
  border-color: var(--brass);
  color: var(--on-brass);
  background: var(--brass);
}
.subrow {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mitem.opt::after {
  content: '';
  width: 14px;
  height: 14px;
  flex: none;
}
.mitem.opt[aria-checked='true'] {
  color: var(--brass-2);
  font-weight: 700;
}
.mitem.opt[aria-checked='true']::after {
  content: '✓';
  font-weight: 700;
  color: var(--good);
}
.mitem.back {
  justify-content: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}
.mitem.back::before {
  content: '‹';
  font-size: 1.1rem;
  line-height: 1;
}
.menu-note {
  font-size: 0.74rem;
  color: var(--muted);
  padding: 2px 10px 6px;
  margin: 0;
  max-width: 240px;
}
#bombBtn::after {
  margin-left: auto;
}
#bombBtn {
  position: relative;
}
.toolrow > .speedpill {
  margin-left: auto;
}
.toolrow .tools {
  margin-left: 0;
}
#skipBtn {
  position: absolute;
  z-index: 5;
  right: max(16px, env(safe-area-inset-right, 0px));
  top: calc(env(safe-area-inset-top, 0px) + 96px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.8rem;
  color: var(--ink);
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s;
}
#skipBtn:hover,
#skipBtn:focus-visible {
  opacity: 1;
}
#skipBtn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}
.bactions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
#peekBar {
  position: absolute;
  z-index: 7;
  left: 50%;
  top: 76px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  white-space: nowrap;
}
#peekBar button {
  padding: 9px 14px;
  font-size: 0.88rem;
}
.menu hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 4px 2px;
}

/* panels */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
#coach {
  flex: none;
  padding: 0 2px 14px 0;
}
#ask {
  flex: none;
  padding: 0 0 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
#ask .chat {
  margin-top: 8px;
}
#askForm {
  margin-top: 10px;
}
.ask-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  margin: 10px 0 4px;
}
.chat:empty {
  display: none;
}
.msg {
  padding: 8px 11px;
  border-radius: 12px;
  font-size: 0.87rem;
  white-space: pre-wrap;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.msg.me {
  align-self: flex-end;
  background: var(--brass);
  color: var(--on-brass);
  max-width: 85%;
  border-bottom-right-radius: 4px;
}
.msg.coach {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.caret {
  display: inline-block;
  width: 0.5em;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -0.18em;
  border-radius: 2px;
  background: var(--brass-2);
  animation: caretBlink 1s steps(1) infinite;
}
@keyframes caretBlink {
  50% {
    opacity: 0;
  }
}
.msg.coach.wait {
  color: var(--muted);
  font-style: italic;
}
.msg.err {
  color: var(--bad);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}
.chips button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  cursor: pointer;
  color: var(--ink);
}
.chips button:hover:not(:disabled) {
  border-color: var(--brass);
}
.chips button:disabled {
  opacity: 0.4;
  cursor: default;
}
#askForm {
  display: flex;
  gap: 6px;
}
#askInput {
  font-size: 16px;
  flex: 1;
  min-width: 0;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  color: var(--ink);
}
#askInput::placeholder {
  color: var(--muted);
}
#askForm .primary,
#askForm .ghost {
  padding: 9px 14px;
}
.ask-note {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 6px 0 0;
}
.coach-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.eyebrow {
  font: 500 0.68rem var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brass);
}
#coachToggle {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 2px 4px;
}
.track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin: 10px 0 2px;
}
.track span {
  height: 4px;
  border-radius: 2px;
  background: var(--line);
}
.track span.done {
  background: var(--brass);
}
.track span.now {
  background: var(--brass-2);
  box-shadow: 0 0 10px var(--brass);
}
.track-labels {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  font: 500 0.6rem var(--f-mono);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.track-labels span.now {
  color: var(--brass-2);
}
#stageTitle {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.35rem;
  margin: 10px 0 4px;
  text-wrap: balance;
}
#stageText {
  margin: 0;
  color: var(--ink);
  opacity: 0.9;
  font-size: 0.9rem;
}
.lastmove {
  margin-top: 12px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.85rem;
  color: var(--muted);
  min-height: 2.4em;
}
.lastmove b {
  color: var(--ink);
}
.coach-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.kv {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.86rem;
  margin: 3px 0;
}
.kv span:first-child {
  color: var(--muted);
}
.kv b {
  text-align: right;
}
.meter {
  margin: 10px 0 2px;
}
.meter-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
}
.meter-top b {
  font-family: var(--f-mono);
  color: var(--ink);
}
.bar {
  position: relative;
  height: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  overflow: visible;
  margin-top: 4px;
}
.bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 5px;
  background: var(--good);
  transition: width 0.4s;
}
.bar em {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: var(--brass-2);
  transition: left 0.4s;
}
.meter-note {
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 4px;
}
.rec {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.rec-chip {
  flex: none;
  font: 700 0.74rem var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--good);
  color: #0d2117;
}
.rec-chip.fold {
  background: var(--bad);
  color: #2a0d0a;
}
.rec-chip.check,
.rec-chip.call {
  background: var(--warn);
  color: #2a1d05;
}
.rec p {
  margin: 0;
  font-size: 0.86rem;
}
.read-label {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1rem;
}
.read-text {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 2px 0 0;
}

#log {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0 2px 0 0;
  font-size: 0.82rem;
}
#log ol {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#log li {
  line-height: 1.35;
}
#log li.hand {
  font: 700 0.7rem var(--f-mono);
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 6px;
}
#log li.sys {
  color: var(--muted);
}
#log li.chat {
  color: var(--muted);
  font-style: italic;
}
#log li.win {
  color: var(--brass-2);
}
#log li.lesson {
  color: var(--good);
}
#log b {
  font-weight: 700;
}

/* action bar */
#actionbar {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
  gap: 14px 20px;
  align-items: end;
  padding: 28px max(16px, env(safe-area-inset-right, 0px)) calc(14px + env(safe-area-inset-bottom, 0px))
    max(16px, env(safe-area-inset-left, 0px));
  background: linear-gradient(rgba(14, 8, 8, 0), var(--shade) 42%);
}
.mine {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  min-width: 0;
}
.bigcards {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}
.cg {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cg-l {
  font: 500 0.6rem var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.cg-c {
  display: flex;
  gap: 5px;
}
.cdiv {
  width: 1px;
  align-self: stretch;
  background: var(--line);
}
.pc.slot {
  background: rgba(0, 0, 0, 0.2);
  border: 1.5px dashed var(--line);
  box-shadow: none;
}
.pc {
  width: 52px;
  height: 74px;
  border-radius: 7px;
  background: var(--card);
  color: var(--black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  font-family: Georgia, serif;
  line-height: 1;
}
.pc b {
  font-size: 1.45rem;
}
.pc i {
  font-style: normal;
  font-size: 1.35rem;
}
.pc.red {
  color: var(--red);
}
.pc.back {
  background: repeating-linear-gradient(45deg, #6b1d24 0 6px, #5a1820 6px 12px);
  border: 3px solid var(--card);
}
.pc.hl {
  box-shadow:
    0 0 0 3px var(--brass-2),
    0 4px 12px rgba(0, 0, 0, 0.5);
}
.mine-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
#myHandName {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.05rem;
  text-wrap: balance;
}
.mystack {
  font-size: 0.8rem;
  color: var(--muted);
}
.mystack b {
  font-family: var(--f-mono);
  color: var(--ink);
}
.center-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
#turnStatus {
  font-size: 0.86rem;
  color: var(--muted);
  text-align: center;
  min-height: 1.3em;
}
#turnStatus b {
  color: var(--brass-2);
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.act {
  position: relative;
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  min-width: 118px;
  transition:
    transform 0.08s,
    opacity 0.2s;
}
.act:active {
  transform: translateY(1px);
}
.act:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.act.fold {
  background: #3a2522;
  color: #f3c7c1;
  border: 1px solid #6a3a34;
}
.act.call {
  background: #2e3a2c;
  color: #d9f0d0;
  border: 1px solid #4d6b48;
}
.act.raise {
  background: var(--brass);
  color: var(--on-brass);
}
.act.pick::after {
  content: 'Coach pick';
  position: absolute;
  left: 50%;
  top: -10px;
  transform: translateX(-50%);
  font: 700 0.58rem var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--good);
  color: #0d2117;
  padding: 2px 6px;
  border-radius: 999px;
  white-space: nowrap;
}
.sizer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  width: 250px;
}
.presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.presets button {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 0;
  font-size: 0.75rem;
  cursor: pointer;
}
.presets button:hover:not(:disabled) {
  border-color: var(--brass);
}
.presets button:disabled {
  opacity: 0.3;
}
#raiseRange {
  width: 100%;
  accent-color: var(--brass);
}
.sizer-note {
  font-size: 0.72rem;
  color: var(--muted);
}

/* projected seat labels */
.seat {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  will-change: transform;
  --pc: var(--brass);
}
.plate {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 5px 10px 6px;
  text-align: center;
  transition:
    box-shadow 0.25s,
    border-color 0.25s,
    opacity 0.3s;
  min-width: 112px;
}
.seat.acting .plate {
  border-color: var(--brass-2);
  box-shadow:
    0 0 0 2px rgba(240, 210, 143, 0.35),
    0 0 22px rgba(212, 173, 98, 0.5);
}
.seat.folded .plate {
  opacity: 0.45;
}
.prow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.pname {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}
.pos {
  font: 700 0.6rem var(--f-mono);
  border-radius: 999px;
  padding: 1px 5px;
  background: var(--ink);
  color: var(--room);
}
.pos.d {
  background: var(--card);
  color: var(--black);
}
.pstyle {
  font: 500 0.6rem var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pc);
}
.pmeta {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  font: 500 0.76rem var(--f-mono);
  margin-top: 2px;
}
.act-badge {
  font: 700 0.62rem var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
}
.act-badge.Fold {
  color: var(--bad);
}
.act-badge.Raise,
.act-badge.Bet,
.act-badge.All-in {
  color: var(--brass-2);
}
.act-badge.Call,
.act-badge.Check {
  color: var(--good);
}
.act-badge:empty {
  display: none;
}
.mood {
  font: 700 0.58rem var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: 999px;
}
.mood.tilt {
  background: var(--bad);
  color: #2a0d0a;
}
.mood.hot {
  background: var(--warn);
  color: #2a1d05;
}
.dots {
  display: inline-flex;
  gap: 3px;
}
.dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brass-2);
  animation: blink 1s infinite;
}
.dots i:nth-child(2) {
  animation-delay: 0.2s;
}
.dots i:nth-child(3) {
  animation-delay: 0.4s;
}
#app.paused .dots i,
#app.paused .bubble {
  animation-play-state: paused;
}
@keyframes blink {
  0%,
  100% {
    opacity: 0.2;
  }
  50% {
    opacity: 1;
  }
}
.bubble {
  background: var(--card);
  color: #251a14;
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 0.82rem;
  max-width: 200px;
  text-align: center;
  position: relative;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  animation: pop 0.25s ease-out;
}
.bubble::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom: 0;
  border-top-color: var(--card);
}
@keyframes pop {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.xray {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dashed var(--brass);
  font-size: 0.7rem;
  max-width: 180px;
  color: var(--muted);
  text-align: center;
}
.mini {
  display: inline-block;
  font:
    700 0.78rem Georgia,
    serif;
  background: var(--card);
  color: var(--black);
  border-radius: 3px;
  padding: 0 3px;
  margin: 0 1px;
}
.mini.red {
  color: var(--red);
}
.xray .thought {
  display: block;
  margin-top: 3px;
  font-style: italic;
  line-height: 1.3;
}
.betlbl {
  position: absolute;
  left: 0;
  top: 0;
  font: 700 0.74rem var(--f-mono);
  background: rgba(8, 5, 5, 0.75);
  border: 1px solid var(--line);
  padding: 1px 7px;
  border-radius: 999px;
  color: var(--brass-2);
  white-space: nowrap;
}
.potlbl {
  font-size: 0.85rem;
  padding: 3px 10px;
}

/* result banner */
#banner {
  position: absolute;
  z-index: 7;
  left: 50%;
  top: 76px;
  transform: translateX(-50%);
  width: min(440px, calc(100% - 32px));
  padding: 16px 18px;
  text-align: center;
}
#banner h2 {
  font-family: var(--f-display);
  font-size: 1.45rem;
  margin: 4px 0;
  text-wrap: balance;
}
#bSub {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}
#bList {
  list-style: none;
  padding: 0;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
#bList li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
}
.potline .who {
  min-width: 74px;
}
#bList li.potline {
  background: rgba(212, 173, 98, 0.1);
}
.potline .amt {
  font-family: var(--f-mono);
  font-weight: 700;
}
#bList li.won {
  background: rgba(212, 173, 98, 0.18);
}
#bList li .who {
  font-weight: 700;
  min-width: 46px;
}
#bList li .hn {
  margin-left: auto;
  color: var(--muted);
  text-align: right;
}
#bLesson {
  font-size: 0.85rem;
  color: var(--good);
  margin: 8px 0 12px;
}
.primary {
  background: var(--brass);
  color: var(--on-brass);
  border: 0;
  border-radius: 12px;
  padding: 11px 20px;
  font-weight: 700;
  cursor: pointer;
}
.ghost {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 18px;
  cursor: pointer;
  color: var(--ink);
}

/* modals */
.modal-wrap {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(8, 4, 4, 0.6);
  padding: 16px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px));
}
.modal {
  width: min(760px, 100%);
  max-height: 100%;
  overflow: auto;
  padding: 22px 24px;
}
.modal h1 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 2rem;
  margin: 4px 0 6px;
  text-wrap: balance;
  color: var(--brass-2);
}
.modal h3 {
  font-family: var(--f-display);
  font-size: 1.1rem;
  margin: 18px 0 8px;
}
.modal p {
  margin: 0 0 8px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.step {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.86rem;
  min-width: 0;
}
.step .eyebrow {
  display: block;
  margin-bottom: 4px;
}
.cast {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}
.cast div {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.84rem;
  min-width: 0;
}
.swatch {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 5px;
}
.cast b {
  font-family: var(--f-display);
}
.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  position: sticky;
  bottom: -22px;
  margin-bottom: -22px;
  padding: 14px 0 22px;
  background: linear-gradient(rgba(29, 19, 18, 0), #1d1312 35%);
}
.modal {
  --mpad: 24px;
}
.modal-actions {
  margin-left: calc(-1 * var(--mpad));
  margin-right: calc(-1 * var(--mpad));
  padding: 14px var(--mpad) 22px;
  border-top: 1px solid var(--line);
  background: #1d1312;
  box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.25);
}
.modal-actions .primary {
  flex: 1;
  font-size: 1.05rem;
  padding: 14px 20px;
  border-radius: 14px;
}
.modal-actions .ghost {
  padding: 14px 20px;
  border-radius: 14px;
}
.modal-x {
  position: sticky;
  top: 0;
  float: right;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: -8px -10px 0 12px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #1d1312;
  color: var(--muted);
  cursor: pointer;
  transition:
    color 0.15s,
    border-color 0.15s;
}
.modal-x:hover,
.modal-x:focus-visible {
  color: var(--brass-2);
  border-color: var(--brass);
}
.modal-x svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
#startCard .modal-x {
  position: absolute;
  top: 14px;
  right: 14px;
  margin: 0;
}
.big-hidden {
}
#startCard {
  position: absolute;
  z-index: 7;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(430px, calc(100% - 32px));
  max-height: calc(100% - 24px);
  overflow: auto;
  padding: 20px 22px;
  background: #1d1312;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
#startCard h2 {
  font-family: var(--f-display);
  font-size: 1.5rem;
  margin: -6px 0 0;
  color: var(--brass-2);
}
.setrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
}
.setrow small {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  margin-top: 1px;
}
.setrow.col {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.seg {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.seg button {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 0;
  font-size: 0.78rem;
  cursor: pointer;
  color: var(--ink);
}
.seg button[aria-pressed='true'] {
  background: var(--brass);
  color: var(--on-brass);
  border-color: var(--brass);
  font-weight: 700;
}
.switch {
  flex: none;
  width: 46px;
  height: 26px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  cursor: pointer;
  padding: 0;
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.2s;
}
.switch[aria-pressed='true'] {
  background: var(--good);
  border-color: var(--good);
}
.switch[aria-pressed='true']::after {
  transform: translateX(20px);
  background: #fff;
}
.primary.big {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1.15rem;
  padding: 16px 20px;
  margin-top: 2px;
  border-radius: 14px;
}
.primary.big svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.opps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.opp {
  display: grid;
  grid-template-columns: auto 18px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}
.opp.off .opp-name {
  opacity: 0.45;
}
.opp-n {
  font: 700 0.74rem var(--f-mono);
  color: var(--brass);
  text-align: center;
}
.opp-name b {
  font-family: var(--f-display);
  font-size: 0.95rem;
}
.opp-name small {
  display: inline;
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.72rem;
}
.opp-count {
  font-style: normal;
  font: 500 0.7rem var(--f-mono);
  color: var(--brass);
  margin-left: 6px;
}
.switch.sm {
  width: 36px;
  height: 20px;
  border-radius: 10px;
}
.switch.sm::after {
  width: 14px;
  height: 14px;
  top: 2px;
  left: 2px;
}
.switch.sm[aria-pressed='true']::after {
  transform: translateX(16px);
}
.switch:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.mv {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
}
.mv svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mv:disabled {
  opacity: 0.25;
  cursor: default;
}
.opp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mv.shuf {
  flex: none;
  opacity: 0.7;
  transition:
    opacity 0.2s,
    border-color 0.2s;
}
.mv.shuf:hover {
  opacity: 1;
  border-color: var(--brass);
}
.mv.shuf.spin svg {
  animation: shufspin 0.35s ease-out;
}
@keyframes shufspin {
  from {
    transform: rotate(-180deg) scale(0.7);
  }
  to {
    transform: none;
  }
}
#startCard {
  width: min(460px, calc(100% - 32px));
}
#startCard {
  padding: 0;
  gap: 0;
  overflow: hidden;
  max-height: min(780px, calc(100% - 24px));
}
.sc-head {
  flex: none;
  padding: 20px 22px 12px;
}
#startCard .sc-head h2 {
  margin: 6px 0 0;
  line-height: 1.15;
}
.sc-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 22px 18px;
}
.sc-foot {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 22px 14px;
  border-top: 1px solid var(--line);
  background: #1d1312;
  box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.25);
}
.sc-foot .primary.big {
  margin: 0;
}
#startCard .note {
  margin: 0;
  font-size: 0.76rem;
  color: var(--muted);
  text-align: center;
}
.games {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.game-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  background: linear-gradient(160deg, #24412f, #16271d);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  cursor: pointer;
  color: var(--ink);
  min-width: 0;
  transition:
    transform 0.15s,
    border-color 0.15s;
}
.game-card:nth-child(2) {
  background: linear-gradient(160deg, #3d1a1d, #22100f);
}
.game-card:hover {
  transform: translateY(-2px);
  border-color: var(--brass);
}
.game-card b {
  font-family: var(--f-display);
  font-size: 1.35rem;
}
.gc-d {
  font-size: 0.86rem;
  color: var(--muted);
}
.game-card em {
  font-style: normal;
  font-weight: 700;
  color: var(--brass-2);
  margin-top: auto;
}
.gc-art {
  display: flex;
  gap: 6px;
}
.gc-art span {
  width: 40px;
  height: 56px;
  border-radius: 6px;
  background: var(--card);
  color: var(--black);
  display: grid;
  place-items: center;
  font:
    700 1rem Georgia,
    serif;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}
.gc-art span:nth-child(2) {
  transform: rotate(8deg) translateY(2px);
}
.gc-art .red {
  color: var(--red);
}
.home h1 {
  font-size: 2.4rem;
}
@media (max-width: 600px) {
  .games {
    grid-template-columns: minmax(0, 1fr);
  }
}
.bar i.bad {
  background: var(--bad);
}
.act.split {
  background: transparent;
  border: 1px solid var(--brass);
  color: var(--brass-2);
}
.cg.cur .cg-l {
  color: var(--brass-2);
}
.modal.panel {
  background: #1d1312;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.modal-wrap {
  background: rgba(8, 4, 4, 0.82);
}
.ranks {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ranks li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid transparent;
}
.ranks li.you {
  border-color: var(--brass-2);
  background: rgba(212, 173, 98, 0.15);
}
.ranks .n {
  font: 700 0.8rem var(--f-mono);
  color: var(--brass);
}
.ranks .t b {
  display: block;
  font-family: var(--f-display);
}
.ranks .t span {
  font-size: 0.8rem;
  color: var(--muted);
}
.ranks .ex {
  white-space: nowrap;
}

#ranksModal .modal {
  width: min(920px, 100%);
  padding: 18px 22px;
  --mpad: 22px;
}
#ranksModal h1 {
  font-size: 1.6rem;
  margin: 2px 0 4px;
}
#ranksModal p {
  font-size: 0.86rem;
  margin: 0;
}
#ranksModal .modal-actions {
  margin-top: 12px;
}
.ranks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(5, auto);
  grid-auto-flow: column;
  gap: 6px 10px;
}
.ranks li {
  padding: 6px 10px;
  gap: 8px;
  grid-template-columns: 22px minmax(0, 1fr) auto;
}
.ranks .t span {
  font-size: 0.76rem;
  line-height: 1.3;
}
.ranks .ex .mini {
  font-size: 0.72rem;
}
@media (max-width: 700px) {
  .ranks {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-flow: row;
    gap: 4px;
  }
  .ranks li {
    padding: 5px 8px;
  }
  .ranks .t span {
    display: none;
  }
}
@media (max-width: 860px) {
  :root {
    --bar-h: 150px;
  }
  #app {
    display: block;
  }
  #stage {
    position: absolute;
    inset: 0;
    height: auto;
  }
  .brand,
  .handinfo {
    display: none;
  }
  .topbar {
    padding: calc(8px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 10px
      max(12px, env(safe-area-inset-left, 0px));
  }
  .toolrow {
    flex-wrap: nowrap;
    gap: 4px;
  }
  .tbtn {
    padding: 6px 9px;
  }
  .speedpill {
    padding: 0 0 0 4px;
  }
  .speedpill span {
    display: none;
  }
  .ic {
    display: block;
  }
  .iconify {
    padding: 7px 10px;
  }
  .iconify .tx {
    display: none;
  }
  .tbtn.arm .tx {
    display: inline;
  }
  #moreBtn::after {
    display: none;
  }
  .speedpill {
    padding: 0 0 0 10px;
    gap: 0;
  }
  .speedpill .ic {
    color: var(--brass);
  }
  .speedpill select {
    padding: 6px 22px 6px 4px;
    background-position: right 8px center;
  }
  .mobile-only {
    display: inline-block;
  }
  .tbtn.mobile-only {
    display: inline-flex;
  }
  #sideBtn::after,
  #logBtn2::after {
    display: none;
  }
  .toolrow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
  }
  .toolrow > .speedpill {
    margin: 0;
    justify-self: center;
  }
  .toolrow .tools {
    justify-self: end;
    flex-wrap: nowrap;
  }
  #skipBtn {
    top: calc(env(safe-area-inset-top, 0px) + 56px);
    right: max(12px, env(safe-area-inset-right, 0px));
    padding: 6px 10px;
  }
  #peekBar {
    top: 56px;
  }
  /* the sidebar becomes a slide-up sheet showing either the coach or the log */
  #side,
  #app.side-off.log-off #side {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: auto;
    height: 46%;
    max-height: none;
    z-index: 16;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.6);
    overflow: auto;
    padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px))
      max(16px, env(safe-area-inset-left, 0px));
    transform: translateY(105%);
    visibility: hidden;
    transition:
      transform 0.28s ease,
      visibility 0s linear 0.28s;
  }
  #side.open {
    transform: none;
    visibility: visible;
    transition: transform 0.28s ease;
  }
  #side::before {
    content: '';
    align-self: center;
    flex: none;
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: var(--line);
    margin: 2px 0 10px;
  }
  #coachpane,
  #app.side-off #coachpane {
    display: block;
    flex: none;
    overflow: visible;
    padding: 0;
  }
  #logcol,
  #app.log-off #logcol,
  #app.side-off #logcol {
    display: flex;
    flex: none;
    border-top: 0;
    padding: 0;
    background: none;
  }
  #side.sheet-coach #logcol,
  #side.sheet-log #coachpane {
    display: none;
  }
  #log {
    overflow: visible;
    flex: none;
  }
  .sheet-close {
    display: inline-block;
  }
  #actionbar {
    gap: 8px;
    padding: 10px max(12px, env(safe-area-inset-right, 0px)) calc(26px + env(safe-area-inset-bottom, 0px))
      max(12px, env(safe-area-inset-left, 0px));
  }
  #app.sheet-open #stage {
    bottom: 46%;
  }
  #app.sheet-open #actionbar {
    padding-bottom: 10px;
  }
  #app.sheet-open #banner {
    max-height: calc(100% - 56px - 130px);
  }
  .pc {
    width: 34px;
    height: 48px;
    border-radius: 5px;
  }
  .pc b {
    font-size: 0.95rem;
  }
  .pc i {
    font-size: 0.9rem;
  }
  #myHandName {
    font-size: 0.92rem;
  }
  .mine {
    flex-wrap: wrap;
    gap: 6px 10px;
  }
  .mine-info {
    gap: 1px;
  }
  .bigcards {
    gap: 8px;
  }
  .cg-c {
    gap: 4px;
  }
  .pc {
    width: 36px;
    height: 50px;
  }
  .act {
    padding: 11px 8px;
    font-size: 0.88rem;
  }
  .act.pick::after {
    top: -9px;
    font-size: 0.52rem;
  }
  .sizer-note {
    display: none;
  }
  #actionbar:not(.myturn) .sizer {
    display: none;
  }
  #turnStatus {
    font-size: 0.8rem;
    min-height: 0;
  }
  kbd {
    display: none;
  }
  .plate {
    min-width: 0;
    padding: 3px 7px;
  }
  .pstyle {
    display: none;
  }
  .pname {
    font-size: 0.82rem;
  }
  .pmeta {
    font-size: 0.68rem;
  }
  .xray {
    max-width: 130px;
    font-size: 0.62rem;
  }
  .bubble {
    max-width: 130px;
    font-size: 0.72rem;
    padding: 4px 8px;
  }
  .betlbl {
    font-size: 0.66rem;
  }
  #banner {
    top: 56px;
    bottom: auto;
    max-height: calc(100% - 56px - var(--bar-h));
    overflow: auto;
    padding: 12px 14px;
  }
  #banner h2 {
    font-size: 1.15rem;
  }
  #bList li {
    font-size: 0.76rem;
    padding: 4px 6px;
  }
  .modal {
    padding: 16px;
    --mpad: 16px;
  }
  .modal h1 {
    font-size: 1.5rem;
  }
  .modal p {
    font-size: 0.86rem;
  }
  .steps {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 10px 0;
  }
  .step {
    font-size: 0.76rem;
    padding: 8px 9px;
  }
  .cast {
    gap: 6px;
  }
  .cast div {
    font-size: 0.76rem;
  }
  .modal-actions {
    bottom: -16px;
    margin-bottom: -16px;
    padding: 12px var(--mpad) 16px;
  }
  .modal-actions .primary {
    flex: 1;
  }
  .sc-head {
    padding: 16px 16px 10px;
  }
  .sc-body {
    gap: 10px;
    padding: 2px 16px 14px;
  }
  .sc-foot {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  }
  #startCard h2 {
    font-size: 1.3rem;
  }
  #startCard .seg button {
    padding: 7px 0;
  }
  .opps {
    gap: 3px;
  }
  .opp {
    padding: 4px 8px;
  }
  .mv {
    width: 26px;
    height: 26px;
  }
  #startCard .primary.big {
    padding: 13px 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dots i,
  .bubble {
    animation: none;
  }
  #bombFlash.go {
    animation-duration: 0.01s;
  }
}

/* practice-only notice + about */
.linkbtn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--brass-2);
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}
.modal p.muted {
  font-size: 0.84rem;
  color: var(--muted);
}
.modal p.muted a {
  color: var(--brass-2);
}
#aboutModal,
#acctModal {
  z-index: 50;
}

/* desktop: title and hand info stack on the left, buttons share the same row */
.brandlock {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: none;
}
.brandlock .handinfo {
  font-size: 0.68rem;
}
@container (min-width: 760px) {
  .topbar {
    flex-wrap: nowrap;
    gap: 20px;
  }
  .topbar .toolrow {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
  }
}
@media (max-width: 860px) {
  .brandlock {
    display: none;
  }
}
@container (min-width: 760px) and (max-width: 1099px) {
  #homeBtn .tx,
  #newBtn .tx,
  #pauseBtn .tx,
  .speedpill > span {
    display: none;
  }
  #newBtn.arm .tx {
    display: inline;
  }
}

/* homepage */
.landing {
  position: fixed;
  inset: 0;
  z-index: 40;
  overflow-y: auto;
  -webkit-user-select: text;
  user-select: text;
  background:
    radial-gradient(1000px 520px at 50% -12%, rgba(212, 173, 98, 0.16), transparent 65%),
    radial-gradient(800px 600px at 105% 105%, rgba(36, 65, 47, 0.38), transparent 60%),
    radial-gradient(700px 500px at -10% 100%, rgba(107, 29, 36, 0.28), transparent 60%), var(--room);
  padding: 0 max(24px, env(safe-area-inset-right)) env(safe-area-inset-bottom)
    max(24px, env(safe-area-inset-left));
}
.landing > * {
  max-width: 1120px;
  margin-inline: auto;
}
.l-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: calc(18px + env(safe-area-inset-top)) 0 0;
}
.l-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 1.3rem var(--f-display);
  color: var(--brass-2);
}
.l-chip {
  width: 26px;
  height: 26px;
}
.l-tag {
  font: italic 500 0.95rem var(--f-display);
  color: var(--muted);
  padding-left: 16px;
  border-left: 1px solid var(--line);
}
.l-about {
  margin-left: auto;
  font-size: 0.9rem;
}

.l-hero {
  padding: clamp(32px, 7vh, 72px) 0;
  text-align: center;
}
.l-hero h1 {
  font: 700 clamp(2.2rem, 4.6vw, 3.6rem) / 1.06 var(--f-display);
  color: var(--ink);
  margin: 0 auto 0.2em;
  max-width: 21ch;
  text-wrap: balance;
}
.l-hero h1 em {
  font-style: italic;
  color: var(--brass-2);
}
.l-lede {
  font-size: 1.08rem;
  color: var(--muted);
  margin: 0 auto;
  max-width: 56ch;
}

.l-games {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 40px;
}
.tile {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink);
  overflow: hidden;
  font: inherit;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}
button.tile {
  cursor: pointer;
}
button.tile:hover,
button.tile:focus-visible {
  transform: translateY(-4px);
  border-color: var(--brass);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(240, 210, 143, 0.2);
}
.t-art {
  position: relative;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: inset 0 -30px 40px rgba(0, 0, 0, 0.25);
}
.t-poker .t-art {
  background: radial-gradient(ellipse at 50% 40%, #2f6b47, #163322 75%);
}
.t-bj .t-art {
  background: radial-gradient(ellipse at 50% 40%, #6e2530, #2a0f12 75%);
}
.t-roulette .t-art {
  background: radial-gradient(ellipse at 50% 40%, #2a4a3a, #121e18 75%);
}
.t-craps .t-art {
  background: radial-gradient(ellipse at 50% 40%, #24405a, #0f1a26 75%);
}
.t-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px 18px;
  flex: 1;
}
.t-body b {
  font: 700 1.3rem var(--f-display);
}
.t-body span {
  font-size: 0.88rem;
  color: var(--muted);
}
.t-body em {
  margin-top: auto;
  padding-top: 8px;
  font: 700 0.72rem var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass-2);
}
button.tile .t-body em::after {
  content: ' →';
  transition: margin 0.2s;
}
button.tile:hover .t-body em::after {
  margin-left: 4px;
}
.tile.soon {
  opacity: 0.55;
}
.tile.soon .t-body em {
  color: var(--muted);
}

/* tile art */
.mc {
  width: 54px;
  height: 76px;
  padding: 6px 7px;
  border-radius: 7px;
  background: var(--card);
  color: var(--black);
  display: flex;
  flex-direction: column;
  font:
    700 1.15rem/1 Georgia,
    serif;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}
.mc i {
  font-style: normal;
  font-size: 1rem;
}
.mc.red {
  color: var(--red);
}
.mc:first-child {
  transform: rotate(-9deg) translateY(4px);
}
.mc:nth-child(2) {
  transform: rotate(7deg);
}
button.tile:hover .mc:first-child {
  transform: rotate(-14deg) translate(-4px, 4px);
}
button.tile:hover .mc:nth-child(2) {
  transform: rotate(12deg) translateX(4px);
}
.mc {
  transition: transform 0.3s ease;
}
.chips {
  position: absolute;
  right: 22%;
  bottom: 22px;
  display: flex;
  flex-direction: column-reverse;
}
.chips i {
  width: 30px;
  height: 9px;
  margin-top: -3px;
  border-radius: 50%;
  background: repeating-linear-gradient(90deg, #c22a2f 0 5px, #fbf8f1 5px 8px);
  box-shadow: 0 2px 0 #7a1a1e;
}
.t21 {
  position: absolute;
  right: 20%;
  bottom: 20px;
  font: 700 0.8rem var(--f-mono);
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--brass);
  color: var(--on-brass);
}
.wheel {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #3a2a1c 0 22%, var(--brass) 23% 26%, transparent 27%),
    radial-gradient(circle, transparent 0 62%, #2a1a10 63%),
    repeating-conic-gradient(#b3262c 0 9.73deg, #1b1b22 9.73deg 19.46deg);
  box-shadow:
    0 0 0 5px #4a3020,
    0 10px 24px rgba(0, 0, 0, 0.5);
}
.die {
  font-size: 3.4rem;
  line-height: 1;
  color: var(--card);
  text-shadow: 0 6px 14px rgba(0, 0, 0, 0.5);
}
.die + .die {
  transform: rotate(14deg) translateY(6px);
}

.l-section {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.l-feats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.l-feats div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}
.l-feats b {
  font: 700 1.05rem var(--f-display);
}
.l-feats span {
  font-size: 0.88rem;
  color: var(--muted);
}
.l-foot {
  border-top: 1px solid var(--line);
  padding: 24px 0 40px;
  font-size: 0.84rem;
  color: var(--muted);
}
.l-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
}
.l-foot p {
  margin: 0;
}
.l-foot a {
  color: var(--brass-2);
}
.l-links {
  display: flex;
  flex: none;
  gap: 18px;
}
@media (max-width: 600px) {
  .l-foot {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 960px) {
  .l-games {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .l-feats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .l-tag {
    display: none;
  }
  .l-hero {
    padding: 22px 0 18px;
  }
  .l-hero h1 {
    font-size: 1.95rem;
  }
  .l-lede {
    font-size: 0.95rem;
  }
  .l-games {
    gap: 10px;
    padding-bottom: 28px;
  }
  .t-art {
    height: 96px;
  }
  .mc {
    width: 38px;
    height: 54px;
    padding: 4px 5px;
    font-size: 0.85rem;
  }
  .mc i {
    font-size: 0.75rem;
  }
  .wheel {
    width: 68px;
    height: 68px;
  }
  .die {
    font-size: 2.3rem;
  }
  .chips,
  .t21 {
    display: none;
  }
  .t-body {
    padding: 10px 12px 12px;
    gap: 3px;
  }
  .t-body b {
    font-size: 1.05rem;
  }
  .t-body span {
    font-size: 0.76rem;
  }
  .l-feats {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* table games: betting board */
#tgBoard {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: calc(var(--ab-h, var(--bar-h)) + 6px);
  transform: translateX(-50%);
  width: min(880px, calc(100% - 24px));
  max-height: calc(100% - var(--ab-h, var(--bar-h)) - 84px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 12px 14px 10px;
  background: rgba(29, 19, 18, 0.95);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}
.tgb-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}
#tgbTotal {
  font: 700 0.8rem var(--f-mono);
  color: var(--brass-2);
}
.tgb-note {
  margin: 10px 0 0;
  font-size: 0.74rem;
  color: var(--muted);
}
.spot {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  font: 700 0.9rem var(--f-body);
  cursor: pointer;
  transition:
    border-color 0.15s,
    transform 0.1s;
}
.spot small {
  font: 500 0.64rem var(--f-mono);
  color: var(--muted);
  text-align: center;
}
.spot:hover:not(:disabled) {
  border-color: var(--brass);
}
.spot:active:not(:disabled) {
  transform: scale(0.97);
}
.spot:disabled {
  opacity: 0.35;
  cursor: default;
}
.spot.r,
.spot.red {
  background: #8e1f25;
}
.spot.b,
.spot.black {
  background: #1b1b22;
}
.spot.g {
  background: #1f6b44;
}
.spot.has::after {
  content: attr(data-amt);
  position: absolute;
  z-index: 1;
  top: -8px;
  right: -6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--brass-2);
  color: var(--on-brass);
  font: 700 0.64rem var(--f-mono);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.spot.locked::after {
  background: var(--muted);
}
.spot.pick {
  box-shadow: inset 0 0 0 2px var(--good);
}
.spot.o.pick::before {
  content: 'Coach pick';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--good);
  color: #0d1f14;
  font: 700 0.56rem var(--f-mono);
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
}

.tgb-roulette {
  display: grid;
  grid-template-columns: 46px repeat(12, minmax(0, 1fr)) 58px;
  grid-template-rows: repeat(3, 38px) 34px 34px;
  gap: 4px;
}
.rl-zero {
  grid-column: 1;
  grid-row: 1 / 4;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rl-zero .spot {
  flex: 1;
}
.tgb-roulette .spot[style*='--r'] {
  grid-column: calc(var(--r) + 1);
  grid-row: calc(4 - var(--c));
}
.tgb-roulette .col {
  grid-column: 14;
  grid-row: calc(4 - var(--c));
  font-size: 0.7rem;
}
.tgb-roulette .doz {
  grid-row: 4;
  grid-column: calc(var(--k) * 4 - 2) / span 4;
  font-size: 0.8rem;
}
.tgb-roulette .even-money {
  grid-row: 5;
  grid-column: calc(var(--k) * 2) / span 2;
  font-size: 0.8rem;
}
.tgb-roulette .top {
  grid-column: 1;
  grid-row: 4 / 6;
  font-size: 0.66rem;
  line-height: 1.1;
}
.tgb-roulette .top small {
  font-size: 0.52rem;
}
.tgb-craps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.cr-grp {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.cr-grp.cr-line {
  flex: 5 1 420px;
}
.cr-grp:not(.cr-line):not(.cr-mid) {
  flex: 1 1 80px;
}
.cr-grp.cr-mid {
  flex: 3 1 240px;
}
.cr-l {
  font: 500 0.58rem var(--f-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.cr-mid .cr-l {
  color: #e2665b;
}
.cr-line .cr-l {
  color: var(--good);
}
.cr-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 6px;
}
.cr-row .spot {
  min-height: 46px;
  font-size: 0.82rem;
}
.cr-line .spot {
  background: rgba(240, 210, 143, 0.07);
}
.cr-mid .spot {
  background: rgba(226, 102, 91, 0.09);
}
.tgb-baccarat {
  display: grid;
  grid-template-columns: 1fr 0.75fr 1fr;
  gap: 10px;
}
.tgb-baccarat .spot {
  min-height: 78px;
  font-size: 1.1rem;
}
.bc-p {
  background: rgba(80, 120, 210, 0.16) !important;
}
.bc-b {
  background: rgba(200, 60, 60, 0.16) !important;
}

/* table games: chips, bets and results in the bar */
.tgchips-pick {
  gap: 8px;
}
.tgchips-pick button {
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  border: 3px dashed rgba(244, 239, 228, 0.75);
  color: #fff;
  font: 700 0.72rem var(--f-mono);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}
.tgchips-pick .c5 {
  background: #b83228;
}
.tgchips-pick .c25 {
  background: #2e8b57;
}
.tgchips-pick .c100 {
  background: #24242b;
}
.tgchips-pick .c500 {
  background: #6c3fa0;
}
.tgchips-pick button[aria-pressed='true'] {
  outline: 3px solid var(--brass-2);
  outline-offset: 2px;
  transform: translateY(-3px);
}
.tgchips-pick button:hover:not(:disabled) {
  background-image: linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12));
}
.tgchips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 340px;
}
.betchip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  white-space: nowrap;
}
.betchip b {
  color: var(--brass-2);
  font-family: var(--f-mono);
}
.betchip.none {
  color: var(--muted);
}
.rl-ball {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 4px;
  border-radius: 999px;
  font: 700 0.78rem var(--f-mono);
  color: #fff;
  background: #1b1b22;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.rl-ball.red {
  background: #b8262b;
}
.rl-ball.green {
  background: #1f7a4a;
}
.cr-dice {
  font-size: 1.9rem;
  line-height: 1;
  letter-spacing: 2px;
}

/* eight games on the homepage */
.t-bacc .t-art {
  background: radial-gradient(ellipse at 50% 40%, #5a2232, #220c12 75%);
}
.t-slots .t-art {
  background: radial-gradient(ellipse at 50% 40%, #6a4a12, #241806 75%);
}
.reel {
  display: grid;
  place-items: center;
  width: 38px;
  height: 52px;
  border-radius: 6px;
  background: var(--card);
  color: var(--red);
  font:
    700 1.8rem Georgia,
    serif;
  box-shadow:
    inset 0 -10px 12px rgba(0, 0, 0, 0.18),
    0 6px 14px rgba(0, 0, 0, 0.45);
}
.l-games .t-art {
  height: clamp(64px, 12vh, 112px);
}
.l-games .t-body {
  padding: 12px 16px 14px;
  gap: 4px;
}
.l-games .t-body b {
  font-size: 1.15rem;
}
.l-games .t-body span {
  font-size: 0.82rem;
}
.l-games .mc {
  width: 46px;
  height: 64px;
}
.l-games .wheel {
  width: min(84px, 9vh);
  height: min(84px, 9vh);
}
.l-games .die {
  font-size: 2.8rem;
}

@media (max-width: 600px) {
  #tgBoard {
    width: calc(100% - 16px);
    padding: 10px;
  }
  .tgb-roulette {
    grid-template-columns: repeat(3, minmax(0, 1fr)) 54px 54px;
    grid-template-rows: 34px repeat(12, 28px) 30px;
  }
  .rl-zero {
    grid-column: 1 / 4;
    grid-row: 1;
    flex-direction: row;
  }
  .tgb-roulette .spot[style*='--r'] {
    grid-column: var(--c);
    grid-row: calc(var(--r) + 1);
  }
  .tgb-roulette .col {
    grid-column: var(--c);
    grid-row: 14;
  }
  .tgb-roulette .doz {
    grid-column: 4;
    grid-row: calc(var(--k) * 4 - 2) / span 4;
    writing-mode: vertical-rl;
  }
  .tgb-roulette .even-money {
    grid-column: 5;
    grid-row: calc(var(--k) * 2) / span 2;
  }
  .tgb-roulette .top {
    grid-column: 4 / 6;
    grid-row: 1;
  }
  .tgb-baccarat .spot {
    min-height: 64px;
    font-size: 1rem;
  }
  .cr-row .spot {
    min-height: 50px;
    font-size: 0.82rem;
  }
  .tgchips-pick button {
    width: 40px;
    height: 40px;
  }
  .tgchips {
    max-width: 210px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .l-games .t-art {
    height: 52px;
  }
  .l-games .t-body {
    padding: 8px 12px 10px;
  }
  .l-games .t-body em {
    padding-top: 4px;
  }
  .spot.o.pick::before {
    display: none;
  }
  .l-games .mc {
    width: 30px;
    height: 42px;
    padding: 3px 4px;
    font-size: 0.72rem;
  }
  .l-games .wheel {
    width: 38px;
    height: 38px;
  }
  .l-games .die {
    font-size: 1.9rem;
  }
  .l-games .t-body span {
    font-size: 0.72rem;
  }
}

@media (min-width: 601px) and (max-height: 820px) {
  .l-hero {
    padding: 5vh 0;
  }
  .l-hero h1 {
    font-size: clamp(2rem, 7vh, 3.6rem);
  }
  .l-games .t-body span {
    font-size: 0.8rem;
  }
}
.sl-sym {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 4px;
  border-radius: 6px;
  background: var(--card);
  color: var(--red);
  font:
    700 0.95rem Georgia,
    serif;
}
@media (max-width: 600px) {
  .reel {
    width: 26px;
    height: 36px;
    font-size: 1.2rem;
  }
}

.modal .intro-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.86rem;
}
#app:has(#banner:not([hidden])) #labels {
  opacity: 0.2;
  transition: opacity 0.2s;
}
#tgBoard .tgb-note {
  margin-top: 12px;
}
.cr-row .spot {
  min-height: 46px;
}
.tgb-baccarat .spot {
  min-height: 64px;
}
@media (min-width: 601px) {
  .tgb-roulette {
    grid-template-rows: repeat(3, 34px) 30px 30px;
  }
}
@media (max-width: 860px) {
  #actionbar {
    background: linear-gradient(rgba(14, 8, 8, 0), rgba(14, 8, 8, 0.88) 18%, var(--shade) 40%);
  }
}

/* ===== More card games: compact tiles under the big six ===== */
.l-more {
  padding: 8px 0 36px;
}
.l-mini {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.mini-tile {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}
.mini-tile:hover,
.mini-tile:focus-visible {
  transform: translateY(-3px);
  border-color: var(--brass);
}
.mini-tile b {
  padding: 8px 10px 9px;
  font: 700 0.86rem/1.2 var(--f-display);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m-art {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: radial-gradient(ellipse at 50% 30%, var(--m1, #2f6b47), var(--m2, #163322) 80%);
}
.m-art i {
  width: 22px;
  height: 30px;
  border-radius: 4px;
  background: var(--card);
  color: var(--black);
  display: grid;
  place-items: center;
  font:
    700 0.78rem/1 Georgia,
    serif;
  font-style: normal;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}
.m-art i.r {
  color: var(--red);
}
.m-art i:first-child {
  transform: rotate(-8deg) translateY(2px);
}
.m-art i:last-child:not(:first-child) {
  transform: rotate(8deg) translateY(2px);
}
@media (max-width: 960px) {
  .l-mini {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .l-mini {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .mini-tile b {
    font-size: 0.78rem;
    padding: 7px 8px 8px;
    white-space: normal;
    line-height: 1.15;
  }
  .m-art {
    height: 40px;
  }
}
/* heads-up card games: on narrow screens the cards need the bar, and your bets show in the line below */
@container (max-width: 640px) {
  #myCards.hand .cg.bets,
  #myCards.hand .cg.bets + .cdiv {
    display: none;
  }
}

/* ===== Card games for points: your hand under the table ===== */
#actionbar.cgmode .sizer {
  display: none;
}
#actionbar.cgmode .mine {
  grid-column: 1 / -1;
  justify-content: center;
  flex-wrap: wrap;
  row-gap: 8px;
}
/* your hand gets a label like the other sections */
#myCards.cg-hand {
  position: relative;
}
#myCards.cg-hand::before {
  content: 'Your hand';
  position: absolute;
  left: 0;
  top: 0;
  font: 500 0.6rem var(--f-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
/* the coach tag sits under the card, out of the way of the label */
#myCards.cg-hand .pc.pick::after {
  top: auto !important;
  bottom: -9px;
}
.cg-side {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.cg-side[hidden] {
  display: none;
}
.side-badge {
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 0.9rem;
  min-height: 50px;
}
.side-badge .sym {
  font-size: 1.6rem;
  line-height: 1;
}
.side-badge .sym.red {
  color: var(--red);
}
.side-badge small {
  color: var(--muted);
  font-size: 0.72rem;
}
.side-trick .tk {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.side-trick .tk i {
  font: 600 0.58rem var(--f-mono);
  font-style: normal;
  white-space: nowrap;
}
.side-trick .tk.win .pc {
  box-shadow:
    0 0 0 3px var(--brass-2),
    0 4px 10px rgba(0, 0, 0, 0.5);
}
#myCards.cg-hand {
  --cw: 52px;
  display: flex;
  gap: 0;
  padding-top: 18px;
}
#myCards.cg-hand .pc {
  flex: none;
  width: var(--cw);
  height: calc(var(--cw) * 1.42);
  margin-left: calc(var(--step, 58px) - var(--cw));
  padding: 4px 0 0 5px;
  border: 0;
  justify-content: flex-start;
  align-items: flex-start;
  font: inherit;
  font-family: Georgia, serif;
  cursor: default;
  position: relative;
  transition:
    transform 0.15s ease,
    filter 0.15s ease;
}
#myCards.cg-hand .pc:first-child {
  margin-left: 0;
}
#myCards.cg-hand .pc b {
  font-size: 1.15rem;
}
#myCards.cg-hand .pc i {
  font-size: 1.05rem;
}
#myCards.cg-hand .pc.legal {
  cursor: pointer;
}
/* lift on hover only with a real mouse: on phones a tapped card would otherwise stay raised */
@media (hover: hover) {
  #myCards.cg-hand .pc.legal:hover {
    transform: translateY(-8px);
  }
}
#myCards.cg-hand .pc.legal:focus-visible {
  transform: translateY(-8px);
}
#myCards.cg-hand .pc.dim {
  filter: brightness(0.5) saturate(0.6);
}
#myCards.cg-hand .pc.sel {
  transform: translateY(-14px);
  box-shadow:
    0 0 0 2px var(--brass),
    0 8px 16px rgba(0, 0, 0, 0.5);
}
#myCards.cg-hand .pc.pick::after {
  content: 'Coach';
  position: absolute;
  left: 50%;
  top: -17px;
  transform: translateX(-50%);
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--good, #5fbf8a);
  color: #0c1a12;
  font: 700 0.56rem var(--f-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}
#myCards.cg-hand .pc.pick {
  box-shadow:
    0 0 0 2px var(--good, #5fbf8a),
    0 4px 12px rgba(0, 0, 0, 0.5);
}
.cn {
  font-weight: 700;
}
.cn.red {
  color: var(--red);
}
@container (max-width: 640px) {
  #myCards.cg-hand {
    --cw: 40px;
  }
  #myCards.cg-hand .pc b {
    font-size: 0.92rem;
  }
  #myCards.cg-hand .pc i {
    font-size: 0.85rem;
  }
}
/* overlapping cards leave no room for a label: a dot marks the coach pick on the visible strip */
#myCards.cg-hand.tight .pc.pick::after {
  content: '';
  top: -9px;
  left: calc(min(var(--step), var(--cw)) / 2);
  width: 8px;
  height: 8px;
  padding: 0;
}
@container (max-width: 640px) {
  #myCards.cg-hand .pc.pick::after {
    font-size: 0.5rem;
  }
}
/* video poker: tap cards to hold */
.vp-hand .pc {
  position: relative;
  border: 0;
  padding: 0;
  font: inherit;
  font-family: Georgia, serif;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.vp-hand .pc:disabled {
  cursor: default;
}
.vp-hand .pc.held {
  box-shadow:
    0 0 0 3px var(--brass),
    0 4px 12px rgba(0, 0, 0, 0.5);
}
.vp-hand .pc.held::before {
  content: 'Held';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1px 0;
  border-radius: 0 0 6px 6px;
  text-align: center;
  font: 700 0.52rem var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--brass);
  color: var(--on-brass);
}
.vp-hand .pc.pick:not(.held) {
  box-shadow:
    0 0 0 2px var(--good),
    0 4px 12px rgba(0, 0, 0, 0.5);
}
.cg-c.minis {
  align-items: center;
  flex-wrap: wrap;
  max-width: 170px;
  color: var(--muted);
  font-size: 0.8rem;
}
#myCards.cg-hand .pc.meld::before {
  content: '';
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  height: 3px;
  border-radius: 2px;
  background: var(--brass);
}
.pegbar {
  display: inline-block;
  width: 90px;
  height: 6px;
  margin-right: 8px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  vertical-align: middle;
}
.pegbar i {
  display: block;
  height: 100%;
  background: var(--brass);
}
/* bridge bidding: more choices than fit one row */
#stage #actionbar #tgDecide.bidbox {
  flex-wrap: wrap;
  justify-content: center;
}
#tgDecide.bidbox .act {
  flex: 1 1 0;
  min-width: 58px;
  max-width: 120px;
}
#tgDecide .act {
  white-space: nowrap;
}
@container (max-width: 640px) {
  #stage #actionbar #tgDecide .act {
    padding-inline: 4px;
    font-size: 0.8rem;
  }
}

/* ===== Solitaire board ===== */
#solBoard {
  position: absolute;
  z-index: 4;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 14px;
  background: radial-gradient(ellipse at 50% 30%, rgba(47, 106, 74, 0.94), rgba(16, 42, 26, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(240, 210, 143, 0.18),
    0 20px 50px rgba(0, 0, 0, 0.5);
}
#solBoard .sc,
#solBoard .sslot {
  position: absolute;
  padding: 0;
  border: 0;
  border-radius: calc(var(--cw) * 0.1);
  font: inherit;
}
#solBoard .sc {
  background: var(--card);
  color: var(--black);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}
#solBoard .sc.red {
  color: var(--red);
}
#solBoard .sc span {
  position: absolute;
  left: 4px;
  top: 2px;
  font:
    700 calc(var(--cw) * 0.27) / 1 Georgia,
    serif;
  letter-spacing: -0.02em;
}
#solBoard .sc i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12%;
  text-align: center;
  font-style: normal;
  font-size: calc(var(--cw) * 0.5);
  line-height: 1;
}
#solBoard .sc.back {
  background: repeating-linear-gradient(45deg, #6b1d24 0 5px, #5a1820 5px 10px);
  border: 2px solid var(--card);
  cursor: default;
}
#solBoard .sc.back.stock {
  cursor: pointer;
  display: grid;
  place-items: center;
}
#solBoard .sc.back.stock b {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: var(--card);
  font: 700 0.7rem var(--f-mono);
}
#solBoard .sslot {
  background: rgba(0, 0, 0, 0.16);
  border: 1.5px dashed rgba(240, 210, 143, 0.4);
  color: rgba(240, 210, 143, 0.55);
  font:
    700 calc(var(--cw) * 0.36) Georgia,
    serif;
  cursor: pointer;
}
#solBoard .sslot .red {
  color: rgba(226, 102, 91, 0.7);
}
#solBoard .pick {
  box-shadow:
    0 0 0 3px var(--good),
    0 4px 10px rgba(0, 0, 0, 0.5);
}
#solBoard .nope {
  animation: solNope 0.3s ease;
}
@keyframes solNope {
  25% {
    transform: translateX(-3px);
  }
  75% {
    transform: translateX(3px);
  }
}
/* stud: your face-down cards get a darker edge, so you can tell what the table cannot see */
.pc.down {
  box-shadow:
    inset 0 0 0 2px rgba(107, 29, 36, 0.55),
    0 4px 12px rgba(0, 0, 0, 0.5);
  opacity: 0.88;
}
.l-more .l-sub {
  margin-top: 22px;
}

/* ===== Coach pick on chip buttons ===== */
.presets button.pick {
  box-shadow: 0 0 0 2px var(--good);
  position: relative;
}

/* ===== Account ===== */
.l-acct {
  margin-left: auto;
  font-size: 0.86rem;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--brass);
  background: none;
  color: var(--brass-2);
  cursor: pointer;
}
.l-acct.on {
  background: var(--brass);
  color: var(--on-brass);
}
.modal.acct {
  max-width: 440px;
}
.modal.acct form {
  display: grid;
  gap: 12px;
}
.modal.acct label {
  display: grid;
  gap: 6px;
  font-size: 0.84rem;
  color: var(--muted);
}
.modal.acct input {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
}
.modal.acct input:focus {
  outline: 2px solid var(--brass);
  outline-offset: 1px;
}
.acct-lede {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}
.acct-msg {
  min-height: 1.2em;
  margin: 0;
  font-size: 0.85rem;
  color: var(--good);
}
.acct-msg.err {
  color: var(--red);
}
.acct-alt {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  font-size: 0.84rem;
}
.acct-alt[hidden] {
  display: none;
}
.acct-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  max-height: 220px;
  overflow: auto;
}
.acct-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}
.acct-list li b {
  font-family: var(--f-mono);
}
.acct-list li.none {
  color: var(--muted);
  border: 0;
}

/* betting boards: compact and docked above your buttons, so the table stays in view */
#tgBoard {
  padding: 10px 12px 8px;
  background: rgba(24, 15, 14, 0.92);
}
#tgBoard .tgb-head {
  margin-bottom: 8px;
}
#tgBoard .tgb-note {
  margin-top: 8px;
  font-size: 0.7rem;
}
@media (max-width: 600px) {
  .tgb-craps {
    gap: 6px 10px;
  }
  .cr-grp.cr-line {
    flex-basis: 100%;
  }
  .cr-grp.cr-mid {
    flex: 3 1 200px;
  }
  .cr-grp:not(.cr-line):not(.cr-mid) {
    flex: 1 1 60px;
  }
  .cr-row {
    gap: 4px;
  }
  .cr-row .spot {
    min-height: 40px;
    padding: 4px 2px;
    font-size: 0.7rem;
    line-height: 1.15;
  }
  .cr-row .spot small {
    font-size: 0.52rem;
  }
  #tgBoard .tgb-note {
    display: none;
  }
}
/* the casino card tables: one or two bets, side by side and the same size */
.tgb-threecard,
.tgb-uth,
.tgb-letitride,
.tgb-war,
.tgb-paigow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.tgb-threecard .spot,
.tgb-uth .spot,
.tgb-letitride .spot,
.tgb-war .spot,
.tgb-paigow .spot {
  min-height: 54px;
  padding: 6px 8px;
}
@container (max-width: 640px) {
  #myCards.cg-hand {
    padding-top: 22px;
  }
  #myCards.cg-hand .pc.sel {
    transform: translateY(-9px);
  }
  .cg-side {
    gap: 8px;
  }
  .side-badge {
    min-height: 0;
    font-size: 0.82rem;
  }
  .side-badge .sym {
    font-size: 1.25rem;
  }
  .side-trick .pc {
    width: 32px;
    height: 44px;
  }
}
/* with Coach pick off, the board looks like a real table: payouts only, no house edge or coaching groups */
#app.no-hints .spot .edge,
#app.no-hints .cr-l {
  display: none;
}
#app.no-hints .cr-grp {
  gap: 0;
}
