.native-choice { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:0!important; opacity:0; clip-path:inset(50%); pointer-events:none; }
.custom-choice { width:100%; min-width:0; }
.choice-trigger { width:100%; min-height:48px; display:flex; align-items:center; justify-content:space-between; gap:12px; text-align:left; border:1px solid var(--line); background:var(--paper); border-radius:14px; padding:12px 14px; font-size:15px; color:var(--ink); }
.choice-trigger[aria-expanded=true] { border-color:var(--focus); box-shadow:0 0 0 2px var(--accent-soft); }
.choice-trigger > .bi { font-size:12px; color:var(--muted); }
.choice-value,.choice-option { display:flex; align-items:center; gap:10px; min-width:0; }
.choice-label { overflow-wrap:anywhere; }
.choice-icon { width:25px; flex-shrink:0; display:inline-grid; place-items:center; font-size:20px; line-height:1.3; }
.choice-popover { position:fixed; margin:0; inset:auto; z-index:100; display:flex; flex-direction:column; padding:8px; background:var(--paper); border:1px solid var(--line); box-shadow:0 12px 45px #15151526; border-radius:18px; overflow:hidden; color:var(--ink); }
.choice-heading { padding:9px 10px 12px; font-size:12px; color:var(--muted); }
.choice-search { flex-shrink:0; width:100%; font-size:16px; margin:0 0 8px; }
.choice-list { overflow-y:auto; overscroll-behavior:contain; touch-action:pan-y pinch-zoom; min-height:0; }
.choice-option { border:0; background:none; color:var(--ink); width:100%; text-align:left; min-height:46px; border-radius:10px; padding:11px 12px; font-size:14px; }
.choice-option[aria-selected=true] { background:var(--accent-soft); color:var(--on-accent); }
.choice-option:focus-visible { outline-offset:-3px; }
.choice-option:hover { background:var(--bg); }
.choice-option > .bi:last-child { margin-left:auto; color:var(--focus); }
.choice-option[aria-selected=true]:hover { background:var(--accent-soft); }
.choice-empty { color:var(--muted); padding:16px; font-size:13px; }
.category-manager { display:flex; flex-direction:column; gap:14px; }
.category-family { background:var(--paper); border-radius:20px; padding:8px 18px; }
.category-parent,.subcategory-row { display:flex; align-items:center; gap:12px; min-height:66px; }
.category-parent > .category-glyph { background:var(--accent-soft); border-radius:12px; }
.category-glyph { display:inline-grid; place-items:center; width:38px; height:38px; flex-shrink:0; font-size:21px; }
.category-parent strong,.subcategory-row strong { flex:1; font-size:15px; font-weight:500; overflow-wrap:anywhere; }
.subcategory-row { margin-left:18px; border-top:1px solid var(--line); min-height:60px; }
.subcategory-row .category-glyph { color:var(--muted); }
.category-manager h2 { margin:12px 0 4px; font-size:18px; }
.add-subcategory { display:flex; gap:8px; align-items:center; min-height:44px; margin:0 0 6px 56px; font-size:13px; }
.icon-selector { margin-top:16px; padding:16px; border:1px solid var(--line); border-radius:16px; min-width:0; }
.icon-selector legend { padding:0 5px; font-size:13px; color:var(--muted); }
.icon-preview { display:flex; align-items:center; gap:12px; font-size:14px; margin:12px 0; }
.icon-preview .category-glyph { background:var(--accent-soft); border-radius:12px; }
.icon-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:5px; max-height:210px; overflow-y:auto; overscroll-behavior:contain; margin-top:10px; }
.icon-grid button { border:1px solid transparent; background:var(--bg); border-radius:10px; min-height:44px; min-width:0; font-size:21px; color:var(--ink); }
.icon-grid button[aria-pressed=true] { border-color:var(--focus); background:var(--accent-soft); }
.icon-grid button:focus-visible { outline-offset:-3px; }
.icon-picker-note { margin:10px 0; font-size:12px; color:var(--muted); }
.category-kind-label { font-size:13px; color:var(--muted); margin:0 0 16px; }
.ledger-front { grid-template-columns:38px minmax(0,1fr) auto; cursor:default; }
.ledger-item:focus-visible { outline:3px solid var(--focus); outline-offset:2px; }
.ledger-front.is-dragging { transition:none; user-select:none; }
.ledger-front .tx-icon .category-glyph { width:auto; height:auto; font-size:19px; }
.pull-refresh { display:grid; place-items:center; gap:6px; position:fixed; z-index:9; top:calc(env(safe-area-inset-top) + 8px); left:50%; transform:translate(-50%,-140%); border-radius:22px; background:var(--paper); box-shadow:0 4px 24px #15151520; padding:10px 18px; font-size:12px; color:var(--muted); pointer-events:none; }
.pull-refresh .bi { font-size:22px; color:var(--focus); }
.pull-refresh.refreshing .bi { animation:refresh-turn 1s linear infinite; }
html { overscroll-behavior-y:contain; }
@keyframes refresh-turn { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .pull-refresh.refreshing .bi { animation:none; } }
@media(max-width:800px) {
 .choice-trigger { font-size:16px; }
 .ledger-front { grid-template-columns:28px minmax(0,1fr) auto; }
 .ledger-value { max-width:145px; }
 .category-family { padding:8px 14px; }
 .subcategory-row { margin-left:10px; }
 .category-parent strong,.subcategory-row strong { font-size:14px; }
 .icon-selector { padding:12px; }
 .pull-refresh { max-width:calc(100vw - 32px); }
}
@media(max-width:359px) {
 .ledger-front { grid-template-columns:minmax(0,1fr) auto; }
 .icon-grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
 .ledger-value { max-width:120px; }
}
