:root {
  --bg: #f3f5f6;
  --surface: #ffffff;
  --ink: #16202a;
  --muted: #5b6770;
  --line: #d9dfe3;
  --free: #1b7f52;
  --free-ink: #ffffff;
  --busy: #b93a26;
  --focus: #2b62c9;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12181d;
    --surface: #1b232a;
    --ink: #e8edf0;
    --muted: #9aa7b0;
    --line: #2c3740;
    --free: #3fae7b;
    --free-ink: #0d1a13;
    --busy: #e2705c;
    --focus: #7aa5ff;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}

/* ---------- Check-in-Seite (Handy) ---------- */
.page {
  min-height: 100%;
  max-width: 30rem;
  margin: 0 auto;
  padding: max(2rem, env(safe-area-inset-top)) 1.5rem max(1.5rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}
.place-name {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
}
.slot { color: var(--muted); margin: .15rem 0 0; }

/* Die Endzeit ist das zentrale Element */
.until {
  margin: auto 0;
  padding: 2.5rem 0;
}
.until small { display: block; color: var(--muted); font-size: 1rem; }
.until strong {
  display: block;
  font-size: clamp(4.5rem, 26vw, 7.5rem);
  font-weight: 700;
  line-height: .95;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}

.status { min-height: 3rem; color: var(--muted); margin: 0 0 1rem; }
.status.ok { color: var(--free); font-weight: 600; }
.status.err { color: var(--busy); font-weight: 600; }

.btn {
  appearance: none;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 1.1rem 1rem;
  font: inherit;
  font-weight: 650;
  font-size: 1.1rem;
  background: var(--free);
  color: var(--free-ink);
  cursor: pointer;
}
.btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn[hidden] { display: none; }

.done .until strong { color: var(--free); }
.failed .until strong { color: var(--busy); }

@media (prefers-reduced-motion: no-preference) {
  .until strong { transition: color .3s ease; }
}
