* {
    box-sizing: border-box;
}

:root {
    --bg: #08090b;
    --ink: #f6f3ee;
    --muted: rgba(246, 243, 238, .62);
    --line: rgba(246, 243, 238, .16);
    --panel: rgba(246, 243, 238, .055);
}

html {
    background: var(--bg);
    color: var(--ink);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
video {
    display: block;
}

.background-video {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
}

.background-video {
    z-index: 0;
    object-fit: cover;
    background: #000;
}

.content-layer {
    position: relative;
    z-index: 2;
}

.topbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px clamp(18px, 4vw, 56px);
    pointer-events: none;
}

.topbar.solid {
    background: rgba(8, 9, 11, .72);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    pointer-events: auto;
}

.brand,
.nav {
    pointer-events: auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .08em;
}

.brand img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.nav {
    display: flex;
    gap: clamp(16px, 3vw, 42px);
    color: var(--muted);
    font-size: 13px;
}

.nav a {
    transition: color .2s ease;
}

.nav a:hover {
    color: var(--ink);
}

.section {
    min-height: 100vh;
    padding: 110px clamp(20px, 6vw, 84px);
    display: grid;
    align-items: center;
}

.hero {
    justify-items: center;
    text-align: center;
}

.hero-copy {
    width: min(760px, 100%);
    display: grid;
    justify-items: center;
}

.kicker {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 13px;
    letter-spacing: .08em;
}

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(46px, 8vw, 108px);
    line-height: .94;
    font-weight: 300;
    letter-spacing: .02em;
}

.home-intro {
    width: min(520px, 100%);
    margin: 0 0 34px;
    color: rgba(246,243,238,.74);
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.9;
}

.load-line {
    width: min(260px, 56vw);
    height: 1px;
    margin: 0 0 12px;
    background: rgba(246,243,238,.22);
    overflow: hidden;
    transition: opacity .45s ease, transform .45s ease;
}

.load-line span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--ink);
    transition: width .2s linear;
}

.load-text,
.ready-cue {
    color: var(--muted);
    font-size: 12px;
}

.load-text {
    margin: 0;
    transition: opacity .45s ease, transform .45s ease;
}

.load-line.is-complete,
.load-text.is-complete {
    opacity: 0;
    transform: translateY(-5px);
    pointer-events: none;
}

.ready-cue {
    display: none;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.ready-cue.is-visible {
    display: flex;
}

.arrow {
    animation: floatArrow 1.2s ease-in-out infinite;
}

@keyframes floatArrow {
    0%, 100% { transform: translateY(0); opacity: .55; }
    50% { transform: translateY(5px); opacity: 1; }
}

.line-link {
    display: inline-flex;
    margin-top: 42px;
    padding-bottom: 7px;
    border-bottom: 1px solid rgba(246,243,238,.42);
    color: rgba(246,243,238,.82);
    font-size: 13px;
}

.film-note {
    min-height: 92vh;
}

.note-layout {
    display: grid;
    grid-template-columns: minmax(160px, .65fr) minmax(280px, 1fr);
    gap: clamp(28px, 7vw, 100px);
    width: min(980px, 100%);
}

.film-note.is-reverse .note-layout {
    grid-template-columns: minmax(280px, 1fr) minmax(160px, .65fr);
    margin-left: auto;
}

.film-note.is-reverse .note-layout .note-title {
    order: 2;
    text-align: right;
}

.film-note.is-reverse .note-layout p {
    order: 1;
}

.note-layout h2 {
    margin: 0;
    font-size: clamp(28px, 4.2vw, 58px);
    line-height: 1.12;
    font-weight: 300;
}

.note-title {
    display: grid;
    gap: 12px;
}

.note-title span {
    color: rgba(246,243,238,.48);
    font-size: 12px;
    letter-spacing: .16em;
}

.note-layout p,
.summary-panel p,
.scene-panel p,
.team-heading p,
.person-copy p {
    margin: 0;
    color: rgba(246,243,238,.68);
    font-size: 15px;
    line-height: 1.9;
}

.autoplay-mark {
    position: fixed;
    left: 24px;
    bottom: 18px;
    z-index: 20;
    color: rgba(246,243,238,.52);
    font-size: 10px;
    letter-spacing: .18em;
    pointer-events: none;
}

.scroll-progress {
    position: fixed;
    left: clamp(18px, 4vw, 56px);
    right: clamp(18px, 4vw, 56px);
    bottom: 8px;
    z-index: 21;
    height: 1px;
    background: rgba(246,243,238,.16);
    pointer-events: none;
}

.scroll-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: rgba(246,243,238,.92);
    transform-origin: left center;
}

.end-logos {
    position: relative;
    z-index: 2;
    min-height: 34vh;
    padding: 90px clamp(20px, 6vw, 84px) 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(18px, 3vw, 44px);
    flex-wrap: wrap;
}

