:root {
  --bg: #07040f; --bg2: #1a0a33; --a: #ff2bd6; --b: #00f0ff;
  --txt: #f4f1ff; --mut: #a59cc4; --line: rgba(255,255,255,.12); --glass: rgba(255,255,255,.06);
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; overflow-x: clip; }
body {
  min-height: 100dvh; color: var(--txt); font: 15px/1.5 Inter, system-ui, sans-serif;
  background: radial-gradient(1200px 800px at 50% -10%, var(--bg2), var(--bg) 65%) fixed, var(--bg);
  overflow-x: hidden;
}
h1, h2, h3 { font-family: 'Space Grotesk', Inter, sans-serif; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code { background: var(--glass); padding: 1px 5px; border-radius: 4px; }

#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
body.fx-front #fx { z-index: 8; }
.view { display: none; position: relative; z-index: 2; min-height: 100dvh; }
.view.active { display: block; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 600; text-decoration: none;
  background: linear-gradient(135deg, var(--a), var(--b)); color: #0a0612;
  box-shadow: 0 6px 24px color-mix(in srgb, var(--a) 35%, transparent);
  transition: transform .15s, box-shadow .2s;
}
.btn:active { transform: scale(.96); }
.btn.ghost { background: var(--glass); color: var(--txt); border: 1px solid var(--line); box-shadow: none; }
.btn.small { padding: 8px 14px; font-size: 13px; }
.icon { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); font-size: 18px; }
.close {
  position: fixed; top: calc(var(--safe-t) + 14px); right: 14px; z-index: 20;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(0,0,0,.4); backdrop-filter: blur(10px); font-size: 18px;
}
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.card { background: var(--glass); border: 1px solid var(--line); border-radius: 20px; padding: 16px; backdrop-filter: blur(14px); }

/* ---------- inicio ---------- */
#v-home { overflow-x: clip; max-width: 560px; margin: 0 auto; padding: calc(var(--safe-t) + 40px) 16px 60px; }
.home-hero { text-align: center; }
.orb {
  width: 96px; height: 96px; margin: 0 auto 18px; border-radius: 50%; position: relative;
  display: grid; place-items: center; font-size: 44px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.2), rgba(255,255,255,.02));
  box-shadow: 0 0 60px color-mix(in srgb, var(--a) 50%, transparent);
}
.orb::before, .hero-logo::before {
  content: ''; position: absolute; inset: -5px; border-radius: 50%; padding: 3px;
  background: conic-gradient(var(--a), var(--b), transparent 70%, var(--a));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 3s linear infinite;
}
.home-hero h1 { font-size: 46px; letter-spacing: -.03em; }
.home-hero h1 span { background: linear-gradient(90deg, var(--a), var(--b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-hero p { color: var(--mut); margin: 4px 0 0; }

.scan-cta {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; margin: 34px 0 40px; padding: 22px; border: 0; border-radius: 26px;
  font: 700 20px 'Space Grotesk', sans-serif; color: #0a0612;
  background: linear-gradient(135deg, var(--a), var(--b));
  box-shadow: 0 10px 50px color-mix(in srgb, var(--a) 45%, transparent);
  animation: breathe 2.4s ease-in-out infinite;
}
.scan-cta .ring { position: absolute; inset: 0; border-radius: 26px; border: 2px solid var(--a); animation: ripple 2.4s ease-out infinite; pointer-events: none; }
.scan-cta .ring.r2 { animation-delay: 1.2s; border-color: var(--b); }

.home-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.home-head h2 { font-size: 20px; }
.booth-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.booth-card {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--ca) 16%, transparent), color-mix(in srgb, var(--cb) 8%, transparent));
  border: 1px solid color-mix(in srgb, var(--ca) 35%, transparent);
}
.bc-logo {
  flex: 0 0 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; overflow: hidden;
  background: color-mix(in srgb, var(--ca) 20%, #000); box-shadow: 0 0 20px color-mix(in srgb, var(--ca) 40%, transparent);
}
.bc-logo img { width: 100%; height: 100%; object-fit: cover; }
.bc-logo.small { font: 700 14px 'Space Grotesk'; }
.bc-txt { flex: 1; min-width: 0; }
.bc-txt b { display: block; font-family: 'Space Grotesk'; font-size: 16px; }
.bc-txt small { display: block; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-act { display: flex; gap: 4px; }
.bc-act button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,.25); font-size: 13px; font-weight: 700; }
.empty { text-align: center; color: var(--mut); padding: 24px; }

