:root {
    --ink: #1d1d1f;
    --muted: #6e6e73;
    --paper: #e8eef6;
    --cream: #f5f5f7;
    --glass: linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.18));
    --glass-fill: rgba(255, 255, 255, 0.22);
    --glass-edge: rgba(255, 255, 255, 0.62);
    --fill: #1d1d1f;
    --rust: #c93400;
    --ok: #248a3d;
    --soon: #c93400;
    --overdue: #de071c;
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
    --shadow: 0 18px 50px rgba(20, 40, 80, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.78), inset 0 -1px 0 rgba(255, 255, 255, 0.12);
    --blur: blur(48px) saturate(220%);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.47;
    letter-spacing: -0.011em;
    background-color: #9eb4d0;
    background-image:
        radial-gradient(ellipse 80% 55% at 12% -10%, #7eb6ff 0%, transparent 58%),
        radial-gradient(ellipse 70% 50% at 92% 0%, #ffb199 0%, transparent 52%),
        radial-gradient(ellipse 60% 45% at 80% 100%, #7ee0c4 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 0% 85%, #d4b4f0 0%, transparent 50%),
        linear-gradient(180deg, #c5d6ea 0%, #a8bdd4 100%);
    background-attachment: fixed;
}

body::before {
    content: "";
    position: fixed;
    inset: -30%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.7), transparent 36%),
        radial-gradient(circle at 78% 62%, rgba(255, 255, 255, 0.35), transparent 32%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.12;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

body > * { position: relative; z-index: 1; }

a { color: var(--ink); }
a:hover { color: var(--rust); }

.site-bar {
    position: sticky;
    top: 14px;
    z-index: 30;
    width: min(760px, calc(100% - 24px));
    margin: 14px auto 0;
    padding: 0 16px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.16));
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-edge);
    box-shadow: var(--shadow);
}

main, .site-footer {
    width: min(760px, calc(100% - 36px));
    margin-left: auto;
    margin-right: auto;
}

.site-header {
    width: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
}

.header-end {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.signed-as {
    margin: 0;
    padding: 0 2px 10px;
    font-size: 0.82rem;
    font-weight: 550;
    color: var(--muted);
    line-height: 1.35;
}

.site-header nav {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    font-size: 0.92rem;
}

.site-header nav > a {
    text-decoration: none;
    font-weight: 600;
}

.pet-switcher {
    width: 100%;
    margin: 0;
    padding: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pet-switcher-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    flex: 1;
    min-width: 0;
    padding: 2px 2px 4px;
    scrollbar-width: thin;
}
.pet-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    max-width: 220px;
    padding: 5px 12px 5px 5px;
    border-radius: 999px;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.38);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    font-size: 0.88rem;
}
.pet-chip .pet-thumb {
    width: 36px;
    height: 36px;
    margin: 0;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}
