/* pinPoint web — the Grafit theme from the app. */
:root {
  --bg: #DEDDD9; --fg: #1D1D1B; --card: #F3F2EE; --muted: #E7E6E1; --muted-fg: #5E5D58;
  --primary: #1D1D1B; --primary-fg: #F3F2EE; --accent: #E4EE6B; --accent-fg: #1D1D1B;
  --border: #B9B8B2; --soft-border: #CFCEC8; --danger: #B3402F; --ok: #4E7A3A;
  --r: 22px; --r-in: 14px;
  --sans: 'Geist', system-ui, sans-serif; --mono: 'JetBrains Mono', monospace;
}
:root[data-theme="dark"] {
  --bg: #141413; --fg: #ECEBE6; --card: #1F1F1D; --muted: #2A2A27; --muted-fg: #9C9B95;
  --primary: #ECEBE6; --primary-fg: #141413; --border: #3A3A36; --soft-border: #2A2A27; --danger: #E06B5A; --ok: #9BC77F;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141413; --fg: #ECEBE6; --card: #1F1F1D; --muted: #2A2A27; --muted-fg: #9C9B95;
    --primary: #ECEBE6; --primary-fg: #141413; --border: #3A3A36; --soft-border: #2A2A27; --danger: #E06B5A; --ok: #9BC77F;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); letter-spacing: -0.01em; }
body { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.ms { font-family: 'Material Symbols Rounded'; font-weight: normal; font-style: normal; font-size: 20px; line-height: 1;
  display: inline-block; vertical-align: middle; font-variation-settings: 'FILL' 0, 'wght' 400; user-select: none; }
.ms.fill { font-variation-settings: 'FILL' 1, 'wght' 400; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted-fg); }
.wrap { max-width: 2200px; margin: 0 auto; padding: 0 clamp(16px, 2.5vw, 40px); }

/* Header */
header.top { position: sticky; top: 0; z-index: 1000; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); }
header.top .wrap { display: flex; align-items: center; gap: 10px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 18px; margin-right: 14px; }
.logo i { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; }
nav.main { display: flex; gap: 4px; flex: 1; }
nav.main a { padding: 9px 16px; border-radius: 99px; font-size: 14px; }
nav.main a.on { background: var(--primary); color: var(--primary-fg); }
nav.main a:not(.on):hover { background: var(--muted); }

/* Controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 99px;
  border: 0; background: var(--primary); color: var(--primary-fg); cursor: pointer; font-size: 14px; white-space: nowrap; }
.btn .ms { color: var(--accent); }
.btn.accent { background: var(--accent); color: var(--accent-fg); } .btn.accent .ms { color: inherit; }
.btn.ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--border); } .btn.ghost .ms { color: inherit; }
.btn.small { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.danger { background: var(--danger); color: #fff; } .btn.danger .ms { color: #fff; }
.round { width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: var(--card); color: var(--fg); }
.round.small { width: 34px; height: 34px; } .round.small .ms { font-size: 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 99px; cursor: pointer; font-size: 13px;
  border: 0; box-shadow: inset 0 0 0 1px var(--border); background: transparent; white-space: nowrap; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.chip.on { background: var(--primary); color: var(--primary-fg); box-shadow: none; }
.chip.on .ms { color: var(--accent); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.card { background: var(--card); border-radius: var(--r); }
.label { font-family: var(--mono); font-size: 12px; color: var(--muted-fg); margin: 0 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 99px; font-family: var(--mono); font-size: 11px; background: var(--primary); color: var(--primary-fg); }
.pill.soft { background: var(--muted); color: var(--fg); }
.pill.accent { background: var(--accent); color: var(--accent-fg); }
.pill .ms { font-size: 14px; }
input.field, select.field, textarea.field { width: 100%; height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--card); outline: none; }
textarea.field { height: auto; min-height: 110px; padding: 12px 16px; resize: vertical; }
.field:focus { border-color: var(--fg); }
.field.need { border: 2px solid var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent); }
.form-row { margin-bottom: 14px; }
.form-row > span { display: block; font-family: var(--mono); font-size: 12px; color: var(--muted-fg); margin-bottom: 6px; }
.need-tag { font-family: var(--mono); font-size: 10px; background: var(--accent); color: var(--accent-fg); padding: 2px 8px; border-radius: 99px; margin-left: 6px; }

/* Discover */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 18px 0 20px; flex-wrap: wrap; }
.hero h1 { font-family: var(--mono); font-weight: 500; font-size: clamp(34px, 5vw, 56px); line-height: 1.02; margin: 0; letter-spacing: -0.04em; }
.search { display: flex; gap: 8px; align-items: center; flex: 1; max-width: 560px; }
.search .box { flex: 1; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 18px; background: var(--card); border-radius: 99px; }
.search .box input { border: 0; background: transparent; outline: none; flex: 1; min-width: 0; }
.filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 18px; }
.filters .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters .row .grow { flex: 1 1 0; min-width: 200px; }
body { overflow-x: hidden; }
.seg { display: inline-flex; padding: 4px; background: var(--muted); border-radius: 99px; }
.seg button { border: 0; background: transparent; height: 36px; padding: 0 16px; border-radius: 99px; cursor: pointer; font-size: 13px; color: var(--muted-fg); }
.seg button.on { background: var(--card); color: var(--fg); }
.range { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; background: var(--card); border-radius: 99px; font-size: 13px; }
.range input { accent-color: var(--fg); width: 120px; }
select.mini { height: 44px; border-radius: 99px; border: 0; background: var(--card); padding: 0 14px; font-size: 13px; cursor: pointer; }

