/* ============================================================
   Altitude — refuges & cabanes
   Modern, clean, alpine-themed UI
   ============================================================ */

:root {
  /* Palette — forest / glacier / sunset */
  --bg:            #f3efe7;
  --bg-elev:       #ffffffcc;
  --paper:         #ffffff;
  --ink:           #0c1f1a;
  --ink-2:         #2a3b35;
  --muted:         #6b7770;
  --line:          #e3dccd;
  --line-2:        #cfc6b3;

  --moss:          #2e6b4a;
  --moss-2:        #1f9d55;
  --pine:          #0c3b2a;
  --glacier:       #3b82f6;
  --sky:           #88c5ff;
  --sun:           #e08a3c;
  --sun-2:         #c25c28;
  --rock:          #7a6f5c;

  --shadow-1: 0 1px 2px rgba(12,31,26,.06), 0 1px 4px rgba(12,31,26,.05);
  --shadow-2: 0 4px 14px rgba(12,31,26,.10), 0 2px 6px rgba(12,31,26,.06);
  --shadow-3: 0 20px 50px rgba(12,31,26,.18), 0 6px 18px rgba(12,31,26,.10);

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;

  --topbar-h: 64px;
  --sidebar-w: 420px;
  --drawer-w: min(560px, 92vw);
}

[data-theme="dark"] {
  --bg:        #0c1614;
  --bg-elev:   #15201ecc;
  --paper:     #182522;
  --ink:       #ecf1ee;
  --ink-2:     #c7d1cc;
  --muted:     #8b9893;
  --line:      #25332e;
  --line-2:    #2f3f39;
  --moss:      #4ec27e;
  --moss-2:    #1f9d55;
  --pine:      #b6e8c8;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4), 0 1px 4px rgba(0,0,0,.3);
  --shadow-2: 0 4px 14px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.3);
  --shadow-3: 0 20px 50px rgba(0,0,0,.55), 0 6px 18px rgba(0,0,0,.4);
}

/* ====== RESET ====== */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: var(--moss); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; margin: 0; }
input, select { font: inherit; color: inherit; }

/* Subtle textured background — paper grain with topographic feel */
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(1200px 800px at 100% -10%, rgba(135,197,255,.18), transparent 60%),
    radial-gradient(900px 600px at -10% 100%, rgba(224,138,60,.12), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  position: relative; z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr minmax(220px, 420px) auto;
  align-items: center;
  gap: 18px;
  height: var(--topbar-h);
  padding: 0 18px;
  background: var(--bg-elev);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex; align-items: baseline; gap: 10px;
  color: var(--ink); text-decoration: none;
}
.brand__mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(160deg, var(--moss-2), var(--pine));
  color: #fff;
  box-shadow: var(--shadow-2);
  transform: translateY(2px);
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -.02em;
}
.brand__tag {
  color: var(--muted);
  font-size: 13px;
  border-left: 1px solid var(--line-2);
  padding-left: 10px;
}

.topnav { display: flex; gap: 4px; }
.topnav__btn {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 14px;
  transition: background .15s, color .15s;
}
.topnav__btn:hover { background: rgba(46,107,74,.08); color: var(--moss); }
.topnav__btn.is-active { background: var(--pine); color: #fff; }

.topbar__search {
  display: flex; align-items: center; gap: 10px;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  color: var(--muted);
  transition: border-color .15s, box-shadow .15s;
}
.topbar__search:focus-within {
  border-color: var(--moss-2);
  box-shadow: 0 0 0 4px rgba(31,157,85,.15);
}
.topbar__search input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: transparent;
  color: var(--ink);
  font-size: 14px;
}
.topbar__search kbd {
  font: 11px var(--font-sans);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 2px 6px;
  background: var(--bg);
}

.topbar__actions { display: flex; gap: 6px; }
.iconbtn {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  color: var(--ink-2);
  transition: background .15s, color .15s, transform .1s;
}
.iconbtn:hover { background: var(--bg); color: var(--moss); }
.iconbtn:active { transform: scale(.95); }

/* ============================================================
   LAYOUT
   ============================================================ */
.layout {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: calc(100vh - var(--topbar-h));
  height: calc(100dvh - var(--topbar-h));
}

/* ====== SIDEBAR ====== */
.sidebar {
  position: relative;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--paper);
  overflow: hidden;
}

