/* 로로레인지랩 — 솔버 앱형 화면 (왼쪽 메뉴 · 액션 라인 · 13×13 표 · 전략 패널)
   포인트 색: 보라 (#8e7cff, 밝은 화면 #5b47e0) / 행동 색: 빨강 = 올인·레이즈·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: #8e7cff;
  --accent-ink: #b3a7ff;
  --accent-soft: rgba(142, 124, 255, 0.16);
  --on-accent: #0b0d12;
  --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: #5b47e0; --accent-ink: #4a37c8; --accent-soft: rgba(91, 71, 224, 0.10); --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: #5b47e0; --accent-ink: #4a37c8; --accent-soft: rgba(91, 71, 224, 0.10); --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%; }
}

/* ================= 메뉴 아이콘 (assets/icons, Higgsfield 생성) ================= */
.logo { border: 0; background: none; padding: 0; cursor: pointer; }
.logo img { width: 40px; height: 40px; transition: transform .6s cubic-bezier(.16, 1, .3, 1); }
.logo:hover img { transform: rotate(-8deg) scale(1.06); }
.nav img, .theme-btn img { width: 26px; height: 26px; transition: transform .5s cubic-bezier(.16, 1, .3, 1); }
.nav button:hover img, .theme-btn:hover img { transform: translateY(-2px) scale(1.06); }
#tab-home { display: none; } /* 넓은 화면은 위 로고가 처음 화면 버튼 */
@media (max-width: 760px) { #tab-home { display: flex; } }

/* ================= 처음 화면 (js/home.js) — 접두어 h- ================= */
body.is-home .side { display: none; }
body.is-home .content { margin-left: 0; max-width: none; padding-block: 0 48px; }
#view-home {
  --h-bg2: #0D0F15; --h-panel: rgba(255,255,255,.035); --h-panel-2: rgba(255,255,255,.055);
  --h-hair: rgba(255,255,255,.09); --h-hair-2: rgba(255,255,255,.18);
  --h-fg2: #AAB0C0; --h-acc: #8E7CFF; --h-acc-2: #B3A7FF; --h-on: #0B0D12; --h-gold: #D8C08C;
  --h-ruby: #E0384F; --h-sapph: #3A73F0; --h-emer: #22A866; --h-ease: cubic-bezier(.16, 1, .3, 1);
  display: block; font-size: 17px; line-height: 1.6; word-break: keep-all;
}
:root[data-theme="light"] #view-home {
  --h-bg2: #FFFFFF; --h-panel: rgba(255,255,255,.72); --h-panel-2: #FFFFFF; --h-hair: rgba(22,20,40,.10); --h-hair-2: rgba(22,20,40,.20);
  --h-fg2: #4A5062; --h-acc: #5B47E0; --h-acc-2: #6B58EA; --h-on: #FFFFFF; --h-gold: #8E6F33;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) #view-home {
    --h-bg2: #FFFFFF; --h-panel: rgba(255,255,255,.72); --h-panel-2: #FFFFFF; --h-hair: rgba(22,20,40,.10); --h-hair-2: rgba(22,20,40,.20);
    --h-fg2: #4A5062; --h-acc: #5B47E0; --h-acc-2: #6B58EA; --h-on: #FFFFFF; --h-gold: #8E6F33;
  }
}
#view-home::before {
  content: ""; position: fixed; inset: -10%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 34% at 14% 8%, color-mix(in srgb, var(--h-acc) 24%, transparent), transparent 70%),
    radial-gradient(30% 28% at 72% 14%, color-mix(in srgb, var(--h-sapph) 12%, transparent), transparent 70%),
    radial-gradient(34% 30% at 88% 92%, color-mix(in srgb, var(--h-emer) 10%, transparent), transparent 70%);
}
#view-home img { display: block; }
#view-home :focus-visible { outline: 2px solid var(--h-acc); outline-offset: 4px; }
.h-wrap { max-width: 1200px; margin: 0 auto; padding: 0 12px; }
.h-top { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.h-logo { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: .2em; font-size: 14px; }
.h-logo img { width: 44px; height: 44px; }
.h-top nav { display: flex; gap: 10px; }
.h-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 18px 0 10px;
  border-radius: 14px; border: 1px solid var(--h-hair); background: var(--h-panel); font-weight: 600; font-size: 16px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: border-color .4s var(--h-ease), background-color .4s var(--h-ease), transform .3s var(--h-ease);
}
.h-chip img { width: 34px; height: 34px; transition: transform .6s var(--h-ease); }
.h-chip:hover { border-color: var(--h-hair-2); background: var(--h-panel-2); }
.h-chip:hover img { transform: translateY(-2px) rotate(-6deg); }
.h-chip:active { transform: scale(.97); }
.h-title { font-size: 44px; line-height: 1.2; letter-spacing: -.02em; margin: 30px 0 8px; font-weight: 800; }
.h-lead { color: var(--h-fg2); font-size: 18px; margin: 0 0 22px; }
.h-rise { animation: h-rise .9s var(--h-ease) both; animation-delay: var(--d, 0ms); }
@keyframes h-rise { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }

