/* BLOCK ocean layer and a clear blue-slate night palette; page geometry is unchanged. */
body.yvh-global-bg #body-wrap { background-image:none!important; }
#yvh-bg { position:fixed;inset:0;width:100%;height:100%;z-index:0;pointer-events:none; }
.ocean-motion-toggle {
  position:fixed;left:14px;bottom:14px;z-index:45;border:1px solid rgba(96,145,120,.22);
  border-radius:20px;padding:6px 11px;background:rgba(244,248,245,.88);color:#4f6e61;
  font:inherit;font-size:10px;line-height:1.5;cursor:pointer;backdrop-filter:blur(8px);
}
.ocean-motion-toggle:focus-visible {outline:2px solid #39765f;outline-offset:3px;}
.ocean-motion-toggle[hidden] {display:none;}
html[data-theme='dark'] {
  --global-bg:#202631;--card-bg:#2b3340;--font-color:#e5ebf2;
  --light-grey:#485568;--hr-border:#485568;--scrollbar-color:#849cac;
  --navpill-bg:rgba(43,51,64,.8);--navpill-border:rgba(182,219,207,.16);
  --navpill-accent:#b6dbcf;--skin-accent:#b6dbcf;
}
html[data-theme='dark'] body,
html[data-theme='dark'] body:has(.page-refresh),
html[data-theme='dark'] .home-dashboard,
html[data-theme='dark'] .yvh,
html[data-theme='dark'] #body-wrap.post {
  --page-bg:#202631;--page-paper:rgba(43,51,64,.97);--page-paper-solid:#2b3340;
  --page-ink:#e5ebf2;--page-muted:#b6c0ce;--page-accent:#b6dbcf;
  --page-rule:rgba(169,192,209,.22);--page-rule-soft:rgba(169,192,209,.13);
  --page-shadow:0 3px 10px rgba(13,18,27,.2),0 12px 26px rgba(13,18,27,.12);
  --yvh-card-offset:#18202a;--yvh-page-bg:#202631;
  --home-card:#2b3340;--home-border:rgba(169,192,209,.22);--home-text:#e5ebf2;
  --home-muted:#b6c0ce;--home-accent:#b6dbcf;--home-accent-strong:#d0e8df;
  --home-accent-soft:rgba(182,219,207,.12);--home-warm:#dbc39c;
  --home-shadow:5px 6px 0 #18202a;
  --yvh-ink:#e5ebf2;--yvh-ink-soft:#b6c0ce;--yvh-logo:#b6dbcf;--yvh-menu:#e5ebf2;
  --yvh-note-bg:#2b3340;--yvh-note-border:rgba(169,192,209,.22);
  --yvh-note-rule:rgba(169,192,209,.18);--yvh-halo:rgba(176,196,220,.10);
  --yvh-note-shadow:0 3px 12px rgba(13,18,27,.25);
}
html[data-theme='dark'] body {background:#202631!important;color:#e5ebf2;}
html[data-theme='dark'] body.home-lock::before {
  background:radial-gradient(125% 95% at 26% 8%,#2b3443 0%,#222a36 48%,#202631 100%);
}
html[data-theme='dark'] body.yvh-global-bg #body-wrap,
html[data-theme='dark'] #body-wrap.post {background:transparent!important;}
html[data-theme='dark'] .home-dashboard .yvh-col>.yvh-note {
  --yvh-card-shadow:#18202a;--yvh-card-shadow-hover:#394656;
  background:linear-gradient(145deg,#2b3340 0%,#2b3340 65%,#303a49 100%);
  border-color:rgba(169,192,209,.22);
}
html[data-theme='dark'] .home-dashboard .yvh-char::after {
  background:#171d26;border-color:rgba(182,205,221,.35);
  box-shadow:0 7px 18px rgba(13,18,27,.25);
}
html[data-theme='dark'] .home-dashboard .yvh-char::before {
  background:radial-gradient(ellipse,rgba(176,196,220,.1),transparent 70%);
}
html[data-theme='dark'] body #nav.yvh-shared-header {
  --yvh-ink:#e5ebf2;--yvh-logo:#b6dbcf;--yvh-menu:#e5ebf2;--yvh-ink-soft:#b6c0ce;
  --yvh-note-bg:#2b3340;--yvh-note-border:rgba(169,192,209,.2);
  --home-card:#2b3340;--home-border:rgba(169,192,209,.22);
  --home-text:#e5ebf2;--home-muted:#b6c0ce;--home-accent:#b6dbcf;--home-accent-strong:#d0e8df;
}
html[data-theme='dark'] body #nav.yvh-topbar.yvh-shared-header.is-scrolled {background:rgba(32,38,49,.94)!important;}
html[data-theme='dark'] #nav.yvh-shared-header #menus.yvh-menu {background:rgba(43,51,64,.8);border-color:rgba(182,205,221,.18);}
html[data-theme='dark'] body #sidebar #sidebar-menus.yvh-drawer,
html[data-theme='dark'] body #sidebar #sidebar-menus.yvh-drawer.open {
  background:#2b3340!important;color:#e5ebf2;
  --page-paper-solid:#2b3340;--page-ink:#e5ebf2;--page-muted:#b6c0ce;--page-accent:#b6dbcf;
  --home-card:#303a49;--home-border:rgba(169,192,209,.22);--home-text:#e5ebf2;
  --home-muted:#b6c0ce;--home-accent:#b6dbcf;--home-accent-strong:#d0e8df;
}
html[data-theme='dark'] .ocean-motion-toggle {background:rgba(43,51,64,.9);border-color:rgba(169,192,209,.25);color:#c4d9df;}
html[data-theme='dark'] .ocean-motion-toggle:focus-visible {outline-color:#b6dbcf;}
@media(max-width:600px) {.ocean-motion-toggle{left:10px;bottom:10px;padding:5px 9px;font-size:9px;}}
@media(prefers-reduced-motion:reduce) {.ocean-motion-toggle{display:none;}}

/* Frosted surfaces over the BLOCK sea, preserving existing shape and spacing. */
:root {
  --ocean-glass:rgba(255,255,255,.66);
  --ocean-glass-border:rgba(255,255,255,.78);
  --ocean-glass-shadow:0 8px 28px rgba(57,93,77,.09),inset 0 1px 0 rgba(255,255,255,.72);
}
html[data-theme='dark'] {
  --ocean-glass:rgba(43,51,64,.68);
  --ocean-glass-border:rgba(192,211,228,.24);
  --ocean-glass-shadow:0 8px 28px rgba(10,16,26,.2),inset 0 1px 0 rgba(231,240,255,.07);
}
body :is(
  .home-dashboard .yvh-col>.yvh-note,
  #archive .timeline-activity,
  .yvh-page-intro,
  #about-page .about-card,
  #about-yevirena-page .about-card,
  .dynamics-page .dynamics-entry,
  .dynamics-page .dynamics-index,
  #shuoshuo-page .shuoshuo-item,
  #photos-page .album-card,
  .flink-page > .flink,
  .flink-page .flink .flink-list>.flink-list-item,
  .article-hub .about-card,
  .article-detail__surface,
  #aside-content .card-widget
) {
  background:var(--ocean-glass)!important;
  border-color:var(--ocean-glass-border)!important;
  box-shadow:var(--ocean-glass-shadow)!important;
  -webkit-backdrop-filter:blur(18px) saturate(120%);
  backdrop-filter:blur(18px) saturate(120%);
}
body #nav.yvh-shared-header .yvh-music-mini__panel,
body #nav.yvh-shared-header .yvh-menu-submenu {
  background:var(--ocean-glass)!important;
  border-color:var(--ocean-glass-border)!important;
  box-shadow:var(--ocean-glass-shadow)!important;
  -webkit-backdrop-filter:blur(20px) saturate(120%);
  backdrop-filter:blur(20px) saturate(120%);
}
/* The old about-page rule painted an opaque field above the canvas. */
body.yvh-global-bg #body-wrap:has(#about-page),
body.yvh-global-bg #content-inner.layout:has(#about-page),
body.yvh-global-bg #body-wrap:has(#about-page) #page,
body.yvh-global-bg #about-page {
  background:transparent!important;
  background-image:none!important;
}
/* A trigger-width corridor, active only while the music menu is open. */
@media(hover:hover) and (pointer:fine) {
  #nav.yvh-shared-header .yvh-music-mini::after {
    left:0;right:0;width:100%;height:12px;pointer-events:none;
  }
  #nav.yvh-shared-header .yvh-music-mini:hover::after,
  #nav.yvh-shared-header .yvh-music-mini.is-open::after {pointer-events:auto;}
  #nav.yvh-shared-header:has(.yvh-menu-group:hover) .yvh-music-mini__panel {
    opacity:0;visibility:hidden;pointer-events:none;
  }
  #nav.yvh-shared-header:has(.yvh-menu-group:hover) .yvh-music-mini::after {pointer-events:none;}
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  :root {--ocean-glass:rgba(255,255,255,.94);}
  html[data-theme='dark'] {--ocean-glass:rgba(43,51,64,.96);}
}
/* No separate animation button; reduced-motion and hidden-tab suspension remain. */
.ocean-motion-toggle {display:none!important;}

