*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg: #FFF7FA;
    --surface: #FFFFFF;
    --surface-soft: #FFEAF2;
    --surface-pale: #FFE1EC;
    --title: #4A1630;
    --text: #5C2A3E;
    --muted: #8A4A62;
    --faint: #B07A90;
    --brand: #E85A8B;
    --brand-bright: #FF7AA8;
    --brand-deep: #C43B6E;
    --border: rgba(232, 90, 139, 0.16);
    --shadow: 0 14px 34px rgba(196, 59, 110, 0.10);
    --radius: 20px;
    --topbar: 56px;
    --rail: 88px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.75;
    overflow-x: hidden;
}

body.overlay-open {
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

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

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(232, 90, 139, 0.34);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    left: 16px;
    top: 8px;
    z-index: 500;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--title);
    color: #fff;
    transform: translateY(-140%);
    transition: transform .2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.topbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 120;
    height: var(--topbar);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 18px 0 calc(var(--rail) + 18px);
    border-bottom: 1px solid var(--border);
    background: rgba(255, 247, 250, 0.96);
    backdrop-filter: blur(12px);
}

.topbar-left,
.topbar-right {
    min-width: 0;
    display: flex;
    align-items: center;
}

.topbar-right {
    justify-content: flex-end;
}

.brand-top {
    min-height: 44px;
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--title);
    font-weight: 800;
    letter-spacing: .04em;
}

.brand-top img {
    max-height: 36px;
    width: auto;
}

.app-link,
.icon-button,
.close-button {
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

.app-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    color: #fff;
    background: linear-gradient(135deg, #FF7AA8 0%, #E85A8B 55%, #C43B6E 100%);
    font-weight: 700;
}

.app-link:hover {
    filter: brightness(.98);
    box-shadow: 0 8px 20px rgba(196, 59, 110, .16);
}

.icon-button,
.close-button {
    padding: 0 14px;
    background: #fff;
    color: var(--brand-deep);
    border: 1px solid var(--border);
    font-weight: 700;
}

.side-rail {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 130;
    width: var(--rail);
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: var(--surface-soft);
    border-right: 1px solid var(--border);
}

.rail-brand,
.rail-link {
    width: 64px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 999px;
}

.rail-brand {
    min-height: 64px;
    margin-bottom: 4px;
    color: var(--brand-deep);
    font-weight: 800;
}

.rail-brand img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 50%;
}

.rail-link {
    padding: 7px 4px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.2;
    transition: .2s ease;
}

.rail-link:hover {
    color: var(--brand-deep);
    background: rgba(255, 255, 255, .72);
}

.rail-link.is-current {
    color: #fff;
    background: var(--brand-deep);
    font-weight: 700;
}

.rail-button {
    border: 0;
    cursor: pointer;
    background: transparent;
}

.site-main {
    min-height: 70vh;
    margin-left: var(--rail);
    padding-top: var(--topbar);
}

.page-shell,
.home-shell {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

.page-shell {
    padding: 52px 0 78px;
}

.home-shell {
    padding: 34px 0 80px;
}

.page-header {
    margin-bottom: 28px;
}

.eyebrow,
.kicker {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--surface-pale);
    color: var(--brand-deep);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
}

.page-header h1,
.hero-copy h1 {
    margin: 12px 0 12px;
    color: var(--title);
    font-size: clamp(28px, 4vw, 34px);
    line-height: 1.25;
    letter-spacing: -.02em;
}

.page-header p,
.hero-copy p {
    max-width: 820px;
    margin: 0;
    color: var(--muted);
}

