:root {
  color-scheme: light;
  --bg: #fff;
  --text: #222;
  --muted: #666;
  --border: #ccc;
  --pill-active: #1a5fb4;
  --pill-active-text: #fff;
  --dot-active: #1a5fb4;
  --panel: #fff;
  --panel-inset: #f5f5f5;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  font-size: 16px;
  line-height: 1.4;
}

.page-shell {
  width: 100%;
}

.day-nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0 0 1rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.day-nav::-webkit-scrollbar {
  display: none;
}

.day-nav > * {
  flex: 0 0 auto;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pill.active {
  background: var(--pill-active);
  border-color: var(--pill-active);
  color: var(--pill-active-text);
}

.day-progress-dot {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  cursor: default;
  vertical-align: middle;
  margin: 0 0.15rem;
}

.day-progress-dot.filled {
  border-color: var(--dot-active);
  background: var(--dot-active);
}

.date-picker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.date-picker input[type="date"] {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.5rem;
  font-size: 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
}

.day-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 2.5rem;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

.day-nav-button:disabled {
  color: #aaa;
  background: var(--panel-inset);
  cursor: not-allowed;
}

.events-section {
  display: grid;
  gap: 12px;
}

.venue-group {
  margin-bottom: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.6rem 0.85rem;
  background: transparent;
}

.venue-heading {
  cursor: pointer;
  font-weight: 600;
  padding: 0.2rem 0;
  -webkit-tap-highlight-color: transparent;
}

.event-list {
  list-style: none;
  padding-left: 1.1rem;
  margin: 0.5rem 0 0;
}

.event-item {
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.event-item a {
  color: #1a5fb4;
  text-decoration: none;
  word-break: break-word;
}

.event-item a:hover {
  text-decoration: underline;
}

.event-time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  display: inline-block;
  margin-right: 0.4rem;
}

.status-banner {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.7rem;
  color: #aaa;
}

.status-banner.warning {
  color: #a00;
}

.empty-state {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  color: var(--muted);
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.empty-state p {
  margin: 0;
}

.hidden {
  display: none !important;
}

@media (max-width: 640px) {
  body {
    padding: 12px;
  }
}
