:root {
  --bg: #262626;
  --surface: #3d3d3d;
  --text: #f4f4f1;
  --muted: #8b8b86;
  --line: rgba(255,255,255,.08);
  --line-soft: rgba(255,255,255,.03);
  --accent: #00c9ff;
  --now: #43ff9b;
  --axis-width: 48px;
  --column-min: 210px;
  --stage-width: 210px;
  --schedule-width: calc(var(--axis-width) + (4 * var(--stage-width)));
  --minute-height: 1.55px;
  --timeline-minutes: 540;
  --timeline-height: calc(var(--minute-height) * var(--timeline-minutes));
  --radius: 3px;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color-scheme: dark;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-weight: 700;
}

button { font: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  background: #262626e2;
}

.topbar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.topbar-controls > div {
  display: flex;
  align-items: stretch;
}

.day-switch {
  display: flex;
  background: var(--surface);
}

.day-btn,
.likes-filter {
  border: 0;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, opacity .15s ease;
}

.likes-filter {
  margin-left: 4px;
}

.day-btn {
  padding: 8px 8px;
  font-size: 12px;
  letter-spacing: .08em;
  text-align: left;
}


.day-btn span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.day-btn.is-active {
  background: #fff;
  color: #000;
}

.day-btn.is-active span { color: #555; }

.likes-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  background: var(--surface);
  font-size: 12px;
  letter-spacing: .04em;
}

.likes-filter[aria-pressed="true"] {
  background: #fff;
  color: #000;
}

.heart { font-size: 18px; line-height: 1; }
.likes-count {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  font-size: 10px;
}
.likes-filter[aria-pressed="true"] .likes-count { background: rgba(0,0,0,.12); }

main { padding: 0 0 64px; }

.schedule-shell { width: 100%; }

.scroll-hint {
  display: none;
  padding: 10px 14px 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.schedule-scroll {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: #3a3a3a #0a0a0a;
}

.schedule {
  width: var(--schedule-width);
  min-width: var(--schedule-width);
}

.stage-scroll {
  width: 100%;
  overflow: hidden;
}

.stage-row {
  display: grid;
  grid-template-columns: var(--axis-width) repeat(4, var(--stage-width));
  width: var(--schedule-width);
  min-width: var(--schedule-width);
  will-change: transform;
}

.stage-spacer {
  border-right: 1px solid var(--line-soft);
}

.stage-title {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 6px 8px;
  border-right: 1px solid var(--line-soft);
  color: var(--stage-color);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.timeline {
  position: relative;
  height: var(--timeline-height);
}

.time-axis {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 10;
  width: var(--axis-width);
  border-right: 1px solid var(--line-soft);
}

.time-label {
  position: absolute;
  right: 10px;
  transform: translateY(-50%);
  color: #777772;
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stage-columns {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--axis-width);
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, var(--stage-width));
  width: calc(4 * var(--stage-width));
}

.stage-column {
  position: relative;
  min-width: 0;
  border-right: 1px solid var(--line-soft);
}

.grid-lines {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.grid-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line-soft);
}

.grid-line.major { background: var(--line); }

.concert {
  position: absolute;
  left: 6px;
  right: 6px;
  display: grid;
  grid-template-rows: auto 1fr;
  align-items: center;
  min-height: 46px;
  padding: 10px 12px 11px;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: var(--stage-color);
  color: #000;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
  text-align: left;
  transition: opacity .18s ease, transform .12s ease, filter .18s ease;
}

.concert:hover { filter: brightness(1.05); }
.concert:focus-visible { outline: 3px solid #fff; outline-offset: 2px; z-index: 3; }

.concert-time {
  align-self: start;
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.concert-name {
  align-self: center;
  justify-self: center;
  max-width: 92%;
  font-size: clamp(13px, 1.05vw, 18px);
  line-height: 1.05;
  font-weight: 500;
  text-align: center;
}

.concert-heart {
  position: absolute;
  top: 7px;
  right: 8px;
  font-size: 18px;
  line-height: 1;
  opacity: .55;
}

.concert.is-liked .concert-heart {
  opacity: 1;
  transform: scale(1.08);
}

.schedule.filter-likes .concert:not(.is-liked) {
  opacity: .25;
  filter: saturate(.25);
}

.now-line {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 35;
  height: 1.5px;
  background: var(--now);
  box-shadow: 0 0 16px rgba(67,255,155,.35);
  pointer-events: none;
}

.now-label {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px 6px 3px;
  border-radius: 0 2px 2px 0;
  background: var(--now);
  color: #001e0d;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
}

footer {
  margin: 0 24px 24px 24px;
  font-size: 11px;
  font-weight: 400;
}

@media (max-width: 820px) {
  :root {
    --axis-width: 54px;
    --column-min: 50px;
    --minute-height: 1.45px;
  }

  .topbar-controls {
    gap: 8px;
    min-height: 62px;
    padding: 8px 12px;
  }

  .day-switch { flex: 1; }
  .day-btn { min-width: 0; flex: 1; }
  .likes-filter { flex: 0 0 auto; }
  .scroll-hint { display: block; }
  .concert-name { font-size: 14px; }
}

@media (max-width: 480px) {
  .topbar-controls { gap: 6px; padding-inline: 8px; }
  .day-btn { padding-inline: 10px; }
  .likes-filter { padding-inline: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
