/* App-wide reading scale and map control hierarchy. */
:root{--tc-readable:#b6c5d0;--tc-solid:#101b27;--tc-divider:#2d3d4d;--tc-focus:#83d8ec}
body{font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif}
body button,body input,body select{font:inherit}
body :is(button,a,input,select,summary):focus-visible{outline:2px solid var(--tc-focus)!important;outline-offset:3px!important}
body .tc-shell-brand img,body .tc-brand-lockup,body .ref-brand-lockup img{animation:none!important;filter:none!important}
body #panel{background:#101b27!important;border:1px solid #344354!important;box-shadow:0 12px 32px #0005!important;padding:18px!important;gap:12px!important;border-radius:18px!important;overflow-y:auto!important;overflow-x:hidden!important}
body #panel .panel-title{padding:0!important;flex:none}
body #panel .panel-title:before{display:none!important}
body #panel .panel-title h1{font:700 22px/1.25 Inter,system-ui,sans-serif!important;letter-spacing:-.025em!important}
body #panel .panel-title p{font-size:12px!important;color:var(--tc-readable)!important;line-height:1.5;margin:4px 0 0}
body #panel :is(input,button){font-size:13px!important}
body #panel input{min-height:44px!important;padding:10px 12px!important;border:1px solid #3a4a5c!important;background:#0b1420!important;border-radius:10px!important;color:#f3f6fa!important}
body #panel input::placeholder{color:#b1beca!important;font-size:13px}
body #panel .map-region-switch{margin:0!important;padding:4px!important;border-radius:10px!important;background:#07111c!important;flex:none}
body #panel .map-region-switch button{min-height:40px!important;font-weight:650!important}
body #panel .map-region-switch button.active{background:#f4ae56!important;box-shadow:none!important;color:#201506!important}
body #panel .map-region-switch{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important}
body #panel .map-region-switch .tc-dm-entry{display:block!important;width:auto!important;min-width:0!important;min-height:40px!important;margin:0!important;padding:8px 4px!important;border:0!important;border-radius:8px!important;background:transparent!important;font-size:13px!important;color:#c5d7e4!important}
body #panel .map-region-switch .tc-dm-entry:hover{background:#23384a!important;color:#fff!important}
body #panel .map-location-search{margin:0!important;flex:none}
body #panel .layer-section{flex:0 0 auto!important;min-height:0!important;height:auto!important;max-height:none!important;margin:0!important;padding:14px 0 0!important;border-top:1px solid var(--tc-divider)!important}
body #panel #layers{height:auto!important;max-height:none!important;overflow:visible!important;padding:0!important;gap:5px!important;flex:none!important}
body #panel .layer-heading{margin-bottom:10px!important;align-items:center}
body #panel .layer-heading strong{font:650 15px/1.3 Inter,system-ui,sans-serif!important;letter-spacing:0!important}
body #panel .layer-heading-actions button{min-height:36px!important;padding:6px 10px!important;background:#1b2a39!important;color:#dae3eb!important;font-size:12px!important}
body #panel .layer-dropdown{border:0!important;background:transparent!important;border-radius:8px!important}
body #panel .layer-dropdown summary{min-height:44px!important;font-size:14px!important;padding:0 8px!important;color:#e4ebf1!important;font-weight:600!important}
body #panel .layer-count{font-size:12px!important;color:#adbdcb!important}
body #panel .layer-toggle{min-height:44px!important;padding:9px!important;grid-template-columns:22px 1fr auto!important;gap:10px!important;border-radius:8px!important;background:#172535!important;color:#cbd7e0!important}
body #panel .layer-toggle.on{border-color:#587b91!important;background:#213a4a!important;color:#fff!important}
body #panel .layer-toggle.on .map-symbol{color:#8ce0ee!important}
body #panel .layer-toggle>span:last-child{font-size:11px!important;color:#a9c1d1!important}
body #panel .layer-items{padding:2px 0 8px!important}
body #panel .panel-actions{position:static!important;display:grid!important;grid-template-columns:1fr 1fr;gap:8px!important;padding:12px 0 0!important;margin:0!important;background:transparent!important;border-top:1px solid var(--tc-divider)!important;flex:none}
body #panel .panel-actions button{min-height:42px!important;background:#1d2d3d!important;color:#e9eff4!important}
body #panel .hint{font-size:12px!important;color:var(--tc-readable)!important;line-height:1.5!important;margin:0!important;flex:none}
.tc-map-options{flex:none;border-top:1px solid var(--tc-divider);padding-top:4px}
.tc-map-options>summary{cursor:pointer;font-size:13px;font-weight:600;min-height:40px;display:flex;align-items:center;color:#b6c7d5;list-style:none}
.tc-map-options>summary:after{content:'+';margin-left:auto;font-size:20px;font-weight:400}
.tc-map-options[open]>summary:after{content:'−'}
.tc-map-options-body{display:grid;gap:10px;padding:6px 0 10px}
body #panel .map-time-card{padding:12px!important;margin:0!important;background:#182839!important}
body #panel .map-time-copy{display:grid;gap:5px!important}
body #panel .map-time-copy strong{font-size:13px!important}
body #panel .map-time-copy small,body #panel .server-connect-row small,body #panel .guide-player-note small{font-size:12px!important;color:var(--tc-readable)!important;line-height:1.5!important}
body #panel .map-time-switch button{min-height:40px!important}
body #panel .server-connect-row{margin:0!important;padding:12px!important;gap:10px;flex-wrap:wrap}
body #panel .server-connect-row strong{font-size:13px!important}
body #panel #connect-server{min-height:40px!important}
body #panel #map-3d-toggle{min-height:56px!important;margin:0!important;padding:12px!important}
body #panel #map-3d-toggle strong{font-size:13px!important}
body #panel #map-3d-toggle small{font-size:12px!important;color:var(--tc-readable)!important;margin-top:4px}
body #panel .map-search-results strong{font-size:14px!important}body #panel .map-search-results small{font-size:12px!important;color:#b0c4d2!important}
body .tc-gps-main,body .tc-gps-detail{background:#101b27!important;border-color:#344354!important;box-shadow:0 8px 24px #0004!important;backdrop-filter:none!important}
body .tc-gps-brand small{display:none!important}
body .tc-gps-brand strong{font-size:16px!important;font-weight:650!important}
body .tc-gps-brand em{font-size:12px!important;line-height:1.4!important;color:#b4c4d0!important;margin-top:4px}
body .tc-gps-nav small{font:500 11px/1.3 Inter,system-ui,sans-serif!important;letter-spacing:0!important;color:#b7c7d2!important}
body .tc-gps-nav strong{font-size:14px!important}
body .tc-gps-main>button{min-width:40px;min-height:40px}
body .tc-gps-detail :is(button,select){font-size:13px!important;min-height:40px!important}
body .tc-gps-fast,body .tc-gps-route-copy,body .tc-gps-live-row label{font-size:13px!important;line-height:1.5!important;color:#c0ccd6!important}
.tc-map-search-trigger{display:none;background:transparent!important;color:#e8eff6!important;border:0!important;text-align:left!important;font-size:15px!important;font-weight:550!important;padding:10px 12px!important}
.tc-map-search-trigger:before{content:'⌕';font-size:24px;margin-right:12px;vertical-align:middle;color:#a9c4d7}
body .tc-gps.idle .tc-gps-main{min-height:52px!important;display:flex!important;padding:2px 6px!important;border-radius:12px!important}
body .tc-gps.idle .tc-map-search-trigger{display:block;flex:1}
body .tc-gps.idle :is(.tc-gps-brand,.tc-gps-nav){display:none!important}
body .tc-gps.idle #tc-gps-collapse{display:none!important}
body .tc-gps.idle .tc-gps-detail{display:none!important}
body .map-4d-hud{background:#101b27!important;border-color:#344354!important;box-shadow:0 8px 24px #0004!important;backdrop-filter:none!important}
body .map-4d-hud button,body .map-4d-hud select{font-size:12px!important;min-height:40px!important}
body .map-4d-top b{font-size:11px!important;letter-spacing:.02em!important}
body .landmark-icon{box-shadow:0 2px 5px #0007!important;border-width:2px!important}
body #map .leaflet-top{top:var(--tc-gps-hud-top,134px)!important}
body #map .leaflet-left{left:16px!important}
body #map .leaflet-left .leaflet-control{margin:0!important}
body .leaflet-control-zoom a{width:40px!important;height:40px!important;line-height:40px!important}
body .tc-home-hero h2{font-size:clamp(32px,3.7vw,52px)!important;line-height:1.1!important;letter-spacing:-.04em!important}
body .tc-home-hero p{font-size:16px!important;line-height:1.65!important;color:#b9c6d1!important}
body .tc-home-eyebrow,body .tc-card-head,body .tc-home-section>div>small{font-size:12px!important;letter-spacing:.08em!important}
body .tc-home-quick button,body .tc-home-card>button{font-size:14px!important;min-height:44px!important}
body .tc-home-card :is(p,.tc-library-note,.tc-night-note small){font-size:14px!important;line-height:1.6!important;color:#b6c5d1!important}
body .tc-card-head b,body .tc-home-pill,body .tc-library-stats span,body .tc-progress-breakdown small,body .tc-progress-ring>span{font-size:12px!important;color:#bbccd8!important}
body .tc-workspace-row button b{font-size:14px!important}body .tc-workspace-row button small{font-size:12px!important;color:#aebecc!important}
body .tc-premium-nudge :is(b,span){font-size:13px!important;line-height:1.5!important}
@media(min-width:768px){
 body #tc-shell-nav{display:flex!important;width:232px!important;padding:16px 12px!important;background:#0c1621!important;box-shadow:none!important}
 body #tc-shell-nav .tc-shell-brand{height:58px!important;min-height:58px!important;padding:0 8px 16px!important;justify-content:flex-start!important}
 body #tc-shell-nav .tc-shell-brand img{width:188px!important;height:auto!important;max-height:42px!important;object-fit:contain!important;border-radius:0!important}
 body #tc-shell-nav .tc-shell-links{overflow-y:auto!important;min-height:0!important;flex:1!important;gap:3px!important;padding:12px 0!important}
 body #tc-shell-nav .tc-shell-links button{min-height:44px!important;display:grid!important;grid-template-columns:28px 1fr!important;grid-template-rows:1fr!important;gap:12px!important;padding:8px 10px!important;border-radius:8px!important;flex:none!important;transform:none!important}
 body #tc-shell-nav .tc-shell-links button>span{grid-row:1!important;width:28px!important;height:28px!important;background:transparent!important;box-shadow:none!important}
 body #tc-shell-nav .tc-shell-links button>span img{width:27px!important;height:27px!important}
 body #tc-shell-nav .tc-shell-links button b{display:block!important;align-self:center!important;font-size:14px!important;font-weight:550!important;line-height:1.3!important}
 body #tc-shell-nav .tc-shell-links button small{display:none!important}
 body #tc-shell-nav .tc-shell-links button.active{background:#213444!important;border-color:#466379!important;box-shadow:inset 3px 0 #f2b461!important}
 .tc-nav-group{display:block;color:#a0b0bf;font-size:11px;letter-spacing:.08em;text-transform:uppercase;padding:16px 10px 8px}
 body #tc-shell-nav .tc-shell-foot{flex:none;margin-top:0;padding-top:10px}
 body #tc-shell-nav .tc-shell-account{min-height:54px!important;padding:8px!important;background:#172636!important;border:1px solid #2c4053!important;gap:8px!important}
 body #tc-shell-nav .tc-shell-account-copy b{font-size:13px!important}body #tc-shell-nav .tc-shell-account-copy small{font-size:11px!important}
 body #tc-shell-nav .tc-shell-foot>a.tc-shell-legal,body #tc-shell-nav .tc-shell-foot>a.tc-shell-site{font-size:11px!important;padding:9px 8px 0!important;letter-spacing:0!important}
 body #tc-home,body #tc-utility,body #reference-view,body #map,body #map-gl{left:232px!important;right:0!important;width:auto!important;max-width:calc(100vw - 232px)!important}
 body #app>header{left:auto!important;right:16px!important;top:16px!important;width:340px!important;height:48px!important;min-height:48px!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;gap:8px!important;justify-content:flex-end!important}
 body #app>header .brand{display:none!important}
 body #app>header #menu-button{display:none!important}
 body #panel,body #panel.closed{display:flex!important;left:auto!important;right:16px!important;top:80px!important;bottom:20px!important;width:340px!important;max-height:none!important;transform:none!important}
 body .tc-gps{left:248px!important;right:auto!important;top:16px!important;width:min(430px,calc(100vw - 632px))!important}
 body .tc-gps-main{grid-template-columns:minmax(0,1fr) 40px!important;gap:8px!important}
 body .tc-gps-nav{grid-column:1/3!important;grid-row:2!important;padding:8px 0 0;border-top:1px solid #2d3d4d}
 body .tc-gps-main>button{grid-column:2;grid-row:1}
 body #map-gl .map-4d-hud{top:auto!important;right:380px!important;left:16px!important;bottom:20px!important;width:auto!important;max-width:480px!important}
 body #map-gl .maplibregl-ctrl-top-left{left:16px!important;top:var(--tc-gps-hud-top,84px)!important}
 body .coord-readout{bottom:92px!important}
 body .tc-home-scroll{padding:28px clamp(24px,3vw,48px) 48px!important}
 body .tc-home-hero{min-height:260px!important;padding:32px!important;border-radius:18px!important;background:#111e2b!important;box-shadow:none!important}
 body .tc-home-card{background:#111e2b!important;box-shadow:none!important;border-color:#2c3e50!important;border-radius:14px!important}
}
@media(max-width:767px){
 body #tc-shell-nav{display:none!important}
 body #tc-home,body #tc-utility,body #reference-view,body #map,body #map-gl{left:0!important;right:0!important;width:100%!important;max-width:100vw!important}
 body #app>header{height:58px!important;min-height:58px!important;padding:8px 12px!important;background:#0c1621!important;border-bottom:1px solid #2e3c4a!important}
 body #app>header .brand{width:auto!important;min-width:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important}
 body #app>header .brand img{width:128px!important;height:32px!important;max-width:128px!important;object-fit:contain!important}
 body #app>header #world-clock{display:none!important}
 body #app>header #connection{font-size:11px!important;padding:6px 8px!important;margin-left:auto}
 body #app>header .icon-button{width:40px!important;height:40px!important;min-width:40px!important}
 body .tc-gps{left:12px!important;right:12px!important;top:70px!important;width:auto!important}
 body .tc-gps-main{min-height:60px!important}
 body .tc-gps.collapsed .tc-gps-nav{display:none!important}
 body #panel{left:12px!important;right:12px!important;top:70px!important;bottom:calc(82px + var(--tc-safe-bottom))!important;width:auto!important;max-width:none!important;max-height:none!important;z-index:1100!important}
 body #panel.closed{display:none!important}
 body #panel #close-panel{display:grid!important;width:40px!important;height:40px!important;font-size:24px!important}
 body:has(#panel:not(.closed)) .tc-gps,body:has(#panel:not(.closed)) .map-4d-hud,body:has(#panel:not(.closed)) #tc-global-search-mobile{display:none!important}
 body #map-gl .map-4d-hud{top:auto!important;left:12px!important;right:12px!important;bottom:calc(144px + var(--tc-safe-bottom))!important;width:auto!important;padding:8px!important}
 body #map-gl .maplibregl-ctrl-top-left{left:12px!important;top:var(--tc-gps-hud-top,134px)!important}
 body #map-3d-mobile-toggle{bottom:calc(90px + var(--tc-safe-bottom))!important;right:12px!important;min-height:42px!important;font-size:12px!important}
 body #tc-global-search-mobile{left:12px!important;right:auto!important;bottom:calc(90px + var(--tc-safe-bottom))!important;min-height:42px!important;font-size:13px!important}
 body #tamercore-app-nav{left:0!important;right:0!important;background:#0c1621!important;border-top:1px solid #344455!important;padding:6px 8px calc(6px + var(--tc-safe-bottom))!important;min-height:68px!important;gap:4px!important}
 body #tamercore-app-nav button{min-height:54px!important;font-size:12px!important;border-radius:9px!important}
 body #tamercore-app-nav button.active{background:#233a4c!important;border-color:#4d6b82!important;box-shadow:none!important}
 body .tc-home-top{padding:12px 16px!important;min-height:68px!important;height:auto!important}
 body .tc-home-top h1{font-size:22px!important}
 body .tc-home-top .tc-surface-title small{display:none!important}
 body .tc-home-scroll{padding:18px 16px 100px!important}
 body .tc-home-hero{padding:24px!important;min-height:0!important;background:#111e2b!important;border-radius:16px!important;box-shadow:none!important}
 body .tc-home-quick{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
 body .tc-home-quick button{font-size:13px!important;padding:10px!important;line-height:1.4!important;text-align:left}
 body .tc-home-quick button span{margin-left:4px!important}
}
@media(prefers-reduced-motion:reduce){body *,body *:before,body *:after{animation:none!important;scroll-behavior:auto!important}}

/* Native Android already reserves the system navigation area. Keep TamerCore's rail compact without drawing behind it. */
@media(max-width:680px){
 html.tc-native-system-bars body #tamercore-app-nav{min-height:60px!important;padding:4px 8px!important}
 html.tc-native-system-bars body #tamercore-app-nav button{min-height:48px!important;height:48px!important}
 html.tc-native-system-bars body .tc-home-scroll{padding-bottom:88px!important}
 html.tc-native-system-bars body #tc-utility{padding-bottom:64px!important}
}
/* Map-mode parity: keep map tools reachable in 2D and WebGL 4D. */
@media(max-width:767px){
 body #app>header #menu-button{display:grid!important;place-items:center!important;z-index:3300!important}
 body.map-webgl-3d #app>header{z-index:3250!important}
 body.map-webgl-3d #tamercore-app-nav{display:grid!important;z-index:3200!important}
 body.map-webgl-3d #map-3d-mobile-toggle{display:flex!important;z-index:3190!important}
 body.map-webgl-3d #panel.closed{display:none!important}
 body.map-webgl-3d #panel:not(.closed){display:flex!important;z-index:3400!important}
 body.map-webgl-3d #map-gl .maplibregl-ctrl-top-left{display:block!important;left:12px!important;top:var(--tc-gps-hud-top,134px)!important;z-index:8!important}
 body #panel .layer-heading-actions{display:flex!important;gap:5px!important;flex-wrap:wrap!important;justify-content:flex-end!important}
 body #panel .layer-heading-actions button{min-width:0!important;padding:6px 9px!important}
}
