/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ── */
:root {
  --bg:            #0d0d0d;
  --surface:       #111111;
  --border:        #1e1e1e;
  --text:          #eeeeee;
  --text-muted:    #999999;
  --text-dim:      #777777;
  --text-secondary:#dddddd;

  /* Zone backgrounds */
  --zone-sleep-bg:   #05050f;
  --zone-sleep-acc:  #4a5fa0;
  --zone-sleep-txt:  #8fa8e8;

  --zone-work-bg:    #040f04;
  --zone-work-acc:   #4caf78;
  --zone-work-txt:   #5ec98a;

  --zone-evening-bg: #0c0418;
  --zone-evening-acc:#9060d0;
  --zone-evening-txt:#c090f0;

  --zone-daytime-bg: #0f0c04;
  --zone-daytime-acc:#c49020;
  --zone-daytime-txt:#e0b040;

  --zone-night-bg:   #04080f;
  --zone-night-acc:  #4080b0;
  --zone-night-txt:  #60a8d8;

  /* Featured */
  --hot-border:  #f4a261;
  --hot-bg:      linear-gradient(135deg, #2d1a00, #3a2200);
  --hot-glow:    rgba(244, 162, 97, 0.22);
  --hot-banner:  linear-gradient(90deg, #f4a261, #e76f51);
}

/* ── Base ── */
html { font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── App header ── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px 10px;
}
.app-title   { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.5px; }
.app-subtitle { font-size: 0.8125rem; color: var(--text-muted); margin-top: 3px; }

/* ── Main container ── */
#app { width: 100%; }
@media (min-width: 540px) {
  #app { max-width: 500px; margin: 0 auto; }
}

/* ── Day header ── */
.day-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 18px 16px 6px;
  border-top: 1px solid #1a1a1a;
  margin-top: 10px;
}
.day-date    { font-size: 1.1875rem; font-weight: 700; }
.day-weekday { font-size: 0.875rem; color: var(--text-muted); }
.day-weekday.weekend { color: #e76f51; font-weight: 600; }
.day-count   { font-size: 0.8125rem; color: var(--text-dim); margin-left: auto; }

/* ── Zone section ── */
.zone-section[data-zone="sleep"]   { background: var(--zone-sleep-bg); }
.zone-section[data-zone="work"]    { background: var(--zone-work-bg); }
.zone-section[data-zone="evening"] { background: var(--zone-evening-bg); }
.zone-section[data-zone="daytime"] { background: var(--zone-daytime-bg); }
.zone-section[data-zone="night"]   { background: var(--zone-night-bg); }

.zone-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px 8px 14px;
}
.zone-label-text {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.zone-label-line { display: none; }

.zone-section[data-zone="sleep"]   .zone-label-text { color: var(--zone-sleep-txt); }
.zone-section[data-zone="sleep"]   .zone-label-line { background: var(--zone-sleep-txt); }
.zone-section[data-zone="work"]    .zone-label-text { color: var(--zone-work-txt); }
.zone-section[data-zone="work"]    .zone-label-line { background: var(--zone-work-txt); }
.zone-section[data-zone="evening"] .zone-label-text { color: var(--zone-evening-txt); }
.zone-section[data-zone="evening"] .zone-label-line { background: var(--zone-evening-txt); }
.zone-section[data-zone="daytime"] .zone-label-text { color: var(--zone-daytime-txt); }
.zone-section[data-zone="daytime"] .zone-label-line { background: var(--zone-daytime-txt); }
.zone-section[data-zone="night"]   .zone-label-text { color: var(--zone-night-txt); }
.zone-section[data-zone="night"]   .zone-label-line { background: var(--zone-night-txt); }

/* ── Match row ── */
.match-row {
  display: flex;
  gap: 10px;
  padding: 4px 12px 4px 12px;
}
.match-time-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 46px;
  flex-shrink: 0;
}
.match-time {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1;
  margin-bottom: 5px;
}
.timeline-line {
  width: 2px;
  flex: 1;
  min-height: 24px;
  border-radius: 1px;
}

.zone-section[data-zone="sleep"]   .timeline-line { background: var(--zone-sleep-acc); }
.zone-section[data-zone="work"]    .timeline-line { background: var(--zone-work-acc); }
.zone-section[data-zone="evening"] .timeline-line { background: var(--zone-evening-acc); }
.zone-section[data-zone="daytime"] .timeline-line { background: var(--zone-daytime-acc); }
.zone-section[data-zone="night"]   .timeline-line { background: var(--zone-night-acc); }

/* ── Match card ── */
.match-card {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 11px 14px;
  margin-bottom: 6px;
}
.match-teams {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.7;
}
.match-flag { font-size: 1.375rem; vertical-align: middle; }
.match-meta { font-size: 0.75rem; color: #888888; margin-top: 4px; }

/* ── Featured card ── */
.match-card.featured {
  background: var(--hot-bg);
  border-color: var(--hot-border);
  box-shadow: 0 0 16px var(--hot-glow);
}
.match-card.featured .match-teams { color: #fff; }
.featured-banner {
  display: block;
  background: var(--hot-banner);
  color: #000;
  font-size: 0.625rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  padding: 3px 14px;
  border-radius: 10px 10px 0 0;
  margin: -11px -14px 8px;
}

/* ── Bottom spacing ── */
#app::after { content: ""; display: block; height: 48px; }
