/* POMYJO ETF 터미널 — 3단 트레이딩 데스크 레이아웃
   색: 한국식 등락(상승=빨강, 하락=파랑), 강조=앰버. 라이트/다크 토큰 */
:root {
  --bg: #eef1f5;
  --panel: #ffffff;
  --panel-2: #f5f7fa;
  --panel-3: #eaeef3;
  --line: #e1e6ec;
  --line-2: #cfd6df;
  --tx: #111821;
  --tx-2: #3a4553;
  --mut: #677384;
  --mut-2: #8e98a6;
  --accent: #f2b233;
  --accent-ink: #9a6400;
  --accent-soft: #fbefd3;
  --on-accent: #1d1400;
  --up: #e0263f;
  --up-soft: #fde8eb;
  --down: #1a6be0;
  --down-soft: #e6effd;
  --ok: #0f9d6b;
  --ok-soft: #e2f5ee;
  --warn: #a86b00;
  --warn-soft: #fff3d6;
  --shadow: 0 1px 2px rgba(17, 24, 33, .06), 0 8px 24px rgba(17, 24, 33, .08);
  --shadow-lg: 0 24px 64px rgba(17, 24, 33, .22);
  --scrim: rgba(12, 16, 21, .44);
  --r: 10px;
  --r-sm: 6px;
  --f-ui: "Pretendard Variable", Pretendard, "IBM Plex Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --top-h: 48px;
  --rail-w: 64px;
  --watch-w: 276px;
  --side-w: 344px;
  --bh: 268px;
  --c-main: #c7890a;
  --c-2: #0f9f8f;
  --c-3: #7a52e0;
  --c-4: #d24f8f;
  --c-5: #4d7fe0;
  --c-base: #9aa4b1;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0d12;
    --panel: #10151c;
    --panel-2: #151b23;
    --panel-3: #1b222c;
    --line: #202833;
    --line-2: #2c3643;
    --tx: #e8ecf1;
    --tx-2: #b3bcc8;
    --mut: #7f8a99;
    --mut-2: #5f6a79;
    --accent: #f2b233;
    --accent-ink: #f5c258;
    --accent-soft: #3a2c10;
    --on-accent: #1d1400;
    --up: #ff4d63;
    --up-soft: #3a1419;
    --down: #4a94ff;
    --down-soft: #10233f;
    --ok: #2fcf95;
    --ok-soft: #0f2e24;
    --warn: #f0b440;
    --warn-soft: #362809;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, .6);
    --scrim: rgba(0, 0, 0, .6);
    --c-main: #f2b233;
    --c-2: #2fc7b4;
    --c-3: #a07dff;
    --c-4: #f07ab4;
    --c-5: #6aa6ff;
    --c-base: #6d7888;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0d12;
  --panel: #10151c;
  --panel-2: #151b23;
  --panel-3: #1b222c;
  --line: #202833;
  --line-2: #2c3643;
  --tx: #e8ecf1;
  --tx-2: #b3bcc8;
  --mut: #7f8a99;
  --mut-2: #5f6a79;
  --accent: #f2b233;
  --accent-ink: #f5c258;
  --accent-soft: #3a2c10;
  --on-accent: #1d1400;
  --up: #ff4d63;
  --up-soft: #3a1419;
  --down: #4a94ff;
  --down-soft: #10233f;
  --ok: #2fcf95;
  --ok-soft: #0f2e24;
  --warn: #f0b440;
  --warn-soft: #362809;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, .6);
  --scrim: rgba(0, 0, 0, .6);
  --c-main: #f2b233;
  --c-2: #2fc7b4;
  --c-3: #a07dff;
  --c-4: #f07ab4;
  --c-5: #6aa6ff;
  --c-base: #6d7888;
  color-scheme: dark;
}

/* ───────── base ───────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--tx);
  font-family: var(--f-ui);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -.02em; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.mono, .tk { font-family: var(--f-mono); letter-spacing: -.01em; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--mut); }
.mut { color: var(--mut); }
.ok-t { color: var(--ok); }
.warn-t { color: var(--warn); }
.accent-t { color: var(--accent-ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; z-index: 99; background: var(--accent); color: var(--on-accent); padding: 8px 12px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 4px; }
::selection { background: var(--accent-soft); }
svg { flex: none; }
.ico { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 14px; height: 14px; }
kbd {
  font-family: var(--f-mono); font-size: 10.5px; line-height: 1;
  padding: 3px 5px; border-radius: 4px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--mut);
}
.scroll-y { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.scroll-x { overflow-x: auto; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }

/* ───────── app grid ───────── */
.app {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: var(--rail-w) var(--watch-w) minmax(0, 1fr) var(--side-w);
  grid-template-rows: var(--top-h) auto minmax(0, 1fr);
  grid-template-areas:
    "top top top top"
    "disc disc disc disc"
    "rail watch center side";
}
.stage { display: contents; }
.top { grid-area: top; }
.mode-disc {
  grid-area: disc;
  position: sticky;
  top: var(--top-h);
  z-index: 45;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--tx-2);
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}
.mode-disc[hidden] { display: none !important; }
.rail { grid-area: rail; }
.watch { grid-area: watch; }
.center { grid-area: center; }
.side { grid-area: side; }

