:root {
  --bg: #0a0e14;
  --bg-soft: #0f141c;
  --bg-card: #131a24;
  --bg-card-2: #1a2230;
  --bg-row: #0e131c;
  --border: #1f2735;
  --border-strong: #2b3445;
  --text: #f4f6fa;
  --text-muted: #a4adbb;
  --text-faint: #6b7484;
  --gpt: #5b9bff;
  --gpt-soft: rgba(91, 155, 255, 0.16);
  --agy: #c084fc;
  --agy-soft: rgba(192, 132, 252, 0.16);
  --pos: #ef4444;
  --pos-soft: rgba(239, 68, 68, 0.14);
  --neg: #3b82f6;
  --neg-soft: rgba(59, 130, 246, 0.14);
  --warn: #fbbf24;
  --info: #60a5fa;
  --neutral: #6b7484;
  --max-radius: 8px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --font: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans KR", sans-serif;
}

html[data-theme="light"] {
  --bg: #eef3f8;
  --bg-soft: #e5edf6;
  --bg-card: #ffffff;
  --bg-card-2: #eaf1f8;
  --bg-row: #f6f9fc;
  --border: #c7d2e2;
  --border-strong: #8fa0b8;
  --text: #0f172a;
  --text-muted: #334155;
  --text-faint: #64748b;
  --gpt: #1d4ed8;
  --gpt-soft: rgba(29, 78, 216, 0.14);
  --agy: #7c3aed;
  --agy-soft: rgba(124, 58, 237, 0.14);
  --pos: #b91c1c;
  --pos-soft: rgba(185, 28, 28, 0.1);
  --neg: #1d4ed8;
  --neg-soft: rgba(29, 78, 216, 0.11);
  --warn: #92400e;
  --info: #1d4ed8;
  --neutral: #475569;
  --shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(1200px 600px at 20% -10%, rgba(91, 155, 255, 0.08), transparent 60%),
              radial-gradient(900px 500px at 95% 0%, rgba(192, 132, 252, 0.08), transparent 60%),
              var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html[data-theme="light"],
html[data-theme="light"] body {
  background: linear-gradient(180deg, #f7fbff 0%, var(--bg) 42%, #e6edf6 100%);
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
button { font-family: inherit; }
ol, ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  background: rgba(10, 14, 20, 0.76);
  backdrop-filter: blur(14px);
}

html[data-theme="light"] .app-header {
  background: rgba(247, 251, 255, 0.92);
}

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

.app-brand-mark {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    radial-gradient(circle at 28% 26%, rgba(67, 183, 255, 0.38), transparent 28px),
    radial-gradient(circle at 72% 72%, rgba(176, 124, 255, 0.34), transparent 30px),
    linear-gradient(145deg, rgba(17, 27, 42, 0.96), rgba(6, 9, 15, 0.98));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.13);
}

.app-brand-mark::before {
  content: "";
  position: absolute;
  inset: 8px 11px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-bottom: 0;
  transform: skewX(-10deg);
  clip-path: polygon(50% 0, 100% 100%, 72% 100%, 50% 34%, 28% 100%, 0 100%);
}

.app-brand-mark-line {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  border-radius: 999px;
  opacity: 0.95;
  transform-origin: center;
}

.app-brand-mark-line--gpt {
  top: 15px;
  background: linear-gradient(90deg, transparent, var(--gpt));
  transform: rotate(18deg);
}

.app-brand-mark-line--agy {
  bottom: 14px;
  background: linear-gradient(90deg, var(--agy), transparent);
  transform: rotate(-18deg);
}

.app-brand-mark-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  box-shadow: 0 0 14px currentColor;
}

.app-brand-mark-dot--gpt {
  top: 12px;
  right: 9px;
  color: var(--gpt);
  background: var(--gpt);
}

.app-brand-mark-dot--agy {
  left: 9px;
  bottom: 11px;
  color: var(--agy);
  background: var(--agy);
}

