:root {
  --brown: #5d372a;
  --brown-2: rgba(93, 55, 42, 0.72);
  --teal: #4c9e86;
  --orange: #e8743b;
  --green-dark: #1f3d33;
  --cream: #f6f1ea;
  --line: #e8dfd4;
  --panel-w: 430px;
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  color: var(--brown);
  background: #fff;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3 { font-family: 'Geologica', sans-serif; font-weight: 500; }

.announce { background: var(--green-dark); color: #fff; text-align: center; font-size: 13px; padding: 7px 10px; flex: none; }
.topbar { height: 62px; display: flex; align-items: center; justify-content: center; position: relative; border-bottom: 1px solid var(--line); flex: none; }
.brand { font-family: 'Geologica', sans-serif; font-weight: 600; font-size: 30px; letter-spacing: -0.03em; color: var(--orange); text-decoration: none; }
.pill { position: absolute; right: 22px; font-size: 12px; border: 1px solid var(--brown-2); border-radius: 99px; padding: 4px 12px; }

.layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr var(--panel-w); }
.stage { position: relative; min-height: 0; overflow: hidden; background: radial-gradient(120% 90% at 50% 35%, #fbf8f3 0%, #efe6da 70%, #e6dccd 100%); }
model-viewer { width: 100%; height: 100%; --poster-color: transparent; background: transparent; }
model-viewer::part(default-progress-bar) { display: none; }

.powered { position: absolute; top: 18px; left: 18px; display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px 10px 13px; border-radius: 99px;
  background: rgba(31, 24, 20, 0.88); color: #fff; text-decoration: none; font-size: 14px; backdrop-filter: blur(10px); box-shadow: 0 8px 26px rgba(0,0,0,0.2); z-index: 3; }
.powered strong { font-weight: 600; }
.powered svg { width: 15px; height: 15px; opacity: 0.8; }
.powered-dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.25); }

.stage-title { position: absolute; left: 24px; bottom: 24px; z-index: 2; pointer-events: none; }
.stage-title h1 { margin: 0 0 2px; font-size: 30px; letter-spacing: -0.01em; color: var(--brown); }
.stage-title p { margin: 0; font-size: 15px; color: var(--brown-2); }

.stage-tools { position: absolute; top: 18px; right: 18px; display: flex; gap: 8px; z-index: 2; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 99px; border: 1px solid rgba(93,55,42,0.15); background: rgba(255,255,255,0.8); backdrop-filter: blur(8px); font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--brown); color: #fff; border-color: var(--brown); }

.ar-btn { position: absolute; right: 22px; bottom: 22px; z-index: 2; display: inline-flex; align-items: center; gap: 9px; height: 50px; padding: 0 22px; border-radius: 99px; border: 0;
  background: var(--teal); color: #fff; font-size: 15.5px; font-weight: 500; box-shadow: 0 10px 26px rgba(76,158,134,0.35); }
.ar-btn:hover { filter: brightness(1.05); }

.dim { background: #fff; color: var(--brown); font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 99px; box-shadow: 0 2px 10px rgba(0,0,0,0.12); border: 0; white-space: nowrap; }

.loader { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; background: #f6f1ea; z-index: 5; transition: opacity 0.5s; color: var(--brown-2); font-size: 14px; }
.loader.done { opacity: 0; pointer-events: none; }
.spin { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--orange); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.panel { border-left: 1px solid var(--line); min-height: 0; display: flex; flex-direction: column; background: #fff; }
.panel-scroll { overflow-y: auto; padding: 26px 28px 20px; flex: 1; }
.rating { color: #f2a33a; font-size: 15px; letter-spacing: 1px; }
.rating span { color: var(--brown-2); letter-spacing: 0; font-size: 13.5px; margin-left: 4px; }
.panel h2 { font-size: 30px; margin: 6px 0 6px; line-height: 1.1; letter-spacing: -0.01em; }
.panel h2 small { display: block; font-size: 16px; font-weight: 400; color: var(--brown-2); margin-top: 3px; }
.lead { margin: 0; font-size: 15px; line-height: 1.5; color: var(--brown-2); }
.block { margin-top: 24px; }
.block > header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; gap: 10px; }
.block h3 { margin: 0; font-size: 16px; }
.block > header span { font-size: 13.5px; color: var(--brown-2); text-align: right; }

.swatches { display: flex; gap: 12px; }
.swatch { width: 44px; height: 44px; border-radius: 50%; border: 0; position: relative; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1); }
.swatch[aria-checked="true"]::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--brown); }

.sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sizes button, .toggle2 button, .toggle3 button { padding: 10px 8px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 14.5px; line-height: 1.2; transition: border-color 0.15s; }
.sizes button small { display: block; font-size: 12px; color: var(--brown-2); margin-top: 2px; }
.sizes button[aria-checked="true"], .toggle2 button[aria-pressed="true"], .toggle3 button[aria-pressed="true"] { border-color: var(--brown); background: #fbf6f0; box-shadow: inset 0 0 0 1px var(--brown); }
.sizes button:hover, .toggle2 button:hover, .toggle3 button:hover { border-color: #cdb9a6; }
.toggle2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.toggle3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
button.soldout { opacity: 0.55; }
.deal { margin: 10px 0 0; font-size: 14px; line-height: 1.45; padding: 10px 12px; border-radius: 12px; background: #eef7f3; color: #2c6b58; }
.deal:empty { display: none; }
.colophon { margin: 24px 0 0; font-size: 12.5px; color: var(--brown-2); line-height: 1.5; }

.summary { border-top: 1px solid var(--line); padding: 16px 28px 20px; background: #fff; }
.price-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.price { margin: 0; font-family: 'Geologica', sans-serif; font-size: 26px; font-weight: 500; }
.price s { font-size: 16px; color: var(--brown-2); font-weight: 400; }
.meta { margin: 2px 0 0; font-size: 13px; color: var(--brown-2); }
.save { background: #1f3d33; color: #fff; font-size: 12.5px; padding: 5px 10px; border-radius: 99px; white-space: nowrap; }
.buy { width: 100%; height: 52px; border: 0; border-radius: 12px; background: var(--orange); color: #fff; font-size: 16px; font-weight: 500; }
.buy:disabled { background: #c9b8a8; cursor: not-allowed; }

.modal { border: 0; border-radius: 20px; padding: 28px; width: min(400px, 92vw); text-align: center; color: var(--brown); }
.modal::backdrop { background: rgba(30, 20, 15, 0.45); }
.modal h2 { margin: 4px 0 8px; }
.modal .eyebrow { margin: 0; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brown-2); }
.muted { color: var(--brown-2); font-size: 14.5px; line-height: 1.5; }
.close { position: absolute; top: 8px; right: 12px; }
.close button { border: 0; background: none; font-size: 26px; }
.qr { width: 200px; margin: 16px auto 0; }
.qr svg { width: 100%; height: auto; stroke: none; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); background: var(--brown); color: #fff; padding: 11px 18px; border-radius: 99px; font-size: 14px; opacity: 0; transition: 0.25s; pointer-events: none; z-index: 10; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .layout { display: flex; flex-direction: column; overflow-y: auto; }
  .stage { height: 60vh; flex: none; }
  .panel { border-left: 0; }
  .panel-scroll { overflow: visible; padding: 20px 18px; }
  .summary { position: sticky; bottom: 0; padding: 12px 18px 16px; }
  .stage-title { left: 16px; bottom: 76px; }
  .stage-title h1 { font-size: 22px; }
  .ar-btn { left: 14px; right: 14px; bottom: 14px; justify-content: center; }
  .stage-tools { top: 64px; right: 12px; }
  .powered { top: 12px; left: 12px; font-size: 13px; }
  .pill { right: 12px; }
}
