:root {
    --bg: #FFF7FA;
    --surface: #FFFFFF;
    --surface-soft: #FFEAF2;
    --title: #4A1630;
    --text: #5C2A3E;
    --muted: #8A4A62;
    --light-muted: #B07A90;
    --pink: #E85A8B;
    --pink-bright: #FF7AA8;
    --pink-deep: #C43B6E;
    --pink-soft: #FFE1EC;
    --border: rgba(232, 90, 139, 0.16);
    --shadow: 0 14px 34px rgba(196, 59, 110, 0.10);
    --radius: 20px;
    --header-desktop: 130px;
    --header-mobile: 86px;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    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.is-locked {
    overflow: hidden;
}

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

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

button {
    font: inherit;
}

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

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

.site-header {
    position: relative;
    z-index: 100;
}

.candy-strip,
.cover-bar,
.sticker-rail {
    position: fixed;
    left: 0;
    right: 0;
}

.candy-strip {
    top: 0;
    height: 22px;
    background: var(--pink-deep);
    color: #FFFFFF;
    z-index: 103;
}

.candy-strip-inner {
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 12px;
    letter-spacing: .04em;
}

.text-action {
    border: 0;
    background: transparent;
    color: #FFFFFF;
    padding: 0 4px;
    cursor: pointer;
    min-height: 22px;
}

.cover-bar {
    top: 22px;
    height: 64px;
    background: #FFFFFF;
    border-bottom: 1px solid var(--border);
    z-index: 102;
}

.cover-bar-inner {
    height: 64px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
}

.brand-link {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
}

.brand-logo,
.footer-logo,
.drawer-logo {
    height: 34px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    object-position: left center;
}

.footer-logo,
.drawer-logo {
    height: 32px;
}

.brand-text-logo {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    color: var(--title);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: .03em;
}

.envelope-trigger,
.app-link-pill,
.primary-button,
.secondary-button,
.inline-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0 20px;
    font-weight: 700;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.envelope-trigger {
    justify-self: center;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--pink-deep);
    cursor: pointer;
}

.app-link-pill {
    justify-self: end;
    color: #FFFFFF;
    background: linear-gradient(135deg, #FF7AA8 0%, #E85A8B 55%, #C43B6E 100%);
    box-shadow: 0 8px 20px rgba(196, 59, 110, .16);
}

.sticker-rail {
    top: 86px;
    height: 44px;
    background: var(--surface-soft);
    border-bottom: 1px solid var(--border);
    z-index: 101;
}

.sticker-rail-inner {
    height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.sticker-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 14px;
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    white-space: nowrap;
}

.sticker-link.is-current {
    color: #FFFFFF;
    background: var(--pink-deep);
}

.site-main {
    padding-top: calc(var(--header-desktop) + 24px);
}

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

.hero-card,
.content-panel,
.note-card,
.step-card,
.status-card,
.book-card,
.faq-card,
.soft-card,
.letter-card,
.index-card,
.person-card,
.term-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 26px;
    margin-bottom: 26px;
}

.hero-copy {
    max-width: 850px;
    margin-top: 22px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--pink-deep);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    color: var(--title);
    line-height: 1.3;
}

h1 {
    font-size: clamp(28px, 3vw, 32px);
    margin: 8px 0 14px;
}

h2 {
    font-size: 22px;
    margin-bottom: 14px;
}

h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

p {
    margin-bottom: 14px;
}

.lead {
    color: var(--muted);
    font-size: 17px;
    max-width: 820px;
}

.media-slot {
    width: 100%;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #FFFDFE 0%, #FFF0F5 100%);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
}

.hero-media {
    min-height: 240px;
}

.banner-slot {
    max-height: 300px;
    aspect-ratio: 16 / 9;
}

.content-image {
    width: 100%;
    height: 100%;
    max-height: 300px;
    object-fit: contain;
    object-position: center;
}

.card-image {
    max-height: 220px;
}