/* The existing central navigation capsule expands into the full glass header. */
.yvh-nav-surface {display:none;pointer-events:none;}
@media(min-width:881px) {
  html body #nav.yvh-topbar.yvh-shared-header[data-nav-morph='ready'],
  html body #nav.yvh-topbar.yvh-shared-header[data-nav-morph='ready'].is-scrolled {
    isolation:isolate;background:transparent!important;box-shadow:none!important;
    backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  }
  #nav.yvh-shared-header[data-nav-morph='ready'] .yvh-nav-surface {
    display:block;position:absolute;z-index:-1;left:50%;top:50%;
    width:var(--nav-pill-width);height:var(--nav-pill-height);
    transform:translate(-50%,-50%);box-sizing:border-box;border-radius:40px;
    border:1px solid var(--ocean-glass-border);background:var(--ocean-glass);
    box-shadow:0 2px 12px rgba(40,67,56,.04);
    -webkit-backdrop-filter:blur(18px) saturate(120%);
    backdrop-filter:blur(18px) saturate(120%);
    transition:width .55s cubic-bezier(.22,1,.36,1),height .55s cubic-bezier(.22,1,.36,1),border-radius .55s cubic-bezier(.22,1,.36,1),box-shadow .55s ease;
  }
  #nav.yvh-shared-header[data-nav-morph='ready'].is-scrolled .yvh-nav-surface {
    width:100%;height:100%;border-radius:0;
    box-shadow:0 2px 12px rgba(24,36,48,.08);
  }
  #nav.yvh-shared-header[data-nav-morph='ready'] #menus.yvh-menu {
    background:transparent!important;border-color:transparent!important;box-shadow:none!important;
    -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
  }
}
@media(prefers-reduced-motion:reduce) {
  #nav.yvh-shared-header .yvh-nav-surface {transition:none!important;}
}

