/* ==========================================================================
   Seegak v10.2 — YouTube Shorts Maximized for 0% Stock Beginners
   - True 100dvh Vertical-Swipe 3-Slot Shorts Theater (Touch-Follow + Spring)
   - Iconic 4-Icon YouTube Shorts Right Rail: 버팀 · 댓글 · 낙서 · 공유 (ZERO 5일 업앤다운!)
   - Strict 1-Lens = 1-Universe (4 Lenses, 0px Scroll, Tap-Again = Raw Curve)
   - Live 50:50 Split Sheet (4-Lens Bar STAYS ALIVE!) & 72dvh YouTube Comments Drawer
   - 2 Signal Colors (Red/Blue) + Pure White / Obsidian Dark | 0 UI Emojis
   ========================================================================== */

:root,
[data-theme="light"] {
  --bg: #FFFFFF;
  --bg-sub: #F5F6F8;
  --bg-elev: #FFFFFF;
  --line: rgba(17, 19, 24, 0.08);
  --line-strong: rgba(17, 19, 24, 0.16);
  --ink-1: #111318;
  --ink-2: #525866;
  --ink-3: #8B93A1;
  --mono: #111318;
  --mono-inv: #FFFFFF;
  --up: #E5384F;
  --up-soft: rgba(229, 56, 79, 0.10);
  --dn: #2563EB;
  --dn-soft: rgba(37, 99, 235, 0.10);
  --shadow-card: 0 12px 36px rgba(17, 19, 24, 0.07);
  --shadow-pop: 0 14px 40px rgba(17, 19, 24, 0.14);
}

[data-theme="dark"] {
  --bg: #09090B;
  --bg-sub: #141418;
  --bg-elev: #111115;
  --line: rgba(244, 244, 246, 0.09);
  --line-strong: rgba(244, 244, 246, 0.18);
  --ink-1: #F4F4F6;
  --ink-2: #A1A1AA;
  --ink-3: #71717A;
  --mono: #F4F4F6;
  --mono-inv: #09090B;
  --up: #FF5768;
  --up-soft: rgba(255, 87, 104, 0.14);
  --dn: #4B91FF;
  --dn-soft: rgba(75, 145, 255, 0.14);
  --shadow-card: 0 18px 48px rgba(0, 0, 0, 0.55);
  --shadow-pop: 0 16px 44px rgba(0, 0, 0, 0.65);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior-y: none;
  background: var(--bg);
  color: var(--ink-1);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

.num { font-variant-numeric: tabular-nums; }
.up-txt { color: var(--up); }
.dn-txt { color: var(--dn); }
.muted-txt { color: var(--ink-3); font-size: 12px; }
.ico { width: 18px; height: 18px; flex-shrink: 0; }
.ico-xs { width: 13px; height: 13px; flex-shrink: 0; }

/* ── 1. Topbar (44px) ───────────────────────────────────────────────────── */
.topbar {
  height: 44px;
  flex-shrink: 0;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  z-index: 75;
}

.tb-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.brand-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-1);
  white-space: nowrap;
}

.tb-peek-stock {
  display: none;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}
.tps-name { font-size: 14px; font-weight: 800; max-width: 96px; overflow: hidden; text-overflow: ellipsis; }
.tps-chg { font-size: 12.5px; font-weight: 800; }

.tb-search {
  position: relative;
  flex: 1;
  max-width: 360px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}
.search-ico {
  position: absolute;
  left: 9px;
  width: 14px;
  height: 14px;
  color: var(--ink-3);
  pointer-events: none;
}
.search-input {
  width: 100%;
  height: 32px;
  padding: 0 22px 0 26px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-sub);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.025em;
  outline: none;
}
.search-input:focus { border-color: var(--mono); background: var(--bg); }
.search-input::placeholder { color: var(--ink-3); }
.search-clear {
  position: absolute;
  right: 4px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
}

.search-dd {
  display: none;
  position: absolute;
  top: 38px;
  left: 0;
  right: 0;
  max-height: 340px;
  overflow-y: auto;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-pop);
  z-index: 80;
  padding: 4px;
}
@media (max-width: 540px) {
  .search-dd {
    position: fixed;
    top: 46px;
    left: 10px;
    right: 10px;
    max-height: min(360px, 56dvh);
  }
}
.search-dd.open { display: block; }
.sdd-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 9px;
  text-align: left;
}
.sdd-item:hover { background: var(--bg-sub); }
.sdd-name { font-size: 13.5px; font-weight: 700; }
.sdd-sub { font-size: 11.5px; color: var(--ink-3); }
.sdd-mkt { font-size: 11px; font-weight: 700; color: var(--ink-2); padding: 2px 7px; border-radius: 999px; background: var(--bg-sub); }

.tb-right { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.tb-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 12px;
  font-weight: 700;
}
.tb-icon-btn:hover { background: var(--bg-sub); border-color: var(--line-strong); }

/* ── 하루 마감 확정봉 배지 & 당당한 철학 팝오버 ── */
.eod-wrap { position: relative; display: flex; align-items: center; }
.eod-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-sub);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}
.eod-pill:hover,
.eod-pill[aria-expanded="true"] {
  background: var(--bg);
  border-color: var(--mono);
  color: var(--ink-1);
}
.eod-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
  flex-shrink: 0;
}
.eod-badge-ext { margin-left: -2px; }
@media (max-width: 480px) {
  .eod-pill { height: 28px; padding: 0 7px; font-size: 11px; gap: 4px; }
  .eod-badge-ext { display: none; }
}
.eod-pop {
  position: fixed;
  top: 48px;
  right: 10px;
  width: min(344px, calc(100vw - 20px));
  max-height: calc(100dvh - 60px);
  overflow-y: auto;
  padding: 14px 15px 12px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  box-shadow: var(--shadow-pop);
  z-index: 120;
  text-align: left;
}
.eod-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}
.eod-pop-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink-1);
  letter-spacing: -0.02em;
}
.eod-pop-x {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--ink-3);
}
.eod-pop-x:hover { background: var(--bg-sub); color: var(--ink-1); }
.eod-pop-why {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.52;
  color: var(--ink-2);
}
.eod-pop-why b { color: var(--ink-1); font-weight: 800; }
.eod-sched {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--bg-sub);
  margin-bottom: 8px;
}
.eod-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
}
.eod-row-k { font-weight: 700; color: var(--ink-1); white-space: nowrap; }
.eod-row-v { color: var(--ink-2); text-align: right; }
.eod-row-dt { color: var(--ink-3); font-size: 11px; margin-left: 4px; }
.eod-pop-foot {
  font-size: 11px;
  color: var(--ink-3);
  text-align: right;
}
.eod-brief-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
  max-height: 310px;
  overflow-y: auto;
}
.eod-brief-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--bg);
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.eod-brief-item:hover { background: var(--bg-sub); border-color: var(--line-strong); }
.eod-brief-txt {
  flex: 1;
  min-width: 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-1);
  line-height: 1.35;
}
.eod-brief-go { font-size: 13px; color: var(--ink-3); flex-shrink: 0; }

