:root {
  --ink: #faf7f2;
  --canyon: #0a0908;
  --slate: #1c1917;
  --charcoal: #141210;
  --sand: #e8c468;
  --sun: #f5d78e;
  --ember: #e85d04;
  --lime: #b8f24a;
  --teal: #e8c468;
  --teal-hi: #f5d78e;
  --emerald: #b8f24a;
  --foam: #141210;
  --paper: #1c1917;
  --muted: #a8a29e;
  --line: rgba(232, 196, 104, 0.16);
  --ok: #b8f24a;
  --warn: #f59e0b;
  --viator: #e85d04;
  --direct: #b8f24a;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tab-h: 64px;
  --serif: "Racing Sans One", system-ui, sans-serif;
  --sans: "DM Sans", system-ui, -apple-system, sans-serif;
}

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

html, body {
  min-height: 100%;
  background: #050403;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body { min-height: 100dvh; }

button, input, textarea, select {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
}

button { cursor: pointer; touch-action: manipulation; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

#app {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--canyon);
  position: relative;
  overflow: hidden;
}

.screen {
  display: none;
  min-height: 100dvh;
  padding: calc(62px + var(--safe-t)) 16px calc(var(--tab-h) + var(--safe-b) + 18px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.screen.active { display: block; animation: rise 0.32s ease; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(10px + var(--safe-t)) 12px 10px;
  background: linear-gradient(180deg, rgba(10,9,8,0.96), rgba(10,9,8,0.86));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}
.brand img {
  width: 36px; height: 36px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(232, 196, 104, 0.35);
}
.brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 400;
}
.brand small { color: var(--muted); font-size: 0.72rem; }
.brand small.open { color: var(--lime); font-weight: 700; }
.brand small.closed { color: var(--warn); font-weight: 700; }

.icon-btn {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--slate);
  border: 1px solid var(--line);
}

.tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: #0a0908;
  border-top: 1px solid var(--line);
}
.tabbar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
}
.tabbar button.on { color: var(--sand); }
.tabbar .g { font-size: 1.05rem; }

.hero {
  position: relative;
  height: 210px;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 14px;
}
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero .veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(10,9,8,0.88));
}
.hero .copy {
  position: absolute; left: 14px; right: 14px; bottom: 14px;
  color: #fff;
}
.hero h1 { font-family: var(--serif); font-size: 1.45rem; line-height: 1.15; font-weight: 400; }
.hero p { opacity: 0.88; font-size: 0.86rem; margin-top: 4px; }

.actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.action {
  background: var(--slate);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  border: 1px solid var(--line);
}
.action .g { font-size: 1.15rem; }
.action b { display: block; font-size: 0.78rem; margin-top: 4px; }

.hrow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 8px 0 10px;
}
.hrow h2 { font-family: var(--serif); font-size: 1.15rem; font-weight: 400; }
.hrow button, .hrow span { color: var(--sand); font-size: 0.8rem; font-weight: 700; }

.slot {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 10px;
  align-items: center;
  background: var(--slate);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  margin-bottom: 8px;
  text-align: left;
  width: 100%;
}
.slot img {
  width: 72px; height: 72px;
  object-fit: cover;
  border-radius: 12px;
}
.slot h3 { font-size: 0.92rem; line-height: 1.25; }
.slot p { color: var(--muted); font-size: 0.76rem; margin-top: 3px; }
.slot .seats {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--lime);
  text-align: right;
}
.slot .seats.tight { color: var(--warn); }
.slot .seats.gone { color: #78716c; }

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 6px;
}
.chip {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--slate);
  border: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}
