:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #173f43;
  background: #fff8ef;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
.staging-notice { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; width: min(100%, 860px); margin: 0 auto; padding: 10px 16px; background: #173f43; color: #fff; font-size: 13px; line-height: 1.4; text-align: center; }
.staging-notice strong { font-weight: 850; }
.staging-notice span { color: #d9eee8; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid #f38a5c; outline-offset: 3px; }

.app-shell {
  width: min(100%, 860px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 24px 116px;
  background: #fffdf9;
  box-shadow: 0 0 0 1px rgba(29, 74, 72, .04), 0 28px 90px rgba(75, 63, 46, .09);
}

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 28px 0 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #124d53; font-size: 28px; font-weight: 850; letter-spacing: -.055em; text-decoration: none; }
.brand__mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 14px; color: #fff; background: #ff886b; font-size: 25px; transform: rotate(-8deg); }
.household-pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; background: #eaf6ed; color: #255c50; border-radius: 999px; font-size: 13px; font-weight: 750; white-space: nowrap; }
.household-pill::before { content: "⌂"; font-size: 21px; line-height: 12px; }

.greeting { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 8px 0 24px; }
.eyebrow { display: block; color: #c96b54; font-size: 13px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.greeting h1 { margin: 8px 0 4px; color: #0b4850; font-size: clamp(30px, 6vw, 44px); line-height: 1.08; letter-spacing: -.055em; }
.greeting p { margin: 0; color: #617779; font-size: 16px; }
.sunshine { display: block; width: 56px; height: 56px; filter: drop-shadow(0 7px 8px rgba(244, 182, 66, .22)); }
.sunshine svg { display: block; width: 100%; height: 100%; }

.demo-panel { margin-bottom: 24px; padding: 0 16px; border: 1px solid #f4e5d2; border-radius: 20px; background: #fff5e8; }
.demo-panel__summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 60px; cursor: pointer; list-style: none; }
.demo-panel__summary::-webkit-details-marker { display: none; }
.demo-panel__summary strong { display: block; color: #244d4e; font-size: 14px; }
.demo-panel__summary small { display: block; margin-top: 2px; color: #687a78; font-size: 12px; }
.demo-panel__current { color: #346668; font-size: 13px; font-weight: 800; white-space: nowrap; }
.demo-panel__current::after { content: "⌄"; display: inline-block; margin-left: 8px; font-size: 17px; }
.demo-panel[open] .demo-panel__current::after { transform: rotate(180deg); }
.demo-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; padding: 2px 0 15px; }
.demo-controls input[type="time"] { width: 104px; min-height: 42px; padding: 7px 9px; border: 1px solid #d8e2dd; border-radius: 12px; color: #194b50; background: #fff; font-weight: 750; }
.mini-button { min-width: 40px; min-height: 42px; padding: 8px 11px; border: 1px solid #d7e5df; border-radius: 12px; color: #14505a; background: #fff; font-weight: 800; }
.mini-button:hover { background: #ebf7f2; }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 0 15px; }
.section-heading h2 { margin: 0; color: #124b52; font-size: 25px; line-height: 1.1; letter-spacing: -.035em; }
.section-heading p { margin: 4px 0 0; color: #687b7b; font-size: 14px; }
.count-pill { padding: 9px 12px; border-radius: 999px; background: #e8f4ec; color: #266651; font-size: 13px; font-weight: 800; white-space: nowrap; }

.alert-banner { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 18px; padding: 16px 18px; border: 1px solid #f6cbba; border-radius: 19px; background: #fff0e9; }
.alert-banner__icon { display: grid; flex: 0 0 36px; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: #ffd9c8; font-size: 20px; }
.alert-banner strong { display: block; color: #914536; font-size: 15px; }
.alert-banner p { margin: 3px 0 0; color: #775a54; font-size: 13px; line-height: 1.4; }
.alert-banner__action { margin-top: 10px; }
.alert-banner--soon { border-color: #f2ddb4; background: #fff8e9; }
.alert-banner--soon .alert-banner__icon { background: #ffedc9; }
.alert-banner--soon strong { color: #73591d; }

.task-list { display: grid; gap: 12px; }
.task-card { display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: 15px; min-height: 125px; padding: 17px; border: 1.5px solid #e9ece4; border-radius: 23px; background: #fff; box-shadow: 0 7px 25px rgba(38, 67, 56, .035); }
.task-card--due { border-color: #ffae93; background: #fff9f5; }
.task-card--soon { border-color: #f1d58d; background: #fffdf6; }
.task-card--done { border-color: #d9ebdf; background: #f5fbf6; }
.task-card__icon { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 18px; background: #f7ede3; font-size: 31px; }
.task-card__icon svg { width: 34px; height: 34px; color: #805244; }
.task-card__icon--walk svg { color: #2c6863; }
.task-card__icon--brush svg { color: #925748; }
.task-card__icon--play svg { color: #795a80; }
.task-card--due .task-card__icon { background: #ffe6db; }
.task-card--soon .task-card__icon { background: #fff0c8; }
.task-card--done .task-card__icon { background: #e5f3e7; }
.task-card__main h3 { margin: 0 0 5px; color: #17474e; font-size: 19px; letter-spacing: -.02em; }
.task-card__main p { margin: 0; color: #637779; font-size: 14px; line-height: 1.4; }
.task-card__main p + p { margin-top: 3px; }
.task-card__side { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; min-width: 145px; text-align: right; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.status--due { color: #c65644; }.status--soon { color: #86620f; }.status--done { color: #27764b; }.status--upcoming { color: #667777; }
.task-card__detail { max-width: 200px; color: #587071; font-size: 13px; line-height: 1.35; }
.task-card__detail--blocked { color: #8a5942; }
.task-card__actions { display: flex; gap: 7px; justify-content: flex-end; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 10px 16px; border: 1px solid transparent; border-radius: 14px; font-size: 14px; font-weight: 800; text-decoration: none; transition: transform .15s ease, background .15s ease; }
.button:not(:disabled):hover { transform: translateY(-1px); }
.button--primary { color: #fff; background: #11616a; box-shadow: 0 6px 13px rgba(13, 95, 104, .15); }
.button--primary:hover { background: #0d4e57; }
.button--primary:disabled { color: #7c8986; background: #e4eae7; box-shadow: none; }
.button--quiet { border-color: #dce6e1; color: #21545a; background: #fff; }
.button--small { min-height: 40px; padding: 8px 13px; font-size: 13px; }
.text-button { min-height: 42px; padding: 4px 5px; border: 0; background: transparent; color: #16646b; font-size: 13px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

.bottom-nav { position: fixed; z-index: 5; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4, 1fr); width: min(100%, 860px); margin: 0 auto; padding: 10px max(18px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); border-top: 1px solid #e9ede8; border-radius: 20px 20px 0 0; background: rgba(255, 253, 249, .96); box-shadow: 0 -8px 30px rgba(35, 68, 59, .06); backdrop-filter: blur(16px); }
.nav-button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 57px; border: 0; border-radius: 15px; background: transparent; color: #6b7b7b; font-size: 12px; font-weight: 700; }
.nav-button__icon { font-size: 23px; line-height: 1; }
.nav-button__icon svg { display: block; width: 23px; height: 23px; }
.nav-button--active { color: #09545d; background: #e8f5ef; }
.nav-button--tasks { color: #0d5961; font-weight: 850; }
.nav-button--tasks .nav-button__icon { display: grid; place-items: center; width: 38px; height: 38px; margin-top: -11px; border-radius: 14px; background: #d8f0e4; }
.nav-button--tasks .nav-button__icon svg { width: 24px; height: 24px; }

.topbar__left { display: flex; align-items: center; gap: 15px; min-width: 0; }
.household-menu { position: relative; z-index: 10; }
.household-menu summary { cursor: pointer; list-style: none; }
.household-menu summary::-webkit-details-marker { display: none; }
.household-menu__panel { position: absolute; top: calc(100% + 9px); left: 0; width: min(290px, calc(100vw - 32px)); padding: 16px; border: 1px solid #dce9df; border-radius: 18px; background: #fff; box-shadow: 0 18px 40px rgba(27, 57, 51, .15); }
.household-menu__panel strong, .household-menu__panel span { display: block; }
.household-menu__panel p, .household-menu__panel span { margin: 5px 0 11px; color: #617671; font-size: 13px; line-height: 1.4; }
.household-menu__panel button { width: 100%; min-height: 42px; margin: 5px 0 12px; border: 1px solid #cfe3d8; border-radius: 11px; background: #edf8f2; color: #15585c; font-weight: 800; text-align: left; padding: 9px 12px; }
.icon-button { display: grid; flex: 0 0 44px; place-items: center; width: 44px; height: 44px; border: 1px solid #dce9df; border-radius: 14px; background: #fff; color: #15585c; }
.icon-button svg { width: 23px; height: 23px; }
.icon-button--active { background: #e8f5ef; }
.attention-panel { margin-bottom: 25px; padding: 17px; border: 1px solid #e5eadf; border-radius: 22px; background: #f7fbf4; }
.attention-panel__heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.attention-panel__heading h3 { margin: 0; color: #174c51; font-size: 18px; }
.attention-panel__heading p { margin: 3px 0 0; color: #6b7c77; font-size: 13px; }
.attention-list { display: grid; gap: 8px; margin-top: 12px; }
.attention-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 49px; padding: 10px 12px; border: 1px solid #e1ebe0; border-radius: 13px; background: #fff; color: #245356; text-align: left; font-weight: 800; }
.attention-item:hover, .pet-card:hover { border-color: #92c6af; background: #fbfffb; }
.attention-item small { flex: 0 0 auto; color: #b35a44; font-size: 12px; }
.feed-heading { margin-top: 27px; }
.feed-list { display: grid; gap: 13px; }
.feed-post { overflow: hidden; padding: 17px; border: 1px solid #e7ece5; border-radius: 21px; background: #fff; }
.feed-post__heading { display: flex; align-items: center; gap: 11px; }
.feed-post__heading strong { color: #1c4f50; font-size: 15px; }
.feed-post__heading p { margin: 4px 0 0; color: #71807a; font-size: 12px; }
.feed-post__avatar, .profile-card__avatar { display: grid; flex: 0 0 42px; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #ffe5cb; color: #7b4e36; font-weight: 850; }
.feed-post__media { margin-top: 14px; border-radius: 15px; background: #f0f6ed; }
.feed-post__media img, .feed-post__media video { display: block; width: 100%; max-height: 350px; object-fit: contain; border-radius: 15px; }
.feed-post__footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 13px; color: #667b72; font-size: 12px; }
.task-group { margin: 20px 0 26px; }
.task-group h3 { margin: 0 0 11px; color: #215256; font-size: 18px; }
.task-group h3 span { color: #77908b; font-size: 13px; }
.task-group__empty { margin: 0; color: #80908a; font-size: 13px; }
.task-entry > .text-button { margin: 3px 0 0 8px; }
.back-link { margin-bottom: 12px; }
.detail-edit { margin-top: 18px; }
.pet-card { display: block; width: 100%; color: #245052; text-align: left; cursor: pointer; }
.pet-card strong { display: block; margin-bottom: 4px; font-size: 22px; }
.pet-card > span:not(.pet-card__art) { display: block; color: #6e7b7b; font-size: 14px; }
.pet-card .pet-card__link { margin-top: 13px; color: #16646b !important; font-weight: 800; }
.pet-profile, .profile-card { display: flex; align-items: center; gap: 20px; margin-bottom: 25px; padding: 20px; border: 1px solid #e8ece3; border-radius: 23px; background: #fff; }
.pet-profile img { width: 125px; height: 125px; object-fit: contain; border-radius: 17px; background: #fff1dc; }
.pet-profile h2, .profile-card h2 { margin: 5px 0; color: #164e52; font-size: 29px; }
.pet-profile p, .profile-card p { margin: 0; color: #667a75; }
.profile-card__avatar { flex-basis: 70px; width: 70px; height: 70px; font-size: 29px; }

.pet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.pet-card { overflow: hidden; padding: 20px; border: 1px solid #ebebe4; border-radius: 24px; background: #fff; }
.pet-card__art { display: grid; place-items: center; height: 188px; margin: -4px -4px 15px; border-radius: 19px; background: #fff1dc; }
.pet-card:nth-child(2) .pet-card__art { background: #f0ebfa; }
.pet-card__art img { width: 165px; max-height: 165px; }
.pet-card h3 { margin: 0 0 4px; font-size: 22px; }
.pet-card p { margin: 0; color: #6e7b7b; font-size: 14px; }
.info-card { margin-top: 20px; padding: 18px; border: 1px solid #e8eee7; border-radius: 20px; background: #f5faf6; color: #526e69; font-size: 14px; line-height: 1.5; }

.activity-list, .schedule-list { display: grid; gap: 11px; }
.activity-item, .schedule-item { display: flex; align-items: center; gap: 13px; padding: 16px; border: 1px solid #e9eee7; border-radius: 19px; background: #fff; }
.activity-item__icon { display: grid; flex: 0 0 43px; place-items: center; width: 43px; height: 43px; border-radius: 15px; background: #e8f6e9; font-size: 20px; }
.activity-item--alert .activity-item__icon { background: #fff0da; }
.activity-item__body { flex: 1; min-width: 0; }
.activity-item strong, .schedule-item strong { display: block; color: #214b4f; font-size: 15px; }
.activity-item p, .schedule-item p { margin: 4px 0 0; color: #6b7d7b; font-size: 13px; line-height: 1.35; }
.activity-item .text-button { min-height: 30px; padding-left: 0; }
.schedule-item__icon { display: grid; flex: 0 0 44px; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: #fff4e4; font-size: 23px; }
.schedule-item__icon svg { width: 27px; height: 27px; color: #805244; }
.schedule-item__body { flex: 1; min-width: 0; }
.role-note { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding: 12px 15px; border-radius: 16px; background: #edf8f3; color: #2d6a59; font-size: 13px; font-weight: 700; }
.role-note--member { background: #fff5e8; color: #81633d; }
.member-control { display: flex; align-items: center; gap: 7px; color: #667b7a; font-size: 13px; font-weight: 700; }
.member-control select { min-height: 44px; padding: 8px 32px 8px 12px; border: 1px solid #d9e5de; border-radius: 13px; background: #fff; color: #19545a; font-weight: 800; }
.empty-state { padding: 35px 22px; border: 1px dashed #d8e8dc; border-radius: 21px; color: #647a75; text-align: center; }
.empty-state strong { display: block; margin-bottom: 5px; color: #225252; }

.modal { width: min(calc(100% - 28px), 520px); max-height: min(90vh, 850px); padding: 0; border: 0; border-radius: 26px; box-shadow: 0 25px 75px rgba(20, 58, 55, .25); }
.modal::backdrop { background: rgba(20, 47, 46, .5); backdrop-filter: blur(4px); }
.modal__body { position: relative; margin: 0; padding: 28px; overflow-y: auto; }
.modal__close { position: absolute; top: 17px; right: 17px; width: 44px; height: 44px; border: 0; border-radius: 14px; color: #526f6d; background: #f1f6f2; font-size: 27px; line-height: 1; }
.modal__eyebrow { margin-bottom: 8px; color: #da7658; font-size: 12px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.modal h2 { max-width: calc(100% - 40px); margin: 0; color: #124c51; font-size: 28px; letter-spacing: -.04em; }
.modal__description { margin: 9px 0 21px; color: #637673; font-size: 14px; line-height: 1.5; }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; align-content: start; gap: 7px; color: #315b5b; font-size: 13px; font-weight: 800; }
.field--wide { grid-column: 1 / -1; }
.field input, .field select { width: 100%; min-height: 45px; padding: 10px 12px; border: 1px solid #d8e5dd; border-radius: 12px; background: #fff; color: #19494c; font-weight: 600; }
.proof-box { padding: 17px; border: 1px solid #e5ece4; border-radius: 18px; background: #f9fcf8; }
.proof-box strong { display: block; margin-bottom: 5px; }
.proof-box p { margin: 0 0 13px; color: #6a7e77; font-size: 13px; line-height: 1.4; }
.proof-box input[type="file"] { max-width: 100%; font-size: 13px; }
.proof-preview { margin-top: 14px; }
.proof-preview img, .proof-preview video, .media-view img, .media-view video { display: block; width: 100%; max-height: 320px; object-fit: contain; border-radius: 14px; background: #eaf0e9; }
.proof-preview span, .media-view p { display: block; margin: 8px 0 0; overflow-wrap: anywhere; color: #5f7470; font-size: 12px; }
.helper-text { margin-top: 10px; color: #906444; font-size: 13px; font-weight: 700; }
.toast { position: fixed; z-index: 20; right: 20px; bottom: 102px; left: 20px; width: max-content; max-width: calc(100% - 40px); margin: 0 auto; padding: 13px 19px; border-radius: 16px; background: #123f43; color: #fff; box-shadow: 0 12px 35px rgba(15, 57, 54, .25); font-size: 14px; font-weight: 750; opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity .2s ease, transform .2s ease; }
.toast--visible { opacity: 1; transform: translateY(0); }

@media (max-width: 630px) {
  .app-shell { padding-right: 16px; padding-left: 16px; }
  .topbar { padding-top: 19px; }
  .topbar__left { gap: 9px; }
  .brand { font-size: 24px; }
  .household-pill { padding: 9px 11px; font-size: 11px; }
  .greeting { margin-bottom: 18px; }
  .sunshine { width: 45px; height: 45px; }
  .demo-controls { justify-content: flex-start; }
  .task-card { grid-template-columns: 53px 1fr; gap: 11px; padding: 14px; }
  .task-card__icon { width: 53px; height: 53px; border-radius: 15px; font-size: 27px; }
  .task-card__side { grid-column: 2; align-items: flex-start; min-width: 0; text-align: left; }
  .task-card__actions { justify-content: flex-start; }
  .pet-card__art { height: 155px; }
  .pet-card__art img { width: 137px; }
}

@media (max-width: 410px) {
  .topbar__left .brand { font-size: 0; }
  .topbar__left .brand__mark { width: 34px; height: 34px; font-size: 23px; }
  .household-pill { font-size: 10px; }
  .pet-profile { gap: 12px; padding: 13px; }
  .pet-profile img { width: 85px; height: 85px; }
  .greeting h1 { font-size: 31px; }
  .pet-grid { gap: 10px; }
  .pet-card { padding: 12px; }
  .pet-card__art { height: 128px; }
  .pet-card__art img { width: 115px; }
  .form-grid { grid-template-columns: 1fr; }
  .field--wide { grid-column: auto; }
  .modal__body { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
