/* Icosa Lab — night mode, greyscale, minimal. Text wears text tokens. */
:root {
  --bg: #0b0c0e;
  --surface: #131417;
  --border: #232529;
  --ink: #e8e9eb;
  --ink-2: #a6a9ad;
  --ink-3: #6e7176;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
}
main { max-width: 880px; margin: 0 auto; padding: 0 24px; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }

.nav {
  display: flex; justify-content: space-between; align-items: baseline;
  max-width: 880px; margin: 0 auto; padding: 28px 24px;
}
.wordmark { font-weight: 700; letter-spacing: .12em; text-decoration: none; font-size: 15px; }
.wordmark span { color: var(--ink-3); }
.nav nav { display: flex; gap: 22px; }
.nav a { text-decoration: none; color: var(--ink-2); font-size: 15px; }
.nav a:hover { color: var(--ink); }

.hero { padding: 72px 0 40px; }
.hero h1 { font-size: 52px; line-height: 1.05; margin: 0 0 16px; letter-spacing: -0.02em; }
.hero p.lede { font-size: 19px; color: var(--ink-2); max-width: 560px; margin: 0 0 32px; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 10px 20px; border-radius: 6px;
  border: 1px solid var(--border); text-decoration: none; font-size: 15px;
  color: var(--ink); background: var(--surface);
}
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn:hover { border-color: var(--ink-3); }
.btn.primary:hover { background: #fff; }

.tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin: 48px 0;
}
.tile {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 18px 20px;
}
.tile .label { font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.tile .value { font-size: 26px; font-weight: 600; }
.tile .note { font-size: 13px; color: var(--ink-2); margin-top: 4px; }

pre {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 18px 20px; overflow-x: auto;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.55; color: var(--ink-2);
}
pre .k { color: var(--ink); }
code { font-family: var(--mono); font-size: .92em; color: var(--ink); }

section { margin: 56px 0; }
h2 { font-size: 22px; margin: 0 0 14px; }
h3 { font-size: 17px; margin: 28px 0 8px; }
p, li { color: var(--ink-2); }
p strong, li strong { color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--border); margin: 48px 0; }

table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: left; color: var(--ink-3); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--border); }
td { padding: 10px; border-bottom: 1px solid var(--border); color: var(--ink-2); vertical-align: top; }
td.num { font-variant-numeric: tabular-nums; text-align: right; }
td code { font-size: 12.5px; }