html[data-theme="light"] .app-brand-mark {
  border-color: rgba(27, 39, 56, 0.12);
  background:
    radial-gradient(circle at 28% 26%, rgba(20, 116, 184, 0.28), transparent 28px),
    radial-gradient(circle at 72% 72%, rgba(111, 73, 191, 0.24), transparent 30px),
    linear-gradient(145deg, #ffffff, #edf4fb);
  box-shadow: 0 10px 22px rgba(35, 48, 68, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

html[data-theme="light"] .app-brand-mark::before {
  border-color: rgba(14, 24, 38, 0.72);
}

.app-brand-text h1 {
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0;
  font-weight: 850;
  white-space: nowrap;
}

.app-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.theme-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 31px;
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--info);
  outline-offset: 2px;
}

.theme-toggle-mark {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: inset -4px -2px 0 var(--bg-card);
}

html[data-theme="light"] .theme-toggle-mark {
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.12);
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.meta-pill--soft {
  color: var(--text-faint);
  background: transparent;
  border-color: var(--border);
}

.meta-pill--warn {
  color: var(--warn);
  background: rgba(251, 191, 36, 0.11);
  border-color: rgba(251, 191, 36, 0.32);
  font-weight: 800;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mobile-tabs,
.mobile-summary,
.mobile-recent,
.timeline-mobile-list,
.timeline-mobile-more {
  display: none;
}

.round-rail {
  display: none;
}

.hero-chart {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--max-radius);
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 300px;
}

.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chart-title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend-gpt .legend-swatch { background: var(--gpt); box-shadow: 0 0 12px var(--gpt-soft); }
.legend-agy .legend-swatch { background: var(--agy); box-shadow: 0 0 12px var(--agy-soft); }

.chart-canvas {
  flex: 1 1 auto;
  min-height: 230px;
  position: relative;
  overflow: hidden;
}

#trend-chart {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.chart-foot #chart-gpt-end,
.chart-foot #chart-agy-end {
  font-weight: 900;
  color: var(--text);
}

.chart-gap.is-pos { color: var(--pos); }
.chart-gap.is-neg { color: var(--neg); }
.chart-gap.is-neutral { color: var(--text-muted); }

.chart-gap {
  font-weight: 900;
}

.competitors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.competitor {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--max-radius);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.competitor--gpt::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gpt) 0%, transparent 100%);
}
.competitor--agy::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--agy) 0%, transparent 100%);
}

.competitor.is-leader {
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.competitor-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
}

.competitor-name {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.agent-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.agent-dot--gpt { background: var(--gpt); box-shadow: 0 0 12px var(--gpt-soft); }
.agent-dot--agy { background: var(--agy); box-shadow: 0 0 12px var(--agy-soft); }

.competitor-accent {
  width: 44px;
  height: 5px;
  border-radius: 999px;
  display: inline-block;
}

.competitor-accent--gpt {
  background: linear-gradient(90deg, var(--gpt), transparent);
}

.competitor-accent--agy {
  background: linear-gradient(90deg, var(--agy), transparent);
}

.crown {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--warn);
  background: rgba(251, 191, 36, 0.12);
  border-radius: 999px;
  padding: 4px 10px;
}

