/* FlyOmok front-end — hand-written, no frameworks. */
@font-face {
  font-family: 'Pretendard';
  src: url('/static/fonts/PretendardVariable.woff2') format('woff2-variations'),
       url('/static/fonts/PretendardVariable.woff2') format('woff2');
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
}
/* Bundled CJK subset webfonts (Noto Sans SC / TC / JP, SIL OFL 1.1 — /static/fonts/OFL.txt).
   Pretendard has Hangul + kana but no Chinese characters (Han), so Chinese / Japanese pages use these first;
   unicode-range keeps Latin text on Pretendard. Subset = characters of the zh / ja dictionaries in i18n.js. */
@font-face { font-family: 'FO Noto Sans SC'; src: url('/static/fonts/NotoSansSC-Regular.subset.woff2?v=2') format('woff2'); font-weight: 100 599; font-style: normal; font-display: swap; unicode-range: U+2E80-2FFF, U+3000-33FF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE10-FE19, U+FE30-FE4F, U+FF00-FFEF; }
@font-face { font-family: 'FO Noto Sans SC'; src: url('/static/fonts/NotoSansSC-Bold.subset.woff2?v=2') format('woff2'); font-weight: 600 1000; font-style: normal; font-display: swap; unicode-range: U+2E80-2FFF, U+3000-33FF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE10-FE19, U+FE30-FE4F, U+FF00-FFEF; }
@font-face { font-family: 'FO Noto Sans TC'; src: url('/static/fonts/NotoSansTC-Regular.subset.woff2?v=2') format('woff2'); font-weight: 100 599; font-style: normal; font-display: swap; unicode-range: U+2E80-2FFF, U+3000-33FF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE10-FE19, U+FE30-FE4F, U+FF00-FFEF; }
@font-face { font-family: 'FO Noto Sans TC'; src: url('/static/fonts/NotoSansTC-Bold.subset.woff2?v=2') format('woff2'); font-weight: 600 1000; font-style: normal; font-display: swap; unicode-range: U+2E80-2FFF, U+3000-33FF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE10-FE19, U+FE30-FE4F, U+FF00-FFEF; }
@font-face { font-family: 'FO Noto Sans JP'; src: url('/static/fonts/NotoSansJP-Regular.subset.woff2?v=2') format('woff2'); font-weight: 100 599; font-style: normal; font-display: swap; unicode-range: U+2E80-2FFF, U+3000-33FF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE10-FE19, U+FE30-FE4F, U+FF00-FFEF; }
@font-face { font-family: 'FO Noto Sans JP'; src: url('/static/fonts/NotoSansJP-Bold.subset.woff2?v=2') format('woff2'); font-weight: 600 1000; font-style: normal; font-display: swap; unicode-range: U+2E80-2FFF, U+3000-33FF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE10-FE19, U+FE30-FE4F, U+FF00-FFEF; }

