/* Preserve the companion's plum identity; clarify data and availability. */
:root { --ink: #382b40; --muted: #74657c; --paper: #faf6fc; --card: #fefbff; --line: #e7daec; --accent: #7b1fa2; }
.account-intro { background: #efe2f5; }
.account-number { color: var(--accent); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.account-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.account-warning { border-left: 3px solid #aa302c; padding: 12px 16px; background: #fbefeb; }
#accountIdentity { overflow-wrap: anywhere; }
#accountStatus { min-height: 24px; margin: 16px 0; line-height: 1.6; }
#accountDeleteForm label { margin-top: 16px; }
.account-choice { margin: 18px 0; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.account-choice label { display: flex; gap: 10px; align-items: baseline; margin: 12px 0; }
.account-choice input { width: auto !important; }
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, sans-serif; color: var(--ink); background: var(--paper); min-height: 100dvh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; background: var(--card); color: var(--accent); min-height: 44px; }
button:hover { background: #f1e7f5; }
button:disabled { cursor: not-allowed; opacity: .65; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #bb8435; outline-offset: 3px; }
.primary, .login-button[type="submit"] { background: var(--accent); color: #faf6fc; border-color: var(--accent); }
.container { max-width: 420px; margin: 10dvh auto; padding: 28px; }
h1 { font-size: 28px; letter-spacing: -.03em; }
h2 { font-size: 26px; margin: 0 0 12px; }
h3 { margin: 0 0 14px; font-size: 19px; }
p { line-height: 1.6; margin: 8px 0 18px; }
.subtitle, small, .source { color: var(--muted); }
.source { display: block; font-size: 12px; line-height: 1.6; margin-bottom: 12px; }
.login-input, input:not([type="checkbox"]):not([type="range"]), select, textarea { width: 100%; padding: 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; background: var(--card); }
.login-input, .login-button { margin: 8px 0; width: 100%; }
label { display: block; font-size: 14px; margin-bottom: 6px; }
textarea { min-height: 140px; resize: vertical; }
.login-error, [data-state="error"] { color: #aa302c; }
.main-app { display: none; min-height: 100dvh; }
.app-bar { background: var(--accent); color: #faf6fc; padding: 18px max(20px, calc((100vw - 760px) / 2)); }
.app-bar-title { font-size: 20px; font-weight: 700; }
.app-bar-subtitle { display: block; font-size: 13px; margin-top: 4px; opacity: .85; }
.content { padding: 28px 20px 110px; }
.page { max-width: 760px; margin: auto; }
.page:focus { outline: none; }
.card, .today-hero, .trust-state { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; margin-bottom: 20px; }
.today-hero { background: #efe2f5; }
.today-kicker { text-transform: uppercase; font-size: 12px; letter-spacing: .09em; color: var(--accent); margin-bottom: 12px; }
.today-grid, .quick-grid, .explore-grid, .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.summary-card, .quick-action, .explore-card { text-align: left; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.summary-card strong, .summary-card span, .quick-action strong, .quick-action small, .explore-card strong, .explore-card small { display: block; }
.summary-card span, .quick-action small, .explore-card small { color: var(--muted); font-size: 13px; margin-top: 7px; line-height: 1.5; }
.sync-status { font-size: 13px; min-height: 20px; margin-top: 16px; }
.sync-status button { padding: 4px 10px; margin-left: 8px; }
.nav-bar { position: fixed; bottom: 0; left: 0; right: 0; display: flex; justify-content: center; background: var(--card); border-top: 1px solid var(--line); padding: 8px 4px max(8px, env(safe-area-inset-bottom)); z-index: 10; }
.nav-item { border: 0; color: var(--muted); padding: 12px; }
.nav-item.active { color: var(--accent); background: #efe2f5; font-weight: 700; }
.toast-region { position: fixed; bottom: 90px; right: 18px; max-width: min(360px, calc(100vw - 36px)); z-index: 20; pointer-events: none; }
.app-toast { padding: 14px 18px; background: #382b40; color: #faf6fc; border-radius: 12px; margin-top: 8px; }
.reminder-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.reminder-row small { display: block; margin: 6px 0; }
.journal-heading, .journal-actions, .entry-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.journal-heading { margin-bottom: 18px; }
.journal-heading h2, .entry-heading h3 { margin: 0; }
.journal-kicker { color: var(--accent); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
#journalForm > label { margin-top: 18px; }
.journal-details { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 20px 0; background: var(--paper); }
.journal-details summary { cursor: pointer; font-weight: 600; min-height: 28px; }
.journal-details summary:focus-visible { outline: 3px solid #bb8435; outline-offset: 3px; }
.journal-details fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.journal-actions { justify-content: flex-start; }
#journalDraftStatus { border-left: 3px solid var(--accent); padding: 8px 12px; background: var(--paper); margin: 12px 0 18px; font-size: 13px; line-height: 1.6; }
.journal-entry { border-top: 1px solid var(--line); padding: 22px 0; }
.entry-mood { display: inline-block; padding: 5px 12px; border-radius: 20px; background: #efe2f5; color: var(--accent); font-size: 13px; }
.entry-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.entry-meta { display: block; margin: 10px 0; overflow-wrap: anywhere; }
.entry-details { font-size: 14px; margin: 14px 0; }
.entry-details summary { cursor: pointer; padding: 8px 0; }
.entry-details p { margin: 4px 0; overflow-wrap: anywhere; }
.delete-confirm { border: 1px solid #d9b6b2; background: #fbefeb; border-radius: 12px; padding: 16px; margin-top: 12px; }
.danger { color: #aa302c; border-color: #d9b6b2; }
.journal-empty { padding: 28px 0 10px; }
.journal-skeleton { height: 102px; border-radius: 12px; background: #efe2f5; margin: 16px 0; }
.journal-skeleton + .journal-skeleton { opacity: .55; height: 78px; }
.history-message { line-height: 1.6; margin: 16px 0; }
.history-message button { margin: 8px 8px 0 0; }
[hidden] { display: none !important; }
@media (max-width: 767px) { .today-grid, .quick-grid, .explore-grid, .form-grid { grid-template-columns: 1fr; } .nav-item { font-size: 12px; padding: 10px; } .content { padding: 20px 14px 110px; } .card, .today-hero, .trust-state { padding: 20px; } }
