/* Квиты — Mini App. Токены и компоненты из утверждённого дизайна. */
@font-face { font-family: Onest; font-weight: 100 900; font-display: swap; src: url(/fonts/onest-cyrillic-wght-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; font-weight: 100 900; font-display: swap; src: url(/fonts/onest-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Onest; font-weight: 100 900; font-display: swap; src: url(/fonts/onest-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-mono-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg:#F4F1EA; --card:#FFFFFF; --ink:#14213D; --mut:#55607A; --line:#E6E1D5; --line2:#C9C3B3;
  --blue:#1B49C9; --blueSoft:#E4EBFC; --org:#B8400A; --orgSoft:#FCE9DC;
  --amber:#855000; --amberSoft:#FBEBC8; --rose:#A3153B; --roseSoft:#FCE4E9;
  --hero:#14213D; --heroBlue:#8FB0FF; --heroOrg:#FF9E66; --btn:#14213D; --btnInk:#FFFFFF;
  --dim:rgba(20,33,61,.5); --shadow:rgba(20,33,61,.14); --gold:#E8A317; --goldInk:#8A5A00;
  --s-blue:#1B49C9; --s-blueT:#FFFFFF; --s-rose:#A3153B; --s-roseT:#FFFFFF; --s-amber:#F2B53A; --s-amberT:#3B2500;
  --s-org:#B8400A; --s-orgT:#FFFFFF; --s-ink:#14213D; --s-inkT:#FFFFFF; --s-slate:#DDD7C8; --s-slateT:#14213D; --s-gray:#55607A; --s-grayT:#FFFFFF;
  --mono:'IBM Plex Mono',ui-monospace,SFMono-Regular,Menlo,monospace;
  --safe-t: max(env(safe-area-inset-top,0px), var(--tg-content-safe-area-inset-top,0px));
  --safe-b: env(safe-area-inset-bottom,0px);
  color-scheme: light;
}
[data-theme=dark] {
  --bg:#0D1322; --card:#172034; --ink:#EEF1F8; --mut:#A3AEC6; --line:#26314D; --line2:#3A4768;
  --blue:#86A8FF; --blueSoft:#1E2E5E; --org:#FF9F68; --orgSoft:#4A2A17;
  --amber:#F2C265; --amberSoft:#3A2D10; --rose:#FF93A9; --roseSoft:#47202B;
  --hero:#1F2D52; --btn:#EEF1F8; --btnInk:#0D1322;
  --dim:rgba(3,6,14,.66); --shadow:rgba(0,0,0,.5); --gold:#F2B93B; --goldInk:#F2C265;
  --s-blue:#86A8FF; --s-blueT:#0D1322; --s-rose:#FF93A9; --s-roseT:#2A0A14; --s-amber:#F2C265; --s-amberT:#2B1D00;
  --s-org:#FF9F68; --s-orgT:#2A1100; --s-ink:#EEF1F8; --s-inkT:#0D1322; --s-slate:#2B3756; --s-slateT:#EEF1F8; --s-gray:#A3AEC6; --s-grayT:#0D1322;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font-family: Onest, 'Helvetica Neue', system-ui, sans-serif; font-size: 15px; line-height: 1.35; -webkit-text-size-adjust: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: default; }
input, textarea { outline: none; border: 0; }
input:focus-visible, textarea:focus-visible { outline: none; }
.inp:focus-visible, .search input:focus-visible { box-shadow: 0 0 0 2px var(--blue); }
input::placeholder, textarea::placeholder { color: var(--mut); opacity: 1; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; color: var(--mut); }
.mut { color: var(--mut); }
.hidden { display: none !important; }
svg { flex: none; }

#app { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; position: relative; }
.screen { padding: calc(var(--safe-t) + 20px) 20px 16px; display: flex; flex-direction: column; gap: 18px; min-height: 100vh; min-height: 100dvh; animation: enter .22s ease-out; }
.screen.tight { gap: 14px; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* верхние панели */
.top { display: flex; align-items: center; gap: 8px; }
.brand { display: flex; align-items: center; gap: 8px; flex: 1; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.hdr { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.hdr .ttl { flex: 1; min-width: 0; }
.hdr h1 { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.15; text-wrap: balance; }
.hdr .sub { font-size: 13px; color: var(--mut); margin-top: 2px; }
.h1 { font-size: 26px; font-weight: 800; letter-spacing: -.01em; min-height: 48px; display: flex; align-items: center; margin: 0; }
.h2 { font-size: 17px; font-weight: 800; margin: 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; }

/* кнопки: основная — тёмная заливка; остальные — мягкие, без обводок */
.btn { height: 52px; border-radius: 16px; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; width: 100%; background: var(--btn); color: var(--btnInk); transition: transform .08s, opacity .15s; }
.btn:active:not(:disabled) { transform: scale(.985); }
.btn.secondary { background: var(--line); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--blue); }
.btn.soft { background: var(--blueSoft); color: var(--blue); }
.btn.danger { background: var(--roseSoft); color: var(--rose); }
.btn:disabled, .btn.disabled { background: var(--line); color: var(--mut); opacity: .9; }
.btn.sm { height: 40px; font-size: 14px; border-radius: 12px; padding: 0 14px; width: auto; }
.btn.state { width: 128px; height: 40px; font-size: 14px; border-radius: 12px; padding: 0; }
.btn.loading { opacity: .65; pointer-events: none; }
.iconbtn { width: 44px; height: 44px; border-radius: 22px; background: var(--card); color: var(--ink); display: flex; align-items: center; justify-content: center; flex: none; }
.pillbtn { height: 44px; border-radius: 22px; background: var(--card); padding: 0 14px 0 12px; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.chip { height: 44px; border-radius: 22px; padding: 0 16px; font-size: 14px; font-weight: 700; background: var(--card); color: var(--ink); flex: none; white-space: nowrap; }
.chip.on { background: var(--btn); color: var(--btnInk); }
.chips { display: flex; gap: 8px; overflow-x: auto; margin-right: -20px; padding-right: 20px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

.card { background: var(--card); border-radius: 22px; padding: 18px; }
.card.tight { padding: 6px 18px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.sp { margin-top: auto; }

/* статусы: мягкая заливка, без окантовки */
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 11px; border-radius: 12px; font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap; background: var(--blueSoft); color: var(--blue); }
.pill.rose { background: var(--roseSoft); color: var(--rose); }
.pill.amber { background: var(--amberSoft); color: var(--amber); }
.pill.org { background: var(--orgSoft); color: var(--org); }
.pill.gray { background: var(--line); color: var(--mut); }
.pill.ink { background: color-mix(in srgb, var(--ink) 13%, transparent); color: var(--ink); }

/* язычок на карточке */
.tab { position: absolute; top: 20px; right: 0; height: 32px; padding: 0 16px 0 14px; border-radius: 16px 0 0 16px; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; line-height: 1; white-space: nowrap; background: var(--s-blue); color: var(--s-blueT); }
.tab.rose { background: var(--s-rose); color: var(--s-roseT); } .tab.amber { background: var(--s-amber); color: var(--s-amberT); } .tab.org { background: var(--s-org); color: var(--s-orgT); }
.tab.ink { background: var(--s-ink); color: var(--s-inkT); } .tab.slate { background: var(--s-slate); color: var(--s-slateT); } .tab.gray { background: var(--s-gray); color: var(--s-grayT); }

/* аватар и метка Telegram */
.avatar { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none; background: var(--line); color: var(--ink); }
.avatar.ink { background: var(--btn); color: var(--btnInk); } .avatar.blue { background: var(--blueSoft); color: var(--blue); } .avatar.org { background: var(--orgSoft); color: var(--org); }
.avatar.amber { background: var(--amberSoft); color: var(--amber); } .avatar.rose { background: var(--roseSoft); color: var(--rose); }
.av-wrap { position: relative; flex: none; }
.av-wrap .tgb { position: absolute; right: -5px; bottom: -5px; display: flex; border-radius: 50%; box-shadow: 0 0 0 2.5px var(--ring, var(--card)); }

/* строка займа */
.loan { display: flex; align-items: center; gap: 12px; background: var(--card); padding: 12px 14px; border-radius: 20px; min-height: 72px; width: 100%; text-align: left; }
.loan.ghost { background: color-mix(in srgb, var(--card) 45%, transparent); border: 1.5px dashed var(--line2); padding: 10.5px 12.5px; --ring: var(--bg); }
.loan .nm { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loan .sb { font-size: 13px; color: var(--mut); margin-top: 2px; }
.loan .am { font-size: 16px; font-weight: 800; }
.loan .rt { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.c-blue { color: var(--blue); } .c-org { color: var(--org); } .c-rose { color: var(--rose); } .c-mut { color: var(--mut); } .c-ink { color: var(--ink); }

/* баланс-«герой» */
.hero { background: var(--hero); color: #fff; border-radius: 28px; padding: 20px 20px 8px; display: flex; flex-direction: column; gap: 16px; }
.hero .mono { color: rgba(255,255,255,.78); }
.hero .big { font-size: 46px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.hero .cap { font-size: 14px; color: rgba(255,255,255,.82); margin-top: 8px; }
.hero .bar { display: flex; gap: 4px; height: 12px; }
.hero .bar i { border-radius: 6px; display: block; }
.hero .legend { display: flex; gap: 16px; }
.hero .legend > div { flex: 1; min-width: 0; }
.hero .legend .lb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: rgba(255,255,255,.82); }
.hero .legend .lb i { width: 8px; height: 8px; border-radius: 4px; flex: none; }
.hero .legend .v { font-size: 19px; font-weight: 800; margin-top: 2px; }
.hero .legend .n { font-size: 12px; color: rgba(255,255,255,.7); }
.hero .more { border-top: 1px solid rgba(255,255,255,.16); }
.hero .more button { width: 100%; height: 60px; color: #fff; display: flex; align-items: center; gap: 12px; text-align: left; }
.coin { width: 30px; height: 30px; border-radius: 15px; background: rgba(255,255,255,.16); border: 2px solid var(--hero); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; overflow: hidden; }

/* «линейка» ближайших возвратов */
.tape-wrap { position: relative; margin: -4px -18px 0 -6px; overflow: hidden; }
.tape { display: flex; padding: 4px 0 2px; overflow-x: auto; scrollbar-width: none; }
.tape::-webkit-scrollbar { display: none; }
.tape .d { width: 46px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tape .d + .d { border-left: 1px solid var(--line); }
.tape .wd { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--mut); }
.tape .dn { width: 34px; height: 34px; border-radius: 17px; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; }
.tape .today .dn { background: var(--btn); color: var(--btnInk); font-weight: 800; }
.tape .dot { width: 5px; height: 5px; border-radius: 3px; background: var(--line2); margin: 10px 0; }
.tape .ev { width: 26px; height: 26px; border-radius: 13px; display: flex; align-items: center; justify-content: center; }
.tape .ev.in { background: var(--blueSoft); color: var(--blue); } .tape .ev.out { background: var(--orgSoft); color: var(--org); } .tape .ev.late { background: var(--roseSoft); color: var(--rose); }
.tape-fade { position: absolute; top: 0; right: 0; bottom: 0; width: 44px; background: linear-gradient(90deg, transparent, var(--card)); pointer-events: none; }

/* нижняя панель */
.dock { position: sticky; bottom: calc(10px + var(--safe-b)); margin-top: auto; padding-top: 16px; z-index: 5; }
.dock-in { background: var(--card); border-radius: 34px; padding: 8px; display: flex; align-items: center; gap: 4px; box-shadow: 0 10px 28px var(--shadow); }
.dock-in .t { flex: 1; height: 56px; border-radius: 28px; color: var(--mut); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; font-weight: 700; }
.dock-in .t.on { background: var(--blueSoft); color: var(--blue); }
.dock-in .plus { width: 56px; height: 56px; border-radius: 28px; background: var(--btn); color: var(--btnInk); display: flex; align-items: center; justify-content: center; flex: none; margin-left: 4px; }

/* формы */
.lab { display: block; font-size: 13px; font-weight: 600; color: var(--mut); margin: 0 0 8px 2px; }
.inp { width: 100%; height: 52px; border-radius: 14px; background: var(--card); padding: 0 16px; font-size: 16px; font-weight: 600; color: var(--ink); }
.inp.big { height: 64px; font-size: 30px; font-weight: 800; }
.inp.area { height: 84px; padding: 12px 16px; resize: none; font-weight: 500; line-height: 1.4; }
.inp-wrap { position: relative; }
.inp-wrap .rt { position: absolute; right: 12px; top: 0; bottom: 0; display: flex; align-items: center; color: var(--mut); }
.seg { display: flex; background: var(--line); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { flex: 1; height: 44px; border-radius: 11px; font-size: 14px; font-weight: 600; color: var(--mut); padding: 0 6px; }
.seg button.on { background: var(--card); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px var(--shadow); }
.seg.sm button { height: 36px; font-size: 13px; }
.sw { width: 52px; height: 32px; border-radius: 16px; background: var(--line2); position: relative; flex: none; transition: background .15s; }
.sw::after { content: ''; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 12px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.sw[aria-checked=true] { background: var(--blue); } .sw[aria-checked=true]::after { transform: translateX(20px); }
.sel { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; background: var(--card); border-radius: 14px; padding: 8px 14px; text-align: left; }
.sel .v { font-weight: 700; font-size: 16px; } .sel .s { font-size: 13px; color: var(--mut); }
.tile { height: 76px; border-radius: 20px; background: var(--card); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 14px; font-weight: 700; }
.tile.on { background: var(--blueSoft); color: var(--blue); }
.kv { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 15px; }
.kv:first-child { border-top: 0; }
.kv > span:first-child { color: var(--mut); flex: none; }
.kv > span:last-child { font-weight: 700; text-align: right; display: flex; align-items: center; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.li { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 0; border-top: 1px solid var(--line); width: 100%; text-align: left; }
.li:first-child { border-top: 0; }
.li .ic { color: var(--mut); display: flex; width: 24px; justify-content: center; }
.li .t1 { font-size: 15px; font-weight: 600; } .li .t2 { font-size: 13px; color: var(--mut); }
.li .vv { font-size: 14px; color: var(--mut); display: flex; align-items: center; gap: 4px; }
.err { color: var(--rose); font-size: 13px; font-weight: 600; margin-top: 6px; }
.note { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--mut); text-wrap: pretty; }
.note.box { background: var(--card); border-radius: 16px; padding: 12px 14px; }

/* шторка */
.sheet-bd { position: fixed; inset: 0; background: var(--dim); z-index: 50; animation: fade .18s ease-out; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; max-height: 92dvh; overflow-y: auto; background: var(--bg); border-radius: 28px 28px 0 0; padding: 10px 20px calc(24px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; box-shadow: 0 -10px 40px rgba(0,0,0,.25); z-index: 51; animation: up .24s cubic-bezier(.2,.8,.2,1); overscroll-behavior: contain; }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line2); align-self: center; flex: none; }
.sheet .st { font-size: 21px; font-weight: 800; margin: 0; }
.sheet .ss { font-size: 14px; color: var(--mut); margin-top: 4px; text-wrap: pretty; }
@keyframes fade { from { opacity: 0; } } @keyframes up { from { transform: translateY(40px); opacity: .6; } }
.toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 16px; font-size: 14px; font-weight: 600; z-index: 100; max-width: 90%; text-align: center; box-shadow: 0 8px 24px var(--shadow); animation: up .2s ease-out; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--blue); animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--line), var(--card), var(--line)); background-size: 200% 100%; animation: sk 1.2s linear infinite; border-radius: 16px; }
@keyframes sk { to { background-position: -200% 0; } }

/* карточка займа */
.lcard { position: relative; background: var(--card); border-radius: 24px; padding: 20px 18px 18px; }
.lcard .amt { font-size: 38px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.prog { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.prog i { display: block; height: 100%; border-radius: 5px; background: var(--blue); }
.prog.org i { background: var(--org); }
.pay { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.pay:first-child { border-top: 0; }
.mbadge { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; background: var(--line); color: var(--ink); font-weight: 800; font-size: 15px; }
.mbadge.cash { background: var(--blueSoft); color: var(--blue); } .mbadge.transfer { background: var(--line); } .mbadge.crypto { background: var(--amberSoft); color: var(--amber); } .mbadge.other { background: var(--roseSoft); color: var(--rose); }
.mix { display: inline-flex; align-items: center; }
.mix .mbadge { box-shadow: 0 0 0 2px var(--card); } .mix .mbadge + .mbadge { margin-left: -8px; }
.sched-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.sched-row:first-child { border-top: 0; }
.sched-row .ck { width: 22px; height: 22px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--line); color: var(--mut); }
.sched-row.done .ck { background: var(--blueSoft); color: var(--blue); }
.sched-row.late .ck { background: var(--roseSoft); color: var(--rose); }
.file { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 10px; background: var(--line); font-size: 12px; font-weight: 700; max-width: 100%; }
.file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.thumb { width: 64px; height: 64px; border-radius: 14px; background: var(--line); position: relative; display: flex; align-items: center; justify-content: center; flex: none; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .x { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 11px; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; }

/* календарь */
.cal-h { display: flex; align-items: center; justify-content: space-between; }
.cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-g .w { font-family: var(--mono); font-size: 11px; color: var(--mut); padding: 6px 0; }
.cal-g button { height: 42px; border-radius: 21px; font-size: 15px; font-weight: 600; color: var(--ink); }
.cal-g button.dis { color: var(--line2); }
.cal-g button.sel { background: var(--btn); color: var(--btnInk); font-weight: 800; }
.cal-g button.tdy { box-shadow: inset 0 0 0 2px var(--blue); }
.cal-g button.mark { background: var(--blueSoft); color: var(--blue); }

/* поиск банка и списки */
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 15px; color: var(--mut); }
.search input { width: 100%; height: 48px; border-radius: 14px; background: var(--card); padding: 0 14px 0 44px; font-size: 16px; }
.bank { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 16px; padding: 10px 14px; width: 100%; text-align: left; min-height: 56px; }
.mono-logo { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; flex: none; }

/* закрытый займ: билет с отрывным корешком */
.tk-stub { transform-origin: 6% 0; animation: tkTear 1.15s cubic-bezier(.5,.02,.85,.35) .7s both; }
@keyframes tkTear { 0% { transform: none; opacity: 1; } 9% { transform: rotate(-2.5deg) translateY(1px); } 22% { transform: rotate(6deg) translate(3px,2px); opacity: 1; } 100% { transform: translate(110px,470px) rotate(36deg); opacity: 0; } }
.tk-top { animation: tkJolt .45s ease-out .7s both; }
@keyframes tkJolt { 0% { transform: none; } 35% { transform: translateY(-7px) rotate(-.6deg); } 100% { transform: none; } }
.tk-zig { opacity: 0; animation: tkIn .01s linear .95s both; }
@keyframes tkIn { to { opacity: 1; } }
.tk-stamp { animation: tkStamp .5s cubic-bezier(.2,.9,.25,1.25) 1.75s both; }
@keyframes tkStamp { 0% { opacity: 0; transform: scale(2.6) rotate(-26deg); } 55% { opacity: 1; } 100% { opacity: 1; transform: scale(1) rotate(-9deg); } }
.tk-cf { position: absolute; opacity: 0; animation: tkCf 1.7s cubic-bezier(.12,.7,.3,1) 1s both; }
@keyframes tkCf { 0% { opacity: 0; transform: translate(0,0) rotate(0) scale(.5); } 8% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx),var(--dy)) rotate(var(--r)) scale(1); } }
.tk.static .tk-stub { display: none; } .tk.static .tk-zig { opacity: 1; animation: none; } .tk.static .tk-top, .tk.static .tk-stamp { animation: none; } .tk.static .tk-stamp { opacity: .95; transform: rotate(-9deg); } .tk.static .tk-cf { display: none; }
@media (prefers-reduced-motion: reduce) { .tk-stub { display: none; } .tk-zig { opacity: 1; animation: none; } .tk-top, .tk-stamp { animation: none; } .tk-stamp { opacity: 1; transform: rotate(-9deg); } .tk-cf { display: none; } }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 40; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--dx), 110vh) rotate(var(--rot)); } }

/* заставка (истории) */
.story { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; color: #fff; padding: calc(var(--safe-t) + 14px) 20px calc(24px + var(--safe-b)); background: var(--sbg, #14213D); transition: background .3s; max-width: 480px; margin: 0 auto; }
.story .bars { display: flex; gap: 6px; }
.story { --card:#fff; --ink:#14213D; --mut:#55607A; --line:#E6E1D5; --line2:#C9C3B3; --blue:#1B49C9; --blueSoft:#E4EBFC; --org:#B8400A; --orgSoft:#FCE9DC; --amber:#855000; --amberSoft:#FBEBC8; --rose:#A3153B; --roseSoft:#FCE4E9; --btn:#14213D; --btnInk:#fff; --gold:#E8A317; --shadow:rgba(20,33,61,.14); color-scheme: light; overflow: hidden; }
.story .bars i { flex: 1; height: 4px; border-radius: 2px; background: var(--strack, rgba(255,255,255,.28)); overflow: hidden; display: block; }
.story .bars i b { display: block; height: 100%; width: 0; background: var(--sfill, #fff); }
.story .bars i.done b { width: 100%; }
.story .bars i.run b { animation: sprog var(--dur, 4.6s) linear forwards; }
.story.paused .bars i.run b { animation-play-state: paused; }
@keyframes sprog { to { width: 100%; } }
.story .skip { font-weight: 700; font-size: 15px; height: 44px; padding: 0 4px; opacity: .92; }
.story .tapl, .story .tapr { position: absolute; top: 80px; bottom: 130px; width: 40%; }
.story .tapl { left: 0; } .story .tapr { right: 0; }
.story .slide { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 22px; animation: enter .4s ease-out; }
.story h2 { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.08; margin: 0; text-wrap: balance; }
.story p { font-size: 17px; line-height: 1.4; margin: 0; color: rgba(255,255,255,.88); text-wrap: pretty; }
.story .mini { background: #fff; color: #14213D; border-radius: 22px; padding: 16px; box-shadow: 0 16px 40px rgba(0,0,0,.25); }


.privacy-note { font-size: 12px; color: var(--mut); text-align: center; }
.stars-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stars-tile { height: 76px; border-radius: 20px; background: var(--card); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 26px; font-weight: 800; }
.stars-tile.on { background: var(--blueSoft); color: var(--blue); }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.chipbtn { height: 44px; border-radius: 12px; background: var(--line); padding: 0 10px 0 14px; display: flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 800; color: var(--ink); }
.btn.multi { height: auto; min-height: 52px; padding: 10px 18px; }
.lcard .amt.c-blue { color: var(--blue); } .lcard .amt.c-org { color: var(--org); }
.fade-in { animation: enter .22s ease-out; }
textarea.inp { display: block; }
.files-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; } .files-bar i { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.rcpt { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 18px; padding: 10px; min-height: 84px; width: 100%; text-align: left; }
.rcpt .doc { width: 56px; height: 68px; border-radius: 10px; background: var(--bg); border: 1.5px solid var(--line2); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; color: var(--mut); }
.rcpt .doc img { width: 100%; height: 100%; object-fit: cover; }
.infobox { background: var(--blueSoft); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.infobox b { color: var(--blue); }

.st-rise { animation: stRise .7s cubic-bezier(.2,.8,.2,1) both; }
@keyframes stRise { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .st-rise { animation: none; } }

.tk.static .tk-box { height: 262px !important; }
[data-theme=dark] .tk-stamp { mix-blend-mode: normal !important; }
