/* Approved map-first TouchYou design. Shared by web, PWA and Android WebView. */
:root{--premium-glass:linear-gradient(125deg,#ffffffef,#f8f2fdef);--premium-ink:#42205e;--premium-shadow:0 5px 22px #31144820;--premium-purple:linear-gradient(125deg,#9a3ff0,#7723d5)}
body header,body.install-available header{inset:auto;position:fixed;top:calc(16px + var(--touchyou-safe-top));left:24px;width:380px;height:64px;min-height:64px;padding:10px 14px;display:flex;gap:14px;justify-content:space-between;align-items:center;background:var(--premium-glass);border:1px solid #ffffffcf;border-radius:22px;box-shadow:var(--premium-shadow);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);box-sizing:border-box;pointer-events:auto;z-index:4}
body header .brand{min-width:0;flex:1;gap:0}body header .brand img.brand-logo{width:190px;max-width:100%;height:auto;max-height:36px;object-fit:contain}body header .brand small{display:none}
body header .profile-button{width:42px;height:42px;min-width:42px;margin:0;border:2px solid #ad73e0;box-shadow:0 0 0 3px #eee1fa;overflow:hidden}
body .top-pills,body.install-available .top-pills{position:fixed;left:24px;right:auto;top:var(--touchyou-controls-top,92px);max-width:380px;width:380px;display:flex;flex-wrap:nowrap;gap:8px;align-items:center;z-index:4}
body .top-pills #mapSharing{order:0;flex:1 1 auto;width:auto;min-width:0;margin:0;padding:0;background:none;border:0;box-shadow:none}
body #mapSharing>strong{display:none}
body .top-pills #mapSharing #share,body .top-pills #mapSharing #share[aria-checked=true]{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 34px;align-items:center;gap:8px;min-width:0;width:100%;height:auto;min-height:44px;margin:0;padding:8px 10px 8px 14px;background:var(--premium-glass);border:1px solid #ffffffda;border-radius:24px;box-shadow:var(--premium-shadow);color:var(--premium-ink);font:750 13px/1.2 system-ui,sans-serif;box-sizing:border-box}
body .top-pills #share #shareLabel,body .top-pills #share[aria-checked=true] #shareLabel{grid-column:1;grid-row:1;display:block;min-width:0;white-space:normal;overflow-wrap:anywhere;text-align:left;font-size:inherit}
body .top-pills #share #shareLabel::after{display:none!important}
body .top-pills #share .toggle-knob,body .top-pills #share[aria-checked=true] .toggle-knob{position:relative;grid-column:2;grid-row:1;flex:none;display:block;inset:auto;transform:none;opacity:1;width:34px;height:22px;border-radius:20px;background:#cbc7d1;box-shadow:inset 0 1px 3px #2d163014}
body .top-pills #share .toggle-knob::after{content:'';position:absolute;left:3px;top:3px;width:16px;height:16px;border-radius:50%;background:white;box-shadow:0 1px 3px #0002;transition:transform .2s}
body .top-pills #mapSharing #share[aria-checked=true]{color:#205c40;background:linear-gradient(120deg,#f3fff7ee,#e1f6e9ee);border-color:#cfeddc}
body .top-pills #share[aria-checked=true] .toggle-knob{background:#258357}body .top-pills #share[aria-checked=true] .toggle-knob::after{transform:translateX(12px)}
body #mapSharingStatus{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
body .top-pills #statsButton:not([hidden]){order:1;flex:0 1 auto;min-width:0;max-width:125px;min-height:44px;margin:0;padding:9px 12px!important;font-size:12px;white-space:nowrap;border-radius:24px!important;background:var(--premium-glass);border:1px solid #fff;color:#603182;box-shadow:var(--premium-shadow)}
body .top-pills #gamesOnlineButton{position:static;order:2;flex:none;inset:auto;margin:0;min-height:44px;gap:6px;padding:9px 14px;border-radius:24px;background:var(--premium-purple);color:white;font:750 14px/1 system-ui;border:1px solid #c19cec;box-shadow:var(--premium-shadow)}
body #gamesOnlineButton small{display:none}body #gamesOnlineButton .games-orbit{width:21px;height:21px;font-size:21px;animation:none}
body .map-tools,body.install-available .map-tools{position:fixed;top:max(var(--touchyou-tools-top,155px),35dvh);right:20px;display:flex;flex-direction:column;gap:0;margin:0;padding:3px;background:var(--premium-glass);border:1px solid #ffffffde;border-radius:21px;box-shadow:var(--premium-shadow);backdrop-filter:blur(16px);z-index:3}
body .map-tools button,body .map-tools #mapOptions{position:static;flex:none;width:44px;height:44px;min-height:44px;min-width:44px;margin:0!important;padding:0!important;border:0;border-radius:14px;background:none;box-shadow:none;color:var(--premium-ink);font-size:27px;display:grid;place-items:center}
body .map-tools button+button{border-top:1px solid #69498f15}body .map-tools #dim{font-size:13px;font-weight:800}body .map-tools #mapOptions{font-size:23px}
body .map-tools button:hover,body .map-tools #mapOptions[aria-expanded=true]{background:#eadbf6}
body .map-options-panel,body.install-available .map-options-panel{top:var(--touchyou-controls-top,92px);right:80px;left:auto;max-height:calc(100dvh - var(--touchyou-controls-top,92px) - var(--touchyou-safe-bottom) - 24px);overflow-y:auto;border-radius:22px;box-shadow:var(--premium-shadow);z-index:6}
body .main-nav{position:fixed;left:50%;right:auto;bottom:calc(18px + var(--touchyou-safe-bottom));transform:translateX(-50%);width:460px;max-width:calc(100% - 24px);display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;padding:5px;border:1px solid #ffffffdd;border-radius:24px;background:var(--premium-glass);box-shadow:var(--premium-shadow);box-sizing:border-box;z-index:5}
body .main-nav button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;min-width:0;min-height:60px;padding:4px 0;border-radius:18px;font-size:11px;color:#583275}
body .main-nav button>span{white-space:nowrap;line-height:1.2}body .main-nav svg.lively-icon{width:30px;height:30px}
body .main-nav .lively-icon *{animation-play-state:paused}body .main-nav button:hover .lively-icon *,body .main-nav .nav-tap .lively-icon *{animation-play-state:running}
body .sheet,body .sheet:not(.collapsed){position:fixed;top:auto;left:24px;right:auto;bottom:var(--touchyou-sheet-bottom,110px);width:350px;max-height:var(--touchyou-sheet-max,65dvh);height:auto;border:1px solid #ffffffdd;border-radius:22px;background:var(--premium-glass);box-shadow:var(--premium-shadow);backdrop-filter:blur(18px);overflow:hidden;display:flex;flex-direction:column;z-index:4}
body .sheet.collapsed{height:auto;min-height:0}body .sheet .sheet-toggle{flex:none;min-height:58px;padding:8px 12px;border:0;background:transparent}
body .sheet .handle{display:none}body .sheet .sheet-summary{display:flex;flex-wrap:nowrap;align-items:center;gap:10px}body .sheet .sheet-summary>span:first-child{flex:1;min-width:0}
body .sheet .sheet-summary strong{display:block;font-size:15px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--premium-ink)}
body .sheet.collapsed .sheet-summary small{display:none}body .sheet .sheet-summary small{font-size:11px}
body .sheet .sheet-action{min-height:36px;gap:6px;padding:7px 12px;border:0;border-radius:20px;background:var(--premium-purple);color:#fff;font-size:12px;box-shadow:none}body .sheet #sheetArrow{font-size:18px}
body .sheet:not(.collapsed) #sheetBody{min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain;padding:4px 18px 20px}
body .sheet.collapsed #sheetBody{display:none}
body .maplibregl-marker.person-marker .name-tag{font-size:11px;padding:5px 10px;border:1px solid #ffffffb0;border-radius:11px;background:#fbf6ffed;color:#61358c;box-shadow:0 2px 8px #2d11341a}
body .maplibregl-marker .activity-bubble{scale:.7;transform-origin:bottom center}
body .maplibregl-marker .foot-halo{filter:drop-shadow(0 0 3px currentColor);opacity:.75}
body #profileDialog #zombieTestButton,body #profileDialog #install{position:static;display:block;width:100%;margin:10px 0;padding:12px;border:1px solid #d4bce9;border-radius:13px;background:#eee2fa;color:#603182;font:700 13px system-ui}
body #profileDialog #zombieTestButton[hidden],body #profileDialog #install[hidden],body .top-pills #statsButton[hidden]{display:none}
body #toast{position:fixed;left:50%;right:auto;bottom:calc(var(--touchyou-sheet-bottom,110px) + 70px);transform:translateX(-50%);max-width:min(440px,calc(100vw - 32px));z-index:8}
body :is(header,.top-pills,.map-tools,.main-nav,.sheet-toggle) button:focus-visible{outline:3px solid #a052da;outline-offset:3px}
@media(max-width:700px){
 body header,body.install-available header{top:calc(8px + var(--touchyou-safe-top));left:12px;right:12px;width:auto;min-height:58px;height:58px;padding:8px 12px;border-radius:21px}
 body header .brand img.brand-logo{width:min(175px,100%);max-height:34px}body header .profile-button{width:38px;height:38px;min-width:38px}
 body .top-pills,body.install-available .top-pills{left:12px;right:12px;width:auto;max-width:none;gap:7px}
 body .top-pills #statsButton:not([hidden]){font-size:11px;padding:9px!important;max-width:108px}
 body .top-pills #gamesOnlineButton{font-size:13px;padding:9px 12px}
 body .top-pills #mapSharing #share{font-size:12px;padding-left:12px;gap:5px}
 body .map-tools,body.install-available .map-tools{right:12px}
 body .map-tools button,body .map-tools #mapOptions{width:40px;min-width:40px;height:44px}
 body .map-options-panel,body.install-available .map-options-panel{left:12px;right:66px;width:auto;max-width:340px}
 body .main-nav{left:12px;right:12px;bottom:calc(8px + var(--touchyou-safe-bottom));width:auto;max-width:none;transform:none;padding:4px;border-radius:23px}
 body .main-nav button{min-height:57px;font-size:10px;gap:3px}body .main-nav svg.lively-icon{width:28px;height:28px}
 body .sheet,body .sheet:not(.collapsed){left:12px;right:12px;width:auto;border-radius:20px}
 body .sheet .sheet-toggle,body .sheet.collapsed .sheet-toggle{min-height:52px;padding:7px 12px}
 body .sheet .sheet-summary strong,body .sheet.collapsed .sheet-summary strong{font-size:14px}
 body .sheet .sheet-action,body .sheet.collapsed .sheet-action{min-height:34px;padding:6px 12px;font-size:12px;border-radius:20px}
 body .maplibregl-ctrl-bottom-left,body .maplibregl-ctrl-bottom-right{bottom:calc(140px + var(--touchyou-safe-bottom))}
 body .map-note{display:none}
 body #selection,body #alertBanner{top:calc(var(--touchyou-tools-top,140px) + 8px);left:12px;right:66px}
}
@media(max-height:550px){body .map-tools,body.install-available .map-tools{top:calc(var(--touchyou-controls-top,90px) + 54px)}body .map-tools button,body .map-tools #mapOptions{height:36px;min-height:36px}body .main-nav button{min-height:45px}body .main-nav svg.lively-icon{width:23px;height:23px}}
@media(prefers-reduced-motion:reduce){body .top-pills #share .toggle-knob::after{transition:none}body .main-nav *{animation:none!important}}

body #mapOptionsPanel #mapLimit:not([hidden]){display:flex;align-items:center;gap:8px;width:100%;min-height:44px;margin:12px 0;padding:9px 12px;border:1px solid #d4bce9;border-radius:12px;background:#eee2fa;color:#603182;font:700 13px system-ui}
