:root {
  --bg: #0b0d12;
  --panel: #12161f;
  --panel-alt: #181e2a;
  --line: #262f40;
  --line-bright: #374359;
  --ink: #f1f4f9;
  --muted: #8a95a8;
  --amber: #f0b429;
  --crimson: #e5484d;
  --cyan: #38bdf8;
  --emerald: #34d399;
  --violet: #a78bfa;
  --font-display: 'Barlow Condensed', system-ui, sans-serif;
  --font-ui: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.45;
  height: 100%;
  overflow: hidden;
}

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ===== TOP BAR ===== */
.topbar {
  height: 46px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 16px;
  background: linear-gradient(180deg, #161b26 0%, #10131c 100%);
  border-bottom: 1px solid var(--line);
  z-index: 30;
}

/* ===== PANORAMIC TOP STATS BAR ===== */
.top-stats-bar {
  flex-shrink: 0;
  background: #0d111a;
  border-bottom: 1px solid var(--line);
  padding: 7px 14px;
  z-index: 25;
}

.top-stats-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 7px;
}

.top-stats-grid .hero-stat-card {
  padding: 6px 9px;
}

.top-stats-grid .hs-num {
  font-size: 25px;
  margin: 1px 0;
}

.top-stats-grid .hs-sub {
  font-size: 9.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-badge {
  background: linear-gradient(135deg, var(--amber), #d98218);
  color: #0b0d12;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 4px;
  box-shadow: 0 0 14px rgba(240, 180, 41, 0.25);
  white-space: nowrap;
}

.brand-titles h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: 0.06em;
  line-height: 1;
}

.brand-titles .accent { color: var(--amber); }

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.mode-switch {
  display: flex;
  background: #0c0f16;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px;
  gap: 3px;
}

.mode-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: all 0.15s ease;
}

.mode-btn:hover { color: var(--ink); }
.mode-btn.active {
  background: var(--crimson);
  color: #fff;
  box-shadow: 0 0 12px rgba(229, 72, 77, 0.35);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-wrap {
  position: relative;
  width: 280px;
}

.search-wrap input {
  width: 100%;
  background: #0c0f16;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 12px;
  padding: 6px 10px;
  outline: none;
}

.search-wrap input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 420px;
  max-height: 400px;
  overflow-y: auto;
  background: #131823;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
  z-index: 90;
}