.h-resume {
  display: inline-flex; align-items: center; gap: 14px; padding: 8px 22px 8px 8px; margin: 0 0 30px; text-align: left;
  border-radius: 14px; border: 1px solid var(--h-hair); background: var(--h-panel);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: border-color .4s var(--h-ease), background-color .4s var(--h-ease);
}
.h-resume img { width: 48px; height: 48px; transition: transform .9s var(--h-ease); }
.h-resume b { display: block; font-size: 17px; }
.h-resume small { display: block; color: var(--h-fg2); font-size: 15px; }
.h-resume .h-arr { margin-left: 8px; color: var(--h-fg2); transition: transform .5s var(--h-ease), color .4s; }
.h-resume:hover { border-color: color-mix(in srgb, var(--h-acc) 60%, var(--h-hair)); background: color-mix(in srgb, var(--h-acc) 8%, var(--h-panel)); }
.h-resume:hover img { transform: rotate(-200deg); }
.h-resume:hover .h-arr { transform: translateX(4px); color: var(--fg); }

.h-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; perspective: 1200px; }
.h-mode {
  position: relative; display: flex; min-height: 440px; padding: 0; border: 0; background: none; text-align: left;
  border-radius: 24px; transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--press, 1));
  transition: transform .8s var(--h-ease);
}
.h-mode.tilting { transition: transform .12s linear; }
.h-mode:active { --press: .985; }
.h-shell {
  position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(95% 62% at 50% 108%, color-mix(in srgb, var(--glow) 42%, transparent) 0%, transparent 64%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.012) 42%, rgba(255,255,255,0)),
    var(--h-bg2);
  border: 1px solid var(--h-hair);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 34px 70px -40px color-mix(in srgb, var(--glow) 80%, transparent);
  transition: border-color .6s var(--h-ease), box-shadow .6s var(--h-ease);
}
.h-shell::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .5s var(--h-ease);
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 30%), rgba(255,255,255,.11), transparent 62%);
}
.h-shell::after {
  content: ""; position: absolute; inset: -40% -70%; transform: translateX(-55%);
  background: linear-gradient(105deg, transparent 43%, rgba(255,255,255,.13) 50%, transparent 57%);
  transition: transform 1.3s var(--h-ease);
}
.h-mode:hover .h-shell::before, .h-mode:focus-visible .h-shell::before { opacity: 1; }
.h-mode:hover .h-shell::after, .h-mode:focus-visible .h-shell::after { transform: translateX(55%); }
.h-mode:hover .h-shell, .h-mode:focus-visible .h-shell {
  border-color: color-mix(in srgb, var(--glow) 55%, var(--h-hair));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 44px 90px -40px color-mix(in srgb, var(--glow) 95%, transparent);
}
.h-content { position: relative; display: flex; flex-direction: column; width: 100%; padding: 22px 26px 26px; transform-style: preserve-3d; }
.h-idx { font-size: 22px; line-height: 1; color: var(--h-gold); font-variant-emoji: text; transform: translateZ(20px); }
.h-art { flex: 1; display: grid; place-items: center; transform: translateZ(70px); }
.h-art img {
  width: min(76%, 236px); height: auto; aspect-ratio: 1;
  filter: drop-shadow(0 26px 30px color-mix(in srgb, var(--glow) 42%, transparent));
  transition: transform .9s var(--h-ease), filter .6s var(--h-ease);
}
.h-mode:hover .h-art img, .h-mode:focus-visible .h-art img { transform: translateY(-12px) scale(1.06); filter: drop-shadow(0 38px 36px color-mix(in srgb, var(--glow) 58%, transparent)); }
.h-txt { transform: translateZ(36px); }
.h-ttl { display: block; margin: 0 0 4px; font-size: 28px; line-height: 1.25; letter-spacing: -.01em; font-weight: 800; }
.h-desc { display: block; color: var(--h-fg2); font-size: 16px; min-height: 3.2em; }
.h-go { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-weight: 700; opacity: 0; transform: translateX(-8px); transition: opacity .5s var(--h-ease), transform .5s var(--h-ease); }
.h-mode:hover .h-go, .h-mode:focus-visible .h-go { opacity: 1; transform: none; }

