.app-header { position:fixed; top:env(safe-area-inset-top); left:16px; right:16px; height:50px; display:flex; align-items:center; justify-content:space-between; z-index:7; font-size:16px; font-weight:750; }
.app-header button { width:44px; height:44px; border-radius:16px; background:var(--card); box-shadow:var(--shadow); display:grid; place-items:center; }
.app-header svg { width:25px; height:25px; }
body .view { padding-top:calc(env(safe-area-inset-top) + 62px); }
.field { display:flex; flex-direction:column; gap:7px; min-width:0; color:var(--muted); font-size:13px; font-weight:650; }
.field input,.field select { width:100%; min-height:48px; }
#viewFix .form,.settings-panel .form { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
.form-hint { grid-column:1/-1; color:var(--muted); font-size:13px; line-height:1.5; margin:3px 0; }
.fix-next { display:block; font-size:12px; color:var(--muted); font-weight:400; margin-top:6px; }
body .sheet-bg { z-index:20; }
.settings-panel { max-height:92dvh; overflow:auto; }
.settings-panel h3 { margin:22px 0 10px; font-size:17px; }
.theme-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.theme-choice { text-align:left; padding:10px; border-radius:18px; background:var(--card); border:2px solid transparent; min-height:80px; font-size:14px; font-weight:650; }
.theme-choice[aria-pressed="true"] { border-color:var(--text); }
.theme-swatch { height:32px; display:block; border-radius:10px; margin-bottom:7px; }
.settings-panel .setting-action { width:100%; min-height:48px; padding:12px; margin-top:8px; border-radius:16px; background:var(--card); font-weight:650; }
.settings-panel .setting-action[aria-pressed="true"] { outline:2px solid var(--text); }
.settings-panel .file-label { display:block; cursor:pointer; text-align:center; }
.settings-panel input[type="file"] { display:block; width:100%; margin-top:10px; font:inherit; font-size:14px; }
.settings-panel input[type="range"] { width:100%; margin:14px 0; }
.settings-status { min-height:20px; padding-top:10px; }
#photoPreview { display:block; width:100%; height:100px; object-fit:cover; border-radius:16px; margin-top:12px; }
body.has-photo::before { content:''; position:fixed; inset:0; background-image:var(--photo); background-position:center; background-size:cover; pointer-events:none; }
body.has-photo::after { content:''; position:fixed; inset:0; background:var(--bg); opacity:var(--photo-shade,.65); pointer-events:none; }
body.has-photo .view { z-index:1; }
body.has-photo .app-header > span { background:var(--card); padding:8px 12px; border-radius:14px; }
body.has-photo .entry { background:var(--card); border-radius:18px; margin-top:auto; }
body.has-photo .title,body.has-photo .sub,body.has-photo .day .date { background:var(--card); border-radius:12px; padding:8px; }
button:focus-visible, input:focus-visible,select:focus-visible { outline:3px solid var(--plus-text); outline-offset:2px; }
@media(max-width:350px) { .theme-choice { font-size:12px; } .app-header { left:12px; right:12px; } }