/* Code bodies must obey the toolbar state, including table-based highlighting. */
#article-container.post-content figure.highlight > .highlight-tools.closed ~ * {
  display:none;
}
/* Use the same blue-slate night palette as the surrounding frosted cards. */
html[data-theme='dark'] #post.article-detail #article-container figure.highlight {
  --hl-color:#e5ebf2;--hl-bg:#242d3a;--hltools-bg:#1e2632;
  --hltools-color:#bac8d6;--hlnumber-bg:#222a37;--hlnumber-color:#98a9bc;
  --hlscrollbar-bg:#526174;
  --hlexpand-bg:linear-gradient(180deg,rgba(36,45,58,.6),rgba(36,45,58,.96));
  border-color:rgba(169,192,209,.22);
}
html[data-theme='dark'] #post.article-detail #article-container figure.highlight pre :is(.comment,.quote) {color:#a6b4c4;}
html[data-theme='dark'] #post.article-detail #article-container figure.highlight pre :is(.string,.value,.inheritance,.header,.special) {color:#b8d6ad;}
html[data-theme='dark'] #post.article-detail #article-container figure.highlight pre :is(.keyword,.title,.tag,.meta) {color:#b8c9ee;}
html[data-theme='dark'] #post.article-detail #article-container figure.highlight pre :is(.number,.literal,.constant,.built_in) {color:#e6c59d;}
html[data-theme='dark'] #post.article-detail #article-container figure.highlight pre :is(.function,.attribute,.params) {color:#add5df;}
html[data-theme='dark'] #post.article-detail #article-container figure.highlight pre :is(.variable,.regexp,.tag .name) {color:#e3b6bd;}
html[data-theme='dark'] #post.article-detail #article-container code:not(figure.highlight code):not(pre code) {
  background:rgba(182,205,221,.12);color:#d1e5dc;
}