.h-setup { max-width: 880px; }
.h-back { margin-top: 18px; }
.h-back:hover img { transform: translateX(-4px); }
.h-head { display: flex; align-items: center; gap: 24px; margin: 22px 0 26px; }
.h-head img { width: 124px; height: 124px; flex: none; filter: drop-shadow(0 20px 26px color-mix(in srgb, var(--glow) 48%, transparent)); }
.h-head .h-title { margin: 0; font-size: 40px; }
.h-head p { margin: 4px 0 0; color: var(--h-fg2); font-size: 17px; }
.h-panel {
  border-radius: 24px; border: 1px solid var(--h-hair); background: var(--h-panel); padding: 26px 26px 8px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.h-panel fieldset { border: 0; padding: 0; margin: 0 0 24px; }
.h-panel legend { padding: 0; margin-bottom: 12px; font-weight: 800; font-size: 18px; }
.h-opts { display: flex; flex-wrap: wrap; gap: 10px; }
.h-opt {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 60px; min-width: 96px; padding: 0 22px;
  border-radius: 14px; border: 1px solid var(--h-hair); background: var(--h-panel-2); font-size: 18px; font-weight: 700; white-space: nowrap;
  transition: border-color .4s var(--h-ease), background-color .4s var(--h-ease), box-shadow .5s var(--h-ease), translate .4s var(--h-ease);
}
.h-opt.has-icon { padding: 0 22px 0 10px; }
.h-opt img { width: 44px; height: 44px; transition: transform .6s var(--h-ease); }
.h-opt:hover { border-color: var(--h-hair-2); translate: 0 -2px; }
.h-opt:hover img { transform: scale(1.1) rotate(-5deg); }
.h-opt:active { translate: 0 0; }
.h-opt[aria-pressed="true"] {
  border-color: var(--h-acc); background: color-mix(in srgb, var(--h-acc) 15%, var(--h-panel-2));
  box-shadow: inset 0 0 0 1px var(--h-acc), 0 14px 34px -18px var(--h-acc);
}
.h-hint { color: var(--h-fg2); margin: -10px 0 22px; }
.h-gobar { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin: 26px 0 0; }
.h-sum { font-size: 18px; color: var(--h-fg2); }
.h-sum b { color: var(--fg); }
.h-primary {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 32px; white-space: nowrap;
  border: 0; border-radius: 14px; color: var(--h-on); font-size: 18px; font-weight: 800;
  background: linear-gradient(135deg, var(--h-acc-2), var(--h-acc));
  box-shadow: 0 18px 44px -20px var(--h-acc), inset 0 1px 0 rgba(255,255,255,.35);
  transition: box-shadow .5s var(--h-ease), transform .3s var(--h-ease);
}
.h-primary::after {
  content: ""; position: absolute; inset: -50% -80%; transform: translateX(-60%); pointer-events: none;
  background: linear-gradient(105deg, transparent 44%, rgba(255,255,255,.45) 50%, transparent 56%); transition: transform 1s var(--h-ease);
}
.h-primary:hover::after { transform: translateX(60%); }
.h-primary:active { transform: scale(.98); }
.h-primary .h-arr { transition: transform .5s var(--h-ease); }
.h-primary:hover .h-arr { transform: translateX(5px); }

::view-transition-old(root) { animation: h-vt-out .38s cubic-bezier(.16, 1, .3, 1) both; }
::view-transition-new(root) { animation: h-vt-in .6s cubic-bezier(.16, 1, .3, 1) both; }
::view-transition-group(h-hero-icon), ::view-transition-group(h-hero-title) { animation-duration: .7s; animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
@keyframes h-vt-out { to { opacity: 0; transform: scale(.985); } }
@keyframes h-vt-in { from { opacity: 0; transform: translateY(14px); } }

@media (hover: none) { .h-go { opacity: 1; transform: none; } }
@media (max-width: 900px) and (min-width: 761px) { .h-mode { min-height: 380px; } .h-ttl { font-size: 24px; } }
@media (max-width: 760px) {
  body.is-home .content { padding-block: 0 32px; }
  .h-wrap { padding: 0; }
  .h-top { height: 68px; } .h-logo span { display: none; }
  .h-chip { padding: 0 14px 0 8px; } .h-chip img { width: 30px; height: 30px; }
  .h-title { font-size: 32px; margin-top: 12px; } .h-lead { font-size: 17px; }
  .h-resume { width: 100%; margin-bottom: 22px; } .h-resume .h-arr { margin-left: auto; }
  .h-cards { grid-template-columns: 1fr; gap: 14px; perspective: none; }
  .h-mode { min-height: 0; }
  .h-content { flex-direction: row; align-items: center; gap: 16px; padding: 14px 18px 14px 10px; }
  .h-idx { display: none; }
  .h-art { flex: none; transform: none; } .h-art img { width: 104px; }
  .h-txt { transform: none; } .h-ttl { font-size: 23px; } .h-go { display: none; }
  .h-head { gap: 16px; } .h-head img { width: 88px; height: 88px; } .h-head .h-title { font-size: 30px; }
  .h-panel { padding: 20px 16px 4px; }
  .h-opt { flex: 1 1 calc(50% - 10px); min-width: 0; }
  .h-opt.has-icon { flex-basis: 100%; justify-content: flex-start; }
  .h-gobar .h-primary { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .h-mode { transform: none !important; } }