.pet-chip-text {
    display: grid;
    min-width: 0;
    line-height: 1.2;
}
.pet-chip-text strong {
    font-family: var(--font);
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pet-chip .species {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
}
.pet-chip.is-on {
    background: var(--fill);
    color: var(--cream);
    border-color: var(--fill);
}
.pet-chip.is-on .species { color: rgba(255, 255, 255, 0.72); }
.pet-chip-add {
    padding: 8px 14px;
    font-weight: 600;
    white-space: nowrap;
}
.due-chip {
    font-size: 0.65rem;
    letter-spacing: 0.02em;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pet-chip.has-due {
    border-color: rgba(180, 90, 40, 0.35);
}
.due-chip.state-soon { color: var(--soon); }
.due-chip.state-today,
.due-chip.state-overdue { color: var(--overdue); }
.pet-chip.is-on .due-chip { color: rgba(255, 255, 255, 0.82); }
.pet-chip.is-on .due-chip.state-soon { color: #f3d9a4; }
.pet-chip.is-on .due-chip.state-today,
.pet-chip.is-on .due-chip.state-overdue { color: #ffc9b8; }

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    margin: 0 -8px 0 0;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex: none;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--ink);
    border-radius: 1px;
    transition: transform 0.18s ease, opacity 0.18s ease, top 0.18s ease;
}
.nav-toggle span {
    position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
    content: "";
    position: absolute;
    left: 0;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.site-header.is-open .nav-toggle span { background: transparent; }
.site-header.is-open .nav-toggle span::before {
    top: 0;
    transform: rotate(45deg);
}
.site-header.is-open .nav-toggle span::after {
    top: 0;
    transform: rotate(-45deg);
}

.glass {
    position: relative;
    background: var(--glass);
    background-color: var(--glass-fill);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-edge);
    box-shadow: var(--shadow);
}

.hero-lead {
    max-width: 34em;
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 1.12rem;
    line-height: 1.4;
    letter-spacing: -0.02em;
}

.home-story {
    padding: 22px 24px;
    margin: 0 0 48px;
}
.home-story h2 {
    font-family: var(--font);
    font-size: 1.25rem;
    font-weight: 650;
    letter-spacing: -0.03em;
    margin: 0 0 10px;
}
.home-story p {
    margin: 0 0 10px;
    color: var(--muted);
}
.home-story p:last-child { margin-bottom: 0; }

.wordmark {
    font-family: var(--font);
    color: var(--ink);
    text-decoration: none;
    font-size: 1.28rem;
    font-style: normal;
    font-weight: 650;
    letter-spacing: -0.04em;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: none;
}
.wordmark .mark {
    width: 32px;
    height: 32px;
    display: block;
}

.wordmark:hover { color: var(--ink); }

.langs { display: flex; gap: 10px; }
.langs a {
    text-decoration: none;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: var(--muted);
}
.langs a.is-active { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

.hero {
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 10vh 0 8vh;
}

.hero h1, .page-head h1, .auth-card h1, .section-title {
    font-family: var(--font);
    font-weight: 650;
    letter-spacing: -0.045em;
}

.hero h1 {
    font-size: clamp(2.4rem, 7vw, 4.4rem);
    line-height: 1.05;
    margin: 0 0 12px;
    max-width: 14ch;
}

.hero-actions, .page-head, .row-actions {
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
}

.home-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 0 0 48px;
}
.home-point {
    padding: 20px 22px;
}
.home-point h2 {
    font-family: var(--font);
    font-size: 1.15rem;
    font-weight: 650;
    letter-spacing: -0.03em;
    margin: 0 0 8px;
}
.home-point p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.stat-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 28px;
}
.stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px 8px 12px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.18));
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-edge);
    box-shadow: var(--shadow);
    color: var(--ink);
    font-family: var(--font);
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.stat-icon {
    width: 1.15em;
    height: 1.15em;
    flex: none;
}
.stat-chips.is-compact {
    margin: 0 0 12px;
}
.stat-chips.is-compact .stat-chip {
    font-size: 0.92rem;
    padding: 6px 12px 6px 10px;
}

.page-head { justify-content: space-between; padding: 22px 0 8px; }
.page-head h1 {
    margin: 0;
    font-size: 2.1rem;
    overflow-wrap: anywhere;
}

.eyebrow { color: var(--muted); margin: 0 0 6px; font-size: 0.92rem; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--fill);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 11px 20px;
    font: inherit;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(29, 29, 31, 0.18);
}

.btn:hover { color: #fff; background: #000; }
.btn-small { padding: 7px 14px; font-size: 0.92rem; }
.btn-ghost {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.18));
    color: var(--ink);
    border: 1px solid var(--glass-edge);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.62); color: var(--ink); }
.btn-danger {
    background: var(--overdue);
    color: #fff;
    border: 0;
}
.btn-danger:hover { filter: brightness(0.92); }

