.secondary {
  max-width: 760px;
  margin-inline: auto;
  padding: clamp(28px, 6vw, 76px) 0 48px;
  color: var(--ink, #202329);
}
.secondary .page-head { margin: 0 0 clamp(26px, 5vw, 44px); }
.secondary .page-head h1 { margin: 0; font-size: clamp(30px, 5vw, 48px); letter-spacing: -.065em; line-height: 1.16; }
.diary-page { padding: clamp(25px, 4vw, 34px) 0; border-block-start: 1px solid var(--line, #e6e5e2); }
.diary-page h2 { margin: 0 0 12px; font-size: 15px; font-weight: 750; line-height: 1.55; }
.diary-page p { max-width: 62ch; margin: 0; font-size: clamp(16px, 2.5vw, 19px); letter-spacing: -.025em; line-height: 1.88; overflow-wrap: anywhere; }
.diary-page p + p { margin-top: .8em; }
.diary-status, .loading-note { margin: 0; color: var(--muted, #5d626a); line-height: 1.65; }
.diary-status { border-top: 1px solid var(--line, #e6e5e2); padding: 26px 0; }
.diary-more { margin-top: 12px; }
.diary-more[aria-disabled=true] { cursor: progress; }
.wallet-hero { display: flex; align-items: center; gap: 20px; padding: clamp(22px, 4vw, 34px); border: 1px solid var(--line, #e6e5e2); border-radius: 18px; background: white; }
.wallet-hero .coin-big { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--citrus); color: var(--on-citrus); font-size: 26px; font-weight: 800; }
.wallet-hero > div { display: grid; gap: 4px; }
.wallet-hero > div > span, .wallet-hero small { font-size: 13px; color: var(--muted, #5d626a); font-weight: 550; }
.wallet-hero strong { font-size: clamp(32px, 6vw, 46px); font-weight: 770; line-height: 1.15; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.list-heading { margin: 38px 0 14px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; }
.list-heading h2 { margin: 0; font-size: 21px; letter-spacing: -.04em; }
.list-heading span, .wallet-note { font-size: 13px; line-height: 1.65; color: var(--muted, #5d626a); }
#ledger { border-top: 1px solid var(--line, #e6e5e2); }
.ledger-row { padding: 18px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line, #e6e5e2); }
.ledger-row > div { display: grid; gap: 4px; min-width: 0; }
.ledger-row strong { font-size: 16px; line-height: 1.45; }
.ledger-row small { color: var(--muted, #5d626a); font-size: 13px; }
.ledger-row b { color: var(--orange); font-size: 17px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.empty { padding: 28px 0; }
.empty-icon { display: none; }
.empty h2 { margin: 0 0 5px; font-size: 16px; line-height: 1.5; }
.empty p, .wallet-note { margin: 0; color: var(--muted, #5d626a); }
.empty p { font-size: 14px; line-height: 1.65; }
.wallet-note { margin-top: 24px; }
.app-footer { padding: 24px 0; border-top: 1px solid var(--line, #e6e5e2); }
.app-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted, #5d626a); font-size: 13px; text-underline-offset: 3px; }
.app-footer a:hover { color: var(--ink, #202329); }
.event-slip { padding: 12px 0 2px; }
.event-sender, .followup-sender { display: block; color: var(--muted, #5d626a); font-size: 13px; font-weight: 650; }
.event-message, .event-followup p { margin: 5px 0 0; font-size: 14px; line-height: 1.65; color: var(--ink, #202329); }
.event-followup { margin-top: 16px; padding: 14px 16px; border-left: 3px solid var(--citrus); background: var(--tint); border-radius: 0 8px 8px 0; }
.event-followup h4 { margin: 0 0 5px; line-height: 1.45; font-size: 14px; }
.life-note { margin: 8px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.sleep-note { margin-top: 13px; }
.upcoming-rent { display: flex; justify-content: space-between; align-items: baseline; gap: 5px 12px; margin-top: 9px; font-size: .9rem; }
.upcoming-rent > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1px 8px; }
.upcoming-rent time { color: var(--muted); font-size: .85rem; }
.upcoming-rent strong { flex-shrink: 0; font-weight: 580; font-variant-numeric: tabular-nums; }
.cash-history { margin-top: 12px; border-top: 1px solid var(--line); }
.cash-history summary, .personal-pursuit summary { display: flex; align-items: center; gap: 8px; min-height: 44px; list-style: none; font-size: .9rem; font-weight: 650; }
.cash-history summary::-webkit-details-marker, .personal-pursuit summary::-webkit-details-marker { display: none; }
.cash-history summary::after, .personal-pursuit summary::after { content: ''; flex: none; width: 7px; height: 7px; margin: -4px 3px 0 auto; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg); }
.cash-history[open] summary::after, .personal-pursuit[open] summary::after { margin-top: 4px; transform: rotate(225deg); }
.personal-pursuit { margin-top: 8px; }
.personal-pursuit summary .ic { width: 16px; height: 16px; }
.personal-pursuit p { margin: 0 0 9px 24px; }
.cash-history ul { list-style: none; padding: 0; margin: 0; }
.cash-history li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 1px solid var(--line); padding: 9px 0; font-size: .9rem; }
.cash-history li div { display: grid; gap: 2px; }
.cash-history li time { color: var(--muted); font-size: .82rem; }
.cash-history li strong { flex-shrink: 0; font-weight: 630; font-variant-numeric: tabular-nums; }
.cash-in { color: var(--orange); }
#household:has(.cash-history:not([hidden])) + .home-people { margin-top: 0; }
.home-people { margin-top: 16px; border-top: 1px solid var(--line, #e6e5e2); }
.home-people summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; }
.home-people summary::-webkit-details-marker { display: none; }
.home-people summary::after { content: ''; display: block; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; margin: -4px 3px 0 auto; transform: rotate(45deg); flex: none; }
.home-people[open] > summary::after, .person-row[open] > summary::after { margin-top: 4px; transform: rotate(225deg); }
.home-people > summary { padding: 8px 0; font-size: 14px; font-weight: 660; }
.home-people > summary .ic { width: 16px; height: 16px; }
.person-row { border-top: 1px solid var(--line, #e6e5e2); }
.person-row > summary { padding: 5px 0; font-size: 14px; flex-wrap: wrap; }
.person-role, .meeting-count, .person-memories small, .person-empty { font-size: 12px; color: var(--muted, #5d626a); }
.person-row .meeting-count { margin-left: auto; }
.person-row summary:has(.meeting-count)::after { margin-left: 2px; }
.person-memories { list-style: none; margin: 0 0 13px; padding: 0 0 0 12px; border-left: 2px solid var(--line, #e6e5e2); }
.person-memories li + li { margin-top: 10px; }
.person-memories p, .person-empty { margin: 2px 0 0; line-height: 1.65; }
.person-memories p { font-size: 14px; }
.person-empty { margin-bottom: 12px; }
dialog { width: min(440px, calc(100% - 32px)); max-height: min(85vh, 740px); max-height: min(85dvh, 740px); margin: auto; padding: 0; overflow: auto; background: white; color: var(--ink, #202329); border: 1px solid var(--line, #e6e5e2); border-radius: 20px; box-shadow: 0 18px 60px #20232926; }
dialog::backdrop { background: rgb(24 27 30 / 46%); }
.dialog-inner { padding: clamp(20px, 4vw, 28px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.dialog-head h2, .google-reward-title { margin: 0; font-size: 23px; line-height: 1.4; letter-spacing: -.045em; }
.dialog-head .icon-btn { flex: none; margin: -6px -6px 0 0; }
.dialog-inner p { font-size: 15px; line-height: 1.65; margin: 0 0 16px; }
.dialog-inner .cta, .dialog-inner .sub-btn { width: 100%; margin-top: 10px; }
.dialog-inner label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 650; }
.dialog-inner input { box-sizing: border-box; width: 100%; min-height: 48px; padding: 10px 12px; background: white; color: var(--ink, #202329); border: 1px solid #a8aaad; border-radius: 9px; font: inherit; font-size: 16px; }
.dialog-inner .form-error { color: var(--orange); font-size: 13px; margin: 7px 0 0; }
.form-error:empty { display: none; }
.photo-large { display: block; width: 100%; border-radius: 12px; }
.dialog-shot-meta { display: flex; flex-wrap: wrap; gap: 3px 10px; margin: 9px 0 14px; color: var(--muted, #5d626a); font-size: 13px; line-height: 1.5; }
.dialog-shot-meta .shot-setting { display: inline-flex; align-items: center; gap: 5px; }
.dialog-shot-meta .ic { width: 15px; height: 15px; }
.ad-creative { display: flex; align-items: center; gap: 8px; border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; color: var(--ink, #202329); background: var(--tint); }
.ad-creative > div { flex: 1; }
.ad-creative img { width: 31%; max-width: 105px; height: 100px; object-fit: contain; }
.ad-creative h3 { margin: 6px 0 3px; font-size: 22px; letter-spacing: -.045em; }
.ad-creative p { margin: 0; font-size: 13px; }
.ad-label { font-size: 11px; font-weight: 700; color: var(--orange); }
.ad-caption, .ad-status, .google-ad-status, .result-note { color: var(--muted, #5d626a); }
.dialog-inner progress { display: block; width: 100%; height: 7px; margin: 14px 0 9px; accent-color: var(--citrus); }
.dialog-inner .ad-status { font-size: 13px; }
.google-reward-title { margin-bottom: 12px; }
.result-choice { display: block; margin-bottom: 8px; font-size: 19px; line-height: 1.4; }
.result-tallies { list-style: none; padding: 0; margin: 16px 0; }
.result-tallies li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 1px solid var(--line, #e6e5e2); padding: 10px 0; font-size: 14px; }
.result-tallies li > strong { flex: none; }
.my-ballot { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 5px; background: var(--tint); color: var(--orange); font-size: 12px; white-space: nowrap; }
.dialog-inner .win-points { color: var(--orange); font-weight: 700; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); width: max-content; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 12px; background: #25282d; color: white; font-size: 14px; line-height: 1.55; text-align: center; pointer-events: none; opacity: 0; transform: translate(-50%, 6px); transition: opacity .16s ease, transform .16s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 860px) {
  .toast { bottom: calc(82px + env(safe-area-inset-bottom)); }
  .secondary { padding-bottom: 30px; }
  .wallet-hero { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
