:root {
 --controls-top:calc(14px + env(safe-area-inset-top));
 --controls-right:calc(14px + env(safe-area-inset-right));
 --controls-bottom:calc(14px + env(safe-area-inset-bottom) + var(--town-viewport-bottom,0px));
 --joystick-left:calc(12px + env(safe-area-inset-left));
 --control-shell:linear-gradient(165deg,#fff9ebf5,#e4f2eced);
 --control-shell-shadow:0 5px 18px #133c3e38,inset 0 1px 1px #ffffffb0;
 --control-button-border:#2e7e801f;
 --control-button-bg:#ffffff70;
 --control-button-ink:#07535a;
 --town-shortcut-space:54px;
} 
html:has(body.playing-town),body.playing-town {
 overflow:hidden;
 overscroll-behavior:none;
}
body.playing-town #world {position:fixed;inset:0;width:100%;height:100dvh;touch-action:none}
body.playing-town :is(#mapIdentity,#actionDock,#compactZoom,#mobileControlsPanel) {touch-action:pan-x pan-y}
body.playing-town #joystick {touch-action:none}
.map-button {
 display:grid;
 place-items:center;
 width:46px;
 min-height:44px;
 padding:8px;
 border:1px solid #20b7b465;
 border-radius:16px;
 background:#fff8e7f5;
 color:#087779;
 box-shadow:0 3px 14px #087f8133;
 touch-action:manipulation;
 pointer-events:auto;
}
button.map-button:is(:hover,[aria-expanded=true],[aria-pressed=true]) {background:#e0f3eb}
button.map-button:disabled {opacity:.54;cursor:default}
.map-button svg {
 width:24px;
 height:24px;
 fill:none;
 stroke:currentColor;
 stroke-width:1.8;
 stroke-linecap:round;
 stroke-linejoin:round;
}
.map-button:focus-visible {outline:2px solid #087779;outline-offset:2px}
#compactZoom {
 position:fixed;
 z-index:70;
 right:var(--controls-right);
 top:var(--controls-top);
 display:grid;
 grid-template-columns:72px;
 gap:4px;
 padding:5px;
 border:1px solid #fff9ec;
 border-radius:23px;
 background:var(--control-shell);
 box-shadow:var(--control-shell-shadow);
}
#compactZoom .map-button {
 width:44px;
 border-color:var(--control-button-border);
 border-radius:12px;
 background:var(--control-button-bg);
 color:var(--control-button-ink);
 box-shadow:0 1px 2px #07535a12;
}
#compactZoom button.map-button:hover {background:#d1e8e1}
#compactZoom button.map-button:active {
 background:var(--control-button-ink);
 color:white;
}
#cameraTools {display:grid;gap:4px;border-top:1px solid #2e7e8030;margin-top:4px;padding-top:8px}
#compactZoom :is(#landmarkToggle,#lensToggle,#focusToggle) {
 display:flex;flex-direction:column;gap:3px;width:100%;min-height:56px;padding:6px 2px;border-radius:15px;
 font-size:10px;font-weight:700;
}
#compactZoom :is(#landmarkToggle,#lensToggle,#focusToggle) svg {width:23px;height:23px}
#compactZoom :is(#landmarkToggle,#lensToggle,#focusToggle) .control-caption {display:block;font-size:10px}
#compactZoom #focusToggle {color:#695275;background:#eee6f173;border-color:#69527524}
#compactZoom #focusToggle[aria-expanded=true] {color:#fff;background:#695275;border-color:#695275}
#lensControls,#focusControls {
 position:absolute;
 top:0;
 right:calc(100% + 8px);
 display:grid;
 grid-template-columns:minmax(0,1fr) 44px;
 gap:5px;
 width:min(202px,calc(100vw - var(--controls-right) - 106px));
 max-height:calc(100dvh - var(--controls-top) - var(--controls-bottom));
 overflow:auto;
 padding:6px;
 border:1px solid #fff9ec;
 border-radius:19px;
 background:var(--control-shell);
 box-shadow:var(--control-shell-shadow);
}
#focusControls {
 display:block;width:min(292px,calc(100vw - var(--controls-right) - 106px));padding:16px;
 background:#fffef8;border-color:#d8cede;color:#433a4b;overscroll-behavior:contain;
}
#focusControls h2 {font:500 23px Georgia,serif;margin:0 0 3px}
#focusControls .focus-intro {font-size:12px;color:#756a7b;margin:0 0 17px;line-height:1.4}
.focus-label {display:flex;justify-content:space-between;align-items:baseline;gap:6px;font-size:12px;font-weight:700}
.focus-label output {font-size:10px;font-weight:600;color:#76627f;white-space:nowrap;font-variant-numeric:tabular-nums}
#focusControls input {display:block;width:100%;height:32px;margin:2px 0 0;accent-color:#80618d;touch-action:none;cursor:ew-resize}
#focusControls input:focus-visible {outline:2px solid #80618d;outline-offset:1px;border-radius:12px}
.focus-scale {display:flex;justify-content:space-between;gap:4px;margin:0 0 17px;font-size:10px;color:#756a7b}
.focus-footer {display:flex;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid #e5dfe8;padding-top:12px}
#focusControls .focus-footer p {font-size:10px;line-height:1.5;color:#756a7b;margin:0}
#resetFocus {flex:none;min-height:44px;padding:8px 12px;background:#eee7f1;color:#624a6d;font-size:12px;font-weight:700}
#focusNotice {font-size:11px;line-height:1.4;color:#756a7b;margin:10px 0 0}
#lensViewModes,#lensZoomPitch {
 display:grid;
 align-content:start;
 gap:4px;
 min-width:0;
}
#lensViewModes {align-content:stretch}
#lensZoomPitch {grid-template-rows:44px 44px minmax(0,1fr)}
#lensViewModes .map-button {
 display:flex;
 align-items:center;
 justify-content:flex-start;
 gap:6px;
 width:100%;
 font-size:11px;
 font-weight:700;
 text-align:left;
}
#lensViewModes svg {flex:none;width:19px;height:19px}
#lensControls .control-caption {display:block}
#landmarkMenu {
 position:absolute;
 top:0;
 right:calc(100% + 8px);
 width:min(380px,calc(100vw - var(--controls-right) - 106px));
 max-height:calc(100dvh - var(--controls-top) - var(--controls-bottom));
 overflow:auto;
 overscroll-behavior:contain;
 padding:10px;
 border:1px solid #c9ded7;
 border-radius:19px;
 background:#fffef8;
 box-shadow:0 12px 38px #173d3940;
}
@media(max-width:479px) {
 #landmarkCategoryFilters {grid-template-columns:repeat(2,minmax(0,1fr))}
 #landmarkCategoryFilters button {min-height:88px;gap:9px;padding:8px 6px;font-size:11px}
 #minimapView,#screenOptionsPanel {width:min(214px,calc(100vw - 192px - env(safe-area-inset-left) - env(safe-area-inset-right)))}
}
#compactZoom :is(#landmarkToggle,#lensToggle)[aria-expanded=true],
#compactZoom button.map-button[aria-pressed=true],
body.map-fullscreen #compactZoom #mapFullscreen {
 background:var(--control-button-ink);
 border-color:var(--control-button-ink);
 color:#fff;
}
body.riding-car #compactZoom {top:clamp(var(--controls-top),50%,calc(100dvh - var(--controls-bottom) - 210px))}
body.riding-car :is(#landmarkMenu,#lensControls,#focusControls) {max-height:calc(50dvh - var(--controls-bottom))}
body.riding-car #lensControls {grid-template-columns:1fr;width:153px}
body.riding-car #lensViewModes {grid-template-columns:minmax(0,1fr)}
body.riding-car :is(#lensZoomPitch,#lensViewModes .map-button:not(#mapFullscreen)) {display:none}
#cameraPitchPanel {
 grid-template-rows:auto minmax(0,1fr) auto;
 justify-items:center;
 gap:2px;
 padding:5px 0 6px;
 font-size:10px;
 font-weight:700;
}
#cameraPitchPanel svg {width:17px;height:17px}
#cameraPitchPanel input {
 writing-mode:vertical-lr;
 direction:rtl;
 width:100%;
 height:clamp(51px,14dvh,94px);
 margin:0;
 accent-color:#087779;
 touch-action:none;
 cursor:ns-resize;
}
@media(max-width:767px),(pointer:coarse) {
 #cameraPitchPanel input {height:clamp(40.8px,11.2dvh,75.2px)}
}
#cameraPitchPanel input:focus-visible {outline:2px solid #087779;outline-offset:1px;border-radius:16px}
#cameraPitchValue {font-variant-numeric:tabular-nums}
@media(max-height:440px) {
 #lensControls {width:min(278px,calc(100vw - var(--controls-right) - 106px));grid-template-columns:minmax(0,1fr)}
 #lensViewModes {grid-template-columns:repeat(2,minmax(0,1fr))}
 #lensZoomPitch {grid-template-columns:44px 44px minmax(0,1fr);grid-template-rows:auto}
 body:not(.riding-car) #lensViewModes #mapFullscreen {grid-column:2}
 #compactZoom #cameraPitchPanel {
  display:flex;
  width:100%;
  align-items:center;
  gap:5px;
  padding:0 6px;
 }
 #cameraPitchPanel svg {flex:none}
 #cameraPitchPanel input {
  min-width:0;
  height:32px;
  writing-mode:horizontal-tb;
  direction:ltr;
  cursor:ew-resize;
 }
}
@media(max-height:440px) and (min-width:520px) {
 body:not(.riding-car) #lensControls {top:0;right:calc(100% + 6px)}
}
#actionDock {
 position:fixed;
 z-index:69;
 right:var(--controls-right);
 bottom:var(--controls-bottom);
 display:grid;
 grid-template-columns:repeat(3,56px);
 gap:4px;
 padding:5px;
 border:1px solid #fff9ec;
 border-radius:23px;
 background:var(--control-shell);
 box-shadow:var(--control-shell-shadow);
}
body:has(#loadingScreen:not([hidden])) :is(#actionDock,#compactZoom) {display:none}
#actionDock .map-button {
 width:100%;
 min-width:0;
 height:48px;
 padding:4px 1px;
 gap:0;
 border:1px solid var(--control-button-border);
 border-radius:12px;
 background:var(--control-button-bg);
 color:var(--control-button-ink);
 box-shadow:0 1px 2px #07535a12;
 font-size:10px;
 font-weight:700;
}
#actionDock #runToggle {border-radius:17px 12px 12px 17px}
#actionDock #runToggle[data-mode=magic] {
 background:linear-gradient(150deg,#fff4ff 0%,#eae4ff 54%,#e0f4fa 100%);
 border-color:#b4a3dc;
 color:#523481;
}
#actionDock #runToggle[data-mode=magic]:is(:active,[aria-expanded=true]) {background:#523481;color:white}
#actionDock #mobileControlsToggle {border-radius:12px 17px 17px 12px}
.joystick-expanded {
 --side-panel-right:calc(var(--controls-right) + 76px);
 --side-panel-width:calc(100vw - var(--side-panel-right) - 10px - env(safe-area-inset-left));
 --side-panel-height:calc(100dvh - var(--controls-top) - var(--controls-bottom));
}
.joystick-expanded #actionDock {grid-template-columns:56px}
.joystick-expanded #actionDock #runToggle {border-radius:17px 17px 12px 12px}
.joystick-expanded #actionDock #mobileControlsToggle {border-radius:12px 12px 17px 17px}
#actionDock button.map-button:hover {background:#d1e8e1}
#actionDock button.map-button:is(:active,[aria-expanded=true]) {
 background:var(--control-button-ink);
 border-color:var(--control-button-ink);
 color:white;
}
#actionDock .map-button:focus-visible {outline-offset:-3px}
#actionDock .map-button[aria-expanded=true]:focus-visible {outline-color:white}
#actionDock .map-button svg {width:23px;height:23px;stroke-width:2}
#actionDock .control-caption {display:block;font-size:inherit;font-weight:inherit}
#townShortcuts {
 position:absolute;
 right:5px;
 bottom:calc(100% + 6px);
 display:flex;
 flex-direction:column;
 gap:6px;
 width:56px;
}
#actionDock #openTownPassport {
 background:linear-gradient(155deg,#ffe7ad,#f1bd67);
 color:#523314;
 border-color:#b78140;
 border-radius:17px;
 box-shadow:inset 0 1px 1px #fff7dc,0 3px 10px #53331339;
}
#actionDock #openTownPassport:hover {background:#ffe0a0}
#actionDock #openTownPassport:active {background:#75471b;color:#fff7e5}
.joystick-expanded #townShortcuts {position:static;width:100%}
#actionDock :is(#movementPicker,#magicWarmup) {
 position:absolute;left:0;bottom:calc(100% + 8px + var(--town-shortcut-space));
 width:100%;max-height:calc(100dvh - 96px - var(--town-shortcut-space) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
 overflow:auto;overscroll-behavior:contain;
 padding:7px;border:1px solid #fff9ec;border-radius:19px;
 background:var(--control-shell);box-shadow:var(--control-shell-shadow);color:var(--control-button-ink);
}
.joystick-expanded #actionDock :is(#movementPicker,#magicWarmup) {
 left:auto;right:calc(100% + 8px);bottom:-1px;
 width:min(188px,var(--side-panel-width));max-height:var(--side-panel-height);
}
#actionDock #magicWarmup {
 display:grid;
 gap:7px;
 padding:10px;
 border-color:#d2c2e5;
 color:#523481;
}
#actionDock:has(#movementPicker:not([hidden])) #magicWarmup {display:none}
#magicWarmupStatus {margin:0;font-size:12px;font-weight:700}
#magicWarmupProgress {width:100%;height:10px;accent-color:#693da1}
#cancelMagicWarmup {
 justify-self:start;
 min-height:44px;
 padding:5px 11px;
 border:1px solid #c5addd;
 border-radius:10px;
 background:#f3eafa;
 color:inherit;
 font-size:11px;
 font-weight:700;
}
#cancelMagicWarmup:hover {background:#e6d8f4}
#movementPicker h2 {margin:3px 5px 7px;font:inherit;font-size:13px;font-weight:750}
#movementPicker button {
 display:grid;grid-template-columns:22px 1fr 16px;align-items:center;gap:8px;
 width:100%;min-height:44px;padding:4px 9px;text-align:left;
 border:1px solid var(--control-button-border);border-radius:12px;
 background:var(--control-button-bg);color:inherit;font:inherit;font-size:13px;font-weight:650;
 touch-action:manipulation;
}
#movementPicker button+button {margin-top:4px}
#movementPicker button:hover {background:#d5e9e3}
#movementPicker button[aria-pressed=true] {background:#d1e9e4;border-color:#4c9897}
#movementPicker button[aria-pressed=true]::after {content:"✓";text-align:center}
#movementPicker button:focus-visible {outline:2px solid #087779;outline-offset:-3px}
#movementPicker button[data-mode=magic] {color:#523481}
#movementPicker button[data-mode=magic][aria-pressed=true] {background:#eee6fa;border-color:#a08cca}
#movementPicker svg {width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#actionDock #musicToggle svg, .music-transport svg {
 fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8;
}
#musicPanel {
 position:fixed;
 z-index:73;
 right:var(--controls-right);
 bottom:calc(var(--controls-bottom) + 67px + var(--town-shortcut-space));
 width:min(338px,calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)));
 max-height:calc(100dvh - 95px - var(--town-shortcut-space) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
 overflow:auto;
 overscroll-behavior:contain;
 padding:12px;
 border:1px solid #fff9ec;
 border-radius:23px;
 background:var(--control-shell);
 box-shadow:var(--control-shell-shadow);
 color:var(--control-button-ink);
}
body.riding-car #musicPanel {display:none}
.music-heading {display:flex;align-items:center;justify-content:space-between;margin:0 0 8px}
.music-heading h2 {margin:0 0 0 2px;font:inherit;font-size:17px;font-weight:750}
#musicPanel button {
 border:1px solid var(--control-button-border);
 background:var(--control-button-bg);
 color:inherit;
}
#closeMusic,.music-transport button {
 display:grid;place-items:center;
 width:44px;height:44px;border-radius:13px;
}
#closeMusic {font-size:23px;line-height:1}
#musicPanel button:enabled:hover {background:#d5e9e3}
#musicPanel button:focus-visible,#musicPanel a:focus-visible {outline:2px solid #107f82;outline-offset:2px}
#musicGenres {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
#musicGenres button {
 text-align:left;display:grid;gap:3px;align-content:center;
 min-height:52px;padding:7px 9px;border-radius:12px;
}
#musicGenres button[aria-pressed=true] {background:#d1e9e4;border-color:#4c9897}
#musicGenres strong {font-size:13px;line-height:1.2}
#musicGenres span {font-size:11px;color:#346661;line-height:1.2}
#musicGenres [data-genre=all] {grid-column:1/-1;min-height:40px;display:flex;align-items:center;justify-content:space-between}
.music-player {
 margin:0 0 9px;padding:9px;border:1px solid var(--control-button-border);
 border-radius:15px;background:#f8fcf788;
}
.music-song {display:flex;justify-content:space-between;align-items:start;gap:7px}
.music-track {display:grid;gap:3px;margin:0;min-width:0;font-size:11px;line-height:1.23}
.music-track strong {font-size:14px;line-height:1.2}
.music-track a {color:inherit;text-underline-offset:2px}
#musicTrackPosition {white-space:nowrap;font-size:11px;color:#346661}
.music-timeline {display:flex;align-items:center;gap:6px;margin:7px 0;font-size:10px;font-variant-numeric:tabular-nums}
.music-timeline span {min-width:24px}
#musicDuration {text-align:right}
#musicProgress {appearance:none;flex:1;min-width:0;height:5px;border:0;border-radius:6px;background:#cbded6;accent-color:#087f81}
#musicProgress::-webkit-progress-bar {border-radius:6px;background:#cbded6}
#musicProgress::-webkit-progress-value {border-radius:6px;background:#087f81}
#musicProgress::-moz-progress-bar {border-radius:6px;background:#087f81}
.music-transport {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
.music-transport button {width:100%;min-width:0;padding:0}
.music-transport button:disabled {opacity:.43}
.music-transport svg {width:21px;height:21px}
#musicPanel #musicPlayback {color:white;background:var(--control-button-ink);border-color:var(--control-button-ink)}
#musicPanel #musicPlayback:hover {background:#0b6969}
#musicPanel .music-transport button[aria-pressed=true] {background:#d1e9e4;border-color:#4c9897}
#musicPanelStatus {margin:7px 0 0;font-size:12px}
#townAudio {
 display:grid;gap:2px;min-width:0;margin:8px 0 0;padding:3px 9px 6px;
 border:1px solid var(--control-button-border);border-radius:13px;
}
#townAudio legend {padding:0 4px;font-size:13px;font-weight:750}
.sound-header {display:flex;justify-content:space-between;align-items:center;gap:7px}
.town-audio-toggle {display:flex;align-items:center;gap:6px;min-height:38px;font-size:12px;font-weight:650}
.town-audio-toggle input {width:17px;height:17px;margin:0;accent-color:#087f81}
#soundSpectrum {width:min(120px,45%);height:26px;border-radius:6px;background:#d6ebe4}
.sound-volume {display:grid;grid-template-columns:minmax(98px,auto) 1fr;align-items:center;gap:7px;min-height:32px;font-size:11px;font-weight:650}
.sound-volume input {width:100%;min-width:0;margin:0;min-height:32px;accent-color:#087f81}
#townAudioStatus {font-size:11px}
#townAudioStatus:empty {display:none}
#mobileControlsPanel {
 position:fixed;
 z-index:68;
 right:var(--controls-right);
 bottom:calc(var(--controls-bottom) + 64px + var(--town-shortcut-space));
 width:min(399px,calc(100vw - 28px - env(safe-area-inset-left) - env(safe-area-inset-right)));
 max-height:calc(100dvh - 110px - var(--town-shortcut-space) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
 overflow:auto;
 overscroll-behavior:contain;
 padding:9px;
 border:1px solid #c9ded7;
 border-radius:18px;
 background:#fffef8;
 box-shadow:0 12px 38px #173d3940;
}
.joystick-expanded :is(#mobileControlsPanel,#musicPanel) {
 right:var(--side-panel-right);bottom:var(--controls-bottom);
 max-width:var(--side-panel-width);max-height:var(--side-panel-height);
}
#mobileControlsPanel footer.panel {
 position:static;
 transform:none;
 display:grid;
 grid-template-columns:repeat(4,minmax(0,1fr));
 gap:6px;
 width:100%;
 max-width:none;
 margin:0;
 padding:0;
 background:none;
 border:0;
 box-shadow:none;
 backdrop-filter:none;
 white-space:normal;
}
.joystick-expanded #mobileControlsPanel footer.panel {grid-template-columns:repeat(2,minmax(0,1fr))}
#mobileControlsPanel footer button {
 width:100%;
 min-height:55px;
 flex-direction:column;
 gap:4px;
 padding:7px 4px;
 background:#e7eee2;
}
#mobileControlsPanel footer button:is(:hover,[aria-expanded=true]) {background:#dcece3}
#mobileControlsPanel footer button[aria-pressed=true] {background:#214c43;color:#fff}
#mobileControlsPanel footer button::after {content:attr(data-label);font-size:10px;line-height:1.25}
#mobileControlsPanel footer :is(.control-caption,.chevron) {display:none}
#mobileControlsPanel :is(#settingsControl,#weatherControl) {position:static;margin:0;padding:0;border:0}
#mobileControlsPanel #settingsPanel {
 position:static;width:100%;max-width:none;margin:8px 0 0;transform:none;
 max-height:none;padding:10px;border-radius:12px;box-shadow:none;
}
#mobileControlsPanel #settingsControl:has(#settingsPanel:not([hidden])) {grid-column:1 / -1}
#mobileControlsPanel footer:has(#weatherPanel:not([hidden])) > :not(#weatherControl),
#mobileControlsPanel #weatherControl:has(#weatherPanel:not([hidden])) #weatherToggle {display:none}
#mobileControlsPanel #weatherControl:has(#weatherPanel:not([hidden])) {grid-column:1 / -1}
#mobileControlsPanel #weatherToggle::after {content:"Weather"}
#mobileControlsPanel #weatherToggle svg {width:23px;height:23px}
#mobileControlsPanel #settingsPanel button {flex-direction:row;justify-content:start;min-height:44px}
@media(max-width:420px) {
 :root {--controls-right:calc(9px + env(safe-area-inset-right))}
}

