/* ==========================================================================
   Scene Studio — "create a photo WITH a character" landing page
   Dark / cyber aesthetic, mirrors character-gifts.css conventions.
   ========================================================================== */

.scene-page {
    background: var(--surface-raised);
    color: var(--ink);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    padding-bottom: 64px;
}

.scene-accent {
    background: linear-gradient(90deg, #828282, #7c7c7c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---------- Hero ---------- */
.scene-hero {
    text-align: center;
    padding: 56px 20px 28px;
    background: radial-gradient(900px 460px at 50% -20%, rgba(130, 130, 130, 0.32), transparent 70%);
}
.scene-hero-title {
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 800;
    margin: 0 0 14px;
    line-height: 1.1;
}
.scene-hero-sub {
    font-size: clamp(15px, 2.4vw, 18px);
    color: var(--ink-soft);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ---------- Guest banner ---------- */
.scene-guest-banner {
    max-width: 640px;
    margin: 0 auto 8px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--glass-strong);
    border: 1px solid rgba(88, 88, 88, 0.28);
    border-radius: 14px;
    font-size: 14px;
    color: var(--ink-soft);
}
.scene-guest-banner a { color: var(--ink-muted); font-weight: 700; text-decoration: none; }
.scene-guest-icon { font-size: 18px; }

/* ---------- The two cards ---------- */
.scene-cards {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 28px 16px 8px;
    max-width: 720px;
    margin: 0 auto;
}
.scene-card {
    flex: 1 1 240px;
    max-width: 300px;
    background:
        linear-gradient(135deg, rgba(0, 0, 0, 0.07), rgba(0, 0, 0, 0.02)),
        rgba(231, 231, 231, 0.76);
    border: 1px solid rgba(88, 88, 88, 0.18);
    border-radius: 22px;
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
}
.scene-card-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    margin-bottom: 12px;
}
.scene-card-imgwrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    overflow: hidden;
    background: var(--veil);
}
/* `object-position: top` keeps the character's head in frame — the square
   wrapper would otherwise center-crop portrait photos and cut the head off. */
.scene-card-img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
/* Picking a look in "What you can create" swaps this photo — a short fade/zoom
   makes the change readable once the page has scrolled the card back into view. */
.scene-card-img.is-swapping { animation: sceneLookSwap 380ms ease-out; }
@keyframes sceneLookSwap {
    from { opacity: 0; transform: scale(1.06); }
    to   { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .scene-card-img.is-swapping { animation: none; }
}
.scene-nsfw-badge {
    position: absolute; top: 8px; right: 8px;
    background: var(--scrim-strong);
    font-size: 11px; font-weight: 700;
    padding: 2px 8px; border-radius: 8px;
}
.scene-card-name { margin-top: 12px; font-weight: 700; font-size: 17px; }
.scene-card-hint { font-weight: 400; font-size: 12px; color: var(--ink-muted); }

.scene-cards-plus {
    align-self: center;
    font-size: 22px;
    color: var(--ink-muted);
}

/* On phones the cards stack, so the "+" sits between them (under the
   character card) instead of squeezing beside it. */
@media (max-width: 640px) {
    .scene-cards {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: center;
        gap: 10px;
        padding-top: 20px;
    }
    .scene-card {
        flex: 0 0 auto;
        width: 100%;
        max-width: 340px;
    }
    .scene-cards-plus {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        font-size: 18px;
        color: var(--ink-soft);
        background: var(--scrim-soft);
        border: 1px solid rgba(88, 88, 88, 0.28);
    }
}

/* ---------- Dropzone ---------- */
.scene-card-upload .scene-card-imgwrap { display: none; }
.scene-dropzone {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    border: 2px dashed rgba(88, 88, 88, 0.35);
    background: var(--veil);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    overflow: hidden;
}
.scene-dropzone.dragover {
    border-color: var(--line);
    background: var(--glass-strong);
}
.scene-dropzone-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; }
.scene-dropzone-icon { font-size: 34px; color: var(--ink-muted); }
.scene-dropzone-text { font-size: 13px; color: var(--ink-muted); }
.scene-link { color: var(--ink-muted); font-weight: 600; }
.scene-selfie-btn {
    margin-top: 6px;
    background: var(--scrim-soft);
    border: 1px solid rgba(88, 88, 88, 0.35);
    color: var(--ink);
    border-radius: 10px;
    padding: 7px 14px;
    font-size: 13px;
    cursor: pointer;
}
.scene-selfie-btn:hover { background: var(--scrim); }

