:root {
  --bg: #0b0b0d;
  --bar-bg: rgba(12, 12, 14, 0.84);
  --fg: #f2f0eb;
  --muted: rgba(242, 240, 235, 0.55);
  --line: rgba(255, 255, 255, 0.1);
  --accent: #ffd166;
  --ok: #7bd88f;
  --danger: #ff6b6b;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); font-family: var(--sans); }

#stage { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; background: var(--bg); }

.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: var(--bar-bg);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-top: 1px solid var(--line);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 8px;
  font-size: 14px; line-height: 1.3;
}
.bar-row { display: flex; align-items: center; gap: 12px; }

.caption { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.tag { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--accent); white-space: nowrap; }
.prompt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.clock { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 20px; display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.clock-label { font-family: var(--sans); font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }

.form { gap: 8px; }
#input {
  flex: 1; min-width: 0;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--fg); border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 15px; outline: none;
}
#input::placeholder { color: var(--muted); }
#input:focus { border-color: var(--accent); }
#input:disabled { opacity: 0.5; }
#go {
  background: var(--accent); color: #111; border: 0; border-radius: 8px;
  padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer;
}
#go:disabled { opacity: 0.35; cursor: not-allowed; }

.meta { justify-content: space-between; font-size: 12px; color: var(--muted); }
.msg { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--danger); }
.links { white-space: nowrap; }
.links a { color: var(--muted); text-decoration: none; border-bottom: 1px solid transparent; }
.links a:hover { color: var(--fg); border-color: currentColor; }
.links a[hidden] { display: none; }

.bar[data-slot="open"] .tag { color: var(--ok); }
.bar[data-slot="open"] #countdown { color: var(--ok); }
.bar[data-slot="building"] .tag, .bar[data-slot="screening"] .tag { animation: pulse 1.2s ease-in-out infinite; }
.bar[data-slot="held"] .tag, .bar[data-slot="capped"] .tag { color: var(--danger); }
@keyframes pulse { 50% { opacity: 0.3; } }

#about-panel { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, 0.72); display: grid; place-items: center; padding: 20px; }
#about-panel[hidden] { display: none; }
.about {
  max-width: 560px; background: #141417; border: 1px solid var(--line); border-radius: 14px;
  padding: 26px 28px; line-height: 1.55; font-size: 15px;
}
.about h2 { margin: 0 0 0.5em; font-weight: 600; font-size: 20px; letter-spacing: -0.01em; }
.about p { margin: 0.6em 0; color: rgba(242, 240, 235, 0.82); }
.about p.fine { font-size: 13px; color: var(--muted); }
.about a { color: var(--accent); }
.about button {
  margin-top: 12px; background: transparent; color: var(--fg); border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px; padding: 8px 14px; font: inherit; cursor: pointer;
}

@media (max-width: 640px) {
  .bar { font-size: 13px; padding-left: 10px; padding-right: 10px; }
  .clock { font-size: 17px; }
  .tag { display: none; }
  .meta { flex-wrap: wrap; gap: 4px 12px; }
}