/* ── 오늘 탭 전용 28px 정지-페이드 핵심 브리핑 바 ── */
.brief-bar {
  height: 28px;
  flex-shrink: 0;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  background: var(--bg-sub);
  z-index: 25;
}
.brief-inner {
  width: 100%;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.brief-btn {
  flex: 1;
  min-width: 0;
  height: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left;
  cursor: pointer;
}
.brief-tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--mono);
  color: var(--bg);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.brief-tag.tone-up { background: rgba(229, 56, 79, 0.13); color: var(--up); }
.brief-tag.tone-dn { background: rgba(37, 99, 235, 0.13); color: var(--dn); }
.brief-tag.tone-warn { background: rgba(217, 119, 6, 0.16); color: #b45309; }
[data-theme="dark"] .brief-tag.tone-warn { background: rgba(251, 191, 36, 0.18); color: #fbbf24; }
.brief-txt {
  flex: 1;
  min-width: 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.24s ease, transform 0.24s ease;
}
.brief-txt.fading { opacity: 0; transform: translateY(-3px); }
.brief-go { font-size: 13px; font-weight: 700; color: var(--ink-3); flex-shrink: 0; }
.brief-close {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--ink-3);
  flex-shrink: 0;
}
.brief-close:hover { background: var(--line); color: var(--ink-1); }
@media (max-width: 959px) {
  body.sheet-open .brief-bar { display: none !important; }
}
.dock-legal-btn {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline dotted var(--line-strong);
  text-underline-offset: 2px;
}
.dock-legal-btn:hover { color: var(--ink-1); }

/* ── 2. Lane Bar (32px · 5 Tabs) ────────────────────────────────────────── */
.lane-bar {
  height: 32px;
  flex-shrink: 0;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  z-index: 30;
}
.lane-tabs {
  width: 100%;
  max-width: 480px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.lane-tab {
  position: relative;
  height: 32px;
  padding: 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.lane-tab:hover { color: var(--ink-1); }
.lane-tab.active { color: var(--ink-1); font-weight: 800; }
.lane-tab.active::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--mono);
}

/* ── 3. Shorts Theater Shell (100dvh Locked!) ───────────────────────────── */
.theater-shell {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
}

.theater-center {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shorts-stage-outer {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.shorts-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  touch-action: none;
}

.shorts-track {
  position: relative;
  width: 100%;
  height: 100%;
  will-change: transform;
}
.shorts-track.animating {
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
.shorts-track.animating-x {
  transition: transform 0.19s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Horizontal Tab Swipe Floating Edge Indicator */
.lane-swipe-pill {
  position: absolute;
  top: 46%;
  z-index: 32;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 72%;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  color: var(--ink-1);
  box-shadow: var(--shadow-pop);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(-50%) scale(0.94);
  transition: opacity 0.12s ease, transform 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.lane-swipe-pill.from-left { left: 10px; right: auto; }
.lane-swipe-pill.from-right { right: 10px; left: auto; }
.lane-swipe-pill.show { opacity: 0.94; transform: translateY(-50%) scale(1); }
.lane-swipe-pill.ready {
  background: var(--mono);
  border-color: var(--mono);
  color: var(--mono-inv);
  opacity: 1;
}

.short-slot {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
}
.slot-prev { top: -100%; }
.slot-cur {
  top: 0;
  display: flex;
  flex-direction: column;
  padding: 6px 8px max(6px, env(safe-area-inset-bottom));
  gap: 6px;
}
.slot-next { top: 100%; }

/* Incoming Next/Prev Shorts Peek Preview Cards while swiping */
.slot-peek {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg-sub);
}
.peek-card {
  width: 100%;
  max-width: 320px;
  padding: 20px;
  border-radius: 18px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pk-kicker { font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.pk-name { font-size: 22px; font-weight: 800; color: var(--ink-1); }
.pk-px { font-size: 16px; font-weight: 800; }
.pk-sub { font-size: 12.5px; color: var(--ink-2); }

/* Top 2-Line Stock Header */
.stock-header {
  flex-shrink: 0;
  padding: 0 2px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sh-row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.sh-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}
.sh-name {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.025em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sh-mkt, .sh-idx { font-size: 11px; font-weight: 700; color: var(--ink-3); flex-shrink: 0; }

.sh-tools { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.sh-tool-btn {
  display: inline-flex;
  align-items: center;
  height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-2);
  white-space: nowrap;
}
.sh-tool-btn.active { background: var(--mono); border-color: var(--mono); color: var(--mono-inv); }
.sh-tool-btn.up-pill { background: var(--up-soft); border-color: var(--up); color: var(--up); }
.sh-tool-btn.dn-pill { background: var(--dn-soft); border-color: var(--dn); color: var(--dn); }

.sh-row2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sh-price-wrap { display: flex; align-items: baseline; gap: 6px; flex-shrink: 0; }
.sh-price { font-size: 21px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.sh-chg { font-size: 13.5px; font-weight: 800; }

.sh-cause-chip {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-2);
  padding: 2.5px 8px;
  border-radius: 999px;
  background: var(--bg-sub);
  border: 1px solid var(--line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 58%;
  cursor: pointer;
}
.sh-cause-chip:active { opacity: 0.8; }
.sh-cause-chip.mine { background: var(--dn-soft); border-color: var(--dn); color: var(--dn); }
.sh-cause-chip.warn { background: var(--up-soft); border-color: var(--up); color: var(--up); }

/* ── Central Stage + Iconic 4-Icon YouTube Shorts Right Rail ────────────── */
.stage-mid {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.canvas-stage {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 120px;
  border-radius: 14px;
  background: var(--bg-sub);
  border: 1px solid var(--line);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

#shorts-canvas,
.doodle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.doodle-canvas { z-index: 5; pointer-events: none; }
.doodle-canvas.drawing { pointer-events: auto; cursor: crosshair; touch-action: none; }

/* Iconic 5-Icon YouTube Shorts Right Rail (존버 · 댓글 · 포폴 · 낙서 · 공유) */
.shorts-rail {
  width: 44px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding-bottom: 2px;
}

.sr-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--ink-1);
}
.sr-circle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--bg-sub);
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-1);
  transition: transform 0.12s, background 0.14s, color 0.14s, border-color 0.14s;
}
.sr-btn:active .sr-circle { transform: scale(0.92); }
.sr-btn.active .sr-circle {
  background: var(--mono);
  border-color: var(--mono);
  color: var(--mono-inv);
}
.sr-btn.hold-active .sr-circle {
  background: var(--up);
  border-color: var(--up);
  color: #FFFFFF;
}
.sr-lbl { font-size: 10.5px; font-weight: 700; color: var(--ink-2); line-height: 1.1; }
.sr-cnt { font-size: 11px; font-weight: 800; color: var(--ink-1); line-height: 1.1; }

/* Canvas Overlays — 1-line beginner floor & blue-bar legend (no 3x duplication) */
.s-cyq-head {
  position: absolute;
  top: 6px;
  left: 8px;
  z-index: 4;
  max-width: calc(100% - 16px);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-2);
  background: var(--bg);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.s-cyq-head .cyq-key-floor { color: var(--ink-1); font-weight: 800; }
.s-cyq-head .cyq-key-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dn);
  flex-shrink: 0;
}
.s-cyq-head .cyq-key-dot-up {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--up);
  flex-shrink: 0;
}
.s-cyq-head .cyq-key-dn { color: var(--dn); font-weight: 800; }
.s-cyq-head .cyq-key-up { color: var(--up); font-weight: 800; }

.mine-lock-banner {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  z-index: 7;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--dn);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  pointer-events: none;
}

.s-mypin-handle {
  position: absolute;
  left: 6px;
  transform: translateY(-50%);
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 3px;
  cursor: ns-resize;
  touch-action: none;
}
.s-mypin-tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #D97706;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.32);
  white-space: nowrap;
}
[data-theme="dark"] .s-mypin-tag {
  background: #F59E0B;
  color: #09090B;
}
.s-mypin-mini {
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  color: var(--ink-1);
  font-size: 10.5px;
  font-weight: 700;
}