.chip.on { background: var(--sand); color: #0a0908; border-color: var(--sand); }

.dates {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
}
.date-pill {
  flex: 0 0 auto;
  min-width: 58px;
  padding: 8px 6px;
  border-radius: 14px;
  background: var(--slate);
  border: 1px solid var(--line);
  text-align: center;
}
.date-pill b { display: block; font-size: 0.72rem; color: var(--muted); }
.date-pill span { font-family: var(--serif); font-size: 1.05rem; }
.date-pill.on { background: var(--sand); color: #0a0908; border-color: var(--sand); }
.date-pill.on b { color: rgba(10,9,8,0.7); }

.pill {
  display: inline-block;
  background: var(--sand);
  color: #0a0908;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 4px;
}
.pill.lime { background: var(--lime); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.92rem;
}
.btn-primary { background: linear-gradient(135deg, var(--sand), #c4a35a); color: #0a0908; }
.btn-gold { background: linear-gradient(135deg, var(--lime), #8bc34a); color: #0a0908; }
.btn-ghost { background: var(--slate); border: 1px solid var(--line); color: var(--sand); }
.wide { width: 100%; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.mb { margin-bottom: 12px; }
.muted { color: var(--muted); font-size: 0.86rem; line-height: 1.45; }
.center { text-align: center; }
.linkish { color: var(--sand); font-weight: 700; font-size: 0.88rem; }

.field { margin-bottom: 12px; }
.field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: #0a0908;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 12px;
  color: #faf7f2;
}

.cut-card {
  background: linear-gradient(160deg, #1a1408, #141210);
  color: #fff;
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(232, 196, 104, 0.22);
}
.cut-card .lbl { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7; }
.cut-card .num { font-family: var(--serif); font-size: 1.8rem; margin: 4px 0; color: var(--lime); }
.cut-mix { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.cut-mix div {
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 10px;
}
.cut-mix b { display: block; font-size: 1.05rem; }
.cut-mix span { font-size: 0.72rem; opacity: 0.75; }

.mixbar {
  display: flex;
  height: 10px;
  border-radius: 99px;
  overflow: hidden;
  background: #292524;
  margin: 8px 0 14px;
}
.mixbar i { display: block; height: 100%; }
.mixbar .v { background: var(--viator); }
.mixbar .d { background: var(--lime); }

.banner {
  background: rgba(184, 242, 74, 0.08);
  border: 1px solid rgba(184, 242, 74, 0.28);
  color: var(--lime);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.8rem;
  margin-bottom: 12px;
}
.banner a { font-weight: 800; color: var(--sand); }

.toast {
  position: absolute;
  left: 16px; right: 16px;
  bottom: calc(var(--tab-h) + var(--safe-b) + 12px);
  background: var(--sand);
  color: #0a0908;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: 0.25s;
  z-index: 30;
}
.toast.show { opacity: 1; transform: none; }

.review {
  background: var(--slate);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
}
.stars { color: var(--sand); letter-spacing: 1px; font-size: 0.85rem; }
.review p { font-size: 0.88rem; margin: 6px 0; }
.review small { color: var(--muted); }

.visit-card {
  display: flex;
  gap: 12px;
  background: var(--slate);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 8px;
}
.visit-card .g { font-size: 1.2rem; }
.visit-card h3 { font-size: 0.9rem; }
.visit-card p { color: var(--muted); font-size: 0.82rem; }

.empty {
  text-align: center;
  padding: 28px 12px;
  background: var(--slate);
  border-radius: 16px;
  border: 1px dashed var(--line);
}

.desk-note {
  background: var(--slate);
  border-left: 3px solid var(--lime);
  padding: 10px 12px;
  border-radius: 0 12px 12px 0;
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.price-lg {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--sand);
  margin: 6px 0;
}

.waiver {
  background: var(--slate);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  font-size: 0.8rem;
  color: var(--muted);
  max-height: 140px;
  overflow: auto;
  margin-bottom: 10px;
}

.confirm {
  background: rgba(184, 242, 74, 0.1);
  border: 1px solid rgba(184, 242, 74, 0.3);
  color: #ecfccb;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}
.confirm h3 { font-family: var(--serif); margin-bottom: 4px; }

.confirm .code {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--lime);
  margin: 8px 0 4px;
}