.section {
    margin-top: 38px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.section-heading h2,
.card h2,
.article-card h2,
.story-article h2,
.policy-section h2,
.faq-item h2 {
    margin: 0;
    color: var(--title);
    line-height: 1.35;
}

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

.section-heading p {
    margin: 0;
    color: var(--muted);
    max-width: 640px;
}

.card,
.article-card,
.policy-section,
.faq-item,
.note-card,
.step-card,
.status-card,
.index-card,
.letter-card,
.phone-card,
.album-book,
.week-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card,
.article-card,
.policy-section,
.faq-item,
.note-card,
.step-card,
.status-card,
.index-card,
.letter-card,
.phone-card,
.week-card {
    padding: 24px;
}

.card p:last-child,
.article-card p:last-child,
.policy-section p:last-child,
.faq-item p:last-child,
.note-card p:last-child,
.step-card p:last-child,
.status-card p:last-child,
.index-card p:last-child,
.letter-card p:last-child,
.phone-card p:last-child,
.week-card p:last-child {
    margin-bottom: 0;
}

.prose p {
    margin: 0 0 1em;
}

.grid-2,
.grid-3,
.grid-4 {
    display: grid;
    gap: 18px;
}

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

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

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

.soft-section {
    padding: 28px;
    border-radius: 24px;
    background: var(--surface-soft);
}

.media-frame {
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: linear-gradient(145deg, #fff 0%, #FFEAF2 100%);
}

.media-frame img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.media-placeholder {
    width: 100%;
    aspect-ratio: 16 / 7;
    border-radius: 22px;
    background:
        radial-gradient(circle at 22% 28%, rgba(255, 122, 168, .28), transparent 22%),
        radial-gradient(circle at 76% 64%, rgba(232, 90, 139, .18), transparent 24%),
        linear-gradient(135deg, #fff 0%, #FFEAF2 100%);
    border: 1px solid var(--border);
}

.media-placeholder.squareish {
    aspect-ratio: 4 / 3;
}

.media-placeholder.portrait {
    aspect-ratio: 4 / 5;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.primary-button,
.secondary-button,
.text-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0 20px;
    font-weight: 800;
}

.primary-button {
    color: #fff;
    background: linear-gradient(135deg, #FF7AA8 0%, #E85A8B 55%, #C43B6E 100%);
}

.secondary-button {
    color: var(--brand-deep);
    background: #fff;
    border: 1px solid var(--border);
}

.text-button {
    padding-inline: 0;
    color: var(--brand-deep);
}

.hero-journal {
    display: grid;
    gap: 24px;
    padding: 28px;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.hero-copy {
    max-width: 820px;
}

.hero-media img {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 20px;
}

.hero-media .media-placeholder {
    max-height: 360px;
}

.polaroid-wall {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.polaroid {
    padding: 12px 12px 20px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: 18px;
}

.polaroid:nth-child(2n) {
    transform: rotate(1deg);
}

.polaroid:nth-child(3n) {
    transform: rotate(-1.2deg);
}

.polaroid img,
.polaroid .media-placeholder {
    width: 100%;
    border-radius: 12px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.polaroid h3 {
    margin: 14px 0 7px;
    color: var(--title);
}

.polaroid p {
    margin: 0;
    color: var(--muted);
}

.journal-list {
    display: grid;
    gap: 12px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.journal-list li {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px dashed var(--border);
}

.journal-list li:last-child {
    border-bottom: 0;
}

.journal-no,
.big-number {
    color: var(--brand);
    font-weight: 900;
    letter-spacing: .04em;
}

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

.album-book {
    overflow: hidden;
}

.album-book .cover {
    min-height: 220px;
    padding: 22px;
    display: flex;
    align-items: flex-end;
    color: var(--title);
    background:
        linear-gradient(145deg, rgba(255,255,255,.3), rgba(255,225,236,.88)),
        radial-gradient(circle at 20% 20%, rgba(255,122,168,.24), transparent 26%);
    border-bottom: 1px solid var(--border);
}

.album-book .cover strong {
    font-size: 22px;
}

.album-book .book-copy {
    padding: 18px;
}

.album-book .book-copy p {
    margin: 0;
    color: var(--muted);
}

.week-list {
    display: grid;
    gap: 14px;
}

.week-card {
    display: grid;
    grid-template-columns: 88px 1fr;
    align-items: start;
    gap: 16px;
}

.big-number {
    font-size: 34px;
    line-height: 1;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.status-card h3 {
    margin: 8px 0;
    color: var(--title);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--brand);
}

.inline-media {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
    gap: 22px;
    align-items: start;
}

.inline-media.reverse {
    grid-template-columns: minmax(260px, .85fr) minmax(0, 1.15fr);
}

.inline-media .media-frame img,
.inline-media .media-placeholder {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.timeline {
    display: grid;
    gap: 16px;
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 22px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: var(--border);
}

.timeline .step-card {
    position: relative;
    padding-left: 68px;
}

.timeline .step-card::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 28px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 6px var(--surface-pale);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 0;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--surface-pale);
    color: var(--brand-deep);
    font-size: 13px;
    font-weight: 700;
}

.long-story {
    max-width: 820px;
    margin: 0 auto;
}

.story-article {
    padding: 32px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.story-article p {
    margin: 0 0 1.15em;
}

.letter-card {
    position: relative;
    padding-top: 54px;
}

.letter-card::before {
    content: "编辑观点";
    position: absolute;
    top: 18px;
    left: 24px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--surface-pale);
    color: var(--brand-deep);
    font-size: 12px;
    font-weight: 800;
}

.policy-stack {
    display: grid;
    gap: 16px;
}

.policy-section h2 {
    font-size: 21px;
    margin-bottom: 10px;
}

.index-list {
    display: grid;
    gap: 14px;
}

.index-card {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 18px;
}

.index-card strong {
    color: var(--title);
}

.index-card .index-label {
    color: var(--brand-deep);
    font-weight: 800;
}

.faq-list {
    display: grid;
    gap: 14px;
}

.faq-item h2 {
    font-size: 19px;
    margin-bottom: 8px;
}

.phone-showcase {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 28px;
    align-items: center;
}

.phone-visual {
    max-width: 390px;
    margin: 0 auto;
    padding: 14px;
    border-radius: 34px;
    background: var(--title);
    box-shadow: var(--shadow);
}

.phone-visual img,
.phone-visual .media-placeholder {
    border-radius: 24px;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.app-mini {
    display: grid;
    grid-template-columns: 64px 1fr;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
}

.app-mini img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 16px;
}

.app-mini .icon-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--surface-pale);
    border: 1px solid var(--border);
}

.site-footer {
    margin-left: var(--rail);
    background: #4A1630;
    color: #F8D6E4;
}

.footer-inner {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 48px 0 44px;
}

.footer-brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.footer-brand strong {
    color: #fff;
    font-size: 20px;
}

.footer-brand > span {
    color: #F8D6E4;
    opacity: .8;
    font-size: 13px;
    letter-spacing: .12em;
}

.footer-logo {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
}

.footer-logo img {
    max-height: 34px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.footer-grid h2 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 15px;
}

.footer-grid a {
    display: block;
    width: fit-content;
    min-height: 34px;
    padding: 4px 0;
    color: #F8D6E4;
}

.footer-grid a:hover {
    color: #fff;
}

.footer-note,
.footer-copy {
    margin: 24px 0 0;
    color: #F8D6E4;
    opacity: .86;
}

.footer-copy {
    margin-top: 8px;
    font-size: 13px;
}

.global-backdrop {
    position: fixed;
    inset: 0;
    z-index: 180;
    background: rgba(74, 22, 48, .28);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
}

.global-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.fullscreen-panel,
.search-panel {
    position: fixed;
    inset: 0;
    z-index: 200;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
}

.fullscreen-panel {
    background: var(--surface-soft);
    overflow-y: auto;
}

.fullscreen-panel.is-open,
.search-panel.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.panel-shell {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 24px 0 60px;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.panel-brand {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    color: var(--title);
}

.panel-brand img {
    max-height: 36px;
    width: auto;
}

.menu-groups {
    display: grid;
    gap: 26px;
}

.menu-group h2 {
    color: var(--title);
    margin: 0 0 10px;
    font-size: 18px;
}

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

.menu-cards a {
    min-height: 104px;
    padding: 16px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--border);
}

.menu-cards a:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.menu-cards strong {
    display: block;
    color: var(--title);
    margin-bottom: 5px;
}

.menu-cards span {
    display: block;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.search-panel {
    display: grid;
    place-items: center;
    padding: 24px;
}

.search-card {
    width: min(620px, 100%);
    padding: 24px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(74, 22, 48, .24);
}

.search-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 18px;
}

.search-head h2 {
    margin: 8px 0 0;
    color: var(--title);
    font-size: 24px;
}

.search-look {
    min-height: 52px;
    margin-top: 18px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
}

.search-glyph {
    color: var(--brand-deep);
    font-size: 24px;
}

.search-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.search-presets a {
    min-height: 42px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--brand-deep);
    background: #fff;
}

.mobile-bottom-nav,
.mobile-only {
    display: none;
}

.notice {
    padding: 16px 18px;
    border-left: 4px solid var(--brand);
    border-radius: 14px;
    background: var(--surface-soft);
    color: var(--text);
}

.small-note {
    color: var(--muted);
    font-size: 14px;
}

@media (max-width: 980px) {
    .grid-4,
    .status-grid,
    .album-shelf {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-3,
    .polaroid-wall {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .inline-media,
    .inline-media.reverse,
    .phone-showcase {
        grid-template-columns: 1fr;
    }

    .inline-media.reverse .media-frame,
    .inline-media.reverse .media-placeholder {
        order: 0;
    }
}

@media (max-width: 760px) {
    :root {
        --topbar: 56px;
    }

    body {
        padding-bottom: calc(50px + env(safe-area-inset-bottom));
    }

    .side-rail {
        display: none;
    }

    .mobile-only {
        display: inline-flex;
    }

    .topbar {
        grid-template-columns: minmax(72px, 1fr) auto minmax(72px, 1fr);
        padding: 0 10px;
    }

    .topbar-left {
        justify-content: flex-start;
    }

    .topbar-right {
        min-width: 0;
    }

    .app-link {
        padding: 0 12px;
        font-size: 14px;
        white-space: nowrap;
    }

    .brand-top {
        min-width: 0;
        max-width: 145px;
        padding: 0 6px;
        overflow: hidden;
    }

    .brand-top img {
        max-width: 132px;
        max-height: 32px;
    }

    .site-main,
    .site-footer {
        margin-left: 0;
    }

    .page-shell,
    .home-shell,
    .footer-inner,
    .panel-shell {
        width: min(100% - 32px, 1180px);
    }

    .page-shell {
        padding: 34px 0 56px;
    }

    .home-shell {
        padding: 22px 0 58px;
    }

    .hero-journal,
    .soft-section,
    .story-article {
        padding: 20px;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .polaroid-wall,
    .album-shelf,
    .status-grid {
        grid-template-columns: 1fr;
    }

    .polaroid:nth-child(n) {
        transform: none;
    }

    .week-card,
    .index-card {
        grid-template-columns: 64px 1fr;
    }

    .menu-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .menu-cards a {
        min-height: 118px;
    }

    .mobile-bottom-nav {
        position: fixed;
        inset: auto 0 0 0;
        z-index: 150;
        height: calc(50px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        background: rgba(255,255,255,.98);
        border-top: 1px solid var(--border);
    }

    .mobile-bottom-nav a {
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--muted);
        font-size: 13px;
        font-weight: 700;
    }

    .mobile-bottom-nav a.is-current {
        color: var(--brand);
    }

    .footer-inner {
        padding-bottom: 64px;
    }

    .fullscreen-panel,
    .search-panel,
    .global-backdrop {
        z-index: 260;
    }
}

@media (max-width: 520px) {
    .page-shell,
    .home-shell,
    .footer-inner,
    .panel-shell {
        width: calc(100% - 32px);
    }

    .page-header h1,
    .hero-copy h1 {
        font-size: 29px;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

    .footer-grid,
    .menu-cards {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .menu-cards a {
        min-height: 126px;
        padding: 14px;
    }

    .search-panel {
        padding: 16px;
    }

    .search-card {
        padding: 18px;
    }

    .search-head h2 {
        font-size: 21px;
    }

    .journal-list li {
        grid-template-columns: 52px 1fr;
    }

    .index-card {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

.spaced-media { margin-bottom: 18px; }