.s-mypin-clamp {
  position: absolute;
  left: 8px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #D97706;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.28);
}
[data-theme="dark"] .s-mypin-clamp {
  background: #F59E0B;
  color: #09090B;
}
.s-mypin-clamp.top { top: 8px; }
.s-mypin-clamp.bot { bottom: 8px; }

.mypin-pop {
  position: absolute;
  top: auto;
  bottom: 8px;
  left: 8px;
  right: 8px;
  z-index: 14;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid var(--mono);
  box-shadow: var(--shadow-pop);
}
[data-theme="dark"] .mypin-pop {
  background: rgba(17, 17, 21, 0.94);
}
.mypin-pop-hint {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-2);
  letter-spacing: -0.02em;
}
.mypin-pop-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.mypin-pop-inp {
  flex: 1;
  min-width: 0;
  height: 30px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--bg-sub);
  font-size: 13px;
  font-weight: 700;
  outline: none;
}
.mypin-pop-ok { height: 30px; padding: 0 10px; border-radius: 8px; background: var(--mono); color: var(--mono-inv); font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.mypin-pop-x { width: 24px; height: 30px; font-size: 16px; color: var(--ink-2); }
.share-quick-pin {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 9px 11px;
  border-radius: 12px;
  background: var(--bg-sub);
  border: 1px solid var(--line-strong);
}
.sqp-txt {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: -0.02em;
}
.sqp-txt b { color: var(--ink-1); font-weight: 800; }
.sqp-row { display: flex; gap: 6px; align-items: center; }
.sqp-inp {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink-1);
  font-size: 14px;
  font-weight: 700;
  outline: none;
}
.sqp-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--mono);
  color: var(--mono-inv);
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
}
.mypin-presets {
  display: flex;
  align-items: center;
  gap: 4px;
}
.mp-pre {
  flex: 1;
  height: 23px;
  padding: 0 5px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-sub);
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
.mp-pre:hover { border-color: var(--mono); color: var(--ink-1); }
.mp-pre-del { color: var(--dn); border-color: var(--dn-soft); background: var(--bg); }
.mypin-other-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px dashed var(--line);
  font-size: 11px;
  color: var(--ink-3);
}
.mypin-other-btn {
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-1);
  background: var(--bg-sub);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 2px 9px;
}

.analog-curtain {
  position: absolute;
  top: 24px;
  bottom: 22px;
  right: 6px;
  width: 40%;
  z-index: 7;
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}
[data-theme="dark"] .analog-curtain { background: rgba(19, 19, 24, 0.86); }
.curtain-reveal-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 11px;
  background: var(--mono);
  color: var(--mono-inv);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}
.crb-q { font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.crb-sub { font-size: 10px; opacity: 0.78; white-space: nowrap; }

/* Double-tap YouTube Shorts 👍 pop overlay */
.dbltap-pop {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.4);
  font-size: 56px;
  line-height: 1;
  pointer-events: none;
  opacity: 0;
  z-index: 15;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.24));
}
.dbltap-pop.pop {
  animation: dblTapPop 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes dblTapPop {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.45); }
  32%  { opacity: 0.95; transform: translate(-50%, -56%) scale(1.18); }
  75%  { opacity: 0.85; transform: translate(-50%, -62%) scale(1.0); }
  100% { opacity: 0; transform: translate(-50%, -74%) scale(0.92); }
}

/* ── 핵심 차트 집중 모드: 불필요한 놀이·배너 제거 → 풀폭 차트 (+50px) ──── */
#brief-bar,
#shorts-rail,
#dock-com-strip {
  display: none !important;
}