.discover { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 44%); gap: 18px; align-items: start; }
.discover .map-col { position: sticky; top: 84px; height: calc(100vh - 104px); border-radius: var(--r); overflow: hidden; }
#map, .map { width: 100%; height: 100%; background: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.result-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.view-toggle { display: none; }

.spot { background: var(--card); border-radius: var(--r); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; transition: transform .15s; }
.spot:hover { transform: translateY(-2px); }
.spot.hl { outline: 2px solid var(--fg); }
.cover { position: relative; aspect-ratio: 16/10; display: grid; place-items: center; overflow: hidden; }
.cover img, .detail-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.detail-cover { overflow: hidden; }
.photo-pick { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.photo-pick img { width: 96px; height: 64px; object-fit: cover; border-radius: 10px; }
.cover .big { font-size: 64px; opacity: .55; color: #1D1D1B; }
.cover::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.35), transparent 55%); }
.cover .tl { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; z-index: 1; }
.cover .tr { position: absolute; top: 10px; right: 10px; z-index: 1; }
.cover .date { position: absolute; left: 10px; bottom: 10px; z-index: 1; background: var(--card); color: var(--fg); border-radius: 12px; padding: 6px 10px; text-align: center; font-family: var(--mono); line-height: 1.1; }
.cover .date b { display: block; font-size: 20px; } .cover .date small { font-size: 10px; text-transform: uppercase; }
.spot .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.spot h3 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-family: var(--mono); font-size: 11px; color: var(--muted-fg); }
.meta span { display: inline-flex; align-items: center; gap: 3px; } .meta .ms { font-size: 14px; }
.stats { display: flex; gap: 12px; margin-top: auto; padding-top: 6px; font-size: 12px; color: var(--muted-fg); }
.stats span { display: inline-flex; align-items: center; gap: 4px; } .stats .ms { font-size: 16px; }
.like-btn { border: 0; background: var(--card); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.like-btn.on .ms { color: #D2453A; font-variation-settings: 'FILL' 1; }
.empty { padding: 40px 10px; text-align: center; color: var(--muted-fg); }

/* Map pins */
.pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: grid; place-items: center; border: 2px solid #1D1D1B; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.pin .ms { transform: rotate(45deg); font-size: 16px; color: #1D1D1B; }
.pin.hl { background: var(--accent) !important; transform: rotate(-45deg) scale(1.25); }
.pin-num { width: 28px; height: 28px; border-radius: 50%; background: #1D1D1B; color: #E4EE6B; font-family: var(--mono); font-size: 13px; display: grid; place-items: center; border: 2px solid #F3F2EE; }
.leaflet-popup-content-wrapper { border-radius: 14px; font-family: var(--sans); }
.leaflet-container { font-family: var(--sans); }

/* Detail */
.overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(20,20,19,.45); display: flex; justify-content: center; align-items: flex-start; overflow-y: auto; padding: 30px 16px; }
.sheet { width: 100%; max-width: 940px; background: var(--bg); border-radius: 28px; overflow: hidden; }
.detail-cover { aspect-ratio: 21/8; position: relative; display: grid; place-items: center; }
.detail-cover .big { font-size: 120px; opacity: .45; color: #1D1D1B; }
.detail-cover .close { position: absolute; top: 16px; right: 16px; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; padding: 22px; }
.detail h2 { font-family: var(--mono); font-weight: 500; font-size: 32px; line-height: 1.1; margin: 10px 0 8px; letter-spacing: -0.03em; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 16px 0; }
.fact.wide { grid-column: 1 / -1; }
a.fact:hover { box-shadow: inset 0 0 0 1px var(--border); }
.fact.price { background: var(--primary); color: var(--primary-fg); font-weight: 600; } .fact.price .ms { color: var(--accent); }
.fact { display: flex; gap: 10px; align-items: center; background: var(--card); border-radius: 16px; padding: 12px 14px; font-size: 14px; line-height: 1.3; min-width: 0; }
.fact .ms { color: var(--muted-fg); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.by { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 13px; background: var(--accent); color: var(--accent-fg); flex: none; }
.mini-map { height: 220px; border-radius: 18px; overflow: hidden; }
.side-list { display: grid; gap: 8px; }
.row-item { display: flex; gap: 10px; align-items: center; background: var(--card); border-radius: 16px; padding: 8px; cursor: pointer; }
.row-item .thumb { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.row-item .thumb .ms { color: #1D1D1B; opacity: .7; }
.row-item b { font-size: 13px; font-weight: 600; display: block; }

/* Add */
.page-title { font-family: var(--mono); font-weight: 500; font-size: clamp(32px, 4vw, 44px); line-height: 1.05; margin: 18px 0 8px; letter-spacing: -0.04em; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.paste { display: flex; gap: 8px; padding: 8px; background: var(--card); border-radius: 99px; }
.paste input { flex: 1; border: 0; background: transparent; outline: none; padding: 0 14px; min-width: 0; }
.sources { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 20px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: var(--card); margin-bottom: 14px; font-size: 14px; }
.notice.warn { background: color-mix(in srgb, var(--accent) 55%, var(--card)); color: var(--accent-fg); }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice label { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--card); cursor: pointer; font-size: 14px; border: 2px solid transparent; }
.choice input { display: none; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.choice label:has(input:checked) { border-color: var(--fg); }
.preview-card { position: sticky; top: 84px; }

/* Ranking */
.rank { display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: 18px; padding: 10px 14px 10px 10px; cursor: pointer; margin-bottom: 8px; }
.rank .n { font-family: var(--mono); font-size: 22px; width: 36px; text-align: center; color: var(--muted-fg); }
.rank:nth-child(-n+3) .n { color: var(--fg); }
.rank .thumb { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.rank .score { margin-left: auto; text-align: right; font-family: var(--mono); font-size: 12px; color: var(--muted-fg); }
.rank .score b { display: block; font-size: 18px; color: var(--fg); }

/* Trips */
.trips { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.trip-card { border-radius: var(--r); padding: 18px; min-height: 170px; display: flex; flex-direction: column; cursor: pointer; color: #1D1D1B; }
.trip-card h3 { font-family: var(--mono); font-weight: 500; font-size: 24px; margin: auto 0 4px; letter-spacing: -0.03em; }
.trip-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 45%); gap: 18px; }
.trip-layout .map { height: calc(100vh - 140px); border-radius: var(--r); position: sticky; top: 84px; }
.day { margin-bottom: 16px; }
.day h4 { font-family: var(--mono); font-weight: 500; font-size: 13px; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.stop { display: flex; gap: 10px; align-items: center; background: var(--card); border-radius: 16px; padding: 8px 10px; margin-bottom: 6px; }
.stop .num { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: var(--accent); font-family: var(--mono); font-size: 12px; display: grid; place-items: center; flex: none; }

/* Auth */
.auth { max-width: 420px; margin: 40px auto; padding: 28px; }
.auth h1 { font-family: var(--mono); font-weight: 500; font-size: 34px; margin: 0 0 6px; letter-spacing: -0.03em; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted-fg); font-size: 12px; margin: 16px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Admin */
.admin { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; padding-top: 14px; }
.admin aside { position: sticky; top: 84px; align-self: start; background: var(--card); border-radius: var(--r); padding: 10px; }
.admin aside a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 14px; font-size: 14px; }
.admin aside a.on { background: var(--primary); color: var(--primary-fg); } .admin aside a.on .ms { color: var(--accent); }
.admin aside a:not(.on):hover { background: var(--muted); }
.admin aside .badge { margin-left: auto; background: var(--accent); color: var(--accent-fg); font-family: var(--mono); font-size: 11px; padding: 1px 8px; border-radius: 99px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: var(--card); border-radius: var(--r); padding: 16px 18px; }
.kpi small { font-family: var(--mono); font-size: 11px; color: var(--muted-fg); }
.kpi b { display: block; font-family: var(--mono); font-weight: 500; font-size: 32px; margin-top: 6px; }
.kpi em { font-style: normal; font-size: 12px; color: var(--ok); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 10px; }
.bars div { flex: 1; background: var(--muted); border-radius: 6px 6px 2px 2px; position: relative; }
.bars div.on { background: var(--accent); }
.bars-x { display: flex; gap: 6px; font-family: var(--mono); font-size: 10px; color: var(--muted-fg); margin-top: 6px; }
.bars-x span { flex: 1; text-align: center; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: 11px; color: var(--muted-fg); padding: 10px; border-bottom: 1px solid var(--soft-border); }
table.t td { padding: 10px; border-bottom: 1px solid var(--soft-border); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t .tt { display: flex; align-items: center; gap: 10px; font-weight: 600; }
table.t .tt .sq { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.status { font-family: var(--mono); font-size: 11px; padding: 3px 9px; border-radius: 99px; background: var(--muted); white-space: nowrap; }
.status.ok { background: color-mix(in srgb, var(--ok) 22%, transparent); }
.status.bad { background: color-mix(in srgb, var(--danger) 22%, transparent); }
.status.warn { background: color-mix(in srgb, var(--accent) 60%, transparent); color: #1D1D1B; }
.table-wrap { overflow-x: auto; }
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar .search-sm { flex: 1; min-width: 180px; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; background: var(--muted); border-radius: 99px; }
.toolbar .search-sm input { border: 0; background: transparent; outline: none; flex: 1; min-width: 0; font-size: 13px; }
.dup { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.dup > div { background: var(--muted); border-radius: 14px; padding: 12px; font-size: 13px; }

/* Toast + menu */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--primary); color: var(--primary-fg); padding: 12px 20px; border-radius: 99px; font-size: 14px; z-index: 3000; display: flex; gap: 14px; align-items: center; }
.toast button { border: 0; background: none; color: var(--accent); font-weight: 600; cursor: pointer; }
.menu { position: absolute; right: 20px; top: 62px; background: var(--card); border-radius: 18px; padding: 8px; min-width: 220px; box-shadow: 0 12px 40px rgba(0,0,0,.18); z-index: 1100; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 14px; width: 100%; border: 0; background: none; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--muted); }
.bottom-nav { display: none; }

/* Phones */
@media (max-width: 900px) {
  nav.main { display: none; }
  .discover, .two, .detail, .trip-layout, .admin { grid-template-columns: 1fr; }
  .discover .map-col { position: relative; top: 0; height: 60vh; display: none; }
  .discover.show-map .map-col { display: block; } .discover.show-map .list-col { display: none; }
  .view-toggle { display: inline-flex; }
  .trip-layout .map { position: relative; top: 0; height: 320px; order: -1; }
  .admin aside { position: relative; top: 0; display: flex; overflow-x: auto; }
  .admin aside a { white-space: nowrap; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview-card { position: relative; top: 0; }
  .bottom-nav { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 1000; background: var(--primary); border-radius: 99px; padding: 6px; }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; color: var(--primary-fg); font-family: var(--mono); font-size: 10px; border-radius: 99px; }
  .bottom-nav a.on { background: var(--accent); color: var(--accent-fg); }
  main { padding-bottom: 90px; }
  .detail-cover { aspect-ratio: 16/9; }
  .choice, .cols2 { grid-template-columns: 1fr; }
}

/* Small form dialogs */
.sheet.small { max-width: 440px; padding: 22px; margin-top: 8vh; overflow: visible; }
.sheet.small h2 { font-family: var(--mono); font-weight: 500; font-size: 24px; margin: 0 0 14px; letter-spacing: -0.03em; }
.stop .need-tag { white-space: nowrap; }
.round[disabled] { opacity: .3; pointer-events: none; }

/* Trip stops: drag grip, time chip, drop placeholder */
.stop .grip { cursor: grab; touch-action: none; color: var(--muted-fg); display: grid; place-items: center; margin: -8px -4px -8px -6px; padding: 8px 2px; }
.stop.dragging { display: none; }
.drag-ghost { position: fixed; z-index: 3000; pointer-events: none; box-shadow: 0 12px 30px rgba(0,0,0,.25); transform: rotate(1deg); }
.drop-ph { border: 2px dashed var(--border); border-radius: 16px; margin-bottom: 6px; }
.day-stops { min-height: 44px; }
.day-empty { font-size: 13px; margin: 0 0 6px; padding: 12px 0; }
.stop .time { font-family: var(--mono); font-size: 13px; border: 0; background: var(--muted); color: var(--fg); border-radius: 10px; height: 30px; min-width: 52px; padding: 0 8px; display: grid; place-items: center; flex: none; }
button.time { cursor: pointer; } .stop .time.none { color: var(--muted-fg); min-width: 34px; } .stop .time .ms { font-size: 18px; }
p .ms { font-size: 16px; vertical-align: -3px; }

/* Spot photos */
.gallery { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; position: relative; scroll-snap-align: start; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide.off img { opacity: .35; }
.credit { position: absolute; left: 12px; bottom: 12px; max-width: 70%; background: rgba(20,20,19,.62); color: #fff; border-radius: 99px; padding: 4px 10px; font-size: 11px; font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.credit a { color: inherit; }
.slide-tools { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 6px; }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; }
.gal-nav.prev { left: 12px; } .gal-nav.next { right: 12px; }
.gal-count { position: absolute; top: 16px; left: 16px; z-index: 1; }
.thumb { overflow: hidden; } .thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Category name inside card bodies — only phones show it (the cover pill is hidden there). */
.m-cat { display: none; }

/* Phones: nothing may be wider than the screen; filters scroll sideways, cards are compact rows like in the app. */
@media (max-width: 640px) {
  html, body { overflow-x: hidden; }
  header .btn.accent { display: none; }
  .hero { gap: 12px; padding: 10px 0 14px; }
  .hero h1 { font-size: 34px; }
  .search { flex: 1 1 100%; max-width: none; }
  .search .box { height: 48px; padding: 0 14px; }
  .search { min-width: 0; } .search .box { min-width: 0; }
  .search select.mini { height: 48px; flex: none; width: 128px; }
  .filters { margin: 0 -16px 14px; gap: 8px; }
  .filters .row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 0 16px; }
  .filters .row::-webkit-scrollbar { display: none; }
  .filters .row > *, .filters .row .grow { flex: none; min-width: 0; }
  .filters .chips { overflow: visible; }
  .range { height: 40px; } .range input { width: 90px; } select.mini { height: 40px; }
  .chip { height: 40px; }
  .grid { grid-template-columns: 1fr; gap: 8px; }
  .spot { flex-direction: row; border-radius: 18px; }
  .spot:hover { transform: none; }
  .spot .cover { width: 108px; min-height: 108px; aspect-ratio: auto; flex: none; }
  .spot .cover .tl { display: none; }
  .spot .cover .big { font-size: 42px; }
  .spot .cover .tr { top: 6px; right: 6px; }
  .spot .like-btn { width: 30px; height: 30px; } .spot .like-btn .ms { font-size: 17px; }
  .spot .cover .date { left: 6px; bottom: 6px; padding: 4px 7px; border-radius: 10px; }
  .spot .cover .date b { font-size: 16px; }
  .spot .body { padding: 10px 12px; gap: 4px; min-width: 0; }
  .spot .m-cat { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted-fg); }
  .spot h3 { font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .spot .stats { padding-top: 2px; }
  .toast { bottom: 92px; max-width: calc(100% - 32px); }
  .overlay { padding: 0; align-items: flex-end; }
  .sheet { border-radius: 24px 24px 0 0; max-height: 100%; overflow-y: auto; }
  .sheet.small { margin: auto 12px 12px; border-radius: 24px; max-height: calc(100% - 24px); }
  .detail-cover .close { top: 12px; right: 12px; }
}
.trip-card .pill { align-self: flex-start; }

/* ---------- Home hero: title + search on the left, the app on the right ---------- */
.hero.home { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 1fr); gap: 28px; align-items: stretch; padding: 0 0 18px; }
.hero-l { display: flex; flex-direction: column; justify-content: flex-end; gap: 22px; min-width: 0; }
.hero-l .search { flex: none; width: 100%; max-width: 640px; }
/* No hard edges: a soft lime glow that fades into the page; the phone fades out at the bottom. */
.promo { position: relative; display: flex; align-items: center; justify-content: center; gap: 30px; height: 216px; padding: 0 28px; overflow: hidden; isolation: isolate; }
/* A soft patch of light that is fully transparent at every edge, so the box never shows. */
.promo::before { content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent) 0%, color-mix(in srgb, var(--accent) 7%, transparent) 50%, transparent 100%); }
.promo-txt { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; min-width: 0; }
.promo-txt > b { font-size: 17px; line-height: 1.35; font-weight: 600; letter-spacing: -0.02em; max-width: 320px; }
.promo-txt .label { margin: 0; } .promo-txt .label .ms { font-size: 15px; vertical-align: -3px; margin-right: 4px; }
.apk-meta { font-size: 11px; color: var(--muted-fg); }
.phone { flex: none; align-self: flex-start; width: 150px; height: 300px; margin-top: 18px; padding: 6px; border-radius: 28px; background: #1D1D1B; transform: rotate(-4deg);
  box-shadow: 0 18px 40px rgba(0,0,0,.18); -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 92%); mask-image: linear-gradient(to bottom, #000 62%, transparent 92%); }
.screen { position: relative; height: 100%; border-radius: 22px; overflow: hidden; background: #DEDDD9; color: #1D1D1B; font-family: var(--sans); }
.screen::before { content: ''; position: absolute; top: 6px; left: 50%; width: 38px; height: 9px; margin-left: -19px; border-radius: 9px; background: #1D1D1B; z-index: 3; }
.screen .ms { font-size: 11px; }
.scr { position: absolute; inset: 0; padding: 24px 9px 9px; animation: scr 12s infinite both; }
.s2 { animation-delay: 4s; } .s3 { animation-delay: 8s; }
@keyframes scr { 0% { opacity: 0; transform: translateX(18px); } 4%, 30% { opacity: 1; transform: none; } 34%, 100% { opacity: 0; transform: translateX(-18px); } }
.p-top { font-family: var(--mono); font-size: 15px; line-height: 1; letter-spacing: -0.04em; margin: 4px 2px 8px; }
.p-list { animation: plist 12s infinite both; }
@keyframes plist { 0%, 8% { transform: none; } 30%, 100% { transform: translateY(-62px); } }
.p-row { display: flex; align-items: center; gap: 6px; background: #F3F2EE; border-radius: 9px; padding: 5px; margin-bottom: 4px; }
.p-row i, .p-stop i { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; flex: none; font-style: normal; }
.p-row i .ms, .p-stop i .ms { font-size: 13px; opacity: .7; }
.p-row div { flex: 1; min-width: 0; } .p-row b { display: block; font-size: 8px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-row small { display: block; font-family: var(--mono); font-size: 6px; color: #5E5D58; }
.p-row > .ms { font-size: 11px; color: #5E5D58; }
.p-row:nth-child(2) > .ms { animation: heart 12s infinite both; }
@keyframes heart { 0%, 18% { color: #5E5D58; font-variation-settings: 'FILL' 0; transform: none; } 20% { transform: scale(1.6); } 22%, 100% { color: #B3402F; font-variation-settings: 'FILL' 1; transform: none; } }
.s2 { padding: 0; }
.p-cover { height: 104px; background: #F0B9B0; display: grid; place-items: center; position: relative; }
.p-cover > .ms { font-size: 44px; opacity: .55; }
.p-cover em { font-style: normal; position: absolute; left: 8px; bottom: 8px; background: #F3F2EE; border-radius: 6px; padding: 3px 5px; font-family: var(--mono); font-size: 7px; line-height: 1.1; text-align: center; }
.p-pad { padding: 8px 9px; } .p-pad small { font-family: var(--mono); font-size: 6px; color: #5E5D58; } .p-pad > b { display: block; font-size: 11px; line-height: 1.15; margin: 3px 0 7px; letter-spacing: -0.02em; }
.p-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.p-facts > span { display: flex; align-items: center; gap: 3px; background: #F3F2EE; border-radius: 6px; padding: 5px; font-size: 6.5px; white-space: nowrap; overflow: hidden; }
.p-facts .ms { font-size: 9px; color: #5E5D58; } .p-facts .dark { background: #1D1D1B; color: #F3F2EE; font-weight: 600; } .p-facts .dark .ms { color: #E4EE6B; }
.p-btn { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; background: #1D1D1B; color: #F3F2EE; border-radius: 99px; padding: 5px 10px; font-size: 8px; animation: press 12s 4s infinite both; }
.p-btn em { font-style: normal; } .p-btn .ms { color: #E4EE6B; animation: heart 12s 2.2s infinite both; }
@keyframes press { 0%, 17% { transform: none; } 18.5% { transform: scale(.9); } 20%, 100% { transform: none; } }
.p-trip { background: #A9C7E3; border-radius: 10px; padding: 8px; margin-bottom: 6px; } .p-trip small { font-family: var(--mono); font-size: 6px; } .p-trip b { display: block; font-size: 11px; margin-top: 8px; letter-spacing: -0.02em; }
.p-stops { position: relative; height: 150px; }
.p-stop { position: absolute; left: 0; right: 0; display: flex; align-items: center; gap: 5px; background: #F3F2EE; border-radius: 8px; padding: 4px 5px; font-size: 7.5px; }
.p-stop b { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-stop .n { width: 13px; height: 13px; border-radius: 50%; background: #1D1D1B; color: #E4EE6B; font-family: var(--mono); font-size: 6.5px; display: grid; place-items: center; flex: none; }
.p-stop .h { font-family: var(--mono); font-size: 6.5px; background: #E7E6E1; border-radius: 4px; padding: 2px 3px; }
.p-stop.k0 { top: 0; } .p-stop.k1 { top: 37px; } .p-stop.k2 { top: 74px; }
.p-stop.k3 { top: 116px; animation: drag 12s 8s infinite both; z-index: 2; }
.p-stop.k3 .h { animation: hpop 12s 8s infinite both; }
@keyframes drag { 0%, 8% { transform: none; box-shadow: none; } 12% { transform: translateY(-4px) rotate(-2deg) scale(1.04); box-shadow: 0 8px 16px rgba(0,0,0,.2); }
  20% { transform: translateY(-5px) rotate(-1deg) scale(1.04); box-shadow: 0 8px 16px rgba(0,0,0,.2); } 23%, 100% { transform: translateY(-5px); box-shadow: none; } }
@keyframes hpop { 0%, 22% { background: #E7E6E1; } 24%, 30% { background: #E4EE6B; } 34%, 100% { background: #E7E6E1; } }
@media (prefers-reduced-motion: reduce) { .scr, .p-list, .p-btn, .p-stop, .p-row > .ms, .p-stop .h, .p-btn .ms { animation: none !important; } .s2, .s3 { opacity: 0; } }

@media (max-width: 900px) {
  .hero.home { grid-template-columns: 1fr; gap: 14px; }
  .hero-l { display: contents; }
  .hero.home h1 { order: 0; } .hero.home .promo { order: 1; } .hero.home .search { order: 2; }
  .promo { height: 196px; padding: 0 0 0 6px; flex-direction: row-reverse; justify-content: space-between; gap: 10px; }
  .promo::before { inset: -10px -40px -10px -10px; }
  .promo-txt > b { font-size: 15px; }
  .phone { margin: 22px -6px 0 0; transform: rotate(5deg) scale(.86); transform-origin: top right; }
}

/* ---------- Aplikacja: the phone's state ---------- */
nav.main a .ms { font-size: 17px; vertical-align: -3px; margin-right: 4px; }
.dev-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.np { display: flex; align-items: center; gap: 16px; background: var(--primary); color: var(--primary-fg); border-radius: var(--r); padding: 14px; }
.np .label { color: color-mix(in srgb, var(--primary-fg) 70%, transparent); margin: 0 0 4px; justify-content: flex-start; }
.np b { display: block; font-size: 17px; line-height: 1.3; }
.np .round { background: color-mix(in srgb, var(--primary-fg) 12%, transparent); color: var(--primary-fg); flex: none; }
.np.idle { background: var(--card); color: var(--fg); } .np.idle span { display: block; font-size: 13px; color: var(--muted-fg); margin-top: 2px; } .np.idle > .ms { font-size: 30px; color: var(--muted-fg); }
.np-art { width: 76px; height: 76px; border-radius: 14px; overflow: hidden; flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--primary-fg) 12%, transparent); }
.np-art img { width: 100%; height: 100%; object-fit: cover; } .np-art .ms { font-size: 32px; color: var(--accent); }
.np-txt { flex: 1; min-width: 0; }
.np-bar { height: 3px; border-radius: 3px; background: color-mix(in srgb, var(--primary-fg) 20%, transparent); margin-top: 10px; } .np-bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.np-time { font-size: 11px; opacity: .7; }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 11px; margin-right: 6px; font-style: normal; }
.eq i { width: 3px; background: var(--accent); animation: eq 1s infinite ease-in-out; } .eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 11px; } }
.wplayer { padding: 14px; margin-top: 10px; }
.wp-media iframe, .wp-media #ytp { width: 100%; aspect-ratio: 16/9; height: auto; border: 0; border-radius: 14px; display: block; }
.wp-media audio { width: 100%; }
.wp-bar { display: flex; align-items: center; gap: 6px; margin-top: 10px; } .wp-bar b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl { margin-bottom: 8px; overflow: hidden; }
.pl-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border: 0; background: none; color: var(--fg); cursor: pointer; text-align: left; font-size: 15px; }
.pl-head b { flex: 1; }
.sq { display: inline-block; width: 12px; height: 12px; border-radius: 4px; flex: none; } .sq.big { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; } .sq.big .ms { color: #1D1D1B; opacity: .7; }
.pl-body { padding: 0 12px 12px; display: grid; gap: 6px; } .pl-body > .btn { justify-self: start; margin-bottom: 4px; }
.lib-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.lib { padding: 8px 12px; }
.lib details { margin: 2px 0; } .lib summary { cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 8px 4px; font-weight: 600; font-size: 14px; list-style: none; border-radius: 10px; }
.lib summary::-webkit-details-marker { display: none; } .lib summary::before { content: 'chevron_right'; font-family: 'Material Symbols Rounded'; font-weight: 400; font-size: 18px; transition: transform .15s; color: var(--muted-fg); }
.lib details[open] > summary::before { transform: rotate(90deg); } .lib summary:hover { background: var(--muted); } .lib summary .mono { margin-left: auto; font-size: 12px; font-weight: 400; }
.lib-in { padding-left: 22px; border-left: 1px solid var(--soft-border); margin-left: 12px; }
.lib-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; font-size: 14px; min-width: 0; }
.lib-item.dl { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.lib-item > a, .lib-item > span:nth-child(2) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--fg); }
.lib-thumb { position: relative; width: 34px; height: 34px; border-radius: 8px; overflow: hidden; flex: none; display: grid; place-items: center; background: var(--muted); } .lib-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; } .lib-thumb .ms { font-size: 17px; color: var(--muted-fg); }
.lib-b { display: flex; gap: 4px; align-items: center; flex: none; } .lib-b > .ms { font-size: 16px; }
.tag-dl { display: inline-flex; align-items: center; gap: 3px; font-family: var(--mono); font-size: 10px; color: var(--muted-fg); } .tag-dl .ms { font-size: 13px; }
@media (max-width: 900px) { .dev-layout { grid-template-columns: 1fr; } }
.lib-head .search-sm { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; background: var(--card); border-radius: 99px; min-width: 0; flex: 1; max-width: 300px; }
.lib-head .search-sm input { border: 0; background: none; outline: none; min-width: 0; flex: 1; font: inherit; font-size: 14px; color: var(--fg); }
.lib-head .search-sm .ms { font-size: 18px; color: var(--muted-fg); }
