/* Anteout — a storm table under frosted glass. Ground: storm navy. One accent: ice-cyan, the colour of the ante that goes next. */
:root {
  --ground: #0A1020; --ink: #E8EEF8; --mute: #8C98B6; --faint: #5B6684;
  --ice: #9BF0FF; --ice-dim: rgba(155, 240, 255, .16);
  --pane: rgba(255, 255, 255, .055); --pane-2: rgba(255, 255, 255, .09); --edge: rgba(255, 255, 255, .13);
  --disp: 'Sora', system-ui, sans-serif; --body: 'Manrope', system-ui, sans-serif; --mono: 'Martian Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { background: var(--ground); }
body { margin: 0; min-height: 100vh; background-color: var(--ground); color: var(--ink); font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; padding-bottom: 92px; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42vmax 34vmax at 12% 8%, rgba(70, 92, 170, .45), transparent 70%),
    radial-gradient(38vmax 30vmax at 92% 22%, rgba(96, 62, 150, .38), transparent 70%),
    radial-gradient(30vmax 26vmax at 60% 96%, rgba(155, 240, 255, .10), transparent 70%); }
button, input { font: inherit; color: inherit; }
code { font-family: var(--mono); }
a { color: var(--ice); }

/* ---- weather line: no header bar, just where the table stands ---- */
.wx { display: flex; align-items: center; gap: 10px; padding: 12px 16px 6px; font-size: 12.5px; color: var(--mute); max-width: 1200px; margin: 0 auto; }
.wx-id { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); }
.wx-id img { border-radius: 7px; }
.wx-id b { font: 700 14px var(--disp); letter-spacing: .01em; }
.wx-at { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wx-clk { font: 500 12px var(--mono); color: var(--ice); padding: 3px 9px; border-radius: 99px; background: var(--ice-dim); }

/* ---- the split ---- */
.split { display: flex; flex-direction: column; gap: 12px; padding: 6px 12px 24px; max-width: 1200px; margin: 0 auto; }
.half { display: contents; }
.act { order: 1; } .castrip { order: 2; } .board { order: 3; } .feed { order: 4; } .book { order: 5; }
.sheet { background: var(--pane); border: 1px solid var(--edge); border-radius: 22px; padding: 16px;
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }

/* ---- the ante form (the first thing) ---- */
.act-k { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--mute); }
.act-bal { text-transform: none; letter-spacing: 0; font-family: var(--mono); font-size: 11px; }
.act-q { font: 600 17px/1.3 var(--disp); margin: 6px 0 10px; }
.act-row { display: flex; align-items: center; gap: 8px; background: rgba(0, 0, 0, .28); border: 1px solid var(--edge); border-radius: 16px; padding: 4px 14px 4px 4px; }
.act-in { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; padding: 10px 12px; font: 700 26px var(--disp); letter-spacing: -.01em; }
.act-in::placeholder { color: var(--faint); }
.act-tk { font: 500 11px var(--mono); color: var(--mute); }
.act-chips { display: flex; gap: 6px; margin: 8px 0 10px; }
.act-chips button { flex: 1; border: 1px solid var(--edge); background: var(--pane); border-radius: 12px; padding: 6px 0; font-size: 12.5px; cursor: pointer; }
.act-chips button:hover { border-color: var(--ice); }
.act-go { width: 100%; border: 0; border-radius: 16px; padding: 13px; background: var(--ice); color: #06202A; font: 700 15px var(--disp); cursor: pointer; }
.act-go:disabled { opacity: .45; cursor: default; }
.act-if { margin: 8px 2px 0; font-size: 13px; color: var(--mute); }
.act-if b { color: var(--ink); } .act-if em { color: var(--ice); font-style: normal; font-weight: 700; }
.act-due { margin-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--ice-dim); font-size: 13px; }
.act-due[hidden] { display: none; }
.act-due button { border: 0; border-radius: 10px; padding: 7px 12px; background: var(--ice); color: #06202A; font-weight: 700; cursor: pointer; }

/* ---- the CA: a floating glass dock above the thumb ---- */
.castrip { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 20; display: flex; align-items: center; gap: 8px; padding: 7px 7px 7px 14px;
  border-radius: 99px; background: rgba(16, 24, 46, .72); border: 1px solid rgba(155, 240, 255, .35);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 6px 30px rgba(0, 0, 0, .35); }
.castrip-k { font: 700 11px var(--disp); color: var(--ice); letter-spacing: .1em; }
.castrip-v { flex: 1; min-width: 0; font-size: 10.5px; line-height: 1.35; word-break: break-all; user-select: all; }
.castrip-v.is-wait { color: var(--mute); user-select: none; word-break: normal; }
.castrip-cp { border: 0; border-radius: 99px; padding: 8px 13px; background: var(--ice); color: #06202A; font: 700 12px var(--disp); cursor: pointer; flex: none; }
.castrip-cp:disabled { background: var(--pane-2); color: var(--mute); cursor: default; }
.castrip-cp.is-done { background: #fff; }
.castrip-gm { font-size: 11px; color: var(--mute); text-decoration: none; padding: 0 6px; flex: none; }
.castrip-gm:hover { color: var(--ice); }

/* ---- the table: a ladder of antes ---- */
.say { margin: 0 0 12px; font-size: 14.5px; line-height: 1.5; }
.say b { font-weight: 700; } .say em { font-style: normal; color: var(--ice); font-weight: 700; }
.board-k { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--mute); margin-bottom: 8px; }
.board-pot b { font: 700 14px var(--disp); color: var(--ink); letter-spacing: 0; }
.rungs, .gone, .feed-ls, .book-ls { list-style: none; margin: 0; padding: 0; }
.rungs { display: grid; gap: 5px; }
.rung { position: relative; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 11px; overflow: hidden; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .07); }
.rung-bar { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05)); border-right: 1px solid rgba(255, 255, 255, .22); transition: width .6s ease; }
.rung > :not(.rung-bar) { position: relative; }
.rung-no { font: 500 10.5px var(--mono); color: var(--faint); }
.rung-who { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rung-amt { font: 700 14px var(--disp); text-align: right; white-space: nowrap; }
.rung-gain { font: 500 10.5px var(--mono); color: var(--ice); margin-right: 8px; }
.rung.is-next { border-color: var(--ice); box-shadow: 0 0 0 1px var(--ice), 0 0 22px rgba(155, 240, 255, .25); }
.rung.is-next .rung-bar { background: linear-gradient(90deg, rgba(155, 240, 255, .38), rgba(155, 240, 255, .12)); }
.rung.is-next .rung-who::after { content: " · out next"; color: var(--ice); font-weight: 700; }
.rung.is-me .rung-who { font-weight: 700; }
.rung.is-new { animation: settle .7s ease; }
.rung.is-seat { background: transparent; border: 1px dashed rgba(255, 255, 255, .14); color: var(--faint); }
.rung.is-seat .rung-who { color: var(--faint); }
.rung.is-first { border: 1px dashed var(--ice); color: var(--ink); cursor: pointer; animation: beckon 2.4s ease-in-out infinite; }
.rung.is-first .rung-who { color: var(--ice); font-weight: 700; }
@keyframes settle { from { transform: translateX(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes beckon { 50% { box-shadow: 0 0 18px rgba(155, 240, 255, .28); } }
.gone-k { margin: 14px 0 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--mute); }
.gone li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 2px; border-top: 1px solid rgba(255, 255, 255, .06); font-size: 12.5px; color: var(--mute); }
.gone li b { color: var(--ink); font-weight: 600; }
.gone li .amt { font: 600 13px var(--disp); color: var(--ink); text-decoration: line-through; text-decoration-color: rgba(155, 240, 255, .6); white-space: nowrap; }
.gone li.is-hush { display: block; }
.gone li.is-drop { animation: settle .7s ease; }

/* ---- the tape ---- */
.feed-k { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--mute); margin-bottom: 8px; }
.feed-k span:last-child { text-transform: none; letter-spacing: 0; }
.feed-ls li { display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, .06); font-size: 12.5px; }
.feed-ls time { font: 400 10.5px var(--mono); color: var(--faint); padding-top: 2px; }
.feed-ls li.is-out span { color: var(--ice); }
.feed-ls li.is-feed { animation: print .5s steps(6); }
.feed-ls li.is-eg { opacity: .55; }
.feed-ls li.is-hush { display: block; color: var(--mute); }
@keyframes print { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* ---- the rules ---- */
.book-t { margin: 0 0 8px; font: 700 16px var(--disp); }
.book-ls { counter-reset: r; }
.book-ls li { counter-increment: r; position: relative; padding: 6px 0 6px 28px; font-size: 13.5px; color: #C9D2E6; }
.book-ls li::before { content: counter(r); position: absolute; left: 0; top: 7px; width: 19px; height: 19px; border-radius: 50%; background: var(--pane-2); font: 600 10.5px/19px var(--mono); text-align: center; color: var(--ice); }
.book-ls b { color: var(--ink); }
.book-ex { margin-top: 10px; padding: 12px 14px; border-radius: 16px; background: rgba(0, 0, 0, .22); font-size: 13px; color: #C9D2E6; }
.book-ex p { margin: 0 0 6px; } .book-ex p:last-child { margin: 0; }
.book-ex-t { font: 600 11px var(--disp); text-transform: uppercase; letter-spacing: .12em; color: var(--ice); }
.book-ex b { color: var(--ink); }

/* ---- colophon ---- */
.colo { max-width: 1200px; margin: 0 auto; padding: 8px 16px 40px; font-size: 12px; color: var(--mute); display: grid; gap: 4px; }
.colo code { font-size: 10.5px; word-break: break-all; color: #C9D2E6; }
.colo nav { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }
.colo nav a { color: var(--mute); }

/* ---- veil (modal) + slip (toast) ---- */
.veil { position: fixed; inset: 0; z-index: 50; background: rgba(5, 8, 18, .6); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.veil[hidden] { display: none; }
.veil-card { width: min(520px, 100%); max-height: 80vh; overflow: auto; background: rgba(20, 28, 52, .92); border: 1px solid var(--edge); border-radius: 20px; padding: 16px; }
.veil-hd { display: flex; justify-content: space-between; align-items: center; font: 700 15px var(--disp); margin-bottom: 10px; }
.veil-hd button { border: 1px solid var(--edge); background: transparent; border-radius: 10px; padding: 5px 10px; cursor: pointer; }
.veil-ls { list-style: none; margin: 0; padding: 0; }
.veil-ls li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, .07); font-size: 13px; }
.purses { display: grid; gap: 8px; }
.purses button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--edge); background: var(--pane); border-radius: 12px; cursor: pointer; }
.purses img { width: 22px; height: 22px; }
.slip { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 60; padding: 10px 16px; border-radius: 99px; background: rgba(20, 28, 52, .95); border: 1px solid var(--ice); font-size: 13px; }

/* ---- tablet: wider measure, bigger type, still one column ---- */
@media (min-width: 640px) {
  .split { padding: 10px 24px 32px; gap: 14px; max-width: 760px; }
  .wx { max-width: 760px; padding: 16px 24px 8px; }
  .colo { max-width: 760px; padding: 8px 24px 40px; }
  .sheet { padding: 20px; }
  .act-q { font-size: 21px; }
  .act-in { font-size: 32px; }
  .rung { height: 40px; } .rung-amt { font-size: 16px; } .rung-who { font-size: 13.5px; }
  .say { font-size: 16px; }
  .castrip-v { font-size: 12px; }
}

/* ---- desktop: the split pane — the ante form and the tape left, the table and its rules right ---- */
@media (min-width: 1000px) {
  .wx, .colo { max-width: 1200px; padding-left: 28px; padding-right: 28px; }
  .split { max-width: 1200px; display: grid; grid-template-columns: minmax(380px, 430px) 1fr; gap: 20px; align-items: start; padding: 10px 28px 36px; }
  .half { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  .act, .castrip, .board, .feed, .book { order: 0; }
  .sheet { padding: 22px; border-radius: 26px; }
  .act-q { font-size: 23px; }
  .act-in { font-size: 36px; }
  .castrip { left: 50%; right: auto; transform: translateX(-50%); width: min(760px, calc(100% - 56px)); bottom: 18px; padding: 9px 9px 9px 18px; }
  .castrip-v { font-size: 12.5px; }
  .board { padding: 26px; }
  .say { font-size: 18px; max-width: 46em; }
  .rungs { gap: 7px; }
  .rung { height: 46px; grid-template-columns: 28px 1fr auto; padding: 0 14px; border-radius: 13px; }
  .rung-amt { font-size: 18px; } .rung-who { font-size: 14px; } .rung-gain { font-size: 11.5px; }
  .feed-ls { max-height: 420px; overflow: auto; }
}