/* ── 1초 직관 10명 사람 아이콘 + 한줄 요약 (첫 화면 직노출 · <= 58px 초슬림) ── */
.main-u10-bar {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2.5px;
  padding: 4px 9px 4px;
  border-radius: 10px;
  background: var(--bg-sub);
  border: 1px solid var(--line);
  cursor: pointer;
}
.mu10-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  line-height: 1.15;
}
.mu10-verdict {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.mu10-verdict b {
  font-weight: 900;
}
.mu10-note {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-3);
  white-space: nowrap;
  flex-shrink: 0;
}
.mu10-note.is-warn {
  color: var(--dn);
  font-weight: 800;
}
.mu10-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.u10-people {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  align-items: center;
  justify-items: center;
  gap: 2px;
}
.u10-person {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.u10-person.profit { color: var(--up); }
.u10-person.trap { color: var(--dn); }
.u10-person-svg {
  width: 17px;
  height: 18px;
  display: block;
}
.main-u10-bar .u10-people {
  gap: 2px;
  padding: 0 2px 1px;
}
.main-u10-bar .u10-person-svg {
  width: 14px;
  height: 15px;
}
@media (max-height: 700px) {
  .main-u10-bar { padding: 4px 8px 3.5px; gap: 2px; }
  .mu10-verdict { font-size: 11.5px; }
  .main-u10-bar .u10-person-svg { width: 13px; height: 14px; }
}

/* ── 1순위 메인 주인공 CTA 행 (내 종목 검색 ↔ 내 매수가 + 공유 + 해설) ──── */
.dock-hero-row {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}
.dock-search-btn {
  order: 2;
  flex: 0 0 auto;
  height: 36px;
  padding: 0 9px;
  border-radius: 11px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  color: var(--ink-1);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.025em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}
.dock-search-btn:hover { border-color: var(--mono); }
.dock-search-btn:active { opacity: 0.86; transform: scale(0.98); }
.dock-search-btn.is-hero {
  order: 1;
  flex: 1;
  min-width: 0;
  padding: 0 10px;
  background: var(--mono);
  border-color: var(--mono);
  color: var(--mono-inv);
  font-size: 12px;
  gap: 5px;
}
.dsb-txt {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dock-floor-btn {
  order: 1;
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border-radius: 11px;
  background: var(--mono);
  border: 1px solid var(--mono);
  color: var(--mono-inv);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 5px;
  text-align: left;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}
.dock-floor-btn.is-compact {
  order: 2;
  flex: 0 0 auto;
  padding: 0 9px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  color: var(--ink-1);
  justify-content: center;
  gap: 0;
}
.dock-floor-btn.is-compact:hover { border-color: var(--mono); }
.dock-floor-btn.is-compact:active { opacity: 0.84; transform: scale(0.98); }
.dock-floor-btn.is-compact .dfb-dot,
.dock-floor-btn.is-compact .dfb-go { display: none; }
.dock-floor-btn.is-compact .dfb-txt { flex: none; }
.dock-floor-btn.has-floor {
  padding: 0 9px;
  font-size: 12px;
  gap: 5px;
}
.dock-floor-btn.has-floor.is-trap {
  background: var(--dn-soft);
  border: 1.5px solid var(--dn);
  color: var(--dn);
}
.dock-floor-btn.has-floor.is-profit {
  background: var(--up-soft);
  border: 1.5px solid var(--up);
  color: var(--up);
}
.dock-card-btn {
  order: 3;
  flex-shrink: 0;
  height: 36px;
  padding: 0 9px;
  border-radius: 11px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  color: var(--ink-1);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 3.5px;
  white-space: nowrap;
}
.dock-card-btn:hover { border-color: var(--mono); }
.dock-card-btn:active { opacity: 0.84; transform: scale(0.98); }
.ico-xs { width: 14px; height: 14px; flex-shrink: 0; }
.dfb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  opacity: 0.85;
}
.dfb-txt {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dfb-go { font-size: 15px; font-weight: 800; opacity: 0.72; flex-shrink: 0; }

/* ── ?ref=card 입구 전용 초집중 모드 (해일엔진 3대 문화 정렬: 누를 버튼 20개 → 딱 3개!) ── */
.card-focus-panel { display: none; }
body.card-focus-mode #lane-bar,
body.card-focus-mode #brief-bar,
body.card-focus-mode #shorts-rail,
body.card-focus-mode #slot-prev,
body.card-focus-mode #slot-next,
body.card-focus-mode #dock-hero-row,
body.card-focus-mode #main-u10-bar,
body.card-focus-mode #lens-bar-wrap,
body.card-focus-mode #dock-com-strip,
body.card-focus-mode #dock-swipe-cue,
body.card-focus-mode #s-idx,
body.card-focus-mode #s-cause-chip,
body.card-focus-mode #s-mypin-btn,
body.card-focus-mode #mypin-pop,
body.card-focus-mode .s-prog-track,
body.card-focus-mode #sheet-col,
body.card-focus-mode .sheet-col,
body.card-focus-mode #side-sheet,
body.card-focus-mode .side-sheet,
body.card-focus-mode .pc-nav-arrows {
  display: none !important;
}
body.card-focus-mode .card-focus-panel {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--bg-sub);
  border: 1.5px solid var(--mono);
  flex-shrink: 0;
}
.cf-head { display: flex; flex-direction: column; gap: 2px; }
.cf-title { font-size: 14px; font-weight: 800; color: var(--ink-1); letter-spacing: -0.025em; }
.cf-title b { color: var(--dn); }
.cf-sub { font-size: 11px; font-weight: 600; color: var(--ink-3); letter-spacing: -0.02em; }
.cf-input-row { display: flex; gap: 6px; align-items: center; }
.cf-inp {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1.5px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink-1);
  font-size: 16px;
  font-weight: 800;
  outline: none;
}
.cf-inp:focus { border-color: var(--mono); }
.cf-go {
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--mono);
  color: var(--mono-inv);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.cf-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.cf-pre {
  height: 27px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.cf-pre:hover { border-color: var(--mono); color: var(--ink-1); }
.cf-result {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding-top: 2px;
}
.cf-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 8px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.cf-stat.is-me { border-color: var(--dn); background: rgba(37, 99, 235, 0.06); }
.cf-sk { font-size: 10px; font-weight: 700; color: var(--ink-3); }
.cf-sv { font-size: 16px; font-weight: 900; color: var(--ink-1); letter-spacing: -0.03em; line-height: 1.15; }
.cf-stat.is-me .cf-sv { color: var(--dn); }
.cf-stat.is-me.is-up { border-color: var(--up); background: rgba(229, 56, 79, 0.06); }
.cf-stat.is-me.is-up .cf-sv { color: var(--up); }
.cf-ss { font-size: 10px; font-weight: 600; color: var(--ink-3); }
.cf-comrade-line {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-1);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 7px 10px;
  letter-spacing: -0.02em;
  line-height: 1.35;
}
.cf-send-btn {
  height: 40px;
  width: 100%;
  border-radius: 11px;
  background: var(--dn);
  color: #FFFFFF;
  font-size: 13.5px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.cf-foot-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2px;
}
.cf-link-btn {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cf-link-btn:hover { color: var(--ink-1); }

/* ── 2순위 명확 분리 바: 본캐(물린 사람) │ 보조(엘리엇·닮은꼴·반등) ──────── */
.lens-bar-wrap { flex-shrink: 0; }
.lens-strip {
  display: flex;
  align-items: center;
  gap: 6px;
}
.lens-pill {
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-2);
  white-space: nowrap;
  text-align: center;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.lens-hero {
  flex-shrink: 0;
  font-weight: 800;
  padding: 0 12px;
}
.lens-hero.active {
  background: var(--mono);
  border-color: var(--mono);
  color: var(--mono-inv);
}
.lens-sep {
  width: 1px;
  height: 16px;
  background: var(--line-strong);
  flex-shrink: 0;
}
.lens-sub-tray {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  height: 30px;
  padding: 2px 3px 2px 8px;
  border-radius: 999px;
  background: var(--bg-sub);
  border: 1px solid var(--line);
}
.lens-sub-tray.is-collapsed {
  flex: 0 0 auto;
  padding: 2px 9px;
}
.lens-sub-tray.is-collapsed .lens-sub { display: none; }
.lens-sub-toggle {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  white-space: nowrap;
  padding: 0 2px;
}
.lens-sub-toggle:hover { color: var(--ink-1); }
.lens-sub-lbl {
  font-size: 10px;
  font-weight: 800;
  color: var(--ink-3);
  margin-right: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}
.lens-sub {
  flex: 1;
  min-width: 0;
  height: 24px;
  padding: 0 4px;
  border-color: transparent;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
}
.lens-sub:hover { color: var(--ink-1); }
.lens-sub.active {
  background: var(--bg-elev);
  border-color: var(--ink-1);
  color: var(--ink-1);
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(17, 19, 24, 0.08);
}

.tm-era-strip { display: flex; align-items: center; gap: 5px; overflow-x: auto; scrollbar-width: none; }
.tm-era-strip::-webkit-scrollbar { display: none; }
.era-pill {
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  white-space: nowrap;
  flex-shrink: 0;
}
.era-pill.active { background: var(--mono); border-color: var(--mono); color: var(--mono-inv); }

.doodle-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 6px; height: 32px; }
.dt-group { display: flex; align-items: center; gap: 4px; }
.dt-btn, .dt-act, .dt-done { height: 28px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.dt-btn { border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink-2); }
.dt-btn.active { background: var(--mono); border-color: var(--mono); color: var(--mono-inv); }
.dt-clr { width: 22px; height: 22px; border-radius: 999px; border: 2px solid transparent; }
.dt-clr.up { background: var(--up); }
.dt-clr.dn { background: var(--dn); }
.dt-clr.active { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--mono); }
.dt-act { border: 1px solid var(--line-strong); background: var(--bg-sub); color: var(--ink-1); }
.dt-done { background: var(--mono); color: var(--mono-inv); }