:root {
  --font: 'Pretendard', system-ui, -apple-system, 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
  --fs-12: 12px; --fs-14: 14px; --fs-16: 16px; --fs-20: 20px; --fs-28: 28px; --fs-40: 40px;
  --r-s: 8px; --r-m: 12px; --r-l: 18px; --r-xl: 24px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
  --header-h: 60px;

  /* dark (default) */
  --bg: #14171C;
  --bg-deep: #0E1115;
  --panel: #1E232B;
  --panel-2: #252B35;
  --panel-3: #2C3340;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #E9EDF2;
  --text-2: #A7B0BD;
  --text-3: #6E7988;
  --accent: #2EE6C5;
  --accent-ink: #062A24;
  --accent-soft: rgba(46, 230, 197, .12);
  --amber: #FFB547;
  --amber-soft: rgba(255, 181, 71, .13);
  --danger: #FF5470;
  --danger-soft: rgba(255, 84, 112, .13);
  --violet: #A78BFA;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .22);
  --shadow-2: 0 10px 40px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .3);
  --scope: #0A0D11;
  --glass: rgba(20, 23, 28, .72);
  color-scheme: dark;
}
/* per-language font stacks: bundled subset first, then Pretendard (Latin, Hangul), then system CJK fonts */
:lang(ja) { --font: 'FO Noto Sans JP', 'Pretendard', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', 'Meiryo', 'Noto Sans CJK JP', 'FO Noto Sans SC', system-ui, sans-serif; }
:lang(zh-Hans) { --font: 'FO Noto Sans SC', 'Pretendard', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', system-ui, sans-serif; }
:lang(zh-Hant) { --font: 'FO Noto Sans TC', 'Pretendard', 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans CJK TC', 'FO Noto Sans SC', system-ui, sans-serif; }
/* language <select>: each option is written in its own language (lang attribute set by i18n.js) */
.lang-sel option[lang] { font-family: var(--font); }

:root[data-theme="light"] {
  --bg: #F4EFE6;
  --bg-deep: #EAE3D6;
  --panel: #FFFFFF;
  --panel-2: #F7F3EC;
  --panel-3: #EFE9DF;
  --line: rgba(60, 40, 10, .09);
  --line-2: rgba(60, 40, 10, .16);
  --text: #1C1F25;
  --text-2: #5A616D;
  --text-3: #8A909A;
  --accent: #0EA68C;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(14, 166, 140, .11);
  --amber: #D98A12;
  --amber-soft: rgba(217, 138, 18, .12);
  --danger: #E23A57;
  --danger-soft: rgba(226, 58, 87, .1);
  --violet: #7C5CE0;
  --shadow-1: 0 1px 2px rgba(60, 40, 10, .08), 0 4px 14px rgba(60, 40, 10, .07);
  --shadow-2: 0 14px 44px rgba(60, 40, 10, .18), 0 2px 6px rgba(60, 40, 10, .08);
  --scope: #0D1116;
  --glass: rgba(244, 239, 230, .8);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: var(--fs-14);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01" on;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 520px at 8% -10%, rgba(46, 230, 197, .07), transparent 60%),
    radial-gradient(800px 600px at 105% 110%, rgba(255, 181, 71, .06), transparent 60%);
}
:root[data-theme="light"] body::before {
  background:
    radial-gradient(900px 520px at 8% -10%, rgba(14, 166, 140, .07), transparent 60%),
    radial-gradient(800px 600px at 105% 110%, rgba(217, 138, 18, .08), transparent 60%);
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ------------------------------------------------------------------ header */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: var(--text); background: none; border: 0; padding: 4px 2px; }
.brand-mark { width: 30px; height: 30px; position: relative; flex: none; }
.brand-mark i { position: absolute; width: 18px; height: 18px; border-radius: 50%; }
.brand-mark i:first-child { left: 0; top: 0; background: radial-gradient(circle at 35% 30%, #666, #1a1a1a 55%, #000); box-shadow: 0 2px 4px rgba(0,0,0,.4); }
.brand-mark i:nth-of-type(2) { right: 0; bottom: 0; background: radial-gradient(circle at 35% 30%, #fff, #eeeeea 60%, #c9c9c2); box-shadow: 0 2px 4px rgba(0,0,0,.35); }
.brand-mark b { position: absolute; right: -3px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.brand small { font-weight: 600; font-size: 12px; color: var(--text-3); letter-spacing: 0; margin-left: 2px; }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav button { background: none; border: 0; padding: 8px 12px; border-radius: 10px; color: var(--text-2); font-weight: 600; }
.nav button:hover { background: var(--panel-2); color: var(--text); }
.nav button.on { color: var(--text); background: var(--panel-2); }
.top-gap { flex: 1; }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center;
  border-radius: 12px; border: 1px solid var(--line); background: var(--panel);
  color: var(--text-2); transition: background .15s, color .15s, transform .15s;
}
.icon-btn:hover { color: var(--text); background: var(--panel-2); }
.icon-btn:active { transform: scale(.95); }
/* language picker (native select, styled like .icon-btn) */
.lang-sel {
  -webkit-appearance: none; -moz-appearance: none; appearance: none; flex: none;
  height: 40px; padding: 0 30px 0 12px; border-radius: 12px; border: 1px solid var(--line);
  background-color: var(--panel); color: var(--text-2); font: inherit; font-weight: 650; font-size: 13px; line-height: 1; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23A7B0BD' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 10px 6px;
  transition: background-color .15s, color .15s;
}
.lang-sel:hover { color: var(--text); background-color: var(--panel-2); }
.lang-sel:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang-sel option { background: var(--panel); color: var(--text); }
.lang-sel.short { width: 56px; padding: 0 20px 0 10px; background-position: right 8px center; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text);
  font-weight: 650; font-size: var(--fs-14); letter-spacing: -.01em;
  transition: transform .15s var(--ease), background .15s, border-color .15s, box-shadow .2s, opacity .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--panel-3); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn[disabled] { opacity: .42; cursor: not-allowed; transform: none; }
.btn.primary {
  background: linear-gradient(180deg, #4BF0D2, var(--accent)); color: var(--accent-ink); border-color: transparent;
  box-shadow: 0 6px 22px rgba(46, 230, 197, .28), inset 0 1px 0 rgba(255,255,255,.35);
}
:root[data-theme="light"] .btn.primary { background: linear-gradient(180deg, #19BFA2, var(--accent)); box-shadow: 0 6px 20px rgba(14, 166, 140, .28), inset 0 1px 0 rgba(255,255,255,.25); }
.btn.primary:hover { filter: brightness(1.05); box-shadow: 0 8px 28px rgba(46, 230, 197, .38), inset 0 1px 0 rgba(255,255,255,.35); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--panel-2); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: rgba(255, 84, 112, .35); }
.btn.lg { min-height: 54px; padding: 0 26px; font-size: var(--fs-16); border-radius: 14px; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn .count { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--amber-soft); color: var(--amber); }

/* segmented */
.seg { display: flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--bg-deep); border: 1px solid var(--line); }
.seg button {
  flex: 1; min-height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2);
  font-weight: 650; font-size: 13px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .15s, color .15s, box-shadow .15s;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--panel-3); color: var(--text); box-shadow: var(--shadow-1); }
:root[data-theme="light"] .seg button.on { background: #fff; }
.seg .stone-dot { width: 14px; height: 14px; }

/* switch */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 99px; background: var(--panel-3); position: relative; transition: background .2s; flex: none; cursor: pointer; border: 1px solid var(--line-2); margin: 0; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .22s var(--ease-back); }
.switch input:checked { background: var(--accent); border-color: transparent; }
.switch input:checked::after { transform: translateX(18px); }

.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .field-label { font-size: 12px; font-weight: 700; color: var(--text-3); letter-spacing: .02em; }
.input {
  min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--bg-deep); color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s; width: 100%;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--text-3); }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 650; background: var(--panel-2); color: var(--text-2); border: 1px solid var(--line); white-space: nowrap; }
.chip.teal { background: var(--accent-soft); color: var(--accent); border-color: rgba(46,230,197,.25); }
.chip.amber { background: var(--amber-soft); color: var(--amber); border-color: rgba(255,181,71,.28); }
.chip.red { background: var(--danger-soft); color: var(--danger); border-color: rgba(255,84,112,.28); }
.chip.violet { background: rgba(167,139,250,.12); color: var(--violet); border-color: rgba(167,139,250,.28); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip .dot.live { animation: livedot 1.4s infinite; }
@keyframes livedot { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* badges required by spec */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 750; letter-spacing: .01em; white-space: nowrap; }
.badge svg { width: 13px; height: 13px; }
.badge.real { color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(46,230,197,.35); }
.badge.analog { color: var(--amber); background: transparent; border: 1px dashed rgba(255,181,71,.6); }
:root[data-theme="light"] .badge.analog { border-color: rgba(217,138,18,.6); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-1); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; }
.card-h h3 { margin: 0; font-size: 14px; font-weight: 750; letter-spacing: -.01em; }
.card-h .sp { flex: 1; }
.card-b { padding: 14px 16px 16px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }

/* ------------------------------------------------------------------ views */
.view { display: none; }
.view.on { display: block; animation: viewin .35s var(--ease); }
@keyframes viewin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ------------------------------------------------------------------ home */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 48px 0 28px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 750; letter-spacing: .14em; color: var(--accent); text-transform: uppercase; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.hero h1 { margin: 14px 0 6px; font-size: 68px; line-height: 1; font-weight: 850; letter-spacing: -.045em; }
.hero h1 .fly { background: linear-gradient(100deg, var(--accent), #8BF7E4 50%, var(--amber)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .tag { font-size: 28px; font-weight: 700; letter-spacing: -.03em; margin: 8px 0 14px; }
.hero p.lead { margin: 0 0 26px; font-size: 16px; color: var(--text-2); max-width: 520px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-stats { display: flex; gap: 26px; margin-top: 28px; }
.hero > * { min-width: 0; }
.hero-stats div { display: flex; flex-direction: column; min-width: 0; }
.hero-stats b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero-stats span { font-size: 12px; color: var(--text-3); font-weight: 600; }
.hero-viz { position: relative; aspect-ratio: 1.12; border-radius: 28px; overflow: hidden; background: radial-gradient(120% 90% at 50% 40%, #121A20, var(--scope) 70%); border: 1px solid rgba(255,255,255,.06); box-shadow: var(--shadow-2); }
.hero-viz canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-viz .cap { position: absolute; left: 18px; bottom: 16px; right: 18px; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; color: rgba(233,237,242,.75); font-size: 12px; pointer-events: none; }
.hero-viz .cap b { color: #fff; font-weight: 700; font-size: 13px; display: block; }
.hero-viz .scan { position: absolute; left: 18px; top: 16px; display: flex; gap: 6px; }
.hero-viz .scan .chip { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); color: rgba(233,237,242,.85); backdrop-filter: blur(6px); }

.section-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 26px 0 14px; }
.section-h h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.section-h p { margin: 2px 0 0; color: var(--text-2); font-size: 13px; }

.setup { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; padding-bottom: 32px; }
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; align-items: start; }
.opp {
  position: relative; text-align: left; padding: 16px; border-radius: var(--r-l); background: var(--panel); border: 1px solid var(--line);
  box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 10px; transition: border-color .2s, transform .2s var(--ease), box-shadow .2s;
  color: var(--text); min-height: 190px;
}
.opp.ready { cursor: pointer; }
.opp.ready:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: var(--shadow-2); }
.opp.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-2); }
.opp.sel::after { content: ""; position: absolute; top: 14px; right: 14px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23062A24' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/14px no-repeat; }
.opp.soon { opacity: .62; filter: saturate(.4); }
.opp-top { display: flex; align-items: center; gap: 12px; }
.ava { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.ava svg { width: 36px; height: 36px; }
.ava.human { font-weight: 800; font-size: 18px; color: var(--text); background: linear-gradient(135deg, var(--panel-3), var(--panel-2)); }
.opp-name { font-size: 17px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.opp-sub { font-size: 12px; color: var(--text-3); font-weight: 600; }
.opp-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.opp-note { font-size: 12.5px; color: var(--text-2); line-height: 1.55; margin: 0; }
.opp .lock { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--text-2); background: var(--panel-2); padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line); }
.opp .lock svg { width: 13px; height: 13px; }
.lvl { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.lvl button { min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-deep); color: var(--text-2); font-size: 12px; font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 4px 0; transition: all .15s; }
.lvl button b { font-size: 15px; font-weight: 800; color: var(--text); line-height: 1.1; }
.lvl button:hover { border-color: var(--line-2); }
.lvl button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.lvl button.on b { color: var(--accent); }
.lvl-desc { font-size: 12px; color: var(--text-2); min-height: 36px; line-height: 1.5; }
.bee-learn { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--bg-deep); border: 1px solid var(--line); }
.bee-learn .row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); gap: 10px; }
.bee-learn .row b { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 750; }
.bee-learn svg.spark { width: 100%; height: 30px; }

