:root {
  color-scheme: dark;
  --bg: #0d1110;
  --panel: #151b19;
  --panel-2: #101615;
  --line: rgba(218, 229, 219, 0.14);
  --text: #edf4ef;
  --muted: #8e9b94;
  --soft: #c3cec6;
  --accent: #7ee2a8;
  --us: #7ee2a8;
  --th: #75a7ff;
  --vn: #ffca67;
  --kr: #ff7b9c;
  --danger: #ffbf69;
  --radius: 18px;
  font-family:
    ui-sans-serif,
    "SF Pro Display",
    "Segoe UI",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(180deg, rgba(255,255,255,0.02) 1px, transparent 1px) 0 0 / 80px 80px,
    radial-gradient(circle at 85% 10%, rgba(126, 226, 168, 0.13), transparent 30%),
    radial-gradient(circle at 10% 35%, rgba(117, 167, 255, 0.08), transparent 30%),
    var(--bg);
  color: var(--text);
}

.shell {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.kicker,
.chip,
.panel-title span,
.timezone-note,
.metric-bubble span,
.room-meta,
.download-card span,
.download-total-card span {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 6px;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 0.92;
  letter-spacing: -0.045em;
}

.status-strip {
  min-width: 280px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--soft);
  white-space: nowrap;
}

.status-strip strong {
  color: var(--text);
  font-size: 13px;
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 7px rgba(126, 226, 168, 0.12);
}

.mission-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.75fr);
  gap: 18px;
  margin: 24px 0 18px;
}

.hero-panel,
.panel,
.signal-panel,
.timeline-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
}

.hero-panel {
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.8fr);
  gap: 28px;
  padding: 34px;
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -90px -120px auto;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: 1px solid rgba(126, 226, 168, 0.28);
  background: repeating-conic-gradient(from 18deg, rgba(126,226,168,0.12) 0 6deg, transparent 6deg 18deg);
  opacity: 0.7;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  max-width: 760px;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.chip {
  width: fit-content;
  padding: 7px 10px;
  border: 1px solid rgba(126, 226, 168, 0.28);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(126, 226, 168, 0.08);
}

.hero-copy h2 {
  margin-top: 18px;
  font-size: clamp(38px, 6vw, 82px);
  line-height: 0.88;
  letter-spacing: -0.065em;
}

.hero-copy p {
  max-width: 690px;
  margin-top: 20px;
  color: var(--soft);
  font-size: 17px;
  line-height: 1.55;
}

.mock-note {
  width: fit-content;
  max-width: 100%;
  margin-top: 18px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 202, 103, 0.3);
  border-radius: 999px;
  background: rgba(255, 202, 103, 0.08);
  color: #f6d394;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.hero-bubbles {
  align-self: end;
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 18px;
  position: relative;
  z-index: 1;
}

.metric-bubble {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
  border-radius: 34px;
  border: 1px solid rgba(126, 226, 168, 0.34);
  background: rgba(126, 226, 168, 0.07);
}

.metric-bubble:nth-child(2) {
  border-color: rgba(117, 167, 255, 0.36);
  background: rgba(117, 167, 255, 0.07);
}

.metric-bubble:nth-child(3) {
  border-color: rgba(255, 202, 103, 0.36);
  background: rgba(255, 202, 103, 0.07);
}

.metric-bubble:nth-child(4) {
  border-color: rgba(255, 123, 156, 0.32);
  background: rgba(255, 123, 156, 0.06);
}

.metric-bubble strong {
  font-size: clamp(38px, 4.2vw, 58px);
  line-height: 0.9;
  letter-spacing: -0.07em;
  white-space: nowrap;
}

.metric-bubble small {
  margin-top: 8px;
  color: var(--soft);
  line-height: 1.35;
}

.signal-panel,
.panel,
.timeline-section {
  padding: 22px;
}

.panel-title,
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.panel-title strong {
  font-size: 14px;
  color: var(--soft);
}

.room-stack {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.room-card {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
}

.room-color {
  width: 10px;
  height: 44px;
  border-radius: 999px;
}

.room-card h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.room-card strong {
  font-size: 12px;
  color: var(--text);
}

.timeline-section {
  margin-bottom: 18px;
}

.section-head h2 {
  font-size: 24px;
  letter-spacing: -0.03em;
}

.section-head p {
  margin-top: 6px;
  color: var(--muted);
}

.timeline-hours {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  margin: 26px 0 8px 156px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.timeline-label strong {
  display: block;
  font-size: 15px;
}

.timeline-label span {
  color: var(--muted);
  font-size: 12px;
}

.track {
  position: relative;
  height: 38px;
  border-radius: 999px;
  background: rgba(255,255,255,0.045);
  overflow: hidden;
  border: 1px solid var(--line);
}

.slot {
  position: absolute;
  top: 5px;
  height: 26px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #07100d;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 18px;
  margin-bottom: 18px;
}

.hours-bars,
.download-grid,
.download-total-grid,
.quality-list {
  margin-top: 24px;
}

.bar-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 48px;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.bar-row span {
  color: var(--soft);
  font-size: 13px;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
}

.trend-panel {
  min-height: 370px;
}

.downloads-panel {
  grid-column: 1 / -1;
}

#trend-chart {
  width: 100%;
  min-height: 260px;
  margin-top: 18px;
}

.axis {
  stroke: rgba(255,255,255,0.12);
}

.trend-line {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--soft);
  font-size: 12px;
}

