:root {
  color: #24221f;
  background: #fff8f2;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  overflow-x: clip;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

.card {
  width: min(100%, 36rem);
  margin: auto;
  padding: clamp(20px, 5vw, 32px);
  overflow-wrap: anywhere;
  background: #fff;
  border: 1px solid #f1e6dd;
  border-radius: clamp(16px, 4vw, 24px);
  box-shadow: 0 18px 60px #54351c14;
}

.brand {
  display: flex;
  justify-content: center;
  margin-bottom: clamp(16px, 4vw, 24px);
}

.brand img {
  display: block;
  width: clamp(112px, 36vw, 164px);
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}

.eyebrow {
  color: #f36d4d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

h1 {
  margin: 8px 0;
  font-size: clamp(24px, 7vw, 30px);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

p {
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.muted { color: #77716c; }

.notice {
  margin: 18px 0;
  padding: 13px 15px;
  color: #80561d;
  background: #fff3df;
  border-radius: 12px;
}

.notice.closed { color: #9a3324; background: #fff0ee; }

form { margin-top: 24px; }

label {
  display: block;
  margin: 17px 0;
  font-size: 14px;
  font-weight: 700;
}

label.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

label.check-row input[type="checkbox"],
label.check-row input[type="radio"] {
  flex: 0 0 20px;
  width: 20px;
  min-height: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  accent-color: #f36d4d;
}

.customer-type-group {
  margin: 18px 0;
  padding: 12px 14px 4px;
  border: 1px solid #e7d8cf;
  border-radius: 12px;
}

.customer-type-group legend {
  padding: 0 5px;
  font-size: 14px;
  font-weight: 700;
}

.customer-type-group label.check-row { margin: 8px 0; }
.customer-type-group .error { margin: 4px 0 8px; }

input,
select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin-top: 8px;
  padding: 12px 14px;
  color: #24221f;
  background: #fff;
  border: 1px solid #ded7d1;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
}

button {
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  padding: 13px 16px;
  color: #fff;
  background: #f36d4d;
  border: 0;
  border-radius: 13px;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  overflow-wrap: anywhere;
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled { opacity: 0.55; cursor: wait; }
.secondary { color: #bb4b32; background: #fff1e9; }
.fine { color: #837d77; font-size: 12px; }

.directory {
  width: min(100%, 58rem);
  margin: auto;
  padding: clamp(18px, 5vw, 36px);
  background: #fff;
  border: 1px solid #f1e6dd;
  border-radius: 24px;
  box-shadow: 0 18px 60px #54351c14;
}

.directory .brand { justify-content: flex-start; margin-bottom: 12px; }
.directory .brand img { width: 96px; }
.restaurant-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 14px; margin-top: 22px; }
.restaurant-card { min-width: 0; padding: 18px; border: 1px solid #f1e6dd; border-radius: 16px; background: #fffdfa; }
.restaurant-card h2 { margin: 0 0 8px; font-size: 19px; overflow-wrap: anywhere; }
.restaurant-card p { margin: 6px 0 14px; }
.queue-state { font-size: 13px; font-weight: 700; }
.queue-state.open { color: #287a45; }
.queue-state.paused { color: #9a6420; }
.queue-state.closed { color: #9a3324; }
.restaurant-link { display: inline-flex; min-height: 44px; align-items: center; color: #bb4b32; font-weight: 800; text-decoration: none; }
.restaurant-link:focus-visible { outline: 3px solid #f36d4d; outline-offset: 3px; border-radius: 4px; }

.token {
  margin: 8px 0;
  color: #f36d4d;
  font-size: clamp(40px, 16vw, 64px);
  font-weight: 900;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

#ticket { margin: 28px 0 12px; text-align: center; }
.error { margin-top: 18px; padding: 13px; color: #a32920; background: #fff0ee; border-radius: 12px; }
footer { margin-top: 32px; color: #aaa; font-size: 12px; text-align: center; }

@media (max-width: 360px) {
  .card { padding: 18px 16px; }
  .brand img { width: clamp(104px, 34vw, 124px); }
}

@media (orientation: landscape) and (max-height: 560px) {
  body { align-items: flex-start; }
  .card { margin-block: 12px; }
  .brand img { width: clamp(88px, 22vh, 124px); }
}

@media (min-width: 768px) {
  body { padding: 24px; }
}
