:root {
    --bg: #fff8fb;
    --bg-soft: #fff2f8;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-strong: #ffffff;
    --surface-tint: #fff0f6;
    --text: #35243d;
    --text-soft: #6c5478;
    --text-muted: #9a7ba4;
    --line: rgba(235, 203, 220, 0.78);
    --primary: #ff5fa2;
    --primary-deep: #ff3d8f;
    --secondary: #9a6bff;
    --peach: #ffb6c9;
    --mint: #ffd7eb;
    --success: #1f9d7a;
    --danger: #e85c7b;
    --shadow: 0 20px 46px rgba(203, 107, 154, 0.12);
    --shadow-soft: 0 12px 28px rgba(203, 107, 154, 0.08);
    --radius-xl: 30px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --max-width: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 208, 230, 0.85), transparent 32%),
        radial-gradient(circle at top right, rgba(220, 206, 255, 0.8), transparent 30%),
        linear-gradient(180deg, #fff8fb 0%, #fff3f8 48%, #fffafc 100%);
}

body.has-popup-open {
    overflow: hidden;
}

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

img {
    display: block;
    width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
    border: 0;
    background: none;
}

.theme-front .front-shell,
.theme-admin .admin-front-shell {
    width: min(100%, var(--max-width));
    margin: 0 auto;
    padding: 18px 14px 42px;
}

.front-header,
.admin-floating-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    margin-bottom: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-weight: 800;
    font-size: 20px;
    box-shadow: var(--shadow);
}

.brand-mark-admin {
    background: linear-gradient(135deg, #5f4b8b, #2d3357);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-copy strong {
    font-size: 18px;
}

.brand-copy small {
    color: var(--text-muted);
    font-size: 12px;
}

.admin-nav-pills,
.admin-userbox,
.hero-actions,
.section-admin-actions,
.actions-row,
.admin-preview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.admin-nav-pills a,
.admin-userbox a,
.editor-chip,
.editor-chip-soft {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 189, 218, 0.78);
    color: var(--text-soft);
    font-weight: 700;
    font-size: 13px;
}

.admin-nav-pills a.is-active,
.admin-nav-pills a:hover,
.admin-userbox a:hover,
.editor-chip:hover {
    background: linear-gradient(135deg, rgba(255, 95, 162, 0.16), rgba(154, 107, 255, 0.14));
    color: var(--primary-deep);
}

.editor-chip-soft {
    background: rgba(255, 255, 255, 0.6);
}

.hero-section,
.collection-block,
.content-card,
.photo-card,
.auth-card,
.stat-card,
.module-card,
.snapshot-item,
.album-brief-card,
.media-preview-card,
.hero-quote-card,
.editor-item,
.story-modal-card,
.editor-panel {
    background: var(--surface);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow);
}

.hero-section,
.album-hero-card,
.collection-block,
.content-card,
.photo-card,
.auth-card,
.editor-item,
.editor-panel {
    border-radius: var(--radius-xl);
}

.hero-section {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 20px;
}

.hero-copy h1,
.album-hero-copy h1,
.empty-state h1,
.empty-state h2,
.card-head h2,
.card-head h3,
.editor-panel-head h3,
.auth-head h1,
.section-heading h2 {
    margin: 0;
}

.hero-badge,
.module-step,
.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 110, 170, 0.16), rgba(173, 143, 255, 0.18));
    color: var(--primary-deep);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
}

.hero-copy h1 {
    font-size: clamp(28px, 7vw, 56px);
    line-height: 1.12;
    margin-bottom: 12px;
}

.hero-subtitle,
.section-heading p,
.card-head p,
.editor-panel-head p,
.album-card p,
.album-richtext p,
.photo-card-copy p,
.empty-state p,
.snapshot-item p,
.auth-head p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.75;
}

.hero-subtitle {
    font-size: 18px;
    margin-bottom: 10px;
}

.hero-body {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.8;
}

.hero-visual {
    position: relative;
    min-height: 240px;
    border-radius: 26px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffc8dd, #d4c1ff 58%, #ffd6ea);
}

.hero-visual-image img,
.album-hero-media img,
.album-card-media img,
.photo-card-media img,
.media-preview-card img,
.album-brief-card img,
.story-modal-media img {
    height: 100%;
    object-fit: cover;
}

.hero-visual-button {
    width: 100%;
    padding: 0;
    text-align: left;
}