.scene-dropzone-preview { position: absolute; inset: 0; }
.scene-dropzone-preview img { width: 100%; height: 100%; object-fit: cover; }
.scene-selfie-change {
    position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
    background: var(--veil-strong);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: var(--ink); border-radius: 10px; padding: 5px 12px; font-size: 12px; cursor: pointer;
}
.scene-selfie-status {
    position: absolute; top: 8px; left: 8px; right: 8px;
    font-size: 12px; font-weight: 600;
    padding: 4px 8px; border-radius: 8px;
    text-align: center;
}
.scene-selfie-status.uploading { background: var(--veil-strong); color: #a58404; }
.scene-selfie-status.ok { background: rgba(34,197,94,0.85); color: var(--ink); }
.scene-selfie-status.error { background: rgba(175, 15, 15, 0.9); color: var(--status-ink); }

/* ---------- Scene ideas ---------- */
.scene-section-header {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    margin: 36px 0 4px;
}
.scene-section-sub { font-weight: 400; color: var(--ink-muted); font-size: 14px; }
.scene-ideas-card {
    position: relative;
    width: calc(100% - 32px);
    max-width: 720px;
    margin: 16px auto 0;
    background: var(--veil-strong);
    border: 1px solid rgba(88, 88, 88, 0.16);
    border-radius: 18px;
    padding: 4px;
}
/* Fade the last row so it reads as "there is more below". */
.scene-ideas-card::after {
    content: '';
    position: absolute;
    left: 4px; right: 4px; bottom: 4px;
    height: 34px;
    border-radius: 0 0 14px 14px;
    background: linear-gradient(to top, rgba(235, 235, 235, 0.92), rgba(235, 235, 235, 0));
    pointer-events: none;
}
.scene-ideas {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 220px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(88, 88, 88, 0.4) transparent;
}
.scene-ideas::-webkit-scrollbar { width: 6px; }
.scene-ideas::-webkit-scrollbar-track { background: transparent; }
.scene-ideas::-webkit-scrollbar-thumb {
    background: var(--scrim);
    border-radius: 3px;
}
/* One idea per row, filling the card's full width. `flex: 0 0 auto` matters:
   the column is a fixed height, so without it the rows would squash instead
   of overflowing into a scroll. */
.scene-idea-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    width: 100%;
    text-align: left;
    background: var(--veil-strong);
    border: 1px solid rgba(88, 88, 88, 0.18);
    color: var(--ink-soft);
    border-radius: 12px;
    padding: 11px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .1s;
}
.scene-idea-chip:hover { border-color: var(--line-strong); }
.scene-idea-chip.selected {
    background: linear-gradient(90deg, rgba(130, 130, 130, 0.35), rgba(124, 124, 124, 0.35));
    border-color: var(--line);
    color: var(--ink);
}
.scene-idea-emoji { font-size: 16px; }

/* ---------- Generate ---------- */
.scene-generate-wrap {
    text-align: center;
    margin: 32px auto 0;
    padding: 0 16px;
}
.scene-generate-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(90deg, #828282, #7c7c7c);
    border: none;
    color: var(--ink);
    font-size: 17px;
    font-weight: 700;
    padding: 15px 30px;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
    transition: transform .1s, opacity .15s;
}
.scene-generate-btn:hover:not(:disabled) { transform: translateY(-1px); }
.scene-generate-btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.scene-generate-cost {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--veil);
    padding: 4px 10px; border-radius: 10px; font-size: 15px;
}
/* Same slot, but the first photo is free — a warm badge instead of a price, so
   the offer reads at a glance on the button itself. */
.scene-generate-cost--free {
    background: var(--scrim-strong);
    color: #16a34a;
    font-weight: 700;
    letter-spacing: .01em;
    text-transform: lowercase;
}
.scene-balance {
    margin-top: 14px;
    font-size: 14px;
    color: var(--ink-soft);
}
.scene-balance i.bi-coin { color: #a58404; }
.scene-balance-add {
    margin-left: 10px;
    background: none; border: none; color: var(--ink-muted); font-size: 13px; cursor: pointer;
}
.scene-generate-hint { margin-top: 10px; font-size: 13px; color: var(--ink-muted); }

/* ---------- Showcase ---------- */
.scene-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    max-width: 900px;
    margin: 18px auto 0;
    padding: 0 16px;
}
.scene-showcase-item {
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: var(--veil-strong);
    border: 1px solid rgba(88, 88, 88, 0.14);
}
.scene-showcase-item img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.scene-showcase-item figcaption {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 18px 10px 8px;
    font-size: 12px; font-weight: 600;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.75));
}

