:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1b382d;
  background: #f7faf6;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: #137853; }
:focus-visible { outline: 3px solid #65b98b; outline-offset: 3px; }
.shell { max-width: 780px; min-height: 100dvh; margin: auto; padding: calc(14px + env(safe-area-inset-top)) 20px calc(102px + env(safe-area-inset-bottom)); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 16px; }
.brand { display: inline-flex; align-items: center; color: #137853; font-size: 21px; font-weight: 800; letter-spacing: -.7px; text-decoration: none; }
.brand::before { content: "🐾"; display: grid; place-items: center; width: 38px; height: 38px; margin-right: 9px; border-radius: 12px; background: #e2f3e7; font-size: 20px; letter-spacing: 0; }
.account-link { min-height: 44px; padding: 9px 12px; border: 1px solid #d8e9dd; border-radius: 12px; background: #fff; color: #286e4b; font-size: 13px; font-weight: 700; }
.title { margin: 12px 0 8px; font-size: clamp(27px, 7vw, 35px); line-height: 1.13; letter-spacing: -1.25px; }
.muted { color: #698174; font-size: 14px; line-height: 1.55; }
.title + .muted { margin: 0 0 22px; }
.section-title { margin: 26px 0 8px; font-size: 19px; letter-spacing: -.4px; }
h2 { margin: 0 0 8px; font-size: 18px; letter-spacing: -.35px; }
.card { margin: 14px 0; padding: 18px; border: 1px solid #dfe9df; border-radius: 19px; background: #fff; box-shadow: 0 7px 22px #153f2c09; }
.pet-card { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 94px; text-align: left; color: inherit; transition: transform .15s, box-shadow .15s; }
.pet-card:hover { transform: translateY(-2px); box-shadow: 0 12px 26px #153f2c17; }
.pet-icon { display: grid; place-items: center; width: 62px; height: 62px; flex: none; border-radius: 16px; background: #f5e8d4; font-size: 32px; }
.pet-copy { display: grid; gap: 8px; min-width: 0; }
.pet-copy strong { overflow: hidden; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.card-arrow { margin-left: auto; color: #93aa99; font-size: 28px; line-height: 1; }
.pill { display: inline-flex; align-items: center; width: fit-content; padding: 5px 10px; border-radius: 30px; background: #e0f2e5; color: #156b49; font-size: 12px; font-weight: 700; }
.pill.warn { background: #fff0d7; color: #875819; }
.pet-label { margin: -5px 0 13px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 13px 18px; border: 0; border-radius: 13px; background: #147c58; color: #fff; font-weight: 750; text-decoration: none; text-align: center; }
.button:hover { background: #0c6547; }
.button.secondary { background: #e2f2e7; color: #176d4d; }
.button.secondary:hover { background: #d3eada; }
.button:disabled { opacity: .55; cursor: default; }
.wide { width: 100%; }
.field { display: block; width: 100%; min-height: 48px; margin: 10px 0; padding: 13px 14px; border: 1px solid #d2e1d6; border-radius: 13px; background: #fff; color: #1b382d; font-size: 16px; }
.field::placeholder { color: #83998b; }
.period-select { max-width: 180px; margin: 0 0 18px; font-size: 14px; font-weight: 700; }
.nav { position: fixed; z-index: 5; right: 0; bottom: 0; left: 0; display: flex; justify-content: center; gap: 3px; padding: 7px 10px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid #dce9df; background: #fff; box-shadow: 0 -7px 24px #244b2d09; }
.nav a { flex: 1; max-width: 142px; min-height: 53px; padding: 5px 2px; border-radius: 12px; color: #71877a; font-size: 12px; text-align: center; text-decoration: none; }
.nav a.active { background: #ecf7ef; color: #137853; }
.nav a strong { display: block; font-weight: 700; }
.nav span { display: block; margin-bottom: 2px; font-size: 21px; line-height: 1.1; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 17px; }
.stat { min-height: 98px; padding: 15px; border-radius: 16px; background: #e9f4ec; color: #516b5a; font-size: 12px; line-height: 1.35; }
.stat strong { display: block; margin-top: 9px; color: #1d4730; font-size: clamp(16px, 4.5vw, 22px); line-height: 1.17; overflow-wrap: anywhere; }
.chart-card { margin: 12px 0; }
.chart-card h2 { margin-bottom: 18px; font-size: 16px; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 152px; padding-top: 8px; border-bottom: 1px solid #e1eae1; background: repeating-linear-gradient(to top, transparent 0, transparent 39px, #edf2ed 40px); }
.bar { display: flex; flex: 1; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; height: 100%; color: #71887a; font-size: 11px; text-align: center; white-space: nowrap; }
.bar i { display: block; width: min(75%, 40px); min-height: 3px; height: var(--height); margin-top: auto; border-radius: 6px 6px 0 0; background: linear-gradient(#46ae77, #168059); }
.bar span { flex: none; margin-top: 7px; transform: translateY(22px); }
.chart-card:has(.bars) { padding-bottom: 40px; }
.footnote { margin: 19px 0; font-size: 12px; }
.map { position: relative; height: min(55dvh, 480px); min-height: 310px; margin: 14px 0 0; border-radius: 20px; background: #e6eee5; overflow: hidden; }
.map-message { display: grid; place-items: center; padding: 25px; color: #466856; text-align: center; }
.map-sheet { position: relative; margin: -20px 0 18px; padding: 22px 19px; border: 1px solid #e3ece3; border-radius: 21px; background: #fff; box-shadow: 0 8px 20px #173c2e14; }
.map-sheet h2 { font-size: 21px; }
.map-sheet .button { margin-top: 8px; }
.error { margin: 12px 0; padding: 13px; border-radius: 13px; background: #fff0e9; color: #983c27; font-size: 14px; }
.notice { margin: 14px 0; padding: 14px; border-radius: 13px; background: #e8f4ea; color: #315c42; font-size: 14px; line-height: 1.45; }
.intro-notice { margin-top: 24px; }
.timeline { margin-left: 8px; padding-left: 16px; border-left: 2px solid #b7dcc5; }
.timeline p { margin: 14px 0; }
.login { max-width: 430px; margin: 18px auto; }
.login-art { height: 215px; margin: 26px 0 25px; border-radius: 24px; background: #c9e8d3 url('/locali-companions.webp') center 43% / cover no-repeat; overflow: hidden; }
.login .title { margin-top: 0; }
.login .field { margin: 11px 0; }
.login .button { margin-top: 8px; }
.forgot-link { display: block; min-height: 44px; padding: 13px 0; color: #147c58; font-size: 14px; font-weight: 700; text-align: center; text-decoration: none; }
.loader { padding: 45px 0; color: #627d6c; text-align: center; }
.profile-card { display: flex; align-items: center; gap: 14px; }
.profile-card div { display: grid; min-width: 0; gap: 2px; }
.profile-card strong, .profile-card span { overflow-wrap: anywhere; }
.profile-icon { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 13px; background: #e2f2e7; color: #17815a; font-size: 25px; }
.access-card { border-style: dashed; }
.access-card p { margin-bottom: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 15px; }
.actions .button { flex: 1; }
.small { font-size: 12px; }
.divider { margin: 20px 0; border: 0; border-top: 1px solid #e2ebe4; }
@media (max-width: 380px) {
  .shell { padding-right: 15px; padding-left: 15px; }
  .nav a { font-size: 11px; }
  .stats { gap: 8px; }
  .stat { padding: 12px; }
}
@media (min-width: 760px) {
  .shell { padding-right: 28px; padding-left: 28px; }
  .nav { right: auto; left: 50%; width: min(780px, 100%); transform: translateX(-50%); border-right: 1px solid #dce9df; border-left: 1px solid #dce9df; }
  .login { margin-top: 34px; }
}
@media (prefers-reduced-motion: reduce) { .pet-card { transition: none; } }

/* LocaliPet login: compact viewport, with accessible overflow on zoom/small screens. */
.login-screen { font-family: 'Nunito', ui-sans-serif, system-ui, sans-serif; position: relative; display: flex; flex-direction: column; width: 100%; max-width: 480px; height: 100svh; height: 100dvh; min-height: 540px; margin: auto; background: #faf9f4; }
.login-screen .login-art { flex: 1 1 auto; min-height: 130px; margin: 0; border-radius: 0; background-position: center 42%; }
.login-screen .login-art::after { content: ''; position: absolute; inset: 0 0 auto; height: 130px; background: linear-gradient(#093c2e85, transparent); pointer-events: none; }
.login-screen .login-brand { position: absolute; top: calc(20px + env(safe-area-inset-top)); left: 24px; z-index: 1; color: white; font-size: 30px; font-weight: 800; letter-spacing: -.7px; }
.login-screen .login-brand::before { color: white; background: #ffffff24; }
.login-screen .login { position: relative; flex: 0 0 auto; width: 100%; max-width: none; margin: -26px 0 0; padding: 24px 24px calc(16px + env(safe-area-inset-bottom)); border-radius: 30px 30px 0 0; background: #faf9f4; }
.login-screen .title { margin: 0 0 4px; color: #063e30; font-size: clamp(27px, 7.6vw, 34px); font-weight: 700; line-height: 1.15; letter-spacing: -.8px; }
.login-screen .title + .muted { margin: 0 0 18px; font-size: 15px; line-height: 1.4; }
.login-label { display: block; margin: 10px 0 5px; color: #164638; font-size: 14px; font-weight: 700; }
.login-screen .field { min-height: 48px; height: 48px; margin: 0; padding: 11px 14px; border-color: #b7c9bf; border-radius: 13px; }
.password-box { position: relative; }
.password-box .field { padding-right: 52px; }
.password-toggle { position: absolute; inset: 2px 2px 2px auto; width: 44px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #526f62; font-size: 23px; }
.login-screen .forgot-link { margin: 0; min-height: 44px; padding: 12px 0 8px; text-align: right; font-weight: 600; text-decoration: underline; }
.login-screen .button { min-height: 50px; margin-top: 4px; border-radius: 26px; background: #07543e; font-size: 18px; font-weight: 600; }
.login-screen .button:disabled { opacity: 1; background: #276951; cursor: not-allowed; }
.login-preview { display: table; margin: 13px auto 0; padding: 3px 13px; border-radius: 20px; background: #e9ece3; color: #576e60; font-size: 12px; }
.login-feedback:empty { display: none; }
.login-screen .error { margin: 0 0 8px; padding: 8px 10px; font-size: 13px; }
.mfa-box[hidden] { display: none; }
.login-screen:focus-within .login-art { min-height: 70px; }
.login-screen.login-mfa .login-art { min-height: 75px; }
.login-recovery .login .brand { display: none; }
@media (max-height: 680px) {
  .login-screen .login { padding-top: 18px; }
  .login-screen .title + .muted { margin-bottom: 10px; }
  .login-screen .login-brand { top: calc(12px + env(safe-area-inset-top)); font-size: 26px; }
  .login-preview { margin-top: 9px; }
}
@media (max-height: 500px) {
  .login-screen { min-height: 0; height: auto; }
  .login-screen .login-art, .login-screen .login-brand { display: none; }
  .login-screen .login { margin: 0; border-radius: 0; }
}
@media (min-width: 760px) and (min-height: 501px) {
  .login-screen { max-width: 960px; display: grid; grid-template-columns: 1fr 1fr; min-height: 560px; }
  .login-screen .login-art { height: 100%; }
  .login-screen .login { align-self: center; margin: 0; padding: 36px; border-radius: 0; }
}

