/* ═══════════════════════════════════════════════════════════════════════════
   Neretva – design system
   Warm editorial "paper atlas": paper ground, ink type, clay accent.
   Tailwind handles layout; this file owns tokens, components and the map.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Self-hosted, so opening a page makes no request to Google (GDPR) and the
   first paint does not wait on a third-party connection. Latin + Latin Extended
   cover English, German, Croatian, Italian and the rest of the app's names. */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/fraunces-latin.069cb90e11a3.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/fraunces-latin-ext.a04d353989ad.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter-latin.260c81a4759b.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter-latin-ext.1ad231aac0a8.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper:      #F4EFE6;
  --paper-2:    #EFE8DB;
  --paper-3:    #E5DCCB;
  --card:       #FBF8F2;
  --ink:        #17140F;
  --muted:      #6E6555;
  --rule:       #DED6C6;
  --rule-soft:  #E9E1D2;
  --clay:       #B4462A;
  --clay-2:     #8F3520;
  --clay-soft:  #F3DED5;
  --sage:       #62705A;
  --danger:     #A33227;

  --shadow-sm: 0 1px 2px rgba(23, 20, 15, .06);
  --shadow-md: 0 20px 44px -32px rgba(23, 20, 15, .55);
  --shadow-lg: 0 30px 70px -40px rgba(23, 20, 15, .65);

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--clay); color: var(--paper); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #C9BFA9; }

.font-display { font-family: var(--font-display); font-optical-sizing: auto; }

/* ─── Type helpers ───────────────────────────────────────────────────────── */
.eyebrow {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .19em;
  text-transform: uppercase;
}
.u-link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.tnum { font-variant-numeric: tabular-nums; }

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 2.75rem;
  padding: .625rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 9999px;
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }

.btn-ink   { background: var(--ink); color: var(--paper); }
.btn-ink:hover:not(:disabled) { background: var(--clay); }