.app-image {
    max-height: 420px;
}

.section-block {
    margin: 26px 0;
}

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

.section-heading p {
    margin-bottom: 0;
    color: var(--muted);
}

.grid-2,
.grid-3,
.grid-4,
.grid-6 {
    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)); }
.grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.note-card,
.step-card,
.status-card,
.book-card,
.faq-card,
.soft-card,
.letter-card,
.index-card,
.person-card,
.term-card {
    padding: 20px;
}

.card-kicker,
.number-label,
.status-label {
    color: var(--pink-deep);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .06em;
}

.number-label.big {
    display: block;
    font-size: 34px;
    line-height: 1;
    margin-bottom: 12px;
}

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

.primary-button {
    color: #FFFFFF;
    background: linear-gradient(135deg, #FF7AA8 0%, #E85A8B 55%, #C43B6E 100%);
    box-shadow: 0 10px 22px rgba(196, 59, 110, .18);
}

.secondary-button,
.inline-button {
    color: var(--pink-deep);
    background: #FFFFFF;
    border: 1px solid var(--border);
}

.primary-button:hover,
.secondary-button:hover,
.inline-button:hover,
.app-link-pill:hover,
.envelope-trigger:hover {
    transform: translateY(-1px);
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.inline-button:focus-visible,
.app-link-pill:focus-visible,
.envelope-trigger:focus-visible,
.sticker-link:focus-visible,
.footer-group a:focus-visible,
.envelope-item:focus-visible,
.mobile-bottom-nav a:focus-visible,
.text-action:focus-visible,
.round-close:focus-visible,
.preset-links a:focus-visible,
.brand-link:focus-visible {
    outline: 3px solid rgba(232, 90, 139, .30);
    outline-offset: 3px;
}

.copy-list,
.numbered-list,
.check-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.copy-list li,
.numbered-list li,
.check-list li {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.copy-list li:last-child,
.numbered-list li:last-child,
.check-list li:last-child {
    border-bottom: 0;
}

.numbered-list li {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 14px;
}

.numbered-list strong {
    color: var(--pink-deep);
    font-size: 20px;
}

.callout {
    padding: 18px 20px;
    border-radius: 18px;
    background: var(--surface-soft);
    color: var(--title);
    border: 1px solid var(--border);
}

.index-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.index-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--pink-soft);
    color: var(--title);
    border: 1px solid var(--border);
}

.book-card {
    display: flex;
    flex-direction: column;
    min-height: 260px;
    background: linear-gradient(180deg, #FFFFFF 0%, #FFF0F5 100%);
}

.book-card .book-spine {
    height: 8px;
    border-radius: 999px;
    background: var(--pink);
    margin-bottom: 36px;
}

.status-card {
    background: var(--surface-soft);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--pink);
    display: inline-block;
    margin-right: 8px;
}

.editor-note {
    font-size: 13px;
    font-weight: 800;
    color: var(--pink-deep);
    margin-bottom: 8px;
}

.page-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 28px 0 10px;
}

.site-footer {
    margin-top: 54px;
    background: #4A1630;
    color: #F8D6E4;
    padding: 42px 0 calc(38px + env(safe-area-inset-bottom));
}

.footer-inner {
    display: grid;
    gap: 28px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-logo-link {
    display: inline-flex;
    align-items: center;
}

.footer-brand strong {
    display: block;
    color: #FFFFFF;
    font-size: 20px;
}

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

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

.footer-group h2 {
    color: #FFFFFF;
    font-size: 15px;
    margin-bottom: 10px;
}

.footer-group a {
    display: block;
    color: #F8D6E4;
    padding: 5px 0;
    font-size: 14px;
}

.footer-note,
.copyright {
    margin: 0;
    color: #F8D6E4;
    font-size: 13px;
}

.page-overlay {
    position: fixed;
    inset: 0;
    background: rgba(74, 22, 48, .34);
    z-index: 160;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .22s ease, visibility .22s ease;
}

.page-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.envelope-drawer {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 102%);
    width: min(920px, calc(100% - 28px));
    max-height: 70vh;
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 24px 24px 0 0;
    z-index: 170;
    box-shadow: 0 -18px 50px rgba(74, 22, 48, .16);
    visibility: hidden;
    pointer-events: none;
    transition: transform .28s ease, visibility .28s ease;
    overflow: hidden;
}

