/* tiny vienna. Tokens match the Bogen file "tiny vienna". */
@font-face { font-family: "Sofia Sans Condensed"; src: url(fonts/sofia-sans-condensed.woff2) format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Sofia Sans Condensed"; src: url(fonts/sofia-sans-condensed-ext.woff2) format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Federo"; src: url(fonts/federo.woff2) format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --pflaster: #C2C5D0;
  --paper: #F7F4EC;
  --ink: #121C29;
  --schild: #1E3A5C;
  --schild-dim: #A9BCD3;
  --rotweissrot: #C8102E;
  --hud: rgb(18 28 41 / .88);
  --font-hud: "Sofia Sans Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-bezirk: "Federo", Georgia, serif;
  --gap: 12px;
  --edge-l: max(var(--gap), env(safe-area-inset-left, 0px));
  --edge-r: max(var(--gap), env(safe-area-inset-right, 0px));
  --edge-b: max(var(--gap), env(safe-area-inset-bottom, 0px));
  --radar-w: 232px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { overflow: hidden; background: var(--pflaster); color: var(--paper); font-family: var(--font-hud); -webkit-font-smoothing: antialiased; }
#app { position: relative; height: 100%; overflow: hidden; }
#map { position: absolute; inset: 0; background: var(--pflaster); }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--rotweissrot); outline-offset: 2px; }
.maplibregl-canvas:focus-visible { outline: 2px solid var(--rotweissrot); outline-offset: -2px; }

/* centre of the screen: where "you" are */
.cross { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border: 2px solid var(--ink); border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 1.5px rgb(247 244 236 / .7); }
.cross::after { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: var(--ink); }

.tip { position: absolute; left: 0; top: 0; padding: 6px 10px 7px; max-width: 280px; background: var(--hud); border-radius: 6px; font: 600 16px/1.2 var(--font-hud); letter-spacing: .02em; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transform: translate(-50%, calc(-100% - 18px)); }
.tip small { display: block; font-weight: 500; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--schild-dim); }

/* legend, top left */
.legend { position: absolute; left: var(--edge-l); top: var(--gap); width: 252px; max-height: calc(100% - 200px); display: flex; flex-direction: column; background: var(--hud); border-radius: 8px; overflow: hidden; }
.legend-head { display: flex; align-items: baseline; gap: 8px; width: 100%; padding: 12px 12px 8px; border: 0; background: none; text-align: left; }
.legend-title { font: 400 26px/1 var(--font-bezirk); }
.legend-total { margin-left: auto; font: 500 13px/1 var(--font-hud); letter-spacing: .06em; color: var(--schild-dim); font-variant-numeric: tabular-nums; }
.chev { width: 12px; height: 12px; align-self: center; transition: transform .2s; }
.legend[data-open="false"] .chev { transform: rotate(-90deg); }
.legend[data-open="false"] .legend-list { display: none; }
.legend-list { list-style: none; margin: 0; padding: 0 0 8px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / .25) transparent; }
.kind { display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px 12px; border: 0; background: none; font: 600 15px/1.25 var(--font-hud); letter-spacing: .05em; text-transform: uppercase; text-align: left; }
.kind:hover { background: rgb(255 255 255 / .08); }
.kind[aria-pressed="true"] { background: var(--paper); color: var(--ink); }
.kind[aria-pressed="true"] .n { color: var(--ink); }
.kind img { width: 20px; height: 20px; flex: none; }
.kind .n { margin-left: auto; font-weight: 500; color: var(--schild-dim); font-variant-numeric: tabular-nums; }
.list-all { border-bottom: 1px solid rgb(255 255 255 / .12); margin-bottom: 4px; padding-bottom: 8px; }

/* camera, top right */
.controls { position: absolute; right: var(--edge-r); top: var(--gap); display: flex; flex-direction: column; gap: 6px; }
.controls button { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; background: var(--hud); font: 700 17px/1 var(--font-hud); }
.controls button:hover { background: rgb(18 28 41 / .96); }
.controls button[aria-pressed="true"] { background: var(--paper); color: var(--ink); }
.controls svg { width: 20px; height: 20px; }
.controls .gap { margin-top: 8px; }

/* radar, bottom left: follows the centre and turns with the camera */
.radar { position: absolute; left: var(--edge-l); bottom: var(--edge-b); width: var(--radar-w); height: 150px; overflow: hidden; border-radius: 8px; background: var(--pflaster); box-shadow: 0 0 0 3px var(--ink); pointer-events: none; }
#radarMap { position: absolute; inset: 0; }
.radar-me { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; }
.radar-n { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--ink); color: #fff; font: 700 12px/18px var(--font-hud); text-align: center; will-change: transform; }

/* street and district, bottom right: the street as a Viennese enamel sign */
.where { position: absolute; right: var(--edge-r); bottom: 34px; max-width: min(62%, 560px); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.sign { display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%; padding: 5px 12px 6px; border-radius: 4px; background: var(--schild); color: #fff; box-shadow: inset 0 0 0 2px var(--schild), inset 0 0 0 3.5px #fff; font: 600 19px/1.15 var(--font-hud); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sign-nr { font-weight: 700; }
.bezirk { font: 400 60px/1 var(--font-bezirk); color: var(--paper); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; text-shadow: 2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -2px 0 var(--ink), -2px -2px 0 var(--ink), 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 3px 0 var(--ink), 0 -3px 0 var(--ink), 5px 6px 0 rgb(18 28 41 / .3); letter-spacing: .01em; text-align: right; text-wrap: balance; transition: opacity .25s; padding: 0 4px 4px 0; }
.bezirk.is-changing { opacity: 0; }

.credit { position: absolute; left: calc(var(--edge-l) + var(--radar-w) + 14px); right: 40%; bottom: 6px; margin: 0; padding: 3px 8px 4px; border-radius: 4px; background: rgb(247 244 236 / .86); font: 500 12px/1.35 var(--font-hud); letter-spacing: .02em; color: var(--ink); width: fit-content; max-width: calc(60% - var(--radar-w) - 26px); }
.credit a { color: inherit; }

.notice { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: min(80%, 420px); margin: 0; padding: 14px 18px; border-radius: 8px; background: var(--hud); font: 500 18px/1.35 var(--font-hud); text-align: center; }

@media (max-width: 900px) {
  .bezirk { font-size: 46px; -webkit-text-stroke-width: 3.5px; }
  .credit { right: auto; left: calc(var(--edge-l) + var(--radar-w) + 14px); max-width: calc(100% - var(--radar-w) - 26px - var(--edge-r)); }
  .where { bottom: 54px; }
}
@media (max-width: 640px) {
  .legend { width: 210px; max-height: calc(100% - 210px); }
  .legend-title { font-size: 22px; }
  .kind { font-size: 14px; }
  .radar { display: none; }
  .where { left: var(--edge-l); max-width: none; bottom: 64px; }
  .sign { font-size: 16px; }
  .bezirk { font-size: 38px; -webkit-text-stroke-width: 3px; }
  .credit { left: var(--edge-l); bottom: max(6px, env(safe-area-inset-bottom, 0px)); max-width: calc(100% - var(--edge-l) - var(--edge-r)); font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .bezirk, .chev { transition: none; }
}
