:root {
  color-scheme: dark;
  --bg: #07110e;
  --surface: #0d1b17;
  --surface-raised: #11231d;
  --surface-soft: #142922;
  --felt: #0e4b3a;
  --felt-deep: #07362a;
  --rail: #26352f;
  --line: rgba(222, 240, 231, .11);
  --line-strong: rgba(222, 240, 231, .2);
  --text: #f4f7f5;
  --muted: #91a69d;
  --muted-2: #657c72;
  --mint: #79dda9;
  --mint-soft: #a3edc5;
  --mint-dark: #2c7859;
  --coral: #ef6d78;
  --gold: #e6bd69;
  --blue: #78add5;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 13px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; overflow-x: hidden; color: var(--text); background: var(--bg); }
body::before { content: ""; position: fixed; inset: 0; z-index: -3; background-image: linear-gradient(rgba(255,255,255,.016) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.016) 1px, transparent 1px); background-size: 56px 56px; mask-image: linear-gradient(to bottom, black, transparent 88%); }
button, input, select { font: inherit; }
button { color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }

.ambient { position: fixed; z-index: -2; width: 540px; height: 540px; border-radius: 50%; filter: blur(130px); opacity: .1; pointer-events: none; }
.ambient-one { top: -300px; left: 25%; background: var(--mint); }
.ambient-two { right: -300px; top: 42%; background: #277b67; }

.topbar { width: min(1240px, calc(100% - 40px)); min-height: 72px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-mark { width: 36px; height: 36px; color: #e15362; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-mark path:first-child { fill: currentColor; }
.brand-mark path:last-child { fill: none; stroke: #fff; stroke-width: 2; }
.brand > span:last-child { display: grid; gap: 2px; }
.brand b { font-size: 15px; letter-spacing: .08em; }
.brand small { color: var(--muted-2); font-size: 7px; letter-spacing: .2em; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.online-pill, .top-button { min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; border-radius: 999px; font-size: 11px; }
.online-pill { color: var(--mint-soft); background: rgba(121,221,169,.08); }
.online-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px rgba(121,221,169,.07); }
.top-button { border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; transition: .18s ease; }
.top-button:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255,255,255,.025); }
.top-button svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

.app-shell { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }
.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; padding: 45px 4px 26px; }
.eyebrow, .section-index { margin: 0; color: var(--mint); font-size: 9px; font-weight: 700; letter-spacing: .18em; }
.page-intro h1 { margin: 9px 0 0; font: 500 clamp(29px, 4vw, 43px)/1.1 Georgia, "Songti SC", serif; letter-spacing: -.04em; }
.page-intro h1 em { color: var(--mint-soft); font-weight: 500; }
.page-intro > p { max-width: 390px; margin: 0 0 4px; color: var(--muted); font-size: 11px; line-height: 1.75; }

.surface { border: 1px solid var(--line); border-radius: var(--radius-xl); background: rgba(13,27,23,.93); box-shadow: 0 28px 90px rgba(0,0,0,.22); backdrop-filter: blur(14px); }
.table-panel { overflow: hidden; }
.table-toolbar { min-height: 82px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 22px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.table-toolbar h2, .panel-header h2, .modal-header h2 { margin: 5px 0 0; font: 500 22px/1.1 Georgia, "Songti SC", serif; }
.table-stats { display: flex; align-items: center; justify-content: center; gap: 8px; }
.stat-pill, .mode-pill { min-height: 31px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.018); color: var(--muted); font-size: 9px; }
.stat-pill b { color: var(--text); font-size: 12px; }
.active-dot, .mode-pill i { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); }
.mode-pill { color: var(--mint-soft); border-color: rgba(121,221,169,.15); background: rgba(121,221,169,.05); cursor: pointer; }
.people-control { display: flex; align-items: center; gap: 7px; }
.people-control > span { margin-right: 3px; color: var(--muted-2); font-size: 9px; }
.people-control button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.025); color: var(--muted); cursor: pointer; font-size: 17px; }
.people-control button:hover:not(:disabled) { color: var(--mint); border-color: var(--mint-dark); }
.people-control button:disabled { opacity: .35; }
.people-control output { min-width: 30px; color: var(--mint-soft); text-align: center; font: 500 23px Georgia, serif; cursor: ns-resize; }

