/* ==========================================================================
   Glint web — story viewer (layouts.fullscreen, always dark). Scoped under .sv.
   Desktop: 9:16 card (radius 10) centered, height = viewport − 32px, neighbor users as
   dimmed previews on the sides. Mobile (<768): edge-to-edge 9:16, reply bar below.
   The only motion: progress pills (JS), the cube between users (Web Animations, 300ms),
   the cross-fade within a user, poll result bars and reaction bursts. Reduced motion: cuts.
   ========================================================================== */

.page-stories { background: var(--bg-base); overflow: hidden; }
.page-stories #main { min-height: 100dvh; }

.sv {
  --card-w: min(calc((100dvh - 32px) * 9 / 16), calc(100vw - 176px));
  --card-h: calc(var(--card-w) * 16 / 9);
  --sv-fg: var(--text-primary);
  --sv-fg-muted: color-mix(in srgb, var(--text-primary) 78%, transparent);
  --sv-track: color-mix(in srgb, var(--text-primary) 35%, transparent);
  position: fixed; inset: 0; z-index: 1; overflow: hidden;
  background: var(--bg-base); color: var(--sv-fg);
  user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  touch-action: none;
}
.sv:focus, .sv:focus-visible { outline: none; }
.sv input { user-select: text; -webkit-user-select: text; }

/* --- Desktop chrome --------------------------------------------------------- */

.sv-brand { position: absolute; top: 20px; left: 24px; z-index: 5; border-radius: 6px; }
.sv-brand .wordmark { font-size: 26px; color: var(--sv-fg); }
.sv-close {
  position: absolute; top: 12px; right: 12px; z-index: 5; width: 44px; height: 44px;
  display: grid; place-items: center; border-radius: 50%; color: var(--sv-fg);
}
.sv-close:hover { background: color-mix(in srgb, var(--text-primary) 10%, transparent); }

.sv-stage { position: absolute; inset: 0; transform-origin: 50% 30%; }

.sv-center {
  position: absolute; left: 50%; top: 50%; width: var(--card-w); height: var(--card-h);
  transform: translate(-50%, -50%);
}

.sv-nav {
  position: absolute; top: 50%; z-index: 4; width: 32px; height: 32px; margin-top: -16px;
  display: grid; place-items: center; border-radius: 50%;
  background: color-mix(in srgb, var(--text-primary) 88%, transparent); color: var(--bg-base);
}
.sv-nav:hover { background: var(--text-primary); }
.sv-nav.prev { left: -52px; }
.sv-nav.next { right: -52px; }

/* Neighbor previews (positioned by JS). */
.sv-preview {
  position: absolute; z-index: 1; overflow: hidden; border-radius: var(--radius-control);
  background: var(--bg-surface); color: var(--sv-fg); text-align: center;
}
.sv-preview-media { position: absolute; inset: 0; background-size: cover; background-position: center; }
.sv-preview-media img { width: 100%; height: 100%; object-fit: cover; }
.sv-preview-media::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); transition: background-color 150ms; }
.sv-preview:hover .sv-preview-media::after { background: rgba(0, 0, 0, 0.4); }
.sv-preview-info { position: absolute; inset: 0; z-index: 1; display: grid; align-content: center; justify-items: center; gap: 6px; padding: 12px; }
.sv-preview-info .avatar { margin-bottom: 6px; }
.sv-preview-name { max-width: 100%; font-weight: 600; font-size: var(--type-body-size); }
.sv-preview-time { font-size: var(--type-meta-size); color: var(--sv-fg-muted); }

/* --- Cube + faces ------------------------------------------------------------ */