.mine-bar-note {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--dn-soft);
  color: var(--dn);
  font-size: 12px;
  font-weight: 800;
}

/* ── Bottom Shorts Dock (쉬운 해설 + 유튜브 스타일 댓글 티커) ────────────── */
.shorts-dock {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.dock-explain-btn {
  order: 4;
  flex: 0 0 auto;
  height: 36px;
  padding: 0 9px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink-1);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
}
.dock-explain-btn.full-primary {
  flex: 1;
  background: var(--mono);
  border-color: var(--mono);
  color: var(--mono-inv);
  justify-content: space-between;
  padding: 0 14px;
}
.dock-explain-btn:hover { border-color: var(--mono); }
.deb-arrow { font-size: 12px; opacity: 0.72; }

/* Explain sheet secondary lens context banner */
.exp-sub-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--bg-sub);
  border: 1px solid var(--line-strong);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-2);
}
.exp-sub-back {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--mono);
  color: var(--mono-inv);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.dock-com-strip {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  background: var(--bg-sub);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 7px;
  text-align: left;
  min-width: 0;
}
.dcs-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-1);
  flex-shrink: 0;
}
.dcs-txt {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dcs-more { font-size: 14px; font-weight: 800; color: var(--ink-3); flex-shrink: 0; }

.dock-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
  font-size: 11px;
  color: var(--ink-3);
}
.dock-legal { white-space: nowrap; flex-shrink: 0; }
.dock-foot.cue-flipping .dock-swipe-cue { text-align: right; }
.dock-swipe-cue {
  font-weight: 700;
  color: var(--ink-2);
  display: inline-block;
  min-width: 0;
  flex: 1;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dock-swipe-cue.flip-in {
  color: var(--ink-1);
  animation: cueFlip 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes cueFlip {
  0%   { opacity: 0; transform: translateY(7px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* 2px Shorts Progress Bar */
.s-prog-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--line);
}
.s-prog-fill {
  height: 100%;
  width: 0%;
  background: var(--mono);
}

/* PC External Up/Down Shorts Arrows (hidden on mobile) */
.pc-nav-arrows { display: none; }

/* ── 4. YouTube-Style 2-Tab Sheet (Explain 50:50 Split / Comments 72dvh) ── */
.sheet-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(9, 9, 11, 0.35);
}

.side-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  height: 50dvh;
  background: var(--bg-elev);
  border-top: 1px solid var(--line-strong);
  border-radius: 18px 18px 0 0;
  box-shadow: var(--shadow-pop);
  display: flex;
  flex-direction: column;
  transform: translateY(105%);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), height 0.22s ease;
}
.side-sheet.open { transform: translateY(0); }

.sheet-handle-bar {
  padding: 7px 0 3px;
  display: flex;
  justify-content: center;
  cursor: grab;
  touch-action: none;
}
.sheet-handle-pill {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: var(--line-strong);
}

.sheet-head {
  height: 40px;
  padding: 0 12px 0 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  touch-action: none;
}
.sheet-tabs { display: flex; align-items: center; gap: 4px; }
.sheet-tab {
  position: relative;
  height: 40px;
  padding: 0 12px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sheet-tab.active { color: var(--ink-1); font-weight: 800; }
.sheet-tab.active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--mono);
}

.icon-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
}

.sheet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px max(14px, env(safe-area-inset-bottom));
}

/* Mobile Sheet Open Split Modes (Chart & 4-Lens Bar STAY ALIVE!) */
@media (max-width: 959px) {
  body.sheet-open .brand-name { display: none; }
  body.sheet-open .tb-peek-stock { display: inline-flex; }
  body.sheet-open .lane-bar,
  body.sheet-open .stock-header,
  body.sheet-open .main-u10-bar,
  body.sheet-open .dock-hero-row,
  body.sheet-open .shorts-dock,
  body.sheet-open .shorts-rail { display: none !important; }
  body.sheet-open .sheet-backdrop { display: block; background: transparent; pointer-events: none; }

  /* Explain Tab: 50:50 Live Split (Top 50dvh = Live Chart + 4-Lens Bar!) */
  body.sheet-explain .theater-shell { flex: none; height: calc(50dvh - 44px); }
  body.sheet-explain .slot-cur { padding: 4px 8px 6px; gap: 5px; }
  body.sheet-explain .side-sheet { height: 50dvh; }

  /* Comments & Portfolio Tabs: YouTube Shorts 72dvh Drawer + Top 28dvh Live Chart Peek! */
  body.sheet-com .theater-shell,
  body.sheet-port .theater-shell { flex: none; height: calc(28dvh - 44px); }
  body.sheet-com .lens-bar-wrap,
  body.sheet-port .lens-bar-wrap { display: none !important; }
  body.sheet-com .slot-cur,
  body.sheet-port .slot-cur { padding: 4px 8px 4px; }
  body.sheet-com .side-sheet,
  body.sheet-port .side-sheet { height: 72dvh; }
}

/* ── Explain Cards (2 Blocks · <= 280 chars!) ───────────────────────────── */
.explain-body { display: flex; flex-direction: column; gap: 8px; }
.exp-card {
  padding: 11px 12px;
  border-radius: 13px;
  background: var(--bg-sub);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.exp-title { margin: 0; font-size: 15.5px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.3; }
.exp-desc { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-1); }

.u10-wrap { display: flex; flex-direction: column; gap: 5px; }
.u10-blocks { display: grid; grid-template-columns: repeat(10, 1fr); align-items: center; justify-items: center; gap: 4px; }
.u10-cell { width: 100%; height: 13px; border-radius: 4px; }
.u10-cell.profit { background: var(--up); opacity: 0.85; }
.u10-cell.trap { background: var(--dn); opacity: 0.85; }
.u10-legend { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 800; letter-spacing: -0.02em; }

