:root {
  --ink: #16080b;
  --wine: #6e1322;
  --blood: #b31b2c;
  --gold: #d4a017;
  --gold-dim: #9a7710;
  --cream: #f4ead6;
  --paper: #fff8ea;
  --muted: #8a7463;
  --line: rgba(212, 160, 23, 0.28);
  --reserved: #e08a1a;
  --sold: #3b1016;
  --ok: #1d6a48;
  --shadow: 0 18px 50px rgba(22, 8, 11, 0.35);
  --font-serif: "Fraunces", "Times New Roman", serif;
  --font-sans: "Manrope", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--cream);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(212, 160, 23, 0.16), transparent 50%),
    radial-gradient(900px 500px at 110% 10%, rgba(179, 27, 44, 0.22), transparent 45%),
    linear-gradient(180deg, #2a0c12 0%, var(--ink) 55%, #0d0608 100%);
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 7vw;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 4, 6, 0.55);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand small {
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-size: 10px;
}
.brand strong {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
}
.nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.nav button, .btn {
  appearance: none;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--cream);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.btn-solid { background: var(--gold); color: var(--ink); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-ghost { border-color: transparent; color: var(--cream); }

.wrap { width: min(1180px, 92vw); margin: 0 auto; padding: 36px 0 80px; }
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(34px, 6vw, 68px);
  line-height: 0.95;
  margin: 12px 0 16px;
}
.kicker {
  color: var(--gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
}
.lede { max-width: 58ch; color: #e8d7be; font-size: 18px; }

.panel {
  background: rgba(255, 248, 234, 0.04);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card {
  background: var(--paper);
  color: var(--ink);
  border-radius: 18px;
  padding: 18px;
}
.card h3 { font-family: var(--font-serif); margin: 0 0 8px; }
.muted { color: var(--muted); }

form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 13px; color: #e8d7be; }
input, select, textarea {
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.25);
  color: var(--cream);
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
}
.card input, .card select, .card textarea { background: #fff; color: var(--ink); border-color: #e4d3b2; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.flash {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(179, 27, 44, 0.2);
  border: 1px solid rgba(179, 27, 44, 0.45);
}
.flash.ok { background: rgba(29, 106, 72, 0.2); border-color: rgba(29, 106, 72, 0.5); }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.legend i {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: -1px;
}
.lg-free { background: var(--paper); border: 1px solid var(--gold-dim); }
.lg-res { background: var(--reserved); }
.lg-sold { background: var(--sold); }
.lg-mine { background: var(--gold); }

.ticket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
  gap: 6px;
}
.cell {
  min-height: 46px;
  border-radius: 8px;
  border: 1px dashed var(--gold-dim);
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
}
.cell.reserved { background: var(--reserved); color: #1a0a0c; border-style: solid; }
.cell.sold { background: var(--sold); color: #c9a7a7; cursor: not-allowed; border-color: #2a0c12; }
.cell.mine {
  background: var(--gold);
  box-shadow: 0 0 0 2px #fff3c4 inset;
  animation: pulse 1.4s ease-in-out infinite;
}
.cell small {
  position: absolute;
  bottom: 3px;
  font-size: 9px;
  font-weight: 700;
}
@keyframes pulse {
  50% { transform: translateY(-1px); }
}

.countdown {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--gold);
}
.finance dt { color: var(--muted); font-size: 12px; }
.finance dd { margin: 0 0 10px; font-weight: 800; }
.two-col { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 22px; }
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
  .app-header { padding: 14px 4vw; }
}
