/* Legado Wear Studio — sistema visual
   Estudio claro con luz ambiental teñida por el jersey + superficies de vidrio líquido. */

:root {
  --bg: #e9ebef;
  --ink: #0b0b0f;
  --ink-2: rgba(11, 11, 15, .62);
  --ink-3: rgba(11, 11, 15, .38);
  --line: rgba(11, 11, 15, .08);
  --line-2: rgba(11, 11, 15, .14);
  --white: #fff;
  --tint-a: #27d3c6;
  --tint-b: #111a33;
  --tint-c: #8be9ff;
  --r-xl: 30px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --panel-w: 404px;
  --gap: 20px;
  --top-h: 64px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .5, 1);
  --font: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Big Shoulders Display", "Instrument Sans", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -0.005em;
}
button { font: inherit; color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
img { display: block; }
[hidden] { display: none !important; }

/* ---------- Fondo de estudio ---------- */
.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: radial-gradient(120% 90% at 40% 0%, #f6f7f9 0%, #e9ebef 55%, #dfe2e7 100%); }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; transition: background-color 1.2s var(--ease), transform 2s var(--ease); will-change: transform; }
.blob-a { width: 58vmax; height: 58vmax; left: -8vmax; top: -18vmax; background: var(--tint-a); animation: drift-a 22s ease-in-out infinite alternate; }
.blob-b { width: 50vmax; height: 50vmax; right: -14vmax; bottom: -22vmax; background: var(--tint-b); opacity: .32; animation: drift-b 26s ease-in-out infinite alternate; }
.blob-c { width: 30vmax; height: 30vmax; left: 34%; top: 38%; background: var(--tint-c); opacity: .34; animation: drift-c 18s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(6vmax, 4vmax) scale(1.08); } }
@keyframes drift-b { to { transform: translate(-5vmax, -3vmax) scale(1.1); } }
@keyframes drift-c { to { transform: translate(-8vmax, 3vmax) scale(.9); } }
.floor { position: absolute; left: 0; right: 0; bottom: 0; height: 34%; background: linear-gradient(to bottom, rgba(233, 235, 239, 0), rgba(233, 235, 239, .7) 60%, rgba(236, 238, 241, .95)); }
.grain { position: absolute; inset: -50%; opacity: .07; mix-blend-mode: multiply; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

/* ---------- Vidrio líquido ---------- */
.glass {
  position: relative;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, .72) 0%, rgba(255, 255, 255, .38) 42%, rgba(255, 255, 255, .5) 100%);
  -webkit-backdrop-filter: blur(26px) saturate(1.9) brightness(1.04);
  backdrop-filter: blur(26px) saturate(1.9) brightness(1.04);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 0 rgba(255, 255, 255, .35),
    inset 0 0 0 .5px rgba(255, 255, 255, .4),
    0 1px 2px rgba(15, 20, 35, .05),
    0 12px 40px -12px rgba(15, 20, 45, .22);
}
.glass::before {
  /* reflejo especular en el borde */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, .7));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.glass-dark {
  background: linear-gradient(155deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .06));
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 10px 30px -10px rgba(0, 0, 0, .5);
  color: #fff;
}