.btn-clay  { background: var(--clay); color: #FFF8F4; }
.btn-clay:hover:not(:disabled) { background: var(--clay-2); }

.btn-line  { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover:not(:disabled) { background: var(--ink); color: var(--paper); }

.btn-quiet { background: var(--card); color: var(--ink); border-color: var(--rule); }
.btn-quiet:hover:not(:disabled) { border-color: var(--ink); }

.btn-danger { background: transparent; color: var(--danger); border-color: #DFC4BC; }
.btn-danger:hover:not(:disabled) { background: #F6E4DF; border-color: var(--danger); }

.btn-sm { min-height: 2.1rem; padding: .3rem .8rem; font-size: .78rem; }
.btn-xs { min-height: 1.85rem; padding: .2rem .65rem; font-size: .72rem; }

/* ─── Surfaces ───────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
}

.panel {
  background: rgba(251, 248, 242, .93);
  backdrop-filter: blur(14px) saturate(1.1);
  border: 1px solid var(--rule);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
}

/* A search dropdown is absolutely positioned inside its panel, so without
   this the next panel in the column paints over the suggestions. */
.panel:has(#city-results:not(.hidden)),
.panel:has(#landmark-results:not(.hidden)) {
  position: relative;
  z-index: 30;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--rule-soft);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .15rem .55rem;
  border: 1px solid var(--rule);
  border-radius: 9999px;
  background: var(--paper);
  color: var(--muted);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .04em;
  white-space: nowrap;
}
.chip-clay { background: var(--clay-soft); border-color: #E7C4B6; color: var(--clay-2); }

.divider { height: 1px; background: var(--rule); }

/* A small set of mutually exclusive options (map themes, leaderboard sorting). */
.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: .2rem;
  padding: .2rem;
  border: 1px solid var(--rule);
  border-radius: 9999px;
  background: var(--paper);
}
.segmented button {
  padding: .38rem .5rem;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ─── Forms ──────────────────────────────────────────────────────────────── */
.form-label {
  display: block;
  margin-bottom: .35rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--ink);
}
.form-input,
input[type="text"].form-input,
input[type="email"].form-input,
input[type="password"].form-input,
input[type="date"].form-input,
input[type="search"].form-input,
textarea.form-input,
select.form-input {
  display: block;
  width: 100%;
  min-height: 2.6rem;
  padding: .55rem .8rem;
  background: #FFFDF9;
  border: 1px solid var(--rule);
  border-radius: .7rem;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: .875rem;
  line-height: 1.45;
  transition: border-color .15s ease, box-shadow .15s ease;
  outline: none;
}
.form-input::placeholder { color: #A79C88; }
.form-input:focus {
  border-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(180, 70, 42, .13);
}
.form-input:disabled { background: var(--paper-2); color: var(--muted); }
textarea.form-input { min-height: 4.5rem; resize: vertical; }
input[type="date"].form-input { padding-right: .5rem; }
/* Search fields with an icon absolutely positioned inside them. */
input[type="search"].form-input.has-icon {
  padding-left: 2.45rem;
  padding-right: 2.3rem;
}

.form-error { margin-top: .3rem; font-size: .75rem; color: var(--danger); }
.form-hint  { margin-top: .3rem; font-size: .75rem; color: var(--muted); }

/* ─── Navigation ─────────────────────────────────────────────────────────── */
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .8rem;
  border-radius: 9999px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color .16s ease, background .16s ease;
  white-space: nowrap;
}
.nav-link:hover { color: var(--ink); background: rgba(23, 20, 15, .05); }
.nav-link-active { color: var(--paper); background: var(--ink); }
.nav-link-active:hover { color: var(--paper); background: var(--ink); }

.tab-link {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  padding: .45rem 0 .55rem;
  color: var(--muted);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-decoration: none;
}
.tab-link svg { width: 1.25rem; height: 1.25rem; }
.tab-link-active { color: var(--clay); }

/* ─── Toasts ─────────────────────────────────────────────────────────────── */
.toast {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .7rem .9rem;
  border-radius: .8rem;
  border: 1px solid var(--rule);
  background: var(--card);
  box-shadow: var(--shadow-md);
  font-size: .82rem;
  color: var(--ink);
}
.toast-success { border-color: #BFD3BB; background: #F1F6EE; }
.toast-error   { border-color: #E4C3BA; background: #FBEDE9; }
.toast-info    { border-color: var(--rule); background: var(--card); }

/* ─── Empty states ───────────────────────────────────────────────────────── */
.empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.6;
}

/* ─── Auth pages ─────────────────────────────────────────────────────────── */
.auth-shell {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1rem 4rem;
  background:
    radial-gradient(ellipse 70% 55% at 15% 0%, rgba(180, 70, 42, .07), transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(98, 112, 90, .08), transparent 60%),
    var(--paper);
}
.auth-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 1.25rem;
  box-shadow: var(--shadow-lg);
  padding: 2rem;
}
@media (max-width: 480px) {
  .auth-card { padding: 1.4rem; border-radius: 1rem; }
}

/* ─── Map layout ─────────────────────────────────────────────────────────── */
#map-container {
  position: fixed;
  inset: 4rem 0 0 0;
  z-index: 0;
}
@media (max-width: 1023px) {
  #map-container { inset: 4.0625rem 0 3.6rem 0; }
  /* Keep the required credit clear of the sheet handle at the bottom. The
     attribution moves to the top-left on phones, so it stays visible. */
  #map .maplibregl-ctrl-top-left { margin: .55rem 0 0 .55rem; }
}

#map { position: absolute; inset: 0; width: 100%; height: 100%; background: var(--paper); overflow: hidden; }

/* Search results are their own scroll area: reaching an edge must not move the
   sheet or the page behind them. */
#city-results,
#landmark-results {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

/* Desktop: two floating columns. The wrapper is transparent to layout so the
   two children can be positioned independently at the screen edges. */
@media (min-width: 1024px) {
  #map-panels { display: contents; }
  #panel-left,
  #panel-right {
    position: absolute;
    top: .9rem;
    width: 21.5rem;
    max-height: calc(100dvh - 6rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    z-index: 20;
  }
  #panel-left { left: .9rem; }
  #panel-right { right: .9rem; width: 19.5rem; }
  #panel-left > *, #panel-right > * { margin-bottom: .75rem; }
}

/* Mobile/tablet: one bottom sheet that slides up over the map. */
@media (max-width: 1023px) {
  #map-panels {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 3.55rem;
    z-index: 40;
    max-height: 78dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 .75rem calc(1rem + env(safe-area-inset-bottom));
    background: var(--paper);
    border-top: 1px solid var(--rule);
    border-radius: 1.35rem 1.35rem 0 0;
    box-shadow: 0 -20px 50px -30px rgba(23, 20, 15, .7);
    transform: translateY(calc(100% - 3.15rem));
    transition: transform .3s cubic-bezier(.32, .72, 0, 1);
    will-change: transform;
  }
  #map-panels.sheet-open { transform: translateY(0); }
  #panel-left > *, #panel-right > * { margin-bottom: .6rem; }
}

@media (max-width: 1023px) {
  #sheet-handle {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: calc(100% + 1.5rem);
    height: 3.15rem;
    margin: 0 -.75rem;
    padding: 0 .75rem;
    background: var(--paper);
    border: 0;
    border-radius: 1.35rem 1.35rem 0 0;
    cursor: pointer;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    touch-action: none;
    user-select: none;
  }
  #sheet-handle::before {
    content: "";
    position: absolute;
    top: .45rem;
    left: 50%;
    width: 2.4rem;
    height: .22rem;
    margin-left: -1.2rem;
    border-radius: 9999px;
    background: #CFC4AE;
  }
}

