/* ==========================================================================
   LINKVAULT — Locker UI v3.0.0  (Cyber-Glass × High-Trust)
   --------------------------------------------------------------------------
   1.  Tokens & reset
   2.  Ambient layer (wallpaper, overlay, orbs, canvas)
   3.  Navbar
   4.  Layout
   5.  Glass card + gradient hairline
   6.  Media still (16:9 preview)
   7.  Lock content (eyebrow, title, metadata, verified)
   8.  Dual-node stepper
   9.  Primary CTA (idle / busy / step-2 / shimmer)
   10. Helper, micro-copy, trust row
   11. Step-2 + unlocked states
   12. Player states (spinner, video, image)
   13. Error card
   14. Anti-adblock modal
   15. Responsive + reduced motion
   ========================================================================== */

/* 1. Tokens & reset ------------------------------------------------------- */
:root {
    --bg: #05070f;
    --panel: rgba(13, 19, 34, 0.82);
    --panel-solid: #0b1220;
    --ink: #eaf6ff;
    --ink-soft: #c2d2e6;
    --muted: #93a4bd;
    --dim: #6b7f9c;
    --cyan: #22d3ee;
    --cyan-soft: #67e8f9;
    --violet: #7c3aed;
    --green: #16a34a;
    --green-soft: #4ade80;
    --line: rgba(255, 255, 255, 0.09);
    --radius: 22px;
    --radius-sm: 14px;
    --shadow: 0 26px 70px -24px rgba(0, 0, 0, 0.92);
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --font: Inter, "Segoe UI Variable Display", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* `clip` avoids turning <body> into a scroll container (iOS/WKWebView quirk
   that can trap vertical scrolling). `hidden` above is the fallback. */
@supports (overflow: clip) {
    body { overflow-x: clip; }
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font-family: inherit; }
a { color: inherit; }
svg { display: block; }

/* 2. Ambient layer -------------------------------------------------------- */
.bg {
    position: fixed;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(80px) saturate(1.25);
    transform: scale(1.22);
    opacity: 0.45;
    z-index: -3;
    pointer-events: none;
}

.overlay {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(120% 90% at 50% 0%, rgba(5, 7, 15, 0.35) 0%, rgba(5, 7, 15, 0.86) 55%, #05070f 100%),
        linear-gradient(180deg, rgba(5, 7, 15, 0.55), rgba(5, 7, 15, 0.92));
    z-index: -2;
    pointer-events: none;
}

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(52px);
    pointer-events: none;
    z-index: -4;
    will-change: transform;
}
.orb--a {
    width: 46vmax;
    height: 46vmax;
    max-width: 520px;
    max-height: 520px;
    top: -18vmax;
    left: -16vmax;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.55), rgba(14, 165, 233, 0) 70%);
    animation: orb-drift-a 26s ease-in-out infinite alternate;
}
.orb--b {
    width: 52vmax;
    height: 52vmax;
    max-width: 580px;
    max-height: 580px;
    bottom: -22vmax;
    right: -18vmax;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.5), rgba(124, 58, 237, 0) 70%);
    animation: orb-drift-b 32s ease-in-out infinite alternate;
}
@keyframes orb-drift-a {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(4vmax, 3vmax, 0) scale(1.08); }
}
@keyframes orb-drift-b {
    from { transform: translate3d(0, 0, 0) scale(1.05); }
    to   { transform: translate3d(-5vmax, -3vmax, 0) scale(1); }
}

#bg-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.85;
}

/* 3. Navbar --------------------------------------------------------------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(60px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 50;
    background: rgba(5, 7, 15, 0.72);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-decoration: none;
    color: #fff;
}

.navbar-brand span { color: var(--cyan); }

.brand-mark {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: linear-gradient(140deg, var(--cyan), var(--violet));
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.42);
    flex: 0 0 26px;
}
.brand-mark svg { width: 13px; height: 13px; stroke: #04121a; stroke-width: 2.4; }

.navbar-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: #a9bad2;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    padding: 5px 10px;
    border-radius: 99px;
    white-space: nowrap;
}
.navbar-pill svg { width: 11px; height: 11px; stroke: var(--green-soft); }

/* 4. Layout --------------------------------------------------------------- */
.container {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(60px + env(safe-area-inset-top, 0px) + 24px) 16px max(24px, env(safe-area-inset-bottom, 0px));
}

