/* Phone controller. Mobile-first, thumb-friendly, high contrast. */
:root {
  --felt: #0f5a3e;
  --felt-dark: #0a3d2b;
  --gold: #ffd76a;
  --red: #d23b3b;
  --text: #f5f5f5;
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  height: 100%;
}
body {
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  background: var(--felt-dark);
  color: var(--text);
  overscroll-behavior: none;
}
main {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
h1 {
  font-size: 28px;
  margin: 24px 0 8px;
  text-align: center;
  letter-spacing: 0.05em;
}
h1 span {
  color: var(--gold);
}
.panel {
  background: #0006;
  border-radius: 16px;
  padding: 16px;
}
label {
  display: block;
  font-size: 14px;
  opacity: 0.8;
  margin: 8px 0 4px;
}
input[type='text'] {
  width: 100%;
  font-size: 22px;
  padding: 14px;
  border-radius: 12px;
  border: 2px solid #fff3;
  background: #fff;
  color: #111;
}
input.code {
  text-transform: uppercase;
  letter-spacing: 0.4em;
  text-align: center;
  font-weight: 700;
}
button {
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  padding: 14px 18px;
  border-radius: 14px;
  border: none;
  background: var(--gold);
  color: #222;
  min-height: 52px;
  cursor: pointer;
}
button:active {
  transform: scale(0.97);
}
button:disabled {
  opacity: 0.35;
}
button.ghost {
  background: #ffffff1f;
  color: var(--text);
}
button.danger {
  background: var(--red);
  color: #fff;
}
button.wide {
  width: 100%;
}
.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.row > button {
  flex: 1;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  opacity: 0.9;
}
.top b {
  color: var(--gold);
  letter-spacing: 0.15em;
}
.error {
  color: #ff9d9d;
  min-height: 1.2em;
  text-align: center;
}
.muted {
  opacity: 0.65;
}
.center {
  text-align: center;
}
/* Seat picker: seats around an oval table. */
.picker {
  position: relative;
  width: 100%;
  aspect-ratio: 1.3;
  margin: 8px 0;
}
.picker .oval {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: var(--felt);
  box-shadow: inset 0 0 20px #0008;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0.9;
}
.picker .seatbtn {
  position: absolute;
  transform: translate(-50%, -50%);
  min-width: 64px;
  min-height: 44px;
  padding: 6px 8px;
  font-size: 14px;
  border-radius: 12px;
}
.picker .seatbtn.taken {
  background: #ffffff26;
  color: var(--text);
}
/* Table info (#59): pinned banner, board slots, pot, recent actions. */
.top {
  gap: 10px;
}
.top > span:first-child {
  flex: 1;
}
.conn::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #ff9d4a;
}
.conn.live::before {
  background: #3ee07a;
  box-shadow: 0 0 6px #3ee07a;
}
button.small {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 14px;
}
.menu {
  display: flex;
  gap: 8px;
}
.menu > button {
  flex: 1;
}
.banner {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 14px;
  background: #000a;
  font-weight: 600;
}
.banner.turn {
  background: linear-gradient(90deg, var(--gold), #ffbf3a);
  color: #2a1e00;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: 0 0 24px #ffd76a66;
}
.banner span {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.board {
  display: flex;
  justify-content: center;
  gap: 6px;
}
.bc {
  width: 46px;
  height: 64px;
  border-radius: 7px;
  background: #fff;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 800;
  font-size: 19px;
  line-height: 1.1;
}
.bc.red {
  color: #c81e1e;
}
.bc.empty {
  background: #0003;
  border: 1.5px dashed #fff3;
}
.pot {
  text-align: center;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}
.pot b {
  display: block;
  font-size: 26px;
}
.recent {
  text-align: center;
  font-weight: 600;
  color: var(--gold);
  min-height: 1.2em;
}
.result {
  padding: 8px 14px;
  border-radius: 14px;
  background: #0f2e22;
  border: 1px solid #3ee07a55;
}
.result .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.65;
}
.result .win {
  color: #3ee07a;
}
.result .loss {
  color: #ff7b7b;
}
.status {
  text-align: center;
  font-size: 18px;
}
.spacer {
  flex: 1;
}
/* Your cards, just above the tray. */
.cards {
  display: flex;
  justify-content: center;
  gap: 14px;
}
.card {
  width: 104px;
  height: 146px;
  border-radius: 14px;
  background: #fff;
  color: #111;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 8px 22px #0008;
  user-select: none;
}
.card .r {
  font-size: 56px;
  line-height: 1;
}
.card .s {
  font-size: 42px;
  line-height: 1;
}
.card.red {
  color: #c81e1e;
}
.card.back {
  background: repeating-linear-gradient(45deg, #8b1e3f, #8b1e3f 8px, #a8284e 8px, #a8284e 16px);
  border: 4px solid #fff;
}
.card.empty {
  background: #ffffff14;
  box-shadow: none;
}
.me {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.me b {
  display: block;
  font-size: 22px;
}
.hint {
  background: #0006;
  border-radius: 8px;
  padding: 3px 9px;
  color: var(--gold);
  font-weight: 700;
}
.mini {
  display: inline-block;
  min-width: 30px;
  padding: 1px 4px;
  margin: 0 2px;
  border-radius: 4px;
  background: #fff;
  color: #111;
  font-weight: 800;
  text-align: center;
}
.mini.red {
  color: #c81e1e;
}
/* Fixed action tray: the Raise button never scrolls off (#59). */
.tray {
  position: sticky;
  bottom: 0;
  margin: 0 -16px -16px;
  padding: 12px 14px 16px;
  border-radius: 24px 24px 0 0;
  background: #061c14ee;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.presets button {
  min-height: 40px;
  padding: 8px 4px;
  font-size: 14px;
  white-space: nowrap;
}
.presets button.on {
  background: #ffd76a33;
  color: var(--gold);
  outline: 1.5px solid var(--gold);
}
.slider {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  opacity: 0.85;
}
input[type='range'] {
  flex: 1;
  height: 32px;
  accent-color: var(--gold);
}
.acts {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1.25fr;
  gap: 8px;
}
.acts button {
  padding: 12px 4px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.1;
}
.acts small {
  display: block;
  font-size: 12px;
  opacity: 0.8;
}
.fold {
  background: #3a1414;
  color: #ff9b9b;
}
.call {
  background: #e9efe9;
  color: #0a3d2b;
}
.foot {
  justify-content: center;
}
.foot:empty {
  display: none;
}
.turn {
  outline: 3px solid var(--gold);
}
.timer {
  height: 4px;
  margin: -6px 8px 0;
  border-radius: 2px;
  background: #0005;
  overflow: hidden;
}
.timer > div {
  height: 100%;
  background: var(--gold);
  transition: width 0.25s linear;
}
/* The action log drawer, pulled up over the table. */
.drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  max-width: 480px;
  max-height: 70vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border-radius: 20px 20px 0 0;
  background: #061c14f7;
  box-shadow: 0 -10px 30px #000a;
}
.drawer .handle {
  border-radius: 20px 20px 0 0;
  background: none;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.drawer ol {
  list-style: none;
  margin: 0;
  padding: 0 8px 16px;
  overflow-y: auto;
}
.drawer li {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 14px;
}
.drawer li.win {
  color: var(--gold);
}
.drawer li.street {
  display: block;
  margin-top: 6px;
  text-align: center;
  color: var(--gold);
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  border-top: 1px solid #ffd76a44;
}
.drawer li.now {
  outline: 1.5px solid #ffd76a88;
  background: #ffd76a14;
}

/* Ad banner strip and between-hands break (#76). Own layout row, never over actions. */
.ad-banner:not([hidden]) {
  margin: 0 0 4px;
}
.ad-placeholder {
  border-radius: 12px;
  border: 1.5px dashed #ffd76a88;
  background: #0008;
  color: #ffd76acc;
  text-align: center;
  font-weight: 600;
}
.ad-placeholder.banner-ad {
  padding: 10px 12px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ad-break {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: #000a;
  border: 2px solid #ffd76a55;
}
.ad-break-slot .ad-placeholder.break-ad {
  padding: 18px 14px;
}
.ad-kicker {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
}
.ad-title {
  margin-top: 6px;
  font-size: 28px;
  color: var(--gold);
  font-weight: 800;
}
.ad-body {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  opacity: 0.9;
}
.ad-meta {
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.6;
}
.ad-break-clock {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
}

/* Site footer on host / hand pages (#81 / #83) */
.site-footer {
  display: flex;
  justify-content: center;
  gap: 1.5em;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  font-size: 13px;
  opacity: 0.8;
}
.site-footer a {
  color: var(--gold);
  text-decoration: none;
}
