/* Shared controls and spacing. Theme colours come from theme.js / style.css. */
:root{--control-height:46px;--control-radius:12px;--section-gap:24px;--field-gap:18px;--text-error:#b52f3f}
html[data-theme="dark"]{--text-error:#ff9ca8}
.drawer form{gap:var(--field-gap)}
.drawer h2{font-size:28px;line-height:1.3}
.drawer h3,.section-heading h3,.settings-section h3{font-size:18px;line-height:1.4}
.drawer label{font-size:14px;line-height:1.5;gap:8px}
.drawer input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):not(#profileLogin),.drawer select,.drawer textarea{min-height:var(--control-height);border-radius:var(--control-radius);font-size:16px;padding:11px 13px;line-height:1.45;background:var(--input);color:var(--ink);border-color:var(--line);font-weight:400}
.drawer textarea{min-height:110px}
.drawer .primary,.drawer .secondary,.drawer .danger-button{min-height:44px;border-radius:var(--control-radius);font-size:14px;line-height:1.4;padding:12px 18px;font-weight:600}
.drawer .text-button{min-height:44px;font-size:14px}
.drawer .back-button{min-height:44px;font-size:14px;display:inline-flex;align-items:center}
.drawer .section-heading{gap:14px;flex-wrap:wrap}
.drawer .section-heading h3{margin:0}
.drawer .section-heading .secondary{font-size:14px;white-space:normal}
.drawer .settings-section{padding-top:var(--section-gap);margin-top:var(--section-gap)}
.drawer .language-switch button,.language-switch button{min-height:44px}
.drawer .settings-segments button{min-height:44px}
.drawer .find-profile input{border:0;background:transparent;padding:8px 0;border-radius:0}
.drawer .profile-search-go{min-height:44px;min-width:44px}
.drawer .public-contact-hint,.drawer .prevention-explanation,.drawer .public-visibility-details p{font-size:14px;line-height:1.6}
.entry-actions{display:flex;flex-wrap:wrap;gap:8px 12px;margin-top:12px}
.drawer .entry-actions button{margin:0;padding:8px 0;min-height:44px;font-size:14px;line-height:1.5;text-align:left}
.pet-heading,.pet-name-line,.pet-body>*,.detail-grid>div{min-width:0}
.pet-heading{padding-right:0}
.pet-name-line h2,.detail-grid b,.emergency-person b,.public-pet-note p{overflow-wrap:anywhere}
.drawer [aria-invalid="true"]{border-color:var(--text-error)!important;outline-color:var(--text-error)}
.drawer .field-error{display:block;font-size:13px;line-height:1.5;color:var(--text-error);font-weight:500;margin-top:0;white-space:normal}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:600px){
 .drawer{padding:48px 20px 28px;overscroll-behavior:contain;scroll-padding-top:120px}
 .drawer .row{gap:14px}
 .drawer .health-dates>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px}
 .drawer .health-dates span{max-width:none;font-size:14px}
 .drawer .health-dates b{font-size:16px}
 .drawer .health-dates .prevention-status{grid-column:1/-1}
 .drawer .detail-grid{gap:18px;padding:18px}
 .drawer .passport-intro{gap:16px}
 .drawer .passport-name{min-width:0}
 .drawer .passport-actions{flex-wrap:wrap}
 .topbar{padding:20px;gap:16px}
 .account-actions{gap:8px 12px;max-width:100%}
 .account-actions .username-badge{font-size:13px;margin-right:8px}
 .account-actions .secondary,.account-actions .text-button{font-size:13px;min-height:44px}
 main{padding:24px 16px 40px}
 .cards .pet-events>p,.cards.size-small .pet-events>p{font-size:14px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{transition:none!important}}

.treatment-section{padding:22px 0;border-top:1px solid var(--line);margin-top:24px}.treatment-section>h3{margin:0 0 8px}.drawer .section-description{font-size:14px;line-height:1.6;margin:0 0 18px}.treatment-actions,.procedure-actions{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}.subsection-heading{font-size:15px;line-height:1.5;margin:24px 0 12px;font-weight:600}.drawer .section-empty{font-size:14px;color:var(--muted)}.prevention-summary-heading{font-size:12px;color:var(--muted);font-weight:600;margin-bottom:5px;display:block}.drawer .pet-tabs-header .passport-nav button,.drawer .pet-tabs-header .passport-nav span{white-space:normal}@media(max-width:600px){.treatment-actions>button{width:100%}.procedure-actions>button{flex:1 1 140px}}

.contact-copy{border:0;background:none;color:var(--accent);padding:0;min-height:44px;font-size:14px;overflow-wrap:anywhere;text-align:left;cursor:pointer}.copy-fallback{user-select:text!important;-webkit-user-select:text!important}

/* Public profile: balanced identity and contact actions. */
#publicProfile>.back-button{display:inline-flex;align-items:center;min-height:44px;font-size:14px;text-decoration:none;color:var(--muted);padding:0;margin-bottom:12px}.public-profile-header{margin:0 0 24px;padding:0 0 24px;border-bottom:1px solid var(--line)}.public-identity{gap:8px 14px;align-items:baseline}.public-profile-header h1{font-size:32px;line-height:1.25;letter-spacing:-.7px;margin:0}.public-identity .public-login{font-size:16px;line-height:1.5}.public-contacts{margin-top:18px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.public-contacts h2{flex-basis:100%;margin:0 0 2px;font-size:14px;line-height:1.5;font-weight:500;color:var(--muted)}.public-contacts .public-contact-button{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:44px;border:1px solid var(--line);border-radius:12px;background:var(--surface);padding:10px 18px;color:var(--accent);font-size:14px;font-weight:600;line-height:1.4;text-decoration:none;cursor:pointer}.public-contact-button:hover{background:var(--soft)}.public-contacts .public-contact-button.copy-fallback{max-width:100%;overflow-wrap:anywhere;word-break:break-word}.emergency-card{padding:22px;margin-bottom:24px}.emergency-card h2{font-size:20px;line-height:1.4;margin:0 0 8px}.emergency-card>p{font-size:14px;line-height:1.6;margin:0 0 16px}.emergency-person{align-items:center;gap:16px;padding:14px 0}.emergency-person b{font-size:17px}.emergency-person span{display:inline-block;margin-inline-start:6px;font-size:14px}.emergency-person small{font-size:13px;margin-top:4px}@media(max-width:600px){.public-profile-header h1{font-size:28px}.public-identity .public-login{font-size:15px}.emergency-card{padding:18px}.emergency-person{align-items:flex-start}.emergency-links{width:100%}.emergency-links .secondary{font-size:14px;min-height:44px}.public-profile-header{margin-bottom:20px;padding-bottom:20px}}

.email-copy-status{display:block;flex-basis:100%;font-size:13px;line-height:1.5;color:var(--muted);overflow-wrap:anywhere}.public-contacts .email-copied,.emergency-links .email-copied{color:var(--accent);border-color:var(--accent)}

.profile-access-gate{max-width:520px;margin:36px auto;padding:28px;border:1px solid var(--line);border-radius:20px;background:var(--surface)}.profile-access-gate h1{font-size:26px;line-height:1.35;margin:0 0 14px}.profile-access-gate p{font-size:16px;line-height:1.6;color:var(--muted);margin:0 0 22px}.profile-access-gate .back-button{display:block;margin-top:18px;text-decoration:none}