.hero-visual-tip {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(53, 36, 61, 0.64);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.hero-quote-card {
    width: 100%;
    min-height: 240px;
    border-radius: 24px;
    padding: 24px;
    background: linear-gradient(160deg, #ff7eb3, #c697ff);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 12px;
}

.hero-quote-card strong {
    font-size: 30px;
}

.hero-quote-card span,
.hero-quote-card p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.collections-section,
.dashboard-grid,
.module-grid,
.snapshot-grid,
.editor-list,
.stack-form {
    display: grid;
    gap: 18px;
}

.collection-block,
.content-card,
.photo-card,
.auth-card,
.stat-card,
.module-card,
.snapshot-item,
.media-preview-card,
.album-brief-card,
.editor-item,
.editor-panel {
    padding: 18px;
}

.section-heading,
.card-head,
.editor-head,
.album-hero-copy,
.auth-head,
.admin-preview-head,
.editor-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.compact-section-heading {
    margin-bottom: 14px;
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.album-card {
    display: block;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,241,247,0.96));
    border: 1px solid rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.album-card:hover,
.photo-card:hover,
.editor-item:hover,
.module-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.album-card-media {
    position: relative;
    aspect-ratio: 3 / 4.1;
    background: linear-gradient(135deg, #ffd2e3, #d8ceff);
}

.card-editor-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(53, 36, 61, 0.72);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.album-card-body {
    padding: 12px;
    display: grid;
    gap: 6px;
}

.album-card-topline {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--text-muted);
    font-size: 11px;
}

.album-card h3,
.photo-card-copy h2,
.snapshot-item strong,
.stat-card strong,
.module-card h3 {
    margin: 0;
}

.album-card h3 {
    font-size: 13px;
    line-height: 1.35;
}

.album-card p {
    font-size: 12px;
}

.album-card-link {
    color: var(--primary-deep);
    font-size: 12px;
    font-weight: 800;
}

.album-card-add {
    display: grid;
    place-items: center;
    min-height: 100%;
    border: 1px dashed rgba(255, 95, 162, 0.38);
    background: rgba(255, 255, 255, 0.68);
}

.album-card-add-inner {
    display: grid;
    justify-items: center;
    gap: 4px;
    color: var(--primary-deep);
}

.album-card-add-inner strong {
    font-size: 28px;
}

.album-hero {
    display: grid;
    gap: 14px;
    margin-bottom: 22px;
}

.album-hero-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px;
}

.album-hero-media,
.photo-card-media {
    aspect-ratio: 4 / 5;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffd2e3, #d7cbff);
}

.photo-stream {
    display: grid;
    gap: 18px;
}

.photo-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.empty-state {
    border-radius: var(--radius-xl);
    padding: 28px 18px;
    text-align: center;
    background: rgba(255,255,255,0.7);
    border: 1px dashed rgba(255, 120, 175, 0.34);
}

.site-footer {
    padding: 26px 10px 0;
    text-align: center;
    color: var(--text-muted);
}

.story-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
}

.story-modal-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(52, 24, 48, 0.66);
}

.story-modal-card {
    position: relative;
    z-index: 2;
    width: min(92vw, 920px);
    max-height: 88vh;
    margin: 6vh auto;
    display: grid;
    grid-template-columns: 1fr;
    overflow: hidden;
    border-radius: 30px;
}

.story-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: rgba(53, 36, 61, 0.72);
    color: #fff;
    font-size: 24px;
}

.story-modal-media {
    min-height: 260px;
    background: linear-gradient(135deg, #ffd2e3, #d7cbff);
}

.story-modal-copy {
    padding: 24px;
    display: grid;
    gap: 12px;
}

.story-modal-copy h2 {
    margin: 0;
    font-size: clamp(24px, 5vw, 42px);
}

.story-modal-copy p,
.story-modal-copy small {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.8;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary,
.btn-bubble {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 14px 24px rgba(255, 95, 162, 0.24);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
    border: 1px solid rgba(255, 193, 216, 0.86);
}

.btn-danger {
    background: rgba(232, 92, 123, 0.12);
    color: var(--danger);
    border: 1px solid rgba(232, 92, 123, 0.24);
}

.btn-block {
    width: 100%;
}

.flash {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 18px;
    font-weight: 700;
}

.flash-success {
    background: rgba(31, 157, 122, 0.12);
    color: var(--success);
}

.flash-error {
    background: rgba(232, 92, 123, 0.12);
    color: var(--danger);
}

.flash-info {
    background: rgba(255, 95, 162, 0.12);
    color: var(--primary-deep);
}

.theme-auth {
    background: linear-gradient(180deg, #fff6fb 0%, #fff9fc 100%);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.auth-card {
    width: min(100%, 460px);
}

.auth-card-simple {
    padding: 22px;
}

.auth-form-simple {
    margin-top: 16px;
}

.form-grid,
.dashboard-grid,
.snapshot-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.field,
.toggle-field {
    display: grid;
    gap: 8px;
}

.field span {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-soft);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid rgba(235, 203, 220, 0.82);
    border-radius: 18px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
    min-height: 120px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: rgba(255, 95, 162, 0.6);
    box-shadow: 0 0 0 4px rgba(255, 95, 162, 0.12);
}

.field small {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.6;
}

.full-width {
    grid-column: 1 / -1;
}

.compact-grid {
    gap: 14px;
}

.editor-head-media {
    display: grid;
    gap: 16px;
    align-items: center;
}

.media-preview-inline {
    width: 96px;
    height: 96px;
    border-radius: 22px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(238, 207, 223, 0.84);
}

.media-preview-inline img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.split-actions {
    justify-content: space-between;
}

.toggle-field {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
}

.mode-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mode-option {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(238, 207, 223, 0.84);
}

.media-panel {
    display: grid;
    gap: 16px;
}

.media-panel.is-hidden {
    display: none;
}

.media-preview-card {
    gap: 12px;
}

.media-inputs-grid {
    display: grid;
    gap: 14px;
}

.editor-panel-soft {
    background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,241,247,0.94));
}

