/* Shared visual language. Loaded after page styles; no calendar or mobile grid changes. */
:root {
  --wd-bg: #faf8f1;
  --wd-card: #fffdf7;
  --wd-ink: #203e2d;
  --wd-muted: #656d61;
  --wd-border: #d7d4c5;
  --wd-accent: #315d43;
  --wd-soft: #edf1e3;
  --primary-bg: #315d43;
  --primary-hover: #244a34;
  --field-bg: #fffdf7;
  --surface-subtle: #f3efe4;
  --focus-color: #315d43;
  --radius-card: 12px;
  --radius-control: 8px;
  --fall-accent: #a64f20;
  --shared-heading: Gabriela, Georgia, serif;
}
html[data-theme="dark"] {
  --wd-bg: #171c18;
  --wd-card: #1c221d;
  --wd-ink: #f5f4ec;
  --wd-muted: #b9c0b7;
  --wd-border: #3c4439;
  --wd-accent: #b7d3a6;
  --wd-soft: #2b3628;
  --primary-bg: #b7d3a6;
  --primary-hover: #c5dfb5;
  --primary-text: #203225;
  --field-bg: #202720;
  --surface-subtle: #252f25;
  --focus-color: #d1b27e;
  --fall-accent: #e4a170;
}
body { background: var(--wd-bg); color: var(--wd-ink); }
.personal-home-shell { --wd-bg: #faf8f1; }
body :is(h1, h2, h3, .brand-wordmark) {
  font-family: var(--shared-heading);
  color: var(--wd-ink);
  letter-spacing: -.025em;
}
body h1 { line-height: 1.2; }
body h2 { line-height: 1.3; }
body :is(.page-header, .form-heading, .section-heading) { gap: 16px; }
body :is(.page-header, .form-heading) p { line-height: 1.6; }
body :is(.panel, .card, .form-card, .summary-card, .overview-card, .analytics-stat, .calm-card) {
  border-color: var(--wd-border);
  border-radius: var(--radius-card);
  background: var(--wd-card);
  color: var(--wd-ink);
  box-shadow: none;
}
body :is(.form-card, .form-page, .wd-task-form) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  font: inherit;
  background: var(--field-bg);
  color: var(--wd-ink);
  border: 1px solid var(--wd-border);
  border-radius: var(--radius-control);
  max-width: 100%;
}
body .form-field { margin-bottom: 18px; }
body .button { border-radius: var(--radius-control); }
body .eyebrow, body .home-eyebrow { color: var(--fall-accent); }
body .home-leaves { color: var(--fall-accent); }
/* Keep dog / robot / both / off preferences and the existing mascot container size. */
.companion-character img { width: 200%; top: 0; height: auto; }
.companion-character--dog img { left: 0; width: 200%; transform: none; }
.companion-character--robot img { left: 0; transform: translateX(-50%); }
.companion-art::before { background: #efe6d4; }
html[data-theme="dark"] .companion-art::before { background: #342f23; }
@media (min-width: 1024px) {
  body:not(.personal-home-shell) > .container { padding: 32px 34px 48px; }
  body:not(.personal-home-shell) .form-page { max-width: 840px; margin-inline: auto; }
}
@media (max-width: 767px) {
  body :is(input, select, textarea) { font-size: max(16px, 1em); }
}

.companion-character { aspect-ratio: 887.0 / 887; }

/* Same page framing everywhere, with route-specific decorative companions. */
.page-companion-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 164px; padding: 20px 28px; margin-bottom: 28px;
  border: 1px solid var(--wd-border); border-radius: var(--radius-card);
  background: var(--wd-card); color: var(--wd-ink);
}
.page-companion-copy { min-width: 0; }
.page-companion-copy .eyebrow { margin: 12px 0 4px; }
.page-companion-subtitle { margin: 0; font-family: var(--shared-heading); font-size: clamp(1.1rem, 2vw, 1.5rem); }
.page-mascots { display: flex; flex: 0 0 auto; width: 248px; align-items: end; justify-content: center; pointer-events: none; }
.page-mascot { display: block; position: relative; flex: 0 0 124px; width: 124px; aspect-ratio: 1; overflow: hidden; }
.page-mascot img { display: block; position: absolute; top: 0; left: 0; width: 200%; height: auto; max-width: none; }
.page-mascot--robot img { transform: translateX(-50%); }
.companion-character--dog img, .page-mascot--dog img { width: 150%; left: -19%; transform: none; }
.page-mascots--dog, .page-mascots--robot { width: 124px; }
/* Consistent page width, title spacing, and content surfaces. Data grids keep their own columns. */
body:not(.personal-home-shell) > .container { max-width: 1280px; }
body:not(.personal-home-shell) .page-header { margin-bottom: 24px; }
body:not(.personal-home-shell) :is(.form-page, .chat-page) { width: 100%; }
@media (max-width: 767px) {
  .page-companion-banner { gap: 10px; min-height: 108px; padding: 14px 16px; margin-bottom: 20px; }
  .page-mascots { width: 108px; }
  .page-mascot { flex-basis: 54px; width: 54px; }
  .page-mascots--dog, .page-mascots--robot { width: 68px; }
  .page-mascots--dog .page-mascot, .page-mascots--robot .page-mascot { flex-basis: 68px; width: 68px; }
  .page-companion-subtitle { font-size: 1rem; line-height: 1.4; }
}
@media (min-width: 1024px) {
  body:has(> .mobile-tabs):not(.personal-home-shell) {
    display: grid; grid-template-columns: 200px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto; min-height: 100dvh;
  }
  body:has(> .mobile-tabs):not(.personal-home-shell) > .topbar { grid-column: 1 / -1; grid-row: 1; }
  body:has(> .mobile-tabs):not(.personal-home-shell) > .container { grid-column: 2; grid-row: 2; min-width: 0; }
  body:has(> .mobile-tabs):not(.personal-home-shell) > .site-footer { grid-column: 2; grid-row: 3; }
  body:not(.personal-home-shell) > .mobile-tabs {
    position: static; grid-column: 1; grid-row: 2 / 4; display: flex; flex-direction: column;
    align-items: stretch; justify-content: flex-start; gap: 10px; width: auto; max-width: none;
    margin: 0; padding: 28px 14px; border-top: 0; border-right: 1px solid var(--wd-border);
    background: var(--wd-card); transform: none;
  }
  body:not(.personal-home-shell) > .mobile-tabs a {
    display: flex; flex-direction: row; justify-content: flex-start; gap: 13px;
    min-height: 54px; padding: 12px 16px; border-radius: 9px; font-size: .95rem;
  }
  body:not(.personal-home-shell) > .mobile-tabs a[aria-current] { color: var(--wd-ink); background: var(--wd-soft); }
}

@media (min-width: 1024px) { body:not(.personal-home-shell) > .mobile-tabs { min-height: 0; } body:not(.personal-home-shell) > .mobile-tabs a { flex: 0 0 auto; } }


/* Trip tools share the existing page cards and controls. */
.trip-checklist { list-style: none; padding: 0; }
.trip-checklist li { margin-block: .75rem; }
.trip-checklist form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.trip-checklist button:first-of-type { flex: 1 1 14rem; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.trip-checklist button[aria-pressed="true"] { opacity: .7; text-decoration: line-through; }

.companion-character--curly img,
.page-mascot--curly img { width: 100%; }
.page-mascots--curly { width: 124px; }
.page-mascots--all { width: 270px; }
.page-mascots--all .page-mascot { flex-basis: 90px; width: 90px; }

@media (max-width: 767px) {
  .page-mascots--curly { width: 68px; }
  .page-mascots--curly .page-mascot { flex-basis: 68px; width: 68px; }
  .page-mascots--all { width: 108px; }
  .page-mascots--all .page-mascot { flex-basis: 36px; width: 36px; }
}