.exp-xray-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.exg-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 8px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  min-width: 0;
}
.exg-k { font-size: 10px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.exg-v { font-size: 13px; font-weight: 900; color: var(--ink-1); letter-spacing: -0.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exg-s { font-size: 10px; font-weight: 600; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.exp-panic-note {
  padding: 7px 9px;
  border-radius: 9px;
  background: var(--dn-soft);
  border: 1px solid rgba(37, 99, 235, 0.28);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.42;
  color: var(--ink-1);
}
.exp-panic-note b { color: var(--dn); font-weight: 800; margin-right: 4px; }

.drawer-split { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ds-col {
  padding: 8px 9px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ds-col.real { border-color: var(--mono); }
.ds-k { font-size: 11px; font-weight: 800; color: var(--ink-3); }
.ds-col.real .ds-k { color: var(--ink-1); }
.ds-v { font-size: 12px; font-weight: 600; line-height: 1.4; }

.exp-takeaway-card {
  padding: 10px 12px;
  border-radius: 13px;
  background: var(--bg);
  border: 1.5px solid var(--mono);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.exp-takeaway-k { font-size: 11px; font-weight: 800; color: var(--ink-2); }
.exp-takeaway-txt { margin: 0; font-size: 13px; font-weight: 700; line-height: 1.48; }
.exp-ref-details { border-top: 1px solid var(--line); padding-top: 6px; font-size: 12px; color: var(--ink-2); }
.exp-ref-details summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; }
.exp-ref-details summary::-webkit-details-marker { display: none; }
.exp-ref-details summary::after { content: "▾"; }
.exp-ref-details[open] summary::after { content: "▴"; }
.exp-ref-body { margin-top: 5px; line-height: 1.45; color: var(--ink-1); }

.analog-mini-list { display: flex; flex-direction: column; gap: 5px; }
.analog-mini-item {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 9px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 12px;
}

/* ── YouTube-Style Comments Drawer (Scrollable List + Sticky Bottom Input!) */
.sheet-com-layout {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.com-scroll-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.plaza-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plaza-prompt { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.35; }
.hold-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1.5px solid var(--mono);
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}
.hold-btn.active { background: var(--up); border-color: var(--up); color: #FFFFFF; }

.com-controls-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: nowrap; }
.com-filter-tabs { display: flex; gap: 5px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.com-filter-tabs::-webkit-scrollbar { display: none; }
.cf-tab {
  height: 27px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-2);
  white-space: nowrap;
  flex-shrink: 0;
}
.cf-tab.active { background: var(--mono); border-color: var(--mono); color: var(--mono-inv); }

.com-sort-toggle { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 999px; background: var(--bg-sub); border: 1px solid var(--line); flex-shrink: 0; }
.cs-btn { height: 22px; padding: 0 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.cs-btn.active { background: var(--bg); color: var(--ink-1); font-weight: 800; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }

.com-apt-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--bg-sub);
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-2);
}
.apt-cta { font-size: 11px; font-weight: 800; color: var(--ink-1); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; flex-shrink: 0; }

.com-list { display: flex; flex-direction: column; gap: 8px; }
.com-card {
  padding: 10px 11px;
  border-radius: 12px;
  background: var(--bg-sub);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.com-card.is-best { border-color: var(--line-strong); }
.com-card.is-deleted { opacity: 0.72; padding: 8px 11px; }
.cc-deleted-msg { margin: 0; font-size: 12px; color: var(--ink-3); font-style: italic; }
.cc-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.cc-who { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 0; }
.cc-nick { font-size: 12.5px; font-weight: 800; }
.cc-floor {
  font-size: 11px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-1);
  border: 1px solid var(--line-strong);
  cursor: pointer;
}
.cc-floor.trap { background: var(--dn-soft); border-color: var(--dn); color: var(--dn); }
.cc-floor.profit { background: var(--up-soft); border-color: var(--up); color: var(--up); }
.cc-crown { font-size: 10.5px; font-weight: 800; padding: 1px 6px; border-radius: 999px; background: var(--mono); color: var(--mono-inv); }
.cc-tag { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--bg); color: var(--ink-2); }
.cc-tag.badge { background: var(--up-soft); color: var(--up); }
.cc-tag.stock-jump { background: var(--mono); color: var(--mono-inv); }
.cc-time { font-size: 11px; color: var(--ink-3); flex-shrink: 0; }
.cc-body { margin: 0; font-size: 13.5px; line-height: 1.48; word-break: break-word; }
.cc-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.cc-reacts { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.rx-btn {
  height: 25px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: transform 0.14s ease, background 0.14s ease, color 0.14s ease;
}
.rx-btn.active { background: var(--mono); border-color: var(--mono); color: var(--mono-inv); }
.rx-btn.rx-pop { transform: scale(1.09); }
.cc-actions { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.cc-act-btn { font-size: 11px; font-weight: 700; color: var(--ink-2); padding: 2px 6px; border-radius: 6px; }
.cc-act-btn:hover { background: var(--bg); color: var(--ink-1); }
.cc-mod-btn { font-size: 11px; color: var(--ink-3); padding: 2px 5px; }

/* 1-Depth YouTube Replies + 71층 Apartment Chemistry */
.cc-replies-box { margin-top: 2px; padding-left: 10px; border-left: 2px solid var(--line-strong); display: flex; flex-direction: column; gap: 6px; }
.cc-rep-toggle {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--dn);
  padding: 2px 0;
}
.cc-rep-preview { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; cursor: pointer; }
.cc-rep-list { display: flex; flex-direction: column; gap: 6px; }
.cc-rep-item { display: flex; flex-direction: column; gap: 2px; padding-top: 4px; border-top: 1px dashed var(--line); }
.cc-rep-item:first-child { padding-top: 0; border-top: none; }
.cc-rep-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.cc-rep-who { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 0; }
.cc-rep-nick { font-size: 12px; font-weight: 800; }
.cc-chem { font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line-strong); color: var(--ink-2); }
.cc-chem.neighbor { background: var(--up-soft); border-color: var(--up); color: var(--up); }
.cc-chem.upper { background: var(--dn-soft); border-color: var(--dn); color: var(--dn); }
.cc-chem.owner { background: var(--mono); border-color: var(--mono); color: var(--mono-inv); }
.cc-rep-body-row { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.cc-rep-body { margin: 0; font-size: 12.5px; line-height: 1.42; color: var(--ink-1); word-break: break-word; }

.com-divider { font-size: 11.5px; font-weight: 800; color: var(--ink-2); padding: 4px 2px 0; }
.com-empty { padding: 14px 10px; text-align: center; border-radius: 11px; background: var(--bg-sub); color: var(--ink-2); font-size: 12.5px; display: flex; flex-direction: column; gap: 9px; align-items: center; }
.com-starters { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.com-starter-chip {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-1);
}
.com-starter-chip:hover { border-color: var(--mono); background: var(--mono); color: var(--mono-inv); }
.com-plaza-link {
  width: 100%;
  margin-top: 2px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px dashed var(--line-strong);
  background: transparent;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  transition: color 0.14s, border-color 0.14s, background 0.14s;
}
.com-plaza-link:hover { color: var(--ink-1); border-color: var(--ink-3); background: var(--bg-sub); }

/* Bottom-Pinned YouTube Comment Composer (1-Line Collapsed -> Focus Expanded!) */
.yt-composer-dock {
  flex-shrink: 0;
  padding: 7px 12px max(9px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-strong);
  background: var(--bg-elev);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.yt-composer-extra { display: none; flex-direction: column; gap: 6px; }
.yt-composer-dock.expanded .yt-composer-extra { display: flex; }
.yt-composer-dock.reply-mode:not(.floor-editing) #com-floor-bar,
.yt-composer-dock.reply-mode #com-prefix-row { display: none !important; }
.com-reply-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--bg-sub);
  border: 1px solid var(--line-strong);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-1);
}
.crb-cancel { font-size: 11px; font-weight: 800; color: var(--ink-3); padding: 1px 4px; flex-shrink: 0; }
.auth-bar { display: flex; flex-direction: column; gap: 5px; }
.auth-logged, .auth-guest { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; }
.auth-link { font-size: 11.5px; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; flex-shrink: 0; }
.inline-auth-form { display: flex; flex-direction: column; gap: 5px; }
.ia-fields { display: grid; grid-template-columns: 1fr 1fr auto; gap: 5px; }
.ia-inp { width: 100%; min-width: 0; height: 34px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--bg-sub); font-size: 13px; outline: none; }
.ia-submit { height: 34px; padding: 0 12px; }
.ia-msg { font-size: 11.5px; color: var(--up); }