.envelope-drawer.is-open {
    transform: translate(-50%, 0);
    visibility: visible;
    pointer-events: auto;
}

.envelope-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.envelope-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--title);
}

.round-close {
    min-width: 44px;
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--pink-deep);
    cursor: pointer;
}

.envelope-scroll {
    max-height: calc(70vh - 76px);
    overflow-y: auto;
    padding: 18px 20px 28px;
}

.envelope-group + .envelope-group {
    margin-top: 22px;
}

.envelope-group h2 {
    font-size: 15px;
    margin-bottom: 12px;
}

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

.envelope-item {
    padding: 14px;
    border-radius: 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    min-height: 88px;
}

.envelope-item strong,
.envelope-item span {
    display: block;
}

.envelope-item strong {
    color: var(--title);
    margin-bottom: 4px;
}

.envelope-item span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.search-layer {
    position: fixed;
    top: 86px;
    left: 50%;
    transform: translate(-50%, -14px);
    width: min(760px, calc(100% - 32px));
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 0 0 22px 22px;
    box-shadow: var(--shadow);
    z-index: 171;
    padding: 22px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.search-layer.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

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

.search-head h2 {
    margin: 4px 0 0;
}

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

.search-badge {
    color: #FFFFFF;
    background: var(--pink);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    white-space: nowrap;
}

.preset-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.preset-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--title);
}

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

.home-cover {
    padding: 22px;
}

.home-cover .media-slot {
    max-height: 300px;
    aspect-ratio: 16 / 9;
}

.home-cover .content-image {
    max-height: 300px;
}

.home-six-card .media-slot {
    min-height: 180px;
    max-height: 220px;
}

.home-six-card p {
    color: var(--muted);
}

.split-feature {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 24px;
    align-items: start;
}

.long-copy {
    max-width: 850px;
}

.long-copy p:last-child {
    margin-bottom: 0;
}

.quote-box {
    padding: 18px 20px;
    border-left: 4px solid var(--pink);
    background: var(--surface-soft);
    border-radius: 14px;
}

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

