/* 홀덤 레인지 랩 — 솔버 앱형 화면 (왼쪽 메뉴 · 액션 라인 · 13×13 표 · 전략 패널)
   포인트 색: 앰버 골드 / 행동 색: 빨강 = 올인·레이즈·3벳·4벳, 초록 = 콜, 파랑 = 폴드
   기본은 어두운 화면, 밝은 화면은 기기 설정 또는 버튼으로 전환 */
:root {
  --bg: #121317;
  --side: #0b0c0f;
  --panel: #1a1c22;
  --panel-2: #23262e;
  --panel-3: #2c3039;
  --line: #2c3039;
  --line-2: #3d424d;
  --fg: #eef0f3;
  --fg-2: #c5cad3;
  --muted: #8f96a3;
  --accent: #f0b232;
  --accent-ink: #f6c45a;
  --accent-soft: rgba(240, 178, 50, 0.14);
  --on-accent: #1b1405;
  --raise: #e3533a;
  --call: #3aa86a;
  --fold: #3f6fa6;
  --r1: #e2703b; --r2: #d0432c; --r3: #9e2a20; /* 3벳 크기: 작게 → 크게 */
  --cell-off: #262931;
  --cell-ink: #ffffff;
  --mask: #17191e;
  --mask-ink: #454a55;
  --g0: #3cc184;
  --g1: #8ccf5c;
  --g2: #e6ad41;
  --g3: #f07a3a;
  --g4: #e5484d;
  --felt: #15362a;
  --felt-2: #1d4a39;
  --rail: #2a2d33;
  --seat: #1f2229;
  --card: #f6f1e4;
  --suit-s: #16171b;
  --suit-h: #d0312a;
  --suit-d: #2563c4;
  --suit-c: #1d8a4b;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --f-body: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --side-w: 78px;
  --r: 12px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #eef0f3; --side: #ffffff; --panel: #ffffff; --panel-2: #f2f4f7; --panel-3: #e6e9ee; --line: #dde1e7; --line-2: #c4c9d2;
    --fg: #121417; --fg-2: #353a45; --muted: #5f6674;
    --accent: #b27a0c; --accent-ink: #8f6107; --accent-soft: rgba(178, 122, 12, 0.12); --on-accent: #ffffff;
    --raise: #d6432b; --call: #1f9a5e; --fold: #3a6ea8; --cell-off: #e3e6eb; --mask: #f6f7f9; --mask-ink: #c4c8d0;
    --r1: #dc6a35; --r2: #c63a25; --r3: #96251b;
    --g0: #18884f; --g1: #5f9e2a; --g2: #b97a07; --g3: #c95a1a; --g4: #cf3523;
    --felt: #1d5b44; --felt-2: #277052; --rail: #3b3f46; --seat: #ffffff;
    --shadow: 0 2px 6px rgba(18, 20, 23, 0.06), 0 10px 24px rgba(18, 20, 23, 0.06);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #eef0f3; --side: #ffffff; --panel: #ffffff; --panel-2: #f2f4f7; --panel-3: #e6e9ee; --line: #dde1e7; --line-2: #c4c9d2;
  --fg: #121417; --fg-2: #353a45; --muted: #5f6674;
  --accent: #b27a0c; --accent-ink: #8f6107; --accent-soft: rgba(178, 122, 12, 0.12); --on-accent: #ffffff;
  --raise: #d6432b; --call: #1f9a5e; --fold: #3a6ea8; --cell-off: #e3e6eb; --mask: #f6f7f9; --mask-ink: #c4c8d0;
  --r1: #dc6a35; --r2: #c63a25; --r3: #96251b;
  --g0: #18884f; --g1: #5f9e2a; --g2: #b97a07; --g3: #c95a1a; --g4: #cf3523;
  --felt: #1d5b44; --felt-2: #277052; --rail: #3b3f46; --seat: #ffffff;
  --shadow: 0 2px 6px rgba(18, 20, 23, 0.06), 0 10px 24px rgba(18, 20, 23, 0.06);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { background: var(--bg); color: var(--fg); }
body { margin: 0; font-family: var(--f-body); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 40; background: var(--bg); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* ---------- 앱 틀: 왼쪽 메뉴 ---------- */
.side { position: fixed; left: 0; top: 0; bottom: 0; width: calc(var(--side-w) + env(safe-area-inset-left, 0px)); padding: calc(env(safe-area-inset-top, 0px) + 14px) 0 calc(env(safe-area-inset-bottom, 0px) + 14px) env(safe-area-inset-left, 0px); background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 18px; z-index: 30; }
.logo { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.logo span { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: 20px; font-weight: 800; }
.logo b { font-size: 9.5px; letter-spacing: 0.12em; line-height: 1.2; text-align: center; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 0 8px; }
.nav button, .theme-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 2px 7px; border: 0; border-radius: 10px; background: none; color: var(--muted); font-size: 12px; font-weight: 700; width: 100%; }
.nav button:hover, .theme-btn:hover { color: var(--fg); background: var(--panel-2); }
.nav button[aria-selected="true"] { color: var(--accent-ink); background: var(--accent-soft); }
.nav svg, .theme-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.nav svg .fill, .theme-btn svg .fill { fill: currentColor; stroke: none; }
.theme-btn { margin-top: auto; width: calc(100% - 16px); }
.content { margin-left: calc(var(--side-w) + env(safe-area-inset-left, 0px)); padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); padding-block: 18px 48px; max-width: 1420px; }
.view { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (max-width: 760px) {
  .side { top: auto; right: 0; width: auto; height: auto; flex-direction: row; padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 6px) max(8px, env(safe-area-inset-left, 0px)); border-right: 0; border-top: 1px solid var(--line); gap: 4px; }
  .logo { display: none; }
  .nav { flex-direction: row; padding: 0; gap: 2px; flex: 1; }
  .nav button, .theme-btn { padding: 6px 2px; font-size: 11.5px; }
  .theme-btn { margin-top: 0; width: 64px; flex-shrink: 0; }
  .content { margin-left: 0; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 14px calc(84px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- 공통 조각 ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.topbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chipsel { display: inline-flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; padding: 0 4px 0 12px; height: 40px; min-width: 0; }
.chipsel:focus-within { border-color: var(--accent); }
.chipsel span { font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.chipsel select { border: 0; background: transparent; font-weight: 800; font-size: 14.5px; color: var(--fg); padding: 0 26px 0 2px; height: 100%; appearance: none; -webkit-appearance: none; cursor: pointer; max-width: 100%;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 13px) 52%, calc(100% - 8px) 52%; background-size: 5px 5px; background-repeat: no-repeat; outline: none; }
.chipsel select option { background: var(--panel); color: var(--fg); }
.chipsel.num { padding-right: 12px; }
.chipsel.num input { width: 58px; border: 0; background: transparent; font-family: var(--f-mono); font-weight: 600; font-size: 16px; color: var(--fg); outline: none; }
.chipsel em { font-style: normal; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper > button { width: 36px; height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); font-size: 19px; font-weight: 700; line-height: 1; }
.stepper > button:hover:not(:disabled) { border-color: var(--accent); }
.stepper > button:disabled { opacity: 0.35; cursor: default; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 13px; border-radius: 7px; color: var(--muted); font-size: 13.5px; font-weight: 800; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.viewmode { margin-left: auto; }
.btn { border: 1px solid var(--line-2); background: var(--panel-2); color: var(--fg); padding: 10px 16px; border-radius: 10px; font-weight: 800; font-size: 14px; }
.btn:hover { border-color: var(--accent); }
.btn.accent { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.small { padding: 6px 11px; font-size: 12.5px; }
.badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 800; padding: 2px 9px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.badge.calc { color: var(--g0); } .badge.approx { color: var(--g2); } .badge.mix { color: var(--accent-ink); }
.kbd { font-family: var(--f-mono); font-size: 11.5px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; color: var(--fg-2); background: var(--panel-2); }
.hint { font-size: 13px; color: var(--muted); }
.sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; flex-shrink: 0; }
.sw.raise { background: var(--raise); } .sw.call { background: var(--call); } .sw.fold { background: var(--fold); } .sw.mask { background: var(--mask); box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---------- 액션 라인 ---------- */
.linebar { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.line { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.node { flex: 0 0 auto; min-width: 82px; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 11px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); text-align: left; }
button.node:hover { border-color: var(--line-2); background: var(--panel-2); }
.node .np { font-size: 13px; font-weight: 800; color: var(--fg); }
.node .ns { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); }
.node .na { font-size: 13px; font-weight: 800; margin-top: 3px; }
.node .na.fold { color: var(--fold); } .node .na.raise { color: var(--raise); } .node .na.call { color: var(--call); }
.node.future { opacity: 0.55; }
.node.future .na { color: var(--muted); font-weight: 600; }
.node.cur { border: 2px solid var(--accent); background: var(--accent-soft); min-width: 150px; max-width: min(380px, 80vw); }
.node.cur .np { color: var(--accent-ink); }
.nacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.nacts button { border: 0; border-radius: 6px; padding: 4px 8px; font-size: 12.5px; font-weight: 800; color: #fff; }
.nacts button.fold { background: var(--fold); } .nacts button.call { background: var(--call); } .nacts button.raise { background: var(--raise); }
.nacts button:hover { filter: brightness(1.12); }
.line-note { font-size: 13px; color: var(--accent-ink); }
.line-note:empty { display: none; }

/* ---------- 스터디 본문 ---------- */
.study-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .study-body { grid-template-columns: minmax(0, 1fr); } }
.matrix { display: flex; flex-direction: column; gap: 10px; min-width: 0; max-width: 700px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; font-weight: 700; color: var(--fg-2); align-items: center; min-height: 22px; }
.legend .it { display: inline-flex; align-items: center; gap: 6px; }
.legend .v { font-family: var(--f-mono); color: var(--fg); }
.legend .scale { width: 120px; height: 10px; border-radius: 5px; display: inline-block; }
.grid-wrap { position: relative; }
.grid { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 2px; background: var(--bg); border-radius: 10px; overflow: hidden; }
.cell { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 3px; overflow: hidden; background: var(--cell-off); color: var(--cell-ink); font-family: var(--f-mono); line-height: 1.05; }
.cell .hn { position: absolute; left: 3px; top: 2px; font-size: clamp(9.5px, 1.35vw, 13px); font-weight: 600; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.cell .hv { position: absolute; right: 3px; bottom: 2px; font-size: clamp(8.5px, 1.1vw, 11px); font-weight: 500; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.cell.off .hn, .cell.off .hv { color: var(--fg-2); text-shadow: none; }
.cell.masked { background: var(--mask) !important; }
.cell.masked .hn { color: var(--mask-ink); text-shadow: none; }
.cell:hover { box-shadow: inset 0 0 0 2px var(--fg); z-index: 1; }
.cell.sel { box-shadow: inset 0 0 0 3px var(--accent); z-index: 2; }
.cell.me { box-shadow: inset 0 0 0 3px var(--accent), 0 0 0 2px var(--accent); z-index: 2; }
.busy { position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 80%, transparent); display: grid; place-items: center; border-radius: 10px; z-index: 5; }
.busy .box { display: flex; flex-direction: column; gap: 10px; align-items: center; font-weight: 700; color: var(--fg-2); }
.bar { width: 200px; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.1s linear; }

/* ---------- 전략 패널 ---------- */
.strat { padding: 16px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 14px); min-width: 0; }
@media (max-width: 1000px) { .strat { position: static; } }
.sp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.sp-head h2 { font-size: 17px; }
.sp-sum { font-size: 14.5px; color: var(--fg-2); line-height: 1.6; word-break: keep-all; }
.sp-sum b { color: var(--fg); }
.arows { display: flex; flex-direction: column; gap: 6px; }
.arow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 4px 10px; align-items: center; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); text-align: left; width: 100%; }
.arow:hover { border-color: var(--line-2); }
.arow.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.arow .an { font-weight: 800; font-size: 14.5px; min-width: 0; }
.arow .ap { font-family: var(--f-mono); font-weight: 600; font-size: 15px; }
.arow .ac { font-family: var(--f-mono); font-size: 12px; color: var(--muted); min-width: 64px; text-align: right; }
.arow .abar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--panel-3); overflow: hidden; }
.arow .abar i { display: block; height: 100%; }
.arows .tip { font-size: 12px; color: var(--muted); }
.ptabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.ptabs button { border: 0; background: none; padding: 8px 10px; font-size: 13.5px; font-weight: 800; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ptabs button[aria-selected="true"] { color: var(--accent-ink); border-bottom-color: var(--accent); }
.pt-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hc-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hc-name { font-family: var(--f-mono); font-size: 26px; font-weight: 600; line-height: 1; }
.vchip { font-size: 14px; font-weight: 800; padding: 4px 12px; border-radius: 999px; color: #fff; }
.vchip.raise { background: var(--raise); } .vchip.call { background: var(--call); } .vchip.fold { background: var(--fold); } .vchip.mixed { background: var(--accent); color: var(--on-accent); }
.fbar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--panel-3); }
.fbar i { display: block; height: 100%; }
.flabels { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13.5px; font-weight: 800; }
.flabels .r { color: var(--raise); } .flabels .c { color: var(--call); } .flabels .f { color: var(--fold); }
.why { font-size: 14.5px; color: var(--fg); line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere; }
.why .up { color: var(--g0); font-weight: 800; } .why .down { color: var(--g4); font-weight: 800; }
.combos { display: flex; flex-wrap: wrap; gap: 4px; }
.combo { font-family: var(--f-mono); font-size: 12.5px; font-weight: 600; padding: 2px 6px; border-radius: 5px; background: var(--card); color: #111; }
.combo .s { color: var(--suit-s); } .combo .h { color: var(--suit-h); } .combo .d { color: var(--suit-d); } .combo .c { color: var(--suit-c); }
details.nums > summary { cursor: pointer; font-weight: 800; color: var(--fg-2); font-size: 13.5px; list-style: none; }
details.nums > summary::-webkit-details-marker { display: none; }
details.nums > summary::before { content: "▸ "; color: var(--accent); }
details[open].nums > summary::before { content: "▾ "; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 13.5px; margin: 8px 0 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: var(--f-mono); }
.rline { font-size: 13.5px; line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere; }
.rline b { display: inline-block; padding: 0 8px; border-radius: 5px; color: #fff; font-size: 12.5px; margin-right: 6px; }
.rline b.r { background: var(--raise); } .rline b.c { background: var(--call); }
.rline span { font-family: var(--f-mono); }

/* ---------- 연습 ---------- */
.effline { font-size: 13.5px; color: var(--fg-2); }
.effline b { color: var(--accent-ink); font-family: var(--f-mono); }
.trainer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .trainer { grid-template-columns: minmax(0, 1fr); } }
.tbl { padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.q { font-size: clamp(17px, 2.2vw, 21px); font-weight: 800; line-height: 1.45; word-break: keep-all; }
.q .hl { color: var(--raise); }
.q .hand { font-family: var(--f-mono); color: var(--accent-ink); }
.felt-wrap { padding: 26px 30px 34px; }
.felt { position: relative; width: 100%; max-width: 760px; margin: 0 auto; aspect-ratio: 2 / 1; border-radius: 999px; background: radial-gradient(ellipse at 50% 42%, var(--felt-2), var(--felt) 74%); box-shadow: inset 0 0 0 9px var(--rail), inset 0 0 0 10px rgba(255, 255, 255, 0.06), inset 0 0 36px rgba(0, 0, 0, 0.5); }
.felt .center { position: absolute; left: 50%; top: 36%; transform: translate(-50%, -50%); text-align: center; color: #f4f1e8; }
.felt .pot { font-family: var(--f-mono); font-size: clamp(14px, 2vw, 18px); font-weight: 600; color: #ffd27a; }
.felt .what { font-size: 12.5px; color: #dfe6e1; }
.seat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; min-width: 62px; padding: 5px 9px; border-radius: 10px; background: var(--seat); color: var(--fg); border: 1.5px solid var(--line-2); font-size: 12px; line-height: 1.25; white-space: nowrap; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3); }
.seat .p { font-weight: 800; }
.seat .s { font-family: var(--f-mono); font-size: 11px; color: var(--muted); }
.seat.folded { opacity: 0.42; }
.seat.vill { border-color: var(--raise); }
.seat.vill .s { color: var(--raise); font-weight: 600; }
.seat.hero { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 3px 10px rgba(0, 0, 0, 0.3); }
.seat.hero .s { color: var(--accent-ink); font-weight: 600; }
.seat .dealer { position: absolute; top: -9px; right: -9px; width: 19px; height: 19px; border-radius: 50%; background: #fff; color: #111; font-size: 10px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 1px #999; }
.hero-cards { position: absolute; left: 50%; bottom: 17%; transform: translateX(-50%); display: flex; gap: 6px; }
.card { width: clamp(42px, 6.4vw, 60px); aspect-ratio: 0.72; border-radius: 7px; background: var(--card); display: flex; flex-direction: column; justify-content: space-between; padding: 4px 6px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45); font-family: var(--f-mono); }
.card .rk { font-size: clamp(19px, 2.8vw, 27px); font-weight: 600; line-height: 1; }
.card .su { font-size: clamp(17px, 2.5vw, 24px); line-height: 1; align-self: flex-end; }
.card.s { color: var(--suit-s); } .card.h { color: var(--suit-h); } .card.d { color: var(--suit-d); } .card.c { color: var(--suit-c); }
@media (max-width: 560px) { .felt-wrap { padding: 24px 22px 30px; } .felt { aspect-ratio: 1.5 / 1; } .seat { min-width: 48px; padding: 3px 6px; font-size: 11px; } .hero-cards { bottom: 14%; } }
.actbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.act { border-radius: 12px; padding: 14px 10px; font-weight: 800; font-size: 17px; border: 0; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.act small { font-weight: 700; font-size: 12px; opacity: 0.85; font-family: var(--f-mono); }
.act.fold { background: var(--fold); } .act.call { background: var(--call); } .act.raise { background: var(--raise); }
.act:hover:not(:disabled) { filter: brightness(1.1); }
.act:disabled { cursor: default; opacity: 0.4; }
.act.best { opacity: 1; box-shadow: 0 0 0 3px var(--panel), 0 0 0 6px var(--g0); }
.act.wrong { opacity: 1; box-shadow: 0 0 0 3px var(--panel), 0 0 0 6px var(--g4); }
.act.best small, .act.wrong small { font-family: var(--f-body); font-size: 12.5px; opacity: 1; }
.keys { font-size: 12.5px; color: var(--muted); }
.fb { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.fb-top { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.grade { font-size: clamp(22px, 3vw, 28px); font-weight: 800; line-height: 1.1; }
.grade.g0 { color: var(--g0); } .grade.g1 { color: var(--g1); } .grade.g2 { color: var(--g2); } .grade.g3 { color: var(--g3); } .grade.g4 { color: var(--g4); }
.pill { font-family: var(--f-mono); font-size: 13.5px; font-weight: 600; padding: 3px 11px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); }
.bestline { font-size: 15px; font-weight: 800; }
.bestline .r { color: var(--raise); } .bestline .c { color: var(--call); } .bestline .f { color: var(--fold); }
.fb-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.minigrid { max-width: 520px; display: flex; flex-direction: column; gap: 8px; }
.evtable { border-collapse: collapse; font-size: 13.5px; min-width: 280px; margin-top: 8px; }
.evtable th, .evtable td { padding: 6px 14px 6px 0; text-align: left; border-bottom: 1px solid var(--line); }
.evtable th { color: var(--muted); font-weight: 700; font-size: 12.5px; }
.evtable td.n { text-align: right; font-family: var(--f-mono); }
.evtable tr.best td { font-weight: 800; color: var(--g0); }
.scroll-x { overflow-x: auto; }
.session { padding: 14px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 14px); }
@media (max-width: 1000px) { .session { position: static; } }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; }
.tile .k { font-size: 12px; font-weight: 700; color: var(--muted); }
.tile .v { font-family: var(--f-mono); font-size: 23px; font-weight: 600; }
.tile .v.acc { color: var(--accent-ink); }
.tile .v small { font-size: 12px; color: var(--muted); }
.gdist { display: flex; flex-direction: column; gap: 5px; }
.grow-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 30px; gap: 8px; align-items: center; font-size: 12.5px; font-weight: 700; }
.grow-row .gb { height: 8px; border-radius: 4px; background: var(--panel-3); overflow: hidden; }
.grow-row .gb i { display: block; height: 100%; }
.grow-row .gn { font-family: var(--f-mono); text-align: right; color: var(--fg-2); }
.hist-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hist-h h3 { font-size: 15px; }
.hist { list-style: none; margin: 0; padding: 0; max-height: 380px; overflow-y: auto; display: flex; flex-direction: column; }
.hist li { display: grid; grid-template-columns: 10px 56px minmax(0, 1fr); gap: 8px; align-items: center; padding: 7px 2px; border-top: 1px solid var(--line); font-size: 12.5px; }
.hist li .dot { width: 10px; height: 10px; border-radius: 50%; }
.hist li .h { font-family: var(--f-mono); font-weight: 600; }
.hist li .d { color: var(--fg-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist .empty { display: block; padding: 10px 2px; color: var(--muted); border-top: 1px solid var(--line); }
.bg0 { background: var(--g0); } .bg1 { background: var(--g1); } .bg2 { background: var(--g2); } .bg3 { background: var(--g3); } .bg4 { background: var(--g4); }

/* ---------- 가이드 · 계산법 ---------- */
.doc { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 1000px) { .doc { grid-template-columns: minmax(0, 1fr); } .doc .toc { display: none; } }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 14px); display: flex; flex-direction: column; gap: 2px; padding: 10px; }
.toc a { color: var(--fg-2); text-decoration: none; font-size: 13.5px; padding: 6px 8px; border-radius: 6px; }
.toc a:hover { color: var(--accent-ink); background: var(--panel-2); }
.doc-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; max-width: 980px; }
.doc-hero { display: flex; flex-direction: column; gap: 8px; }
.doc-hero h2 { font-size: clamp(21px, 3vw, 27px); }
.doc-hero p { color: var(--fg-2); max-width: 72ch; }
.band { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.band header { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.band .depth { font-family: var(--f-mono); color: var(--accent-ink); font-size: 13.5px; font-weight: 600; border: 1.5px solid var(--accent); border-radius: 6px; padding: 1px 8px; }
.band h3 { font-size: 17px; }
.band ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 7px; color: var(--fg-2); max-width: 78ch; }
.band li b { color: var(--fg); }
.tag { font-size: 11px; font-weight: 800; color: var(--muted); border: 1px solid var(--line-2); padding: 0 6px; border-radius: 4px; margin-left: 4px; white-space: nowrap; }
.tag.calc { color: var(--g0); border-color: currentColor; } .tag.approx { color: var(--g2); border-color: currentColor; }
.dtable { border-collapse: collapse; font-size: 13.5px; width: 100%; }
.dtable th, .dtable td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.dtable th:first-child, .dtable td:first-child { text-align: left; }
.dtable thead th { color: var(--muted); font-weight: 700; font-size: 12.5px; }
.dtable thead th.grp { color: var(--fg-2); border-bottom: 1px solid var(--line-2); text-align: center; }
.dtable td { font-family: var(--f-mono); }
.dtable td:first-child { font-family: var(--f-body); font-weight: 800; }
.dtable td.txt { text-align: left; font-family: var(--f-body); white-space: normal; min-width: 160px; }
.dtable .heat { display: inline-block; min-width: 52px; padding: 2px 6px; border-radius: 5px; font-weight: 600; }
.doc-body .sub { color: var(--fg-2); font-size: 13.5px; max-width: 78ch; }
.method-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; color: var(--fg-2); max-width: 80ch; }
.method-list b { color: var(--fg); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* 3벳 크기 3개 (작게 · 중간 · 크게) */
.sw.r1, .nacts button.r1, .vchip.r1, .rline b.r1, .act.r1 { background: var(--r1); }
.sw.r2, .nacts button.r2, .vchip.r2, .rline b.r2, .act.r2 { background: var(--r2); }
.sw.r3, .nacts button.r3, .vchip.r3, .rline b.r3, .act.r3 { background: var(--r3); }
.node .na.r1, .flabels .r1, .bestline .r1 { color: var(--r1); }
.node .na.r2, .flabels .r2, .bestline .r2 { color: var(--r2); }
.node .na.r3, .flabels .r3, .bestline .r3 { color: var(--r3); }

/* ---------- 플랍 이후 · ICM ---------- */
.pf-setup { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.pf-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pf-k { font-size: 12.5px; font-weight: 800; color: var(--muted); min-width: 56px; }
.pf-info { font-size: 13px; color: var(--fg-2); line-height: 1.65; word-break: keep-all; }
.pf-info b { color: var(--fg); }
.pf-status { font-size: 13px; color: var(--fg-2); }
.pf-status b { color: var(--fg); font-family: var(--f-mono); }
.pf-bar { width: 160px; }
.warn { color: var(--g3); font-weight: 700; }
.board { display: flex; gap: 6px; }
.slot { width: 44px; height: 56px; border-radius: 8px; border: 1.5px dashed var(--line-2); background: var(--panel-2); display: grid; place-items: center; font-weight: 800; color: var(--muted); font-size: 12px; padding: 0; }
.slot:not(.empty) { border-style: solid; border-color: transparent; background: var(--card); }
.slot.on { border: 2px solid var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.slot .pc { font-size: 16px; background: none; padding: 0; }
.pc { display: inline-block; font-family: var(--f-mono); font-weight: 700; padding: 1px 5px; border-radius: 5px; background: var(--card); color: #111; font-size: 13px; line-height: 1.35; }
.pc.s { color: var(--suit-s); } .pc.h { color: var(--suit-h); } .pc.d { color: var(--suit-d); } .pc.c { color: var(--suit-c); }
.picker { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); max-width: 620px; }
.pk-head { font-size: 13px; font-weight: 800; color: var(--fg-2); margin-bottom: 2px; }
.pk-row { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 3px; }
.pk-row.wrap { display: flex; flex-wrap: wrap; gap: 4px; }
.pk { border: 1px solid var(--line-2); border-radius: 6px; background: var(--card); font-family: var(--f-mono); font-weight: 700; font-size: 12.5px; padding: 6px 0; min-width: 0; }
.pk-row.wrap .pk { padding: 5px 8px; }
.pk.s { color: var(--suit-s); } .pk.h { color: var(--suit-h); } .pk.d { color: var(--suit-d); } .pk.c { color: var(--suit-c); }
.pk:disabled { opacity: 0.25; cursor: default; }
.pk:hover:not(:disabled) { outline: 2px solid var(--accent); }
.linkbtn { border: 0; background: none; color: var(--accent-ink); font-weight: 800; padding: 0; text-decoration: underline; }
.ck { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--fg-2); }
.ck input { accent-color: var(--accent); width: 16px; height: 16px; }
.dim { opacity: 0.45; }
.pf-street { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-right: 10px; margin-right: 2px; border-right: 1px solid var(--line); }
.node.street { background: var(--panel-2); }
.node .cards { display: flex; gap: 3px; margin-top: 3px; }
.seg.mini { margin-left: auto; padding: 2px; }
.seg.mini button { padding: 3px 10px; font-size: 12.5px; }
.crows { display: flex; flex-direction: column; gap: 8px; }
.crow { display: grid; grid-template-columns: auto auto minmax(60px, 1fr); gap: 4px 6px; align-items: center; font-size: 12.5px; }
.crow .fbar { height: 10px; }
.crow .cev { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--fg-2); font-family: var(--f-mono); font-size: 12px; }
.crow .cev b { font-weight: 500; } .crow .cev b.best { color: var(--g0); font-weight: 700; }
.crow.off { opacity: 0.5; }
.howto { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--fg-2); }
.seatin { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.seatin .chipsel.num { padding-right: 8px; }
.seatin .chipsel.num input { width: 50px; }
.icm-tablewrap { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.icm-tablewrap h3 { font-size: 15px; }
.matrix > .topbar { gap: 6px; }
.method-list a { color: var(--accent-ink); }
@media (max-width: 760px) {
  .nav button span { font-size: 10.5px; white-space: nowrap; }
  .theme-btn { width: 52px; }
  .pf-k { min-width: 0; width: 100%; }
}
