.p-record-form{scroll-margin-top:110px}.p-editor{scroll-margin-top:110px}.p-record-section{scroll-margin-top:115px}.p-record-views{display:flex;gap:6px;margin:12px 0 18px;border-bottom:1px solid var(--p-line);padding-bottom:12px}.p-record-views button{border:0;background:transparent;color:var(--p-muted);font-size:13px;min-height:44px}.p-record-views button[aria-pressed=true]{background:var(--p-blue);color:var(--p-ink)}.p-trash-info{padding:12px 15px;background:#f5efe7;border-radius:12px;margin-bottom:18px}.p-restore-until{margin-top:14px}.p-amount-first input{font-size:36px!important;line-height:1.3!important;padding:13px 0!important;border:0!important;border-bottom:1px solid var(--p-line)!important;border-radius:0!important;background:transparent!important;font-variant-numeric:tabular-nums;box-shadow:none!important}.p-amount-first input::placeholder{font-size:36px}.p-direction-options{display:flex;gap:10px;margin:8px 0 20px}.p-direction-options label{flex:1;position:relative;cursor:pointer}.p-direction-options input{position:absolute;opacity:0}.p-direction-options span{display:flex;align-items:center;justify-content:center;min-height:44px;border:1px solid var(--p-line);border-radius:12px;background:var(--p-paper)}.p-direction-options input:checked+span{background:var(--p-blue);border-color:#aec7d3;color:#3c6c86}.p-direction-options input:focus-visible+span{outline:3px solid #7dabc2;outline-offset:3px}.p-category-chips{display:flex;flex-wrap:wrap;gap:7px;margin:-2px 0 20px}.p-category-chips button{font-size:12px;border-radius:20px;min-height:44px;padding:7px 13px;background:#f6f6ef}.p-category-chips button[aria-pressed=true]{background:#e5eddf;border-color:#b7c9a9;color:#4e6c45}.p-optional-fields,.p-filter-details{margin:10px 0 18px}.p-optional-fields summary,.p-filter-details summary,.p-category-summary summary{cursor:pointer;color:var(--p-muted);font-size:12px;min-height:44px;padding:11px 0}.p-optional-fields[open] summary,.p-filter-details[open] summary{margin-bottom:8px}.p-filter-details{background:#f3f4ee;padding:0 14px;border-radius:14px}.p-filter-details .p-field{margin-bottom:10px}.p-category-summary{margin:-8px 0 20px}.p-category-summary:empty{margin:0}.p-category-summary details{border:1px solid var(--p-line);border-radius:13px;padding:0 13px}.p-category-summary summary span{float:right;font-size:11px}.p-category-summary-row{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:10px 0;border-top:1px solid var(--p-line);font-size:12px}.p-category-summary-row>span{min-width:0;overflow-wrap:anywhere}.p-category-summary-row small{display:block;font-size:10px;color:var(--p-muted)}.p-category-summary-row strong{font-size:13px;font-variant-numeric:tabular-nums}.p-category-summary details>p{padding:8px 0;font-size:10px}.p-calendar-toolbar{display:flex;justify-content:space-between;gap:8px;margin:-5px 0 10px}.p-calendar-toolbar button{min-height:44px}.p-calendar-selection{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:var(--p-muted);min-height:44px;margin-top:10px}.p-calendar-selection button{font-size:11px;min-height:44px}.p-calendar-panel>.p-small{font-size:10px;line-height:1.8;margin-top:4px}.p-calendar-day{min-height:44px}.p-list-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.p-list-footer .p-limit-note{margin-top:0}.p-list-footer button{min-height:44px}.p-empty-mark{display:block;font-size:29px;line-height:1.3;color:#acbbb0;margin-bottom:12px}.p-record-actions button{min-height:44px;padding:8px 11px}.p-record-body{max-height:210px;overflow:auto}.p-record-form .p-form-actions{position:sticky;bottom:calc(83px + env(safe-area-inset-bottom));background:var(--p-paper);padding:12px 0 8px;z-index:4}.p-form-actions .p-primary{flex:1}.p-form-actions .p-quiet{min-height:44px}.p-form-hint{font-size:11px;line-height:1.8}.p-search input{font-size:16px;min-height:46px}.p-record-form textarea:focus{min-height:150px}.p-record-views button:disabled,.p-category-chips button:disabled{pointer-events:none}@media(min-width:900px){.p-record-body{max-height:280px}}@media(max-width:370px){.p-record-actions{gap:0}.p-record-actions button{font-size:10px}.p-direction-options{gap:7px}.p-category-chips{gap:5px}.p-category-chips button{padding:7px 10px}.p-calendar-toolbar button{font-size:11px}.p-record-views button{font-size:12px}.p-form-actions{gap:4px}}@media(prefers-reduced-motion:reduce){.p-record-section,.p-editor{scroll-behavior:auto}}

/* Photo controls stay in document flow; only record composers have sticky actions. */
.p-photo-controls{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;min-width:0}
.p-photo-controls .p-field,.p-photo-controls .p-range{margin-bottom:0}
.p-photo-controls .p-range{display:grid;grid-template-rows:auto minmax(44px,auto);gap:8px;min-width:0}
.p-photo-controls input[type=range]{display:block;width:100%;height:44px;min-height:44px;margin:0;flex:none}
.p-photo-controls .p-form-row{align-items:start;gap:14px}
.p-photo-controls .p-form-actions{position:static;bottom:auto;z-index:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:8px;margin:0;padding:0}
.p-photo-controls .p-form-actions .p-primary{grid-column:1/-1;min-width:0;width:100%;margin:0}
.p-photo-controls .p-form-actions button{min-height:44px;white-space:normal;overflow-wrap:anywhere}
.p-photo-controls .p-form-hint{margin:0}
@media(max-width:370px){.p-photo-controls .p-form-row{grid-template-columns:minmax(0,1fr)}}
/* Record-first layouts and touch-sized editors. */
.p-record-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:12px 0 24px}.p-record-heading h1{font-size:1.65rem;margin:0}.p-add-record{width:48px;height:48px;border-radius:50%;font-size:28px;display:grid;place-items:center;background:#e8eef0;border:0}.p-record-modal,.p-category-modal{width:min(620px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:24px;border:1px solid #deddd5;border-radius:24px;background:#faf8f4;color:#40515b;box-sizing:border-box;overflow:auto}.p-record-modal::backdrop,.p-category-modal::backdrop{background:#22364766;backdrop-filter:blur(5px)}.p-record-modal form{display:grid;gap:16px}.p-record-modal .p-section-title{position:sticky;top:-24px;background:#faf8f4;z-index:1;padding:12px 0}.p-record-modal .p-form-actions{position:sticky;bottom:-24px;background:#faf8f4;padding:16px 0;margin-bottom:0}.p-record-modal button,.p-category-modal button,.p-record-actions button,.p-record-search button{min-height:44px;min-width:44px}.p-record-modal [hidden],.p-record-modal input[hidden]{display:none!important}.p-mood-row{display:flex;gap:6px;justify-content:space-between;overflow:auto}.p-mood-row button{border:1px solid transparent;background:transparent;border-radius:18px;padding:6px;flex:1;min-width:54px;font-size:12px}.p-mood-row svg{display:block;width:52px;max-width:100%;margin:auto}.p-mood-row [aria-pressed=true]{background:#e2edf2;border-color:#8da9ba}.p-todo-scopes{display:flex;gap:5px;overflow:auto;padding:4px 0 12px;scrollbar-width:thin}.p-todo-scopes button{white-space:nowrap;min-height:44px;padding:8px 14px;border-radius:24px;border:1px solid #deddd5;background:transparent}.p-todo-scopes [aria-pressed=true]{background:#566f7c;color:white;border-color:#566f7c}.p-category-filter{margin:0 0 18px auto;width:max-content;max-width:100%;position:relative}.p-category-filter summary{padding:12px;cursor:pointer}.p-category-filter [data-category-filter]{display:grid;gap:6px;padding:12px;background:#fffefa;border:1px solid #deddd5;border-radius:16px;position:absolute;right:0;z-index:3;min-width:180px;max-height:250px;overflow:auto}.p-category-filter label{min-height:38px;display:flex;align-items:center;gap:6px}.p-category-filter i,.p-category-chips i{width:10px;height:10px;border-radius:50%;display:inline-block;background:var(--category-color);margin-right:5px}.p-category-chips button{min-height:44px!important}.p-category-tag{display:inline-block;background:color-mix(in srgb,var(--category-color) 20%,white);border-left:3px solid var(--category-color);font-size:.8rem;padding:3px 9px;border-radius:6px;margin-top:8px}.p-record.is-completed h3{text-decoration:line-through;color:#8b9394}.p-record-search{display:flex;gap:8px;align-items:center}.p-record-search .p-search{flex:1;min-width:0}.p-spending-bar{display:grid;grid-template-columns:1fr auto;gap:7px;margin:14px 0}.p-spending-bar i{height:5px;border-radius:4px;background:#91aebc;grid-column:1/-1}.p-pin-gate{max-width:350px;margin:20px auto;display:grid;gap:14px;padding:20px}.p-pin-gate input{text-align:center;letter-spacing:.7em;font-size:24px}.p-category-modal form{display:grid;gap:16px}.p-record-body{white-space:pre-wrap;overflow-wrap:anywhere}.p-record-modal input,.p-record-modal textarea,.p-record-modal select{font-size:16px}.p-records{display:grid;gap:14px}.p-record{min-width:0}.p-record-modal .p-field{min-width:0}
@media(max-width:520px){.p-record-modal{padding:18px;border-radius:22px}.p-record-modal .p-section-title{top:-18px}.p-record-modal .p-form-actions{bottom:-18px}.p-record-modal .p-form-row{grid-template-columns:1fr}.p-mood-row{gap:2px}.p-mood-row button{padding:4px;min-width:48px}.p-mood-row span{font-size:11px}}