.text-link, .linkish {
    background: none;
    border: 0;
    font: inherit;
    color: var(--ink);
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.auth-card, .empty, .stack, .sheet, .push-panel, .weight-panel, .due-row, .pet-card {
    border-radius: 22px;
}

.auth-card, .empty, .stack, .sheet, .push-panel, .weight-panel { padding: 22px; }
.auth-card { max-width: 420px; margin: 40px auto; }
.auth-card form, .stack { display: grid; gap: 14px; }
.stack {
    max-width: 560px;
    width: 100%;
    min-width: 0;
    margin-bottom: 36px;
    overflow-x: clip;
}

label, legend {
    display: grid;
    gap: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    min-width: 0;
}
.optional { font-weight: 500; color: var(--muted); font-size: 0.8rem; }

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    font: inherit;
    font-size: 1rem;
    line-height: 1.25;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 48px;
    min-height: 48px;
    padding: 0 13px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    color: var(--ink);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
    appearance: none;
    -webkit-appearance: none;
}
textarea {
    height: auto;
    min-height: 7.5rem;
    padding: 11px 13px;
    resize: vertical;
    line-height: 1.45;
}
.stack textarea {
    min-height: 5.2rem;
}
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%231d1d1f' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
}
.file-field {
    position: relative;
    display: flex;
    align-items: center;
    height: 48px;
    min-height: 48px;
    padding: 0 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
    overflow: hidden;
}
.file-field-ui {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    width: 100%;
    pointer-events: none;
}
.file-field-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.78);
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1;
}
.file-field-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--muted);
    line-height: 1.2;
}
.file-field input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
    border: 0;
    background: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    font-size: 16px;
}

.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.muted, .help { color: var(--muted); }
.help { font-weight: 500; font-size: 0.92rem; margin: 0 0 10px; }

.section-title { font-size: 1.15rem; margin: 8px 0 12px; }

.tabs {
    display: flex;
    gap: 4px;
    margin: 8px 0 16px;
    padding: 4px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.tabs a {
    text-decoration: none;
    padding: 8px 14px;
    color: var(--muted);
    font-weight: 600;
    border-radius: 11px;
}

.tabs a.is-active {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.due-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }

.due-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    border-left: 4px solid var(--ok);
}

.due-row h3 {
    margin: 0;
    font-family: var(--font);
    font-size: 1.15rem;
    font-weight: 650;
    letter-spacing: -0.03em;
    overflow-wrap: anywhere;
}
.due-meta, .due-when { margin: 0; color: var(--muted); font-size: 0.92rem; overflow-wrap: anywhere; }
.state-soon { border-left-color: var(--soon); }
.state-today, .state-overdue { border-left-color: var(--overdue); }

.pet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    padding-bottom: 40px;
}

.pet-card {
    padding: 14px;
    text-decoration: none;
    color: inherit;
    display: grid;
    gap: 4px;
}

.pet-thumb {
    height: 120px;
    border-radius: 12px;
    background: rgba(29, 29, 31, 0.1) center/cover no-repeat;
    margin-bottom: 6px;
}

.species { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.pet-card strong { font-family: var(--font); font-size: 1.35rem; }

.sheet {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.sheet-photos {
    display: grid;
    gap: 10px;
    align-content: start;
}

.sheet-photo {
    min-height: 160px;
    border-radius: 14px;
    background: rgba(29, 29, 31, 0.08);
    display: grid;
    place-items: center;
    color: var(--muted);
    overflow: hidden;
}
.sheet-photo img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    display: block;
    vertical-align: middle;
}

.facts { margin: 0; display: grid; gap: 12px; min-width: 0; }
.facts dt { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }

.photo-preview {
    width: 140px;
    height: 140px;
    max-width: 100%;
    object-fit: cover;
    border-radius: 14px;
}
.photo-preview.wide {
    width: min(280px, 100%);
    height: auto;
    max-height: 180px;
    object-fit: contain;
    background: rgba(29, 29, 31, 0.06);
}
.thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 0;
}
.thumbs .thumb img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pill {
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.38);
    border-radius: 999px;
    padding: 8px 12px;
    font: inherit;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.pill.is-on { background: var(--fill); color: var(--cream); border-color: var(--fill); }

fieldset.interval { border: 0; padding: 0; margin: 0; }

.banner {
    padding: 12px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.48);
    border: 1px solid var(--glass-edge);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    font-weight: 600;
}
.banner-error { color: var(--overdue); }
.banner-ok { color: var(--ok); }

