/* Guida Fatata — app dei clienti Code Fatate. Stile "app classica per animali": chiaro, pastello pesca e menta,
 * carattere tondo (Nunito), schede morbide, zampette. Alcuni nomi di variabile sono usati anche dal JS. */
:root {
	--bg: #FFF9F4;
	--card: #FFFFFF;
	--peach: #FFB587;
	--peach-hi: #FF9F66;
	--peach-pale: #FFEADB;
	--peach-soft: #FFF3EA;
	--mint: #7FD4C1;
	--mint-pale: #DDF4EE;
	--mint-deep: #11756A;
	--lilac-pale: #EEEAFB;
	--sun-pale: #FFF3C4;
	--sun: #FFD66B;
	--ink: #2B2118;
	--ink-soft: #5E5249;
	--ink-mute: #7A6D63;
	--line: #F1E4D8;
	--line-strong: #E4CFBE;
	--danger: #C9303A;
	--danger-pale: #FDE4E4;
	--ok: #11756A;
	--ok-pale: #DDF4EE;
	--warn: #8A5A00;
	--warn-pale: #FFF1CF;
	/* alias usati dal JS */
	--violet-pale: var(--peach-pale);
	--night-3: #9A4A1C;
	--fuchsia-deep: #B4481A;
	--paw: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%23FFD2B5' fill-opacity='.75'%3E%3Cg transform='translate(18 20) rotate(-18)'%3E%3Cellipse cx='10' cy='16' rx='7' ry='6'/%3E%3Ccircle cx='3' cy='7' r='2.6'/%3E%3Ccircle cx='8' cy='2.5' r='2.6'/%3E%3Ccircle cx='14' cy='2.5' r='2.6'/%3E%3Ccircle cx='19' cy='7' r='2.6'/%3E%3C/g%3E%3Cg transform='translate(76 70) rotate(16)'%3E%3Cellipse cx='10' cy='16' rx='7' ry='6'/%3E%3Ccircle cx='3' cy='7' r='2.6'/%3E%3Ccircle cx='8' cy='2.5' r='2.6'/%3E%3Ccircle cx='14' cy='2.5' r='2.6'/%3E%3Ccircle cx='19' cy='7' r='2.6'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");

	--f-title: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
	--f-text: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
	--r-m: 22px;
	--r-l: 28px;
	--shadow: 0 2px 4px rgba(120, 72, 36, .05), 0 10px 26px -12px rgba(120, 72, 36, .22);
	--shadow-up: 0 4px 8px rgba(120, 72, 36, .08), 0 22px 40px -16px rgba(120, 72, 36, .35);
	--ease: cubic-bezier(.16, 1, .3, 1);
	--tabs-h: 70px;
	--safe-b: env(safe-area-inset-bottom, 0px);
	--safe-t: env(safe-area-inset-top, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-strong) transparent; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 16px/1.55 var(--f-text); -webkit-font-smoothing: antialiased; caret-color: var(--peach-hi); }
::selection { background: var(--peach-pale); color: var(--night-3); }
img { max-width: 100%; display: block; }
a { color: var(--fuchsia-deep); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--peach-hi); outline-offset: 2px; border-radius: 10px; }
h1, h2, h3, h4 { font-family: var(--f-title); font-weight: 800; line-height: 1.15; letter-spacing: -.01em; margin: 0; text-wrap: balance; color: var(--ink); }
p { margin: 0; }
.num, time, table { font-variant-numeric: tabular-nums; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; }

