@font-face {
    font-family: 'Epilogue';
    src: url('assets/epilogue-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Mazius Display';
    src: url('assets/mazius-display.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

/* Body / UI copy in panels (help, nobo definitions, find handles + email, find tagline); nobo “currently at…” uses Epilogue */
:root {
    --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

html {
    background-color: #000000;
}

body {
    margin: 0;
    overflow: hidden;
    background-color: #000000;
    /* Dynamic viewport avoids mobile browser chrome jumping 100vh */
    min-height: 100vh;
    min-height: 100dvh;
}

/* Landmark for SEO / screen readers — matches former body-sized canvas */
main.portfolio-main {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Canvas ── */

#artworkContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background-color: #000000;
    touch-action: none;
}

/* Full-viewport intro — above #overlay (100) and popovers (101) until removed */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 200;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: #000000;
    pointer-events: none;
    transform: scale(1);
    filter: blur(0);
    transform-origin: center center;
    transition:
        opacity 0.62s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 0.62s,
        transform 0.68s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.68s cubic-bezier(0.22, 1, 0.36, 1);
}

.preloader.preloader--done {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.035);
    filter: blur(14px);
}

@media (prefers-reduced-motion: reduce) {
    .preloader {
        transition: opacity 0.4s ease, visibility 0s linear 0.4s;
        transform: none;
        filter: none;
    }

    .preloader.preloader--done {
        transform: none;
        filter: none;
    }
}

.preloader-video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

#panLayer {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    transform-origin: 0 0;
    will-change: transform;
    pointer-events: none;
}

#panLayer > img,
#panLayer > video {
    position: absolute;
    left: 0;
    top: 0;
    display: block;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    backface-visibility: hidden;
}

/* ── Media lightbox (below #overlay z-index so nav stays on top) ── */

.media-lightbox[hidden] {
    display: none !important;
}

.media-lightbox:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99;
    pointer-events: auto;
    box-sizing: border-box;
    padding:
        max(24px, env(safe-area-inset-top, 0px))
        max(24px, env(safe-area-inset-right, 0px))
        max(24px, env(safe-area-inset-bottom, 0px))
        max(24px, env(safe-area-inset-left, 0px));
}

.media-lightbox-scrim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    display: block;
}

.media-lightbox-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 100%;
    pointer-events: none;
}

.media-lightbox-stage-wrap {
    position: relative;
    max-width: min(92vw, 1400px);
    max-height: min(88vh, 1200px);
    pointer-events: auto;
}

.media-lightbox-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: min(92vw, 1400px);
    max-height: min(88vh, 1200px);
}

.media-lightbox-stage .media-lightbox-media {
    display: block;
    max-width: min(92vw, 1400px);
    max-height: min(88vh, 1200px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
}

/* ── Overlay root ── */

#overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
}

/* ── Overlay controls ── */

#btn-help,
#btn-nobo,
#btn-find {
    pointer-events: auto;
    cursor: pointer;
    text-decoration: none;
    will-change: transform;
}

#btn-help[aria-expanded='true'],
#btn-nobo[aria-expanded='true'],
#btn-find[aria-expanded='true'] {
    border-color: rgba(100, 116, 139, 0.5);
    box-shadow:
        0 2px 14px rgba(15, 23, 42, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

/* Nobo cluster — top left; hover opens card */
.nobo-popover-root {
    pointer-events: auto;
    position: absolute;
    top: max(24px, env(safe-area-inset-top, 0px));
    left: max(24px, env(safe-area-inset-left, 0px));
    z-index: 101;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 4px 8px 8px 4px;
    box-sizing: border-box;
    max-width: min(
        368px,
        calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 32px)
    );
    /* Widen hit target to panel width so diagonal moves toward the card stay “inside” the root */
    --popover-bridge-w: min(
        368px,
        calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 48px)
    );
}

/*
 * Invisible “bridge” under the trigger: the panel is absolutely positioned with margin-top,
 * so the gap is outside the root’s box and mouseleave fires before the pointer reaches the panel.
 * Same idea as https://css-tricks.com/dropdown-menus-with-more-forgiving-mouse-movement-paths/
 */