/* ---------- Barra superior ---------- */
.topbar { position: fixed; z-index: 30; top: 14px; left: 16px; right: 16px; height: 50px; display: flex; align-items: center; gap: 12px; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 18px 0 14px; border-radius: 999px; text-decoration: none; color: var(--ink); }
.brand img { width: 40px; height: auto; }
.brand-text { font-weight: 600; font-size: 15px; letter-spacing: -.01em; padding-left: 10px; border-left: 1px solid var(--line-2); }
.stepper { margin: 0 auto; display: flex; align-items: center; gap: 2px; height: 50px; padding: 5px; border-radius: 999px; transition: opacity .5s var(--ease), transform .6s var(--ease); }
.stepper button { position: relative; z-index: 1; border: 0; background: none; height: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--ink-2); display: flex; align-items: center; gap: 7px; transition: color .3s; white-space: nowrap; }
.stepper button i { font-style: normal; font-family: var(--display); font-weight: 900; font-size: 14px; color: var(--ink-3); transition: color .3s; }
.stepper button[aria-current="step"] { color: var(--ink); }
.stepper button[aria-current="step"] i { color: var(--ink); }
.stepper button.done i { color: var(--ink); }
.stepper .thumb { position: absolute; z-index: 0; top: 5px; height: 40px; border-radius: 999px; background: #fff; box-shadow: 0 1px 1px rgba(0,0,0,.04), 0 4px 14px -4px rgba(15, 20, 45, .22); transition: left .5s var(--spring), width .5s var(--spring); }
.top-actions { display: flex; gap: 8px; margin-left: auto; }
.icon-btn { width: 50px; height: 50px; border-radius: 999px; display: grid; place-items: center; cursor: pointer; border: 0; background: none; transition: transform .25s var(--spring); }
.icon-btn.glass, .icon-btn.glass-dark { border: 1px solid rgba(255,255,255,.7); }
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn:active { transform: scale(.92); }

/* ---------- Escenario ---------- */
.stage { position: fixed; z-index: 1; inset: 0; right: calc(var(--panel-w) + var(--gap) * 1.5); display: flex; align-items: flex-end; justify-content: center; transition: right .9s var(--ease), left .9s var(--ease); touch-action: pan-y; overflow: hidden; }
.figure { position: relative; flex: none; height: calc(100% - 12px); aspect-ratio: 1248 / 1800; transition: transform .9s var(--ease), opacity .6s var(--ease); transform-origin: 50% 40%; }
.figure canvas { width: 100%; height: 100%; display: block; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 76%, transparent 99%); mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 76%, transparent 99%); transition: opacity .45s var(--ease), filter .45s var(--ease); }
.figure.swap canvas { opacity: 0; filter: blur(6px); }
.figure.zoomed { cursor: zoom-out; }
.stage.zoom-mode .figure { transition: transform .5s var(--ease); }
.spinner { position: absolute; left: 50%; top: 45%; width: 34px; height: 34px; margin: -17px; border-radius: 50%; border: 2.5px solid rgba(11, 11, 15, .12); border-top-color: var(--ink); animation: spin .9s linear infinite; opacity: 0; transition: opacity .3s; pointer-events: none; }
.figure.loading .spinner { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

.view-switch { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; padding: 5px; border-radius: 24px; transition: opacity .5s, transform .6s var(--ease); }
.view-switch button { border: 0; background: none; padding: 4px; border-radius: 18px; cursor: pointer; display: grid; justify-items: center; gap: 3px; transition: background .3s; }
.view-switch canvas { width: 44px; height: 56px; border-radius: 13px; background: rgba(255, 255, 255, .5); object-fit: cover; transition: transform .35s var(--spring), box-shadow .3s; }
.view-switch span { font-size: 10.5px; font-weight: 600; color: var(--ink-2); letter-spacing: .01em; max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view-switch button[aria-selected="true"] { background: #fff; box-shadow: 0 4px 14px -4px rgba(15, 20, 45, .25); }
.view-switch button[aria-selected="true"] span { color: var(--ink); }
.view-switch button:hover canvas { transform: translateY(-2px); }
.zoom-btn { position: absolute; right: 20px; bottom: 30px; }
.stage-hint { display: none; }

/* ---------- Intro ---------- */
.intro { position: fixed; z-index: 5; left: clamp(24px, 6vw, 96px); top: 50%; transform: translateY(-46%); max-width: 560px; transition: opacity .6s var(--ease), transform .8s var(--ease); }
.eyebrow { margin: 0 0 18px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.intro h1 { margin: 0; font-size: clamp(52px, 7.4vw, 112px); line-height: .92; letter-spacing: -.045em; font-weight: 600; }
.intro h1 span { background: linear-gradient(100deg, var(--ink) 20%, color-mix(in oklab, var(--tint-a) 70%, var(--ink)) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; transition: all 1s; }
.intro-lead { margin: 26px 0 32px; max-width: 440px; font-size: 18px; line-height: 1.5; color: var(--ink-2); letter-spacing: -.01em; }
.intro-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.intro-note { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.intro-note b { color: var(--ink-2); font-weight: 600; }
.intro-points { list-style: none; margin: 48px 0 0; padding: 0; display: flex; gap: 32px; }
.intro-points li { font-size: 13px; color: var(--ink-2); display: grid; gap: 2px; }
.intro-points b { font-family: var(--display); font-size: 34px; font-weight: 900; color: var(--ink); line-height: 1; letter-spacing: .01em; }

body.is-intro .stage { right: 0; left: 44%; }
body.is-intro .panel { opacity: 0; transform: translateX(40px) scale(.98); pointer-events: none; }
body.is-intro .stepper { opacity: 0; transform: translateY(-10px); pointer-events: none; }
body.is-intro .view-switch, body.is-intro .zoom-btn { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(10px); }
body.is-intro .zoom-btn { transform: translateY(10px); }
body:not(.is-intro) .intro { opacity: 0; transform: translateY(-46%) translateX(-40px); pointer-events: none; }
.intro .reveal { opacity: 0; transform: translateY(18px); animation: rise .9s var(--ease) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Panel ---------- */
.panel { position: fixed; z-index: 20; top: 80px; right: var(--gap); bottom: var(--gap); width: var(--panel-w); border-radius: var(--r-xl); display: flex; flex-direction: column; overflow: hidden; transition: opacity .7s var(--ease), transform .8s var(--ease); }
.panel-grip { display: none; }
.panel-head { display: flex; gap: 16px; align-items: flex-start; padding: 24px 26px 12px; }
.step-num { font-family: var(--display); font-weight: 900; font-size: 44px; line-height: .8; letter-spacing: .01em; min-width: 46px; color: var(--ink); opacity: .9; padding-top: 3px; }
.panel-head h2 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.025em; }
.panel-head p { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.panel-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 26px 20px; scrollbar-width: thin; scrollbar-color: rgba(0,0,0,.15) transparent; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 16px), transparent); }
.panel-foot { display: flex; justify-content: space-between; gap: 10px; padding: 14px 18px 18px; border-top: 1px solid rgba(255, 255, 255, .6); }
.panel-foot .btn { flex: 1; }
.step-pane { animation: pane-in .55s var(--ease) both; }
.step-pane.out-left { animation: pane-out .25s var(--ease) both; }
@keyframes pane-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes pane-out { to { opacity: 0; transform: translateX(-12px); } }

.group { margin: 18px 0 0; }
.group:first-child { margin-top: 6px; }
.group-label { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.group-label em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink-2); font-size: 13px; }
.card { background: rgba(255, 255, 255, .55); border: 1px solid rgba(255, 255, 255, .8); border-radius: var(--r-lg); box-shadow: 0 1px 2px rgba(15, 20, 35, .04); }

/* Botones */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 600; font-size: 15px; letter-spacing: -.01em; transition: transform .25s var(--spring), background .25s, box-shadow .25s, opacity .25s; white-space: nowrap; text-decoration: none; }
.btn svg { width: 18px; height: 18px; transition: transform .3s var(--spring); }
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 10px 24px -10px rgba(11, 11, 15, .6); }
.btn-primary:hover { background: #1c1c22; }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-ghost { background: rgba(255, 255, 255, .55); color: var(--ink); border: 1px solid rgba(255,255,255,.9); box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.btn-ghost:hover { background: rgba(255, 255, 255, .85); }
.btn-ghost:disabled { opacity: .35; pointer-events: none; }
.btn-lg { height: 58px; padding: 0 30px; font-size: 16.5px; }
.btn-block { width: 100%; }

/* Patrones */
.pattern-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pattern-tile { border: 0; padding: 0; background: none; cursor: pointer; text-align: left; display: grid; gap: 7px; }
.pattern-tile canvas { width: 100%; aspect-ratio: 1; border-radius: 18px; display: block; box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 6px 14px -8px rgba(15,20,45,.35); transition: transform .35s var(--spring), box-shadow .3s; }
.pattern-tile span { font-size: 12.5px; font-weight: 500; color: var(--ink-2); padding-left: 2px; }
.pattern-tile:hover canvas { transform: translateY(-2px) scale(1.02); }
.pattern-tile[aria-pressed="true"] canvas { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink), 0 10px 20px -10px rgba(15,20,45,.5); }
.pattern-tile[aria-pressed="true"] span { color: var(--ink); font-weight: 600; }

/* Deslizadores */
.slider { display: grid; grid-template-columns: 92px 1fr 44px; align-items: center; gap: 12px; padding: 12px 16px; }
.slider + .slider { border-top: 1px solid var(--line); }
.slider label { font-size: 14px; font-weight: 500; }
.slider output { font-size: 13px; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: none; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 5px; border-radius: 9px; background: linear-gradient(to right, var(--ink) 0 var(--p, 50%), rgba(11,11,15,.12) var(--p, 50%)); }
input[type=range]::-moz-range-track { height: 5px; border-radius: 9px; background: rgba(11,11,15,.12); }
input[type=range]::-moz-range-progress { height: 5px; border-radius: 9px; background: var(--ink); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 .5px rgba(0,0,0,.08), 0 3px 8px rgba(0,0,0,.18); transition: transform .2s var(--spring); }
input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 .5px rgba(0,0,0,.08), 0 3px 8px rgba(0,0,0,.18); }
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.15); }