.competitor-equity {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.equity-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.equity-value {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  word-break: break-all;
}

.competitor-pnl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.pnl-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pnl-k {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pnl-v {
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  word-break: break-all;
}

.pnl-v.pos { color: var(--pos); }
.pnl-v.neg { color: var(--neg); }
.pnl-v.neutral { color: var(--text); }

.competitor-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  min-width: 0;
}

.stat-k {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.stat-v {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  word-break: break-all;
}

.stat-v.pos { color: var(--pos); }
.stat-v.neg { color: var(--neg); }

.stat-v--positions {
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
}

.usage-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--max-radius);
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.usage-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.usage-head h2 {
  font-size: 18px;
  font-weight: 800;
}

.usage-sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.usage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.usage-lane {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 10px;
  padding-left: 12px;
}

.usage-lane--gpt {
  border-left: 3px solid color-mix(in srgb, var(--gpt) 72%, var(--border));
}

.usage-lane--agy {
  border-left: 3px solid color-mix(in srgb, var(--agy) 72%, var(--border));
}

.usage-lane.is-monitoring,
.usage-lane.is-triggered {
  border-left-width: 4px;
}

.usage-lane--gpt.is-monitoring,
.usage-lane--gpt.is-triggered {
  border-left-color: color-mix(in srgb, var(--gpt) 72%, var(--border));
}

.usage-lane--agy.is-monitoring,
.usage-lane--agy.is-triggered {
  border-left-color: color-mix(in srgb, var(--agy) 72%, var(--border));
}

.usage-card-head {
  display: none;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.usage-status {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.usage-lane.is-monitoring .usage-status {
  color: var(--info);
  border-color: rgba(96, 165, 250, 0.45);
}

.usage-lane.is-triggered .usage-status {
  color: var(--warn);
  border-color: rgba(251, 191, 36, 0.62);
}

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

.usage-stat {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-row);
  padding: 8px 10px;
  min-width: 0;
}

.usage-stat span {
  display: block;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin-bottom: 3px;
}

.usage-stat strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  word-break: keep-all;
}

.usage-detail {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.decision-backdrop {
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(2px);
}

.decision-drawer {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 20;
  width: min(1020px, calc(100vw - 32px));
  max-height: min(80vh, 720px);
  transform: translate(-50%, -50%);
  background: color-mix(in srgb, var(--bg-card) 99%, #000 7%);
  border: 1px solid color-mix(in srgb, var(--border-strong) 75%, var(--text) 18%);
  border-radius: var(--max-radius);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 24px 70px rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.decision-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
}

.decision-drawer-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.decision-drawer h2 {
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.decision-drawer-close {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--bg-row);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.decision-drawer-close:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.decision-drawer-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  max-height: calc(min(80vh, 720px) - 80px);
  overflow-y: auto;
  padding: 16px 18px 18px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.decision-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 14px 14px;
  min-width: 0;
}

html[data-theme="light"] .decision-side {
  background: var(--bg-card-2);
}

.decision-side.is-empty {
  border-style: dashed;
  background: rgba(26, 34, 48, 0.46);
  color: var(--text-faint);
}

html[data-theme="light"] .decision-side.is-empty {
  background: rgba(241, 245, 249, 0.78);
}

.decision-side-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.decision-side-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #0a0e14;
  background: var(--text-muted);
}

.decision-side-tag.is-gpt { background: var(--gpt); }
.decision-side-tag.is-agy { background: var(--agy); }

.decision-side-action {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  color: var(--text);
  background: rgba(107, 116, 132, 0.4);
}

.decision-side-action.action-buy { color: #0a0e14; background: var(--pos); }
.decision-side-action.action-sell { color: #0a0e14; background: var(--neg); }
.decision-side-action.action-triggered { color: #0a0e14; background: rgba(251, 191, 36, 0.8); }
.decision-side-action.action-hold,
.decision-side-action.action-no_decision { color: var(--text); background: rgba(107, 116, 132, 0.4); }
.decision-side-action.is-empty {
  color: var(--text-faint);
  background: rgba(107, 116, 132, 0.18);
  font-weight: 800;
}

.decision-side-outcome {
  font-size: 11px;
  font-weight: 800;
}

.decision-side-time {
  margin-left: auto;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.decision-side-main {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.decision-side-reason {
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.decision-side.is-empty .decision-side-main {
  display: none;
}

.decision-side.is-empty .decision-side-reason {
  display: none;
}

.decision-side-empty {
  margin: 0;
  color: var(--text-faint);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

@media (max-width: 720px) {
  .decision-drawer-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

.timeline {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--max-radius);
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.timeline-head h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.timeline-sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.timeline-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.timeline-tab {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.timeline-tab.is-active {
  background: var(--text);
  color: var(--bg);
}

.timeline-tab:focus-visible {
  outline: 2px solid var(--info);
  outline-offset: 2px;
}

.timeline-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}

.timeline-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-column-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: 8px 0 6px;
  background: var(--bg-card);
}

.timeline-column-accent {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  display: block;
}

.timeline-column-accent--gpt {
  background: linear-gradient(90deg, var(--gpt), transparent);
}

.timeline-column-accent--agy {
  background: linear-gradient(90deg, var(--agy), transparent);
}

.round-rail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 12px;
  border-bottom: 1px solid var(--border);
}

.round-rail-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.round-rail-head h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 18px;
  font-weight: 900;
}

.round-rail-count {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.round-rail-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
}

.round-rail-item {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-row);
  padding: 12px 12px 13px;
  min-width: 0;
  cursor: pointer;
}

.round-rail-item.is-placeholder {
  border-style: dashed;
  background: transparent;
  opacity: 0.72;
  cursor: default;
}

.round-rail-item:not(.is-placeholder):hover {
  border-color: var(--border-strong);
  background: color-mix(in srgb, var(--bg-row) 82%, var(--text) 5%);
}

.round-rail-item:focus-visible {
  outline: 2px solid var(--info);
  outline-offset: 2px;
}

.round-rail--gpt .round-rail-item {
  border-left: 3px solid color-mix(in srgb, var(--gpt) 72%, var(--border));
}

.round-rail--agy .round-rail-item {
  border-left: 3px solid color-mix(in srgb, var(--agy) 72%, var(--border));
}

.round-rail-item.is-trade {
  border-color: color-mix(in srgb, var(--pos) 45%, var(--border));
  background: linear-gradient(180deg, var(--pos-soft) 0%, var(--bg-row) 100%);
}

.round-rail-item.is-triggered {
  border-color: rgba(251, 191, 36, 0.42);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.1) 0%, var(--bg-row) 100%);
}

.round-rail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.round-rail-time {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.round-rail-action {
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--text);
  background: rgba(107, 116, 132, 0.35);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.round-rail-action.action-buy {
  color: #0a0e14;
  background: var(--pos);
}

.round-rail-action.action-sell {
  color: #0a0e14;
  background: var(--neg);
}

.round-rail-action.action-triggered {
  color: #0a0e14;
  background: rgba(251, 191, 36, 0.8);
}

.round-rail-main {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.round-rail-meta {
  margin-top: 4px;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.round-rail-sub {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.round-rail-empty {
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 12px 10px;
  color: var(--text-faint);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: start;
  gap: 10px 12px;
  padding: 12px 14px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 0;
}

.timeline-placeholder {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 10px 12px;
  padding: 12px 14px;
  background: rgba(26, 34, 48, 0.46);
  border: 1px dashed var(--border);
  border-radius: 6px;
  color: var(--text-faint);
  min-width: 0;
}

html[data-theme="light"] .timeline-placeholder {
  background: rgba(241, 245, 249, 0.78);
}

.timeline-placeholder-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-faint);
}

.timeline-item.is-trade {
  border-color: rgba(91, 155, 255, 0.62);
  border-left: 5px solid var(--gpt);
  background: linear-gradient(180deg, rgba(91, 155, 255, 0.13) 0%, var(--bg-card-2) 100%);
  box-shadow: 0 0 0 1px rgba(91, 155, 255, 0.12), 0 10px 24px rgba(0, 0, 0, 0.18);
  padding-block: 14px;
}

.timeline-item.is-trade.is-winner {
  border-color: color-mix(in srgb, var(--pos) 72%, var(--border));
  border-left-color: var(--pos);
  background: linear-gradient(180deg, var(--pos-soft) 0%, var(--bg-card-2) 100%);
}

.timeline-item.is-trade.is-losing {
  border-color: color-mix(in srgb, var(--neg) 72%, var(--border));
  border-left-color: var(--neg);
  background: linear-gradient(180deg, var(--neg-soft) 0%, var(--bg-card-2) 100%);
}

.timeline-item.is-triggered {
  background: rgba(26, 34, 48, 0.62);
  border-color: rgba(251, 191, 36, 0.24);
}

html[data-theme="light"] .timeline-item.is-triggered {
  background: rgba(255, 251, 235, 0.84);
}

.timeline-item.is-winner {
  border-color: color-mix(in srgb, var(--pos) 40%, var(--border));
  background: linear-gradient(180deg, var(--pos-soft) 0%, var(--bg-card-2) 100%);
}

.timeline-item.is-losing {
  border-color: color-mix(in srgb, var(--neg) 35%, var(--border));
  background: linear-gradient(180deg, var(--neg-soft) 0%, var(--bg-card-2) 100%);
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--text-muted);
  min-width: 0;
}

.timeline-time {
  color: var(--text);
  font-weight: 700;
}

.timeline-round {
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.timeline-sentence {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  word-break: break-word;
}

.timeline-item.is-trade .timeline-sentence {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.action-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
  margin: 0 2px;
  vertical-align: 1px;
}

.timeline-item.is-trade .action-badge {
  font-size: 14px;
  padding: 4px 12px;
  border-radius: 8px;
}

.action-badge.action-buy {
  color: #0a0e14;
  background: var(--pos);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--pos) 35%, transparent);
}
.action-badge.action-sell {
  color: #0a0e14;
  background: var(--neg);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--neg) 35%, transparent);
}
.action-badge.action-triggered {
  color: #0a0e14;
  background: rgba(251, 191, 36, 0.76);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.22);
}
.action-badge.action-hold,
.action-badge.action-no_decision {
  color: var(--text);
  background: rgba(107, 116, 132, 0.35);
}

.timeline-detail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.trade-detail {
  font-size: 13px;
  color: var(--text);
}

.trade-symbol {
  color: var(--text);
  font-weight: 900;
}

.trade-size,
.trade-price {
  color: var(--text-muted);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.timeline-selection {
  max-width: 100%;
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(107, 116, 132, 0.25);
  color: var(--text-muted);
  white-space: nowrap;
}
.badge.badge-ok { background: var(--pos-soft); color: var(--pos); }
.badge.badge-warn { background: rgba(251, 191, 36, 0.16); color: var(--warn); }
.badge.badge-bad { background: var(--neg-soft); color: var(--neg); }
.badge.badge-info { background: rgba(96, 165, 250, 0.16); color: var(--info); }

.timeline-pnl {
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: left;
  min-width: 0;
  grid-column: 2;
}
.timeline-pnl.pos { color: var(--pos); }
.timeline-pnl.neg { color: var(--neg); }
.timeline-pnl.neutral { color: var(--text); font-weight: 700; }
.timeline-pnl.amount { color: var(--text); font-weight: 700; }
.timeline-pnl.faint { color: var(--text-faint); font-weight: 500; }

.timeline-empty {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--bg-card-2);
  border: 1px dashed var(--border);
  border-radius: 6px;
}

.btn {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--bg-card-2);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 120ms ease, border-color 120ms ease, transform 60ms ease;
}
.btn:hover { background: rgba(255, 255, 255, 0.04); border-color: var(--text-faint); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }

