/* =========================================================
   Marco de presentación: diseño CuySoft
   App dentro del teléfono: diseño Cinemark
   ========================================================= */

:root {
  /* CuySoft */
  --cs-bg: #04060c; --cs-bg2: #0a0f1c; --cs-ink: #e8ecf5; --cs-dim: #9aa3b8;
  --cs-cyan: #39e8ff; --cs-amber: #ffb000; --cs-mag: #ff3d9a; --cs-ivory: #f2efe8;
  --cs-line: rgba(255,255,255,.09);
  --cs-cut: polygon(0 10px, 10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  --f-hud: "Chakra Petch", "Archivo", system-ui, sans-serif;
  --f-body: "Archivo", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  /* Cinemark */
  --cm-red: #DD0000; --cm-red-600: #BE0D0D; --cm-red-300: #EB6666;
  --cm-900: #12100D; --cm-800: #23211E; --cm-700: #363333; --cm-600: #787272; --cm-500: #AAA9A8;
  --cm-200: #F7F6F5; --cm-100: #FFFFFF;
  --cm-green: #107555; --cm-green-ok: #29CC6A; --cm-amber: #ED9726; --cm-blue: #0099FF;
  --f-cm-h: "Oswald", Impact, sans-serif;
  --f-cm-b: "Work Sans", Arial, sans-serif;

  --phone-h: min(82vh, 860px);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--cs-bg); color: var(--cs-ink); font-family: var(--f-body);
  overflow: hidden; -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(rgba(57,232,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57,232,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
}
button { font: inherit; cursor: pointer; }
.hidden { display: none !important; }

#shell { height: 100%; display: grid; grid-template-rows: auto 1fr auto; }

/* ---------- Cabecera CuySoft ---------- */
#top { display: flex; align-items: center; justify-content: space-between; padding: 14px 28px; border-bottom: 1px solid var(--cs-line); gap: 16px; }
.kicker { font-family: var(--f-mono); font-size: 11px; letter-spacing: .22em; color: var(--cs-cyan); text-transform: uppercase; }
#top h1 { margin: 4px 0 0; font-family: var(--f-hud); font-weight: 700; font-size: 22px; letter-spacing: .01em; }
#top h1 em { font-style: normal; color: var(--cs-cyan); }
.actions { display: flex; gap: 10px; }
.cbtn {
  font-family: var(--f-hud); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  padding: 10px 18px; border: 1px solid rgba(57,232,255,.45); background: rgba(57,232,255,.08); color: var(--cs-ink);
  clip-path: var(--cs-cut); transition: background .2s, color .2s;
}
.cbtn:hover { background: rgba(57,232,255,.18); }
.cbtn.primary { background: var(--cs-cyan); color: #04060c; border-color: var(--cs-cyan); }
.cbtn.primary:hover { background: #7df0ff; }
.cbtn.ghost { border-color: var(--cs-line); background: transparent; color: var(--cs-dim); }

/* ---------- Área central ---------- */
#main { display: grid; grid-template-columns: 1fr minmax(280px, 380px); align-items: center; gap: 24px; padding: 14px 28px; min-height: 0; }
#phone-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 0; }

/* ---------- Teléfono ---------- */
/* El teléfono tiene un tamaño fijo (414×852) y se escala con transform
   para verse idéntico en cualquier pantalla o proyector. */
#phone-box { position: relative; width: calc(414px * var(--s, 1)); height: calc(852px * var(--s, 1)); flex: none; }
#phone {
  position: absolute; left: 0; top: 0; width: 414px; height: 852px; transform: scale(var(--s, 1)); transform-origin: 0 0;
  background: #050505; border-radius: 52px; padding: 12px;
  box-shadow: 0 40px 100px rgba(0,0,0,.7), 0 0 0 2px #2b2b2b, 0 0 0 7px #0d0d0d, 0 0 80px rgba(57,232,255,.08);
}
#phone .notch { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 34%; height: 24px; background: #000; border-radius: 16px; z-index: 30; }
.screen { position: absolute; inset: 12px; border-radius: 42px; background: var(--cm-900); overflow: hidden; color: var(--cm-100); font-family: var(--f-cm-b); isolation: isolate; }
.screen canvas#gl { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; display: none; }
.screen canvas#phys { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 20; pointer-events: none; }
.screen.gl canvas#gl { display: block; }

.caption { margin: 0; font-family: var(--f-hud); font-size: 15px; color: var(--cs-dim); letter-spacing: .04em; }
.caption b { color: var(--cs-cyan); font-family: var(--f-mono); margin-right: 8px; }

/* ---------- Vistas de la app ---------- */
.view { position: absolute; inset: 0; z-index: 5; display: none; flex-direction: column; background: var(--cm-900); opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease; }
.view.active { display: flex; opacity: 1; transform: none; }
.view.ar { background: transparent; }
.win, .center, .trivia, .form, .final, .posters { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.win::-webkit-scrollbar, .center::-webkit-scrollbar, .trivia::-webkit-scrollbar, .form::-webkit-scrollbar { display: none; }
.win > *, .center > *, .final > * { flex: none; }

.appbar { display: flex; align-items: center; justify-content: space-between; padding: 48px 20px 12px; background: var(--cm-900); z-index: 3; }
.appbar.dark { background: rgba(18,16,13,.92); position: absolute; top: 0; left: 0; right: 0; }
.appbar.transparent { background: linear-gradient(rgba(0,0,0,.6), transparent); position: absolute; top: 0; left: 0; right: 0; }
.wordmark { width: 110px; height: 17px; color: #fff; }
.wordmark.sm { width: 86px; height: 13px; }
.pill { font-family: var(--f-cm-h); font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 8px; background: var(--cm-800); color: var(--cm-100); white-space: nowrap; }
.counter, .arcount { white-space: nowrap; }
.pill.red { background: var(--cm-red); }
.tag { display: inline-block; font-family: var(--f-cm-h); font-weight: 600; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding: 5px 10px; border-radius: 8px; background: var(--cm-red); color: #fff; }
.iconbtn { width: 36px; height: 36px; border-radius: 12px; border: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 26px; line-height: 1; }

.btn { font-family: var(--f-cm-h); font-weight: 600; font-size: 16px; letter-spacing: .06em; text-transform: uppercase; border: 0; border-radius: 12px; height: 54px; width: 100%; transition: transform .15s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn.red { background: var(--cm-red); color: #fff; box-shadow: 0 10px 30px rgba(221,0,0,.35); }
.btn.red:hover { background: #ff1f1f; }
.btn.white { background: #fff; color: var(--cm-900); }

/* Splash */
.splash { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; cursor: pointer; background: radial-gradient(circle at 50% 30%, #2a0000 0%, var(--cm-900) 60%); }
.splash .wordmark { width: 62%; height: auto; }
.clapper { width: 92px; animation: clap-bob 2.4s ease-in-out infinite; }
.clap-top { height: 22px; background: repeating-linear-gradient(-45deg, #fff 0 12px, var(--cm-red) 12px 24px); border-radius: 6px 6px 0 0; transform-origin: left bottom; animation: clap 2.4s ease-in-out infinite; }
.clap-body { height: 60px; background: var(--cm-red); border-radius: 0 0 8px 8px; display: grid; place-items: center; color: #fff; font-size: 24px; }
.tap { font-family: var(--f-cm-h); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; color: var(--cm-500); animation: pulse 1.6s infinite; }
@keyframes clap { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-18deg); } 80% { transform: rotate(0); } }
@keyframes clap-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }

/* Home */
.hero { margin: 8px 18px 0; padding: 20px 18px 18px; border-radius: 18px; background: linear-gradient(160deg, #3a0000, #1b0000 60%, #12100D); border: 1px solid rgba(255,255,255,.08); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(221,0,0,.45), transparent 70%); }
.hero h2 { font-family: var(--f-cm-h); font-weight: 600; font-size: 28px; line-height: 1.05; margin: 12px 0 8px; }
.hero p { font-size: 13px; line-height: 1.4; color: #e3e2e2; margin: 0 0 14px; }
.hero-tickets { display: flex; gap: 8px; margin-bottom: 16px; }
.hero-tickets i { width: 46px; height: 24px; border-radius: 5px; background: var(--cm-red); opacity: .45; position: relative; }
.hero-tickets i::before, .hero-tickets i::after { content: ""; position: absolute; top: 50%; width: 8px; height: 8px; border-radius: 50%; background: #2a0000; transform: translateY(-50%); }
.hero-tickets i::before { left: -4px; } .hero-tickets i::after { right: -4px; }
.posters { padding: 18px; }
.posters h3 { font-family: var(--f-cm-h); font-weight: 600; font-size: 14px; letter-spacing: .08em; margin: 0 0 10px; color: var(--cm-500); }
.posters .row { display: flex; gap: 10px; }
.poster { flex: 1; aspect-ratio: 2/3; border-radius: 10px; position: relative; overflow: hidden; }
.poster b { position: absolute; left: 6px; bottom: 6px; font-family: var(--f-cm-h); font-size: 9px; letter-spacing: .06em; background: rgba(0,0,0,.6); padding: 3px 5px; border-radius: 5px; }
.poster.p1 { background: linear-gradient(170deg, #3b1d5a, #0c0612); }
.poster.p2 { background: linear-gradient(170deg, #5a2f1d, #120806); }
.poster.p3 { background: linear-gradient(170deg, #1d3f5a, #06101a); }
.poster.p4 { background: linear-gradient(170deg, #4d1d1d, #120606); }

/* Mapa */
#v-map { background: #1a1714; }
#mapc { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.counter { display: flex; align-items: center; gap: 4px; }
.counter .tk { width: 22px; height: 12px; border-radius: 3px; background: var(--cm-700); position: relative; }
.counter .tk.on { background: var(--cm-red); box-shadow: 0 0 10px rgba(221,0,0,.7); }
.counter b { font-family: var(--f-cm-h); font-size: 14px; margin-left: 6px; }
.radar { position: absolute; left: 16px; right: 16px; top: 92px; z-index: 3; background: rgba(18,16,13,.82); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 8px 12px; }
.radar-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--f-cm-h); font-size: 11px; letter-spacing: .12em; color: var(--cm-500); }
.radar-top b { font-size: 13px; color: #fff; transition: color .3s; }
.radar .bars { display: flex; gap: 4px; margin-top: 6px; align-items: flex-end; height: 16px; }
.radar .bars i { flex: 1; background: var(--cm-700); border-radius: 2px; height: 100%; transition: background .25s, box-shadow .25s; }
.radar .bars i:nth-child(1) { height: 40%; } .radar .bars i:nth-child(2) { height: 55%; } .radar .bars i:nth-child(3) { height: 70%; } .radar .bars i:nth-child(4) { height: 85%; }
.radar.l1 .bars i:nth-child(-n+1), .radar.l2 .bars i:nth-child(-n+2), .radar.l3 .bars i:nth-child(-n+3), .radar.l4 .bars i:nth-child(-n+4), .radar.l5 .bars i { background: var(--rc, #0099FF); box-shadow: 0 0 10px var(--rc, #0099FF); }
.radar.l1 { --rc: #0099FF; } .radar.l2 { --rc: #29CC6A; } .radar.l3 { --rc: #ED9726; } .radar.l4 { --rc: #FF3939; } .radar.l5 { --rc: #DD0000; }
.radar.l4 .radar-top b, .radar.l5 .radar-top b { color: #FF3939; animation: pulse .5s infinite; }
.map-hint { position: absolute; left: 16px; right: 16px; bottom: 118px; text-align: center; font-family: var(--f-cm-h); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: rgba(18,16,13,.75); padding: 8px 12px; border-radius: 10px; z-index: 3; }
.scanbtn { position: absolute; left: 16px; right: 16px; bottom: 44px; width: auto; z-index: 4; display: none; animation: scan-pop .4s ease; }
.scanbtn.show { display: block; }
@keyframes scan-pop { from { transform: translateY(16px); opacity: 0; } }
.joy { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); width: 84px; height: 84px; border-radius: 50%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); z-index: 3; touch-action: none; }
.joy .knob { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: rgba(255,255,255,.85); box-shadow: 0 4px 12px rgba(0,0,0,.4); }
#v-map.near .joy { opacity: .35; }

/* AR */
.arcount { font-family: var(--f-cm-h); font-size: 14px; }
.reticle { position: absolute; left: 50%; top: 50%; width: 46%; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; z-index: 2; }
.reticle i { position: absolute; width: 26px; height: 26px; border: 3px solid rgba(255,255,255,.85); }
.reticle i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.reticle i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.reticle i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.reticle i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }
#v-ar.lock .reticle i { border-color: var(--cm-red); box-shadow: 0 0 12px rgba(221,0,0,.8); }
.ar-hint { position: absolute; left: 16px; right: 16px; bottom: 40px; text-align: center; font-family: var(--f-cm-h); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: rgba(18,16,13,.7); padding: 10px 12px; border-radius: 10px; z-index: 2; }
.scan { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 14px; background: rgba(0,0,0,.35); z-index: 6; }
.scan.show { display: flex; }
.scan .frame { width: 60%; aspect-ratio: 1; border: 3px solid var(--cm-red); border-radius: 14px; position: relative; overflow: hidden; box-shadow: 0 0 30px rgba(221,0,0,.5); }
.scan .line { position: absolute; left: 0; right: 0; height: 3px; background: #fff; box-shadow: 0 0 14px #fff; animation: scanline 1.2s linear infinite; }
@keyframes scanline { from { top: 0; } to { top: 100%; } }
.scan p { margin: 0; font-family: var(--f-cm-h); letter-spacing: .2em; font-size: 14px; }
.found { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(18,16,13,.72); z-index: 7; }
.found.show { display: flex; }
.found .card { width: 82%; padding: 24px 18px 18px; border-radius: 18px; background: var(--cm-800); text-align: center; position: relative; animation: card-in .45s cubic-bezier(.2,.9,.3,1.3); }
.found .card img { width: 100%; filter: drop-shadow(0 10px 24px rgba(221,0,0,.5)); }
.found .check, .bigticket .check { position: absolute; width: 56px; height: 56px; border-radius: 50%; background: var(--cm-green-ok); color: #fff; display: grid; place-items: center; font-size: 30px; font-weight: 700; border: 4px solid var(--cm-800); animation: pop .4s .2s both; }
.found .check { right: 10px; top: 54px; }
.found h3 { font-family: var(--f-cm-h); font-weight: 600; font-size: 22px; margin: 12px 0 0; }
.found p { font-family: var(--f-cm-h); color: var(--cm-green-ok); letter-spacing: .14em; font-size: 14px; margin: 2px 0 16px; }
@keyframes card-in { from { transform: scale(.7); opacity: 0; } }
@keyframes pop { from { transform: scale(0); } }

/* Colección */
.center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: safe center; padding: 0 20px 20px; gap: 6px; }
.big { font-family: var(--f-cm-h); font-weight: 700; font-size: 54px; margin: 0; line-height: 1; color: #fff; }
.sub { font-family: var(--f-cm-h); letter-spacing: .18em; font-size: 14px; margin: 0 0 14px; color: var(--cm-green-ok); }
.collection { list-style: none; padding: 0; margin: 0 0 20px; width: 100%; display: grid; gap: 10px; }
.collection li { display: flex; align-items: center; gap: 12px; background: var(--cm-800); border-radius: 12px; padding: 8px 12px; opacity: 0; transform: translateX(-20px); animation: li-in .5s forwards; }
.collection li:nth-child(2) { animation-delay: .25s; } .collection li:nth-child(3) { animation-delay: .5s; }
.collection img { width: 84px; }
.collection span { flex: 1; font-family: var(--f-cm-h); font-size: 16px; letter-spacing: .06em; }
.collection b { width: 30px; height: 30px; border-radius: 50%; background: var(--cm-green-ok); display: grid; place-items: center; }
@keyframes li-in { to { opacity: 1; transform: none; } }

/* Trivia */
.trivia { padding: 10px 20px; flex: 1; display: flex; flex-direction: column; }
.trivia h2 { font-family: var(--f-cm-h); font-weight: 600; font-size: 24px; margin: 0 0 8px; }
.trivia .q { font-size: 15px; line-height: 1.4; color: #e3e2e2; margin: 0 0 18px; }
.options { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--cm-800); color: #fff; border: 2px solid transparent; border-radius: 14px; padding: 12px 14px; font-family: var(--f-cm-h); font-size: 18px; letter-spacing: .04em; transition: background .2s, border-color .2s; }
.opt span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--cm-700); font-size: 14px; }
.opt:hover { background: var(--cm-700); }
.opt.ok { background: var(--cm-green); border-color: var(--cm-green-ok); }
.opt.ok::after { content: "✓"; margin-left: auto; font-weight: 700; }
.opt.bad { background: #3a0d0d; border-color: var(--cm-red); animation: shake .4s; }
.opt:disabled { cursor: default; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.feedback { min-height: 22px; font-size: 14px; margin: 14px 0; color: var(--cm-500); }
.trivia .btn { margin-top: auto; margin-bottom: 20px; }

/* Formulario */
.form { padding: 10px 20px 20px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.form h2 { font-family: var(--f-cm-h); font-weight: 600; font-size: 24px; margin: 0; }
.form p { margin: 0 0 8px; color: var(--cm-500); font-size: 13px; }
.form label { display: flex; align-items: center; gap: 10px; background: var(--cm-800); border-radius: 12px; padding: 0 14px; height: 52px; border: 1px solid transparent; }
.form label:focus-within { border-color: var(--cm-500); }
.form label i { font-style: normal; font-size: 16px; opacity: .8; }
.form input { flex: 1; background: transparent; border: 0; color: #fff; font: 500 15px var(--f-cm-b); outline: none; }
.form input::placeholder { color: var(--cm-500); }
.form .btn { margin-top: auto; }

/* Ganaste */
.win { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: 10px; padding: 40px 20px 20px; background: radial-gradient(circle at 50% 20%, #5a0000, #1a0000 55%, var(--cm-900)); position: relative; overflow: hidden; text-align: center; }
.rays { position: absolute; left: 50%; top: 28%; width: 160%; aspect-ratio: 1; transform: translate(-50%, -50%); background: repeating-conic-gradient(rgba(255,255,255,.07) 0 8deg, transparent 8deg 16deg); border-radius: 50%; animation: spin 24s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.win .tag { background: #fff; color: var(--cm-red); font-size: 14px; position: relative; }
.bigticket { position: relative; width: 70%; margin: 4px 0; animation: float 3s ease-in-out infinite; }
.bigticket img { width: 100%; filter: drop-shadow(0 16px 30px rgba(0,0,0,.6)); }
.bigticket .check { right: -8px; top: -14px; border-color: #3a0000; }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(-3deg); } }
.win h2 { font-family: var(--f-cm-b); font-weight: 400; font-size: 14px; line-height: 1.35; margin: 0; position: relative; }
.win h2 b { font-family: var(--f-cm-h); font-weight: 600; font-size: 22px; display: block; }
.qrbox { background: #fff; color: var(--cm-900); border-radius: 14px; padding: 10px 14px; display: flex; align-items: center; gap: 12px; position: relative; }
#qr img, #qr canvas { display: block; width: 84px; height: 84px; image-rendering: pixelated; }
.qrbox small { text-align: left; font-size: 10px; line-height: 1.4; color: var(--cm-600); }
.qrbox small b { font-family: var(--f-cm-h); font-size: 13px; color: var(--cm-900); letter-spacing: .06em; }
.win .btn { margin-top: 6px; position: relative; }

/* Final */
.final { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 10px; padding: 0 22px 24px; text-align: center; background: linear-gradient(transparent 35%, rgba(18,16,13,.95) 75%); }
.final h2 { font-family: var(--f-cm-h); font-weight: 700; font-size: 44px; line-height: .95; margin: 0; }
.final p { margin: 0; font-size: 14px; color: #e3e2e2; }
.final p b { font-family: var(--f-cm-h); font-size: 20px; display: block; letter-spacing: .04em; }
.countdown { display: flex; gap: 8px; margin: 8px 0 10px; }
.countdown div { background: var(--cm-800); border-radius: 10px; padding: 8px 10px; min-width: 58px; }
.countdown b { font-family: var(--f-cm-h); font-size: 24px; display: block; line-height: 1; }
.countdown i { font-style: normal; font-size: 10px; color: var(--cm-500); text-transform: uppercase; letter-spacing: .1em; }

/* ---------- Panel de explicación CuySoft ---------- */
#explain { border: 1px solid var(--cs-line); background: rgba(10,15,28,.7); padding: 22px 24px; clip-path: var(--cs-cut); align-self: center; max-height: calc(100vh - 220px); overflow: auto; }
#explain h2 { font-family: var(--f-hud); font-size: 22px; margin: 8px 0 16px; line-height: 1.15; }
#explain h4 { font-family: var(--f-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--cs-amber); margin: 14px 0 6px; }
#explain p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--cs-ink); }
.keys { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 18px; font-size: 12px; color: var(--cs-dim); }
kbd { font-family: var(--f-mono); font-size: 11px; background: #0a0f1c; border: 1px solid var(--cs-line); padding: 2px 6px; border-radius: 4px; color: var(--cs-cyan); }
.concept { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--cs-line); }
.concept p { color: var(--cs-dim); font-size: 13px; }
.concept b { color: var(--cs-ink); }

/* ---------- Tira de pasos ---------- */
#bottom { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px; padding: 12px 28px 16px; border-top: 1px solid var(--cs-line); }
#strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; }
#strip li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--cs-line); background: rgba(10,15,28,.6); cursor: pointer; clip-path: polygon(0 6px, 6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%); transition: border-color .2s, background .2s; min-width: 0; }
#strip li b { font-family: var(--f-mono); font-size: 11px; background: var(--cs-cyan); color: #04060c; padding: 2px 5px; flex: none; }
#strip li span { font-family: var(--f-hud); font-size: 11px; letter-spacing: .02em; text-transform: uppercase; color: var(--cs-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#strip li:hover { border-color: rgba(57,232,255,.5); }
#strip li.done b { background: #5dffb4; }
#strip li.cur { border-color: var(--cs-cyan); background: rgba(57,232,255,.12); }
#strip li.cur span { color: var(--cs-ink); }
.powered { display: flex; align-items: center; gap: 10px; font-family: var(--f-hud); font-size: 14px; color: var(--cs-dim); white-space: nowrap; }
.powered b { color: var(--cs-ivory); font-weight: 700; } .powered b i { font-style: normal; color: var(--cs-cyan); }
.chakana { width: 22px; height: 22px; color: var(--cs-ivory); }

.toast { position: fixed; left: 50%; bottom: 120px; transform: translate(-50%, 20px); background: var(--cs-cyan); color: #04060c; font-family: var(--f-hud); font-weight: 600; padding: 10px 18px; clip-path: var(--cs-cut); opacity: 0; transition: .3s; z-index: 99; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Modo proyección: todo Cinemark ---------- */
body.projection { background: var(--cm-900); background-image: radial-gradient(circle at 50% 40%, #2a0000 0%, var(--cm-900) 55%); }
body.projection #top, body.projection #explain, body.projection #strip li span { display: none; }
body.projection #main { grid-template-columns: 1fr; padding: 24px; }
body.projection #phone { box-shadow: 0 40px 120px rgba(0,0,0,.8), 0 0 0 2px #2b2b2b, 0 0 0 7px #0d0d0d, 0 0 120px rgba(221,0,0,.15); }
body.projection .caption { font-family: var(--f-cm-h); font-size: 22px; text-transform: uppercase; letter-spacing: .06em; color: #fff; }
body.projection .caption b { color: #fff; background: var(--cm-red); font-family: var(--f-cm-h); padding: 2px 8px; border-radius: 6px; }
body.projection #bottom { border-top-color: rgba(255,255,255,.1); }
body.projection #strip { grid-template-columns: repeat(12, auto); justify-content: center; gap: 8px; }
body.projection #strip li { border-color: rgba(255,255,255,.12); background: transparent; border-radius: 8px; clip-path: none; padding: 6px 8px; }
body.projection #strip li b { background: var(--cm-700); color: #fff; font-family: var(--f-cm-h); }
body.projection #strip li.done b { background: var(--cm-green-ok); }
body.projection #strip li.cur { border-color: var(--cm-red); background: rgba(221,0,0,.15); }
body.projection #strip li.cur b { background: var(--cm-red); }
body.projection .powered { font-family: var(--f-cm-b); font-size: 12px; color: var(--cm-600); }
body.projection .powered b { color: #fff; } body.projection .powered b i { color: var(--cm-red); }
body.projection .chakana { color: var(--cm-500); }
body.projection .toast { background: var(--cm-red); color: #fff; clip-path: none; border-radius: 8px; }

/* Botón flotante para salir de proyección */
#exit-proj { position: fixed; top: 14px; right: 14px; z-index: 50; display: none; background: rgba(0,0,0,.5); color: #fff; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; padding: 6px 12px; font-family: var(--f-cm-h); font-size: 12px; letter-spacing: .08em; }
body.projection #exit-proj { display: block; }

/* ---------- Celular real: la app ocupa toda la pantalla, sin mockup ---------- */
@media (max-width: 700px), (max-height: 520px) {
  body, body.projection { overflow: hidden; background: var(--cm-900); }
  #shell { display: block; }
  #top, #explain, #caption, #phone .notch, #exit-proj { display: none !important; }
  #main { display: block; padding: 0; }
  #phone-wrap { display: block; }
  #phone-box { width: 100vw; height: 100dvh; }
  #phone { position: fixed; inset: 0; width: auto; height: auto; transform: none !important; border-radius: 0; padding: 0; box-shadow: none; background: var(--cm-900); }
  .screen { inset: 0; border-radius: 0; }
  .appbar { padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
  .splash { padding-top: env(safe-area-inset-top, 0px); }
  #bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px)); background: rgba(0,0,0,.72); border-top: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(8px); }
  #strip { display: flex; gap: 4px; flex-wrap: nowrap; overflow-x: auto; }
  #strip li { padding: 3px 5px; border-radius: 6px; clip-path: none; background: transparent; border-color: rgba(255,255,255,.12); }
  #strip li b { background: var(--cm-700); color: #fff; font-family: var(--f-cm-h); font-size: 10px; }
  #strip li.cur { border-color: var(--cm-red); background: rgba(221,0,0,.2); } #strip li.cur b { background: var(--cm-red); }
  #strip li.done b { background: var(--cm-green-ok); }
  #strip li span { display: none; }
  .powered { font-family: var(--f-cm-b); font-size: 11px; color: var(--cm-600); }
  .powered b { color: #fff; } .powered b i { color: var(--cm-red); } .chakana { width: 16px; height: 16px; color: var(--cm-500); }
  /* Deja espacio para la barra inferior */
  .joy { bottom: 64px; } .scanbtn { bottom: 76px; } .map-hint { bottom: 150px; } .ar-hint { bottom: 70px; }
  .trivia .btn, .form, .center, .win, .final { padding-bottom: 58px; }
  .form .btn { margin-bottom: 0; }
  .final { padding-bottom: 70px; }
  .toast { bottom: 70px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  #main { grid-template-columns: 1fr; }
  #explain { display: none; }
  #strip li span { display: none; }
}