.filters {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
}
.filters__head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 12px;
}
.filters__head h2 { font-size: 18px; }
.link {
  font-size: 12px; color: var(--muted); text-decoration: underline;
  text-underline-offset: 3px;
}
.link:hover { color: var(--moss); }

.chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 14px;
}
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px 6px 9px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
}
.chip:hover { border-color: var(--line-2); transform: translateY(-1px); box-shadow: var(--shadow-1); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--c, var(--moss-2));
  box-shadow: 0 0 0 2px rgba(255,255,255,.9) inset;
}
.chip:has(input:checked) {
  background: color-mix(in srgb, var(--ink) 4%, var(--paper));
  border-color: var(--ink-2);
  color: var(--ink);
  font-weight: 500;
}

.filters__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-top: 8px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.field span { font-weight: 500; }
.range { display: flex; align-items: center; gap: 8px; }
.range input[type="range"] { flex: 1; accent-color: var(--moss); }
.range output { font-variant-numeric: tabular-nums; color: var(--ink); font-size: 12px; min-width: 60px; text-align: right; }

.field--check {
  flex-direction: row; align-items: center; gap: 7px;
  color: var(--ink-2); font-size: 13px;
  padding: 6px 0;
}
.field--check input { accent-color: var(--moss); }

/* ====== RESULTS ====== */
.results { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.results__head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px 18px 8px;
}
.results__head h2 { font-size: 16px; font-family: var(--font-sans); font-weight: 600; }
.results__head h2 small { color: var(--muted); font-weight: 400; }
.results__head #result-count { font-family: var(--font-display); font-size: 22px; }

.sort label { font-size: 12px; color: var(--muted); margin-right: 4px; }
.sort select {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
}

.cards {
  list-style: none;
  margin: 0;
  padding: 4px 12px 12px;
  overflow: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}
.card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: var(--r-md);
  background: var(--paper);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .1s, box-shadow .12s;
}
.card + .card { margin-top: 4px; }
.card:hover {
  background: color-mix(in srgb, var(--moss) 5%, var(--paper));
  border-color: var(--line);
  transform: translateY(-1px);
  box-shadow: var(--shadow-1);
}
.card.is-active {
  background: color-mix(in srgb, var(--moss) 9%, var(--paper));
  border-color: var(--moss);
}

.card__icon {
  width: 56px; height: 56px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, var(--c1,#2e6b4a), var(--c2,#0c3b2a));
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.card__icon::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 40% at 50% 100%, rgba(255,255,255,.18), transparent),
    linear-gradient(180deg, transparent 60%, rgba(0,0,0,.18));
}
.card__icon svg { position: relative; z-index: 1; }
.card__alt {
  position: absolute; bottom: 3px; right: 5px;
  font-size: 9px; font-weight: 700; letter-spacing: .04em;
  color: #fff; opacity: .85; z-index: 2;
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
}

.card__body { min-width: 0; }
.card__title {
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 600; font-size: 14.5px;
  color: var(--ink);
}
.card__meta { display: flex; gap: 10px; font-size: 12px; color: var(--muted); margin-top: 2px; }
.card__meta span { display: inline-flex; align-items: center; gap: 4px; }

.card__chev { color: var(--muted); }

.empty {
  padding: 30px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
}

.sidebar__foot {
  padding: 12px 18px;
  font-size: 11.5px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.02));
}
.sidebar__foot p { margin: 2px 0; }

/* ============================================================
   MAP
   ============================================================ */
.mapwrap { position: relative; }
#map { position: absolute; inset: 0; background: #d8e3df; }

