/* Compact map controls on phones; desktop keeps its existing proportions. */
@media(max-width:700px),(max-height:500px){
 .town-world{min-height:0;height:100svh}
 .town-world-hud{top:max(8px,env(safe-area-inset-top,0px));left:max(8px,env(safe-area-inset-left,0px));right:max(8px,env(safe-area-inset-right,0px));gap:6px}
 .town-world-heading,.town-world-status{gap:5px}
 .town-world-home{width:44px;height:44px;min-height:44px;padding:0;justify-content:center;border-radius:11px}
 .town-world-home>span:last-child:not(.profile-token){display:none}
 .town-world-home .map-profile-badge{width:34px;height:34px;min-width:0;min-height:0;padding:3px}
 .town-world-home .map-profile-badge .player-avatar.profile-token{width:28px;height:28px}
 .town-world-home .map-profile-badge:has(.room-profile-default) .player-avatar.profile-token{width:100%;height:100%}
 .town-world-heading h2{font-size:14px;line-height:1.2;max-width:38vw;padding:9px 8px;border-radius:9px}
 .town-world-wallet{min-height:40px;padding:5px 8px;border-radius:9px}
 .town-world-wallet small{font-size:9px;line-height:1.2}.town-world-wallet strong{font-size:14px;line-height:1.3}
 .town-world-level{width:40px;min-height:40px;padding:2px;border-radius:9px}
 .town-world-level .town-world-level-ring{--ring-size:32px}.town-world-level .level-orbit-face>strong{font-size:13px}
 .town-world-canvas .place-label{padding:5px 8px 5px 5px;gap:5px;border-radius:9px;bottom:-4px;min-height:32px}
 .town-world-canvas .place-label strong{font-size:12px;line-height:1.3}
 .town-world-canvas .place-label small{display:none}
 .town-world-canvas .place-symbol,.town-world-canvas .place-symbol .location-logo{width:23px;height:23px}
 .town-world-dock{width:min(500px,calc(100% - 16px));grid-template-columns:repeat(6,minmax(0,1fr));gap:2px;padding:4px;border-radius:13px;bottom:max(8px,env(safe-area-inset-bottom,0px))}
 .town-world-dock button{flex-direction:column;gap:3px;min-height:48px;padding:4px 1px;font-size:10px;line-height:1.2;white-space:nowrap;border-radius:9px}
 .town-world-dock .location-logo{width:23px;height:23px}
 .town-world-camera{left:max(8px,env(safe-area-inset-left,0px));bottom:calc(74px + env(safe-area-inset-bottom,0px));border-radius:10px;padding:0;gap:0;box-shadow:0 3px 10px #062c4533}
 .town-world-camera button{min-width:36px;min-height:44px;font-size:19px;padding:0 5px}
 .town-world-camera output{min-width:34px;font-size:10px}
 .town-world-camera .town-world-overview{font-size:11px;padding:0 7px}.town-world-camera .town-world-reset{min-width:36px;font-size:20px}
 .town-world-help{display:none}
}
@media(max-width:370px){
 .town-world-heading h2{font-size:12px;max-width:35vw;padding:9px 6px}
 .town-world-level{display:none}
 .town-world-dock button{font-size:9px}
 .town-world-dock .location-logo{width:22px;height:22px}
}
@media(max-height:500px) and (min-width:701px){
 .town-world-heading h2{max-width:35vw}
 .town-world-camera{bottom:calc(72px + env(safe-area-inset-bottom,0px))}
 .town-world-dock{max-width:480px}
}

/* Building-mounted signs: materials and rooflines echo each destination. */
.town-world-canvas .map-place .building-sign{display:block;width:clamp(132px,15vw,210px);min-height:0;bottom:-9px;padding:0;border:0;border-radius:0;background:none;box-shadow:none;backdrop-filter:none;filter:drop-shadow(0 4px 2px #102c4359);line-height:0;transform:translateX(-50%);transition:filter .18s,transform .18s}
.town-world-canvas .building-sign-art{display:block;width:100%;height:auto;overflow:visible}
.town-world-canvas .map-place:hover .building-sign,.town-world-canvas .map-place:focus-visible .building-sign{transform:translate(-50%,-3px);filter:drop-shadow(0 5px 3px #102c4366) brightness(1.1)}
@media(max-width:700px){.town-world-canvas .map-place .building-sign{width:138px;bottom:-6px}}
@media(prefers-reduced-motion:reduce){.town-world-canvas .map-place .building-sign{transition:none}}

/* Town entrance plaques: painted enamel, oak edges and warm brass fittings. */
.town-world-hud{align-items:flex-start;gap:12px}
.town-world-heading{flex:1;min-width:0;gap:12px;align-items:center}
.town-world-status{flex-shrink:0;gap:10px;align-items:center}
.town-world-heading h2,.town-world-home,.town-world-wallet{position:relative;border:3px solid #b8874c;border-radius:8px;background:linear-gradient(165deg,#386470,#173e4c 65%,#123340);box-shadow:inset 0 0 0 2px #f0d39b,inset 0 0 0 5px #234854,0 3px 0 #664b32,0 6px 9px #12384c45;backdrop-filter:none;color:#fff1cc;text-shadow:0 1px 2px #102e3e}
.town-world-heading h2{font-family:Georgia,serif;font-size:24px;letter-spacing:.02em;font-weight:700;max-width:min(440px,45vw);padding:17px 30px;line-height:1.2;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.town-world-heading h2:before,.town-world-heading h2:after{content:'';position:absolute;width:5px;height:5px;top:calc(50% - 2px);border-radius:50%;background:#f3d89d;box-shadow:0 1px 1px #102e3e}
.town-world-heading h2:before{left:12px}.town-world-heading h2:after{right:12px}
.town-world-home{min-height:64px;padding:8px 15px 8px 9px;gap:9px;background:linear-gradient(150deg,#ac7044,#70442d);font-family:Georgia,serif;letter-spacing:.02em;box-shadow:inset 0 0 0 2px #f0d39b,inset 0 0 0 5px #805237,0 3px 0 #513923,0 6px 9px #12384c45}
.town-world-home .map-profile-badge{background:#f1dfb8;border:2px solid #d7b26e;box-shadow:0 2px 3px #33251a55;border-radius:50%}
.town-world-wallet{min-height:64px;padding:10px 18px 10px 48px;background:linear-gradient(155deg,#3b7366,#164c46);box-shadow:inset 0 0 0 2px #f0d39b,inset 0 0 0 5px #285d53,0 3px 0 #664b32,0 6px 9px #12384c45}
.town-world-wallet:before{content:'£';position:absolute;left:13px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:27px;height:27px;border:2px solid #dcae52;border-radius:50%;background:linear-gradient(135deg,#fff0a9,#d3a23f);color:#6a4b1f;font:bold 20px Georgia,serif;text-shadow:0 1px #fff5c6;box-shadow:0 2px 2px #183e3c66,inset 0 0 0 2px #fae49a}
.town-world-wallet small{color:#f5e5bc;font-size:11px;letter-spacing:.04em}.town-world-wallet strong{color:#fff7dc;font-size:19px;line-height:1.4}
.town-world-level{position:relative;width:66px;min-height:66px;padding:5px;border:3px solid #c49348;border-radius:50%;background:linear-gradient(145deg,#f7e2a6,#b68a43);box-shadow:inset 0 0 0 2px #ffeac0,0 3px 0 #71532d,0 5px 8px #15384a55;backdrop-filter:none}
.town-world-level .town-world-level-ring{--ring-size:48px;background:#244a59;box-shadow:none;color:#fff1cd}
.town-world-level .level-orbit-face>strong{font-size:19px;color:#fff1cd}
.town-world-hud button:hover{filter:brightness(1.12)}
@media(max-width:700px),(max-height:500px){
 .town-world-hud{gap:6px}.town-world-heading{gap:6px}.town-world-status{gap:6px}
 .town-world-home{width:44px;height:44px;min-height:44px;padding:3px;flex-shrink:0;border-width:2px;border-radius:7px}
 .town-world-home .map-profile-badge{width:31px;height:31px;padding:0;border-width:1px}
 .town-world-heading h2{min-width:0;max-width:none;flex:1;font-size:14px;padding:13px 9px;border-width:2px;border-radius:6px;line-height:1.2}
 .town-world-heading h2:before,.town-world-heading h2:after{display:none}
 .town-world-wallet{min-height:44px;max-width:124px;min-width:0;padding:6px 8px 6px 27px;border-width:2px;border-radius:6px}
 .town-world-wallet:before{left:7px;width:16px;height:16px;border-width:1px;font-size:12px;box-shadow:inset 0 0 0 1px #fae49a}
 .town-world-wallet small{font-size:8px;letter-spacing:0}.town-world-wallet strong{font-size:12px;line-height:1.4;max-width:87px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .town-world-level{display:flex;width:44px;height:44px;min-height:44px;padding:3px;border-width:2px;flex-shrink:0}
 .town-world-level .town-world-level-ring{--ring-size:32px}.town-world-level .level-orbit-face>strong{font-size:13px}
}
@media(max-width:370px){.town-world-heading h2{font-size:12px;padding-inline:7px}.town-world-wallet{padding-left:7px;max-width:96px}.town-world-wallet:before{display:none}.town-world-wallet strong{max-width:78px;font-size:11px}}

/* Landscape phones keep a short town plaque instead of stretching it. */
@media(orientation:landscape) and (max-height:500px){
 .town-world-hud .town-world-heading{flex:0 1 auto;max-width:calc(100% - 180px)}
 .town-world-hud .town-world-heading h2{flex:0 1 auto;width:max-content;max-width:min(240px,38vw)}
}