/* ───────── topbar ───────── */
.top {
  display: flex; align-items: center; gap: 12px;
  padding: 0 12px 0 0;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  min-width: 0;
  z-index: 20;
}
.brand {
  display: flex; align-items: center; gap: 8px; text-decoration: none;
  width: calc(var(--rail-w) + var(--watch-w)); padding-left: 16px; flex: none;
}
.brand-mark {
  width: 18px; height: 18px; border-radius: 4px; background: var(--accent);
  box-shadow: inset -6px -6px 0 0 color-mix(in srgb, var(--accent) 55%, var(--panel));
}
.brand b { font-weight: 800; letter-spacing: .02em; font-size: 14px; }
.brand-sub { color: var(--mut); font-weight: 600; font-size: 12px; }
.omni {
  display: flex; align-items: center; gap: 8px;
  width: min(360px, 32vw); height: 32px; padding: 0 8px 0 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2);
  color: var(--mut); text-align: left; flex: none;
}
.omni span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.omni:hover { border-color: var(--line-2); color: var(--tx-2); }
.strip { flex: 1; min-width: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 92%, transparent); }
.strip::-webkit-scrollbar { display: none; }
.strip-i {
  display: flex; align-items: baseline; gap: 6px; flex: none;
  padding: 4px 10px; border-radius: 6px; border: 0; background: transparent; white-space: nowrap;
}
.strip-i:hover { background: var(--panel-2); }
.strip-i .tk { font-weight: 600; font-size: 12px; }
.strip-i .p { font-size: 12px; color: var(--tx-2); }
.strip-i .c { font-size: 11.5px; font-weight: 600; }
.top-r { display: flex; align-items: center; gap: 6px; flex: none; }
.asof {
  font-size: 11.5px; color: var(--mut); padding: 4px 8px; border-radius: 999px;
  border: 1px dashed var(--line-2); white-space: nowrap;
}
.asof.sim { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 55%, transparent); border-style: solid; background: var(--accent-soft); }
.icon-btn {
  width: 32px; height: 32px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
  color: var(--tx-2); font-weight: 700;
}
.icon-btn:hover { background: var(--panel-2); color: var(--tx); }
.fx-chip { font-size: 11.5px; font-weight: 700; color: var(--up); background: var(--up-soft); padding: 4px 8px; border-radius: 999px; }

/* ───────── rail ───────── */
.rail {
  display: flex; flex-direction: column; align-items: stretch; gap: 2px;
  padding: 8px 6px; background: var(--panel); border-right: 1px solid var(--line);
  z-index: 15;
}
.rail-i {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 2px 7px; border-radius: 8px; border: 0; background: transparent;
  color: var(--mut); text-decoration: none; font-size: 10.5px; font-weight: 600; position: relative;
}
.rail-i .ico { width: 20px; height: 20px; }
.rail-i:hover { color: var(--tx); background: var(--panel-2); }
.rail-i.is-on { color: var(--tx); background: var(--panel-3); }
.rail-i.is-on::before {
  content: ""; position: absolute; left: -6px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent);
}
.rail-i .dot { position: absolute; top: 6px; right: 12px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--panel); }
body:not([data-terminal]) .rail [data-nav="paper"], body:not([data-terminal]) .rail [data-nav="screen"], body:not([data-terminal]) #paperDot, body:not([data-terminal]) [data-act="paper"] { display: none !important; }
.rail-sp { flex: 1; }
.only-m { display: none !important; }
.only-t { display: none !important; }

/* ───────── panels ───────── */
.watch, .side, .center { background: var(--panel); min-width: 0; min-height: 0; }
.watch { border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.side { border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.center { display: flex; flex-direction: column; background: var(--bg); }
.p-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 40px; padding: 0 12px; border-bottom: 1px solid var(--line); flex: none;
}
.p-title { font-size: 13px; font-weight: 700; }
.p-body { padding: 12px; }
.sec { padding: 14px 14px 16px; border-bottom: 1px solid var(--line); }
.sec:last-child { border-bottom: 0; }
.sec-t { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; color: var(--tx-2); margin-bottom: 10px; }
.sec-t small { font-weight: 500; color: var(--mut); }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--accent-ink); text-transform: uppercase; }

