/* DELTA V88 — final visual stability + mobile polish */
html[data-theme="dark"]{background:#071421!important;color-scheme:dark}
html[data-theme="light"]{background:#f4f8fc!important;color-scheme:light}
/* One stable theme control: dark = left, light = right. */
.theme-toggle .theme-track,.gateway-theme-toggle .theme-track{
  direction:ltr!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;
  position:relative!important;width:78px!important;height:32px!important;padding:3px!important;border-radius:999px!important;
  overflow:hidden!important;box-shadow:inset 0 0 0 1px rgba(100,190,225,.16)!important;
}
.theme-toggle .theme-knob,.gateway-theme-toggle .theme-knob{
  width:26px!important;height:26px!important;flex:0 0 26px!important;margin:0!important;transform:translateX(0)!important;
  border-radius:50%!important;transition:transform .28s cubic-bezier(.2,.8,.2,1),background .22s ease,box-shadow .22s ease!important;
  position:relative!important;z-index:2!important;
}
html[data-theme="dark"] .theme-toggle .theme-track,html[data-theme="dark"] .gateway-theme-toggle .theme-track{justify-content:flex-start!important;background:#102b3e!important}
html[data-theme="dark"] .theme-toggle .theme-knob,html[data-theme="dark"] .gateway-theme-toggle .theme-knob{transform:translateX(0)!important;background:linear-gradient(145deg,#dff7ff,#58c9ff)!important}
html[data-theme="light"] .theme-toggle .theme-track,html[data-theme="light"] .gateway-theme-toggle .theme-track{justify-content:flex-end!important;background:linear-gradient(90deg,#dceaf3,#fff0c4)!important}
html[data-theme="light"] .theme-toggle .theme-knob,html[data-theme="light"] .gateway-theme-toggle .theme-knob{transform:translateX(0)!important;background:linear-gradient(145deg,#fff,#ffd56e)!important}
.theme-toggle .theme-track::before,.gateway-theme-toggle .theme-track::before{content:"☾"!important;position:absolute!important;left:8px!important;top:5px!important;font-size:13px!important;z-index:1!important;pointer-events:none!important}
.theme-toggle .theme-track::after,.gateway-theme-toggle .theme-track::after{content:"☀"!important;position:absolute!important;right:8px!important;top:5px!important;font-size:13px!important;z-index:1!important;pointer-events:none!important}
html[data-theme="light"] .theme-toggle .theme-track::before,html[data-theme="light"] .gateway-theme-toggle .theme-track::before{opacity:.5}
html[data-theme="dark"] .theme-toggle .theme-track::after,html[data-theme="dark"] .gateway-theme-toggle .theme-track::after{opacity:.45}
/* Strong text contrast on both modes. */
html[data-theme="light"] .hero-core h1,html[data-theme="light"] .page-hero h1,html[data-theme="light"] .section h2,html[data-theme="light"] .section h3{color:#102f49!important}
html[data-theme="light"] .hero-core p,html[data-theme="light"] .section p,html[data-theme="light"] .section-head p{color:#4d687c!important}
html[data-theme="dark"] .hero-core h1,html[data-theme="dark"] .page-hero h1,html[data-theme="dark"] .section h2,html[data-theme="dark"] .section h3{color:#effaff!important}
html[data-theme="dark"] .hero-core p,html[data-theme="dark"] .section p,html[data-theme="dark"] .section-head p{color:#b8cfdd!important}
/* Mobile: avoid squeezed header controls and make menu/language touch targets reliable. */
@media(max-width:900px){
  .header.page .nav{gap:8px!important}.header.page .logo img{width:82px!important;max-width:82px!important;height:58px!important}
  .header.page .head-actions{gap:6px!important}.header.page .theme-toggle{padding:3px!important}.header.page .theme-toggle .theme-track{width:58px!important;height:28px!important}.header.page .theme-toggle .theme-knob{width:22px!important;height:22px!important;flex-basis:22px!important}
  .header.page .lang-current{min-width:88px!important;min-height:38px!important}.header.page .menu{min-width:40px!important;height:40px!important}
}
@media(max-width:560px){
  .header.page .logo img{width:72px!important;max-width:72px!important;height:52px!important}.header.page .theme-toggle .theme-track{width:52px!important}.header.page .lang-current{min-width:40px!important;width:40px!important;padding-inline:6px!important;font-size:0!important}.header.page .lang-current::after{content:'文'!important;font-size:16px!important}
  .header.page .links{inset:66px 8px auto 8px!important;max-height:calc(100vh - 76px)!important;border-radius:18px!important}
  .container{width:min(100% - 18px,1180px)!important}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}.stat{min-height:88px!important;padding:12px!important}.stat strong{font-size:25px!important}
  .intro-video-card{grid-template-columns:1fr!important;gap:18px!important}.intro-video-frame{min-height:210px!important}
  .dy-panel{bottom:84px!important;width:calc(100vw - 16px)!important;right:8px!important;left:8px!important;border-radius:22px!important}.dy-launcher{right:14px!important;bottom:14px!important}
}