.nobo-popover-root::after {
    content: '';
    position: absolute;
    left: 0;
    top: 100%;
    width: var(--popover-bridge-w);
    height: 22px;
    pointer-events: auto;
    z-index: 0;
}

/* Help cluster — top right; hover opens card */
.help-popover-root {
    pointer-events: auto;
    position: absolute;
    top: max(24px, env(safe-area-inset-top, 0px));
    right: max(24px, env(safe-area-inset-right, 0px));
    z-index: 101;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    padding: 4px 0 8px 8px;
    box-sizing: border-box;
    max-width: min(
        368px,
        calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 32px)
    );
    --popover-bridge-w: min(
        368px,
        calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 48px)
    );
}

.help-popover-root::after {
    content: '';
    position: absolute;
    right: 0;
    top: 100%;
    width: var(--popover-bridge-w);
    height: 22px;
    pointer-events: auto;
    z-index: 0;
}

/* Find cluster — bottom center; hover opens card without losing hit target between card + pill */
.find-popover-root {
    pointer-events: auto;
    position: absolute;
    bottom: max(24px, env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 6px 10px 10px;
    z-index: 101;
    --find-bridge-w: min(
        500px,
        calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 40px)
    );
}

/* Corridor above the pill: panel sits above the root with margin-bottom, leaving a dead zone */
.find-popover-root::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 100%;
    width: var(--find-bridge-w);
    height: 32px;
    pointer-events: auto;
    z-index: 0;
}

/* Help — circle 46px */
#btn-help {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.92);
    color: #334155;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    line-height: 0;
    overflow: visible;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    font-family: 'Epilogue', sans-serif;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1;
}

/* Nobo — pill (same family / weight as find me + help); fixed height + no vertical padding centers label */
#btn-nobo {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 46px;
    min-height: 46px;
    padding: 0 22px;
    margin: 0;
    color: #334155;
    background-color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 999px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

#btn-nobo .btn-nobo-label {
    display: block;
    font-family: 'Epilogue', sans-serif;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1;
    transform: translateY(1px);
    pointer-events: none;
    user-select: none;
}

#btn-help .btn-help-char {
    display: block;
    pointer-events: none;
    user-select: none;
    /* Epilogue “?” sits slightly high in a circle */
    transform: translateY(1px);
}

/* Find me — pill (inside .find-popover-root) */
#btn-find {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    flex-wrap: nowrap;
    position: relative;
    z-index: 2;
    padding: 11px 28px;
    margin: 0;
    font-family: 'Epilogue', sans-serif;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -0.02em;
    text-transform: lowercase;
    color: #334155;
    background-color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 460.8px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

/* ── Help card — framer-1fv5c7p ── */
/* backdrop-filter blur(5px), rgba(247,250,252,0.85), border-radius 25px,
   box-shadow 0 10px 20px rgba(0,0,0,0.05), padding 18px, gap 16px, width 368px */

/* Popover panels — open/close motion (see index.html panel--visible + hidden) */
@keyframes popover-stagger-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#help-card,
#nobo-card {
    pointer-events: auto;
    box-sizing: border-box;
    min-width: 0;
    width: min(
        368px,
        calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 48px)
    );
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px;
    background-color: rgba(247, 250, 252, 0.85);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border-radius: 25px;
    box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    z-index: 3;
    transform-origin: top left;
    transition:
        opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.38s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.32s ease;
}

#nobo-card:not([hidden]) {
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 8px;
}

#help-card:not([hidden]) {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    transform-origin: top right;
}

#help-card[hidden],
#nobo-card[hidden] {
    display: none !important;
}

#help-card:not([hidden]):not(.panel--visible),
#nobo-card:not([hidden]):not(.panel--visible) {
    opacity: 0;
    pointer-events: none;
    filter: blur(4px);
    box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.02);
}

#nobo-card:not([hidden]):not(.panel--visible) {
    transform: translate(-10px, -8px) scale(0.94);
}

#help-card:not([hidden]):not(.panel--visible) {
    transform: translate(10px, -8px) scale(0.94);
}

#help-card.panel--visible,
#nobo-card.panel--visible {
    opacity: 1;
    pointer-events: auto;
    filter: none;
    box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.05);
}