.legend-swatch {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

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

.download-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.035);
}

.download-card strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  letter-spacing: -0.05em;
}

.download-card small {
  color: var(--muted);
}

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

.download-total-card {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.035);
}

.download-total-card strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.download-rates {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.download-rates span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
  background: rgba(255,255,255,0.03);
}

.quality-list {
  display: grid;
  gap: 14px;
  padding: 0;
  list-style: none;
  color: var(--soft);
}

.quality-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.dot.warn {
  background: var(--danger);
}

.dot.good {
  background: var(--accent);
}

.trend-board {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  margin-bottom: 18px;
}

.trend-board-head {
  margin-bottom: 18px;
}

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

.chart-card {
  min-height: 330px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.035);
  overflow: hidden;
}

.mini-chart {
  width: 100%;
  min-height: 210px;
  margin-top: 18px;
}

.compact-line {
  stroke-width: 3;
}

.chart-day {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-anchor: middle;
}

.compact-legend {
  margin-top: 4px;
}

.comparison-list {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.compare-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 72px;
  gap: 14px;
  align-items: center;
}

.compare-row > span,
.compare-row strong {
  color: var(--soft);
  font-size: 13px;
}

.compare-row strong {
  text-align: right;
}

.compare-bars {
  display: grid;
  gap: 5px;
}

.compare-bars i,
.compare-bars b {
  display: block;
  height: 10px;
  border-radius: 999px;
}

.compare-bars b {
  background: rgba(237, 244, 239, 0.22);
}

.chart-note {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
}

.chart-note span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.current-week {
  background: var(--accent);
}

.previous-week {
  background: rgba(237, 244, 239, 0.38);
}

.exposure-key {
  background: rgba(126, 226, 168, 0.95);
}

.click-key {
  background: rgba(117, 167, 255, 0.9);
}

.download-key {
  background: rgba(255, 202, 103, 0.95);
}

.funnel-bars {
  height: 220px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin-top: 24px;
}

.funnel-day {
  display: grid;
  gap: 8px;
  align-items: end;
  height: 100%;
}

.funnel-day span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.funnel-stack {
  position: relative;
  height: 190px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
}

.funnel-stack i,
.funnel-stack b,
.funnel-stack em {
  display: block;
  width: 30%;
  min-height: 4px;
  border-radius: 999px 999px 3px 3px;
}

.funnel-stack i {
  background: rgba(126, 226, 168, 0.95);
}

.funnel-stack b {
  background: rgba(117, 167, 255, 0.9);
}

.funnel-stack em {
  background: rgba(255, 202, 103, 0.95);
}

.bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 18px;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.social-country {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.035);
}

.social-country-head {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.social-country-head strong {
  font-size: 14px;
}

.social-country-head small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.social-bars {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.social-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 64px;
  gap: 10px;
  align-items: center;
}

.social-row span,
.social-row strong {
  color: var(--soft);
  font-size: 12px;
}

.social-row strong {
  text-align: right;
}

@media (max-width: 980px) {
  .mission-grid,
  .hero-panel,
  .dashboard-grid,
  .chart-grid,
  .bottom-grid,
  .panel-title,
  .section-head {
    grid-template-columns: 1fr;
  }

  .panel-title,
  .section-head {
    align-items: flex-start;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 18px;
  }

  .status-strip,
  .hero-bubbles {
    justify-self: start;
  }

  .hero-bubbles {
    width: min(100%, 560px);
  }

  .timeline-hours {
    margin-left: 0;
  }

  .timeline-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 640px) {
  .shell {
    width: 100%;
    padding: 16px 12px 44px;
  }

  .status-strip {
    min-width: 0;
    width: 100%;
    justify-content: flex-start;
    overflow: hidden;
  }

  .status-strip strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero-panel,
  .panel,
  .signal-panel,
  .timeline-section {
    padding: 18px;
    border-radius: 16px;
  }

  .hero-copy h2 {
    font-size: 32px;
    line-height: 1;
    letter-spacing: -0.055em;
    max-width: 11ch;
    overflow-wrap: break-word;
  }

  .hero-copy p {
    max-width: 30ch;
  }

  .mock-note {
    width: min(100%, 27ch);
    border-radius: 14px;
  }

  .hero-copy p {
    font-size: 15px;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .download-total-grid,
  .social-grid {
    grid-template-columns: 1fr;
  }

  .hero-bubbles {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .metric-bubble {
    min-height: 156px;
    border-radius: 20px;
  }

  .metric-bubble strong {
    font-size: 38px;
  }

  .trend-board {
    padding: 18px;
    border-radius: 16px;
  }

  .chart-card {
    min-height: 300px;
  }

  .compare-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .compare-row strong {
    grid-column: 2;
    text-align: left;
  }

  .timeline-hours {
    grid-template-columns: repeat(5, 1fr);
    min-width: 620px;
  }

  .timeline-hours span:nth-child(even) {
    display: none;
  }

  .timeline-section {
    overflow-x: auto;
  }

  .timeline {
    min-width: 620px;
  }
}