.search-item {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.search-item:hover { background: var(--panel-alt); }
.search-item-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--amber);
  margin-bottom: 3px;
}
.search-item-snip { font-size: 12px; color: #d5dce8; }
.search-item-snip mark {
  background: rgba(240, 180, 41, 0.28);
  color: #ffe299;
  padding: 0 2px;
  border-radius: 2px;
}

.sync-anchor {
  position: relative;
}

.coverage-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0e131c;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 5px 11px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #cbd5e1;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.coverage-pill:hover,
.coverage-pill.open {
  border-color: var(--emerald);
  background: #131c29;
  color: #fff;
}
.coverage-pill .pill-caret {
  font-size: 9px;
  color: var(--muted);
  transition: transform 0.15s ease;
}
.coverage-pill.open .pill-caret {
  transform: rotate(180deg);
  color: var(--emerald);
}

.coverage-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

.sync-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  max-width: calc(100vw - 24px);
  background: rgba(15, 20, 30, 0.97);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-bright);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.72);
  z-index: 120;
}
.sp-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.sp-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin-right: auto;
}
.sp-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.sp-hero {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.sp-count {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: #f8fafc;
}
.sp-count span {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}
.sp-pct {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--emerald);
}
.sp-bar-track {
  height: 10px;
  background: #070a10;
  border: 1px solid #243045;
  border-radius: 99px;
  overflow: hidden;
}
.sp-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #10b981 0%, #38bdf8 60%, #f0b429 100%);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.45);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.sp-eta-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: rgba(240, 180, 41, 0.10);
  border: 1px solid rgba(240, 180, 41, 0.34);
  border-radius: 6px;
  padding: 7px 10px;
}
.sp-eta-main {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--amber);
}
.sp-eta-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #f3dba0;
}
.sp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.sp-stat {
  background: #0a0e16;
  border: 1px solid #1e2738;
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sp-stat-k {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.sp-stat-v {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: #e6ecf5;
}
.sp-current {
  font-size: 11px;
  color: #cbd5e1;
  background: #0a0e16;
  border: 1px solid #1e2738;
  border-radius: 5px;
  padding: 6px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-foot {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: #7c899e;
}

/* ===== MAIN 3-COLUMN STAGE ===== */
.stage-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 368px minmax(360px, 1fr) 372px;
  overflow: hidden;
}

.hud-col {
  background: var(--panel);
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hud-left { border-right: 1px solid var(--line); }
.hud-right { border-left: 1px solid var(--line); }

/* Custom subtle scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #293346; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3c4a64; }

.panel {
  background: linear-gradient(180deg, #161c28 0%, #121620 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #cdd6e6;
}

.mono-dim { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.mono-gold { font-family: var(--font-mono); font-size: 11px; color: var(--amber); font-weight: 600; }

.pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.pill-amber { background: rgba(240, 180, 41, 0.16); color: var(--amber); border: 1px solid rgba(240, 180, 41, 0.35); }
.pill-crimson { background: rgba(229, 72, 77, 0.18); color: #ff8085; border: 1px solid rgba(229, 72, 77, 0.38); }
.pill-steel { background: rgba(148, 163, 184, 0.12); color: #cbd5e1; border: 1px solid var(--line-bright); }
.pill-cyan { background: rgba(56, 189, 248, 0.15); color: var(--cyan); border: 1px solid rgba(56, 189, 248, 0.35); }

/* Big Hero Strength / Size / Physique Cards */
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 9px;
}

.hero-stat-card {
  background: linear-gradient(180deg, #101520 0%, #0b0e15 100%);
  border: 1px solid #222c3e;
  border-left: 3px solid var(--amber);
  border-radius: 6px;
  padding: 7px 9px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.hero-stat-card:hover {
  border-color: var(--cyan);
  transform: translateY(-1px);
}
.hero-stat-card.c-amber { border-left-color: var(--amber); }
.hero-stat-card.c-crimson { border-left-color: var(--crimson); }
.hero-stat-card.c-cyan { border-left-color: var(--cyan); }
.hero-stat-card.c-emerald { border-left-color: var(--emerald); }
.hero-stat-card.c-violet { border-left-color: var(--violet); }

.hs-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.hs-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 27px;
  line-height: 1.02;
  color: var(--ink);
  margin: 2px 0;
  letter-spacing: 0.02em;
}
.hs-num .unit {
  font-size: 13px;
  color: var(--muted);
  margin-left: 3px;
}
.hs-sub {
  font-size: 10px;
  color: #9ba7bc;
  line-height: 1.25;
}

.bw-strip-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

/* Articulated Goal Progress Bars & Suggestions */
.goals-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.goal-card {
  background: #0d111a;
  border: 1px solid #20293a;
  border-radius: 7px;
  padding: 8px 10px;
  transition: border-color 0.15s ease;
}
.goal-card:hover { border-color: #364661; }
.goal-card.expanded { border-color: rgba(240, 180, 41, 0.55); background: #101622; }

.goal-header {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.goal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.goal-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.goal-cat {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.07);
  color: #cbd5e1;
  flex-shrink: 0;
}
.goal-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #f4f7fc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.goal-pct {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--amber);
  flex-shrink: 0;
}

.goal-nums {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #b5c0d4;
}
.goal-bar-track {
  height: 7px;
  background: #07090e;
  border: 1px solid #222c3e;
  border-radius: 4px;
  overflow: hidden;
}
.goal-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.goal-body {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #1e2738;
  display: none;
  flex-direction: column;
  gap: 6px;
}
.goal-card.expanded .goal-body { display: flex; }

.goal-detail { font-size: 11.5px; color: #cbd5e1; line-height: 1.4; }
.goal-source-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: #090c12;
  border: 1px solid #1b2231;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 11px;
  color: #a9b6cb;
}
.goal-source-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.goal-suggestion {
  background: rgba(240, 180, 41, 0.09);
  border: 1px solid rgba(240, 180, 41, 0.32);
  border-radius: 5px;
  padding: 6px 8px;
  font-size: 11px;
  color: #f8e3b0;
  line-height: 1.38;
}
.goal-suggestion strong {
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 2px;
}

/* Bodyweight Panel */
.bw-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 6px;
}
.bw-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 38px;
  line-height: 0.95;
  letter-spacing: 0.02em;
}
.bw-value .unit {
  font-size: 15px;
  color: var(--muted);
  margin-left: 4px;
}
.bw-meta { text-align: right; }

.bw-chart-wrap {
  height: 70px;
  width: 100%;
  margin: 4px 0 8px;
  background: #0d1119;
  border: 1px solid #1e2636;
  border-radius: 6px;
  padding: 4px;
}
.bw-chart-wrap svg { width: 100%; height: 100%; display: block; }

.vitals-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.vital-chip {
  background: #0d1119;
  border: 1px solid #1f2737;
  border-radius: 5px;
  padding: 5px 7px;
  display: flex;
  flex-direction: column;
}
.vital-label { font-family: var(--font-mono); font-size: 9px; color: var(--muted); }
.vital-val { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--ink); margin-top: 1px; }

/* RPG Stat Bars */
.rpg-stats { display: flex; flex-direction: column; gap: 7px; }
.stat-row {
  display: grid;
  grid-template-columns: 44px 1fr 28px;
  align-items: center;
  gap: 8px;
}
.stat-key {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
}
.stat-track {
  height: 8px;
  background: #0b0e14;
  border: 1px solid #222b3b;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.stat-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.stat-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
  color: var(--ink);
}

/* Status Effects */
.effects-list { display: flex; flex-wrap: wrap; gap: 6px; }
.fx-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease;
}
.fx-chip:hover { transform: translateY(-1px); }
.fx-buff {
  background: rgba(52, 211, 153, 0.13);
  border-color: rgba(52, 211, 153, 0.38);
  color: #6ee7b7;
}
.fx-debuff {
  background: rgba(240, 180, 41, 0.13);
  border-color: rgba(240, 180, 41, 0.42);
  color: #fcd34d;
}
.fx-empty { font-size: 11px; color: var(--muted); }