#nobo-card.panel--visible {
    transform: translate(0, 0) scale(1);
}

#help-card.panel--visible {
    transform: translate(0, 0) scale(1);
}

#help-card.panel--visible > * {
    animation: popover-stagger-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#help-card.panel--visible > *:nth-child(1) {
    animation-delay: 0.03s;
}

#help-card.panel--visible > *:nth-child(2) {
    animation-delay: 0.07s;
}

#help-card.panel--visible > *:nth-child(3) {
    animation-delay: 0.11s;
}

#help-card.panel--visible > *:nth-child(4) {
    animation-delay: 0.15s;
}

#nobo-card.panel--visible .nobo-dict > * {
    animation: popover-stagger-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#nobo-card.panel--visible .nobo-dict-headword {
    animation-delay: 0.03s;
}

#nobo-card.panel--visible .nobo-dict-pos {
    animation-delay: 0.07s;
}

#nobo-card.panel--visible .nobo-dict-definitions {
    animation-delay: 0.11s;
}

#help-card p {
    margin: 0;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: #475569;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* Nobo panel — dictionary-style entry */
.nobo-dict {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nobo-dict-headword {
    margin: 0;
    font-family: 'Epilogue', sans-serif;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #0f172a;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.nobo-dict-slash {
    font-weight: 500;
    color: #94a3b8;
    padding: 0 0.2em;
}

.nobo-dict-pos {
    margin: -2px 0 0;
    font-family: 'Epilogue', sans-serif;
    font-size: 13px;
    font-weight: 600;
    font-style: normal;
    letter-spacing: -0.02em;
    color: #64748b;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.nobo-dict-definitions {
    margin: 4px 0 0;
    padding: 12px 0 0 1.2em;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: #475569;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.nobo-dict-definitions li {
    padding-left: 0.4em;
}

.nobo-dict-definitions li + li {
    margin-top: 0.65em;
}

/* Separator — framer-9s4ds4: background #94a3b8, border-radius 2px, height 2px */
.help-divider {
    height: 2px;
    background-color: #94a3b8;
    border-radius: 2px;
    width: 100%;
    flex-shrink: 0;
}

/* ── Find me card — glass panel (match help card treatment) ── */

#find-card {
    pointer-events: auto;
    width: min(
        500px,
        calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 40px)
    );
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px;
    /* Shared inner surfaces: hero row + link / email pills */
    --find-surface-bg: rgba(255, 255, 255, 0.92);
    --find-surface-border: 1px solid rgba(255, 255, 255, 0.85);
    --find-surface-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    --find-surface-radius-block: 22px;
    background-color: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow:
        0 8px 32px rgba(15, 23, 42, 0.08),
        0 2px 8px rgba(15, 23, 42, 0.04);
    overflow: visible;
    z-index: 3;
    transform-origin: bottom center;
    transition:
        opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.32s ease;
}

#find-card:not([hidden]) {
    position: absolute;
    left: 50%;
    bottom: 100%;
    margin-bottom: 10px;
}

#find-card[hidden] {
    display: none !important;
}

#find-card:not([hidden]):not(.panel--visible) {
    opacity: 0;
    pointer-events: none;
    filter: blur(5px);
    box-shadow:
        0 4px 16px rgba(15, 23, 42, 0.04),
        0 1px 4px rgba(15, 23, 42, 0.03);
    transform: translate(-50%, 16px) scale(0.94);
}

#find-card.panel--visible {
    opacity: 1;
    pointer-events: auto;
    filter: none;
    transform: translate(-50%, 0) scale(1);
    box-shadow:
        0 8px 32px rgba(15, 23, 42, 0.08),
        0 2px 8px rgba(15, 23, 42, 0.04);
}

#find-card.panel--visible .find-top,
#find-card.panel--visible .find-bottom {
    animation: popover-stagger-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#find-card.panel--visible .find-top {
    animation-delay: 0.04s;
}

#find-card.panel--visible .find-bottom {
    animation-delay: 0.1s;
}

