/* Fast mode: phone-first, one task per screen, big touch targets (≥ 48 px), logical properties for RTL. */

/* ------------------------------ Fast ⇄ Pro switch (both shells) ------------------------------ */
.mode-tg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--toggle-bg); border: 1px solid var(--line); gap: 2px; flex: none; }
.mode-tg button {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 42px; min-width: 54px; padding: 0 12px;
  border: 0; border-radius: 999px; background: transparent; color: var(--charcoal-soft); font: 600 14px var(--font); cursor: pointer;
}
.mode-tg button .ico { width: 15px; height: 15px; }
.mode-tg button[aria-pressed="true"] { background: var(--charcoal); color: #fff; box-shadow: inset 0 -2px 0 var(--gold); }
.mode-tg button[aria-pressed="true"] .ico { color: var(--gold-bright); }
.mode-tg.dark { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
.mode-tg.dark button { color: var(--on-dark-1); }
.mode-tg.dark button[aria-pressed="true"] { background: var(--gold); color: var(--brand-on-accent); box-shadow: none; }
.mode-tg.dark button[aria-pressed="true"] .ico { color: var(--brand-on-accent); }
.mode-tg button:focus-visible { outline: 3px solid var(--gold-bright); outline-offset: 1px; }
.side-mode { padding: 0 16px 12px; }
.side-mode .mode-tg { width: 100%; }
.side-mode .mode-tg button { flex: 1; }
.tb-mode { margin-inline-start: auto; }
.tb-mode .mode-tg button { min-height: 36px; min-width: 48px; padding: 0 10px; font-size: 13px; }

/* ------------------------------------------ shell ------------------------------------------ */
body.fast-mode { background: var(--bg); overflow-x: clip; }
.fast-shell { min-height: 100vh; display: flex; flex-direction: column; }
.fast-top {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 64px; padding: 8px 12px; background: var(--charcoal); color: #fff; border-bottom: 3px solid var(--gold);
}
#open-access-banner + #app .fast-top { top: 0; }
.ft-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; min-height: 48px; min-width: 0; }
.ft-brand img { width: 34px; height: auto; flex: none; }
.ft-brand b { font-family: var(--font-display), var(--font); font-size: 15px; letter-spacing: .08em; background: linear-gradient(120deg, var(--gold-bright), var(--gold) 45%, var(--gold-deep)); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.ft-right { display: flex; align-items: center; gap: 6px; }
.ft-btn {
  min-height: 48px; min-width: 48px; padding: 0 10px; border-radius: 12px; border: 1px solid rgba(255,255,255,.22);
  background: transparent; color: #fff; font: 600 14px var(--font); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.ft-btn[lang="ar"] { font-family: var(--font-ar), var(--font); }
.ft-btn.ico-only { padding: 0; }
.ft-btn .ico { width: 22px; height: 22px; }
.ft-btn:focus-visible, .ft-brand:focus-visible { outline: 3px solid var(--gold-bright); outline-offset: 2px; }
.ft-menu { position: relative; }
.ft-pop {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 230px; background: #fff; color: var(--text);
  border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.25); padding: 6px; display: flex; flex-direction: column; z-index: 70;
}
.ft-pop[hidden] { display: none; }
.ft-who { padding: 10px 12px 8px; font-weight: 600; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ft-who small { display: block; font-weight: 500; }
.ft-pop a, .ft-pop button {
  display: flex; align-items: center; min-height: 48px; padding: 0 12px; border-radius: 10px; border: 0; background: none;
  color: var(--charcoal); font: 500 15px var(--font); text-decoration: none; cursor: pointer; text-align: start;
}
.ft-pop a:hover, .ft-pop button:hover, .ft-pop a:focus-visible, .ft-pop button:focus-visible { background: var(--cream); outline: none; }
.fast-main { width: 100%; max-width: 560px; margin: 0 auto; padding: 18px 16px 40px; flex: 1; }
.fast-main:focus { outline: none; }
body.fast-mode #toasts { inset-inline: 16px; top: auto; bottom: calc(96px + env(safe-area-inset-bottom)); align-items: center; pointer-events: none; }
body.fast-mode .toast { font-size: 15px; max-width: 520px; }
@media (max-width: 380px) { .ft-brand b { display: none; } }

/* ----------------------------------------- type ------------------------------------------ */
.fpage { font-size: 15px; }
.f-h1 { font-size: 24px; line-height: 1.25; font-weight: 700; margin: 2px 0 6px; letter-spacing: -.015em; overflow-wrap: anywhere; }
.f-sub { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.f-hello { margin: 0 0 12px; font-size: 17px; font-weight: 600; color: var(--charcoal); }
.f-h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; margin: 24px 2px 10px; }
.f-h2.in { margin: 0 0 6px; }
[dir="rtl"] .f-h2 { letter-spacing: 0; text-transform: none; font-size: 14px; }
.f-note { font-size: 14px; color: var(--muted); margin: 10px 2px; line-height: 1.5; }
.f-note.center { text-align: center; }
.f-empty { color: var(--muted); text-align: center; padding: 18px 8px; margin: 0; list-style: none; }
.f-empty-card { background: var(--card); border: 1px dashed var(--line-dashed); border-radius: 16px; padding: 22px 18px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.f-empty-card p { margin: 0; color: var(--charcoal-soft); }
.f-loading { color: var(--muted); padding: 30px 0; text-align: center; }
.f-warn { background: #fff8e1; border: 1px solid #f0d98a; color: #6e4c00; border-radius: 12px; padding: 10px 14px; font-size: 14px; margin: 0 0 12px; }
.amt { white-space: nowrap; font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
.red-text { color: var(--red); font-weight: 600; }
.ok-text { color: var(--green); }
.f-back {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 10px 0 4px; margin: -6px 0 4px -4px;
  color: var(--gold-deep); font: 600 15px var(--font); text-decoration: none; background: none; border: 0; cursor: pointer; border-radius: 10px;
}
[dir="rtl"] .f-back { margin: -6px -4px 4px 0; padding: 0 4px 0 10px; }
.f-back .ico { width: 20px; height: 20px; }
[dir="rtl"] .ico-chevron, [dir="rtl"] .ico-back { transform: scaleX(-1); }
.f-pro { text-align: center; margin: 22px 0 6px; font-size: 14px; }
.f-pro a { color: var(--gold-deep); font-weight: 600; text-decoration: none; display: inline; line-height: 2.4; padding: 10px 8px; }
.f-pro a:hover { text-decoration: underline; }

/* ----------------------------------------- buttons ---------------------------------------- */
.fbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 18px;
  border-radius: 14px; border: 1.5px solid var(--line-strong); background: #fff; color: var(--charcoal); font: 600 16px var(--font);
  cursor: pointer; text-decoration: none; text-align: center; line-height: 1.2; -webkit-tap-highlight-color: transparent;
}
.fbtn .ico { width: 20px; height: 20px; }
.fbtn:hover { border-color: var(--gold); }
.fbtn:active { transform: translateY(1px); }
.fbtn.primary { background: var(--charcoal); border-color: var(--charcoal); color: #fff; box-shadow: inset 0 -3px 0 var(--gold); }
.fbtn.primary .ico { color: var(--gold-bright); }
.fbtn.ghost { background: transparent; }
.fbtn.block { display: flex; width: 100%; }
.fbtn.wa { border-color: #25D366; color: #0f7a3f; background: #f2fcf6; }
.fbtn.wa .ico { color: #19a453; }
.fbtn:disabled, .fbtn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.fbtn[aria-busy="true"] { opacity: .7; }
.fbtn:focus-visible, .pick-item:focus-visible, .task:focus-visible, .trade:focus-visible, .rcard:focus-visible, .owe-card:focus-visible,
.pcard:focus-visible, .fig:focus-visible, .choice:focus-visible, .f-overdue:focus-visible, .f-icon:focus-visible, .f-back:focus-visible,
.file-pick:focus-within, .f-pro a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.f-row { display: flex; gap: 10px; flex-wrap: wrap; }
.f-row > * { flex: 1 1 120px; }
.f-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.f-actions > .fbtn, .f-share .fbtn { width: 100%; }
.f-actions.two { display: grid; grid-template-columns: 1fr; }
@media (min-width: 440px) { .f-actions.two { grid-template-columns: 1fr 1fr; } }
.f-share { display: flex; flex-direction: column; gap: 10px; }
.f-share:empty { display: none; }
.file-pick { position: relative; overflow: hidden; }

/* ----------------------------------------- forms ----------------------------------------- */
.fpage [hidden] { display: none !important; }
.fpage label .lt { display: block; }
.fpage label { font-size: 14px; color: var(--charcoal); gap: 6px; }
.fpage label small { font-weight: 500; color: var(--muted); }
.fpage input:not([type=radio]):not([type=checkbox]), .fpage select, .fpage textarea { font-size: 16px; min-height: 52px; border-radius: 12px; padding: 10px 14px; }
.fpage textarea { min-height: 88px; }
.fpage input.big { font-size: 22px; font-weight: 600; min-height: 58px; }
[dir="rtl"] .fpage input[dir="ltr"] { text-align: end; }
.f-hint { font-weight: 500; }
.f-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px; }
.f-form { display: flex; flex-direction: column; gap: 14px; }
.f-form .f-h2 { margin: 0; }
.f-err { margin: 12px 0; font-size: 15px; border-radius: 12px; }
.f-form .f-err { margin: 0; }
.f-search { position: relative; margin-bottom: 12px; }
.f-search .ico { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 20px; height: 20px; pointer-events: none; }
.fpage .f-search input[type=search] { padding-inline-start: 46px; background: #fff; }
.f-radios { border: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.f-radios legend { font-size: 14px; color: var(--charcoal); padding: 0 0 6px; }
.f-radio { flex-direction: row !important; align-items: center; gap: 12px !important; min-height: 56px; padding: 8px 14px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: #fff; cursor: pointer; }
.f-radio input { width: 22px; height: 22px; min-height: 0; accent-color: var(--charcoal); flex: none; }
.f-radio span { display: flex; flex-direction: column; font-weight: 600; font-size: 15px; }
.f-radio span small { color: var(--gold-deep); font-weight: 600; font-size: 12.5px; }
.f-radio:has(input:checked) { border-color: var(--charcoal); box-shadow: inset 0 0 0 1px var(--charcoal); }

/* ------------------------------------------ home ------------------------------------------ */
.figs { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 12px; }
@media (min-width: 480px) { .figs { grid-template-columns: 1fr 1fr; } }
.fig { display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); text-decoration: none; color: inherit; min-width: 0; }
.fig span { font-size: 14px; font-weight: 600; color: var(--muted); }
.fig b { font-size: clamp(22px, 6.4vw, 28px); font-weight: 700; color: var(--charcoal); letter-spacing: -.01em; }
.fig small { font-size: 13px; }
.fig.main { background: var(--charcoal); border-color: var(--charcoal); color: #fff; box-shadow: inset 0 -4px 0 var(--gold), var(--shadow); }
.fig.main span { color: var(--on-dark-2); }
.fig.main b { color: var(--gold-bright); }
.fig.main small { color: var(--on-dark-3); }
.fig.bad b { color: var(--red); }
.f-overdue {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; margin-bottom: 14px; border-radius: 12px;
  background: #fdf0ee; border: 1px solid #f1c7c0; color: #8f2a1e; font-weight: 600; font-size: 15px; text-decoration: none;
}
.f-overdue i { width: 10px; height: 10px; border-radius: 50%; background: var(--red); flex: none; }
.f-overdue span { flex: 1; min-width: 0; }
.f-overdue .ico { width: 18px; height: 18px; }
.tasks { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 520px) { .tasks:not(.one) { grid-template-columns: 1fr 1fr; } .tasks:not(.one) .task:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.task {
  display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px 16px; background: var(--card); border: 1.5px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow); text-decoration: none; color: var(--text); -webkit-tap-highlight-color: transparent;
}
.task:hover { border-color: var(--gold); }
.task:active { transform: translateY(1px); }
.task-ico { width: 48px; height: 48px; border-radius: 14px; background: var(--charcoal); display: grid; place-items: center; flex: none; }
.task-ico .ico { width: 24px; height: 24px; color: var(--gold-bright); stroke-width: 2; }
.task-t { display: flex; flex-direction: column; min-width: 0; }
.task-t b { font-size: 17px; font-weight: 700; color: var(--charcoal); }
.task-t small { font-size: 13.5px; color: var(--muted); line-height: 1.35; }

/* ----------------------------------------- lists ----------------------------------------- */
.f-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.rcard, .pick-item, .owe-card {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 14px; background: var(--card);
  border: 1.5px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--text); text-align: start; font: inherit; cursor: pointer;
}
.rcard:hover, .pick-item:hover, .owe-card:hover { border-color: var(--gold); }
.pick-item.on { border-color: var(--charcoal); background: var(--tint-accent); box-shadow: inset 0 0 0 1px var(--charcoal); }
.pick-item:disabled { opacity: .6; cursor: progress; }
.r-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--cream); display: grid; place-items: center; flex: none; }
.r-ico .ico { color: var(--gold-deep); }
.r-main, .pi-main, .oc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.r-main b, .pi-main b, .oc-main b { font-size: 15.5px; font-weight: 600; overflow-wrap: anywhere; }
.r-main small, .pi-main small, .oc-main small { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.pi-main small.red-text, .oc-main small.red-text { color: var(--red); }
.pi-late { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--red) !important; font-weight: 600; }
.r-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.r-top, .r-bot { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.r-top b { font-size: 15.5px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
.r-top .amt { font-weight: 700; font-size: 15px; flex: none; }
.r-bot { align-items: center; flex-wrap: wrap; row-gap: 4px; }
.r-bot small { color: var(--muted); font-size: 13px; min-width: 0; }
.r-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; font-weight: 600; font-size: 14.5px; }
.pi-amt, .oc-amt { display: flex; flex-direction: column; align-items: flex-end; flex: none; font-weight: 700; font-size: 15.5px; }
.pi-amt small { font-size: 12px; font-weight: 500; color: var(--muted); }
.oc-amt { flex-direction: row; align-items: center; gap: 4px; }
.pick-item > .ico, .oc-amt .ico, .rcard > .ico { color: var(--muted); width: 20px; height: 20px; flex: none; }
.pi-check { width: 32px; height: 32px; border-radius: 50%; background: var(--charcoal); display: grid; place-items: center; flex: none; }
.pi-check .ico { color: var(--gold-bright); width: 18px; height: 18px; stroke-width: 2.5; }
.owe-card.late { border-inline-start: 5px solid var(--red); }

/* ----------------------------------------- wizard ----------------------------------------- */
.f-steps { margin: 4px 0 16px; }
.f-steps-t { margin: 0 0 8px; font-size: 13.5px; color: var(--muted); }
.f-steps-t b { color: var(--charcoal); }
.f-steps-bar { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.f-steps-bar li { flex: 1; height: 6px; border-radius: 3px; background: var(--track-2); }
.f-steps-bar li.done { background: var(--gold-deep); }
.f-steps-bar li.on { background: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 25%, transparent); }
.f-bar {
  position: sticky; bottom: 0; z-index: 40; margin: 18px -16px 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 96%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-top: 1px solid var(--line);
}
.f-bar-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.f-bar-btns > * { flex: 1 1 0; min-width: 0; }
.f-bar-btns > .wide { flex-basis: 100%; }
.f-total { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 2px 8px; font-size: 14px; color: var(--charcoal-soft); }
.f-total b { font-size: 19px; color: var(--charcoal); }
.f-total.muted { justify-content: center; }
.trades { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 480px) { .trades { grid-template-columns: repeat(3, 1fr); } }
.trade {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 104px; padding: 14px; background: var(--card);
  border: 1.5px solid var(--line); border-radius: 16px; cursor: pointer; font: inherit; color: var(--text); text-align: start;
}
.trade:hover { border-color: var(--gold); }
.trade .ico { width: 30px; height: 30px; color: var(--gold-deep); stroke-width: 1.8; }
.trade b { font-size: 16px; font-weight: 700; }
.trade small { color: var(--muted); font-size: 13px; }
.fwrap > .fpage > .fbtn.block, .fpage > .fbtn.block { margin: 12px 0; }
.f-line { display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.fl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.fl-main b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; line-height: 1.35; }
.fl-main small { color: var(--muted); font-size: 13.5px; }
.fl-side { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fl-side > b { font-size: 16px; }
.fl-act { display: flex; gap: 6px; }
.f-icon {
  min-height: 48px; min-width: 48px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--charcoal);
  font: 600 14px var(--font); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.f-icon.danger { color: var(--red); padding: 0; }
.qf-item { margin: 0; display: flex; flex-direction: column; gap: 4px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.qf-item b { font-size: 16px; line-height: 1.4; }
.qf-item small { color: var(--muted); }
.qf-total { margin: -4px 2px 0; font-size: 18px; font-weight: 700; min-height: 1.4em; }
.qf-total small { font-size: 13px; font-weight: 500; color: var(--muted); }
.rv-row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.rv-row:last-child { border-bottom: 0; }
.rv-row > span { color: var(--muted); font-size: 14px; flex: none; max-width: 45%; }
.rv-row > b { font-weight: 600; font-size: 15px; text-align: end; overflow-wrap: anywhere; min-width: 0; }
.rv-lines { list-style: none; margin: 0; padding: 0; }
.rv-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.rv-lines li:last-child { border-bottom: 0; }
.rv-lines li > span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rv-lines li > span b { font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.rv-lines li > span small { color: var(--muted); font-size: 13px; }
.rv-lines li > b { flex: none; font-size: 14.5px; }
.f-totals .trow { font-size: 15px; padding: 8px 0; }
.f-totals .trow.grand { font-size: 17px; padding: 12px 14px; border-radius: 12px; }
.fta { border-top: 4px solid var(--gold); }
.fta-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 0 4px; font-weight: 700; font-size: 16px; color: var(--charcoal); flex-wrap: wrap; }
.fta-title span { font-size: 15px; }

/* --------------------------------- documents & success ---------------------------------- */
.f-success { text-align: center; padding: 6px 0 16px; }
.f-success-ico { width: 68px; height: 68px; border-radius: 50%; background: #e3f2e8; display: grid; place-items: center; margin: 4px auto 12px; }
.f-success-ico .ico { width: 36px; height: 36px; color: var(--green); stroke-width: 2.4; }
.f-success .f-h1 { font-size: 22px; }
.f-success p { margin: 0; color: var(--muted); }
.doc-card { padding: 18px; }
.dc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.dc-no { font-weight: 700; font-size: 15px; color: var(--charcoal-soft); }
.dc-client { margin: 0; font-size: 20px; font-weight: 700; overflow-wrap: anywhere; }
.dc-sub { margin: 2px 0 0; color: var(--muted); }
.dc-total, .pay-owed { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 14px 0 6px; padding: 12px 14px; background: var(--cream); border-radius: 12px; }
.dc-total > span, .pay-owed > span { color: var(--charcoal-soft); font-weight: 600; font-size: 14px; }
.amt.big { font-size: clamp(22px, 7vw, 28px); font-weight: 700; color: var(--charcoal); }
.pay-head b { font-size: 18px; display: block; }
.pay-head > small { color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pay-owed { margin-bottom: 0; }
.f-methods { border: 0; padding: 0; margin: 0; }
.f-methods legend { font-size: 14px; font-weight: 600; color: var(--charcoal); padding: 0 0 8px; }
.seg-big { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mbtn { position: relative; display: block !important; }
.mbtn input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mbtn span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 80px; padding: 8px 6px;
  border: 1.5px solid var(--line-strong); border-radius: 14px; background: #fff; font: 600 14px var(--font); text-align: center; line-height: 1.2; cursor: pointer;
}
.mbtn .ico { width: 26px; height: 26px; color: var(--gold-deep); }
.mbtn input:checked + span { background: var(--charcoal); border-color: var(--charcoal); color: #fff; box-shadow: inset 0 -3px 0 var(--gold); }
.mbtn input:checked + span .ico { color: var(--gold-bright); }
.mbtn input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.cheque-box { display: flex; flex-direction: column; gap: 14px; padding: 14px; background: var(--cream); border-radius: 14px; }
.cheque-box[hidden] { display: none; }

/* ----------------------------------------- photos ---------------------------------------- */
.proj-cards { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 10px; }
.pcard { display: flex; gap: 14px; align-items: center; padding: 10px; background: var(--card); border: 1.5px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--text); min-height: 96px; }
.pcard:hover { border-color: var(--gold); }
.pc-img { width: 104px; height: 78px; border-radius: 12px; overflow: hidden; background: var(--cream); display: grid; place-items: center; flex: none; }
.pc-img img { width: 100%; height: 100%; object-fit: cover; }
.pc-img .ico { width: 28px; height: 28px; color: var(--gold-deep); }
.pc-body { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; }
.pc-body b { font-size: 16px; overflow-wrap: anywhere; }
.pc-body small { color: var(--muted); font-size: 13px; }
.f-progress { min-height: 1.4em; margin: 12px 2px; font-weight: 600; color: var(--charcoal-soft); }
.f-progress:empty { margin: 4px 0; }
.thumbs { list-style: none; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 480px) { .thumbs { grid-template-columns: repeat(4, 1fr); } }
.thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--cream) center / cover no-repeat; display: grid; place-items: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.busy::before { content: ''; position: absolute; inset: 0; background: color-mix(in srgb, var(--charcoal) 45%, transparent); }
.th-state { position: relative; color: #fff; font-weight: 600; font-size: 12.5px; text-align: center; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.thumb.failed { background: #fdf0ee; border: 1.5px solid #f1c7c0; }
.thumb.failed .th-state { color: #8f2a1e; }
.thumb.failed .th-state small { font-weight: 500; font-size: 11px; }
.th-ok, .th-tag { position: absolute; top: 6px; inset-inline-end: 6px; }
.th-ok { width: 24px; height: 24px; border-radius: 50%; background: var(--green); display: grid; place-items: center; }
.th-ok .ico { width: 14px; height: 14px; color: #fff; stroke-width: 3; }
.th-tag { background: var(--gold); color: var(--brand-on-accent); font-size: 11px; font-weight: 700; border-radius: 6px; padding: 2px 7px; }
.pub-card { padding: 8px 16px; }
.f-switch { flex-direction: row !important; align-items: center; gap: 14px !important; min-height: 64px; cursor: pointer; }
.f-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw { position: relative; width: 56px; height: 32px; border-radius: 16px; background: var(--switch-off); flex: none; transition: background .15s; }
.sw::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: inset-inline-start .15s; }
.f-switch input:checked + .sw { background: var(--green); }
.f-switch input:checked + .sw::after { inset-inline-start: 27px; }
.f-switch input:focus-visible + .sw { outline: 3px solid var(--gold); outline-offset: 2px; }
.f-switch input:disabled + .sw { opacity: .5; }
.sw-t { display: flex; flex-direction: column; }
.sw-t b { font-size: 16px; }
.sw-t small { color: var(--muted); font-size: 13px; }

/* ----------------------------------------- chooser ---------------------------------------- */
.chooser { padding-top: 6px; }
.chooser .f-h1 { font-size: 26px; margin-bottom: 18px; }
.choose { display: grid; gap: 14px; }
.choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px; text-align: start; font: inherit; color: var(--text);
  background: var(--card); border: 2px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); cursor: pointer;
}
.choice:hover { border-color: var(--gold); }
.choice.fast { border-color: var(--gold); background: linear-gradient(180deg, var(--tint-accent), #fff 60%); }
.choice-ico { width: 52px; height: 52px; border-radius: 16px; background: var(--charcoal); display: grid; place-items: center; margin-bottom: 4px; }
.choice-ico .ico { width: 26px; height: 26px; color: var(--gold-bright); stroke-width: 2; }
.choice b { font-size: 21px; font-weight: 700; }
.choice > span:not(.choice-ico) { font-size: 15.5px; color: var(--charcoal-soft); }
.choice ul { list-style: none; padding: 0; margin: 6px 0 4px; display: flex; flex-wrap: wrap; gap: 6px; }
.choice li { background: var(--cream); border-radius: 999px; padding: 3px 10px; font-size: 13px; color: var(--charcoal-soft); }
.choice em { font-style: normal; font-weight: 700; color: var(--gold-deep); font-size: 15px; margin-top: 4px; }
@media (min-width: 520px) { .choose { grid-template-columns: 1fr 1fr; } }

/* modals (confirm dialogs) inside Fast mode: bigger buttons and text */
body.fast-mode .modal .btn { min-height: 48px; padding: 0 18px; font-size: 15px; border-radius: 12px; }
body.fast-mode .modal .icon-btn { width: 44px; height: 44px; }
body.fast-mode .confirm-msg { font-size: 16px; line-height: 1.5; }
.fpage label.fbtn { flex-direction: row; gap: 8px; font-size: 16px; color: var(--charcoal); }
.fpage label.fbtn.primary { color: #fff; }
.f-bar .fbtn { padding: 0 12px; gap: 6px; }
.fbtn > span { min-width: 0; }
.fpage bdi[dir="ltr"] { white-space: nowrap; }
.arr::before { content: '→'; }
[dir="rtl"] .arr::before { content: '←'; }
@media (min-width: 480px) { .figs .fig b { font-size: 24px; } }
