/* The painting supplies the locations. Buttons are generous transparent regions
 * over those landmarks; existing IDs still own the same service actions. */
#city-scene { position: relative; width: min(100cqw,100cqh * 16 / 9); aspect-ratio: 16 / 9; min-height: 220px; margin: 0; container-type: size; box-shadow: 0 0 0 1px rgba(0,0,0,.6),0 18px 60px rgba(0,0,0,.7); }
.city-scene-backdrop { position:absolute; inset:0; background:linear-gradient(rgba(11,13,16,.16),rgba(11,13,16,.28)),url('../assets/city/city-scene-backdrop.webp') center / cover,var(--coal); image-rendering:auto; }
.city-hotspot { position:absolute; left:var(--hx); top:var(--hy); transform:translate(-50%,-50%); width:var(--hw); height:var(--hh); min-width:44px; min-height:44px; padding:0; display:block; background:none; border:0; outline:0; box-shadow:none; z-index:2; pointer-events:auto; cursor:pointer; }
.city-hotspot:hover:not(:disabled), .city-hotspot:active:not(:disabled) { background:none; box-shadow:none; transform:translate(-50%,-50%); }
.hotspot-outline { position:absolute; inset:0; width:100%; height:100%; fill:none; stroke:#e9ca8f; stroke-width:2; opacity:0; pointer-events:none; filter:drop-shadow(0 0 3px rgba(200,153,72,.7)); transition:opacity 130ms ease; }
.hotspot-outline path { vector-effect:non-scaling-stroke; }
.city-hotspot:hover .hotspot-outline, .city-hotspot:focus-visible .hotspot-outline, .city-hotspot[aria-expanded="true"] .hotspot-outline { opacity:1; }
.hotspot-label { position:absolute; left:50%; bottom:2%; transform:translateX(-50%); display:flex; align-items:center; gap:5px; width:max-content; padding:3px 7px; color:#e8dcc5; background:rgba(11,13,16,.82); border:1px solid rgba(200,153,72,.35); border-radius:2px; font:600 clamp(11px,1.8cqh,15px)/1.3 "Segoe UI",system-ui,sans-serif; letter-spacing:0; white-space:nowrap; }
.city-hotspot:hover .hotspot-label, .city-hotspot:focus-visible .hotspot-label { color:#fff0cb; border-color:#c5a36a; }
.city-hotspot:focus-visible .hotspot-label { outline:2px solid #e9ca8f; outline-offset:2px; }
.city-hotspot-primary .hotspot-label { padding:4px 9px; color:#fff0cb; border-color:#b39053; background:rgba(48,34,17,.91); font-weight:700; }
.city-hotspot.has-news .hotspot-label::after, .hotspot-flyout button.has-news::after { content:'!'; display:grid; place-items:center; flex:none; width:14px; height:14px; color:var(--ink); background:#f1c66f; font:700 11px/1 "Segoe UI",system-ui,sans-serif; box-shadow:0 0 0 1px var(--ink); }
.hotspot-flyout button.has-news::after { grid-column:3; grid-row:1; justify-self:end; }
/* JS anchors menus within the actual scene rectangle, including short phones.
 * Scroll is local to a menu when all its actions cannot fit simultaneously. */
.hotspot-flyout { position:absolute; left:var(--hx); top:var(--hy); display:none; flex-direction:column; gap:6px; padding:10px; width:240px; min-width:0; max-width:calc(100% - 16px); max-height:calc(100cqh - 16px); overflow-y:auto; pointer-events:auto; background:var(--panel); border:2px solid var(--gold); border-radius:2px; box-shadow:var(--pixel-shadow); z-index:5; }
.hotspot-flyout.open { display:flex; }
.hotspot-flyout-title { margin:0 0 2px; font:600 13px/1.3 "Segoe UI",system-ui,sans-serif; text-align:left; padding-left:43px; color:#d6be94; }
/* Reserve the same icon, label and notice columns even when one is empty. */
.hotspot-flyout button { width:100%; display:grid; grid-template-columns:20px minmax(0,1fr) 14px; column-gap:10px; align-items:center; justify-content:stretch; padding:11px 12px; text-align:left; font:600 14px/1.4 "Segoe UI",system-ui,sans-serif; }
.hotspot-flyout .flyout-action-label { grid-column:2; grid-row:1; min-width:0; overflow-wrap:anywhere; }
.hotspot-flyout button>.kbd,.hotspot-flyout button>.px-icon { grid-column:1; grid-row:1; justify-self:center; margin:0; }
.hotspot-flyout button>.kbd { min-width:20px; }
.town-glow { position:absolute; left:var(--gx); top:var(--gy); width:var(--gs); aspect-ratio:1; transform:translate(-50%,-50%); border-radius:50%; background:radial-gradient(circle,rgba(255,176,84,.22),rgba(236,120,40,.08) 45%,transparent 70%); mix-blend-mode:screen; pointer-events:none; z-index:1; animation:town-firelight var(--gd) infinite linear; }
.town-glow-gate { background:radial-gradient(circle,rgba(255,150,70,.22),rgba(200,80,30,.08) 50%,transparent 72%); }
/* Until a new player's first trip down, light breathes around the gate - on
 * the stones that frame it, not in the tunnel - the way on, for a player fresh
 * from practice (js/ui/training.js). The box is the tunnel's mouth in the
 * painting (which fills the scene, so its percentages are the scene's); only
 * outer shadows paint, so the light falls outside it and the mouth stays as
 * painted. Sizes in cqw follow the scene. */
.gate-halo { display:none; position:absolute; left:42.3%; top:49.5%; width:15.2%; height:26.5%; border-radius:50% 50% 0 0 / 45% 45% 0 0; pointer-events:none; z-index:1; mix-blend-mode:screen; filter:blur(.7cqw);
  box-shadow:0 0 0 .8cqw rgba(255,206,130,.55), 0 0 2.6cqw 1.6cqw rgba(255,160,70,.42), 0 0 7cqw 3cqw rgba(225,105,40,.22); }
#city-scene.first-descent .gate-halo { display:block; animation:gate-halo 3.2s ease-in-out infinite; }
@keyframes gate-halo { 0%,100%{opacity:.4} 50%{opacity:1} }
@keyframes town-firelight { 0%{opacity:.8} 9%{opacity:1} 17%{opacity:.72} 31%{opacity:.93} 38%{opacity:.66} 52%{opacity:.88} 64%{opacity:1} 71%{opacity:.75} 86%{opacity:.95} 100%{opacity:.8} }
/* Labels identify every location on every platform. Keyboard hints belong
 * to desktop pointer mode, including the grouped service menus. */
@media (hover:none) and (pointer:coarse) { #city-ui .kbd { display:none; } }
@media (prefers-reduced-motion:reduce) { .hotspot-outline { transition:none; } .town-glow { animation:none; opacity:.85; } #city-scene.first-descent .gate-halo { animation:none; opacity:1; } }
/* One button tree also supplies the portrait/small-width service list. */
@media (max-width:700px) and (orientation:portrait), (max-width:560px) {
  /* Upright the town and the hero picker (roster.css) are the page itself,
     not a framed panel standing in it. Framed, the room around the panel -
     the clock and the Dynamic Island and 24px more above it, 24px down each
     side - read as bars: black across the top, and once painted with the
     town (d2a8ae4, undone), a strip down each side as well, which is all of
     it a browser's own bar at the top leaves. So the panel loses its frame
     and fills the width, the page around it is the panel's own colour, and
     only the safe edges keep what it says clear of the clock and the home
     bar. The town's vignette is left off: it made the top darker than the
     page. Sideways, the town is a scene with its painted surround. */
  #city-ui { padding:var(--edge-top) var(--edge-right) var(--edge-bottom) var(--edge-left); }
  #city-ui::before { display:none; }
  #city-ui .city-panel { width:100%; max-width:none; min-height:100%; margin:0; border:0; box-shadow:none; }
  #city-scene { position:static; width:100%; aspect-ratio:auto; min-height:0; height:auto; container-type:normal; display:flex; flex-direction:column; gap:10px; padding:12px 10px; box-shadow:none; }
  .city-scene-backdrop,.town-glow,.town-surround,.hotspot-outline,#city-scene.first-descent .gate-halo { display:none; }
  .city-hotspot { position:static; transform:none; width:100%; height:auto; min-height:48px; padding:11px 16px; background:#202528; border:1px solid #111416; outline:2px solid var(--gold-dark); box-shadow:0 2px 0 rgba(0,0,0,.45); }
  .city-hotspot:hover:not(:disabled),.city-hotspot:active:not(:disabled) { transform:none; background:#292e28; box-shadow:none; }
  /* The arch is hidden in the list, so the gate's own row is lit instead. */
  .city-hotspot.first-descent { outline-color:#e9ca8f; box-shadow:0 0 12px rgba(233,202,143,.5); }
  .city-hotspot .hotspot-label { position:static; display:flex; transform:none; margin:auto; background:none; border:0; padding:0; font-size:13px; }
  .city-hotspot-group { display:none; }
  .hotspot-flyout { position:static; display:flex!important; width:100%; max-width:100%; max-height:none; }
}
/* A party resting: how long, on the gate's own label. */
.hotspot-rest { color:#d6be94; font-weight:600; font-variant-numeric:tabular-nums; }
.hotspot-rest::before { content:'· '; }
.hotspot-rest[hidden] { display:none; }
