/* THe Concord kiosk — landscape tablet first (1024–1366 wide), still usable in portrait. */
:root {
  --taupe: #C1B4A4;
  --taupe-2: #D8CEC1;
  --cream: #F2EDE5;
  --paper: #FBF8F3;
  --ink: #2E302F;
  --ink-2: #5E5B56;
  --ink-3: #8C8882;
  --forest: #24382D;
  --forest-2: #3B5545;
  --sage: #737D6F;
  --brass: #9A7438;
  --fast-bg: #F4E4C1;
  --fast-ink: #6B4A12;
  --free-bg: #DDE7DA;
  --free-ink: #2F4A36;
  --radius: 22px;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Jost', 'Futura', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --pad: clamp(16px, 2.6vw, 36px);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--cream); color: var(--ink); }
body {
  font: 400 clamp(17px, 1.55vw, 21px)/1.4 var(--sans);
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
img { -webkit-user-drag: none; user-select: none; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; line-height: 1.05; letter-spacing: -0.005em; }
h1 { font-size: clamp(34px, 4.1vw, 56px); }
#app { min-height: 100dvh; display: flex; flex-direction: column; }

/* ---------- buttons ---------- */
.btn {
  border: 0; border-radius: 999px; padding: 0.85em 1.6em; min-height: 60px;
  font-weight: 500; letter-spacing: 0.02em; transition: transform .12s ease, background .2s ease;
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--forest); color: #fff; }
.btn.primary:active { background: var(--forest-2); }
.btn.outline { background: transparent; border: 2px solid var(--ink); }
.btn.ghost { background: transparent; color: var(--ink-2); min-height: 52px; padding: 0.6em 1.1em; }
.pulse { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(36, 56, 45, .35); } 50% { box-shadow: 0 0 0 18px rgba(36, 56, 45, 0); } }

/* ---------- header bar ---------- */
.bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 8px var(--pad); background: var(--taupe); min-height: 68px; position: sticky; top: 0; z-index: 5;
}
.bar-brand { display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 4px; justify-self: start; }
.bar-logo { width: 52px; height: 52px; border-radius: 50%; }
.bar-brand span { font-family: var(--serif); font-size: 26px; font-weight: 600; }
.bar-actions { justify-self: end; display: flex; gap: 4px; }
.progress { display: flex; gap: 10px; }
.progress i { width: 34px; height: 6px; border-radius: 3px; background: rgba(46, 48, 47, .2); }
.progress i.on { background: var(--ink); }

/* ---------- attract ---------- */
.attract { position: relative; flex: 1; min-height: 100dvh; overflow: hidden; cursor: pointer; }
.panel { position: absolute; inset: 0; transition: opacity 1.2s ease; }
.panel-logo {
  background: var(--taupe); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.4vh; opacity: 1;
}
.panel-explain { background: var(--paper); opacity: 0; pointer-events: none; display: grid; grid-template-columns: 1.15fr 1fr; }
.attract.show-explain .panel-logo { opacity: 0; pointer-events: none; }
.attract.show-explain .panel-explain { opacity: 1; pointer-events: auto; }
.big-logo { width: min(46vh, 44vw); height: auto; }
.wordmark { font-family: var(--sans); font-weight: 500; font-size: clamp(22px, 2.6vw, 34px); letter-spacing: 0.32em; margin-top: 1vh; }
.tagline { font-size: clamp(14px, 1.3vw, 18px); letter-spacing: 0.42em; color: var(--ink-2); }
.logo-sub { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.2vw, 30px); margin-top: 0.6vh; }
.tap-hint {
  position: absolute; bottom: 5vh; font-size: clamp(16px, 1.5vw, 20px); letter-spacing: 0.2em; text-transform: uppercase;
  animation: breathe 2.8s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.explain-text { padding: 6vh 4vw 4vh 5vw; display: flex; flex-direction: column; justify-content: center; gap: 2.2vh; }
.explain-text h1 { font-size: clamp(40px, 4.8vw, 68px); }
.example { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(24px, 2.4vw, 34px); color: var(--brass); }
.subhead { margin: 0; font-size: clamp(19px, 1.8vw, 25px); color: var(--ink-2); max-width: 30em; }
.steps { list-style: none; padding: 0; margin: 0.6vh 0; display: flex; gap: 14px; }
.steps li { flex: 1; display: flex; gap: 10px; align-items: center; background: var(--cream); border-radius: 16px; padding: 12px 14px; font-size: clamp(15px, 1.3vw, 18px); line-height: 1.2; }
.steps b { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 500; }
.cta { align-self: flex-start; font-size: clamp(20px, 1.9vw, 26px); padding: 0.9em 2em; min-height: 76px; text-transform: uppercase; letter-spacing: 0.08em; }
.secondary { display: flex; gap: 12px; flex-wrap: wrap; }
.id-note { margin: 0; color: var(--ink-3); font-size: 0.85em; }
.explain-photo { padding: 3vh 3vh 3vh 0; }
.explain-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 28px; display: block; }
.hotspot { position: absolute; top: 0; left: 0; width: 90px; height: 90px; z-index: 3; }

