/* GENERATED by tests/build_ui_foundation.cjs. Edit the named source, not this bundle. */

/* SOURCE: ui-tokens.css */
/* UI Baseline V1 · 5c56119. Only explicit v1 document roots receive tokens.
   Token names are semantic, not role- or page-specific. No element restyling. */
:root:where([data-ui="v1"]){
 --ui-page:#f7f4ee;
 --ui-surface:#fffefb;
 --ui-ink:#302d29;
 --ui-muted:#726a63;
 --ui-label:#766b62;
 --ui-accent:#ad4034;
 --ui-accent-soft:#f9ebe5;
 --ui-link:#973b31;
 --ui-line:#e7dfd5;
 --ui-control-line:#e1d7cd;
 --ui-field-line:#dfd6cc;
 --ui-relation-surface:#fffaf5;
 --ui-success:#346246;
 --ui-success-surface:#eaf3ed;
 --ui-radius-control:10px;
 --ui-radius-card:16px;
 --ui-radius-sheet:18px;
 --ui-touch:44px;
 --ui-gap:8px;
 --ui-page-gutter:16px;
 --ui-font-reading:system-ui,"Microsoft YaHei",sans-serif;
 --ui-font-heading:"Songti SC","SimSun",serif;
}


/* SOURCE: ui-shell.css */
/* UI Baseline V1 extracted shell. Explicit opt-in html[data-ui="v1"].
   No role selectors. Page-specific layout remains in legacy adapters. */
:where(html[data-ui="v1"]) .mobile-header,:where(html[data-ui="v1"]) .mobile-nav{display:none}
:where(html[data-ui="v1"]) body>.sidebar{overflow-y:auto}
@media(max-width:760px){
 html:where([data-ui="v1"]){scroll-padding-bottom:calc(var(--mobile-bottom) + 16px)}
 :where(html[data-ui="v1"]) body{font-size:16px;overflow-wrap:anywhere;padding-bottom:var(--mobile-bottom)}
 :where(html[data-ui="v1"]) body>.sidebar,:where(html[data-ui="v1"]) body>header.topbar{display:none!important}
 :where(html[data-ui="v1"]) .mobile-nav a,:where(html[data-ui="v1"]) .mobile-nav button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2px;min-height:52px;background:transparent;border:0;border-radius:8px;text-decoration:none;color:#657263;font-size:12px;padding:4px;line-height:1.5}
 :where(html[data-ui="v1"]) .mobile-nav .active{color:#254e39;background:#eaf0e3;font-weight:600}
 :where(html[data-ui="v1"]) .page-heading .eyebrow,:where(html[data-ui="v1"]) .page-heading #page-description,:where(html[data-ui="v1"]) .page-heading .local-label{display:none}
 html:where([data-ui="v1"]),:where(html[data-ui="v1"]) body{background:var(--ui-page)!important;color:var(--ui-ink);font-family:"PingFang SC","Microsoft YaHei UI",system-ui,sans-serif;color-scheme:light}
 :where(html[data-ui="v1"]) .mobile-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-top:max(12px,env(safe-area-inset-top));background:var(--ui-page);color:var(--ui-ink);border:0;padding:14px 18px;min-height:56px}
 :where(html[data-ui="v1"]) .mobile-header span{font-size:13px;color:var(--ui-muted)}
 :where(html[data-ui="v1"]) .mobile-header a{color:inherit;text-decoration:none;min-height:32px;display:flex;align-items:center;font-size:18px;font-weight:600;letter-spacing:1px}
 :where(html[data-ui="v1"]) .mobile-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));position:fixed;bottom:0;left:0;right:0;z-index:40;padding:4px 8px max(4px,env(safe-area-inset-bottom));min-height:var(--mobile-bottom);background:var(--ui-surface);border-top:1px solid var(--ui-line)}
 :where(html[data-ui="v1"]) .mobile-nav a{color:#746e68;font-size:12px}
 :where(html[data-ui="v1"]) .mobile-nav a.active{color:var(--ui-accent);background:transparent}
 :where(html[data-ui="v1"]) .mobile-nav .active::after{content:'';width:16px;height:3px;background:var(--ui-accent);border-radius:2px;position:absolute;bottom:max(5px,env(safe-area-inset-bottom))}
 :where(html[data-ui="v1"]) .mobile-nav svg{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;width:25px;height:25px}
 :where(html[data-ui="v1"]) body>main:not(.home-shell),:where(html[data-ui="v1"]) body>main.home-shell{margin:0;width:auto;min-width:0;padding:8px 16px 28px}
 :where(html[data-ui="v1"]) .page-heading{margin:8px 0 18px}
 :where(html[data-ui="v1"]) .page-heading h1{font:600 24px/1.4 "Microsoft YaHei UI",sans-serif;margin:0;color:var(--ui-ink);font-size:28px;font-weight:650}
}
@media(prefers-reduced-motion:reduce){
 html:where([data-ui="v1"]){scroll-behavior:auto}
}
:where(html[data-ui="v1"][data-role-ready="false"]) .admin-only{display:none!important}


