/* FineFramed Stars. A quiet night room: deep navy, warm paper white, one gold.
   The poster is the bright thing on the page; everything else stays out of its way. */
:root {
  --bg: #080d1c;
  --bg-2: #0e1730;
  --ink: #f1e9d6;
  --ink-2: #a3a9bd;
  --line: rgba(232, 192, 104, 0.22);
  --field: #0b1226;
  --gold: #e8c068;
  --on-gold: #1c1403;
  --error: #ff8f8f;
  --poster-bg: #0c1730;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --text: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
:root[data-mode="light"] {
  --bg: #f4efe4; --bg-2: #ebe4d5; --ink: #151a28; --ink-2: #5b6072; --line: rgba(21, 26, 40, 0.2); --field: #fffdf8;
  --gold: #8a6212; --on-gold: #fffaf0; --error: #b3261e;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { background: var(--bg); transition: background 0.5s; }
body { margin: 0; font: 16px/1.55 var(--text); color: var(--ink); }
[hidden] { display: none !important; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.testbar { margin: 0; padding: 6px 16px; text-align: center; font-size: 13px; color: var(--gold); background: rgba(0, 0, 0, 0.3); }
.top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 20px clamp(16px, 4vw, 48px) 0; }
.brand { font: 400 20px/1 var(--display); letter-spacing: 0.02em; text-decoration: none; }
.brand b { font-weight: 700; color: var(--gold); }
.other { font-size: 14px; color: var(--ink-2); }

main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: clamp(24px, 5vw, 72px); max-width: 1240px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 48px) 64px; align-items: start; }
.stage { position: sticky; top: 24px; display: grid; justify-items: center; gap: 12px; }
.frame { position: relative; width: min(100%, calc((100vh - 96px) * 0.75)); padding: 3%; background: #17181a; box-shadow: 0 40px 70px -28px rgba(0, 0, 0, 0.85); transition: background 0.3s; }
.frame[data-frame="white"] { background: #f4f3ef; box-shadow: 0 40px 70px -28px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.08); }
.frame[data-frame="none"] { padding: 0; background: none; }
.frame img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; background: var(--poster-bg); }
.busy { position: absolute; right: 5%; top: 4%; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--gold); border-top-color: transparent; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .busy { animation: none; } html { transition: none; } }
.stage-note { margin: 0; min-height: 1.4em; font-size: 14px; color: var(--error); text-align: center; }

h1 { margin: 0 0 12px; font: 700 clamp(34px, 4.6vw, 52px)/1.02 var(--display); letter-spacing: -0.03em; }
.lede { margin: 0 0 8px; font-size: 18px; color: var(--ink-2); max-width: 46ch; }
section { padding: 26px 0 4px; border-top: 1px solid var(--line); margin-top: 26px; }
h2 { margin: 0 0 14px; font: 600 20px/1.2 var(--display); letter-spacing: -0.01em; }
label { display: grid; gap: 6px; margin-bottom: 14px; font-size: 14px; color: var(--ink-2); }
input:not([type="checkbox"]), textarea { width: 100%; min-height: 46px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 3px; background: var(--field); color: var(--ink); font-size: 16px; }
textarea { padding: 10px 12px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--gold); outline: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.note { margin: 0 0 14px; font-size: 14px; color: var(--ink-2); }
.results { list-style: none; margin: -8px 0 14px; padding: 4px; border: 1.5px solid var(--line); border-radius: 3px; background: var(--field); }
.results button { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 10px; border: 0; background: none; text-align: left; border-radius: 2px; }
.results button:hover, .results button:focus-visible { background: var(--bg-2); }
.results small { color: var(--ink-2); }
.results .none { padding: 10px; font-size: 14px; color: var(--ink-2); }

.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 16px; }
.theme { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 3px; background: none; font-size: 14px; text-align: left; }
.theme i { flex: none; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 34% 38%, var(--i) 0 1.5px, transparent 2px), radial-gradient(circle at 66% 60%, var(--i) 0 1px, transparent 1.5px), var(--s); box-shadow: 0 0 0 1.5px var(--l), 0 0 0 5px var(--b); margin: 5px; }
.theme[aria-checked="true"], .product[aria-checked="true"], .swatch[aria-checked="true"] { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.switches { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0 12px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; font-size: 15px; color: var(--ink); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--gold); }

.products { display: grid; gap: 8px; margin-bottom: 12px; }
.product { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 3px; background: none; text-align: left; }
.product b { display: block; font-size: 16px; }
.product small { color: var(--ink-2); font-size: 14px; }
.p-price { font-weight: 700; white-space: nowrap; }
.frames { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.swatch { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 14px 4px 8px; border: 1.5px solid var(--line); border-radius: 999px; background: none; font-size: 15px; }
.swatch i { width: 26px; height: 26px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(128, 128, 128, 0.5); }
.ghost { min-height: 46px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 3px; background: none; }
.ghost:hover { border-color: var(--gold); }
#lockerBox { margin-bottom: 14px; }
.locker-chosen { margin: 0 0 8px; }
.locker-chosen b { color: var(--gold); }

.buy { position: sticky; bottom: 0; z-index: 5; margin: 26px calc(-1 * clamp(16px, 4vw, 48px)) 0; padding: 14px clamp(16px, 4vw, 48px) calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); }
.buy-main { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.price span { display: block; font: 700 28px/1 var(--display); color: var(--gold); }
.price small { font-size: 13px; color: var(--ink-2); }
.cta { min-height: 52px; padding: 0 26px; border: 0; border-radius: 3px; background: var(--gold); color: var(--on-gold); font-weight: 700; font-size: 17px; }
.cta:hover { filter: brightness(1.08); }
.cta:disabled { opacity: 0.6; cursor: progress; }
.error { margin: 8px 0 0; min-height: 0; color: var(--error); font-size: 15px; }
.error:empty { display: none; }
.terms { margin: 8px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }

.faq details { border-top: 1px solid var(--line); }
.faq summary { padding: 14px 0; font-weight: 600; cursor: pointer; }
.faq details p { margin: 0 0 16px; color: var(--ink-2); max-width: 60ch; }
footer { margin-top: 32px; font-size: 14px; color: var(--ink-2); }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 8px; }

dialog { max-width: min(520px, calc(100vw - 32px)); padding: 26px; border: 1.5px solid var(--line); border-radius: 4px; background: var(--bg-2); color: var(--ink); }
dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
dialog h3 { margin: 0 0 10px; font: 700 24px/1.15 var(--display); }
.receipt { padding: 10px 12px; border: 1px solid var(--line); border-radius: 3px; }
.actions { margin-top: 16px; }
.locker-dialog { width: min(980px, calc(100vw - 24px)); max-width: none; height: min(760px, calc(100dvh - 24px)); padding: 0; }
.locker-dialog[open] { display: grid; grid-template-rows: auto 1fr; }
.locker-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; }
.locker-map { min-height: 0; background: #fff; }

@media (max-width: 900px) {
  main { grid-template-columns: 1fr; padding-top: 16px; gap: 20px; }
  .stage { position: static; }
  .frame { width: min(78vw, 360px); }
  .lede { font-size: 17px; }
  .buy-main { gap: 10px; }
  .price span { font-size: 24px; }
  .cta { padding: 0 18px; }
  .terms { font-size: 11.5px; }
}
