/* App En vivo. Marca del sitio: negro, dorado, Playfair Display y Montserrat.
   El elemento propio es el medallón de los flyers de la edición: acá muestra lo
   que está pasando y su aro marca el avance. */
:root {
    --black: #000;
    --surface: #0a0a0a;
    --raised: #141414;
    --gold: #d4af37;
    --gold-light: #f0d27a;
    --gold-line: rgba(212, 175, 55, .28);
    --text: #fff;
    --muted: #b4b4b4;
    --ok: #8fd6a8;
    --bad: #ff9c92;
    --display: 'Playfair Display', Georgia, serif;
    --body: 'Montserrat', system-ui, sans-serif;
    --script: 'Niconne', cursive;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--black); color: var(--text); font-family: var(--body); font-size: 15px; line-height: 1.5; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
[hidden] { display: none !important; }

.app { position: relative; display: flex; flex-direction: column; height: 100dvh; max-width: 500px; margin: auto; background: var(--black); overflow: hidden; }
@media (min-width: 520px) { .app { border-inline: 1px solid var(--gold-line); } }

.top { display: flex; align-items: center; gap: .7rem; padding: calc(.7rem + env(safe-area-inset-top, 0px)) 1rem .7rem; border-bottom: 1px solid var(--gold-line); flex-shrink: 0; }
.top-logo { flex-shrink: 0; line-height: 0; border-radius: 50%; }
.top-logo img { display: block; width: 46px; height: 46px; }
.top-text { flex: 1; min-width: 0; }
.top h1 { font: 700 1.05rem/1.2 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top p { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-status { text-align: right; flex-shrink: 0; }
.pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 600; color: var(--gold-light); white-space: nowrap; }
.pill::before { content: ""; width: .5rem; height: .5rem; transform: rotate(45deg); background: var(--gold); }
.pill.is-live::before { animation: beat 2.4s ease-in-out infinite; }
.pill.is-off { color: var(--bad); }
.pill.is-off::before { background: var(--bad); }
@keyframes beat { 50% { opacity: .35; } }
.clock { display: block; color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.demo-strip { background: var(--gold); color: #000; font-size: .8rem; font-weight: 600; padding: .4rem 1rem; line-height: 1.35; flex-shrink: 0; }

.screens { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 1.1rem 1rem 6rem; }
.block { margin-top: 2rem; }
.block > h2 { font: 700 1.25rem/1.2 var(--display); margin-bottom: .75rem; }
.note { color: var(--muted); font-size: .85rem; }

/* Medallón */
.medal { position: relative; width: min(330px, 86vw, 52dvh); aspect-ratio: 1; margin: .2rem auto 0; }
.medal svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.medal .ring-track { fill: none; stroke: rgba(212, 175, 55, .2); stroke-width: 3; }
.medal .ring-inner { fill: var(--surface); stroke: var(--gold-line); stroke-width: 1; }
.medal .ring-now { fill: none; stroke: url(#foil); stroke-width: 5; stroke-linecap: round; transform: rotate(-90deg); transform-origin: center; transition: stroke-dashoffset 1s linear; animation: draw 1.4s cubic-bezier(.2, .7, .2, 1) 1; }
@keyframes draw { from { stroke-dashoffset: 100; } }
.medal .gem { fill: var(--gold); stroke: #000; stroke-width: 2; }
.medal-text { position: absolute; inset: 15%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.medal-kicker { font: 400 1.5rem/1 var(--script); color: var(--gold-light); }
.medal-title { font: 700 1.75rem/1.12 var(--display); margin: .4rem 0; overflow-wrap: break-word; max-width: 100%; }
.medal-title.is-long { font-size: 1.3rem; }
.medal-sub { color: var(--muted); font-size: .85rem; line-height: 1.35; }
.medal-time { font-size: .85rem; font-weight: 600; margin-top: .35rem; font-variant-numeric: tabular-nums; }
.notice { color: var(--gold-light); font-size: .85rem; font-weight: 600; }

/* Fases */
.phases { list-style: none; display: flex; justify-content: space-between; margin: 1.25rem .5rem 0; padding: 0; position: relative; }
.phases::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 1px; background: var(--gold-line); }
.phases li { position: relative; width: 13px; height: 13px; transform: rotate(45deg); background: var(--black); border: 1px solid var(--gold); }
.phases li.done { background: rgba(212, 175, 55, .45); }
.phases li.now { background: var(--gold); box-shadow: 0 0 0 4px rgba(212, 175, 55, .22); }
.phase-now { text-align: center; margin-top: .7rem; font-size: .92rem; }
.phase-now strong { color: var(--gold-light); font-weight: 600; }

/* Puerta y aforo */
.figures { display: grid; grid-template-columns: 1fr 1fr; margin-top: 1.5rem; border-block: 1px solid var(--gold-line); }
.figure { padding: .85rem .9rem .85rem 0; }
.figure + .figure { border-left: 1px solid var(--gold-line); padding-left: .9rem; }
.figure.wide { grid-column: 1 / -1; }
.figure-label { color: var(--muted); font-size: .82rem; }
.figure-value { font: 700 1.9rem/1.15 var(--display); font-variant-numeric: lining-nums; }
.figure-value small { font: 500 .85rem var(--body); margin-left: .2rem; }
.figure-note { font-size: .82rem; color: var(--muted); }

/* Novedades */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: .7rem 0; border-bottom: 1px solid #222; }
.feed li:last-child { border-bottom: 0; }
.feed-head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.feed-title { font-weight: 600; }
.feed .is-urgent .feed-title { color: var(--bad); }
.feed .is-important .feed-title { color: var(--gold-light); }
.feed time { color: var(--muted); font-size: .8rem; flex-shrink: 0; }
.feed p { color: var(--muted); font-size: .88rem; }

/* Zonas */
.zone { display: flex; justify-content: space-between; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid #222; }
.zone:last-child { border-bottom: 0; }
.zone-name { font-weight: 600; }
.zone-desc { color: var(--muted); font-size: .85rem; }
.zone-side { text-align: right; flex-shrink: 0; font-size: .85rem; max-width: 45%; }
.st-open { color: var(--ok); } .st-busy { color: var(--gold-light); } .st-full, .st-closed { color: var(--bad); }
.access-yes { color: var(--ok); } .access-no { color: var(--bad); }

/* Entrada */
.pass { position: relative; border-radius: 14px; padding: 1px; background: linear-gradient(145deg, var(--gold-light), #6e5a18 45%, var(--gold)); }
.pass-in { background: var(--surface); border-radius: 13px; overflow: hidden; }
.pass-head { padding: 1.1rem 1.1rem .9rem; }
.pass-event { font: 700 1.45rem/1.15 var(--display); }
.pass-when { color: var(--muted); font-size: .85rem; margin-top: .2rem; }
.pass-holder { display: grid; grid-template-columns: 1fr auto; gap: .8rem; margin-top: .9rem; }
.pass-label { color: var(--muted); font-size: .78rem; }
.pass-value { font-weight: 600; overflow-wrap: anywhere; }
.pass-state { display: flex; gap: .6rem; align-items: center; padding: .7rem 1.1rem; font-weight: 700; color: #000; }
.pass-state small { display: block; font-weight: 500; font-size: .82rem; }
.pass-state.valid { background: var(--ok); }
.pass-state.inside { background: var(--gold-light); }
.pass-state.cancelled, .pass-state.expired, .pass-state.unpaid { background: var(--bad); }
.pass-cut { border-top: 2px dashed var(--gold-line); margin: 0 1rem; }
.pass-code { padding: 1.1rem; text-align: center; }
.qr-plate { position: relative; display: inline-block; background: #fff; padding: 10px; border-radius: 8px; line-height: 0; }
.qr-plate img, .qr-plate svg { width: min(230px, 62vw); height: auto; aspect-ratio: 1; display: block; }
.qr-plate.is-off img { opacity: .12; filter: grayscale(1); }
.qr-demo { position: absolute; left: -6px; right: -6px; top: 50%; transform: translateY(-50%) rotate(-8deg); background: var(--gold); color: #000; font: 700 .95rem/1.6 var(--body); }
.pass-id { font-weight: 700; letter-spacing: .03em; margin-top: .6rem; }
.switcher { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; }
.switcher button { border: 1px solid var(--gold-line); border-radius: 4px; padding: .4rem .7rem; font-size: .85rem; min-height: 40px; }
.switcher button[aria-pressed=true] { background: var(--gold); border-color: var(--gold); color: #000; font-weight: 600; }

.btn { display: inline-block; border: 1px solid var(--gold); background: var(--gold); color: #000; font-weight: 600; font-size: .92rem; padding: .7rem 1rem; border-radius: 5px; min-height: 44px; text-align: center; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--gold-light); }
.btn-row { display: flex; gap: .5rem; margin-top: .9rem; flex-wrap: wrap; }
.btn-row .btn { flex: 1 1 130px; }
.linkish { color: var(--gold-light); text-decoration: underline; padding: .5rem 0; font-size: .88rem; }

.form-code label { display: block; font-weight: 600; margin-bottom: .35rem; }
.form-code input { width: 100%; background: var(--raised); color: #fff; border: 1px solid #555; border-radius: 5px; padding: .75rem; font: inherit; text-transform: uppercase; }
.form-code .btn { width: 100%; margin-top: .6rem; }
.form-error { color: var(--bad); margin-top: .5rem; font-size: .9rem; }
.lead { font: 700 1.5rem/1.2 var(--display); margin-bottom: .4rem; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 0; }
.switch { position: relative; flex-shrink: 0; width: 50px; height: 28px; border-radius: 14px; border: 1px solid var(--gold); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform .2s; }
.switch[aria-checked=true] { background: rgba(212, 175, 55, .3); }
.switch[aria-checked=true]::after { transform: translateX(22px); background: var(--gold-light); }

/* Agenda: el hilo de la noche */
.thread { list-style: none; margin: 0; padding: 0 0 0 1.4rem; border-left: 1px solid var(--gold); margin-left: .4rem; }
.thread li { position: relative; padding-bottom: 1.5rem; }
.thread li:last-child { padding-bottom: 0; }
.thread li::before { content: ""; position: absolute; left: calc(-1.4rem - 7px); top: .4rem; width: 13px; height: 13px; transform: rotate(45deg); background: var(--black); border: 1px solid var(--gold); }
.thread li.done { color: var(--muted); }
.thread li.done::before { background: rgba(212, 175, 55, .45); }
.thread li.now::before { background: var(--gold); box-shadow: 0 0 0 4px rgba(212, 175, 55, .22); }
.thread-time { font-size: .85rem; font-weight: 600; color: var(--gold-light); font-variant-numeric: tabular-nums; }
.thread li.done .thread-time, .thread li.done .thread-state { color: var(--muted); }
.thread-title { font: 700 1.2rem/1.2 var(--display); margin: .1rem 0 .2rem; }
.thread-desc { font-size: .88rem; color: var(--muted); }
.thread-state { font-size: .82rem; font-weight: 600; margin-top: .25rem; color: var(--gold-light); }
.thread li.cancelled .thread-title { text-decoration: line-through; }

.tabs { position: absolute; left: 0; right: 0; bottom: 0; display: flex; background: var(--black); border-top: 1px solid var(--gold-line); padding: .4rem .4rem calc(.4rem + env(safe-area-inset-bottom, 0px)); z-index: 5; }
.tabs button { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: .15rem; color: var(--muted); font-size: .78rem; font-weight: 500; padding: .3rem 0; min-height: 48px; }
.tabs button[aria-current=page] { color: var(--gold-light); font-weight: 600; }
.tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tab-dot { position: absolute; top: .25rem; left: calc(50% + 10px); width: .5rem; height: .5rem; transform: rotate(45deg); background: var(--gold); }

.toast { position: absolute; left: 1rem; right: 1rem; bottom: 5rem; background: var(--gold-light); color: #000; border-radius: 6px; padding: .75rem .9rem; font-weight: 600; font-size: .9rem; z-index: 6; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast small { display: block; font-weight: 500; }
.toast.show { opacity: 1; transform: none; }

.sheet { position: absolute; inset: 0; z-index: 10; background: rgba(0, 0, 0, .9); display: flex; align-items: center; padding: 1.25rem; }
.sheet-box { width: 100%; border: 2px solid var(--bad); border-radius: 10px; background: var(--surface); padding: 1.25rem; }
.sheet-kicker { color: var(--bad); font-weight: 600; font-size: .88rem; }
.sheet h2 { font: 700 1.6rem/1.2 var(--display); margin: .35rem 0 .5rem; overflow-wrap: break-word; }
.sheet p#sheet-body { margin-bottom: 1.1rem; }
.sheet .btn { width: 100%; }

/* Botón de cámara al centro de la barra: a un toque desde cualquier pestaña */
.tabs .tab-camera { justify-content: center; color: #000; }
.tab-camera-in { display: grid; place-items: center; width: 46px; height: 38px; border-radius: 11px; background: linear-gradient(145deg, var(--gold-light), var(--gold)); box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 4px 14px rgba(212, 175, 55, .3); transition: transform .15s; }
.tabs .tab-camera svg { width: 24px; height: 24px; stroke-width: 2; }
.tab-camera:active .tab-camera-in { transform: scale(.92); }

/* ---------- Fotos: la visual de Instagram (modo oscuro) dentro de la app ---------- */
.screen-photos {
    --ig-bg: #000; --ig-text: #f5f5f5; --ig-muted: #a8a8a8; --ig-line: #262626; --ig-chip: #121212;
    --ig-like: #ff3040; --ig-blue: #0095f6;
    --ig-ring: linear-gradient(45deg, #feda75, #fa7e1e 30%, #d62976 55%, #962fbf 78%, #4f5bd5);
    margin: -1.1rem -1rem 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ig-text); font-size: 14px; line-height: 1.35;
}
.ig-icon, .story-bubble, .grid-cell, .story-nav { padding: 0; }
.ig-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; color: var(--ig-text); text-decoration: none; touch-action: manipulation; }
.ig-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ig-icon svg.fill { fill: currentColor; }
.ig-icon svg.dots { fill: currentColor; stroke: none; }
.ig-icon[aria-pressed=false] { color: var(--ig-muted); }

/* -1.1rem: el padding superior de .screens; si no, queda una franja por donde se ve pasar el feed. */
.ig-top { position: sticky; top: -1.1rem; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: .35rem .5rem .35rem 1rem; background: var(--ig-bg); }
.ig-brand { font: 400 1.75rem/1.2 var(--script); color: var(--ig-text); letter-spacing: .01em; }
.ig-top-actions { display: flex; }

/* Historias */
.ig-stories { list-style: none; display: flex; gap: .9rem; margin: 0; padding: .45rem 1rem .8rem; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; border-bottom: 1px solid var(--ig-line); overscroll-behavior-x: contain; }
.ig-stories::-webkit-scrollbar { display: none; }
.ig-stories li { scroll-snap-align: start; flex-shrink: 0; }
.story-bubble { display: flex; flex-direction: column; align-items: center; gap: .3rem; width: 72px; touch-action: manipulation; }
.story-ring { position: relative; display: block; width: 70px; height: 70px; padding: 2.5px; border-radius: 50%; background: var(--ig-ring); }
.story-ring.is-seen { background: #3a3a3a; padding: 1.5px; }
.story-ring.is-mine { background: none; }
.story-avatar { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; border: 3px solid var(--ig-bg); background: #262626; overflow: hidden; }
.story-ring.is-seen .story-avatar { border-width: 4px; }
.story-avatar img { width: 100%; height: 100%; object-fit: cover; }
.story-avatar svg { width: 30px; height: 30px; fill: none; stroke: var(--ig-text); stroke-width: 1.6; stroke-linejoin: round; }
.story-plus { position: absolute; right: -1px; bottom: -1px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ig-blue); border: 2.5px solid var(--ig-bg); color: #fff; font: 700 16px/1 system-ui, sans-serif; }
.story-name { max-width: 100%; font-size: 12px; color: var(--ig-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Subida en curso (la franja "Publicando…" de Instagram) */
.ig-uploading { display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem; border-bottom: 1px solid var(--ig-line); }
.ig-uploading img { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.ig-up-text { flex: 1; min-width: 0; }
.ig-up-text p { font-size: 14px; }
.ig-uploading.is-error .ig-up-text p { color: var(--bad); font-size: 13px; }
.ig-up-text progress { display: block; width: 100%; height: 3px; margin-top: .45rem; border: 0; border-radius: 2px; background: var(--ig-line); appearance: none; overflow: hidden; }
.ig-up-text progress::-webkit-progress-bar { background: var(--ig-line); }
.ig-up-text progress::-webkit-progress-value { background: var(--ig-ring); transition: width .2s; }
.ig-up-text progress::-moz-progress-bar { background: var(--ig-ring); }
.ig-link { color: var(--ig-blue); font-weight: 600; font-size: 14px; padding: .5rem .25rem; flex-shrink: 0; }
.ig-link.is-muted { color: var(--ig-muted); }

/* Feed */
.post { border-bottom: 1px solid var(--ig-line); padding-bottom: .6rem; }
/* Las primeras dos se ven al abrir; el resto se dibuja recién al acercarse. */
.post:nth-child(n+3) { content-visibility: auto; contain-intrinsic-size: auto none auto 640px; }
.post-head { display: flex; align-items: center; gap: .65rem; padding: .55rem .25rem .55rem .9rem; }
.post-avatar { width: 34px; height: 34px; flex-shrink: 0; padding: 2px; border-radius: 50%; background: var(--ig-ring); }
.post-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 2px solid var(--ig-bg); }
.post-who { flex: 1; min-width: 0; }
.post-user { font-weight: 600; font-size: 14px; }
.post-loc { font-size: 12px; color: var(--ig-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-media { position: relative; background: var(--ig-chip); overflow: hidden; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.post-media img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-touch-callout: none; }
.heart-pop { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; opacity: 0; }
.heart-pop svg { width: 104px; height: 104px; fill: #fff; filter: drop-shadow(0 2px 14px rgba(0, 0, 0, .4)); }
.heart-pop.go { animation: ig-pop 1s ease-out; }
@keyframes ig-pop {
    0% { opacity: 0; transform: scale(.2); }
    15% { opacity: .95; transform: scale(1.15); }
    28% { transform: scale(.94); }
    40%, 75% { opacity: .95; transform: scale(1); }
    100% { opacity: 0; transform: scale(.85) translateY(-14px); }
}
.post-actions { display: flex; align-items: center; padding: .2rem .35rem 0; }
.post-actions .grow { flex: 1; }
.like.is-on { color: var(--ig-like); }
.like.bump svg { animation: ig-bump .4s ease-out; }
@keyframes ig-bump { 40% { transform: scale(1.25); } 70% { transform: scale(.92); } }
.post-time { padding: .15rem .9rem 0; font-size: 12px; color: var(--ig-muted); }

/* Grilla: 3 columnas al ras, en vertical como el perfil de Instagram */
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.grid-cell { display: block; aspect-ratio: 3 / 4; background: var(--ig-chip); overflow: hidden; touch-action: manipulation; }
.grid-cell img { display: block; width: 100%; height: 100%; object-fit: cover; }

.ig-empty { text-align: center; padding: 2.5rem 1.5rem 1.5rem; }
.ig-empty-icon { display: inline-grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; border: 2px solid var(--ig-text); margin-bottom: 1rem; }
.ig-empty-icon svg { width: 44px; height: 44px; fill: none; stroke: var(--ig-text); stroke-width: 1.4; stroke-linejoin: round; }
.ig-empty h3 { font-size: 22px; font-weight: 800; margin-bottom: .35rem; }
.ig-empty p { color: var(--ig-muted); margin-bottom: 1.1rem; }
.ig-foot { text-align: center; color: var(--ig-muted); font-size: 12px; padding: 1.1rem 1rem 0; }

/* Visor de historias: <dialog> nativo (Esc y el gesto "atrás" lo cierran solos) */
dialog.story { width: 100%; max-width: 500px; height: 100dvh; max-height: 100dvh; margin: auto; padding: 0; border: 0; background: #000; color: #fff; overflow: hidden; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
dialog.story[open] { display: flex; align-items: center; justify-content: center; }
dialog:modal { overscroll-behavior: contain; }
dialog::backdrop { background: rgba(0, 0, 0, .94); overflow: hidden; overscroll-behavior: contain; }
.story-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.story-bars { position: absolute; top: calc(.5rem + env(safe-area-inset-top, 0px)); left: .5rem; right: .5rem; z-index: 2; display: flex; gap: 3px; }
.story-bars span { flex: 1; height: 2.5px; border-radius: 2px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.story-bars i { display: block; height: 100%; width: 0; background: #fff; }
.story-bars .done i { width: 100%; }
.story-bars .now i { animation: story-fill 5s linear forwards; }
.story.is-loading .story-bars .now i, .story.is-held .story-bars .now i { animation-play-state: paused; }
@keyframes story-fill { from { width: 0; } to { width: 100%; } }
.story-head { position: absolute; top: calc(1.1rem + env(safe-area-inset-top, 0px)); left: 0; right: 0; z-index: 3; display: flex; align-items: center; gap: .55rem; padding: 0 .25rem 0 .8rem; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); pointer-events: none; }
.story-head form, .story-head button { pointer-events: auto; }
.story-head-avatar { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: #262626; }
.story-head-avatar img { width: 100%; height: 100%; object-fit: cover; }
.story-head-text { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-head-text time { color: rgba(255, 255, 255, .75); margin-left: .25rem; }
.story-head-text span { display: block; font-size: 12px; color: rgba(255, 255, 255, .85); }
.story-close { color: #fff; }
.story-close svg { width: 26px; height: 26px; stroke-width: 2; }
.story-nav { position: absolute; top: 0; bottom: 0; z-index: 1; touch-action: manipulation; -webkit-touch-callout: none; user-select: none; }
.story-nav.prev { left: 0; width: 33%; }
.story-nav.next { right: 0; width: 67%; }
.story-nav:focus-visible { outline-offset: -4px; }

/* Confirmación para borrar tu foto: hoja desde abajo */
dialog.action-sheet { width: min(500px, 100%); max-width: 100%; margin: auto auto 0; padding: 1.4rem 1rem calc(.8rem + env(safe-area-inset-bottom, 0px)); border: 0; border-radius: 14px 14px 0 0; background: #262626; color: #f5f5f5; text-align: center; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.action-sheet h2 { font-size: 18px; font-weight: 700; margin-bottom: .35rem; }
.action-sheet p { color: #a8a8a8; font-size: 14px; margin-bottom: 1rem; }
.action-sheet form { display: flex; flex-direction: column; border-top: 1px solid #363636; }
.action-sheet form button { min-height: 50px; font-size: 15px; border-bottom: 1px solid #363636; }
.action-sheet form button:last-child { border-bottom: 0; }
.action-danger { color: #ed4956; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
