:root {
  --bg: #e9e2d6;
  --bg-glow: #f7f1e6;
  --ink: #1a1714;
  --muted: #6d665d;
  --card: #fffdf8;
  --line: #d9d0c3;
  --accent: #1e4d3c;
  --accent-ink: #f6f1e8;
  --danger: #8a2f2f;
  --ok: #1e4d3c;
  --shadow: 0 16px 40px rgba(26, 23, 20, 0.08);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(900px 420px at 80% -10%, var(--bg-glow), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
}

body {
  display: grid;
  justify-items: center;
  align-items: start;
  padding: 20px 18px calc(28px + env(safe-area-inset-bottom));
}

.shell {
  width: min(420px, 100%);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--muted);
}

.mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
}

.session {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.7);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

h1 {
  font-family: var(--serif);
  font-size: 2.15rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 10px;
}

h2 {
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 500;
  margin: 0 0 8px;
}

.lede {
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.5;
  font-size: 0.98rem;
}

.wait {
  text-align: center;
}

.wait-icon {
  width: 72px;
  height: 72px;
  margin: 4px auto 20px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  color: var(--danger);
}

.wait-icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wait-times {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0;
  text-align: left;
}

.wait-times div {
  padding: 18px 20px;
}

.wait-times div:first-child {
  border-right: 1px solid var(--line);
}

.wait-times strong {
  display: block;
  font-size: 1.15rem;
  margin: 6px 0 2px;
}

.wait-times span:last-child {
  color: var(--muted);
  font-size: 0.92rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
}

label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

input[type="password"],
input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 18px 14px;
  font: inherit;
  font-size: 1.7rem;
  letter-spacing: 0.32em;
  text-align: center;
}

input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button {
  font: inherit;
  border: 0;
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
}

.primary {
  width: 100%;
  margin-top: 16px;
  background: var(--accent);
  color: var(--accent-ink);
}

a.primary {
  display: block;
  text-align: center;
  text-decoration: none;
  margin-top: 8px;
}

.primary:disabled {
  opacity: 0.5;
  cursor: wait;
}

.ghost {
  background: transparent;
  color: var(--muted);
}

.secondary {
  background: var(--ink);
  color: var(--card);
}

.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 20px 0 0;
  font-size: 0.88rem;
}

.footer a,
.footer button {
  color: var(--muted);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 6px 2px;
  width: auto;
  margin: 0;
  font: inherit;
  cursor: pointer;
}

.footer a:hover,
.footer button:hover { text-decoration: underline; }

.footer span {
  color: var(--muted);
  opacity: 0.45;
}

.door-list {
  display: grid;
  gap: 12px;
  margin: 0 0 8px;
}

.door {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  margin: 0;
  padding: 16px 16px 16px 14px;
}

.door:active { transform: scale(0.99); }

.door-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #efe8dc;
  color: var(--accent);
  display: grid;
  place-items: center;
}

.door-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.door-copy {
  min-width: 0;
}

.door strong {
  display: block;
  font-size: 1.08rem;
  font-weight: 600;
}

.door small {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 2px;
}

.door-go {
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
}

.msg {
  min-height: 0;
  margin: 0;
  color: var(--danger);
  font-size: 0.95rem;
  line-height: 1.4;
}

.msg:not(:empty) { margin-top: 14px; }

.msg.ok { color: var(--ok); }

.links {
  display: grid;
  gap: 12px;
  margin: 0 0 8px;
}

.link {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.link:last-of-type { border-bottom: 0; }

.link i {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: #c8bfb3;
}

.link strong {
  display: block;
  color: var(--ink);
  font-size: 0.98rem;
}

.link span {
  display: block;
  font-size: 0.86rem;
  margin-top: 2px;
}

.link.ok { color: var(--ok); }
.link.ok i { background: var(--ok); }
.link.bad { color: var(--danger); }
.link.bad i { background: var(--danger); }
.link.bad strong { color: var(--danger); }

.hidden { display: none !important; }

.sheet {
  position: fixed;
  inset: 0;
  background: rgba(26, 23, 20, 0.42);
  display: grid;
  align-items: end;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
}

.sheet-panel {
  width: min(420px, 100%);
  justify-self: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px 28px 22px 22px;
  padding: 22px 22px 18px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.row button {
  flex: 1;
  width: auto;
}

@media (min-width: 520px) {
  .sheet {
    place-items: center;
    align-items: center;
  }

  .sheet-panel { border-radius: 24px; }
}