#touch {
 --rotation-ink:var(--control-button-ink);
 box-sizing:border-box;
 position:fixed;
 z-index:65;
 display:grid;
 grid-template-columns:repeat(2,minmax(0,1fr));
 grid-template-rows:132px 48px 44px;
 place-items:center;
 gap:8px;
 width:168px;
 height:262px;
 padding:10px 12px;
 left:var(--joystick-left);
 bottom:var(--controls-bottom);
 border:1px solid #fff9ec;
 border-radius:84px 84px 27px 27px;
 background:var(--control-shell);
 box-shadow:var(--control-shell-shadow);
 transform:scale(var(--joystick-scale,1));
 transform-origin:bottom left;
}

#touch #joystick {
 position:relative;
 grid-column:1 / -1;
 width:132px;
 height:132px;
 padding:0;
 overflow:hidden;
 border-radius:50%;
 border:1px solid #3b8e8f55;
 background:radial-gradient(circle,#d6e2d3a6 0 29%,#f6f8f2cc 30% 68%,#ffffff80 69%);
 box-shadow:inset 0 2px 10px #07535a1e,0 2px 5px #07535a18;
 cursor:grab;
}

#touch #joystick.is-active {
 background:radial-gradient(circle,#d6e2d3 0 29%,#e9f0e5e6 30% 68%,#ffffffb0 69%);
 cursor:grabbing;
}

