.ema, .ema-bar, .ema-contact-login { --ema-ink: var(--era-ink, #142b40); --ema-accent: var(--era-accent, #132c43); --ema-line: #cbd5e1; color: var(--ema-ink); }
.ema { max-width: 880px; margin: 0 auto 1.5rem; font: inherit; }
.ema *, .ema-bar * { box-sizing: border-box; }
.ema-bar { display: flex; justify-content: flex-end; margin: .5rem 0; }
.ema-heading, .ema-summary, .ema-tools, .ema-filters, .ema-actions, .ema-pages { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.ema-heading { justify-content: space-between; margin-bottom: 1rem; }
.ema-heading h2 { margin: .3rem 0; font-size: clamp(1.35rem, 3vw, 1.85rem); }
.ema-tools { gap: 1rem; }
.ema-back, .ema-tools a { font-size: .9rem; }
.ema h3 { margin: .2rem 0; line-height: 1.35; overflow-wrap: anywhere; }
.ema a, .ema-bar a { color: inherit; }
.ema .ema-button, .ema-bar .ema-button, .ema-contact-login a {
    display: inline-flex; min-height: 42px; align-items: center; justify-content: center; border: 1px solid #a8bacb;
    border-radius: 6px; padding: .45rem .85rem; background: white; color: #13293b;
    font: 600 .9rem/1.35 system-ui, sans-serif; text-decoration: none; cursor: pointer;
}
.ema .ema-primary, .ema-filters a[aria-current="page"] { color: #fff; background: var(--ema-accent); border-color: var(--ema-accent); }
.ema .ema-danger { color: #9a2626; }
.ema :is(a, button, input, select, textarea):focus-visible, .ema-bar a:focus-visible { outline: 3px solid #367da6; outline-offset: 2px; }
.ema-filters { margin-bottom: 1rem; }
.ema-filters a { display: inline-block; padding: .5rem .7rem; border: 1px solid var(--ema-line); border-radius: 6px; text-decoration: none; }
.ema-notice, .ema-login, .ema-edit, .ema-card { border: 1px solid var(--ema-line); border-radius: 8px; padding: 1rem; margin: 0 0 .85rem; background: #fff; }
.ema-notice { background: #edf5f7; }
.ema-summary { flex-wrap: nowrap; align-items: flex-start; }
.ema-summary > div:last-child { min-width: 0; }
.ema-photo { width: 68px; height: 68px; flex: 0 0 68px; display: grid; place-items: center; background: #e4f0f4; border-radius: 6px; overflow: hidden; font-size: 1.6rem; }
.ema-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ema-summary p, .ema-state { margin: 0; color: #4e6576; font-size: .85rem; }
.ema-actions, .ema-pages { margin: .8rem 0 .1rem; }
.ema-actions form { margin: 0; }
.ema-fields, .ema-animals { display: grid; gap: .8rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ema-animals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ema [hidden] { display: none !important; }
.ema-wide { grid-column: 1/-1; }
.ema-fields label { display: block; font-weight: 500; }
.ema-fields :is(select, textarea, input:not([type=checkbox])) { display: block; width: 100%; max-width: 100%; margin-top: .3rem; padding: .55rem; color: inherit; background: #fff; border: 1px solid var(--ema-line); border-radius: 6px; font: inherit; }
.ema-fields .ema-check { display: flex; align-items: baseline; gap: .4rem; }
.ema-google { margin-bottom: .7rem; }
.ema-contact-login { grid-column: 1/-1; }
.ema-contact-login [hidden] { display: none !important; }
@media (max-width: 640px) {
    .ema-fields, .ema-animals { grid-template-columns: 1fr; }
    .ema-actions .ema-button, .ema-filters a { min-height: 44px; }
    .ema-fields :is(input, select, textarea) { font-size: 16px; }
    .ema-bar { justify-content: flex-start; }
}