@media (prefers-reduced-motion: reduce) {
    #help-card,
    #nobo-card,
    #find-card {
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }

    #help-card:not([hidden]):not(.panel--visible),
    #nobo-card:not([hidden]):not(.panel--visible),
    #find-card:not([hidden]):not(.panel--visible) {
        filter: none;
    }

    #help-card.panel--visible > *,
    #nobo-card.panel--visible .nobo-dict > *,
    #find-card.panel--visible .find-top,
    #find-card.panel--visible .find-bottom {
        animation: none !important;
    }
}

.find-top {
    width: 100%;
}

/* Avatar + headline — same surface treatment as pills below */
.find-hero {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 12px 0;
    background-color: var(--find-surface-bg);
    border-radius: var(--find-surface-radius-block);
    border: var(--find-surface-border);
    box-shadow: var(--find-surface-shadow);
}

/* Avatar — pin to bottom of .find-hero (no flex-center gap when tagline is taller) */
.find-avatar {
    flex-shrink: 0;
    height: 96px;
    width: auto;
    max-width: 108px;
    object-fit: contain;
    object-position: left bottom;
    display: block;
    border-radius: 0;
}

.find-tagline {
    flex: 1;
    min-width: 0;
    margin: 0;
    align-self: center;
    padding-bottom: 11px;
    font-family: var(--font-body);
    font-size: 22px;
    font-weight: 400;
    color: #334155;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

/* "call" — Mazius Display italic, magenta accent */
.find-tagline em {
    font-family: 'Mazius Display', serif;
    font-style: italic;
    font-weight: 400;
    color: rgb(245, 15, 226);
    font-size: 26px;
}

.find-bottom {
    --find-pill-h: 56px;
    --find-pill-gap: 12px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: var(--find-pill-gap);
}

/* Top row: two equal columns + gap = same total width as email button below */
.find-social-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--find-pill-gap);
    width: 100%;
}

.social-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: var(--find-pill-h);
    padding: 0 14px;
    gap: 8px;
    text-decoration: none;
    color: #334155;
    background-color: var(--find-surface-bg);
    border: var(--find-surface-border);
    border-radius: 999px;
    box-shadow: var(--find-surface-shadow);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .social-btn:hover {
        transform: translateY(1px);
        background-color: rgba(255, 255, 255, 0.97);
        box-shadow:
            inset 2px 2px 6px rgba(15, 23, 42, 0.08),
            inset -1px -1px 5px rgba(255, 255, 255, 0.75),
            0 1px 2px rgba(15, 23, 42, 0.04);
        border-color: rgba(226, 232, 240, 0.95);
        color: #0f172a;
    }

    .social-btn:active {
        transform: translateY(2px);
        background-color: rgba(248, 250, 252, 0.98);
        box-shadow:
            inset 3px 3px 8px rgba(15, 23, 42, 0.1),
            inset -2px -2px 6px rgba(255, 255, 255, 0.65);
        transition-duration: 0.08s;
    }

    #btn-nobo:hover,
    #btn-help:hover,
    #btn-find:hover {
        transform: translateY(1px);
        background-color: rgba(255, 255, 255, 0.97);
        box-shadow:
            inset 2px 2px 6px rgba(15, 23, 42, 0.08),
            inset -1px -1px 5px rgba(255, 255, 255, 0.75),
            0 1px 2px rgba(15, 23, 42, 0.04);
        border-color: rgba(226, 232, 240, 0.95);
        color: #0f172a;
    }

    #btn-nobo:active,
    #btn-help:active,
    #btn-find:active {
        transform: translateY(2px);
        background-color: rgba(248, 250, 252, 0.98);
        box-shadow:
            inset 3px 3px 8px rgba(15, 23, 42, 0.1),
            inset -2px -2px 6px rgba(255, 255, 255, 0.65);
        transition-duration: 0.08s;
    }
}

.social-btn-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.social-btn svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.find-email-row {
    display: block;
    width: 100%;
}