/* Reveal only the code body while its enclosing frame animates closed. */
#article-container.post-content figure.highlight > .highlight-tools.closed.is-code-animating ~ table,
#article-container.post-content figure.highlight > .highlight-tools.closed.is-code-animating ~ pre {
  display:block;
}


/* AI-authored weekly issues have their own blue identity, scoped to that page. */
body:has(#post.literature-weekly) {background:#f2f7fd!important;}
body:has(#post.literature-weekly) #body-wrap.post {background:transparent!important;}
body:has(#post.literature-weekly) #yvh-bg {filter:hue-rotate(45deg);}
#content-inner:has(#post.literature-weekly) {
  --page-bg:#f2f7fd;--page-paper:rgba(248,252,255,.96);--page-paper-solid:#f8fbff;
  --page-ink:#263c53;--page-muted:#627891;--page-accent:#4079b8;--page-accent-soft:rgba(64,121,184,.11);
  --page-rule:rgba(76,126,179,.22);--page-rule-soft:rgba(76,126,179,.12);
  --page-shadow:0 8px 28px rgba(38,78,128,.1);
  --home-card:#f8fbff;--home-text:#263c53;--home-muted:#627891;--home-border:rgba(76,126,179,.22);
  --home-accent:#4079b8;--home-accent-strong:#3269a7;--home-accent-soft:rgba(64,121,184,.11);
  --ocean-glass:rgba(248,252,255,.73);--ocean-glass-border:rgba(117,158,204,.25);
  --ocean-glass-shadow:0 8px 28px rgba(38,78,128,.1),inset 0 1px 0 rgba(255,255,255,.8);
}
html[data-theme='dark'] body:has(#post.literature-weekly) {background:#1b2534!important;}
html[data-theme='dark'] #content-inner:has(#post.literature-weekly) {
  --page-bg:#1b2534;--page-paper:rgba(37,52,72,.96);--page-paper-solid:#253448;
  --page-ink:#e6edf8;--page-muted:#afc1d9;--page-accent:#9cc6ff;--page-accent-soft:rgba(156,198,255,.12);
  --page-rule:rgba(156,198,255,.26);--page-rule-soft:rgba(156,198,255,.14);
  --page-shadow:0 8px 28px rgba(8,18,33,.24);
  --home-card:#253448;--home-text:#e6edf8;--home-muted:#afc1d9;--home-border:rgba(156,198,255,.26);
  --home-accent:#9cc6ff;--home-accent-strong:#b6d6ff;--home-accent-soft:rgba(156,198,255,.12);
  --ocean-glass:rgba(37,52,72,.76);--ocean-glass-border:rgba(156,198,255,.26);
  --ocean-glass-shadow:0 8px 28px rgba(8,18,33,.24),inset 0 1px 0 rgba(220,235,255,.06);
}
#post.literature-weekly .weekly-ai-notice {display:inline-flex;align-items:center;gap:7px;padding:6px 11px;margin-bottom:16px;border:1px solid var(--page-rule);border-radius:20px;background:var(--page-accent-soft);color:var(--page-accent);font-size:.78rem;}
#post.literature-weekly .weekly-ai-notice::before {content:'';width:6px;height:6px;border-radius:50%;background:currentColor;}
html body #post.literature-weekly .article-detail__tag {border-color:var(--page-rule);background:var(--page-accent-soft);color:var(--home-accent-strong);}
html body #post.literature-weekly #article-container blockquote {border-left-color:var(--page-accent);background:var(--page-accent-soft);}

/* Weekly identity extends to the persistent navigation and mobile drawer. */
body:has(#post.literature-weekly) {
  --weekly-ink:#263c53;--weekly-muted:#627891;--weekly-accent:#4079b8;
  --weekly-strong:#3269a7;--weekly-paper:#f8fbff;
  --weekly-rule:rgba(76,126,179,.22);--weekly-soft:rgba(64,121,184,.11);
  --ocean-glass:rgba(248,252,255,.73);--ocean-glass-border:rgba(117,158,204,.25);
  --ocean-glass-shadow:0 8px 28px rgba(38,78,128,.1),inset 0 1px 0 rgba(255,255,255,.8);
  --navpill-accent:var(--weekly-accent);--navpill-hover:var(--weekly-soft);
  --navpill-border:var(--weekly-rule);--navpill-active-bg:#edf5ff;
  --navpill-active-shadow:0 2px 8px rgba(64,121,184,.12);
}
html[data-theme='dark'] body:has(#post.literature-weekly) {
  --weekly-ink:#e6edf8;--weekly-muted:#afc1d9;--weekly-accent:#9cc6ff;
  --weekly-strong:#b6d6ff;--weekly-paper:#253448;
  --weekly-rule:rgba(156,198,255,.26);--weekly-soft:rgba(156,198,255,.12);
  --ocean-glass:rgba(37,52,72,.76);--ocean-glass-border:rgba(156,198,255,.26);
  --ocean-glass-shadow:0 8px 28px rgba(8,18,33,.24),inset 0 1px 0 rgba(220,235,255,.06);
  --navpill-active-bg:rgba(156,198,255,.13);
  --navpill-active-shadow:0 2px 8px rgba(8,18,33,.24);
}
html body:has(#post.literature-weekly) #nav.yvh-topbar.yvh-shared-header {
  --yvh-ink:var(--weekly-ink);--yvh-menu:var(--weekly-ink);--yvh-logo:var(--weekly-accent);
  --yvh-ink-soft:var(--weekly-muted);--yvh-note-bg:var(--weekly-paper);
  --yvh-note-border:var(--weekly-rule);--yvh-halo:var(--weekly-soft);
  --home-accent:var(--weekly-accent);--home-accent-strong:var(--weekly-strong);
  --home-card:var(--weekly-paper);--home-border:var(--weekly-rule);
  --home-text:var(--weekly-ink);--home-muted:var(--weekly-muted);
}
html body:has(#post.literature-weekly) #sidebar #sidebar-menus.yvh-drawer {
  --drawer-paper:var(--weekly-paper);--drawer-ink:var(--weekly-ink);
  --drawer-accent:var(--weekly-accent);--drawer-border:var(--weekly-rule);
  --page-paper-solid:var(--weekly-paper);--page-ink:var(--weekly-ink);
  --page-muted:var(--weekly-muted);--page-accent:var(--weekly-accent);--page-rule:var(--weekly-rule);
  --home-card:var(--weekly-paper);--home-text:var(--weekly-ink);--home-muted:var(--weekly-muted);
  --home-accent:var(--weekly-accent);--home-accent-strong:var(--weekly-strong);--home-border:var(--weekly-rule);
  background:var(--weekly-paper)!important;color:var(--weekly-ink);
}
html body:has(#post.literature-weekly) #nav.yvh-shared-header .yvh-brand-flower {border-color:var(--weekly-rule);}
html body:has(#post.literature-weekly) #nav.yvh-shared-header.is-scrolled {background:var(--ocean-glass)!important;}
/* Desktop morph uses only its surface, keeping the same transparent fixed shell. */
@media(min-width:881px) {
  html body:has(#post.literature-weekly) #nav.yvh-shared-header[data-nav-morph='ready'].is-scrolled {background:transparent!important;}
}
body.weekly-palette-transition {--weekly-color-duration:1s;--weekly-color-easing:cubic-bezier(.42,0,.58,1);}
/* Animate the actual painted properties when PJAX swaps weekly/ordinary content. */
body,body.home-lock,body.yvh-global-bg {transition:background-color var(--weekly-color-duration,.55s) var(--weekly-color-easing,ease);}
#yvh-bg {transition:filter var(--weekly-color-duration,.55s) var(--weekly-color-easing,ease);}
#nav.yvh-shared-header :is(.yvh-brand,.yvh-brand-type strong,.yvh-brand-type small,.yvh-menu-english) {transition:color var(--weekly-color-duration,.55s) var(--weekly-color-easing,ease);}
#nav.yvh-shared-header .yvh-brand-flower {
  transition:transform .6s,color var(--weekly-color-duration,.55s) var(--weekly-color-easing,ease),background-color var(--weekly-color-duration,.55s) var(--weekly-color-easing,ease),border-color var(--weekly-color-duration,.55s) var(--weekly-color-easing,ease),box-shadow var(--weekly-color-duration,.55s) var(--weekly-color-easing,ease);
}
#nav.yvh-shared-header :is(.yvh-theme-btn,.yvh-music-mini__trigger,#toggle-menu) {
  transition:transform .2s,color var(--weekly-color-duration,.55s) var(--weekly-color-easing,ease),background-color var(--weekly-color-duration,.55s) var(--weekly-color-easing,ease),border-color var(--weekly-color-duration,.55s) var(--weekly-color-easing,ease),box-shadow var(--weekly-color-duration,.55s) var(--weekly-color-easing,ease);
}
#nav.yvh-shared-header[data-nav-morph='ready'] .yvh-nav-surface {
  transition:width .55s cubic-bezier(.22,1,.36,1),height .55s cubic-bezier(.22,1,.36,1),border-radius .55s cubic-bezier(.22,1,.36,1),box-shadow var(--weekly-color-duration,.55s) var(--weekly-color-easing,ease),background-color var(--weekly-color-duration,.55s) var(--weekly-color-easing,ease),border-color var(--weekly-color-duration,.55s) var(--weekly-color-easing,ease);
}
#nav.yvh-shared-header :is(.yvh-nav-indicator,.yvh-menu-submenu) {
  transition:opacity .2s,visibility .2s,transform .2s,background-color var(--weekly-color-duration,.55s) var(--weekly-color-easing,ease),border-color var(--weekly-color-duration,.55s) var(--weekly-color-easing,ease),box-shadow var(--weekly-color-duration,.55s) var(--weekly-color-easing,ease);
}
body #nav.yvh-topbar.yvh-shared-header {transition:background-color var(--weekly-color-duration,.35s) var(--weekly-color-easing,ease),box-shadow var(--weekly-color-duration,.35s) var(--weekly-color-easing,ease)!important;}
#nav.yvh-shared-header #menus.yvh-menu > a,
#nav.yvh-shared-header #menus .yvh-menu-group__toggle,
#nav.yvh-shared-header .yvh-menu-submenu a {transition:background-color var(--weekly-color-duration,.25s) var(--weekly-color-easing,ease),color var(--weekly-color-duration,.25s) var(--weekly-color-easing,ease),box-shadow var(--weekly-color-duration,.25s) var(--weekly-color-easing,ease);}
@media(prefers-reduced-motion:reduce) {
  body,body.home-lock,body.yvh-global-bg,body #nav.yvh-topbar.yvh-shared-header,#nav.yvh-shared-header #menus a,#nav.yvh-shared-header #menus .yvh-menu-group__toggle,#yvh-bg,#nav.yvh-shared-header :is(.yvh-brand,.yvh-brand-type strong,.yvh-brand-type small,.yvh-menu-english,.yvh-brand-flower,.yvh-theme-btn,.yvh-music-mini__trigger,#toggle-menu,.yvh-nav-surface,.yvh-nav-indicator,.yvh-menu-submenu) {transition:none!important;}
}

