:root {
  color-scheme: dark;
  --ink: #f7f2e8;
  --muted: #c7bda8;
  --panel: rgba(16, 25, 23, 0.9);
  --line: rgba(247, 242, 232, 0.18);
  --gold: #d8b86a;
  --wine: #67152b;
  --leaf: #1f6a5c;
  --paper: #f4ead7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(103, 21, 43, 0.86), rgba(14, 21, 20, 0.96) 54%),
    radial-gradient(circle at 72% 28%, rgba(216, 184, 106, 0.34), transparent 32%),
    #0e1514;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.kiosk-shell {
  width: min(100vw, 1080px);
  height: 100vh;
  min-height: 720px;
  margin: 0 auto;
  position: relative;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.panel {
  display: none;
  height: 100%;
  padding: clamp(28px, 6vh, 76px) clamp(24px, 6vw, 72px);
}

.panel.active {
  display: flex;
  flex-direction: column;
}

.welcome {
  justify-content: center;
  gap: 24px;
}

.brand-mark {
  width: fit-content;
  padding: 10px 14px;
  border: 1px solid rgba(216, 184, 106, 0.6);
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 18px;
}

.event-kicker,
.step {
  margin: 0;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

h1,
h2 {
  margin: 0;
  max-width: 850px;
  letter-spacing: 0;
  line-height: 0.96;
}

h1 {
  font-size: clamp(58px, 9vh, 118px);
}

h2 {
  font-size: clamp(38px, 5.8vh, 74px);
}

.intro {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(20px, 2.4vh, 30px);
  line-height: 1.35;
}

.age-check,
.consent {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  align-items: start;
  color: var(--paper);
  font-size: clamp(18px, 2vh, 24px);
  line-height: 1.25;
}

input[type="checkbox"] {
  width: 28px;
  height: 28px;
  accent-color: var(--gold);
}

.primary,
button {
  min-height: 74px;
  border: 1px solid rgba(216, 184, 106, 0.56);
  border-radius: 8px;
  padding: 0 28px;
  background: rgba(244, 234, 215, 0.08);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  font-size: clamp(20px, 2.2vh, 28px);
}

.primary {
  background: linear-gradient(135deg, var(--gold), #f5df9a);
  color: #20140a;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.lead,
.camera,
.preview,
.ambassador {
  gap: 28px;
}

.lead-form,
.chat-form {
  display: grid;
  gap: 18px;
  margin-top: 10px;
}

input,
select {
  width: 100%;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 22px;
  background: rgba(244, 234, 215, 0.1);
  color: var(--ink);
  font-size: clamp(20px, 2.2vh, 28px);
}

select option {
  color: #111;
}

.camera-stage {
  position: relative;
  width: min(100%, 760px);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #060808;
}

video,
#photoCanvas,
#finalCanvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#photoCanvas {
  display: none;
}

#finalCanvas {
  display: block;
  max-height: 62vh;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.camera-overlay {
  position: absolute;
  inset: auto 20px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.46);
  color: var(--paper);
}

.camera-overlay strong {
  color: var(--gold);
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: min(100%, 760px);
}

.avatar {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 2px solid rgba(216, 184, 106, 0.62);
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(216, 184, 106, 0.22), rgba(31, 106, 92, 0.28));
}

.avatar span {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--wine));
  animation: pulse 1.6s infinite ease-in-out;
}

.chat-log {
  flex: 1;
  min-height: 160px;
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--paper);
  font-size: clamp(18px, 2vh, 24px);
  line-height: 1.35;
}

.chat-log p {
  margin: 0 0 16px;
}

.chat-form {
  grid-template-columns: 1fr auto;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.92);
  }
  50% {
    transform: scale(1.08);
  }
}

@media (max-width: 720px) {
  body {
    overflow: auto;
  }

  .kiosk-shell {
    min-height: 100vh;
    height: auto;
  }

  .panel {
    min-height: 100vh;
  }

  .toolbar,
  .chat-form {
    grid-template-columns: 1fr;
  }
}
