/* Shared listing and city pages (badava.app/l/…, /split). Design: the „Podijeljeni oglas" row on
   the „βadava web — početna" canvas. Colours mirror design/design-system/tokens.json (Dan). Light
   only, like the homepage and the canvas: no dark mode, whatever the device is set to. */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/geist-latin-ext.woff2) format("woff2");
  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: "Geist";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/geist-latin.woff2) format("woff2");
  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;
}

:root {
  --bg: #f8f5f0;
  --surface: #ffffff;
  --surface-2: #eee9e1;
  --line: #e5ded3;
  --line-soft: #ebe5db;
  --ink: #16181b;
  --on-ink: #f8f5f0;
  --ink-soft: #3a3d42;
  --ink-muted: #686c73;
  --accent: #0f766e;
  --on-accent: #ffffff;
  --accent-deep: #0a4f4a;
  --accent-tint: rgba(15, 118, 110, 0.1);
  --apricot: #ffb27a;
  --ok: #dcf2e1;
  --ok-ink: #166534;
  --warn: #fdf0c4;
  --warn-ink: #7a4f00;
  --map-land: #e6ece9;
  --backdrop: rgba(22, 24, 27, 0.4);
  --shadow: 0 4px 14px rgba(90, 58, 30, 0.07);
  --gutter: 16px;
  color-scheme: light;
}
/* Category tints (tokens cat-*). */
.cat-djeca { --cat: #fce7f0; --cat-ink: #9d174d; }
.cat-dom { --cat: #fdf0c4; --cat-ink: #7a4f00; }
.cat-namjestaj { --cat: #f3e8dd; --cat-ink: #7a4a24; }
.cat-alat { --cat: #e2e8f0; --cat-ink: #334155; }
.cat-gradevina { --cat: #ecead6; --cat-ink: #565416; }
.cat-vrt { --cat: #dcf2e1; --cat-ink: #166534; }
.cat-odjeca { --cat: #ede4fb; --cat-ink: #6b21a8; }
.cat-elektronika { --cat: #e3e6fb; --cat-ink: #3730a3; }
.cat-sport { --cat: #dbeffb; --cat-ink: #075985; }
.cat-ostalo { --cat: #eceae5; --cat-ink: #4b4f55; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 92px; /* room for the install bar */
}
body.locked { overflow: hidden; }
a { color: var(--accent); }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.logo { display: inline-flex; align-items: center; gap: 1px; color: var(--ink); text-decoration: none; font-size: 24px; font-weight: 600; letter-spacing: -0.03em; padding: 6px 0; }
.logo svg { margin-bottom: -6px; }
.top nav { display: flex; align-items: center; gap: 4px 20px; font-size: 15px; font-weight: 500; }
.top nav a.link { color: var(--ink-soft); text-decoration: none; padding: 10px 0; display: none; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.pill.outline { color: var(--accent); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--accent); min-height: 40px; font-size: 14px; }
.pill.dark { background: var(--ink); color: var(--on-ink); }
.pill.light { background: #fff; color: #0a4f4a; }
.pill.quiet { background: var(--surface-2); color: var(--ink); }
.pill.block { width: 100%; }

/* Listing layout */
.listing { display: grid; gap: 20px; }
.gallery { position: relative; }
.photos { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 26px; scrollbar-width: none; background: var(--cat, var(--surface-2)); }
.photos::-webkit-scrollbar { display: none; }
.photos button { flex: 0 0 100%; scroll-snap-align: start; padding: 0; cursor: zoom-in; aspect-ratio: 4 / 3; background: var(--cat, var(--surface-2)); }
.photos img { width: 100%; height: 100%; object-fit: cover; }
.photos .none { display: flex; align-items: center; justify-content: center; color: var(--cat-ink, var(--ink-muted)); width: 100%; aspect-ratio: 4 / 3; }
.count { position: absolute; right: 12px; top: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(22, 24, 27, 0.62); color: #fff; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; pointer-events: none; }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.dots span { height: 6px; width: 6px; border-radius: 3px; background: var(--line); transition: width 0.2s; }
.dots span.on { width: 18px; background: var(--ink); }
.thumbs { display: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; font-weight: 600; }
.chip { padding: 4px 10px; border-radius: 999px; }
.chip.ok { background: var(--ok); color: var(--ok-ink); }
.chip.warn { background: var(--warn); color: var(--warn-ink); }
.chip.line { box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-soft); font-weight: 500; }
.titlerow { display: flex; align-items: flex-start; gap: 12px; margin-top: 12px; }
.titlerow h1 { flex: 1; margin: 0; font-size: clamp(28px, 3vw, 40px); line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.round { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 14px; color: var(--ink-muted); }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.meta .pin { color: var(--accent); }
.cond { margin-top: 14px; font-size: 14px; color: var(--ink-muted); }
.cond b { color: var(--ink); font-weight: 500; }
.desc { margin: 8px 0 0; font-size: 16px; line-height: 1.6; color: var(--ink-soft); white-space: pre-line; overflow-wrap: anywhere; }
.cta { margin-top: 20px; width: 100%; min-height: 56px; border-radius: 18px; background: var(--accent); color: var(--on-accent); font-size: 16px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 10px 22px rgba(15, 118, 110, 0.22); }
.private { margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: var(--ink-muted); text-align: center; }

.card { background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); }
.giver { display: flex; align-items: center; gap: 14px; padding: 14px; }
.avatar { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 999px; background: var(--surface-2); color: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 600; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.small { font-size: 13px; color: var(--ink-muted); }
.name { font-size: 17px; font-weight: 600; }

.openapp { display: none; }

section.block { margin-top: 30px; }
section.block h2 { margin: 0 4px 12px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.map { position: relative; height: 200px; border-radius: 22px; overflow: hidden; background: var(--map-land); }
.map .gl { position: absolute; inset: 0; }
.map .zone { position: absolute; left: 50%; top: 50%; width: 150px; height: 150px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(15, 118, 110, 0.32) 0%, rgba(15, 118, 110, 0.16) 52%, rgba(15, 118, 110, 0) 72%); pointer-events: none; z-index: 2; }
.map .tag { position: absolute; left: 10px; top: 10px; z-index: 2; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); font-size: 12px; font-weight: 600; color: #0a4f4a; }
.map .credit { position: absolute; right: 8px; bottom: 6px; z-index: 2; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.8); font-size: 10px; color: #3a3d42; }
.map .credit a { color: inherit; }
.area { margin: 12px 4px 0; font-size: 15px; font-weight: 600; }

/* Cards (nearby strip and city grid) */
.strip { display: flex; gap: 12px; overflow-x: auto; padding: 2px var(--gutter) 12px; margin: 0 calc(var(--gutter) * -1); scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip .item { flex: 0 0 152px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.item { display: block; padding: 8px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.item .ph { aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--cat, var(--surface-2)); color: var(--cat-ink); display: flex; align-items: center; justify-content: center; }
.item .ph img { width: 100%; height: 100%; object-fit: cover; }
.item .t { display: block; padding: 10px 6px 2px; font-size: 15px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.item .s { display: block; padding: 0 6px 4px; font-size: 13px; color: var(--ink-muted); }
.all { margin-top: 4px; }
.all a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border-radius: 16px; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none; }

.post { margin-top: 30px; padding: 26px 22px; border-radius: 28px; position: relative; overflow: hidden; background: linear-gradient(160deg, #13897f 0%, #0f766e 45%, #0a4f4a 100%); color: #fff; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.post h2 { margin: 0; font-size: clamp(24px, 3vw, 36px); line-height: 1.12; font-weight: 600; letter-spacing: -0.02em; }
.post h2 span { color: var(--apricot); }
.post p { margin: 10px 0 0; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, 0.88); }

.gone { padding: 32px 22px; text-align: center; }
.gone .ic { margin: 0 auto; width: 84px; height: 84px; border-radius: 999px; background: var(--surface-2); color: var(--ink-muted); display: flex; align-items: center; justify-content: center; }
.gone h1 { margin: 18px 0 0; font-size: 24px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; }
.gone p { margin: 10px 0 0; color: var(--ink-muted); }

/* City page */
.hero { padding-top: 10px; }
.hero .where { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--accent); }
.hero h1 { margin: 8px 0 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.08; font-weight: 600; letter-spacing: -0.03em; }
.hero p { margin: 8px 0 0; color: var(--ink-muted); max-width: 560px; }
.cats { display: flex; gap: 8px; overflow-x: auto; margin: 16px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter) 4px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats a { flex: 0 0 auto; min-height: 38px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--ink-soft); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
.cats a[aria-current="page"] { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.found { margin: 14px 4px 10px; font-size: 13px; color: var(--ink-muted); }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.empty { padding: 28px 22px; text-align: center; }

footer.site { padding-top: 30px; padding-bottom: 26px; font-size: 14px; color: var(--ink-muted); }
footer.site .row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
footer.site a { color: var(--ink-muted); padding: 10px 0; display: inline-block; }

/* Install bar (phones) */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: var(--surface); box-shadow: 0 -6px 20px rgba(90, 58, 30, 0.1); display: flex; align-items: center; gap: 12px; }
.appicon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; background: linear-gradient(160deg, #13897f, #0a4f4a); display: flex; align-items: center; justify-content: center; }
.bar .txt { flex: 1; min-width: 0; }
.bar b { display: block; font-size: 15px; font-weight: 600; }

/* Install sheet */
dialog.sheet { margin: auto auto 0; width: 100%; max-width: 560px; max-height: 92vh; padding: 8px 20px calc(28px + env(safe-area-inset-bottom)); border: 0; border-radius: 28px 28px 0 0; background: var(--bg); color: var(--ink); overflow-y: auto; }
dialog.sheet::backdrop { background: var(--backdrop); }
.grab { margin: 0 auto 14px; width: 40px; height: 5px; border-radius: 3px; background: var(--line); }
.sheet-head { display: flex; align-items: flex-start; gap: 14px; }
.sheet-head .appicon { width: 52px; height: 52px; flex-basis: 52px; border-radius: 14px; }
.sheet-head h2 { margin: 2px 0 0; font-size: 21px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; }
.sheet-head p { margin: 6px 0 0; font-size: 14px; color: var(--ink-muted); }
.sheet-head .x { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 999px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; margin-left: auto; }
.tabs { margin-top: 18px; padding: 4px; border-radius: 14px; background: var(--surface-2); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.tabs button { min-height: 40px; border-radius: 11px; font-size: 14px; font-weight: 600; color: var(--ink-muted); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px rgba(22, 24, 27, 0.1); }
.play { margin-top: 18px; min-height: 52px; font-size: 16px; }
.sheet-note { margin: 12px 2px 0; font-size: 13px; color: var(--ink-muted); }
.ios { margin-top: 14px; padding: 22px 18px; border-radius: 18px; background: var(--surface); text-align: center; }
.ios h3 { margin: 12px 0 0; font-size: 18px; font-weight: 600; }
.ios p { margin: 6px 0 16px; font-size: 14px; color: var(--ink-muted); }
.ios .ic { margin: 0 auto; width: 64px; height: 64px; border-radius: 999px; background: var(--accent-tint); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.qr { flex: 0 0 auto; padding: 10px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); line-height: 0; }
.qr svg { width: 168px; height: 168px; }
.onphone { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 20px; }
.onphone ol { flex: 1 1 200px; margin: 0; padding-left: 20px; font-size: 15px; display: flex; flex-direction: column; gap: 10px; }
.copy { margin-top: 18px; padding: 6px 6px 6px 14px; border-radius: 14px; background: var(--surface); display: flex; align-items: center; gap: 10px; }
.copy span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft); }
[data-desktop-only] { display: none; }

/* Lightbox */
dialog.lightbox { margin: 0; width: 100%; height: 100%; max-width: none; max-height: none; padding: 0; border: 0; background: #0b0c0e; color: #fff; }
dialog.lightbox::backdrop { background: #0b0c0e; }
.lb { height: 100%; display: flex; flex-direction: column; }
.lb-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 14px 20px; font-variant-numeric: tabular-nums; }
.lb-top button, .lb-nav { width: 44px; height: 44px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); color: #fff; display: flex; align-items: center; justify-content: center; }
.lb-stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(11, 12, 14, 0.55); }
.lb-nav.prev { left: 10px; }
.lb-nav.next { right: 10px; }

.toast { position: fixed; left: 50%; bottom: 104px; z-index: 60; transform: translateX(-50%); padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-size: 14px; font-weight: 500; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.toast.on { opacity: 1; }

/* Computers: two columns, QR card, no install bar. */
@media (min-width: 960px) {
  :root { --gutter: 48px; }
  body { padding-bottom: 0; }
  .bar, .top .pill.outline, .dots, .count { display: none; }
  .top nav a.link { display: inline-block; }
  .listing { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: start; margin-top: 8px; }
  .photos { border-radius: 30px; }
  .photos button { cursor: zoom-in; }
  .thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
  .thumbs button { width: 92px; height: 72px; border-radius: 14px; overflow: hidden; padding: 0; opacity: 0.8; background: var(--surface-2); }
  .thumbs button[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2.5px var(--accent); }
  .thumbs img { width: 100%; height: 100%; object-fit: cover; }
  .openapp { display: flex; gap: 18px; align-items: center; padding: 20px; margin-top: 16px; box-shadow: inset 0 0 0 1.5px var(--accent); }
  .openapp .qr svg { width: 112px; height: 112px; }
  .openapp h2 { margin: 0; font-size: 17px; font-weight: 600; }
  .openapp p { margin: 6px 0 0; font-size: 14px; color: var(--ink-muted); }
  .cta, .private { display: none; }
  .lower { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px; margin-top: 48px; }
  .lower section.block { margin-top: 0; }
  .map { height: 260px; }
  .strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); overflow: visible; margin: 0; padding: 0; gap: 14px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
  .post { margin-top: 56px; padding: 44px; border-radius: 32px; }
  dialog.sheet { margin: auto; border-radius: 28px; padding: 24px; }
  .grab { display: none; }
  [data-desktop-only] { display: block; }
  [data-phone-only] { display: none; }
  footer.site { margin-top: 48px; border-top: 1px solid var(--line-soft); }
}
@media (min-width: 960px) {
  .pill[data-desktop-only] { display: inline-flex; }
}