/* ---------- Base-image picker (the character's own gallery) ---------- */
.scene-section-sub {
    text-align: center;
    font-size: 13px;
    color: var(--ink-muted);
    margin: 6px auto 0;
    padding: 0 16px;
}
.scene-basepick {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    max-width: 900px;
    margin: 16px auto 0;
    padding: 0 16px;
}
.scene-basepick-item {
    position: relative;
    padding: 0;
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    background: var(--veil-strong);
    border: 2px solid rgba(88, 88, 88, 0.14);
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.scene-basepick-item:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.scene-basepick-item img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.scene-basepick-item.is-selected { border-color: var(--line); }
.scene-basepick-check {
    position: absolute; top: 8px; right: 8px;
    width: 26px; height: 26px; border-radius: 50%;
    display: none; align-items: center; justify-content: center;
    background: linear-gradient(90deg, #828282, #7c7c7c);
    color: var(--ink); font-size: 14px;
}
.scene-basepick-item.is-selected .scene-basepick-check { display: flex; }
.scene-basepick-hint {
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
    color: var(--ink-muted);
}

/* ---------- "Your photos with her" (signed-in only) ----------
   A horizontal strip rather than a grid: it's a reminder of what this page has
   already made for you, not a picker, so it must not compete with the base-image
   grid right below it. */
.scene-mine { margin-top: 36px; }
.scene-mine[hidden] { display: none; }
.scene-mine-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    justify-content: flex-start;
    max-width: 900px;
    margin: 16px auto 0;
    padding: 0 16px 4px;
    scrollbar-width: none;
}
.scene-mine-strip::-webkit-scrollbar { display: none; }
@media (min-width: 720px) {
    /* Few enough photos to centre; the strip only scrolls once it overflows. */
    .scene-mine-strip { justify-content: center; }
}
.scene-mine-item {
    flex: 0 0 auto;
    width: 132px;
    padding: 0;
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    background: var(--veil-strong);
    border: 2px solid rgba(88, 88, 88, 0.14);
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.scene-mine-item:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.scene-mine-item img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.scene-mine-all {
    display: block;
    width: max-content;
    margin: 14px auto 0;
    padding: 9px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--ink-soft);
    background: var(--scrim-soft);
    border: 1px solid rgba(88, 88, 88, 0.28);
}
.scene-mine-all:hover { background: var(--scrim); color: var(--ink); }
.scene-mine-all i { margin-right: 6px; }

/* ---------- Webcam modal ---------- */
.scene-webcam-backdrop {
    position: fixed; inset: 0; z-index: 1200;
    background: var(--veil-strong);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.scene-webcam-backdrop[hidden] { display: none; }
.scene-webcam-modal {
    background: var(--surface-sunken); border-radius: 18px; padding: 16px;
    width: 100%; max-width: 420px;
}
.scene-webcam-header {
    display: flex; justify-content: space-between; align-items: center;
    font-weight: 700; margin-bottom: 12px;
}
.scene-webcam-close { background: none; border: none; color: var(--ink); font-size: 18px; cursor: pointer; }
#webcamVideo { width: 100%; border-radius: 14px; background: var(--surface-page); transform: scaleX(-1); }
.scene-webcam-capture {
    margin-top: 12px; width: 100%;
    background: linear-gradient(90deg, #828282, #7c7c7c);
    border: none; color: var(--ink); font-weight: 700; font-size: 15px;
    padding: 12px; border-radius: 12px; cursor: pointer;
}

/* ---------- Loading / Result overlays ---------- */
.scene-loading-overlay, .scene-result-overlay {
    position: fixed; inset: 0; z-index: 1300;
    background: var(--veil-strong);
    display: flex; flex-direction: column; align-items: center;
    padding: 20px; text-align: center;
}
.scene-loading-overlay { justify-content: center; }
/* The result opens anchored to the top, not vertically centred: a portrait photo
   is read from the head down, so its top edge has to be the first thing on
   screen. Whatever falls below — the rest of the photo, the tip CTA — is reached
   by scrolling the overlay itself. */
.scene-result-overlay {
    justify-content: flex-start;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 32px;
}
.scene-loading-overlay[hidden], .scene-result-overlay[hidden] { display: none; }
.scene-loading-icon { font-size: 46px; margin-bottom: 14px; animation: scenePulse 1.4s ease-in-out infinite; }
.scene-loading-icon[hidden] { display: none; }
@keyframes scenePulse { 0%,100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.12); opacity: 1; } }

/* ---------- Merge animation (the loading state) ----------
   Her look and the visitor's selfie drift into each other and blend, on a loop,
   for as long as the generation runs — the wait shows what is being combined
   instead of a generic spinner. Both srcs are set in JS from the character card
   and the selfie preview, so the photos on screen are the actual inputs. */
.scene-merge {
    position: relative;
    width: 268px;
    height: 176px;
    margin-bottom: 20px;
}
.scene-merge[hidden] { display: none; }
.scene-merge::after {
    /* The bloom where the two meet. */
    content: '';
    position: absolute;
    inset: -18% 20%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 124, 124, 0.55), rgba(130, 130, 130, 0.25) 55%, transparent 72%);
    filter: blur(16px);
    animation: sceneMergeGlow 2.6s ease-in-out infinite alternate;
}
.scene-merge-photo {
    position: absolute;
    top: 0;
    width: 126px;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    border: 2px solid rgba(88, 88, 88, 0.35);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
    background: var(--veil-strong);
}
.scene-merge-photo--char {
    left: 0;
    z-index: 1;
    animation: sceneMergeFromLeft 2.6s ease-in-out infinite alternate;
}
.scene-merge-photo--you {
    right: 0;
    z-index: 2;
    animation: sceneMergeFromRight 2.6s ease-in-out infinite alternate;
}
/* They stop at a ~60% overlap, not on top of each other: both faces have to
   stay readable, since the whole point is showing WHICH two are combining. */