/* MapLibre chrome, restyled to the paper world */
.maplibregl-ctrl-group {
  background: var(--card);
  border: 1px solid var(--rule) !important;
  border-radius: .75rem !important;
  box-shadow: var(--shadow-sm) !important;
  overflow: hidden;
}
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--rule-soft); }
.maplibregl-ctrl-group button { width: 2.1rem; height: 2.1rem; }
.maplibregl-ctrl-group button:hover { background: var(--paper-2); }

.maplibregl-popup-content {
  padding: .8rem .9rem;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: .85rem;
  box-shadow: var(--shadow-md);
  font-family: var(--font-sans);
}
.maplibregl-popup-tip { border-top-color: var(--card) !important; border-bottom-color: var(--card) !important; }
.maplibregl-popup-close-button {
  top: .25rem;
  right: .3rem;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  border-radius: 9999px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.4;
}
.maplibregl-popup-close-button:hover { background: var(--paper-2); color: var(--ink); }

.maplibregl-ctrl-attrib {
  background: rgba(244, 239, 230, .88) !important;
  color: var(--muted) !important;
  border-radius: .5rem;
  font-size: .62rem;
}
.maplibregl-ctrl-attrib a { color: var(--muted) !important; }
.maplibregl-ctrl-scale {
  background: rgba(244, 239, 230, .8);
  border-color: var(--muted);
  color: var(--muted);
  font-size: .62rem;
}

/* Popup content primitives (Tailwind is not applied to runtime HTML on the map) */
.popup-title {
  margin: 0 0 .1rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}