.settings { margin-top: 28px; }
.settings summary { cursor: pointer; font-weight: 600; }
.settings[open] summary { margin-bottom: 12px; }
.hint { color: var(--mut); font-size: 12.5px; margin: 6px 0 12px; }

/* ---------- formularios ---------- */
label { display: block; font-size: 13px; color: var(--mut); margin-bottom: 12px; }
input:not([type=checkbox]):not([type=color]), select, textarea {
  display: block; width: 100%; margin-top: 5px; padding: 11px 12px; border-radius: 12px;
  background: rgba(0,0,0,.35); border: 1px solid var(--line); color: var(--txt); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--a); box-shadow: 0 0 0 3px color-mix(in srgb, var(--a) 25%, transparent); }
textarea { resize: vertical; min-height: 90px; }

/* ---------- AR ---------- */
#v-ar { position: fixed; inset: 0; z-index: 30; background: #000; overflow: hidden; touch-action: manipulation; }
#v-ar.active { display: block; }
#ar-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#ar-stage canvas { position: absolute; display: block; }
.ar-hud { position: absolute; inset: 0; pointer-events: none; }
.ar-top { position: absolute; top: calc(var(--safe-t) + 18px); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ar-chip { padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; background: rgba(0,0,0,.5); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.ar-reticle { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; opacity: 0; transition: opacity .4s; }
.ar-reticle.on { opacity: 1; }
.ar-reticle p { background: rgba(0,0,0,.5); padding: 8px 16px; border-radius: 999px; backdrop-filter: blur(8px); }
.frame { position: relative; width: min(64vw, 60vh, 300px); aspect-ratio: 1; border-radius: 24px; animation: breathe 2s ease-in-out infinite; }
.frame i { position: absolute; width: 44px; height: 44px; border: 4px solid var(--a); filter: drop-shadow(0 0 8px var(--a)); }
.frame i:nth-child(1) { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-top-left-radius: 24px; }
.frame i:nth-child(2) { top: -2px; right: -2px; border-left: 0; border-bottom: 0; border-top-right-radius: 24px; }
.frame i:nth-child(3) { bottom: -2px; left: -2px; border-right: 0; border-top: 0; border-bottom-left-radius: 24px; }
.frame i:nth-child(4) { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-bottom-right-radius: 24px; }
.laser { position: absolute; left: 8%; right: 8%; height: 3px; border-radius: 3px; background: var(--b); box-shadow: 0 0 18px 4px var(--b); animation: laser 2s ease-in-out infinite alternate; }
.ar-menu { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 0 calc(var(--safe-b) + 18px); background: linear-gradient(transparent, rgba(0,0,0,.65)); transform: translateY(110%); transition: transform .7s cubic-bezier(.2,1.3,.4,1); pointer-events: auto; }
.ar-menu.on { transform: none; }
.ar-name { text-align: center; font: 700 22px 'Space Grotesk'; margin-bottom: 10px; text-shadow: 0 0 20px var(--a); }
.ar-btns { display: flex; gap: 10px; overflow-x: auto; padding: 4px 16px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.ar-btns::-webkit-scrollbar { display: none; }
.ar-btn { flex: 0 0 auto; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 84px; padding: 12px 14px; border-radius: 18px; font-size: 12.5px; font-weight: 600; background: rgba(20,12,40,.55); border: 1px solid color-mix(in srgb, var(--a) 45%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 0 20px color-mix(in srgb, var(--a) 25%, transparent); }
.ar-btn span { font-size: 26px; line-height: 1; }
.ar-btn:active { transform: scale(.94); }
.ar-menu.on .ar-btn { animation: fadeUp .5s both; }
.ar-menu.on .ar-btn:nth-child(2) { animation-delay: .06s; } .ar-menu.on .ar-btn:nth-child(3) { animation-delay: .12s; }
.ar-menu.on .ar-btn:nth-child(4) { animation-delay: .18s; } .ar-menu.on .ar-btn:nth-child(5) { animation-delay: .24s; }
.ar-menu.on .ar-btn:nth-child(6) { animation-delay: .3s; }
.ar-shot { position: fixed; top: calc(var(--safe-t) + 14px); left: 14px; z-index: 20; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: rgba(0,0,0,.4); backdrop-filter: blur(10px); font-size: 20px; }
.ar-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 25; max-height: 70vh; overflow-y: auto; padding: 22px 18px calc(var(--safe-b) + 24px); border-radius: 26px 26px 0 0; background: color-mix(in srgb, var(--bg) 82%, transparent); border-top: 1px solid var(--a); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transform: translateY(105%); transition: transform .5s cubic-bezier(.2,1,.3,1); box-shadow: 0 -10px 50px color-mix(in srgb, var(--a) 30%, transparent); }
.ar-sheet.on { transform: none; }
.ar-sheet h3 { font-size: 22px; margin-bottom: 8px; }
.sheet-x { position: absolute; top: 14px; right: 14px; }
.danger-btn { color: #ff7a8a; }
.it-row.ar-row { grid-template-columns: 54px 1fr 36px; }
.it-row.ar-row .full { grid-column: 1 / -1; }

/* ---------- experiencia ---------- */
.exp-wrap { max-width: 560px; margin: 0 auto; padding: calc(var(--safe-t) + 64px) 16px calc(var(--safe-b) + 48px); }
.hero { text-align: center; }
.hero-logo {
  width: 140px; height: 140px; margin: 0 auto 22px; position: relative; display: grid; place-items: center;
  font-size: 68px; border-radius: 50%; cursor: pointer; user-select: none; transition: translate .2s ease-out;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.2), rgba(255,255,255,.02));
  box-shadow: 0 0 80px color-mix(in srgb, var(--a) 60%, transparent), inset 0 0 30px rgba(255,255,255,.08);
}
.hero-logo.small { font: 700 34px 'Space Grotesk'; }
.hero-logo img { width: 74%; height: 74%; object-fit: contain; border-radius: 50%; }
.hero-logo::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--b); animation: ripple 2.6s ease-out infinite; }
.title { font-size: clamp(36px, 11vw, 62px); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; margin-bottom: 10px; perspective: 600px; }
.title span { display: inline-block; text-shadow: 0 0 28px color-mix(in srgb, var(--a) 80%, transparent), 0 0 2px #fff; }
.tagline { color: color-mix(in srgb, var(--txt) 75%, var(--b)); font-size: 17px; margin: 0 auto; max-width: 30ch; }
.hero-img { position: relative; max-width: 360px; margin: 26px auto 0; border-radius: 22px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--a) 50%, transparent); box-shadow: 0 0 60px color-mix(in srgb, var(--a) 45%, transparent); animation: floaty 5s ease-in-out infinite; }
.hero-img img { display: block; width: 100%; height: auto; }
.hero-img::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(transparent 0 3px, color-mix(in srgb, var(--a) 10%, transparent) 3px 4px), linear-gradient(115deg, transparent 40%, rgba(255,255,255,.25) 50%, transparent 60%); background-size: auto, 250% 100%; animation: sheen 4s ease-in-out infinite; pointer-events: none; }
#v-exp.pre .hero-img { opacity: 0; }
.revealed .hero-img { animation: rise 1s .55s cubic-bezier(.2,1,.3,1) both, floaty 5s 1.6s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-8px); } }
@keyframes sheen { 0% { background-position: 0 0, 150% 0; } 100% { background-position: 0 0, -50% 0; } }
.title-bar { width: 80px; height: 4px; margin: 16px auto 0; border-radius: 4px; background: linear-gradient(90deg, var(--a), var(--b)); box-shadow: 0 0 16px var(--a); }

