:root {
    --bg: #FFF7FA;
    --surface: #FFFFFF;
    --soft: #FFEAF2;
    --soft-2: #FFE1EC;
    --title: #4A1630;
    --text: #5C2A3E;
    --muted: #8A4A62;
    --light-muted: #B07A90;
    --pink: #E85A8B;
    --bright: #FF7AA8;
    --deep: #C43B6E;
    --border: rgba(232, 90, 139, .16);
    --shadow: 0 14px 34px rgba(196, 59, 110, .10);
    --rail: 88px;
    --topbar: 56px;
    --max: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.75;
    overflow-x: hidden;
    padding-top: var(--topbar);
}
body.overlay-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
a, button, input { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
img { display: block; max-width: 100%; height: auto; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(232, 90, 139, .38); outline-offset: 3px; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 1000; background: var(--title); color: #fff; padding: 10px 14px; border-radius: 999px; }
.skip-link:focus { top: 10px; }
.topbar { position: fixed; top: 0; left: var(--rail); right: 0; height: var(--topbar); z-index: 70; background: rgba(255, 247, 250, .94); border-bottom: 1px solid var(--border); backdrop-filter: blur(10px); }
.topbar-inner { max-width: calc(var(--max) + 48px); margin: 0 auto; height: 100%; padding: 0 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.topbar-logo { justify-self: center; display: inline-flex; align-items: center; min-height: 44px; color: var(--title); font-weight: 800; letter-spacing: .02em; }
.top-logo-image { max-height: 36px; width: auto; }
.brand-text { white-space: nowrap; }
.topbar-spacer { display: block; }
.topbar-app { justify-self: end; min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px; color: var(--deep); background: #fff; border: 1px solid var(--border); font-weight: 700; }
.topbar-app:hover { background: var(--soft); }
.mobile-menu-button { display: none; border: 0; background: transparent; min-height: 44px; color: var(--deep); font-weight: 800; padding: 0 8px 0 0; }
.desktop-rail { position: fixed; inset: 0 auto 0 0; z-index: 80; width: var(--rail); background: var(--soft); border-right: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; }
.rail-home { height: var(--topbar); width: 100%; display: grid; place-items: center; border-bottom: 1px solid var(--border); }
.rail-logo { width: 38px; height: 38px; object-fit: contain; border-radius: 12px; }
.rail-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--bright), var(--deep)); color: #fff; font-weight: 900; }
.rail-nav { width: 100%; padding: 14px 8px; display: flex; flex-direction: column; gap: 7px; align-items: center; }
.rail-link { width: 72px; min-height: 46px; padding: 7px 6px; border-radius: 18px; display: grid; place-items: center; text-align: center; font-size: 13px; line-height: 1.2; color: var(--muted); border: 1px solid transparent; background: transparent; }
.rail-link:hover { background: rgba(255,255,255,.75); color: var(--deep); border-color: var(--border); }
.rail-link.is-active { background: var(--deep); color: #fff; box-shadow: 0 8px 18px rgba(196,59,110,.2); }
.rail-button { appearance: none; }
.site-main { margin-left: var(--rail); min-height: 70vh; }
.page-shell { max-width: var(--max); margin: 0 auto; padding: 42px 24px 70px; }
.page-hero { display: grid; gap: 18px; margin-bottom: 28px; }
.eyebrow { margin: 0; color: var(--deep); font-weight: 800; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3 { color: var(--title); line-height: 1.25; margin-top: 0; }
h1 { font-size: clamp(28px, 4vw, 34px); margin-bottom: 8px; letter-spacing: -.02em; }
h2 { font-size: clamp(22px, 3vw, 28px); }
h3 { font-size: 19px; }
p { margin-top: 0; }
.lead { max-width: 820px; color: var(--muted); font-size: 17px; }
.hero-actions, .card-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button { min-height: 44px; padding: 10px 18px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: linear-gradient(135deg,#FF7AA8 0%,#E85A8B 55%,#C43B6E 100%); box-shadow: 0 10px 24px rgba(196,59,110,.18); }
.button-secondary { color: var(--deep); background: #fff; border: 1px solid var(--border); }
.section { margin-top: 52px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.section-head p { margin: 0; max-width: 620px; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); }
.card-pad { padding: 24px; }
.image-frame { overflow: hidden; border-radius: 22px; background: var(--soft-2); border: 1px solid var(--border); }
.image-frame img { width: 100%; height: auto; }
.image-slot { min-height: 210px; background: linear-gradient(145deg, #FFEAF2, #FFF, #FFE1EC); border: 1px dashed rgba(196,59,110,.22); border-radius: 18px; position: relative; overflow: hidden; }
.image-slot::after { content: ""; position: absolute; inset: 20% 18%; border-radius: 42% 58% 50% 50%; background: rgba(232,90,139,.08); transform: rotate(-7deg); }
.banner-frame .image-slot, .banner-frame img { max-height: 360px; width: 100%; object-fit: contain; }
.banner-frame .image-slot { aspect-ratio: 16 / 6; min-height: 220px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 24px; align-items: start; }
.three-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.four-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.link-card { padding: 22px; min-height: 100%; display: block; }
.link-card p { color: var(--muted); }
.link-card:hover { transform: translateY(-2px); border-color: rgba(232,90,139,.34); }
.tag { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 10px; border-radius: 999px; background: var(--soft); color: var(--deep); font-size: 13px; font-weight: 800; }
.note-list { display: grid; gap: 12px; }
.note-item { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: start; padding: 18px 0; border-top: 1px solid var(--border); }
.note-item:first-child { border-top: 0; }
.note-number { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 15px; background: var(--soft); color: var(--deep); font-weight: 900; }
.prose { max-width: 880px; }
.prose p { margin-bottom: 18px; }
.prose h2 { margin-top: 38px; }
.prose h3 { margin-top: 26px; }
.prose ul { padding-left: 1.2em; }
.article-stack { display: grid; gap: 18px; }
.article-card { padding: 24px; }
.article-card p:last-child { margin-bottom: 0; }
.status-card { padding: 22px; position: relative; overflow: hidden; }
.status-card::before { content: ""; position: absolute; width: 90px; height: 90px; border-radius: 50%; right: -30px; top: -30px; background: rgba(232,90,139,.08); }
.status-card .tag { margin-bottom: 16px; }
.big-number { font-size: 44px; line-height: 1; font-weight: 900; color: var(--pink); letter-spacing: -.05em; }
.polaroid-wall { columns: 3 260px; column-gap: 18px; }
.polaroid { break-inside: avoid; margin: 0 0 18px; padding: 12px 12px 18px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: 18px; }
.polaroid:nth-child(3n+1) { transform: rotate(-.7deg); }
.polaroid:nth-child(3n+2) { transform: rotate(.9deg); }
.polaroid:nth-child(3n) { transform: rotate(-.3deg); }
.polaroid .image-frame { border-radius: 14px; box-shadow: none; }
.polaroid h3 { margin: 16px 4px 8px; }
.polaroid p { margin: 0 4px; color: var(--muted); }
.album-shelf { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; align-items: stretch; }
.album-book { padding: 14px; border-radius: 20px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); }
.album-cover { aspect-ratio: 4 / 5; border-radius: 14px; background: linear-gradient(155deg, #FFE1EC, #FFF7FA); padding: 22px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--border); }
.album-cover span { color: var(--deep); font-size: 13px; font-weight: 800; }
.album-cover strong { color: var(--title); font-size: 24px; line-height: 1.2; }
.album-book p { margin: 14px 4px 0; color: var(--muted); }
.letter-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.letter-card { padding: 28px; background: #fff; border-radius: 20px; border: 1px solid var(--border); box-shadow: var(--shadow); position: relative; }
.letter-card::before { content: "“"; position: absolute; right: 18px; top: 0; font-size: 72px; line-height: 1; color: rgba(232,90,139,.12); font-family: Georgia, serif; }
.editor-opinion { color: var(--deep); font-weight: 800; }
.notice { padding: 18px 20px; border-radius: 16px; background: var(--soft); border: 1px solid var(--border); color: var(--title); }
.definition-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.definition-card { padding: 22px; }
.definition-card p { color: var(--muted); }
.faq-list { display: grid; gap: 14px; }
.faq-item { padding: 22px; }
.faq-item h2 { font-size: 19px; margin-bottom: 10px; }
.faq-item p { margin: 0; color: var(--muted); }
.simple-index { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.index-row { padding: 20px; display: flex; gap: 14px; align-items: start; }
.index-row .index-mark { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 14px; display: grid; place-items: center; background: var(--soft); color: var(--deep); font-weight: 900; }
.index-row p { margin: 5px 0 0; color: var(--muted); }
.site-footer { margin-left: var(--rail); background: var(--title); color: #F8D6E4; }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 48px 24px 28px; }
.footer-brand { max-width: 640px; }
.footer-logo { display: inline-flex; min-height: 44px; align-items: center; color: #fff; font-size: 22px; font-weight: 900; }
.footer-logo-image { max-height: 36px; width: auto; }
.footer-en { margin: 4px 0 14px; letter-spacing: .14em; color: #fff; font-size: 13px; }
.footer-note { color: #F8D6E4; }
.footer-links { margin-top: 32px; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 24px; }
.footer-links h2 { color: #fff; font-size: 16px; margin-bottom: 12px; }
.footer-links a { display: flex; align-items: center; min-height: 44px; color: #F8D6E4; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-bottom a { min-height: 44px; display: inline-flex; align-items: center; }
.footer-bottom { margin-top: 34px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); display: flex; gap: 18px; justify-content: space-between; flex-wrap: wrap; font-size: 14px; }
.overlay { position: fixed; inset: 0; z-index: 200; visibility: hidden; pointer-events: none; opacity: 0; transition: opacity .2s ease, visibility .2s ease; }
.overlay.is-open { visibility: visible; pointer-events: auto; opacity: 1; }
.overlay-backdrop { position: absolute; inset: 0; background: rgba(74,22,48,.32); }
.directory-panel { position: absolute; inset: 12px; border-radius: 24px; overflow-y: auto; background: var(--bg); padding: 28px max(24px, calc((100vw - var(--max))/2)); }
.overlay-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; margin-bottom: 26px; }
.overlay-head.compact { grid-template-columns: 1fr auto; }
.overlay-head h2 { margin: 0; text-align: center; }
.overlay-head.compact h2 { text-align: left; }
.directory-brand { justify-self: start; min-width: 120px; color: var(--title); font-weight: 900; }
.directory-logo-image { max-height: 34px; width: auto; }
.close-button { justify-self: end; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--deep); font-weight: 800; }
.mega-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.menu-group { padding: 20px; border-radius: 22px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); }
.menu-group h3 { margin-bottom: 12px; }
.menu-group a { display: block; padding: 14px 0; border-top: 1px solid var(--border); }
.menu-group a:first-of-type { border-top: 0; }
.menu-group strong { display: block; color: var(--title); }
.menu-group span { display: block; margin-top: 3px; color: var(--muted); font-size: 14px; }
.search-panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(620px, calc(100vw - 32px)); padding: 24px; background: #fff; border-radius: 22px; border: 1px solid var(--border); box-shadow: 0 24px 70px rgba(74,22,48,.22); }
.search-look { display: block; padding: 16px; border-radius: 16px; background: var(--soft); color: var(--title); font-weight: 800; }
.search-look input { width: 100%; margin-top: 10px; min-height: 46px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--text); }
.preset-links { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.preset-links a { min-height: 44px; padding: 9px 13px; border-radius: 999px; background: #fff; border: 1px solid var(--border); color: var(--deep); font-weight: 700; }
.search-tip { margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.mobile-bottom-nav { display: none; }

@media (max-width: 900px) {
    :root { --rail: 0px; }
    .desktop-rail { display: none; }
    .topbar { left: 0; }
    .topbar-inner { padding: 0 16px; grid-template-columns: minmax(60px,1fr) auto minmax(60px,1fr); }
    .topbar-spacer { display: none; }
    .mobile-menu-button { display: inline-flex; align-items: center; justify-self: start; }
    .site-main, .site-footer { margin-left: 0; }
    .page-shell { padding: 32px 18px 82px; }
    .two-col { grid-template-columns: 1fr; }
    .three-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .four-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .album-shelf { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .mega-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .footer-links { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .mobile-bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 120; min-height: 50px; padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5,1fr); background: rgba(255,255,255,.96); border-top: 1px solid var(--border); box-shadow: 0 -8px 24px rgba(74,22,48,.08); backdrop-filter: blur(12px); }
    .mobile-bottom-nav a { min-height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: var(--muted); font-size: 12px; font-weight: 700; }
    .mobile-bottom-nav a span { font-size: 17px; line-height: 1; }
    .mobile-bottom-nav a.is-active { color: var(--pink); }
    .site-footer { padding-bottom: calc(50px + env(safe-area-inset-bottom)); }
    .overlay { z-index: 300; }
}

@media (max-width: 640px) {
    body { line-height: 1.68; }
    .topbar-app { padding: 0 10px; font-size: 14px; }
    .topbar-logo { min-width: 0; max-width: 150px; overflow: hidden; }
    .top-logo-image { max-width: 136px; }
    .page-shell { padding-left: 16px; padding-right: 16px; }
    .section { margin-top: 42px; }
    .section-head { align-items: start; flex-direction: column; gap: 6px; }
    .three-grid, .four-grid, .letter-grid, .definition-grid, .simple-index { grid-template-columns: 1fr; }
    .album-shelf { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
    .album-book { padding: 10px; }
    .album-cover { padding: 16px; }
    .album-cover strong { font-size: 20px; }
    .polaroid-wall { columns: 1; }
    .polaroid { transform: none !important; }
    .footer-links { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px 14px; }
    .footer-inner { padding-left: 16px; padding-right: 16px; }
    .directory-panel { inset: 8px; border-radius: 20px; padding: 18px 16px 82px; }
    .overlay-head { grid-template-columns: 1fr auto; }
    .directory-brand { display: none; }
    .overlay-head h2 { text-align: left; }
    .mega-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
    .menu-group { padding: 14px; border-radius: 18px; }
    .menu-group a { padding: 12px 0; }
    .menu-group span { font-size: 12px; line-height: 1.5; }
    .banner-frame .image-slot { min-height: 150px; }
}

@media (max-width: 420px) {
    .mega-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .menu-group { padding: 12px; }
    .menu-group h3 { font-size: 17px; }
    .menu-group strong { font-size: 14px; }
    .footer-links { grid-template-columns: 1fr 1fr; }
}
