/* Mapa drążków on ssworkout.pl: the app's look (docs/v3, src/theme.ts) for the browser. Phone: the map with the search
   on top and the cards at the bottom, a park as a sheet; computer: a column on the left with the list or the park. */

@font-face { font-family: Barlow; font-weight: 500; font-display: swap; src: url(/mapa/fonty/Barlow_500Medium.ttf) format('truetype'); }
@font-face { font-family: Barlow; font-weight: 600; font-display: swap; src: url(/mapa/fonty/Barlow_600SemiBold.ttf) format('truetype'); }
@font-face { font-family: Barlow; font-weight: 700; font-display: swap; src: url(/mapa/fonty/Barlow_700Bold.ttf) format('truetype'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 800; font-display: swap; src: url(/mapa/fonty/BarlowCondensed_800ExtraBold.ttf) format('truetype'); }

:root {
  --bg: #0B0B0D; --sf: #17171B; --sf2: #212127; --sf3: #2C2C33; --ln: #26262D; --tx: #F4F4F6; --mu: #9B9BA5; --fa: #62626D;
  --pr: #E3342F; --gold: #FFD447; --ok: #3EE06B; --amber: #FFB23F; --blue: #4AA3FF; --edge: #2A2A31;
  --side: 380px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* the list and the park take turns: no rule here may show a hidden one */
html, body { margin: 0; height: 100%; background: #101013; color: var(--tx); font-family: Barlow, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-weight: 500; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
#map { position: fixed; inset: 0; }
.noscript { position: fixed; inset: auto 16px 16px; background: var(--sf); padding: 16px; border-radius: 14px; }

/* ---------- the top: logo, search, filter ---------- */
.top { position: fixed; z-index: 3; top: 12px; left: 12px; right: 12px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.top > * { pointer-events: auto; }
.brand { display: none; }
.search { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border-radius: 23px; background: rgba(23, 23, 27, .96); border: 1px solid var(--edge); }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--mu); stroke-width: 2; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--tx); font: 600 16px Barlow, sans-serif; }
.search input::placeholder { color: var(--mu); }
.search input::-webkit-search-cancel-button { display: none; }
.clear { border: 0; background: none; color: var(--mu); font-size: 22px; line-height: 1; padding: 0 2px; }
.chips { display: flex; align-items: center; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 17px; background: rgba(23, 23, 27, .96); border: 1px solid var(--edge); font-weight: 600; font-size: 14px; }
.chip[aria-checked='true'] { background: var(--tx); color: #111; border-color: var(--tx); }
.count { font-weight: 600; font-size: 13px; color: #C9C9D1; text-shadow: 0 0 4px #000; }
.hits { background: rgba(23, 23, 27, .98); border: 1px solid var(--edge); border-radius: 18px; overflow: hidden; max-height: 60vh; overflow-y: auto; }
.hit { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; min-height: 52px; border: 0; background: none; text-align: left; border-top: 1px solid var(--ln); }
.hit:first-child { border-top: 0; }
.hit:hover, .hit:focus-visible, .hit.on { background: var(--sf2); outline: 0; }
.hit b { display: block; font-weight: 700; font-size: 16px; }
.hit small { color: var(--mu); font-size: 13px; }
.hit .ico { width: 18px; height: 18px; flex: none; }
.empty { padding: 16px; color: var(--mu); font-size: 14px; }

/* ---------- the list and the park: cards at the bottom on a phone ---------- */
.panel { position: fixed; z-index: 2; left: 0; right: 0; bottom: 0; pointer-events: none; }
.panel > * { pointer-events: auto; }
.seo { display: none; }
.list { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 12px 14px; scrollbar-width: none; }
.list::-webkit-scrollbar { display: none; }
.card { flex: 0 0 min(340px, calc(100vw - 64px)); scroll-snap-align: start; display: flex; gap: 10px; align-items: flex-start; text-align: left;
  background: var(--sf); border: 1.5px solid transparent; border-radius: 18px; padding: 12px; min-height: 118px; }
.card:hover, .card:focus-visible { background: var(--sf2); outline: 0; }
.card.on { border-color: rgba(255, 255, 255, .55); }
.card .dot { width: 12px; height: 12px; border-radius: 6px; border: 2px solid #fff; margin-top: 4px; flex: none; }
.card .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.eb { font-weight: 700; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.card .name { font-weight: 700; font-size: 16px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .eq { font-weight: 600; font-size: 13px; color: #D6D6DC; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .where { font-size: 12.5px; color: var(--mu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.town { flex-direction: column; justify-content: center; gap: 4px; }
.card.town .name { font-size: 19px; }
.card.add { flex-direction: column; justify-content: center; border: 1px dashed var(--edge); }
.card.add .name { font-size: 15px; }

/* the park: a sheet from the bottom on a phone */
.detail { max-height: 74vh; overflow-y: auto; background: var(--bg); border-radius: 22px 22px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, .5); padding-bottom: 24px; }
.detail .hero { position: relative; height: 200px; background: #14141A; border-radius: 22px 22px 0 0; overflow: hidden; }
.detail .hero.none { height: 54px; }
.detail .hero .photos { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.detail .hero .photos::-webkit-scrollbar { display: none; }
.detail .hero figure { margin: 0; flex: 0 0 100%; height: 100%; position: relative; scroll-snap-align: start; }
.detail .hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail .hero figcaption { position: absolute; top: 10px; right: 10px; max-width: 80%; background: rgba(0, 0, 0, .55); color: #E6E6EA; font-size: 11px; padding: 3px 8px; border-radius: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail .close { position: absolute; top: 8px; left: 10px; width: 40px; height: 40px; border-radius: 20px; border: 1px solid var(--edge); background: rgba(23, 23, 27, .92); font-size: 22px; line-height: 1; z-index: 1; }
.detail .in { padding: 0 16px; display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.detail h1 { font-family: 'Barlow Condensed', Barlow, sans-serif; font-weight: 800; font-size: 30px; line-height: 1.05; margin: 2px 0 0; }
.sub { color: var(--mu); font-size: 14.5px; }
.by { color: var(--mu); font-size: 14px; }
.by a { color: var(--tx); font-weight: 700; text-decoration: none; }
.by a:hover { text-decoration: underline; }
.row { display: flex; gap: 10px; }
.btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 16px; border: 0; text-decoration: none; font-weight: 700; font-size: 15.5px; background: var(--sf2); color: var(--tx); }
.btn.pri { background: var(--pr); color: #fff; }
.btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.box { background: var(--sf); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.king { border: 1px solid rgba(255, 212, 71, .28); }
.king .head { display: flex; gap: 14px; align-items: center; }
.crown { width: 50px; height: 50px; border-radius: 16px; background: rgba(255, 212, 71, .12); display: grid; place-items: center; flex: none; }
.crown svg { width: 28px; height: 28px; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; }
.king .nick { font-family: 'Barlow Condensed', Barlow, sans-serif; font-weight: 800; font-size: 22px; }
.label { font-weight: 700; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--mu); margin: 4px 2px -6px; }
.top5 { padding: 0; gap: 0; overflow: hidden; }
.top5 .p { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--ln); }
.top5 .p:first-child { border-top: 0; }
.top5 .n { width: 24px; text-align: center; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 18px; color: var(--mu); }
.top5 .p:first-child .n { color: var(--gold); }
.top5 .who { flex: 1; min-width: 0; font-weight: 600; }
.top5 .pts { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 17px; }
/* a person's rank beside the name (09.10.2026), as on the home page */
.rchip { color: var(--c); font-weight: 700; }
/* the rank's badge beside the person, as big as in the app (09.10.2026: an 18 px one beside the name was a dot) */
.rbig { width: 34px; height: 34px; flex: none; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .55)); }
.king .rbig { width: 46px; height: 46px; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 56px; }
.bars i { flex: 1; border-radius: 2px; background: #55555F; min-height: 3px; }
.bars i.zero { background: #26262D; }
.bars i.now { background: var(--pr); }
.axis { display: flex; justify-content: space-between; color: var(--fa); font-size: 10.5px; }
.gear { display: flex; flex-wrap: wrap; gap: 8px; }
.have { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 14px; background: rgba(62, 224, 107, .1); font-weight: 600; font-size: 14px; }
.have::before { content: '✓'; color: var(--ok); font-weight: 700; }
.facts { padding: 0; gap: 0; overflow: hidden; }
.facts div { display: flex; justify-content: space-between; padding: 12px 14px; border-top: 1px solid var(--ln); font-size: 14px; }
.facts div:first-child { border-top: 0; }
.facts span { color: var(--mu); }
.note { color: #C9C9D1; font-size: 14px; line-height: 1.45; }
.app { border: 1px solid rgba(227, 52, 47, .35); }
.credits { color: var(--fa); font-size: 11.5px; }
.credits a { color: var(--mu); }
.muted { color: var(--mu); font-size: 14px; }
.spin { width: 22px; height: 22px; border: 3px solid var(--sf3); border-top-color: var(--pr); border-radius: 50%; animation: spin .8s linear infinite; margin: 18px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* where am I */
.locate { position: fixed; z-index: 2; right: 12px; bottom: 156px; width: 46px; height: 46px; border-radius: 23px; border: 1px solid var(--edge); background: rgba(23, 23, 27, .96); display: grid; place-items: center; }
.locate svg { width: 22px; height: 22px; fill: none; stroke: var(--tx); stroke-width: 2; }
.locate svg .dot { fill: var(--tx); stroke: none; }
.locate.on svg { stroke: var(--blue); }
.locate.on svg .dot { fill: var(--blue); }
body.sheet .locate { display: none; }

/* MapLibre's own controls in the app's colours */
.maplibregl-ctrl-attrib { background: rgba(16, 16, 19, .75) !important; color: #B0B0B8; font-family: Barlow, sans-serif; }
.maplibregl-ctrl-attrib a { color: #C9C9D1 !important; }
.maplibregl-ctrl-attrib-button { filter: invert(1); }
.maplibregl-ctrl-group { background: rgba(23, 23, 27, .96) !important; border: 1px solid var(--edge); }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--edge) !important; }
.maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1); }
.maplibregl-ctrl-bottom-right { bottom: 146px; }

/* ---------- a computer: a column on the left ---------- */
@media (min-width: 900px) {
  .top { left: 12px; right: auto; width: calc(var(--side) - 12px); }
  .brand { display: block; height: 30px; margin: 2px 0 4px 4px; }
  .brand img { height: 30px; width: auto; }
  .panel { top: 168px; left: 12px; right: auto; bottom: 12px; width: calc(var(--side) - 12px); background: rgba(16, 16, 19, .94); border: 1px solid var(--edge); border-radius: 20px; overflow: hidden; display: flex; }
  .list { flex-direction: column; overflow-x: hidden; overflow-y: auto; scroll-snap-type: none; padding: 10px; flex: 1; }
  .card { flex: 0 0 auto; min-height: 0; }
  .detail { max-height: none; flex: 1; border-radius: 0; box-shadow: none; background: transparent; }
  .detail .hero { border-radius: 0; }
  .locate { bottom: 70px; }
  .maplibregl-ctrl-bottom-right { bottom: 0; }
  body.sheet .locate { display: grid; }
}

/* the King's and the five best's nicknames open their pages (/profil/<id>) */
.king a.nick, .top5 .who a { color: inherit; text-decoration: none; }
.king a.nick:hover, .top5 .who a:hover { text-decoration: underline; text-underline-offset: 3px; }
.king a.nick { display: block; }
