/* Cala UI · warm orange, quiet surfaces and a personal health journal */
:root {
  --color-paper: #f8f7f4;
  --color-paper-2: #f0ece5;
  --color-card: #ffffff;
  --color-ink: #302b27;
  --color-ink-2: #514941;
  --color-muted: #71695f;
  --color-rule: #e7e2d9;
  --color-input-edge: #94897e;
  --color-accent: #b64c16;
  --color-accent-hover: #943c10;
  --color-accent-soft: #fff1e5;
  --color-accent-line: #efd0b5;
  --color-story: #f4dfca;
  --color-story-ink: #5b301b;
  --color-success: #356748;
  --color-success-soft: #eef5ec;
  --color-error-soft: #fff0ed;
  --radius-panel: 20px;
  --radius-control: 10px;
  --shadow-soft: 0 4px 24px rgb(64 45 26 / 4%);
}
body { color: var(--color-ink); font-size: 15px; line-height: 1.6; }
.shell { max-width: 1248px; padding-inline: 32px; }
.topbar { display: block; padding: 0; background: var(--color-card); border-bottom: 1px solid var(--color-rule); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 92px; }
.brand { font-size: 35px; letter-spacing: -.065em; gap: 8px; flex-shrink: 0; }
.brand img { width: 34px; height: 34px; }
.brand span { font-size: 12px; letter-spacing: 0; margin-left: 18px; border-left: 1px solid var(--color-rule); padding-left: 18px; max-width: 140px; line-height: 1.5; }
.header-note { color: var(--color-muted); font-size: 13px; }
nav { gap: 8px; }
.icon { display: inline-block; flex-shrink: 0; vertical-align: middle; }
.nav-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 14px; border-radius: var(--radius-control); font-weight: 500; }
.nav-link.is-current { color: var(--color-accent); background: var(--color-accent-soft); }
.nav-link:hover { background: var(--color-paper-2); }
.exit { display: flex; align-items: center; gap: 8px; color: var(--color-muted); text-decoration: none; padding: 10px 14px; border-left: 1px solid var(--color-rule); margin-left: 12px; }
.exit:hover { color: var(--color-ink); }
main { min-height: calc(100dvh - 193px); padding-block: 42px 64px; }
h1 { font-size: 34px; font-weight: 650; letter-spacing: -.04em; margin: 0 0 10px; }
h2 { font-size: 21px; font-weight: 650; letter-spacing: -.025em; }
h3 { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.page-heading p { color: var(--color-muted); font-size: 15px; margin: 0; }
.page-heading { margin-bottom: 36px; }
.button,.secondary { gap: 8px; font-size: 14px; font-weight: 600; border-radius: var(--radius-control); min-height: 46px; padding: 11px 18px; line-height: 1.5; }
.button { border-color: var(--color-accent); box-shadow: 0 2px 0 var(--color-accent-hover); }
.button:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); }
.secondary { border-color: var(--color-rule); box-shadow: none; }
.secondary:hover { border-color: var(--color-muted); background: var(--color-paper); }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
button:active,.button:active { box-shadow: none; }
button:disabled { opacity: .65; cursor: progress; }
.muted { font-size: 13px; color: var(--color-muted); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1fr) 348px; gap: 32px; align-items: start; }
.dashboard-grid > section,.profile-grid > section { margin: 0; min-width: 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-heading h2 { display: flex; align-items: center; gap: 10px; margin: 0; }
.count { display: inline-flex; justify-content: center; align-items: center; min-width: 26px; height: 26px; border-radius: 8px; padding-inline: 7px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--color-muted); background: var(--color-paper-2); }
.pet-empty { background: var(--color-card); border: 1px solid var(--color-rule); border-radius: var(--radius-panel); padding: 46px 30px 32px; margin: 0; box-shadow: var(--shadow-soft); }
.empty-mark { width: 92px; height: 92px; display: grid; place-items: center; background: var(--color-accent-soft); border-radius: 30px; margin: 0 auto 24px; transform: rotate(-8deg); }
.empty-mark img { margin: 0; transform: rotate(8deg); }
.pet-empty h3 { font-size: 24px; line-height: 1.35; margin-bottom: 12px; }
.pet-empty p { color: var(--color-muted); font-size: 14px; max-width: 40ch; margin-bottom: 24px; }
.empty-caption { display: block; color: var(--color-muted); font-size: 12px; margin-top: 26px; }
.care-note { display: flex; gap: 13px; align-items: start; padding: 20px 0; color: var(--color-muted); }
.care-note > .icon { margin-top: 3px; color: var(--color-accent); }
.care-note p { font-size: 13px; margin: 0; line-height: 1.7; }
.care-note strong { color: var(--color-ink-2); font-weight: 600; }
.care-panel,.weight-panel { background: var(--color-card); border: 1px solid var(--color-rule); border-radius: var(--radius-panel); padding: 24px; box-shadow: var(--shadow-soft); }
.care-panel > .section-heading { margin-bottom: 5px; }
.care-panel h2 { font-size: 18px; }
.care-empty { text-align: center; padding: 34px 6px 28px; }
.check-ring { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--color-rule); border-radius: 50%; color: var(--color-success); margin: 0 auto 16px; }
.care-empty h3 { font-size: 16px; margin-bottom: 8px; }
.care-empty p { font-size: 13px; color: var(--color-muted); margin: 0; }
.panel-footnote { display: flex; gap: 8px; align-items: start; border-top: 1px solid var(--color-rule); color: var(--color-muted); font-size: 12px; padding-top: 16px; margin: 0; }
.panel-footnote .icon { width: 16px; height: 16px; margin-top: 2px; }
.pets { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin: 0; }
.pet-link { border: 1px solid var(--color-rule); background: var(--color-card); border-radius: var(--radius-panel); overflow: clip; box-shadow: var(--shadow-soft); }
.pet-link:hover { border-color: var(--color-accent-line); }
.pet-link > img,.pet-link > .no-photo { display: block; border-radius: 0; aspect-ratio: 4/3; }
.pet-link > .no-photo { display: grid; color: var(--color-accent); background: var(--color-accent-soft); }
.pet-caption { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; }
.pet-caption h3 { font-size: 21px; margin: 0 0 4px; }
.pet-caption .icon { color: var(--color-muted); }
.reminder { align-items: start; gap: 14px; padding-block: 18px; }
.reminder:first-of-type { margin-top: 20px; }
.reminder a { color: var(--color-ink); font-size: 14px; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.reminder a:hover { text-decoration: underline; }
.reminder div { min-width: 0; }
.reminder div .badge { display: inline-flex; margin-top: 8px; }
.date-tile { background: var(--color-paper); border: 1px solid var(--color-rule); border-radius: 11px; text-align: center; min-width: 54px; padding: 6px; }
.date-tile strong { display: block; font-size: 21px; color: var(--color-ink); line-height: 1.2; font-weight: 600; }
.date-tile span { font-size: 10px; }
.badge { padding: 4px 9px; border-radius: 6px; font-size: 11px; font-weight: 600; line-height: 1.5; }
.badge-pending { color: var(--color-accent); background: var(--color-accent-soft); }
.badge-overdue { color: var(--color-error); background: var(--color-error-soft); }
.badge-done { color: var(--color-success); background: var(--color-success-soft); }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--color-muted); text-decoration: none; font-size: 13px; margin: -10px 0 24px; }
.back:hover { color: var(--color-accent); }
.editor-layout { display: grid; grid-template-columns: minmax(0,.75fr) minmax(0,1.5fr); gap: 70px; align-items: start; }
.editor-intro { padding-top: 14px; }
.editor-intro h1 { font-size: 36px; line-height: 1.2; }
.editor-intro > p { color: var(--color-muted); font-size: 15px; margin-top: 18px; }
.intro-note { display: flex; align-items: start; gap: 12px; border-top: 1px solid var(--color-rule); margin-top: 32px; padding-top: 24px; }
.intro-note > .icon { color: var(--color-accent); margin-top: 3px; }
.intro-note p { color: var(--color-muted); font-size: 13px; }
.form-panel { background: var(--color-card); border: 1px solid var(--color-rule); border-radius: var(--radius-panel); box-shadow: var(--shadow-soft); padding: 32px; gap: 28px; }
fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
legend { padding: 0; font-size: 17px; font-weight: 650; margin-bottom: 16px; }
.form-description { font-size: 13px; color: var(--color-muted); margin: -8px 0 18px; }
.form .field { display: flex; flex-direction: column; gap: 7px; }
.form .field + .field { margin-top: 18px; }
.form .fields .field { margin-top: 0; }
.form .fields { gap: 18px 20px; }
.form .fields + .field { margin-top: 18px; }
.form label,.fields label { font-size: 13px; font-weight: 550; margin: 0; }
.field label span { color: var(--color-muted); font-weight: 400; font-size: 12px; }
input,select,textarea { background: var(--color-card); border-color: var(--color-input-edge); border-radius: 9px; padding: 11px 13px; min-height: 46px; font-size: 15px; line-height: 1.5; }
input:hover,select:hover,textarea:hover { background: var(--color-paper); border-color: var(--color-muted); }
input::placeholder,textarea::placeholder { color: var(--color-muted); opacity: 1; font-weight: 400; }
textarea { min-height: 122px; }
.form-actions { display: flex; gap: 16px; align-items: center; justify-content: flex-end; border-top: 1px solid var(--color-rule); padding-top: 24px; }
.form-actions > a { min-height: 44px; display: inline-flex; align-items: center; padding: 8px; font-size: 13px; color: var(--color-muted); text-decoration: none; }
.form .form-actions .button { margin: 0; }
.photo-field { background: var(--color-paper); border: 1px dashed var(--color-accent-line); border-radius: 12px; padding: 22px; }
.photo-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.photo-options .photo-field { min-width: 0; padding: 18px; }
.photo-options .photo-field p { font-size: 12px; }
.camera-help { margin: 12px 0 0; font-size: 12px; }
#photo-status { margin-top: 12px; overflow-wrap: anywhere; }
#photo-selection { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 16px; }
#photo-selection #photo-preview { margin: 0; }
.photo-label { display: flex; align-items: center; gap: 10px; }
.photo-field p { margin: 10px 0 14px; }
input[type=file] { padding: 6px; font-size: 12px; background: var(--color-card); }
input[type=file]::file-selector-button { font: inherit; color: var(--color-accent); background: var(--color-accent-soft); border: 0; border-radius: 5px; padding: 8px 12px; margin-right: 10px; cursor: pointer; }
#photo-preview { display: block; object-fit: cover; max-width: 100%; border-radius: 10px; margin-top: 18px; }
.reminder-field input { max-width: 280px; }
.reminder-field .muted { margin: 4px 0 0; line-height: 1.6; }
.login-layout { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); background: var(--color-card); border: 1px solid var(--color-rule); border-radius: 24px; overflow: clip; box-shadow: var(--shadow-soft); max-width: 1080px; margin: 22px auto; }
.login-story { padding: 46px 48px; background: var(--color-story); color: var(--color-story-ink); }
.story-mark { width: 64px; height: 64px; display: grid; place-items: center; background: var(--color-accent-soft); border-radius: 20px; margin-bottom: 32px; }
.login-story h1 { color: var(--color-story-ink); font-size: 47px; line-height: 1.12; letter-spacing: -.045em; }
.login-story > p { font-size: 15px; line-height: 1.8; margin: 20px 0 26px; max-width: 35ch; }
.story-features { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.story-features li { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.story-signoff { border-top: 1px solid var(--color-accent-line); padding-top: 24px; margin-top: 34px; font-size: 13px; line-height: 1.8; }
.story-signoff strong { font-weight: 600; }
.login-entry { align-self: center; padding: 48px; margin: 0; }
.login-heading h2 { font-size: 27px; margin: 0 0 8px; }
.login-heading p { font-size: 14px; color: var(--color-muted); }
.login-form { padding: 24px 0 0; gap: 20px; }
.login-form .field + .field { margin: 0; }
.form.login-form .button { align-self: stretch; margin-top: 6px; justify-content: space-between; }
.login-footnote { font-size: 12px; color: var(--color-muted); border-top: 1px solid var(--color-rule); padding-top: 24px; margin: 30px 0 0; }
.auth-page main { padding-block: 26px; }
.profile { grid-template-columns: 160px minmax(0,1fr) auto; gap: 30px; background: var(--color-card); border: 1px solid var(--color-rule); border-radius: var(--radius-panel); padding: 28px; margin: 0 0 32px; box-shadow: var(--shadow-soft); }
.portrait { width: 160px; height: 160px; border-radius: 16px; background: var(--color-accent-soft); color: var(--color-accent); }
.profile h1 { font-size: 36px; margin-bottom: 8px; }
.species-label { font-size: 14px; color: var(--color-muted); margin: 0 0 8px; }
.profile .preserve { color: var(--color-ink-2); font-size: 13px; margin-bottom: 18px; }
.profile .actions { gap: 18px; }
.edit-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; text-decoration: none; font-size: 13px; color: var(--color-muted); }
.weight-summary { border-left: 1px solid var(--color-rule); padding-left: 30px; min-width: 150px; }
.weight-summary > .icon { color: var(--color-accent); margin-bottom: 8px; }
.weight-summary p { font-size: 12px; color: var(--color-muted); margin: 0; }
.weight-summary strong { display: block; font-size: 32px; font-weight: 600; font-variant-numeric: tabular-nums; }
.weight-summary small { font-size: 15px; font-weight: 400; }
.weight-summary time { font-size: 11px; }
.profile-grid { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 32px; align-items: start; }
.history-panel { background: var(--color-card); border: 1px solid var(--color-rule); border-radius: var(--radius-panel); padding: 28px; }
.filter { margin-bottom: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--color-rule); gap: 10px; }
.filter label { font-size: 12px; color: var(--color-muted); }
.filter select { flex: 1; max-width: none; font-size: 13px; }
.filter .secondary { padding-inline: 14px; }
.timeline article { grid-template-columns: 105px minmax(0,1fr); gap: 18px; border: 0; padding-block: 22px; }
.timeline article + article { border-top: 1px solid var(--color-rule); }
.timeline-date { display: flex; flex-direction: column; gap: 12px; align-items: start; }
.timeline-date time { font-size: 11px; }
.timeline-marker { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--color-accent-soft); color: var(--color-accent); }
.timeline-content h3 { font-size: 17px; }
.entry-meta { color: var(--color-muted); font-size: 12px; margin: 7px 0 14px; }
.timeline-content .preserve { font-size: 14px; line-height: 1.8; margin-bottom: 14px; }
.entry-weight { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.entry-weight .icon { width: 16px; height: 16px; color: var(--color-muted); }
.entry-reminder { padding-top: 12px; border-top: 1px dashed var(--color-rule); }
.entry-reminder > p { display: flex; gap: 7px; align-items: center; font-size: 12px; margin: 0 0 8px; }
.entry-reminder > p .icon { width: 15px; height: 15px; }
.entry-reminder form { margin-top: 12px; }
.entry-reminder button { font-size: 12px; white-space: normal; }
.history-empty { text-align: center; padding: 36px 12px; }
.history-empty > .icon { width: 30px; height: 30px; color: var(--color-accent); margin-bottom: 16px; }
.history-empty h3 { font-size: 18px; margin-bottom: 10px; }
.history-empty p { font-size: 13px; color: var(--color-muted); max-width: 40ch; margin: 0 auto 18px; }
.history-empty a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }
.weight-panel h2 { font-size: 17px; margin-bottom: 8px; }
.weight-history > div { justify-content: space-between; gap: 12px; padding-block: 13px; }
.weight-history time { font-size: 12px; }
.weight-history strong { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.weight-history small { font-weight: 400; }
.profile-aside .care-note { padding-inline: 8px; }
.message { border-radius: 12px; font-size: 14px; background: var(--color-error-soft); margin-bottom: 24px; max-width: none; }
footer.shell { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 24px; font-size: 11px; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; }
.skip { z-index: 10; }
@media(min-width: 1500px) { main { padding-top: 54px; } }
@media(max-width: 1050px) {
  .brand span { display: none; }
  .dashboard-grid { grid-template-columns: minmax(0,1fr) 310px; gap: 24px; }
  .companions > .section-heading > .muted { display: none; }
  .editor-layout { grid-template-columns: minmax(0,.7fr) minmax(0,1.5fr); gap: 32px; }
  .login-story,.login-entry { padding: 36px; }
  .login-story h1 { font-size: 40px; }
  .profile-grid { grid-template-columns: minmax(0,1fr) 260px; gap: 24px; }
  .weight-summary { padding-left: 20px; min-width: 125px; }
}
@media(max-width: 760px) {
  .shell { padding-inline: 20px; }
  .header-inner { min-height: 0; padding-block: 17px 10px; flex-wrap: wrap; gap: 10px; }
  .brand { font-size: 31px; }
  .brand img { width: 30px; height: 30px; }
  nav { width: 100%; gap: 4px; justify-content: space-between; }
  .nav-link { font-size: 12px; padding: 9px 10px; gap: 6px; }
  .nav-link .icon { width: 16px; height: 16px; }
  .exit { margin: 0; border: 0; padding: 10px; }
  .exit span { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: clip; }
  .header-note { font-size: 11px; }
  main { padding-block: 28px 40px; }
  h1 { font-size: 29px; }
  .page-heading { gap: 20px; margin-bottom: 28px; align-items: start; flex-wrap: wrap; }
  .page-heading p { font-size: 14px; }
  .dashboard-heading .button { width: 100%; }
  .dashboard-grid,.profile-grid { grid-template-columns: minmax(0,1fr); gap: 24px; }
  .pet-empty { padding: 32px 22px 26px; }
  .pet-empty h3 { font-size: 22px; }
  .empty-mark { width: 78px; height: 78px; border-radius: 25px; margin-bottom: 20px; }
  .pet-empty .secondary { width: 100%; }
  .care-panel { padding: 22px; }
  .care-empty { padding-block: 24px; }
  .care-note { padding-block: 18px 0; }
  .pets { gap: 14px; }
  .pet-caption { padding: 14px; }
  .pet-caption h3 { font-size: 18px; }
  .pet-caption span { font-size: 12px; }
  .pet-caption .icon { width: 16px; height: 16px; }
  .editor-layout { grid-template-columns: minmax(0,1fr); gap: 24px; }
  .editor-intro { padding: 0; }
  .editor-intro h1 { font-size: 30px; }
  .editor-intro > p { margin: 12px 0 0; font-size: 14px; }
  .editor-intro .intro-note { display: none; }
  .form-panel { padding: 24px 20px; gap: 28px; }
  .form .fields { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .form-panel input,.form-panel select,.form-panel textarea,.login-form input { font-size: 16px; }
  .photo-field { padding: 18px; }
  .photo-options { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .form-actions { justify-content: space-between; }
  .form-actions .button { max-width: 75%; padding-inline: 12px; }
  .login-layout { grid-template-columns: minmax(0,1fr); margin: 0; border-radius: 18px; }
  .login-story { padding: 28px; }
  .login-story h1 { font-size: 36px; }
  .story-mark { width: 48px; height: 48px; border-radius: 15px; margin-bottom: 20px; }
  .story-mark img { width: 32px; height: 32px; }
  .login-story > p { margin: 16px 0 0; font-size: 14px; }
  .story-features,.story-signoff { display: none; }
  .login-entry { padding: 30px 26px; }
  .login-heading h2 { font-size: 24px; }
  .login-footnote { margin-top: 24px; padding-top: 20px; }
  .auth-page .header-inner { padding-block: 20px; }
  .auth-page main { padding-block: 22px 32px; }
  .back { margin-bottom: 18px; }
  .profile { grid-template-columns: 88px minmax(0,1fr); padding: 22px; gap: 18px; }
  .portrait { width: 88px; height: 88px; border-radius: 18px; font-size: 38px; align-self: start; }
  .profile h1 { font-size: 29px; }
  .profile-info { min-width: 0; }
  .profile .actions { gap: 8px; }
  .profile .button { padding: 10px; font-size: 12px; }
  .profile .edit-link { font-size: 12px; }
  .weight-summary { grid-column: 1/-1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--color-rule); }
  .weight-summary > .icon { margin: 0; }
  .weight-summary strong { font-size: 24px; margin-left: auto; }
  .weight-summary time { width: 100%; text-align: right; margin-top: -8px; }
  .history-panel { padding: 22px 18px; }
  .filter { gap: 8px; }
  .filter label { width: 100%; }
  .filter select { width: auto; min-width: 0; max-width: none; }
  .timeline article { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .timeline-date { flex-direction: row; align-items: center; gap: 10px; }
  .timeline-marker { width: 30px; height: 30px; border-radius: 8px; }
  .timeline-marker .icon { width: 16px; height: 16px; }
  .entry-reminder > p { align-items: start; }
  .profile-aside .care-note { padding: 0 4px; }
  footer.shell { flex-wrap: wrap; font-size: 10px; }
}
@media(max-width: 360px) {
  .shell { padding-inline: 16px; }
  .nav-link { padding-inline: 7px; font-size: 11px; }
  .nav-link .icon { display: none; }
  .pets { grid-template-columns: minmax(0,1fr); }
  .header-note { max-width: 125px; text-align: right; }
  .profile { padding: 18px; grid-template-columns: minmax(0,1fr); }
  .profile .actions .button { width: 100%; font-size: 13px; }
  .weight-summary { grid-column: auto; }
}
@media(prefers-reduced-motion: reduce) { button:active,.button:active { transform: none; } }
