/* Smart capture + Apple Pay setup (29.11, U3). Own file: index.html keeps its inline <style> untouched. */
.cap-fab { position:fixed; left:16px; bottom:16px; width:auto; margin:0; padding:11px 18px; border-radius:999px; font-size:16px; box-shadow:0 8px 24px -10px #000a; z-index:21; }
.cap-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); gap:14px; }
.cap-box { border:1px solid var(--line); border-radius:12px; padding:16px; background:var(--card); min-width:0; }
.cap-box h3 { margin:0 0 6px; font-size:15px; }
.cap-drop { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; text-align:center; border:1.5px dashed color-mix(in srgb, var(--accent) 55%, var(--line)); border-radius:12px; padding:22px 12px; cursor:pointer; color:var(--ink); margin:0; }
.cap-drop strong { font-size:16px; }
.cap-drop input { position:absolute; width:1px; height:1px; opacity:0; }
.cap-icon { width:44px; height:44px; border-radius:12px; display:grid; place-items:center; background:color-mix(in srgb, var(--accent) 14%, transparent); color:var(--accent); font-size:22px; font-weight:700; }
.cap-text { display:flex; gap:8px; align-items:stretch; margin-top:10px; }
.cap-text input { flex:1; min-width:0; }
.cap-text button { width:auto; margin:0; padding:10px 16px; }
.cap-usage { font-size:12px; color:var(--muted); margin-top:8px; }
.cap-card { border:1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius:14px; padding:16px; background:var(--card); margin:14px 0; box-shadow:0 10px 30px -22px #000a; }
.cap-card .cap-amount { font-size:clamp(28px, 7vw, 38px); font-weight:650; letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
.cap-card .cap-amount.in { color:var(--accent); }
.cap-card .cap-meta { color:var(--muted); font-size:14px; margin:2px 0 10px; }
.cap-card .cap-actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-top:12px; }
.cap-card .cap-actions button { width:auto; margin:0; padding:12px 22px; }
.cap-card .cap-actions button.primary { flex:1; min-width:150px; font-size:16px; }
.cap-edit { display:grid; grid-template-columns:repeat(auto-fit, minmax(140px, 1fr)); gap:0 10px; }
.cap-edit label { margin-top:8px; }
.cap-dir { display:flex; gap:6px; margin-top:6px; }
.cap-dir button { width:auto; margin:0; padding:6px 12px; background:transparent; color:var(--ink); border:1px solid var(--line); font-weight:500; }
.cap-dir button[aria-pressed="true"] { background:var(--accent); border-color:var(--accent); color:#fff; }
.cap-low { font-size:13px; color:var(--err); }
.cap-drafts li { display:flex; justify-content:space-between; gap:10px; align-items:center; }
.cap-drafts button { width:auto; margin:0; }
.cap-copy { display:flex; gap:8px; align-items:center; margin:6px 0; }
.cap-copy code { flex:1; min-width:0; padding:8px 10px; border:1px solid var(--line); border-radius:8px; background:color-mix(in srgb, var(--ink) 4%, transparent); }
.cap-copy button { width:auto; margin:0; padding:8px 12px; }
ol.cap-steps { list-style:none; padding:0; margin:10px 0; display:grid; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr)); gap:12px; }
ol.cap-steps > li { margin:0; font-size:14px; border:1px solid var(--line); border-radius:12px; padding:12px; }
ol.cap-steps .num { display:inline-grid; place-items:center; width:22px; height:22px; border-radius:50%; background:var(--accent); color:#fff; font-size:12px; font-weight:700; margin-right:6px; }
.phone { margin:10px auto 8px; width:170px; border-radius:22px; border:6px solid color-mix(in srgb, var(--ink) 82%, transparent); background:#f2f2f7; color:#111; padding:10px 8px 12px; font:11px/1.3 -apple-system, system-ui, sans-serif; }
.phone .bar { text-align:center; font-weight:600; font-size:12px; margin-bottom:8px; }
.phone .row { background:#fff; border-radius:8px; padding:6px 8px; margin:4px 0; display:flex; justify-content:space-between; gap:6px; }
.phone .row.hl { outline:2px solid #0a84ff; }
.phone .tag { color:#0a84ff; font-weight:600; }
.phone .chip { display:inline-block; background:#0a84ff; color:#fff; border-radius:6px; padding:1px 5px; font-weight:600; }
.phone .tabs { display:flex; flex-wrap:wrap; justify-content:space-around; gap:2px 6px; margin-top:8px; color:#8e8e93; font-size:9.5px; }
.phone .tabs .on { color:#0a84ff; font-weight:600; }
.cap-note { font-size:13px; color:var(--muted); }
.cap-last { font-size:14px; margin-top:8px; }
.cap-cards td select { width:auto; max-width:200px; padding:5px 8px; font-size:13px; }
@media (max-width: 560px) { .cap-fab { left:12px; bottom:12px; } .phone { width:150px; } }

/* U6 30.11: iOS Safari zooms into fields under 16px — every form control is 16px on touch screens (zoom stays enabled) */
@media (max-width: 1024px), (hover: none) { input, select, textarea { font-size:16px !important; } }

/* U6: folded Apple Pay setup for Personal */
.cap-more { margin:12px 0; }
.cap-more > summary { min-height:44px; display:flex; align-items:center; cursor:pointer; font-weight:600; color:var(--accent); }
/* walk 3 30.11: on a phone the text line gets the full width (the example in the field was cut off) */
@media (max-width:420px) { .cap-text { flex-direction:column; } .cap-text button { width:100%; } }

/* 30.11 deep walk: Operations on a phone — a list (name · date · category, amount right), a tap opens the editor */
ul.tx-list > li.tx-item { list-style:none; margin:0; border-bottom:1px solid var(--line); }
ul.tx-list > li.tx-item:last-child { border-bottom:0; }
ul.tx-list .hm-row { border-bottom:0; }
button.tx-row { width:100%; margin:0; background:transparent; color:var(--ink); border:0; border-radius:16px; text-align:left; font:inherit; cursor:pointer; }
button.tx-row:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
button.tx-row .hm-row-t b { font-weight:600; }
.tx-edit { margin:0 10px 12px; }
.tx-edit .pair input, .tx-edit .pair select { width:100%; }
button.link.danger { color:var(--err); }
/* 30.11 deep walk: status line inside the app = a toast above the bottom tabs (it used to be missing on these screens) */
body.signed-in #view > p.msg:empty { display:none; }
body.personal-app #view > p.msg:not(:empty) { position:fixed; left:12px; right:12px; bottom:calc(92px + env(safe-area-inset-bottom)); z-index:30; margin:0; padding:12px 14px; border-radius:12px; background:var(--card); border:1px solid var(--line); box-shadow:0 12px 30px -14px #000a; max-width:560px; margin-inline:auto; }
input[aria-invalid="true"] { border-color:var(--err) !important; outline:1px solid var(--err); }
/* 30.11 deep walk: native controls (language switcher, selects, date) follow the dark scheme; 44px export links;
   on wide screens «Add» is an ordinary tab (it looked selected next to the active one) */
:root { color-scheme: light dark; }
.langbar select, select { background-color:var(--card); color:var(--ink); }
.offline-box button { width:auto; padding:11px 22px; }
#view a[download] { display:inline-flex; align-items:center; min-height:44px; }
@media (min-width: 721px) {
  nav.tabs.bottom button.tab-add { background:transparent; color:var(--ink); border-color:var(--line); }
  nav.tabs.bottom button.tab-add[aria-current="page"] { background:var(--accent); color:#fff; border-color:var(--accent); }
}
/* 01.12 Summary: forecast cards and spending by category (bars; width from JS via CSSOM) */
.fc-cards .hm-row-amt { text-align:right; }
.period-switch { margin:6px 0 10px; }
.cat-chart { display:grid; gap:10px; margin:0 0 12px; }
.cat-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 10px; align-items:baseline; }
.cat-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cat-amt { font-variant-numeric:tabular-nums; }
.cat-bar { grid-column:1 / -1; height:8px; border-radius:4px; background:color-mix(in srgb, var(--ink) 8%, transparent); overflow:hidden; }
.cat-bar i { display:block; height:100%; border-radius:4px; background:var(--accent); }
.period-switch { display:flex; gap:6px; flex-wrap:nowrap; }
.period-switch button { flex:1 1 0; width:auto; min-height:44px; margin:0; padding:8px 6px; background:transparent; color:var(--ink); border:1px solid var(--line); box-shadow:none; }
.period-switch button[aria-pressed="true"] { background:var(--accent); color:#fff; border-color:var(--accent); }
