:root {
  --ink: #15120f;
  --panel: rgba(21, 18, 14, 0.80);
  --line: rgba(232, 214, 186, 0.16);
  --cream: #f3eadb;
  --muted: #b3a58f;
  --honey: #dcb77e;
  --honey-deep: #c19a5b;
  --serif: "Baskerville", "Libre Baskerville", "Baskerville Old Face", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: var(--ink); color: var(--cream);
  font-family: var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
#stage { position: fixed; inset: 0; touch-action: none; }
#stage canvas { display: block; width: 100%; height: 100%; outline: none; cursor: grab; }
#stage.grabbing canvas { cursor: grabbing; }

/* header */
.top {
  position: fixed; left: 0; right: 0; top: 0; z-index: 5; pointer-events: none;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: calc(14px + var(--safe-top)) 16px 0;
}
.brand { pointer-events: none; text-shadow: 0 1px 12px rgba(0, 0, 0, .5); }
.wordmark { font-family: var(--serif); letter-spacing: .34em; font-size: 17px; font-weight: 600; color: var(--cream); }
.wordmark.big { font-size: 26px; letter-spacing: .36em; }
.sub { margin-top: 5px; font-size: 10.5px; letter-spacing: .28em; text-transform: uppercase; color: var(--honey); }
.top-actions { pointer-events: auto; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(21, 18, 14, .55); border: 1px solid var(--line); color: var(--cream);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.small { width: 36px; height: 36px; flex: none; }
.icon-btn.small svg { width: 18px; height: 18px; }
.icon-btn:focus-visible, .btn:focus-visible, .tabs button:focus-visible { outline: 2px solid var(--honey); outline-offset: 2px; }

/* hint */
.hint {
  position: fixed; z-index: 4; left: 50%; top: calc(64px + var(--safe-top)); transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 8px 14px; border-radius: 999px; font-size: 12px; line-height: 1.35;
  text-align: center; color: var(--cream); background: rgba(21, 18, 14, .62); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: opacity .6s ease, transform .6s ease;
  pointer-events: none;
}
.hint.gone { opacity: 0; transform: translate(-50%, -8px); }

/* hotspots */
#hotspots { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
.hotspot {
  position: absolute; left: 0; top: 0; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%;
  display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity .25s ease;
}
.hotspot.on { opacity: 1; pointer-events: auto; }
.hotspot span {
  width: 12px; height: 12px; border-radius: 50%; background: var(--cream); box-shadow: 0 0 0 4px rgba(243, 234, 219, .28), 0 2px 10px rgba(0, 0, 0, .45);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(243, 234, 219, .28), 0 2px 10px rgba(0, 0, 0, .45); } 50% { box-shadow: 0 0 0 8px rgba(243, 234, 219, .10), 0 2px 10px rgba(0, 0, 0, .45); } }

/* caption */
.caption {
  position: fixed; z-index: 6; left: 16px; right: 16px; top: calc(64px + var(--safe-top));
  padding: 14px 44px 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .3s ease, transform .3s ease;
}
.caption.on { opacity: 1; transform: none; pointer-events: auto; }
.cap-title { font-family: var(--serif); font-size: 18px; color: var(--cream); }
.cap-text { margin-top: 4px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.cap-close { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; display: grid; place-items: center; color: var(--muted); }
.cap-close svg { width: 18px; height: 18px; }

/* product sheet */
.sheet {
  position: fixed; z-index: 5; left: 0; right: 0; bottom: 0;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  background: linear-gradient(to bottom, rgba(21, 18, 14, .0), rgba(21, 18, 14, .86) 18%, rgba(21, 18, 14, .96));
}
.sheet-row { display: flex; align-items: center; gap: 10px; }
.tabs {
  flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px;
  background: rgba(243, 234, 219, .07); border: 1px solid var(--line); border-radius: 999px;
}
.tabs button {
  height: 32px; border-radius: 999px; font-size: 13px; letter-spacing: .04em; color: var(--muted);
  transition: background .25s ease, color .25s ease;
}
.tabs button[aria-selected="true"] { background: var(--cream); color: var(--ink); font-weight: 600; }
.product { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 14px; }
.p-number { font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--honey); }
.p-title { margin: 6px 0 0; font-family: var(--serif); font-weight: 400; font-size: 23px; line-height: 1.15; color: var(--cream); }
.p-line { margin: 6px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.p-price { font-family: var(--serif); font-size: 21px; color: var(--cream); white-space: nowrap; padding-bottom: 2px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 48px; padding: 0 20px;
  border-radius: 999px; font-size: 15px; font-weight: 600; letter-spacing: .02em;
}
.btn svg { width: 20px; height: 20px; }
.btn.primary { background: var(--honey); color: var(--ink); }
.btn.primary:active { background: var(--honey-deep); }
.btn.ar { width: 100%; margin-top: 14px; }
.note { margin: 10px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--muted); text-align: center; }
.disclaimer { margin: 6px 0 0; font-size: 10.5px; line-height: 1.4; color: rgba(179, 165, 143, .75); text-align: center; }

/* modal */
.modal {
  position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px;
  background: rgba(10, 8, 6, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.modal.on { opacity: 1; pointer-events: auto; }
.modal-card {
  position: relative; width: min(420px, 100%); padding: 24px 22px 22px; border-radius: 18px;
  background: #1c1813; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.modal-card h2 { margin: 0 32px 0 0; font-family: var(--serif); font-weight: 400; font-size: 22px; }
.modal-card p { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.modal-card p.small { font-size: 12px; }
.modal-card strong { color: var(--cream); font-weight: 600; }
.modal-card .btn { width: 100%; margin-top: 18px; }
.qr { margin: 18px auto 0; width: 220px; height: 220px; border-radius: 12px; overflow: hidden; }
.qr svg { display: block; width: 100%; height: 100%; }

/* loader */
.loader {
  position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: var(--ink);
  transition: opacity .7s ease, visibility .7s ease;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; }
.loader-track { width: 180px; height: 1px; margin: 28px auto 0; background: rgba(243, 234, 219, .14); overflow: hidden; }
.loader-bar { height: 100%; background: var(--honey); transform-origin: left; transform: scaleX(0); transition: transform .3s ease; }
.loader-pct { margin-top: 10px; font-size: 11px; letter-spacing: .2em; color: var(--muted); }
.noscript { position: fixed; inset: 0; display: grid; place-items: center; color: var(--cream); }

/* wide screens: the sheet becomes a card on the left */
@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .top { padding: 24px 28px 0; }
  .wordmark { font-size: 19px; }
  .sheet {
    left: 28px; right: auto; bottom: 28px; width: 380px; padding: 16px 18px 18px; border-radius: 18px;
    background: var(--panel); border: 1px solid var(--line); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  }
  .note, .disclaimer { text-align: left; }
  .caption { left: auto; right: 28px; top: 90px; width: 340px; }
  .hint { top: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .hotspot span { animation: none; }
  .hint, .caption, .modal, .loader { transition: none; }
}
