:root {
  --bg: #f5f5f6;
  --fg: #1a1a1a;
  --muted: #666666;
  --border: #e2e2e2;
  --card: #ffffff;
  --accent: #2563eb;
  --accent-fg: #ffffff;
  --accent-hover: #1d4ed8;
  --open-bg: #e7f6ec;
  --open-fg: #1a7f37;
  --closed-bg: #fdecec;
  --closed-fg: #b42318;
  --wait-bg: #fff4e5;
  --wait-fg: #9a5b00;
  --radius: 8px;
  --maxw: 760px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--accent); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 20px 48px;
  flex: 1 0 auto;
}
.intro h1 {
  margin: 8px 0 8px;
  font-size: 1.7rem;
  line-height: 1.2;
}
.intro p {
  margin: 0 0 8px;
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-top: 22px;
}
.card.center { text-align: center; }
.card.center h1 { margin-top: 4px; }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field { display: flex; flex-direction: column; }
label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
input, select {
  font: inherit;
  color: var(--fg);
  background: #fff;
  padding: 9px 11px;
  border: 1px solid #c9ced6;
  border-radius: 6px;
  width: 100%;
}
select { appearance: auto; }
input:focus, select:focus, .btn:focus, a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.hint {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 5px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
.btn {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  padding: 10px 16px;
  border: 1px solid transparent;
  text-decoration: none;
  display: inline-block;
}
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn-primary {
  background: rgb(162, 59, 103);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-weight: 600;
}
.btn-primary:hover:not([disabled]) { background: #d56698; }
.btn-primary:active:not([disabled]) { background: rgb(162, 59, 103); }
.btn-secondary {
  background: transparent;
  color: #444;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  font-weight: 500;
}
.btn-secondary:hover:not([disabled]) { background: #f0f0f1; }

.message {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 0.95rem;
  border: 1px solid var(--border);
}
.message.ok { background: var(--open-bg); border-color: #bfe6cb; color: var(--open-fg); }
.message.err { background: var(--closed-bg); border-color: #f3c4c0; color: var(--closed-fg); }
.message.info { background: #eef2ff; border-color: #cfd9ff; color: #3538cd; }

.result {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.result h3 { margin: 0 0 4px; font-size: 1.15rem; }
.result .sub { color: var(--muted); margin: 0 0 14px; font-size: 0.92rem; }
.result dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 0;
}
.result dt { color: var(--muted); }
.result dd { margin: 0; }
.result .seats { margin-top: 14px; font-size: 1rem; }
.result .seats strong { font-size: 1.25rem; }

.status-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 650;
  vertical-align: middle;
}
.status-open { background: var(--open-bg); color: var(--open-fg); }
.status-closed { background: var(--closed-bg); color: var(--closed-fg); }
.status-wait { background: var(--wait-bg); color: var(--wait-fg); }

.fine {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
}

.footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: #fafafa;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 20px;
}
.footer-note {
  font-size: 0.78rem;
  line-height: 1.5;
}
.muted { color: var(--muted); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .actions .btn { flex: 1 1 100%; text-align: center; }
  .result dl { grid-template-columns: 1fr; gap: 2px; }
  .result dt { margin-top: 8px; }
}
