:root {
  --ink: #0b1220;
  --ink-2: #131c2e;
  --text: #f4f7fc;
  --muted: #9fb0c8;
  --blue: #2f7bff;
  --accent: #ff8a1f;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; min-height: 100svh; display: flex; flex-direction: column; color: var(--text);
  background: radial-gradient(120% 80% at 50% 0%, #17305e 0%, var(--ink) 60%);
}
[hidden] { display: none !important; }
.view { flex: 1; }
.hero { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 24px; gap: 4px; }
.kicker { color: var(--muted); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 12px; }
h1 { margin: 0; font-size: clamp(28px, 8vw, 44px); letter-spacing: .08em; font-weight: 800; }
h2 { margin: 0 0 6px; font-size: 24px; }
.tagline { font-size: 18px; color: #cfdcf2; margin: 10px 0 30px; }
.tagline.small { font-size: 15px; margin: 22px 0 10px; }
.code-art { display: flex; align-items: center; gap: 5px; height: 64px; margin-bottom: 34px; }
.code-art span { width: 6px; border-radius: 3px; background: var(--text); opacity: .92; }
.code-art span:nth-child(4n+1) { height: 22px; } .code-art span:nth-child(4n+2) { height: 46px; }
.code-art span:nth-child(4n+3) { height: 34px; } .code-art span:nth-child(4n) { height: 58px; }
.code-art span:nth-child(7) { background: var(--accent); }
button, .secondary { font: inherit; cursor: pointer; border-radius: 999px; padding: 14px 26px; font-weight: 700; }
.primary { background: var(--blue); color: #fff; border: 0; min-width: 260px; font-size: 17px; box-shadow: 0 8px 24px rgba(47,123,255,.35); }
.secondary { display: inline-block; margin-top: 14px; background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,.25); font-size: 15px; }
.notice { max-width: 360px; color: var(--muted); line-height: 1.55; margin: 6px 0 22px; }
.status { min-height: 1.2em; color: var(--muted); font-size: 13px; margin-top: 18px; }

/* Cámara */
.camera { position: fixed; inset: 0; background: #000; z-index: 5; }
.camera video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shade { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.frame { position: relative; width: min(88vw, 560px); aspect-ratio: 3.4 / 1; border-radius: 14px; box-shadow: 0 0 0 200vmax rgba(5, 10, 20, .55); }
.frame i { position: absolute; width: 26px; height: 26px; border: 3px solid var(--text); }
.frame i:nth-child(1) { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.frame i:nth-child(2) { top: -2px; right: -2px; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.frame i:nth-child(3) { bottom: -2px; left: -2px; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.frame i:nth-child(4) { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.camera-top { position: absolute; top: max(16px, env(safe-area-inset-top)); left: 16px; right: 16px; display: flex; justify-content: space-between; }
.icon { width: 46px; height: 46px; padding: 0; border-radius: 50%; border: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 18px; }
.icon.on { background: var(--accent); }
.hint { position: absolute; left: 0; right: 0; bottom: max(40px, env(safe-area-inset-bottom)); margin: 0 24px; text-align: center; font-size: 16px; text-shadow: 0 1px 6px rgba(0,0,0,.8); }

.spinner { width: 46px; height: 46px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: var(--text); animation: spin 1s linear infinite; margin-bottom: 16px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Recuerdo */
.memory { width: min(680px, 100%); margin: 0 auto; padding: 32px 18px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.memory .date { color: var(--muted); margin: 0 0 18px; }
.memory video, .memory img { width: 100%; border-radius: 16px; background: #000; box-shadow: 0 18px 50px rgba(0,0,0,.45); }
.memory img { margin-top: 18px; }
.audio { width: 100%; margin-top: 18px; padding: 14px 16px; border-radius: 16px; background: var(--ink-2); text-align: left; }
.audio p { margin: 0 0 8px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
.audio audio { width: 100%; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 18px; }
