/* DAWU V5.9 — clean series labels, centered mobile carousel, native Bilibili controls. */

/* Series: remove decorative circle/boxed arrow entirely. */
.ysjf-series-caption{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important}
.ysjf-series-name{display:block!important;color:var(--ink)!important;font-weight:650!important;letter-spacing:-.01em!important}

/* Desktop arrow controls stay as light liquid-glass overlays inside the media viewport. */
.ysjf-series-viewport{position:relative!important}
.ysjf-series-nav{top:var(--series-media-center,50%)!important;translate:0 -50%!important;transform:none!important;width:58px!important;height:58px!important;border-radius:999px!important;background:color-mix(in srgb,var(--panel) 54%,transparent)!important;border:1px solid color-mix(in srgb,var(--ink) 14%,transparent)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.34),0 12px 34px rgba(9,20,31,.16)!important;backdrop-filter:blur(22px) saturate(165%)!important;-webkit-backdrop-filter:blur(22px) saturate(165%)!important;color:var(--ink)!important;transition:transform .35s cubic-bezier(.2,.8,.2,1),background .35s ease,box-shadow .35s ease!important}
.ysjf-series-prev{left:calc((100% - var(--series-card-width,50%))/2 + 16px)!important;right:auto!important}.ysjf-series-next{right:calc((100% - var(--series-card-width,50%))/2 + 16px)!important;left:auto!important}
.ysjf-series-nav:hover{transform:scale(1.06)!important;background:color-mix(in srgb,var(--panel) 72%,transparent)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.48),0 16px 38px rgba(9,20,31,.19)!important}
.ysjf-series-nav:active{transform:scale(.96)!important}