#touch button {touch-action:none;user-select:none;-webkit-user-select:none}

#touch .rotation-buttons {
 grid-column:1 / -1;
 display:grid;
 grid-template-columns:repeat(2,minmax(0,1fr));
 gap:8px;
 width:100%;
}

#touch .rotation-buttons button {
 position:static;
 display:grid;
 place-items:center;
 width:100%;
 min-width:0;
 height:48px;
 min-height:48px;
 padding:0;
 border:1px solid var(--control-button-border);
 border-radius:14px;
 background:linear-gradient(145deg,#27c3c4,#078b98);
 color:#fff;
 box-shadow:0 1px 2px #07535a12;
 cursor:pointer;
}

#touch .rotation-buttons svg {
 transform:rotateX(180deg);
 width:25px;
 height:25px;
 fill:none;
 stroke:currentColor;
 stroke-width:2.15;
 stroke-linecap:round;
 stroke-linejoin:round;
 pointer-events:none;
}

@media (hover:hover) {
 #touch .rotation-buttons button:hover {background:linear-gradient(145deg,#44d2d1,#07838e);color:#fff}
}

#touch .rotation-buttons button:is(:active,.is-active) {
 background:var(--rotation-ink);
 color:#fff;
 border-color:var(--rotation-ink);
 box-shadow:inset 0 2px 5px #012b303d;
}

