/* poker.adviza.com — beginner-first. Huge type, high contrast, no chrome. */
:root {
  --ink: #14171a;
  --dim: #55606b;
  --line: #d8dee4;
  --bg: #f7f5f0;
  --card: #ffffff;
  --felt: #1f5e46;
  --accent: #17603f;
  --accent-soft: #e6f0ea;
  --red: #c0292b;
  --warn: #8a5a00;
  --warn-soft: #fdf3dd;
  --radius: 14px;
  --tap: 60px;
  /* Tamarisk CC brand, sampled from the club monogram on the members' forum.
     The clay only reaches 3.0:1 on white, so it is for large text and chrome
     only — buttons and links stay green, which clears 4.5:1. */
  --tcc-brown: #403830;
  --tcc-clay: #e0785f;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 21px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}
@media (max-width: 480px) { body { font-size: 19px; } }

.wrap { max-width: 900px; margin: 0 auto; padding: 0 20px 80px; }

/* ---------- header ---------- */
header.site {
  background: var(--tcc-brown); color: #fff; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  border-bottom: 4px solid var(--tcc-clay);
}
header.site .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
header.site .mark { width: 44px; height: 44px; border-radius: 9px; display: block; flex: none; }
header.site .brandtext { display: flex; flex-direction: column; line-height: 1.12; }
header.site .club {
  font-size: 13px; font-weight: 800; letter-spacing: 1.7px;
  text-transform: uppercase; color: var(--tcc-clay);
}
header.site .game { font-size: 24px; font-weight: 800; }
@media (max-width: 480px) {
  header.site .mark { width: 36px; height: 36px; }
  header.site .game { font-size: 20px; }
  header.site .club { font-size: 11px; letter-spacing: 1.3px; }
}
header.site .back {
  color: #fff; text-decoration: none; font-size: 19px; opacity: .9;
  border: 2px solid rgba(255,255,255,.45); border-radius: 999px; padding: 6px 16px;
  min-height: 44px; display: inline-flex; align-items: center;
}
header.site .back:hover { opacity: 1; border-color: #fff; }

h1 { font-size: 40px; line-height: 1.12; margin: 30px 0 8px; letter-spacing: -.6px; }
h1::after { content: ""; display: block; width: 74px; height: 5px; border-radius: 3px;
            background: var(--tcc-clay); margin: 14px 0 0; }
h2 { font-size: 28px; line-height: 1.2; margin: 36px 0 10px; }
h3 { font-size: 23px; margin: 24px 0 6px; }
p { margin: 0 0 16px; }
.lede { font-size: 24px; color: var(--dim); margin-bottom: 28px; }
@media (max-width: 480px) { h1 { font-size: 32px; } h2 { font-size: 24px; } .lede { font-size: 21px; } }

a { color: var(--accent); }

/* ---------- big buttons ---------- */
.menu { display: grid; gap: 16px; margin: 30px 0; }
@media (min-width: 700px) { .menu { grid-template-columns: 1fr 1fr; } }
.big {
  display: block; background: var(--card); border: 2px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px; text-decoration: none;
  color: var(--ink); min-height: var(--tap);
}
.big:hover, .big:focus { border-color: var(--accent); background: var(--accent-soft); }
.big .t { font-size: 26px; font-weight: 800; display: block; line-height: 1.15; }
.big .d { font-size: 18px; color: var(--dim); display: block; margin-top: 6px; line-height: 1.35; }

button, .btn {
  font: inherit; font-weight: 700; cursor: pointer;
  min-height: var(--tap); padding: 12px 26px; border-radius: 12px;
  border: 2px solid var(--accent); background: var(--accent); color: #fff;
}
button.ghost, .btn.ghost { background: var(--card); color: var(--accent); }
button:disabled { opacity: .4; cursor: default; }
.btnrow { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0; }

/* ---------- playing cards ---------- */
.pc {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 62px; height: 86px; background: #fff; border: 2px solid #2d3238;
  border-radius: 8px; line-height: 1; flex: none; box-shadow: 0 1px 3px rgba(0,0,0,.14);
}
.pc .r { font-size: 30px; font-weight: 800; }
.pc .s { font-size: 24px; margin-top: 2px; }
.pc.red { color: var(--red); }
.pc.blk { color: #14171a; }
.pc.back { background: repeating-linear-gradient(45deg,#2b5f7d,#2b5f7d 6px,#24506a 6px,#24506a 12px); border-color:#1b3d50; }
.pc.dim { opacity: .32; }
.pc.sm { width: 42px; height: 60px; border-width: 1.5px; }
.pc.sm .r { font-size: 21px; } .pc.sm .s { font-size: 16px; }
.pc.xs { width: 32px; height: 45px; border-width: 1.5px; border-radius: 5px; }
.pc.xs .r { font-size: 16px; } .pc.xs .s { font-size: 12px; }
@media (max-width: 480px) {
  .pc { width: 48px; height: 68px; } .pc .r { font-size: 24px; } .pc .s { font-size: 19px; }
  .pc.sm { width: 36px; height: 51px; } .pc.sm .r { font-size: 18px; } .pc.sm .s { font-size: 14px; }
}
.hand { display: flex; gap: 5px; flex-wrap: nowrap; }

/* ---------- rankings list ---------- */
.rank {
  display: flex; align-items: center; gap: 16px; background: var(--card);
  border: 2px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 12px; flex-wrap: wrap;
}
.rank .num { font-size: 30px; font-weight: 800; color: #a8b2ba; width: 40px; flex: none; }
.rank .info { flex: 1 1 240px; min-width: 200px; }
.rank .name { font-size: 25px; font-weight: 800; line-height: 1.15; }
.rank .desc { font-size: 18px; color: var(--dim); margin-top: 3px; line-height: 1.35; }
.rank .odds { font-size: 16px; color: #8b959d; font-style: italic; }

/* ---------- notes ---------- */
.note { background: var(--accent-soft); border-left: 6px solid var(--accent);
        border-radius: 8px; padding: 16px 20px; margin: 24px 0; }
.note.warn { background: var(--warn-soft); border-left-color: var(--warn); }
.note b { display: block; margin-bottom: 4px; font-size: 20px; }
.note p:last-child { margin-bottom: 0; }

/* ---------- tables ---------- */
table { border-collapse: collapse; width: 100%; margin: 18px 0; background: var(--card);
        border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th { text-align: left; font-size: 16px; text-transform: uppercase; letter-spacing: .6px;
     color: var(--dim); background: #eee9e0; padding: 10px 14px; }
td { padding: 12px 14px; border-top: 1px solid var(--line); font-size: 20px; }
td.b, th.b { font-weight: 800; }
tr.brk td { background: #eee9e0; font-weight: 800; }

/* ---------- drills ---------- */
.stage { background: var(--card); border: 2px solid var(--line);
         border-radius: var(--radius); padding: 22px; margin: 22px 0; }
.opt {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: var(--card); color: var(--ink); border: 3px solid var(--line);
  border-radius: 12px; padding: 16px; margin-bottom: 12px; font-weight: 600;
}
.opt:hover { border-color: var(--accent); }
.opt.right { border-color: #1f8a4c; background: #e8f6ee; }
.opt.wrong { border-color: var(--red); background: #fdecec; }
.verdict { font-size: 24px; font-weight: 800; margin: 8px 0 4px; }
.verdict.ok { color: #1f8a4c; }
.verdict.no { color: var(--red); }
.score { font-size: 18px; color: var(--dim); }
/* shared card row — the walkthrough and both drills use this; the simulator's
   centre overrides it inside .table-center */
.board { display: flex; gap: 6px; justify-content: center; align-items: center;
         flex-wrap: wrap; margin: 16px 0; min-height: 88px; }
.pot { text-align: center; font-size: 22px; font-weight: 800; margin-bottom: 6px; }

.board-label { font-size: 16px; text-transform: uppercase; letter-spacing: .7px;
               color: var(--dim); margin: 0 0 6px; font-weight: 700; }

/* ---------- simulator: an oval table, seats around the rail ---------- */
.table-oval {
  position: relative;
  width: 100%;
  max-width: 760px;
  margin: 18px auto;
  aspect-ratio: 16 / 11;
  /* radii of the seat ellipse, as a % of the table box. render() reads these,
     so the seats stay on the rail without overflowing at any width. */
  --rx: 40;
  --ry: 40;
}
@media (max-width: 620px) {
  .table-oval { aspect-ratio: 4 / 5; --rx: 36; --ry: 42; }
}

.oval-felt {
  position: absolute;
  inset: 8% 6%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 38%, #2b7a5c 0%, var(--felt) 55%, #17472f 100%);
  border: 9px solid var(--tcc-brown);
  box-shadow: inset 0 0 40px rgba(0,0,0,.35), 0 4px 14px rgba(0,0,0,.25);
}
@media (max-width: 620px) { .oval-felt { border-width: 7px; } }

.table-center {
  position: absolute;
  left: 50%; top: 47%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 74%;
}
.table-center .pot {
  color: #fff; font-size: 20px; font-weight: 800; margin: 0 0 8px;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.table-center .board {
  display: flex; gap: 4px; justify-content: center; align-items: center;
  min-height: 0; margin: 0; flex-wrap: nowrap;
}
.table-center .board .pc { width: 46px; height: 64px; }
.table-center .board .pc .r { font-size: 22px; }
.table-center .board .pc .s { font-size: 17px; }
.table-center .empty { color: rgba(255,255,255,.7); font-size: 15px; }
@media (max-width: 620px) {
  .table-center { width: 84%; }
  .table-center .pot { font-size: 17px; }
  .table-center .board { gap: 3px; }
  .table-center .board .pc { width: 34px; height: 48px; border-width: 1.5px; border-radius: 5px; }
  .table-center .board .pc .r { font-size: 16px; }
  .table-center .board .pc .s { font-size: 12px; }
}

/* one seat, parked on the rail — position comes from render() */
.seat {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 108px;
  background: #12212b;
  color: #fff;
  border: 2px solid #3d5461;
  border-radius: 10px;
  padding: 6px 7px;
  text-align: center;
  line-height: 1.25;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.seat.me { background: #123a2c; border-color: #48a37c; }
.seat.turn { border-color: #ffd23f; box-shadow: 0 0 0 3px rgba(255,210,63,.35); }
.seat.out { opacity: .35; }
.seat .nm { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat .st { font-size: 14px; opacity: .9; font-variant-numeric: tabular-nums; }
.seat .act { font-size: 13px; font-weight: 700; color: #ffd23f; min-height: 16px; }
.seat .bet {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: -20px; background: #ffd23f; color: #14171a;
  font-size: 12px; font-weight: 800; border-radius: 999px; padding: 1px 8px; white-space: nowrap;
}
.seat .dbtn {
  position: absolute; top: -9px; right: -9px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; color: #14171a; font-size: 13px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #14171a;
}
@media (max-width: 620px) {
  .seat { width: 78px; padding: 4px 5px; border-radius: 8px; }
  .seat .nm { font-size: 12.5px; }
  .seat .st { font-size: 12px; }
  .seat .act { font-size: 11px; min-height: 14px; }
  .seat .bet { font-size: 11px; bottom: -17px; }
  .seat .dbtn { width: 18px; height: 18px; font-size: 11px; top: -7px; right: -7px; }
}

.narrate { background: #fff; border: 2px solid var(--line); border-radius: 12px;
           padding: 16px 18px; font-size: 21px; line-height: 1.4; margin: 16px 0; }
.narrate b { color: var(--accent); }
.myhand { display: flex; gap: 8px; justify-content: center; margin: 10px 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.actions button { flex: 1 1 130px; }
.raise { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.raise input { flex: 1; height: 44px; }
.hint { background: var(--warn-soft); border-left: 6px solid var(--warn);
        border-radius: 8px; padding: 14px 18px; font-size: 19px; margin: 12px 0; }

/* ---------- clock ---------- */
body.clock { background: #14171a; color: #fff; }
.clockbrand {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: var(--tcc-clay); font-weight: 800; letter-spacing: 1.6px;
  text-transform: uppercase; font-size: 1.5vw; margin-bottom: 2vh;
}
.clockbrand img { border-radius: 6px; }
.clockwrap { text-align: center; padding: 4vh 20px; }
.clock .lvl { font-size: 4vw; color: #9aa5ad; text-transform: uppercase; letter-spacing: 3px; }
.clock .blinds { font-size: 15vw; font-weight: 900; line-height: 1; margin: 2vh 0; }
.clock .time { font-size: 22vw; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.clock .next { font-size: 3.2vw; color: #9aa5ad; margin-top: 2vh; }
.clock .ctrl { margin-top: 4vh; }
.clock .ctrl button { font-size: 20px; margin: 0 6px; }
.clock.low .time { color: #ffd23f; }

footer.site {
  border-top: 3px solid var(--tcc-clay); margin-top: 50px; padding: 22px 0 10px;
  color: var(--dim); font-size: 17px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
footer.site .mark { width: 38px; height: 38px; border-radius: 8px; flex: none; }
footer.site .who { font-weight: 800; color: var(--tcc-brown); display: block; font-size: 18px; }
footer.site .said { flex: 1 1 260px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