.end-logo-item {
    width: clamp(58px, 8vw, 112px);
    height: clamp(34px, 5vw, 68px);
    display: grid;
    place-items: center;
    opacity: .72;
    filter: grayscale(1);
    transition: opacity .2s ease, filter .2s ease, transform .2s ease;
}

.end-logo-item:hover {
    opacity: 1;
    filter: grayscale(0);
    transform: translateY(-2px);
}

.end-logo-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.story-page {
    background: #000;
}

.story-shell,
.admin-shell {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    padding: 118px 0 70px;
}

.story-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
    gap: clamp(22px, 4vw, 52px);
    align-items: stretch;
    min-height: 520px;
}

.story-plain-hero {
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    width: min(920px, 100%);
    min-height: 440px;
    margin: 0 auto 28px;
    text-align: center;
}

.story-plain-hero h1 {
    margin: 0 0 24px;
    font-size: clamp(56px, 10vw, 128px);
    line-height: .92;
    font-weight: 300;
}

.story-plain-hero p:not(.kicker) {
    width: min(720px, 100%);
    margin: 0;
    color: rgba(246,243,238,.66);
    font-size: clamp(16px, 1.7vw, 20px);
    line-height: 1.9;
}

.apple-story {
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
    min-height: auto;
    align-items: end;
}

.poster-frame,
.story-video-block,
.person-photo,
.scene-image {
    border: 1px solid var(--line);
    background: #111216;
    overflow: hidden;
}

.poster-frame {
    min-height: 440px;
}

.poster-frame img,
.poster-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .92;
}

.summary-panel {
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: clamp(8px, 2vw, 18px) 0;
}

.story-summary-card,
.story-mini-cards article {
    border: 1px solid var(--line);
    background:
        linear-gradient(145deg, rgba(246,243,238,.11), rgba(246,243,238,.035)),
        rgba(246,243,238,.045);
    backdrop-filter: blur(22px);
    border-radius: 22px;
    box-shadow: 0 28px 90px rgba(0,0,0,.22);
}

.story-summary-card {
    min-height: 420px;
    padding: clamp(26px, 5vw, 62px);
}

.story-mini-cards {
    display: grid;
    gap: 14px;
}

.story-mini-cards article {
    padding: 22px;
    transition: transform .24s ease, border-color .24s ease, background .24s ease;
}

.story-mini-cards article:hover {
    transform: translateY(-4px);
    border-color: rgba(246,243,238,.34);
    background: rgba(246,243,238,.08);
}

.story-mini-cards span {
    display: block;
    margin-bottom: 18px;
    color: rgba(246,243,238,.42);
    font-size: 12px;
}

.story-mini-cards h2 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 350;
}

.story-mini-cards p {
    margin: 0;
    color: rgba(246,243,238,.62);
    font-size: 13px;
    line-height: 1.8;
}

.summary-panel h1,
.team-heading h1,
.admin-shell h1 {
    margin: 0 0 26px;
    font-size: clamp(42px, 7vw, 92px);
    line-height: .98;
    font-weight: 300;
}

.story-video-block {
    margin: 72px 0;
    aspect-ratio: 16 / 9;
}

.story-video-block video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scene-switcher {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
}

.scene-stage {
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at 50% 0%, rgba(246,243,238,.12), transparent 42%),
        rgba(246,243,238,.035);
    padding: clamp(18px, 3vw, 34px);
    border-radius: 28px;
    box-shadow: 0 30px 120px rgba(0,0,0,.42);
}

.scene-tabs {
    display: flex;
    gap: 8px;
    width: max-content;
    max-width: 100%;
    margin: 0 auto;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(246,243,238,.055);
    backdrop-filter: blur(18px);
    overflow-x: auto;
}

.scene-tabs button {
    min-height: 40px;
    border: 0;
    border-radius: 999px;
    padding: 0 16px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.scene-tabs button span {
    margin-right: 8px;
    color: rgba(246,243,238,.38);
}

.scene-tabs button.is-active,
.scene-tabs button:hover {
    background: rgba(246,243,238,.16);
    color: var(--ink);
}

.scene-panel {
    display: none;
    grid-template-columns: minmax(280px, 1fr) minmax(260px, .78fr);
    gap: clamp(22px, 4vw, 54px);
    align-items: center;
    opacity: 0;
    transform: translateY(10px);
}

.scene-panel.is-active {
    display: grid;
    animation: panelIn .28s ease forwards;
}

@keyframes panelIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scene-image {
    aspect-ratio: 16 / 10;
    display: grid;
    place-items: center;
    border-radius: 18px;
}

.scene-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scene-image span,
.person-photo span {
    color: rgba(246,243,238,.26);
    font-size: clamp(46px, 7vw, 90px);
    font-weight: 200;
}

.scene-panel h2,
.person-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(28px, 4vw, 54px);
    line-height: 1.08;
    font-weight: 300;
}

.team-shell {
    width: min(1120px, calc(100% - 36px));
}

.team-heading {
    max-width: 720px;
    margin: 0 auto 62px;
    text-align: center;
}

