* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root {
  --bg: #0b0f19;
  --panel: #111927;
  --panel-2: #161c2a;
  --border: rgba(255,255,255,.08);
  --accent: #ffb020;
  --accent-ink: #241703;
  --text: #f5f7fb;
  --text-soft: #a6b0c3;
  --green: #10b981;
  --red: #ff5c5c;
}
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  margin: 0;
}

.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
}
.back-link { color: var(--text-soft); text-decoration: none; font-size: .85rem; }
.back-link:hover { color: var(--accent); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; }
.brand-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

main { max-width: 1180px; margin: 0 auto; padding: 40px 24px 80px; }

.intro { max-width: 720px; margin: 0 auto 32px; text-align: center; }
.intro-eyebrow {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}
.intro h1 { font-size: 1.9rem; margin: 0 0 14px; line-height: 1.25; }
.intro p { color: var(--text-soft); line-height: 1.6; font-size: .96rem; }
.intro-actions { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 24px; flex-wrap: wrap; }

.btn-play {
  background: linear-gradient(135deg, var(--accent), #d98f10);
  color: var(--accent-ink); border: none; border-radius: 10px;
  padding: 13px 26px; font-weight: 700; font-size: .95rem; cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}
.btn-play:hover { transform: translateY(-1px); }
.btn-play:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.subtitle-toggle {
  display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--text-soft); cursor: pointer;
}
.subtitle-toggle input { accent-color: var(--accent); width: 16px; height: 16px; }

/* ---------- Contenedor del reel: SIEMPRE vertical (9:16) ---------- */
.reel-wrap { max-width: 420px; margin: 0 auto; position: relative; }
.reel-wrap:fullscreen,
.reel-wrap.pseudo-fullscreen {
  max-width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #000;
}
.reel-wrap.pseudo-fullscreen { position: fixed; inset: 0; z-index: 9999; }
/* Mismo fix de margen/aspect-ratio que el resto de las demos reel (doc69): forzar solo la
   altura y dejar el ancho en auto -- si se deja width:100% el canvas pierde la proporción
   9:16 en desktop y el contenido queda recortado fuera del área visible. */
.reel-wrap:fullscreen .reel-canvas,
.reel-wrap.pseudo-fullscreen .reel-canvas {
  width: auto;
  height: min(100vh, 780px);
  max-width: 100%;
}
body.pseudo-fullscreen-lock { overflow: hidden; }

.btn-reel-fullscreen {
  position: absolute; top: 10px; right: 10px; z-index: 20;
  background: rgba(10,14,22,.75); border: 1px solid var(--border); color: var(--text-soft);
  width: 34px; height: 34px; border-radius: 8px; cursor: pointer; font-size: .95rem;
}
.btn-reel-fullscreen:hover { color: var(--accent); border-color: var(--accent); }

.reel-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: 34px;
  border: 10px solid #1c2536;
  box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 0 1px var(--border);
  overflow: hidden;
}

.reel-scene { position: absolute; inset: 0; display: flex; flex-direction: column; }
.reel-phone-notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 34%; height: 22px; background: #05070c; border-radius: 0 0 14px 14px; z-index: 5;
}

/* ---------- Escena A: gancho ---------- */
.reel-scene-hook {
  background: radial-gradient(circle at 50% 40%, #241a08, #05070c 70%);
  align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 20px;
}
.hook-logo { width: 60px; height: auto; margin-bottom: 4px; animation: hookPop .4s ease; }
.hook-brand { font-size: 1.25rem; font-weight: 800; animation: hookPop .4s ease .05s both; }
.hook-brand span { color: var(--accent); }
.hook-tag {
  margin-top: 10px; max-width: 82%; font-size: .82rem; color: var(--text-soft); line-height: 1.5;
  opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .35s ease;
}
.hook-tag.show { opacity: 1; transform: none; }
@keyframes hookPop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }

