.mobile-search-toggle,.mobile-search-cancel{display:none}
body.mobile-layout>header,body.mobile-layout.top-collapsed>header{height:112px;min-height:112px;flex:0 0 112px;grid-template-columns:40px minmax(0,1fr) 40px 62px;grid-template-rows:52px 44px;gap:4px;padding:8px 10px 4px}
body.mobile-layout>header .mobile-filter-button,body.mobile-layout>header .mobile-search-toggle{display:grid;place-items:center;width:40px;height:44px;padding:9px;border:0;background:transparent;margin:0;grid-row:1}
body.mobile-layout>header .mobile-filter-button{grid-column:1}
body.mobile-layout>header .mobile-search-toggle{grid-column:3}
body.mobile-layout>header .mobile-filter-button svg,body.mobile-layout>header .mobile-search-toggle svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7}
body.mobile-layout>header .brand{grid-column:2;grid-row:1;gap:6px;min-width:0}
body.mobile-layout>header .brand .symbol{width:34px;height:34px;min-width:34px;flex-basis:34px;padding:0}
body.mobile-layout>header .brand .symbol img{width:57px;height:57px;left:-11.5px;top:-11px}
body.mobile-layout>header .brand-zh{font-size:18px;letter-spacing:1px}
body.mobile-layout>header .brand-en{font-size:6px;letter-spacing:.65px;word-spacing:0}
body.mobile-layout>header .culture-region{grid-column:4;grid-row:1;width:62px;min-width:0;margin:0}
body.mobile-layout>header .culture-region select{font-size:15px;width:62px;min-height:44px;padding-left:2px}
body.mobile-layout>header .culture-fields{grid-column:1/-1;grid-row:2;height:44px;gap:4px}
body.mobile-layout>header .culture-fields [data-culture-field]{font-size:16px;width:auto;min-width:52px;padding:0 12px;height:44px}
body.mobile-layout>header .count-search{display:none}
body.mobile-layout .workspace .selection-bar{display:none!important}
body.mobile-layout .workspace{padding-top:6px}
body.mobile-layout .workspace .views{margin-top:0;margin-bottom:4px;padding-top:0}
body.mobile-layout .workspace .views button{font-size:16px;min-height:44px;padding:8px 12px}
body.mobile-layout .culture-context{font-size:14px;margin:4px 0 8px}
body.mobile-layout .graph-switch button,body.mobile-layout .graph-expand{font-size:14px;min-height:40px}
body.mobile-layout #reader.person-reader{--note-body:17px;--note-title:23px;--note-meta:14px}
body.mobile-layout #reader-body .profile-entry p,body.mobile-layout #reader-body>p{font-size:17px;line-height:1.85}
body.mobile-layout #reader-body .profile-entry h4{font-size:19px}
body.mobile-layout.mobile-search-open>header{height:64px;min-height:64px;flex-basis:64px;grid-template-columns:minmax(0,1fr) 48px;grid-template-rows:48px;position:relative;z-index:80;background:#fff}
body.mobile-layout.mobile-search-open>header .brand,body.mobile-layout.mobile-search-open>header .culture-region,body.mobile-layout.mobile-search-open>header .culture-fields,body.mobile-layout.mobile-search-open>header .mobile-filter-button,body.mobile-layout.mobile-search-open>header .mobile-search-toggle{display:none}
body.mobile-layout.mobile-search-open>header .count-search{display:flex;grid-row:1;grid-column:1;width:100%}
body.mobile-layout.mobile-search-open>header .atlas-counter{display:none}
body.mobile-layout.mobile-search-open>header .search{height:44px;min-height:44px;padding:8px 12px}
body.mobile-layout.mobile-search-open>header .search input{font-size:16px}
body.mobile-layout.mobile-search-open>header .mobile-search-cancel{display:block;grid-row:1;grid-column:2;border:0;background:none;padding:4px;font-size:16px;min-height:44px}
body.mobile-layout.mobile-search-open .app{visibility:hidden}
body.mobile-layout.mobile-search-open .global-search-results{position:fixed;top:64px;bottom:0;left:0;right:0;width:100%;max-height:none;margin:0;padding:16px;border:0;border-radius:0;box-shadow:none;background:#fff;overflow:auto;overscroll-behavior:contain}
body.mobile-layout .search-result strong{font-size:18px}body.mobile-layout .search-result span{font-size:14px}body.mobile-layout .search-result small{font-size:14px;line-height:1.7}
@media(max-width:359px){body.mobile-layout>header .brand .symbol{display:none}}

/* Expanded search matches the back-arrow-and-field mobile pattern. */
body.mobile-layout.mobile-search-open>header{grid-template-columns:40px minmax(0,1fr)}
body.mobile-layout.mobile-search-open>header .count-search{grid-column:2}
body.mobile-layout.mobile-search-open>header .mobile-search-cancel{grid-column:1;display:grid;place-items:center}
body.mobile-layout.mobile-search-open>header .mobile-search-cancel svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8}
body.mobile-layout.mobile-search-open>header .search{border-radius:3px}
/* Mobile directory: compact, equal-sized cards and pagination beside era titles. */
body.mobile-layout.mobile-search-open>header .search:focus-within,body.mobile-layout.mobile-search-open>header .search input:focus{outline:none;box-shadow:none;border-color:transparent}
body.mobile-layout .era-group{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:8px;margin-bottom:24px;align-items:start}
body.mobile-layout .era-group>*{grid-column:1/-1;min-width:0}
body.mobile-layout .era-group>h3{grid-column:1;grid-row:1;font-size:21px;line-height:1.4;margin:0;padding:0 0 10px;border:0}
body.mobile-layout .era-group>h3 small{display:block;font-size:13px;line-height:1.6;margin:3px 0 0}
body.mobile-layout .era-group>.reading-pages{grid-column:2;grid-row:1;margin:0;align-self:center;gap:5px}
body.mobile-layout .era-group>.reading-pages button{width:28px;min-width:28px;min-height:32px;padding:2px;font-size:18px}
body.mobile-layout .era-group>.reading-pages span{font-size:13px;white-space:nowrap}
body.mobile-layout .era-group>.people-group{padding:12px 0;border-top:1px solid #ddd}
body.mobile-layout .people-group>summary{font-size:17px;line-height:1.5}
body.mobile-layout .branch-intro{margin:8px 0;font-size:14px}
body.mobile-layout .workspace .cards{gap:8px;margin-top:8px}
body.mobile-layout .workspace .person-card{height:140px;min-height:140px;max-height:140px;padding:12px;overflow:hidden;align-content:start}
body.mobile-layout .workspace .person-card img{width:38px;height:48px;margin:0 0 4px 8px}
body.mobile-layout .workspace .person-card h3{font-size:18px;line-height:1.35;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body.mobile-layout .workspace .person-card .english{font-size:13px;line-height:1.4;margin:4px 0 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.mobile-layout .workspace .person-card .tag{font-size:12px;margin:0 4px 0 0;padding:2px 5px}
body.mobile-layout .workspace .person-card .branch-text{font-size:13px;line-height:1.4;margin:7px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.mobile-layout .filters .sidebar-all-domains{display:block;border-top:0;border-bottom:1px solid #ddd;padding:8px 0 14px;margin:0 0 8px}
body.mobile-layout .filters .sidebar-all-domains .check{display:flex;width:100%;min-height:40px;margin:0;font-size:16px;align-items:center;gap:12px}
/* Mobile hierarchy: quiet controls, clear content, consistent compact heights. */
body.mobile-layout #reader .reader-tools #close{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;margin-left:auto;flex-shrink:0}
body.mobile-layout .reader-tools{height:48px;min-height:48px;padding:2px 12px}
body.mobile-layout .reader-tools button{font-size:15px;min-height:40px}
body.mobile-layout #reader .profile-tabs{top:48px;padding:4px 0;gap:2px}
body.mobile-layout #reader .profile-tabs button{font-size:15px;height:40px;min-height:40px;padding:6px 10px}
body.mobile-layout.mobile-filters-open .filters{width:min(80vw,300px);padding:12px 16px max(20px,env(safe-area-inset-bottom))}
body.mobile-layout .filters .filter-title{top:-12px;height:44px;min-height:44px;padding:0;margin-bottom:8px}
body.mobile-layout .filters .filter-title h1{font-size:18px;font-weight:500}
body.mobile-layout .filters .mobile-filter-done{display:grid;place-items:center;flex:none;width:20px;min-width:20px;height:40px;min-height:40px;padding:0;border:0;background:transparent}
body.mobile-layout .filters .mobile-filter-done span{display:block;width:6px;height:6px;font-size:0;background:currentColor;clip-path:polygon(100% 0,0 50%,100% 100%)}
body.mobile-layout .filters .domain summary{font-size:15px;min-height:34px}
body.mobile-layout .filters .sidebar-all-domains{padding:2px 0 8px;margin-bottom:4px}
body.mobile-layout .filters .sidebar-all-domains .check{font-size:15px}
body.mobile-layout>header:not(:has(.count-search:focus-within)){row-gap:2px}
body.mobile-layout:not(.mobile-search-open)>header{height:104px;min-height:104px;flex-basis:104px;grid-template-rows:48px 40px}
body.mobile-layout>header .culture-fields{height:40px}
body.mobile-layout>header .culture-fields [data-culture-field]{font-size:15px;height:40px;padding:0 10px}
body.mobile-layout .workspace .views button{font-size:15px;height:40px;min-height:40px;padding:6px 10px}
body.mobile-layout .culture-context{font-size:13px;margin:2px 0 6px}
body.mobile-layout .period-nav{margin-top:4px;margin-bottom:8px}
body.mobile-layout .period-track button{font-size:14px;height:48px;min-height:48px;padding:5px 10px}
body.mobile-layout .period-track button small,body.mobile-layout .period-track button span{font-size:12px}
body.mobile-layout .period-nav .back-to-top{height:48px;min-height:48px;max-height:48px}
body.mobile-layout .graph-switch button,body.mobile-layout .graph-expand{font-size:14px;height:36px;min-height:36px;padding:5px 9px}
body.mobile-layout .era-group>h3{font-size:20px;padding-bottom:8px}
body.mobile-layout .people-group>summary{font-size:16px;font-weight:500}
body.mobile-layout .people-group summary small{font-size:12px}
body.mobile-layout .branch-intro{font-size:13px;line-height:1.6;margin:6px 0}
body.mobile-layout .era-group>.people-group{padding:10px 0}
body.mobile-layout .era-group>.reading-pages button{height:32px;min-height:32px}
body.mobile-layout #reader-body .profile-section>h3{font-size:22px;margin-bottom:16px}
body.mobile-layout #reader-body .profile-entry h4{font-size:18px}
body.mobile-layout #reader-body .profile-entry p{font-size:17px;line-height:1.85}
/* Keep navigation subordinate to the reading content. */
body.mobile-layout .culture-context{display:none}
body.mobile-layout .workspace .views{height:40px;min-height:40px;max-height:40px;margin-bottom:4px}
body.mobile-layout .workspace .views button{background:transparent;color:#666;border:0;border-bottom:2px solid transparent}
body.mobile-layout .workspace .views button[aria-selected="true"]{color:#222;border-bottom-color:#333;background:transparent}
body.mobile-layout .period-nav{height:52px;min-height:52px;max-height:52px;padding:2px 0;margin:2px 0 8px}
body.mobile-layout .period-track{height:48px;max-height:48px;gap:6px}
body.mobile-layout .graph-bar{height:38px;min-height:38px}
body.mobile-layout .era-group>h3{font-size:16px;line-height:1.5;padding:2px 0 8px}
body.mobile-layout .era-group>h3 small{display:inline;font-size:12px;margin-left:6px}
body.mobile-layout .workspace .views button[aria-pressed="true"]{color:#222;border-bottom-color:#333;background:transparent}
body.mobile-layout .period-track{scrollbar-width:none}
body.mobile-layout .period-track::-webkit-scrollbar{display:none}
body.mobile-layout .period-track button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;line-height:1.3;max-height:48px}
body.mobile-layout .period-track button span{font-size:14px;line-height:18px}
body.mobile-layout .period-track button small{font-size:12px;line-height:16px;margin:0}
/* Align the all-domain control with the same checkbox/text columns as each row. */
body.mobile-layout .filters .sidebar-all-domains .check{position:relative;padding-left:46px;gap:0}
body.mobile-layout .filters .sidebar-all-domains .check input{position:absolute;left:6px;width:16px;height:16px;margin:0}
/* The full title strip is the mobile close button, including its empty space. */
body.mobile-layout .filters .filter-title .mobile-filter-done{position:absolute;inset:0;width:100%;height:100%;min-height:44px;display:flex;align-items:center;justify-content:flex-end;padding:0 7px}
body.mobile-layout .map-zoom{display:none!important}
/* Mobile field selection uses restrained weight; view navigation keeps its rule. */
body.mobile-layout>header .culture-fields [data-culture-field]{font-weight:400;color:#666}
body.mobile-layout>header .culture-fields [data-culture-field][aria-pressed="true"]{font-weight:600;color:#222;background:transparent}
body.mobile-layout>header .culture-fields [data-culture-field][aria-pressed="true"]::after{display:none}
body.mobile-layout,body.mobile-layout *{-webkit-tap-highlight-color:transparent}
body.mobile-layout :is(button,a,input,select,summary,label){touch-action:manipulation}
/* Mobile masthead: compact bilingual signature with optically balanced tools. */
body.mobile-layout:not(.mobile-search-open)>header{grid-template-columns:36px minmax(0,1fr) 40px 58px;column-gap:4px;padding-left:10px;padding-right:10px}
body.mobile-layout>header .brand{gap:8px;justify-self:start;align-items:center}
body.mobile-layout>header .brand .symbol{display:block;width:32px;height:32px;min-width:32px;flex-basis:32px;border:0}
body.mobile-layout>header .brand .symbol img{width:53.5px;height:53.5px;left:-10.75px;top:-10.2px}
body.mobile-layout>header .brand-wordmark{gap:3px;align-items:flex-start}
body.mobile-layout>header .brand-zh{font-size:18px;line-height:1.2;font-weight:500;letter-spacing:.65px}
body.mobile-layout>header .brand-en{font-family:Arial,sans-serif;font-size:7px;line-height:1.2;font-weight:400;letter-spacing:1px;word-spacing:0;color:#666}
body.mobile-layout>header .mobile-filter-button{width:36px;padding:8px}
body.mobile-layout>header .mobile-filter-button svg,body.mobile-layout>header .mobile-search-toggle svg{width:20px;height:20px;stroke-width:1.5}
body.mobile-layout>header .culture-region{width:58px}
body.mobile-layout>header .culture-region select{width:58px;height:44px;min-height:44px;font-size:14px;line-height:1.4;padding-left:2px;padding-right:17px;color:#555}
@media(max-width:359px){
 body.mobile-layout:not(.mobile-search-open)>header{grid-template-columns:32px minmax(0,1fr) 36px 54px;column-gap:2px;padding-left:8px;padding-right:8px}
 body.mobile-layout>header .brand{gap:6px}
 body.mobile-layout>header .brand .symbol{width:28px;height:28px;min-width:28px;flex-basis:28px}
 body.mobile-layout>header .brand .symbol img{width:46.8px;height:46.8px;left:-9.4px;top:-8.9px}
 body.mobile-layout>header .brand-zh{font-size:17px;letter-spacing:.3px}
 body.mobile-layout>header .brand-en{font-size:6px;letter-spacing:.9px}
 body.mobile-layout>header .mobile-filter-button{width:32px}
 body.mobile-layout>header .mobile-search-toggle{width:36px}
 body.mobile-layout>header .culture-region,body.mobile-layout>header .culture-region select{width:54px}
}
body.mobile-layout>header .culture-region{position:relative}
body.mobile-layout>header .culture-region select{appearance:none;-webkit-appearance:none;background:transparent}
body.mobile-layout>header .culture-region::after{content:'';position:absolute;right:5px;top:18px;width:5px;height:5px;border-right:1px solid #666;border-bottom:1px solid #666;transform:rotate(45deg);pointer-events:none}
/* Desktop count tooltip is anchored to the counter, not the pointer. */
body:not(.mobile-layout) .atlas-counter{position:relative;overflow:visible}
body:not(.mobile-layout) .atlas-counter::after{content:attr(aria-label);position:absolute;left:50%;top:calc(100% + 8px);transform:translateX(-50%);white-space:nowrap;padding:4px 8px;background:#fff;border:1px solid #ddd;color:#555;font:12px/1.5 var(--sans);letter-spacing:0;opacity:0;visibility:hidden;pointer-events:none;z-index:100}
body:not(.mobile-layout) .atlas-counter:hover::after{opacity:1;visibility:visible}
/* Bilingual wordmark shares the Chinese width, with space between English words. */
body.mobile-layout>header .brand-wordmark{display:grid;grid-template-columns:max-content;gap:3px}
body.mobile-layout>header .brand-en{display:flex;justify-content:space-between;width:0;min-width:100%;gap:5px;font-family:var(--sans);font-size:7px;font-weight:500;letter-spacing:.5px;line-height:1.2}
body.mobile-layout>header .brand-en>span:last-child{margin-right:-.5px}
body.mobile-layout .map-window .map-stage.group-layout{column-gap:48px}
@media(max-width:359px){body.mobile-layout>header .brand-en{font-size:6.5px;letter-spacing:.4px}}
/* Preserve the desktop wordmark's natural typography on mobile. */
body.mobile-layout>header .brand-wordmark{display:flex;gap:4px;align-items:flex-start}
body.mobile-layout>header .brand-zh{font-size:18px;font-weight:500;line-height:1.15;letter-spacing:1.5px}
body.mobile-layout>header .brand-en{display:block;width:auto;min-width:0;font:500 7.5px/1.2 var(--sans);letter-spacing:1.15px;word-spacing:2.25px;color:#555}
body.mobile-layout>header .brand-en>span:last-child{margin-right:0}
@media(max-width:359px){body.mobile-layout>header .brand-zh{font-size:17px;letter-spacing:1.2px}body.mobile-layout>header .brand-en{font-size:7px;letter-spacing:1px;word-spacing:2px}}
body.mobile-layout>header .brand{gap:9px}
body.mobile-layout>header .brand .symbol{width:39px;height:39px;min-width:39px;flex-basis:39px}
body.mobile-layout>header .brand .symbol img{width:65.25px;height:65.25px;left:-13.125px;top:-12.375px}
@media(max-width:359px){body.mobile-layout>header .brand{gap:8px}body.mobile-layout>header .brand .symbol{width:36px;height:36px;min-width:36px;flex-basis:36px}body.mobile-layout>header .brand .symbol img{width:60.23px;height:60.23px;left:-12.12px;top:-11.42px}}
/* Render the preframed mark directly, without fractional crop offsets. */
body.mobile-layout>header .brand .symbol img{width:100%;height:100%;left:0;top:0;object-fit:contain}
body.mobile-layout>header .brand-en{font-size:8px;letter-spacing:1px}
@media(max-width:359px){body.mobile-layout>header .brand-en{font-size:7px;letter-spacing:1px}}
body .period-nav .back-to-top,body .period-nav .back-to-top:hover{background:#f5f5f5;color:#202020;border-color:transparent}
/* Quiet state feedback follows the press, with no timed black flash. */
body .period-nav .back-to-top{transition:background-color 160ms ease-out;color:#202020}
@media(hover:hover){body:not(.mobile-layout) .period-nav .back-to-top:hover{background:#e9e9e9}}
body .period-nav .back-to-top:active,body .period-nav .back-to-top:hover:active{background:#dcdcdc;color:#202020;transition-duration:60ms}
@media(prefers-reduced-motion:reduce){body .period-nav .back-to-top{transition:none}}
body.mobile-layout .workspace>.views,body.mobile-layout.graph-page .workspace>.views{gap:4px}
/* A trailing viewport lets even the final era align to the left edge. */
body.mobile-layout .period-track::after{content:'';display:block;flex:0 0 var(--period-tail,0px);height:1px;pointer-events:none}
/* Immediate, quiet contact feedback; selected states remain legible. */
body.mobile-layout :is(button,a,summary,label){transition:none}
body.mobile-layout .touch-feedback{box-shadow:inset 0 0 0 999px rgba(0,0,0,.09)!important;transition:none!important}
@media(prefers-reduced-motion:reduce){body.mobile-layout :is(button,a,summary,label){transition:none}}

/* Touch feedback ends at release; hovering must not leave navigation tinted. */
body.mobile-layout .workspace>.views button:hover,body.mobile-layout .culture-fields button:hover{background:transparent}
body.mobile-layout .period-track button:not([aria-current="location"]):hover{background:#f5f5f5}

body.mobile-layout #content .mobile-item-selected:not(.map-stage *):not([data-event]):not([data-term]){background:#e7e7e7!important;border-color:#aaa!important}

/* A timeline selection belongs to the entire row, never an isolated black text patch. */
body #content .event-row{position:relative;padding-left:12px;padding-right:12px;border-left:3px solid transparent}
body #content .event-row.event-current,body #content .event-row.person-event-current{background:#ededeb;border-left-color:#444}
body #content .event-row [data-event],body #content .event-row [data-event].reading-selected,body #content .event-row [data-event].reading-selected:hover{background:transparent;color:#222;border:0;box-shadow:none}
body #content .event-row.event-current [data-event]{font-weight:600}
@media(hover:hover){body #content .event-row:not(.event-current):not(.person-event-current):hover{background:#f7f7f6}}

/* Keep notices inside the reading frame without clipping text or pointer targets. */
body.mobile-layout .content-scroll:not(.map-reading){padding-top:12px}
body.mobile-layout .person-location-note{margin:0 0 12px;line-height:1.6}
body.mobile-layout .people-group.person-location-group>summary,body.mobile-layout .people-group.person-location-group>.branch-intro{position:static}

/* Touch role choices share desktop filtering with comfortable tap targets. */
body.mobile-layout .culture-role-menu{width:200px;max-width:calc(100vw - 16px);z-index:120}
body.mobile-layout .culture-role-menu button{min-height:44px;padding:10px 12px;font-size:15px}
/* Continuous lists: compact desktop cards, intrinsic mobile height. */
body:not(.mobile-layout) .workspace .person-card{height:auto;min-height:172px;max-height:none;padding:14px 16px}
body:not(.mobile-layout) .workspace .person-card h3{font-size:19px;line-height:1.45;margin:0 0 4px}
body:not(.mobile-layout) .workspace .cards{align-items:stretch;gap:12px}
/* Stretch the card itself, not only the era wrapper around it. */
.workspace .cards>.style-member{display:flex;flex-direction:column;align-self:stretch}
.workspace .cards>.style-member>.person-card{flex:1}
.workspace .cards .styled-person-card{display:flex;flex-direction:column;flex:1;min-height:0}
.workspace .cards .styled-person-card>.person-card{flex:1}
.workspace .cards .style-era{flex:none}
body:not(.mobile-layout) .workspace .time-row{margin-bottom:20px}
body.mobile-layout .workspace .person-card{height:auto;min-height:148px;max-height:none;padding:14px;overflow:visible}
body.mobile-layout .workspace .person-card h3{display:block;-webkit-line-clamp:unset;overflow:visible;line-height:1.45}
body.mobile-layout .workspace .person-card .english,body.mobile-layout .workspace .person-card .branch-text{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
body.mobile-layout #content .person-card:not(.person-current):not(.mobile-item-selected):not(.selected):hover{background:#fff!important;border-color:#ddd!important}
body.mobile-layout .era-group{grid-template-columns:minmax(0,1fr)}
.map-stage .paged-map-count{min-height:0;margin-bottom:10px}
/* Uniform cards: shared rows include the classification footer. Text remains uncut. */
body .workspace .cards{align-items:stretch}
body .workspace .cards>.styled-person-card{display:grid;grid-template-rows:subgrid;grid-row:span 2;row-gap:8px}
body .workspace .cards>.style-member{display:grid;grid-template-rows:subgrid;grid-row:span 3;row-gap:8px}
body .workspace .cards>.style-member>.styled-person-card{display:grid;grid-template-rows:subgrid;grid-row:span 2;row-gap:8px}
body .workspace .cards .style-era{margin:0}
body .workspace .person-card{display:flex;flex-direction:column;align-items:stretch;text-align:left}
body .workspace .person-card .card-identity{display:grid;grid-template-columns:minmax(0,1fr) 48px;grid-template-rows:auto 1fr;column-gap:12px;min-height:78px;flex:1;align-items:start}
body .workspace .person-card .card-identity h3{grid-column:1;grid-row:1;margin:0}
body .workspace .person-card .card-identity .english{grid-column:1;grid-row:2;margin:4px 0 12px;overflow-wrap:anywhere}
body .workspace .person-card .card-identity img{grid-column:2;grid-row:1/3;width:48px;height:62px;object-fit:contain;float:none;margin:0}
body .workspace .person-card .card-metadata{display:flex;flex-direction:column;align-items:flex-start;gap:4px}
body .workspace .person-card .card-metadata .tag{margin:0;max-width:100%;white-space:normal}
body .workspace .person-card .branch-text{display:block;min-height:2.8em;line-height:1.4;margin:10px 0 0;white-space:normal}
body .workspace .card-style-tags{margin:0;padding:0 4px 12px;display:grid;grid-template-columns:60px minmax(0,1fr);gap:8px;align-content:start}
body .workspace .card-classification-label,body .workspace .classification-pending{font-size:12px;color:#777;line-height:1.8}
body .workspace .card-style-tags .style-tags{margin:0;gap:4px 10px}
body.mobile-layout .workspace .person-card .card-identity{min-height:78px}
body.mobile-layout .workspace .person-card .branch-text{overflow:visible;text-overflow:clip}

body .workspace .person-card .card-branch-label{display:block;font-size:12px;color:#777;font-weight:400;line-height:1.6;margin-bottom:2px}body .workspace .person-card .branch-text{min-height:3.8em}

/* Shared facet rows keep labels explicit and columns aligned. */
body .workspace .card-style-tags.typed-facets{display:flex;flex-direction:column;gap:7px;align-items:stretch;padding:7px 4px 12px;min-height:72px}
.facet-row{display:grid;grid-template-columns:82px minmax(0,1fr);gap:8px;align-items:start;font-size:13px;line-height:1.65}
.facet-label{color:#777;font-size:12px}.facet-row .style-tags{display:flex;flex-wrap:wrap;gap:3px 9px;min-width:0}.facet-row button{overflow-wrap:anywhere;text-align:left;max-width:100%;white-space:normal}
.facet-more{font-size:12px;align-self:flex-start;margin-left:90px}.profile-facets{display:grid;gap:12px}.profile-facets .facet-row{grid-template-columns:110px minmax(0,1fr);font-size:15px}.profile-facets .facet-label{font-size:13px}
.group-facet{font-size:12px;color:#777;font-weight:400}.facet-section>h2{font-size:18px;padding:12px 0;border-bottom:1px solid #ccc}.style-groups .style-branch>.style-branch{margin-left:16px;padding-left:12px;border-left:1px solid #ddd}
@media(max-width:800px){.facet-row{font-size:14px;grid-template-columns:82px minmax(0,1fr)}body .workspace .card-style-tags.typed-facets{padding-top:10px}.profile-facets .facet-row{grid-template-columns:88px minmax(0,1fr)}}

/* Timeline dates and supporting labels share explicit alignment. */
body:not(.mobile-layout) #content .event-date-note{display:block}
/* Remove the opening full-width bracket's half-em optical inset. */
body:not(.mobile-layout) #content .event-date-note-wide{text-indent:-.5em}
body #content .event-row>div>small{display:block;margin:4px 0 0;padding:0}
body #content .event-row>div>br{display:none}
body #content .event-row>div>small .text-button{margin-left:0;margin-right:0;padding-left:0;padding-right:0;min-height:0}
body #content .event-row>div>[data-event]{margin-left:0;margin-right:0;padding-left:0;padding-right:0}