.danger { margin: 40px 0; }
.danger-link { color: var(--overdue); }
.site-footer {
    padding: 16px 22px 28px;
    margin-bottom: 36px;
    color: var(--muted);
    font-size: 0.88rem;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.14));
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-edge);
    box-shadow: var(--shadow);
}
.site-footer a { color: var(--muted); }
.legal { padding: 28px 0 40px; }
.legal h1 { font-family: var(--font); font-size: 2.1rem; font-weight: 650; letter-spacing: -0.04em; margin: 0 0 8px; }
.legal h2 { font-family: var(--font); font-size: 1.25rem; font-weight: 650; letter-spacing: -0.03em; margin: 28px 0 8px; }
.legal p { margin: 0 0 12px; }
.donate-note { border-left: 4px solid rgba(29, 29, 31, 0.35); }
.donate-kicker { font-weight: 700; margin: 0 0 8px; }
.donate-tally { margin: 16px 0 8px; font-weight: 650; }
.donate-meter {
    height: 8px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.45);
    overflow: hidden;
    margin: 8px 0 4px;
}
.supporter-paw {
    width: 1.05em;
    height: 1.05em;
    vertical-align: -0.12em;
    display: inline-block;
}
.supporter-mark { color: var(--ink); }
.donate-thanks { font-weight: 650; margin: 16px 0 0; }
.donate-supporters {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
}
.donate-lead { max-width: 42em; margin: 0 0 20px; }
.donate-actions { margin-bottom: 28px; }
.iban { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.04em; word-break: break-all; }
.inline { display: inline; }

.vet-card h3 { margin-bottom: 6px; }
.vet-card p { margin: 0 0 4px; }

.weight-panel {
    display: grid;
    gap: 14px;
    min-width: 0;
    margin-bottom: 36px;
}
.weight-panel summary {
    cursor: pointer;
    font-family: var(--font);
    font-size: 1.25rem;
    font-weight: 650;
    list-style: none;
}
.weight-panel summary::-webkit-details-marker { display: none; }
.weight-panel summary::after {
    content: " +";
    color: var(--muted);
    font-weight: 400;
}
.weight-panel[open] summary::after { content: " −"; }
.weight-panel h2 { margin: 0; }
.name-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    min-width: 0;
}
.name-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.place-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr) minmax(7rem, 0.7fr);
    gap: 12px;
    min-width: 0;
    align-items: end;
}
.place-grid label {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 6px;
}
.place-grid input {
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    box-sizing: border-box;
}
.label-line {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-height: 1.35em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.weight-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) auto;
    gap: 12px;
    align-items: end;
    min-width: 0;
    width: 100%;
}
.weight-form label {
    min-width: 0;
}
.weight-form input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}
.weight-form input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
}
.weight-form .btn {
    white-space: nowrap;
    justify-self: start;
}
.weight-list { margin-top: 8px; min-width: 0; }
.weight-list .due-row {
    background: transparent;
    box-shadow: none;
    border: 0;
    border-bottom: 1px solid rgba(29, 29, 31, 0.1);
    border-radius: 0;
    padding: 10px 0;
    min-width: 0;
}
@media (max-width: 860px) {
    .site-header {
        display: grid;
        grid-template-columns: 1fr auto auto;
        align-items: center;
        gap: 8px 10px;
        width: 100%;
        padding: 8px 0;
    }
    .pet-switcher { width: 100%; }
    .header-end { display: contents; }
    .langs {
        grid-column: 2;
        gap: 8px;
    }
    .nav-toggle {
        display: inline-flex;
        grid-column: 3;
        grid-row: 1;
    }
    .site-header nav {
        display: none;
        grid-column: 1 / -1;
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
        gap: 2px;
        justify-content: flex-start;
        padding: 8px 0 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.35);
        font-size: 1rem;
    }
    .site-header.is-open nav { display: flex; }
    .site-header nav > a,
    .site-header nav .linkish {
        min-height: 44px;
        padding: 10px 2px;
        display: flex;
        align-items: center;
        text-decoration: none;
        font-weight: 600;
    }
    .site-header nav .btn {
        width: 100%;
        margin-top: 6px;
        justify-content: center;
    }
    .site-header nav form.inline {
        display: block;
        width: 100%;
        margin-top: 4px;
    }
    .wordmark { font-size: 1.28rem; }
    .wordmark .mark { width: 28px; height: 28px; }
    main, .site-footer { width: min(760px, calc(100% - 24px)); }
}