.editor-panel-head,
.card-head {
    margin-bottom: 14px;
}

.tip-card {
    border-radius: 18px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px dashed rgba(255, 120, 175, 0.32);
}

.stat-card,
.module-card,
.snapshot-item {
    border-radius: 22px;
}

.stat-card strong {
    font-size: 30px;
}

.snapshot-item span,
.stat-card span,
.media-preview-card span {
    color: var(--text-muted);
    font-size: 12px;
}

.admin-preview-intro,
.quick-guide-card {
    margin-bottom: 18px;
}

#banner-editor,
#banner-popup-editor,
#sections-editor,
#albums-editor,
[id^="album-editor-"] {
    scroll-margin-top: 120px;
}

.admin-stage,
.dashboard-editor-stack {
    display: grid;
    gap: 18px;
}

.admin-mirror-stage {
    margin-bottom: 18px;
}

.auth-head-simple p {
    display: none;
}

.cards-stream-section {
    display: grid;
    gap: 16px;
}

.cards-stream-grid {
    align-items: start;
}

.cards-stream-heading {
    margin-bottom: 0;
}

.admin-app-shell {
    width: min(100%, 1340px);
    margin: 0 auto;
    padding: 18px 14px 42px;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 18px;
}

.admin-sidebar,
.admin-content-shell {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.84);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    border-radius: var(--radius-xl);
}

.admin-sidebar {
    padding: 20px 18px;
    display: grid;
    align-content: start;
    gap: 18px;
    position: sticky;
    top: 18px;
    height: fit-content;
}

.admin-sidebar-brand {
    align-items: flex-start;
}

.admin-side-nav,
.admin-side-actions {
    display: grid;
    gap: 10px;
}

.admin-side-nav a,
.admin-side-actions a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 189, 218, 0.78);
    color: var(--text-soft);
    font-weight: 700;
}

.admin-side-nav a.is-active,
.admin-side-nav a:hover,
.admin-side-actions a:hover {
    background: linear-gradient(135deg, rgba(255, 95, 162, 0.18), rgba(154, 107, 255, 0.16));
    color: var(--primary-deep);
}

.admin-side-meta {
    display: grid;
    gap: 12px;
    padding-top: 6px;
    border-top: 1px solid var(--line);
}

.admin-side-user {
    font-weight: 800;
    color: var(--text);
}

.admin-content-shell {
    padding: 18px;
}

.admin-stage-main {
    min-width: 0;
}

.dashboard-link-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-link-item {
    display: grid;
    gap: 12px;
}

@media (min-width: 760px) {
    .hero-section,
    .album-hero-card,
    .story-modal-card {
        grid-template-columns: 1.06fr 0.94fr;
        align-items: stretch;
    }

    .photo-card {
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-grid,
    .snapshot-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .snapshot-item-full {
        grid-column: 1 / -1;
    }

    .form-grid.two-column {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .media-panel {
        grid-template-columns: 320px 1fr;
        align-items: start;
    }
}

@media (max-width: 759px) {
    .front-header,
    .admin-floating-bar,
    .section-heading,
    .card-head,
    .editor-panel-head,
    .auth-head,
    .admin-preview-head {
        flex-direction: column;
    }

    .front-header,
    .admin-floating-bar {
        align-items: flex-start;
    }

    .admin-nav-pills,
    .admin-userbox,
    .section-admin-actions,
    .hero-actions,
    .admin-preview-actions,
    .actions-row {
        width: 100%;
    }

    .admin-nav-pills a,
    .admin-userbox a,
    .btn,
    .editor-chip,
    .editor-chip-soft {
        flex: 1 1 auto;
        justify-content: center;
    }

    .admin-app-shell,
    .dashboard-link-list {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
    }

    .admin-content-shell {
        padding: 16px;
    }

    .album-grid {
        gap: 8px;
    }

    .collection-block,
    .content-card,
    .photo-card,
    .auth-card,
    .hero-section,
    .editor-item,
    .editor-panel {
        padding: 16px;
    }

    .album-card-body p,
    .album-card-topline span:last-child,
    .album-card-link {
        display: none;
    }

    .album-card-body {
        padding: 10px 9px 12px;
    }

    .album-card h3 {
        font-size: 12px;
    }

    .section-heading h2 {
        font-size: 26px;
    }

    .section-heading p {
        font-size: 13px;
    }

    .hero-copy h1 {
        font-size: 26px;
    }

    .hero-subtitle,
    .hero-body {
        font-size: 15px;
    }

    .story-modal-card {
        width: min(94vw, 94vw);
        margin: 4vh auto;
    }
}