:root {
    --bg: #FFF6F4;
    --deep: #FFFFFF;
    --content: #FFFFFF;
    --soft: #F8E8E4;
    --title: #3A1518;
    --text: #4A2428;
    --muted: #7A4E52;
    --aid: #A0787C;
    --rose: #E35D6A;
    --pink: #F08A92;
    --gold: #C9A227;
    --peach: #F3B4B0;
    --ink: #3A1518;
    --line: rgba(227, 93, 106, 0.18);
    --shadow: 0 14px 34px rgba(58, 21, 24, 0.08);
    --top-desk: 136px;
    --top-mobile: 92px;
    --dock: calc(50px + env(safe-area-inset-bottom));
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font: 16px/1.75 "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rose); text-decoration: none; }
a:hover { color: #C94A56; }
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}
.wrap {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
}

.site-top {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--bg);
}
.seal-bar {
    height: 28px;
    background: var(--rose);
    color: #fff;
}
.seal-inner {
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.seal-brand { margin: 0; font-size: 12px; letter-spacing: 0.08em; }
.seal-search {
    min-height: 24px;
    min-width: 44px;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
}

.court-bar {
    height: 64px;
    background: #FFF8F6;
    border-bottom: 1px solid var(--line);
}
.court-inner {
    height: 64px;
    display: grid;
    grid-template-columns: 72px 1fr 88px;
    align-items: center;
}
.menu-toggle, .open-app {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 14px;
}
.menu-toggle {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    cursor: pointer;
}
.open-app {
    background: #fff;
    color: var(--rose);
    border: 1px solid var(--line);
}
.brand-mark {
    justify-self: center;
    display: flex;
    align-items: center;
    color: var(--ink);
}
.brand-logo { height: 34px; width: auto; }
.brand-word {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.path-bar {
    height: 44px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.path-inner {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
}
.path-inner a {
    color: var(--muted);
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
}
.path-inner a.is-current,
.path-inner a:hover {
    color: var(--ink);
    border-bottom-color: var(--rose);
}

.site-main {
    padding-top: 24px;
    padding-bottom: 72px;
}
body { padding-bottom: 0; }

.hero-card, .panel, .article-card {
    background: var(--content);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 28px 24px;
    margin: 0 0 24px;
}
.kicker {
    margin: 0 0 8px;
    color: var(--rose);
    font-size: 13px;
    letter-spacing: 0.16em;
}
h1 {
    margin: 0 0 16px;
    color: var(--title);
    font-size: 30px;
    line-height: 1.35;
    font-weight: 700;
}
h2 {
    margin: 28px 0 12px;
    color: var(--title);
    font-size: 22px;
}
h3 {
    margin: 20px 0 8px;
    color: var(--title);
    font-size: 18px;
}
p { margin: 0 0 14px; }
.lead { font-size: 16px; color: var(--text); }
.muted { color: var(--muted); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 20px; }
.btn {
    min-height: 44px;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 15px;
}
.btn-primary {
    background: linear-gradient(135deg, #F08A92 0%, #E35D6A 52%, #C94A56 100%);
    color: #fff;
}
.btn-primary:hover { color: #fff; filter: brightness(1.03); }
.btn-ghost {
    background: #fff;
    color: var(--rose);
    border: 1px solid var(--line);
}

.slot {
    background: var(--soft);
    border-radius: 18px;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 16px 0 8px;
}
.slot.cover { max-height: 340px; }
.slot img { width: 100%; height: 100%; object-fit: cover; max-height: 340px; }
.slot-wide { min-height: 200px; }

.path-grid, .card-grid, .motif-grid, .book-list, .num-list {
    display: grid;
    gap: 16px;
}
.path-grid { grid-template-columns: repeat(4, 1fr); }
.card-grid { grid-template-columns: repeat(3, 1fr); }
.motif-grid { grid-template-columns: repeat(3, 1fr); }
.book-list { grid-template-columns: 1fr; }

.path-item, .mini-card, .motif-item, .book-item, .num-item, .dir-item {
    background: var(--content);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--shadow);
}
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}
.dot-rose { background: var(--rose); }
.dot-gold { background: var(--gold); }
.dot-peach { background: var(--peach); }
.path-item h3, .mini-card h3, .motif-item h3 { margin-top: 0; }
.path-item p, .mini-card p, .motif-item p, .book-item p { margin-bottom: 8px; color: var(--muted); }

.num-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 16px 0;
}
.num-item strong {
    display: block;
    color: var(--rose);
    font-size: 20px;
    letter-spacing: 0.04em;
}
.num-giant {
    font-size: 42px;
    color: var(--rose);
    line-height: 1;
    margin-bottom: 8px;
    font-weight: 700;
}

.axis { position: relative; padding-left: 28px; }
.axis::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--peach);
}
.axis-item {
    position: relative;
    margin-bottom: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
}
.axis-item::before {
    content: "";
    position: absolute;
    left: -24px;
    top: 22px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--rose);
}
.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--ink);
    font-size: 12px;
}

