.home-dashboard {
    --home-muted: var(--bs-secondary-color, #64748b);
    width: 100%;
    max-width: 820px;
    min-width: 0;
    margin: 12px auto 32px;
    color: var(--app-body-color);
}
.home-heading, .home-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.home-heading { margin-bottom: 24px; }
.home-heading h1 { margin: 0; font-size: 1.6rem; font-weight: 750; letter-spacing: -.04em; }
.home-eyebrow { margin: 0 0 6px; color: var(--home-muted); font-size: .8rem; }
.home-link { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0; border: 0; background: none; color: inherit; font-size: .85rem; text-decoration: none; white-space: nowrap; }
.home-link:hover { text-decoration: underline; }
.home-summary { padding: 30px; border: 1px solid var(--app-panel-border); border-radius: 22px; background: var(--app-panel-bg); box-shadow: var(--app-panel-shadow); }
.home-summary > p:first-child { margin: 0 0 8px; font-size: .95rem; font-weight: 600; }
.home-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 750; line-height: 1.3; letter-spacing: -.05em; overflow-wrap: anywhere; }
.home-total > span:first-child { min-width: 0; max-width: 100%; }
.home-currency { font-size: 1rem; font-weight: 500; }
.home-summary-note { margin: 10px 0 24px; font-size: .8rem; color: var(--home-muted); }
.home-add, .home-save { display: inline-flex; justify-content: center; align-items: center; gap: 8px; border: 0; border-radius: 12px; min-height: 52px; background: var(--diary-accent, #405b77); color: var(--diary-on-accent, #fff); font-weight: 650; padding: 12px 20px; }
.home-add { width: 100%; }
.home-add:hover, .home-save:hover { filter: brightness(.94); }
.home-add:disabled, .home-save:disabled { opacity: .55; cursor: wait; }
.home-setup { margin: 16px 0 0; font-size: .85rem; }
.home-recent, .home-events { margin-top: 28px; }
.home-section-heading { margin-bottom: 8px; }
.home-section-heading h2 { margin: 0; font-size: 1rem; font-weight: 700; }
.home-expense-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 78px; padding: 16px 4px; border: 0; border-bottom: 1px solid var(--app-panel-border); color: inherit; background: transparent; text-align: left; }
.home-expense-row:hover { background: var(--app-muted-surface); }
.home-expense-copy { flex: 1; min-width: 0; }
.home-expense-name { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .95rem; font-weight: 600; }
.home-expense-meta { display: block; margin-top: 4px; color: var(--home-muted); font-size: .78rem; overflow-wrap: anywhere; }
.home-expense-amount { max-width: 48%; font-size: .95rem; font-weight: 650; text-align: right; overflow-wrap: anywhere; }
.home-empty { margin: 0; padding: 26px 12px; text-align: center; color: var(--home-muted); font-size: .9rem; }
.home-event { display: flex; gap: 14px; padding: 10px 4px; font-size: .9rem; }
.home-event time { flex: 0 0 52px; color: var(--home-muted); }
.home-event span { min-width: 0; overflow-wrap: anywhere; }
.home-notice, .home-error { padding: 12px 16px; margin-bottom: 16px; border: 1px solid var(--app-panel-border); border-radius: 12px; background: var(--app-muted-surface); font-size: .9rem; }
.home-error .home-link { margin-left: 10px; }
.home-expense-modal .modal-content { color: var(--app-body-color); background: var(--bs-body-bg); border-radius: 20px; }
.home-expense-modal .modal-dialog { max-width: 500px; }
.home-expense-modal form { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.home-expense-modal .modal-body { padding: 24px; }
.home-expense-modal .modal-header, .home-expense-modal .modal-footer { padding: 16px 24px; border-color: var(--app-panel-border); }
.home-expense-modal .modal-footer { flex-wrap: nowrap; gap: 12px; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.home-expense-modal .home-save { flex: 1; margin: 0; }
.home-field { margin: 0 0 20px; min-width: 0; }
.home-field > label, .home-field legend { display: block; float: none; width: auto; margin: 0 0 8px; font-size: .86rem; font-weight: 650; }
.home-optional, .home-required { font-size: .75rem; font-weight: 400; color: var(--bs-secondary-color); margin-left: 6px; }
.home-field .form-control, .home-field .form-select { min-height: 46px; font-size: 16px; max-width: 100%; min-width: 0; }
.home-amount-input { position: relative; }
.home-amount-input input { font-size: 2rem !important; font-weight: 700; padding: 10px 42px 10px 12px; }
.home-amount-input > span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); }
.home-participants { display: flex; flex-wrap: wrap; gap: 8px; }
.home-participant { display: flex; align-items: center; gap: 8px; padding: 10px 12px; min-height: 44px; max-width: 100%; border: 1px solid var(--app-panel-border); border-radius: 10px; cursor: pointer; }
.home-participant:has(input:checked) { background: var(--app-muted-surface); border-color: var(--diary-accent, #405b77); }
.home-participant span { min-width: 0; overflow-wrap: anywhere; }
.home-participant input, .home-fixed input { flex-shrink: 0; margin: 0; }
.home-fixed { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: .85rem; }
.home-draft-note { font-size: .75rem; color: var(--bs-secondary-color); margin: 12px 0 0; }
.home-reset { min-height: 44px; border: 0; background: none; color: inherit; font-size: .8rem; padding: 8px 0; }
.home-form-error { padding: 12px; margin-bottom: 16px; border-radius: 8px; color: var(--bs-danger-text-emphasis, #842029); background: var(--bs-danger-bg-subtle, #f8d7da); }
.home-dashboard button:focus-visible, .home-expense-modal button:focus-visible { outline: 3px solid var(--diary-accent, #405b77); outline-offset: 3px; }
@media (max-width: 575.98px) {
    .home-dashboard { margin-top: 4px; }
    .home-heading { margin-bottom: 18px; }
    .home-heading h1 { font-size: 1.3rem; }
    .home-summary { padding: 22px 20px; border-radius: 16px; }
    .home-summary-note { margin-bottom: 20px; }
    .home-recent, .home-events { margin-top: 22px; }
    .home-expense-row { min-height: 74px; gap: 8px; }
    .home-expense-modal .modal-dialog { max-width: none; height: 100%; height: 100dvh; margin: 0; }
    .home-expense-modal .modal-content { height: 100%; border-radius: 0; }
    .home-expense-modal form { flex: 1; }
    .home-expense-modal .modal-body { padding: 20px; }
    .home-expense-modal .modal-header, .home-expense-modal .modal-footer { padding-left: 20px; padding-right: 20px; }
}