.poker-room { position: relative; height: 530px; overflow: hidden; background: radial-gradient(ellipse at 50% 55%, rgba(66,125,101,.08), transparent 52%), linear-gradient(180deg, rgba(255,255,255,.01), transparent); }
.felt-shadow { position: absolute; left: 12%; right: 12%; top: 19%; bottom: 13%; border-radius: 50%; background: #020705; filter: blur(30px); opacity: .65; }
.poker-table { position: absolute; left: 14%; right: 14%; top: 21%; bottom: 16%; display: grid; place-items: center; border: 14px solid var(--rail); border-radius: 50%; background: radial-gradient(ellipse at center, #145843 0%, var(--felt) 52%, var(--felt-deep) 100%); box-shadow: inset 0 0 0 3px rgba(255,255,255,.055), inset 0 0 70px rgba(0,0,0,.3), 0 14px 0 #17231f, 0 22px 45px rgba(0,0,0,.48); }
.poker-table::before { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(183,234,210,.11); border-radius: inherit; }
.poker-table::after { content: "RIVER NOTES  ·  LIVE EQUITY"; position: absolute; bottom: 13px; color: rgba(209,241,226,.12); font-size: 7px; letter-spacing: .35em; }
.felt-mark { position: absolute; color: rgba(255,255,255,.025); font: 78px Georgia, serif; }
.felt-mark-left { left: 9%; transform: rotate(-13deg); }
.felt-mark-right { right: 9%; transform: rotate(13deg); }
.community-zone { position: relative; z-index: 1; display: grid; justify-items: center; }
.community-heading { display: flex; align-items: baseline; gap: 7px; margin-bottom: 8px; }
.community-heading span { color: var(--mint); font-size: 7px; letter-spacing: .17em; }
.community-heading strong { font-size: 11px; font-weight: 600; }
.community-heading small { color: rgba(218,240,229,.45); font-size: 8px; }
.board-cards { display: flex; align-items: center; gap: 7px; }
.community-zone > p { margin: 8px 0 0; color: rgba(218,240,229,.32); font-size: 7px; }

.playing-card { position: relative; display: grid; grid-template-rows: 1fr auto; overflow: hidden; border: 1px solid rgba(255,255,255,.3); border-radius: 10px; background: #f0f3ef; color: #14211c; box-shadow: 0 9px 20px rgba(0,0,0,.25); transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease; }
.playing-card:hover, .playing-card:focus-within { transform: translateY(-3px); box-shadow: 0 12px 27px rgba(0,0,0,.36), 0 0 0 2px rgba(121,221,169,.18); }
.playing-card.is-empty { border: 1px dashed rgba(221,241,231,.22); background: rgba(3,22,16,.34); color: rgba(221,241,231,.3); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.playing-card.is-error { border-color: var(--coral); box-shadow: 0 0 0 2px rgba(239,109,120,.18); }
.playing-card.board-card { width: 61px; height: 83px; }
.playing-card.hole-card { width: 112px; height: 151px; border-radius: 14px; }
.rank-input { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; color: inherit; text-align: center; text-transform: uppercase; caret-color: var(--felt); font: 700 27px/1 Georgia, serif; }
.hole-card .rank-input { font-size: 48px; }
.rank-input::placeholder { color: currentColor; opacity: .55; font-weight: 400; }
.suit-control { min-height: 27px; display: flex; align-items: center; justify-content: center; gap: 4px; border: 0; border-top: 1px solid rgba(5,22,16,.1); background: rgba(7,20,16,.055); color: #16231e; cursor: ns-resize; }
.hole-card .suit-control { min-height: 39px; }
.suit-control:hover { background: rgba(121,221,169,.16); }
.suit-control.is-red { color: #d94d59; }
.playing-card.is-empty .suit-control { border-color: rgba(221,241,231,.08); color: rgba(221,241,231,.28); }
.suit-glyph { font-size: 16px; }
.hole-card .suit-glyph { font-size: 21px; }
.suit-name { font-size: 8px; }
.board-card .suit-name { display: none; }

.seat-layer { position: absolute; inset: 0; pointer-events: none; }
.seat { --seat-x: 50%; --seat-y: 50%; position: absolute; left: var(--seat-x); top: var(--seat-y); width: 104px; transform: translate(-50%, -50%); display: grid; justify-items: center; pointer-events: auto; z-index: 4; }
.seat.is-hero { z-index: 5; }
.avatar-wrap { position: relative; }
.avatar-button { position: relative; width: 58px; height: 58px; display: grid; place-items: center; overflow: visible; border: 2px solid rgba(222,240,231,.26); border-radius: 50%; background: linear-gradient(145deg, #294039, #14251f); color: var(--muted); cursor: ns-resize; box-shadow: 0 9px 22px rgba(0,0,0,.38), inset 0 0 0 3px rgba(0,0,0,.2); transition: .18s ease; }
.avatar-button:hover { transform: translateY(-2px); border-color: var(--mint); color: var(--mint-soft); }
.seat.is-hero .avatar-button { width: 66px; height: 66px; border-color: var(--mint); background: linear-gradient(145deg, #2a7657, #154333); color: #fff; box-shadow: 0 10px 25px rgba(0,0,0,.4), 0 0 0 5px rgba(121,221,169,.08); }
.avatar-button svg { width: 29px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; }
.seat.is-out .avatar-button { border-style: dashed; border-color: rgba(239,109,120,.35); background: #101915; color: rgba(239,109,120,.7); box-shadow: none; }
.out-mark { display: none; font: 400 31px/1 ui-sans-serif; }
.seat.is-out .avatar-button svg { display: none; }
.seat.is-out .out-mark { display: block; }
.role-badge { position: absolute; right: -12px; top: -6px; min-width: 27px; height: 21px; display: grid; place-items: center; padding: 0 5px; border: 2px solid var(--bg); border-radius: 7px; background: var(--gold); color: #261d0c; font-size: 8px; font-weight: 800; box-shadow: 0 4px 10px rgba(0,0,0,.35); }
.role-badge.role-bb { background: var(--coral); color: #2b0d11; }
.role-badge.role-btn { min-width: 22px; border-radius: 50%; background: #f0f2ed; color: #18221e; font-family: Georgia, serif; font-style: italic; }
.seat-name { max-width: 100px; margin-top: 5px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
.seat.is-hero .seat-name { color: var(--mint-soft); font-weight: 650; }
.position-label { margin-top: 2px; color: var(--muted-2); font-size: 7px; }
.seat.is-out .position-label { color: rgba(239,109,120,.6); }
.seat-stack { width: 84px; height: 24px; margin-top: 4px; padding: 0 6px; border: 1px solid var(--line); border-radius: 7px; outline: none; background: rgba(3,14,10,.82); color: var(--gold); text-align: center; font-size: 8px; }
.seat-stack:focus { border-color: var(--gold); }
.hero-hand-mini { position: absolute; left: 50%; bottom: 60px; display: flex; transform: translateX(-50%); pointer-events: none; }
.hero-hand-mini span { width: 24px; height: 32px; display: grid; place-items: center; border: 1px solid rgba(0,0,0,.14); border-radius: 4px; background: #eff2ed; color: #16211d; font: 700 11px Georgia, serif; box-shadow: 0 4px 9px rgba(0,0,0,.3); }
.hero-hand-mini span + span { margin-left: -5px; transform: rotate(5deg); }
.hero-hand-mini .red { color: #d84b57; }

.table-foot { min-height: 51px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 24px; border-top: 1px solid var(--line); background: rgba(0,0,0,.08); }
.interaction-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; color: var(--muted); font-size: 8px; }
.interaction-legend span { display: flex; align-items: center; gap: 5px; }
.interaction-legend i { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 6px; font-style: normal; font-size: 6px; font-weight: 800; }
.legend-avatar { border: 1px solid var(--line-strong); border-radius: 50% !important; background: var(--surface-soft); }
.legend-sb { background: var(--gold); color: #231b0c; }
.legend-bb { background: var(--coral); color: #2b0d11; }
.legend-out { border: 1px dashed rgba(239,109,120,.4); color: var(--coral); font-size: 12px !important; }
.table-foot > p { margin: 0; color: var(--muted-2); font-size: 8px; }

.bottom-layout { display: grid; grid-template-columns: minmax(360px,.78fr) minmax(0,1.22fr); gap: 16px; margin-top: 16px; align-items: stretch; }
.hole-panel, .result-panel { padding: 23px; border-radius: var(--radius-lg); }
.panel-header { min-height: 48px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.clear-button { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 9px; }
.clear-button:hover { color: var(--text); }
.clear-button svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.hand-entry { min-height: 217px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 24px; }
.hole-cards { display: flex; gap: 9px; }
.entry-copy { min-width: 0; }
.required-label { display: inline-block; padding: 4px 7px; border-radius: 5px; background: rgba(121,221,169,.08); color: var(--mint); font-size: 7px; }
.entry-copy h3 { margin: 9px 0 6px; font: 500 17px Georgia, "Songti SC", serif; }
.entry-copy p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.7; }
.paste-example { display: flex; align-items: center; gap: 7px; margin-top: 12px; color: var(--muted-2); font-size: 7px; }
.paste-example code { padding: 4px 6px; border: 1px solid var(--line); border-radius: 5px; background: rgba(255,255,255,.025); color: var(--mint-soft); font-size: 8px; }
.error-message { min-height: 18px; color: #ff8d96; text-align: center; font-size: 9px; }
.live-calculate { min-height: 49px; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid rgba(121,221,169,.14); border-radius: 12px; background: linear-gradient(90deg, rgba(121,221,169,.065), rgba(121,221,169,.018)); }
.live-calculate-icon { flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: rgba(121,221,169,.1); }
.live-calculate-icon i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px rgba(121,221,169,.08); }
.live-calculate.is-running i { animation: pulse .75s ease-in-out infinite alternate; }
@keyframes pulse { to { transform: scale(.72); box-shadow: 0 0 0 8px rgba(121,221,169,.025); } }
.live-calculate > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.live-calculate strong { font-size: 10px; }
.live-calculate small { overflow: hidden; color: var(--muted-2); text-overflow: ellipsis; white-space: nowrap; font-size: 7px; }
.live-calculate > b { margin-left: auto; color: var(--mint); font-size: 8px; }
.privacy-note { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 9px 0 0; color: var(--muted-2); font-size: 7px; }
.privacy-note svg { width: 11px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }

.result-panel { min-height: 390px; }
.simulation-badge { max-width: 230px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 8px; text-align: right; }
.simulation-badge.is-running { color: var(--mint); border-color: rgba(121,221,169,.2); background: rgba(121,221,169,.05); }
.result-idle { min-height: 310px; display: grid; align-content: center; justify-items: center; text-align: center; }
.idle-cards { position: relative; width: 130px; height: 78px; }
.idle-cards > span { position: absolute; width: 48px; height: 65px; display: grid; place-items: center; border-radius: 8px; background: #eff2ed; color: #16211d; font: 700 20px Georgia, serif; box-shadow: 0 9px 20px rgba(0,0,0,.3); }
.idle-cards > span:first-child { left: 16px; transform: rotate(-10deg); }
.idle-cards > span:last-child { right: 16px; transform: rotate(10deg); color: #d74c58; }
.idle-cards small { position: absolute; margin: 28px 0 0 -13px; font-size: 13px; }
.idle-cards i { position: absolute; z-index: 2; left: 50%; top: 24px; width: 30px; height: 30px; display: grid; place-items: center; transform: translateX(-50%); border-radius: 50%; background: var(--surface-raised); color: var(--mint); font: normal 18px Georgia, serif; }
.result-idle h3 { margin: 16px 0 6px; font: 500 18px Georgia, "Songti SC", serif; }
.result-idle p { max-width: 330px; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.7; }
.result-content { animation: reveal .3s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(4px); } }
.result-overview { display: grid; grid-template-columns: 124px minmax(150px,1fr) minmax(180px,.9fr); align-items: center; gap: 18px; padding: 20px 0; }
.equity-ring { --equity: 0deg; position: relative; width: 116px; height: 116px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--mint) 0 var(--equity), rgba(121,221,169,.09) var(--equity)); box-shadow: 0 0 25px rgba(121,221,169,.07); }
.equity-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--line); }
.equity-ring > div { position: relative; z-index: 1; text-align: center; }
.equity-ring strong { display: block; font: 500 28px Georgia, serif; }
.equity-ring span { color: var(--muted); font-size: 7px; }
.strength-copy > span { color: var(--mint); font-size: 7px; letter-spacing: .1em; }
.strength-copy h3 { margin: 6px 0 5px; font: 500 18px Georgia, "Songti SC", serif; }
.strength-copy p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.55; }
.outcome-grid { display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--line); border-radius: 11px; }
.outcome-grid > div { padding: 10px; }
.outcome-grid > div + div { border-left: 1px solid var(--line); }
.outcome-grid span { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 7px; }
.outcome-grid i { width: 4px; height: 4px; border-radius: 50%; }
.win-dot { background: var(--mint); }.tie-dot { background: var(--gold); }.loss-dot { background: var(--coral); }
.outcome-grid strong { display: block; margin-top: 4px; font: 500 13px Georgia, serif; }
.result-details { display: grid; grid-template-columns: 1.08fr .92fr; gap: 13px; }
.distribution-block, .strategy-card { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.012); }
.subheading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.subheading h3, .strategy-card h3 { margin: 0; font-size: 10px; }
.subheading p { margin: 3px 0 0; color: var(--muted-2); font-size: 7px; }
.subheading > span { padding: 3px 6px; border-radius: 4px; background: rgba(255,255,255,.035); color: var(--muted); font-size: 7px; }
.distribution-list { display: grid; gap: 5px; }
.distribution-row { display: grid; grid-template-columns: 55px minmax(0,1fr) 35px; align-items: center; gap: 7px; color: var(--muted); font-size: 7px; }
.distribution-row.is-leading { color: var(--text); }
.bar-track { height: 4px; border-radius: 3px; background: rgba(255,255,255,.055); }
.bar-fill { height: 100%; border-radius: inherit; background: var(--mint-dark); }
.is-leading .bar-fill { background: var(--mint); }
.distribution-row strong { text-align: right; font: 500 8px Georgia, serif; }
.strategy-card { background: linear-gradient(135deg, rgba(120,173,213,.055), rgba(255,255,255,.01)); }
.strategy-topline { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.strategy-topline > span { display: flex; align-items: center; gap: 5px; color: var(--blue); font-size: 7px; }
.strategy-topline i { width: 4px; height: 4px; border-radius: 50%; background: var(--blue); }
.strategy-topline b { color: var(--muted); font-size: 7px; font-weight: 500; }
.strategy-card h3 { margin-top: 10px; font: 500 14px Georgia, "Songti SC", serif; }
.strategy-card > p { margin: 5px 0 0; color: var(--muted); font-size: 7px; line-height: 1.65; }
.result-note { margin: 10px 0 0; color: var(--muted-2); text-align: right; font-size: 7px; }

footer { width: min(1240px, calc(100% - 40px)); min-height: 70px; margin: 28px auto 0; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 8px; }

.modal { width: min(650px, calc(100% - 28px)); max-height: min(88vh, 850px); padding: 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: 0 30px 110px rgba(0,0,0,.6); }
.help-modal { width: min(720px, calc(100% - 28px)); }
.modal::backdrop { background: rgba(0,7,4,.76); backdrop-filter: blur(8px); }
.modal-shell { max-height: min(88vh,850px); display: flex; flex-direction: column; }
.modal-header { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 21px 24px 18px; border-bottom: 1px solid var(--line); }
.modal-close { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.02); color: var(--muted); cursor: pointer; }
.modal-close:hover { color: var(--text); }
.modal-close svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.modal-body { overflow-y: auto; padding: 21px 24px 25px; scrollbar-width: thin; scrollbar-color: var(--surface-soft) transparent; }
.setting-section + .setting-section { margin-top: 23px; padding-top: 23px; border-top: 1px solid var(--line); }
.setting-title h3, .help-body h3 { margin: 0; font-size: 12px; }
.setting-title p { margin: 4px 0 0; color: var(--muted); font-size: 8px; }
.mode-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 12px; }
.mode-option { position: relative; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.mode-option.is-selected { border-color: rgba(121,221,169,.3); background: rgba(121,221,169,.05); }
.mode-option input, .context-options input { position: absolute; opacity: 0; }
.deck-mark { flex: 0 0 auto; width: 34px; height: 42px; display: grid; place-items: center; border-radius: 6px; background: #edf2ed; color: #17231e; font: 700 14px Georgia, serif; }
.deck-mark.short { color: #225d46; background: #dff3e8; }
.mode-option > span:nth-child(3) { min-width: 0; display: grid; gap: 3px; }
.mode-option b { font-size: 9px; }.mode-option small { color: var(--muted); font-size: 7px; line-height: 1.4; }
.mode-option > i { width: 12px; height: 12px; margin-left: auto; border: 1px solid var(--line-strong); border-radius: 50%; }
.mode-option.is-selected > i { border: 4px solid var(--mint); }
.rule-summary { margin-top: 9px; padding: 9px 11px; border-radius: 8px; background: rgba(255,255,255,.025); color: var(--muted); font-size: 8px; }
.context-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-top: 11px; }
.context-options label { position: relative; cursor: pointer; }
.context-options span { min-height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-size: 8px; }
.context-options input:checked + span { border-color: rgba(121,221,169,.3); background: rgba(121,221,169,.06); color: var(--mint-soft); }
.tournament-stage { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; }
.tournament-stage label { color: var(--muted); font-size: 8px; }
.tournament-stage select { padding: 6px 25px 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); color: var(--text); font-size: 8px; }
.blind-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 12px; }
.blind-fields label { display: grid; gap: 5px; color: var(--muted); font-size: 8px; }
.blind-fields input { width: 100%; height: 35px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; outline: none; background: rgba(255,255,255,.025); color: var(--text); font-size: 9px; }
.blind-fields input:focus { border-color: var(--mint-dark); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 12px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.toggle-row > span { display: grid; gap: 3px; }.toggle-row b { font-size: 9px; }.toggle-row small { color: var(--muted); font-size: 7px; }
.toggle-row input { position: absolute; opacity: 0; }
.toggle-row > i { position: relative; flex: 0 0 auto; width: 35px; height: 20px; border-radius: 999px; background: var(--surface-soft); transition: .18s ease; }
.toggle-row > i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: .18s ease; }
.toggle-row input:checked + i { background: var(--mint-dark); }.toggle-row input:checked + i::after { left: 18px; background: var(--mint-soft); }
.depth-output { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; padding: 9px 11px; border-radius: 8px; background: rgba(120,173,213,.045); color: var(--muted); font-size: 8px; }
.depth-output strong { color: var(--blue); font: 500 13px Georgia, serif; }
.help-body section + section { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.help-body p { margin: 6px 0 0; color: var(--muted); font-size: 9px; line-height: 1.75; }
.help-highlight { display: flex; gap: 12px; padding: 13px; border: 1px solid rgba(121,221,169,.14); border-radius: 11px; background: rgba(121,221,169,.04); }
.help-highlight > span { flex: 0 0 auto; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; background: rgba(121,221,169,.09); color: var(--mint); }
.help-body .help-highlight { border-top: 1px solid rgba(121,221,169,.14); margin-top: 0; padding-top: 13px; }
.odds-table { margin-top: 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; }
.odds-table > div { display: grid; grid-template-columns: 1.3fr .7fr .7fr; }
.odds-table > div + div { border-top: 1px solid var(--line); }
.odds-table span, .odds-table b { padding: 8px 9px; color: var(--muted); font-size: 8px; font-weight: 500; }
.odds-table span + span { border-left: 1px solid var(--line); text-align: center; }

@media (max-width: 980px) {
  .page-intro { align-items: flex-start; }
  .bottom-layout { grid-template-columns: 1fr; }
  .result-overview { grid-template-columns: 116px 1fr 220px; }
  .poker-room { height: 500px; }
}

@media (max-width: 720px) {
  .topbar, .app-shell, footer { width: calc(100% - 24px); }
  .topbar { min-height: 62px; }
  .online-pill, .top-button span { display: none; }
  .top-button { width: 36px; justify-content: center; padding: 0; }
  .page-intro { display: block; padding: 34px 3px 21px; }
  .page-intro h1 { font-size: 31px; }
  .page-intro > p { margin-top: 13px; }
  .surface { border-radius: 19px; }
  .table-toolbar { grid-template-columns: 1fr auto; gap: 12px; padding: 14px 15px; }
  .table-stats { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .poker-room { height: 590px; overflow: hidden; }
  .poker-table { left: 4%; right: 4%; top: 29%; bottom: 25%; border-width: 10px; }
  .playing-card.board-card { width: 45px; height: 64px; border-radius: 7px; }
  .board-cards { gap: 4px; }
  .board-card .rank-input { font-size: 20px; }
  .board-card .suit-control { min-height: 21px; }
  .community-zone > p { display: none; }
  .seat { width: 72px; }
  .avatar-button { width: 44px; height: 44px; }
  .seat.is-hero .avatar-button { width: 52px; height: 52px; }
  .avatar-button svg { width: 22px; }
  .role-badge { right: -12px; min-width: 24px; height: 19px; }
  .seat-name { max-width: 70px; }
  .seat-stack { width: 68px; }
  .hero-hand-mini { bottom: 48px; }
  .table-foot { align-items: flex-start; padding: 11px 14px; }
  .interaction-legend { gap: 8px 12px; }
  .table-foot > p { max-width: 120px; text-align: right; line-height: 1.5; }
  .hole-panel, .result-panel { padding: 17px 14px; }
  .hand-entry { grid-template-columns: auto 1fr; gap: 15px; }
  .playing-card.hole-card { width: 86px; height: 121px; }
  .hole-card .rank-input { font-size: 39px; }
  .result-overview { grid-template-columns: 105px 1fr; }
  .outcome-grid { grid-column: 1 / -1; }
  .result-details { grid-template-columns: 1fr; }
  .modal-header, .modal-body { padding-left: 17px; padding-right: 17px; }
}

@media (max-width: 480px) {
  .page-intro h1 { font-size: 28px; }
  .mode-pill span { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .poker-room { height: 550px; }
  .poker-table { top: 30%; bottom: 25%; }
  .felt-mark { display: none; }
  .seat { width: 62px; }
  .avatar-button { width: 40px; height: 40px; }
  .seat.is-hero .avatar-button { width: 48px; height: 48px; }
  .seat-name, .position-label { font-size: 6px; }
  .playing-card.board-card { width: 41px; height: 59px; }
  .hand-entry { grid-template-columns: 1fr; justify-items: center; padding: 18px 0 12px; text-align: center; }
  .entry-copy p { max-width: 300px; }
  .paste-example { justify-content: center; }
  .playing-card.hole-card { width: 102px; height: 137px; }
  .mode-options { grid-template-columns: 1fr; }
  .context-options { grid-template-columns: 1fr; }
  footer { flex-direction: column; justify-content: center; gap: 6px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
