:root {
  --bg: #0E0E10; --panel: #151517; --raised: #1C1C1F; --raised2: #2A2A2E; --line: #232326;
  --text: #F2F0ED; --soft: #B8B4AE; --muted: #8E8A85; --accent: #C94545; --accent-text: #EE8080;
  --ok: #8BE0AA; --ok-bg: rgba(139, 224, 170, .14); --warn: #E8C48A; --warn-bg: rgba(232, 196, 138, .14);
  --bad: #F0A0A0; --bad-bg: rgba(201, 69, 69, .16); --info: #8FB5FF; --info-bg: rgba(111, 160, 255, .14);
  /* RF Dewi Expanded - платный шрифт. Положите свой файл в /web/fonts и раскомментируйте @font-face ниже. */
  --head: 'RF Dewi Expanded', Unbounded, Onest, system-ui, sans-serif;
}
/* @font-face { font-family: 'RF Dewi Expanded'; src: url('/web/fonts/rf-dewi-expanded-bold.woff2') format('woff2'); font-weight: 700; font-display: swap; } */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 15px/1.5 Onest, system-ui, sans-serif; display: flex; flex-direction: column; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
h1, h2, .head { font-family: var(--head); font-weight: 700; line-height: 1.12; }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; font-weight: 600; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: #f5a8a8; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
img.px { image-rendering: pixelated; }
.muted { color: var(--muted); } .soft { color: var(--soft); } .accent { color: var(--accent-text); }
.small { font-size: 13px; } .grow { flex: 1 1 auto; min-width: 0; } .hidden { display: none !important; }
.center { text-align: center; align-items: center; }
.mono { font-family: ui-monospace, Consolas, monospace; letter-spacing: .06em; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 32px; }
main.wrap { flex: 1 1 auto; padding-top: 12px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 24px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-lg { display: flex; flex-direction: column; gap: 28px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.fade { animation: rise .45s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* шапка */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 30px; padding-top: 20px; padding-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand img { width: 24px; height: 31px; }
.brand b { font-family: var(--head); font-size: 20px; text-transform: lowercase; }
.brand.upper b { text-transform: uppercase; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav button, .nav a { height: 38px; padding: 0 14px; border: none; border-radius: 10px; background: transparent; color: var(--muted);
  font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; transition: background-color .2s, color .2s; }
.nav button:hover, .nav a:hover { color: var(--text); }
.nav [aria-current="true"] { background: var(--raised); color: var(--text); }
.count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; }
.chip { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 14px; border-radius: 12px; background: var(--panel); color: var(--text); }
.chip:hover { color: var(--text); filter: brightness(1.15); }
.chip .idlogo { width: 112px; height: 14px; }
.chip .who { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.avatar { width: 34px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, #8a6a52, #5a4232); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; color: #fff; text-transform: uppercase; }
.foot { display: flex; flex-wrap: wrap; gap: 10px 24px; padding-top: 18px; padding-bottom: 26px; font-size: 13px; color: var(--muted); }
.foot a { color: var(--muted); } .foot a:hover { color: var(--text); }

/* кнопки и поля */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border: none; border-radius: 12px;
  background: var(--raised2); color: var(--text); font-size: 14px; font-weight: 500; white-space: nowrap; transition: filter .2s, transform .12s; }
.btn:hover { filter: brightness(1.15); color: var(--text); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; font-weight: 600; }
.btn-primary:hover { color: #fff; }
.btn-quiet { background: var(--raised); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-white { background: #fff; color: #8f2c2c; font-weight: 600; } .btn-white:hover { color: #8f2c2c; }
.btn-sm { height: 36px; padding: 0 14px; border-radius: 10px; font-size: 13px; }
.btn-lg { height: 54px; padding: 0 28px; border-radius: 13px; font-size: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--soft); }
.input { width: 100%; height: 48px; padding: 0 14px; border: 2px solid transparent; border-radius: 12px; background: var(--panel); color: var(--text); font-size: 15px; }
.input.on-raised { background: var(--raised); }
.input:focus-visible { outline: none; border-color: var(--accent-text); }
.input::placeholder { color: #76726D; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.error { padding: 12px 14px; border-radius: 12px; background: var(--bad-bg); color: var(--bad); font-size: 14px; }
.notice { padding: 14px 16px; border-radius: 14px; background: var(--warn-bg); color: var(--warn); font-size: 14px; line-height: 1.5; }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 13px; background: var(--panel); }
.seg button { flex: 1 1 0; height: 40px; padding: 0 14px; border: none; border-radius: 10px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; transition: background-color .2s, color .2s; }
.seg button[aria-checked="true"], .seg button[aria-selected="true"] { background: var(--raised2); color: var(--text); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills button { height: 38px; padding: 0 16px; border: none; border-radius: 10px; background: var(--panel); color: var(--soft); font-size: 13px; font-weight: 500; transition: background-color .2s, color .2s; }
.pills button[aria-selected="true"] { background: var(--accent); color: #fff; }

/* поверхности */
.card { padding: 22px; border-radius: 20px; background: var(--panel); display: flex; flex-direction: column; gap: 14px; }
.card.tight { padding: 16px; border-radius: 16px; }
.cell { padding: 14px; border-radius: 12px; background: var(--raised); display: flex; flex-direction: column; gap: 4px; }
.cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.line { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--panel); }
.line.in-card { background: var(--raised); border-radius: 12px; padding: 12px 14px; }
.icon-tile { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: var(--raised); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.icon-tile.red { background: var(--bad-bg); color: var(--accent-text); }
.icon-tile.green { background: var(--ok-bg); color: var(--ok); }
.icon-tile img { width: 28px; height: 28px; }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; font-size: 12px; font-weight: 600; background: var(--raised2); color: var(--soft); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); } .badge.info { background: var(--info-bg); color: var(--info); }
.empty { padding: 40px 20px; border-radius: 18px; background: var(--panel); text-align: center; color: var(--soft); }
.sum { font-weight: 700; white-space: nowrap; }
.sum.plus { color: var(--ok); }
.big-num { font-family: var(--head); font-size: 40px; font-weight: 700; line-height: 1; }

/* банковская карта */
.bank-card { aspect-ratio: 1.6; padding: 24px; border-radius: 22px; background: linear-gradient(140deg, #D04B4B 0%, #B23B3B 100%); color: #fff;
  display: flex; flex-direction: column; justify-content: space-between; }
.bank-card .name { font-family: var(--head); font-size: 17px; letter-spacing: .14em; }
.bank-card .chipset { width: 44px; height: 32px; border-radius: 6px; background: linear-gradient(135deg, #f3d48a, #c9a24e); }
.bank-card .num { font-size: 22px; font-weight: 700; letter-spacing: .08em; }
.bank-card.blank { background: var(--panel); color: var(--muted); align-items: center; justify-content: center; text-align: center; font-size: 13px; }
.bank-card.other { background: #3a3a40; }
.split { display: flex; flex-wrap: wrap; gap: 22px; align-items: stretch; }
.split > .side { flex: 0 1 400px; min-width: 260px; }
.split > .rest { flex: 1 1 320px; }

/* маркет */
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.item { display: flex; flex-direction: column; gap: 12px; padding: 10px; border: none; border-radius: 18px; background: var(--panel); color: var(--text); text-align: left;
  transition: background-color .25s, transform .25s cubic-bezier(.2, .7, .2, 1); }
.item:hover { background: #1A1A1D; transform: translateY(-3px); color: var(--text); }
.item .pic { aspect-ratio: 4 / 3; border-radius: 12px; background: var(--raised); display: flex; align-items: center; justify-content: center; }
.item .pic img { width: 76px; height: 76px; }
.item .info { display: flex; flex-direction: column; gap: 6px; padding: 0 4px 4px; }
.price { font-size: 17px; font-weight: 700; color: var(--accent-text); }
.product { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.product .photo { flex: 1 1 340px; max-width: 440px; aspect-ratio: 1; border-radius: 20px; background: var(--panel); display: flex; align-items: center; justify-content: center; }
.product .photo img { width: 52%; }
.product .side { flex: 1 1 360px; display: flex; flex-direction: column; gap: 18px; }
.qty { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 12px; background: var(--raised); }
.qty button { width: 38px; height: 38px; border: none; border-radius: 9px; background: var(--raised2); font-size: 18px; }
.qty b { min-width: 40px; text-align: center; font-size: 16px; }

/* герой и лендинг */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 40px; padding: 32px 0 8px; }
.hero .text { flex: 1 1 440px; display: flex; flex-direction: column; gap: 20px; }
.hero h1 { font-size: 50px; line-height: 1.05; }
.hero p { max-width: 500px; font-size: 17px; line-height: 1.6; color: #A9A59F; }
.floaters { flex: 1 1 380px; min-height: 360px; position: relative; }
.floaters div { position: absolute; border-radius: 30px; background: var(--panel); display: flex; align-items: center; justify-content: center; animation: float 7s ease-in-out infinite; }
.floaters .f1 { left: 8%; top: 6%; width: 150px; height: 150px; }
.floaters .f2 { right: 6%; top: 0; width: 190px; height: 190px; background: var(--raised); animation-delay: -2s; }
.floaters .f3 { left: 26%; bottom: 4%; width: 176px; height: 176px; background: linear-gradient(140deg, #D04B4B, #B23B3B); animation-delay: -4s; }
.floaters .f4 { right: 12%; bottom: 10%; width: 120px; height: 120px; animation-delay: -1s; }
.floaters img { width: 60%; }
.band { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding: 36px; border-radius: 24px; background: linear-gradient(140deg, #D04B4B 0%, #A93636 100%); color: #fff; }
.band.centered { flex-direction: column; text-align: center; padding: 56px 32px; }
.band p { max-width: 620px; font-size: 16px; line-height: 1.55; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.step-n { width: 40px; height: 40px; border-radius: 12px; background: var(--bad-bg); color: var(--accent-text); font-family: var(--head); display: flex; align-items: center; justify-content: center; }
.banner { min-height: 500px; border-radius: 28px; padding: 64px 32px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 20px;
  background: linear-gradient(180deg, rgba(14, 14, 16, .35) 0%, rgba(14, 14, 16, .7) 60%, rgba(14, 14, 16, .9) 100%), url('/web/img/bg-autumn.svg') center/cover no-repeat, var(--panel); }
.banner h1 { max-width: 820px; font-size: 46px; line-height: 1.08; }
.banner p { max-width: 560px; font-size: 17px; line-height: 1.55; color: #E2DED8; }
.tag { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 10px; background: rgba(14, 14, 16, .7); font-size: 13px; font-weight: 500; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.feature { padding: 22px; border-radius: 20px; background: var(--panel); display: flex; gap: 16px; align-items: flex-start; }
.feature .icon-tile { width: 60px; height: 60px; border-radius: 15px; } .feature .icon-tile img { width: 38px; height: 38px; }
.duo { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.duo.flip { flex-wrap: wrap-reverse; }
.duo > * { flex: 1 1 400px; }
.dots li { display: flex; gap: 12px; align-items: baseline; }
.dots li::before { content: ''; width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: var(--accent); transform: translateY(-2px); }
.scene { min-height: 300px; border-radius: 24px; padding: 44px; display: flex; flex-direction: column; justify-content: center; gap: 14px; background-size: cover; background-position: center; }
.scene > div { max-width: 520px; display: flex; flex-direction: column; gap: 14px; }
.scene.winter { background-image: linear-gradient(90deg, rgba(10, 16, 26, .92), rgba(10, 16, 26, .55) 60%, rgba(10, 16, 26, .2)), url('/web/img/bg-winter.svg'); }
.scene.spring { background-image: linear-gradient(90deg, rgba(12, 20, 14, .92), rgba(12, 20, 14, .55) 60%, rgba(12, 20, 14, .2)), url('/web/img/bg-spring.svg'); }
.scene.autumn { background-image: linear-gradient(90deg, rgba(22, 12, 8, .92), rgba(22, 12, 8, .55) 60%, rgba(22, 12, 8, .2)), url('/web/img/bg-autumn.svg'); }
details.faq { border-radius: 16px; background: var(--panel); }
details.faq summary { min-height: 58px; padding: 16px 18px; font-size: 16px; font-weight: 500; cursor: pointer; list-style: none; display: flex; align-items: center; gap: 12px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; margin-left: auto; color: var(--muted); font-size: 20px; transition: transform .25s; }
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq p { padding: 0 18px 18px; color: #A9A59F; line-height: 1.6; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; }
.plan { padding: 28px; border-radius: 24px; background: var(--panel); display: flex; flex-direction: column; gap: 16px; }
.plan.main { background: linear-gradient(150deg, #D04B4B 0%, #A93636 100%); color: #fff; }
.plan .cost { font-family: var(--head); font-size: 30px; }
.plan ul { display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.plan li::before { content: '✓  '; }
.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.mock { aspect-ratio: 16 / 10; min-width: 280px; border-radius: 20px; background: var(--panel); padding: 14px; display: flex; gap: 12px; }
.mock .m-side { width: 22%; border-radius: 12px; background: var(--bg); padding: 12px 10px; display: flex; flex-direction: column; gap: 8px; }
.mock .m-side i { height: 18px; border-radius: 6px; background: var(--raised); } .mock .m-side i:first-of-type { background: var(--accent); }
.mock .m-main { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.mock .m-hero { flex: 3; border-radius: 12px; padding: 18px; display: flex; flex-direction: column; justify-content: center; gap: 10px; background: linear-gradient(90deg, rgba(14, 14, 16, .9), rgba(14, 14, 16, .3)), url('/web/img/bg-spring.svg') center/cover; }
.mock .m-hero b { font-family: var(--head); text-transform: uppercase; }
.mock .m-hero i { display: block; width: 84px; height: 26px; border-radius: 7px; background: var(--accent); }
.mock .m-news { flex: 2; border-radius: 12px; background: var(--raised); }

/* вход */
.auth { flex: 1 1 auto; display: flex; flex-wrap: wrap; }
.auth .pane { flex: 1 1 440px; max-width: 620px; padding: 36px 48px 32px; display: flex; flex-direction: column; min-height: 100vh; }
.auth .pane .mid { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; gap: 22px; max-width: 420px; width: 100%; padding: 40px 0; }
.auth .art { flex: 999 1 520px; min-height: 320px; background: linear-gradient(90deg, #0E0E10 0%, rgba(14, 14, 16, .5) 40%, rgba(14, 14, 16, .1) 100%), url('/web/img/bg-winter.svg') center/cover no-repeat; }
.auth .idlogo { width: 193px; height: 24px; }

#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { max-width: 380px; padding: 14px 18px; border-radius: 14px; background: #1E1E22; color: var(--ok); font-weight: 500; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); animation: pop .25s cubic-bezier(.2, .8, .2, 1); }
.toast.bad { color: var(--bad); }
dialog { width: min(460px, calc(100vw - 32px)); padding: 24px; border: none; border-radius: 20px; background: #18181B; color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
dialog::backdrop { background: rgba(8, 8, 10, .65); }
dialog[open] { animation: pop .22s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; gap: 16px; }

@media (max-width: 720px) {
  .wrap { padding: 0 16px; } .auth .pane { padding: 24px 20px; min-height: auto; }
  .hero h1, .banner h1 { font-size: 34px; } h1 { font-size: 26px; } .scene, .band { padding: 28px 22px; } .banner { padding: 44px 20px; min-height: 420px; }
}

/* лендинг */
[hidden] { display: none !important; }
main.landing { gap: 88px; padding-top: 72px; }
main.landing .scene { align-self: stretch; text-align: left; }
.duo .bank-card { max-width: 420px; width: 100%; margin: 0 auto; }
@media (max-width: 720px) { main.landing { gap: 56px; padding-top: 44px; } }

/* метка режима у банка и маркета: они работают только на приватном сервере */
.mode-badge { margin-left: 2px; font-family: Onest, system-ui, sans-serif; font-size: 11px; text-transform: none; }

/* Mithic ID: магазин, 2FA, коды */
.shop-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.shop-item { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 14px; background: var(--raised); }
.shop-item .sum { font-size: 18px; }
.howto { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.qr { width: 168px; height: 168px; border-radius: 12px; background: #fff; padding: 8px; flex: none; }
.secret { font-family: ui-monospace, Consolas, monospace; font-size: 15px; letter-spacing: .04em; word-break: break-all; color: var(--text); }
.secret-lg { display: block; text-align: center; font-size: 26px; padding: 14px; border-radius: 12px; background: var(--raised); }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.codes code { font-family: ui-monospace, Consolas, monospace; font-size: 15px; padding: 10px; border-radius: 10px; background: var(--raised); text-align: center; }
.avatar-lg { width: 52px; height: 52px; border-radius: 12px; font-size: 22px; }
.note { white-space: pre-wrap; word-break: break-word; }
nav.seg { overflow-x: auto; }
nav.seg button { white-space: nowrap; }

/* режимы на главной */
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.mode { min-height: 360px; padding: 30px; border-radius: 24px; display: flex; flex-direction: column; gap: 14px; background-size: cover; background-position: center; color: #fff; }
.mode h3 { font-family: var(--head); font-size: 26px; }
.mode p { color: #E2DED8; line-height: 1.55; flex-grow: 1; }
.mode .dots { color: #E2DED8; }
.mode.private { background-image: linear-gradient(160deg, rgba(12, 20, 14, .9), rgba(12, 20, 14, .6)), url('/web/img/bg-spring.svg'); }
.mode.koster { background-image: radial-gradient(circle at 80% 85%, rgba(232, 128, 48, .45), transparent 55%), linear-gradient(160deg, rgba(14, 10, 8, .94), rgba(28, 14, 8, .78)), url('/web/img/bg-autumn.svg'); }
