:root {
  --bg: #0b0e14;
  --bg-soft: #11161f;
  --panel: #151b26;
  --panel-2: #1a2230;
  --border: #232c3d;
  --text: #e8ecf3;
  --text-dim: #94a0b5;
  --text-faint: #5c6a80;
  --accent: #f5b942;
  --accent-soft: rgba(245, 185, 66, 0.12);
  --stream: #4cc38a;
  --event: #5b8def;
  --upload: #c07fe8;
  --no-stream: #8a93a6;
  --planned: #6aa5b5;
  --danger: #e0656f;
  --radius: 14px;
  --radius-sm: 9px;
  font-size: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(91, 141, 239, 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 0%, rgba(245, 185, 66, 0.06), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.45;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ---------- header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--border);
  background: rgba(11, 14, 20, 0.7);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #e8963a);
  color: #141414;
  font-weight: 800;
  font-size: 22px;
  box-shadow: 0 6px 20px rgba(245, 185, 66, 0.25);
}
.brand-text h1 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.brand-sub {
  color: var(--accent);
}
.tagline {
  font-size: 13px;
  color: var(--text-dim);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.updated {
  font-size: 12.5px;
  color: var(--text-faint);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover {
  background: var(--panel-2);
  border-color: var(--accent);
}
.btn:disabled {
  opacity: 0.5;
  cursor: wait;
}
.spin-icon {
  width: 12px;
  height: 12px;
  border: 2px solid var(--text-dim);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- layout ---------- */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px clamp(18px, 4vw, 48px) 60px;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin: 30px 0 14px;
}
#upcoming-section .section-title {
  margin-top: 8px;
}

/* ---------- hero ---------- */
#hero {
  margin-top: 4px;
  border-radius: var(--radius);
  padding: 22px 26px;
  background:
    linear-gradient(135deg, rgba(245, 185, 66, 0.16), rgba(245, 185, 66, 0.03)),
    var(--panel);
  border: 1px solid rgba(245, 185, 66, 0.35);
}
.hero-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.hero-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 6px 0 4px;
}
.hero-meta {
  font-size: 14px;
  color: var(--text-dim);
}

/* ---------- event cards ---------- */
.day-group {
  margin-bottom: 16px;
}
.day-label {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 8px 4px;
}
.day-label .dow {
  font-weight: 800;
  font-size: 16px;
}
.day-label .dod {
  font-size: 13px;
  color: var(--text-dim);
}
.day-label .badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(245, 185, 66, 0.35);
  padding: 2px 8px;
  border-radius: 999px;
}

.card {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 16px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 8px;
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover {
  border-color: var(--text-faint);
  transform: translateY(-1px);
}
.card.today-card {
  border-color: rgba(245, 185, 66, 0.5);
  background: linear-gradient(180deg, rgba(245, 185, 66, 0.07), var(--panel));
}
.card.no-stream {
  opacity: 0.62;
}
.card.uncertain {
  border-style: dashed;
}

.time-block {
  text-align: center;
  padding-right: 14px;
  border-right: 1px solid var(--border);
}
.time-block .t-main {
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.time-block .t-z {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}
.time-block .t-local {
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 2px;
}
.time-block .t-empty {
  font-size: 12px;
  color: var(--text-faint);
}

.body-block .card-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.body-block .card-notes {
  font-size: 13.5px;
  color: var(--text-dim);
  margin-top: 3px;
}
.body-block .card-range {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 3px;
}
.card-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.chip {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.chip-stream   { color: var(--stream);  background: rgba(76, 195, 138, 0.13);  border: 1px solid rgba(76, 195, 138, 0.35); }
.chip-event    { color: var(--event);   background: rgba(91, 141, 239, 0.13);   border: 1px solid rgba(91, 141, 239, 0.35); }
.chip-upload   { color: var(--upload);  background: rgba(192, 127, 232, 0.13);  border: 1px solid rgba(192, 127, 232, 0.35); }
.chip-no_stream{ color: var(--no-stream); background: rgba(138, 147, 166, 0.12); border: 1px solid rgba(138, 147, 166, 0.3); }
.chip-planned  { color: var(--planned); background: rgba(106, 165, 181, 0.13);  border: 1px solid rgba(106, 165, 181, 0.35); }
.chip-other    { color: var(--text-dim); background: rgba(148, 160, 181, 0.1);  border: 1px solid var(--border); }

.uncert-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--danger);
  background: rgba(224, 101, 111, 0.12);
  border: 1px solid rgba(224, 101, 111, 0.35);
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- planned ---------- */
.planned-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}
.planned-item {
  background: var(--panel);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.planned-item .p-title {
  font-weight: 700;
  font-size: 14.5px;
}
.planned-item .p-notes {
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ---------- status ---------- */
.status {
  margin-top: 30px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-dim);
}
.status.error {
  border-color: rgba(224, 101, 111, 0.5);
  color: var(--danger);
}
.status .spin-icon {
  display: inline-block;
  margin-right: 8px;
  vertical-align: -1px;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 22px clamp(18px, 4vw, 48px) 30px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}
.site-footer .footnote {
  margin-top: 6px;
  color: var(--text-faint);
  font-size: 12px;
}

/* ---------- responsive ---------- */
@media (max-width: 620px) {
  .card {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .time-block {
    display: flex;
    align-items: baseline;
    gap: 8px;
    text-align: left;
    padding-right: 0;
    padding-bottom: 10px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .card-end {
    flex-direction: row;
    align-items: center;
  }
  .hero-title {
    font-size: 22px;
  }
}
