/* =========================================================
   BaltGo — "Baltic amber & sea"
   Map-first, floating glass panels, amber as the one bold accent.
   ========================================================= */
:root {
  --fog: #e9eeed;          /* page / map fallback */
  --surface: #ffffff;
  --surface-2: #f1f5f4;
  --glass: rgba(255, 255, 255, .97);
  --line: #dbe3e1;
  --ink: #0e2a33;          /* Baltic sea ink */
  --muted: #5d7279;
  --pine: #1d5c4d;         /* actions */
  --pine-ink: #ffffff;
  --pine-soft: #dcebe5;
  --amber: #e39b2d;        /* Baltic amber */
  --amber-deep: #b86f12;
  --amber-soft: #fbecd2;
  --danger: #b4412f;
  --ok: #2e7d4f;
  --mask: #dfe6e4;
  --border-line: #1d5c4d;
  --shadow-1: 0 1px 1px rgba(14, 42, 51, .04), 0 2px 6px rgba(14, 42, 51, .05), 0 8px 20px rgba(14, 42, 51, .06);
  --shadow-2: 0 1px 2px rgba(14, 42, 51, .05), 0 6px 16px rgba(14, 42, 51, .07), 0 24px 60px rgba(14, 42, 51, .14);
  --r-s: 10px; --r-m: 14px; --r-l: 22px; --r-xl: 28px;
  --ease: cubic-bezier(.22, .8, .25, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);       /* fast start, soft landing */
  --spring: cubic-bezier(.34, 1.56, .64, 1);      /* small overshoot */
  --grad-pine: linear-gradient(160deg, color-mix(in srgb, var(--pine) 82%, #fff) 0%, var(--pine) 55%, color-mix(in srgb, var(--pine) 80%, #000) 100%);
  --grad-amber: linear-gradient(160deg, #f6c46a, var(--amber) 60%, #d6851a);
  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --dock-h: 68px;
  color-scheme: light;
  /* old names used in a few places */
  --text: var(--ink); --primary: var(--pine); --primary-ink: var(--pine-ink); --primary-soft: var(--pine-soft);
  --accent: var(--amber); --accent-soft: var(--amber-soft); --bg: var(--fog); --radius: var(--r-m); --shadow: var(--shadow-2);
}
:root[data-theme="dark"] {
  --fog: #0a171c;
  --surface: #11232a;
  --surface-2: #172d35;
  --glass: rgba(17, 35, 42, .97);
  --line: #23404a;
  --ink: #e6efee;
  --muted: #8fa6ac;
  --pine: #5cc6a2;
  --pine-ink: #06231a;
  --pine-soft: #173c33;
  --amber: #f2b552;
  --amber-deep: #f2b552;
  --amber-soft: #3a2c14;
  --danger: #ef826e;
  --ok: #6fd39a;
  --mask: #071114;
  --border-line: #5cc6a2;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .3);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, .35), 0 18px 48px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--body); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--fog);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior: none;
}
a { color: var(--pine); }
h2 { font-family: var(--display); font-weight: 700; font-size: 1.65rem; line-height: 1.15; letter-spacing: -.02em; margin: .15rem 0 .45rem; }
h3 { font-family: var(--display); font-weight: 650; font-size: 1.08rem; letter-spacing: -.01em; margin: 1.3rem 0 .6rem; }
h4 { font-size: .92rem; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small, .small-muted { font-size: .83rem; }
.small-muted { color: var(--muted); }
.center { text-align: center; }
.bad { color: var(--danger); }
.pad { padding: 18px 20px; }
.pad-s { padding: 12px 14px; }
.pad-x { padding: 0 16px; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap, .wrap { flex-wrap: wrap; }
.row.between, .between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.dot { opacity: .45; margin: 0 6px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--pine) 50%, transparent); outline-offset: 2px; }

/* ===== Shell: the map fills everything, the rest floats ===== */
#app { position: fixed; inset: 0; overflow: hidden; }
.map-area { position: absolute; inset: 0; z-index: 0; isolation: isolate; }
#map { position: absolute; inset: 0; z-index: 0; background: var(--mask); }   /* z-index keeps the map layers (tiles, borders) underneath the search bar, cards and buttons */

.topbar {
  position: absolute; z-index: 30; top: calc(12px + var(--safe-t)); left: 12px; right: 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px; pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand {
  display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; text-decoration: none; color: var(--ink);
  background: var(--glass); box-shadow: var(--shadow-1); min-width: 0;
}
.brand img { border-radius: 10px; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-text b { font-family: var(--display); font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; }
.brand-text small { color: var(--muted); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
.top-actions {
  display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 999px;
  background: var(--glass); box-shadow: var(--shadow-1);
}
.points-chip { background: var(--amber-soft); color: var(--ink); font-weight: 800; text-decoration: none; padding: 7px 12px; border-radius: 999px; font-size: .88rem; }
#lang-select, .icon-btn {
  height: 36px; border-radius: 999px; border: 0; background: transparent; color: var(--ink);
  font: inherit; font-weight: 700; font-size: .84rem; padding: 0 10px; cursor: pointer;
}
#lang-select:hover, .icon-btn:hover { background: var(--surface-2); }
.icon-btn { width: 36px; padding: 0; font-size: 1rem; display: grid; place-items: center; }

/* Dock navigation */
.nav {
  position: absolute; z-index: 30; display: flex; gap: 2px; padding: 6px;
  background: var(--glass);
  box-shadow: var(--shadow-2); border-radius: var(--r-l);
}
.nav a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 64px; padding: 8px 6px; border-radius: 16px; text-decoration: none; color: var(--muted);
  font-size: .7rem; font-weight: 700; transition: background .2s var(--ease), color .2s var(--ease);
}
.nav a i { font-style: normal; font-size: 1.25rem; line-height: 1.1; filter: grayscale(.6) opacity(.8); transition: transform .25s var(--ease), filter .2s; }
.nav a:hover { color: var(--ink); }
.nav a.active { background: var(--pine-soft); color: var(--ink); }
.nav a.active i { filter: none; transform: translateY(-1px) scale(1.08); }
.nav .nav-add i {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; filter: none;
  background: var(--pine); color: var(--pine-ink); font-size: 1.45rem; font-weight: 700; box-shadow: 0 6px 16px color-mix(in srgb, var(--pine) 40%, transparent);
}
.nav .nav-add.active { background: transparent; }
.badge {
  position: absolute; top: 4px; right: 10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: .66rem; font-style: normal; display: grid; place-items: center;
}

/* Panel */
.panel {
  position: absolute; z-index: 20; overflow: hidden; display: flex; flex-direction: column;
  background: var(--glass);
  box-shadow: var(--shadow-2);
}
.panel-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 28px; scrollbar-width: thin; }
/* (per-item entrance animation removed: the whole screen slides in once, which is lighter on phones) */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ----- Desktop ----- */
@media (min-width: 900px) {
  .nav { left: 14px; top: 50%; transform: translateY(-50%); flex-direction: column; }
  .nav .nav-map { display: none; }
  .panel { left: 104px; top: 76px; bottom: 16px; width: 420px; border-radius: var(--r-xl); }
  .topbar { left: 14px; right: 14px; top: 14px; }
  .leaflet-top.leaflet-right { top: 64px; }
  .pick-banner { left: 540px !important; right: 80px !important; }
  .toast { bottom: 28px; }
}
@media (min-width: 1500px) { .panel { width: 460px; } }

/* ----- Phone: app layout ----- */
@media (max-width: 899px) {
  .nav {
    left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); justify-content: space-around; border-radius: 24px; padding: 6px 4px;
  }
  .nav a { min-width: 0; flex: 1; padding: 6px 2px; font-size: .64rem; border-radius: 14px; }
  .nav .nav-admin { display: none !important; }
  .nav .nav-add i { width: 46px; height: 46px; margin-top: -22px; border-radius: 16px; border: 3px solid var(--surface); }
  .panel {
    left: 0; right: 0; top: calc(66px + var(--safe-t)); bottom: 0; border-radius: var(--r-xl) var(--r-xl) 0 0;
    padding-bottom: calc(var(--dock-h) + 20px + var(--safe-b));
    background: var(--surface);
    animation: sheet .34s var(--ease);
  }
  .panel { will-change: transform; }
  .panel.half { top: 44vh; box-shadow: 0 -12px 34px rgba(0,0,0,.16); }
  .panel-grab { flex: none; height: 24px; display: grid; place-items: center; cursor: grab; touch-action: none; }
  .panel-grab::after { content: ""; width: 44px; height: 5px; border-radius: 3px; background: var(--line); }
  #app[data-view="map"] .panel { display: none; }
  .brand-text small { display: none; }
  .brand { padding-right: 12px; }
  .leaflet-control-zoom { display: none; }
  .toast { bottom: calc(var(--dock-h) + 26px + var(--safe-b)); }
}
@keyframes sheet { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
@media (max-width: 380px) { .brand-text b { font-size: 1rem; } }

/* ===== Map details ===== */
.leaflet-container { font-family: var(--body); background: var(--mask); }
.leaflet-bar { border: 0 !important; box-shadow: var(--shadow-1) !important; border-radius: 12px !important; overflow: hidden; }
.leaflet-bar a { background: var(--glass); color: var(--ink); border-color: var(--line) !important; width: 36px !important; height: 36px !important; line-height: 36px !important; }
.leaflet-control-attribution { font-size: 10px; background: rgba(255, 255, 255, .6) !important; border-radius: 8px 0 0 0; }
:root[data-theme="dark"] .leaflet-control-attribution { background: rgba(10, 23, 28, .7) !important; color: var(--muted); }
:root[data-theme="dark"] .leaflet-control-attribution a { color: var(--muted); }
@media (max-width: 899px) { .leaflet-bottom.leaflet-right { bottom: calc(var(--dock-h) + 14px + var(--safe-b)); } }
.map-mask { fill: var(--mask); fill-opacity: .78; fill-rule: evenodd; stroke: var(--border-line); stroke-opacity: .55; stroke-width: 1.5; }
.map-border { stroke: var(--border-line); stroke-opacity: .55; stroke-width: 1.5; }
.picking { cursor: crosshair !important; }

.pin-wrap { background: none; border: 0; }
.pin {
  width: 34px; height: 34px; border-radius: 50% 50% 50% 6px; transform: rotate(-45deg);
  background: var(--pine); border: 2.5px solid #fff; box-shadow: 0 6px 14px rgba(14, 42, 51, .35);
  display: grid; place-items: center; transition: transform .2s var(--ease);
}
.pin span { transform: rotate(45deg); font-size: 15px; line-height: 1; }
.pin-wrap:hover .pin { transform: rotate(-45deg) scale(1.12); }
.pin-pending { background: var(--amber); }
.pin-dest { background: var(--amber); }
.pin-halo { stroke: var(--amber); stroke-width: 3; fill: var(--amber); fill-opacity: .18; }
.user-dot { stroke: #fff; stroke-width: 3; fill: #2f7bf6; fill-opacity: 1; }
.poi {
  width: 30px; height: 30px; border-radius: 50%; background: var(--surface); border: 2px solid var(--amber);
  display: grid; place-items: center; box-shadow: 0 3px 8px rgba(14, 42, 51, .3); font-size: 14px; transition: transform .2s var(--ease);
}
.pin-wrap:hover .poi { transform: scale(1.15); }
.poi.num { background: var(--amber); color: #2a1a03; font-weight: 800; font-size: 13px; border-color: #fff; }
.trip-line { stroke: var(--amber); stroke-width: 3; stroke-dasharray: 6 7; fill: none; }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: color-mix(in srgb, var(--pine) 28%, transparent); }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div {
  background: var(--pine); color: var(--pine-ink); font-weight: 800; font-family: var(--body);
}

/* map overlays */
.map-search { display: none; position: absolute; top: calc(66px + var(--safe-t)); left: 10px; right: 10px; z-index: 25; gap: 6px; }
@media (max-width: 899px) { #app[data-view="map"]:not(.picking) .map-search { display: flex; } }
.map-search input, .map-search select {
  height: 44px; border: 0; border-radius: 999px; background: var(--glass); color: var(--ink);
  font: inherit; font-size: 16px; padding: 0 16px; box-shadow: var(--shadow-1); min-width: 0;
}
.map-search input { flex: 1.5; }
.map-search select { flex: 1; font-size: 14px; }
.fab {
  position: absolute; right: 12px; z-index: 25; width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: var(--glass);
  color: var(--pine); font-size: 1.35rem; font-weight: 800; box-shadow: var(--shadow-1); cursor: pointer;
}
.fab.locate { bottom: 26px; }
.fab.mode { bottom: 82px; font-size: .9rem; letter-spacing: .02em; }
@media (max-width: 899px) {
  .fab.locate { bottom: calc(var(--dock-h) + 186px + var(--safe-b)); }
  .fab.mode { bottom: calc(var(--dock-h) + 242px + var(--safe-b)); }
  #app:not([data-view="map"]) .fab { display: none; }
}

/* phone: swipeable place cards over the map */
.carousel { display: none; }
@media (max-width: 899px) {
  #app[data-view="map"]:not(.picking) .carousel {
    display: flex; position: absolute; z-index: 24; left: 0; right: 0; bottom: calc(var(--dock-h) + 22px + var(--safe-b));
    gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 6px; scrollbar-width: none;
  }
  .carousel::-webkit-scrollbar { display: none; }
  .cc {
    flex: none; width: 78%; max-width: 330px; scroll-snap-align: center; display: flex; gap: 10px; padding: 8px;
    background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-2); cursor: pointer;
    border: 2px solid transparent; transition: border-color .2s, transform .2s var(--ease);
  }
  .cc.on { border-color: var(--amber); }
  .cc-img { width: 84px; height: 84px; border-radius: 16px; object-fit: cover; flex: none; font-size: 1.8rem; }
  .cc-body { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; }
  .cc-body b { font-family: var(--display); font-size: 1rem; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  #app[data-view="map"] .place-card:not([hidden]) ~ .carousel { display: none; }
}

.pick-banner {
  position: absolute; left: 12px; right: 12px; top: calc(66px + var(--safe-t)); z-index: 26; background: var(--surface); border-radius: var(--r-l);
  box-shadow: var(--shadow-2); padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-weight: 700; font-size: .9rem; border: 2px solid var(--amber);
}
.place-card {
  position: absolute; left: 12px; right: 12px; bottom: 24px; z-index: 26; background: var(--surface); border-radius: var(--r-l);
  box-shadow: var(--shadow-2); padding: 10px; display: flex; gap: 12px; animation: rise .25s var(--ease); max-width: 480px;
}
@media (min-width: 900px) { .place-card { left: auto; right: 16px; width: 420px; } }
@media (max-width: 899px) { .place-card { bottom: calc(var(--dock-h) + 22px + var(--safe-b)); } }
.place-card .thumb { width: 88px; height: 88px; border-radius: 16px; }
.place-card h3 { margin: 2px 0; font-size: 1.02rem; }
.pc-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.place-card .x {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; border: 0;
  background: var(--surface-2); color: var(--ink); font-size: 1rem; cursor: pointer;
}

/* location prompt */
.loc-prompt {
  position: absolute; z-index: 40; left: 12px; right: 12px; top: calc(66px + var(--safe-t)); max-width: 440px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--r-l);
  background: var(--surface); box-shadow: var(--shadow-2); border: 1px solid var(--line);
  transform: translateY(-14px); opacity: 0; transition: transform .35s var(--ease), opacity .35s var(--ease);
}
.loc-prompt.show { transform: none; opacity: 1; }
.loc-prompt > div:first-of-type { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.loc-prompt small, .loc-ask small { color: var(--muted); font-size: .84rem; }
.lp-ic { font-size: 1.6rem; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--amber-soft); }
.lp-act { display: flex; gap: 8px; margin-left: auto; }
@media (min-width: 900px) { .loc-prompt { left: auto; right: 16px; top: 76px; margin: 0; } }

/* ===== Buttons & inputs ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1px solid transparent; font: inherit; font-weight: 700; font-size: .9rem;
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .12s var(--ease), background .2s, box-shadow .2s, filter .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: .82rem; }
.btn.block { width: 100%; margin: 8px 0; }
.btn.primary { background: var(--pine); color: var(--pine-ink); box-shadow: 0 4px 12px color-mix(in srgb, var(--pine) 30%, transparent); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn.soft { background: var(--amber-soft); color: var(--ink); }
.btn.danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn.google { background: var(--surface); color: var(--ink); border-color: var(--line); }
.link { background: none; border: 0; color: var(--pine); font: inherit; font-weight: 700; cursor: pointer; padding: 8px 0; }

input, select, textarea { font: inherit; color: var(--ink); }
.form label, .dlg-body label, .trip label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: .84rem; margin: 12px 0; }
.form input, .form select, .form textarea, .dlg-body input, .dlg-body textarea, .filters input, .filters select,
.settings select, .tin, .trip input[type=date], .trip select, .search-box {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--r-m); border: 1px solid var(--line);
  background: var(--surface); font-weight: 500; font-size: 16px; transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form textarea:focus, .form select:focus, .tin:focus, .filters input:focus, .search-box:focus-within {
  border-color: var(--pine); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pine) 15%, transparent); outline: none;
}
textarea { resize: vertical; }
fieldset { border: 1px dashed var(--line); border-radius: var(--r-m); padding: 10px 12px 12px; margin: 14px 0; }
legend { font-weight: 700; font-size: .84rem; padding: 0 6px; }
.loc-status { font-size: .88rem; margin-bottom: 8px; color: var(--muted); }
.loc-status.ok { color: var(--ok); font-weight: 700; }
.loc-status.bad { color: var(--danger); font-weight: 700; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ph-item { position: relative; aspect-ratio: 1; }
.ph-item img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-m); }
.ph-item button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; cursor: pointer; }
.ph-add {
  aspect-ratio: 1; border: 2px dashed var(--line); border-radius: var(--r-m); display: flex !important; flex-direction: column;
  align-items: center; justify-content: center; font-size: 1.6rem; color: var(--muted); cursor: pointer; margin: 0 !important;
}
.ph-add span { font-size: .72rem; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; margin: 8px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.switch { appearance: none; width: 46px; height: 28px; border-radius: 14px; background: var(--line); position: relative; cursor: pointer; transition: .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: .2s var(--ease); }
.switch:checked { background: var(--pine); }
.switch:checked::after { left: 21px; }
.settings { border-top: 1px solid var(--line); }
.settings label { margin: 8px 0; font-weight: 700; }
.settings select { width: auto; min-height: 40px; }
.note { background: var(--amber-soft); border-radius: var(--r-m); padding: 10px 14px; font-size: .84rem; font-weight: 600; margin: 10px 0; }

/* segmented controls & chips */
.seg { display: flex; background: var(--surface-2); border-radius: 999px; padding: 4px; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.seg button {
  flex: 1; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 700; font-size: .82rem;
  padding: 8px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: background .2s var(--ease), color .2s;
}
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.badge-n { font-style: normal; background: var(--amber); color: #2a1a03; border-radius: 999px; padding: 0 7px; font-size: .74rem; margin-left: 4px; }
.chips-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips-row.wrap { flex-wrap: wrap; overflow: visible; }
.chips-row button {
  flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; font-size: .83rem;
  padding: 7px 12px; border-radius: 999px; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.chips-row button.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }

/* skeleton loading */
.sk { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.sk-row .sk { height: 18px; margin: 12px; }
.sk-card { display: flex; gap: 12px; align-items: center; }
.sk-ic { width: 52px; height: 52px; border-radius: var(--r-m); flex: none; }
.sk-line { height: 16px; flex: 1; }

/* ===== List view ===== */
.sticky { position: sticky; top: 0; z-index: 2; padding: 16px 16px 8px; background: inherit; }
.panel-body .sticky { background: linear-gradient(var(--surface) 88%, color-mix(in srgb, var(--surface) 0%, transparent)); }
@media (max-width: 899px) { .panel-body .sticky { background: linear-gradient(var(--surface) 85%, transparent); } }
.filters { display: flex; flex-direction: column; gap: 8px; }
.filters .row > * { flex: 1; min-width: 0; }
.filters input { border-radius: 999px; padding-left: 18px; }
.count { font-size: .8rem; color: var(--muted); font-weight: 700; padding: 8px 4px 0; }
.count-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .count-row .count { margin-right: auto; }
.link-btn { border: 0; background: none; padding: 8px 4px 0; font: inherit; font-size: .8rem; font-weight: 700; color: var(--amber-deep); cursor: pointer; } .link-btn[hidden] { display: none; }
.plist, .mine, .orders { list-style: none; margin: 0; padding: 0 10px; }
.plist li a {
  display: flex; gap: 12px; align-items: center; padding: 8px; margin: 2px 0; border-radius: var(--r-m);
  text-decoration: none; color: var(--ink); transition: background .15s;
}
.plist li a:hover { background: var(--surface); }
.plist b { display: block; font-size: .97rem; line-height: 1.25; }
.meta { display: block; font-size: .8rem; color: var(--muted); }
.dist { display: inline-block; font-size: .78rem; font-weight: 700; color: var(--amber-deep); }
.plist .empty { padding: 30px; text-align: center; color: var(--muted); }
.thumb { width: 62px; height: 62px; border-radius: var(--r-m); object-fit: cover; flex: none; }
.ph { display: grid; place-items: center; font-size: 1.6rem; background: var(--pine-soft); }
.ph[data-cat="water"], .ph[data-cat="waterfall"], .ph[data-cat="beach"] { background: #d6e8f0; }
.ph[data-cat="history"], .ph[data-cat="hillfort"], .ph[data-cat="cave"], .ph[data-cat="museum"] { background: var(--amber-soft); }
.ph[data-cat="hotel"], .ph[data-cat="motel"], .ph[data-cat="restaurant"], .ph[data-cat="cafe"], .ph[data-cat="shop"] { background: #ece6f3; }
.ph[data-cat="gym"], .ph[data-cat="outdoor_gym"] { background: #f7e1dc; }
:root[data-theme="dark"] .ph[data-cat] { background: var(--surface-2); }

/* ===== Place detail ===== */
.detail { position: relative; }
.back {
  position: absolute; top: 12px; left: 12px; z-index: 3; border: 0; background: var(--glass); color: var(--ink); font: inherit; font-weight: 700; padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow-1); cursor: pointer;
}
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 4px; background: var(--surface-2); }
.gallery img { width: 100%; flex: none; height: 270px; object-fit: cover; scroll-snap-align: start; }
.gallery.multi img { width: 88%; }
.ph.big { width: 100%; height: 190px; font-size: 3.6rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.chip { background: var(--surface-2); border-radius: 999px; padding: 4px 11px; font-size: .78rem; font-weight: 700; }
.detail h2 { font-size: 1.85rem; }

/* ===== Vote & leaderboard ===== */
.view-head .eyebrow { color: var(--amber-deep); font-weight: 700; font-size: .86rem; }
.view-head h2 { margin-top: 4px; }
.period-label { font-family: var(--display); font-weight: 600; color: var(--muted); margin: 10px 2px 0; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; padding: 6px 14px 14px; }
.pod { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; text-decoration: none; color: var(--ink); min-width: 0; }
.pod-img { position: relative; }
.pod-thumb { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 3px solid var(--surface); box-shadow: var(--shadow-1); font-size: 1.8rem; }
.pod-1 .pod-thumb { width: 92px; height: 92px; border-color: var(--amber); }
.pod-medal { position: absolute; bottom: -4px; right: -4px; font-size: 1.4rem; }
.pod b { font-family: var(--display); font-size: .9rem; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pod-n { font-size: .78rem; font-weight: 700; color: var(--amber-deep); }
.pod-step {
  width: 100%; display: grid; place-items: center; border-radius: 14px 14px 6px 6px; font-family: var(--display); font-weight: 800; font-size: 1.5rem;
  color: #2a1a03; background: linear-gradient(180deg, #f5c66f, var(--amber)); margin-top: 4px; order: 9;
}
.pod-1 .pod-step { height: 70px; } .pod-2 .pod-step { height: 50px; opacity: .85; } .pod-3 .pod-step { height: 38px; opacity: .7; }
.pod .vote-btn { order: 8; }
.ranking { list-style: none; margin: 0; padding: 0 12px; }
.ranking li { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.ranking .rank { width: 28px; text-align: center; font-family: var(--display); font-weight: 800; color: var(--muted); flex: none; }
.ranking .rk-main { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); }
.ranking .rk-main b { display: block; font-size: .93rem; line-height: 1.25; }
.ranking .thumb { width: 46px; height: 46px; }
.vote-btn { flex: none; gap: 6px; padding: 0 12px; }
.vote-btn.primary { background: var(--amber); color: #2a1a03; box-shadow: 0 4px 12px color-mix(in srgb, var(--amber) 35%, transparent); }
.vote-btn .vcount { background: rgba(0, 0, 0, .12); border-radius: 999px; padding: 0 8px; font-weight: 800; font-size: .8rem; }
.vote-btn.voted { color: var(--ok); opacity: 1; }
.vote-btn.voted .vcount { background: var(--surface-2); }
.vote-btn.busy { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.pod .vote-btn .vb-tx, .ranking .vote-btn .vb-tx { display: none; }

/* ===== Trip planner ===== */
.trip .where { margin: 8px 0 12px; }
.search-box { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 14px; border-radius: 999px; }
.search-box input { flex: 1; border: 0; outline: 0; background: none; font-size: 16px; min-width: 0; padding: 8px 0; }
.suggest { list-style: none; margin: 6px 0 0; padding: 0; border-radius: var(--r-m); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-1); }
.suggest:empty { display: none; }
.suggest li button { display: flex; gap: 8px; width: 100%; text-align: left; border: 0; background: none; padding: 11px 14px; font: inherit; font-size: .88rem; color: var(--ink); cursor: pointer; border-bottom: 1px solid var(--line); }
.suggest li:last-child button { border-bottom: 0; }
.suggest li button:hover { background: var(--surface-2); }
.dest-pill { display: flex; align-items: center; gap: 12px; background: var(--pine-soft); border-radius: var(--r-l); padding: 10px 10px 10px 12px; }
.dest-pill b { font-family: var(--display); font-size: 1.05rem; }
.dest-pill small { display: block; color: var(--muted); }
.dest-pill button { margin-left: auto; }
.dp-ic { font-size: 1.3rem; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); flex: none; }
.tabs { margin-top: 4px; }
.filters-line { margin: 10px 0 2px; }
label.inline { flex-direction: row !important; align-items: center; gap: 8px !important; margin: 0 !important; }
label.inline select { min-height: 36px !important; width: auto !important; padding: 4px 10px !important; border-radius: 999px !important; }
.origin-note { margin: 4px 2px 8px; }
.res-list, .stops { list-style: none; margin: 0; padding: 0; }
.res {
  display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: var(--r-m); cursor: pointer; transition: background .15s;
}
.res:hover { background: var(--surface-2); }
.res.on { background: var(--amber-soft); }
.res-ic { width: 52px; height: 52px; border-radius: var(--r-m); background: var(--surface-2); display: grid; place-items: center; font-size: 1.4rem; flex: none; overflow: hidden; }
.res-ic img { width: 100%; height: 100%; object-fit: cover; }
.res-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.res-main b { font-size: .95rem; line-height: 1.25; }
.stars { color: var(--amber); font-size: .78rem; letter-spacing: 1px; }
.res-meta { font-size: .8rem; font-weight: 700; color: var(--ink); margin-top: 2px; }
.res-act { display: flex; gap: 6px; flex: none; }
.icon-act {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 1rem; font-weight: 800; cursor: pointer; display: grid; place-items: center; transition: transform .15s var(--ease), background .15s;
}
.icon-act:hover:not(:disabled) { transform: scale(1.07); }
.icon-act.on { background: var(--amber); border-color: var(--amber); color: #2a1a03; }
.icon-act.danger { color: var(--danger); }
.icon-act:disabled { opacity: .35; }
.plan-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 12px; }
.plan-sum > div { background: var(--surface-2); border-radius: var(--r-m); padding: 10px 12px; display: flex; flex-direction: column; }
.plan-sum b { font-family: var(--display); font-size: 1.15rem; }
.plan-sum span { font-size: .76rem; color: var(--muted); font-weight: 700; }
.stop { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.stop-n { width: 30px; height: 30px; border-radius: 50%; background: var(--amber); color: #2a1a03; font-weight: 800; display: grid; place-items: center; flex: none; }
.links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.links .btn { white-space: normal; text-align: center; line-height: 1.2; min-height: 48px; font-size: .83rem; border-radius: var(--r-m); }
.links .btn.wide { grid-column: 1 / -1; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px; margin: 12px 0; }
.card h3 { margin: 0 0 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 80px; gap: 8px; }
.grid3 label { margin: 10px 0 0; }
.grid3 input, .grid3 select { padding: 8px 10px !important; }
.empty-state { text-align: center; padding: 28px 16px; color: var(--muted); }
.es-ic { font-size: 2.6rem; margin-bottom: 6px; }

/* "Get there" sheet */
dialog {
  border: 0; border-radius: var(--r-xl); padding: 20px; width: min(480px, calc(100vw - 24px)); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-2);
}
dialog[open] { animation: rise .28s var(--ease); }
dialog::backdrop { background: rgba(7, 20, 25, .45); }
dialog h3 { margin: 0 0 6px; }
dialog.sheet { max-height: 86vh; overflow-y: auto; }
@media (max-width: 899px) {
  dialog.sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: var(--r-xl) var(--r-xl) 0 0; padding-bottom: calc(20px + var(--safe-b)); animation: sheet .3s var(--ease); }
}
.sheet-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: -8px auto 12px; }
.sheet-to { font-family: var(--display); font-weight: 700; font-size: 1.3rem; margin: 0 0 12px; line-height: 1.2; }
.tv-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin-bottom: 6px; }
.tv-stats > div { background: var(--pine-soft); border-radius: var(--r-m); padding: 10px 12px; display: flex; flex-direction: column; }
.tv-stats b { font-family: var(--display); font-size: 1.2rem; }
.tv-stats span { font-size: .76rem; color: var(--muted); font-weight: 700; }
.tv-group { border-top: 1px solid var(--line); padding: 14px 0 4px; margin-top: 10px; }
.taxi-list { list-style: none; margin: 0; padding: 0; }
.taxi-list li { display: grid; grid-template-columns: 34px 1fr auto auto; align-items: center; gap: 10px; padding: 7px 0; }
.taxi-logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--muted); }
.taxi-bolt { background: #34d186; color: #062b18; }
.taxi-uber { background: #000; }
.taxi-freenow { background: #e7383f; }
.taxi-price { font-weight: 800; font-size: .88rem; }
.loc-ask { display: flex; align-items: center; gap: 12px; background: var(--amber-soft); border-radius: var(--r-m); padding: 12px; margin-bottom: 6px; }
.loc-ask > span { font-size: 1.5rem; }
.loc-ask > div { flex: 1; display: flex; flex-direction: column; }

/* ===== Rewards / account / admin (accounts mode) ===== */
.points-hero {
  background: linear-gradient(135deg, var(--pine), color-mix(in srgb, var(--pine) 55%, var(--amber)));
  color: var(--pine-ink); border-radius: var(--r-l); padding: 18px 20px; margin: 10px 0; display: flex; flex-direction: column; gap: 4px;
}
.points-hero strong { font-family: var(--display); font-size: 2.6rem; line-height: 1; }
.bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin: 6px 0 2px; }
.bar i { display: block; height: 100%; background: var(--amber); border-radius: 3px; }
.points-hero .bar { background: rgba(255, 255, 255, .3); }
.points-hero .bar i { background: var(--pine-ink); }
.gifts { display: flex; flex-direction: column; gap: 10px; }
.gift { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 12px; }
.gift.can { border-color: var(--amber); }
.gift-ic { font-size: 2rem; width: 54px; height: 54px; border-radius: var(--r-m); background: var(--amber-soft); display: grid; place-items: center; flex: none; }
.gift-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gift-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cost { font-weight: 800; color: var(--amber-deep); white-space: nowrap; }
.orders li, .mine li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mine li > div:not(.avatar) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mine .thumb { width: 48px; height: 48px; }
.status { font-size: .78rem; font-weight: 800; }
.s-pending { color: var(--amber-deep); }
.s-approved, .s-sent { color: var(--ok); }
.s-rejected { color: var(--danger); }
.me { display: flex; gap: 12px; align-items: center; }
.me h2 { margin: 0; }
.avatar { width: 54px; height: 54px; border-radius: 50%; background: var(--pine); color: var(--pine-ink); display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 36px; height: 36px; font-size: .95rem; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 8px; }
.stats > * { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px 14px; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.stats strong { font-size: 1.3rem; }
.stats span { font-size: .78rem; color: var(--muted); font-weight: 700; }
.acard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); margin: 12px 0; overflow: hidden; }
.acard-photos { display: flex; gap: 2px; overflow-x: auto; }
.acard-photos img { height: 150px; flex: none; max-width: 100%; object-fit: cover; }
.acard .row { margin-top: 10px; }

/* ===== Toast / offline ===== */
.toast {
  position: fixed; left: 50%; transform: translate(-50%, 24px); opacity: 0; bottom: 28px;
  background: var(--ink); color: var(--surface); padding: 12px 18px; border-radius: 999px; font-weight: 700; font-size: .9rem;
  z-index: 2000; pointer-events: none; transition: opacity .25s var(--ease), transform .3s var(--ease); max-width: calc(100vw - 32px); text-align: center; box-shadow: var(--shadow-2);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: var(--pine); color: var(--pine-ink); }
.toast.bad { background: var(--danger); color: #fff; }
.offline { position: fixed; top: 0; left: 0; right: 0; z-index: 1500; text-align: center; background: var(--amber); color: #2a1a03; font-weight: 700; font-size: .8rem; padding: calc(4px + var(--safe-t)) 4px 4px; }

/* no-login mode: hide accounts, points & rewards */
.no-accounts .nav [data-route="rewards"], .no-accounts .nav [data-route="account"], .no-accounts .nav-admin, .no-accounts #points-chip { display: none !important; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.tabs button { font-size: .78rem; padding: 8px 6px; }
@media (max-width: 899px) {
  .chips-row.wrap { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; }
}
/* Sheet accounts: show the Account tab even in no-login mode */
#app.no-accounts.sheet-acc .nav a[data-route="account"] { display: flex !important; }
#app.no-accounts.sheet-acc #points-chip:not([hidden]) { display: inline-block !important; }
#auth-tabs { margin: 12px 0 4px; }

/* ---- smoothness: keep the browser's work small ---- */
#panel-body { contain: content; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.plist > li { content-visibility: auto; contain-intrinsic-size: auto 78px; }
.ranking > li, .res-list > li { content-visibility: auto; contain-intrinsic-size: auto 72px; }
#carousel { overscroll-behavior-x: contain; }


/* =========================================================
   v3 — modern layer: motion, icons, accounts, points, scoreboards
   ========================================================= */
.ic { display: block; flex: none; }

/* ---- menu: line icons + a highlight that slides to the active item ---- */
.nav { isolation: isolate; }
.nav a { background: transparent !important; z-index: 1; transition: color .25s var(--ease); }
.nav a i { filter: none !important; display: grid; place-items: center; height: 26px; }
.nav a .ic { transition: transform .45s var(--spring); }
.nav a.active { color: var(--pine); }
:root[data-theme="dark"] .nav a.active { color: var(--pine); }
.nav a.active .ic { transform: translateY(-1px) scale(1.1); }
.nav a:active .ic { transform: scale(.88); transition-duration: .1s; }
.nav-ind {
  position: absolute; left: 0; top: 0; width: 0; height: 0; border-radius: 16px; background: var(--pine-soft); z-index: 0; opacity: 0;
  transition: transform .5s var(--spring), width .4s var(--ease-out), height .4s var(--ease-out), opacity .2s;
  pointer-events: none;
}
.nav .nav-add i { width: 46px !important; height: 46px !important; background: var(--grad-pine) !important; border-radius: 16px; transition: transform .35s var(--spring), box-shadow .3s; }
.nav .nav-add:hover i { transform: translateY(-2px) rotate(90deg); }
.nav .nav-add .ic { stroke-width: 2.6; }
@media (max-width: 899px) { .nav .nav-add i { width: 50px !important; height: 50px !important; } .nav .nav-points { display: none !important; } }
#app.no-accounts.sheet-acc .nav a[data-route="rewards"] { display: flex !important; }
@media (max-width: 899px) { #app.no-accounts.sheet-acc .nav a[data-route="rewards"] { display: none !important; } }

/* ---- top bar ---- */
.user-btn { text-decoration: none; color: var(--ink); }
.user-btn.in { width: auto; padding: 0 2px; }
.avatar.xs { width: 30px; height: 30px; font-size: .8rem; }
.points-chip { display: inline-flex !important; align-items: center; gap: 5px; background: var(--grad-amber); color: #2a1a03; box-shadow: 0 3px 10px color-mix(in srgb, var(--amber) 35%, transparent); }
#app.no-accounts.sheet-acc #points-chip[hidden] { display: none !important; }
.points-chip.bump { animation: bump .9s var(--spring); }
@keyframes bump { 0% { transform: scale(1); } 25% { transform: scale(1.28) rotate(-4deg); box-shadow: 0 0 0 10px color-mix(in srgb, var(--amber) 25%, transparent); } 100% { transform: none; } }

/* ---- surfaces ---- */
.panel { border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
@media (max-width: 899px) { .panel { border-width: 1px 0 0; } }
.brand, .top-actions { border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.btn { transition: transform .3s var(--spring), background .2s, box-shadow .25s, filter .2s, opacity .2s; }
.btn:active:not(:disabled) { transform: scale(.95); transition-duration: .08s; }
.btn.primary { background: var(--grad-pine); }
.btn.primary:hover:not(:disabled) { box-shadow: 0 8px 22px color-mix(in srgb, var(--pine) 38%, transparent); transform: translateY(-1px); }
.btn.lg { min-height: 52px; font-size: 1rem; }
.btn.light { background: #fff; color: var(--pine); }
.btn.ghost-light { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.card { box-shadow: var(--shadow-1); }

/* ---- screen-to-screen transitions ---- */
.panel-body.enter { animation: view-in .42s var(--ease-out) both; }
:root[data-dir="back"] .panel-body.enter { animation-name: view-in-back; }
@keyframes view-in { from { opacity: 0; transform: translate3d(26px, 0, 0); } }
@keyframes view-in-back { from { opacity: 0; transform: translate3d(-26px, 0, 0); } }
.panel-body > * { animation: none; }
@media (max-width: 899px) { .panel { animation: sheet .5s var(--ease-out); } }
@keyframes sheet { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }

/* list items arrive one after another */
.plist > li:nth-child(-n+10), .ranking > li:nth-child(-n+10), .ledger > li:nth-child(-n+10), .mine > li.in, .gifts > .gift, .earn > *, .stat-grid > *, .quick > *, .res-list > li:nth-child(-n+10), .pod {
  animation: item-in .45s var(--ease-out) both;
}
@keyframes item-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.plist > li:nth-child(1), .ranking > li:nth-child(1), .ledger > li:nth-child(1), .mine > li:nth-child(1), .gifts > :nth-child(1), .earn > :nth-child(1), .stat-grid > :nth-child(1), .quick > :nth-child(1), .res-list > li:nth-child(1) { animation-delay: 35ms; }
.plist > li:nth-child(2), .ranking > li:nth-child(2), .ledger > li:nth-child(2), .mine > li:nth-child(2), .gifts > :nth-child(2), .earn > :nth-child(2), .stat-grid > :nth-child(2), .quick > :nth-child(2), .res-list > li:nth-child(2) { animation-delay: 70ms; }
.plist > li:nth-child(3), .ranking > li:nth-child(3), .ledger > li:nth-child(3), .mine > li:nth-child(3), .gifts > :nth-child(3), .earn > :nth-child(3), .stat-grid > :nth-child(3), .quick > :nth-child(3), .res-list > li:nth-child(3) { animation-delay: 105ms; }
.plist > li:nth-child(4), .ranking > li:nth-child(4), .ledger > li:nth-child(4), .mine > li:nth-child(4), .gifts > :nth-child(4), .earn > :nth-child(4), .stat-grid > :nth-child(4), .quick > :nth-child(4), .res-list > li:nth-child(4) { animation-delay: 140ms; }
.plist > li:nth-child(5), .ranking > li:nth-child(5), .ledger > li:nth-child(5), .mine > li:nth-child(5), .gifts > :nth-child(5), .earn > :nth-child(5), .stat-grid > :nth-child(5), .quick > :nth-child(5), .res-list > li:nth-child(5) { animation-delay: 175ms; }
.plist > li:nth-child(6), .ranking > li:nth-child(6), .ledger > li:nth-child(6), .mine > li:nth-child(6), .gifts > :nth-child(6), .earn > :nth-child(6), .stat-grid > :nth-child(6), .quick > :nth-child(6), .res-list > li:nth-child(6) { animation-delay: 210ms; }
.plist > li:nth-child(7), .ranking > li:nth-child(7), .ledger > li:nth-child(7), .mine > li:nth-child(7), .gifts > :nth-child(7), .earn > :nth-child(7), .stat-grid > :nth-child(7), .quick > :nth-child(7), .res-list > li:nth-child(7) { animation-delay: 245ms; }
.plist > li:nth-child(8), .ranking > li:nth-child(8), .ledger > li:nth-child(8), .mine > li:nth-child(8), .gifts > :nth-child(8), .earn > :nth-child(8), .stat-grid > :nth-child(8), .quick > :nth-child(8), .res-list > li:nth-child(8) { animation-delay: 280ms; }
.plist > li:nth-child(9), .ranking > li:nth-child(9), .ledger > li:nth-child(9), .mine > li:nth-child(9), .gifts > :nth-child(9), .earn > :nth-child(9), .stat-grid > :nth-child(9), .quick > :nth-child(9), .res-list > li:nth-child(9) { animation-delay: 315ms; }
.plist > li:nth-child(10), .ranking > li:nth-child(10), .ledger > li:nth-child(10), .mine > li:nth-child(10), .gifts > :nth-child(10), .earn > :nth-child(10), .stat-grid > :nth-child(10), .quick > :nth-child(10), .res-list > li:nth-child(10) { animation-delay: 350ms; }
.plist > li:nth-child(11), .ranking > li:nth-child(11), .ledger > li:nth-child(11), .mine > li:nth-child(11), .gifts > :nth-child(11), .earn > :nth-child(11), .stat-grid > :nth-child(11), .quick > :nth-child(11), .res-list > li:nth-child(11) { animation-delay: 385ms; }
.plist > li:nth-child(12), .ranking > li:nth-child(12), .ledger > li:nth-child(12), .mine > li:nth-child(12), .gifts > :nth-child(12), .earn > :nth-child(12), .stat-grid > :nth-child(12), .quick > :nth-child(12), .res-list > li:nth-child(12) { animation-delay: 420ms; }
.plist > li:nth-child(13), .ranking > li:nth-child(13), .ledger > li:nth-child(13), .mine > li:nth-child(13), .gifts > :nth-child(13), .earn > :nth-child(13), .stat-grid > :nth-child(13), .quick > :nth-child(13), .res-list > li:nth-child(13) { animation-delay: 455ms; }
.plist > li:nth-child(14), .ranking > li:nth-child(14), .ledger > li:nth-child(14), .mine > li:nth-child(14), .gifts > :nth-child(14), .earn > :nth-child(14), .stat-grid > :nth-child(14), .quick > :nth-child(14), .res-list > li:nth-child(14) { animation-delay: 490ms; }
.pod-2 { animation-delay: 60ms; } .pod-1 { animation-delay: 140ms; } .pod-3 { animation-delay: 220ms; }
.pod-step { transform-origin: bottom; animation: rise-step .7s var(--spring) both; animation-delay: inherit; }
@keyframes rise-step { from { transform: scaleY(.2); opacity: 0; } }


/* ---- segmented tabs ---- */
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .3s var(--ease-out), color .2s, box-shadow .3s; }
.seg button.on { box-shadow: 0 1px 2px rgba(14, 42, 51, .08), 0 4px 12px rgba(14, 42, 51, .08); }
.seg.big button { padding: 10px 12px; font-size: .9rem; }
#board-tabs { margin: 12px 0 10px; }

/* ---- auth ---- */
.auth-card { display: flex; flex-direction: column; }
.auth-hero { text-align: center; padding: 6px 0 10px; }
.auth-hero h2 { margin: 12px 0 4px; }
.auth-badge {
  width: 64px; height: 64px; margin: 0 auto; border-radius: 22px; display: grid; place-items: center; color: #2a1a03;
  background: var(--grad-amber); box-shadow: 0 10px 26px color-mix(in srgb, var(--amber) 40%, transparent); animation: float 4s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-5px) rotate(4deg); } }
#auth-tabs { margin: 10px 0 2px; }
.pw { position: relative; display: block; }
.pw input { padding-right: 48px !important; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.pw-eye.on { color: var(--pine); }
#forgot-link { display: block; margin: 0 auto; }
.shake { animation: shake .4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

/* ---- profile ---- */
.profile-hero {
  position: relative; margin: 14px 14px 0; padding: 20px; border-radius: var(--r-xl); color: #fff; display: flex; align-items: center; gap: 14px;
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--amber) 55%, transparent) 0%, transparent 55%), var(--grad-pine);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--pine) 30%, transparent); overflow: hidden;
}
.profile-hero h2 { margin: 0; color: #fff; font-size: 1.4rem; }
.profile-hero small { opacity: .8; }
.ph-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ph-main h2, .ph-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { background: var(--grad-pine); color: #fff; }
.avatar.xl { width: 64px; height: 64px; font-size: 1.6rem; background: rgba(255, 255, 255, .18); border: 2px solid rgba(255, 255, 255, .5); }
.avatar.lg { width: 64px; height: 64px; font-size: 1.5rem; border: 3px solid var(--surface); box-shadow: var(--shadow-1); }
.pod-1 .avatar.lg { width: 80px; height: 80px; font-size: 1.8rem; border-color: var(--amber); background: var(--grad-amber); color: #2a1a03; }
.pts-pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--grad-amber); color: #2a1a03; text-decoration: none; font-weight: 800; box-shadow: 0 6px 16px rgba(0, 0, 0, .15); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 10px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: transform .3s var(--spring), border-color .2s; }
.stat:hover { transform: translateY(-2px); border-color: var(--pine); }
.stat span { font-size: .74rem; font-weight: 700; color: var(--muted); }
.stat b { font-family: var(--display); font-size: 1.45rem; line-height: 1.1; }
.stat small { font-size: .74rem; color: var(--muted); font-weight: 600; }
.stat.hot { border-color: var(--amber); background: linear-gradient(180deg, var(--amber-soft), var(--surface)); }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.qa { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: var(--r-m); background: var(--surface-2); color: var(--ink); text-decoration: none; font-size: .78rem; font-weight: 700; text-align: center; transition: transform .3s var(--spring), background .2s; }
.qa:hover { transform: translateY(-2px); background: var(--pine-soft); }
.qa .ic { color: var(--pine); }
.fold { margin: 16px 0 4px; border: 1px solid var(--line); border-radius: var(--r-m); padding: 0 14px; background: var(--surface); }
.fold summary { display: flex; align-items: center; gap: 8px; padding: 14px 0; font-weight: 700; cursor: pointer; list-style: none; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: "›"; margin-left: auto; transition: transform .3s var(--ease-out); font-size: 1.3rem; color: var(--muted); }
.fold[open] summary::after { transform: rotate(90deg); }
.fold[open] > *:not(summary) { animation: item-in .35s var(--ease-out) both; }
#sheet-out { color: var(--danger); }

/* ---- points hub ---- */
.points-hero {
  position: relative; overflow: hidden; color: #fff; border-radius: var(--r-xl); padding: 22px; margin: 6px 0 14px; gap: 6px;
  background: radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, var(--amber) 70%, transparent), transparent 60%), var(--grad-pine);
  box-shadow: 0 16px 40px color-mix(in srgb, var(--pine) 32%, transparent);
}
.points-hero h2, .points-hero p { color: #fff; position: relative; }
.points-hero.guest .ic { color: #ffd88a; position: relative; }
.ph-glow { position: absolute; width: 220px; height: 220px; right: -60px; top: -80px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 65%); animation: glow 6s ease-in-out infinite; pointer-events: none; }
@keyframes glow { 50% { transform: translate(-30px, 20px) scale(1.15); } }
.ph-label { font-weight: 700; opacity: .85; position: relative; }
.points-hero strong { font-size: 3.2rem; position: relative; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ph-ranks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; position: relative; }
.ph-ranks a { display: flex; flex-direction: column; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, .14); color: #fff; text-decoration: none; transition: background .2s, transform .3s var(--spring); }
.ph-ranks a:hover { background: rgba(255, 255, 255, .22); transform: translateY(-2px); }
.ph-ranks span { font-size: .72rem; opacity: .85; font-weight: 700; }
.ph-ranks b { font-family: var(--display); font-size: 1.3rem; }
.ph-ranks small { font-size: .72rem; opacity: .85; }
.next-goal { padding: 12px 14px; border-radius: var(--r-m); background: var(--surface-2); margin-bottom: 4px; font-size: .88rem; }
.bar i[style*="--w"] { width: var(--w); animation: grow 1.1s var(--ease-out) both .2s; background: var(--grad-amber); }
@keyframes grow { from { width: 0; } }
.earn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.earn-i { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); }
.earn-i b { font-family: var(--display); font-size: 1.35rem; color: var(--pine); line-height: 1; }
.earn-i small { font-size: .78rem; color: var(--muted); line-height: 1.3; }
.lg-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; font-size: .95rem; background: var(--surface-2); }
.k-vote { background: var(--amber-soft); color: var(--amber-deep); font-weight: 900; }
.k-login { background: #fff1c9; } .k-referral { background: #e1eefb; } .k-place { background: var(--pine-soft); }
.k-prize { background: var(--grad-amber); } .k-redeem { background: #f6e3ef; }
:root[data-theme="dark"] .k-login, :root[data-theme="dark"] .k-referral, :root[data-theme="dark"] .k-redeem { background: var(--surface-2); }
.invite { margin-top: 14px; }
.invite h3 { margin: 0 0 2px; }
.inv-ic { width: 46px; height: 46px; border-radius: 15px; background: #e1eefb; display: grid; place-items: center; font-size: 1.4rem; flex: none; }
:root[data-theme="dark"] .inv-ic { background: var(--surface-2); }
.copy-row { display: flex; gap: 6px; margin: 12px 0 6px; }
.copy-row input { flex: 1; min-width: 0; height: 40px; border-radius: 999px; border: 1px dashed var(--pine); background: var(--pine-soft); padding: 0 14px; font-size: .84rem; font-weight: 700; color: var(--ink); }
.gift { transition: transform .3s var(--spring), border-color .2s, box-shadow .3s; }
.gift.can { box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 22%, transparent); }
.gift:hover { transform: translateY(-2px); }
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.ledger li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ledger b { font-size: .9rem; }
.lg-n { font-family: var(--display); font-weight: 800; color: var(--ok); }
.lg-n.neg { color: var(--danger); }
.s-done { color: var(--ok); } .s-cancelled { color: var(--danger); }

/* ---- people scoreboard ---- */
.sb-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 12px; padding-bottom: 4px; }
.sb-meta .chip { display: inline-flex; align-items: center; gap: 5px; }
.podium.people .pod b { font-size: .88rem; }
.prize-tag { display: inline-block; background: var(--grad-amber); color: #2a1a03; border-radius: 999px; padding: 2px 9px; font-size: .74rem; font-weight: 800; white-space: nowrap; }
.prize-tag.sm { background: var(--amber-soft); color: var(--amber-deep); }
.ranking.people li { gap: 12px; }
.ranking.people .rk-main { flex-direction: column; align-items: flex-start; gap: 0; }
.ranking li.me, .pod.me .pod-step { background: color-mix(in srgb, var(--pine-soft) 70%, transparent); border-radius: var(--r-m); }
.pod.me .pod-step { background: var(--grad-pine); color: #fff; }
.ranking.mini li { border: 0; padding: 6px 4px; }
.you-line { text-align: center; font-weight: 700; padding: 12px; border-radius: var(--r-m); background: var(--surface-2); }
.prize-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.prize-list li { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px dashed var(--line); font-size: .86rem; }
.prize-list b { color: var(--amber-deep); }

/* ---- celebration ---- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 3000; overflow: hidden; }
.confetti i { position: absolute; top: 40%; width: 9px; height: 14px; border-radius: 2px; background: var(--c); animation: fall var(--d) var(--ease-out) forwards; }
@keyframes fall {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--x), 70vh) rotate(var(--r)); opacity: 0; }
}

/* ---- toast springs in ---- */
.toast { transition: opacity .25s var(--ease), transform .5s var(--spring); }
.toast:not(.show) { transform: translate(-50%, 30px) scale(.94); }

@media (prefers-reduced-motion: reduce) {
  .panel-body.enter { animation: none !important; }
}
.panel { background: var(--surface); }
.view-head .eyebrow { display: inline-flex; align-items: center; gap: 6px; }
:root[data-theme="dark"] .points-hero, :root[data-theme="dark"] .profile-hero {
  background: radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, var(--amber) 38%, transparent), transparent 60%), linear-gradient(160deg, #1f6b58, #134a3f 55%, #0c2e29);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
}

/* ===== v4: Top 20 + visit planner ===== */
.top-hero { padding: 18px 18px 8px; }
.top-hero h2 { margin: 6px 0 4px; font-size: 1.5rem; }
.top-hero .eyebrow { display: inline-flex; align-items: center; gap: 6px; color: var(--amber-deep); }
.cc-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 12px -18px 0; padding: 2px 18px 6px; }
.cc-tabs::-webkit-scrollbar { display: none; }
.cc-tabs button { flex: none; display: flex; gap: 6px; align-items: center; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; font-weight: 600; font-size: .86rem; cursor: pointer; transition: background .2s, transform .15s; }
.cc-tabs button.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.cc-tabs button:active { transform: scale(.96); }
/* all countries always fit: equal columns, flag above the name */
.cc-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; overflow: visible; margin: 12px 0 0; padding: 2px 0 6px; }
.cc-tabs button { min-width: 0; flex-direction: column; gap: 2px; padding: 7px 4px; border-radius: 14px; font-size: .78rem; line-height: 1.15; text-align: center; justify-content: center; }
.cc-tabs button span { font-size: 1.15rem; line-height: 1; }
.cc-tabs button { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 360px) { .cc-tabs { gap: 4px; } .cc-tabs button { padding: 7px 1px; font-size: .7rem; letter-spacing: -.01em; } }
.top-list { list-style: none; margin: 0; padding: 4px 12px 10px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.top-list li, .pick-list li { min-width: 0; }
.top-card { display: flex; align-items: center; gap: 11px; padding: 8px 10px 8px 8px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; transition: transform .18s var(--ease), box-shadow .18s, border-color .18s; }
.top-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); border-color: var(--amber); }
.top-card .thumb { width: 64px; height: 64px; border-radius: 12px; flex: none; object-fit: cover; }
.top-rank { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; background: var(--surface-2); color: var(--ink); }
.top-rank.r1 { background: linear-gradient(135deg,#ffd76a,#f0a500); color: #3a2500; }
.top-rank.r2 { background: linear-gradient(135deg,#e9edf2,#aab4c0); color: #26303b; }
.top-rank.r3 { background: linear-gradient(135deg,#f3c9a0,#c9824a); color: #3b2210; }
.top-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.top-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-main .meta { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-go { flex: none; font-size: .78rem; font-weight: 700; color: var(--amber-deep); }
@media (max-width: 420px) { .top-go { display: none; } }
.center { text-align: center; }

.visit { padding: 0 0 12px; }
.visit-hero { display: flex; gap: 14px; padding: 16px 18px 6px; align-items: flex-start; }
.visit-hero .visit-img { width: 96px; height: 96px; border-radius: 16px; object-fit: cover; flex: none; }
.visit-hero h2 { margin: 4px 0; font-size: 1.3rem; }
.visit-hero p { margin: 0 0 8px; font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vs { margin: 10px 12px 0; padding: 14px; border-radius: var(--r-l); background: var(--surface-2); }
.vs h3 { margin: 0 0 10px; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.vs .small { font-size: .82rem; margin: -4px 0 8px; }
.pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pick-list label { display: flex; align-items: center; gap: 10px; padding: 7px; border-radius: 12px; background: var(--surface); border: 2px solid transparent; cursor: pointer; transition: border-color .15s; }
.pick-list label.on { border-color: var(--amber); }
.pick-list input { width: 18px; height: 18px; accent-color: var(--amber); flex: none; }
.pick-list .thumb.sm { width: 44px; height: 44px; border-radius: 10px; flex: none; object-fit: cover; }
.pick-list div { min-width: 0; display: flex; flex-direction: column; }
.pick-list b { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-list .meta { font-size: .76rem; color: var(--muted); }
.legs { list-style: none; margin: 0 0 10px; padding: 0; }
.legs > li { display: flex; align-items: center; gap: 10px; }
.legs .stop-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--amber); color: #2a1a03; font-weight: 800; font-size: .8rem; flex: none; }
.legs .stop-n.main { background: var(--ink); color: var(--surface); }
.legs .leg { align-items: stretch; min-height: 44px; }
.legs .leg-line { width: 26px; flex: none; background: linear-gradient(var(--amber), var(--amber)) center/2px 100% no-repeat; opacity: .6; }
.legs .leg-info { display: flex; flex-direction: column; justify-content: center; gap: 2px; font-size: .8rem; color: var(--muted); padding: 4px 0; }
.legs .leg-info a { color: var(--amber-deep); }
.plan-sum, .tv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.plan-sum > div, .tv-stats > div, .stay > div:first-child { background: var(--surface); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; }
.plan-sum b, .tv-stats b { font-size: .95rem; } .plan-sum span, .tv-stats span, .stay span { font-size: .72rem; color: var(--muted); }
.there .row { gap: 6px; }
.vs .search-box { margin: 8px 0 4px; }
.stay { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.stay > div:first-child { flex: 1; }
.stay b { font-size: 1.15rem; }
.hotel-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.hotel-list li { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 12px; padding: 7px 9px; }
.hotel-list li div { flex: 1; min-width: 0; display: flex; flex-direction: column; } .hotel-list b { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs.total { background: linear-gradient(135deg, rgba(240,165,0,.16), rgba(240,165,0,.05)); }
.total-grid { display: grid; gap: 6px; margin-bottom: 8px; }
.total-grid > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--surface); border-radius: 12px; padding: 10px 12px; font-size: .88rem; }
.total-grid b { font-size: 1.1rem; white-space: nowrap; }
.poi.main { background: var(--ink); color: var(--surface); transform: scale(1.18); }

.flag { display: inline-block; vertical-align: -1px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); flex: none; }
.credit { font-size: .74rem; color: var(--muted); margin: 6px 0 0; }
.credit a { color: inherit; }
.wiki-link { font-weight: 600; color: var(--amber-deep); text-decoration: none; font-size: .9rem; }
.gallery img { object-fit: cover; }
.inst { display: flex; align-items: center; gap: 10px; margin: 0 12px 10px; padding: 10px 12px; border-radius: var(--r-l); background: var(--amber-soft); }
.inst > span { font-size: 1.4rem; } .inst div { flex: 1; min-width: 0; display: flex; flex-direction: column; } .inst small { color: var(--muted); font-size: .78rem; }
.inst-x { border: 0; background: none; color: var(--muted); font-size: 1rem; cursor: pointer; padding: 4px; }

@media (min-width: 900px) { .panel-grab { display: none; } }
/* selected place on the map (phone): photo, actions and ‹ next nearest › */
.place-card { flex-direction: column; gap: 8px; padding: 10px; }
.pc-top { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; padding-right: 30px; }
.pc-img { width: 76px; height: 76px; border-radius: 14px; object-fit: cover; flex: none; display: grid; place-items: center; font-size: 1.8rem; background: var(--surface-2); }
.pc-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pc-main h3 { margin: 0; font-size: 1.05rem; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pc-main .meta { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pc-acts { display: flex; gap: 6px; } .pc-acts .btn { flex: 1; justify-content: center; } .pc-acts .btn:last-child { flex: 0 0 auto; }
.pc-nav { display: flex; align-items: stretch; gap: 6px; border-top: 1px solid var(--line); padding-top: 8px; }
.pc-arrow { flex: none; width: 44px; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; transition: transform .12s, background .2s; }
.pc-arrow:active, .pc-next:active { transform: scale(.94); }
.pc-arrow:disabled, .pc-next:disabled { opacity: .35; cursor: default; }
.pc-next { flex: 1; min-width: 0; border: 0; border-radius: 12px; background: var(--amber-soft); color: var(--ink); text-align: left; padding: 6px 12px; cursor: pointer; display: flex; flex-direction: column; font: inherit; transition: transform .12s; }
.pc-next small { font-size: .72rem; color: var(--muted); } .pc-next b { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#app[data-view="map"] .carousel { display: none !important; }
@media (max-width: 899px) {
  .panel.half .gallery, .panel.half .gallery img, .panel.half .gallery .ph { max-height: 190px; height: 190px; }
  .panel.half .detail .back { top: 6px; }
}
/* theme chips */
.theme-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; -webkit-overflow-scrolling: touch; }
.theme-chips::-webkit-scrollbar { display: none; }
.tchip { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-size: .84rem; font-weight: 650; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-1); transition: background .18s, color .18s, transform .12s; }
.tchip:active { transform: scale(.95); }
.tchip.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.panel-body .theme-chips { padding: 0 0 8px; } .panel-body .tchip { box-shadow: none; }
.theme-chips-wrap { display: none; position: absolute; z-index: 25; left: 0; right: 0; top: calc(116px + var(--safe-t)); padding: 0 10px; }
@media (max-width: 899px) { #app[data-view="map"]:not(.picking) .theme-chips-wrap { display: block; } }
.pad-x { padding: 0 18px; margin: 4px 0 0; } .credit:empty { display: none; }

/* ===== v6: legal, reviews, info, route planner ===== */
.legal-links { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; padding: 14px 18px 22px; font-size: .78rem; }
.legal-links a { color: var(--muted); text-decoration: none; } .legal-links a:hover, .legal-links a.on { color: var(--ink); text-decoration: underline; }
.legal h3 { margin: 20px 0 6px; font-size: 1.02rem; } .legal p, .legal li { font-size: .92rem; line-height: 1.55; } .legal ul { padding-left: 20px; }
.legal .legal-links { justify-content: flex-start; padding: 0 0 6px; }
label.check { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 9px; font-weight: 500 !important; font-size: .86rem; line-height: 1.35; }
label.check input { width: 18px !important; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--amber); }
label.check a { color: var(--amber-deep); }
.btn.danger-ghost { background: transparent; color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); }
.chip.feat, .feat-dot { color: var(--amber-deep); }
.chip.feat { background: var(--amber-soft); }
.row.between.top { align-items: flex-start; gap: 10px; } .row.between.top h2 { margin: 0; }
.fav-btn { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--danger); font-size: 1.3rem; cursor: pointer; transition: transform .15s; }
.fav-btn.on { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); } .fav-btn:active { transform: scale(.88); }
.rating { margin: 4px 0 8px; } .stars { color: var(--amber); letter-spacing: 1px; }
.info-box { margin: 10px 0; } .info-box.empty { display: none; }
.info-box dl { display: grid; gap: 6px; margin: 0 0 4px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.info-box dl > div { display: flex; gap: 10px; font-size: .88rem; } .info-box dt { flex: 0 0 42%; color: var(--muted); } .info-box dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.safety { font-size: .82rem; color: var(--muted); background: color-mix(in srgb, var(--amber) 10%, var(--surface)); border-radius: 12px; padding: 8px 12px; margin: 8px 0 12px; }
.reviews { margin: 18px 0 8px; } .reviews h3 { margin: 0 0 8px; }
.rv { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; } .rv li { background: var(--surface-2); border-radius: 12px; padding: 8px 12px; font-size: .88rem; } .rv p { margin: 4px 0 0; }
.rv-form { display: grid; gap: 8px; background: var(--surface-2); border-radius: 14px; padding: 10px 12px; }
.star-pick { display: flex; gap: 4px; } .star-pick button { border: 0; background: none; font-size: 1.7rem; color: var(--line); cursor: pointer; padding: 0 2px; transition: transform .1s; }
.star-pick button.on { color: var(--amber); } .star-pick button:active { transform: scale(.85); }
.report-link { color: var(--muted); font-size: .8rem; margin-top: 4px; }
/* route planner */
.route-v .pad-t { padding: 14px 18px 4px; } .route-v h2 { margin: 4px 0 6px; }
.rt-stops { list-style: none; margin: 6px 12px 8px; padding: 0; }
.rt-stops > li { display: flex; align-items: center; gap: 10px; }
.rt-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--amber); color: #2a1a03; font-weight: 800; font-size: .82rem; }
.rt-n.a { background: var(--ink); color: var(--surface); } .rt-n.add { background: var(--surface-2); color: var(--ink); border: 2px dashed var(--line); }
.rt-in { flex: 1; min-width: 0; position: relative; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 4px 0; }
.rt-in input { flex: 1; min-width: 150px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 12px; font: inherit; font-size: 16px; }
.rt-in .suggest { position: absolute; left: 0; right: 0; top: 48px; z-index: 5; }
.rt-in small { flex-basis: 100%; }
.rt-stop { padding: 4px 0; } .rt-name { flex: 1; min-width: 0; font-weight: 650; font-size: .95rem; } .rt-name a { color: inherit; text-decoration: none; }
.rt-acts { display: flex; gap: 2px; } .rt-acts .icon-act { width: 30px; height: 30px; }
.rt-leg { align-items: stretch !important; min-height: 40px; } .rt-leg .leg-line { width: 28px; flex: none; background: linear-gradient(var(--amber), var(--amber)) center/2px 100% no-repeat; opacity: .55; }
.rt-leg .leg-info { display: flex; flex-direction: column; justify-content: center; gap: 2px; font-size: .78rem; color: var(--muted); padding: 2px 0; } .rt-leg a { color: var(--amber-deep); }
.rt-opts { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.rt-opts label:not(.check) { display: flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 600; }
.rt-opts select { height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 8px; font: inherit; }
.rt-total { margin: 12px 12px 0; padding: 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--amber) 14%, var(--surface)), var(--surface-2)); border-radius: 18px; scroll-margin-top: 10px; }
.rt-total.empty { background: none; padding: 4px 6px; }
.rt-mini { position: sticky; bottom: 0; z-index: 3; width: calc(100% - 24px); margin: 10px 12px 0; display: grid; grid-template-columns: 1fr auto; gap: 0 10px; align-items: center; text-align: left;
  padding: 10px 14px; border: 0; border-radius: 16px; background: var(--ink); color: var(--surface); font: inherit; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.rt-mini span { font-size: .78rem; opacity: .8; } .rt-mini b { grid-row: span 2; font-size: 1rem; white-space: nowrap; } .rt-mini small { font-size: .74rem; opacity: .75; }
.rt-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.rt-sum > div { background: var(--surface); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; } .rt-sum b { font-size: .98rem; } .rt-sum span { font-size: .72rem; color: var(--muted); }
.preset-list { display: grid; gap: 8px; }
.preset { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.preset:hover { border-color: var(--amber); } .preset:active { transform: scale(.99); }
.preset img, .preset .pr-ic { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; display: grid; place-items: center; font-size: 1.8rem; background: var(--surface-2); }
.preset div { min-width: 0; display: flex; flex-direction: column; gap: 2px; } .preset small { color: var(--muted); font-size: .78rem; line-height: 1.3; } .preset .meta { font-size: .74rem; color: var(--amber-deep); font-weight: 650; }
.route-bar { display: none; position: absolute; z-index: 25; left: 12px; right: 12px; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 18px; background: var(--surface);
  color: var(--ink); text-decoration: none; box-shadow: var(--shadow-2); border: 1px solid var(--line); bottom: calc(var(--dock-h) + 22px + var(--safe-b)); transition: transform .15s; }
.route-bar:active { transform: scale(.98); }
.rb-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--amber-soft); font-size: 1.2rem; flex: none; }
.rb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; } .rb-main b { font-size: .92rem; } .rb-main small { color: var(--muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-go { font-size: 1.5rem; color: var(--muted); }
@media (max-width: 899px) { #app[data-view="map"]:not(.picking) .route-bar { display: flex; } #app[data-view="map"] .place-card:not([hidden]) ~ .route-bar { display: none !important; } }
@media (min-width: 900px) { #app:not(.picking) .route-bar { display: flex; left: auto; right: 16px; bottom: 24px; width: 340px; } #app[data-view="route"] .route-bar { display: none; } }
/* multi-city trip */
.city-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.city-chip { display: inline-flex; flex-direction: column; position: relative; padding: 7px 30px 7px 12px; border-radius: 14px; background: var(--surface-2); border: 2px solid transparent; cursor: pointer; }
.city-chip.on { border-color: var(--amber); background: var(--amber-soft); } .city-chip b { font-size: .88rem; } .city-chip small { font-size: .72rem; color: var(--muted); }
.cc-x { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); cursor: pointer; font-size: .85rem; padding: 4px; }
.city-add { border: 2px dashed var(--line); background: none; border-radius: 14px; padding: 8px 12px; color: var(--ink); font: inherit; font-weight: 650; font-size: .86rem; cursor: pointer; }
#city-add-box, #city-add-box2 { margin-top: 8px; position: relative; }
.itin { list-style: none; padding: 0; margin: 4px 0 10px; }
.itin > li { display: flex; gap: 10px; align-items: flex-start; }
.it-stop { padding: 4px 0; align-items: center !important; } .it-stop > b { font-size: .95rem; }
.it-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; } .it-main b { font-size: .95rem; }
.it-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; } .it-row label { display: flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 600; }
.it-row select { height: 32px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 6px; font: inherit; }
.it-leg { align-items: stretch !important; min-height: 44px; } .it-leg .leg-line { width: 26px; flex: none; background: linear-gradient(var(--amber), var(--amber)) center/2px 100% no-repeat; opacity: .55; }
.it-leg .leg-info { display: flex; flex-direction: column; gap: 3px; font-size: .8rem; color: var(--muted); padding: 4px 0; }
.leg-links { display: flex; flex-wrap: wrap; gap: 4px 10px; } .leg-links a { color: var(--amber-deep); }
.total-grid .grand { background: var(--ink); color: var(--surface); } .total-grid .grand b { font-size: 1.2rem; }
/* ===== 3D view ===== */
.view3d { position: fixed; inset: 0; z-index: 200; background: #bcd9ea; }
body.in-3d .nav, body.in-3d .topbar { visibility: hidden; }
.v3-map, #v3-map.maplibregl-map { position: absolute; inset: 0; width: 100%; height: 100%; }
.v3-top { position: absolute; top: calc(12px + var(--safe-t)); left: 12px; right: 12px; display: flex; gap: 10px; align-items: center; z-index: 3; pointer-events: none; }
.v3-top > * { pointer-events: auto; }
.v3-title { min-width: 0; flex: 0 1 auto; display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border: 0; border-radius: 18px; background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--ink); box-shadow: var(--shadow-2); font: inherit; text-align: left; cursor: pointer; backdrop-filter: blur(8px); }
.v3-thumb { flex: none; width: 40px; height: 40px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--surface-2, #eef2f0); font-size: 20px; }
.v3-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; } .v3-thumb i { font-style: normal; }
.v3-tt { min-width: 0; display: flex; flex-direction: column; } .v3-chev { color: var(--muted); font-size: 1.3rem; margin-left: 2px; }
.v3-title b { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .v3-title small { color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v3-btn { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--surface); color: var(--ink); font-size: 1.15rem; box-shadow: var(--shadow-2); cursor: pointer; display: grid; place-items: center; transition: transform .12s, background .2s; }
.v3-btn:active { transform: scale(.92); } .v3-btn.on { background: var(--amber); color: #2a1a03; } .v3-btn:disabled { opacity: .4; }
.v3-modes { position: absolute; right: 12px; top: calc(76px + var(--safe-t)); display: flex; flex-direction: column; gap: 8px; z-index: 3; }
.v3-hop { position: absolute; left: 12px; right: 12px; bottom: calc(18px + var(--safe-b)); display: flex; gap: 8px; z-index: 3; max-width: 520px; margin: 0 auto; }
.v3-next { flex: 1; min-width: 0; border: 0; border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-2); padding: 8px 14px; text-align: left; font: inherit; cursor: pointer; display: flex; flex-direction: column; }
.v3-next small { color: var(--muted); font-size: .74rem; } .v3-next b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .v3-next:disabled { opacity: .5; }
.v3-help { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(92px + var(--safe-b)); z-index: 3; max-width: min(560px, calc(100% - 24px)); padding: 8px 14px; border-radius: 14px;
  background: rgba(10, 23, 28, .78); color: #fff; font-size: .78rem; text-align: center; transition: opacity .4s; pointer-events: none; }
.v3-help.gone { opacity: 0; }
.v3-msg { position: absolute; left: 50%; top: calc(80px + var(--safe-t)); transform: translateX(-50%); z-index: 4; max-width: calc(100% - 120px); padding: 10px 14px; border-radius: 14px; background: var(--ink); color: var(--surface); font-size: .86rem; box-shadow: var(--shadow-2); }
.v3-pin { border: 0; background: none; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.v3-pin span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand, #1d5c4d); border: 2px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.35); font-size: 16px; }
.v3-pin.on span { width: 44px; height: 44px; background: var(--amber); font-size: 20px; }
.v3-pin b { order: -1; background: var(--surface); color: var(--ink); padding: 3px 8px; border-radius: 10px; font-size: .78rem; box-shadow: var(--shadow-1); white-space: nowrap; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; }
.v3-me { width: 18px; height: 18px; border-radius: 50%; background: #2b7bff; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(43,123,255,.25); }
@media (min-width: 900px) { .v3-help { bottom: 92px; } }
.v3-btn.sm { width: 38px; height: 38px; font-size: 1rem; margin-left: 4px; }
.v3-modes .v3-btn[hidden] { display: none; }
.v3-joy { position: absolute; left: 18px; bottom: calc(96px + var(--safe-b)); width: 124px; height: 124px; border-radius: 50%; z-index: 3; touch-action: none;
  background: radial-gradient(circle, rgba(255,255,255,.22), rgba(255,255,255,.08)); border: 2px solid rgba(255,255,255,.7); box-shadow: 0 6px 20px rgba(0,0,0,.25); backdrop-filter: blur(6px); }
.v3-joy[hidden] { display: none; }
.v3-joy i { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-2); transition: transform .12s; }
.v3-joy:active i { transition: none; }
.v3-arrow { position: absolute; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%); z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; }
.v3-arrow[hidden] { display: none; }
.v3-arrow i { font-style: normal; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: var(--amber); color: #2a1a03; font-size: 30px; box-shadow: 0 6px 18px rgba(0,0,0,.3); border: 3px solid #fff; will-change: transform; }
.v3-arrow b { background: var(--ink); color: var(--surface); font-size: .8rem; padding: 2px 8px; border-radius: 10px; }
.v3-pop { display: flex; flex-direction: column; gap: 4px; font-family: inherit; } .v3-pop b { font-size: .95rem; padding-right: 14px; } .v3-pop small { color: #5b6b66; font-size: .78rem; } .v3-pop .btn { margin-top: 4px; }
.view3d .maplibregl-popup-content { border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-2); }
.view3d .maplibregl-ctrl-bottom-right { bottom: calc(78px + var(--safe-b)); }
.view3d:fullscreen { background: #bcd9ea; }


/* ===== add photos to a place ===== */
.add-photos { margin: 16px 0; padding: 12px 14px; border-radius: 16px; background: linear-gradient(135deg, rgba(240,165,0,.14), rgba(240,165,0,.04)); border: 1px solid rgba(240,165,0,.25); }
.add-photos .ap-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.add-photos .ap-row > div { display: flex; flex-direction: column; min-width: 0; } .add-photos small { color: var(--muted); font-size: .8rem; }
.add-photos #ph-mine:empty { display: none; } .add-photos #ph-mine { margin-top: 6px; }
.ph-prev { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 6px; margin-bottom: 8px; }
.ph-prev img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
label.check { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; } label.check input { width: auto; margin-top: 3px; }

/* ===== 3D main map (MapLibre) ===== */
#map.maplibregl-map { position: absolute; inset: 0; }
.ml-pin { width: 36px; height: 44px; display: flex; align-items: flex-start; justify-content: center; cursor: pointer; }
.ml-pin .pin { margin-top: 2px; }
.ml-poi { width: 30px; height: 30px; cursor: pointer; }
.ml-cluster { width: 40px; height: 40px; border-radius: 50%; cursor: pointer; }
.ml-cluster div { width: 30px; height: 30px; margin: 5px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.ml-halo { width: 54px; height: 54px; pointer-events: none; }
.ml-halo i { display: block; width: 100%; height: 100%; box-sizing: border-box; border-radius: 50%; border: 3px solid var(--amber); background: color-mix(in srgb, var(--amber) 18%, transparent); animation: mlpulse 1.8s ease-out infinite; }
@keyframes mlpulse { 0% { transform: scale(.7); opacity: 1; } 100% { transform: scale(1.25); opacity: .35; } }
.ml-user { width: 16px; height: 16px; border-radius: 50%; background: #2f7bf6; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(47,123,246,.25); }
#map .maplibregl-ctrl-top-right { top: 64px; }
@media (max-width: 899px) { #map .maplibregl-ctrl-top-right { display: none; } #map .maplibregl-ctrl-bottom-right { bottom: calc(var(--dock-h) + 14px + var(--safe-b)); } }
#map.picking .maplibregl-canvas { cursor: crosshair; }
body.in-3d #map, body.in-3d .map-area > .fab { visibility: hidden; }

/* ===== one-day trips ===== */
.day-v .seg { margin: 10px 0 0; }
.day-v .rt-from { display: flex; gap: 8px; align-items: center; } .day-v .rt-from input { flex: 1; }
.day-list { display: grid; gap: 10px; margin: 12px 0; }
.day-card { border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-1); overflow: hidden; border: 1px solid var(--line); }
.day-head { display: flex; gap: 12px; align-items: center; width: 100%; padding: 10px; border: 0; background: none; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.day-head img, .day-head .ph { width: 78px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--surface-2); font-size: 26px; }
.day-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .day-main b { line-height: 1.25; } .day-main small { color: var(--muted); font-size: .8rem; }
.day-body { display: none; padding: 0 12px 12px; } .day-card.open .day-body { display: block; } .day-card.open { border-color: var(--amber); }
.day-tl { list-style: none; margin: 4px 0 10px; padding: 0 0 0 14px; border-left: 2px dashed color-mix(in srgb, var(--amber) 60%, transparent); display: grid; gap: 6px; font-size: .9rem; }
.day-tl li { position: relative; } .day-tl li::before { content: ""; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--amber); }
.day-tl li.dt-hop::before { display: none; } .day-tl b { font-variant-numeric: tabular-nums; margin-right: 4px; } .day-tl small { color: var(--muted); } .day-tl a { color: var(--ink); font-weight: 600; text-decoration: none; }
.votes-link { font-weight: 700; color: var(--amber-deep); text-decoration: none; white-space: nowrap; }
@media (min-width: 900px) { .votes-link { display: none; } }
@media (max-width: 899px) { .nav .nav-vote { display: none !important; } }

/* ---------- history timeline ---------- */
.hist-v .chip { border: 0; cursor: pointer; color: var(--ink); font: inherit; font-size: .8rem; font-weight: 700; padding: 6px 12px; transition: background .2s, color .2s; }
.hist-v .chip.on { background: var(--pine, #1d5c4d); color: #fff; }
.hist-eras, .hist-cats { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 0; }
.hist-range { position: relative; height: 34px; margin: 14px 4px 0; }
.hist-track { position: absolute; left: 0; right: 0; top: 15px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--line) 0 var(--a), var(--amber) var(--a) var(--b), var(--line) var(--b) 100%); }
.hist-range input[type=range] { position: absolute; left: 0; width: 100%; top: 4px; margin: 0; height: 26px; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.hist-range input[type=range]::-webkit-slider-runnable-track { background: none; height: 26px; }
.hist-range input[type=range]::-moz-range-track { background: none; }
.hist-range input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--surface); border: 3px solid var(--amber); box-shadow: var(--shadow-1); cursor: grab; }
.hist-range input[type=range]::-moz-range-thumb { pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 3px solid var(--amber); cursor: grab; }
.hist-years { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.05rem; margin: 0 2px 4px; }
.hist-tools { gap: 8px; margin: 12px 0 0; } .hist-tools select, .hist-tools input { flex: 1; min-width: 0; }
.hist-list { list-style: none; margin: 8px 0 0; padding: 0 0 0 14px; position: relative; }
.hist-list::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 2px; background: var(--line); border-radius: 2px; }
.hist-cent { font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 14px 0 4px -14px; padding-left: 14px; }
.hist-ev { position: relative; margin: 0 0 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.hist-ev::before { content: ""; position: absolute; left: -14px; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: var(--amber); border: 2px solid var(--surface); }
.hist-ev.c-holocaust::before, .hist-ev.c-repression::before, .hist-ev.c-deportation::before { background: #5d6870; }
.hist-ev.c-partisans::before { background: #2f7a4d; } .hist-ev.c-state::before, .hist-ev.c-uprising::before { background: #1d5c4d; }
.hist-head { display: grid; grid-template-columns: auto auto 1fr; gap: 10px; align-items: center; width: 100%; padding: 10px 12px; background: none; border: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.hist-y { font-weight: 800; font-size: .82rem; color: var(--amber-ink, #9a5b06); min-width: 3.2em; }
.hist-ic { font-size: 1.15rem; }
.hist-t b { display: block; line-height: 1.25; } .hist-t small { color: var(--muted); font-size: .76rem; }
.hist-body { display: none; padding: 0 12px 12px; } .hist-body p { margin: 0 0 8px; }
.hist-ev.open { border-color: var(--amber); box-shadow: var(--shadow-1); } .hist-ev.open .hist-body { display: block; }
@media (max-width: 899px) { .nav a span { font-size: .62rem; } }

/* ---------- 3D view: time travel bar ---------- */
.v3-time { position: absolute; left: 50%; transform: translateX(-50%); bottom: 92px; z-index: 5; width: min(560px, calc(100% - 24px)); background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px); border-radius: 18px; box-shadow: var(--shadow-2, 0 8px 24px rgba(0,0,0,.18)); padding: 8px 14px 10px; }
.v3-time[hidden] { display: none; }
.v3-time-row { display: flex; align-items: center; gap: 10px; }
.v3-time-row b { font-size: 1.15rem; min-width: 3.4em; text-align: center; }
.v3-time input[type=range] { flex: 1; accent-color: var(--amber); }
.v3-time small { display: block; color: var(--muted); font-size: .74rem; margin-top: 2px; min-height: 1em; }
.v3-ticks { position: relative; height: 10px; margin: 0 calc(3.4em + 10px) 0 calc(3.4em + 10px); }
.v3-ticks i { position: absolute; top: 2px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--amber); opacity: .8; }
.v3-ticks i.m { background: #1d5c4d; border-radius: 1px; }
.v3-ev { background: var(--surface); border: 2px solid var(--amber); border-radius: 999px; padding: 2px 8px 2px 4px; font-size: .78rem; font-weight: 700; white-space: nowrap; box-shadow: var(--shadow-1); cursor: pointer; color: var(--ink); }
.v3-ev.dim { opacity: .35; }

.hist-tools { gap: 8px; margin-top: 12px; }
.hist-tools select, .hist-tools input { height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 12px; font: inherit; font-size: .92rem; min-width: 0; }
.hist-tools select { flex: 0 0 auto; max-width: 45%; }
.hist-tools input { flex: 1; }

/* ---------- Time machine (History section) ---------- */
.tm-card { margin: 14px 0 18px; padding: 14px 16px 16px; border-radius: var(--r-l); background: var(--surface-2); border: 1px solid var(--line); }
.tm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tm-head b { font-family: var(--display); font-size: 1.08rem; }
.tm-head select { height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 10px; font: inherit; }
.tm-year { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 2px; }
.tm-year b { font-family: var(--display); font-size: 2.3rem; line-height: 1; letter-spacing: -.02em; color: var(--pine); font-variant-numeric: tabular-nums; }
.tm-year span { color: var(--muted); font-weight: 600; }
#tm-yr { width: 100%; accent-color: var(--amber); }
.tm-scale { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); margin-top: -2px; }
.tm-card h4 { margin: 12px 0 6px; font-size: .9rem; }
.tm-objs { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.tm-objs a { display: block; padding: 8px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.tm-objs b { display: block; font-size: .9rem; }
.tm-objs small { color: var(--muted); }
.tm-objs li.off a { opacity: .55; border-style: dashed; }
#tm-3d { width: 100%; justify-content: center; }

/* ---------- Era looks: the interface changes with the year chosen in the Time machine or the 3D view ---------- */
:root[data-era] { transition: background-color .4s; }
:root[data-era="medieval"] { --fog: #e6d8b8; --surface: #f6ecd2; --surface-2: #efe2c3; --glass: rgba(246, 236, 210, .97); --line: #cfb98c; --ink: #3a2614; --muted: #7a6145;
  --pine: #8a2a1b; --pine-ink: #fff6e3; --pine-soft: #efd6bb; --amber: #b8862b; --amber-deep: #8c6118; --amber-soft: #f1e0b8; --border-line: #8a2a1b; --mask: #e3d4b0;
  --display: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; --body: Georgia, "Times New Roman", serif; }
:root[data-era="early"] { --fog: #eee5d0; --surface: #fbf6ea; --surface-2: #f3ead6; --glass: rgba(251, 246, 234, .97); --line: #dccca6; --ink: #1f2440; --muted: #5f6280;
  --pine: #2c3e78; --pine-ink: #fffaf0; --pine-soft: #dfe3f2; --amber: #c19a3b; --amber-deep: #8f6d1d; --amber-soft: #f4e8c8; --border-line: #2c3e78; --mask: #ece2c8;
  --display: Garamond, "EB Garamond", "Palatino Linotype", Georgia, serif; }
:root[data-era="c19"] { --fog: #e3d6c1; --surface: #f6eee2; --surface-2: #ece0cd; --glass: rgba(246, 238, 226, .97); --line: #d2bfa2; --ink: #3a2e24; --muted: #7b6a58;
  --pine: #6b4a2c; --pine-ink: #fbf3e6; --pine-soft: #ead8c2; --amber: #a8743a; --amber-deep: #7d5426; --amber-soft: #f0dfc6; --border-line: #6b4a2c; --mask: #ddcfb7;
  --display: Georgia, "Times New Roman", serif; }
:root[data-era="inter"] { --fog: #ece6d8; --surface: #fbf8f1; --surface-2: #f2ede1; --glass: rgba(251, 248, 241, .97); --line: #d8cfba; --ink: #161616; --muted: #5b5850;
  --pine: #1c1c1c; --pine-ink: #f3d77a; --pine-soft: #ece4cf; --amber: #c9a227; --amber-deep: #957716; --amber-soft: #f5ebc8; --border-line: #1c1c1c; --mask: #e7e0cf;
  --display: Futura, "Century Gothic", "Trebuchet MS", sans-serif; }
:root[data-era="inter"] h2, :root[data-era="inter"] .tm-head b { letter-spacing: .06em; text-transform: uppercase; }
:root[data-era="war"] { --fog: #cfcdc4; --surface: #ecebe6; --surface-2: #e0ded6; --glass: rgba(236, 235, 230, .97); --line: #bdbbb1; --ink: #23241f; --muted: #66675f;
  --pine: #4b5320; --pine-ink: #f1f0e6; --pine-soft: #dfe0cc; --amber: #8a6d3b; --amber-deep: #6a5229; --amber-soft: #e8dfcb; --border-line: #4b5320; --mask: #c9c7be;
  --display: "Courier New", Courier, monospace; }
:root[data-era="soviet"] { --fog: #dcd8cd; --surface: #f3f0e8; --surface-2: #e8e4d9; --glass: rgba(243, 240, 232, .97); --line: #cbc6b8; --ink: #1f242a; --muted: #5d636b;
  --pine: #a3262a; --pine-ink: #fff5e8; --pine-soft: #f0d7d2; --amber: #c7a24a; --amber-deep: #8f7024; --amber-soft: #f2e6c4; --border-line: #a3262a; --mask: #d6d1c4;
  --display: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif; }
:root[data-era="soviet"] h2, :root[data-era="soviet"] .tm-head b { text-transform: uppercase; letter-spacing: .03em; }
/* the maps take on the look of old prints and photos */
:root[data-era="medieval"] .leaflet-tile-pane, #view3d[data-era="medieval"] .v3-map canvas { filter: sepia(.55) saturate(.75) contrast(.95); }
:root[data-era="early"] .leaflet-tile-pane, #view3d[data-era="early"] .v3-map canvas { filter: sepia(.4) saturate(.8); }
:root[data-era="c19"] .leaflet-tile-pane, #view3d[data-era="c19"] .v3-map canvas { filter: sepia(.6) saturate(.65) contrast(1.05); }
:root[data-era="inter"] .leaflet-tile-pane, #view3d[data-era="inter"] .v3-map canvas { filter: sepia(.25) saturate(.8); }
:root[data-era="war"] .leaflet-tile-pane, #view3d[data-era="war"] .v3-map canvas { filter: grayscale(.85) contrast(1.08); }
:root[data-era="soviet"] .leaflet-tile-pane, #view3d[data-era="soviet"] .v3-map canvas { filter: saturate(.6) sepia(.15) contrast(1.04); }
#view3d[data-era] .v3-time { border: 1px solid var(--line); }
#view3d[data-era] .v3-time-row b { font-family: var(--display); color: var(--pine); }
#view3d[data-era]:not([data-era=""]) .v3-pin:not(.on) { opacity: .4; filter: grayscale(.6); }
/* historical borders labels on the map */
.hb-label { pointer-events: none; }
.hb-label span { display: inline-block; transform: translate(-50%, -50%); white-space: nowrap; font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  color: #4a2f17; text-shadow: 0 0 3px #fff8ea, 0 0 6px #fff8ea; }
.hb-label.occ span { color: #7b1d1d; font-size: 11px; text-transform: none; font-style: italic; }
.tm-state { margin: 4px 0 0; padding: 8px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.tm-state small { font-size: .72rem; }
.hb-label.ml span { transform: none; }
/* link to BaltGo Tools in the top bar */
.tools-chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: .86rem; background: var(--surface-2); border: 1px solid var(--line); }
.tools-chip:hover { border-color: var(--pine); }
@media (max-width: 760px) { .tools-chip { padding: 0 9px; } .tools-chip span[data-t] { display: none; } }

/* touch devices: blur behind panels is expensive while the map moves underneath — panels are nearly opaque anyway */
@media (pointer: coarse) {
  *, *::before, *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .maplibregl-canvas, .leaflet-container { touch-action: none; }
}

/* ---- trips: switcher, plan by days, drag to reorder ---- */
.trip-switch { display: flex; gap: 8px; align-items: stretch; margin: 6px 0 8px; }
.ts-cur { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: var(--r-m); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ts-cur:hover { border-color: var(--pine); }
.ts-ic { font-size: 1.4rem; }
.ts-t { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.ts-t b { font-family: var(--display); font-size: 1.08rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-t small { color: var(--muted); font-size: .78rem; }
.ts-caret { color: var(--muted); }
.ts-panel { border: 1.5px solid var(--line); border-radius: var(--r-m); background: var(--surface); margin-bottom: 10px; max-height: 46vh; overflow: auto; }
.ts-list { list-style: none; margin: 0; padding: 4px; }
.ts-list li { display: flex; align-items: center; gap: 4px; border-radius: 10px; padding: 2px; }
.ts-list li.on { background: var(--pine-soft); }
.ts-pick { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; padding: 8px 10px; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ts-pick b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ts-pick small { color: var(--muted); font-size: .76rem; }
.plan-add { margin: 4px 0 10px; position: relative; }
.plan-sum.plan-sum { grid-template-columns: repeat(4, 1fr); }
.plan-tools { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 8px; }
.plan-tools label.inline { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); font-weight: 700; }
.plan-tools select, .plan-tools input[type=date] { height: 34px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: .85rem; padding: 0 8px; }
.seg.mini { padding: 3px; } .seg.mini button { padding: 6px 10px; font-size: .8rem; }
.stops .day-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 4px 8px; border-bottom: 2px solid var(--pine); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.stops .day-h b { font-family: var(--display); font-size: 1.05rem; }
.stops .day-h small { display: block; color: var(--muted); font-size: .76rem; margin-top: 2px; }
.day-links { display: flex; gap: 4px; flex: none; }
.stop .tm { color: var(--pine); font-family: var(--mono, monospace); }
.stop .drag { cursor: grab; touch-action: none; user-select: none; color: var(--muted); font-weight: 800; letter-spacing: -2px; padding: 8px 2px; flex: none; }
.stop.dragging { position: relative; z-index: 5; background: var(--surface); box-shadow: var(--shadow-2); border-radius: 12px; opacity: .95; transition: none; }
.stop.drop-here { box-shadow: inset 0 3px 0 var(--amber); }
.stop.flash { animation: stopflash 1.2s; }
@keyframes stopflash { 0%, 60% { background: color-mix(in srgb, var(--amber) 28%, transparent); } 100% { background: transparent; } }
.stop .res-act { flex-wrap: nowrap; }
.links .parts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.links .parts .btn { min-height: 36px; }
.links p { grid-column: 1 / -1; margin: 0; }
#trip-sync a { color: var(--pine); font-weight: 700; }
@media (max-width: 899px) {
  .stop .res-act .icon-act[data-up], .stop .res-act .icon-act[data-down] { display: none; }   /* drag handle instead on phones */
  .plan-sum.plan-sum { grid-template-columns: repeat(2, 1fr); }
}
.stop .tm { font-family: inherit; font-weight: 800; }
.plan .stop { gap: 8px; padding: 8px 2px; }
.plan .stop .res-main { min-width: 0; flex: 1; }
.plan .stop .res-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan .stop .icon-act { width: 32px; height: 32px; font-size: .85rem; }
.plan .stop .res-act { gap: 4px; }
.day-links .btn { white-space: nowrap; }
#ts-new { flex: none; align-self: center; }
@media (max-width: 899px) { #ts-new .lbl { display: none; } #ts-new { width: 44px; height: 44px; padding: 0; font-size: 1.2rem; } .plan-tools { gap: 6px 8px; } }
.tm-disc { margin: 10px 0 0; font-size: .76rem; color: var(--muted); line-height: 1.35; }

/* ---- live weather on the map ---- */
.fab.wx { bottom: 138px; font-size: 1.1rem; }
.fab.wx:not(.on) { filter: grayscale(1); opacity: .7; }
@media (max-width: 899px) { .fab.wx { bottom: calc(var(--dock-h) + 298px + var(--safe-b)); } }
.wx-wrap { background: none; border: 0; }
.wx-pill { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px 2px 5px; border-radius: 999px; background: rgba(255,255,255,.94); color: #0e2a33;
  box-shadow: 0 1px 4px rgba(14,42,51,.25); font: 800 12.5px/1.6 var(--body); white-space: nowrap; transform: translate(-50%, -50%); pointer-events: none; }
.wx-pill.t0 { font-size: 13.5px; }
.wx-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.wx-fog { position: absolute; inset: 0; pointer-events: none; z-index: 5; opacity: 0; transition: opacity 1.2s; background: linear-gradient(to bottom, rgba(235,240,242,.55), rgba(235,240,242,.18) 60%, rgba(235,240,242,.4)); }
.wx-fog.on { opacity: 1; }
:root[data-theme="dark"] .wx-pill { background: rgba(17,35,42,.92); color: #e6efee; }
body.in-3d .wx-fx, body.in-3d .wx-fog { display: none; }

/* ---- pick one or more types ---- */
.cat-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 14px; border-radius: var(--r-m); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.cat-btn .caret { margin-left: auto; color: var(--muted); }
.cat-btn.on { border-color: var(--pine); background: var(--pine-soft); }
.map-search .cat-btn { height: 44px; min-height: 0; border: 0; border-radius: 999px; background: var(--glass); box-shadow: var(--shadow-1); max-width: 46%; }
.map-search .cat-btn.on { background: var(--pine); color: var(--pine-ink); } .map-search .cat-btn.on .caret { color: inherit; }
#dlg.cat-sheet { max-width: 620px; }
.cat-groups { max-height: min(62vh, 560px); overflow: auto; margin: 4px -4px; padding: 0 4px; }
.cat-groups section { margin-bottom: 10px; }
.cat-groups h4 { margin: 8px 0 6px; font-size: .9rem; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.cat-opt { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.cat-opt span { font-size: 1.15rem; } .cat-opt b { flex: 1; font-size: .84rem; font-weight: 700; line-height: 1.15; } .cat-opt small { color: var(--muted); font-size: .72rem; }
.cat-opt.on { border-color: var(--pine); background: var(--pine-soft); box-shadow: inset 0 0 0 1px var(--pine); }
.cat-foot { gap: 8px; margin-top: 8px; position: sticky; bottom: 0; }

/* ---- trip questions ("Plan for me") ---- */
.wizard h4 { margin: 16px 0 8px; font-size: .95rem; }
.wz-row { display: flex; flex-wrap: wrap; gap: 6px; }
.wz-chip { padding: 9px 13px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; }
.wz-chip.on { background: var(--pine); border-color: var(--pine); color: var(--pine-ink); }
.wizard #wz-go { margin-top: 20px; }
#trip-tabs button[data-tab="wizard"] { font-weight: 800; }

/* ---- journey player / live track ---- */
.jr-bar { position: absolute; left: 50%; transform: translateX(-50%); bottom: 22px; z-index: 30; width: min(560px, calc(100% - 24px)); display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 18px; background: var(--glass); box-shadow: var(--shadow-2); }
@media (max-width: 899px) { .jr-bar { bottom: calc(var(--dock-h) + 16px + var(--safe-b)); } }
.jr-b { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--pine); color: var(--pine-ink); font-size: 1.1rem; cursor: pointer; flex: none; }
.jr-b.sm { width: 36px; height: 36px; font-size: .85rem; background: var(--surface-2); color: var(--ink); font-weight: 800; }
.jr-b.sm.on { background: var(--amber); }
.jr-main { flex: 1; min-width: 0; }
.jr-row { display: flex; gap: 8px; align-items: center; font-size: .82rem; } .jr-info { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jr-prog { width: 100%; accent-color: var(--amber); }
.jr-dot { width: 12px; height: 12px; border-radius: 50%; background: #d33; box-shadow: 0 0 0 0 rgba(221,51,51,.6); animation: jrpulse 1.6s infinite; flex: none; margin: 0 4px; }
@keyframes jrpulse { 70% { box-shadow: 0 0 0 10px rgba(221,51,51,0); } 100% { box-shadow: 0 0 0 0 rgba(221,51,51,0); } }
.jr-wrap { background: none; border: 0; } .jr-fig { display: grid; place-items: center; width: 44px; height: 44px; transition: transform .2s linear; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.links .jr-pick { grid-column: 1 / -1; display: flex; gap: 6px; } .links .jr-pick .btn:first-child { flex: 1; }
@media (min-width: 900px) { .jr-bar { left: auto; right: 84px; transform: none; width: min(520px, calc(100% - 660px)); min-width: 360px; } }
/* walking on a phone while the time bar is shown: keep the joystick above it */
#view3d:has(.v3-time:not([hidden])) .v3-joy { bottom: calc(205px + var(--safe-b)); }
.plist-more { list-style: none; height: 1px; }
.desc.more-en { border-left: 3px solid var(--line); padding-left: 10px; }

/* satellite / drawn map switch */
.sat-ctrl .sat-btn { display: flex; align-items: center; justify-content: center; width: 29px; height: 29px; font-size: 16px; line-height: 1; cursor: pointer; text-decoration: none; background: #fff; }
.leaflet-bar.sat-ctrl a.sat-btn { width: 34px; height: 34px; line-height: 34px; font-size: 17px; }
.sat-ctrl .sat-btn.on { background: #e7f3ee; }
#v3-sat.on { background: rgba(31, 122, 92, .25); }

/* v44 — simpler menu: Places · (Map) · Add · History · Trip · Account. Top 20, day trips and votes moved into the
   places panel (quick links below), points into Account. */
#app .nav .nav-best, #app .nav .nav-day, #app .nav .nav-vote, #app .nav .nav-points, #app.no-accounts.sheet-acc .nav a[data-route="rewards"] { display: none !important; }
.disc-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 0 0 8px; }
.disc-row::-webkit-scrollbar { display: none; }
.disc-row a { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 999px;
  background: var(--pine-soft); color: var(--pine); font-weight: 700; font-size: 13px; text-decoration: none; }
.disc-row a:hover { filter: brightness(.95); }
/* places without any photo: a satellite view of the spot */
img.sat { object-fit: cover; }
.sat-wrap { position: relative; display: block; }
.sat-badge { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 8px; }
.filters .f-row3 { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 6px; }
.filters .f-row3 > * { min-width: 0; }

/* beta badge + first-visit consent notice */
.beta-badge { display: inline-block; align-self: flex-start; width: max-content; line-height: 1.3; font-style: normal; font-size: 9.5px; font-weight: 800; letter-spacing: .06em; vertical-align: 3px;
  padding: 1px 5px; border-radius: 6px; background: var(--amber-soft); color: var(--amber-deep); border: 1px solid var(--amber); }
.consent { position: fixed; z-index: 9000; left: 16px; bottom: 16px; max-width: 460px; }
.consent[hidden] { display: none; }
.consent-in { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-2);
  padding: 14px 16px; font-size: 13.5px; line-height: 1.45; }
.consent-in b { font-size: 15px; display: block; margin-bottom: 4px; }
.consent-in p { margin: 6px 0; color: var(--muted); }
.consent-in .consent-legal { color: var(--ink); }
.consent-in a { color: var(--pine); font-weight: 700; }
.consent-in .btn { width: 100%; margin-top: 8px; }
@media (max-width: 899px) {
  .consent { left: 10px; right: 10px; max-width: none; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
  .consent-in { font-size: 13px; padding: 12px 14px; }
}

/* v52 — tab bars & chip rows that don't fit: swipe/scroll sideways, faded edge shows there is more */
.seg button { flex: 1 0 auto; }
.seg, .chips-row, .cc-tabs, .theme-chips, .disc-row { touch-action: pan-x pan-y; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.seg::-webkit-scrollbar, .chips-row::-webkit-scrollbar, .cc-tabs::-webkit-scrollbar, .theme-chips::-webkit-scrollbar, .disc-row::-webkit-scrollbar { display: none; }
.hs-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 34px), transparent); }
.hs-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 34px); mask-image: linear-gradient(90deg, transparent, #000 34px); }
.hs-l.hs-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 34px, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(90deg, transparent, #000 34px, #000 calc(100% - 34px), transparent); }
.hs-drag, .hs-drag * { cursor: grabbing !important; user-select: none; }

/* v57 — visually hidden, readable by screen readers and agents */
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