/* ───────── controls ───────── */
.tabs { display: flex; gap: 2px; min-width: 0; }
.tab {
  position: relative; border: 0; background: transparent; color: var(--mut);
  padding: 0 10px; height: 40px; font-weight: 600; font-size: 12.5px; white-space: nowrap;
}
.tab:hover { color: var(--tx); }
.tab.is-on { color: var(--tx); }
.tab.is-on::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }
.tab .cnt { font-family: var(--f-mono); font-size: 10.5px; color: var(--mut); margin-left: 3px; }
.tabs.sm .tab { height: 40px; padding: 0 8px; font-size: 12px; }

.seg { display: inline-flex; padding: 2px; gap: 2px; border-radius: 8px; background: var(--panel-3); flex: none; }
.seg button {
  border: 0; background: transparent; color: var(--mut); padding: 4px 9px; border-radius: 6px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.seg button:hover { color: var(--tx); }
.seg button.is-on { background: var(--panel); color: var(--tx); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.seg.block { display: flex; width: 100%; }
.seg.block button { flex: 1; padding: 7px 6px; }
.seg.buy button.is-on { color: var(--up); }
.seg.sell button.is-on { color: var(--down); }

.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--panel);
  color: var(--tx-2); font-size: 12px; font-weight: 600; white-space: nowrap;
}
.chip:hover { border-color: var(--line-2); color: var(--tx); }
.chip.is-on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 60%, transparent); color: var(--accent-ink); }
.chip .x { font-size: 13px; line-height: 1; color: var(--mut); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips.nowrap { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.chips.nowrap::-webkit-scrollbar { display: none; }

.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--tx-2); cursor: pointer; user-select: none; }
.toggle input { appearance: none; width: 28px; height: 16px; border-radius: 999px; background: var(--line-2); position: relative; margin: 0; transition: background .15s; cursor: pointer; }
.toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle input:checked { background: var(--accent); }
.toggle input:checked::after { transform: translateX(12px); }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; background: var(--panel-3); color: var(--tx-2); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.up { background: var(--up-soft); color: var(--up); }
.pill.down { background: var(--down-soft); color: var(--down); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.acc { background: var(--accent-soft); color: var(--accent-ink); }
.pill.line { background: transparent; border: 1px solid var(--line-2); color: var(--mut); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--panel); color: var(--tx); font-weight: 700; font-size: 13px; white-space: nowrap;
}
.btn:hover { background: var(--panel-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn.lg { height: 44px; font-size: 14.5px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.accent:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn.buy { background: var(--up); border-color: var(--up); color: #fff; }
.btn.buy:hover { background: color-mix(in srgb, var(--up) 88%, #000); }
.btn.sell { background: var(--down); border-color: var(--down); color: #fff; }
.btn.sell:hover { background: color-mix(in srgb, var(--down) 88%, #000); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--tx-2); }
.btn.ghost:hover { background: var(--panel-2); color: var(--tx); }
.btn.line-acc { border-color: color-mix(in srgb, var(--accent) 70%, transparent); color: var(--accent-ink); background: transparent; }

.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field > label, .field > .lbl { font-size: 12px; font-weight: 600; color: var(--mut); display: flex; justify-content: space-between; gap: 8px; }
.field > label small, .field > .lbl small { font-weight: 500; color: var(--mut-2); }
.inp {
  display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px;
  border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel);
}
.inp:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.inp input, .inp select {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; height: 100%;
  font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums;
}
.inp .u { color: var(--mut); font-weight: 600; font-size: 12.5px; flex: none; }
.inp.sm { height: 32px; }
.inp.sm input { font-size: 13px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
select.sel {
  height: 32px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--panel); padding: 0 8px; font-weight: 600; font-size: 12.5px;
}
input[type="range"] { accent-color: var(--accent); width: 100%; }
.hint { font-size: 11.5px; color: var(--mut); line-height: 1.5; }
.hint b { color: var(--tx-2); }
.note-box { font-size: 12px; line-height: 1.55; color: var(--tx-2); background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.warn-box { font-size: 12.5px; line-height: 1.55; color: var(--warn); background: var(--warn-soft); border-radius: 8px; padding: 10px 12px; font-weight: 600; }
.bad-box { font-size: 12.5px; line-height: 1.55; color: var(--up); background: var(--up-soft); border-radius: 8px; padding: 10px 12px; font-weight: 700; }

/* key-value list */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 12px; font-size: 12.5px; }
.kv dt { color: var(--mut); }
.kv dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.kv dd small { color: var(--mut); font-weight: 500; margin-left: 4px; }

/* ───────── watchlist ───────── */
.watch-tools { display: flex; gap: 6px; padding: 10px 10px 6px; }
.watch-tools .inp { flex: 1; height: 32px; }
.watch-tools .inp input { font-size: 12.5px; font-weight: 600; }
.watch-groups { padding: 2px 10px 8px; }
.watch-groups .chip { height: 24px; font-size: 11.5px; padding: 0 8px; }
.watch-cols {
  display: grid; grid-template-columns: 1fr 52px 74px; gap: 6px; padding: 6px 12px 6px 34px;
  font-size: 11px; color: var(--mut); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.watch-cols span:nth-child(n+2) { text-align: right; }
.watch-cols button { border: 0; background: none; padding: 0; color: inherit; font: inherit; text-align: inherit; }
.watch-cols button.is-on { color: var(--tx); font-weight: 700; }
.watch-list { list-style: none; margin: 0; padding: 0; flex: 1; }
.w-row {
  display: grid; grid-template-columns: 20px 1fr 52px 74px; gap: 6px; align-items: center;
  padding: 7px 12px 7px 8px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  cursor: pointer; position: relative;
}
.w-row:hover { background: var(--panel-2); }
.w-row.is-on { background: var(--panel-3); }
.w-row.is-on::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); }
.w-row.is-na { opacity: .45; }
.w-star { border: 0; background: none; padding: 0; color: var(--line-2); font-size: 13px; line-height: 1; width: 20px; height: 20px; }
.w-star.is-on { color: var(--accent); }
.w-star:hover { color: var(--accent); }
.w-id { min-width: 0; display: grid; }
.w-id .tk { font-weight: 600; font-size: 12.5px; }
.w-id .nm { font-size: 11px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-row .spark { width: 52px; height: 22px; }
.w-px { display: grid; text-align: right; }
.w-px b { font-family: var(--f-mono); font-size: 12px; font-weight: 500; }
.w-px span { font-size: 11px; font-weight: 600; }
.w-add { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: none; }
.w-row:hover .w-add { display: inline-flex; }
.watch-empty { padding: 28px 18px; text-align: center; color: var(--mut); font-size: 12.5px; line-height: 1.6; }
.watch-foot { padding: 8px 12px; border-top: 1px solid var(--line); font-size: 11px; color: var(--mut); }

/* ───────── center common ───────── */
.c-head { background: var(--panel); border-bottom: 1px solid var(--line); padding: 12px 16px 10px; flex: none; }
.tk-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; row-gap: 8px; }
.tk-big { font-family: var(--f-mono); font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.tk-names { display: grid; min-width: 0; }
.tk-names b { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32ch; }
.tk-names span { font-size: 11.5px; color: var(--mut); }
.tk-px { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tk-px b { font-family: var(--f-mono); font-size: 20px; font-weight: 600; }
.tk-px .chg { font-weight: 700; font-size: 13px; }
.tk-px small { color: var(--mut); font-size: 11px; }
.tk-acts { margin-left: auto; display: flex; gap: 6px; }
.star-btn { width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); color: var(--mut-2); font-size: 15px; line-height: 1; }
.star-btn.is-on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.toolbar { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.toolbar .sp { flex: 1; }
.tb-sep { width: 1px; height: 18px; background: var(--line); }
.cmp-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cmp-chip { border-left: 3px solid var(--c); }

.c-chart { position: relative; flex: 1; min-height: 240px; background: var(--panel); }
.chart { position: absolute; inset: 0; }
.chart-legend {
  position: absolute; left: 12px; top: 8px; z-index: 3; pointer-events: none;
  display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; max-width: calc(100% - 90px);
  background: color-mix(in srgb, var(--panel) 80%, transparent); padding: 3px 6px; border-radius: 6px;
}
.chart-legend .li { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.chart-legend .sw { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.chart-legend b { font-family: var(--f-mono); font-weight: 500; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--mut); font-size: 13px; text-align: center; padding: 20px; }
.c-split { height: 7px; flex: none; cursor: row-resize; background: var(--bg); position: relative; }
.c-split::after { content: ""; position: absolute; left: 50%; top: 2px; width: 36px; height: 3px; border-radius: 3px; transform: translateX(-50%); background: var(--line-2); }
.c-split:hover::after, .c-split.drag::after { background: var(--accent); }
.c-bottom { height: var(--bh); flex: none; background: var(--panel); border-top: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.c-bottom .p-head { padding: 0 8px 0 4px; }
.c-bottom-body { flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 7px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.tbl th { position: sticky; top: 0; z-index: 1; background: var(--panel); color: var(--mut); font-weight: 600; font-size: 11.5px; border-bottom: 1px solid var(--line); }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl td.l, .tbl th.l { text-align: left; }
.tbl td.c, .tbl th.c { text-align: center; }
.tbl tbody tr:hover td { background: var(--panel-2); }
.tbl tr.click { cursor: pointer; }
.tbl tr.is-on td { background: var(--panel-3); }
.tbl .tk { font-weight: 600; }
.tbl th.sort { cursor: pointer; user-select: none; }
.tbl th.sort:hover { color: var(--tx); }
.tbl th.sort.is-on { color: var(--tx); }
.tbl th.sort.is-on::after { content: " ▾"; color: var(--accent-ink); }
.tbl th.sort.is-on.asc::after { content: " ▴"; }
.tbl tfoot td { font-weight: 700; background: var(--panel-2); border-top: 1px solid var(--line); }
.tbl .sub { display: block; font-size: 11px; color: var(--mut); font-weight: 500; }
.bar-cell { position: relative; }
.wbar { display: inline-block; height: 6px; border-radius: 3px; background: var(--accent); vertical-align: middle; margin-left: 6px; opacity: .8; }
.empty { padding: 36px 16px; text-align: center; color: var(--mut); font-size: 12.5px; line-height: 1.7; }
.empty b { color: var(--tx-2); }

/* heatmap */
.heat td { font-size: 11.5px; padding: 5px 6px; text-align: center; }
.heat td.h { background: color-mix(in srgb, var(--hc) calc(var(--a) * 100%), transparent); color: var(--tx); }
.heat td.y { font-weight: 700; text-align: left; color: var(--tx-2); }
.heat td.ann { font-weight: 700; border-left: 1px solid var(--line); }
.heat th { text-align: center; }

/* side: stat bars */
.rbars { display: grid; gap: 6px; }
.rbar { display: grid; grid-template-columns: 44px 1fr 62px 62px; gap: 8px; align-items: center; font-size: 12px; }
.rbar .k { color: var(--mut); font-weight: 600; }
.rbar .track { height: 8px; position: relative; background: var(--panel-3); border-radius: 4px; overflow: hidden; }
.rbar .fill { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.rbar .fill.up { background: var(--up); left: 50%; }
.rbar .fill.down { background: var(--down); right: 50%; }
.rbar .mid { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--line-2); }
.rbar .v { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.rbar .v2 { text-align: right; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.rbar-h { font-size: 10.5px; color: var(--mut); }
.bullets { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.bullets li { font-size: 12.5px; line-height: 1.55; color: var(--tx-2); padding-left: 14px; position: relative; }
.bullets li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 5px; height: 5px; border-radius: 1px; background: var(--accent); }

/* ───────── sim ───────── */
.sim-wrap { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.sim-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sim-head h1 { font-size: 19px; font-weight: 800; margin-top: 2px; }
.sim-head .sub { color: var(--mut); font-size: 12px; margin-top: 2px; }
.kpis { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; background: var(--panel); border-bottom: 1px solid var(--line); flex: none; }
.kpi { padding: 12px 16px; border-right: 1px solid var(--line); min-width: 0; }
.kpi:last-child { border-right: 0; }
.kpi > span { display: block; font-size: 11.5px; color: var(--mut); font-weight: 600; }
.kpi > b { display: block; font-size: 17px; font-weight: 800; margin-top: 3px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi > small { display: block; font-size: 11.5px; color: var(--mut); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.hero > b { font-size: 26px; color: var(--tx); }
.kpi.hero { background: linear-gradient(0deg, transparent, transparent), var(--panel); position: relative; }
.kpi.hero::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.sim-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 16px; background: var(--panel); border-top: 1px solid var(--line); flex: none; }
.sim-foot .hook { flex: 1; min-width: 200px; font-weight: 700; font-size: 13px; letter-spacing: -.01em; }
.muted-line { font-size: 11px; color: var(--mut); padding: 6px 16px; background: var(--panel); border-top: 1px dashed var(--line); flex: none; }
.cmp-line { color: var(--accent-ink); font-weight: 700; font-size: 12px; }
.picks { display: grid; gap: 6px; margin-bottom: 8px; }
.pick { display: grid; grid-template-columns: minmax(0, 1fr) 76px 28px; gap: 6px; align-items: center; }
.pick-t {
  display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 8px; border: 1px solid var(--line-2);
  border-radius: 7px; background: var(--panel); text-align: left; min-width: 0;
}
.pick-t:hover { border-color: var(--accent); }
.pick-t .tk { font-weight: 600; }
.pick-t .nm { font-size: 11px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.pick-t .dd { color: var(--mut); font-size: 10px; }
.pick .inp { height: 34px; padding: 0 8px; }
.pick .inp input { text-align: right; font-size: 13px; }
.pick .rm { width: 28px; height: 34px; border: 0; background: transparent; color: var(--mut); border-radius: 6px; font-size: 16px; }
.pick .rm:hover { background: var(--panel-2); color: var(--up); }
.wstack { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--panel-3); margin: 4px 0 6px; }
.wstack i { display: block; height: 100%; }
.wsum { display: flex; justify-content: space-between; align-items: center; font-size: 12px; margin-bottom: 8px; }
.wsum b.bad { color: var(--up); }
.wsum b.good { color: var(--ok); }

/* ───────── paper ───────── */
.clock {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px;
  background: var(--panel); border-bottom: 1px solid var(--line); flex: none;
}
.clock-now { display: grid; }
.clock-now small { font-size: 11px; color: var(--mut); font-weight: 600; }
.clock-now b { font-family: var(--f-mono); font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.clock-prog { flex: 1; min-width: 140px; display: grid; gap: 4px; }
.clock-prog .bar { height: 6px; border-radius: 3px; background: var(--panel-3); overflow: hidden; }
.clock-prog .bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.clock-prog span { font-size: 11px; color: var(--mut); }
.clock-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.evbar { display: flex; gap: 8px; align-items: center; padding: 7px 16px; font-size: 12px; color: var(--tx-2); background: var(--panel-2); border-bottom: 1px solid var(--line); flex: none; min-height: 32px; overflow: hidden; }
.evbar .ev { white-space: nowrap; }
.evbar .ev + .ev::before { content: "·"; margin-right: 8px; color: var(--mut); }
.acct { display: grid; gap: 10px; }
.acct-total small { font-size: 11.5px; color: var(--mut); font-weight: 600; }
.acct-total b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.acct-total .chg { font-size: 12.5px; font-weight: 700; }
.acct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.acct-grid > div { background: var(--panel); padding: 8px 10px; }
.acct-grid small { display: block; font-size: 11px; color: var(--mut); }
.acct-grid b { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ticket { padding: 0 14px 16px; }
.ticket .tabs { margin: 0 -14px 12px; padding: 0 6px; border-bottom: 1px solid var(--line); }
.tick-px { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 10px; border-radius: 8px; background: var(--panel-2); margin-bottom: 10px; }
.tick-px b { font-family: var(--f-mono); font-size: 16px; font-weight: 600; }
.tick-px small { color: var(--mut); font-size: 11.5px; }
.est { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; font-size: 12px; padding: 10px 0; border-top: 1px dashed var(--line); margin-top: 4px; }
.est dt { color: var(--mut); }
.est dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.est dd.big { font-size: 14px; font-weight: 800; }
.pct-chips { display: flex; gap: 4px; margin-top: 6px; }
.pct-chips button { flex: 1; height: 26px; border: 1px solid var(--line); background: var(--panel); border-radius: 6px; font-size: 11.5px; font-weight: 600; color: var(--tx-2); }
.pct-chips button:hover { border-color: var(--accent); color: var(--tx); }
.ticket-msg { font-size: 12px; margin-top: 8px; min-height: 18px; font-weight: 600; }
.ticket-msg.bad { color: var(--up); }
.ticket-msg.ok { color: var(--ok); }
.rules { display: grid; gap: 6px; margin-top: 10px; }
.rule { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; }
.rule.off { opacity: .55; }
.setup { max-width: 760px; margin: 0 auto; padding: 22px 20px 40px; width: 100%; }
.setup h1 { font-size: 22px; font-weight: 800; margin: 6px 0 6px; }
.setup .lead { color: var(--tx-2); font-size: 13.5px; line-height: 1.6; max-width: 62ch; }
.setup-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-top: 16px; }
.setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.how > div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.how b { display: block; font-size: 13px; margin-bottom: 4px; }
.how p { font-size: 12px; color: var(--mut); line-height: 1.55; }
.how .n { font-family: var(--f-mono); font-size: 11px; color: var(--accent-ink); font-weight: 600; }
.hist-row { display: grid; grid-template-columns: 1fr auto; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.hist-row:last-child { border-bottom: 0; }
.grade { font-family: var(--f-mono); font-weight: 700; font-size: 12px; padding: 2px 6px; border-radius: 5px; }

/* result modal */
.res-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-radius: 10px; overflow: hidden; margin: 12px 0; }
.res-hero > div { background: var(--panel); padding: 14px; }
.res-hero small { font-size: 11.5px; color: var(--mut); font-weight: 600; }
.res-hero b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.res-hero span { font-size: 12px; font-weight: 700; }

/* ───────── screener ───────── */
.scr-head { display: grid; gap: 10px; }
.scr-filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.scr-f { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--tx-2); font-weight: 600; }
.scr-f input[type="range"] { width: 110px; }
.scr-f output { font-family: var(--f-mono); font-size: 11.5px; min-width: 44px; color: var(--tx); }
.scr-body { flex: 1; min-height: 0; overflow: auto; background: var(--panel); scrollbar-width: thin; }
.scr-body .tbl td, .scr-body .tbl th { padding: 7px 9px; }
.scr-sel { width: 16px; height: 16px; accent-color: var(--accent); }
.scr-foot { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--panel); border-top: 1px solid var(--line); flex: none; flex-wrap: wrap; }
.cls-dot { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 6px; vertical-align: 1px; }
.cls-eq { background: var(--accent); }
.cls-bd { background: var(--down); }
.cls-cs { background: var(--ok); }
.cls-cm { background: #c9a227; }
.cls-cr { background: #9b6bff; }

/* ───────── modal / toast ───────── */
.modal-root { position: fixed; inset: 0; z-index: 100; display: grid; place-items: start center; padding: 10vh 16px 16px; background: var(--scrim); }
.modal-root[hidden] { display: none; }
.modal {
  width: min(640px, 100%); max-height: 80vh; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.modal.wide { width: min(820px, 100%); }
.modal-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.modal-h h2 { font-size: 15px; font-weight: 800; }
.modal-b { padding: 14px 16px 18px; overflow: auto; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pal-in input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; font-weight: 600; }
.pal-list { list-style: none; margin: 0; padding: 6px; overflow: auto; max-height: 56vh; }
.pal-g { font-size: 11px; color: var(--mut); font-weight: 700; padding: 8px 10px 4px; }
.pal-i { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.pal-i.is-on, .pal-i:hover { background: var(--panel-3); }
.pal-i .tk { font-weight: 600; }
.pal-i .nm { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-i .nm small { color: var(--mut); margin-left: 6px; }
.pal-i .r { font-size: 12px; text-align: right; }
.pal-i.na { opacity: .45; }
.pal-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 16px 4px; }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.help-grid h3 { font-size: 13px; margin-bottom: 6px; }
.help-grid p, .help-grid li { font-size: 12.5px; color: var(--tx-2); line-height: 1.6; }
.help-grid ul { margin: 0; padding-left: 16px; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 12.5px; align-items: center; }
.toast-root { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 120; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { pointer-events: auto; background: var(--tx); color: var(--panel); padding: 10px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow); max-width: min(92vw, 520px); animation: tin .2s ease-out; }
.toast.bad { background: var(--up); color: #fff; }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); color: var(--mut); z-index: 200; font-size: 13px; }
.boot[hidden] { display: none; }
.loader { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; margin: 0 auto 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
.foot-legal { font-size: 11px; color: var(--mut); padding: 10px 14px 16px; line-height: 1.6; }
.foot-legal a { color: var(--accent-ink); text-decoration: none; }

/* fx kill switch */
body.fx-paused .fx-numbers { display: none !important; }

/* ───────── responsive ───────── */
@media (min-width: 1600px) {
  :root { --side-w: 380px; --watch-w: 300px; }
}
/* tablet: 관심종목은 서랍으로 */
@media (max-width: 1279px) {
  .app {
    grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--side-w);
    grid-template-rows: var(--top-h) auto minmax(0, 1fr);
    grid-template-areas:
      "top top top"
      "disc disc disc"
      "rail center side";
  }
  .brand { width: auto; padding-right: 8px; }
  .watch { position: fixed; top: var(--top-h); bottom: 0; left: var(--rail-w); width: 300px; z-index: 30; box-shadow: var(--shadow-lg); transform: translateX(-120%); transition: transform .2s ease; }
  body[data-drawer="watch"] .watch { transform: none; }
  .only-t { display: flex !important; }
  .asof { display: none; }
}
@media (max-width: 1279px) and (prefers-reduced-motion: reduce) { .watch { transition: none; } }
/* phone */
@media (max-width: 900px) {
  :root { --top-h: 52px; }
  body { overflow: auto; font-size: 13.5px; }
  .app {
    display: block;
    height: auto;
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
    grid-template-rows: var(--top-h) auto minmax(0, 1fr);
    grid-template-areas:
      "top top top"
      "disc disc disc"
      "rail center side";
  }
  .top { position: sticky; top: 0; height: var(--top-h); padding: 0 12px 0 0; gap: 8px; }
  .brand { padding-left: 14px; }
  .brand-sub { display: none; }
  .omni { width: auto; flex: 1; min-width: 0; }
  .omni kbd { display: none; }
  .strip { display: none; }
  .rail {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 40;
    flex-direction: row; padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); gap: 0;
    border-right: 0; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 92%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  }
  .rail-i { flex: 1; padding: 7px 2px 5px; font-size: 11px; }
  .rail-i.is-on::before { left: 30%; right: 30%; top: -4px; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }
  .rail-sp, .rail .only-d { display: none; }
  .only-m { display: flex !important; }
  .only-t.no-m { display: none !important; }
  .watch { position: fixed; top: var(--top-h); left: 0; right: 0; bottom: calc(58px + env(safe-area-inset-bottom)); width: auto; transform: none; display: none; z-index: 35; box-shadow: none; }
  body[data-drawer="watch"] .watch { display: flex; }
  .stage { display: flex; flex-direction: column; }
  .center, .side { display: contents; }
  .center > *, .side > * { order: var(--mo, 50); }
  .side > .p-head { display: none; }
  .c-head { padding: 12px 14px; }
  .c-chart { flex: none; height: 320px; min-height: 0; border-bottom: 1px solid var(--line); }
  .c-split { display: none; }
  .c-bottom { height: auto; min-height: 0; border-top: 0; }
  .c-bottom-body { max-height: 440px; }
  .tk-acts { margin-left: 0; width: 100%; }
  .tk-acts .btn { flex: 1; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi { border-bottom: 1px solid var(--line); }
  .kpi.hero { grid-column: 1 / -1; border-right: 0; }
  .kpi.hero > b { font-size: 30px; }
  .kpi:nth-child(2n) { border-right: 1px solid var(--line); }
  .kpi:nth-child(odd):not(.hero) { border-right: 0; }
  .sec { background: var(--panel); }
  .side-block { background: var(--panel); border-top: 8px solid var(--bg); }
  .setup { padding: 16px 14px 28px; }
  .setup-grid, .how { grid-template-columns: 1fr; }
  .help-grid { grid-template-columns: 1fr; }
  .modal-root { padding: 0; place-items: end stretch; }
  .modal { width: 100%; max-height: 88vh; border-radius: 16px 16px 0 0; }
  .toast-root { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .clock { padding: 10px 14px; }
  .clock-btns { width: 100%; }
  .clock-btns .btn { flex: 1; padding: 0 8px; }
  .res-hero { grid-template-columns: 1fr; }
  .scr-body { max-height: 70vh; }
}
@media (max-width: 420px) {
  .kpi { padding: 10px 12px; }
  .kpi > b { font-size: 15px; }
  .tk-big { font-size: 20px; }
  .tk-px b { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ───────── fixes ───────── */
.watch-tools .inp { min-width: 0; }
.watch-tools .sel { flex: none; width: 92px; }
.row2 > *, .row3 > * { min-width: 0; }
.field .inp { min-width: 0; }
.m-sum { display: none; }
@media (max-width: 900px) {
  .m-sum { display: block !important; position: sticky; bottom: calc(62px + env(safe-area-inset-bottom)); z-index: 30; padding: 0 10px 8px; pointer-events: none; }
  .m-sum:empty { display: none !important; }
  .m-sum button {
    pointer-events: auto; width: 100%; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left;
    border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--panel) 94%, transparent);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 8px 12px; box-shadow: var(--shadow);
  }
  .m-sum span:first-child { grid-row: 1 / 3; font-size: 11px; color: var(--mut); font-weight: 700; writing-mode: horizontal-tb; }
  .m-sum b { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
  .m-sum small { grid-column: 2; font-size: 11px; color: var(--mut); }
  .m-sum .go { grid-row: 1 / 3; grid-column: 3; font-size: 12px; font-weight: 700; color: var(--accent-ink); }
  .sim-foot { padding: 10px 14px; }
}
.keys kbd { justify-self: start; }