.sv-cube { position: absolute; inset: 0; perspective: calc(var(--card-w) * 2.4); }
.sv-face {
  position: absolute; inset: 0; overflow: hidden; border-radius: var(--radius-control);
  background: var(--bg-surface); backface-visibility: hidden; -webkit-backface-visibility: hidden;
  transform-origin: 50% 50%;
}
.sv-face[data-role="out"], .sv-face[data-role="in"] { pointer-events: none; }
.sv-shade { position: absolute; inset: 0; z-index: 10; background: #000; opacity: 0; pointer-events: none; }

.sv-canvas { position: absolute; inset: 0; overflow: hidden; container-type: inline-size; cursor: default; touch-action: none; }

.sv-media {
  position: absolute; inset: 0; background-color: var(--bg-surface); background-size: cover; background-position: center;
  opacity: 0; transition: opacity 200ms ease;
}
.sv-media.is-on { opacity: 1; z-index: 0; }
.sv-media img { width: 100%; height: 100%; object-fit: cover; visibility: hidden; -webkit-user-drag: none; }
.sv-media img.is-ready { visibility: visible; }
.sv-video-slot { position: absolute; inset: 0; }
.sv-video-slot video { width: 100%; height: 100%; object-fit: cover; background: transparent; }

/* Legibility scrims over bright photos (black only; no brand gradients). */
.sv-scrim-top, .sv-scrim-bottom { position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none; }
.sv-scrim-top { top: 0; height: 112px; background: linear-gradient(rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0)); }
.sv-scrim-bottom { bottom: 0; height: 160px; background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.55)); }

/* Dim while replying; hide chrome while holding. */
.sv-face.is-replying .sv-canvas::after { content: ""; position: absolute; inset: 0; z-index: 2; background: var(--overlay-scrim); pointer-events: none; }
.sv-face.is-holding .sv-top, .sv-face.is-holding .sv-bottom, .sv-face.is-holding .sv-stickers { opacity: 0; }

/* --- Progress + header ------------------------------------------------------- */

.sv-top { position: absolute; top: 0; left: 0; right: 0; z-index: 3; padding: 12px 12px 0; }
.sv-progress { display: flex; gap: 4px; }
.sv-pill { position: relative; flex: 1; height: 2px; border-radius: var(--radius-pill); background: var(--sv-track); overflow: hidden; }
.sv-fill { position: absolute; inset: 0; border-radius: inherit; background: var(--sv-fg); transform-origin: left center; transform: scaleX(0); will-change: transform; }
.sv-pill.is-done .sv-fill { transform: scaleX(1) !important; }
.sv-pill:not(.is-cur):not(.is-done) .sv-fill { transform: scaleX(0) !important; }

.sv-head { display: flex; align-items: center; gap: 8px; height: 44px; margin-top: 6px; }
.sv-who { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; color: var(--sv-fg); }
.sv-who .avatar { --size: 32px; }
.sv-name { font-size: var(--type-body-strong-size); min-width: 0; }
.sv-who .verified { margin-left: -4px; }
.sv-time { flex: none; font-size: var(--type-body-size); color: var(--sv-fg-muted); }
/* Item 11: name line + music line; Follow pill next to the name. */
.sv-who-text { display: grid; min-width: 0; line-height: 1.2; }
.sv-who-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sv-music { display: flex; align-items: center; gap: 4px; font-size: 13px; color: rgba(255, 255, 255, 0.9); text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); }
.sv-music .icon { flex: none; }
.sv-follow { flex: none; height: 32px; padding: 0 14px; border-radius: 10px; border: 1.2px solid rgba(255, 255, 255, 0.95); color: #fff; font-weight: 600; font-size: 14px; background: transparent; }
.sv-follow:hover { background: rgba(255, 255, 255, 0.14); }
.sv-follow.is-quiet { border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.18); }
.sv-close-badge {
  flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: var(--ring-close); color: var(--on-brand);
}
.sv-close-badge .icon { width: 11px; height: 11px; }
.sv-head-actions { display: flex; align-items: center; gap: 2px; margin-right: -8px; flex: none; }
.sv-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--sv-fg); }
.sv-icon .icon { width: 22px; height: 22px; }
.sv-icon:hover { background: color-mix(in srgb, var(--text-primary) 12%, transparent); }