.faq-card h2 {
    font-size: 18px;
}

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

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.meta-pill {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--pink-soft);
    color: var(--title);
    font-size: 13px;
}

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

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

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

    .split-feature {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    body {
        padding-bottom: calc(50px + env(safe-area-inset-bottom));
    }

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

    .sticker-rail {
        display: none;
    }

    .site-main {
        padding-top: calc(var(--header-mobile) + 18px);
    }

    .cover-bar-inner {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 8px;
    }

    .brand-logo {
        height: 30px;
        max-width: 130px;
    }

    .brand-text-logo {
        font-size: 18px;
    }

    .envelope-trigger,
    .app-link-pill {
        padding: 0 13px;
        min-width: 44px;
        font-size: 14px;
    }

    .app-link-pill {
        justify-self: end;
    }

    .candy-strip-inner {
        font-size: 11px;
    }

    .hero-card,
    .note-card,
    .step-card,
    .status-card,
    .book-card,
    .faq-card,
    .soft-card,
    .letter-card,
    .index-card,
    .person-card,
    .term-card {
        border-radius: 18px;
    }

    .hero-card {
        padding: 20px;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .grid-6,
    .envelope-grid,
    .footer-groups {
        grid-template-columns: 1fr;
    }

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

    .numbered-list li {
        grid-template-columns: 44px 1fr;
    }

    .envelope-drawer {
        width: 100%;
        max-height: 70vh;
        border-radius: 22px 22px 0 0;
    }

    .search-layer {
        top: 86px;
        width: calc(100% - 20px);
        padding: 18px;
    }

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

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

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

    .mobile-bottom-nav a.is-current {
        color: #FFFFFF;
        background: var(--pink);
    }

    .site-footer {
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
    }

    .media-slot {
        min-height: 160px;
    }

    .home-six-card .media-slot {
        min-height: 180px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}

.mt-18 { margin-top: 18px; }
.mt-14 { margin-top: 14px; }
.app-icon-small { width: 64px; height: 64px; object-fit: contain; margin-bottom: 12px; }
.fallback-cover-copy { text-align: center; padding: 36px 20px; }

/* Distinct inner-page editorial layouts */
body[data-current-page="note"] .term-stack .term-card {
    border-style: dashed;
    background: linear-gradient(180deg, #FFFFFF 0%, #FFF8FB 100%);
}

body[data-current-page="portrait"] .term-stack,
body[data-current-page="gallery"] .term-stack,
body[data-current-page="slate"] .term-stack,
body[data-current-page="feeling"] .term-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-current-page="portrait"] .term-card {
    min-height: 270px;
    border-top: 5px solid var(--pink);
}

body[data-current-page="street"] .term-card {
    box-shadow: none;
    border-left: 5px solid var(--pink);
}

body[data-current-page="scrap"] .term-card {
    position: relative;
    padding-left: 72px;
}

body[data-current-page="scrap"] .term-card .number-label {
    position: absolute;
    left: 22px;
    top: 22px;
    font-size: 24px;
}

body[data-current-page="tale"] .term-stack {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}

body[data-current-page="tale"] .term-card {
    box-shadow: none;
    border-radius: 0;
    border-width: 0 0 1px 0;
    background: transparent;
    padding: 28px 6px;
}

body[data-current-page="set"] .term-card,
body[data-current-page="bench"] .term-card {
    border-left: 6px solid var(--pink-soft);
}

body[data-current-page="feeling"] .term-card {
    background: linear-gradient(180deg, #FFF2F7 0%, #FFFFFF 100%);
    min-height: 250px;
}

body[data-current-page="gallery"] .term-card {
    min-height: 270px;
    background: linear-gradient(180deg, #FFFFFF 0%, #FFF0F5 100%);
    border-bottom: 7px solid var(--pink-soft);
}

body[data-current-page="focus"] .term-card .number-label {
    display: block;
    font-size: 34px;
    line-height: 1;
    margin-bottom: 12px;
}

body[data-current-page="slate"] .term-card {
    background: var(--surface-soft);
    min-height: 230px;
}

body[data-current-page="mail"] .term-stack {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

body[data-current-page="mail"] .term-card {
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(196, 59, 110, 0.08);
    padding: 28px;
}

body[data-current-page="walk"] .term-card {
    border-radius: 999px 20px 20px 999px;
    padding-left: 36px;
}

body[data-current-page="app"] .hero-card .media-slot {
    min-height: 300px;
    max-height: 420px;
}

body[data-current-page="app"] .hero-card .content-image {
    max-height: 420px;
}

body[data-current-page="rights"] .term-card,
body[data-current-page="grade"] .term-card,
body[data-current-page="privacy"] .term-card {
    box-shadow: none;
    border-left: 4px solid var(--pink);
}

body[data-current-page="about"] .term-card {
    box-shadow: none;
    background: #FFFFFF;
}

@media (max-width: 720px) {
    body[data-current-page="portrait"] .term-stack,
    body[data-current-page="gallery"] .term-stack,
    body[data-current-page="slate"] .term-stack,
    body[data-current-page="feeling"] .term-stack {
        grid-template-columns: 1fr;
    }

    body[data-current-page="scrap"] .term-card {
        padding-left: 58px;
    }

    body[data-current-page="scrap"] .term-card .number-label {
        left: 18px;
    }

    body[data-current-page="walk"] .term-card {
        border-radius: 18px;
        padding-left: 20px;
    }
}