/* Leaflet overrides */
.leaflet-container { font-family: var(--font-sans); background: #c8d8d2 !important; }
.leaflet-control-zoom {
  border: 0 !important;
  box-shadow: var(--shadow-2) !important;
  border-radius: 12px !important;
  overflow: hidden;
}
.leaflet-control-zoom a {
  background: var(--paper) !important;
  color: var(--ink) !important;
  border: 0 !important;
  font-weight: 700;
}
.leaflet-control-zoom a:hover { background: var(--bg) !important; color: var(--moss) !important; }
.leaflet-control-attribution {
  background: rgba(255,255,255,.85) !important;
  border-radius: 8px 0 0 0;
  font-size: 10px !important;
  padding: 2px 8px !important;
}

/* Custom marker */
.pin {
  position: relative;
  width: 30px; height: 38px;
  display: grid; place-items: center;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
  cursor: pointer;
  transition: transform .12s;
}
.pin:hover { transform: translateY(-2px) scale(1.04); }
.pin__shape {
  position: absolute; inset: 0;
  background: var(--pc, var(--moss));
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 38'><path d='M15 0c8.3 0 15 6.5 15 14.6C30 23 21.5 30.5 15 38 8.5 30.5 0 23 0 14.6 0 6.5 6.7 0 15 0Z'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 38'><path d='M15 0c8.3 0 15 6.5 15 14.6C30 23 21.5 30.5 15 38 8.5 30.5 0 23 0 14.6 0 6.5 6.7 0 15 0Z'/></svg>") center/contain no-repeat;
}
.pin__inner {
  position: relative; z-index: 1;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  display: grid; place-items: center;
  color: var(--pc, var(--moss));
  margin-top: -4px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.pin__inner svg { width: 14px; height: 14px; }

/* Cluster bubbles */
.marker-cluster {
  background: rgba(46,107,74,.18) !important;
  border: 0 !important;
}
.marker-cluster div {
  background: var(--moss) !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-family: var(--font-sans) !important;
  border-radius: 999px !important;
  box-shadow: 0 4px 10px rgba(12,31,26,.18);
}

/* Map controls */
.map-controls {
  position: absolute;
  top: 14px; right: 14px;
  display: flex; gap: 8px;
  z-index: 600;
}
.tiles {
  display: inline-flex;
  background: var(--paper);
  border-radius: 12px;
  padding: 4px;
  box-shadow: var(--shadow-2);
}
.tile-btn {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  transition: background .12s, color .12s;
}
.tile-btn:hover { background: var(--bg); }
.tile-btn.is-active { background: var(--pine); color: #fff; }
.ghost-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--paper);
  box-shadow: var(--shadow-2);
  color: var(--ink-2);
  font-size: 16px;
}
.ghost-btn:hover { color: var(--moss); }

.status {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  background: var(--paper);
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-2);
  font-size: 13px;
  display: flex; align-items: center; gap: 8px;
  z-index: 600;
}
.status .spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--moss);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   DRAWER (detail panel)
   ============================================================ */
.drawer {
  position: fixed;
  top: var(--topbar-h);
  right: 0;
  bottom: 0;
  width: var(--drawer-w);
  background: var(--paper);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-3);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
  z-index: 80;
  overflow: hidden;
}
.drawer.is-open { transform: translateX(0); }

.drawer__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--line);
}
.drawer__head h2 {
  font-size: 22px;
  margin-top: 6px;
  line-height: 1.15;
}
.drawer__sub { color: var(--muted); font-size: 13px; margin: 4px 0 0; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bc, var(--moss)) 14%, var(--paper));
  color: var(--bc, var(--moss));
  border: 1px solid color-mix(in srgb, var(--bc, var(--moss)) 30%, transparent);
}

.tabs { display: flex; gap: 4px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--paper); }
.tab {
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  position: relative;
}
.tab.is-active { color: var(--ink); }
.tab.is-active::after {
  content: ""; position: absolute; bottom: -1px; left: 8px; right: 8px;
  height: 2px; background: var(--moss); border-radius: 2px;
}

.drawer__body { flex: 1; overflow: auto; padding: 16px 20px 28px; }
.pane { display: none; }
.pane.is-active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.pane h3 {
  font-family: var(--font-sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin: 22px 0 8px;
  font-weight: 600;
}

.hero {
  height: 180px;
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, transparent 50%, rgba(0,0,0,.45)),
    linear-gradient(135deg, var(--moss) 0%, var(--pine) 100%);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), var(--shadow-1);
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(50% 30% at 20% 10%, rgba(255,255,255,.16), transparent),
    radial-gradient(40% 50% at 90% 100%, rgba(0,0,0,.28), transparent);
  pointer-events: none;
}
.hero__alt {
  position: absolute; left: 14px; bottom: 12px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.hero__alt small { font-family: var(--font-sans); font-weight: 400; font-size: 13px; opacity: .85; margin-left: 4px;}

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin-top: 16px;
}
.stat {
  background: var(--bg);
  border-radius: var(--r-md);
  padding: 10px 12px;
  border: 1px solid var(--line);
}
.stat__v { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--ink); }
.stat__k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.prose {
  font-size: 14px; line-height: 1.55; color: var(--ink-2);
  white-space: pre-wrap;
  word-wrap: break-word;
}
.prose p { margin: 0 0 8px; }

