:root {
  color-scheme: light dark;
  --bg: light-dark(#f7f8fa, #141a23);
  --panel: light-dark(#ffffff, #202936);
  --text: light-dark(#202d43, #edf2fa);
  --muted: light-dark(#738096, #a9b7cb);
  --border: light-dark(#e9edf3, #344152);
  --blue: light-dark(#246de8, #8dbaff);
  --soft: light-dark(#edf3ff, #293d5b);
  --primary-text: light-dark(#ffffff, #14243c);
  --danger: light-dark(#ad3748, #ffb6c3);
  --danger-soft: light-dark(#fff0f2, #482d36);
  --success: light-dark(#347663, #96d3bd);
  --success-soft: light-dark(#edf7f2, #233e36);
  --waiting: light-dark(#986c2d, #e8c68c);
  --waiting-soft: light-dark(#fbf5e9, #44392a);
  --shadow: 0 4px 24px light-dark(#23334c04, #0000000c);
  --nav-height: 72px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { scroll-padding-top: 24px; scroll-padding-bottom: 120px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; min-height: 44px; color: var(--text); touch-action: manipulation; }
button:disabled { opacity: .5; cursor: default; }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
a { color: var(--blue); }
[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.phone {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  margin: auto;
  background: var(--bg);
}
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 72px;
  padding: max(16px, env(safe-area-inset-top, 0px)) 24px 12px;
  gap: 12px;
}
.brand-lockup { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand { font-size: 20px; font-weight: 650; letter-spacing: 1px; white-space: nowrap; }
.brand-mark { color: var(--blue); font-size: 27px; font-weight: 400; vertical-align: -1px; }
.brand-sub { color: var(--muted); font-size: 11px; letter-spacing: 1px; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.header-actions button { padding: 5px 0 5px 8px; background: none; border: 0; color: var(--muted); font-size: 12px; }
#logout { display: none; }
.test-banner {
  padding: 7px 20px;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  background: var(--waiting-soft);
  color: var(--waiting);
}
main { padding: 16px 24px calc(var(--nav-height) + var(--safe-bottom) + 32px); }
body:not(.is-auth) main { padding-bottom: 40px; }
.page-head { margin-bottom: 22px; }
.page-head > div { min-width: 0; }
.page-head > h1 + p { margin-top: 7px; }
.page-head > .eyebrow { margin-bottom: 9px; }
.page-head:has(> button) { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.page-head:has(> h1) { display: block; }
.page-head > button:first-child { margin-bottom: 12px; }
h1 { margin: 0; font-size: 25px; line-height: 1.4; font-weight: 650; letter-spacing: -.4px; overflow-wrap: anywhere; }
h2 { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 600; }
h3 { margin: 0; font-size: 16px; }
p { margin: 0; }
.greeting { margin: 5px 0 24px; }
.greeting h1 { margin: 3px 0 7px; }
.eyebrow { color: var(--blue); font-size: 11px; font-weight: 600; letter-spacing: 1.6px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.note { color: var(--muted); font-size: 12px; line-height: 1.7; margin-top: 12px; overflow-wrap: anywhere; }
.mini-label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 7px; }
.sync-note { margin-top: 22px; color: var(--muted); font-size: 11px; text-align: center; }
.loading-message { padding: 50px 0; text-align: center; font-size: 13px; }
.card, .income-overview, .notice-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
  overflow-wrap: anywhere;
}
.card { margin: 14px 0; }
.card > h2 { margin-bottom: 12px; }
.income-overview {
  background: linear-gradient(135deg, var(--panel) 55%, var(--soft));
  margin: 16px 0;
  padding: 22px 20px;
}
.income-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.income-grid > * { min-width: 0; }
.income-grid > * + * { padding-left: 18px; border-left: 1px solid var(--border); }
.income-overview .section-head { margin: 0 0 18px; }
.income-stat { display: grid; gap: 3px; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; text-align: left; }
.income-grid > .income-stat + .income-stat { padding-left: 18px; border-left: 1px solid var(--border); }
.income-stat .mini-label { margin-bottom: 2px; }
.income-stat .small { display: block; margin-top: 4px; font-size: 11px; }
.income-grid .amount { font-size: clamp(22px, 5.6vw, 25px); }
.amount { font-size: 28px; font-weight: 650; letter-spacing: -.8px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.big { font-size: 35px; font-weight: 650; line-height: 1.3; letter-spacing: -.8px; margin: 5px 0; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero { background: var(--panel); border: 1px solid var(--border); border-radius: 20px; padding: 22px; margin: 18px 0; }
.split, .line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.line { margin: 11px 0; }
.line > :first-child { min-width: 0; overflow-wrap: anywhere; }
.line > :last-child { flex-shrink: 0; }
.line:last-child { margin-bottom: 0; }
.section-title, .section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 26px 0 12px; }
.section-title { font-size: 15px; font-weight: 600; }
.section-head h2 { font-size: 15px; }
.action, .primary-cta {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  background: var(--soft);
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--blue);
  font-weight: 600;
  font-size: 15px;
}
.action { margin-top: 12px; }
.primary, .primary-cta { background: var(--blue); color: var(--primary-text); }
.primary-cta { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 18px 0; }
.primary-cta > span:first-child { font-size: 23px; line-height: 1; font-weight: 400; }
.primary-cta > span:last-child { margin-left: auto; font-size: 20px; line-height: 1; font-weight: 400; }
.primary-cta > span:first-child { margin-right: auto; }
.link { border: 0; background: none; color: var(--blue); font-size: 13px; text-align: left; padding: 8px 0; }
.link.danger, .danger { color: var(--danger); }
.badge, .status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  padding: 4px 8px;
  background: var(--soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  flex-shrink: 0;
}
.status-pill[data-tone="success"] { background: var(--success-soft); color: var(--success); }
.status-pill[data-tone="waiting"], .status-pill[data-tone="warning"] { background: var(--waiting-soft); color: var(--waiting); }
.status-pill[data-tone="danger"], .status-pill[data-tone="error"] { background: var(--danger-soft); color: var(--danger); }
.status-pill[data-tone="muted"] { background: var(--bg); color: var(--muted); }
.notice-card { margin: 14px 0; background: var(--waiting-soft); border-color: transparent; padding: 16px 18px; }
.notice-card p { font-size: 13px; }
.notice-card .link { font-weight: 600; }
.empty-state, .empty { padding: 36px 14px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.8; }
.empty-state h2 { color: var(--text); margin-bottom: 8px; }
.empty-state p + p { margin-top: 5px; }
.segmented, .tabs { display: flex; gap: 5px; margin: 18px 0; padding: 4px; background: light-dark(#eceff4, #202a38); border-radius: 13px; }
.segmented button, .tabs button { flex: 1; min-width: 0; padding: 8px 10px; background: none; border: 0; border-radius: 10px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.segmented [aria-pressed="true"], .tabs [aria-pressed="true"] { color: var(--text); background: var(--panel); font-weight: 600; box-shadow: 0 1px 4px #11223308; }
.search-box { position: relative; margin: 16px 0; }
.search-box input { padding-left: 14px; background: var(--panel); border-radius: 12px; }
.search-box label { margin: 0 0 6px; }
.filter-search { margin-bottom: 16px; }
.record-card { margin: 10px 0; border: 1px solid var(--border); border-radius: 16px; background: var(--panel); overflow: hidden; box-shadow: var(--shadow); }
details.record-card, details.card:has(> .record-trigger) { padding: 0; }
.record-trigger { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 12px; padding: 18px 17px; border: 0; background: none; text-align: left; }
.record-trigger > .record-summary { flex: 1; }
.record-trigger::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); flex-shrink: 0; }
.record-trigger[aria-expanded="true"]::after { transform: rotate(45deg); }
.record-summary { display: flex; flex: 1; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; }
.record-main { display: grid; gap: 5px; min-width: 0; }
.record-main strong { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.record-meta { display: flex; flex-wrap: wrap; gap: 3px 8px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.record-detail { padding: 0 17px 18px; border-top: 1px solid var(--border); font-size: 13px; }
.record-detail > :first-child { margin-top: 15px; }
.record-detail .line { font-size: 13px; }
.record-detail .note { font-size: 12px; }
.record-detail .receipt-actions { margin-top: 15px; }
.record-detail .list-row, details.card > .list-row { display: block; }
.record-detail .list-row > p + p { margin-top: 5px; }
.detail-code { padding: 12px 14px; margin-top: 12px; border-radius: 10px; background: var(--bg); font-size: 12px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; word-break: break-word; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 13px 0; border: 0; border-bottom: 1px solid var(--border); background: none; text-align: left; }
.list-row:last-child { border-bottom: 0; }
.list-row > :first-child { min-width: 0; }
.list-row .muted { font-size: 12px; }
.profile-head { display: flex; align-items: center; gap: 15px; margin: 8px 0 24px; }
.profile-head h1 { font-size: 23px; }
.avatar { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; background: var(--soft); color: var(--blue); font-weight: 600; font-size: 23px; flex-shrink: 0; }
.profile-links { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 1px 18px; margin: 15px 0; }
.profile-links .list-row { font-size: 14px; }
.profile-links > button { width: 100%; text-align: left; }
.detail-list { margin: 13px 0; }
.detail-list > div, .detail-list > section { padding: 12px 0; border-bottom: 1px solid var(--border); }
.detail-list > :last-child { border-bottom: 0; }
.billing-detail { margin: 14px 0; padding: 12px 14px; border-radius: 12px; background: var(--bg); }
.billing-detail > summary { color: var(--muted); font-size: 12px; }
.billing-detail > .small { margin-top: 12px; }
.billing-detail .detail-code { margin-top: 6px; padding: 8px 0; }
.progress-steps { list-style: none; margin: 14px 0; padding: 0; }
.progress-steps > * { position: relative; padding: 0 0 18px 22px; color: var(--muted); font-size: 12px; }
.progress-steps > *::before { content: ""; position: absolute; left: 1px; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.progress-steps > *:not(:last-child)::after { content: ""; position: absolute; left: 3.5px; top: 15px; bottom: 1px; width: 1px; background: var(--border); }
label { display: block; margin: 16px 0 7px; font-size: 13px; font-weight: 500; }
input, textarea, select { width: 100%; min-width: 0; padding: 13px 14px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); background: var(--panel); font-size: 16px; line-height: 1.5; scroll-margin-block: 90px 150px; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); outline: 2px solid var(--soft); outline-offset: 1px; }
input[type="checkbox"], input[type="radio"] { width: auto; min-width: 18px; min-height: 18px; accent-color: var(--blue); }
input[type="file"] { padding: 11px; font-size: 12px; }
input[type="file"]::file-selector-button { min-height: 36px; margin-right: 9px; padding: 6px 10px; border: 0; border-radius: 8px; background: var(--soft); color: var(--blue); font: inherit; }
input[type="date"] { min-height: 52px; -webkit-appearance: none; appearance: none; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
textarea { min-height: 104px; resize: vertical; }
.form-section { padding: 4px 0 14px; }
.form-section + .form-section { border-top: 1px solid var(--border); }
.form-section > h2 { margin: 18px 0 10px; font-size: 15px; }
.quick-options { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.quick-options button { min-height: 40px; padding: 8px 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); color: var(--muted); font-size: 12px; }
.quick-options button[aria-pressed="true"] { border-color: var(--blue); background: var(--soft); color: var(--blue); }
.form-actions { position: sticky; bottom: calc(var(--nav-height) + var(--safe-bottom) - 1px); z-index: 10; margin: 22px -24px 0; padding: 12px 24px 14px; border-top: 1px solid var(--border); background: var(--bg); }
.form-actions .action { margin-top: 0; }
.form-actions .note { text-align: center; margin-top: 7px; font-size: 11px; }
.form-actions .note + .action { margin-top: 10px; }
.rp-grid { display: grid; grid-template-columns: 1fr; gap: 2px; }
.rp-grid > div { min-width: 0; }
.rp-images { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.rp-images > div { display: grid; justify-items: start; gap: 3px; }
.rp-images img { display: block; width: 80px; height: 80px; object-fit: cover; border: 1px solid var(--border); border-radius: 12px; }
.rp-images .link { min-height: 36px; padding: 4px 2px; font-size: 12px; }
.rp-entry { margin: 20px 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 17px 0; }
details { margin-top: 14px; padding-top: 9px; border-top: 1px solid var(--border); }
summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; list-style: none; color: var(--blue); font-size: 13px; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
summary::marker { content: ""; }
summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); flex-shrink: 0; margin-right: 4px; }
details[open] > summary::after { transform: rotate(225deg); }
summary.record-trigger { color: var(--text); }
summary.record-trigger::after { transform: rotate(-45deg); }
details[open] > summary.record-trigger::after { transform: rotate(45deg); }
#error { margin: 10px 24px 0; padding: 12px 14px; border: 1px solid transparent; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-size: 13px; overflow-wrap: anywhere; }
#error.success { background: var(--success-soft); color: var(--success); }
nav {
  position: fixed;
  z-index: 20;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100%, 480px);
  min-height: calc(var(--nav-height) + var(--safe-bottom));
  padding: 8px 12px calc(8px + var(--safe-bottom));
  background: var(--panel);
  border-top: 1px solid var(--border);
}
nav button { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; min-height: 54px; padding: 4px 8px; border: 0; background: none; color: var(--muted); font-size: 11px; line-height: 1.4; }
nav svg { width: 21px; height: 21px; }
nav [aria-current="page"] { color: var(--blue); font-weight: 600; }
body.keyboard-open nav { display: none; }
body.keyboard-open .form-actions { position: static; }
body.keyboard-open main { padding-bottom: 24px; }
dialog { width: calc(100% - 32px); max-width: 430px; max-height: calc(100dvh - 40px); padding: 24px; border: 1px solid var(--border); border-radius: 23px; background: var(--panel); color: var(--text); overflow: auto; overscroll-behavior: contain; }
dialog::backdrop { background: #17213370; }
dialog h2 { margin-bottom: 10px; }
.receipt-top { padding: 20px; border-radius: 16px; background: var(--soft); margin-bottom: 20px; }
.receipt-top h2 { font-size: 14px; }
.receipt-top .big { margin: 16px 0 8px; }
.receipt-message { margin-top: 24px; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.9; }
.receipt-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.receipt-actions button { flex: 1; min-width: 100px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--soft); color: var(--blue); font-size: 13px; }
.print-note { margin-top: 12px; color: var(--muted); font-size: 11px; }

@media (min-width: 600px) {
  body { padding: 24px 0; }
  .phone { min-height: calc(100dvh - 48px); border: 1px solid var(--border); border-radius: 25px; }
  nav { bottom: 24px; border: 1px solid var(--border); border-radius: 0 0 25px 25px; }
  .app-header { padding-top: 19px; }
  .rp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 370px) {
  .app-header { padding-left: 18px; padding-right: 18px; }
  main { padding-left: 18px; padding-right: 18px; }
  .form-actions { margin-left: -18px; margin-right: -18px; padding-left: 18px; padding-right: 18px; }
  .income-grid { gap: 12px; }
  .income-grid > * + * { padding-left: 12px; }
  .amount { font-size: 25px; }
  .record-trigger { padding: 16px 14px; gap: 9px; }
  .record-summary { gap: 7px; }
  .brand-sub { display: none; }
}
@media (max-width: 400px) {
  .income-grid { grid-template-columns: 1fr; gap: 14px; }
  .income-grid > * + * { padding-left: 0; padding-top: 14px; border-left: 0; border-top: 1px solid var(--border); }
  .income-grid > .income-stat + .income-stat { padding-left: 0; padding-top: 14px; border-left: 0; border-top: 1px solid var(--border); }
  .income-stat { grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center; }
  .income-stat .mini-label { grid-column: 1; margin: 0; }
  .income-stat .amount { grid-column: 2; grid-row: 1 / span 2; font-size: clamp(22px, 6.4vw, 25px); }
  .income-stat .small { grid-column: 1; margin-top: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  button { transition: background-color .16s ease, border-color .16s ease, color .16s ease; }
}
@media print {
  body { padding: 0; background: #fff; }
  .phone, .receipt-actions { display: none !important; }
  dialog[open] { position: static; max-height: none; max-width: none; width: 100%; border: 0; box-shadow: none; background: #fff; color: #111; overflow: visible; }
  dialog::backdrop { display: none; }
}

/* Keep older mobile browsers readable when light-dark() is unavailable. */
@supports not (color: light-dark(white, black)) {
  :root {
    color-scheme: light;
    --bg: #f7f8fa; --panel: #fff; --text: #202d43; --muted: #738096;
    --border: #e9edf3; --blue: #246de8; --soft: #edf3ff; --primary-text: #fff;
    --danger: #ad3748; --danger-soft: #fff0f2; --success: #347663;
    --success-soft: #edf7f2; --waiting: #986c2d; --waiting-soft: #fbf5e9;
    --shadow: 0 4px 24px #23334c04;
  }
}

#voice-dialog{width:min(420px,calc(100% - 32px));max-height:85dvh;overflow:auto}#voice-dialog audio{display:block;width:100%;margin:12px 0}.voice-actions{display:grid;gap:10px}#voice-dialog [hidden]{display:none!important}

.member-card-image{display:block;max-width:100%;height:auto;border-radius:14px;margin:12px auto}.card-image-button{display:block;width:100%;padding:0;border:0;background:transparent}#info-dialog:has(.member-card-image){width:min(700px,calc(100% - 24px));max-height:90dvh;overflow:auto}

.card-save-actions{position:sticky;top:0;z-index:1;display:grid;grid-template-columns:1fr auto;gap:10px;padding:8px 0;background:#fff}.card-save-actions .action{margin:0}#info-dialog:has(#card-image-save)>button[data-close-info]{display:none}

/* A quiet corner for feedback and a local-only toy. */
.care-choice { display:flex; flex-direction:column; align-items:flex-start; gap:10px; width:100%; margin:14px 0; padding:23px; text-align:left; border:1px solid var(--border); border-radius:20px; background:var(--panel); box-shadow:var(--shadow); }
.care-choice strong { font-size:17px; }
.care-choice > span:not(.link):not(.care-choice-icon) { color:var(--muted); font-size:13px; line-height:1.7; }
.care-choice-icon { display:grid; place-items:center; width:48px; height:48px; border-radius:16px; background:var(--soft); color:var(--blue); font-size:25px; }
.care-choice-warm { background:#fff8ee; border-color:#f3e6d3; }
.care-choice img { width:76px; height:76px; border-radius:22px; object-fit:cover; }
.care-history { margin-top:28px; }
.care-history h2 { font-size:16px; }
.letter-card { margin:12px 0; padding:17px; background:var(--panel); border:1px solid var(--border); border-radius:16px; }
.letter-body,.letter-reply p { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.8; font-size:14px; }
.letter-body { margin-top:13px; }
.letter-reply { margin-top:16px; padding:14px; background:var(--soft); border-radius:12px; }
.letter-reply strong { font-size:12px; color:var(--blue); }
.letter-reply p { margin:7px 0; }
.care-error { color:#b42318; font-size:13px; line-height:1.7; margin:12px 0; }
.care-pages { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:16px 0; }
.care-play { padding:20px 15px; border:1px solid #efe5db; border-radius:24px; background:linear-gradient(165deg,#fff9ee,#f5f5ff); text-align:center; overflow:hidden; }
.care-bubble { min-height:54px; margin:3px 0 12px; padding:16px 12px; border-radius:18px; background:#ffffffda; color:#5a4b42; font-size:14px; line-height:1.6; }
.care-stage { position:relative; display:grid; place-items:center; padding:15px 9px 26px; }
.care-toy { width:min(100%,280px); padding:0; border:0; border-radius:35%; background:transparent; transform-origin:50% 85%; touch-action:manipulation; user-select:none; -webkit-tap-highlight-color:transparent; }
.care-toy img { display:block; width:100%; height:auto; border-radius:35%; pointer-events:none; user-select:none; -webkit-user-drag:none; box-shadow:0 18px 35px #a76b1b1a; }
.care-toy:focus-visible { outline:3px solid var(--blue); outline-offset:5px; }
.care-orbit { position:absolute; color:#c69b55; font-size:24px; pointer-events:none; }
.orbit-one { top:3%; left:7%; transform:rotate(-15deg); }
.orbit-two { right:5%; bottom:10%; color:#869bce; font-size:35px; }
.care-spark { position:absolute; top:20%; left:15%; width:70%; color:#bd8a35; font-size:30px; letter-spacing:12px; opacity:0; pointer-events:none; }
.care-gentle { margin:12px 0 8px; font-size:14px; color:#6a5a51; }
.care-play .note { line-height:1.8; }
.care-play .action { margin-top:20px; background:#ffffffb3; }
@media (prefers-reduced-motion:reduce) { .care-toy,.care-spark { transition:none!important; } }

.care-sound-row { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:-6px 0 9px; }
.care-sound { min-height:36px; padding:5px 11px; border:1px solid #e6ddd3; border-radius:999px; background:#ffffffb3; color:#7a6859; font-size:12px; touch-action:manipulation; }
.care-sound:focus-visible { outline:2px solid var(--blue); outline-offset:3px; }

.care-count { margin:0; text-align:left; color:#7a6859; font-size:12px; line-height:1.6; }
.care-count strong { color:#5a4b42; font-size:16px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.care-count > span { display:block; font-size:10px; color:var(--muted); }

.care-badge { display:table; margin:0 auto 10px; max-width:100%; padding:5px 12px; border:1px solid #eddba8; border-radius:999px; background:#fff4d8; color:#8c6928; font-size:12px; overflow-wrap:anywhere; }
.care-keepsakes { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:8px; min-height:44px; margin:12px auto 0; padding:9px 15px; border:1px solid #e5dcca; border-radius:12px; background:#fffcf5; color:#8b6b38; font-size:13px; }
.care-keepsakes span { font-size:11px; color:var(--muted); }
.care-egg-pop { position:absolute; z-index:2; bottom:12px; left:8%; width:84%; padding:11px 13px; border:1px solid #ecd9aa; border-radius:14px; background:#fffaf0f5; box-shadow:0 5px 20px #a883291c; color:#84662e; font-size:12px; line-height:1.6; pointer-events:none; }
.care-egg-stars { position:absolute; inset:0; pointer-events:none; }
.care-egg-stars span { position:absolute; opacity:0; color:#d5a851; font-size:25px; }
.care-egg-stars span:nth-child(1) { top:18%;left:2%; }
.care-egg-stars span:nth-child(2) { top:3%;left:30%;color:#a0a5df;--egg-delay:.08s; }
.care-egg-stars span:nth-child(3) { top:10%;right:4%;--egg-delay:.16s; }
.care-egg-stars span:nth-child(4) { bottom:30%;right:0;--egg-delay:.12s; }
.care-egg-stars span:nth-child(5) { bottom:3%;right:24%;color:#a0a5df;--egg-delay:.2s; }
.care-egg-stars span:nth-child(6) { bottom:8%;left:6%;--egg-delay:.1s; }
.is-celebrating .care-egg-stars span { animation:care-egg-star 1.5s ease-out 2;animation-delay:var(--egg-delay,0s); }
@keyframes care-egg-star { 0% { opacity:0;transform:translateY(10px) scale(.4) rotate(-20deg); } 25% { opacity:1; } 100% { opacity:0;transform:translateY(-35px) scale(1.25) rotate(20deg); } }
.care-egg-list { display:grid; gap:12px; margin:15px 0; }
.care-egg-card { padding:15px; border:1px solid #efe4cf; border-radius:15px; background:#fffcf7; text-align:left; }
.care-egg-card h3 { margin:7px 0; color:#785f3c; font-size:15px; }
.care-egg-card p { margin:0; color:#6d6458; font-size:13px; line-height:1.9; overflow-wrap:anywhere; }
@media (prefers-reduced-motion:reduce) { .care-egg-stars { display:none; } .is-celebrating .care-egg-stars span { animation:none; } }

.care-egg-actions { position:sticky;top:0;z-index:1;display:flex;justify-content:flex-end;padding:5px 0;background:var(--panel); }

/* Clear, comfortable return targets for mobile subpages. */
.back-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:9px 15px;border:1px solid #cbd8f6;border-radius:12px;background:#edf2ff;color:#315bb7;font-size:14px;font-weight:600;line-height:1.4;white-space:nowrap;touch-action:manipulation;cursor:pointer}
.back-button:active{background:#dfe8ff}.back-button:focus-visible{outline:3px solid #89a9f5;outline-offset:3px}
.page-head>.back-button{margin-bottom:20px}.dialog-heading{display:flex;align-items:center;gap:12px;margin-bottom:18px;flex-wrap:wrap}