.popup-sub {
  margin: 0 0 .55rem;
  font-size: .72rem;
  color: var(--muted);
}
.popup-block {
  margin-top: .4rem;
  padding: .45rem .55rem;
  border: 1px solid var(--rule-soft);
  border-radius: .5rem;
  background: var(--paper);
}
.popup-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  font-size: .72rem;
  color: var(--muted);
}
.popup-row + .popup-row { margin-top: .15rem; }
.popup-note {
  margin: .2rem 0 0;
  font-size: .72rem;
  font-style: italic;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.popup-user {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .74rem;
  font-weight: 600;
  color: var(--ink);
}
.popup-dot { width: .5rem; height: .5rem; border-radius: 9999px; flex: none; }
.popup-action {
  margin-top: .4rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--danger);
  font-size: .7rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.popup-kind {
  display: inline-block;
  margin-bottom: .35rem;
  padding: .05rem .4rem;
  border: 1px solid var(--rule);
  border-radius: 9999px;
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Map markers */
.marker-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--pin-size, 2rem);
  height: var(--pin-size, 2rem);
  border-radius: 9999px;
  border: 2px solid #FFFDF9;
  box-shadow: 0 6px 16px rgba(23, 20, 15, .28);
  color: #FFFDF9;
  font-size: var(--pin-font, .72rem);
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease;
}
.marker-pin:hover { transform: scale(1.14); }
.marker-pin--shared {
  background: var(--ink);
  width: calc(var(--pin-size, 2rem) + .15rem);
  height: calc(var(--pin-size, 2rem) + .15rem);
}
.marker-count {
  position: absolute;
  top: -.3rem;
  right: -.35rem;
  min-width: 1.05rem;
  height: 1.05rem;
  padding: 0 .2rem;
  border-radius: 9999px;
  background: var(--ink);
  color: var(--paper);
  font-size: .58rem;
  font-weight: 700;
  line-height: 1.05rem;
  text-align: center;
}
.marker-sight {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: .45rem;
  border: 2px solid #FFFDF9;
  background: var(--card);
  box-shadow: 0 4px 12px rgba(23, 20, 15, .25);
  cursor: pointer;
  transition: transform .15s ease;
}
.marker-sight:hover { transform: scale(1.15); }
.marker-sight svg { width: .8rem; height: .8rem; }

/* Pin size setting: small/large scale the city and sight markers; hidden
   leaves only the country shading. The add-city preview stays visible. */
#map.pins-small { --pin-size: 1.5rem; --pin-font: .6rem; }
#map.pins-large { --pin-size: 2.6rem; --pin-font: .86rem; }
#map.pins-small .marker-sight { width: 1.2rem; height: 1.2rem; }
#map.pins-small .marker-sight svg { width: .62rem; height: .62rem; }
#map.pins-large .marker-sight { width: 1.9rem; height: 1.9rem; }
#map.pins-large .marker-sight svg { width: 1rem; height: 1rem; }
#map.pins-hidden .marker-pin,
#map.pins-hidden .marker-count,
#map.pins-hidden .marker-sight { display: none; }
#map.pins-hidden .marker-preview .marker-pin { display: flex; }

.marker-preview { animation: preview-pulse 1.6s ease-in-out infinite alternate; }
@keyframes preview-pulse {
  from { transform: scale(1); }
  to   { transform: scale(1.16); }
}