/* Safe centering: when the card is taller than the viewport, a plain
   `center` alignment can push its top above the scroll origin and make it
   unreachable. `safe center` falls back to start alignment in that case. */
@supports (align-items: safe center) {
    .container { align-items: safe center; }
}

/* 5. Glass card ----------------------------------------------------------- */
.locker {
    position: relative;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    border-radius: var(--radius);
    padding: 12px 12px 16px;
    background: linear-gradient(168deg, rgba(18, 26, 46, 0.86), rgba(8, 11, 22, 0.94));
    backdrop-filter: blur(18px) saturate(1.15);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
    border: 1px solid rgba(125, 211, 252, 0.14);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    isolation: isolate;
}

.locker::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: calc(var(--radius) + 1px);
    padding: 1px;
    pointer-events: none;
    background: linear-gradient(140deg,
        rgba(34, 211, 238, 0.75),
        rgba(124, 58, 237, 0.18) 42%,
        rgba(34, 211, 238, 0.05) 68%,
        rgba(168, 85, 247, 0.55));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    /* z-index 0 (not 2): if masking is unsupported the gradient still paints
       BEHIND the media panel instead of washing over the card. */
    z-index: 0;
}

/* If neither masking syntax works, drop the ring and keep a plain border
   rather than showing a filled gradient rectangle over the card. */
@supports not ((mask-composite: exclude) or (-webkit-mask-composite: xor)) {
    .locker::before { display: none; }
    .locker { border-color: rgba(125, 211, 252, 0.26); }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .locker { background: var(--panel-solid); }
}

/* 6. Media still ---------------------------------------------------------- */
.player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background:
        radial-gradient(120% 90% at 15% 10%, rgba(56, 189, 248, 0.55), transparent 55%),
        radial-gradient(90% 80% at 85% 25%, rgba(168, 85, 247, 0.5), transparent 60%),
        linear-gradient(160deg, #0b1224, #141a3a 60%, #0a0f1e);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.player-thumb-img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    transition: filter 0.6s var(--ease), transform 0.6s var(--ease), opacity 0.4s var(--ease);
}

.player-thumb-img.poster-fallback {
    opacity: 0.35;
    filter: grayscale(60%) contrast(115%);
}

.still-scrim {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(115% 95% at 50% 42%, rgba(4, 7, 16, 0) 34%, rgba(4, 7, 16, 0.58) 100%),
        linear-gradient(180deg, rgba(4, 7, 16, 0.28) 0%, rgba(4, 7, 16, 0) 35%, rgba(4, 7, 16, 0.82) 100%);
    pointer-events: none;
}

/* Locked posters get a light photographic grade so a 320px Telegram
   thumbnail reads like a frame from an HD stream. */
.locker:not(.unlocked) .player-thumb-img:not(.poster-fallback) {
    filter: brightness(0.84) contrast(1.08) blur(0.8px);
    transform: scale(1.02);
}

.still-badge {
    position: absolute;
    top: 9px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 4px 7px;
    border-radius: 6px;
    z-index: 2;
    pointer-events: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.still-badge--source {
    left: 9px;
    color: #bae6fd;
    border: 1px solid rgba(125, 211, 252, 0.35);
    background: rgba(3, 7, 18, 0.7);
}
.still-badge--ready {
    right: 9px;
    color: #bbf7d0;
    border: 1px solid rgba(34, 197, 94, 0.35);
    background: rgba(6, 20, 12, 0.72);
}
.ready-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green-soft);
    box-shadow: 0 0 8px var(--green-soft);
    animation: dot-pulse 2.4s ease-in-out infinite;
}
@keyframes dot-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.8); }
}

.still-meta {
    position: absolute;
    left: 9px;
    right: 9px;
    bottom: 9px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    z-index: 2;
    pointer-events: none;
}