/* Native Bilibili player owns playback/pause/fullscreen controls. No duplicate site controls. */
.bili-preview-native{position:relative!important;width:100%!important;aspect-ratio:16/9!important;background:#000!important;overflow:hidden!important;border-radius:inherit!important}
.bili-preview-native iframe{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;border:0!important;display:block!important;background:#000!important}
.preview-ended-compact{min-height:0!important;padding:18px 20px!important;gap:10px!important}
.preview-ended-compact strong{font-size:15px!important;line-height:1.35!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important}
.preview-ended-compact .preview-ended-actions{margin-top:4px!important}

/* Identify page: keep the task compact on phones. */
@media(max-width:760px){
  .ysjf-series-heading{text-align:center!important;padding-left:0!important;margin-bottom:24px!important}
  .ysjf-series-track{gap:10px!important;padding-left:30px!important;padding-right:30px!important;scroll-padding-left:30px!important;scroll-padding-right:30px!important}
  .ysjf-series-card{flex:0 0 calc(100% - 60px)!important;scroll-snap-align:center!important}
  .ysjf-series-caption{justify-content:center!important;text-align:center!important;margin-top:13px!important}
  .ysjf-series-name{font-size:14px!important;max-width:92%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .ysjf-series-nav{display:none!important}
  .identify-v2{padding-top:24px!important}
  .identify-v2-head{margin-bottom:16px!important;gap:10px!important}
  .identify-v2-head h1{font-size:clamp(28px,8vw,36px)!important;line-height:1.1!important;margin:8px 0!important}
  .identify-v2-head p{font-size:13px!important;line-height:1.55!important}
  .identify-v2-layout{gap:14px!important}
  .identify-video-copy{padding:12px 14px!important}
  .identify-video-copy h2{font-size:15px!important;line-height:1.35!important;margin-top:5px!important}
  .identify-video-copy p{font-size:12px!important;margin-top:4px!important}
  .identify-pick-panel{padding:16px!important}
  .quick-step{gap:10px!important;margin-bottom:12px!important}
  .quick-step>span{width:30px!important;height:30px!important;flex-basis:30px!important}
  .quick-step h2{font-size:17px!important}
  .quick-step p{font-size:12px!important}
  .quick-people{gap:8px!important}
  .quick-person small{font-size:12px!important}
  .quick-person{padding:9px 5px!important;min-height:98px!important}
  .quick-avatar{width:48px!important;height:48px!important}
  .quick-search,.quick-optional,.quick-step-two,.quick-fields,.quick-summary,.identify-actions{margin-top:12px!important}
}

/* Keep all three archive metrics on one row on phones. */
#app:has(.loader-screen.boot){min-height:100dvh}
body:has(.loader-screen.boot)>.footer{visibility:hidden}
html[data-theme] .loader-screen.boot{background:var(--ui-bg)!important}
html[data-theme] .loader-screen:not(.boot) .loader-mark{background:none!important;-webkit-text-fill-color:currentColor!important;color:var(--ui-text)!important;filter:none!important}
@media(max-width:760px){
  .hero-metrics-v54{grid-template-columns:repeat(3,minmax(0,1fr));border-radius:15px}
  .hero-metrics-v54>div{min-width:0;padding:13px 6px;grid-template-columns:minmax(0,1fr);gap:5px;text-align:center;align-content:start}
  .hero-metrics-v54 strong{font-size:22px;line-height:1.2}
  .hero-metrics-v54 small{font-size:12px;white-space:nowrap}
  .hero-metrics-v54 span{font-size:11px;line-height:1.5;overflow-wrap:anywhere;text-wrap:balance}
}

/* Reserve the count column even for long series names. */
.category-filters button{flex-wrap:nowrap;min-width:0}
.category-filters .category-filter-name{flex:1;min-width:0;font-size:inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.category-filters .category-filter-count{flex:0 0 auto;white-space:nowrap;font-variant-numeric:tabular-nums}
@media(min-width:761px){
  .collection-sidebar{position:sticky!important;top:110px!important;align-self:start!important;max-height:calc(100dvh - 126px);overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:thin}
}
@media(max-width:760px){
  .topbar-in{height:76px!important;min-height:76px!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;align-items:center!important}
  /* Wordmark truly centered: side tracks are equal 1fr, actions pinned right. */
  .topbar-in .logo{grid-column:2!important;grid-row:1!important;justify-self:center!important;max-width:100%!important}
  .topbar-in .header-actions{grid-column:3!important;grid-row:1!important;justify-self:end!important;display:flex!important;align-items:center!important;gap:8px!important}
  .topbar-in .menu-toggle{margin-left:0!important}
  .nav{top:calc(env(safe-area-inset-top,0px) + 80px)!important}
  .page-title .collection-title-main{font-size:clamp(20px,6vw,32px)!important;white-space:nowrap!important;letter-spacing:-.045em!important}
}
.mobile-series-trigger{display:none}
.mobile-series-trigger .sort-caret{display:inline-block;vertical-align:-1px;margin-left:5px;width:7px;height:7px}

/* Persons page on phones: 3-up 1:1 crops, compact captions, note as one truncated line. */
@media(max-width:760px){
  .hero-v54-meta{display:none!important}
  /* Series carousel arrows stay usable on phones: compact glass circles on the media edges. */
  .ysjf-series-nav{display:grid!important;place-items:center!important;width:42px!important;height:42px!important}
  .ysjf-series-nav span{font-size:24px!important;transform:none!important}
  .ysjf-series-prev{left:8px!important}
  .ysjf-series-next{right:8px!important}
  .persons-title{padding-top:26px!important;padding-bottom:18px!important}
  .persons-title h1{font-size:clamp(24px,7vw,32px)!important;line-height:1.25!important;margin:10px 0 8px!important}
  .persons-title p{font-size:13px!important;margin:0!important}
  .people-toolbar{margin-bottom:14px!important}
  .people-grid.people-filtered{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px 10px!important}
  .people-grid.people-filtered .person-card{padding:7px 7px 9px!important}
  .people-grid.people-filtered .portrait{aspect-ratio:1/1!important;border-radius:14px!important}
  .people-grid.people-filtered .person-caption{margin-top:8px!important;padding:0 2px!important;flex-direction:column!important;align-items:flex-start!important;gap:1px!important}
  .people-grid.people-filtered .person-caption h3{font-size:13px!important;max-width:100%}
  .people-grid.people-filtered .person-caption span{font-size:12px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
  .people-grid.people-filtered .person-card>p{display:block!important;font-size:12px!important;line-height:1.45!important;margin-top:5px!important;padding:0 2px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
}
#sort[hidden]{display:none!important}
.sort-control{position:relative;flex:0 0 160px;min-width:0;max-width:100%}
.collection-main,.collection-toolbar>.search-field,.collection-toolbar>.search-field input{min-width:0!important}
.collection-toolbar>.search-field input{width:100%}
.sort-toggle{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:48px;width:100%;min-width:0;padding:12px 14px 12px 16px;background:var(--ui-surface)!important;color:var(--ui-text)!important;border:1px solid var(--ui-line)!important;border-radius:16px!important;font-size:14px;font-weight:600;white-space:nowrap;transition:border-color .2s,background .2s}
.sort-toggle:hover{border-color:var(--ui-line-strong)!important}
.sort-toggle .sort-caret{flex:0 0 auto;width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg) translate(-1px,-1px);opacity:.65;transition:transform .25s var(--ui-ease),opacity .2s}
.sort-toggle[aria-expanded="true"]{border-color:color-mix(in srgb,var(--ui-accent) 55%,var(--ui-line))!important}
.sort-toggle[aria-expanded="true"] .sort-caret{transform:rotate(225deg) translate(-2px,-2px);opacity:1}
.sort-menu{position:absolute;right:0;top:calc(100% + 8px);width:212px;padding:7px;background:var(--ui-surface-strong);color:var(--ui-text);border:1px solid var(--ui-line);border-radius:18px;box-shadow:var(--ui-shadow-soft),0 24px 60px rgba(10,20,30,.16);backdrop-filter:blur(24px) saturate(140%);-webkit-backdrop-filter:blur(24px) saturate(140%);z-index:40;transform-origin:top right;animation:sortMenuIn .18s var(--ui-ease)}
.sort-menu[hidden]{display:none!important}
.sort-menu.closing{animation:csMenuOut .16s ease both}
.sort-menu button{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:44px;text-align:left;padding:11px 13px;border-radius:12px;background:transparent;color:inherit;font-size:14px;transition:background .15s;animation:csItem .28s var(--ui-ease) both}
.sort-menu button:nth-child(2){animation-delay:.04s}
.sort-menu button:nth-child(3){animation-delay:.08s}
.sort-menu button:hover,.sort-menu button:focus-visible{background:var(--ui-surface-soft);color:var(--ui-text)}
.sort-menu button[aria-checked="true"]{background:color-mix(in srgb,var(--ui-accent) 18%,transparent);color:var(--ui-accent-strong);font-weight:750}
.sort-menu button[aria-checked="true"]:after{content:'✓';flex:0 0 auto;font-size:14px;font-weight:800;color:var(--ui-accent)}
@keyframes sortMenuIn{from{opacity:0;transform:translateY(-6px) scale(.97)}to{opacity:1;transform:none}}
/* Selected category rows get the same unmistakable accent bar the dark theme already has. */
@media(min-width:761px){
  .category-filters button.selected{box-shadow:inset 3px 0 0 var(--ui-accent)!important}
}
.preview-live:fullscreen,.preview-live.preview-expanded{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;margin:0!important;border-radius:0!important;z-index:2147483646!important;display:flex!important;flex-direction:column;justify-content:center;background:#000!important;padding:env(safe-area-inset-top,0px) 0 env(safe-area-inset-bottom,0px)!important}
.preview-live:fullscreen .bili-preview,.preview-expanded .bili-preview{flex:1;min-height:0;aspect-ratio:auto!important;border-radius:0!important}
.preview-live:fullscreen .preview-help,.preview-expanded .preview-help{flex:0 0 auto;min-height:48px}
.preview-live:before,.preview-live:after{display:none!important}
body:has(.preview-expanded){overflow:hidden}
.series-picker{width:min(520px,calc(100% - 24px));max-height:80dvh;margin:auto;padding:0;border:1px solid var(--ui-line);border-radius:24px;background:var(--ui-bg);color:var(--ui-text);overflow:hidden}
.series-picker::backdrop{background:rgba(9,19,28,.4);backdrop-filter:blur(4px)}
.series-picker-head{display:flex;align-items:center;justify-content:space-between;padding:20px;border-bottom:1px solid var(--ui-line)}
.series-picker-head h2{font-size:20px;margin:0}
.series-picker-head button{width:44px;height:44px;font-size:28px;color:inherit;background:var(--ui-surface);border-radius:50%}
.series-picker-options{overflow-y:auto;max-height:calc(80dvh - 85px);overscroll-behavior:contain;padding:8px 12px 20px}
.series-picker .category-filters{display:flex!important;flex-direction:column!important;overflow:visible!important;margin:0!important;padding:0!important;gap:4px!important}
.series-picker .category-filters button{width:100%;min-height:48px;padding:12px;flex-shrink:0;border-radius:12px}
.series-picker .category-filter-name{white-space:normal;overflow-wrap:anywhere}
body:has(.series-picker[open]){overflow:hidden}
.preview-loading{position:absolute;inset:auto 8px 8px;margin:0!important;padding:8px 10px;background:rgba(0,0,0,.75);color:#fff!important;font-size:12px!important;pointer-events:none;border-radius:8px}
/* Light theme: the loading/slow hint must not stay a black pill over a bright page. */
html[data-theme="light"] .preview-loading{background:rgba(255,255,255,.94)!important;color:#263746!important;border:1px solid rgba(21,44,61,.14)!important;box-shadow:0 8px 24px rgba(45,63,78,.14)!important}
.preview-help{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 10px;background:var(--ui-bg);color:var(--ui-text-2);font-size:12px}
.preview-help span{flex:1 1 140px}
.preview-help a,.preview-help button{color:var(--ui-accent);background:none;font-size:12px;padding:6px 0;white-space:nowrap}
.preview-live{height:auto!important;aspect-ratio:auto!important}
@media(max-width:760px){
  .collection-sidebar{padding:14px!important;border-radius:18px!important;margin-bottom:18px!important}
  .collection-sidebar>.eyebrow,.collection-sidebar>.category-filters{display:none!important}
  .mobile-series-trigger{display:flex;width:100%;min-height:48px;align-items:center;gap:12px;justify-content:space-between;background:none;color:var(--ui-text);text-align:left}
  .mobile-series-trigger span{font-size:14px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .mobile-series-trigger small{font-size:12px;flex-shrink:0;color:var(--ui-accent)}
  .sort-toggle{width:100%}.sort-menu{left:0;right:auto;max-width:calc(100vw - 28px)}
  .series-picker{width:100%;max-height:82dvh;max-width:none;margin:auto 0 0;border-radius:24px 24px 0 0;padding-bottom:env(safe-area-inset-bottom,0px)}
  .series-picker-options{max-height:calc(82dvh - 100px - env(safe-area-inset-bottom,0px))}
}
/* Mobile collection: search, then a compact filter/sort row. */
@media(max-width:760px){
  .collection{display:grid!important;grid-template-columns:minmax(0,1fr) 124px!important;gap:12px!important;align-items:start}
  .collection-main,.collection-toolbar{display:contents!important}
  .collection-toolbar>.search-field{grid-column:1/-1;grid-row:1;margin:0!important;min-height:48px!important;border-radius:16px!important}
  .collection-sidebar{grid-column:1;grid-row:2;padding:0 12px!important;margin:0!important;border-radius:16px!important;min-width:0}
  .mobile-series-trigger{min-height:48px;gap:8px}
  .mobile-series-trigger small{font-size:0}
  .mobile-series-trigger small:after{content:'⌄';font-size:16px}
  .sort-control{grid-column:2;grid-row:2;min-width:0}
  .sort-toggle{width:100%!important;gap:8px;padding:12px!important}
  .sort-menu{left:auto;right:0;width:168px}
  #result-info{grid-column:1/-1;grid-row:3;margin:0!important;padding:2px 0!important}
  #results{grid-column:1/-1;grid-row:4;min-width:0}
  #pagination{grid-column:1/-1;grid-row:5}
}
/* Desktop hero: let height follow content (the 100svh fill left a ~140px dead band between
   the feature card and the stats at tall viewports) and anchor the metrics bar right below the content. */
@media(min-width:961px){
  .hero-v54{min-height:0;max-height:none;align-items:stretch}
  .hero-v54-grid{grid-template-rows:minmax(0,1fr) auto;row-gap:clamp(18px,3vh,30px)}
  .hero-metrics-v54{margin-top:0}
}

/* Boot screen: cinematic entrance — tracking-in title with sheen, accent aura, rotating status. */
body>.topbar{transition:opacity .5s var(--ui-ease)}
body:has(.loader-screen.boot)>.topbar{opacity:0!important;pointer-events:none!important}
.loader-screen.boot{gap:0!important;transition:opacity .26s ease}
.boot-aura{position:absolute;left:50%;top:50%;translate:-50% -50%;width:min(76vw,560px);aspect-ratio:1;border-radius:50%;pointer-events:none;background:radial-gradient(circle,color-mix(in srgb,var(--ui-accent) 14%,transparent) 0%,transparent 62%);filter:blur(28px);animation:bootAura 4.2s ease-in-out infinite;transition:opacity .26s ease}
.boot-core{position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;transition:transform .26s var(--ui-ease),filter .26s ease}
.boot-kicker{display:flex;align-items:center;gap:14px;font-size:10px;font-weight:600;letter-spacing:.44em;text-indent:.44em;color:var(--ui-text-3)!important;animation:bootRise .7s var(--ui-ease) .05s both}
.boot-kicker::before,.boot-kicker::after{content:"";width:26px;height:1px;flex:0 0 auto}
.boot-kicker::before{background:linear-gradient(90deg,transparent,var(--ui-line-strong))}
.boot-kicker::after{background:linear-gradient(90deg,var(--ui-line-strong),transparent)}
.loader-screen.boot .loader-mark{font-size:clamp(40px,9vw,58px)!important;font-weight:800!important;line-height:1.14!important;margin:20px 0 30px!important;letter-spacing:-.02em;background-image:linear-gradient(100deg,var(--ui-text) 40%,color-mix(in srgb,var(--ui-accent) 74%,var(--ui-text)) 45%,color-mix(in srgb,var(--ui-accent) 74%,var(--ui-text)) 55%,var(--ui-text) 60%)!important;background-size:240% 100%;background-position:0% 0;background-repeat:no-repeat;-webkit-background-clip:text!important;background-clip:text!important;-webkit-text-fill-color:transparent!important;filter:none;animation:bootTitle .95s var(--ui-ease) .15s both,bootSheen 4.8s ease-in-out 1.15s infinite}
.loader-screen.boot .loader-mark span{-webkit-text-fill-color:var(--ui-accent)!important}
.loader-screen.boot .loader-bar{width:min(230px,56vw)!important;height:2px!important;border-radius:999px!important;background:var(--ui-line)!important;border:0!important;animation:bootRise .7s var(--ui-ease) .42s both}
.loader-screen.boot .loader-bar i{background:linear-gradient(90deg,transparent,var(--ui-accent))!important;border-radius:999px!important;box-shadow:0 0 14px color-mix(in srgb,var(--ui-accent) 55%,transparent)!important}
.loader-screen.boot .loader-text{display:grid!important;margin-top:22px!important;font-size:12px!important;letter-spacing:.3em;text-indent:.3em;text-transform:none;font-family:inherit;color:var(--ui-text-2)!important;animation:bootRise .7s var(--ui-ease) .58s both}
.loader-screen.boot .loader-text::after{content:none!important}
.boot-status>span{grid-area:1/1;white-space:nowrap;opacity:0;animation:bootSwap 5.4s linear infinite}
.boot-status>span:nth-child(2){animation-delay:1.8s}
.boot-status>span:nth-child(3){animation-delay:3.6s}
.boot-foot{position:absolute;left:16px;right:16px;bottom:max(24px,env(safe-area-inset-bottom,0px));margin:0;font-size:10px;letter-spacing:.3em;text-indent:.3em;text-align:center;color:var(--ui-text-3)!important;animation:bootRise .8s var(--ui-ease) .88s both}
.loader-screen.boot.leaving .boot-core{transform:scale(1.04);filter:blur(7px)}
.loader-screen.boot.leaving .boot-aura{opacity:0}
@keyframes bootRise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@keyframes bootTitle{from{opacity:0;letter-spacing:.14em;transform:translateY(12px);filter:blur(9px)}to{opacity:1;letter-spacing:-.02em;transform:none;filter:blur(0)}}
@keyframes bootSheen{0%{background-position:0% 0}100%{background-position:100% 0}}
@keyframes bootAura{0%,100%{opacity:.65;transform:scale(1)}50%{opacity:1;transform:scale(1.05)}}
@keyframes bootSwap{0%{opacity:0;transform:translateY(9px);filter:blur(4px)}4.5%,28%{opacity:1;transform:none;filter:blur(0)}33%,100%{opacity:0;transform:translateY(-9px);filter:blur(4px)}}
@media(max-width:760px){
  .boot-kicker{font-size:9px;letter-spacing:.36em;text-indent:.36em;gap:10px}
  .boot-kicker::before,.boot-kicker::after{width:18px}
  .loader-screen.boot .loader-mark{margin:16px 0 24px!important}
}
@media(prefers-reduced-motion:reduce){
  .loader-screen.boot,.loader-screen.boot *,.loader-screen.boot *::before,.loader-screen.boot *::after{animation:none!important;transition:none!important}
  .boot-status>span{opacity:0}
  .boot-status>span:nth-child(1){opacity:1}
}

/* Mobile native video preview: direct 360P MP4 from Bilibili CDN (embed mbplayer is referer-gated). */
.bili-preview-native video{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;border:0!important;display:block!important;background:#000!important;object-fit:contain}
.preview-fallback{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center;padding:18px;background:var(--ui-surface-strong);color:var(--ui-text)}
.preview-fallback strong{font-size:15px}
.preview-fallback>span{font-size:12px;color:var(--ui-text-2)}
.preview-fallback .preview-ended-actions{margin-top:8px;display:flex;gap:10px;flex-wrap:wrap;justify-content:center}

/* Identify search dropdown: tech.css hardcodes a dark surface; light theme needs its own. */
html[data-theme="light"] .quick-search-results{background:rgba(255,255,255,.97)!important;border-color:rgba(21,44,61,.14)!important;box-shadow:0 20px 60px rgba(45,63,78,.18)!important}
html[data-theme="light"] .quick-search-results button{color:#1c2b37!important;border-bottom-color:rgba(21,44,61,.08)!important}
html[data-theme="light"] .quick-search-results button:hover,html[data-theme="light"] .quick-search-results button:focus-visible{background:#e8f4f5!important}
html[data-theme="light"] .quick-search-results button:last-child{border-bottom:0!important}
html[data-theme="light"] .quick-search-results small{color:#56697a!important}

/* Selected-people feedback lives right under the search box, not only in the bottom summary. */
.quick-picked-inline{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-top:10px}
.quick-picked-label{font-size:12px;font-weight:800;letter-spacing:.06em;color:var(--ui-text-2,#9e98ae)}
.quick-picked-chip{display:inline-flex;align-items:center;gap:7px;padding:6px 9px 6px 12px;border-radius:999px;border:1px solid rgba(78,205,196,.32);background:rgba(78,205,196,.10);color:#c9fffb;font-size:12px;font-weight:700;cursor:pointer;transition:background .2s,border-color .2s}
.quick-picked-chip i{font-style:normal;width:17px;height:17px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.14);font-size:12px;line-height:1}
.quick-picked-chip:hover{border-color:rgba(255,255,255,.42);background:rgba(78,205,196,.16)}
html[data-theme="light"] .quick-picked-label{color:#526477!important}
html[data-theme="light"] .quick-picked-chip{background:#eef5f6!important;color:#314f5c!important;border-color:#cbdde1!important}
html[data-theme="light"] .quick-picked-chip i{background:#d7e5e9!important;color:#314f5c!important}
html[data-theme="light"] .quick-picked-chip:hover{background:#e8f4f5!important;border-color:#79b9c4!important}

/* ---- r17: person page mobile layout + light-mode contrast ---- */
@media(max-width:760px){
.person-hero{padding-top:30px}
.person-hero-in{flex-direction:row;align-items:center;gap:16px}
.person-hero-avatar{width:92px;height:115px;flex-shrink:0}
.person-hero-info{min-width:0}
.person-hero-info h1{font-size:30px;margin:8px 0 6px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.person-hero-info p{font-size:12.5px;line-height:1.6}
.person-hero-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin-top:20px}
.person-hero-stats>div{flex-direction:column;align-items:flex-start;gap:2px;padding:12px 6px 4px 10px;margin:0;border-right:1px solid var(--line,#1e1e1c);min-width:0}
.person-hero-stats>div:first-child{padding-left:0}
.person-hero-stats>div:last-child{border-right:0}
.person-hero-stats>div:last-child strong{font-size:14px;letter-spacing:-.3px}
.person-hero-stats strong{font-size:19px;letter-spacing:-.5px;white-space:nowrap}
.person-hero-stats small{font-size:11px;white-space:nowrap}
.people-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px 10px!important}
.person-caption h3{font-size:12.5px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.person-caption span{font-size:11px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;display:block}
}
@media(max-width:360px){
.people-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px 8px!important}
.person-caption h3{font-size:12px!important}
.person-caption span{font-size:10.5px!important}
}
html[data-theme="light"] .person-hero-info h1{color:#16212c!important}
html[data-theme="light"] .person-hero-info p{color:#5a6b7c!important}
html[data-theme="light"] .person-hero-avatar{border-color:#d9e0e8!important;background:#eef1f5!important}
html[data-theme="light"] .person-hero-stats{border-top-color:#d9e0e8!important}
html[data-theme="light"] .person-hero-stats>div{border-right-color:#d9e0e8!important}
html[data-theme="light"] .person-hero-stats strong{color:#16212c!important}
html[data-theme="light"] .person-hero-stats small{color:#5a6b7c!important}
html[data-theme="light"] .timeline-series-head h2{color:#16212c!important}
html[data-theme="light"] .timeline-series-head .tl-count{color:#5a6b7c!important}
html[data-theme="light"] .tl-body h3{color:#16212c!important}
html[data-theme="light"] .timeline-item:hover .tl-body h3{color:#000!important}
html[data-theme="light"] .tl-date{color:#5a6b7c!important}
html[data-theme="light"] .pf-panel{background:#f7f9fb!important;border-color:#d9e0e8!important}

/* ---- r19: featured play button in liquid-glass language ---- */
.hero-feature-play{background:color-mix(in srgb,#0a141f 76%,transparent)!important;color:#fff!important;border:1px solid rgba(255,255,255,.30)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.28),0 10px 28px rgba(0,0,0,.30)!important;transition:transform .35s var(--ui-ease),background .3s ease,border-color .3s ease}
.hero-feature-trigger:hover .hero-feature-play{transform:scale(1.1);background:color-mix(in srgb,var(--ui-accent) 82%,#0a141f)!important;border-color:color-mix(in srgb,var(--ui-accent) 70%,#fff)!important;color:#06131a!important}
html[data-theme="light"] .hero-feature-play{background:rgba(255,255,255,.62)!important;color:#132126!important;border-color:rgba(21,44,61,.18)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.85),0 10px 26px rgba(31,51,66,.16)!important}

/* Visible playback controls shared by desktop and mobile. */
.preview-help button,.preview-help a{min-height:44px;padding:8px 12px;border-radius:10px;background:var(--ui-surface);display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}
.preview-help button:disabled{opacity:.5;cursor:wait}
.preview-help [hidden]{display:none!important}
.preview-help .preview-status{flex:1 0 100%;line-height:1.5}
.preview-live{overflow:visible!important}
.preview-help{position:relative;z-index:2;border-radius:0 0 14px 14px;gap:6px}
.ysjf-series-card img{-webkit-user-drag:none;user-select:none}

/* Person detail: cover-first library with scoped responsive controls. */
.person-detail-hero{padding:32px 0 12px!important;background:transparent!important}
.person-detail-hero .person-hero-in{align-items:center!important;gap:24px!important;padding-top:24px!important}
.person-detail-hero .person-hero-avatar{width:112px!important;height:112px!important;border-radius:24px!important;box-shadow:0 8px 30px #0000000d}
.person-detail-hero .person-hero-info{min-width:0;flex:1}
.person-detail-hero .person-hero-info h1{display:flex;align-items:center;gap:16px;font-size:38px!important;margin:8px 0!important}
.person-detail-hero .pf-btn{font-size:12px!important;font-weight:500;color:var(--ui-text-2)!important;border:1px solid var(--ui-line)!important;background:var(--ui-surface-soft)!important;border-radius:20px;padding:8px 12px;white-space:nowrap}
.person-detail-hero .correction-hint{font-size:12px!important;color:var(--ui-text-3)!important;margin-top:8px}
.person-detail-hero .person-hero-stats{padding-top:14px;padding-bottom:14px;margin-top:24px;gap:24px}
.person-detail-hero .person-hero-stats>div{margin:0!important;padding:0 24px 0 0!important;gap:8px;flex-direction:column;align-items:flex-start}
.person-detail-hero .person-hero-stats strong{font-size:23px!important;letter-spacing:0!important}
.person-library{padding-top:24px;padding-bottom:64px}
.person-library-heading{display:flex;justify-content:space-between;align-items:end;gap:16px;margin-bottom:22px}
.person-library-heading h2{font-size:26px;line-height:1.4;margin:6px 0 0}
.person-library-heading>span{font-size:13px;color:var(--ui-text-2);white-space:nowrap}
.person-library-tools{display:grid;grid-template-columns:minmax(200px,1fr) minmax(160px,.65fr) minmax(140px,.4fr);gap:12px;padding:16px;border:1px solid var(--ui-line);border-radius:20px;background:var(--ui-surface-soft);scroll-margin-top:100px}
.person-library-tools .search-field{height:50px;border:1px solid var(--ui-line);border-radius:12px;background:var(--ui-bg);min-width:0}
.person-library-tools input{width:100%;min-width:0;font-size:14px!important}
.person-select{display:flex;align-items:center;gap:10px;min-width:0;border:1px solid var(--ui-line);border-radius:12px;background:var(--ui-bg);padding:0 12px;height:50px}
.person-select>span{font-size:12px;color:var(--ui-text-3);flex-shrink:0}
.person-result-count{font-size:13px;color:var(--ui-text-2);padding:18px 2px}
.person-video-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.person-video-item{min-width:0;border:1px solid var(--ui-line);border-radius:18px;background:var(--ui-surface-soft);overflow:hidden;align-self:start}
.person-video-item .vcard{padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;transform:none!important;opacity:1!important}
.person-video-item .cover{border-radius:0!important;margin:0!important}
.person-video-item .cover img{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important}
.person-video-item .video-meta,.person-video-item h3,.person-video-item .video-bottom{margin-left:14px!important;margin-right:14px!important}
.person-video-item h3{font-size:16px!important;line-height:1.6!important;margin-top:9px!important;margin-bottom:10px!important}
.person-video-item .video-meta{margin-top:12px!important}
.person-video-item .video-cast{display:none}
.person-video-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 14px 12px;color:var(--ui-text-3);font-size:12px}
.person-video-foot .tl-flag{position:static!important;transform:none!important;width:auto!important;height:auto!important;min-height:32px;padding:5px 8px;border-radius:8px;background:transparent;color:var(--ui-text-3);border-color:transparent;box-shadow:none}
.person-video-foot .tl-flag.marked{color:#c33c3c!important;background:#d94e4e12!important;border-color:#d94e4e44!important}
.person-video-item .tl-evidence{margin:0 14px 12px;font-size:12px}
@media(max-width:960px){.person-video-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.person-library-tools{grid-template-columns:1fr 1fr}.person-library-tools .search-field{grid-column:1/-1}}
@media(max-width:600px){
 .person-detail-hero{padding-top:24px!important}.person-detail-hero .person-hero-in{flex-direction:row!important;gap:16px!important;align-items:flex-start!important}
 .person-detail-hero .person-hero-avatar{width:80px!important;height:96px!important;border-radius:18px!important}
 .person-detail-hero .person-hero-info h1{font-size:30px!important;gap:10px}.person-detail-hero .person-hero-info p{font-size:13px!important;line-height:1.65!important}
 .person-detail-hero .person-hero-info .eyebrow{font-size:10px}.person-detail-hero .pf-btn{padding:6px 9px!important;font-size:11px!important}
 .person-detail-hero .person-hero-stats{gap:0;margin-top:18px}.person-detail-hero .person-hero-stats>div{flex:1;padding:0 10px!important}.person-detail-hero .person-hero-stats>div:first-child{padding-left:0!important}.person-detail-hero .person-hero-stats strong{font-size:20px!important}.person-detail-hero .person-hero-stats>div:last-child strong{font-size:15px!important}
 .person-library{padding-top:16px}.person-library-heading{margin-bottom:16px}.person-library-heading h2{font-size:22px}.person-library-heading .eyebrow{font-size:10px}
 .person-library-tools{padding:12px;gap:10px;border-radius:16px;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)}.person-select{gap:6px;padding:0 10px}.person-select>span{display:none}.person-select .cs-toggle{font-size:13px}
 .person-video-grid{grid-template-columns:minmax(0,1fr);gap:18px}.person-video-item h3{font-size:16px!important}.person-video-item .video-meta{display:flex!important;justify-content:space-between}.person-video-item .video-bottom{display:flex!important}
}

.person-library .person-video-item .vcard{border-radius:0!important;display:block!important}
.person-library .person-video-item .vcard:after{display:none!important}
.person-library .person-video-item .video-cast{display:none!important}
.person-library .person-video-item .video-meta span,.person-library .person-video-item .video-bottom span{display:inline!important;color:var(--ui-text-2)!important;opacity:1!important}
.person-library .person-video-item .video-bottom{margin-top:0!important;margin-bottom:4px!important}
.person-library .person-video-foot .tl-flag{color:var(--ui-text-2)!important;background:var(--ui-surface-soft)!important;border:1px solid var(--ui-line)!important}
.person-library .person-video-foot .tl-flag.marked{color:#bb3030!important;background:#d94e4e12!important;border-color:#d94e4e44!important}

/* ---- r24: person hero balance, stable preview height, B站-style mobile rows, motion, dynamics sidebar ---- */
.person-video-grid{align-items:stretch}
.person-video-item{align-self:stretch;display:flex;flex-direction:column;transition:transform .4s cubic-bezier(.16,.68,.3,1),box-shadow .4s ease,border-color .4s ease}
.person-video-item:hover{transform:translateY(-4px);border-color:var(--ui-line-strong,rgba(112,230,224,.28));box-shadow:0 22px 54px rgba(0,0,0,.16)}
.person-video-item .vcard{flex:1 0 auto}
.person-video-foot{margin-top:auto}
.person-video-item .cover img{transition:transform .6s cubic-bezier(.16,.68,.3,1)}
.person-video-item:hover .cover img{transform:scale(1.05)}
.person-detail-hero .person-hero-avatar,.person-detail-hero .person-hero-info,.person-detail-hero .person-hero-stats,.person-library-heading,.person-library-tools{animation:bootRise .55s cubic-bezier(.16,.68,.3,1) both}
.person-detail-hero .person-hero-info{animation-delay:.07s}
.person-detail-hero .person-hero-stats{animation-delay:.14s}
.person-library-heading{animation-delay:.18s}
.person-library-tools{animation-delay:.24s}
@media(min-width:961px){
.person-detail-hero .person-hero-in{align-items:center!important;gap:32px!important}
.person-detail-hero .person-hero-stats{margin:0 0 0 auto!important;padding:16px 18px 16px 26px!important;border:1px solid var(--ui-line)!important;border-radius:20px;background:var(--ui-surface-soft);flex:0 0 auto;gap:0!important}
.person-detail-hero .person-hero-stats>div{padding:4px 26px!important;margin:0!important;border-right:1px solid var(--ui-line);flex-direction:column;align-items:flex-start;gap:4px;justify-content:center}
.person-detail-hero .person-hero-stats>div:last-child{border-right:0;padding-right:8px!important}
}
@media(max-width:600px){
.person-detail-hero .person-hero-in{flex-wrap:wrap}
.person-detail-hero .person-hero-stats{flex-basis:100%;margin-top:18px!important;border:0!important;border-top:1px solid var(--ui-line)!important;border-radius:0!important;background:transparent!important;padding:14px 0 0!important}
.person-video-grid{grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
.person-video-item{display:grid;grid-template-columns:126px minmax(0,1fr);column-gap:12px;padding:10px;align-items:start}
.person-library .person-video-item .vcard{display:contents!important}
.person-video-item .cover{grid-column:1;grid-row:1/span 3;aspect-ratio:16/9;border-radius:12px!important}
.person-video-item h3{grid-column:2;grid-row:1;margin:0!important;min-height:0!important;font-size:14.5px!important;line-height:1.5!important}
.person-video-item .video-meta{grid-column:2;grid-row:2;margin:6px 0 0!important;font-size:11.5px!important;display:flex!important}
.person-video-item .video-bottom{grid-column:2;grid-row:3;margin:3px 0 0!important;font-size:11.5px!important;display:flex!important}
.person-video-foot{grid-column:1/-1;grid-row:4;margin-top:0;padding:8px 2px 0!important}
.person-video-item .tl-evidence{grid-column:1/-1;grid-row:5;margin:6px 2px 0!important}
}
.journal-layout{align-items:start!important}
.journal-sidebar{position:sticky!important;top:104px!important;align-self:start!important;margin-top:0!important;max-height:calc(100dvh - 124px);overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:thin;padding:20px!important;gap:12px!important}
.journal-sidebar h2{font-size:17px!important;margin:0!important}
.journal-update{gap:6px!important;border-top:1px solid var(--ui-line);padding-top:12px!important}
.journal-update span{font-size:12px;color:var(--ui-text-2)}
.journal-update .journal-new{color:var(--ui-text)!important;font-weight:700}
.journal-layout .result-info{margin:0 0 14px!important}
.journal-more{margin:26px auto 0!important;display:flex}
.journal-card{padding:22px 4px!important}
html[data-theme="light"] .journal-sidebar h2{color:var(--ui-text)!important}
html[data-theme="light"] .journal-update span{color:var(--ui-text-2)!important}
@media(max-width:760px){.journal-sidebar{position:static!important;max-height:none;overflow:visible}}

/* ---- r26: sticky root fix, bigger mobile covers, identify flow clarity, motion system ---- */
/* overflow-x:hidden made body a scroll container and silently disabled position:sticky */
body{overflow-x:hidden;overflow-x:clip}
.fx-c{display:inline-block;opacity:0;filter:blur(9px);transform:translateY(14px);transition:opacity .62s cubic-bezier(.16,.68,.3,1),filter .62s cubic-bezier(.16,.68,.3,1),transform .62s cubic-bezier(.16,.68,.3,1)}
h1.fx-on .fx-c{opacity:1;filter:blur(0);transform:none}
:root{--spot-c:rgba(124,222,214,.10)}
html[data-theme="light"]{--spot-c:rgba(23,110,102,.08)}
@media(pointer:fine){
.vcard:hover,.person-card:hover,.series-card:hover,.journal-card:hover,.identify-video-card:hover{background-image:radial-gradient(240px circle at var(--mx,50%) var(--my,50%),var(--spot-c),transparent 72%)}
}
@media(max-width:600px){
.person-video-item{grid-template-columns:150px minmax(0,1fr)!important}
.person-video-item h3{font-size:15px!important}
}
.quick-step-two{margin-top:18px!important;padding-top:14px!important;border-top:1px solid var(--ui-line)}
.quick-summary{display:flex!important;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:14px!important;padding:11px 14px!important;border:1px solid var(--ui-line);border-radius:14px;background:var(--ui-surface-soft);font-size:13.5px;color:var(--ui-text)}
.quick-summary b{color:var(--ui-accent);font-size:15px}
.quick-summary small{font-size:12px;color:var(--ui-text-2)}
html[data-theme="light"] .quick-summary{background:#f2f7f7;border-color:#d9e5e6}
html[data-theme="light"] .quick-summary small{color:#5d6d7e!important}

/* ---- r27: floating preview modal (native controls first, no inline card expansion) ---- */
body.preview-modal-open{overflow:hidden}
.preview-modal{position:fixed;inset:0;z-index:140;display:flex;align-items:center;justify-content:center;padding:14px}
.preview-modal[hidden]{display:none}
.preview-modal-backdrop{position:absolute;inset:0;background:rgba(4,8,14,.74);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.preview-modal-box{position:relative;width:min(880px,100%);max-height:calc(100dvh - 28px);overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:8px;border:1px solid var(--ui-line);border-radius:20px;background:var(--ui-surface-strong,#0b1119);padding:12px;box-shadow:0 34px 90px rgba(0,0,0,.55);animation:bootRise .38s cubic-bezier(.16,.68,.3,1) both}
.preview-modal-title{font-size:13px;font-weight:650;line-height:1.45;color:var(--ui-text);padding:2px 38px 0 4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.preview-modal-close{position:absolute;top:10px;right:10px;z-index:2;width:30px;height:30px;border-radius:10px;border:1px solid var(--ui-line);background:var(--ui-surface-soft);color:var(--ui-text-2);font-size:17px;line-height:1;cursor:pointer}
.preview-modal-close:hover{color:var(--ui-text);border-color:var(--ui-line-strong,rgba(112,230,224,.28))}
.preview-modal-host{display:flex;flex-direction:column;border-radius:14px}
.preview-modal-host .bili-preview{border-radius:14px}
.preview-modal-host .preview-help{background:transparent;padding:10px 2px 2px}
.preview-modal-host .preview-help span{flex:1 1 100%}
.preview-modal-host .preview-ended{border-radius:14px;min-height:210px}
html[data-theme="light"] .preview-modal-backdrop{background:rgba(226,236,242,.72)}
html[data-theme="light"] .preview-modal-box{background:#fff}

/* ---- r28: light-theme text contrast inside preview-ended cards (tech.css hardcodes #fff children) ---- */
html[data-theme="light"] .preview-ended>.eyebrow,html[data-theme="light"] .preview-ended .eyebrow{color:#0f766e!important;text-shadow:none!important}
html[data-theme="light"] .preview-ended>strong,html[data-theme="light"] .preview-ended strong{color:#16212c!important;text-shadow:none!important}
html[data-theme="light"] .preview-ended>p,html[data-theme="light"] .preview-ended p{color:#5d6d7e!important}

/* ---- r29: SVG play icons (no emoji fallback in WeChat/Android webview) ---- */
.play-icon .ui-icon{width:18px;height:18px;margin-left:2px}
.quiz-media .play-icon .ui-icon{width:22px;height:22px;margin-left:2px}
.hero-feature-play .ui-icon{width:17px;height:17px;margin-left:2px}
.identify-cover-trigger .ui-icon{width:12px;height:12px;margin-left:1px}
.update-noimg .ui-icon{width:14px;height:14px}

/* ---- r29: correction panel opens/closes with motion instead of flashing ---- */
.pf-panel{display:grid!important;grid-template-rows:0fr;opacity:0;translate:0 -8px;margin-top:0!important;padding-top:0!important;padding-bottom:0!important;border-color:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;animation:none!important;transition:grid-template-rows .46s var(--ui-ease),opacity .3s ease,translate .46s var(--ui-ease),margin-top .46s var(--ui-ease),padding-top .46s var(--ui-ease),padding-bottom .46s var(--ui-ease),border-color .32s ease}
.pf-panel[hidden]{display:none!important}
.pf-panel.pf-open{grid-template-rows:1fr;opacity:1;translate:0 0;margin-top:16px!important;padding-top:18px!important;padding-bottom:20px!important;border-color:rgba(255,92,92,.35)!important}
html[data-theme="light"] .pf-panel.pf-open{border-color:#d9e0e8!important}
.pf-panel-in{overflow:hidden;min-height:0;display:flex;flex-direction:column;gap:12px}
.pf-panel.pf-open .pf-panel-in>*{animation:pfItem .5s var(--ui-ease) both}
.pf-panel.pf-open .pf-panel-in>*:nth-child(2){animation-delay:.07s}
.pf-panel.pf-open .pf-panel-in>*:nth-child(3){animation-delay:.14s}
.pf-panel.pf-open .pf-panel-in>*:nth-child(4){animation-delay:.21s}
@keyframes pfItem{from{opacity:0;translate:0 10px}to{opacity:1;translate:0 0}}

/* ---- r29: route cross-fade via View Transitions (Chromium / WeChat XWeb) ---- */
::view-transition-old(root){animation:vtOut .2s ease both}
::view-transition-new(root){animation:vtIn .34s cubic-bezier(.16,1,.3,1) both}
@keyframes vtOut{to{opacity:0;transform:translateY(-10px)}}
@keyframes vtIn{from{opacity:0;transform:translateY(12px)}}

/* ---- r29: scroll performance ---- */
/* blurred orbs + sticky blurred topbar were repainting every scroll frame */
.ambient-light i{will-change:auto}
body.is-scrolling .ambient-light i{animation-play-state:paused}
.topbar{backdrop-filter:blur(14px) saturate(140%)!important;-webkit-backdrop-filter:blur(14px) saturate(140%)!important}
.button,.wordmark,.cinema-cta,input,select,textarea,.preview-badge,.bili-preview-credit,.menu-toggle{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
#app section{content-visibility:auto;contain-intrinsic-size:auto 760px}
@media(max-width:980px){
  .topbar{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;background:color-mix(in srgb,var(--ui-bg) 92%,transparent)!important}
  .ambient-light i:nth-child(2),.ambient-light i:nth-child(3){display:none!important}
  .ambient-light i{filter:blur(70px)!important}
  .featured-story,.cinema-cta,.nav,.collection-sidebar,.journal-sidebar,.evidence-card,.identify-form,.quiz-media,.quiz-topbar,.identify-v2-layout,.quick-search,.fixbar,.pf-panel,.quiz-summary-panel{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
}

/* ---- r29b: every expanding surface gets motion ---- */
/* v54/v57 toggled the mobile nav with display:none, which killed its transition */
@media(max-width:980px){
  body:not(.nav-open) .nav:not(.open){display:flex!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important;transform:translateY(-12px) scale(.98)!important}
  .nav{transition:opacity .3s ease,transform .42s var(--ui-ease),visibility .3s!important}
  body.nav-open .nav,.nav.open{display:flex!important;opacity:1!important;visibility:visible!important;pointer-events:auto!important;transform:none!important}
  body.nav-open .nav a,.nav.open a{animation:csItem .4s var(--ui-ease) both}
  body.nav-open .nav a:nth-child(2),.nav.open a:nth-child(2){animation-delay:.05s}
  body.nav-open .nav a:nth-child(3),.nav.open a:nth-child(3){animation-delay:.1s}
  body.nav-open .nav a:nth-child(4),.nav.open a:nth-child(4){animation-delay:.15s}
  body.nav-open .nav a:nth-child(5),.nav.open a:nth-child(5){animation-delay:.2s}
  body.nav-open .nav .mobile-nav-extra,.nav.open .mobile-nav-extra{animation:csItem .4s var(--ui-ease) .26s both}
}
body.nav-open:before{animation:csFade .3s ease both}
/* person page: custom selects sit inside the labelled pill boxes */
.person-select .cs-wrap{height:100%}
.person-select .cs-toggle{height:100%;min-height:0;border:0;background:transparent;border-radius:0;padding:0 2px;font-weight:500}
.person-select .cs-menu{top:calc(100% + 10px)}
/* fixbar extra fields expand like the correction panel */
.fixbar-extra{display:grid!important;grid-template-rows:0fr;margin-top:0!important;padding-top:0!important;border-top-color:transparent!important;transition:grid-template-rows .42s var(--ui-ease),margin-top .42s var(--ui-ease),padding-top .42s var(--ui-ease),border-color .3s ease}
.fixbar-extra[hidden]{display:none!important}
.fixbar-extra.fx-open{grid-template-rows:1fr;margin-top:12px!important;padding-top:12px!important;border-top-color:var(--ui-line)!important}
.fixbar-extra-in{overflow:hidden;min-height:0;display:flex;flex-direction:column;gap:10px}
/* preview modal fades out instead of vanishing */
.preview-modal{transition:opacity .24s ease}
.preview-modal-backdrop{animation:csFade .3s ease both}
.preview-modal.leaving{opacity:0}
.preview-modal-box{transition:transform .24s var(--ui-ease),opacity .24s ease}
.preview-modal.leaving .preview-modal-box{animation:none;transform:translateY(12px) scale(.97);opacity:0}

/* Tablet navigation uses the same disclosure breakpoint as the menu itself. */
@media(min-width:761px) and (max-width:980px){
  .topbar-in .header-actions{display:flex!important;margin-left:auto!important;gap:8px!important}
  .topbar-in .desktop-actions{display:none!important}
  .topbar-in .menu-toggle{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:4px!important}
  .menu-toggle span{width:17px!important;height:1.5px!important}
}
/* A visible popup must be allowed to extend beyond its section's paint bounds. */
#app section:has(.cs-menu:not([hidden])){content-visibility:visible}