.opts { position: sticky; top: calc(var(--header-h) + 16px); padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.opts h3 { margin: 0; font-size: 16px; font-weight: 800; }
.opts .sum { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--bg-deep); border: 1px solid var(--line); }
.opts .sum .ava { width: 40px; height: 40px; border-radius: 12px; }
.opts .sum b { display: block; font-size: 15px; }
.opts .sum span { font-size: 12px; color: var(--text-3); }
.hint-text { font-size: 12px; color: var(--text-3); line-height: 1.5; margin: -6px 0 0; }

/* ------------------------------------------------------------------ lobby */
.lobby-head { padding: 36px 0 8px; }
.lobby-head h1 { margin: 0; font-size: 40px; font-weight: 850; letter-spacing: -.035em; }
.lobby-head p { margin: 6px 0 0; color: var(--text-2); font-size: 15px; }
.lobby-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; margin-top: 22px; }
.lobby-grid .card-b { display: flex; flex-direction: column; gap: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.code-input { font-size: 28px; font-weight: 800; letter-spacing: .4em; text-transform: uppercase; text-align: center; min-height: 64px; font-variant-numeric: tabular-nums; padding-left: .4em; }
.created { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 14px; background: var(--accent-soft); border: 1px solid rgba(46,230,197,.3); }
.code-big { display: flex; gap: 6px; }
.code-big span { width: 42px; height: 52px; display: grid; place-items: center; border-radius: 10px; background: var(--panel); border: 1px solid var(--line-2); font-size: 26px; font-weight: 850; font-variant-numeric: tabular-nums; }
.linkbox { display: flex; gap: 8px; }
.linkbox .input { font-size: 12.5px; color: var(--text-2); }
.rooms-card { margin: 18px 0 40px; }
.rooms-tools { display: flex; gap: 8px; align-items: center; }
@media (max-width: 600px) {
  .rooms-card .card-h { flex-wrap: wrap; row-gap: 10px; }
  .rooms-tools { flex: 1 1 100%; min-width: 0; }
  .rooms-tools .seg { min-width: 0 !important; flex: 1; }
  .rooms-tools .seg button { padding-left: 4px; padding-right: 4px; }
}
.rooms { display: flex; flex-direction: column; }
.room-row { display: grid; grid-template-columns: 74px minmax(0, 1.6fr) minmax(0, 1.2fr) 90px 70px auto; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); transition: background .15s; }
.room-row:hover { background: var(--panel-2); }
.room-row .t { font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-row .s { font-size: 12px; color: var(--text-3); }
.room-row .vs { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-row .acts { display: flex; gap: 6px; justify-content: flex-end; }
.st-waiting { color: var(--accent); }
.empty { padding: 34px 16px; text-align: center; color: var(--text-3); font-size: 13px; border-top: 1px solid var(--line); }
.empty svg { width: 32px; height: 32px; display: block; margin: 0 auto 8px; opacity: .6; }

/* ------------------------------------------------------------------ game */
#v-game.on { display: block; }
.game {
  display: grid; gap: 18px; padding: 14px 20px 14px;
  grid-template-columns: 296px minmax(0, 1fr) 372px;
  grid-template-areas: "left center right";
  height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h));
}
.g-left { grid-area: left; display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow: auto; padding: 2px; }
.g-center { grid-area: center; display: flex; flex-direction: column; align-items: center; min-height: 0; min-width: 0; gap: 10px; }
.g-right > .card, .g-left > * { flex: none; }
.phone-strip { display: none; }
.ps-h { display: flex; align-items: center; gap: 8px; font-weight: 750; font-size: 13.5px; }
.ps-h .sp { flex: 1; }
.ps-sum { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.ps-sum b { color: var(--text); font-variant-numeric: tabular-nums; }
.phone-strip .steps { padding: 10px 0 4px; }
.meta-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.meta-card h3 { margin: 0 0 2px; font-size: 13px; font-weight: 750; color: var(--text-2); }
.meta-row { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.meta-row span:first-child { color: var(--text-3); font-weight: 600; white-space: nowrap; }
.meta-row span:last-child { text-align: right; color: var(--text); font-weight: 600; }
.g-right { grid-area: right; display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow: auto; padding: 2px 4px 2px 2px; scrollbar-width: thin; }

.ginfo { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 34px; flex-wrap: wrap; }
.ginfo .title { font-weight: 800; font-size: 15px; letter-spacing: -.01em; margin-right: 4px; }
.ginfo .sp { flex: 1; }

.board-area { flex: 1; min-height: 0; width: 100%; display: flex; align-items: flex-start; justify-content: center; container-type: size; }
.board-wrap { position: relative; aspect-ratio: 1 / 1; width: 100%; width: min(100cqw, 100cqh); max-width: 100%; border-radius: 10px; }
.board-wrap canvas#board { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border-radius: 10px; touch-action: manipulation; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 24px 60px rgba(0,0,0,.45), 0 6px 16px rgba(0,0,0,.3); }
:root[data-theme="light"] .board-wrap canvas#board { box-shadow: 0 24px 50px rgba(90,60,20,.28), 0 6px 14px rgba(90,60,20,.18); }
.board-wrap canvas#board.can-play { cursor: pointer; }
.board-over { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.board-over > * { pointer-events: auto; }
.g-center { position: relative; }
.ginfo.has-banner > * { visibility: hidden; }
.board-banner {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%); z-index: 3; height: 34px; max-width: 100%;
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 99px;
  background: rgba(16, 19, 24, .82); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 26px rgba(0,0,0,.35); font-size: 13px; font-weight: 650; white-space: nowrap; border: 1px solid rgba(255,255,255,.08);
}
.board-banner .btn { min-height: 32px; height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 99px; background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.12); }
.board-banner .btn.primary { background: var(--accent); color: #062A24; }
.board-banner .ib { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); border: 0; color: #fff; }
.board-banner .ib svg { width: 16px; height: 16px; }
.tip { position: absolute; z-index: 5; pointer-events: none; background: rgba(16,19,24,.92); color: #fff; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, calc(-100% - 14px)); box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.tip b { color: #FF8FA3; }

.wait-card { width: min(380px, 86%); padding: 22px; border-radius: 20px; background: rgba(18, 21, 26, .9); color: #fff; text-align: center; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 20px 60px rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.08); }
.wait-card h3 { margin: 6px 0 4px; font-size: 20px; }
.wait-card p { margin: 0 0 14px; color: rgba(255,255,255,.65); font-size: 13px; }
.wait-card .code-big { justify-content: center; margin-bottom: 14px; }
.wait-card .code-big span { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: #fff; }
.wait-card .linkbox .input { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); color: rgba(255,255,255,.7); }
.spinner { width: 34px; height: 34px; margin: 0 auto; border-radius: 50%; border: 3px solid rgba(46,230,197,.18); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* player cards */
.pcard { position: relative; padding: 14px; border-radius: var(--r-l); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 12px; transition: border-color .25s, box-shadow .25s; }
.pcard.turn { border-color: rgba(46,230,197,.55); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-1); }
.pcard.turn::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; box-shadow: 0 0 0 0 rgba(46,230,197,.5); animation: turnpulse 2s var(--ease) infinite; }
@keyframes turnpulse { 0% { box-shadow: 0 0 0 0 rgba(46,230,197,.45); } 70% { box-shadow: 0 0 0 10px rgba(46,230,197,0); } 100% { box-shadow: 0 0 0 0 rgba(46,230,197,0); } }
.pcard.low.turn { border-color: rgba(255,84,112,.7); box-shadow: 0 0 0 3px var(--danger-soft), var(--shadow-1); }
.pcard.low.turn::before { animation-name: lowpulse; animation-duration: 1s; }
@keyframes lowpulse { 0% { box-shadow: 0 0 0 0 rgba(255,84,112,.55); } 70% { box-shadow: 0 0 0 12px rgba(255,84,112,0); } 100% { box-shadow: 0 0 0 0 rgba(255,84,112,0); } }
.pc-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pc-id { flex: 1; min-width: 0; }
.pc-name { font-size: 16px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 7px; overflow: hidden; }
.pc-name span.n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-sub { font-size: 12px; color: var(--text-3); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stone-ic { width: 18px; height: 18px; border-radius: 50%; flex: none; display: inline-block; }
.stone-ic.b { background: radial-gradient(circle at 35% 30%, #5d5d5d, #1a1a1a 55%, #000); box-shadow: 0 1px 2px rgba(0,0,0,.5); }
.stone-ic.w { background: radial-gradient(circle at 35% 30%, #fff, #eeeeea 60%, #c9c9c2); box-shadow: 0 1px 2px rgba(0,0,0,.4), inset 0 0 0 1px rgba(0,0,0,.08); }
.stone-ic.q { background: conic-gradient(#111 0 50%, #eee 50% 100%); box-shadow: 0 1px 2px rgba(0,0,0,.4); }
.pc-clock { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--bg-deep); border: 1px solid var(--line); }
.pc-clock .t { font-size: 34px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pcard.turn .pc-clock { background: var(--accent-soft); border-color: rgba(46,230,197,.25); }
.pcard.turn .pc-clock .t { color: var(--accent); }
.pcard.low .pc-clock .t { color: var(--danger); }
.pcard.low.turn .pc-clock { background: var(--danger-soft); border-color: rgba(255,84,112,.3); }
.pc-state { font-size: 12px; font-weight: 700; color: var(--text-3); display: inline-flex; align-items: center; gap: 6px; }
.pcard.turn .pc-state { color: var(--accent); }
.think-dots { display: inline-flex; gap: 3px; }
.think-dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: tdot 1.1s infinite; }
.think-dots i:nth-child(2) { animation-delay: .15s; }
.think-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes tdot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.pc-mini { display: none; }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.actions .btn { min-height: 48px; }
.actions .wide { grid-column: 1 / -1; }
.panel-note { font-size: 12px; color: var(--text-3); line-height: 1.55; padding: 0 4px; }

.req { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: var(--amber-soft); border: 1px solid rgba(255,181,71,.35); }
.req b { font-size: 14px; }
.req .btns { display: flex; gap: 8px; }
.req .btns .btn { flex: 1; min-height: 40px; }

/* brain panel */
.brain-card { overflow: hidden; }
.scope { position: relative; margin: 12px 12px 0; border-radius: 14px; overflow: hidden; background: radial-gradient(120% 90% at 50% 35%, #111920, var(--scope) 70%); border: 1px solid rgba(255,255,255,.05); aspect-ratio: 1.25; cursor: grab; touch-action: none; }
.scope:active { cursor: grabbing; }
.scope canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scope .s-top { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; justify-content: space-between; gap: 6px; pointer-events: none; }
.scope .s-top .chip { background: rgba(255,255,255,.07); color: rgba(233,237,242,.85); border-color: rgba(255,255,255,.1); backdrop-filter: blur(6px); }
.scope .s-top .chip.teal { color: #2EE6C5; background: rgba(46,230,197,.12); border-color: rgba(46,230,197,.3); }
.scope .s-top .chip.amber { color: #FFB547; background: rgba(255,181,71,.12); border-color: rgba(255,181,71,.3); }
.scope .s-bot { position: absolute; left: 10px; right: 10px; bottom: 8px; display: flex; justify-content: space-between; align-items: flex-end; pointer-events: none; color: rgba(233,237,242,.55); font-size: 11px; }
.scope .s-bot .replay { pointer-events: auto; }
.scope .s-bot .btn { min-height: 28px; height: 28px; padding: 0 10px; font-size: 11.5px; background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.12); border-radius: 99px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 10px 16px 0; font-size: 11px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.legend i { width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 6px currentColor; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 14px 16px 2px; position: relative; }
.step { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; position: relative; font-size: 11.5px; font-weight: 700; color: var(--text-3); transition: color .3s; }
.step .bul { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); border: 1.5px solid var(--line-2); position: relative; z-index: 1; transition: all .3s; font-size: 11px; font-weight: 800; }
.step .bul svg { width: 14px; height: 14px; stroke-width: 3; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 13px; left: calc(50% + 15px); right: calc(-50% + 15px); height: 2px; border-radius: 2px; background: var(--line-2); }
.step.done:not(:last-child)::after { background: var(--accent); }
.step.active { color: var(--text); }
.step.active .bul { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 0 rgba(46,230,197,.5); animation: stepping 1.3s infinite; }
@keyframes stepping { 0% { box-shadow: 0 0 0 0 rgba(46,230,197,.5); } 70% { box-shadow: 0 0 0 9px rgba(46,230,197,0); } 100% { box-shadow: 0 0 0 0 rgba(46,230,197,0); } }
.step.done { color: var(--text-2); }
.step.skip { opacity: .45; }
.step.done .bul { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.think-meta { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px 0; font-size: 12px; color: var(--text-2); min-height: 26px; }
.think-meta b { color: var(--text); font-variant-numeric: tabular-nums; }

.decide { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.decide-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.decide-h .mv { font-size: 22px; font-weight: 850; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.decide-h .lbl { font-size: 12px; color: var(--text-3); font-weight: 700; }
.decide .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cands { display: flex; flex-direction: column; gap: 4px; }
.cand { display: grid; grid-template-columns: 34px minmax(0, 1fr) 52px 52px; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 9px; font-size: 12px; border: 1px solid transparent; transition: background .15s; }
.cand:hover { background: var(--panel-2); }
.cand.chosen { background: var(--accent-soft); border-color: rgba(46,230,197,.3); }
.cand .c { font-weight: 800; font-variant-numeric: tabular-nums; }
.cand .bar { height: 8px; border-radius: 99px; background: var(--bg-deep); overflow: hidden; position: relative; }
.cand .bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, rgba(46,230,197,.55), var(--accent)); transition: width .6s var(--ease); }
.cand .bar.pre i { background: linear-gradient(90deg, rgba(255,181,71,.45), var(--amber)); }
.cand .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.cand .r { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-3); font-weight: 700; }
.cand.chosen .c { color: var(--accent); }
.cands-h { display: grid; grid-template-columns: 34px minmax(0, 1fr) 52px 52px; gap: 8px; padding: 0 8px; font-size: 10.5px; color: var(--text-3); font-weight: 700; letter-spacing: .02em; }
.cands-h span:nth-child(3), .cands-h span:nth-child(4) { text-align: right; }
.empty-s { font-size: 12.5px; color: var(--text-3); padding: 6px 0 2px; line-height: 1.55; }

.bee-panel { border-top: 1px solid var(--line); padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.bee-panel h4 { margin: 0; font-size: 13.5px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.bee-panel .lab { font-size: 11.5px; color: var(--amber); font-weight: 650; line-height: 1.45; }
.kv4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.kv4 div { padding: 8px 10px; border-radius: 10px; background: var(--bg-deep); border: 1px solid var(--line); }
.kv4 b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; font-weight: 800; }
.kv4 span { font-size: 11px; color: var(--text-3); font-weight: 650; }
.zrow { display: grid; grid-template-columns: 30px 1fr; gap: 8px; align-items: center; font-size: 11.5px; }
.zbars { display: flex; flex-direction: column; gap: 2px; }
.zbar { position: relative; height: 6px; background: var(--bg-deep); border-radius: 3px; }
.zbar::before { content: ""; position: absolute; left: 50%; top: -1px; bottom: -1px; width: 1px; background: var(--line-2); }
.zbar i { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.zbar.mb i { background: var(--amber); }
.zbar.ro i { background: var(--accent); }
.mbon { display: flex; flex-direction: column; gap: 4px; }
.mbon .m { display: grid; grid-template-columns: 96px 1fr 44px; gap: 8px; align-items: center; font-size: 11.5px; }
.mbon .m span:first-child { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbon .m .bar { height: 7px; border-radius: 99px; background: var(--bg-deep); overflow: hidden; }
.mbon .m .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, rgba(255,181,71,.5), var(--amber)); }
.mbon .m .p { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.legend2 { display: flex; gap: 12px; font-size: 11px; color: var(--text-3); }
.legend2 i { display: inline-block; width: 10px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 4px; }

/* move list */
.moves-card { display: flex; flex-direction: column; min-height: 180px; }
.moves { padding: 8px 10px 12px; display: grid; grid-template-columns: 34px 1fr 1fr; gap: 2px 4px; align-content: start; overflow: auto; max-height: 280px; scrollbar-width: thin; }
.moves .no { font-size: 11.5px; color: var(--text-3); text-align: right; padding: 6px 6px 6px 0; font-variant-numeric: tabular-nums; }
.mvb { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 8px; border: 0; background: transparent; text-align: left; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); min-height: 30px; }
.mvb:hover { background: var(--panel-2); }
.mvb.cur { background: var(--accent-soft); color: var(--accent); }
.mvb .tg { font-size: 10px; font-weight: 750; padding: 0 5px; border-radius: 4px; line-height: 16px; }
.mvb .tg.fly { color: var(--accent); background: var(--accent-soft); }
.mvb .tg.forced { color: var(--amber); background: var(--amber-soft); }
.mvb .tg.eng { color: var(--text-3); background: var(--panel-2); }

/* bottom bar & sheet (phone) */
.bbar { display: none; }
.sheet-back { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: opacity .25s; }
.sheet-back.on { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-height: 82vh; max-height: 82dvh; display: flex; flex-direction: column; background: var(--panel); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.4); transform: translateY(105%); transition: transform .32s var(--ease); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line-2); }
.sheet.on { transform: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 10px auto 6px; flex: none; }
.sheet .tabs { display: flex; gap: 6px; padding: 4px 14px 10px; flex: none; }
.sheet .tabs button { flex: 1; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text-2); font-weight: 700; }
.sheet .tabs button.on { background: var(--accent-soft); color: var(--accent); border-color: rgba(46,230,197,.3); }
.sheet .pane { overflow: auto; padding: 0 12px 16px; display: none; }
.sheet .pane.on { display: block; }
.sheet .pane .card { box-shadow: none; }
.menu-list { display: flex; flex-direction: column; gap: 8px; }
.menu-list .btn { justify-content: flex-start; }

/* ------------------------------------------------------------------ modal / toast */
.modal-back { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 18px; background: rgba(8, 10, 13, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .25s; }
.modal-back.on { opacity: 1; pointer-events: auto; }
.modal-back.soft { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(8, 10, 13, .38); }
.modal { width: min(520px, 100%); max-height: calc(100vh - 36px); overflow: auto; background: var(--panel); border-radius: 24px; border: 1px solid var(--line-2); box-shadow: var(--shadow-2); transform: translateY(14px) scale(.97); transition: transform .35s var(--ease-back); }
.modal-back.on .modal { transform: none; }
.modal-h { padding: 22px 24px 0; display: flex; align-items: flex-start; gap: 12px; }
.modal-h h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.02em; flex: 1; }
.modal-b { padding: 16px 24px 24px; }
.modal-b p { margin: 0 0 12px; line-height: 1.65; color: var(--text-2); }
.modal-f { display: flex; gap: 8px; padding: 0 24px 24px; flex-wrap: wrap; }
.modal-f .btn { flex: 1; }
.result-hero { text-align: center; padding: 30px 24px 6px; position: relative; }
.result-hero .big { font-size: 48px; font-weight: 900; letter-spacing: -.05em; line-height: 1; }
.result-hero .big.win { background: linear-gradient(100deg, var(--accent), var(--amber)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.result-hero .big.loss { color: var(--danger); }
.result-hero .reason { margin-top: 8px; color: var(--text-2); font-weight: 650; }
.result-hero .stones { display: flex; justify-content: center; gap: 6px; margin-bottom: 14px; }
.result-hero .stones .stone-ic { width: 28px; height: 28px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 18px 24px 18px; }
.stats div { padding: 12px 14px; border-radius: 14px; background: var(--bg-deep); border: 1px solid var(--line); }
.stats b { display: block; font-size: 22px; font-weight: 850; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stats span { font-size: 12px; color: var(--text-3); font-weight: 650; }
.stats .full { grid-column: 1 / -1; }
.pbar { height: 8px; border-radius: 99px; background: var(--panel-3); overflow: hidden; margin-top: 8px; display: flex; }
.pbar i { display: block; height: 100%; }
.swap-choose { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.swap-choose button { min-height: 110px; border-radius: 18px; border: 1px solid var(--line-2); background: var(--bg-deep); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font-weight: 800; font-size: 16px; transition: all .15s; }
.swap-choose button:hover { border-color: var(--accent); background: var(--accent-soft); }
.swap-choose .stone-ic { width: 40px; height: 40px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; }
.kv dt { color: var(--text-3); font-weight: 650; }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; word-break: break-word; }
.kv-group { margin-bottom: 16px; padding: 12px 14px; background: var(--bg-deep); border-radius: 12px; border: 1px solid var(--line); }
.kv-group h4 { margin: 0 0 8px; font-size: 13px; }
.credits { font-size: 13px; color: var(--text-2); line-height: 1.7; }
.credits h4 { margin: 18px 0 6px; font-size: 13px; color: var(--text); }
.disclaimer { padding: 12px 14px; border-radius: 12px; background: var(--amber-soft); border: 1px solid rgba(255,181,71,.3); color: var(--text); font-size: 13px; line-height: 1.65; }

.toasts { position: fixed; top: calc(var(--header-h) + 12px); left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 14px; background: rgba(22, 26, 32, .94); color: #fff; font-weight: 650; font-size: 13.5px; box-shadow: 0 12px 34px rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.08); animation: toastin .35s var(--ease-back); backdrop-filter: blur(10px); }
.toast.out { animation: toastout .25s var(--ease) forwards; }
.toast .ti { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.toast .ti svg { width: 14px; height: 14px; stroke-width: 2.6; }
.toast.err .ti { background: rgba(255,84,112,.18); color: #FF5470; }
.toast.ok .ti { background: rgba(46,230,197,.18); color: #2EE6C5; }
.toast.info .ti { background: rgba(255,181,71,.18); color: #FFB547; }
@keyframes toastin { from { opacity: 0; transform: translateY(-10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastout { to { opacity: 0; transform: translateY(-8px) scale(.97); } }

#fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 90; }

footer.foot { border-top: 1px solid var(--line); margin-top: 20px; padding: 22px 0 34px; color: var(--text-3); font-size: 12.5px; line-height: 1.7; }
footer.foot .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer.foot .links { display: flex; gap: 14px; align-items: flex-start; }
footer.foot button.lnk { background: none; border: 0; padding: 0; color: var(--text-2); font-weight: 650; }
footer.foot button.lnk:hover { color: var(--accent); }

/* ------------------------------------------------------------------ habitat (procedural background, see habitat.js) */
#habitat { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
#habitat.off { display: none; }
#habitat canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#habitat .hab-static { opacity: 0; transition: opacity .8s var(--ease); }
#habitat .hab-static.on { opacity: 1; }
#habFx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 85; }
:root:not([data-habitat="plain"]) body::before { opacity: 0; }
/* text that sits directly on the scene gets a soft halo for contrast */
:root:not([data-habitat="plain"]) .hero h1, :root:not([data-habitat="plain"]) .hero .tag, :root:not([data-habitat="plain"]) .hero p.lead,
:root:not([data-habitat="plain"]) .hero-stats, :root:not([data-habitat="plain"]) .section-h, :root:not([data-habitat="plain"]) .lobby-head,
:root:not([data-habitat="plain"]) .panel-note, :root:not([data-habitat="plain"]) footer.foot { text-shadow: 0 0 14px var(--bg), 0 0 3px var(--bg); }
:root:not([data-habitat="plain"]) .hero h1 .fly { text-shadow: none; filter: drop-shadow(0 0 10px var(--bg)); }
:root:not([data-habitat="plain"]) footer.foot { background: color-mix(in srgb, var(--bg) 82%, transparent); }
:root:not([data-habitat="plain"]) .ginfo .title { text-shadow: 0 0 10px var(--bg), 0 0 3px var(--bg); }
/* board: a calm halo of page colour so the wood + grid always stand on a quiet backdrop */
:root:not([data-habitat="plain"]) .board-wrap::before { content: ""; position: absolute; inset: -12px; border-radius: 18px; background: var(--bg); opacity: .55; filter: blur(10px); z-index: -1; pointer-events: none; }
.board-wrap { isolation: isolate; }

/* roster mood art (locked cards show their habitat only here) */
.opp { overflow: hidden; }
.opp-mood { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background-repeat: no-repeat; background-position: right bottom; background-size: 100% auto; }
.opp > :not(.opp-mood):not(.lock) { position: relative; z-index: 1; }
.opp .lock { z-index: 2; }
.opp.soon { opacity: 1; filter: none; }
.opp.soon .opp-top, .opp.soon .opp-meta, .opp.soon .opp-note { filter: saturate(.5); opacity: .72; }
.opp.ready .opp-mood { opacity: .75; }

/* settings: scene picker */
.scene-modal { display: flex; flex-direction: column; gap: 18px; }
.scene-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.scene-pick button { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 6px 6px 10px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--bg-deep); text-align: left; transition: border-color .15s, box-shadow .15s; }
.scene-pick button:hover { border-color: var(--text-3); }
.scene-pick button.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.scene-pick canvas { width: 100%; aspect-ratio: 1.6; height: auto; border-radius: 9px; display: block; background: var(--panel-3); }
.scene-pick b { font-size: 13.5px; font-weight: 800; padding: 2px 4px 0; }
.scene-pick small { font-size: 11px; color: var(--text-3); line-height: 1.4; padding: 0 4px; }
.seg button svg.i { width: 15px; height: 15px; }
@media (max-width: 420px) {
  #statsBtn { display: none; }
  .scene-pick { grid-template-columns: 1fr; }
  .scene-pick button { flex-direction: row; align-items: center; gap: 10px; padding: 6px; }
  .scene-pick canvas { width: 96px; flex: none; }
  .scene-pick button > b { min-width: 64px; }
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1199px) {
  .game { grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "center left" "center right"; grid-template-rows: auto minmax(0, 1fr); }
  .g-left { overflow: visible; }
  .g-left .pcard { flex-direction: row; align-items: center; padding: 10px 12px; gap: 10px; }
  .g-left .pc-top { flex: 1; }
  .g-left .pc-clock { padding: 6px 12px; }
  .g-left .pc-clock .t { font-size: 24px; }
  .g-left .pc-clock .pc-state { display: none; }
  .g-left .actions { grid-template-columns: repeat(3, 1fr); }
  .g-left .actions .wide { grid-column: auto; }
  .g-left .panel-note, .g-left .meta-card { display: none; }
  .g-left .pc-name .badge { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .hero-viz { max-width: 640px; width: 100%; aspect-ratio: 1.5; }
  .setup { grid-template-columns: 1fr; }
  .opts { position: static; }
}
@media (max-width: 960px) {
  .lobby-grid { grid-template-columns: 1fr; }
  .room-row { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .room-row .vs, .room-row .tm, .room-row .sp { display: none; }
}
@media (max-width: 767px) {
  :root { --header-h: 54px; }
  .topbar { padding: 0 12px; gap: 8px; }
  .nav { display: none; }
  .brand small { display: none; }
  .icon-btn { width: 40px; height: 40px; }
  .wrap { padding: 0 16px; }
  .hero { padding: 22px 0 8px; gap: 18px; }
  .hero h1 { font-size: 48px; }
  .hero .tag { font-size: 22px; margin: 4px 0 10px; }
  .hero p.lead { font-size: 14.5px; margin-bottom: 18px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-actions .btn.primary { flex-basis: 100%; }
  .hero-stats { gap: 18px; margin-top: 18px; }
  .hero-stats b { font-size: 17px; }
  .hero-viz { aspect-ratio: 1.25; border-radius: 22px; order: -1; }
  .roster { grid-template-columns: 1fr; }
  .lobby-head h1 { font-size: 30px; }
  .row2 { grid-template-columns: 1fr; }
  .code-big span { width: 38px; height: 48px; font-size: 22px; }

  #v-game.on { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .game { display: flex; flex-direction: column; height: auto; padding: 8px 6px 8px; gap: 8px; }
  .g-left { display: contents; }
  .g-right { display: none; }
  #oppCard { order: 1; }
  .g-center { order: 2; gap: 6px; }
  #meCard { order: 3; }
  #reqBox { order: 4; margin: 0 4px; }
  .g-left .actions, .g-left .panel-note, .g-left .meta-card { display: none; }
  .pcard { flex-direction: row !important; align-items: center; padding: 8px 10px !important; gap: 10px; border-radius: 14px; margin: 0 4px; }
  .pcard .ava { width: 38px; height: 38px; border-radius: 11px; }
  .pcard .ava svg { width: 30px; height: 30px; }
  .pc-name { font-size: 15px; }
  .pc-clock { padding: 4px 10px !important; border-radius: 10px; }
  .pc-clock .t { font-size: 22px !important; }
  .pc-clock .pc-state { display: none; }
  .phone-strip { display: flex; flex-direction: column; gap: 6px; order: 5; margin: 0 4px; padding: 12px 14px; }
  .phone-strip.off { display: none; }
  .hero-viz #heroLegend { display: none; }
  .pc-mini { display: block; width: 46px; height: 46px; border-radius: 10px; overflow: hidden; background: var(--scope); flex: none; position: relative; }
  .pc-mini canvas { width: 100%; height: 100%; display: block; }
  .ginfo { padding: 0 6px; min-height: 28px; }
  .ginfo .title { font-size: 14px; }
  .board-area { flex: none; container-type: normal; }
  .board-wrap { width: 100%; }
  .board-wrap canvas#board { border-radius: 8px; }
  .board-banner { top: 0; height: 30px; font-size: 12px; }
  .bbar {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: var(--glass); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
    border-top: 1px solid var(--line);
  }
  .bbar button { min-height: 56px; border: 0; border-radius: 12px; background: transparent; color: var(--text-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 700; position: relative; }
  .bbar button:active { background: var(--panel-2); }
  .bbar button[disabled] { opacity: .35; }
  .bbar button .count { position: absolute; top: 5px; left: calc(50% + 6px); font-size: 10px; font-weight: 800; padding: 0 5px; border-radius: 99px; background: var(--amber); color: #2a1a00; line-height: 15px; }
  .bbar button.hot { color: var(--accent); }
  .toasts { top: calc(var(--header-h) + 8px); }
  .modal { border-radius: 22px; }
  .modal-h, .modal-b, .modal-f { padding-left: 18px; padding-right: 18px; }
  .stats { padding-left: 18px; padding-right: 18px; }
  .moves { max-height: none; }
  footer.foot { padding-bottom: 24px; }
  #v-game footer { display: none; }
}
@media (max-width: 420px) {
  .topbar { gap: 6px; padding: 0 10px; }
  .topbar .icon-btn { width: 36px; height: 36px; border-radius: 11px; }
  .topbar .lang-sel { height: 36px; border-radius: 11px; }
  .brand { gap: 8px; font-size: 18px; }
}
@media (max-width: 380px) {
  .topbar { gap: 4px; padding: 0 8px; }
  .topbar .icon-btn { width: 34px; height: 34px; }
  .topbar .lang-sel { height: 34px; }
  .topbar .lang-sel.short { width: 50px; padding: 0 16px 0 8px; background-position: right 6px center; }
  .brand { gap: 6px; font-size: 17px; }
  .brand-mark { width: 26px; height: 26px; }
  .brand-mark i { width: 16px; height: 16px; }
  .hero h1 { font-size: 42px; }
  .pc-clock .t { font-size: 19px !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ------------------------------------------------------------------ mini-games link (home) */
.mini-promo { display: flex; align-items: center; gap: 12px; margin-top: 14px; max-width: 520px; padding: 11px 14px; border-radius: 14px;
  background: linear-gradient(100deg, var(--amber-soft), var(--accent-soft)); border: 1px solid var(--line-2); color: var(--text);
  transition: transform .2s var(--ease), border-color .2s; }
.mini-promo:hover { text-decoration: none; transform: translateY(-2px); border-color: rgba(255,181,71,.45); }
.mini-promo .mp-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px var(--amber); flex: none; }
.mini-promo .mp-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.mini-promo .mp-t b { font-weight: 800; font-size: 14.5px; letter-spacing: -.01em; }
.mini-promo .mp-t small { color: var(--text-2); font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-promo .mp-go { color: var(--amber); font-weight: 800; font-size: 18px; }

/* brain panel data-source badge (10/2) */
.brain-src { padding: 8px 16px 0; }
.brain-src:empty { display: none; }
.brain-src .badge { white-space: normal; height: auto; min-height: 22px; padding: 3px 8px; line-height: 1.35; }

/* ---- static build — only active with html.fo-static */
.badge.engine { color: var(--text-2); background: var(--panel-2); border: 1px solid var(--line-2); }
.fo-static .nav [data-go="lobby"], .fo-static .nav [data-go="watch"],
.fo-static .hero-actions [data-go], .fo-static #statsBtn { display: none !important; }

/* ---- species picker (animal cards, data-basis badges, friend button) */
.badge.wrap { white-space: normal; height: auto; min-height: 22px; padding: 3px 8px; line-height: 1.35; text-align: left; max-width: 100%; }
.badge.soon { color: var(--violet, #A78BFA); background: transparent; border: 1px dashed currentColor; }
.lvl.n3 { grid-template-columns: repeat(3, 1fr); }
.opp-id { min-width: 0; flex: 1; }
.opp-name { overflow-wrap: anywhere; }
.sp-card .lock { position: static; align-self: flex-start; order: -1; margin-bottom: -2px; }
.opp.sel .opp-top { padding-right: 26px; }
.sp-card .opp-meta { align-items: flex-start; }
.teasers { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 12px; border-radius: var(--r-l);
  border: 1px dashed var(--line-2); color: var(--text-2); font-size: 12.5px; }
.teasers .tz-h { display: inline-flex; align-items: center; gap: 5px; font-weight: 750; color: var(--text-3); margin-right: 2px; }
.teasers .tz-h svg { width: 13px; height: 13px; }
.teasers .tz { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px 2px 3px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 650; filter: saturate(.6); }
.teasers .tz-ava { width: 22px; height: 22px; display: grid; place-items: center; }
.teasers .tz-ava svg { width: 20px; height: 20px; }
.friend-row:empty { display: none; }
.friend-row { padding: 0 0 32px; margin-top: -14px; }
.friend-card { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--r-l);
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.friend-card .fr-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 220px; }
.friend-card .fr-t b { font-size: 15px; font-weight: 800; }
.friend-card .fr-t span { font-size: 12.5px; color: var(--text-2); }
.friend-card .btn { flex: 0 0 auto; }
.sp-last { font-size: 12.5px; font-weight: 700; color: var(--accent); margin-bottom: 8px; line-height: 1.5; }
@media (max-width: 767px) {
  .friend-row { margin-top: -18px; padding-bottom: 24px; }
  .friend-card .btn { flex: 1 1 100%; }
}
.lvl button { min-width: 0; }
.lvl.n5 button { font-size: 11px; padding: 4px 2px; }
.lvl.n5 button > :not(b), .lvl.n5 button { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- omok screen (2026-10-08): /omok/ start screen, opponent-kind badges, forbidden-point popup, brain sparkle */
.nav a.nav-a { padding: 8px 12px; border-radius: 10px; color: var(--text-2); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; }
.nav a.nav-a:hover { background: var(--panel-2); color: var(--text); }
a.brand { text-decoration: none; }
footer.foot a.lnk { color: var(--text-2); font-weight: 650; text-decoration: none; }
footer.foot a.lnk:hover { color: var(--accent); }
.om-head { padding: 30px 0 14px; }
.om-head h1 { margin: 0; font-size: 34px; font-weight: 850; letter-spacing: -.035em; }
.om-head p { margin: 4px 0 0; color: var(--text-2); font-size: 14.5px; }
.om-start { padding-bottom: 28px; }
.om-choices { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.om-card { position: relative; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-1); padding: 20px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.om-card h2 { margin: 2px 0 0; font-size: 23px; font-weight: 850; letter-spacing: -.03em; line-height: 1.2; }
.om-desc { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.om-kick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.om-num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 850; background: var(--panel-3); color: var(--text); flex: none; }
.om-real { flex-direction: row; gap: 18px; align-items: center; border: 1.5px solid rgba(46,230,197,.55);
  background: radial-gradient(120% 140% at 0% 0%, rgba(46,230,197,.13), transparent 55%), var(--panel);
  box-shadow: 0 0 0 1px rgba(46,230,197,.15), 0 0 28px rgba(46,230,197,.22), var(--shadow-2); animation: omGlow 3.2s ease-in-out infinite; }
.om-real .om-num { background: var(--accent); color: var(--accent-ink); }
.om-real.is-off { animation: none; border-color: rgba(46,230,197,.35); box-shadow: 0 0 0 1px rgba(46,230,197,.08), 0 0 18px rgba(46,230,197,.10), var(--shadow-1); }
@keyframes omGlow { 0%, 100% { box-shadow: 0 0 0 1px rgba(46,230,197,.15), 0 0 22px rgba(46,230,197,.18), var(--shadow-2); } 50% { box-shadow: 0 0 0 1px rgba(46,230,197,.3), 0 0 40px rgba(46,230,197,.34), var(--shadow-2); } }
.om-art { flex: 0 0 34%; max-width: 230px; align-self: stretch; display: grid; place-items: center; border-radius: 16px; background: radial-gradient(90% 90% at 50% 45%, #10221F, var(--scope) 75%); border: 1px solid rgba(46,230,197,.18); padding: 8px; }
.om-brain { width: 100%; height: auto; display: block; }
.om-brain .ob-lobe, .om-brain .ob-core { fill: rgba(46,230,197,.08); stroke: rgba(46,230,197,.75); stroke-width: 1.6; }
.om-brain .ob-net path { fill: none; stroke: rgba(139,247,228,.45); stroke-width: 1.2; }
.om-brain .ob-dots circle { fill: #8BF7E4; animation: omTwinkle 2.4s ease-in-out infinite; }
.om-brain .ob-dots circle:nth-child(2n) { animation-delay: .6s; } .om-brain .ob-dots circle:nth-child(3n) { animation-delay: 1.2s; } .om-brain .ob-dots circle:nth-child(5n) { animation-delay: 1.8s; }
.om-real.is-off .om-brain .ob-dots circle { animation-duration: 5s; opacity: .6; }
@keyframes omTwinkle { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.om-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.om-body .fs { margin-top: 6px; padding: 12px 14px; border-radius: 14px; background: var(--bg-deep); border: 1px solid var(--line); }
.om-quick { justify-content: flex-start; }
.om-btns { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 6px; }
.kind-chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12.5px; font-weight: 750; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text-2); cursor: pointer; }
.kind-chip svg { width: 14px; height: 14px; }
.kind-chip.k-real { color: var(--accent); background: var(--accent-soft); border-color: rgba(46,230,197,.4); }
.kind-chip.k-practice { color: var(--violet); background: rgba(167,139,250,.12); border-color: rgba(167,139,250,.35); }
.kind-chip.k-computer { color: var(--amber); background: var(--amber-soft); border-color: rgba(255,181,71,.35); }
.om-opts { margin-top: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.om-opts h3 { margin: 0; font-size: 15px; font-weight: 800; }
.om-rule { margin: 4px 0 0; display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--text); }
.om-rule svg { width: 16px; height: 16px; flex: none; color: var(--accent); }
.om-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; align-items: start; }
.om-opts .lvl.n5 button { font-size: 12px; }
.kind-bar { width: 100%; display: flex; justify-content: center; }
.kind-big { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 14px 4px 12px; border-radius: 99px; font-size: 13px; font-weight: 700; color: var(--text-2);
  background: var(--panel); border: 1.5px solid var(--line-2); box-shadow: var(--shadow-1); cursor: pointer; max-width: 100%; }
div.kind-big { cursor: default; }
.kind-big svg { width: 18px; height: 18px; flex: none; }
.kind-big b { font-size: 16px; font-weight: 850; color: var(--text); letter-spacing: -.02em; white-space: nowrap; }
.kind-big .kb-lv { font-size: 12.5px; font-weight: 700; color: var(--text-3); white-space: nowrap; }
.kind-big .kb-i { width: 15px; height: 15px; opacity: .6; }
.kind-big.k-real { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 18px rgba(46,230,197,.3), var(--shadow-1); }
.kind-big.k-real b { color: var(--accent); }
.kind-big.k-practice { border-color: rgba(167,139,250,.6); color: var(--violet); }
.kind-big.k-computer { border-color: rgba(255,181,71,.55); color: var(--amber); }
.badge.kb { border: 1px solid var(--line-2); color: var(--text-2); background: var(--panel-2); }
.badge.kb.k-real { color: var(--accent); background: var(--accent-soft); border-color: rgba(46,230,197,.35); }
.badge.kb.k-computer { color: var(--amber); background: var(--amber-soft); border-color: rgba(255,181,71,.3); }
.kind-h { display: flex; align-items: center; gap: 8px; }
.kind-h svg { width: 22px; height: 22px; }
.kind-h.k-real { color: var(--accent); } .kind-h.k-computer { color: var(--amber); } .kind-h.k-practice { color: var(--violet); }
.kind-line { font-size: 15px; color: var(--text) !important; }
.om-kinds { margin: 0 0 8px; padding-left: 18px; line-height: 1.6; }
.om-pop { position: absolute; z-index: 6; transform: translate(-50%, -100%); display: flex; align-items: center; gap: 7px; max-width: min(320px, 92%); width: max-content;
  padding: 8px 12px; border-radius: 12px; background: rgba(16,19,24,.95); color: #fff; font-size: 13px; font-weight: 650; line-height: 1.45;
  border: 1px solid rgba(255,84,112,.55); box-shadow: 0 8px 26px rgba(0,0,0,.45); pointer-events: none; animation: omPop .18s var(--ease); }
.om-pop.below { transform: translate(-50%, 0); }
.om-pop svg { width: 16px; height: 16px; flex: none; color: #FF8FA3; }
.om-pop.hidden, .om-spark.hidden { display: none; }
@keyframes omPop { from { opacity: 0; margin-top: 6px; } to { opacity: 1; margin-top: 0; } }
.om-spark { position: absolute; z-index: 4; right: 10px; top: 10px; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 99px;
  background: rgba(6,42,36,.86); border: 1px solid rgba(46,230,197,.6); color: #CFFFF5; font-size: 12.5px; font-weight: 750; box-shadow: 0 0 22px rgba(46,230,197,.35); cursor: help; }
.om-spark .sp-dots { position: relative; width: 34px; height: 22px; }
.om-spark .sp-dots i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #8BF7E4; box-shadow: 0 0 6px #2EE6C5; animation: omSpark 1.1s ease-in-out infinite; }
.om-spark .sp-dots i:nth-child(1) { left: 2px; top: 9px; } .om-spark .sp-dots i:nth-child(2) { left: 8px; top: 3px; animation-delay: .1s; }
.om-spark .sp-dots i:nth-child(3) { left: 9px; top: 15px; animation-delay: .2s; } .om-spark .sp-dots i:nth-child(4) { left: 15px; top: 8px; animation-delay: .3s; }
.om-spark .sp-dots i:nth-child(5) { left: 17px; top: 1px; animation-delay: .45s; } .om-spark .sp-dots i:nth-child(6) { left: 18px; top: 17px; animation-delay: .55s; }
.om-spark .sp-dots i:nth-child(7) { left: 23px; top: 10px; animation-delay: .65s; } .om-spark .sp-dots i:nth-child(8) { left: 27px; top: 3px; animation-delay: .75s; }
.om-spark .sp-dots i:nth-child(9) { left: 28px; top: 16px; animation-delay: .85s; } .om-spark .sp-dots i:nth-child(10) { left: 31px; top: 9px; animation-delay: .95s; }
@keyframes omSpark { 0%, 100% { opacity: .15; transform: scale(.6); } 50% { opacity: 1; transform: scale(1.4); } }
.om-concept { margin: 4px 0 6px; font-size: 13.5px; font-weight: 650; color: var(--text); line-height: 1.55; }
.om-how { font-size: 12.5px; font-weight: 700; color: var(--accent); text-decoration: none; }
@media (max-width: 960px) {
  .om-choices { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .om-head { padding: 16px 0 10px; }
  .om-head h1 { font-size: 26px; }
  .om-head p { font-size: 13px; }
  .om-choices { gap: 12px; }
  .om-card { padding: 16px; border-radius: 18px; }
  .om-card h2 { font-size: 20px; }
  .om-desc { font-size: 13px; }
  .om-real { flex-direction: column; align-items: stretch; gap: 10px; }
  .om-art { flex: none; max-width: none; height: 92px; padding: 4px; }
  .om-brain { height: 100%; width: auto; margin: 0 auto; }
  .om-btns { flex-direction: row; }
  .om-btns .btn { flex: 1 1 0; padding: 0 10px; font-size: 14px; min-height: 50px; }
  .om-grid { grid-template-columns: 1fr; }
  .om-opts { padding: 16px; }
  .kind-big { min-height: 36px; }
  .kind-big b { font-size: 15px; }
  .om-spark { top: 6px; right: 6px; }
}
@media (prefers-reduced-motion: reduce) { .om-real, .om-brain .ob-dots circle, .om-spark .sp-dots i { animation: none; } }
/* omok: challenge share (result) + challenge landing card */
.om-share-row { padding: 0 24px 10px; }
.om-share-row .om-share { min-height: 46px; border-color: rgba(46,230,197,.45); color: var(--accent); font-weight: 750; }
.om-ch { padding: 22px 24px 8px; }
.om-ch-top { display: flex; align-items: center; gap: 10px; }
.om-ch-top .i { width: 26px; height: 26px; color: var(--accent); flex: none; }
.om-ch-top h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.om-ch-p { margin: 8px 0 14px; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.om-ch-rows { border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px; background: var(--surface-2, rgba(255,255,255,.03)); }
.om-ch-rows .meta-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 13.5px; border-top: 1px solid var(--line); }
.om-ch-rows .meta-row:first-child { border-top: 0; }
.om-ch-rows .meta-row span:first-child { color: var(--text-3); flex: none; }
.om-ch-rows .meta-row span:last-child { font-weight: 700; text-align: right; }
.om-ch-note { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; font-size: 12.5px; color: var(--amber); line-height: 1.5; }
.om-ch-note .i { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.om-ch + .modal-f { padding-top: 16px; }
@media (max-width: 767px) { .om-share-row { padding: 0 18px 10px; } .om-ch { padding: 18px 18px 6px; } }
