/* Finalmente a Casa — stile dell'app (mobile first) */

@font-face { font-family: "Baloo 2"; font-weight: 700; font-display: swap; src: url("../fonts/baloo-2-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Baloo 2"; font-weight: 800; font-display: swap; src: url("../fonts/baloo-2-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url("../fonts/nunito-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 600; font-display: swap; src: url("../fonts/nunito-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("../fonts/nunito-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url("../fonts/nunito-latin-800-normal.woff2") format("woff2"); }

:root {
  --brand: #6cb907;
  --green: #2f6b04;
  --green-dark: #1e4a02;
  --green-deep: #1e3a03;
  --green-soft: #e3f1cf;
  --ink: #1f2a14;
  --ink-2: #3e4934;
  --muted: #5b6650;
  --bg: #f5f9ee;
  --surface: #ffffff;
  --line: #e1ead3;
  --line-2: #d5dcc9;
  --heart: #e5484d;
  --warn-bg: #fff6e0;
  --warn-ink: #6b4700;
  --danger: #a32d2d;
  --radius: 14px;
  --radius-lg: 24px;
  --shadow: 0 6px 20px rgba(47, 107, 4, 0.12);
  --display: "Baloo 2", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --nav-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
img, video { max-width: 100%; display: block; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #3b82f6; outline-offset: 2px; }
.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; }
[hidden] { display: none !important; }

/* ---------- struttura */
.app { min-height: 100%; display: flex; flex-direction: column; }
.topbar {
  background: var(--brand);
  padding: 10px 16px;
  padding-top: max(10px, env(safe-area-inset-top));
  display: flex; align-items: center; gap: 12px;
  position: sticky; top: 0; z-index: 20;
}
.topbar .logo { display: flex; }
.topbar .logo img { height: 48px; width: auto; border-radius: 8px; }
.topbar .spacer { flex: 1; }
.topnav { display: none; }
.view { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 520px; margin: 0 auto; padding-bottom: calc(var(--nav-h) + var(--safe-b)); }
.view.wide { max-width: 1360px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 6px 4px calc(8px + var(--safe-b));
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11px; font-weight: 700; color: var(--muted); text-decoration: none;
  padding: 6px 0; min-height: 48px; position: relative;
}
.tabbar a[aria-current="page"] { color: var(--green); font-weight: 800; }
.badge {
  position: absolute; top: 2px; left: 50%; margin-left: 6px;
  background: var(--heart); color: #fff; font-size: 11px; font-weight: 800;
  border-radius: 999px; padding: 0 6px; line-height: 17px; min-width: 17px; text-align: center;
}

.page-head {
  display: flex; align-items: center; gap: 6px; padding: 8px 16px; min-height: 60px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.page-head h1 { margin: 0; flex: 1; font-family: var(--display); font-weight: 800; font-size: 24px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent;
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: rgba(0, 0, 0, 0.05); }
.content { padding: 16px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- elementi comuni */
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.plain legend { padding: 0; }
.inp { font-size: 16px; color: var(--ink); padding: 11px 12px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--surface); min-height: 46px; width: 100%; }
.inp:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(108, 185, 7, 0.25); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 13px 20px; min-height: 48px;
  font-weight: 800; font-size: 16px; cursor: pointer; text-decoration: none;
  background: var(--green); color: #fff;
}
.btn:hover { background: var(--green-dark); color: #fff; }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn.block { width: 100%; }
.btn.outline { background: var(--surface); color: var(--green); border: 1.5px solid var(--green); }
.btn.outline:hover { background: var(--green-soft); }
.btn.ghost { background: transparent; color: var(--green); padding: 10px 8px; min-height: 44px; }
.btn.light { background: #fff; color: var(--green); }
.btn.small { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.link-btn { background: none; border: 0; color: var(--green); font-weight: 800; cursor: pointer; padding: 10px 4px; text-decoration: underline; }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-block; font-size: 14px; font-weight: 700; padding: 9px 14px; border-radius: 999px;
  background: var(--surface); color: var(--ink-2); border: 1.5px solid var(--line-2);
}
.chip input:checked + span { background: var(--green); color: #fff; border-color: var(--green); }
.chip input:focus-visible + span { outline: 3px solid #3b82f6; outline-offset: 2px; }

.pill { display: inline-block; font-size: 12px; font-weight: 700; background: #f1f5ea; color: var(--ink-2); padding: 4px 9px; border-radius: 999px; }
.pill.green { background: var(--green-soft); color: var(--green); font-weight: 800; }
.pill.amber { background: #fbebc8; color: #8a5a00; font-weight: 800; }
.pill.gray { background: #eceee8; color: var(--muted); font-weight: 800; }

.section-title { margin: 0 0 8px; font-size: 13px; font-weight: 800; letter-spacing: 0.04em; color: var(--muted); text-transform: uppercase; }

.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field input, .field select, .field textarea {
  font-size: 16px; color: var(--ink); padding: 11px 12px; border: 1.5px solid var(--line-2);
  border-radius: 12px; background: var(--surface); min-height: 46px; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(108, 185, 7, 0.25); }
.field .hint { font-weight: 600; color: var(--muted); font-size: 12px; }
.field .error { color: var(--danger); font-size: 13px; font-weight: 700; }
.field.invalid input, .field.invalid select { border-color: var(--danger); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--green); }

.toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; min-height: 48px; border-bottom: 1px solid #eef2e7; font-size: 15px; font-weight: 600; cursor: pointer;
}
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 14px; background: #c9d1bd; transition: background 0.15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid #3b82f6; outline-offset: 2px; }

.notice { display: flex; gap: 8px; align-items: flex-start; background: var(--warn-bg); color: var(--warn-ink); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 600; }
.notice.ok { background: var(--green-soft); color: var(--green-deep); }
.notice.err { background: #fcebeb; color: #791f1f; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.empty { text-align: center; color: var(--muted); padding: 32px 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty h2 { margin: 0; font-family: var(--display); font-size: 26px; color: var(--ink); }
.empty p { margin: 0; }

.toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); z-index: 50;
  max-width: 488px; margin: 0 auto;
  background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 14px;
  font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  animation: toast-in 0.2s ease-out;
}
.toast a { color: #b9e58a; font-weight: 800; text-decoration: none; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

.spinner { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--green-soft); border-top-color: var(--green); animation: spin 0.8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- scorrimento */
.swipe-layout { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.swipe-side { display: none; }
.swipe-main { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.active-filters { display: flex; gap: 6px; padding: 10px 16px 0; flex-wrap: wrap; }
.active-filters .pill { font-size: 13px; padding: 5px 10px; }
.deck {
  position: relative; flex: 1 0 auto; margin: 12px 16px 0;
  min-height: 420px; height: calc(100dvh - 300px); max-height: 680px;
}
.dog-card {
  position: absolute; inset: 0; background: var(--surface); border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column; box-shadow: var(--shadow); border: 1px solid var(--line);
  touch-action: pan-y; user-select: none; will-change: transform;
}
.dog-card.behind { transform: scale(0.96) translateY(10px); filter: brightness(0.98); }
.dog-card.animating { transition: transform 0.28s ease-out, opacity 0.28s; }
.dog-photo { position: relative; flex: 1; min-height: 0; background: var(--green-soft); }
.dog-photo img, .dog-photo video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.photo-bars { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; }
.photo-bars span { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.5); }
.photo-bars span.on { background: #fff; }
.photo-tap { position: absolute; top: 0; bottom: 0; width: 35%; border: 0; background: transparent; cursor: pointer; }
.photo-tap.prev { left: 0; }
.photo-tap.next { right: 0; }
.video-chip { position: absolute; top: 22px; right: 10px; background: rgba(31, 42, 20, 0.78); color: #fff; font-size: 12px; font-weight: 800; padding: 6px 10px; border-radius: 999px; border: 0; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.stamp {
  position: absolute; top: 40px; padding: 6px 14px; border: 4px solid; border-radius: 10px;
  font-family: var(--display); font-weight: 800; font-size: 30px; opacity: 0; letter-spacing: 0.03em; background: rgba(255, 255, 255, 0.85);
}
.stamp.like { left: 18px; color: var(--heart); border-color: var(--heart); transform: rotate(-12deg); }
.stamp.nope { right: 18px; color: var(--muted); border-color: var(--muted); transform: rotate(12deg); }
.dog-info { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 6px; }
.dog-info .name-row { display: flex; align-items: baseline; gap: 8px; }
.dog-info h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 32px; line-height: 1; }
.dog-info .age { font-size: 18px; font-weight: 600; color: var(--muted); }
.dog-info .meta { margin: 0; font-size: 15px; color: var(--ink-2); }
.dog-info .place { margin: 0; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.dog-info .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.actions { display: flex; justify-content: center; align-items: center; gap: 26px; padding: 14px 0 12px; }
.act { border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; transition: transform 0.1s; }
.act:active { transform: scale(0.92); }
.act.nope { width: 64px; height: 64px; background: #fff; border: 2px solid var(--line-2); color: var(--muted); }
.act.info { width: 50px; height: 50px; background: #fff; border: 2px solid var(--line-2); color: var(--green); font-weight: 800; font-size: 20px; }
.act.like { width: 74px; height: 74px; background: var(--heart); border: 0; color: #fff; box-shadow: 0 6px 16px rgba(229, 72, 77, 0.35); }
.act.like:hover { color: #fff; }
.kbd-hint { display: none; text-align: center; font-size: 13px; color: var(--muted); margin: 0 0 8px; }

/* ---------- scheda cane */
.gallery { position: relative; aspect-ratio: 4 / 4.2; max-height: 52vh; width: 100%; background: var(--green-soft); }
.gallery img, .gallery video { width: 100%; height: 100%; object-fit: cover; }
.gallery .float { position: absolute; top: 14px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, 0.92); }
.gallery .float.left { left: 14px; }
.gallery .float.right { right: 14px; color: var(--muted); }
.thumbs { display: flex; gap: 6px; padding: 10px 16px 0; overflow-x: auto; }
.thumbs button { width: 56px; height: 56px; flex: none; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: var(--green-soft); cursor: pointer; }
.thumbs button[aria-pressed="true"] { border-color: var(--green); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs .vid { background: var(--ink); color: #fff; font-size: 11px; font-weight: 800; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 4px; text-align: center; }
.fact small { display: block; font-size: 11px; font-weight: 700; color: var(--muted); }
.fact strong { font-size: 15px; font-weight: 800; }
.dog-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.dog-title h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1; }
.lead { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); white-space: pre-line; }
.person { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.bottom-bar {
  position: sticky; bottom: calc(var(--nav-h) + var(--safe-b)); display: flex; gap: 10px; padding: 12px 16px;
  background: var(--surface); border-top: 1px solid var(--line); z-index: 5;
}
.fav-btn { width: 52px; height: 52px; flex: none; border-radius: 50%; border: 2px solid var(--heart); background: #fff0f0; color: var(--heart); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.fav-btn[aria-pressed="true"] { background: var(--heart); color: #fff; }

/* ---------- liste */
.dog-row { display: flex; gap: 12px; align-items: center; padding: 10px; }
.dog-row .thumb { width: 84px; height: 84px; flex: none; border-radius: 14px; overflow: hidden; background: var(--green-soft); }
.dog-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.dog-row .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dog-row h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.1; }
.dog-row .sub { font-size: 13px; color: var(--muted); }
.dog-row .pill { align-self: flex-start; }
.list { display: flex; flex-direction: column; gap: 12px; }
.shelter-row { display: flex; align-items: center; gap: 12px; padding: 12px; }
.shelter-row .ico { width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--green-soft); color: var(--green); display: flex; align-items: center; justify-content: center; }
.shelter-row h2 { margin: 0; font-size: 16px; font-weight: 800; }
.shelter-row .sub { font-size: 13px; color: var(--muted); }
.shelter-row .body { flex: 1; min-width: 0; }

/* ---------- accesso */
.auth { padding: 20px 16px; display: flex; flex-direction: column; gap: 14px; }
.auth h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1.1; }
.auth p.lead { color: var(--muted); }
.role-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.role-pick label { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 2px solid var(--line-2); border-radius: 16px; background: var(--surface); cursor: pointer; font-weight: 800; }
.role-pick label small { font-weight: 600; color: var(--muted); font-size: 13px; }
.role-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.role-pick label:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.role-pick label:has(input:focus-visible) { outline: 3px solid #3b82f6; outline-offset: 2px; }
.ts-box { min-height: 0; }
.center-row { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; font-size: 14px; color: var(--muted); align-items: center; }

/* ---------- desktop */
@media (min-width: 1024px) {
  :root { --nav-h: 0px; }
  .tabbar { display: none; }
  .topbar { padding: 12px 32px; gap: 24px; }
  .topbar .logo img { height: 60px; }
  .topnav { display: flex; gap: 6px; }
  .topnav a { color: var(--green-deep); background: rgba(255, 255, 255, 0.35); text-decoration: none; font-weight: 800; font-size: 16px; padding: 10px 16px; border-radius: 999px; position: relative; }
  .topnav a[aria-current="page"] { background: #fff; color: var(--green); }
  .topnav .badge { top: -4px; left: auto; right: -4px; margin: 0; }
  .view { padding-bottom: 32px; }
  .view.wide { padding: 28px 32px; }
  .swipe-layout { flex-direction: row; gap: 24px; align-items: flex-start; }
  .swipe-side { display: block; flex: 0 0 300px; position: sticky; top: 108px; }
  .swipe-side .card { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
  .swipe-side .card > h2 { margin: 0; font-family: var(--display); font-size: 24px; }
  .swipe-side form { display: flex; flex-direction: column; gap: 16px; }
  .topbar .filters-link { display: none; }
  .swipe-main { max-width: 720px; margin: 0 auto; width: 100%; }
  .swipe-main .active-filters, .swipe-main .filters-link { display: none; }
  .deck { height: calc(100vh - 260px); max-height: 720px; margin: 0; }
  .dog-card { flex-direction: row; }
  .dog-card .dog-photo { flex: 1 1 55%; }
  .dog-card .dog-info { flex: 1 1 45%; padding: 28px; justify-content: flex-end; }
  .dog-info h2 { font-size: 44px; }
  .kbd-hint { display: block; }
  .bottom-bar { bottom: 0; }
  .toast { bottom: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .dog-card.animating, .toast, .spinner { transition: none; animation: none; }
}

.plain-link { color: inherit; text-decoration: none; }
.h3 { margin: 0; font-size: 16px; font-weight: 800; }
.form-error { color: var(--danger); font-size: 13px; font-weight: 700; }
.form-error:empty { display: none; }
.legal { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; line-height: 1.6; }
.legal h1 { font-family: var(--display); }

/* ---------- sito offline */
body.is-offline .tabbar, body.is-offline .topnav, body.is-offline #topbar-actions { display: none; }
body.is-offline .view { padding-bottom: 32px; }
.offline-page { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; padding: 32px 20px; }
.offline-page img { width: 240px; height: auto; border-radius: 24px; }
.offline-page h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 36px; }
.offline-page .lead { max-width: 420px; }
.small-link { font-size: 13px; color: var(--muted); }
.admin-banner { background: #fbebc8; color: #6b4700; text-align: center; font-size: 14px; font-weight: 700; padding: 8px 12px; }
.admin-banner a { color: #6b4700; }
.admin-box { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
body.is-offline .topbar .logo { visibility: hidden; }

/* ---------- ruoli e diritti */
.view.wide-md { max-width: 860px; }
.roles-section { display: flex; flex-direction: column; gap: 8px; }
.roles-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.roles-head h2 { margin: 0; font-family: var(--display); font-size: 22px; }
.lead.small { font-size: 14px; color: var(--muted); }
.role-card { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.role-card .sub, .role-editor .sub { font-size: 13px; color: var(--muted); margin: 0; }
.role-top { display: flex; gap: 12px; align-items: flex-start; }
.role-top .body { flex: 1; min-width: 0; }
.level { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--green-soft); color: var(--green); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.role-editor { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.perm-group { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.assign-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.editor-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.danger { color: var(--danger); }

/* ---------- gestione canili e cani */
.content.tight { padding-bottom: 0; }
.shelter-logo { width: 44px; height: 44px; border-radius: 12px; object-fit: contain; background: #fff; border: 1px solid var(--line); flex: none; }
.shelter-logo.big { width: 72px; height: 72px; border-radius: 16px; }
.ico.big { width: 72px; height: 72px; border-radius: 16px; background: var(--green-soft); color: var(--green); display: flex; align-items: center; justify-content: center; flex: none; }
.shelter-head { display: flex; gap: 14px; align-items: center; }
.shelter-head h1 { margin: 0; font-family: var(--display); font-size: 26px; line-height: 1.1; }
.shelter-head .sub, .form-card .sub, .member-row .sub, .tile-body .sub, .create-body .sub { font-size: 13px; color: var(--muted); margin: 0; }
.tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; text-decoration: none; font-weight: 800; color: var(--muted); white-space: nowrap; min-height: 44px; box-sizing: border-box; }
.tabs a[aria-current="page"] { background: var(--green); color: #fff; }
.form-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.form-stack { display: flex; flex-direction: column; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grid-addr { display: grid; grid-template-columns: 3fr 1fr; gap: 10px; }
.grid-addr2 { display: grid; grid-template-columns: 1fr 2fr 1.4fr; gap: 10px; }
.map-box { height: 280px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--green-soft); }
.logo-row { display: flex; gap: 14px; align-items: center; }
.sticky-actions { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b)); background: var(--bg); padding: 10px 0; z-index: 5; }
.small-sel { width: auto; min-width: 120px; min-height: 40px; padding: 6px 10px; font-size: 14px; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; flex-wrap: wrap; }
.member-row .body { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 2px; }
.create-box { padding: 0; }
.create-box summary { cursor: pointer; padding: 14px 16px; font-weight: 800; color: var(--green); list-style: none; display: flex; align-items: center; gap: 6px; }
.create-box summary::-webkit-details-marker { display: none; }
.create-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.dog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.dog-tile { overflow: hidden; display: flex; flex-direction: column; }
.tile-photo { aspect-ratio: 3 / 4; background: var(--green-soft); color: var(--green); display: flex; align-items: center; justify-content: center; }
.tile-photo img { width: 100%; height: 100%; object-fit: cover; }
.tile-body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 4px; }
.tile-body .pill { align-self: flex-start; }
.sub.warn { color: #8a5a00; font-weight: 700; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.photo-item { position: relative; margin: 0; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--green-soft); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.main-badge { position: absolute; left: 6px; bottom: 6px; background: var(--green); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.mini-btn { position: absolute; left: 6px; bottom: 6px; border: 0; background: rgba(255, 255, 255, 0.92); color: var(--ink); font: inherit; font-size: 11px; font-weight: 800; padding: 5px 8px; border-radius: 999px; cursor: pointer; }
.del-btn { position: absolute; top: 4px; right: 4px; background: rgba(255, 255, 255, 0.92); width: 38px; height: 38px; color: var(--danger); }
.photo-add, .video-add { border: 2px dashed #b9c4a9; border-radius: 12px; background: #fff; color: var(--green); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-weight: 800; font-size: 13px; cursor: pointer; text-align: center; padding: 8px; }
.photo-add { aspect-ratio: 3 / 4; }
.video-add { flex-direction: row; min-height: 56px; }
.video-item video { width: 100%; max-height: 360px; border-radius: 12px; background: #000; }
.video-meta { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); font-weight: 700; margin-top: 6px; }
.upload-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.upload-row progress { flex: 1; accent-color: var(--green); }
@media (max-width: 480px) { .grid-addr2 { grid-template-columns: 1fr 1fr; } .grid-addr2 > :last-child { grid-column: span 2; } }

/* ---------- mappe */
.h4 { margin: 4px 0 0; font-size: 15px; font-weight: 800; color: var(--green-dark, #2b5e05); }
.map-note { min-height: 1.2em; }
.map-public { height: 320px; }
@media (min-width: 900px) { .map-public { height: 420px; } }
.map-popup { display: flex; flex-direction: column; gap: 6px; min-width: 180px; font-family: inherit; }
.map-popup strong { font-size: 15px; }
.map-popup .sub { font-size: 13px; color: var(--muted); }
.ico-btn { border: 0; cursor: pointer; padding: 0; }
.ico-btn:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.map-picker { height: 360px; }
@media (min-width: 900px) { .map-picker { height: 440px; } }
.map-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.map-actions .btn { flex: 1 1 200px; }
.map-foot { display: flex; flex-direction: column; gap: 2px; }
.map-coords { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.map-switch { display: flex; background: #fff; overflow: hidden; }
.map-switch-btn { border: 0; background: #fff; padding: 7px 12px; font: 800 13px/1 var(--body, inherit); color: var(--ink, #1d2a12); cursor: pointer; min-height: 34px; }
.map-switch-btn + .map-switch-btn { border-left: 1px solid var(--line); }
.map-switch-btn[aria-pressed="true"] { background: var(--green); color: #fff; }
.leaflet-marker-draggable { cursor: grab; }
.suggest-wrap { position: relative; }
.suggest-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 1200; margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 28px rgba(0,0,0,.14); max-height: 320px; overflow-y: auto; }
.suggest-list[hidden] { display: none; }
.suggest-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 10px; cursor: pointer; color: var(--green); }
.suggest-item[aria-selected="true"], .suggest-item:hover { background: var(--green-soft); }
.suggest-text { display: flex; flex-direction: column; gap: 2px; color: var(--ink, #1d2a12); min-width: 0; }
.suggest-text strong { font-weight: 800; font-size: 15px; }
.suggest-text small { font-size: 13px; color: var(--muted); }
.suggest-empty { padding: 10px; font-size: 14px; color: var(--muted); }
.logo-pick { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.drop-zone { transition: box-shadow .15s, background-color .15s; }
.drop-zone.drag-over { box-shadow: 0 0 0 3px var(--green) inset; background-color: var(--green-soft); }
.drop-area { border: 2px dashed var(--line); border-radius: 14px; padding: 12px; }
.drop-area.drag-over { border-color: var(--green); }
.drop-hint { font-size: 13px; color: var(--muted); }
@media (hover: none) { .drop-hint { display: none; } }
.enhance-row { flex-wrap: wrap; row-gap: 2px; }
.enhance-hint { flex-basis: 100%; order: 3; font-size: 13px; color: var(--muted); font-weight: 400; }
.wm-thumb { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: #fff; flex: none; }
.enhance-row > span:first-of-type { flex: 1; }
.wm-settings { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 4px 0 10px; border-bottom: 1px solid #eef2e7; }
.wm-settings[hidden] { display: none; }
.wm-preview { width: 160px; height: 120px; border-radius: 12px; border: 1px solid var(--line); flex: none; }
.wm-controls { flex: 1 1 200px; display: flex; flex-direction: column; gap: 6px; }
.wm-label { display: flex; justify-content: space-between; font-weight: 700; font-size: 14px; }
.wm-alpha-val { font-variant-numeric: tabular-nums; color: var(--green); }
.wm-range { width: 100%; accent-color: var(--green); min-height: 32px; }
.wm-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.wm-info { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--ink-2); padding: 8px 0 10px; border-bottom: 1px solid #eef2e7; }
.admin-only { border: 2px dashed #e0c98a; }
.admin-box .wm-settings { border-bottom: 0; border-top: 1px solid #eef2e7; padding-top: 12px; margin-top: 6px; }
/* La mappa resta "chiusa" nel suo riquadro: i livelli interni di Leaflet (400+) non coprono più il resto della pagina */
.map-box { position: relative; z-index: 0; isolation: isolate; }
.sticky-actions { z-index: 20; }

/* ---------- finestra a comparsa (lightbox) */
body.no-scroll { overflow: hidden; }
.lightbox { padding: 0; border: 0; background: transparent; max-width: 560px; width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
.lightbox::backdrop { background: rgba(20, 30, 10, .55); backdrop-filter: blur(2px); }
.lightbox-card { background: #fff; border-radius: 20px; display: flex; flex-direction: column; max-height: calc(100dvh - 24px); overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.lightbox-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; }
.lightbox-head h2 { margin: 0; font-family: var(--display); font-size: 22px; font-weight: 800; }
.lightbox-body { padding: 0 16px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.lightbox-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.lightbox-foot .btn { flex: 1; }
@media (max-width: 600px) {
  /* sul telefono la finestra sale dal basso e occupa quasi tutto lo schermo */
  .lightbox { width: 100%; max-width: none; margin: auto 0 0; max-height: 94dvh; }
  .lightbox-card { border-radius: 20px 20px 0 0; max-height: 94dvh; }
}

/* ---------- orari di visita */
.hours-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.hours-days { display: flex; flex-direction: column; gap: 8px; }
.hours-day { border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; background: #fafbf7; }
.hours-day.open { background: #fff; border-color: #c9dcae; }
.hours-day-head { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.hours-day-head strong { flex: 1; font-size: 16px; }
.hours-state { font-size: 13px; color: var(--muted); }
.hours-day.open .hours-state { color: var(--green); font-weight: 700; }
.hours-slots { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 6px; align-items: flex-start; }
.hours-slot { display: flex; align-items: center; gap: 8px; width: 100%; }
.time-inp { flex: 1; min-width: 0; max-width: 150px; min-height: 46px; font-size: 17px; text-align: center; }
.hours-dash { color: var(--muted); font-weight: 700; }
.hours-open { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; color: var(--green); font: inherit; min-height: 56px; }
.hours-open:hover { border-color: var(--green); }
.hours-open-text { flex: 1; display: flex; flex-direction: column; gap: 2px; color: var(--ink); }
.hours-summary { font-weight: 700; }
.hours-edit { font-weight: 800; }
.field-label { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.visit-line { display: flex; align-items: center; gap: 4px; }

/* ---------- scheda cane: foto intera su sfondo sfocato (si vede tutta, logo compreso) */
.gallery { overflow: hidden; background: #1f2a14; }
.gallery .gallery-bg { position: absolute; inset: -20px; width: calc(100% + 40px); height: calc(100% + 40px); object-fit: cover; filter: blur(18px) brightness(.75); }
.gallery img.full { position: relative; object-fit: contain; }
.thumbs img { object-fit: cover; }
/* bordi foto per cambiare immagine: più stretti, il centro apre la scheda */
.photo-tap { width: 24%; }
.dog-card { cursor: pointer; }

/* ---------- editor: selettori Sì / A volte / No */
.flag-row { flex-wrap: wrap; row-gap: 6px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; flex: none; }
.seg-btn { border: 0; background: transparent; padding: 8px 14px; min-height: 40px; font: 700 14px/1 var(--body); color: var(--ink-2); cursor: pointer; }
.seg-btn + .seg-btn { border-left: 1px solid var(--line); }
.seg-btn[aria-checked="true"] { background: var(--green); color: #fff; }
.seg-btn:focus-visible { outline: 3px solid #3b82f6; outline-offset: -3px; }
.check-row { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; cursor: pointer; }
.check-row input { width: 20px; height: 20px; accent-color: var(--green); }
.age-now { font-size: 14px; }

/* ---------- editor: inquadratura del muso */
.focus-btn { left: 6px; right: auto; top: 6px; bottom: auto; display: inline-flex; align-items: center; gap: 3px; }
.lightbox.wide { max-width: 900px; }
.focus-layout { display: grid; grid-template-columns: 1fr 180px; gap: 14px; align-items: start; }
@media (max-width: 600px) { .focus-layout { grid-template-columns: 1fr; } .focus-previews { flex-direction: row; flex-wrap: wrap; } }
.focus-pad { position: relative; display: inline-block; justify-self: center; touch-action: none; cursor: crosshair; border-radius: 12px; overflow: hidden; background: #111; line-height: 0; user-select: none; }
.focus-pad img { display: block; max-width: 100%; max-height: 60dvh; width: auto; height: auto; }
.focus-marker { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--green), 0 2px 8px rgba(0,0,0,.5); pointer-events: none; }
.focus-previews { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.focus-prev { object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--green-soft); }
.focus-prev.card { width: 120px; height: 160px; }
.focus-prev.square { width: 120px; height: 120px; }

/* ---------- scartati */
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.fav-small { background: var(--heart); border-color: transparent; color: #fff; }
@media (max-width: 560px) {
  .dog-row:has(.row-actions) { flex-wrap: wrap; }
  .dog-row .row-actions { flex-basis: 100%; justify-content: stretch; }
  .dog-row .row-actions .btn { flex: 1; }
}

/* ---------- caratteristiche come icone */
.trait-icons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.trait { position: relative; width: 38px; height: 38px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.trait.sometimes { background: #fdf0d5; color: #8a5a00; }
.trait small { position: absolute; right: -2px; bottom: -2px; width: 16px; height: 16px; border-radius: 50%; background: #8a5a00; color: #fff; font-size: 12px; font-weight: 800; line-height: 15px; text-align: center; }
.trait-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.trait-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.trait-row .trait-name { flex: 1; font-weight: 700; font-size: 14px; }
.trait-row .trait-state { font-weight: 800; font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--green-soft); color: var(--green); }
.trait-row.sometimes .trait { background: #fdf0d5; color: #8a5a00; }
.trait-row.sometimes .trait-state { background: #fdf0d5; color: #8a5a00; }
.trait-row.no .trait { background: #f1f1ee; color: var(--muted); }
.trait-row.no .trait-state { background: #f6e3e3; color: #a33; }

/* ---------- scheda cane: due colonne su schermo largo */
@media (min-width: 900px) {
  .view.dog-page { padding-top: 24px; }
  .dog-detail { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; align-items: start; }
  .dog-media { position: sticky; top: 104px; }
  .dog-media .gallery { aspect-ratio: 4 / 3.4; max-height: calc(100vh - 220px); border-radius: 20px; }
  .dog-media .thumbs { padding: 12px 0 0; }
  .dog-main .content { padding: 0; }
  .dog-main .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dog-main .bottom-bar { margin-top: 20px; border: 1px solid var(--line); border-radius: 16px; position: sticky; bottom: 16px; }
}
.chip-number { padding: 4px 0 12px; border-bottom: 1px solid #eef2e7; }
.chip-number[hidden] { display: none; }

/* ---------- pagina pubblica del canile */
.shelter-hero { display: flex; gap: 16px; align-items: center; padding: 16px; flex-wrap: wrap; }
.shelter-hero h1 { margin: 0; font-family: var(--display); font-size: 28px; line-height: 1.1; }
.shelter-hero .body { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 6px; }
.shelter-hero .sub { color: var(--muted); font-size: 14px; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.shelter-info { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.info-line { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.info-line svg { flex: none; color: var(--green); margin-top: 1px; }
.shelter-cols { display: grid; gap: 16px; }
.shelter-map { height: 240px; }
@media (min-width: 900px) { .shelter-cols { grid-template-columns: 1fr 1fr; } .shelter-map { height: 100%; min-height: 260px; } }
.pub-dog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
@media (min-width: 900px) { .pub-dog-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } }
.pub-dog { overflow: hidden; display: flex; flex-direction: column; transition: transform .15s; }
.pub-dog:hover { transform: translateY(-2px); }
.pub-photo { position: relative; aspect-ratio: 4 / 4.4; background: var(--green-soft); color: var(--green); display: flex; align-items: center; justify-content: center; }
.pub-photo img { width: 100%; height: 100%; object-fit: cover; }
.pub-photo .corner { position: absolute; left: 8px; top: 8px; }
.pub-photo .mine { position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--muted); display: flex; align-items: center; justify-content: center; }
.pub-photo .mine.fav { color: var(--heart); }
.pub-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.pub-body strong { font-family: var(--display); font-size: 20px; }
.pub-body .sub { font-size: 13px; color: var(--muted); }
.pub-body .trait { width: 30px; height: 30px; }
.pub-body .trait svg { width: 16px; height: 16px; }

/* ---------- filtri: compatti, icone + etichette */
.filters-x { display: flex; flex-direction: column; gap: 14px; }
.filters-x.content { padding: 16px; }
.fx-sec { display: flex; flex-direction: column; gap: 7px; }
.fx-label { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fx-label svg { color: var(--green); }
.fx-select, .fx-input { width: 100%; height: 40px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: 600 14px/1 var(--body); color: var(--ink); box-sizing: border-box; }
.fx-select:disabled { color: #a3ab98; background: #fafbf7; }
.fx-select:focus, .fx-input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(47,107,4,.12); }
.fx-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.fx-pills { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.fx-pill { position: relative; }
.fx-pill + .fx-pill { border-left: 1px solid var(--line); }
.fx-pill input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.fx-pill span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 44px; padding: 4px 2px; color: var(--ink-2); text-align: center; transition: background .12s, color .12s; }
.fx-pill b { font-size: 12.5px; font-weight: 700; line-height: 1.15; }
.fx-pill small { font-size: 10.5px; color: var(--muted); }
.fx-pill svg { color: var(--green); }
.fx-pill input:checked + span { background: var(--green); color: #fff; }
.fx-pill input:checked + span small, .fx-pill input:checked + span svg { color: rgba(255,255,255,.85); }
.fx-pill input:focus-visible + span { box-shadow: inset 0 0 0 2px #3b82f6; }
.fx-pill:hover span { background: #f5f9ee; }
.fx-pill:hover input:checked + span { background: var(--green); }
.fx-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.fx-tile { position: relative; }
.fx-tile input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.fx-tile span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 60px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--green); transition: all .12s; }
.fx-tile b { font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.fx-tile input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.fx-tile input:checked + span b { color: #fff; }
.fx-tile input:focus-visible + span { box-shadow: 0 0 0 3px #3b82f6; }
.fx-tile:hover span { border-color: #c9dcae; }
.fx-head { display: flex; align-items: center; justify-content: space-between; }
.fx-head h2 { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 20px; }
.fx-head h2 svg { color: var(--green); }
.fx-reset { border: 0; background: none; color: var(--green); font: 800 13px/1 var(--body); cursor: pointer; padding: 6px 4px; }
.fx-reset:hover { text-decoration: underline; }
@media (min-width: 900px) {
  .swipe-side { flex: 0 0 320px; }
  .swipe-side .fx-card { padding: 18px 18px 20px; gap: 14px; max-height: calc(100vh - 140px); overflow-y: auto; scrollbar-width: thin; }
  .swipe-side .filters-x { gap: 13px; }
}
.decided-line { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 14px; margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.decided-line[hidden] { display: none; }
.decided-line a { display: inline-flex; align-items: center; gap: 4px; color: var(--green); font-weight: 700; text-decoration: none; }
.decided-line a:hover { text-decoration: underline; }
.decided-line a svg { color: var(--heart); }
.decided-line a + a svg { color: var(--muted); }

/* ---------- pagine più larghe su schermo grande */
.view.wide-lg { max-width: 1180px; }
@media (min-width: 900px) {
  .view.wide-lg { padding-left: 24px; padding-right: 24px; }
  .profile-grid.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; align-items: start; }
  .profile-col { display: flex; flex-direction: column; gap: 16px; }
  .shelters-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; align-items: start; }
  .shelters-side { display: flex; flex-direction: column; gap: 12px; }
  .shelters-search { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
  .shelters-layout .map-public { position: sticky; top: 104px; height: calc(100vh - 150px); max-height: 760px; min-height: 420px; }
}
.profile-col { display: flex; flex-direction: column; gap: 16px; }
.shelters-side { display: flex; flex-direction: column; gap: 12px; }
.shelters-search { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 899px) {
  /* telefono: ricerca, mappa, elenco */
  .shelters-layout { display: flex; flex-direction: column; }
  .shelters-layout .shelters-side { display: contents; }
  .shelters-layout .shelters-search { order: 1; }
  .shelters-layout .map-public { order: 2; }
  .shelters-layout .shelters-side > .list { order: 3; }
}
.fx-ico { display: flex; align-items: flex-end; justify-content: center; height: 22px; font-style: normal; color: var(--green); }
.fx-pill input:checked + span .fx-ico { color: rgba(255,255,255,.9); }
@media (min-width: 900px) {
  .deck { height: calc(100vh - 300px); }
  body.has-banner .deck { height: calc(100vh - 335px); }
}
/* icone anche nel menu in alto (computer) */
@media (min-width: 900px) {
  .topnav a { display: inline-flex; align-items: center; gap: 7px; }
  .topnav a svg { flex: none; opacity: .9; }
}
.suggest-list.floating { position: fixed; z-index: 3000; top: auto; right: auto; }
.mail-test { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; border-top: 1px solid #eef2e7; padding-top: 12px; margin-top: 6px; }

/* ---------- occhio mostra/nascondi password */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap > input { width: 100%; padding-right: 48px !important; box-sizing: border-box; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.pw-eye:hover { color: var(--green); background: var(--green-soft); }
.pw-eye:focus-visible { outline: 3px solid #3b82f6; outline-offset: 0; }
.pw-eye[aria-pressed="true"] { color: var(--green); }

/* ---------- Il mio account (Profilo) */
.acct-box { padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.acct-item { border-top: 1px solid var(--line, #e3ead6); }
.acct-item:first-of-type { border-top: 0; }
.acct-item summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 22px auto 1fr 14px; align-items: center; gap: 10px; padding: 12px 2px; color: var(--ink-2); }
.acct-item summary::-webkit-details-marker { display: none; }
.acct-item summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); justify-self: end; transition: transform .15s; }
.acct-item[open] summary::after { transform: rotate(45deg); }
.acct-item summary svg { color: var(--green); }
.acct-title { font-weight: 800; }
.acct-current { color: var(--muted); font-size: 13px; font-weight: 600; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.acct-body { padding: 2px 2px 16px; }
.acct-form { display: flex; flex-direction: column; gap: 12px; }
.acct-form .btn { align-self: flex-start; }
.mail-test .inp { margin: 6px 0; }