/* Muscle Chips */
.muscle-chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}
.m-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0e121a;
  border: 1px solid #212a3a;
  border-radius: 5px;
  padding: 5px 8px;
  color: #d6deeb;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.14s ease;
}
.m-chip:hover { border-color: var(--cyan); color: #fff; }
.m-chip.is-primary { border-color: rgba(229, 72, 77, 0.65); background: rgba(229, 72, 77, 0.12); }
.m-chip.is-selected { border-color: var(--amber); background: rgba(240, 180, 41, 0.16); color: #fff; }
.m-chip-cnt { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }

/* ===== CENTER 3D VIEWPORT ===== */
.viewport-col {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 65% 58% at 50% 42%, rgba(185, 28, 36, 0.14) 0%, rgba(240, 180, 41, 0.04) 40%, rgba(8, 9, 14, 0.99) 78%),
    linear-gradient(180deg, #0b0c12 0%, #07080d 100%);
}

.viewport-3d {
  width: 100%;
  height: 100%;
  display: block;
}

.vp-hud {
  position: absolute;
  pointer-events: none;
  z-index: 10;
}

.vp-top-left { top: 12px; left: 14px; }
.vp-top-right { top: 12px; right: 14px; }

.vp-tag {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--amber);
}
.vp-readout {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #aeb8ca;
  margin-top: 2px;
}
.vp-readout .sep { color: #475569; margin: 0 4px; }

.legend-box {
  background: rgba(14, 18, 26, 0.78);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lg-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: -3px;
}
.lg-primary { background: var(--crimson); box-shadow: 0 0 6px var(--crimson); }
.lg-secondary { background: var(--amber); }
.lg-pr { background: var(--cyan); }

.muscle-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 25;
  background: rgba(12, 15, 22, 0.92);
  border: 1px solid var(--cyan);
  border-radius: 6px;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
  transform: translate(14px, -50%);
  white-space: nowrap;
}

/* Muscle Mastery Drawer */
.muscle-drawer {
  position: absolute;
  left: 14px;
  bottom: 66px;
  width: min(360px, calc(100% - 28px));
  max-height: 52%;
  overflow-y: auto;
  background: rgba(16, 20, 30, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid var(--amber);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.7);
  z-index: 20;
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.drawer-kicker { font-family: var(--font-mono); font-size: 9px; color: var(--amber); letter-spacing: 0.1em; }
.drawer-head h3 {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.05em;
  line-height: 1;
}
.icon-btn {
  background: transparent;
  border: 1px solid var(--line-bright);
  color: var(--muted);
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
}
.icon-btn:hover { color: #fff; border-color: #fff; }

.drawer-section { margin-top: 9px; }
.drawer-section h4 {
  margin: 0 0 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Bottom 3D Dock */
.vp-dock {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(14, 18, 27, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  padding: 4px 8px;
  z-index: 15;
  max-width: calc(100% - 16px);
  overflow-x: auto;
}

.dock-group { display: flex; align-items: center; gap: 3px; }
.dock-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  margin-right: 1px;
  letter-spacing: 0.06em;
}
.dock-divider { width: 1px; height: 16px; background: var(--line); }

.dock-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #b7c2d4;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}
.dock-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.dock-btn.active {
  background: rgba(240, 180, 41, 0.18);
  border-color: rgba(240, 180, 41, 0.5);
  color: var(--amber);
}

/* ===== RIGHT HUD: DAY INSPECTOR ===== */
.day-header { display: flex; flex-direction: column; gap: 5px; }
.day-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.day-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.day-note {
  margin: 0;
  font-size: 12px;
  color: #b6c2d6;
  font-style: italic;
}
.day-meta-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}
.day-meta-strip a { color: var(--cyan); text-decoration: none; margin-left: auto; }
.day-meta-strip a:hover { text-decoration: underline; }

.player-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #080a0f;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  flex-shrink: 0;
}
.player-box iframe { width: 100%; height: 100%; border: 0; display: block; }
.player-poster {
  width: 100%;
  height: 100%;
  position: relative;
  cursor: pointer;
}
.player-poster img { width: 100%; height: 100%; object-fit: cover; opacity: 0.84; display: block; }
.player-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0,0,0,0.08), rgba(0,0,0,0.55));
}
.play-pill {
  background: rgba(229, 72, 77, 0.92);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.08em;
  padding: 7px 16px;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

.episode-guide {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.guide-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.guide-tile {
  background: #0a0d14;
  border: 1px solid #1d2536;
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gt-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}
.gt-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.gt-val {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: #f4f7fc;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gt-sub {
  font-size: 10px;
  color: #8f9bb0;
}

.chapter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-top: 1px solid #1c2434;
}
.chapter-row:first-of-type { border-top: 0; padding-top: 2px; }
.chapter-title {
  font-size: 11.5px;
  color: #dde4f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-card {
  background: #0e121b;
  border: 1px solid #1f2737;
  border-radius: 7px;
  padding: 9px 10px;
}
.info-card h4 {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ex-row {
  padding: 6px 0;
  border-top: 1px solid #1c2434;
}
.ex-row:first-of-type { border-top: 0; padding-top: 2px; }
.ex-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.ex-name { font-weight: 600; color: #f1f5f9; font-size: 12px; }
.ex-loads { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.load-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  background: #1a2232;
  color: #e2e8f0;
  padding: 1px 6px;
  border-radius: 3px;
}
.load-tag.is-pr {
  background: rgba(240, 180, 41, 0.18);
  border: 1px solid rgba(240, 180, 41, 0.45);
  color: var(--amber);
  font-weight: 700;
}
.ex-meta-sub {
  margin-top: 3px;
  font-size: 10.5px;
  color: #8f9bb0;
}

.ts-btn {
  display: inline-flex;
  align-items: center;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}
.ts-btn:hover { background: rgba(56, 189, 248, 0.28); color: #fff; }

.bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 30px;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 11px;
}

/* ===== BOTTOM 100-DAY TIMELINE SCRUBBER ===== */
.timeline-bar {
  height: 104px;
  flex-shrink: 0;
  background: #0f131c;
  border-top: 1px solid var(--line);
  padding: 7px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 25;
}

.tl-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.tl-nav { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.tl-range-tabs {
  display: inline-flex;
  background: #0a0d14;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px;
  gap: 2px;
}
.tl-range-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
}
.tl-range-btn:hover { color: #fff; }
.tl-range-btn.active { background: var(--crimson); color: #fff; }
.tl-btn {
  background: #171d2a;
  border: 1px solid var(--line-bright);
  color: #dce4f0;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 4px;
  cursor: pointer;
}
.tl-btn:hover { border-color: var(--cyan); color: #fff; }
.tl-btn-gold {
  background: rgba(240, 180, 41, 0.16);
  border-color: rgba(240, 180, 41, 0.5);
  color: var(--amber);
}
.tl-btn-gold.playing {
  background: var(--amber);
  color: #0b0d12;
}

.tl-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}
.tl-hint { color: #64748b; }
.sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.sw-chest { background: #e5484d; }
.sw-arms { background: #f0b429; }
.sw-legs { background: #38bdf8; }
.sw-back { background: #34d399; }
.sw-qna { background: #a78bfa; }
.sw-vlog { background: #64748b; }

.timeline-strip {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tl-tile {
  flex: 1 0 11px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  cursor: pointer;
  position: relative;
  border-radius: 3px;
  padding: 2px 1px;
  transition: background 0.1s ease;
}
.tl-tile:hover { background: rgba(255, 255, 255, 0.08); }
.tl-tile.active {
  background: rgba(240, 180, 41, 0.22);
  outline: 1px solid var(--amber);
}
.tl-badge {
  font-size: 8px;
  line-height: 1;
  margin-bottom: 1px;
  height: 9px;
}
.tl-bar {
  width: 100%;
  border-radius: 2px 2px 1px 1px;
  min-height: 8px;
  opacity: 0.85;
}
.tl-tile.active .tl-bar { opacity: 1; box-shadow: 0 0 8px rgba(240, 180, 41, 0.65); }

.hidden { display: none !important; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1120px) {
  html, body { overflow: auto; height: auto; }
  .app-shell { height: auto; overflow: visible; }
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 12px; }
  .top-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .search-wrap { width: 200px; }
  .stage-grid { grid-template-columns: 1fr; overflow: visible; }
  .viewport-col { height: 56vh; min-height: 400px; order: 1; }
  .hud-right { order: 2; border-left: 0; border-top: 1px solid var(--line); }
  .hud-left { order: 3; border-right: 0; border-top: 1px solid var(--line); }
  .timeline-bar { position: sticky; bottom: 0; }
  .tl-legend { display: none; }
}

@media (max-width: 720px) {
  .vp-top-right { display: none; }
  .sync-popover { left: 0; right: auto; }
}
