/* 百家姓 · 宋版谱牒 / 朱印家风. Shared cultural visual system. */
:root {
  --ink:#49372c; --muted:#877764; --gold:#bd9555; --line:#e8dcc7;
  --red:#ac4434; --red-dark:#8e3428; --red-light:#fbefea;
  --paper:#fffcf5; --white:#fff; --culture-paper:#fffcf5;
  --culture-title:#49372c; --culture-rule:#d2b47d;
  background:#fffcf5; color:var(--ink);
}
::selection { background:#f0ddc4; color:#49372c; }
body { color:var(--ink); }
.web-mode,.portal-mode,.ui-library { background:#fffcf5; }
.web-mode .content,.mini-mode .content { background:#fffcf5 url('design/surname-culture/paper-texture.webp') center/700px auto; }
.mini-mode { background:#eee9df url('design/surname-culture/surnames-pattern.webp') center/760px auto; }
.sidebar { background:#fffefa url('design/surname-culture/paper-texture.webp') center/700px auto; }
.brand-seal { border-radius:3px; background:#ac4434; outline:1px solid #c8945f; outline-offset:3px; }
.brand strong { color:#49372c; letter-spacing:3px; }
.brand small { color:#9a8264; }
.btn { border-radius:6px; color:#775b39; background:#fffefb; border-color:#ddc8a4; }
.btn.primary { background:#ac4434; border-color:#af6e45; color:#fffdf6; box-shadow:inset 0 0 0 1px #ffffff14; }
.btn.primary:hover { background:#90382c; border-color:#ae8550; }
.btn.subtle,.btn.ghost { background:#fcf7ed; border-color:#e8dac1; color:#7e6242; }
.text-link { color:#a24734; }
.icon { stroke-width:1.55; }
.icon-accent { stroke:#b68e51; }
.icon-btn { color:#92754f; }
.sidebar .nav-item { color:#806c52; }
.sidebar .nav-item.active { color:#a44332; background:#faf0df; box-shadow:inset 3px 0 #b88b4d; }
.sidebar-family,.intro-family,.sidebar-index { background:#fcf6e9; border-color:#e7d5b6; }
.sidebar-index { background-image:url('design/surname-culture/family-motto.webp'); background-size:cover; }
.sidebar-index-head>span,.mini-label,.live-tag { color:#8e7757; }
.side-quote { color:#876d4b; }
.app-header,.mini-mode .app-header { background:#fffefb; border-color:#e9dcc3; }
.breadcrumbs,.breadcrumbs strong,.header-actions .quiet-link,.user-link { color:#8a7354; }
.avatar,.mini-mode .profile-card span.avatar { border:1px solid #dbc5a1; border-radius:10px; background:#faf0dc; color:#9b6738; box-shadow:inset 0 0 0 3px #fffaf0; }
.avatar.rose { background:#fcf0e8; color:#a96e5c; border-color:#ead0bd; }
.avatar.tiny { border-radius:7px; }
.page-head h1,.mini-mode .page-head h1,.section-head h2,.mini-mode .section-head h2,
.person-identity h1,.mini-mode .person-identity h1,.member-card h3,.mini-mode .member-card h3,
.memory-body h3,.mini-mode .memory-body h3,.media-card-body h3,.mini-mode .media-card-body h3,
.form-section-heading h2,.mini-mode .form-section-heading h2,.dialog-head h2,.mini-mode .dialog-head h2 { color:#49372c; }
.page-head p,.mini-mode .page-head p,.bio-text,.mini-mode .bio-text,.info-panel dt,.info-note,
.memory-body>p,.mini-mode .memory-body>p,.media-card-body>p,.mini-mode .media-card-body>p,
.person-identity p,.mini-mode .person-identity p,.member-card-person p,.mini-mode .member-card-person p { color:#88745b; }
.culture-page-kicker { display:flex; align-items:center; gap:8px; color:#a38254; font-size:10px; letter-spacing:2px; margin-bottom:5px; }
.culture-page-kicker:before { content:''; width:5px; height:5px; background:#ad4c37; border:1px solid #c98f60; }
.page-head { padding-bottom:16px; border-bottom:1px solid #e9ddc8; }
.page-head>div:first-child,.mini-mode .page-head>div:first-child { display:block; min-width:0; }
.page-head h1 { margin:4px 0 7px; }
.mini-mode .page-head { margin-bottom:18px; padding-bottom:13px; }
.mini-mode .page-head h1 { font:600 25px/1.5 var(--serif); letter-spacing:1px; margin:0 0 5px; }
.mini-mode .page-head p { font-size:12px; }
.panel,.member-card,.media-card,.memory-card,.personal-menu,.personal-options { border-color:#e7d9c3; border-radius:9px; background:#fffefc; }
.section-head h2 { font-family:var(--serif); }
.section-head { border-color:#eee3d1; }
.pill,.readonly-badge { color:#96754a; background:#faf2e2; }
.pending-badge,.service-status,.mini-mode .service-status { background:#f8edda; color:#986d34; }
.small-seal,.culture-surname-seal { color:#a64734; border:1px solid #c78059; border-radius:2px; background:#fff9ed; box-shadow:inset 0 0 0 3px #fff9ed,inset 0 0 0 4px #ca9b71; }
.culture-surname-seal { display:grid; place-items:center; width:48px; height:52px; flex-shrink:0; font:32px/1 var(--serif); }
.culture-art-icon { display:block; width:34px; height:34px; object-fit:contain; flex-shrink:0; }
.setting-icon:has(.culture-art-icon) { background:transparent!important; border:0!important; box-shadow:none; width:34px; height:36px; }
.setting-icon .culture-art-icon { width:34px; height:34px; }
.heritage-icon { display:flex; align-items:center; justify-content:center; background:none; border:0; }
.heritage-icon>img { display:block; width:100%; height:100%; object-fit:contain; }
/* Opening illustration and surname culture on the public entrance. */
.portal-hero h1 { font-family:var(--serif); color:#49372c; letter-spacing:3px; }
.portal-hero h1 span { color:#ac4434; }
.portal-art { border-color:#d9bd8e; background:#fffcf5; border-radius:5px 80px 5px 5px; overflow:hidden; }
.portal-art>.portal-cover { height:100%; width:100%; object-fit:cover; object-position:62% center; }
.floating-family { background:#fffdf5ed; border-color:#d5b780; border-radius:5px; }
.portal-hero-copy>p { color:#8a7052; }
.portal-summary { color:#927143; }
.surname-culture-strip { display:grid; grid-template-columns:1fr 1.1fr; gap:35px; align-items:center; margin:12px 0 65px; padding:30px 32px; border-top:1px solid #d8bd8f; border-bottom:1px solid #e7d7bd; background:#fffaf0 url('design/surname-culture/surnames-pattern.webp') center/cover; }
.surname-culture-strip h2 { margin:8px 0 9px; font:500 28px/1.6 var(--serif); color:#5a4230; }
.surname-culture-strip p { color:#907653; font-size:13px; line-height:1.9; }
.surname-stamps { display:grid; grid-template-columns:repeat(8,1fr); gap:9px; }
.surname-stamps>span { display:grid; place-items:center; height:51px; border:1px solid #d2ac81; outline:1px solid #ead8bc; outline-offset:3px; background:#fffdf5d9; color:#a54833; font:27px/1 var(--serif); }
.heritage-statement { background:#fffcf5; border-color:#e2cba7; }
.case-card { border-color:#e2cfb1; }
.case-body h3 { color:#66482e; }
.portal-services { background:#faf3e6; border-color:#e5d0ac; }
.portal-services .heritage-icon { width:63px; height:63px; }
.portal-cta { background:#faf2e3 url('design/surname-culture/invite-banner.webp') right center/cover; border-color:#d5b47a; }
.portal-cta h2 { color:#664a2d; }
/* One family, distinct ancestral halls. Art is separate from actual text. */
.desktop-family-hero { background:#fffbf1; border:1px solid #dfc79e; border-radius:9px 9px 0 0; }
.desktop-family-hero .hero-copy { background:transparent url('design/surname-culture/family-motto.webp') center/cover; }
.desktop-family-hero .hero-copy h2 { color:#63442c; }
.desktop-family-hero .hero-art img { object-position:right center; }
.desktop-family-hero .hero-copy p { color:#98713d; }
.web-mode .stats-grid { border:1px solid #dfc79e; border-top:0; border-radius:0 0 9px 9px; background:#fffbf1; }
.web-mode .stat-card { display:grid; grid-template-columns:34px auto; justify-content:center; column-gap:12px; row-gap:0; padding:15px 8px; }
.web-mode .stat-card .heritage-icon { grid-column:1; grid-row:1/3; align-self:center; width:34px; height:40px; }
.web-mode .stat-card .stat-number { grid-column:2; font:29px/1.3 var(--serif); color:#9e7440; text-align:left; }
.web-mode .stat-card .stat-label { grid-column:2; font-size:11px; text-align:left; color:#9d855e; }
.mini-mode .mobile-family-hero { height:224px; background:#fffcf5; border-color:#dec197; border-radius:9px; box-shadow:0 5px 18px #79572d07; }
.mini-mode .mobile-family-hero>.mobile-cover { inset:0; width:100%; height:100%; object-fit:cover; object-position:right center; z-index:-1; }
.mini-mode .mobile-family-hero:before { background:linear-gradient(90deg,#fffcf5 0%,#fffcf5f0 29%,#fffcf58a 47%,#fffcf500 69%); }
.mini-mode .mobile-family-hero .hero-copy { padding:25px 20px; }
.mini-mode .mobile-family-hero h2 { color:#674629; font:500 30px/1.5 var(--serif); letter-spacing:2px; }
.mini-mode .mobile-family-hero p { max-width:61%; color:#926b3d; font-size:11px; line-height:1.9; }
.mini-mode .mobile-family-hero .hero-tag { color:#aa8250; font-size:10px; }
.mini-mode .mobile-family-hero .hero-tree-link { font-size:11px; color:#a34b34; margin-top:13px; }
.mini-mode .mobile-photo-note { display:none; }
.mini-mode .mobile-welcome { font-size:10px; color:#9c835f; }
.mini-mode .family-counts { padding:14px 0 13px; }
.family-counts strong,.profile-stats strong,.mini-mode .personal-metric strong { color:#a3753d; }
.mini-mode .mobile-shortcuts { gap:10px 5px; padding:13px 0 16px; border-color:#e5d2ae; }
.mini-mode .mobile-shortcut:nth-child(n) .heritage-icon,.mini-mode .mobile-shortcut .heritage-icon>img { width:56px; height:56px; }
.mini-mode .mobile-shortcut { font-size:11px; color:#806346; gap:5px; }
.mini-mode .family-search { background:#f9f1e3; border:1px solid #ecdbbc; color:#a28a64; }
.culture-family-note { display:flex; align-items:center; gap:14px; border:1px solid #e5cfaa; border-radius:7px; padding:15px 16px; margin-top:20px; background:#fffaf1 url('design/surname-culture/family-motto.webp') right center/cover; }
.culture-family-note>div { min-width:0; }
.culture-family-note small { display:block; color:#a58b63; font-size:9px; letter-spacing:2px; }
.culture-family-note h3 { color:#76532f; font:500 19px/1.8 var(--serif); margin:3px 0 0; }
.culture-family-note p { color:#a2865b; font-size:10px; margin:2px 0 0; }
/* Personal identity keeps cultural art in its own clear region. */
.mini-mode .personal-passport { border:1px solid #dabb8d; border-radius:9px; box-shadow:0 4px 15px #9c74340a; }
.mini-mode .personal-passport .profile-card { min-height:131px; padding:21px 17px; background:#fffbf2 url('design/surname-culture/passport-cover.webp') center/cover; border-bottom-color:#e4cfaa; }
.profile-overview .profile-card { background:#fffbf2 url('design/surname-culture/passport-cover.webp') center/cover; }
.mini-mode .personal-passport .profile-card h2 { font:500 25px/1.6 var(--serif); color:#69472b; }
.mini-mode .personal-passport .profile-card .eyebrow { color:#a98250; font-size:10px; letter-spacing:1px; }
.mini-mode .personal-passport .profile-card p { font-size:11px; color:#9b7c53; }
.mini-mode .profile-card-action { width:30px; height:30px; border:1px solid #c7a16a; border-radius:50%; background:#fffdf5e8; color:#ac7842; }
.mini-mode .personal-passport .personal-metrics { background:#fffefa; padding:13px 0; }
.mini-mode .profile-menu-row { min-height:62px; gap:10px; }
.mini-mode .personal-group>h2 { color:#9f8054; font-size:11px; letter-spacing:2px; }
.mini-mode .profile-menu-label { color:#77573a; }
.mini-mode .personal-menu { background:#fffefc; border-color:#e5d3b5; }
.mini-mode .person-hero.person-hero-mini { background:#fffbf2; border-color:#d9b987; border-radius:9px; }
.mini-mode .person-hero-mini .person-cover-topline { box-sizing:border-box; height:42px; min-height:42px; border-bottom:1px solid #eee0c8; padding-bottom:9px; }
.mini-mode .person-hero-mini .person-cover-main { margin-top:11px; }
.mini-mode .person-hero-mini .person-identity h1 { font-family:var(--serif); color:#65452c; }
.mini-mode .person-hero-mini .person-cover-art img { width:61px; height:68px; }
.mini-mode .person-hero-mini .person-cover-kicker { color:#a2804f; }
.mini-mode .person-hero-mini .person-edit { background:#ac4434; border-color:#b3804f; }
.mini-mode .person-hero-mini .person-cover-main>.portrait { border-radius:9px; background:#faf0db; color:#a3713e; box-shadow:inset 0 0 0 3px #fffaf1; }
.web-mode .person-hero { background-image:linear-gradient(90deg,#fffbf2 65%,#fffbf200 92%),url('design/surname-culture/passport-cover.webp'); border-color:#d6b77e; }
.web-mode .person-hero-art { display:none; }
.person-tabs { border-color:#e6d2b0; }
.mini-mode .person-columns .panel { border-radius:9px; }
.mini-mode .person-columns .bio-text { font-size:13px; line-height:2; }
.generation-pill { background:#faf0dc; color:#a37c45; border-radius:2px; }
.member-card { border-top:2px solid #d5b37b; }
.member-card-person h3 { color:#65482d; }
.member-card-details strong,.mini-mode .member-card-details strong { color:#927149; }
.member-open { color:#a56d38; }
.member-card-bottom { border-color:#efe1c9; }
.mini-mode .tabbar { background:#fffefa; border-color:#e4cda7; padding-top:3px; }
.mini-mode .tabbar .nav-item { position:relative; gap:2px; color:#9a805c; font-size:10px; padding:4px 0; }
.culture-nav-icon { display:block; width:29px; height:28px; object-fit:contain; opacity:.65; }
.mini-mode .tabbar .nav-item.active { color:#a14732; }
.mini-mode .tabbar .nav-item.active .culture-nav-icon { opacity:1; }
.mini-mode .tabbar .nav-item.active:before { content:''; position:absolute; top:-4px; width:18px; height:2px; background:#a74b34; }
.mini-mode .tabbar .nav-item[href='#add'] .culture-nav-icon { opacity:1; width:34px; height:29px; }
/* Backgrounds and service imagery follow the content instead of filling text. */
.tree-scroll { background:#fffdf8 url('design/surname-culture/tree-backdrop.webp') center/cover; }
.tree-panel:fullscreen .tree-scroll,.tree-panel.is-fullscreen .tree-scroll { background-color:#fffdf8; }
.tree-node { border-color:#d9c197; background:#fffdf7; }
.tree-node strong { color:#735236; }
.scope-tab.active,.chip.active,.mini-mode .scope-tab.active { background:#fbefd9; border-color:#d8b67f; color:#9a5a31; }
.tree-canvas svg line,.tree-canvas svg path { stroke:#c5a46d; }
.map-visual,.mini-mode .map-visual { background:#fffaf1 url('design/surname-culture/migration-map.webp') center/cover; }
.migration-lines path { stroke:#b89158; }
.mini-mode .map-point.active strong { background:#ac7050; }
.media-entry,.mini-mode .media-entry { background:#fff9ee url('design/surname-culture/memory-banner.webp') right center/cover; border-color:#e6d0aa; }
.mini-mode .media-entry strong { color:#81552e; }
.media-entry-icons { visibility:hidden; }
.voice-art { background:#fcf4e6; }
.workshop-link,.mini-mode .workshop-link { background:#fcf5e9; border:1px solid #e7d2ae; border-radius:7px; }
.workshop-link .heritage-icon { width:57px; height:57px; }
.mini-mode .workshop-copy strong { color:#785030; }
.mini-mode .workshop-copy small { color:#a08155; }
.mini-mode .workshop-scene>img { mix-blend-mode:multiply; }
.service-preview>img { background:#fffcf5; }
.personal-invitation,.record-invitation { background:#fff9ee url('design/surname-culture/invite-banner.webp') right center/cover; border-color:#dfc297; }
.personal-invitation>strong,.record-invitation strong { color:#8d6036; }
.mini-mode .editor-form>.form-section-heading:first-child:after { background-image:url('design/surname-culture/recording-vignette.webp'); }
.add-guide>img { background:#fffcf5; }
.personal-empty img,.empty img,.media-empty img { filter:none; }
.preview-intro { position:relative; }
.preview-intro:after { content:''; display:block; width:100%; height:125px; margin-top:28px; background:url('design/surname-culture/portal-cover.webp') right bottom/cover; border-bottom:1px solid #d8ba86; }
.preview-intro h1 { font-family:var(--serif); color:#65472f; }
.design-end-note,.page-end { background:url('design/surname-culture/cultural-border.webp') center bottom/cover; color:#b0966c; }
.demo-craft-grid>div { background:#fffcf5; }
.demo-icon-preview { background:#fff9ee; }
.library-intro { background:url('design/surname-culture/surnames-pattern.webp') center/cover; border-bottom:1px solid #debf8b; }
@media(max-width:900px) {
  .surname-culture-strip { grid-template-columns:1fr; gap:21px; padding:23px; }
  .surname-stamps { gap:9px; }
}
@media(max-width:700px) {
  .surname-culture-strip { margin-bottom:35px; padding:24px 17px; }
  .surname-culture-strip h2 { font-size:23px; }
  .surname-stamps { grid-template-columns:repeat(8,minmax(0,1fr)); gap:8px; }
  .surname-stamps>span { height:38px; font-size:22px; }
  .web-mode .stat-card { grid-template-columns:auto; gap:0; }
  .web-mode .stat-card .heritage-icon { display:none; }
  .web-mode .stat-card .stat-number,.web-mode .stat-card .stat-label { grid-column:1; text-align:center; }
}
@media(max-width:374px) {
  .mini-mode .mobile-family-hero { height:209px; }
  .mini-mode .mobile-family-hero .hero-copy { padding:22px 16px; }
  .mini-mode .mobile-family-hero h2 { font-size:27px; }
  .mini-mode .mobile-shortcut:nth-child(n) .heritage-icon,.mini-mode .mobile-shortcut .heritage-icon>img { width:48px; height:48px; }
  .mini-mode .mobile-shortcut { font-size:10px; }
  .mini-mode .personal-passport .profile-card { padding:19px 14px; min-height:124px; }
  .mini-mode .personal-passport .profile-card h2 { font-size:23px; }
  .culture-family-note { padding:13px; gap:10px; }
  .culture-family-note h3 { font-size:17px; }
  .culture-surname-seal { width:42px; height:47px; font-size:28px; }
}
@media(prefers-reduced-motion:reduce) { .culture-nav-icon { transition:none; } }

/* Route scenery: scrolls with the page and sits below every real control. */
.mini-mode .content { background-color:#fffbf1; }
.mini-mode .view-shell { position:relative; isolation:isolate; padding-bottom:30px; }
.mini-mode .view-shell>.mini-page-scenery {
  position:absolute; z-index:-1; pointer-events:none; user-select:none;
  inset:-20px -18px -28px; width:auto; max-width:none; margin:0; overflow:hidden;
  background:linear-gradient(180deg,#fcf3e3 0,#fffcf6 350px,#fffaf0 100%);
}
.mini-page-scenery>img { position:absolute; display:block; width:100%; height:auto; object-fit:cover; pointer-events:none; }
.mini-page-scenery>.ambient-head { top:0; right:0; height:265px; object-position:right top; }
.mini-page-scenery>.ambient-tail { bottom:0; left:0; height:230px; object-position:right bottom; }
.mini-page-scenery>.ambient-surname { display:none; }
.mini-mode #content[data-page=members] .ambient-surname,
.mini-mode #content[data-page=profile] .ambient-surname {
  position:absolute; display:grid; place-items:center; top:28px; right:26px;
  height:88px; width:78px; border:2px solid #b98b55; outline:1px solid #b98b55;
  outline-offset:5px; color:#a6653d; opacity:.14; font:62px/1 var(--serif);
}
.mini-mode #content[data-page=profile] .ambient-head { height:230px; }
.mini-mode #content[data-page=person] .ambient-head { height:255px; }
.mini-mode #content[data-page=overview] .ambient-head { height:200px; opacity:.8; }
.mini-mode #content[data-page=journey] .ambient-head { height:295px; }
.mini-mode .page-head { border-bottom:1px solid #d9bd8d; box-shadow:0 1px 0 #fffef9; }
.mini-mode .page-head>div:first-child { position:relative; z-index:1; }
.mini-mode .page-head .page-actions { position:relative; z-index:1; }
.mini-mode .personal-group>h2 { display:flex; align-items:center; gap:8px; }
.mini-mode .personal-group>h2:after { content:''; display:block; width:44px; height:1px; background:#dac39a; }
.mini-mode :is(.member-card,.personal-menu,.personal-options,.editor-panel,.info-panel,.bio-panel) {
  background-color:#fffefa;
  box-shadow:0 3px 10px #8b683808;
}
.mini-mode .app-header { background-image:linear-gradient(90deg,#fffefbf0,#fffefbf6),url('design/surname-culture/surnames-pattern.webp'); background-size:100% 100%,360px auto; }
.mini-mode .tabbar { box-shadow:0 -4px 18px #a17a2d08; }
@media(max-width:360px) {
 .mini-mode .view-shell>.mini-page-scenery { inset:-18px -12px -26px; }
 .mini-page-scenery>.ambient-head { height:245px; }
 .mini-page-scenery>.ambient-tail { height:210px; }
 .mini-mode #content[data-page=members] .ambient-surname,
 .mini-mode #content[data-page=profile] .ambient-surname { right:19px; width:65px; height:75px; font-size:52px; }
}