.tabs {
  position: sticky; top: calc(var(--safe-t) + 8px); z-index: 5; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding: 6px; margin: 28px 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(0,0,0,.4); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 1 0 auto; border: 0; border-radius: 999px; padding: 10px 16px; background: transparent; font-weight: 600; white-space: nowrap; transition: background .3s, color .3s, box-shadow .3s; }
.tab.on { background: linear-gradient(135deg, var(--a), var(--b)); color: #0a0612; box-shadow: 0 0 24px color-mix(in srgb, var(--a) 60%, transparent); }

.panel-wrap { position: relative; overflow: hidden; border-radius: 24px; padding: 20px; border: 1px solid var(--line); background: rgba(255,255,255,.05); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.panel-wrap::before { content: ''; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, var(--a), var(--b), transparent); }
.panel { display: none; }
.panel.on { display: block; }
.panel .anim { animation: fadeUp .55s cubic-bezier(.2,1,.3,1) both; animation-delay: calc(var(--d, 0s) + var(--i, 0) * .07s); }
.txt { font-size: 16px; line-height: 1.7; }
.item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.item:last-child { border-bottom: 0; }
.item b { display: block; font-size: 16px; }
.item small { color: var(--mut); }
.price { flex: 0 0 auto; font: 700 15px 'Space Grotesk'; padding: 5px 12px; border-radius: 999px; color: var(--a); background: color-mix(in srgb, var(--a) 14%, transparent); border: 1px solid color-mix(in srgb, var(--a) 40%, transparent); }
.link { display: flex; justify-content: space-between; align-items: center; padding: 15px 16px; margin-bottom: 10px; border-radius: 16px; text-decoration: none; color: var(--txt); font-weight: 600; background: rgba(0,0,0,.25); border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s, transform .15s; }
.link:last-child { margin-bottom: 0; }
.link:hover, .link:active { border-color: var(--a); box-shadow: 0 0 20px color-mix(in srgb, var(--a) 35%, transparent); transform: translateX(4px); }
.link span { color: var(--b); }

.cta { display: flex; width: 100%; margin-top: 22px; padding: 18px; font-size: 17px; border-radius: 20px; animation: breathe 2.4s ease-in-out infinite; }
.save-local { display: flex; width: 100%; margin-top: 12px; }
.powered { text-align: center; color: var(--mut); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; margin-top: 30px; opacity: .6; }

/* secuencia de revelado */
#v-exp.pre .hero-logo, #v-exp.pre .title span, #v-exp.pre .tagline, #v-exp.pre .title-bar,
#v-exp.pre .tabs, #v-exp.pre .panel-wrap, #v-exp.pre .cta, #v-exp.pre .save-local, #v-exp.pre .powered { opacity: 0; }
.revealed .hero-logo { animation: pop 1s cubic-bezier(.2,1.6,.4,1) both; }
.revealed .title span { animation: letter .8s cubic-bezier(.2,1.4,.4,1) both; animation-delay: calc(.2s + var(--i) * .045s); }
.revealed .tagline { animation: fadeUp .7s .65s both; }
.revealed .title-bar { animation: grow .8s .8s cubic-bezier(.2,1,.3,1) both; }
.revealed .tabs { animation: fadeUp .7s .9s both; }
.revealed .panel-wrap { animation: rise 1s 1s cubic-bezier(.2,1,.3,1) both; }
.revealed .cta { animation: fadeUp .7s 1.25s both, breathe 2.4s 2s ease-in-out infinite; }
.revealed .save-local, .revealed .powered { animation: fadeUp .7s 1.4s both; }
.shake { animation: shake .5s; }

/* intro glitch */
.glitch-txt { display: none; position: fixed; inset: 0; z-index: 9; place-items: center; text-align: center; padding: 16px; font: 700 clamp(40px, 13vw, 90px) 'Space Grotesk'; letter-spacing: -.02em; pointer-events: none; }
#v-exp.pre.intro-glitch .glitch-txt { display: grid; animation: jitter .12s steps(2) infinite; }
.glitch-txt::before, .glitch-txt::after { content: attr(data-t); position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; }
.glitch-txt::before { color: var(--a); animation: gl1 .4s steps(3) infinite; mix-blend-mode: screen; }
.glitch-txt::after { color: var(--b); animation: gl2 .35s steps(3) infinite; mix-blend-mode: screen; }

/* puerta (al abrir desde URL) */
.gate { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px; background: radial-gradient(circle, var(--bg2), var(--bg) 70%); cursor: pointer; }
.gate[hidden] { display: none; }
.gate-orb { width: 120px; height: 120px; border-radius: 50%; position: relative; background: radial-gradient(circle at 35% 35%, #fff, var(--a) 35%, var(--b) 75%); box-shadow: 0 0 80px var(--a), 0 0 160px var(--b); animation: breathe 1.6s ease-in-out infinite; }
.gate-orb::before, .gate-orb::after { content: ''; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid var(--a); animation: ripple 1.8s ease-out infinite; }
.gate-orb::after { animation-delay: .9s; border-color: var(--b); }
.gate h2 { font-size: clamp(30px, 9vw, 48px); text-align: center; text-shadow: 0 0 30px var(--a); margin-top: 12px; }
.gate .btn { width: min(340px, 100%); padding: 16px; font-size: 16px; }
.gate-go { animation: breathe 2s ease-in-out infinite; }

/* ---------- editor ---------- */
.bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(var(--safe-t) + 12px) 16px 12px; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.bar h2 { font-size: 18px; }
.bar.bottom { position: fixed; top: auto; bottom: 0; left: 0; right: 0; padding: 12px 16px calc(var(--safe-b) + 12px); border-top: 1px solid var(--line); border-bottom: 0; }
.bar.bottom .btn { flex: 1; }
.editor { max-width: 640px; margin: 0 auto; padding: 16px 16px 120px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.editor h3 { font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--sbg); font-size: 12px; font-weight: 600; }
.swatch i { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--sa), var(--sb)); box-shadow: 0 0 14px var(--sa); }
.swatch.on { border-color: var(--sa); box-shadow: 0 0 0 2px var(--sa); }
.color-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 13px; color: var(--mut); }
.color-row input[type=color] { width: 44px; height: 36px; border: 1px solid var(--line); border-radius: 10px; background: none; padding: 2px; }
.switch { display: flex; align-items: center; gap: 10px; color: var(--txt); font-size: 14px; margin: 0; }
.switch input { width: 20px; height: 20px; accent-color: var(--a); }
.tab-card { display: grid; gap: 10px; }
.tab-head { display: grid; grid-template-columns: 54px 1fr 118px; gap: 8px; }
.tab-head input, .tab-head select { margin-top: 0; }
.emoji-in { text-align: center; font-size: 20px; padding: 8px 4px !important; }
.tab-tools { display: flex; gap: 6px; justify-content: flex-end; }
.tab-tools button { padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); background: rgba(0,0,0,.25); font-size: 12px; }
.tab-tools .danger { color: #ff7a8a; }
.it-row { display: grid; grid-template-columns: 1fr 96px 36px; gap: 6px; padding: 10px; border-radius: 14px; background: rgba(0,0,0,.2); }
.it-row input { margin-top: 0 !important; padding: 9px 10px !important; }
.it-row .full { grid-column: 1 / 3; }
.it-row.links { grid-template-columns: 1fr 36px; }
.it-row.links .full { grid-column: 1 / 2; }
.it-row .del { grid-row: 1; grid-column: -2; width: 36px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: #ff7a8a; }
.meter { font-size: 12.5px; color: var(--mut); }
.meter .track { height: 8px; border-radius: 8px; background: rgba(255,255,255,.08); overflow: hidden; margin: 8px 0 6px; }
.meter .fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, #3dff9a, var(--b)); transition: width .3s; }
.meter.warn .fill { background: linear-gradient(90deg, #ffcc4d, #ff8a00); }
.meter.bad .fill { background: linear-gradient(90deg, #ff2e63, #ff7a18); }

/* ---------- QR ---------- */
#v-qr { padding-bottom: 40px; }
.qr-box { max-width: 420px; margin: 24px auto 0; padding: 0 16px; }
#qr-canvas { display: block; width: 100%; height: auto; border-radius: 22px; box-shadow: 0 0 60px color-mix(in srgb, var(--a) 40%, transparent); }
.qr-info { max-width: 420px; margin: 14px auto; padding: 0 16px; color: var(--mut); font-size: 13px; text-align: center; }
.qr-info .warn { display: block; margin-top: 8px; color: #ffcc4d; }
.qr-actions { max-width: 420px; margin: 0 auto; padding: 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qr-actions .btn:first-child { grid-column: 1 / -1; }

/* ---------- varios ---------- */
.flash { position: fixed; inset: 0; z-index: 12; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 35%, #fff 0%, var(--a) 30%, transparent 70%); }
.flash.go { animation: flash .8s ease-out; }
.toast { position: fixed; left: 50%; bottom: calc(var(--safe-b) + 90px); z-index: 50; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 10px 18px; border-radius: 999px; background: rgba(20,14,36,.92); border: 1px solid var(--line); backdrop-filter: blur(10px); transition: .3s; max-width: 90vw; text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
dialog { border: 1px solid var(--line); border-radius: 20px; background: #140e24; color: var(--txt); max-width: min(420px, 90vw); padding: 20px; }
dialog::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(4px); }
dialog p { word-break: break-all; color: var(--mut); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.03); filter: brightness(1.15); } }
@keyframes ripple { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes laser { from { top: 6%; } to { top: 94%; } }
@keyframes pop { 0% { opacity: 0; transform: scale(0) rotate(-120deg); } 100% { opacity: 1; transform: none; } }
@keyframes letter { 0% { opacity: 0; transform: translateY(46px) rotateX(90deg) scale(.5); filter: blur(10px); } 100% { opacity: 1; transform: none; filter: none; } }
@keyframes fadeUp { 0% { opacity: 0; transform: translateY(22px); } 100% { opacity: 1; transform: none; } }
@keyframes rise { 0% { opacity: 0; transform: translateY(60px) scale(.94); filter: blur(6px); } 100% { opacity: 1; transform: none; filter: none; } }
@keyframes grow { 0% { opacity: 0; width: 0; } 100% { opacity: 1; } }
@keyframes flash { 0% { opacity: 1; transform: scale(.5); } 100% { opacity: 0; transform: scale(1.8); } }
@keyframes shake { 0%,100% { transform: none; } 20% { transform: translate(-8px, 4px); } 40% { transform: translate(7px, -5px); } 60% { transform: translate(-5px, 3px); } 80% { transform: translate(3px, -2px); } }
@keyframes blink { 50% { opacity: .35; } }
@keyframes jitter { 0% { transform: translate(2px, -1px) skewX(4deg); } 100% { transform: translate(-3px, 2px) skewX(-6deg); } }
@keyframes gl1 { 0% { clip-path: inset(10% 0 70% 0); transform: translate(-6px, 0); } 50% { clip-path: inset(55% 0 20% 0); transform: translate(5px, 0); } 100% { clip-path: inset(30% 0 45% 0); transform: translate(-3px, 0); } }
@keyframes gl2 { 0% { clip-path: inset(65% 0 10% 0); transform: translate(6px, 0); } 50% { clip-path: inset(5% 0 75% 0); transform: translate(-5px, 0); } 100% { clip-path: inset(40% 0 35% 0); transform: translate(4px, 0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media print {
  body { background: #fff !important; }
  body * { visibility: hidden; }
  #fx { display: none; }
  #qr-canvas, #qr-canvas * { visibility: visible; }
  #qr-canvas { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 80vmin; box-shadow: none; }
}

/* ---------- MetAI Labs ---------- */
.labs-badge { pointer-events: auto; padding: 5px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; color: #fff; background: linear-gradient(135deg, rgba(124,58,237,.75), rgba(236,72,153,.75)); border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 0 16px rgba(168,85,247,.5); }
.exp-badge { position: fixed; top: calc(var(--safe-t) + 22px); left: 14px; z-index: 20; }
.labs-link { margin-top: 6px; background: none; border: 0; color: #d8b4fe; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
button.powered { display: block; margin: 30px auto 0; background: none; border: 0; }
button.powered b { color: #d8b4fe; }
.labs { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.labs.on { opacity: 1; pointer-events: auto; }
.labs-card { position: relative; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; padding: 26px 18px calc(var(--safe-b) + 28px); border-radius: 28px 28px 0 0; background: linear-gradient(180deg, #1a0b33, #0b0614 60%); border-top: 1px solid #a855f7; box-shadow: 0 -10px 60px rgba(168,85,247,.35); transform: translateY(100%); transition: transform .55s cubic-bezier(.2,1,.3,1); color: #f4f1ff; }
.labs.on .labs-card { transform: none; }
.labs-hero { text-align: center; padding: 6px 4px 4px; }
.labs-mark { font: 700 34px 'Space Grotesk', sans-serif; letter-spacing: -.02em; }
.labs-mark span { background: linear-gradient(90deg, #a855f7, #ec4899); -webkit-background-clip: text; background-clip: text; color: transparent; }
.labs-mark b { font-weight: 500; color: #d8b4fe; }
.labs-test { display: inline-block; margin: 10px 0 6px; padding: 6px 14px; border-radius: 999px; font-weight: 700; background: rgba(168,85,247,.18); border: 1px solid rgba(168,85,247,.5); }
.labs-card p { color: #cfc8e6; font-size: 14.5px; line-height: 1.7; margin: 6px 0; }
.labs-card h4 { font: 700 17px 'Space Grotesk', sans-serif; margin: 24px 0 6px; color: #fff; }
.labs-quote { font-weight: 700; color: #f0abfc !important; }
.labs-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.labs-stats div { text-align: center; padding: 12px 4px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.labs-stats b { display: block; font: 700 19px 'Space Grotesk'; color: #f0abfc; }
.labs-stats small { color: #a59cc4; font-size: 11.5px; }
.labs-list { display: grid; gap: 8px; }
.labs-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; text-decoration: none; color: #f4f1ff; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.labs-item > span { flex: 0 0 40px; height: 40px; display: grid; place-items: center; font-size: 22px; border-radius: 12px; background: rgba(168,85,247,.18); }
.labs-item div { flex: 1; min-width: 0; }
.labs-item b { display: block; font-size: 14.5px; }
.labs-item small { display: block; color: #a59cc4; font-size: 12px; line-height: 1.5; }
.labs-item i { color: #d8b4fe; font-style: normal; }
.labs-item.now { border-color: #a855f7; background: rgba(168,85,247,.14); }
.labs-item em { font-style: normal; font-size: 10.5px; padding: 2px 8px; margin-left: 4px; border-radius: 999px; background: #a855f7; color: #fff; vertical-align: 2px; }
.labs-cta { display: grid; gap: 10px; margin-top: 22px; }
.labs-cta .btn { padding: 15px; background: linear-gradient(135deg, #a855f7, #ec4899); color: #fff; }
.labs-cta .btn.ghost { background: rgba(255,255,255,.06); }
.labs-foot { text-align: center; font-size: 12px !important; margin-top: 18px !important; }
.labs-foot a { color: #d8b4fe; }

/* ---------- quiz ---------- */
.quiz-q { font-size: 18px; font-weight: 700; line-height: 1.5; margin: 0 0 14px; }
.quiz-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin-bottom: 10px; padding: 14px 16px; border-radius: 16px; font-size: 16px; font-weight: 600; background: rgba(0,0,0,.25); border: 1px solid var(--line); color: var(--txt); transition: transform .15s, border-color .2s, background .3s; }
.quiz-opt span { flex: 0 0 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; font: 700 15px 'Space Grotesk'; background: color-mix(in srgb, var(--a) 25%, transparent); color: var(--a); }
.quiz-opt:active { transform: scale(.97); }
.quiz.done .quiz-opt { pointer-events: none; opacity: .55; }
.quiz .quiz-opt.right { opacity: 1; border-color: #3dff9a; background: rgba(61,255,154,.16); box-shadow: 0 0 24px rgba(61,255,154,.35); animation: qpop .5s; }
@keyframes qpop { 50% { transform: scale(1.05); } }
.quiz .quiz-opt.right span { background: #3dff9a; color: #04120a; }
.quiz .quiz-opt.wrong { opacity: 1; border-color: #ff4d6d; background: rgba(255,77,109,.14); animation: shake .45s; }
.quiz-res b { display: block; font-size: 22px; margin: 6px 0 4px; }
.quiz-res p { margin: 0 0 12px; color: var(--mut); line-height: 1.6; }

/* ---------- email del catálogo ---------- */
.mail-card { background: linear-gradient(180deg, color-mix(in srgb, var(--bg2) 90%, #000), var(--bg) 70%); border-top-color: var(--a); box-shadow: 0 -10px 60px color-mix(in srgb, var(--a) 35%, transparent); }
.mail-card h3 { font-size: 22px; margin: 4px 40px 6px 0; }
.mail-card form { display: grid; gap: 12px; margin-top: 14px; }
.mail-card input[type=email] { font-size: 17px; padding: 14px; margin: 0; }
.mail-card .btn { padding: 15px; font-size: 16px; }
.mail-card .btn:disabled { opacity: .6; }
.mail-msg { font-size: 14px !important; color: var(--txt) !important; min-height: 1em; margin: 0 !important; }

/* ---------- galería ---------- */
.gal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gal-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px 12px; border-radius: 18px; text-align: center; color: var(--txt); background: rgba(0,0,0,.25); border: 1px solid var(--line); transition: transform .15s, border-color .2s, box-shadow .2s; }
.gal-item:active { transform: scale(.96); }
.gal-item.on { border-color: var(--a); box-shadow: 0 0 22px color-mix(in srgb, var(--a) 45%, transparent); }
.gal-img { width: 100%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 14px; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--a) 30%, transparent), transparent 70%); overflow: hidden; }
.gal-img img { width: 92%; height: 92%; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0,0,0,.5)); }
.gal-item b { font-size: 15px; }
.gal-item small { color: var(--mut); font-size: 11.5px; line-height: 1.4; }
.hero-img.swap { animation: qpop .5s; }
.hero-img img[src$=".png"] { background: radial-gradient(circle at 50% 65%, color-mix(in srgb, var(--a) 35%, transparent), transparent 70%); }
.hero-img img[src$=".png"] { width: auto; max-width: 100%; max-height: 340px; margin: 0 auto; padding: 14px; }
.txt-link { display: flex; width: 100%; margin-top: 16px; padding: 14px; }
.ar-camhelp { position: absolute; left: 16px; right: 16px; top: calc(var(--safe-t) + 120px); z-index: 6; pointer-events: auto; padding: 16px; border-radius: 18px; background: rgba(10,6,20,.85); border: 1px solid var(--a); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); text-align: center; }
.ar-camhelp[hidden] { display: none; }
.ar-camhelp p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.6; }