@media (max-width: 720px) {
    .due-row { flex-direction: column; align-items: flex-start; }
    .sheet { grid-template-columns: 1fr; min-width: 0; }
    .hero { min-height: auto; padding: 8vh 0 6vh; }
    .home-points { grid-template-columns: 1fr; }
    .weight-form { grid-template-columns: 1fr; }
    .place-grid { grid-template-columns: 1fr; }
    .weight-form .btn { width: 100%; justify-content: center; }
    .sheet-photo img { max-height: 52vh; }
    .stack, .sheet, .weight-panel, .empty { padding: 16px; }
    .page-head h1 { font-size: 1.55rem; }
    .page-head { gap: 12px; }
}

.weight-chart {
    width: 100%;
    max-width: 520px;
    height: auto;
    display: block;
    margin: 2px 0 10px;
}
.weight-chart polyline {
    fill: none;
    stroke: var(--fill);
    stroke-width: 2.5;
    stroke-linejoin: round;
    stroke-linecap: round;
}
.weight-chart circle { fill: var(--fill); }
.weight-chart text {
    fill: var(--muted);
    font-size: 11px;
    font-family: var(--sans);
}

.is-print {
    min-height: 100%;
}
.is-print .print-bar,
.is-print .help,
.is-print .print-sheet {
    width: min(760px, calc(100% - 24px));
    margin-left: auto;
    margin-right: auto;
}
.print-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 0 8px;
}
.print-sheet {
    background: var(--glass);
    padding: 28px;
    border-radius: 22px;
    margin: 12px auto 48px;
    border: 1px solid var(--glass-edge);
    box-shadow: var(--shadow);
}
.print-head h1 {
    font-family: var(--font);
    font-size: 2.2rem;
    font-weight: 650;
    letter-spacing: -0.04em;
    margin: 0;
}
.print-sheet h2 {
    font-family: var(--font);
    font-size: 1.25rem;
    font-weight: 650;
    letter-spacing: -0.03em;
    margin: 24px 0 8px;
}
.print-grid {
    display: grid;
    grid-template-columns: 160px 1fr auto;
    gap: 20px;
    margin-top: 18px;
    align-items: start;
}
.print-qr {
    text-align: center;
    font-size: 0.82rem;
    color: var(--muted);
    max-width: 180px;
}
.print-qr img, .qr-code {
    display: block;
    background: #fff;
    padding: 8px;
    border-radius: 12px;
    margin: 0 auto 8px;
}
.print-photo {
    width: 160px;
    max-width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    border-radius: 14px;
    background: rgba(29, 29, 31, 0.06);
}
.print-photo.print-passport {
    width: 200px;
    max-height: 260px;
}
.print-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 2px;
}
.print-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(29, 29, 31, 0.1);
}
.print-foot { margin-top: 28px; }

@media (max-width: 720px) {
    .print-grid { grid-template-columns: 1fr; }
}

@media print {
    html, body, .is-print {
        background: #fff !important;
        background-image: none !important;
    }
    body::before, body::after { display: none !important; }
    .no-print { display: none !important; }
    .print-sheet {
        width: 100% !important;
        margin: 0 !important;
        padding: 0;
        border: 0;
        background: #fff;
        box-shadow: none;
        border-radius: 0;
    }
    .weight-chart polyline, .weight-chart circle { stroke: #1d1d1f; fill: #1d1d1f; }
    .weight-chart polyline { fill: none; }
}

@media (prefers-reduced-transparency: reduce) {
    html, body {
        background: #e8eef4;
        background-image: none;
    }
    .glass, .site-bar, .pet-chip, .stat-chip, .btn-ghost, .pill, .site-footer,
    input:not([type="checkbox"]):not([type="radio"]),
    select, textarea, .tabs, .banner, .file-field {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: #fff;
    }
}
