/* Lightweight daily records, date album and personal overview. */
:root{--font-body:'Noto Sans SC',system-ui,sans-serif}
.file-input{display:none}
.bottom-nav{width:282px}
.house-app[data-page="profile"] .bottom-nav{border-color:#e8dfd2;background:#fffcf4f5;box-shadow:0 5px 24px #68513d18}
.house-app[data-page="profile"] .bottom-nav button[aria-current="page"]{background:var(--house-brown);color:#fffaf1}
.journal-tools{display:flex;gap:10px;margin:8px 0 24px;border-top:1px solid var(--house-line);border-bottom:1px solid var(--house-line);padding:8px 0}
.journal-tools button{flex:1;display:flex;align-items:center;justify-content:flex-start;gap:8px;background:none;border:0;min-height:44px;padding:4px 6px;font-size:14px;text-align:left}
.journal-tools button:first-child{border-right:1px solid var(--house-line)}
.journal-tools small{display:block;color:#927f6e;font-size:11px;margin-top:2px}
.journal-tools .ui-icon{width:19px;height:19px;color:#a26b53}
.journal-daybar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:8px}
.journal-daybar h2{display:inline;font-size:19px;font-weight:500;margin:0;font-family:var(--font-body)}
.journal-daybar time{font-size:11px;color:#927f6e;margin-left:7px}
.journal-daybar button{display:inline-flex;gap:5px;align-items:center;background:none;border:0;font-size:12px;min-height:44px;padding:4px 0;color:#927f6e}
.journal-daybar .ui-icon{width:17px;height:17px}
.journal-review{font-size:12px;color:#927f6e;margin:8px 0 16px;line-height:1.8}
.journal-tabs{display:flex;align-items:center;gap:18px;border-bottom:1px solid var(--house-line)}
.journal-tabs button{background:none;border:0;min-height:42px;padding:7px 0;font-size:13px;color:#927f6e;position:relative}
.journal-tabs button[aria-pressed=true]{color:var(--house-brown)}
.journal-tabs button[aria-pressed=true]:after{content:"";position:absolute;bottom:-1px;left:0;right:0;height:2px;background:#a26b53;border-radius:2px}
.journal-tabs #journalToday{margin-left:auto}
.journal-list{padding-top:22px}
.journal-record{position:relative;margin-left:48px;padding:0 0 24px 17px;border-left:1px solid var(--house-line);min-width:0}
.journal-record:before{content:"";position:absolute;left:-4px;top:13px;width:7px;height:7px;border-radius:50%;background:#a26b53;box-shadow:0 0 0 4px var(--house-paper)}
.journal-record-head{display:flex;justify-content:flex-end;align-items:center;height:28px;margin-bottom:3px}
.journal-record-head time{position:absolute;left:-48px;top:7px;font-size:11px;line-height:1.6;color:#927f6e;font-variant-numeric:tabular-nums;max-width:44px}
.journal-more{background:none;border:0;font-size:19px;line-height:1;min-width:38px;min-height:36px;padding:2px;color:#927f6e;letter-spacing:2px}
.journal-record>p{font-size:15px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 10px}
.journal-photo{display:block;border:0;border-radius:14px;background:#eee4d6;padding:0;width:180px;max-width:100%;overflow:hidden;aspect-ratio:1.45}
.journal-photo img{display:block;width:100%;height:100%;object-fit:cover}
.journal-reply{display:flex;align-items:flex-start;gap:7px;margin-top:11px;color:#927f6e;font-size:11px;line-height:1.8}
.journal-reply img{width:25px;height:25px;object-fit:contain;flex:none}
.journal-reply span{padding-top:2px;overflow-wrap:anywhere}
.journal-empty{font-size:13px;color:#927f6e;text-align:center;line-height:1.9;padding:30px 4px;margin:0}
.journal-add{position:sticky;bottom:8px;display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:46px;border:0;border-radius:26px;background:#a26b53;color:#fffaf1;font-size:14px;margin:16px 0 8px;box-shadow:0 4px 12px #5b40341b;z-index:2}
.journal-add .ui-icon{width:18px;height:18px}
.journal-secondary{display:flex;justify-content:center;gap:12px;align-items:center;margin:12px 0}
.journal-secondary button{min-height:40px;background:none;border:0;color:#927f6e;font-size:12px;padding:5px 8px}
.journal-secondary #journalUndo{color:#885943}
.journal-album{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:18px 0}
.journal-album-date{grid-column:1/-1;font-size:13px;font-weight:500;margin:6px 0 0;color:#927f6e}
.journal-album-photo{min-width:0;text-align:left;background:none;border:0;padding:0;color:var(--house-brown)}
.journal-album-photo img{display:block;width:100%;aspect-ratio:1;object-fit:cover;border-radius:14px;background:#eee4d6}
.journal-album-photo span{font-size:11px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:6px;color:#927f6e}
.journal-album .journal-empty{grid-column:1/-1}
.journal-entry-dialog{box-sizing:border-box;width:calc(100% - 28px);max-width:420px;max-height:calc(100dvh - 30px);overflow-y:auto;margin:auto;padding:24px;border:1.5px solid #ddd0bd;border-radius:25px;background:var(--house-cream);color:var(--house-brown);box-shadow:0 15px 60px #3d2a2240}
.journal-entry-dialog::backdrop{background:#49322552;backdrop-filter:blur(3px)}
.journal-entry-dialog .dialog-close{position:absolute;top:11px;right:11px}
.journal-entry-dialog h2{font-family:var(--font-body);font-size:21px;font-weight:500;margin:4px 30px 18px 0}
.journal-entry-date{display:flex;align-items:center;gap:10px;color:#927f6e;font-size:12px;margin-bottom:13px}
.journal-entry-date input{border:0;background:#f3eadf;border-radius:9px;padding:7px 9px;font-size:14px;color:var(--house-brown);min-width:0;max-width:100%}
.journal-entry-dialog textarea{display:block;width:100%;min-height:116px;max-height:40dvh;resize:vertical;border:0;background:transparent;padding:4px 0;font-size:16px;line-height:1.8;color:var(--house-brown)}
.journal-entry-dialog textarea::placeholder{color:#a18f7d}
.journal-entry-preview{position:relative;width:150px;margin:8px 0 16px;max-width:100%}
.journal-entry-preview img{width:100%;max-height:170px;object-fit:cover;border-radius:14px;display:block}
.journal-entry-preview button{position:absolute;top:5px;right:5px;display:grid;place-items:center;width:30px;height:30px;border:0;background:#fffaf1ed;border-radius:50%;padding:0}
.journal-entry-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px}
.journal-entry-actions>button:first-child{display:flex;align-items:center;gap:6px;background:none;border:0;min-height:44px;font-size:13px;color:#927f6e;padding:5px 0}
.journal-entry-actions .primary-button{border:0;border-radius:24px;background:#a26b53;color:#fffaf1;min-height:42px;padding:8px 22px;font-size:14px;box-shadow:none}
.journal-entry-dialog .local-note{font-size:11px;text-align:left;margin:14px 0 0}
.journal-menu{max-width:300px}
.journal-menu h2{font-family:var(--font-body);font-size:18px;font-weight:500;margin:6px 0 22px}
.journal-menu>button:not(.dialog-close){display:block;width:100%;margin-top:8px;padding:12px;background:#f2e8db;border:0;border-radius:12px;min-height:44px;font-size:14px}
.journal-photo-dialog{max-width:580px;width:calc(100% - 24px);padding:34px 14px 18px}
.journal-photo-dialog>img{display:block;max-width:100%;max-height:70dvh;margin:10px auto;border-radius:12px;object-fit:contain}
.journal-photo-dialog>p{font-size:12px;line-height:1.8;margin:14px 4px 0;overflow-wrap:anywhere;white-space:pre-wrap}
.journal-profile .journal-profile-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:22px}
.journal-profile-heading h1{font-family:var(--font-body);font-size:28px;font-weight:500;line-height:1.3;margin:0}
.journal-profile-heading p{font-size:12px;color:#927f6e;margin:8px 0 0}
.journal-profile-heading img{width:74px;height:74px;object-fit:contain}
.journal-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;padding:12px 0 26px;border-bottom:1px solid var(--house-line);margin-bottom:24px}
.journal-overview b{display:block;font-size:28px;font-weight:500;line-height:1.3;font-variant-numeric:tabular-nums}
.journal-overview span{display:block;font-size:11px;color:#927f6e;margin-top:8px}
.journal-history-title{font-size:16px;font-weight:500;font-family:var(--font-body);margin:0 0 12px}
.journal-period{display:flex;gap:12px;margin-bottom:20px}
.journal-period button{min-height:34px;font-size:12px;padding:6px 10px;background:#f2e8db;color:#927f6e;border:0;border-radius:10px}
.journal-period button[aria-pressed=true]{background:#a26b53;color:#fffaf1}
.journal-heat-block{--journal-weeks:13;margin:0 0 18px}
.journal-heat-months{display:grid;grid-template-columns:repeat(var(--journal-weeks),minmax(0,1fr));gap:3px;margin:0 0 8px 18px;font-size:10px;color:#927f6e;line-height:1.4}
.journal-heat-months span{white-space:nowrap}
.journal-heat-body{display:flex;gap:8px;align-items:stretch}
.journal-week-labels{width:10px;flex:none;display:grid;grid-template-rows:repeat(7,19px);gap:3px;font-size:10px;color:#927f6e;line-height:19px}
.journal-heat-grid{display:grid;grid-template-columns:repeat(var(--journal-weeks),minmax(0,1fr));grid-template-rows:repeat(7,19px);grid-auto-flow:column;gap:3px;flex:1;min-width:0}
.journal-heat-cell{display:block;min-width:0;min-height:0;padding:0;border:0;border-radius:4px;background:#eee5d9;height:19px;width:100%}
.journal-heat-cell[data-level="1"],.journal-swatch[data-level="1"]{background:#dfccc0}
.journal-heat-cell[data-level="2"],.journal-swatch[data-level="2"]{background:#ceb0a0}
.journal-heat-cell[data-level="3"],.journal-swatch[data-level="3"]{background:#ba917a}
.journal-heat-cell[data-level="4"],.journal-swatch[data-level="4"]{background:#a26b53}
.journal-heat-cell[aria-current=date]{box-shadow:inset 0 0 0 1.5px var(--house-brown)}
.journal-heat-cell:disabled{opacity:.35}
.journal-heat-legend{display:flex;align-items:center;justify-content:flex-end;gap:4px;font-size:10px;color:#927f6e;margin:7px 0 12px}
.journal-swatch{width:11px;height:11px;border-radius:3px;display:inline-block;background:#eee5d9}
.journal-heat-hint{font-size:11px;color:#927f6e;margin:9px 0 24px;line-height:1.8}
.journal-profile-row{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;background:none;border:0;border-radius:0;padding:13px 0;min-height:46px;font-size:14px;text-align:left;color:var(--house-brown)}
.journal-profile-row .ui-icon{width:18px;height:18px;color:#927f6e}
.journal-profile-row>span{display:flex;align-items:center;gap:9px}
.journal-settings{border-top:1px solid var(--house-line);margin-top:8px;padding-top:7px}
.journal-settings>summary{list-style:none;min-height:46px;display:flex;align-items:center;justify-content:space-between;font-size:14px;cursor:pointer}
.journal-settings>summary:after{content:'›';color:#927f6e}
.journal-settings[open]>summary:after{content:'⌄'}
.journal-profile .profile-stats{margin:8px 0 14px}
.backup-actions{display:grid;gap:10px;margin:18px 0}
.backup-actions button{min-height:44px;border:0;border-radius:12px;padding:12px;font-size:14px;background:#eee3d4;color:var(--house-brown)}
.backup-actions #saveCopy{background:#a26b53;color:#fffaf1}
.backup-actions #backupRestore{background:#85583f;color:#fffaf1}
.backup-legacy{margin:18px 0 8px}
.backup-legacy summary{font-size:13px;min-height:36px;color:#927f6e;cursor:pointer}
.backup-legacy textarea{font-size:14px;min-height:80px}
.journal-calendar-card .planner-calendar-foot{flex-wrap:wrap;gap:6px}
.planner-dot.record-dot{background:#a26b53}
[hidden]{display:none!important}
@media(min-width:650px){.life-view,.journal-profile{max-width:620px;margin:0 auto;left:0;right:0}.journal-profile .journal-overview{padding-top:18px}.journal-photo{width:230px}.journal-entry-dialog{padding:28px}}
@media(max-width:360px){.journal-daybar time{display:block;margin-left:0;margin-top:4px}.journal-record{margin-left:43px;padding-left:14px}.journal-record-head time{left:-43px;max-width:39px}.journal-overview b{font-size:25px}.journal-heat-months{font-size:10px}.journal-tools{gap:7px}.journal-tools button{font-size:13px}.journal-tools small{font-size:11px}}