@keyframes sceneMergeFromLeft {
    from { transform: translateX(0) rotate(-5deg) scale(0.96); }
    to   { transform: translateX(44px) rotate(0deg) scale(1); }
}
@keyframes sceneMergeFromRight {
    from { transform: translateX(0) rotate(5deg) scale(0.96); opacity: 1; }
    to   { transform: translateX(-44px) rotate(0deg) scale(1); opacity: 0.74; }
}
@keyframes sceneMergeGlow {
    from { opacity: 0.12; transform: scale(0.7); }
    to   { opacity: 0.95; transform: scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
    /* Still says "these two, combined" — just without the motion. */
    .scene-merge-photo--char,
    .scene-merge-photo--you,
    .scene-merge::after { animation: none; }
    .scene-merge-photo--char { transform: translateX(40px) rotate(-3deg); }
    .scene-merge-photo--you { transform: translateX(-40px) rotate(3deg); opacity: 0.78; }
    .scene-merge::after { opacity: 0.5; }
}
@media (max-width: 420px) {
    .scene-merge { width: 232px; height: 152px; }
    .scene-merge-photo { width: 110px; }
    @keyframes sceneMergeFromLeft {
        from { transform: translateX(0) rotate(-5deg) scale(0.96); }
        to   { transform: translateX(38px) rotate(0deg) scale(1); }
    }
    @keyframes sceneMergeFromRight {
        from { transform: translateX(0) rotate(5deg) scale(0.96); opacity: 1; }
        to   { transform: translateX(-38px) rotate(0deg) scale(1); opacity: 0.74; }
    }
}
.scene-loading-text { font-size: 18px; font-weight: 700; }
.scene-loading-sub { margin-top: 6px; font-size: 13px; color: var(--ink-muted); }

.scene-result-card {
    background: var(--surface-sunken); border-radius: 20px; padding: 18px;
    width: 100%; max-width: 460px;
    border: 1px solid rgba(88, 88, 88, 0.2);
    /* Keep its natural height inside the scrolling overlay instead of being
       squeezed by the flex column — the overflow is meant to scroll, not shrink. */
    flex-shrink: 0;
}
/* Sticky so the close button stays reachable once a tall photo pushes the rest
   of the card past the fold. */
.scene-result-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 14px;
    position: sticky; top: 0; z-index: 1;
    padding-bottom: 10px;
    background: var(--surface-sunken);
}
.scene-result-title { font-size: 19px; margin: 0; }
.scene-result-close { background: none; border: none; color: var(--ink); font-size: 18px; cursor: pointer; }
/* The photo is shown top-first at its full height rather than shrunk to fit the
   viewport — the face is at the top of a portrait, so that is what has to land
   on screen. The tip CTA below it is reached by scrolling the overlay. */
.scene-result-imgwrap {
    border-radius: 16px; overflow: hidden; background: var(--surface-page);
    display: flex; align-items: flex-start; justify-content: center;
}
.scene-result-image { width: 100%; max-width: 100%; height: auto; display: block; }

/* Tip CTA under the result actions — offered at the warmest moment, right
   after she delivered the photo. Links to /character/slug/:slug/tip. */