#touch button:focus-visible {outline:2px solid var(--rotation-ink);outline-offset:2px}
body[data-control-experience=behind] #touch .rotation-buttons {display:none}
body[data-control-experience=behind] #touch {
 height:206px;
 grid-template-rows:132px 44px;
 border-radius:84px 84px 32px 32px;
}
#touch .joystick-knob {background:radial-gradient(circle at 35% 30%,#48dbd4,#078d99 75%)}
#touch .joystick-tools {grid-column:1 / -1;grid-row:3;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%}
#touch .joystick-tools button {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;width:100%;height:44px;min-height:44px;padding:3px;border-radius:12px;background:#e2f3ed;color:#07535a;font-size:10px}
#touch .joystick-tools svg {width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.player-tool-dialog {width:min(440px,calc(100vw - 24px));max-height:calc(100dvh - 24px - var(--town-viewport-bottom,0px));padding:16px;border:1px solid #c3dcd1;border-radius:20px;background:#fffef8;color:#173d39;overflow:auto;overscroll-behavior:contain;box-shadow:0 15px 55px #133c3e50}
.player-tool-dialog::backdrop {background:#103c3b55}
.player-tool-dialog header {position:sticky;top:-16px;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fffef8;padding-bottom:6px}
.player-tool-dialog h2 {margin:0;font:650 22px/1.25 system-ui,sans-serif}
.player-tool-dialog [data-close-tool] {width:44px;height:44px;padding:0;font-size:24px;background:#e2f3ed;color:#07535a}
.player-tool-dialog label {display:block;margin:12px 0 5px;font-size:13px;font-weight:650}
.player-tool-dialog :is(input,select) {width:100%;max-width:none;padding:10px;border:1px solid #9cb9ad;border-radius:10px;background:#fff;color:#173d39;font-size:16px}
.player-tool-dialog button {min-height:44px}
.player-tool-dialog :is(#requestTaxi,#learnDriving,#taskAccommodation) {margin-top:12px}
.player-tool-dialog p {font-size:13px;line-height:1.45}
.player-tool-actions {display:flex;flex-wrap:wrap;gap:7px}
#playerTasks {display:grid;gap:12px;padding:0;margin:18px 0 0;list-style:none}
#playerTasks li {padding:12px;border:1px solid #d7e6db;border-radius:12px;background:#eef4eb}
#playerTasks li p {margin:6px 0 10px}
#playerTasks button:disabled {opacity:.65}
body.riding-car:not(.driving-car) #touch {visibility:visible;height:66px;grid-template-rows:44px;border-radius:20px;bottom:calc(var(--controls-bottom) + 180px)}
body.riding-car:not(.driving-car) #touch :is(#joystick,.rotation-buttons) {display:none}
body.riding-car:not(.driving-car) #touch .joystick-tools {grid-row:1}
body[data-control-experience=behind] #touch .joystick-tools {grid-row:2}
@media(max-height:520px) {
 #touch {height:206px;grid-template-rows:76px 44px 44px;border-radius:66px 66px 27px 27px}
 #touch #joystick {width:76px;height:76px}
 #touch .joystick-knob {width:42px;height:42px;left:calc(50% - 21px);top:calc(50% - 21px)}
 #touch .rotation-buttons button {height:44px;min-height:44px}
 body[data-control-experience=behind] #touch {height:154px;grid-template-rows:76px 44px}
 body.riding-car:not(.driving-car) #touch {height:66px;grid-template-rows:44px;bottom:calc(var(--controls-bottom) + 140px)}
}
#controlGuide {
 position:relative;
 grid-column:1;
 align-self:start;
}
#controlGuideToggle {background:var(--control-shell);box-shadow:var(--control-shell-shadow)}
#controlGuidePanel {
 position:absolute;
 top:0;
 left:calc(100% + 8px);
 pointer-events:auto;
 width:min(237px,calc(100vw - 86px - env(safe-area-inset-left) - env(safe-area-inset-right)));
 max-height:min(280px,45dvh);
 overflow:auto;
 padding:12px 14px;
 border:1px solid #fff9ec;
 border-radius:18px;
 background:var(--control-shell);
 box-shadow:var(--control-shell-shadow);
 color:var(--control-button-ink);
 font-size:12px;
}
#controlGuideMode {font-size:14px}
#controlGuideRows {display:grid;gap:7px;margin:9px 0 0}
#controlGuideRows div {display:flex;align-items:baseline;justify-content:space-between;gap:9px}
#controlGuideRows dd {margin:0;text-align:right;font-weight:650;color:#285d59}
#status {left:calc(var(--joystick-width,168px) + 24px + env(safe-area-inset-left))}