/* ---------- Escena B: mockup de laptop, panel de Menú Web ---------- */
.reel-scene-laptop { background: #05070c; align-items: center; justify-content: center; padding: 0 14px; }
.reel-laptop-mock { width: 100%; animation: popIn .25s ease; }
.reel-laptop-screen {
  background: var(--panel); border: 2px solid #263047; border-radius: 8px 8px 2px 2px;
  aspect-ratio: 16 / 10; overflow: hidden; display: flex; flex-direction: column;
}
.reel-laptop-base { height: 8px; background: linear-gradient(180deg, #263047, #1c2536); border-radius: 0 0 6px 6px; margin: 0 -6px; }
.reel-laptop-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

.menuweb-mini-panel { padding: 0; }
.menuweb-mini-tabs { display: flex; gap: 4px; padding: 5px 7px; background: var(--panel-2); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.mini-tab { padding: 4px 8px; border-radius: 6px; font-size: .48rem; font-weight: 700; color: var(--text-soft); }
.mini-tab.active { color: var(--accent-ink); background: var(--accent); }

.menuweb-mini-topbar { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.menuweb-mini-topbar span { font-size: .5rem; font-weight: 700; color: var(--text); }
.mini-btn {
  display: inline-flex; align-items: center; gap: 3px; background: transparent; border: 1px solid var(--border);
  color: var(--text); border-radius: 6px; padding: 3px 7px; font-size: .44rem; font-weight: 700;
}
.mini-btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.mini-btn-highlight { border-color: var(--accent); color: var(--accent); animation: miniPulse 1.2s ease infinite; }
.mini-btn-pulse { animation: miniPulse .3s ease 2; }
@keyframes miniPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,176,32,.45); } 50% { box-shadow: 0 0 0 5px rgba(255,176,32,0); } }

#miniViewPlatos, #miniViewDiseno { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.menuweb-mini-list { flex: 1; overflow-y: auto; padding: 5px 6px; position: relative; }
.mini-plato-row {
  display: flex; align-items: center; gap: 5px; padding: 4px 5px; border-radius: 5px; margin-bottom: 3px;
  background: #0f1522; border: 1px solid transparent;
}
.mini-plato-row.selected { border-color: var(--accent); background: rgba(255,176,32,.1); }
.mini-plato-check {
  width: 9px; height: 9px; border-radius: 2px; border: 1px solid var(--text-soft); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: .4rem; color: var(--accent-ink);
}
.mini-plato-row.selected .mini-plato-check { background: var(--accent); border-color: var(--accent); }
.mini-plato-thumb { width: 16px; height: 16px; border-radius: 4px; background: linear-gradient(135deg,#3a2a10,#2a1c08); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: .55rem; }
.mini-plato-info { flex: 1; min-width: 0; }
.mini-plato-name { font-size: .46rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.mini-plato-section { font-size: .4rem; color: var(--text-soft); }
.mini-plato-price { font-size: .46rem; font-weight: 800; color: var(--accent); transition: color .3s ease; }
.mini-plato-price.price-updated { color: var(--green); animation: priceFlash .8s ease; }
@keyframes priceFlash { 0% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes miniRowIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }

.menuweb-mini-bulkbar {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 5px 7px; background: rgba(255,176,32,.12); border-top: 1px solid var(--border); flex-shrink: 0;
  animation: miniRowIn .2s ease;
}
.menuweb-mini-bulkbar span { font-size: .44rem; font-weight: 700; color: var(--text); }

.mini-modal { position: absolute; inset: 0; background: rgba(6,9,15,.78); display: flex; align-items: center; justify-content: center; z-index: 20; animation: miniRowIn .2s ease; }
.mini-modal-box { background: var(--panel-2); border: 1px solid var(--accent); border-radius: 8px; padding: 8px 9px; width: 82%; box-shadow: 0 10px 26px rgba(0,0,0,.5); }
.mini-modal-box h5 { margin: 0 0 6px; font-size: .48rem; color: var(--text); }
.mini-modal-box label { display: block; font-size: .38rem; font-weight: 700; color: var(--text-soft); margin: 4px 0 2px; }
.mini-modal-field {
  background: #0b0f19; border: 1px solid var(--border); border-radius: 5px; padding: 4px 6px;
  font-size: .42rem; color: var(--text); min-height: 1.1em;
}
.mini-modal-toggle { display: flex; gap: 4px; margin-bottom: 6px; }
.mini-modal-toggle span { flex: 1; text-align: center; padding: 3px; border-radius: 5px; font-size: .4rem; font-weight: 700; background: #0b0f19; border: 1px solid var(--border); color: var(--text-soft); }
.mini-modal-toggle span.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.mini-modal-input { background: #0b0f19; border: 1px solid var(--border); border-radius: 5px; padding: 5px; color: var(--text); font-size: .5rem; text-align: center; margin-bottom: 6px; font-weight: 700; }
.mini-modal-apply { width: 100%; background: var(--accent); color: var(--accent-ink); border: none; border-radius: 5px; padding: 5px; font-weight: 800; font-size: .42rem; margin-top: 4px; }

.menuweb-mini-templates { flex: 1; display: flex; gap: 6px; padding: 6px 7px; align-items: flex-start; min-height: 0; overflow: hidden; }
.mini-tpl-card { flex: 1; border: 1px solid var(--border); border-radius: 7px; padding: 5px; text-align: center; transition: border-color .2s ease, transform .2s ease; }
.mini-tpl-swatch { width: 100%; aspect-ratio: 2.4/1; border-radius: 5px; margin-bottom: 4px; }
.mini-tpl-swatch.tpl-bistro { background: linear-gradient(160deg,#3a2a10,#1b1206); }
.mini-tpl-swatch.tpl-noir { background: linear-gradient(160deg,#151515,#050505); border: 1px solid #d4af37; }
.mini-tpl-card span { font-size: .4rem; color: var(--text-soft); }
.mini-tpl-card.selected { border-color: var(--accent); transform: translateY(-1px); }
.mini-tpl-card.selected span { color: var(--accent); font-weight: 700; }

/* ---------- Escena C: teléfono del cliente -- menú público final ---------- */
.reel-scene-phone { background: #05070c; }
.phone-qr-overlay {
  position: absolute; inset: 0; background: #05070c; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; z-index: 5; transition: opacity .4s ease;
}
.phone-qr-overlay.qr-fading { opacity: 0; pointer-events: none; }
.phone-qr-box { width: 68px; height: 68px; background: #fff; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; }
.phone-qr-overlay p { color: var(--text-soft); font-size: .64rem; margin: 0; text-align: center; padding: 0 20px; }

.menuweb-public { position: absolute; inset: 0; overflow-y: auto; opacity: 0; transition: opacity .3s ease; background: var(--panel); padding-top: 24px; }
.menuweb-public.menu-visible { opacity: 1; }
.menuweb-public.tpl-bistro { background: linear-gradient(180deg,#241608,#0d0904); }
.menuweb-public.tpl-noir { background: #0a0a0a; }
.menuweb-public-header { padding: 10px 16px 12px; text-align: center; border-bottom: 1px solid var(--border); }
.menuweb-public-header h3 { margin: 0 0 4px; font-size: .8rem; color: var(--text); }
.menuweb-public-header span { font-size: .5rem; color: var(--text-soft); }
.menuweb-public.tpl-noir .menuweb-public-header h3 { color: #d4af37; font-family: Georgia, serif; }
.menuweb-public-section { padding: 10px 16px 2px; }
.menuweb-public-section h4 { font-size: .56rem; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); margin: 0 0 6px; }
.menuweb-public.tpl-noir .menuweb-public-section h4 { color: #d4af37; }
.menuweb-public-item { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.menuweb-public-item-name { font-size: .58rem; color: var(--text); }
.menuweb-public-item-price { font-size: .58rem; font-weight: 700; color: var(--accent); transition: color .3s ease; }
.menuweb-public-item-price.price-updated { color: var(--green); animation: priceFlash .8s ease; }

/* ---------- Escena final ---------- */
.reel-scene-outro {
  background: radial-gradient(circle at 50% 40%, #241a08, #05070c 70%);
  align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 20px;
  animation: popIn .3s ease;
}
.outro-logo { width: 64px; height: auto; margin-bottom: 4px; }
.outro-brand { font-size: 1.3rem; font-weight: 800; }
.outro-brand span { color: var(--accent); }
.outro-tag { font-size: .7rem; color: var(--text-soft); }
.outro-cta { margin-top: 10px; font-size: .72rem; font-weight: 700; color: var(--accent); letter-spacing: .04em; }

/* ---------- Subtítulos ---------- */
.reel-subtitle-bar {
  position: absolute; left: 10px; right: 10px; bottom: 14px; z-index: 10;
  text-align: center; font-size: .82rem; line-height: 1.45; color: var(--text);
  background: rgba(10, 14, 22, .88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 9px 12px;
  animation: subtitleIn .2s ease;
}
.reel-subtitle-bar.reel-subtitle-top { top: 30px; bottom: auto; }
@keyframes subtitleIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.replay-wrap { text-align: center; margin-top: 20px; }
.btn-replay { background: transparent; border: 1px solid var(--accent); color: var(--accent); }

.footnote { max-width: 640px; margin: 36px auto 0; text-align: center; }
.footnote p { color: var(--text-soft); font-size: .78rem; line-height: 1.6; }
.footnote a { color: var(--accent); }

.menuweb-mini-list, .menuweb-public {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.25) transparent;
}