.com-floor-bar { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.cfb-pill {
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-2);
  white-space: nowrap;
}
.cfb-pill.on-trap { background: var(--dn-soft); border-color: var(--dn); color: var(--dn); }
.cfb-pill.on-profit { background: var(--up-soft); border-color: var(--up); color: var(--up); }
.cfb-hint { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
.cfb-inline { display: flex; align-items: center; gap: 4px; width: 100%; }
.cfb-inp { flex: 1; min-width: 0; height: 30px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--bg-sub); font-size: 13px; font-weight: 700; outline: none; }
.cfb-ok { height: 30px; padding: 0 10px; border-radius: 8px; background: var(--mono); color: var(--mono-inv); font-size: 11.5px; font-weight: 800; }

.prefix-row { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.prefix-row::-webkit-scrollbar { display: none; }
.pf-btn {
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
  white-space: nowrap;
  flex-shrink: 0;
}
.pf-btn.active { background: var(--mono); border-color: var(--mono); color: var(--mono-inv); }

.com-write-row { display: flex; align-items: center; gap: 5px; }
.com-mini-floor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-sub);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  color: var(--ink-2);
  white-space: nowrap;
  flex-shrink: 0;
}
.com-mini-floor.on-trap { background: var(--dn-soft); border-color: var(--dn); color: var(--dn); }
.com-mini-floor.on-profit { background: var(--up-soft); border-color: var(--up); color: var(--up); }
.com-text-input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-sub);
  font-size: 13px;
  outline: none;
}
.com-text-input:focus { border-color: var(--mono); background: var(--bg); }
.com-char-cnt { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; flex-shrink: 0; display: none; }
.yt-composer-dock.expanded .com-char-cnt { display: inline; }
.com-post-btn { height: 36px; padding: 0 13px; border-radius: 999px; flex-shrink: 0; }