/* ---------- guscio ---------- */
.app { min-height: 100dvh; display: flex; flex-direction: column; max-width: 720px; margin: 0 auto; background: var(--bg); position: relative; }
@media (min-width: 760px) { body { background: #F6EADF; } .app { box-shadow: 0 0 0 1px var(--line), 0 30px 80px -40px rgba(120, 72, 36, .45); } }

.bar {
	position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: calc(10px + var(--safe-t)) 16px 10px; background: rgba(255, 249, 244, .95); color: var(--ink);
	backdrop-filter: saturate(1.3) blur(10px); -webkit-backdrop-filter: saturate(1.3) blur(10px); border-bottom: 1px solid var(--line);
}
.bar__brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.bar__brand img { width: 38px; height: 38px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 2px var(--peach-pale); }
.bar__brand span { display: flex; flex-direction: column; line-height: 1.1; }
.bar__brand b { font: 900 19px var(--f-title); }
.bar__brand small { font-size: 12.5px; color: var(--ink-mute); font-weight: 600; }
.bar__act { display: flex; gap: 8px; }
.icon-btn {
	width: 42px; height: 42px; border-radius: 14px; border: 0; display: grid; place-items: center; cursor: pointer;
	background: var(--peach-soft); color: var(--night-3); text-decoration: none; transition: background .2s, transform .2s var(--ease);
}
.icon-btn:hover { background: var(--peach-pale); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 22px; height: 22px; }

.view { flex: 1; padding: 0 0 calc(var(--tabs-h) + var(--safe-b) + 30px); outline: none; }
.pad { padding: 20px 16px; }

/* ---------- barra schede ---------- */
.tabs {
	position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 30; width: 100%; max-width: 720px;
	display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
	height: calc(var(--tabs-h) + var(--safe-b)); padding: 0 6px var(--safe-b);
	background: #fff; border-radius: 26px 26px 0 0; box-shadow: 0 -8px 24px -12px rgba(120, 72, 36, .28);
}
.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: var(--tabs-h); color: var(--ink-mute); text-decoration: none; font-size: 11.5px; font-weight: 700; position: relative; }
.tabs a i { display: grid; place-items: center; width: 46px; height: 30px; border-radius: 99px; transition: background .25s var(--ease); }
.tabs a svg { width: 23px; height: 23px; }
.tabs a[aria-current="page"] { color: var(--night-3); }
.tabs a[aria-current="page"] i { background: var(--peach-pale); }
.tabs a.tabs__sos { color: var(--danger); }
.tabs a.tabs__sos i {
	width: 56px; height: 56px; border-radius: 50%; margin-top: -28px; background: var(--danger); color: #fff;
	box-shadow: 0 10px 20px -8px rgba(201, 48, 58, .7), 0 0 0 5px #fff; transition: transform .25s var(--ease);
}
.tabs a.tabs__sos:active i { transform: scale(.93); }

/* ---------- elementi comuni ---------- */
.sec { padding: 24px 16px 0; }
.sec > h2 { font-size: 21px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.sec > h2 a { font: 800 14.5px var(--f-text); text-decoration: none; color: var(--fuchsia-deep); display: inline-flex; align-items: center; gap: 4px; }
.lead { color: var(--ink-soft); font-size: 16px; max-width: 62ch; }
.muted { color: var(--ink-mute); font-size: 14.5px; }
.stack { display: grid; gap: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; min-width: 0; }
.hide { display: none !important; }

.card { background: var(--card); border-radius: var(--r-m); padding: 18px; box-shadow: var(--shadow); }
.card h3 { font-size: 18px; margin-bottom: 6px; }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 20px;
	border-radius: 99px; border: 0; cursor: pointer; text-decoration: none; font-weight: 800; font-size: 16px;
	background: var(--peach-hi); color: var(--ink); box-shadow: 0 8px 18px -10px rgba(255, 120, 60, .9);
	transition: transform .2s var(--ease), background .2s, box-shadow .2s;
}
.btn:hover { background: #FF8F4F; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--night { background: var(--mint); color: #0B3F39; box-shadow: 0 8px 18px -10px rgba(17, 117, 106, .8); }
.btn--night:hover { background: #6CCAB5; }
.btn--ghost { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line-strong); }
.btn--ghost:hover { background: var(--peach-soft); }
.btn--wa { background: #25D366; color: #06331A; box-shadow: 0 8px 18px -10px rgba(37, 211, 102, .9); }
.btn--wa:hover { background: #1FBE5B; }
.btn--danger { background: var(--card); color: var(--danger); box-shadow: inset 0 0 0 2px #F5C2C5; }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 14.5px; }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.btn.is-loading::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.back { display: inline-flex; align-items: center; gap: 4px; margin: 14px 16px 0; padding: 7px 14px 7px 8px; border: 0; background: var(--peach-soft); color: var(--night-3); font-weight: 800; cursor: pointer; border-radius: 99px; }
.back svg { width: 20px; height: 20px; transform: rotate(180deg); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font-size: 13px; font-weight: 800; background: var(--peach-pale); color: var(--night-3); white-space: nowrap; }
.chip svg { width: 15px; height: 15px; }
.chip--fuchsia { background: var(--peach-hi); color: var(--ink); }
.chip--lemon { background: var(--sun); color: #3D2C00; }
.chip--ok { background: var(--ok-pale); color: var(--ok); }
.chip--warn { background: var(--warn-pale); color: var(--warn); }
.chip--danger { background: var(--danger-pale); color: var(--danger); }

.seg { display: flex; gap: 4px; padding: 5px; background: var(--peach-pale); border-radius: 99px; margin: 16px 16px 0; }
.seg a, .seg button { flex: 1; text-align: center; padding: 9px 6px; border-radius: 99px; border: 0; background: none; font-weight: 800; font-size: 14.5px; color: var(--night-3); text-decoration: none; cursor: pointer; }
.seg [aria-current="true"] { background: var(--card); color: var(--ink); box-shadow: 0 4px 10px -6px rgba(120, 72, 36, .5); }

.list { background: var(--card); border-radius: var(--r-m); overflow: hidden; box-shadow: var(--shadow); }
.list > a, .list > div, .list > button { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; color: inherit; width: 100%; border: 0; background: none; text-align: left; cursor: pointer; border-top: 1px solid var(--line); }
.list > :first-child { border-top: 0; }
.list > a:hover, .list > button:hover { background: var(--peach-soft); }
.list b { display: block; font-weight: 800; }
.list small { display: block; color: var(--ink-mute); font-size: 14px; line-height: 1.4; }
.list .go { margin-left: auto; color: var(--line-strong); width: 20px; height: 20px; flex: none; }
.ico { width: 44px; height: 44px; flex: none; border-radius: 15px; display: grid; place-items: center; background: var(--peach-pale); color: var(--night-3); }
.ico svg { width: 23px; height: 23px; }
.ico--fuchsia { background: var(--lilac-pale); color: #5B45B0; }
.ico--lemon { background: var(--sun-pale); color: #7A5700; }
.ico--danger { background: var(--danger-pale); color: var(--danger); }
.ico--ok { background: var(--mint-pale); color: var(--mint-deep); }

svg.i { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; flex: none; }

/* ---------- OGGI: la scheda del micio ---------- */
.hero { position: relative; overflow: hidden; margin: 14px 16px 0; padding: 18px 18px 20px; border-radius: var(--r-l); background: var(--peach-pale) var(--paw); color: var(--ink); }
.hero__hi { color: var(--ink-soft); font-size: 15.5px; font-weight: 700; }
.hero__pet { display: flex; gap: 18px; align-items: center; margin-top: 10px; }
/* cornice con le orecchie da gatto */
.catframe { position: relative; flex: none; width: 104px; height: 104px; margin-top: 14px; }
.catframe::before, .catframe::after { content: ""; position: absolute; top: -14px; width: 40px; height: 40px; background: #fff; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.catframe::before { left: 2px; transform: rotate(-18deg); }
.catframe::after { right: 2px; transform: rotate(18deg); }
.hero__photo { position: relative; z-index: 1; width: 104px; height: 104px; border-radius: 50%; object-fit: cover; background: #fff; box-shadow: 0 0 0 5px #fff, 0 14px 26px -10px rgba(120, 72, 36, .55); display: grid; place-items: center; color: var(--night-3); }
.hero__photo svg { width: 46px; height: 46px; }
.hero__name { font: 900 clamp(32px, 9vw, 44px)/1 var(--f-title); letter-spacing: -.02em; color: var(--ink); }
.hero__meta { color: var(--ink-soft); font-size: 15px; margin-top: 6px; font-weight: 600; }
.hero__next { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.hero__next .chip { background: #fff; color: var(--ink); box-shadow: 0 3px 8px -5px rgba(120, 72, 36, .5); }
.hero__next .chip--fuchsia { background: var(--peach-hi); color: var(--ink); }
.hero__pick { display: flex; gap: 8px; overflow-x: auto; margin: 14px -18px 0; padding: 0 18px; scrollbar-width: none; }
.hero__pick button { flex: none; padding: 7px 14px; border-radius: 99px; border: 0; background: rgba(255, 255, 255, .75); color: var(--ink); font-weight: 800; font-size: 14px; cursor: pointer; }
.hero__pick button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.hero__empty h1 { font-size: clamp(27px, 7.6vw, 36px); margin: 8px 0; }
.hero__empty p { color: var(--ink-soft); max-width: 44ch; }
.hero__empty .row { margin-top: 16px; }
.hero__empty .btn--ghost { background: #fff !important; color: var(--ink) !important; border: 0 !important; }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 18px 16px 0; }
.quick a, .quick button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 4px 12px; border-radius: 20px; border: 0; background: var(--card); color: var(--ink); text-decoration: none; font-size: 12.5px; font-weight: 800; text-align: center; line-height: 1.2; cursor: pointer; box-shadow: var(--shadow); transition: transform .2s var(--ease); }
.quick a:hover, .quick button:hover { transform: translateY(-2px); }
.quick .ico { width: 46px; height: 46px; border-radius: 50%; }

.strip { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 4px 16px 10px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.strip > * { scroll-snap-align: start; flex: none; }
.litter { width: 236px; background: var(--card); border-radius: var(--r-m); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.litter img { width: 100%; height: 132px; object-fit: cover; }
.litter div { padding: 12px 14px 14px; display: grid; gap: 6px; justify-items: start; }
.litter b { font: 800 17px var(--f-title); }

.news { background: var(--card); border-radius: var(--r-m); overflow: hidden; box-shadow: var(--shadow); }
.news img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.news__b { padding: 16px 18px 18px; display: grid; gap: 8px; }
.news__b h3 { font-size: 19px; }
.news__b p { color: var(--ink-soft); white-space: pre-line; }
.news__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ---------- GUIDE ---------- */
.kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kind { position: relative; aspect-ratio: 3/4; border-radius: 24px; overflow: hidden; text-decoration: none; color: #fff; display: flex; align-items: flex-end; padding: 12px; background: var(--peach) center/cover no-repeat; box-shadow: var(--shadow-up); transition: transform .25s var(--ease); }
.kind::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(43, 33, 24, 0) 40%, rgba(43, 33, 24, .78)); }
.kind b { position: relative; font: 900 19px var(--f-title); }
.kind[aria-current="true"] { box-shadow: 0 0 0 4px var(--peach-hi), var(--shadow-up); }
.kind:hover { transform: translateY(-3px); }

.chapter { padding: 8px 16px 0; }
.chapter__head { display: flex; gap: 14px; align-items: center; margin: 12px 0; }
.chapter__head h1 { font-size: clamp(26px, 7vw, 34px); }
.chapter .lead { margin-bottom: 16px; }
.chapter .lead b { color: var(--ink); }
.steps { counter-reset: s; display: grid; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: s; position: relative; padding: 0 0 18px 54px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--peach-hi); color: var(--ink); font: 900 17px var(--f-title); box-shadow: 0 0 0 4px var(--peach-pale); }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 18px; top: 46px; bottom: 4px; width: 2px; border-radius: 2px; background: repeating-linear-gradient(var(--line-strong) 0 5px, transparent 5px 10px); }
.steps b { display: block; font-size: 17px; font-family: var(--f-title); font-weight: 800; margin: 6px 0 4px; }
.steps p { color: var(--ink-soft); }
.bul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.bul li { position: relative; padding-left: 26px; color: var(--ink-soft); }
.bul li::before { content: ""; position: absolute; left: 1px; top: .28em; width: 16px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%23FF9F66'%3E%3Cellipse cx='12' cy='16' rx='5.5' ry='4.6'/%3E%3Ccircle cx='5' cy='10' r='2.2'/%3E%3Ccircle cx='9.2' cy='5.6' r='2.2'/%3E%3Ccircle cx='14.8' cy='5.6' r='2.2'/%3E%3Ccircle cx='19' cy='10' r='2.2'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat; }
.bul b { color: var(--ink); }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; background: var(--card); border-radius: var(--r-m); overflow: hidden; box-shadow: var(--shadow); }
.tbl th { text-align: left; font: 800 12.5px var(--f-text); text-transform: uppercase; letter-spacing: .04em; color: var(--night-3); background: var(--peach-pale); padding: 11px 12px; }
.tbl td { padding: 11px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl td:first-child { font-weight: 800; }
.note { margin-top: 12px; padding: 13px 15px; border-radius: 18px; background: var(--sun-pale); color: #4A3900; font-size: 14.5px; }
.note b { color: #2E2300; }
.first-month { margin: 0 0 18px; padding: 16px; border-radius: 22px; background: var(--mint-pale); color: #0B3F39; display: flex; gap: 14px; align-items: flex-start; }
.first-month .ico { background: var(--mint); color: #0B3F39; border-radius: 50%; }
.first-month b { color: #062E29; }
.first-month p { font-size: 15.5px; }
.calc { margin: 18px 0 4px; }
.calc__out { margin-top: 12px; padding: 16px; border-radius: 18px; background: var(--peach-pale); color: var(--night-3); }
.calc__out strong { display: block; font: 900 clamp(30px, 8.6vw, 38px) var(--f-title); color: var(--ink); }

/* ---------- moduli ---------- */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > span { font-weight: 800; font-size: 14.5px; }
.field small { color: var(--ink-mute); font-size: 13px; }
.input, .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .field select, .field textarea { width: 100%; min-height: 50px; padding: 11px 16px; border-radius: 16px; border: 2px solid var(--line); background: #fff; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.field textarea { min-height: 100px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--peach-hi); box-shadow: 0 0 0 4px rgba(255, 159, 102, .22); }
.field input::placeholder, .field textarea::placeholder { color: #9A8C80; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { width: 22px; height: 22px; accent-color: var(--peach-hi); margin: 1px 0 0; flex: none; }
.err { color: var(--danger); font-size: 14.5px; font-weight: 700; }
.photo-pick { display: flex; align-items: center; gap: 14px; }
.photo-pick img, .photo-pick .ph { width: 78px; height: 78px; border-radius: 50%; object-fit: cover; background: var(--peach-pale); display: grid; place-items: center; color: var(--night-3); }

/* ---------- scheda peloso ---------- */
.pet-head { display: flex; gap: 18px; align-items: center; padding: 18px 16px 0; }
.pet-head img, .pet-head .ph { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; background: var(--peach-pale); display: grid; place-items: center; color: var(--night-3); flex: none; box-shadow: 0 0 0 5px #fff, var(--shadow); }
.pet-head h1 { font-size: clamp(30px, 8vw, 40px); font-weight: 900; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.facts div { background: var(--card); padding: 12px 14px; border-radius: 18px; box-shadow: var(--shadow); }
.facts small { display: block; color: var(--ink-mute); font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.facts b { font-weight: 800; font-size: 16px; overflow-wrap: anywhere; }
.chart { width: 100%; height: auto; display: block; }
.chart .ln { fill: none; stroke: var(--peach-hi); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.chart .ar { fill: url(#cfArea); }
.chart .dt { fill: #fff; stroke: var(--peach-hi); stroke-width: 3; }
.chart text { font: 700 11px var(--f-text); fill: var(--ink-mute); }
.chart .gr { stroke: var(--line); stroke-width: 1.5; }
.ev-due { color: var(--danger); font-weight: 800; }

/* ---------- chat ---------- */
.chat { display: flex; flex-direction: column; height: calc(100dvh - 63px - var(--safe-t) - var(--tabs-h) - var(--safe-b)); }
.is-demo .chat { height: calc(100dvh - 100px - var(--safe-t) - var(--tabs-h) - var(--safe-b)); }
.chat__list { flex: 1; overflow-y: auto; padding: 16px 12px 10px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.msg { max-width: 82%; align-self: flex-start; background: var(--card); border-radius: 22px 22px 22px 8px; padding: 9px 13px 7px; box-shadow: 0 3px 10px -6px rgba(120, 72, 36, .4); position: relative; }
.msg--me { align-self: flex-end; background: var(--peach-hi); color: var(--ink); border-radius: 22px 22px 8px 22px; }
.msg--owner { background: var(--mint-pale); }
.msg__who { font-size: 12.5px; font-weight: 900; color: var(--fuchsia-deep); }
.msg--owner .msg__who { color: var(--mint-deep); }
.msg--me .msg__who { display: none; }
.msg__body { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg__img { margin: 4px -6px 2px; border-radius: 16px; overflow: hidden; max-width: 260px; cursor: zoom-in; }
.msg__at { font-size: 11.5px; color: var(--ink-mute); text-align: right; font-weight: 700; }
.msg--me .msg__at { color: #6B3A17; }
.msg__del { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: #fff; color: var(--danger); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); }
.msg__del svg { width: 14px; height: 14px; }
.day { align-self: center; font-size: 12px; font-weight: 800; color: var(--night-3); background: var(--peach-pale); padding: 4px 12px; border-radius: 99px; margin: 8px 0; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; background: var(--card); border-top: 1px solid var(--line); }
.composer textarea { flex: 1; min-height: 46px; max-height: 140px; resize: none; padding: 11px 16px; border-radius: 24px; border: 2px solid var(--line); font-size: 16px; }
.composer textarea:focus { outline: none; border-color: var(--peach-hi); }
.composer .icon-btn { width: 46px; height: 46px; flex: none; border-radius: 50%; }
.composer .send { background: var(--peach-hi); color: var(--ink); }
.composer__prev { display: flex; align-items: center; gap: 8px; padding: 8px 12px 0; background: var(--card); }
.composer__prev img { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gallery button { padding: 0; border: 0; background: var(--peach-pale); aspect-ratio: 1; cursor: zoom-in; overflow: hidden; border-radius: 16px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.gallery button:hover img { transform: scale(1.05); }

.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(43, 33, 24, .92); display: grid; place-items: center; padding: 16px; }
.lightbox img { max-height: 78dvh; border-radius: 18px; }
.lightbox p { color: #fff; text-align: center; margin-top: 12px; max-width: 50ch; }
.lightbox .icon-btn { position: absolute; top: calc(12px + var(--safe-t)); right: 12px; }

/* ---------- SOS ---------- */
.sos-top { margin: 14px 16px 0; background: var(--danger-pale); color: #6E0A15; padding: 18px; display: grid; gap: 10px; border-radius: var(--r-l); }
.sos-top h1 { color: var(--danger); font-size: 27px; font-weight: 900; }
.sos-top p { font-size: 15px; }
.sos-top .row .btn { background: var(--danger); color: #fff; box-shadow: 0 8px 18px -10px rgba(201, 48, 58, .9); flex: 1; }
.sos-top .row .btn--ghost { background: #fff; color: var(--danger); box-shadow: inset 0 0 0 2px #F5C2C5; }
.search { position: relative; }
.search input { padding-left: 46px !important; border-radius: 99px !important; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ink-mute); }
.lvl { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.lvl--rosso { background: var(--danger); }
.lvl--giallo { background: #E3A300; }
.lvl--verde { background: var(--ok); }
.emerg h1 { font-size: clamp(26px, 7vw, 32px); }
.box { border-radius: var(--r-m); padding: 15px 17px; }
.box--danger { background: var(--danger-pale); color: #6E0A15; }
.box--danger h3 { color: var(--danger); }
.box--signs { background: var(--sun-pale); }
.big-num { font: 900 clamp(66px, 22vw, 112px)/1 var(--f-title); text-align: center; color: var(--ink); font-variant-numeric: tabular-nums; }
.big-num.pulse { color: var(--peach-hi); }
.big-num.alarm { color: var(--danger); }
.res { padding: 11px 13px; border-radius: 14px; font-size: 14.5px; font-weight: 700; }
.res--ok { background: var(--ok-pale); color: #0A4F46; }
.res--meh { background: var(--warn-pale); color: #6A3F00; }
.res--ko { background: var(--danger-pale); color: #7E0B18; }
.tap { min-height: 120px; font-size: 26px; border-radius: 28px; }
.video { position: relative; aspect-ratio: 16/9; border-radius: 18px; overflow: hidden; background: var(--ink); }
.video iframe, .video button { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video button { display: grid; place-items: center; color: #fff; cursor: pointer; background: var(--ink) center/cover no-repeat; }
.video button span { background: var(--danger); border-radius: 99px; padding: 10px 18px; font-weight: 800; display: inline-flex; gap: 8px; align-items: center; }
.quiz-opt { text-align: left; justify-content: flex-start; border-radius: 18px; }
.quiz-opt.ok { background: var(--ok); color: #fff; box-shadow: none; }
.quiz-opt.ko { background: var(--danger); color: #fff; box-shadow: none; }
.vet { display: grid; gap: 4px; }

/* ---------- admin ---------- */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--card); border-radius: var(--r-m); padding: 16px; box-shadow: var(--shadow); }
.stat strong { display: block; font: 900 34px/1 var(--f-title); color: var(--ink); }
.stat span { color: var(--ink-soft); font-size: 14px; font-weight: 600; }
.stat--main { grid-column: 1 / -1; background: var(--peach-hi) var(--paw); }
.stat--main strong { font-size: 56px; }
.stat--main span { color: #4A2710; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + var(--safe-b) + 16px); transform: translateX(-50%); z-index: 70; width: min(92vw, 520px); background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 22px; box-shadow: var(--shadow-up); display: flex; gap: 12px; align-items: center; font-size: 15px; }
.toast[hidden] { display: none; }
.toast b { color: #fff; }
.toast .ico { background: var(--peach-hi); color: var(--ink); border-radius: 50%; }
.toast.meow .ico { animation: meow .9s var(--ease); }
@keyframes meow { 0% { transform: rotate(0) scale(1); } 25% { transform: rotate(-14deg) scale(1.12); } 50% { transform: rotate(10deg) scale(1.08); } 75% { transform: rotate(-5deg); } 100% { transform: none; } }

.empty { text-align: center; padding: 28px 16px; color: var(--ink-soft); display: grid; gap: 10px; justify-items: center; }
.empty .ico { width: 62px; height: 62px; border-radius: 50%; }
.empty .ico svg { width: 30px; height: 30px; }
.skel { height: 90px; border-radius: var(--r-m); background: linear-gradient(90deg, #FBEFE5, #FFF8F2, #FBEFE5); background-size: 200% 100%; animation: sk 1.2s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- demo + credit ---------- */
.demo-bar { position: sticky; top: calc(63px + var(--safe-t)); z-index: 19; display: flex; gap: 10px; align-items: center; padding: 8px 16px; background: var(--sun); color: #3D2C00; font-size: 13.5px; font-weight: 700; }
.demo-bar b { font-weight: 900; letter-spacing: .06em; }
.demo-bar span { flex: 1; min-width: 0; }
.demo-bar a { color: #3D2C00; font-weight: 900; white-space: nowrap; }
.credit { text-align: center; font-size: 13px; color: var(--ink-mute); padding: 26px 16px 0; font-weight: 600; }
.credit a { color: var(--fuchsia-deep); font-weight: 800; }

/* cambio schermata: un solo movimento, dal visibile */
@media (prefers-reduced-motion: no-preference) {
	::view-transition-old(root) { animation: vt-out .16s ease-in both; }
	::view-transition-new(root) { animation: vt-in .4s var(--ease) both; }
	@keyframes vt-out { to { opacity: .5; } }
	@keyframes vt-in { from { opacity: .5; transform: translateY(8px) scale(.995); } }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 380px) {
	.quick { grid-template-columns: repeat(2, 1fr); }
	.two { grid-template-columns: 1fr; }
	.kinds { gap: 8px; }
	.kind b { font-size: 16px; }
}

/* Recensione Google, sempre in home */
.review { text-align: center; display: grid; gap: 8px; justify-items: center; }
.review__stars { display: flex; gap: 2px; color: #E0A100; }
.review__stars .i { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.review .btn { margin-top: 4px; }

/* ---------- razze, consiglio del giorno, mostre, ENFI ---------- */
.feature { position: relative; display: flex; align-items: flex-end; min-height: 300px; border-radius: var(--r-l); overflow: hidden; text-decoration: none; color: #fff; background: var(--peach) center/cover no-repeat; box-shadow: var(--shadow-up); }
.feature::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(43, 33, 24, 0) 25%, rgba(43, 33, 24, .86)); }
.feature__txt { position: relative; display: grid; gap: 8px; justify-items: start; padding: 18px; }
.feature__txt b { font: 900 clamp(30px, 9vw, 40px)/1 var(--f-title); }
.feature__txt small { font-size: 15px; font-weight: 600; color: #FFF1E6; max-width: 42ch; }
.thumb { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 3px var(--peach-pale); }
.breed-hero { position: relative; margin: 12px 16px 0; min-height: 260px; border-radius: var(--r-l); overflow: hidden; display: flex; align-items: flex-end; background: var(--peach-pale) var(--paw); background-size: cover; background-position: center; }
.breed-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(43, 33, 24, 0) 30%, rgba(43, 33, 24, .82)); }
.breed-hero:not([style])::before { background: none; }
.breed-hero__txt { position: relative; padding: 18px; display: grid; gap: 8px; justify-items: start; color: #fff; }
.breed-hero:not([style]) .breed-hero__txt { color: var(--ink); }
.breed-hero h1 { color: inherit; font-size: clamp(32px, 9vw, 42px); font-weight: 900; }
.breed-hero p { font-weight: 600; max-width: 46ch; }
.jump { display: flex; gap: 8px; flex-wrap: wrap; }
.jump .chip { border: 0; cursor: pointer; background: #fff; color: var(--ink); box-shadow: 0 3px 8px -5px rgba(120, 72, 36, .5); font-family: inherit; }
.breed-sec { scroll-margin-top: 90px; }
.breed-sec__h { display: flex; align-items: center; gap: 12px; font-size: 22px; margin-bottom: 12px; }
.tip { display: grid; gap: 8px; text-decoration: none; color: var(--ink); background: var(--mint-pale); box-shadow: none; }
.tip__head { display: flex; align-items: center; gap: 12px; }
.tip__head .ico { background: #fff; border-radius: 50%; }
.tip p { font-size: 17px; font-weight: 700; line-height: 1.4; }
.tip__more { color: var(--mint-deep); font-weight: 800; font-size: 14.5px; display: inline-flex; gap: 4px; align-items: center; }
.show { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.show small { display: block; color: var(--ink-mute); font-size: 14px; }
.show .go { color: var(--line-strong); width: 20px; height: 20px; }
.show__rosette { position: relative; width: 50px; height: 50px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; background: radial-gradient(circle, #E0662A 0 52%, #FFB587 53% 62%, #E0662A 63%); box-shadow: 0 6px 12px -6px rgba(180, 72, 26, .8); }
.show__rosette::after { content: ""; position: absolute; bottom: -12px; left: 50%; width: 22px; height: 18px; transform: translateX(-50%); background: #E0662A; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 70%, 0 100%); z-index: -1; }
.show__rosette svg { width: 22px; height: 22px; fill: #fff; }
.show__rosette--big { width: 72px; height: 72px; margin-bottom: 10px; }
.show__rosette--big svg { width: 30px; height: 30px; }
.show-hero { display: grid; justify-items: start; gap: 8px; background: var(--peach-pale) var(--paw); box-shadow: none; }
.show-hero h1 { font-size: clamp(30px, 8.5vw, 40px); font-weight: 900; }
.about { display: flex; gap: 16px; align-items: center; }
.about__seal { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font: 900 15px var(--f-title); letter-spacing: .06em; color: #1D4E89; background: #fff; box-shadow: inset 0 0 0 3px #1D4E89, inset 0 0 0 6px #fff, inset 0 0 0 7px #1D4E89; }
.about b { display: block; font-size: 16.5px; }
.sec > h2.breed-sec__h { justify-content: flex-start; }
.about__logo { width: 72px; height: 72px; flex: none; object-fit: contain; }
.is-admin-app .bar { background: #F5C400; border-bottom-color: #E0B000; }
.is-admin-app .bar__brand small { color: #4A3900; }
.is-admin-app .bar .icon-btn { background: rgba(255,255,255,.55); color: #3D2C00; }
/* iscritti nel pannello */
.members > .member-row { display: grid; gap: 10px; cursor: default; }
.member-row__top { display: flex; gap: 12px; align-items: flex-start; }
.member-row__top .chip { flex: none; }
.member-row__act { padding-left: 56px; }
.stat--todo { background: var(--sun); text-decoration: none; color: var(--ink); grid-column: 1 / -1; }
.stat--todo span { color: #4A3900; font-weight: 800; }

/* ---------- Blog (2.10.0) ---------- */
.post { display: grid; grid-template-columns: 104px 1fr; gap: 14px; align-items: center; background: var(--card); border-radius: var(--r-m); box-shadow: var(--shadow); padding: 10px; color: inherit; text-decoration: none; transition: transform .15s var(--ease); }
.post:active { transform: scale(.98); }
.post img, .post__ph { width: 104px; height: 104px; border-radius: 14px; object-fit: cover; background: var(--peach-pale); display: grid; place-items: center; color: var(--night-3); }
.post__b { display: grid; gap: 4px; min-width: 0; }
.post__b b { font-family: var(--f-title); font-size: 17px; line-height: 1.25; }
.post__b .muted { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.reader__cover { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--r-m); box-shadow: var(--shadow); }
.reader__body { font-size: 17px; line-height: 1.65; color: var(--ink); display: grid; gap: 14px; }
.reader__body h2, .reader__body h3 { font-family: var(--f-title); line-height: 1.2; margin-top: 8px; }
.reader__body h2 { font-size: 22px; } .reader__body h3 { font-size: 19px; }
.reader__body ul, .reader__body ol { padding-left: 22px; display: grid; gap: 6px; }
.reader__body img { max-width: 100%; height: auto; border-radius: 14px; }
.reader__body figure { margin: 0; } .reader__body figcaption { font-size: 14px; color: var(--ink-mute); margin-top: 6px; text-align: center; }
.reader__body a { color: var(--fuchsia-deep); font-weight: 700; }
.edbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.edbar button { min-height: 40px; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--line); background: #fff; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.edbar button .i { width: 18px; height: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chipbox input { position: absolute; opacity: 0; pointer-events: none; }
.chipbox span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--line); background: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
.chipbox input:checked + span { background: var(--mint-pale); border-color: var(--mint-deep); }
.chipbox input:focus-visible + span { outline: 3px solid var(--peach-hi); }
[data-species-form] select, [data-species-form] input { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--line); background: #fff; font-size: 16px; }