.faq-item {
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
}
.faq-item h3 { margin: 0 0 8px; }
.clause { margin-bottom: 18px; }

.site-footer {
    background: var(--ink);
    color: #F8E8E4;
    padding: 40px 0 28px;
}
.footer-brand { text-align: center; margin-bottom: 24px; }
.footer-logo { height: 34px; width: auto; margin: 0 auto 8px; filter: brightness(2); }
.footer-name { margin: 0; font-size: 20px; letter-spacing: 0.18em; }
.footer-en { margin: 4px 0 0; color: var(--peach); letter-spacing: 0.2em; font-size: 12px; }
.footer-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.site-footer h2 { color: #F8E8E4; font-size: 15px; margin: 0 0 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer a { color: #F3B4B0; display: inline-block; min-height: 32px; }
.site-footer a:hover { color: #fff; }
.footer-note, .footer-copy {
    text-align: center;
    color: #F8E8E4;
    font-size: 13px;
    margin: 22px auto 0;
    max-width: 760px;
}

.scroll-menu, .search-layer, .page-mask {
    visibility: hidden;
    pointer-events: none;
}
.scroll-menu:not([hidden]),
.search-layer:not([hidden]),
.page-mask:not([hidden]) {
    visibility: visible;
    pointer-events: auto;
}
.page-mask {
    position: fixed;
    inset: 0;
    background: rgba(58, 21, 24, 0.42);
    z-index: 60;
}
.scroll-menu {
    position: fixed;
    inset: 0;
    z-index: 70;
}
.scroll-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 360px;
    background: #FFF6F4;
    box-shadow: var(--shadow);
    overflow: auto;
    padding: 16px 16px 40px;
}
.scroll-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.scroll-brand { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.scroll-logo { height: 28px; width: auto; }
.scroll-close, .search-close {
    min-height: 44px;
    min-width: 44px;
    border: 0;
    background: #fff;
    color: var(--ink);
    border-radius: 999px;
    cursor: pointer;
}
.scroll-body section { margin-bottom: 18px; }
.scroll-body h2 { font-size: 14px; color: var(--rose); margin: 0 0 8px; }
.scroll-body a {
    display: block;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 12px;
    margin-bottom: 8px;
    color: var(--text);
}
.scroll-body a strong { display: block; color: var(--ink); }
.scroll-body a span { display: block; color: var(--muted); font-size: 13px; }

.search-layer {
    position: fixed;
    left: 0;
    right: 0;
    top: 92px;
    z-index: 80;
    display: flex;
    justify-content: center;
    padding: 12px 16px 0;
}
.search-layer[hidden] { display: none; }
.search-card {
    width: min(640px, 100%);
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    padding: 18px;
}
.search-form { display: flex; gap: 8px; margin: 10px 0 14px; }
.search-form input {
    flex: 1;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 16px;
    background: var(--soft);
    color: var(--ink);
}
.search-form button {
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    background: linear-gradient(135deg, #F08A92 0%, #E35D6A 52%, #C94A56 100%);
    color: #fff;
    cursor: pointer;
}
.search-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.search-presets a {
    min-height: 36px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--ink);
}

.mobile-dock { display: none; }
body.is-locked { overflow: hidden; }

@media (max-width: 980px) {
    .path-grid, .card-grid, .motif-grid, .footer-cols, .num-row {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 760px) {
    .path-bar { display: none; }
    h1 { font-size: 28px; }
    .path-grid, .card-grid, .motif-grid, .footer-cols, .num-row {
        grid-template-columns: 1fr;
    }
    .scroll-panel { width: 88%; }
    .search-layer {
        inset: 0;
        top: 0;
        background: #FFF6F4;
        padding: 20px 16px;
        align-items: flex-start;
    }
    .search-card { width: 100%; box-shadow: none; }
    .site-main { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
    .site-footer { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
    .mobile-dock {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(50px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        background: #fff;
        border-top: 1px solid var(--line);
        z-index: 50;
    }
    .mobile-dock a {
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--muted);
        font-size: 13px;
        min-height: 44px;
    }
    .mobile-dock a.is-current { color: var(--rose); font-weight: 700; }
    body.is-locked .mobile-dock { z-index: 55; }
}