/* ── 1-Second Beginner Portfolio Drawer (내 포폴) ───────────────────────── */
.port-body { display: flex; flex-direction: column; gap: 10px; }
.port-cur-card {
  padding: 12px;
  border-radius: 14px;
  background: var(--bg-sub);
  border: 1.5px solid var(--mono);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pcc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pcc-title { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.pcc-name { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcc-now { font-size: 12.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.pcc-pnl {
  font-size: 12.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  white-space: nowrap;
  flex-shrink: 0;
}
.pcc-pnl.up { background: var(--up-soft); border-color: var(--up); color: var(--up); }
.pcc-pnl.dn { background: var(--dn-soft); border-color: var(--dn); color: var(--dn); }
.pcc-input-row { display: flex; gap: 6px; align-items: center; }
.port-px-inp {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-size: 14px;
  font-weight: 700;
  outline: none;
}
.port-px-inp:focus { border-color: var(--mono); }
.pcc-presets { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.pcc-pre-btn {
  height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
}
.pcc-pre-btn:hover { border-color: var(--mono); color: var(--ink-1); }
.pcc-actions { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pcc-sub-note { font-size: 11.5px; color: var(--ink-2); }
.pcc-mini-acts { display: flex; gap: 5px; }
.pcc-link-btn {
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-1);
}
.pcc-link-btn.danger { color: var(--dn); border-color: var(--dn-soft); }

.port-summary-card {
  padding: 11px 12px;
  border-radius: 13px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.psc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; }
.psc-stat {
  padding: 7px 4px;
  border-radius: 9px;
  background: var(--bg-sub);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.psc-k { font-size: 10.5px; font-weight: 700; color: var(--ink-3); }
.psc-v { font-size: 13.5px; font-weight: 800; color: var(--ink-1); }
.psc-btns { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.psc-shorts-btn { height: 36px; border-radius: 10px; font-size: 12.5px; font-weight: 800; }
.psc-share-btn { height: 36px; padding: 0 11px; border-radius: 10px; font-size: 12px; font-weight: 800; }

.port-list-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 800; color: var(--ink-2); padding: 0 2px; }
.port-list { display: flex; flex-direction: column; gap: 6px; }
.port-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 11px;
  border-radius: 12px;
  background: var(--bg-sub);
  border: 1px solid var(--line);
  text-align: left;
  width: 100%;
  cursor: pointer;
}
.port-item.current { border-color: var(--mono); background: var(--bg); }
.pi-left { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.pi-row1 { display: flex; align-items: center; gap: 5px; min-width: 0; }
.pi-name { font-size: 13.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-mkt { font-size: 10.5px; font-weight: 700; color: var(--ink-3); flex-shrink: 0; }
.pi-row2 { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); flex-wrap: wrap; }
.pi-trap { font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--dn-soft); color: var(--dn); }
.pi-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.pi-pnl-col { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.pi-pnl { font-size: 13.5px; font-weight: 800; }
.pi-px { font-size: 11px; color: var(--ink-3); }
.pi-del {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pi-del:hover { color: var(--dn); border-color: var(--dn); }
.port-empty {
  padding: 18px 14px;
  border-radius: 13px;
  background: var(--bg-sub);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.port-liked-details {
  padding: 9px 11px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.port-liked-details summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-2);
}
.port-liked-details summary::-webkit-details-marker { display: none; }
.port-liked-details summary::after { content: "▾"; }
.port-liked-details[open] summary::after { content: "▴"; }
.port-liked-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.pl-chip {
  height: 27px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-sub);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-1);
}

/* ── Desktop >= 960px (YouTube Shorts 9:16 Cinema Frame + Docked Right Drawer) */
@media (min-width: 960px) {
  .theater-shell {
    padding: 14px 20px;
    gap: 20px;
    background: var(--bg-sub);
  }
  .theater-center { flex: 0 1 auto; }
  .shorts-stage-outer {
    width: auto;
    height: min(760px, calc(100dvh - 104px));
  }
  .shorts-viewport {
    width: 460px;
    height: 100%;
    border-radius: 22px;
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow-card);
  }
  .slot-cur { padding: 12px 14px 10px; gap: 8px; }

  .pc-nav-arrows {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .pc-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-card);
  }
  .pc-nav-btn:hover { background: var(--mono); color: var(--mono-inv); border-color: var(--mono); }

  .sheet-backdrop, .sheet-handle-bar { display: none !important; }
  .side-sheet {
    position: static;
    width: 0;
    height: min(760px, calc(100dvh - 104px));
    border-radius: 20px;
    border: 0;
    overflow: hidden;
    transform: none;
    opacity: 0;
    pointer-events: none;
    transition: width 0.22s ease, opacity 0.2s ease;
  }
  .side-sheet.open {
    width: 390px;
    border: 1px solid var(--line-strong);
    opacity: 1;
    pointer-events: auto;
  }
}

/* ── Modals & Toast ─────────────────────────────────────────────────────── */
.btn-solid, .btn-outline {
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-solid { background: var(--mono); color: var(--mono-inv); }
.btn-outline { border: 1px solid var(--line-strong); color: var(--ink-1); background: var(--bg); }

.modal-bg {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(9, 9, 11, 0.56);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.modal-box {
  width: 100%;
  max-width: 420px;
  max-height: 90dvh;
  overflow-y: auto;
  border-radius: 18px;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-pop);
}
.bot-modal { max-width: 680px; }
.modal-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.modal-head h2 { margin: 0; font-size: 16px; font-weight: 800; }
.modal-body { padding: 14px 16px; }
.share-body { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.share-ratio-seg {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  border-radius: 11px;
  background: var(--bg-sub);
  border: 1px solid var(--line);
}
.sr-seg-btn {
  height: 32px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  background: transparent;
  transition: background 0.12s, color 0.12s, box-shadow 0.12s;
}
.sr-seg-btn.active {
  background: var(--bg);
  color: var(--ink-1);
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.share-preview-img { width: 100%; max-height: 48dvh; object-fit: contain; border-radius: 12px; border: 1px solid var(--line); }
.share-hide-row { width: 100%; display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); }
.share-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.share-actions.share-actions-2x2 { grid-template-columns: 1fr 1fr; gap: 7px; }
.share-copyimg-btn { background: var(--dn); border-color: var(--dn); color: #fff; }
.share-toast { font-size: 12px; color: var(--ink-2); min-height: 16px; text-align: center; }

.local-pill { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--bg-sub); color: var(--ink-2); margin-left: 4px; }
.bot-sub { margin: 4px 0 0; font-size: 12px; color: var(--ink-2); }
.bot-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.bot-box { padding: 12px; border-radius: 12px; background: var(--bg-sub); }
.bot-box h3 { margin: 0 0 8px; font-size: 13.5px; font-weight: 800; }
.bot-kv-wrap { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; }
.kv-row { display: flex; justify-content: space-between; gap: 8px; }
.bot-form { display: flex; flex-direction: column; gap: 8px; }
.bot-field { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--ink-2); }
.bot-input { height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--bg); }
.bot-actions-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.bot-console { margin: 12px 0 0; padding: 10px; border-radius: 10px; background: var(--bg-sub); font-size: 12px; max-height: 140px; overflow: auto; white-space: pre-wrap; }

.toast {
  position: fixed;
  left: 50%;
  bottom: max(76px, calc(72px + env(safe-area-inset-bottom)));
  transform: translate(-50%, 16px);
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--mono);
  color: var(--mono-inv);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  z-index: 120;
  transition: opacity 0.18s, transform 0.18s;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Mobile iOS 16px Input Guard & Narrow 360px Precision */
@media (max-width: 767px) {
  .search-input, .ia-inp, .com-text-input, .mypin-pop-inp, .port-px-inp, .cfb-inp { font-size: 16px; }
  .ia-fields { grid-template-columns: 1fr 1fr; }
  .ia-submit { grid-column: 1 / -1; }
}
@media (max-width: 390px) {
  .tb-btn-lbl { display: none; }
  .sh-name { font-size: 17px; }
  .sh-price { font-size: 20px; }
  .lens-pill { font-size: 11.5px; }
  .dt-btn, .dt-act, .dt-done { padding: 0 7.5px; font-size: 11px; }
  .sr-circle { width: 36px; height: 36px; }
  .shorts-rail { width: 42px; gap: 6px; }
}


/* ── SEO SSR Data Table, FAQ & Internal Hub Links (visible inside 쉬운 해설 sheet) ── */
.seo-ssr-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border, #e5e7eb);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink2, #475569);
}
.seo-ssr-section h2 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink1, #0f172a);
  margin: 0 0 6px;
}
.seo-ssr-section h3 {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink1, #0f172a);
  margin: 12px 0 6px;
}
.seo-ssr-section p {
  margin: 0 0 8px;
}
.seo-ssr-tbl {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0 10px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.seo-ssr-tbl th,
.seo-ssr-tbl td {
  padding: 5px 6px;
  border-bottom: 1px solid var(--border, #e5e7eb);
  text-align: right;
}
.seo-ssr-tbl th:first-child,
.seo-ssr-tbl td:first-child {
  text-align: left;
}
.seo-ssr-tbl th {
  font-weight: 600;
  color: var(--ink2, #64748b);
  font-size: 11px;
}
.seo-ssr-tbl tr.is-trap td:nth-child(2) { color: #2563eb; font-weight: 600; }
.seo-ssr-tbl tr.is-prof td:nth-child(2) { color: #e11d48; font-weight: 600; }
.seo-ssr-faq details {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 7px 10px;
  margin-bottom: 6px;
  background: var(--bg2, #f8fafc);
}
.seo-ssr-faq summary {
  font-weight: 600;
  color: var(--ink1, #0f172a);
  cursor: pointer;
}
.seo-ssr-faq p {
  margin: 5px 0 0;
  font-size: 12px;
}
.seo-ssr-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 10px;
}
.seo-ssr-links a {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--bg1, #ffffff);
  color: var(--ink1, #1e293b);
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 600;
}
.seo-ssr-links a:hover {
  border-color: #2563eb;
  color: #2563eb;
}
.seo-ssr-links a.seo-pill-cta {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}