.amenities { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.amen {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 13.5px;
}
.amen__icon {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--paper);
  color: var(--moss);
}
.amen--no { opacity: .55; }
.amen--no .amen__icon { color: var(--muted); }
.amen__k { font-size: 12px; color: var(--muted); }
.amen__v { font-weight: 600; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.btn {
  padding: 9px 14px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 13px; font-weight: 500;
  color: var(--ink);
  transition: background .12s, transform .1s;
}
.btn:hover { background: color-mix(in srgb, var(--ink) 4%, var(--bg)); }
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--pine); color: #fff; border-color: var(--pine);
}
.btn--primary:hover { background: #154a36; }

/* Weather */
.weather { display: grid; gap: 14px; }
.weather__now {
  display: grid; grid-template-columns: auto 1fr; gap: 18px;
  padding: 18px;
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, #d6ebff 0%, #fff 100%);
  border: 1px solid var(--line);
}
[data-theme="dark"] .weather__now { background: linear-gradient(160deg, #1e2f3a 0%, #182522 100%); }
.weather__icon { font-size: 56px; line-height: 1; }
.weather__temp { font-family: var(--font-display); font-size: 44px; font-weight: 600; line-height: 1; }
.weather__cond { color: var(--muted); margin-top: 4px; }
.weather__sub { display: flex; gap: 16px; margin-top: 8px; font-size: 12.5px; color: var(--ink-2); }
.weather__sub b { font-weight: 600; }
.weather__days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.wd {
  text-align: center;
  padding: 10px 6px;
  border-radius: var(--r-sm);
  background: var(--bg);
  border: 1px solid var(--line);
}
.wd__d { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.wd__i { font-size: 22px; margin: 4px 0; }
.wd__t { font-size: 12px; font-weight: 600; }
.wd__t small { color: var(--muted); font-weight: 400; }

/* Comments */
.comments { display: grid; gap: 10px; }
.comment {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.comment__head { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.comment__a { font-weight: 600; color: var(--ink-2); }
.comment__body { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); white-space: pre-wrap; }

/* ============================================================
   ABOUT MODAL
   ============================================================ */
.modal {
  position: fixed; inset: 0;
  background: rgba(12,31,26,.5);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal.is-open { display: flex; animation: fadeIn .2s ease; }
.modal__panel {
  position: relative;
  max-width: 520px; width: 100%;
  background: var(--paper);
  border-radius: var(--r-xl);
  padding: 28px 30px;
  box-shadow: var(--shadow-3);
}
.modal__close { position: absolute; top: 14px; right: 14px; }
.modal h2 { font-size: 26px; margin-bottom: 6px; }
.lede { color: var(--ink-2); font-size: 15px; margin: 6px 0 14px; }
.kv {
  list-style: none; padding: 0; margin: 18px 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.kv li {
  background: var(--bg);
  border-radius: var(--r-md);
  padding: 12px;
  border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 2px;
}
.kv span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kv strong { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.muted { color: var(--muted); font-size: 13px; }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  box-shadow: var(--shadow-3);
  font-size: 13.5px;
  z-index: 200;
  opacity: 0;
  transition: opacity .2s, transform .25s;
}
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  :root { --sidebar-w: 360px; }
  .brand__tag { display: none; }
}
@media (max-width: 880px) {
  .topbar { grid-template-columns: auto 1fr auto; gap: 10px; padding: 0 12px; }
  .topnav { display: none; }
  .topbar__search { display: none; }
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: absolute;
    left: 0; right: 0;
    bottom: 0;
    height: 55%;
    top: auto;
    z-index: 30;
    border-right: 0;
    border-top: 1px solid var(--line);
    border-radius: 22px 22px 0 0;
    box-shadow: var(--shadow-3);
    transform: translateY(calc(100% - 84px));
    transition: transform .3s cubic-bezier(.2,.7,.2,1);
  }
  .sidebar::before {
    content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
    width: 40px; height: 4px; border-radius: 4px; background: var(--line-2);
  }
  .sidebar.is-open { transform: translateY(0); }
  .filters { padding-top: 22px; }
}