.sv-buffering { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; pointer-events: none; }
.sv-buffering .spinner { margin: 0; width: 32px; height: 32px; border-color: var(--sv-track); border-top-color: var(--sv-fg); }

/* --- Stickers (sized in container units of the 9:16 canvas) ----------------- */

.sv-stickers { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 200ms ease, visibility 0s linear 200ms; font-size: 3.6cqw; }
.sv-stickers.is-on { opacity: 1; visibility: visible; transition: opacity 200ms ease, visibility 0s; }
.sticker { position: absolute; pointer-events: auto; transform-origin: 50% 50%; line-height: 1.2; }

.st-pill {
  display: inline-flex; align-items: center; gap: 0.35em; padding: 0.5em 0.9em; white-space: nowrap;
  border-radius: var(--radius-pill); background: var(--text-primary); color: var(--bg-base);
  font-weight: 600; font-size: 1em; line-height: 1.15; letter-spacing: -0.005em;
}
.st-pill .icon { width: 1.1em; height: 1.1em; color: var(--brand-500); }
/* Item 10: location pill — white card, purple pin, the name as typed; four styles. */
.st-location { border-radius: 0.5em; background: #fff; color: #111; font-weight: 500; font-size: 1.15em; padding: 0.4em 0.8em 0.4em 0.55em; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
.st-location .icon { color: #8B3DFF; width: 1.25em; height: 1.25em; }
.st-location:hover { background: #F4F4F5; }
.st-location.is-style-brand { background: var(--brand-500); color: #fff; }
.st-location.is-style-brand .icon { color: #fff; }
.st-location.is-style-dark { background: rgba(17, 17, 17, 0.9); color: #fff; }
.st-location.is-style-dark .icon { color: #B794FF; }
.st-location.is-style-glass { background: rgba(255, 255, 255, 0.28); color: #fff; border: 1px solid rgba(255, 255, 255, 0.6); box-shadow: none; }
.st-location.is-style-glass .icon { color: #fff; }
.st-mention, .st-link { color: var(--brand-500); }
.st-pill:hover { background: color-mix(in srgb, var(--bg-base) 6%, var(--text-primary)); }

.st-card {
  width: 16em; padding: 1em; border-radius: 1em; text-align: center;
  background: var(--text-primary); color: var(--bg-base);
}
.st-poll-q, .st-question-q { font-weight: 600; font-size: 1.05em; line-height: 1.25; margin-bottom: 0.8em; overflow-wrap: anywhere; }
.st-poll-opts { display: grid; gap: 0.5em; }
.st-opt {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 0.5em; width: 100%;
  min-height: 2.7em; padding: 0.4em 1em; border-radius: 0.75em; overflow: hidden;
  background: color-mix(in srgb, var(--bg-base) 8%, var(--text-primary)); color: var(--bg-base);
  font-weight: 600; font-size: 1em; text-align: left;
}
.st-opt:not(:disabled):hover { background: color-mix(in srgb, var(--bg-base) 14%, var(--text-primary)); }
.st-opt:disabled { cursor: default; }
.has-results .st-opt { justify-content: space-between; }
.st-opt-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: color-mix(in srgb, var(--bg-base) 16%, var(--text-primary)); transition: width 600ms cubic-bezier(0.2, 0.9, 0.3, 1); }
.st-opt.is-voted .st-opt-bar { background: color-mix(in srgb, var(--brand-500) 30%, var(--text-primary)); }
.st-opt.is-voted { color: var(--brand-500); }
.st-opt-label, .st-opt-pct { position: relative; z-index: 1; min-width: 0; overflow-wrap: anywhere; }
.st-opt-pct { flex: none; }
.st-poll-total { margin-top: 0.7em; font-size: 0.8em; color: color-mix(in srgb, var(--bg-base) 60%, var(--text-primary)); }

.st-question-field {
  display: flex; align-items: center; height: 2.7em; padding: 0 0.3em 0 0.9em; border-radius: 0.75em;
  background: color-mix(in srgb, var(--bg-base) 8%, var(--text-primary));
}
.st-question-field input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: none; outline: none;
  color: var(--bg-base); font-size: 1em;
}
.st-question-field input::placeholder { color: color-mix(in srgb, var(--bg-base) 50%, var(--text-primary)); }
.st-question-field input:disabled { cursor: default; }
.st-send { flex: none; padding: 0.4em 0.6em; color: var(--brand-500); font-weight: 600; font-size: 0.95em; }

/* --- Bottom: reply bar / own "Seen by" ----------------------------------------- */

.sv-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 12px 16px 16px; }
.sv-reply {
  position: relative; display: flex; align-items: center; gap: 4px; height: 44px; padding: 0 4px 0 16px;
  border: 1px solid color-mix(in srgb, var(--text-primary) 55%, transparent); border-radius: var(--radius-pill);
}
.sv-reply.is-focused { border-color: var(--text-primary); }
.sv-reply-input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: none; outline: none;
  color: var(--sv-fg); font-size: var(--type-body-size);
}
.sv-reply-input::placeholder { color: var(--sv-fg-muted); }
.sv-send { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--sv-fg); flex: none; }
.sv-send .icon { width: 22px; height: 22px; }
.sv-send:hover { background: color-mix(in srgb, var(--text-primary) 12%, transparent); }
.sv-reactions {
  position: absolute; left: 50%; bottom: calc(100% + 16px); transform: translateX(-50%);
  display: flex; gap: 2px; padding: 6px; border-radius: var(--radius-pill); background: var(--bg-raised);
}
.sv-reaction { width: 44px; height: 44px; border-radius: 50%; font-size: 26px; line-height: 44px; text-align: center; }
.sv-reaction:hover { background: color-mix(in srgb, var(--text-primary) 10%, transparent); }

.sv-own { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.sv-seen { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; margin-left: -6px; border-radius: var(--radius-pill); color: var(--sv-fg); font-weight: 600; font-size: var(--type-body-size); }
.sv-seen:hover { background: color-mix(in srgb, var(--text-primary) 12%, transparent); }
.sv-seen .icon { width: 22px; height: 22px; }
.sv-seen-avatars { display: inline-flex; }
.sv-seen-avatars .avatar { box-shadow: 0 0 0 2px var(--bg-base); border-radius: 50%; }
.sv-seen-avatars .avatar + .avatar { margin-left: -8px; }

.sv-floats { position: absolute; inset: 0; z-index: 4; overflow: hidden; pointer-events: none; }
.sv-float { position: absolute; font-size: 40px; line-height: 1; will-change: transform, opacity; }

/* --- Sheets (viewers, link confirm) ------------------------------------------- */

.sv-sheet-scrim { z-index: 90; }
.sv-viewers { max-height: min(78dvh, 640px); }
.sv-viewers .dialog-body { min-height: 160px; }
.sv-viewers-count { display: flex; align-items: center; gap: 8px; padding: 12px 16px; color: var(--text-secondary); font-size: var(--type-meta-size); border-bottom: 1px solid var(--border-subtle); }
.sv-viewers-list { padding: 4px 0; }
.sv-viewer { display: flex; align-items: center; gap: 12px; padding: 8px 16px; }
.sv-viewer:hover { background: var(--bg-raised); }
.sv-viewer-reaction { font-size: 22px; line-height: 1; flex: none; }
.sv-answers { padding: 8px 0; border-bottom: 1px solid var(--border-subtle); }
.sv-answers-title { padding: 4px 16px 8px; font-size: var(--type-meta-size); font-weight: 600; color: var(--text-secondary); }
.sv-answer { display: flex; align-items: flex-start; gap: 12px; padding: 8px 16px; }
.sv-answer-body { display: block; color: var(--text-primary); overflow-wrap: anywhere; white-space: pre-line; }
.sv-linksheet .dialog-message h2 { overflow-wrap: anywhere; }
.sv-link-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 4px; border-radius: 50%; background: var(--bg-raised); color: var(--text-primary); }

/* --- Mobile: edge-to-edge ------------------------------------------------------ */

@media (max-width: 767px) {
  .sv-center { left: 0; top: 0; width: 100%; height: 100%; transform: none; }
  .sv-cube { perspective: 240vw; }
  .sv-face { border-radius: 0; background: var(--bg-base); }
  .sv-canvas {
    inset: 0 auto auto 50%; transform: translateX(-50%);
    width: min(100vw, calc(100dvh * 9 / 16)); height: auto; aspect-ratio: 9 / 16;
  }
  .sv-top { padding: calc(8px + env(safe-area-inset-top)) 8px 0; }
  .sv-head { margin-top: 4px; }
  .sv-head-actions { margin-right: -4px; }
  .sv-bottom { padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); }
  .sv-reply-input, .st-question-field input { font-size: max(16px, 1em); }
  .sv-reply-input { font-size: 16px; }
  .sv-reactions { position: fixed; bottom: auto; top: 30%; }
  .sv-reaction { width: 48px; height: 48px; font-size: 30px; line-height: 48px; }
}

/* --- Reduced motion: cuts, no fades ------------------------------------------ */

.sv.is-reduced .sv-media, .sv.is-reduced .sv-stickers, .sv.is-reduced .st-opt-bar { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .sv-media, .sv-stickers, .st-opt-bar, .sv-preview-media::after { transition: none !important; }
}

/* Toasts clear the reply bar. */
.page-stories .toasts { bottom: 84px; }
@media (max-width: 767px) { .page-stories .toasts { bottom: calc(72px + env(safe-area-inset-bottom)); } }

/* ==========================================================================
   Live viewer (/live/{id}, layouts.fullscreen, always dark). Scoped under .lv; reuses the
   story viewer's desktop chrome (.sv-brand, .sv-close). Hearts (flash red) are the only warm
   color. Reduced motion: hearts pop in place instead of floating.
   ========================================================================== */

.page-live { background: var(--bg-base); overflow: hidden; }
.page-live #main { min-height: 100dvh; }
.page-live .toasts { bottom: 84px; }

.lv {
  --card-w: min(calc((100dvh - 32px) * 9 / 16), calc(100vw - 176px));
  --lv-fg: #fff;
  position: fixed; inset: 0; z-index: 1; overflow: hidden; background: var(--bg-base); color: var(--text-primary);
  -webkit-tap-highlight-color: transparent;
}
.lv:focus, .lv:focus-visible { outline: none; }

.lv-card {
  position: absolute; left: 50%; top: 50%; width: var(--card-w); aspect-ratio: 9 / 16;
  transform: translate(-50%, -50%); border-radius: 10px; overflow: hidden; background: #000; color: var(--lv-fg);
}
.lv-backdrop { position: absolute; inset: -40px; background: #111 center / cover; filter: blur(36px) brightness(0.45); transform: scale(1.1); }
.lv.is-playing .lv-backdrop { display: none; }
.lv-video { position: absolute; inset: 0; }
.lv-video-el { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }

.lv-state, .lv-ended {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 24px;
}
.lv-state-text { font-size: var(--type-body-size); color: rgba(255, 255, 255, 0.85); }
.lv-ended { background: rgba(0, 0, 0, 0.55); z-index: 6; }
.lv-ended h2 { font-size: var(--type-title-md-size); font-weight: 600; }
.lv-ended .t-meta { color: rgba(255, 255, 255, 0.75); }
.lv-ended-actions { display: grid; gap: 8px; width: min(280px, 100%); margin-top: 6px; }

.lv-head {
  position: absolute; top: 0; left: 0; right: 0; z-index: 4; display: flex; align-items: center; gap: 8px;
  padding: 14px 12px 28px; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
}
.lv-host { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; color: var(--lv-fg); }
.lv-host-text { display: grid; min-width: 0; line-height: 1.2; }
.lv-host .username, .lv-host .username-row { color: var(--lv-fg); }
.lv-title { font-size: var(--type-meta-size); color: rgba(255, 255, 255, 0.8); }
.lv-pill {
  flex: none; background: var(--ring-live); color: var(--on-flash); font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  padding: 3px 7px; border-radius: 4px; line-height: 1;
}
.lv-viewers {
  flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 4px;
  background: rgba(0, 0, 0, 0.45); font-size: 12px; font-weight: 600; line-height: 1;
}
.lv-close { flex: none; width: 36px; height: 36px; display: grid; place-items: center; color: var(--lv-fg); margin-right: -4px; }

.lv-unmute {
  position: absolute; left: 50%; top: 72px; transform: translateX(-50%); z-index: 5; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; background: rgba(0, 0, 0, 0.65); color: var(--lv-fg); font-weight: 600; font-size: var(--type-meta-size);
}

.lv-comments {
  position: absolute; left: 0; right: 72px; bottom: 64px; z-index: 3; max-height: 42%; overflow-y: auto; scrollbar-width: none;
  display: flex; flex-direction: column; gap: 8px; padding: 24px 12px 8px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 36px); mask-image: linear-gradient(to bottom, transparent 0, #000 36px);
}
.lv-comments::-webkit-scrollbar { display: none; }
.lv-comment { display: flex; align-items: flex-start; gap: 8px; font-size: var(--type-body-size); line-height: 1.3; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.lv-comment img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; }
.lv-comment-text { overflow-wrap: anywhere; }
.lv-comment-user { font-weight: 600; }
.lv-comment.is-new { animation: lv-in 220ms ease-out; }
@keyframes lv-in { from { opacity: 0; transform: translateY(8px); } }

.lv-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; align-items: center; gap: 8px;
  padding: 10px 12px 12px; background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
}
.lv-bar input {
  flex: 1; min-width: 0; height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(0, 0, 0, 0.2); color: var(--lv-fg); font: inherit; font-size: var(--type-body-size);
}
.lv-bar input::placeholder { color: rgba(255, 255, 255, 0.75); }
.lv-bar input:focus { outline: none; border-color: #fff; }
.lv-bar input:disabled { opacity: 0.7; }
.lv-send { color: var(--lv-fg); font-weight: 600; padding: 0 4px; }
.lv-heart-btn { flex: none; width: 44px; height: 44px; display: grid; place-items: center; color: var(--accent-flash); border-radius: 50%; }
.lv-heart-btn:active { transform: scale(0.9); }

.lv-hearts { position: absolute; right: 12px; bottom: 60px; width: 44px; height: 55%; z-index: 5; pointer-events: none; }
.lv-heart { position: absolute; left: 8px; bottom: 0; color: var(--accent-flash); filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35)); }
.lv-heart.is-other { opacity: 0.85; }
.lv-heart.is-float { animation: lv-float 1800ms cubic-bezier(0.2, 0.6, 0.3, 1) forwards; }
.lv-heart.is-pop { bottom: 4px; animation: lv-pop 600ms ease-out forwards; }
@keyframes lv-float {
  0% { transform: translate(0, 0) scale(0.6) rotate(0); opacity: 0; }
  12% { opacity: 1; transform: translate(0, -20px) scale(1.05) rotate(var(--tilt)); }
  100% { transform: translate(var(--drift), -320px) scale(0.9) rotate(calc(var(--tilt) * -1)); opacity: 0; }
}
@keyframes lv-pop { 0% { transform: scale(0.6); opacity: 0; } 30% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .lv-heart.is-float { animation: lv-pop 600ms ease-out forwards; bottom: 4px; }
  .lv-comment.is-new { animation: none; }
}

@media (max-width: 767px) {
  .lv-card { left: 0; top: 0; width: 100%; height: 100%; aspect-ratio: auto; transform: none; border-radius: 0; }
  .lv-head { padding-top: calc(10px + env(safe-area-inset-top)); }
  .lv-bar { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .lv-bar input { font-size: 16px; }
  .page-live .toasts { bottom: calc(72px + env(safe-area-inset-bottom)); }
}