.scene-result-tip {
    display: block;
    margin-top: 12px;
    text-align: center;
    padding: 12px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: var(--ink);
    background: var(--scrim-soft);
    border: 1px solid rgba(124, 124, 124, 0.4);
}
.scene-result-tip:hover { background: var(--scrim-soft); color: var(--ink); }
.scene-result-tip i { color: var(--ink-muted); margin-right: 6px; }
.scene-result-tip-note {
    margin-top: 8px;
    text-align: center;
    font-size: 12px;
    line-height: 1.45;
    color: var(--ink-muted);
}

/* ==========================================================================
   Private share links
   Selecting a few photos in "Your photos with <name>" and minting one link to
   hand to one person. The tiles double as the picker, so select mode is a
   state ON the existing strip rather than a separate surface.
   ========================================================================== */
.scene-mine-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px;
}
.scene-mine-head > div { min-width: 0; }

.scene-share-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--ink-soft);
    background: var(--scrim-soft);
    border: 1px solid rgba(88, 88, 88, 0.28);
    transition: background 0.15s ease, color 0.15s ease;
}
.scene-share-toggle:hover { background: var(--scrim); color: var(--ink); }
.scene-share-toggle.is-active {
    background: var(--scrim-soft);
    border-color: var(--line-strong);
    color: var(--ink);
}

/* The tick only exists in select mode — outside it the tile is a plain photo. */
.scene-mine-item { position: relative; }
.scene-mine-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 15px;
    color: var(--ink);
    background: var(--veil-strong);
    border: 2px solid rgba(0, 0, 0, 0.5);
}
.scene-mine-strip.is-selecting .scene-mine-check { display: flex; }
.scene-mine-strip.is-selecting .scene-mine-item { transform: none; }
.scene-mine-item.is-selected { border-color: var(--line-strong); }
.scene-mine-item.is-selected .scene-mine-check {
    background: linear-gradient(135deg, #828282, #7c7c7c);
    border-color: var(--line-strong);
}

.scene-share-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 900px;
    margin: 14px auto 0;
    padding: 0 16px;
}
.scene-share-bar[hidden] { display: none; }
.scene-share-count { font-size: 13px; color: var(--ink-muted); }
.scene-share-count.is-error { color: #f70c0c; }
.scene-share-create {
    padding: 10px 20px;
    border: 0;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
    background: linear-gradient(135deg, #828282, #7c7c7c);
    transition: opacity 0.15s ease;
}
.scene-share-create:disabled { opacity: 0.45; cursor: default; }

.scene-share-result {
    max-width: 900px;
    margin: 14px auto 0;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--veil-strong);
    border: 1px solid rgba(88, 88, 88, 0.2);
}
.scene-share-result[hidden] { display: none; }
.scene-share-result-label {
    font-size: 12px;
    color: var(--ink-muted);
    margin-bottom: 8px;
}
.scene-share-result-row { display: flex; gap: 8px; }
.scene-share-url {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    color: var(--ink);
    background: var(--veil-strong);
    border: 1px solid rgba(88, 88, 88, 0.22);
}
.scene-share-copy {
    flex: 0 0 auto;
    padding: 10px 18px;
    border: 0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
    background: var(--scrim);
}
.scene-share-copy:hover { background: var(--scrim-strong); }

/* "Shared with you" — what the link holder lands on. Same tile geometry as the
   owner's strip so the two read as one family. */
.scene-shared { margin-top: 36px; }
.scene-shared[hidden] { display: none; }
.scene-shared-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    justify-content: flex-start;
    max-width: 900px;
    margin: 16px auto 0;
    padding: 0 16px 4px;
    scrollbar-width: none;
}
.scene-shared-strip::-webkit-scrollbar { display: none; }
@media (min-width: 720px) {
    .scene-shared-strip { justify-content: center; }
}
.scene-shared-item {
    flex: 0 0 auto;
    width: 132px;
    padding: 0;
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    background: var(--veil-strong);
    border: 2px solid rgba(124, 124, 124, 0.35);
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.scene-shared-item:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.scene-shared-item img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; }

/* Inside the header row the title and subtitle sit left of the Share button, so
   the page-level centred defaults would read as a mistake. Scoped, so every
   other section keeps its centred heading. */
.scene-mine-head .scene-section-header { text-align: left; margin: 0 0 2px; }
.scene-mine-head .scene-section-sub { text-align: left; margin: 0; padding: 0; }

/* An expired link still opens the page — this stands in for the strip so the
   gap where photos were doesn't read as something broken. */
.scene-shared--expired {
    max-width: 900px;
    margin: 36px auto 0;
    padding: 20px 16px;
    border-radius: 16px;
    text-align: center;
    background: var(--veil-strong);
    border: 1px dashed rgba(88, 88, 88, 0.28);
}
.scene-shared--expired .scene-section-header { margin-top: 0; }