/* ─── Animation ──────────────────────────────────────────────────────────── */
@keyframes slide-in {
  from { transform: translateY(-6px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes fade-up {
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.animate-slide-in { animation: slide-in .3s cubic-bezier(.22, 1, .36, 1) both; }
.animate-fade-up  { animation: fade-up .38s ease both; }

.stagger > * { animation: fade-up .34s ease both; }
.stagger > *:nth-child(1) { animation-delay: .03s; }
.stagger > *:nth-child(2) { animation-delay: .06s; }
.stagger > *:nth-child(3) { animation-delay: .09s; }
.stagger > *:nth-child(4) { animation-delay: .12s; }
.stagger > *:nth-child(5) { animation-delay: .15s; }
.stagger > *:nth-child(6) { animation-delay: .18s; }

/* The generic .form-input width would otherwise beat the flex utility. */
select#radius {
  width: 6.5rem;
  flex: 0 0 6.5rem;
  padding: .35rem .3rem .35rem .5rem;
  font-size: .72rem;
}
select#radius[hidden] { display: none; }
select#pin-size { width: auto; min-width: 6.4rem; flex: 0 0 auto; }
#origin-search.has-icon { padding-right: .7rem; }

@media (max-width: 639px) {
  .find-action { width: 3.3rem; height: 3.3rem; }
  .find-action-small { width: 2.5rem; height: 2.5rem; }
}

/* ─── Find deck ──────────────────────────────────────────────────────────── */
.find-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .28rem .65rem;
  border: 1px solid var(--rule);
  border-radius: 9999px;
  background: var(--paper);
  color: var(--muted);
  font-size: .7rem;
  font-weight: 600;
  line-height: 1.2;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.find-chip:hover { border-color: var(--ink); color: var(--ink); }
.find-chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.find-chip-quiet { border-style: dashed; }
.find-filter-scroll { scrollbar-width: none; }
.find-filter-scroll::-webkit-scrollbar { display: none; }
@media (max-width: 1023px) {
  .find-filter-scroll {
    mask-image: linear-gradient(to right, #000 92%, transparent);
  }
}

.continent-option {
  min-height: 3.6rem;
  padding: .65rem .8rem;
  border: 1px solid var(--rule);
  border-radius: .85rem;
  background: var(--paper);
  color: var(--muted);
  text-align: left;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.continent-option:hover { border-color: var(--ink); color: var(--ink); }
.continent-option[aria-pressed="true"] {
  border-color: var(--clay);
  background: var(--clay-soft);
  color: var(--ink);
}

.find-card {
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
  transition: transform .28s cubic-bezier(.22, 1, .36, 1), opacity .28s ease;
  will-change: transform;
}
.find-card img {
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}
.find-card.dragging { transition: none; cursor: grabbing; }
.find-card.leaving-left {
  transform: translateX(-125%) rotate(-12deg) !important;
  opacity: 0;
}
.find-card.leaving-right {
  transform: translateX(125%) rotate(12deg) !important;
  opacity: 0;
}

.find-photo-fallback {
  background:
    radial-gradient(circle at 28% 18%, rgba(180, 70, 42, .16), transparent 55%),
    radial-gradient(circle at 75% 80%, rgba(98, 112, 90, .22), transparent 55%),
    linear-gradient(145deg, #F6EBDD 0%, #EFE6D6 55%, #E4D7C1 100%);
}

.find-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.6rem;
  height: 3.6rem;
  border: 1px solid var(--rule);
  border-radius: 9999px;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.find-action:hover { transform: translateY(-2px) scale(1.03); border-color: var(--ink); }
.find-action:active { transform: scale(.96); }
.find-action:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.find-action svg { width: 1.35rem; height: 1.35rem; }
.find-action-small { width: 2.8rem; height: 2.8rem; }
.find-action-small svg { width: 1.05rem; height: 1.05rem; }
.find-action-like {
  background: var(--clay);
  border-color: var(--clay);
  color: var(--paper);
}
.find-action-like:hover { background: var(--clay-2); border-color: var(--clay-2); }

#mini-map { pointer-events: none; filter: saturate(.82) sepia(.08); }
.mini-pin {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 9999px;
  background: var(--clay);
  border: 3px solid #FFFDF9;
  box-shadow: 0 2px 8px rgba(23, 20, 15, .35);
}

.match-group {
  padding: .35rem 0 .6rem;
  border-bottom: 1px solid var(--rule-soft);
}
.match-group:last-child { border-bottom: 0; padding-bottom: .1rem; }
.match-dest {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  padding: .3rem .3rem .3rem .2rem;
  border-radius: .55rem;
}
.match-dest:hover { background: var(--paper-2); }
.match-dest-dot {
  flex: none;
  width: .4rem;
  height: .4rem;
  margin-top: .38rem;
  border-radius: 9999px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ─── Misc ───────────────────────────────────────────────────────────────── */
.color-swatch {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 9999px;
  border: 2px solid rgba(23, 20, 15, .12);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.selected { border-color: var(--ink); transform: scale(1.15); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; border-radius: 4px; }