.people-grid {
    position: relative;
    min-height: 560px;
}

.person-tile {
    display: grid;
    grid-template-rows: auto 1fr;
    position: absolute;
    inset: 0 auto auto 50%;
    width: min(360px, 78vw);
    min-height: 520px;
    padding: 18px;
    border: 1px solid var(--line);
    background: rgba(246,243,238,.055);
    backdrop-filter: blur(14px);
    transform: translateX(calc(-50% + var(--stack-x, 0px))) translateY(var(--stack-y, 0px)) rotate(var(--stack-rotate, 0deg));
    transition: transform .32s ease, border-color .32s ease, background .32s ease, z-index .32s ease;
    cursor: pointer;
}

.person-tile:nth-child(1) {
    --stack-x: -300px;
    --stack-y: 32px;
    --stack-rotate: -7deg;
    z-index: 3;
}

.person-tile:nth-child(2) {
    --stack-x: 0px;
    --stack-y: 0px;
    --stack-rotate: 0deg;
    z-index: 4;
}

.person-tile:nth-child(3) {
    --stack-x: 300px;
    --stack-y: 38px;
    --stack-rotate: 7deg;
    z-index: 3;
}

.person-tile.is-active {
    --stack-x: 0px;
    --stack-y: -18px;
    --stack-rotate: 0deg;
    z-index: 5;
    border-color: rgba(246,243,238,.42);
    background: rgba(246,243,238,.09);
}

.person-tile:not(.is-active):hover {
    --stack-y: 18px;
    border-color: rgba(246,243,238,.32);
}

.person-tile:not(.is-active) .person-detail {
    opacity: 0;
    transform: translateY(8px);
    max-height: 0;
}

.person-detail {
    margin-top: 14px;
    opacity: 1;
    max-height: 160px;
    transform: translateY(0);
    transition: opacity .25s ease, transform .25s ease, max-height .25s ease;
}

.person-photo {
    aspect-ratio: 4 / 5;
    margin-bottom: 22px;
    display: grid;
    place-items: center;
}

.person-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-copy a {
    display: inline-flex;
    margin-top: 20px;
    color: rgba(246,243,238,.58);
    font-size: 13px;
}

.team-admin {
    display: flex;
    justify-content: flex-end;
    margin-top: 54px;
    color: rgba(246,243,238,.38);
    font-size: 12px;
}

.admin-toolbar {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 40;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(0,0,0,.72);
    backdrop-filter: blur(12px);
}

.admin-toolbar a,
.admin-toolbar button,
.admin-button,
.form-actions button {
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    background: var(--ink);
    color: #111;
    font: inherit;
    cursor: pointer;
}

[contenteditable="true"] {
    outline: 1px dashed rgba(246,243,238,.55);
    outline-offset: 4px;
}

.admin-page {
    background: #0c0d10;
}

.admin-form {
    display: grid;
    gap: 18px;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 18px;
}

.admin-tabs a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 16px;
    color: var(--muted);
    background: rgba(246,243,238,.035);
}

.admin-tabs a.is-active {
    color: var(--ink);
    background: rgba(246,243,238,.14);
}

.admin-section {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 8px;
    padding: clamp(20px, 3vw, 32px);
}

.admin-section h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 300;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 14px;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 14px;
    background: rgba(246,243,238,.07);
    color: var(--ink);
    font: inherit;
}

textarea {
    min-height: 92px;
    resize: vertical;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.notice {
    margin: 0 0 16px;
    color: #b9ffd6;
}

.admin-hint {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
}

@media (max-width: 900px) {
    .topbar {
        align-items: flex-start;
        gap: 12px;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .note-layout,
    .film-note.is-reverse .note-layout,
    .story-hero,
    .scene-switcher,
    .scene-panel,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .film-note.is-reverse .note-layout .note-title {
        order: 0;
        text-align: left;
    }

    .film-note.is-reverse .note-layout p {
        order: 0;
    }

    .people-grid {
        min-height: auto;
        display: grid;
        gap: 18px;
    }

    .person-tile,
    .person-tile:nth-child(1),
    .person-tile:nth-child(2),
    .person-tile:nth-child(3),
    .person-tile.is-active {
        position: relative;
        inset: auto;
        width: 100%;
        min-height: auto;
        transform: none;
    }

    .person-tile:not(.is-active) .person-detail {
        opacity: 1;
        max-height: none;
        transform: none;
    }

    .scene-tabs {
        position: static;
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 560px) {
    .topbar {
        position: absolute;
        padding: 18px;
    }

    .section {
        padding: 94px 18px;
    }

    .nav {
        gap: 12px;
        font-size: 12px;
    }

    .story-shell,
    .admin-shell {
        padding-top: 104px;
    }

    .poster-frame {
        min-height: 280px;
    }

    .admin-toolbar {
        width: calc(100% - 24px);
        justify-content: center;
    }

    .autoplay-mark {
        left: 18px;
        bottom: 18px;
    }
}