.still-type {
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #dbeafe;
    background: rgba(3, 7, 18, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 3px 6px;
    border-radius: 5px;
}

.still-duration {
    display: inline-flex;
    align-items: center;
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    color: #e6eef8;
    background: rgba(3, 7, 18, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 3px 6px;
    border-radius: 5px;
    white-space: nowrap;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.player-play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    pointer-events: auto;
    cursor: pointer;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.play-btn-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(8, 12, 24, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.38);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
    transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}

.play-icon-svg {
    width: 15px;
    height: 15px;
    margin-left: 2px;
    fill: #fff;
    opacity: 0.94;
}

.play-btn-text {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}

.play-spinner {
    display: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.25);
    border-top-color: var(--cyan);
    animation: btn-spin 0.7s linear infinite;
}

.player-play-overlay:hover .play-btn-circle { transform: scale(1.06); background: rgba(34, 211, 238, 0.24); }
.player-play-overlay.is-loading .play-btn-circle { display: none; }
.player-play-overlay.is-loading .play-spinner { display: block; }
.player-play-overlay.is-loading .play-btn-text { opacity: 1; }
.locker.unlocked .play-btn-text { opacity: 1; }
.player.is-playing .player-play-overlay { opacity: 0; pointer-events: none; }

/* Locked image viewer */
.image-viewer-container {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-viewer-img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: blur(20px) saturate(1.15);
    transform: scale(1.07);
    transition: filter 0.6s var(--ease), transform 0.6s var(--ease);
}

.locker.unlocked .image-viewer-img {
    filter: none;
    transform: none;
}

.image-actions-bar {
    position: absolute;
    right: 9px;
    bottom: 9px;
    z-index: 7;
    display: none;
    align-items: center;
    gap: 6px;
    padding: 5px 6px;
    border-radius: 10px;
    background: rgba(5, 9, 18, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.locker.unlocked .image-actions-bar { display: flex; animation: fade-up 0.4s var(--ease) both; }

.image-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 9px;
    border-radius: 7px;
    font-size: 9.5px;
    font-weight: 650;
    letter-spacing: 0.02em;
    color: #dbeafe;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s var(--ease);
}
.image-action-btn:hover { background: rgba(255, 255, 255, 0.14); }
.image-action-btn.primary {
    background: linear-gradient(100deg, var(--cyan-soft), var(--cyan));
    border-color: transparent;
    color: #04121a;
}
.image-action-icon { width: 11px; height: 11px; }

/* 7. Lock content --------------------------------------------------------- */
.lock {
    position: relative;
    z-index: 3;
    padding: 16px 6px 0;
    transition: opacity 0.42s var(--ease), transform 0.42s var(--ease);
}

.lock-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #7dd3fc;
    margin-bottom: 7px;
}
.lock-eyebrow svg { width: 10px; height: 10px; stroke: #7dd3fc; }

.lock-title {
    font-size: clamp(19px, 5.2vw, 23px);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.22;
    color: #fff;
    overflow-wrap: anywhere;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 9px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #a9bad2;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3px 7px;
    border-radius: 6px;
    white-space: nowrap;
}
.pill svg { width: 9px; height: 9px; stroke: #7f93ad; }

.verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #fff;
    background: var(--green);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 3px 8px 3px 6px;
    border-radius: 99px;
    white-space: nowrap;
    box-shadow: 0 4px 14px -6px rgba(22, 163, 74, 0.9);
}
.verified svg { width: 10px; height: 10px; stroke: #fff; stroke-width: 3; }

/* 8. Dual-node stepper ---------------------------------------------------- */
.steps { margin-top: 16px; }

.step-row {
    display: flex;
    align-items: center;
    gap: 9px;
}

.step-node {
    position: relative;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #8fa2bd;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    transition: color 0.3s var(--ease), background 0.3s var(--ease),
                border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.step-node .tick { display: none; width: 13px; height: 13px; stroke: currentColor; stroke-width: 3; }

.step-node.is-active {
    color: #e0f2fe;
    background: rgba(34, 211, 238, 0.14);
    border-color: rgba(34, 211, 238, 0.62);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08), 0 0 16px rgba(34, 211, 238, 0.42);
}
.step-node.is-done {
    color: var(--green-soft);
    background: rgba(22, 163, 74, 0.18);
    border-color: rgba(74, 222, 128, 0.55);
}
.step-node.is-done .num { display: none; }
.step-node.is-done .tick { display: block; }

.step-track {
    flex: 1;
    height: 3px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.step-fill {
    display: block;
    height: 100%;
    width: 50%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--cyan), var(--violet));
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.55);
    transition: width 0.65s var(--ease), background 0.4s var(--ease);
}

.step-labels {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 7px;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--dim);
}
.step-labels span { transition: color 0.3s var(--ease); }
.step-labels span.is-on { color: #e0f2fe; }
.step-labels span.is-ok { color: var(--green-soft); }

.step-caption {
    margin-top: 6px;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #8ba0bb;
    font-variant-numeric: tabular-nums;
}

/* 9. Primary CTA ---------------------------------------------------------- */
.unlock-btn {
    position: relative;
    width: 100%;
    margin-top: 15px;
    border: 0;
    border-radius: 13px;
    padding: 14px 16px;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 750;
    letter-spacing: 0.005em;
    color: #04121a;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    touch-action: manipulation;
    background: linear-gradient(100deg, var(--cyan-soft), var(--cyan) 42%, #818cf8);
    box-shadow: 0 12px 34px -8px rgba(34, 211, 238, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.45);
    transition: transform 0.18s var(--ease), box-shadow 0.25s var(--ease),
                background 0.45s var(--ease), color 0.3s var(--ease), opacity 0.2s var(--ease);
}
.unlock-btn:active:not([disabled]) { transform: scale(0.977); }
.unlock-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(5, 7, 15, 0.95), 0 0 0 5px rgba(34, 211, 238, 0.65);
}
.unlock-btn[disabled] { cursor: progress; }

.btn-label { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px; }

.btn-shimmer {
    position: absolute;
    top: 0;
    left: -70%;
    width: 42%;
    height: 100%;
    transform: skewX(-18deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}
.unlock-btn.is-shimmer .btn-shimmer { animation: btn-sweep 0.85s var(--ease) 1; }
@keyframes btn-sweep {
    0%   { left: -70%; opacity: 0; }
    18%  { opacity: 0.85; }
    100% { left: 120%; opacity: 0; }
}

.btn-spinner {
    display: none;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border-radius: 50%;
    border: 2px solid rgba(4, 18, 26, 0.28);
    border-top-color: #04121a;
    animation: btn-spin 0.7s linear infinite;
}
.unlock-btn[aria-busy="true"] .btn-spinner { display: block; }
.unlock-btn[aria-busy="true"] { opacity: 0.92; }
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* 10. Helper / micro-copy / trust ---------------------------------------- */
.helper {
    margin-top: 9px;
    text-align: center;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.015em;
    color: #8ba0bb;
    min-height: 14px;
    transition: color 0.3s var(--ease);
}
.helper.is-warn { color: #fbbf24; }

.microcopy {
    margin-top: 5px;
    text-align: center;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: #62748d;
}

.trust {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #62748d;
}
.trust span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.trust svg { width: 10px; height: 10px; stroke: #4f6079; }

/* 11. Step-2 + unlocked states ------------------------------------------- */
.locker.step-2 .step-fill {
    width: 100%;
    background: linear-gradient(90deg, var(--green-soft), var(--cyan));
    box-shadow: 0 0 14px rgba(52, 211, 153, 0.55);
}

.locker.step-2 .unlock-btn {
    color: #03130f;
    background: linear-gradient(100deg, #34d399, var(--cyan) 58%, #818cf8);
    box-shadow: 0 12px 38px -8px rgba(52, 211, 153, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.step-complete {
    display: none;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: var(--green-soft);
}
.locker.step-2 .step-complete { display: inline-flex; animation: fade-up 0.45s var(--ease) both; }

@keyframes fade-up {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lock {
    max-height: 900px;
    transition: opacity 0.42s var(--ease), transform 0.42s var(--ease),
                max-height 0.5s var(--ease), padding 0.5s var(--ease);
}

.locker.unlocked .lock {
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.locker.unlocked .player-thumb-img {
    filter: none;
    transform: none;
    opacity: 1;
}

.locker.unlocked .still-scrim { opacity: 0.35; transition: opacity 0.6s var(--ease); }

.locker.unlocked .player.is-playable { cursor: pointer; }

/* 12. Player states ------------------------------------------------------- */
.player-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease);
    z-index: 4;
}
.player.is-playing .player-video { opacity: 1; pointer-events: auto; }
.player.is-playing .player-thumb-img,
.player.is-playing .still-scrim,
.player.is-playing .still-meta,
.player.is-playing .still-badge { opacity: 0; }

.player-spinner-overlay {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(4, 7, 16, 0.78);
    z-index: 6;
}
.player-spinner-overlay.is-active { display: flex; }

.spinner-ring {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid rgba(34, 211, 238, 0.18);
    border-top-color: var(--cyan);
    animation: btn-spin 0.85s linear infinite;
}
.spinner-text {
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: #93c5fd;
}

/* 13. Error card ---------------------------------------------------------- */
.error-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 34px 26px;
    text-align: center;
    border-radius: var(--radius);
    background: linear-gradient(168deg, rgba(18, 26, 46, 0.9), rgba(8, 11, 22, 0.95));
    border: 1px solid rgba(239, 68, 68, 0.32);
    box-shadow: var(--shadow);
}
.error-icon {
    width: 46px;
    height: 46px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
}
.error-icon svg { width: 20px; height: 20px; stroke: #f87171; }
.error-card h2 { font-size: 19px; font-weight: 700; color: #f87171; margin-bottom: 7px; letter-spacing: -0.01em; }
.error-card p { font-size: 12.5px; line-height: 1.55; color: var(--muted); margin-bottom: 20px; }
.error-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s var(--ease);
}
.error-btn:hover { background: rgba(255, 255, 255, 0.11); }

/* 14. Anti-adblock modal -------------------------------------------------- */
.ad-check-slot {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.adblock-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}
.adblock-modal.is-active { display: flex; }

.adblock-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 6, 14, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.adblock-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 26px 22px 22px;
    text-align: center;
    border-radius: 20px;
    background: linear-gradient(168deg, rgba(18, 26, 46, 0.97), rgba(8, 11, 22, 0.99));
    border: 1px solid rgba(125, 211, 252, 0.22);
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.95);
    animation: modal-in 0.35s var(--ease) both;
}
@keyframes modal-in {
    from { opacity: 0; transform: translateY(10px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.adblock-icon-wrap {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.3);
}
.adblock-icon-wrap svg { width: 22px; height: 22px; stroke: #67e8f9; }

.adblock-title { font-size: 18px; font-weight: 700; letter-spacing: -0.015em; color: #fff; margin-bottom: 7px; }
.adblock-desc { font-size: 12px; line-height: 1.55; color: var(--muted); margin-bottom: 18px; }

.adblock-timer-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 16px; }
.adblock-timer-circle { position: relative; width: 92px; height: 92px; }
.adblock-timer-svg { width: 92px; height: 92px; transform: rotate(-90deg); }
.adblock-timer-bg { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 6; }
.adblock-timer-progress {
    fill: none;
    stroke: var(--cyan);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 263.89;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.95s linear;
    filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.6));
}
.adblock-timer-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 1px;
    font-size: 25px;
    font-weight: 800;
    color: #fff;
    font-variant-numeric: tabular-nums;
}
.adblock-timer-unit { font-size: 11px; font-weight: 600; color: #7f93ad; }
.adblock-timer-label { font-size: 10.5px; color: #8ba0bb; }

.adblock-status { min-height: 15px; font-size: 10.5px; color: #fbbf24; margin-bottom: 10px; }

.adblock-actions { display: flex; flex-direction: column; gap: 8px; }
.adblock-btn {
    width: 100%;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 11px;
    border: 1px solid transparent;
    font-size: 12.5px;
    font-weight: 650;
    cursor: pointer;
    transition: transform 0.16s var(--ease), background 0.2s var(--ease), opacity 0.2s var(--ease);
}
.adblock-btn:active:not([disabled]) { transform: scale(0.985); }
.adblock-btn-primary { background: linear-gradient(100deg, var(--cyan-soft), var(--cyan)); color: #04121a; }
.adblock-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}
.adblock-btn-secondary[disabled] { opacity: 0.55; cursor: not-allowed; }
.adblock-btn-secondary.is-ready { background: rgba(34, 197, 94, 0.16); border-color: rgba(34, 197, 94, 0.35); color: #bbf7d0; }

/* 15. Responsive + motion preferences ------------------------------------ */
/* Phones: compact rhythm so the CTA stays high in the viewport */
@media (max-width: 480px) {
    .container {
        padding: calc(60px + env(safe-area-inset-top, 0px) + 14px) 12px max(16px, env(safe-area-inset-bottom, 0px));
    }
    .locker { padding: 10px 10px 13px; border-radius: 20px; }
    .lock { padding: 13px 4px 0; }
    .lock-eyebrow { margin-bottom: 5px; }
    .lock-title { font-size: clamp(18px, 5.4vw, 21px); }
    .meta-row { margin-top: 8px; gap: 5px; }
    .pill { font-size: 9.5px; padding: 3px 6px; }
    .verified { font-size: 9.5px; padding: 3px 7px 3px 5px; }
    .steps { margin-top: 13px; }
    .step-labels { margin-top: 5px; }
    .step-caption { margin-top: 4px; font-size: 10px; }
    .unlock-btn { margin-top: 12px; min-height: 48px; padding: 13px 12px; font-size: 13.5px; }
    .helper { margin-top: 7px; }
    .microcopy { margin-top: 4px; font-size: 9.5px; }
    .trust { margin-top: 11px; padding-top: 9px; gap: 5px 9px; font-size: 8.5px; }
    .still-badge { font-size: 8px; padding: 3px 6px; }
    .play-btn-circle { width: 42px; height: 42px; }
    /* Cheaper compositing on mobile GPUs: smaller radii, same look */
    .bg { filter: blur(44px) saturate(1.15); }
    .orb { filter: blur(34px); }
    .locker { backdrop-filter: blur(12px) saturate(1.08); -webkit-backdrop-filter: blur(12px) saturate(1.08); }
}

/* Short viewports (Telegram in-app browser with its bars, small Androids) */
@media (max-height: 660px) {
    .container {
        padding-top: calc(60px + env(safe-area-inset-top, 0px) + 8px);
        padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
    }
    .locker { padding: 8px 8px 11px; }
    .lock { padding-top: 10px; }
    .lock-eyebrow { margin-bottom: 3px; }
    .lock-title { font-size: 18px; }
    .meta-row { margin-top: 6px; }
    .steps { margin-top: 10px; }
    .step-caption { margin-top: 3px; }
    .unlock-btn { margin-top: 10px; min-height: 46px; padding: 12px; }
    .helper { margin-top: 6px; }
    .microcopy { margin-top: 3px; }
    .trust { margin-top: 8px; padding-top: 7px; }
}

/* Very short screens: prioritise the CTA over the reassurance footer */
@media (max-height: 545px) {
    .trust { display: none; }
    .player-play-overlay { transform: scale(0.9); }
}

@media (max-width: 340px) {
    .lock-title { font-size: 17.5px; }
    .microcopy { font-size: 9px; }
    .play-btn-circle { width: 38px; height: 38px; }
    .step-caption { font-size: 9.5px; }
}

/* Short landscape phones: put the still beside the copy instead of above it */
@media (max-height: 560px) and (orientation: landscape) and (min-width: 560px) {
    .container {
        padding-top: calc(60px + env(safe-area-inset-top, 0px) + 8px);
        padding-bottom: 12px;
    }
    .locker {
        max-width: 720px;
        display: grid;
        grid-template-columns: 1.05fr 0.95fr;
        gap: 12px;
        align-items: center;
    }
    .locker > .player { height: 100%; aspect-ratio: auto; min-height: 240px; }
    .lock { padding-top: 2px; }
    .trust { flex-wrap: nowrap; }
    .steps { margin-top: 12px; }
    .unlock-btn { margin-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    #bg-canvas { display: none; }
    .orb { animation: none; }
    .ready-dot { animation: none; }
}

/* High-contrast / forced colours */
@media (forced-colors: active) {
    .locker, .unlock-btn, .step-node, .pill, .verified { border: 1px solid CanvasText; }
}

/* ==========================================================================
   v3.0.4 — Card-as-trigger hand-off
   Callout + curved arrow above the card, glowing centre play button, a
   full-card overlay <a>, and the browser fallback line under the card.
   ========================================================================== */

/* --- Unlocked callout + curved arrow ------------------------------------- */
.watch-callout {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2px 10px 0;
    pointer-events: none; /* the arrow must never eat the tap */
}
.locker.app-handoff .watch-callout {
    display: flex;
    animation: callout-in .5s cubic-bezier(.22, .61, .36, 1) both;
}
@keyframes callout-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.watch-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: #67e8f9;
}
.watch-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, .16), 0 0 10px rgba(52, 211, 153, .8);
    animation: watch-dot 1.6s ease-in-out infinite;
}
@keyframes watch-dot {
    0%, 100% { opacity: .55; }
    50%      { opacity: 1; }
}

.watch-title {
    margin: 7px 0 0;
    font-size: clamp(19px, 5.1vw, 23px);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -.03em;
    color: #f4fbff;
    text-shadow: 0 0 18px rgba(34, 211, 238, .28);
}

.watch-badge {
    margin-top: 9px;
    padding: 7px 15px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #03131a;
    background: linear-gradient(100deg, #67e8f9, #22d3ee 52%, #34d399);
    box-shadow: 0 6px 22px -6px rgba(34, 211, 238, .75), inset 0 1px 0 rgba(255, 255, 255, .5);
    animation: badge-breathe 2.2s ease-in-out infinite;
}
@keyframes badge-breathe {
    0%, 100% { box-shadow: 0 6px 22px -6px rgba(34, 211, 238, .55), inset 0 1px 0 rgba(255, 255, 255, .5); }
    50%      { box-shadow: 0 8px 30px -4px rgba(52, 211, 153, .80), inset 0 1px 0 rgba(255, 255, 255, .6); }
}

.watch-arrow {
    width: 52px;
    height: 60px;
    margin: 7px 0 -3px;
    overflow: visible;
    filter: drop-shadow(0 0 8px rgba(34, 211, 238, .65));
    animation: arrow-float 1.7s ease-in-out infinite;
}
.watch-arrow-glow {
    opacity: .30;
    filter: blur(2.5px);
}
@keyframes arrow-float {
    0%, 100% { transform: translateY(-5px); opacity: .80; }
    50%      { transform: translateY(5px);  opacity: 1; }
}

/* --- Card overlay anchor -------------------------------------------------- */
.player-launch {
    position: absolute;
    inset: 0;
    z-index: 7;
    display: block;
    border-radius: inherit;
    background: transparent;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background .25s ease;
}
.player-launch:active { background: rgba(34, 211, 238, .06); }
.player-launch[hidden] { display: none !important; }

/* The card reads as alive once the deep link is armed. */
.locker.armed .player {
    box-shadow: 0 0 0 1px rgba(34, 211, 238, .32), 0 0 34px -6px rgba(34, 211, 238, .45);
}

.locker.armed .play-btn-circle {
    border-color: rgba(165, 243, 252, .95);
    background: rgba(8, 30, 40, .55);
    animation: play-glow 1.9s ease-in-out infinite;
}
@keyframes play-glow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 211, 238, .42), 0 0 18px rgba(34, 211, 238, .35), inset 0 0 12px rgba(34, 211, 238, .18);
    }
    55% {
        transform: scale(1.06);
        box-shadow: 0 0 0 12px rgba(34, 211, 238, 0), 0 0 34px rgba(52, 211, 153, .55), inset 0 0 16px rgba(34, 211, 238, .30);
    }
}
.locker.armed .play-icon-svg { fill: #eafcff; filter: drop-shadow(0 0 6px rgba(34, 211, 238, .7)); }
.locker.armed .play-btn-text { color: #d9fbff; text-shadow: 0 0 12px rgba(34, 211, 238, .45); }

/* --- Browser fallback line (watchdog-revealed) ---------------------------- */
.open-fallback {
    margin: 10px 0 2px;
    text-align: center;
    font-size: 11.5px;
    color: var(--muted, #93a4bd);
    animation: fade-up .35s var(--ease) both;
}
.open-fallback[hidden] { display: none !important; }
.open-fallback a {
    color: #9fe9ff;
    text-decoration: none;
    border-bottom: 1px solid rgba(34, 211, 238, .35);
    padding-bottom: 1px;
}
.open-fallback a:hover { color: #e6feff; border-bottom-color: rgba(34, 211, 238, .8); }
