/* Shared three-mode control, retaining the earlier site's appearance choices. */
:root{--theme-control-bg:#101a2d;--theme-menu-shadow:0 16px 45px #0005}
:root[data-theme=light]{--panel:#fff;--theme-control-bg:#f8fafc;--theme-menu-shadow:0 16px 45px #17325320}
.theme-switcher{position:relative;flex-shrink:0}
.theme-switcher .theme-toggle{display:flex;align-items:center;justify-content:center;gap:7px;width:auto;height:auto;min-height:38px;padding:8px 11px;border:1px solid var(--line);border-radius:8px;background:var(--theme-control-bg);color:var(--text);font:inherit;font-size:11px;white-space:nowrap;cursor:pointer}
.theme-toggle>[data-theme-icon]{display:inline-flex;align-items:center;justify-content:center;width:19px;height:19px;color:var(--cyan)}
.theme-toggle [data-theme-icon] svg{width:18px;height:18px}
:root[data-theme=light] .theme-toggle .theme-sun,:root[data-theme=dark] .theme-toggle .theme-moon{display:block}
:root[data-theme=dark] .theme-toggle .theme-sun,:root[data-theme=light] .theme-toggle .theme-moon{display:none}
.theme-toggle .theme-chevron{width:13px;height:13px;color:var(--muted)}
.theme-menu{position:absolute;right:0;top:calc(100% + 12px);z-index:80;width:218px;padding:8px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text);box-shadow:var(--theme-menu-shadow)}
.theme-menu[hidden]{display:none!important}
.theme-menu-title{display:block;padding:8px 10px 10px;font-size:10px;letter-spacing:1px;color:var(--muted)}
.theme-menu button{display:flex;align-items:center;gap:10px;width:100%;padding:10px 11px;margin:2px 0;border-radius:6px;background:transparent;color:var(--text);font:inherit;font-size:12px;cursor:pointer;text-align:left}
.theme-menu button>span{width:18px;text-align:center;font-size:16px;color:var(--muted)}
.theme-menu button:hover{background:var(--theme-control-bg)}
.theme-menu button[aria-pressed=true]{background:#2e7cf61c;color:#7cb5ff}
.theme-menu button[aria-pressed=true]:after{content:'✓';margin-left:auto;color:inherit}
.theme-menu small{display:block;padding:10px 9px 6px;border-top:1px solid var(--line);margin-top:6px;color:var(--muted);font-size:10px}
:root[data-theme=light] .theme-menu button[aria-pressed=true]{background:#eff6ff;color:#1d4ed8}
@media(max-width:950px){.theme-switcher .theme-toggle{padding:8px;min-width:36px}.theme-toggle-label,.theme-toggle .theme-chevron{display:none}}
@media(max-width:540px){.theme-menu{width:205px}.theme-switcher .theme-toggle{min-height:32px;min-width:32px;padding:6px}}
@media(max-width:360px){.header-inner>.theme-switcher{margin-left:auto}.header-inner>.menu-toggle{margin-left:0}}

/* Shared icon control for all routes, including the panoramic homepage. */
.theme-switcher-compact .theme-toggle{width:44px;height:44px;min-width:44px;min-height:44px;padding:0;gap:0;border-radius:50%;border-color:#164e8626;background:#ffffff40;color:#164e86;box-shadow:inset 0 1px 0 #ffffff70,0 3px 12px #17477608;backdrop-filter:blur(12px);transition:background .2s,border-color .2s,box-shadow .2s}
.theme-switcher-compact .theme-toggle>[data-theme-icon]{width:22px;height:22px;color:inherit}
.theme-switcher-compact .theme-toggle [data-theme-icon] svg{width:20px;height:20px;stroke-width:1.65}
.theme-switcher-compact .theme-toggle:hover,.theme-switcher-compact .theme-toggle[aria-expanded=true]{background:#ffffffb3;border-color:#164e8640;box-shadow:0 4px 16px #164e8612}
.theme-switcher-compact .theme-toggle:focus-visible{outline:2px solid #0876c9;outline-offset:4px}
.theme-switcher-compact .theme-menu{border-radius:16px;padding:10px}
.theme-switcher-compact .theme-menu button{border-radius:9px}
:root[data-theme=dark] .theme-switcher-compact .theme-toggle{background:#b2d9ff14;border-color:#96c8ff33;color:#d3e9ff;box-shadow:inset 0 1px 0 #ffffff0a,0 3px 12px #0000000a}
:root[data-theme=dark] .theme-switcher-compact .theme-toggle:hover,:root[data-theme=dark] .theme-switcher-compact .theme-toggle[aria-expanded=true]{background:#b2d9ff26;border-color:#96c8ff66;box-shadow:0 4px 16px #0002}
:root[data-theme=dark] .theme-switcher-compact .theme-toggle:focus-visible{outline-color:#7bcaff}
@media(max-width:950px){.header-inner>.theme-switcher-compact{margin-left:auto}}
@media(max-width:540px){.theme-switcher-compact .theme-toggle{width:40px;height:40px;min-width:40px;min-height:40px;padding:0}}