/* ---------- questions ---------- */
.question { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 4vh; padding: 3vh var(--pad) 5vh; text-align: center; }
.options { display: grid; gap: clamp(12px, 1.6vw, 22px); }
.options.grid4 { grid-template-columns: repeat(4, 1fr); }
.options.grid4.n5 { grid-template-columns: repeat(5, 1fr); }
.options.grid4.n3, .options.wide.n3 { grid-template-columns: repeat(3, 1fr); }
.options.grid4.n2, .options.wide.n2 { grid-template-columns: repeat(2, minmax(0, 420px)); justify-content: center; }
.option {
  background: var(--paper); border: 2px solid var(--taupe-2); border-radius: var(--radius);
  min-height: clamp(150px, 24vh, 230px); padding: 18px 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  transition: transform .12s ease, border-color .2s ease, background .2s ease;
}
.option:active { transform: scale(0.97); border-color: var(--ink); background: var(--cream); }
.option-icon { font-size: clamp(38px, 4vw, 54px); width: 1.7em; height: 1.7em; display: grid; place-items: center; background: var(--cream); border-radius: 50%; line-height: 1; }
.option-label { font-family: var(--serif); font-weight: 600; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.05; }
.option-sub { color: var(--ink-2); font-size: 0.92em; }

/* ---------- results ---------- */
.results { flex: 1; padding: 1.6vh var(--pad) 1.2vh; display: flex; flex-direction: column; gap: 1.2vh; }
.results h1 { font-size: clamp(30px, 3.3vw, 46px); }
.results-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.results-head p { margin: 0; color: var(--ink-2); }
.cards { flex: 1; display: grid; gap: clamp(12px, 1.4vw, 20px); grid-template-columns: 1.2fr 1fr 1fr; align-items: stretch; }
.cards.n2 { grid-template-columns: 1.2fr 1fr; }
.cards.n1 { grid-template-columns: minmax(0, 620px); justify-content: center; }
.card { position: relative; background: var(--paper); border: 2px solid var(--taupe-2); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.card.lead { border-color: var(--ink); }
.role { position: absolute; top: 12px; left: 12px; z-index: 1; background: var(--ink); color: #fff; font-size: 0.8em; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; }
.card.fast .role { background: var(--fast-bg); color: var(--fast-ink); }
.card.also .role { background: var(--taupe-2); color: var(--ink); }
.card-img { height: clamp(96px, 15vh, 170px); background: #fff; padding: 8px; flex: none; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.card-body { padding: 10px 14px 4px; display: flex; flex-direction: column; gap: 5px; flex: 1; font-size: 0.93em; line-height: 1.3; }
.card h2 { font-size: clamp(21px, 1.9vw, 28px); }
.card.lead h2 { font-size: clamp(23px, 2.2vw, 32px); }
.pcard-brand { margin: 0; font-size: 0.78em; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.variant-name { margin: 0; font-weight: 500; color: var(--forest-2); }
.card-price, .product-price { margin: 0; font-weight: 600; }
.card-price span, .product-price span { font-weight: 400; color: var(--ink-2); font-size: 0.88em; }
.smaller { margin: 0; font-size: 0.85em; color: var(--ink-2); }
.why { margin: 2px 0; line-height: 1.3; }
.dose { background: var(--cream); border-radius: 12px; padding: 6px 12px; display: flex; flex-direction: column; }
.dose b { font-size: 0.78em; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); font-weight: 500; }
.dose span { font-weight: 500; }
.onset { margin: 0; font-size: 0.9em; color: var(--ink-2); }
.onset.fast { color: var(--fast-ink); font-weight: 500; }
.tip { margin: 0; font-size: 0.82em; color: var(--ink-3); }
.choose { margin: 6px 12px 12px; min-height: 54px; }
.disclaimer { margin: 0; font-size: 11px; line-height: 1.3; color: var(--ink-3); }

/* ---------- confirm ---------- */
.confirm { flex: 1; display: grid; grid-template-columns: minmax(0, 0.8fr) 1fr; gap: 5vw; align-items: center; padding: 6vh 7vw; background: var(--taupe); }
.confirm-img { width: 100%; max-height: 70vh; object-fit: contain; background: #fff; border-radius: 28px; padding: 24px; }
.confirm h1 { font-size: clamp(44px, 5vw, 72px); }
.confirm-line { margin: 2vh 0 0.5vh; font-size: 1.1em; letter-spacing: 0.14em; text-transform: uppercase; }
.confirm-name { margin: 0 0 2vh; font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 3.6vw, 50px); line-height: 1.05; }
.confirm-name span { font-size: 0.7em; color: var(--forest-2); }
.confirm-dose { font-size: 1.1em; }
.confirm .btn { margin-top: 2vh; min-width: 200px; }

/* ---------- browse / product / learn ---------- */
.browse, .learn { flex: 1; padding: 2.4vh var(--pad) 3vh; display: flex; flex-direction: column; gap: 2vh; }
.browse-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.intro { margin: 0; color: var(--ink-2); max-width: 52em; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile { background: var(--paper); border: 2px solid var(--taupe-2); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tile img { width: 100%; height: clamp(110px, 18vh, 170px); object-fit: contain; background: #fff; border-radius: 14px; }
.tile-name { font-family: var(--serif); font-weight: 600; font-size: clamp(22px, 2vw, 28px); }
.tile-count { color: var(--ink-3); font-size: 0.85em; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.pcard { background: var(--paper); border: 2px solid var(--taupe-2); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 4px; text-align: left; }
.pcard-img { display: block; height: 160px; background: #fff; border-radius: 14px; padding: 8px; margin-bottom: 6px; overflow: hidden; }
.pcard-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pcard-name { font-weight: 500; line-height: 1.2; }
.pcard-price { font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 0.78em; padding: 4px 10px; border-radius: 999px; background: var(--cream); color: var(--ink-2); font-weight: 500; }
.chip.fast { background: var(--fast-bg); color: var(--fast-ink); }
.chip.free { background: var(--free-bg); color: var(--free-ink); }
.product { flex: 1; display: grid; grid-template-columns: minmax(0, 0.85fr) 1.15fr; gap: 3vw; padding: 3vh var(--pad); align-items: start; }
.product-img { background: #fff; border-radius: 28px; padding: 20px; display: grid; place-items: center; position: sticky; top: 100px; }
.product-img img { width: 100%; max-height: 62vh; object-fit: contain; }
.product-info { display: flex; flex-direction: column; gap: 12px; }
.product-info h1 { font-size: clamp(32px, 3.4vw, 46px); }
.variants { display: flex; flex-wrap: wrap; gap: 8px; }
.variant { border: 2px solid var(--taupe-2); background: var(--paper); border-radius: 999px; padding: 10px 16px; min-height: 52px; }
.variant.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.desc { margin: 0; line-height: 1.45; }
.ask { margin: 8px 0 0; padding: 14px 18px; background: var(--taupe); border-radius: 16px; }
.mush { display: flex; flex-direction: column; gap: 10px; }
.mush h2 { font-size: 30px; }
.ladder { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ladder li { background: var(--paper); border-left: 6px solid var(--sage); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; }
.ladder li.caution { border-left-color: #A4483A; }
.note { margin: 0; font-size: 0.85em; color: var(--ink-2); }
.safety { background: #F7E6DF; border-radius: 16px; padding: 14px 18px; }
.safety h3 { font-size: 24px; margin-bottom: 4px; }
.safety ul { margin: 0; padding-left: 1.2em; }
.learn-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.lcard { background: var(--paper); border: 2px solid var(--taupe-2); border-radius: 18px; padding: 14px 16px; }
.lcard h2 { font-size: 28px; margin-bottom: 4px; }
.lcard p { margin: 0; color: var(--ink-2); line-height: 1.35; }
.faq-title { font-size: 34px; margin-top: 1vh; }
.faq { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.faq-item { background: var(--paper); border-radius: 16px; padding: 14px 16px; }
.faq-item h3 { font-size: 24px; margin-bottom: 4px; }
.faq-item p { margin: 0; color: var(--ink-2); }

/* ---------- overlays ---------- */
#overlay { position: fixed; inset: 0; background: rgba(46, 48, 47, .55); display: grid; place-items: center; z-index: 50; }
#overlay[hidden] { display: none; }
.modal { background: var(--paper); border-radius: 28px; padding: 36px 44px; min-width: min(520px, 90vw); max-width: 90vw; text-align: center; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.modal h2 { font-size: 44px; }
.modal p { margin: 0; }
.pin-dots { font-size: 40px; letter-spacing: 0.3em; min-height: 48px; }
.pinpad { display: grid; grid-template-columns: repeat(3, 88px); gap: 10px; }
.pinpad .btn { min-height: 72px; padding: 0; font-size: 26px; }
.settings { align-items: stretch; text-align: left; }
.muted { color: var(--ink-2); font-size: 0.9em; }
.boot-error { flex: 1; display: grid; place-items: center; align-content: center; gap: 12px; background: var(--taupe); text-align: center; min-height: 100dvh; }
.boot-error img { width: min(40vh, 60vw); }

/* ---------- portrait / small fallbacks ---------- */
@media (orientation: portrait) {
  .panel-explain { grid-template-columns: 1fr; grid-template-rows: 1fr 32vh; }
  .explain-photo { padding: 0 3vh 3vh; }
  .options.grid4 { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr; }
  .tiles, .learn-cards { grid-template-columns: repeat(2, 1fr); }
  .product, .confirm { grid-template-columns: 1fr; }
  .product-img { position: static; }
  .steps { flex-direction: column; }
}
@media (max-width: 760px) {
  .bar-brand span { display: none; }
  .progress i { width: 18px; }
  .faq { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .pulse, .tap-hint { animation: none; }
  .panel { transition: none; }
}
