:root {
  --bg: #f1ece3;
  --paper: #fbf8f2;
  --ink: #2a1f18;
  --ink-2: #57483d;
  --muted: #94877a;
  --line: #e0d6c8;
  --line-2: #ece4d8;
  --accent: #9a5a36;
  --accent-ink: #7a4329;
  --serif: 'Crimson Text', Georgia, serif;
  --display: 'Cinzel', 'Times New Roman', serif;
  --sans: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --panel-w: 420px;
  --top-h: 60px;
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--top-h); z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-2);
}
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { font: 500 19px/1 var(--display); letter-spacing: .22em; }
.brand-sub { font: italic 400 19px/1 var(--serif); color: var(--accent); }
.pill {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted);
}
.top-actions { margin-left: auto; display: flex; gap: 8px; }
.ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--line); border-radius: 99px;
  padding: 8px 14px; font-size: 13px; transition: background .2s, border-color .2s;
}
.ghost:hover { background: var(--paper); border-color: #cfc6b8; }
.ghost svg { width: 16px; height: 16px; }

/* ---------- layout ---------- */
.layout {
  position: fixed; inset: var(--top-h) 0 0 0;
  display: grid; grid-template-columns: 1fr var(--panel-w);
}

/* ---------- stage ---------- */
.stage {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 38%, #faf8f4 0%, #efeae2 55%, #e2dbcf 100%);
  background-size: cover; background-position: center;
}
.stage::after { /* soft floor */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 34%;
  background: linear-gradient(to bottom, transparent, rgba(160, 145, 125, .10));
  pointer-events: none;
}
model-viewer {
  position: absolute; inset: 0; width: 100%; height: 100%;
  --poster-color: transparent;
  --progress-bar-color: transparent;
  outline: none;
  z-index: 1;
}
.stage-title {
  position: absolute; top: 28px; left: 32px; z-index: 2; pointer-events: none;
  transition: opacity .3s;
}
.eyebrow {
  margin: 0 0 6px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.stage-title h1 { margin: 0; font: 500 clamp(26px, 2.8vw, 40px)/1.08 var(--display); letter-spacing: .02em; }
.stage-sub { margin: 6px 0 0; font: italic 400 20px/1.2 var(--serif); color: var(--accent-ink); }
.stage-hint {
  position: absolute; top: 34px; right: 28px; z-index: 2; font-size: 12px; color: var(--muted);
  pointer-events: none; transition: opacity .6s;
}

.toolbar {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 3;
  display: flex; gap: 6px; padding: 6px;
  background: rgba(250, 248, 244, .82); backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .7); border-radius: 99px;
  box-shadow: 0 10px 30px rgba(60, 45, 25, .10), 0 1px 0 rgba(255,255,255,.8) inset;
}
.tool {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  border: 0; background: transparent; padding: 9px 14px; border-radius: 99px; font-size: 13px;
  transition: background .2s, color .2s;
}
.tool svg { width: 18px; height: 18px; }
.tool:hover { background: rgba(0, 0, 0, .05); }
.tool[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.tool-ar { background: var(--ink); color: var(--paper); }
.tool-ar:hover { background: #000; }
.icon-only { padding: 9px 10px; }


/* dimension overlay */
.dim-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.dim-lines line { stroke: var(--ink); stroke-width: 1.2; }
.dim-lines .tick { stroke-width: 1.2; }
.dim-label {
  border: 0; padding: 3px 9px; border-radius: 99px; pointer-events: none;
  background: var(--ink); color: var(--paper); font: 500 12px/1.3 var(--sans); white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.dim-label small { opacity: .6; font-weight: 400; margin-left: 2px; }
.dim-pt { width: 1px; height: 1px; pointer-events: none; opacity: 0; }
.dims-off .dim-label, .dims-off .dim-lines { display: none; }

/* loader */
.loader {
  position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; justify-items: center; gap: 18px;
  background: var(--bg); transition: opacity .6s var(--ease), visibility .6s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader p { margin: 0; font: italic 400 22px var(--serif); color: var(--ink-2); }
.loader-slab {
  width: 120px; height: 72px; border-radius: 4px;
  background: linear-gradient(115deg, #ece9e3 0%, #ece9e3 38%, #2b4a39 40%, #ece9e3 43%, #e4e0d8 70%, #6d8a76 71.5%, #e4e0d8 73%);
  background-size: 300% 100%;
  animation: slab 2.4s linear infinite;
  box-shadow: 0 18px 40px rgba(60,45,25,.18);
}
@keyframes slab { to { background-position: -300% 0; } }

/* ---------- panel ---------- */
.panel {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--paper); border-left: 1px solid var(--line-2);
}
.panel-scroll { flex: 1; overflow-y: auto; padding: 8px 26px 24px; scrollbar-width: thin; }
.step { padding: 22px 0 24px; border-bottom: 1px solid var(--line-2); }
.step:last-of-type { border-bottom: 0; }
.step > header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.num { font: 500 11px var(--sans); color: var(--accent); letter-spacing: .1em; }
.step h2 { margin: 0; font: 500 17px/1.1 var(--display); letter-spacing: .06em; }
.aside { margin-left: auto; font-size: 12px; color: var(--muted); }
.badge {
  margin-left: auto; font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-ink); background: #efe6d8; padding: 3px 8px; border-radius: 99px;
}
.blurb { margin: 12px 0 0; color: var(--ink-2); font-size: 13px; }
.hint { margin: -4px 0 14px; color: var(--ink-2); font-size: 13px; }

.piece-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.piece {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 4px 10px; border: 1px solid var(--line); border-radius: 12px; background: transparent;
  font-size: 12px; transition: border-color .2s, background .2s, box-shadow .2s;
}
.piece svg { width: 42px; height: 34px; stroke-width: 1.3; color: var(--ink-2); }
.piece:hover { border-color: #c9bfb0; }
.piece[aria-checked="true"] { border-color: var(--ink); background: #fff; box-shadow: 0 0 0 1px var(--ink) inset; }

.stone-grid { display: block; }
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 14px; }
.grid-label { margin: 0 0 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cut-warn { margin: -6px 0 12px; padding: 8px 12px; border-radius: 10px; background: #f6e3dc; color: #7a2f1d; font-size: 12px; }
.stone {
  position: relative; aspect-ratio: 1; border-radius: 50%; border: 0; padding: 0;
  background-size: cover; background-position: center;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08) inset, 0 3px 8px rgba(60,45,25,.12);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.stone:hover { transform: translateY(-2px); }
.stone[aria-checked="true"] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink), 0 6px 14px rgba(60,45,25,.18); }
.stone .tier { position: absolute; right: -2px; bottom: -2px; font-size: 9px; background: var(--paper); border-radius: 99px; padding: 1px 4px; color: var(--muted); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.stone-note { margin-top: 14px; min-height: 64px; }
.stone-name { margin: 0 0 2px; font: 500 20px/1.2 var(--serif); }
.stone-note p:last-child { margin: 0; color: var(--ink-2); font-size: 13px; }

.slab-wrap {
  position: relative; border-radius: 6px; overflow: hidden; background: #ddd;
  box-shadow: 0 10px 26px rgba(60,45,25,.14); touch-action: none; cursor: grab; aspect-ratio: 5 / 3;
}
.slab-wrap.dragging { cursor: grabbing; }
.slab-wrap canvas { display: block; width: 100%; height: 100%; }
.slab-scale {
  position: absolute; left: 10px; bottom: 9px; display: flex; align-items: center; gap: 6px;
  font-size: 10px; letter-spacing: .06em; color: rgba(255,255,255,.85); text-shadow: 0 1px 2px rgba(0,0,0,.5);
  pointer-events: none;
}
.slab-scale span { width: 28px; height: 1px; background: currentColor; }
.slab-tools { display: flex; gap: 8px; margin-top: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px;
  border: 1px solid var(--line); border-radius: 99px; background: transparent; font-size: 12px;
  transition: border-color .2s, background .2s;
}
.chip svg { width: 15px; height: 15px; }
.chip:hover { border-color: #c9bfb0; background: #fff; }
.chip[aria-checked="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.presets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.slider { margin: 0 0 14px; }
.slider-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.slider-top label { font-size: 13px; color: var(--ink-2); }
.slider-top output { font: 500 15px var(--sans); font-variant-numeric: tabular-nums; }
.slider-top output small { color: var(--muted); font-weight: 400; margin-left: 2px; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 2px; border-radius: 2px;
  background: linear-gradient(to right, var(--ink) var(--fill, 50%), var(--line) var(--fill, 50%));
}
input[type="range"]::-moz-range-track { height: 2px; background: var(--line); }
input[type="range"]::-moz-range-progress { height: 2px; background: var(--ink); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; margin-top: -8px; border-radius: 50%;
  background: #fff; border: 1.5px solid var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 1.5px solid var(--ink);
}

.opt { margin-bottom: 16px; }
.opt-label { font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.seg button {
  text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: transparent;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.seg button strong { display: block; font-weight: 500; font-size: 13px; }
.seg button small { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }
.seg button:hover { border-color: #c9bfb0; }
.seg button[aria-checked="true"] { border-color: var(--ink); background: #fff; box-shadow: 0 0 0 1px var(--ink) inset; }

.backlight { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: linear-gradient(120deg, #f3f0e4, #eef2e2); cursor: pointer; }
.backlight input { position: absolute; opacity: 0; pointer-events: none; }
.track { flex: none; width: 38px; height: 22px; border-radius: 99px; background: #cfc7ba; position: relative; transition: background .25s; }
.knob { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.backlight input:checked + .track { background: #b9963f; }
.backlight input:checked + .track .knob { transform: translateX(16px); }
.backlight input:focus-visible + .track { outline: 2px solid var(--ink); outline-offset: 2px; }
.bl-text strong { display: block; font-weight: 500; }
.bl-text small { color: var(--ink-2); font-size: 12px; }

.colophon { margin: 18px 0 0; font-size: 11px; color: var(--muted); line-height: 1.5; }

.summary {
  padding: 16px 26px 18px; border-top: 1px solid var(--line-2); background: var(--paper);
  box-shadow: 0 -10px 30px rgba(60,45,25,.05);
}
.summary-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.price .label { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.price .amount { font: 500 27px/1.1 var(--serif); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.facts { display: flex; flex-direction: column; align-items: flex-end; text-align: right; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.summary-row { flex-wrap: wrap; }
.cta {
  width: 100%; display: inline-flex; justify-content: center; align-items: center; gap: 10px;
  padding: 15px 18px; border: 0; border-radius: 12px; background: var(--ink); color: var(--paper);
  font-size: 14px; font-weight: 500; letter-spacing: .02em; transition: background .2s, transform .2s;
}
.cta:hover { background: #000; }
.cta:active { transform: scale(.99); }
.cta.small { width: auto; padding: 11px 18px; }
.cta:disabled { opacity: .6; cursor: progress; }
.fine { margin: 8px 0 0; text-align: center; font-size: 11px; color: var(--muted); }

/* ---------- modals ---------- */
.modal {
  border: 0; padding: 0; border-radius: 18px; background: var(--paper); color: var(--ink);
  width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  box-shadow: 0 40px 100px rgba(30, 20, 10, .35);
}
.modal::backdrop { background: rgba(28, 24, 18, .45); backdrop-filter: blur(4px); }
.modal[open] { animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal-sm { width: min(420px, calc(100vw - 32px)); padding: 30px; text-align: center; }
.modal-close { position: absolute; top: 10px; right: 12px; margin: 0; z-index: 2; }
.modal-close button { border: 0; background: transparent; font-size: 26px; line-height: 1; color: var(--muted); padding: 6px 10px; }
.modal h2 { margin: 0 0 8px; font: 500 32px/1.1 var(--serif); }
.muted { color: var(--ink-2); margin: 0 0 16px; }

.enq { display: grid; grid-template-columns: 1fr 1fr; }
.enq-visual { background: linear-gradient(160deg, #f4f1eb, #e6dfd3); padding: 26px; border-radius: 18px 0 0 18px; }
.enq-visual img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; display: block; }
.spec { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 14px 0 0; font-size: 13px; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; text-align: right; }
.spec .total { font: 500 20px var(--serif); }
.enq-form { padding: 30px 30px 24px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.enq-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); }
.enq-form input:not([type=checkbox]), .enq-form textarea {
  font: inherit; font-size: 14px; color: var(--ink); padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; outline: none; resize: vertical;
}
.enq-form input:focus, .enq-form textarea:focus { border-color: var(--ink); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.enq-form .check { flex-direction: row; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--ink); }
.enq-form .check input { margin-top: 3px; accent-color: var(--ink); }
.enq-form .cta { margin-top: 6px; }

.enq-done { padding: 56px 40px 44px; text-align: center; max-width: 560px; margin: 0 auto; }
.done-mark { width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); font-size: 24px; }
.done-actions { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.done-actions form { margin: 0; }
.ghost-btn { color: var(--ink); font-size: 13px; text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; }

.qr { display: grid; place-items: center; margin: 8px auto 4px; padding: 14px; background: #fff; border-radius: 14px; width: fit-content; }
.qr svg { width: 220px; height: 220px; display: block; }
.qr svg path, .qr svg rect { stroke: none; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 50;
  background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 99px; font-size: 13px;
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { :root { --panel-w: 380px; } .swatches { gap: 8px; } }
@media (max-width: 860px) {
  body { overflow: auto; }
  :root { --top-h: 54px; }
  .topbar { padding: 0 14px; }
  .brand-mark { font-size: 17px; letter-spacing: .26em; }
  .brand-sub { font-size: 16px; }
  .pill { font-size: 9px; padding: 3px 7px; letter-spacing: .06em; }
  .brand-sub { display: none; }
  .ghost { font-size: 0; gap: 0; }
  .ghost svg { width: 18px; height: 18px; }
  .ghost { padding: 7px 11px; }
  .layout { position: static; display: block; padding-top: var(--top-h); }
  .stage { position: sticky; top: var(--top-h); height: 54vh; z-index: 4; border-bottom: 1px solid var(--line-2); }
  .stage-title { top: 14px; left: 16px; }
  .stage-title h1 { font-size: 26px; }
  .stage-sub { font-size: 16px; }
  .stage-hint { display: none; }
  .eyebrow { font-size: 10px; }
  .toolbar { bottom: 12px; max-width: calc(100% - 20px); }
  .tool span { display: none; }
  .tool-ar span { display: inline; }
  .tool { padding: 9px 11px; }
  .panel { border-left: 0; }
  .panel-scroll { overflow: visible; padding: 4px 18px 140px; }
  .summary { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .summary-row { margin-bottom: 10px; }
  .price .amount { font-size: 22px; }
  .fine { display: none; }
  .modal .fine { display: block; }
  .enq { grid-template-columns: 1fr; }
  .enq-visual { border-radius: 18px 18px 0 0; padding: 18px; }
  .enq-form { padding: 22px 18px; }
}

/* backlit onyx: lights down */
.stage { transition: background .6s; }
.stage.night { background: radial-gradient(110% 85% at 50% 40%, #3a332b 0%, #1b1815 55%, #0e0c0a 100%); }
.stage.night::after { background: linear-gradient(to bottom, transparent, rgba(0,0,0,.25)); }
.stage.night .stage-title h1 { color: #f3ede3; }
.stage.night .stage-stone { color: #d8b878; }
.stage.night .eyebrow, .stage.night .stage-hint { color: #a89d8e; }
.stage.night .dim-lines line { stroke: #f3ede3; }
.field-row label { min-width: 0; }
.enq-form input:not([type=checkbox]) { width: 100%; }
.enq-visual img:not([src]), .enq-visual img[src=""] {
  visibility: hidden;
}
.enq-visual .snap-frame { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.5) 50%, transparent 70%) 0 0 / 200% 100%, rgba(0,0,0,.03); animation: shimmer 1.4s linear infinite; }
.enq-visual .snap-frame.ready { animation: none; background: none; }
.enq-visual .snap-frame img { position: absolute; inset: 0; height: 100%; }
@keyframes shimmer { to { background-position: -200% 0, 0 0; } }

/* powered-by capsule */
.powered {
  position: absolute; top: 22px; left: 32px; z-index: 4;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px 10px 14px; border-radius: 99px;
  background: var(--ink); color: var(--paper); text-decoration: none;
  font: 400 13.5px/1 var(--sans); letter-spacing: .02em;
  box-shadow: 0 8px 24px rgba(28, 22, 14, .22), 0 0 0 1px rgba(255,255,255,.08) inset;
  transition: transform .25s var(--ease), box-shadow .25s;
}
.powered:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(28, 22, 14, .3), 0 0 0 1px rgba(255,255,255,.12) inset; }
.powered-by { opacity: .7; }
.powered strong { font-weight: 600; letter-spacing: .04em; }
.powered svg { width: 13px; height: 13px; opacity: .8; }
.powered-dot { width: 7px; height: 7px; border-radius: 50%; background: #d8b878; box-shadow: 0 0 0 3px rgba(216,184,120,.25); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(216,184,120,0); } }
.stage.night .powered { background: #f3ede3; color: var(--ink); }
.stage-title { top: 80px; }
@media (max-width: 860px) {
  .powered { top: 12px; left: 14px; padding: 6px 11px 6px 9px; font-size: 11px; }
  .stage-title { top: 52px; }
}
.colophon a { color: var(--ink-2); }

@media (min-width: 560px) and (max-width: 860px) {
  .swatches { grid-template-columns: repeat(9, 1fr); }
  .slab-wrap { max-width: 480px; margin: 0 auto; }
}

.ghost.keep { font-size: 13px; gap: 8px; }

/* ---------- FC Maderas ---------- */
.stage { background: radial-gradient(120% 90% at 50% 36%, #fbf8f2 0%, #efe7da 55%, #e2d6c4 100%); }
.loader-plank { width: 140px; height: 26px; border-radius: 3px; background: repeating-linear-gradient(180deg, #b66f48 0 3px, #a35f3c 3px 5px, #b97650 5px 9px); box-shadow: 0 14px 30px rgba(60,35,20,.2); animation: plank 1.6s ease-in-out infinite; }
@keyframes plank { 50% { transform: translateX(14px); } }
.projects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.project { text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(135deg, #fff, #f6efe4); transition: border-color .2s, transform .2s; }
.project:hover { border-color: #cbb9a3; transform: translateY(-1px); }
.project strong { display: block; font: 500 13px/1.2 var(--display); letter-spacing: .04em; }
.project small { display: block; margin-top: 4px; color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.seg-3 { grid-auto-columns: 1fr; }
.sub-opt { margin-top: 14px; }
.woods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.wood { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; padding: 0; font-size: 12px; }
.wood i { width: 100%; aspect-ratio: 1; border-radius: 12px; background-size: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.06) inset, 0 3px 8px rgba(60,35,20,.12); transition: transform .25s var(--ease), box-shadow .25s; }
.wood:hover i { transform: translateY(-2px); }
.wood[aria-checked="true"] i { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink), 0 6px 14px rgba(60,35,20,.18); }
.wood-note { margin: 12px 0 0; color: var(--ink-2); font: 400 15.5px/1.4 var(--serif); }
.profiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.profile { display: grid; grid-template-columns: 54px 1fr; gap: 10px; align-items: center; text-align: left; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: transparent; transition: border-color .2s, background .2s, box-shadow .2s; }
.profile svg { width: 54px; height: 34px; stroke-width: 1.3; }
.profile svg path { fill: #e8d5bf; stroke: var(--ink-2); }
.profile strong { display: block; font-weight: 500; font-size: 13px; }
.profile small { display: block; color: var(--muted); font-size: 11px; line-height: 1.3; }
.profile:hover { border-color: #cbb9a3; }
.profile[aria-checked="true"] { border-color: var(--ink); background: #fff; box-shadow: 0 0 0 1px var(--ink) inset; }
.toggle { display: flex; align-items: center; gap: 12px; padding: 10px 0; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle input:checked + .track { background: var(--accent); }
.toggle input:checked + .track .knob { transform: translateX(16px); }
.toggle input:focus-visible + .track { outline: 2px solid var(--ink); outline-offset: 2px; }
.toggle strong { display: block; font-weight: 500; font-size: 13.5px; }
.toggle small { color: var(--muted); font-size: 12px; }
.facts-main .label { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.facts-main .headline { font: 600 19px/1.2 var(--serif); }
.link-btn { border: 0; background: none; padding: 4px 0; font-size: 12.5px; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.cta svg { width: 19px; height: 19px; }
.cta { background: #2a1f18; }
.spec-wrap { display: grid; grid-template-columns: 1fr 1.15fr; }
.spec-visual { background: linear-gradient(160deg, #f6f0e6, #e7dccb); padding: 24px; border-radius: 18px 0 0 18px; }
.spec-visual img { width: 100%; display: block; }
.snap-frame { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.5) 50%, transparent 70%) 0 0 / 200% 100%, rgba(0,0,0,.03); animation: shimmer 1.4s linear infinite; }
.snap-frame.ready { animation: none; background: none; }
.snap-frame img { position: absolute; inset: 0; height: 100%; object-fit: contain; }
.snap-frame img:not([src]) { visibility: hidden; }
@keyframes shimmer { to { background-position: -200% 0, 0 0; } }
.spec-body { padding: 30px 30px 24px; overflow-y: auto; max-height: calc(100vh - 40px); }
.cutlist { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0 14px; }
.cutlist th { text-align: left; font-weight: 500; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); }
.cutlist td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.cutlist td:nth-child(2) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cutlist td small { display: block; color: var(--muted); font-size: 11.5px; }
.totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.totals div { background: #f4ede3; border-radius: 10px; padding: 10px 12px; }
.totals strong { display: block; font: 600 18px/1.1 var(--serif); }
.totals span { font-size: 11px; color: var(--muted); }
.powered { top: 22px; left: 32px; }
.stage-title { top: 80px; }
@media (max-width: 860px) {
  .spec-wrap { grid-template-columns: 1fr; }
  .spec-visual { border-radius: 18px 18px 0 0; }
  .projects { grid-template-columns: 1fr; }
  .profiles { grid-template-columns: 1fr; }
  .stage-title { top: 52px; }
  .brand-sub { display: inline; }
}
.muted-n { color: var(--muted); font-size: 11px; margin-left: 4px; } .chip[aria-checked="true"] .muted-n { color: #d8cbbb; }

/* ================= Tema FC Maderas (colores y tipografía de fcmaderas.com) ================= */
:root {
  --bg: #ffffff;
  --paper: #ffffff;
  --sand: #dbd7c7;
  --sand-2: #ece9e0;
  --ink: #1b1b1b;
  --ink-2: #595959;
  --muted: #7a7667;
  --olive: #999482;
  --line: #dbd7c7;
  --line-2: #ece9e0;
  --accent: #9e1b1e;        /* rojo del logo */
  --accent-ink: #7a7667;
  --sans: 'Crimson Text', Georgia, serif;
  --radius: 2px;
}
body { font-size: 15.5px; }
.topbar { background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line-2); }
.brand-mark { color: var(--accent); font-weight: 600; white-space: nowrap; }
.brand-sub { font: italic 400 18px/1 var(--serif); color: var(--muted); }
.pill { border-radius: 0; border-color: var(--sand); color: var(--muted); letter-spacing: .14em; }
.ghost { border-radius: 0; border-color: var(--sand); font-size: 14px; }
.announce { position: fixed; top: var(--top-h); left: 0; right: 0; z-index: 19; height: 30px; display: grid; place-items: center;
  background: var(--sand); color: var(--ink); font: 400 12px/1 var(--serif); letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; overflow: hidden; }
.layout { top: calc(var(--top-h) + 30px); }

.stage { background: radial-gradient(120% 90% at 50% 34%, #ffffff 0%, #f4f2ec 50%, #e4e0d3 100%); }
.stage::after { background: linear-gradient(to bottom, transparent, rgba(153,148,130,.14)); }
.eyebrow { font-family: var(--serif); letter-spacing: .22em; color: var(--ink); font-size: 12px; }
.stage-title h1 { color: var(--muted); font-weight: 400; }
.stage-sub { color: var(--olive); }
.stage-hint { font-size: 13px; }
.toolbar { border-radius: 2px; background: rgba(255,255,255,.92); border: 1px solid var(--sand); box-shadow: 0 10px 30px rgba(60,55,40,.10); }
.tool { border-radius: 0; font-size: 14px; }
.tool[aria-pressed="true"], .tool-ar { background: var(--ink); color: #fff; }

.panel { background: #fff; border-left: 1px solid var(--sand); }
.step { border-bottom-color: var(--sand-2); }
.num { color: var(--accent); font-family: var(--serif); font-size: 13px; }
.step h2 { font: 600 14px/1.2 var(--serif); text-transform: uppercase; letter-spacing: .24em; color: var(--ink); }
.aside { font-size: 13px; color: var(--olive); }
.project, .seg button, .profile, .chip { border-radius: var(--radius); border-color: var(--sand); }
.project { background: linear-gradient(135deg, #fff, var(--sand-2)); }
.project strong { color: var(--ink); }
.project small, .seg button small, .profile small, .toggle small { font-size: 13px; color: var(--muted); }
.seg button strong, .profile strong, .toggle strong { font-size: 15px; font-weight: 600; }
.seg button[aria-checked="true"], .profile[aria-checked="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; background: #fff; }
.chip { font-size: 14px; }
.chip[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.wood i { border-radius: var(--radius); }
.wood { font-size: 14px; }
.profile svg path { fill: var(--sand-2); }
.opt-label { font-family: var(--serif); font-size: 12px; letter-spacing: .2em; color: var(--muted); }
.slider-top label { font-size: 15px; }
.slider-top output { font: 600 16px var(--serif); }
input[type="range"]::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--ink) var(--fill, 50%), var(--sand) var(--fill, 50%)); }
.toggle input:checked + .track { background: var(--ink); }
.track { background: var(--sand); }
.wood-note { color: var(--ink-2); }
.colophon { font-size: 13px; }

.summary { border-top: 1px solid var(--sand); box-shadow: none; }
.facts-main .label { font-size: 12px; letter-spacing: .2em; color: var(--muted); }
.facts-main .headline { color: var(--ink); }
.link-btn { color: var(--ink); font-size: 14px; }
.cta { border-radius: 0; background: var(--ink); text-transform: uppercase; letter-spacing: .18em; font: 600 14px/1 var(--serif); padding: 16px 18px; }
.cta:hover { background: #000; }
.fine { font-size: 12.5px; color: var(--muted); }

.modal { border-radius: 2px; background: #fff; }
.modal h2 { font: 400 30px/1.1 var(--display); color: var(--muted); }
.spec-visual { border-radius: 2px 0 0 2px; background: linear-gradient(160deg, #fff, var(--sand-2)); }
.totals div { background: var(--sand-2); border-radius: 0; }
.cutlist th { font-family: var(--serif); letter-spacing: .16em; }
.cutlist { font-size: 14.5px; }
.qr { border-radius: 0; border: 1px solid var(--sand); }
.toast { border-radius: 0; font-family: var(--serif); font-size: 14.5px; }
.loader { background: #fff; }
.loader p { color: var(--muted); }
.dim-label { border-radius: 0; font-family: var(--serif); font-size: 13px; }

@media (max-width: 860px) {
  .announce { font-size: 10px; letter-spacing: .14em; }
  .layout { padding-top: calc(var(--top-h) + 30px); }
  .stage { top: calc(var(--top-h) + 30px); }
  .brand-mark { font-size: 15px; letter-spacing: .16em; }
  .brand-sub { display: none; }
}
@media (max-width: 860px) { .stage-title { top: 62px; } }