#btn-copy-email {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    height: var(--find-pill-h, 56px);
    min-height: var(--find-pill-h, 56px);
    padding: 0 20px;
    cursor: pointer;
    color: #334155;
    background-color: var(--find-surface-bg);
    border: var(--find-surface-border);
    border-radius: 999px;
    box-shadow: var(--find-surface-shadow);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.01em;
    white-space: nowrap;
    user-select: none;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    #btn-copy-email:hover {
        transform: translateY(1px);
        background-color: rgba(255, 255, 255, 0.97);
        box-shadow:
            inset 2px 2px 6px rgba(15, 23, 42, 0.08),
            inset -1px -1px 5px rgba(255, 255, 255, 0.75),
            0 1px 2px rgba(15, 23, 42, 0.04);
        border-color: rgba(226, 232, 240, 0.95);
        color: #0f172a;
    }

    #btn-copy-email:active {
        transform: translateY(2px);
        background-color: rgba(248, 250, 252, 0.98);
        box-shadow:
            inset 3px 3px 8px rgba(15, 23, 42, 0.1),
            inset -2px -2px 6px rgba(255, 255, 255, 0.65);
        transition-duration: 0.08s;
    }
}

#btn-copy-email svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

#btn-copy-email span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Mobile / narrow: comfortable panels, stacked CTAs, centered hero ── */

@media (max-width: 768px) {
    /* Wide preloader clip: bias crop to the left so portrait view shows the left eye, not only the right. */
    .preloader-video {
        object-position: left center;
    }

    /* fit-content: avoid a near-full-width invisible box (width: min(368px, vw)) that stacks
       over the nobo control (same z-index; help comes later in DOM) and eats all top-row taps. */
    .nobo-popover-root {
        top: max(16px, env(safe-area-inset-top, 0px));
        left: max(12px, env(safe-area-inset-left, 0px));
        padding: 4px 6px 8px 2px;
        width: fit-content;
        max-width: min(
            368px,
            calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 16px)
        );
    }

    .help-popover-root {
        top: max(16px, env(safe-area-inset-top, 0px));
        right: max(12px, env(safe-area-inset-right, 0px));
        padding: 4px 2px 8px 6px;
        width: fit-content;
        max-width: min(
            368px,
            calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 16px)
        );
        align-items: stretch;
    }

    #btn-help {
        align-self: flex-end;
    }

    .find-popover-root {
        bottom: max(16px, env(safe-area-inset-bottom, 0px));
        --find-bridge-w: min(
            500px,
            calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 24px)
        );
    }

    .nobo-popover-root,
    .help-popover-root {
        --popover-bridge-w: min(
            368px,
            calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 16px)
        );
    }

    #help-card,
    #nobo-card {
        width: min(
            368px,
            calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 16px)
        );
        max-width: none;
        align-self: stretch;
        padding: 16px;
        gap: 14px;
    }

    #find-card {
        width: min(
            500px,
            calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 24px)
        );
        padding: 18px;
        gap: 16px;
        border-radius: 26px;
    }

    .find-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 16px 14px 14px;
        gap: 14px;
    }

    .find-avatar {
        height: 88px;
        max-width: 100px;
    }

    .find-tagline {
        align-self: stretch;
        text-align: center;
        padding-bottom: 0;
        font-size: 20px;
    }

    .find-tagline em {
        font-size: 24px;
    }

    .find-bottom {
        --find-pill-h: 52px;
        --find-pill-gap: 10px;
    }

    .find-social-row {
        grid-template-columns: 1fr;
    }

    .media-lightbox-stage-wrap,
    .media-lightbox-stage,
    .media-lightbox-stage .media-lightbox-media {
        max-width: min(94vw, 1400px);
        max-height: min(82vh, 1200px);
        max-height: min(82dvh, 1200px);
    }
}

@media (max-width: 380px) {
    #find-card {
        padding: 18px;
        gap: 14px;
    }

    .find-hero {
        padding: 10px 10px 0;
        gap: 12px;
        border-radius: 18px;
    }

    .find-tagline {
        font-size: 19px;
        font-weight: 500;
        padding-bottom: 10px;
    }

    .find-tagline em {
        font-size: 23px;
    }

    .find-avatar {
        height: 82px;
        max-width: 92px;
    }

    .find-social-row {
        grid-template-columns: 1fr;
    }

    .social-btn {
        font-size: 12.5px;
    }

    #btn-copy-email {
        font-size: 12.5px;
    }
}
