@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url(fonts/barlow-condensed-500.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(fonts/barlow-condensed-600.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(fonts/barlow-condensed-700.woff2) format("woff2"); }
@font-face { font-family: "Yellowtail"; font-weight: 400; font-display: swap; src: url(fonts/yellowtail-400.woff2) format("woff2"); }

:root {
  --ink: #1b1e33; --panel-a: rgba(30, 32, 62, 0.97); --panel-b: rgba(24, 26, 48, 0.93); --line: rgba(255, 255, 255, 0.13);
  --text: #f5f8fc; --mute: #aebbcd; --pink: #f0719f; --green: #8fdc8a; --cream: #f3ddc8; --blue: #7cc4f0;
  --cond: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --panel-w: 300px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #1b2748; color: var(--text); font-family: var(--cond); font-weight: 500; overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
#map { position: fixed; inset: 0; }
.maplibregl-canvas { outline: none; }
.maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left { display: none; }
.shadowed { text-shadow: 0 1px 0 var(--ink), 1px 0 0 var(--ink), -1px 0 0 var(--ink), 0 -1px 0 var(--ink), 0 2px 6px rgba(0, 0, 0, 0.5); }

/* ---------- left panel ---------- */
#panel { position: fixed; z-index: 6; left: 0; top: 0; bottom: 0; width: var(--panel-w); display: flex; flex-direction: column; background: linear-gradient(180deg, var(--panel-a), var(--panel-b)); box-shadow: 8px 0 30px rgba(10, 12, 30, 0.35); }
#panel h1 { margin: 0; padding: 22px 22px 14px; font: 600 34px/1 var(--cond); letter-spacing: 1.5px; text-transform: uppercase; }
.panel-body { flex: 1; min-height: 0; display: flex; }
.tabs { width: 62px; flex: none; display: flex; flex-direction: column; gap: 3px; padding: 4px 0 8px; overflow-y: auto; scrollbar-width: none; }
.tabs button { position: relative; height: 36px; display: grid; place-items: center; opacity: 0.92; }
.tabs button img { width: 24px; height: 24px; display: block; }
.tabs button::before { content: ""; position: absolute; left: 12px; top: 3px; bottom: 3px; width: 3px; border-radius: 2px; background: transparent; }
.tabs button.on::before { background: var(--pink); }
.tabs button.on { background: linear-gradient(90deg, rgba(255, 255, 255, 0.16), transparent); }
.tabs button:hover img, .tabs button:focus-visible img { transform: scale(1.12); }
.tabs button:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.list { flex: 1; min-width: 0; overflow-y: auto; padding: 0 14px 10px 4px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.25) transparent; }
.list-title { font: 600 12.5px/1 var(--cond); letter-spacing: 1.8px; text-transform: uppercase; color: var(--mute); padding: 12px 0 8px; }
#rows { list-style: none; margin: 0; padding: 0; }
#rows li { border-bottom: 1px solid var(--line); }
#rows button.row { width: 100%; display: flex; align-items: center; gap: 11px; padding: 9px 2px; text-align: left; font: 500 19px/1.1 var(--cond); letter-spacing: 0.3px; }
#rows button.row img { width: 24px; height: 24px; flex: none; }
#rows button.row .n { margin-left: auto; font-size: 14px; color: var(--mute); }
#rows button.row.off { opacity: 0.36; }
#rows button.row:hover, #rows button.row:focus-visible { background: rgba(255, 255, 255, 0.07); outline: none; }
#rows .all { font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; font-size: 15px; }
#rows input { width: 100%; margin: 4px 0 8px; padding: 9px 10px; font: 500 17px/1 var(--cond); color: var(--text); background: rgba(255, 255, 255, 0.09); border: 0; outline: none; }
#rows input::placeholder { color: var(--mute); }
#rows input:focus { box-shadow: 0 0 0 2px var(--blue); }
#rows .hint { padding: 10px 2px; font-size: 14.5px; line-height: 1.3; color: var(--mute); border: 0; }

.mini-wrap { position: relative; flex: none; height: 176px; margin: 8px 14px 40px; border-radius: 16px; overflow: hidden; border: 3px solid #cfe9f5; box-shadow: 0 0 0 2px var(--ink), 0 8px 22px rgba(0, 0, 0, 0.45); background: #1b2748; }
#mini { position: absolute; inset: 0; }
.mini-wrap .dist { position: absolute; top: 8px; left: 8px; padding: 3px 8px 4px; border-radius: 6px; background: rgba(20, 22, 40, 0.82); font: 600 14px/1 var(--cond); letter-spacing: 0.5px; }
.mini-wrap .dist:empty { display: none; }
.mini-wrap .north { position: absolute; left: 8px; bottom: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2px #fff; display: grid; place-items: center; }
.mini-wrap .north i { font: 700 14px/1 var(--cond); font-style: normal; display: block; }
.mini-wrap .me { position: absolute; left: 50%; top: 70%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2.5px #fff; }
.mini-wrap .me::after { content: ""; position: absolute; left: 50%; top: 50%; margin: -8px 0 0 -6px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 13px solid #fff; }

.menu-btn { display: none; }

/* ---------- counters, top right ---------- */
#counters { position: fixed; z-index: 5; top: 14px; right: 16px; text-align: right; }
.c-row { display: flex; justify-content: flex-end; align-items: center; gap: 8px; font: 700 26px/1.25 var(--cond); letter-spacing: 0.5px; text-shadow: 0 0 2px var(--ink), 0 1px 0 var(--ink), 1px 0 0 var(--ink), -1px 0 0 var(--ink), 0 -1px 0 var(--ink), 0 3px 8px rgba(0, 0, 0, 0.45); font-variant-numeric: tabular-nums; }
.badge { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--ink); }
.badge img { width: 17px; height: 17px; display: block; }
.b-green { background: var(--green); } .b-pink { background: var(--pink); }
.c-clock { margin-top: 4px; font: 600 14px/1 var(--cond); letter-spacing: 1px; text-transform: uppercase; text-shadow: 0 0 2px var(--ink), 0 1px 0 var(--ink), 1px 0 0 var(--ink), -1px 0 0 var(--ink), 0 -1px 0 var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- info card ---------- */
#card { position: fixed; z-index: 5; top: 104px; right: 16px; width: 340px; max-width: calc(100vw - 32px); background: rgba(34, 37, 56, 0.96); box-shadow: 0 10px 34px rgba(10, 12, 30, 0.45); }
#card[hidden] { display: none; }
.card-head { padding: 13px 44px 12px 16px; background: rgba(22, 24, 40, 0.96); border-left: 4px solid var(--pink); }
.kicker { font: 600 14px/1 var(--cond); letter-spacing: 1.4px; text-transform: uppercase; color: var(--mute); }
.title { margin-top: 5px; font: 700 21px/1.1 var(--cond); letter-spacing: 0.8px; text-transform: uppercase; }
#card .close { position: absolute; top: 6px; right: 8px; width: 30px; height: 30px; font-size: 24px; line-height: 1; color: var(--mute); }
#cRows { margin: 0; padding: 2px 16px 6px; }
#cRows div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font: 600 16px/1.15 var(--cond); letter-spacing: 0.9px; text-transform: uppercase; }
#cRows div:last-child { border-bottom: 0; }
#cRows dt { color: var(--text); flex: none; } #cRows dd { margin: 0; text-align: right; }
#cRows dd.ok { color: var(--green); } #cRows dd.late { color: #ff8686; } #cRows dd.plan { color: var(--mute); }

/* ---------- control hints, right ---------- */
#hints { position: fixed; z-index: 5; right: 16px; bottom: 132px; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }
#hints li[hidden] { display: none; }
#hints button, #hints .zoom { display: flex; align-items: center; gap: 9px; font: 700 17px/1 var(--cond); letter-spacing: 1px; text-transform: uppercase; text-shadow: 0 0 2px var(--ink), 0 1px 0 var(--ink), 1px 0 0 var(--ink), -1px 0 0 var(--ink), 0 -1px 0 var(--ink), 0 2px 6px rgba(0, 0, 0, 0.5); }
#hints .zoom button { gap: 0; }
kbd { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font: 700 13px/1 var(--cond); text-shadow: none; box-shadow: 0 0 0 2px #fff; }
#hints button:hover kbd, #hints button:focus-visible kbd { background: #fff; color: var(--ink); }
#hints button:focus-visible { outline: none; }
#hints button.on kbd { background: var(--pink); }

/* ---------- place name, bottom right ---------- */
#place { position: fixed; z-index: 4; right: 20px; bottom: 38px; text-align: right; pointer-events: none; }
#street { min-height: 22px; font: 700 20px/1.1 var(--cond); letter-spacing: 1.6px; text-transform: uppercase; text-shadow: 0 0 2px var(--ink), 0 1px 0 var(--ink), 1px 0 0 var(--ink), -1px 0 0 var(--ink), 0 -1px 0 var(--ink), 0 2px 6px rgba(0, 0, 0, 0.5); }
#region { font: 400 62px/0.95 "Yellowtail", "Brush Script MT", cursive; transform: rotate(-5deg); transform-origin: right bottom; padding: 0 6px 4px 0; text-shadow: 3px 3px 0 var(--ink), -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink), 0 6px 18px rgba(0, 0, 0, 0.35); white-space: nowrap; }

/* ---------- footer bar ---------- */
#foot { position: fixed; z-index: 7; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; gap: 2px 14px; justify-content: center; padding: 6px 10px; font: 500 12.5px/1.25 var(--cond); letter-spacing: 0.4px; color: var(--mute); background: rgba(17, 19, 38, 0.92); }
#foot a, #foot button { color: inherit; text-decoration: underline; text-underline-offset: 2px; font: inherit; letter-spacing: inherit; }
#foot a:hover, #foot button:hover { color: #fff; }

dialog { max-width: 520px; border: 0; padding: 22px 24px; background: #20233a; color: var(--text); font: 500 17px/1.4 var(--cond); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
dialog::backdrop { background: rgba(10, 12, 30, 0.6); }
dialog h2 { margin: 0 0 8px; font: 600 26px/1 var(--cond); letter-spacing: 1.5px; text-transform: uppercase; }
dialog form button { margin-top: 6px; padding: 8px 14px; background: #fff; color: var(--ink); font: 700 14px/1 var(--cond); letter-spacing: 1.5px; text-transform: uppercase; }

@media (max-width: 860px) {
  :root { --panel-w: 280px; }
  #panel { transform: translateX(-102%); transition: transform 0.25s ease; }
  #panel.open { transform: none; }
  .menu-btn { display: block; position: fixed; z-index: 7; top: 12px; left: 12px; padding: 9px 14px; background: rgba(27, 30, 51, 0.95); font: 700 16px/1 var(--cond); letter-spacing: 1.6px; text-transform: uppercase; }
  #panel h1 { padding-left: 110px; padding-top: 16px; }
  #hints { bottom: 112px; right: 10px; gap: 7px; } #hints button, #hints .zoom { font-size: 14px; }
  #hints li:nth-child(4), #hints li:nth-child(5) { display: none; }
  #region { font-size: 44px; } #street { font-size: 16px; }
  #place { right: 12px; bottom: 44px; }
  #card { top: auto; bottom: 40px; left: 10px; right: 10px; width: auto; z-index: 8; }
  .c-row { font-size: 21px; } .badge { width: 22px; height: 22px; }
  #foot { font-size: 10.5px; gap: 0 10px; padding: 4px 8px; }
  #place { bottom: 64px; } #hints { bottom: 140px; }
}
@media (prefers-reduced-motion: reduce) { #panel { transition: none; } }