/* Colores */
.color-slots { display: grid; gap: 8px; }
.slot { display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; border: 0; width: 100%; cursor: pointer; text-align: left; border-radius: var(--r-md); transition: background .25s, box-shadow .25s; background: rgba(255,255,255,.45); border: 1px solid rgba(255,255,255,.8); }
.slot[aria-expanded="true"] { background: #fff; box-shadow: 0 8px 22px -12px rgba(15, 20, 45, .35); }
.slot .chip { width: 38px; height: 38px; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1), inset 0 8px 12px rgba(255,255,255,.18); flex: none; transition: background .5s; }
.slot b { display: block; font-size: 14px; font-weight: 600; }
.slot small { font-size: 12.5px; color: var(--ink-2); }
.slot svg { margin-left: auto; width: 16px; height: 16px; color: var(--ink-3); transition: transform .3s var(--ease); }
.slot[aria-expanded="true"] svg { transform: rotate(180deg); }
.swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; padding: 12px 4px 6px; }
.swatches.collapsible { display: none; }
.swatches.open { display: grid; animation: pane-in .4s var(--ease); }
.sw { position: relative; aspect-ratio: 1; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12), inset 0 6px 8px rgba(255,255,255,.2); transition: transform .25s var(--spring), box-shadow .25s; }
.sw:hover { transform: scale(1.12); }
.sw[aria-pressed="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ink); }
.sw.none { background: repeating-linear-gradient(135deg, #fff 0 4px, #e7e7ea 4px 8px); }
.sw.none::after { content: ""; position: absolute; left: 50%; top: 12%; bottom: 12%; width: 1.5px; background: #d0223a; transform: rotate(45deg); }
.sw.custom { background: conic-gradient(from 90deg, #ff3b30, #ffcc00, #34c759, #00c7be, #007aff, #af52de, #ff2d55, #ff3b30); overflow: hidden; }
.sw.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.combos { display: flex; gap: 8px; flex-wrap: wrap; }
.combo { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 8px; border-radius: 999px; border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.5); cursor: pointer; font-size: 13px; font-weight: 500; transition: background .2s, transform .25s var(--spring); }
.combo:hover { background: #fff; }
.combo:active { transform: scale(.96); }
.combo i { display: flex; }
.combo i b { width: 18px; height: 18px; border-radius: 50%; box-shadow: 0 0 0 1.5px #fff; margin-left: -6px; }
.combo i b:first-child { margin-left: 0; }

/* Segmentado */
.seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 14px; background: rgba(11, 11, 15, .06); }
.seg button { position: relative; z-index: 1; height: 36px; border: 0; background: none; border-radius: 10px; cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--ink-2); transition: color .25s; }
.seg button[aria-pressed="true"] { color: var(--ink); font-weight: 600; }
.seg .seg-thumb { position: absolute; z-index: 0; top: 4px; bottom: 4px; border-radius: 10px; background: #fff; box-shadow: 0 1px 1px rgba(0,0,0,.04), 0 3px 10px -3px rgba(15, 20, 45, .25); transition: left .45s var(--spring), width .45s var(--spring); }

/* Interruptor */
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; font-size: 14px; font-weight: 500; }
.toggle-row + .toggle-row, .toggle-row + .slider, .slider + .toggle-row { border-top: 1px solid var(--line); }
.toggle-row small { display: block; font-size: 12.5px; font-weight: 400; color: var(--ink-2); margin-top: 1px; }
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: rgba(120, 120, 128, .2); transition: background .3s; }
.switch span::after { content: ""; position: absolute; left: 2px; top: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16); transition: transform .35s var(--spring); }
.switch input:checked + span { background: #34c759; }
.switch input:checked + span::after { transform: translateX(20px); }

/* Carga de logo */
.drop { display: grid; place-items: center; gap: 8px; text-align: center; padding: 26px 18px; border-radius: var(--r-lg); border: 1.5px dashed rgba(11, 11, 15, .2); background: rgba(255,255,255,.4); cursor: pointer; transition: background .25s, border-color .25s, transform .3s var(--spring); }
.drop:hover, .drop.over { background: rgba(255,255,255,.8); border-color: var(--ink); }
.drop.over { transform: scale(1.01); }
.drop svg { width: 30px; height: 30px; color: var(--ink-2); }
.drop b { font-size: 15px; font-weight: 600; }
.drop small { font-size: 12.5px; color: var(--ink-2); }
.drop input { display: none; }
.crest-preview { display: flex; align-items: center; gap: 14px; padding: 12px; }
.crest-preview .img { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: repeating-conic-gradient(#f0f0f3 0 25%, #fff 0 50%) 0 0 / 14px 14px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.crest-preview img, .crest-preview canvas { max-width: 54px; max-height: 54px; }
.crest-preview b { display: block; font-size: 14px; }
.crest-preview small { color: var(--ink-2); font-size: 12.5px; }
.link-btn { margin-left: auto; border: 0; background: none; color: #d0223a; font-weight: 600; font-size: 13.5px; cursor: pointer; padding: 8px; }

/* Campos */
.field { display: grid; gap: 6px; min-width: 0; }
.field span { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.field input, .field textarea { width: 100%; border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.65); border-radius: 14px; padding: 13px 14px; font: inherit; font-size: 16px; color: var(--ink); outline: none; transition: box-shadow .2s, background .2s; resize: none; }
.field input:focus, .field textarea:focus { background: #fff; box-shadow: 0 0 0 3px rgba(11, 11, 15, .12); }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.field input[type=date] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; min-height: 49px; text-align: left; }
.field input[type=date]::-webkit-date-and-time-value { text-align: left; margin: 0; }
.fields { display: grid; gap: 12px; }
.big-input { font-family: var(--display) !important; font-weight: 900 !important; font-size: 26px !important; letter-spacing: .04em; text-transform: uppercase; padding: 10px 14px !important; }
.num-input { text-align: center; }

.font-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.font-tile { border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.45); border-radius: var(--r-md); padding: 12px 12px 10px; cursor: pointer; display: grid; gap: 2px; text-align: left; transition: background .2s, box-shadow .25s; }
.font-tile .sample { font-size: 30px; line-height: 1; text-transform: uppercase; }
.font-tile small { font-size: 12px; color: var(--ink-2); }
.font-tile[aria-pressed="true"] { background: #fff; box-shadow: 0 0 0 2px var(--ink); }

/* Resumen */
.summary { padding: 6px 16px; }
.summary-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; font-size: 14px; }
.summary-row + .summary-row { border-top: 1px solid var(--line); }
.summary-row span { color: var(--ink-2); }
.summary-row b { font-weight: 600; text-align: right; }
.dots { display: inline-flex; gap: 4px; vertical-align: middle; }
.dots i { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.actions { display: grid; gap: 10px; }
.actions .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero-btn { height: 58px; font-size: 16px; }
.fine { font-size: 12.5px; line-height: 1.5; color: var(--ink-3); margin: 14px 2px 0; }

/* ---------- Lookbook ---------- */
.lookbook { position: fixed; inset: 0; z-index: 60; color: #fff; display: grid; grid-template-rows: auto 1fr auto auto; animation: lb-in .7s var(--ease); background: #0b0b0e; }
@keyframes lb-in { from { opacity: 0; } }
.lb-bg { position: absolute; inset: 0; background: radial-gradient(60% 60% at 50% 40%, color-mix(in oklab, var(--tint-a) 45%, #0b0b0e) 0%, #0b0b0e 70%); opacity: .9; transition: background 1s; }
.lb-top { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; }
.lb-logo { height: 34px; width: auto; opacity: .95; }
.lb-stage { position: relative; overflow: hidden; }
.lb-slide { position: absolute; inset: 0 16px; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 1.1s var(--ease); }
.lb-slide.on { opacity: 1; }
.lb-frame { position: relative; height: 100%; max-width: 100%; border-radius: 26px; overflow: hidden; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .06); }
.lb-slide img { height: 100%; width: auto; max-width: 100%; object-fit: cover; transform: scale(1.02); transition: transform 7s linear; }
.lb-slide.on img { transform: scale(1.08); }
.lb-caption { position: relative; display: flex; justify-content: center; align-items: baseline; gap: 14px; padding: 6px 0 12px; font-size: 14px; color: rgba(255,255,255,.6); }
.lb-caption span:first-child { font-family: var(--display); font-weight: 900; font-size: 22px; color: #fff; }
.lb-caption b { font-size: 22px; font-weight: 600; color: #fff; letter-spacing: -.02em; }
.lb-thumbs { position: relative; display: flex; justify-content: center; gap: 8px; padding: 0 16px 22px; }
.lb-thumbs button { border: 0; padding: 0; background: none; cursor: pointer; border-radius: 12px; overflow: hidden; opacity: .45; transition: opacity .3s, transform .3s var(--spring); }
.lb-thumbs button.on { opacity: 1; transform: translateY(-3px); }
.lb-thumbs img { width: 52px; height: 66px; object-fit: cover; object-position: top; }
.lb-nav { position: absolute; top: 50%; margin-top: -25px; }
.lb-prev { left: 22px; }
.lb-next { right: 22px; }

/* ---------- Hoja modal ---------- */
.sheet { border: 0; padding: 0; width: min(460px, calc(100vw - 24px)); border-radius: var(--r-xl); color: var(--ink); background: linear-gradient(155deg, rgba(255,255,255,.9), rgba(255,255,255,.75)); }
.sheet::backdrop { background: rgba(20, 22, 30, .28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet[open] { animation: sheet-in .5s var(--spring); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(20px) scale(.97); } }
.sheet form { padding: 22px 22px 22px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h3 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.sheet-head .icon-btn { width: 38px; height: 38px; background: rgba(11,11,15,.06); }
.sheet-lead { margin: 6px 0 18px; color: var(--ink-2); font-size: 14px; }
.sheet .btn-block { margin-top: 18px; height: 54px; }
.wa { width: 20px !important; height: 20px !important; }

/* ---------- Aviso ---------- */
.toast { position: fixed; z-index: 90; left: 50%; bottom: 28px; transform: translate(-50%, 30px); padding: 13px 20px; border-radius: 999px; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .35s, transform .5s var(--spring); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsivo ---------- */
@media (max-width: 1180px) {
  :root { --panel-w: 360px; }
  .stepper button span { display: none; }
  .stepper button { padding: 0 12px; }
}
/* Componentes móviles (definidos fuera del media query; solo se usan en móvil) */
.step-dots { display: none; }
.slot-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 4px; border-radius: 16px; background: rgba(11, 11, 15, .06); }
.slot-tab { display: flex; align-items: center; justify-content: center; gap: 7px; height: 38px; border: 0; border-radius: 12px; background: none; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--ink-2); transition: background .25s, box-shadow .25s, color .25s; }
.slot-tab .chip { width: 18px; height: 18px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); flex: none; transition: background .4s; }
.slot-tab[aria-pressed="true"] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 1px rgba(0,0,0,.04), 0 3px 10px -3px rgba(15, 20, 45, .25); }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 860px) { .chip-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; } .chip-row::-webkit-scrollbar { display: none; } .chip-toggle { flex: none; } }
.chip-toggle { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.5); cursor: pointer; font-size: 13px; font-weight: 500; white-space: nowrap; transition: background .25s, color .25s, transform .25s var(--spring); }
.chip-toggle i { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(11,11,15,.25); display: grid; place-items: center; transition: background .25s, box-shadow .25s; }
.chip-toggle[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip-toggle[aria-pressed="true"] i { background: #34c759; box-shadow: none; }
.chip-toggle[aria-pressed="true"] i::after { content: ""; width: 7px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.chip-toggle:active { transform: scale(.96); }
.crest-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--r-md); background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.8); }
.crest-row .img { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; flex: none; background: repeating-conic-gradient(#f0f0f3 0 25%, #fff 0 50%) 0 0 / 10px 10px; }
.crest-row .img img, .crest-row .img canvas { max-width: 38px; max-height: 38px; }
.crest-row b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crest-row input[type=range] { flex: 1; min-width: 0; }
.crest-row .link-btn { margin-left: 0; }
.inline-input { width: 100%; height: 44px; border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.65); border-radius: 14px; padding: 0 14px; font: inherit; font-size: 16px; color: var(--ink); outline: none; }
.inline-input:focus { background: #fff; box-shadow: 0 0 0 3px rgba(11, 11, 15, .12); }
.summary-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.8); font-size: 14px; color: var(--ink-2); }
.summary-line b { color: var(--ink); }

@media (max-width: 860px) {
  :root { --gap: 10px; --pad: 16px; }
  body { overflow: hidden; }
  .topbar { top: 10px; left: 10px; right: 10px; height: 44px; }
  .brand { height: 44px; padding: 0 14px 0 12px; }
  .brand img { width: 34px; }
  .brand-text { font-size: 14px; }
  .icon-btn { width: 44px; height: 44px; }

  /* El paso actual vive en el encabezado del panel: se quita la barra 01–06 */
  .stepper { display: none; }

  /* El panel toma la altura de su contenido; el modelo ocupa el resto */
  .panel { top: auto; left: 10px; right: 10px; width: auto; bottom: calc(10px + env(safe-area-inset-bottom)); max-height: 64svh; border-radius: 26px; }
  .stage { left: 0; right: 0; top: 58px; bottom: calc(var(--panel-h, 330px) + 14px + env(safe-area-inset-bottom)); height: auto; }
  body.is-intro .stage { left: 0; right: 0; top: 0; bottom: calc(var(--intro-h, 45svh) - 40px); }
  .figure { height: 100%; }
  .figure canvas { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 6%, #000 84%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 6%, #000 84%, transparent 100%); }

  .view-switch { bottom: 4px; padding: 3px; gap: 2px; border-radius: 16px; max-width: calc(100vw - 20px); overflow-x: auto; }
  .view-switch button { padding: 2px; border-radius: 12px; }
  .view-switch canvas { width: 28px; height: 34px; border-radius: 9px; }
  .view-switch span { display: none; }
  .zoom-btn { display: none; }

  .panel-head { align-items: center; padding: 14px 16px 4px; gap: 10px; }
  .step-num { font-size: 30px; min-width: 0; padding-top: 0; }
  .panel-head h2 { font-size: 19px; }
  .panel-head p { display: none; }
  .step-text { flex: 1; min-width: 0; }
  .step-dots { display: flex; align-items: center; gap: 5px; }
  .step-dots button { position: relative; width: 7px; height: 7px; padding: 0; border: 0; border-radius: 99px; background: rgba(11, 11, 15, .16); cursor: pointer; transition: width .4s var(--spring), background .3s; }
  .step-dots button.done { background: rgba(11, 11, 15, .45); }
  .step-dots button.on { width: 20px; background: var(--ink); }
  .step-dots button::before { content: ""; position: absolute; inset: -12px -3px; }

  .panel-body { padding: 4px var(--pad) 10px; }
  .panel-foot { padding: 8px 12px 12px; }
  .btn { height: 46px; }
  .group { margin-top: 12px; }
  .group:first-child { margin-top: 4px; }
  .group-label { margin-bottom: 8px; font-size: 11px; }
  .group-label em { font-size: 12px; }

  /* Filas horizontales deslizables */
  .swatches, .pattern-grid, .combos, .font-grid {
    display: flex !important; flex-wrap: nowrap; gap: 8px;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none;
    margin: 0 calc(var(--pad) * -1); padding: 4px var(--pad) 6px; scroll-padding: 0 var(--pad);
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 22px), transparent);
    mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 22px), transparent);
  }
  .swatches::-webkit-scrollbar, .pattern-grid::-webkit-scrollbar, .combos::-webkit-scrollbar, .font-grid::-webkit-scrollbar { display: none; }
  .swatches > *, .pattern-grid > *, .combos > *, .font-grid > * { flex: none; scroll-snap-align: start; }
  .sw { width: 40px; height: 40px; }
  .sw:hover { transform: none; }
  .pattern-tile { width: 74px; gap: 5px; }
  .pattern-tile canvas { border-radius: 16px; }
  .pattern-tile span { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pattern-tile:hover canvas { transform: none; }
  .font-tile { width: 128px; padding: 10px 12px 8px; }
  .font-tile .sample { font-size: 21px; white-space: nowrap; overflow: hidden; }

  .slider { grid-template-columns: 68px 1fr 38px; padding: 6px 14px; gap: 10px; }
  .slider label { font-size: 13.5px; }
  .seg button { height: 34px; }
  .drop-compact { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-align: left; }
  .drop-compact svg { width: 26px; height: 26px; flex: none; }
  .drop-compact span { display: grid; gap: 2px; }
  .field span { font-size: 11px; }
  .big-input { font-size: 22px !important; padding: 8px 12px !important; }
  .hero-btn { height: 52px; }

  .intro { left: 16px; right: 16px; top: auto; bottom: calc(20px + env(safe-area-inset-bottom)); transform: none; padding: 22px; border-radius: 28px; background: linear-gradient(155deg, rgba(255,255,255,.75), rgba(255,255,255,.45)); -webkit-backdrop-filter: blur(22px) saturate(1.8); backdrop-filter: blur(22px) saturate(1.8); border: 1px solid rgba(255,255,255,.8); }
  body:not(.is-intro) .intro { transform: translateY(30px); }
  .intro h1 { font-size: 46px; }
  .intro-lead { font-size: 15px; margin: 14px 0 18px; }
  /* "Estilo" siempre en su propia línea: la tarjeta no cambia de alto al rotar estilos */
  .intro-cta { flex-direction: column; align-items: flex-start; gap: 12px; }
  .intro-points { display: none; }
  .eyebrow { margin-bottom: 10px; font-size: 11px; }
  .stage-hint { display: none; }
  .lb-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
