:root {
    --bg: #F3EEEA;
    --deep-bg: #E7E1DC;
    --surface: #FFFBFA;
    --soft: #EFE6E4;
    --title: #3D3336;
    --text: #4F4548;
    --muted: #8A7A7E;
    --quiet: #A39A96;
    --pink: #D9A0AE;
    --rose: #C47B8A;
    --mist-pink: #E8C9D0;
    --gray: #9B938E;
    --clay: #D4B8A8;
    --sage: #9BB0A5;
    --border: rgba(196,123,138,0.22);
    --border-strong: rgba(196,123,138,0.40);
    --shadow: 0 16px 36px rgba(61,51,54,0.08);
    --max: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.78 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 3px solid rgba(196,123,138,.45); outline-offset: 3px; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 999; background: var(--title); color: #fff; padding: 10px 14px; border-radius: 10px; }
.skip-link:focus { top: 10px; }
.head-shell, .footer-shell, .content-shell { width: min(calc(100% - 32px), var(--max)); margin: 0 auto; }
.site-head { position: relative; z-index: 60; }
.cloud-line, .masthead, .pink-strip { position: fixed; left: 0; right: 0; }
.cloud-line { top: 0; height: 22px; background: var(--rose); color: #fff; z-index: 63; }
.cloud-inner { height: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 12px; line-height: 1; }
.brand-mini { color: #fff; letter-spacing: .08em; white-space: nowrap; }
.head-text-btn { border: 0; background: transparent; color: #fff; padding: 0 4px; min-height: 22px; cursor: pointer; }
.masthead { top: 22px; height: 64px; background: rgba(255,251,250,.96); border-bottom: 1px solid var(--border); z-index: 62; backdrop-filter: blur(8px); }
.masthead-inner { height: 64px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; }
.logo-link { justify-self: start; min-height: 44px; display: inline-flex; align-items: center; max-width: 260px; }
.brand-logo { width: auto; height: 34px; max-width: 220px; object-fit: contain; object-position: left center; }
.logo-text { color: var(--title); font-size: 22px; font-weight: 800; letter-spacing: .04em; }
.neighborhood-button, .app-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; padding: 0 18px; cursor: pointer; font-weight: 700; }
.neighborhood-button { border: 1px solid var(--border-strong); background: var(--surface); color: var(--title); }
.app-button { justify-self: end; color: #fff; background: linear-gradient(135deg,#E8C9D0 0%,#D9A0AE 52%,#C47B8A 100%); box-shadow: 0 8px 20px rgba(196,123,138,.18); }
.pink-strip { top: 86px; height: 44px; background: #EFE6E4; border-bottom: 1px solid var(--border); z-index: 61; }
.pink-strip-inner { height: 44px; display: flex; align-items: center; gap: 8px; overflow: hidden; }
.strip-link { padding: 6px 10px; border-radius: 8px; color: var(--text); white-space: nowrap; font-size: 14px; }
.strip-link:hover { background: rgba(255,251,250,.72); }
.strip-link.is-current { background: var(--rose); color: #fff; }
.site-main { padding-top: 154px; min-height: 60vh; }
.page-hero, .section-block { width: min(calc(100% - 32px), var(--max)); margin: 0 auto 26px; }
.page-hero { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: clamp(22px, 4vw, 48px); box-shadow: var(--shadow); }
.eyebrow { margin: 0 0 8px; font-size: 13px; letter-spacing: .12em; color: var(--rose); font-weight: 800; text-transform: uppercase; }
h1, h2, h3 { color: var(--title); line-height: 1.28; margin-top: 0; }
h1 { font-size: clamp(28px, 4.2vw, 32px); margin-bottom: 14px; }
h2 { font-size: clamp(21px, 3vw, 26px); margin-bottom: 12px; }
h3 { font-size: 18px; margin-bottom: 8px; }
p { margin: 0 0 14px; }
.lead { font-size: 17px; color: var(--text); max-width: 860px; }
.hero-media, .media-slot { background: var(--soft); border: 1px solid var(--border); border-radius: 18px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-media { width: 100%; max-height: 300px; min-height: 200px; margin-bottom: 22px; }
.hero-media img { width: 100%; max-height: 300px; object-fit: contain; object-position: center; }
.media-slot { min-height: 190px; }
.media-slot img { width: 100%; height: 220px; object-fit: contain; object-position: center; }
.media-slot.tall img { height: auto; max-height: 420px; }
.fallback-cover { min-height: 220px; width: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(150deg, var(--mist-pink), var(--soft)); color: var(--title); font-weight: 800; font-size: clamp(24px, 4vw, 40px); letter-spacing: .08em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 17px; border-radius: 12px; border: 1px solid var(--border-strong); font-weight: 800; }
.btn-primary { color: #fff; background: linear-gradient(135deg,#E8C9D0 0%,#D9A0AE 52%,#C47B8A 100%); border-color: transparent; }
.btn-secondary { background: var(--surface); color: var(--title); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(61,51,54,.08); }
.section-block { padding: clamp(22px, 4vw, 36px); background: var(--surface); border-radius: 20px; border: 1px solid var(--border); }
.section-block.soft { background: var(--soft); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 18px; }
.section-head p { max-width: 680px; color: var(--muted); margin: 0; }
.card-grid { display: grid; gap: 18px; }
.card-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.content-card, .note-card, .status-card, .list-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; }
.soft .content-card, .soft .note-card { background: rgba(255,251,250,.74); }
.content-card .media-slot { margin-bottom: 14px; }
.content-card p, .note-card p, .status-card p, .list-card p { color: var(--text); }
.card-link { display: inline-flex; min-height: 44px; align-items: center; color: var(--rose); font-weight: 800; }
.index-number { font-size: 40px; line-height: 1; color: var(--mist-pink); font-weight: 900; letter-spacing: -.03em; }
.numbered-list { display: grid; gap: 12px; }
.numbered-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.numbered-row .num { color: var(--rose); font-weight: 900; font-size: 20px; }
.numbered-row a { color: var(--rose); font-weight: 800; min-height: 44px; display: inline-flex; align-items: center; }
.vertical-grid { display: grid; gap: 12px; }
.vertical-item { padding: 18px; background: var(--surface); border-left: 4px solid var(--clay); border-radius: 0 14px 14px 0; }
.status-card { border-top: 4px solid var(--sage); }
.status-card strong { color: var(--title); display: block; margin-bottom: 6px; }
.step-list { counter-reset: steps; display: grid; gap: 14px; }
.step-item { position: relative; padding: 18px 18px 18px 68px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.step-item:before { counter-increment: steps; content: counter(steps, decimal-leading-zero); position: absolute; left: 18px; top: 18px; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--rose); font-weight: 900; }
.quote-card { border-left: 4px solid var(--pink); background: var(--surface); border-radius: 0 16px 16px 0; padding: 18px 20px; }
.quote-card small { display: block; color: var(--rose); font-weight: 800; margin-top: 8px; }
.app-panel { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 28px; align-items: center; }
.app-icon { width: 64px; height: 64px; object-fit: contain; border-radius: 16px; margin-bottom: 12px; }
.prose { max-width: 880px; }
.prose h2 { margin-top: 28px; }
.prose h3 { margin-top: 22px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 8px; }
.meta-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.meta-strip span { padding: 7px 10px; border-radius: 10px; background: var(--soft); color: var(--text); font-size: 13px; }
.article-index { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.article-index a { min-height: 56px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; font-weight: 800; }
.article-index a span { color: var(--muted); font-size: 13px; font-weight: 500; }
.callout { border: 1px solid var(--border-strong); background: #FFF7F7; border-radius: 16px; padding: 18px; }
.callout.sage { background: #F2F6F3; border-color: rgba(155,176,165,.38); }
.faq-list { display: grid; gap: 14px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.faq-item h2 { font-size: 19px; margin-bottom: 10px; }
.site-footer { background: var(--title); color: var(--bg); margin-top: 40px; padding: 40px 0 92px; }
.footer-shell { display: grid; gap: 28px; }
.footer-brand { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(280px, 1.3fr); gap: 28px; align-items: center; }
.footer-brand-link { display: inline-flex; align-items: center; gap: 12px; color: #fff; }
.footer-logo { height: 32px; width: auto; max-width: 180px; object-fit: contain; }
.footer-brand-link strong { display: block; font-size: 20px; }
.footer-brand-link small { display: block; color: #E8C9D0; font-size: 11px; letter-spacing: .14em; }
.footer-brand p { color: #E7E1DC; margin: 0; }
.footer-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding: 24px 0; border-top: 1px solid rgba(255,255,255,.12); border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-links h2 { color: #fff; font-size: 15px; margin-bottom: 10px; }
.footer-links a { display: block; color: #E7E1DC; padding: 5px 0; font-size: 14px; }
.footer-links a:hover { color: #fff; }
.footer-note { color: #D9CFCC; font-size: 13px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; }
.footer-note p { margin: 0; }
.screen-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(61,51,54,.42); opacity: 0; visibility: hidden; pointer-events: none; transition: .2s ease; }
.screen-overlay.is-visible { opacity: 1; visibility: visible; pointer-events: auto; }
body.overlay-open { overflow: hidden; }
.neighbor-book, .search-layer { position: fixed; z-index: 90; opacity: 0; visibility: hidden; pointer-events: none; transition: .2s ease; }
.neighbor-book.is-visible, .search-layer.is-visible { opacity: 1; visibility: visible; pointer-events: auto; }
.neighbor-book { width: min(92vw, 940px); max-height: 72vh; left: 50%; top: 50%; transform: translate(-50%,-50%); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 20px; box-shadow: 0 30px 80px rgba(61,51,54,.22); overflow: hidden; }
.book-head { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--soft); }
.book-brand { display: flex; align-items: center; gap: 10px; }
.book-logo { height: 30px; width: auto; max-width: 150px; object-fit: contain; }
.book-brand strong { color: var(--title); display: block; }
.book-brand small { display: block; color: var(--muted); font-size: 10px; letter-spacing: .12em; }
.close-square { min-width: 50px; min-height: 44px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); color: var(--title); cursor: pointer; }
.book-pages { max-height: calc(72vh - 68px); overflow-y: auto; padding: 18px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; background: linear-gradient(90deg, #FFFBFA 0 49.6%, #EFE6E4 49.6% 50.4%, #FFFBFA 50.4% 100%); }
.book-group { background: rgba(255,251,250,.82); border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.book-group h2 { font-size: 16px; color: var(--rose); margin-bottom: 8px; }
.book-item { display: grid; gap: 2px; padding: 10px 8px; border-radius: 10px; }
.book-item:hover { background: var(--soft); }
.book-item strong { color: var(--title); }
.book-item span { color: var(--muted); font-size: 13px; }
.search-layer { top: 98px; left: 50%; width: min(92vw, 760px); transform: translateX(-50%); }
.search-card { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 18px; box-shadow: var(--shadow); padding: 20px; }
.search-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.search-head small { color: var(--rose); font-weight: 800; letter-spacing: .12em; }
.search-head h2 { margin: 5px 0 0; }
.search-appearance { margin: 16px 0; min-height: 50px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border: 1px solid var(--border); border-radius: 14px; color: var(--muted); background: var(--soft); }
.search-presets { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.search-presets a { min-height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--title); font-weight: 700; }
.mobile-bottom { display: none; }
@media (max-width: 900px) {
    .card-grid.three, .card-grid.four, .article-index { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .footer-links { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 720px) {
    .masthead-inner { grid-template-columns: minmax(0,1fr) auto auto; gap: 8px; }
    .logo-link { min-width: 0; }
    .brand-logo { max-width: 132px; height: 30px; }
    .logo-text { font-size: 19px; white-space: nowrap; }
    .neighborhood-button, .app-button { min-width: 68px; padding: 0 10px; font-size: 14px; }
    .pink-strip { display: none; }
    .site-main { padding-top: 110px; }
    .card-grid.three, .card-grid.two, .card-grid.four, .article-index, .app-panel, .footer-brand { grid-template-columns: 1fr; }
    .section-head { align-items: flex-start; flex-direction: column; }
    .numbered-row { grid-template-columns: 42px 1fr; }
    .numbered-row a { grid-column: 2; justify-self: start; }
    .book-pages { grid-template-columns: 1fr; background: var(--surface); max-height: calc(80vh - 68px); }
    .neighbor-book { max-height: 80vh; }
    .search-layer { top: 98px; }
    .search-presets { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .site-footer { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
    .mobile-bottom { position: fixed; z-index: 70; left: 0; right: 0; bottom: 0; min-height: 50px; padding-bottom: env(safe-area-inset-bottom); background: rgba(255,251,250,.97); border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); }
    .mobile-bottom a { min-height: 50px; display: flex; align-items: center; justify-content: center; color: var(--text); font-size: 13px; font-weight: 700; }
    .mobile-bottom a.is-current { color: #fff; background: var(--rose); }
}
@media (max-width: 420px) {
    .head-shell, .footer-shell, .content-shell, .page-hero, .section-block { width: calc(100% - 32px); }
    .brand-mini { font-size: 10.5px; }
    .neighborhood-button, .app-button { min-width: 64px; padding: 0 8px; }
    .page-hero, .section-block { border-radius: 16px; }
    .media-slot img { height: 190px; }
    .footer-links { gap: 18px; }
}
.compact-media { width: min(100%, 340px); }