.btn--primary {
  background: linear-gradient(135deg, var(--gpt) 0%, var(--agy) 100%);
  border-color: transparent;
  color: #0a0e14;
  font-weight: 700;
}
.btn--primary:hover { filter: brightness(1.08); }

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}
.btn--ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.03); }

.btn--top {
  min-height: 31px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

html[data-theme="light"] .btn:hover,
html[data-theme="light"] .btn--ghost:hover {
  background: rgba(37, 99, 235, 0.06);
}

.btn[aria-pressed="true"] {
  background: var(--gpt-soft);
  border-color: var(--gpt);
  color: var(--gpt);
}

.btn-icon {
  width: 14px;
  text-align: center;
  line-height: 1;
}

.pos { color: var(--pos); }
.neg { color: var(--neg); }

@media (min-width: 1600px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  .page {
    width: min(1888px, calc(100vw - 32px));
    max-width: none;
    display: grid;
    grid-template-columns: minmax(320px, 350px) minmax(0, 1156px) minmax(320px, 350px);
    grid-auto-rows: min-content;
    align-items: start;
    justify-content: center;
    gap: 12px 16px;
    height: calc(100vh - 70px);
    overflow: hidden;
    padding: 12px 0;
  }

  .mobile-tabs,
  .hero,
  .mobile-summary,
  .competitors,
  .usage-panel,
  .timeline {
    grid-column: 2;
  }

  .competitors { grid-row: 1; }
  .hero { grid-row: 2; }
  .usage-panel { grid-row: 3; }

  .competitors {
    gap: 18px;
  }

  .competitor {
    display: grid;
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
    grid-template-areas:
      "head pnl"
      "equity stats";
    align-items: start;
    gap: 8px 14px;
    padding: 12px 16px;
  }

  .competitor-head { grid-area: head; }
  .competitor-equity { grid-area: equity; }
  .competitor-pnl { grid-area: pnl; }
  .competitor-stats { grid-area: stats; }

  .equity-value {
    font-size: 30px;
  }

  .competitor-pnl {
    padding: 8px 10px;
  }

  .stat {
    padding: 7px 9px;
  }

  .hero-chart {
    height: 380px;
    min-height: 0;
    padding: 12px 16px 10px;
    gap: 8px;
  }

  .chart-canvas {
    width: min(100%, 1100px);
    align-self: center;
    min-height: 0;
  }

  .chart-foot {
    width: min(100%, 1100px);
    align-self: center;
  }

  .usage-panel {
    padding: 10px 16px 9px;
    gap: 7px;
    max-height: 186px;
    overflow: hidden;
  }

  .usage-head h2 {
    font-size: 16px;
  }

  .usage-sub {
    margin-top: 0;
  }

  .usage-grid {
    gap: 10px;
  }

  .usage-lane {
    padding-left: 9px;
    gap: 5px;
  }

  .usage-stat {
    padding: 6px 8px;
  }

  .usage-detail {
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .round-rail {
    position: sticky;
    top: 0;
    z-index: 1;
    display: block;
    width: 100%;
    grid-row: 1 / span 3;
    align-self: stretch;
    min-height: 0;
    height: 100%;
    max-height: none;
    overflow: hidden;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
  }

  .round-rail-list {
    --round-rail-gap: 10px;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    gap: 10px;
    padding: 0;
  }

  .round-rail-item {
    flex: 0 0 calc((100% - (var(--round-rail-gap) * 5)) / 6);
    min-height: 0;
    padding: 12px 13px 13px;
    overflow: hidden;
  }

  .round-rail-top {
    margin-bottom: 6px;
  }

  .round-rail-main {
    font-size: 15px;
    line-height: 1.32;
  }

  .round-rail-meta {
    font-size: 11px;
  }

  .round-rail-sub {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.38;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .round-rail--gpt {
    grid-column: 1;
    justify-self: stretch;
  }

  .round-rail--agy {
    grid-column: 3;
    justify-self: stretch;
  }

}

@media (max-width: 960px) {
  .competitors { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .usage-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page { padding: 20px 16px 24px; gap: 20px; }
  .app-header { padding: 16px 16px; }
  .timeline-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    max-height: none;
  }
  .timeline-item,
  .timeline-placeholder { grid-template-columns: 1fr; }
  .timeline-pnl { grid-column: 1; }
}

@media (max-width: 560px) {
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }
  .page {
    overflow-x: hidden;
  }
  .app-header {
    padding: 12px;
    gap: 10px;
  }
  .app-brand-mark {
    width: 34px;
    height: 34px;
  }
  .app-meta {
    width: 100%;
    gap: 6px;
  }
  .page { padding: 10px 8px 20px; gap: 10px; }

  .mobile-tabs {
    position: sticky;
    top: 0;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    background: rgba(10, 14, 20, 0.92);
    border: 1px solid var(--border);
    border-radius: var(--max-radius);
    backdrop-filter: blur(10px);
  }

  html[data-theme="light"] .mobile-tabs {
    background: rgba(248, 251, 255, 0.92);
  }

  .mobile-tab {
    appearance: none;
    border: 0;
    border-radius: 6px;
    padding: 8px 4px;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
  }

  .mobile-tab.is-active {
    background: var(--text);
    color: var(--bg);
  }

  .mobile-summary {
    display: block;
  }

  .mobile-vs-board {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--max-radius);
    overflow: hidden;
  }

  .mobile-vs-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 10px 8px;
    font-variant-numeric: tabular-nums;
  }

  .mobile-vs-side--gpt {
    border-bottom: 2px solid var(--gpt);
  }

  .mobile-vs-side--agy {
    border-bottom: 2px solid var(--agy);
  }

  .mobile-vs-name {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.06em;
  }

  .mobile-vs-side--gpt .mobile-vs-name { color: var(--gpt); }
  .mobile-vs-side--agy .mobile-vs-name { color: var(--agy); }

  .mobile-vs-equity {
    font-size: 18px;
    line-height: 1.15;
    word-break: break-word;
    text-align: center;
  }

  .mobile-vs-rate {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
  }

  .mobile-vs-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 10px;
    min-width: 56px;
  }

  .mobile-vs-label {
    font-size: 10px;
    font-weight: 900;
    color: var(--text-faint);
    letter-spacing: 0.08em;
  }

  .mobile-vs-leader {
    font-size: 13px;
    font-weight: 900;
    color: var(--warn);
    background: rgba(251, 191, 36, 0.1);
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
  }

  .mobile-vs-gap {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .mobile-recent {
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--max-radius);
  }

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

  .mobile-recent-head h2 {
    font-size: 14px;
  }

  .mobile-recent-head span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
  }

  .mobile-recent-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .mobile-recent-item,
  .timeline-mobile-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 8px 0;
    border-top: 1px solid var(--border);
  }

  .mobile-recent-item:first-child,
  .timeline-mobile-row:first-of-type {
    border-top: 0;
  }

  .mobile-recent-empty {
    color: var(--text-muted);
    font-size: 12px;
    padding: 8px 0;
  }

  .timeline-mobile-agent {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 900;
  }

  .timeline-mobile-action,
  .timeline-mobile-text {
    min-width: 0;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .timeline-mobile-value {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }
  .timeline-mobile-value.pos { color: var(--pos); }
  .timeline-mobile-value.neg { color: var(--neg); }
  .timeline-mobile-value.amount { color: var(--text); }
  .timeline-mobile-value.faint { color: var(--text-faint); }

  /* Summary tab: score → recent → chart → usage */
  body.mobile-tab-summary .mobile-summary {
    order: 1;
    display: block;
  }
  body.mobile-tab-summary .mobile-recent {
    order: 2;
    display: block;
  }
  body.mobile-tab-summary .hero-chart {
    order: 3;
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 180px;
  }
  body.mobile-tab-summary .hero-chart .chart-canvas {
    min-height: 120px;
  }
  body.mobile-tab-summary .usage-panel {
    order: 4;
    display: flex;
    padding: 6px;
    gap: 4px;
  }
  body.mobile-tab-summary .usage-head {
    padding: 0;
    margin-bottom: 0;
  }
  body.mobile-tab-summary .usage-head h2 {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-faint);
    margin: 0;
  }
  body.mobile-tab-summary .usage-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  body.mobile-tab-summary .usage-lane {
    padding-left: 6px;
    gap: 4px;
  }
  body.mobile-tab-summary .usage-stats {
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }
  body.mobile-tab-summary .usage-stat {
    padding: 4px 6px;
    border: 0;
    background: transparent;
  }
  body.mobile-tab-summary .usage-stat span {
    font-size: 9px;
    color: var(--text-faint);
  }
  body.mobile-tab-summary .usage-stat strong {
    font-size: 11px;
  }
  body.mobile-tab-summary .usage-detail {
    display: none;
  }
  body.mobile-tab-summary .competitors,
  body.mobile-tab-summary .timeline {
    display: none;
  }

  /* GPT detail tab */
  body.mobile-tab-gpt .hero-chart,
  body.mobile-tab-gpt .mobile-summary,
  body.mobile-tab-gpt .usage-panel,
  body.mobile-tab-gpt .mobile-recent,
  body.mobile-tab-gpt .timeline {
    display: none;
  }
  body.mobile-tab-gpt .competitors {
    display: grid;
  }
  body.mobile-tab-gpt #card-agy {
    display: none;
  }

  /* AGY detail tab */
  body.mobile-tab-agy .hero-chart,
  body.mobile-tab-agy .mobile-summary,
  body.mobile-tab-agy .usage-panel,
  body.mobile-tab-agy .mobile-recent,
  body.mobile-tab-agy .timeline {
    display: none;
  }
  body.mobile-tab-agy .competitors {
    display: grid;
  }
  body.mobile-tab-agy #card-gpt {
    display: none;
  }

  .competitors {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .usage-card-head {
    display: flex;
  }
  .competitor {
    padding: 16px 10px 12px;
    gap: 12px;
  }
  .competitor-head { gap: 7px; }
  .agent-dot {
    width: 8px;
    height: 8px;
  }
  .crown {
    font-size: 10px;
    padding: 3px 7px;
  }
  .equity-label,
  .pnl-k,
  .stat-k {
    font-size: 10px;
  }
  .equity-value { font-size: 20px; }
  .pnl-v { font-size: 15px; }
  .stat-v { font-size: 12px; }
  .stat-v--positions { font-size: 11px; }
  .competitor-pnl,
  .competitor-stats {
    gap: 8px;
  }
  .competitor-pnl { padding: 10px; }
  .stat { padding: 9px 10px; }
  .timeline { padding: 16px 8px 12px; }
  .timeline-head {
    align-items: center;
  }
  .timeline-tab {
    padding: 5px 8px;
    font-size: 11px;
  }
  .timeline-grid { display: none; }
  .timeline-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .timeline-mobile-more {
    display: block;
    appearance: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-card-2);
    color: var(--text);
    padding: 10px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
  }
  .timeline-mobile-more[hidden] { display: none; }
  .timeline-mobile-round {
    padding: 10px;
    background: var(--bg-card-2);
    border: 1px solid var(--border);
    border-radius: 6px;
  }
  .timeline-mobile-round-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 6px;
    color: var(--text-faint);
    font-size: 11px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
  }
  .timeline-column-head {
    padding: 7px 8px;
  }
  .timeline-item {
    padding: 10px 9px;
    gap: 7px;
  }
  .timeline-item.is-trade {
    padding: 12px 11px;
    border-left-width: 5px;
  }
  .timeline-placeholder {
    padding: 10px 9px;
    gap: 7px;
  }
  .timeline-time { font-size: 12px; }
  .timeline-round { font-size: 10px; }
  .timeline-sentence { font-size: 12px; }
  .timeline-item.is-trade .timeline-sentence {
    gap: 6px;
    font-size: 14px;
  }
  .timeline-placeholder-text { font-size: 11px; }
  .timeline-detail,
  .timeline-selection {
    font-size: 11px;
  }
  .action-badge {
    display: inline-flex;
    margin: 2px 0 0;
    padding: 1px 7px;
    font-size: 11px;
  }
  .timeline-item.is-trade .action-badge {
    font-size: 13px;
    padding: 3px 9px;
  }
  .hero-chart { padding: 14px 14px 12px; min-height: 220px; }
  .chart-canvas { min-height: 180px; }
  body.mobile-tab-summary .hero-chart { min-height: 210px; }
  body.mobile-tab-summary .chart-canvas { min-height: 150px; }
  .meta-pill { font-size: 11px; padding: 5px 10px; }
  .app-brand-text h1 { font-size: 18px; }
}