/* SOURCE: ui-controls.css */
/* UI Baseline V1 extracted controls. Explicit opt-in html[data-ui="v1"].
   No role selectors. Page-specific layout remains in legacy adapters. */
:where(html[data-ui="v1"]) dialog.m-editor{margin:auto;width:min(960px,calc(100% - 32px));max-height:calc(100dvh - 40px);overflow:auto;border:1px solid var(--ui-line);border-radius:16px;padding:28px;overscroll-behavior:contain}
:where(html[data-ui="v1"]) dialog.m-editor>.m-section-title{position:sticky;top:-28px;background:var(--ui-surface);z-index:2;margin-top:0;padding:12px 0}
@media(max-width:760px){:root:where([data-ui="v1"]){--mobile-bottom:calc(64px + env(safe-area-inset-bottom,0px))}}

@media(max-width:760px){
 :where(html[data-ui="v1"]) #global-status{font-size:13px;margin:0 0 12px}
 :where(html[data-ui="v1"]) #global-status:empty{display:none}
 :where(html[data-ui="v1"]) .workspace,:where(html[data-ui="v1"]) .profile-page,:where(html[data-ui="v1"]) .workflow-card,:where(html[data-ui="v1"]) .relation-card,:where(html[data-ui="v1"]) .data-card,:where(html[data-ui="v1"]) .atlas-search-module{padding:16px;margin-bottom:16px}
 :where(html[data-ui="v1"]) body input:not([type=checkbox]):not([type=radio]):not([type=range]),:where(html[data-ui="v1"]) body select,:where(html[data-ui="v1"]) body textarea{font-size:16px;max-width:100%;min-width:0}
 :where(html[data-ui="v1"]) body dialog{width:calc(100% - 16px);max-width:600px;max-height:calc(100dvh - 24px);padding:18px;overflow:auto;overscroll-behavior:contain}
 :where(html[data-ui="v1"]) body dialog.m-editor{padding:18px!important;width:calc(100% - 16px)!important;max-height:calc(100dvh - 24px)!important}
 :where(html[data-ui="v1"]) dialog .m-section-title{position:sticky;top:-18px;background:#fffefa;z-index:2;padding:10px 0;align-items:center;gap:10px}
 :where(html[data-ui="v1"]) dialog .m-section-title h2{font-size:20px;line-height:1.5;margin:0}
 :where(html[data-ui="v1"]) dialog .m-section-title .eyebrow{display:none}
 :where(html[data-ui="v1"]) dialog .m-section-title button{flex-shrink:0;white-space:nowrap;padding:8px 12px}
 :where(html[data-ui="v1"]) .dialog-head{position:sticky;top:-18px;background:#fff;z-index:2;padding-top:12px}
 :where(html[data-ui="v1"]) .dialog-actions{gap:10px;padding-bottom:env(safe-area-inset-bottom,0px)}
 :root:where([data-ui="v1"]){color-scheme:light;--ink:var(--ui-ink);--muted:var(--ui-muted);--paper:var(--ui-page);--surface:var(--ui-surface);--line:var(--ui-line);--blue:var(--ui-accent);--blue-2:#91372d;--amber:var(--ui-accent);--amber-soft:var(--ui-accent-soft);--shadow:0 4px 20px #543b2410}
 :where(html[data-ui="v1"]) body button,:where(html[data-ui="v1"]) body .primary,:where(html[data-ui="v1"]) body .secondary,:where(html[data-ui="v1"]) body .file-button{min-height:44px;font-size:15px;line-height:1.5;border-radius:10px;border-color:var(--ui-control-line);background:var(--ui-surface);color:var(--ui-link);box-shadow:none}
 :where(html[data-ui="v1"]) body button.primary,:where(html[data-ui="v1"]) body .primary{background:var(--ui-accent)!important;color:#fff!important;border-color:var(--ui-accent)}
 :where(html[data-ui="v1"]) body button:disabled{opacity:.5;cursor:not-allowed}
 :where(html[data-ui="v1"]) body input,:where(html[data-ui="v1"]) body select,:where(html[data-ui="v1"]) body textarea{border-color:var(--ui-field-line)!important;background:var(--ui-surface);color:var(--ui-ink);border-radius:10px}
 :where(html[data-ui="v1"]) body :focus-visible{outline:2px solid var(--ui-accent);outline-offset:3px}
 :where(html[data-ui="v1"]) body input[type=checkbox],:where(html[data-ui="v1"]) body input[type=radio]{width:20px;height:20px;flex-shrink:0;accent-color:var(--ui-accent)}
 :where(html[data-ui="v1"]) body a{color:var(--ui-link)}
 :where(html[data-ui="v1"]) .muted,:where(html[data-ui="v1"]) .quiet,:where(html[data-ui="v1"]) .community-page .muted{color:var(--ui-muted)}
 :where(html[data-ui="v1"]) .workspace,:where(html[data-ui="v1"]) .profile-page,:where(html[data-ui="v1"]) .workflow-card,:where(html[data-ui="v1"]) .relation-card,:where(html[data-ui="v1"]) .data-card,:where(html[data-ui="v1"]) .community-page,:where(html[data-ui="v1"]) .atlas-search-module{border-color:var(--ui-line);background:var(--ui-surface);border-radius:16px;box-shadow:none}
}


/* SOURCE: ui-primitives.css */
/* Explicit component API, copied from Baseline V1 computed styles.
   No bare element selectors; these classes never opt another page in implicitly.
   Existing relation classes are the first migrated consumers. Other ui-* classes
   are opt-in for later batches, not a claim that every page is migrated. */
:where(html[data-ui="v1"]) .ui-button,
:where(html[data-ui="v1"]) .ui-button--relation,
:where(html[data-ui="v1"]) .profile-navigation button,
:where(html[data-ui="v1"]) .profile-relative{min-height:var(--ui-touch);font:inherit;cursor:pointer;border:1px solid var(--ui-line);border-radius:var(--ui-radius-control);background:var(--ui-relation-surface);color:var(--ui-link);padding:10px 14px}
:where(html[data-ui="v1"]) .ui-button--primary{background:var(--ui-accent);color:#fff;border-color:var(--ui-accent);font-weight:700}
:where(html[data-ui="v1"]) .ui-button:disabled{opacity:.5;cursor:not-allowed}
:where(html[data-ui="v1"]) .ui-card{background:#fffefa;border:1px solid #e0e3d9;border-radius:14px;padding:26px;box-shadow:0 5px 20px #2b403008;min-width:0}
:where(html[data-ui="v1"]) .ui-field{box-sizing:border-box;font-family:inherit;font-size:14px;color:#314b3a;background:#fff;border:1px solid #d8dfd0;border-radius:8px;padding:11px 13px;min-height:var(--ui-touch);max-width:100%;min-width:0}
:where(html[data-ui="v1"]) .ui-tag{display:inline-flex;margin:0 0 12px;padding:4px 9px;border-radius:999px;background:var(--ui-success-surface);color:var(--ui-success);font-size:13px;font-weight:700}
:where(html[data-ui="v1"]) .ui-tag--unknown{background:#eef0f4;color:#5d6675}
:where(html[data-ui="v1"]) .ui-tag--deceased{background:#ece9e4;color:#685f55}
:where(html[data-ui="v1"]) .ui-empty{font-size:14px;color:#889180;padding:14px 0;line-height:1.9}
:where(html[data-ui="v1"]) .ui-loading{color:var(--ui-muted);font-size:12px;line-height:1.8}
:where(html[data-ui="v1"]) .ui-status{grid-column:1/-1;font-size:11px;color:#7d8c74;min-height:0}
:where(html[data-ui="v1"]) .ui-status:empty{display:none}
:where(html[data-ui="v1"]) .ui-status--error{background:#fff0e8;color:#a24b2e;padding:12px;border-radius:8px}
:where(html[data-ui="v1"]) .ui-dialog{border:0;border-radius:16px;max-width:900px;width:calc(100vw - 80px);box-shadow:0 30px 100px #1c382744}
:where(html[data-ui="v1"]) .ui-dialog::backdrop{background:#142c2466;backdrop-filter:blur(3px)}
:where(html[data-ui="v1"]) .ui-button:focus-visible,:where(html[data-ui="v1"]) .ui-field:focus-visible{outline:2px solid var(--ui-accent);outline-offset:3px}
@media(max-width:760px){
 :where(html[data-ui="v1"]) .ui-card{background:var(--ui-surface);border-color:var(--ui-line);border-radius:var(--ui-radius-card);padding:var(--ui-page-gutter);box-shadow:none}
 :where(html[data-ui="v1"]) .ui-field{font-size:16px;color:var(--ui-ink);background:var(--ui-surface);border-color:var(--ui-field-line);border-radius:var(--ui-radius-control)}
 :where(html[data-ui="v1"]) .ui-status{font-size:13px;margin:0 0 12px}
 :where(html[data-ui="v1"]) .ui-dialog{width:calc(100% - 16px);max-width:600px;max-height:calc(100dvh - 24px);padding:18px;overflow:auto;overscroll-behavior:contain}
}


/* SOURCE: ui-profile.css */
/* Confirmed profile sample layout. Component namespace; loaded only by v1 entry. */

:where(html[data-ui="v1"]) .profile-navigation{display:flex;justify-content:space-between;gap:8px;margin-bottom:16px;order:-2}
:where(html[data-ui="v1"]) .profile-navigation button{white-space:nowrap}
:where(html[data-ui="v1"]) .profile-page{display:flex;flex-direction:column}
:where(html[data-ui="v1"]) .profile-page>.profile-layout{order:-1}
:where(html[data-ui="v1"]) .profile-page>.mobile-profile-tools{margin-top:20px}
:where(html[data-ui="v1"]) .mobile-profile-tools>summary{padding:12px;min-height:44px;cursor:pointer}
:where(html[data-ui="v1"]) .profile-toolbar>label,:where(html[data-ui="v1"]) #profile-find,:where(html[data-ui="v1"]) #m-profile-edit{display:none}
:where(html[data-ui="v1"]) .profile-page>.family-search,:where(html[data-ui="v1"]) .mobile-profile-filters{display:none}
:where(html[data-ui="v1"]) .profile-relatives section{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
:where(html[data-ui="v1"]) .profile-relatives h3{flex-basis:100%;font-size:14px;color:var(--ui-label);margin:0;font-weight:500}
:where(html[data-ui="v1"]) .profile-relative{max-width:100%;overflow-wrap:anywhere;text-align:left}
:where(html[data-ui="v1"]) .profile-privacy-disclosure{min-width:0;border:1px solid var(--ui-line);border-radius:12px;padding:12px;align-self:start}
:where(html[data-ui="v1"]) .profile-privacy-disclosure>summary{min-height:44px;padding:10px;font-size:16px;cursor:pointer}
@media(max-width:760px){
:where(html[data-ui="v1"]) .profile-page{display:flex;flex-direction:column;padding:16px;font-family:system-ui,"Microsoft YaHei",sans-serif;font-size:16px;line-height:1.6}
:where(html[data-ui="v1"]) .profile-page>.profile-layout{order:-1;display:block}
:where(html[data-ui="v1"]) .profile-page>.mobile-profile-tools{margin-block:16px}
:where(html[data-ui="v1"]) .mobile-profile-tools>summary{padding:12px;min-height:44px;cursor:pointer}
:where(html[data-ui="v1"]) .profile-page #detail-content{padding:0}
:where(html[data-ui="v1"]) .profile-page #detail-title{font-family:inherit;font-size:26px;margin:12px 0 4px;line-height:1.3;overflow-wrap:anywhere}
:where(html[data-ui="v1"]) .profile-page .avatar{width:48px;height:48px;font-size:22px;background:#f5e6df;color:var(--ui-link)}
:where(html[data-ui="v1"]) .profile-page .detail-meta{font-size:15px;line-height:1.6;margin:0 0 12px}
:where(html[data-ui="v1"]) .profile-page .fact-group{font-size:18px;color:var(--ui-ink);margin-top:24px;padding:0 0 8px}
:where(html[data-ui="v1"]) .profile-page .fact{padding:12px 0;font-size:16px}
:where(html[data-ui="v1"]) .profile-page .fact>span{font-size:14px;color:var(--ui-label)}
:where(html[data-ui="v1"]) .profile-page .fact>div{font-size:16px;line-height:1.7;overflow-wrap:anywhere}
:where(html[data-ui="v1"]) .profile-page .profile-privacy-disclosure{margin-top:24px}
:where(html[data-ui="v1"]) .profile-page #privacy-panel{margin:0;padding:8px 0;background:transparent;border:0}
:where(html[data-ui="v1"]) body[data-mobile-page=profile] .mobile-secondary{display:none}
}
@media(max-width:360px){:where(html[data-ui="v1"]) .profile-navigation{display:grid;grid-template-columns:1fr 1fr}:where(html[data-ui="v1"]) .profile-navigation button:last-child{grid-column:1/-1}}


/* SOURCE: ui-sheet.css */
/* UI Baseline V1 extracted sheet. Explicit opt-in html[data-ui="v1"].
   No role selectors. Page-specific layout remains in legacy adapters. */
@media(max-width:760px){:where(html[data-ui="v1"]) body aside.detail[data-page=tree]{display:none}}

@media(max-width:760px){
 :where(html[data-ui="v1"]) .detail .detail-head{position:sticky;top:0;padding:12px 0;background:#fffefa;display:flex;align-items:center;z-index:1}
 :where(html[data-ui="v1"]) .detail .detail-head .quiet{display:none}
 :where(html[data-ui="v1"]) .detail .brief-avatar,:where(html[data-ui="v1"]) .detail .brief-hint{display:none}
 :where(html[data-ui="v1"]) #brief-content h2{font-size:23px;margin:12px 0 4px}
 :where(html[data-ui="v1"]) .brief-relations{padding:8px 0;font-size:14px;line-height:1.8}
 :where(html[data-ui="v1"]) .detail #brief-content p{margin:6px 0}
 :where(html[data-ui="v1"]) .detail .family-kinship{margin-top:8px;padding-top:8px}
 :where(html[data-ui="v1"]) .detail .family-kinship h3{font-size:14px;margin:0}
 :where(html[data-ui="v1"]) .detail .family-kinship>p:first-of-type{font-size:19px}
 :where(html[data-ui="v1"]) .detail .presentation-settings{margin-top:10px}
 :where(html[data-ui="v1"]) .detail #open-profile{position:sticky;bottom:0;margin:8px 0 0;width:100%;min-height:46px}
 :where(html[data-ui="v1"]) .detail .detail-head,:where(html[data-ui="v1"]) .detail #open-profile{background:var(--ui-surface)}
 :where(html[data-ui="v1"]) .mobile-brief-close{display:block;margin-left:auto;min-height:44px;border:1px solid #d7e0d1;padding:8px 14px;color:var(--ui-link);background:var(--ui-accent-soft)}
 :where(html[data-ui="v1"]) body.mobile-brief-open aside.detail[data-page=tree]:not([hidden]){position:fixed;top:auto;left:0;right:0;z-index:35;margin:0;padding:0 16px 12px;border-radius:18px 18px 0 0;overscroll-behavior:contain;display:flex;flex-direction:column;background:var(--ui-surface);height:52dvh;max-height:calc(100dvh - var(--mobile-bottom) - 56px);bottom:var(--mobile-bottom);overflow:hidden;border:1px solid var(--ui-line);box-shadow:0 -8px 30px #543b2420;padding-bottom:8px}
 :where(html[data-ui="v1"]) aside.detail .detail-head{position:static;flex:none}
 :where(html[data-ui="v1"]) aside.detail #brief-content{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-bottom:16px}
 :where(html[data-ui="v1"]) aside.detail .brief-actions{flex:none;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);gap:8px;padding-top:8px;border-top:1px solid var(--ui-line);background:var(--ui-surface)}
 :where(html[data-ui="v1"]) aside.detail .brief-actions #open-profile,:where(html[data-ui="v1"]) aside.detail .brief-actions .mobile-tree-recenter{position:static;margin:0;min-height:48px;font-size:14px;white-space:normal}
 :where(html[data-ui="v1"]) aside.detail .brief-actions .mobile-tree-recenter{background:var(--ui-surface);color:var(--ui-link)}
 :where(html[data-ui="v1"]) aside.detail .brief-relations,:where(html[data-ui="v1"]) aside.detail .family-kinship,:where(html[data-ui="v1"]) aside.detail .presentation-settings{display:none}
}
:where(html[data-ui="v1"]) dialog.contact-workflow-dialog{box-sizing:border-box;padding:12px;width:min(900px,calc(100% - 16px));height:calc(100dvh - 24px);max-height:calc(100dvh - 24px);overflow:hidden;background:var(--ui-surface)}
:where(html[data-ui="v1"]) .contact-workflow-dialog[open]{display:flex;flex-direction:column;gap:8px}
:where(html[data-ui="v1"]) .contact-workflow-dialog>button{align-self:flex-start;flex-shrink:0}
:where(html[data-ui="v1"]) .contact-workflow-dialog>iframe{display:block;flex:1;min-height:0;width:100%;border:0}