form.inline { display: flex; gap: 10px; margin: 18px 0; flex-wrap: wrap; }
input[type=email], input[type=text] {
  background: var(--surface); border: 1px solid var(--border); color: var(--ink);
  border-radius: 6px; padding: 10px 14px; font-size: 15px; min-width: 260px;
}
input:focus { outline: 1px solid var(--ink-3); }
button {
  background: var(--ink); color: var(--bg); border: 0; border-radius: 6px;
  padding: 10px 20px; font-size: 15px; cursor: pointer;
}
button.ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--border); padding: 6px 12px; font-size: 13px; }
button.ghost:hover { color: var(--ink); border-color: var(--ink-3); }
.error { color: #d9a0a0; font-size: 14px; }
.muted { color: var(--ink-3); }

footer {
  display: flex; justify-content: space-between; max-width: 880px;
  margin: 80px auto 0; padding: 24px; border-top: 1px solid var(--border);
  font-size: 13.5px; color: var(--ink-3);
}
footer a { color: var(--ink-3); }

@media (max-width: 600px) {
  .hero h1 { font-size: 36px; }
  .hero { padding: 40px 0 24px; }
  .nav { padding: 20px 16px; }
  .nav nav { gap: 14px; }
  .nav a { font-size: 13.5px; white-space: nowrap; }
}

/* ---------------- browser game ---------------- */
/* Gentle color enters here and only here: muted warm (fold/all-in), muted
   green (call), muted cool (tight/bets), 4-color deck. Text stays in ink. */
/* setup: segmented game toggle + player list */
.seg {
  display: inline-flex; background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px; gap: 2px;
}
.seg button {
  background: transparent; color: var(--ink-2); border: 0; border-radius: 999px;
  padding: 7px 18px; font-size: 14px; cursor: pointer;
}
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--ink); color: var(--bg); font-weight: 600; }
.seg.small { padding: 2px; }
.seg.small button { padding: 5px 13px; font-size: 13px; }
.seg.small button.pill-ideal.on { background: #2c2f34; color: var(--ink); }
.seg.small button.pill-tight.on { background: #24314a; color: #a9c0e8; }
.seg.small button.pill-aggressive.on { background: #43292b; color: #dfa39e; }

.player-list {
  margin: 20px 0 0; max-width: 460px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.prow { display: flex; align-items: center; padding: 9px 14px; gap: 14px; }
.prow + .prow { border-top: 1px solid var(--border); }
.pcol-name {
  display: flex; align-items: center; gap: 10px; width: 118px; flex-shrink: 0;
  color: var(--ink); font-size: 14px; font-weight: 600;
}
.pcol-style {
  border-left: 1px solid var(--border); padding-left: 14px; flex: 1;
  display: flex; align-items: center; min-height: 34px;
}
.you-tag { font-size: 13px; }
.beta {
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: #24314a; color: #a9c0e8; border-radius: 4px; padding: 1px 5px;
  margin-left: 6px; vertical-align: 2px;
}
.seg button.on .beta { background: rgba(0,0,0,.18); color: inherit; }

#felt {
  position: relative; margin: 8px 0 60px; height: 440px;
  background: linear-gradient(180deg, #15171b, #101216);
  border: 1px solid var(--border); border-radius: 32px;
}
#rail {
  position: absolute; inset: 54px 68px; border-radius: 999px;
  border: 1.5px solid #23262c;
  background: radial-gradient(ellipse at center, #191c21 0%, #14161a 78%);
  box-shadow: inset 0 0 44px rgba(0, 0, 0, 0.35);
}
#center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%;
}
#pot {
  font-size: 13px; color: var(--ink-2); background: #191b20;
  border: 1px solid var(--border); border-radius: 999px; padding: 2px 14px;
  font-variant-numeric: tabular-nums;
}
#pot:empty { visibility: hidden; }

/* cards: corner index + corner pip, 4-color deck */
.cards { display: flex; gap: 5px; justify-content: center; }
.card {
  position: relative; width: 44px; height: 60px; border-radius: 6px;
  background: #eef0f2; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.card .idx {
  position: absolute; top: 4px; left: 5px; text-align: center;
  font: 700 13px/1.05 var(--mono); letter-spacing: -0.5px;
}
.card .idx em { display: block; font-style: normal; font-size: 11px; }
.card .pip { position: absolute; right: 4px; bottom: 2px; font-size: 17px; }
.card.small { width: 30px; height: 42px; }
.card.small .idx { font-size: 10.5px; top: 3px; left: 4px; }
.card.small .idx em { font-size: 9px; }
.card.small .pip { font-size: 12px; bottom: 1px; right: 3px; }
.card.slot {
  background: rgba(255, 255, 255, 0.03); border: 1px dashed #26282e;
  box-shadow: none;
}
.card.back {
  background: linear-gradient(135deg, #262933, #1b1e26);
  border: 1px solid #2d3039; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.card.back::after {
  content: ""; position: absolute; inset: 3px; border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.suit-s { color: #26282d; }
.suit-c { color: #2f6f4f; }
.suit-h { color: #ae4c4c; }
.suit-d { color: #48679f; }

/* seats: avatar ring colored by style + readable name/stack plate */
.seat {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 5px; width: 150px;
}
.seat-id { display: flex; align-items: center; gap: 8px; }
.avatar {
  position: relative; width: 38px; height: 38px; border-radius: 50%;
  background: #1d2026; border: 2px solid #3a3e46; color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  font: 700 14px var(--mono); flex-shrink: 0;
}
.avatar.style-you { border-color: #8a8e96; color: var(--ink); }
.avatar.style-tight { border-color: #48679f; }
.avatar.style-aggressive { border-color: #ae4c4c; }
.avatar.mini { width: 28px; height: 28px; font-size: 11px; border-width: 2px; }
.avatar .dbtn {
  position: absolute; right: -5px; top: -5px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--ink); color: var(--bg);
  font: 700 10px/16px var(--mono); text-align: center;
}
.seat .plate { display: flex; flex-direction: column; text-align: left; }
.seat .pname { color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.seat .pstack { color: var(--ink-2); font-size: 12.5px; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.seat.folded { opacity: 0.35; }
.seat.turn .avatar { box-shadow: 0 0 0 3px rgba(232, 233, 235, 0.12); }
.seat .betchip {
  position: absolute; bottom: -24px; display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: var(--ink-2); background: #1b1d21;
  border: 1px solid var(--border); border-radius: 10px; padding: 1px 9px;
  font-variant-numeric: tabular-nums;
}
.seat .betchip::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: #7189b8;
}
#seat0 .betchip, #seat1 .betchip, #seat5 .betchip { top: -24px; bottom: auto; }
.seat .bubble {
  position: absolute; top: -26px; font-size: 12px; color: var(--bg);
  background: var(--ink); border-radius: 5px; padding: 2px 8px; white-space: nowrap;
  z-index: 2;
}

#banner {
  font-size: 19px; font-weight: 600; background: #191b20;
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 22px;
}
#banner.win { color: #8fc9a8; border-color: #2c4a3a; }
#banner.loss { color: var(--ink-2); }
#banner a { color: var(--ink); }

/* action cluster, bottom right */
#bottomRow {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; min-height: 84px; margin-top: -40px;
}
#actionBar { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.size-row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.main-row { display: flex; gap: 8px; }
.a-btn {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 1px;  /* single-label buttons center vertically */
  background: var(--surface); color: var(--ink); border: 1px solid var(--border);
  border-radius: 9px; padding: 8px 16px; font-size: 14px; cursor: pointer;
}
.a-btn:hover { border-color: var(--ink-3); }
.a-btn:disabled { opacity: 0.45; cursor: default; }
.a-main { font-weight: 600; }
.a-sub { font-size: 11.5px; color: var(--ink-3); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.a-size { padding: 6px 13px; font-size: 13px; }
.a-fold { border-color: #4a3236; color: #c98f8a; }
.a-fold:hover { border-color: #6b4148; background: #181214; }
.a-call { border-color: #2c4a3a; color: #8fc9a8; }
.a-call:hover { border-color: #3d6650; background: #121814; }
.a-allin { color: #c98f8a; border-color: #4a3236; }
.a-ghost { background: transparent; color: var(--ink-2); }
.a-ghost:hover { color: var(--ink); }
.a-raisego { background: #16211b; border-color: #3d6650; min-width: 108px; }
.a-raisego:hover { background: #1b2a21; border-color: #4d7f64; }
.slider-row { display: flex; gap: 12px; align-items: center; justify-content: flex-end; }
.slider-row input[type=range] {
  width: 240px; accent-color: #8fc9a8; background: transparent; cursor: pointer;
}
.a-next { background: var(--ink); border-color: var(--ink); padding: 10px 24px; }
.a-next .a-main { color: var(--bg); }
.a-next:hover { background: #fff; }

#sessionLine { font-size: 13px; font-variant-numeric: tabular-nums; padding-bottom: 10px; }
#logBox { margin-top: 12px; }
#log { max-height: 220px; overflow-y: auto; font-size: 13px; margin-top: 8px; }
.logline { color: var(--ink-3); padding: 1px 0; }
.logline.good { color: var(--ink-2); }
.logline.err { color: #d9a0a0; }

@media (max-width: 680px) {
  #felt { height: 330px; border-radius: 24px; margin-bottom: 44px; }
  #rail { inset: 42px 30px; }
  .seat { width: 118px; }
  .seat .pname { font-size: 11.5px; }
  .seat .pstack { font-size: 11px; }
  .avatar { width: 30px; height: 30px; font-size: 12px; }
  .card { width: 36px; height: 50px; }
  .card .pip { font-size: 14px; }
  #bottomRow { flex-direction: column; align-items: stretch; margin-top: 0; }
  #actionBar { align-items: stretch; }
  .size-row { justify-content: flex-start; }
  .main-row button { flex: 1; }
  .slider-row input[type=range] { flex: 1; width: auto; }
}
