/* =========================
   Fonts (Segoe UI from assets)
========================= */
@font-face{
  font-family: "SegoeUI";
  src: url("./assets/fonts/SegoeUI-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "SegoeUI";
  src: url("./assets/fonts/SegoeUI-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face{
  font-family: "SegoeUI";
  src: url("./assets/fonts/SegoeUI-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "SegoeUI";
  src: url("./assets/fonts/SegoeUI-BoldItalic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face{
  font-family: "SegoeUI";
  src: url("./assets/fonts/SegoeUI-BoldItalic.ttf") format("truetype");
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

/* =========================
   Base + Variables
========================= */
:root{
  --brand: #00d26a;
  --brand-2: #18b9ff;

  /* Hero gradient (used for SVG + gradient outline/text) */
  --hero-grad: linear-gradient(90deg, #12D377 0%, #0BBF6A 55%, #0AA2FF 100%);

  --text: #0b2417;
  --muted: rgba(11, 36, 23, 0.62);

  --bg-base: #effff6;
  --bg-image: url("./assets/bg-light.png");
  --bg-edge: rgba(0, 210, 106, 0.36);
  --grid: rgba(0, 210, 106, 0.12);

  --card: #ffffff;
  --card-2: #f7fffb;
  --border: rgba(0, 210, 106, 0.28);
  --border-strong: rgba(0, 210, 106, 0.42);

  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.08);

  --radius-xl: clamp(1.3rem, 4.2vw, 2rem);
  --radius-lg: clamp(1.1rem, 3.6vw, 1.6rem);
  --radius-md: clamp(0.9rem, 3vw, 1.2rem);
  --radius-pill: 999px;

  
  --radius-btn: clamp(0.9rem, 3.2vw, 1.1rem);
--pad-x: clamp(0.9rem, 4.2vw, 1.25rem);
  --pad-card: clamp(1rem, 4.6vw, 1.35rem);

  --header-h: clamp(3.2rem, 12vw, 3.75rem);
  --header-gap: clamp(0.75rem, 3vw, 1rem);

  --range-track: rgba(11, 36, 23, 0.18);

  /* =========================
     Title gradient (Light theme)
     Requested: 184D31 -> 0B1A12, radial from bottom to top
  ========================= */
  --title-grad-1: #184D31;
  --title-grad-2: #0B1A12;

  /* =========================
     Navigation modal (matches provided mockups)
  ========================= */
  --nav-panel-bg: #e4e9e6;
  --nav-panel-bg-2: #d7ddda;
  --nav-border: #90d2b3;
  --nav-panel-inset: rgba(255, 255, 255, 0.18);

  --nav-title: #0b2417;
  --nav-close-bg: #f3f6f4;
  --nav-close-icon: #000000;

  --nav-item-bg: #eaede7;
  --nav-item-text: #0b2417;
  --nav-arrow: #505a55;

  /* Chip чуть светлее строки — иконка читается на мятном фоне */
  --nav-icon-bg: linear-gradient(180deg, #f2faf5 0%, #e2f2e8 100%);
  --nav-icon-border: rgba(0, 210, 106, 0.22);
  --nav-icon: #064d30;

  --nav-radius-panel: clamp(1.9rem, 7vw, 2.9rem);
  --nav-radius-item:  clamp(1.35rem, 5.8vw, 2.25rem);
  --nav-radius-icon:  clamp(1.15rem, 5vw, 2rem);
  --nav-radius-close: clamp(1.15rem, 5vw, 2rem);

  /* =========================
     Licenses / Certificates block
     Accent gradient: E7FFF0 -> 11C56F
     Border: light = solid E7FFF0, dark = gradient
  ========================= */
  --license-accent-grad: linear-gradient(90deg, #12D377 0%, #0BBF6A 55%, #0AA2FF 100%);
  --license-border-grad: linear-gradient(90deg, #12D377 0%, #0BBF6A 55%, #0AA2FF 100%);

  /* =========================
     Invest modal (bottom sheet)
  ========================= */
  --sheet-bg: #f4f7f5;
  --invest-sheet-bg-2: #eef4f1;
  --invest-sheet-border: rgba(0, 210, 106, 0.26);
  --invest-sheet-shadow: 0 26px 80px rgba(0,0,0,0.16);

  --invest-rule: rgba(0, 210, 106, 0.35);

  --invest-card-bg: rgba(255,255,255,0.78);
  --invest-card-border: rgba(0, 210, 106, 0.26);

  --invest-chip-bg: rgba(0, 210, 106, 0.10);
  --invest-chip-border: rgba(0, 210, 106, 0.16);

  --invest-range-track: rgba(11, 36, 23, 0.72);

  /* Profile: сводка */
  --flow-border: rgba(0, 210, 106, 0.18);
  --flow-muted: rgba(11, 36, 23, 0.55);
}

/* Dark theme */
body[data-theme="dark"]{
  --text: #eafff4;
  --muted: rgba(234, 255, 244, 0.62);

  --bg-base: #050b08;
  --bg-image: url("./assets/bg-dark.png");
  --bg-edge: rgba(0, 210, 106, 0.25);
  --grid: rgba(0, 210, 106, 0.08);

  --card: rgba(8, 20, 15, 0.92);
  --card-2: rgba(10, 27, 20, 0.92);
  --border: rgba(0, 210, 106, 0.22);
  --border-strong: rgba(0, 210, 106, 0.36);

  --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.55);

  --range-track: rgba(234, 255, 244, 0.18);

  /* =========================
     Title gradient (Dark theme)
     Requested: 93FFC5 -> E0FFEF
  ========================= */
  --title-grad-1: #93FFC5;
  --title-grad-2: #E0FFEF;

  /* Navigation modal */
  --nav-panel-bg: #020a05;
  --nav-panel-bg-2: #010603;
  --nav-border: #074d2a;
  --nav-panel-inset: rgba(255, 255, 255, 0.06);

  --nav-title: #ffffff;
  --nav-close-bg: #020a05;
  --nav-close-icon: #ffffff;

  --nav-item-bg: #020a05;
  --nav-item-text: rgba(234, 255, 244, 0.72);
  --nav-arrow: #b1bcb7;

  /* Чип выше по тону, чем строка — иконка не «теряется» в тёмном пункте */
  --nav-icon-bg: linear-gradient(180deg, rgba(14, 48, 34, 0.92) 0%, rgba(6, 26, 18, 0.96) 100%);
  --nav-icon-border: rgba(120, 255, 200, 0.18);
  --nav-icon: #8af5c8;

  /* Licenses / Certificates block */
  --license-border-grad: linear-gradient(90deg, #12D377 0%, #0BBF6A 55%, #0AA2FF 100%);

  /* Invest modal */
  --invest-sheet-bg: #020a05;
  --invest-sheet-bg-2: #010603;
  --invest-sheet-border: rgba(0, 210, 106, 0.22);
  --invest-sheet-shadow: 0 30px 92px rgba(0,0,0,0.62);

  --invest-rule: rgba(0, 210, 106, 0.24);

  --invest-card-bg: rgba(7, 18, 12, 0.58);
  --invest-card-border: rgba(0, 210, 106, 0.20);

  --invest-chip-bg: rgba(0, 210, 106, 0.10);
  --invest-chip-border: rgba(0, 210, 106, 0.16);

  --invest-range-track: rgba(234, 255, 244, 0.18);

  --flow-border: rgba(0, 210, 106, 0.14);
  --flow-muted: rgba(234, 255, 244, 0.55);
}

*{ box-sizing: border-box; }
html, body{
  height: 100%;
  width: 100%;
}
body{
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;

  font-family: "SegoeUI", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg-base);

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  text-rendering: geometricPrecision;
}

a{ color: inherit; }
button, input{ font: inherit; }
button{ -webkit-tap-highlight-color: transparent; }

/* Background (градиент + сетка) */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -2;

  /* Фон ровно как на макете (картинкой) */
  background-color: var(--bg-base);
  background-image: var(--bg-image);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}
body::after{
  /* Сетка уже есть на фоновой картинке */
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: none;
}

/* Telegram WebApp layout
   ВАЖНО: теперь весь контент растягивается на всю ширину экрана (100vw),
   не только верхняя шапка.
*/
.twa{
  min-height: 100vh;
  min-height: 100dvh;
  width: 100vw;
  overflow-x: hidden;
}
.app{
  width: 100vw;
  max-width: none;
}

/* =========================
   Top bar
========================= */
.topbar{
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  z-index: 20;
  padding:
    calc(env(safe-area-inset-top, 0px) + var(--header-gap))
    var(--pad-x)
    0;

  /* чтобы верхняя зона тоже была "стеклянной" при скролле */
  isolation: isolate;
}
.topbar::before{
  content:"";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.42);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  pointer-events: none;
}
body[data-theme="dark"] .topbar::before{
  background: rgba(8, 20, 15, 0.42);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.topbar__inner{
  height: var(--header-h);
  border-radius: var(--radius-xl);


  position: relative;
  z-index: 1;


  box-shadow: var(--shadow-soft);

  -webkit-backdrop-filter: blur(14px);

  display: flex;
  align-items: center;
  gap: 0.75rem;
}
body[data-theme="dark"] .topbar__inner{
  background: rgba(8, 20, 15, 0.55);
}

.topbar__spacer{ flex: 1; }
.topbar__actions{
  display: flex;
  gap: 0.65rem;
}

/* Square icon buttons */
.icon-square{
  width: clamp(2.7rem, 11vw, 3.1rem);
  height: clamp(2.7rem, 11vw, 3.1rem);
  border-radius: clamp(1rem, 3.8vw, 1.15rem);

  display: grid;
  place-items: center;

  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border);
  color: var(--text);

  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
  cursor: pointer;
}
body[data-theme="dark"] .icon-square{
  background: rgba(10, 27, 20, 0.7);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.ico{
  width: 1.35rem;
  height: 1.35rem;
  display: block;
  margin: 0 auto;
  justify-self: center;
  align-self: center;
}
/* Theme icon: показываем иконку текущего режима */
#theme-btn .ico--sun{ display: block; }
#theme-btn .ico--moon{ display: none; }
body[data-theme="dark"] #theme-btn .ico--sun{ display: none; }
body[data-theme="dark"] #theme-btn .ico--moon{ display: block; }

.icon-square:active{
  transform: translateY(1px) scale(0.99);
}
.icon-square svg{
  display: block;
  margin: 0 auto;
  justify-self: center;
  align-self: center;
}
/* =========================
   Content layout
========================= */
.content{
  padding:
    calc(env(safe-area-inset-top, 0px) + var(--header-gap) + var(--header-h) + 1rem)
    var(--pad-x)
    calc(env(safe-area-inset-bottom, 0px) + 2rem);
}

.section{
  margin-top: clamp(1rem, 4.5vw, 1.35rem);
}

.section__title{
  margin: 0 0 clamp(0.8rem, 3.4vw, 1.1rem);
  text-align: center;
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: clamp(1.25rem, 5.6vw, 1.75rem);
}
.section__title--boxed{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.05rem;
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}
body[data-theme="dark"] .section__title--boxed{
  box-shadow: 0 18px 46px rgba(0,0,0,0.55);
}

.section__title--in-card{
  margin-top: 0.2rem;
  margin-bottom: 0.95rem;
}

.section__subtitle{
  margin: -0.55rem 0 1rem;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

/* =========================
   Cards
========================= */
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  padding: var(--pad-card);
}

/* =========================
   Layout helpers
========================= */
.card--clip{
  overflow: hidden; /* ограничиваем вылет картинок рамкой карточки */
}
.section-card{
  padding: clamp(1.05rem, 4.8vw, 1.35rem);
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(0, 210, 106, 0.16) inset, var(--shadow-soft);
}
.section-card .section__title{
  margin-top: 0;
}

/* SVG icons */
.btn__icon .svg-ico,
.license__icon .svg-ico,
.icon-square .ico{
  display: block;
}
.btn__icon .svg-ico{
  width: 1.15em;
  height: 1.15em;
}
.license__icon .svg-ico{
  width: 1.3rem;
  height: 1.3rem;
  display: block;
}
.about__arrow .svg-ico{
  width: 0.9rem;
  height: 1.8rem;
}
.license__icon svg *{
  vector-effect: non-scaling-stroke;
}
.disclaimer{
  margin: 0.9rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

/* =========================
   Hero
   Иллюстрация из макета (block-hero.png)
========================= */
.hero{
  padding: clamp(1.05rem, 4.6vw, 1.4rem);
}
.hero__illustration{
  margin-bottom: 1rem;
}
.hero__frame{
  height: clamp(6.8rem, 32vw, 9rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,1), rgba(246,255,251,1));
  position: relative;
  isolation: isolate;

  overflow: hidden;
  padding: clamp(0.35rem, 2.1vw, 0.75rem);
}

/* На очень узких экранах чуть уменьшаем внутренний отступ рамки */
@media (max-width: 360px){
  .hero__frame{ padding: 0.5rem; }
}
.hero__img{
  position: absolute;
  inset: 0;
  z-index: 1;

  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}
.hero__title{
  margin: 0 0 0.35rem;
  text-align: center;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: clamp(1.55rem, 7vw, 2rem);
  line-height: 1.08;
}
.hero__subtitle{
  margin: 0 0 1.05rem;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
}

.hero__actions{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

/* На мобильных: кнопки в столбик (чтобы ничего не вылезало) */
@media (max-width: 420px){
  .hero__actions{ grid-template-columns: 1fr; }
}

@media (max-width: 340px){
  .hero__actions{ grid-template-columns: 1fr; }
}

.btn{
  border: 0;
  cursor: pointer;
  user-select: none;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;

  padding: 0.95rem 1rem;
  border-radius: var(--radius-pill);

  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;

  transition: transform 140ms ease, filter 140ms ease, background-color 180ms ease, border-color 180ms ease;
}

/* =========================
   HERO buttons — requested tweaks
   - Arial 700
   - спокойное отображение на моб.
   - чуть толще обводки
   - градиентный текст/обводка для "Рассчитать прибыль"
   - "Ознакомиться": мягкий фон и акцентная рамка под light/dark
   - "Инвестировать": light — белый текст/иконка, dark — чёрный текст/иконка
========================= */
.hero .btn{
  font-family: Arial, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;

  white-space: normal;
  line-height: 1.15;
  text-align: center;
}

.hero .btn__text{ display: inline-block; }

/* Инвестировать */
.hero .btn--primary{
  color: #fff;
}
.hero .btn--primary .btn__dot{
  background: currentColor;
  box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.18);
}
body[data-theme="dark"] .hero .btn--primary{
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-2) 100%);
  box-shadow: 0 12px 26px rgba(0, 210, 106, 0.22);
  color: #000000;
}
body[data-theme="dark"] .hero .btn--primary .btn__dot{
  box-shadow: 0 0 0 0.2rem rgba(0,0,0,0.10);
}

/* Рассчитать прибыль — градиентная обводка + градиентный текст */
.hero .btn--outline{
  position: relative;
  border: 2px solid transparent;
  background: #ffffff;
}
body[data-theme="dark"] .hero .btn--outline{
  background: rgba(10, 27, 20, 0.6);
}

.hero .btn--outline::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: var(--hero-grad);
  pointer-events: none;

  /* показываем только рамку */
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.hero .btn__text--grad{
  background: var(--hero-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Ознакомиться — читаемый контраст, в тон палитре страницы */
.hero .hero__instruction{
  color: rgba(11, 36, 23, 0.78);
  border: 2px solid rgba(0, 210, 106, 0.34);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 26px rgba(11, 36, 23, 0.06);
}
.hero .hero__instruction:hover{
  border-color: rgba(0, 210, 106, 0.48);
  background: rgba(255, 255, 255, 0.88);
}
body[data-theme="dark"] .hero .hero__instruction{
  color: rgba(224, 255, 239, 0.9);
  border-color: rgba(120, 255, 200, 0.22);
  background: rgba(8, 22, 16, 0.58);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
body[data-theme="dark"] .hero .hero__instruction:hover{
  border-color: rgba(120, 255, 200, 0.34);
  background: rgba(12, 32, 24, 0.72);
}
.hero .hero__instruction .svg-ico{
  display: block;
}
.btn:active{ transform: translateY(1px) scale(0.99); }

.btn__dot{
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.18);
}
.btn__icon{
  display: inline-block;
  transform: translateY(-0.5px);
}

.btn--primary{
  color: #fff;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-2) 100%);
  box-shadow: 0 12px 26px rgba(0, 210, 106, 0.22);
}

.btn--outline{
  color: var(--brand);
  background: #fff;
  border: 1px solid var(--border-strong);
}
body[data-theme="dark"] .btn--outline{
  color: var(--text);
  background: rgba(10, 27, 20, 0.6);
  border-color: rgba(7, 19, 16);
}

.btn--ghost{
  color: var(--muted);
  background: #fff;
  border: 1px solid rgba(0, 210, 106, 0.18);
}
body[data-theme="dark"] .btn--ghost{
  background: rgba(10, 27, 20, 0.6);
}

.hero__instruction{
  width: 100%;
}

/* =========================
   Tariffs
========================= */
.tariffs{
  display: grid;
  gap: clamp(0.8rem, 3.6vw, 1rem);
}
.tariff{
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: clamp(1.05rem, 4.6vw, 1.35rem);
  border: 1px solid rgba(0, 210, 106, 0.22);
  box-shadow: var(--shadow-soft);
  background: linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%);

  /* tokens (overridden in .tariff--1..4) */
  --wm-img: none;
  --wm-size: auto 100%;
  /* смещаем watermark чуть левее/выше, чтобы он не обрезался */
  --wm-x: clamp(2.3rem, 8vw, 3.6rem);
  --wm-y: clamp(0.25rem, 1.6vw, 0.8rem);
  --wm-opacity: 0.18;

  --badge-bg: rgba(255,255,255,0.7);
  --badge-border: rgba(0,0,0,0.06);
  --badge-text: var(--text);

  --pill-bg: rgba(255,255,255,0.65);
  --pill-border: rgba(0,0,0,0.06);
  --pill-text: rgba(11, 36, 23, 0.78);

  --cta-1: var(--brand);
  --cta-2: var(--brand-2);
  --cta-glow: rgba(0, 210, 106, 0.20);
}
.tariff::after{
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;

  /* Водяной знак — картинкой (из макета) */
  background-image: var(--wm-img);
  background-repeat: no-repeat;
  background-size: var(--wm-size);
  background-position: right var(--wm-x) bottom var(--wm-y);
  opacity: var(--wm-opacity);
  filter: saturate(1.05);
}
.tariff::before{
  /* убираем фоновое зелёное свечение — светятся только кнопки */
  content:"";
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
  opacity: 0;
}

.tariff__header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
  position: relative;
  z-index: 2;
}
.tariff__name{
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: 1.2rem;
}
.tariff__percent{
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
  margin-top: 0.25rem;
}
.tariff__percent span{
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 700;
}
.tariff__badge{
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-pill);
  font-weight: 900;
  font-size: 0.8rem;
  border: 1px solid var(--badge-border);
  background: var(--badge-bg);
  color: var(--badge-text);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.tariff__limits{
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.95rem;
  position: relative;
  z-index: 2;
}
.pill{
  padding: 0.48rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0,0,0,0.06);
  background: rgba(255,255,255,0.65);
  font-weight: 900;
  font-size: 0.78rem;
  color: rgba(11, 36, 23, 0.78);
}
body[data-theme="dark"] .pill{
  background: rgba(255,255,255,0.06);
  border-color: rgba(0,210,106,0.18);
  color: rgba(234,255,244,0.78);
}

.tariff .pill{
  background: var(--pill-bg);
  border-color: var(--pill-border);
  color: var(--pill-text);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.tariff__cta{
  position: relative;
  z-index: 2;
  width: 100%;
  border: 0;
  cursor: pointer;

  padding: 0.9rem 1rem;
  border-radius: clamp(0.9rem, 3.2vw, 1.1rem);

  font-weight: 900;
  font-size: 0.95rem;
  color: #fff;

  background: linear-gradient(90deg, var(--cta-1) 0%, var(--cta-2) 100%);

  /* stronger default glow */
  box-shadow:
    0 14px 26px rgba(0,0,0,0.10),
    0 0 42px var(--cta-glow, rgba(0,0,0,0));

  position: relative;
  z-index: 1;

  transition:
    transform 140ms ease,
    box-shadow 220ms ease,
    filter 220ms ease;
  will-change: transform, box-shadow, filter;
}

.tariff__cta:hover,
.tariff__cta:focus-visible{
  /* even stronger glow on hover/focus */
  box-shadow:
    0 18px 34px rgba(0,0,0,0.12),
    0 0 64px var(--cta-glow, rgba(0,0,0,0));
  filter: saturate(1.06) brightness(1.03);
}

.tariff__cta:focus-visible{
  outline: none;
}

/* Selected state (covers both possible implementations) */
.tariff.is-selected .tariff__cta,
.tariff__cta.is-selected,
.tariff__cta[aria-pressed="true"]{
  box-shadow:
    0 18px 34px rgba(0,0,0,0.12),
    0 0 78px var(--cta-glow, rgba(0,0,0,0));
  filter: saturate(1.08) brightness(1.05);
}

.tariff__cta:active{ transform: translateY(1px) scale(0.99); }

/* Tariff palettes */
.tariff--1{
  --wm-img: url("./assets/wm-tariff-1.png");
  border-color: rgba(244, 182, 51, 0.35);
  background: linear-gradient(180deg, #ffffff 0%, #fff6d9 100%);

  --badge-bg: rgba(244, 182, 51, 0.18);
  --badge-border: rgba(244, 182, 51, 0.22);
  --badge-text: rgba(85, 55, 0, 0.92);

  --pill-bg: rgba(244, 182, 51, 0.14);
  --pill-border: rgba(244, 182, 51, 0.20);
  --pill-text: rgba(85, 55, 0, 0.86);

  --cta-1: #f2b231;
  --cta-2: #ffd36b;
  --cta-glow: rgba(242, 178, 49, 0.35);
}

.tariff--2{
  --wm-img: url("./assets/wm-tariff-2.png");
  border-color: rgba(0, 210, 106, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #e9fff6 100%);

  --badge-bg: rgba(0, 210, 106, 0.13);
  --badge-border: rgba(0, 210, 106, 0.18);
  --badge-text: rgba(0, 120, 60, 0.92);

  --pill-bg: rgba(0, 210, 106, 0.10);
  --pill-border: rgba(0, 210, 106, 0.18);
  --pill-text: rgba(0, 120, 60, 0.90);

  --cta-1: #00d26a;
  --cta-2: #00b4d8;
  --cta-glow: rgba(0, 210, 106, 0.30);
}

.tariff--3{
  --wm-img: url("./assets/wm-tariff-3.png");
  border-color: rgba(45, 149, 255, 0.32);
  background: linear-gradient(180deg, #ffffff 0%, #e9f5ff 100%);

  --badge-bg: rgba(45, 149, 255, 0.12);
  --badge-border: rgba(45, 149, 255, 0.18);
  --badge-text: rgba(15, 75, 140, 0.92);

  --pill-bg: rgba(45, 149, 255, 0.10);
  --pill-border: rgba(45, 149, 255, 0.18);
  --pill-text: rgba(15, 75, 140, 0.90);

  --cta-1: #2d95ff;
  --cta-2: #2db6ff;
  --cta-glow: rgba(45, 149, 255, 0.30);
}

.tariff--4{
  --wm-img: url("./assets/wm-tariff-4.png");
  border-color: rgba(255, 146, 74, 0.36);
  background: linear-gradient(180deg, #ffffff 0%, #ffe9dd 100%);

  --badge-bg: rgba(255, 146, 74, 0.14);
  --badge-border: rgba(255, 146, 74, 0.20);
  --badge-text: rgba(118, 52, 0, 0.92);

  --pill-bg: rgba(255, 146, 74, 0.10);
  --pill-border: rgba(255, 146, 74, 0.18);
  --pill-text: rgba(118, 52, 0, 0.90);

  --cta-1: #ff924a;
  --cta-2: #ffb267;
  --cta-glow: rgba(255, 146, 74, 0.32);
}

/* Dark theme adjustments for tariff cards */
body[data-theme="dark"] .tariff--1{
  border-color: rgba(244, 182, 51, 0.28);
  background: linear-gradient(180deg, rgba(8, 20, 15, 0.92) 0%, rgba(30, 22, 10, 0.78) 100%);
  --badge-text: rgba(255, 240, 205, 0.92);
  --pill-text: rgba(255, 240, 205, 0.86);
}
body[data-theme="dark"] .tariff--2{
  border-color: rgba(0, 210, 106, 0.22);
  background: linear-gradient(180deg, rgba(8, 20, 15, 0.92) 0%, rgba(10, 36, 26, 0.80) 100%);
  --badge-text: rgba(219, 255, 238, 0.92);
  --pill-text: rgba(219, 255, 238, 0.86);
}
body[data-theme="dark"] .tariff--3{
  border-color: rgba(45, 149, 255, 0.24);
  background: linear-gradient(180deg, rgba(8, 20, 15, 0.92) 0%, rgba(9, 20, 35, 0.80) 100%);
  --badge-text: rgba(225, 245, 255, 0.92);
  --pill-text: rgba(225, 245, 255, 0.86);
}
body[data-theme="dark"] .tariff--4{
  border-color: rgba(255, 146, 74, 0.26);
  background: linear-gradient(180deg, rgba(8, 20, 15, 0.92) 0%, rgba(35, 18, 10, 0.80) 100%);
  --badge-text: rgba(255, 236, 222, 0.92);
  --pill-text: rgba(255, 236, 222, 0.86);
}


/* =========================
   Calculator
========================= */

.calc__tariffs{
  display: flex;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.calc-tariff{
  flex: 1;
  border: 1px solid rgba(0, 210, 106, 0.18);
  background: rgba(255,255,255,0.60);
  color: var(--text);

  padding: 0.62rem 0.65rem;
  border-radius: var(--radius-xl);

  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: -0.01em;

  cursor: pointer;
  transition: transform 140ms ease, background-color 180ms ease, border-color 180ms ease, filter 180ms ease;
}

body[data-theme="dark"] .calc-tariff{
  background: rgba(7, 18, 12, 0.55);
  border-color: rgba(0, 210, 106, 0.18);
}

.calc-tariff:active{
  transform: translateY(1px) scale(0.99);
}

.calc-tariff[aria-pressed="true"]{
  border-color: rgba(0, 210, 106, 0.32);
  background: linear-gradient(90deg, rgba(0, 210, 106, 0.26), rgba(24, 185, 255, 0.18));
  filter: saturate(1.05);
}

body[data-theme="dark"] .calc-tariff[aria-pressed="true"]{
  background: linear-gradient(90deg, rgba(0, 210, 106, 0.18), rgba(24, 185, 255, 0.12));
}

/* =========================
   Calculator
========================= */
.calc{
  padding:
    clamp(1.05rem, 4.8vw, 1.35rem)
    clamp(1.05rem, 4.8vw, 1.45rem)
    clamp(0.75rem, 3.2vw, 1.05rem);
}

.calc__label{
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 0.7rem;
}
.calc__input{
  display: flex;
  align-items: center;
  gap: 0.55rem;

  padding: 0.9rem 0.95rem;
  border-radius: var(--radius-md);

  background: var(--card);
  border: 1px solid rgba(0, 210, 106, 0.18);
  box-shadow: 0 10px 26px rgba(0,0,0,0.04);

  margin-bottom: 0.55rem;
}
.calc__currency{
  color: var(--brand);
  font-weight: 900;
}
 .calc__amount{
  font-weight: 900;
  letter-spacing: -0.02em;
}

.calc__amount-input{
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
}

.calc__amount-input::placeholder{
  color: var(--muted);
}


/* ==== RANGE (gradient fill + gradient thumb) ==== */
.range{
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;

  /* было: margin: 0.15rem 0 0.95rem;  (слишком большой низ) */
  margin: 0.15rem 0 0.35rem;

  --fill: 0%;
}

/* Chrome / Safari track */
.range::-webkit-slider-runnable-track{
  height: 0.55rem;
  border-radius: var(--radius-lg);

  /* filled part = hero gradient, rest = track */
  background:
    var(--hero-grad) 0/var(--fill) 100% no-repeat,
    var(--range-track);
}

/* Chrome / Safari thumb */
.range::-webkit-slider-thumb{
  -webkit-appearance: none;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;

  /* делаем именно градиентный шарик */
  background-image: var(--hero-grad);
  background-size: 200% 200%;
  background-position: 50% 50%;

  border: none; /* убрали белую обводку */
  box-shadow: 0 10px 20px rgba(0, 210, 106, 0.22);
  margin-top: calc((0.55rem - 1.15rem) / 2);
}

/* Firefox track */
.range::-moz-range-track{
  height: 0.55rem;
  border-radius: 999px;
  background: var(--range-track);
}

/* Firefox filled part */
.range::-moz-range-progress{
  height: 0.55rem;
  border-radius: 999px;
  background: var(--hero-grad);
}

/* Firefox thumb */
.range::-moz-range-thumb{
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;

  background-image: var(--hero-grad);
  background-size: 200% 200%;
  background-position: 50% 50%;

  border: none; /* убрали белую обводку */
  box-shadow: 0 10px 20px rgba(0, 210, 106, 0.22);
}

.calc__grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.62rem;
  margin-top: 0.55rem;
}
/* Нижняя ячейка «тариф» — на всю ширину, без пустоты справа */
.calc__grid .calc__item:nth-child(3){
  grid-column: 1 / -1;
}
.calc__item{
  padding: 0.62rem 0.72rem;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(0, 210, 106, 0.28);
  background: linear-gradient(180deg, rgba(0,210,106,0.03), transparent);
}
body[data-theme="dark"] .calc__item{
  border-color: rgba(0, 210, 106, 0.22);
  background: linear-gradient(180deg, rgba(0,210,106,0.08), rgba(0,0,0,0));
}

.calc__value{
  display: block;
  font-weight: 900;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.22rem;
  word-break: break-word;
}
.calc__sub{
  display: block;
  font-weight: 800;
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.2;
}

/* =========================
   Stats
   Иллюстрация из макета (block-stats.png)
========================= */
.stats{
  text-align: center;
  padding: clamp(1.05rem, 4.8vw, 1.45rem);
}
.stats__illustration{
  margin-bottom: 0.85rem;
}
.stats__frame{
  height: clamp(6.8rem, 32vw, 9rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,1), rgba(246,255,251,1));
  position: relative;
  isolation: isolate;

  overflow: hidden;
  padding: clamp(0.35rem, 2.1vw, 0.75rem);
}
.stats__img{
  position: absolute;
  inset: 0;
  z-index: 1;

  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}

.stats__title{
  margin: 0 0 0.9rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: clamp(1.2rem, 5.2vw, 1.65rem);
}

.stats__grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.25rem;
}
.stat{
  text-align: left;
  padding: 0.85rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(0, 210, 106, 0.28);
  background: linear-gradient(180deg, rgba(0,210,106,0.03), transparent);
}
.stat__num{
  display: block;
  font-weight: 900;
  font-size: 1.02rem;
  margin-bottom: 0.25rem;
}
.stat__label{
  display: block;
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--muted);
}

/* =========================
   Live
========================= */
.live{
  position: relative;
  padding: clamp(1.05rem, 4.8vw, 1.45rem);
  overflow: visible;
}

.live__illustration{
  margin-bottom: 0.9rem;
}
.live__frame{
  height: clamp(8.3rem, 36vw, 10.2rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(0,210,106,0.10), rgba(24,185,255,0.08));
  box-shadow: 0 16px 30px rgba(0,0,0,0.06);
  position: relative;
  isolation: isolate;

  overflow: hidden;
  padding: clamp(0.35rem, 2.1vw, 0.75rem);
}
body[data-theme="dark"] .live__frame{
  background: linear-gradient(135deg, rgba(0,210,106,0.10), rgba(24,185,255,0.06));
  border-color: rgba(0, 210, 106, 0.18);
  box-shadow: 0 24px 46px rgba(0,0,0,0.45);
}

.live__img{
  position: absolute;
  inset: 0;
  z-index: 1;

  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,0.18));
  pointer-events: none;
}

.live__row{
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;

  padding: 0.78rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 210, 106, 0.28);

  background: rgba(255,255,255,0.72);
  box-shadow: 0 14px 30px rgba(0,0,0,0.06);

  overflow: hidden;
}
body[data-theme="dark"] .live__row{
  background: rgba(7, 18, 12, 0.52);
  border-color: rgba(0, 210, 106, 0.22);
  box-shadow: 0 18px 36px rgba(0,0,0,0.45);
}

.live__row::after{
  content: attr(data-watermark);
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 900;
  letter-spacing: -0.05em;
  font-size: 2.6rem;
  opacity: 0.14;
  color: rgba(0, 210, 106, 0.95);
  pointer-events: none;
  white-space: nowrap;
}
body[data-theme="dark"] .live__row::after{
  opacity: 0.16;
}

.live__dot{
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 0.25rem rgba(0, 210, 106, 0.12);
  flex: 0 0 auto;
}

.live__chips{
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  flex: 1;
  min-width: 0;
  padding-right: 4.4rem; /* space for watermark */
}

.live-chip{
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 210, 106, 0.18);
  background: rgba(0, 2 0, 106, 0.10);
  color: rgba(11, 36, 23, 0.86);
  font-weight: 900;
  font-size: 0.78rem;
  white-space: nowrap;
}
body[data-theme="dark"] .live-chip{
  border-color: rgba(0, 210, 106, 0.18);
  background: rgba(0, 210, 106, 0.10);
  color: rgba(234, 255, 244, 0.86);
}

.live-chip--strong{
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.06);
}
body[data-theme="dark"] .live-chip--strong{
  background: rgba(255,255,255,0.06);
  border-color: rgba(0, 210, 106, 0.14);
}

/* Live carousel */
.live-carousel{
  margin-top: 0.2rem;
}

.live-carousel__viewport{
  overflow: hidden;

  /* ОДНА общая обводка вокруг Live-инвестиций */
  border: 2px solid rgba(0, 210, 106, 0.28);
  border-radius: var(--radius-md);

  background: rgba(255,255,255,0.50);
  box-shadow: 0 14px 30px rgba(0,0,0,0.06);

  /* внутренний отступ — чтобы контент не прилипал к рамке */
  padding: 0.44rem 0.72rem;
}

body[data-theme="dark"] .live-carousel__viewport{
  background: rgba(7, 18, 12, 0.52);
  border-color: rgba(0, 210, 106, 0.22);
  box-shadow: 0 18px 36px rgba(0,0,0,0.45);
}

.live-carousel__track{
  display: flex;
  align-items: center;
  gap: 0.55rem;
  will-change: transform;
  transition: transform 620ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Бесшовная лента: два одинаковых блока, анимация на -50% ширины трека */
.live-carousel__track--marquee{
  width: max-content;
  transition: none !important;
  animation: liveMarqueeScroll 52s linear infinite;
}

@keyframes liveMarqueeScroll{
  from{ transform: translate3d(0, 0, 0); }
  to{ transform: translate3d(-50%, 0, 0); }
}

@media (prefers-reduced-motion: reduce){
  .live-carousel__track--marquee{
    animation: none;
    transform: none;
  }
}

.live-carousel__track--marquee .live-ticket{
  transform: scale(1);
  opacity: 1;
  flex: 0 0 clamp(13.5rem, 72vw, 18.5rem);
}

.live-ticket{
  flex: 0 0 76%;

  /* убираем индивидуальную рамку/фон/тень — они теперь на viewport */
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;

  /* оставляем анимацию */
  transform: scale(0.92);
  opacity: 0.74;
  transition: transform 620ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 620ms ease;
}

body[data-theme="dark"] .live-ticket{
  background: transparent;
  box-shadow: none;
}

.live-ticket.is-active{
  transform: scale(1);
  opacity: 1;
}

.live-ticket__inner{
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 0.6rem;

  padding: 0.72rem 0.85rem;
  border-radius: 999px;

  background: linear-gradient(90deg, rgba(255,255,255,0.70), rgba(0,210,106,0.08));
  overflow: hidden;
}

body[data-theme="dark"] .live-ticket__inner{
  background: linear-gradient(90deg, rgba(7, 18, 12, 0.65), rgba(0,210,106,0.08));
  border-color: rgba(0, 210, 106, 0.22);
}



body[data-theme="dark"] .live-ticket__inner::after{
  opacity: 0.16;
}

.live-ticket__dot{
  position: relative;
  z-index: 1;
  width: 0.78rem;
  height: 0.78rem;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 0.28rem rgba(0, 210, 106, 0.12);
  flex: 0 0 auto;
}

.live-ticket__text{
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(0.35rem, 2vw, 0.75rem);
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
  overflow: hidden;
}
.live-ticket__name,
.live-ticket__money,
.live-ticket__tariff{
  white-space: nowrap;
}
.live-ticket__name{
  font-family: "SegoeUI", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(0.78rem, 3.6vw, 1.06rem);
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-ticket__money{
  font-family: Arial, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  font-size: clamp(0.75rem, 3.4vw, 1.02rem);
  letter-spacing: -0.02em;
}

.live-ticket__sep{
  color: var(--muted);
  font-weight: 900;
  font-size: clamp(0.75rem, 3.2vw, 0.95rem);
}

.live-ticket__tariff{
  font-family: Arial, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  color: var(--muted);
  font-size: clamp(0.74rem, 3.2vw, 0.98rem);
}

.live-ticket__rate{
  position: relative;
  z-index: 1;
  flex: 0 0 auto;

  padding: 0.48rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 210, 106, 0.24);

  background: rgba(0, 210, 106, 0.10);
  color: rgba(11, 36, 23, 0.86);

  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: clamp(0.78rem, 3.6vw, 1rem);
  white-space: nowrap;
}

body[data-theme="dark"] .live-ticket__rate{
  color: rgba(234, 255, 244, 0.88);
  background: rgba(0, 210, 106, 0.10);
  border-color: rgba(0, 210, 106, 0.18);
}

/* Live: на маленьких экранах карточки на всю ширину трека */
@media (max-width: 460px){
  .live-carousel__viewport{
    /* чуть компактнее, чтобы карточки не упирались в рамку */
    padding: 0.5rem 0.6rem;
  }

  .live-ticket{
    flex: 0 0 auto;
    width: 100%;

    /* убираем уменьшение/прозрачность неактивных */
    transform: none !important;
    opacity: 1 !important;
  }

  .live-carousel__track--marquee .live-ticket{
    width: auto;
    flex: 0 0 calc(100vw - 2.35rem);
    max-width: 22rem;
  }
}
/* =========================
   Licenses
========================= */
.licenses{
  padding: clamp(1.05rem, 4.8vw, 1.45rem);
}
.licenses__list{
  display: grid;
  gap: 0.75rem;
}
.license{
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;

  /* extra bottom padding to make room for the new bottom strip */
  padding: 0.95rem 1rem 1.05rem;
  border-radius: var(--radius-md);

  /* Gradient border (thicker, as requested) */
  border: 2px solid transparent;
  background:
    /* card fill */
    rgba(255,255,255,0.74) padding-box,
    /* border */
    var(--license-border-grad) border-box;
  box-shadow: 0 14px 28px rgba(0,0,0,0.06);

  text-decoration: none;
  font-weight: 900;
  color: var(--brand);

  overflow: hidden;
}
body[data-theme="dark"] .license{
  background:
    rgba(7, 18, 12, 0.52) padding-box,
    var(--license-border-grad) border-box;
  box-shadow: 0 18px 40px rgba(0,0,0,0.50);
}

.license::before{
  /* subtle inner highlight (kept minimal so it doesn't fight the new strip) */
  content:"";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(120% 90% at 18% 20%, rgba(18,211,119,0.22), transparent 58%);
  opacity: 0.85;
}

.license::after{
  /* bottom strip like in the screenshot */
  content:"";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(0.65rem, 2.6vw, 0.85rem);
  background: var(--license-accent-grad);
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
  /* adaptive wavy top edge (percentages - works on mobile Safari/Chrome) */
  clip-path: polygon(
    0% 70%,
    14% 62%,
    30% 54%,
    48% 46%,
    66% 38%,
    84% 30%,
    100% 22%,
    100% 100%,
    0% 100%
  );
  opacity: 0.95;
}


.license__icon{
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  border: 0;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--brand);
}

.license__text{
  font-size: 0.95rem;
  /* same gradient as the icons/strip */
  background: var(--license-accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}


/* =========================
   Reviews
========================= */
.reviews{
  padding: clamp(1.05rem, 4.8vw, 1.45rem);
}
.reviews__list{
  display: grid;
  gap: 0.85rem;
}
.review{
  padding: 1rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(0, 210, 106, 0.28);
  background: linear-gradient(180deg, rgba(0,210,106,0.03), transparent);
}
.review__head{
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}
.review__avatar{
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  border: 1px dashed rgba(0, 210, 106, 0.28);
  flex: 0 0 auto;

  /* картинка для светлой темы по умолчанию */
  background-image: var(--avatar-light);
  background-size: 120% 120%;
  background-position: center;
  background-repeat: no-repeat;
  background-color: rgba(0, 210, 106, 0.06); /* если картинки нет */
}
body[data-theme="dark"] .review__avatar{
  background-image: var(--avatar-dark, var(--avatar-light));
}
.review__name{
  font-family: "SegoeUI", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: 1rem;
}
.review__text{
  margin: 0;
  color: var(--muted);
  font-family: "SegoeUI", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 400;
  font-size: 0.92rem;
  line-height: 1.35;
}

/* =========================
   About
========================= */
.about{
  padding: clamp(1.15rem, 5vw, 1.55rem);
}

.about__illustration{
  margin-bottom: 0.95rem;
}
.about__frame{
  height: clamp(9rem, 44vw, 11.2rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(0,210,106,0.10), rgba(24,185,255,0.08));
  box-shadow: 0 16px 30px rgba(0,0,0,0.06);
  position: relative;
  isolation: isolate;

  overflow: hidden;
  padding: clamp(0.35rem, 2.1vw, 0.75rem);
}
body[data-theme="dark"] .about__frame{
  background: linear-gradient(135deg, rgba(0,210,106,0.10), rgba(24,185,255,0.06));
  box-shadow: 0 24px 46px rgba(0,0,0,0.45);
}

.about__img{
  position: absolute;
  inset: 0;
  z-index: 1;

  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,0.18));
  pointer-events: none;
}

.about__title{
  margin: 0 0 0.9rem;
  text-align: center;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: clamp(1.5rem, 7vw, 2.05rem);
  line-height: 1.05;
}
.about__details{
  border: 1px dashed rgba(0, 210, 106, 0.28);
  border-radius: var(--radius-lg);
  padding: 0.85rem 0.95rem;
  background: linear-gradient(180deg, rgba(0,210,106,0.03), transparent);
}
.about__summary{
  cursor: pointer;
  font-weight: 900;
  font-size: 1rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.about__summary::-webkit-details-marker{ display: none; }
.about__details[open] .about__text{
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.45;
  font-family: "SegoeUI", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 400;
}

/* =========================
   Overlay + Modals
========================= */
.overlay{
  position: fixed;
  inset: 0;
  z-index: 80;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  /* для навигации: лёгкое затемнение без blur */
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;

  transition: opacity 180ms ease, visibility 180ms ease;
}
.overlay.active{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.overlay.overlay--soft{
  background: rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.no-scroll{
  overflow: hidden;
}

/* Nav modal */
.nav-modal{
  position: fixed;
  inset: 0;
  z-index: 90;

  /* panel spacing to look like the макет */
  padding:
    calc(env(safe-area-inset-top, 0px) + clamp(0.75rem, 3.6vw, 1rem))
    clamp(0.85rem, 4vw, 1.25rem)
    calc(env(safe-area-inset-bottom, 0px) + clamp(0.85rem, 4vw, 1.25rem));

  display: flex;
  align-items: stretch;
  justify-content: center;

  pointer-events: none;
}
.nav-modal__panel{
  width: min(94vw, 34rem);
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;

  border-radius: 0 var(--nav-radius-panel) var(--nav-radius-panel) 0;

  /* Non-transparent panel background (as requested) */
  background: linear-gradient(180deg, var(--nav-panel-bg), var(--nav-panel-bg-2));

  /* subtle inner depth like in the mockup */
  box-shadow:
    0 0 0 1px var(--nav-panel-inset) inset,
    var(--shadow-soft);

  isolation: isolate;
  position: relative;

  /* closed state */
  transform: translateX(-110%);
  opacity: 0;

  transition: transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 240ms ease;
  will-change: transform, opacity;
}

.nav-modal__panel::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;

  /* soft edge glow (especially visible on dark theme) */
  box-shadow: 0 0 0 1px rgba(0, 210, 106, 0.10) inset;
}

.nav-modal.active{
  pointer-events: auto;
}

.nav-modal.active .nav-modal__panel{
  transform: translateX(0);
  opacity: 1;
}
/* Smooth-scroll target highlight (\"красивая анимация\" при переходе из меню) */
.section.section--pulse,
.card.section--pulse{
  animation: sectionPulse 950ms ease-out 1;
}

@keyframes sectionPulse{
  0%{
    transform: translateY(0);
    box-shadow: 0 0 0 0 rgba(0, 210, 106, 0.00), var(--shadow-soft);
  }
  40%{
    transform: translateY(-2px);
    box-shadow: 0 0 0 10px rgba(0, 210, 106, 0.14), var(--shadow-soft);
  }
  100%{
    transform: translateY(0);
    box-shadow: 0 0 0 0 rgba(0, 210, 106, 0.00), var(--shadow-soft);
  }
}
.nav-modal__header{
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(0.95rem, 4.4vw, 1.35rem);
}
.nav-modal__title{
  margin: 0;
  font-weight: 700; /* Segoe 700 */
  letter-spacing: -0.03em;
  font-size: clamp(2rem, 8.5vw, 2.65rem);
  color: var(--nav-title);
}

.round-btn{
  width: clamp(2.9rem, 11.5vw, 3.45rem);
  height: clamp(2.9rem, 11.5vw, 3.45rem);
  border-radius: var(--radius-btn);

  display: grid;
  place-items: center;

  background: var(--nav-radius-close);
  border: 2px solid var(--nav-border);
  color: var(--nav-close-icon);

  box-shadow: 0 10px 24px rgba(0,0,0,0.10);
  cursor: pointer;
}

.round-btn:active{ transform: translateY(1px) scale(0.99); }

/* Close (X) icon: different SVG for light/dark theme */
.close-ico--light{ display: block; }
.close-ico--dark{ display: none; }
body[data-theme="dark"] .close-ico--light{ display: none; }
body[data-theme="dark"] .close-ico--dark{ display: block; }

/* Make the close icon a bit larger inside the button */
.round-btn .close-ico{
  width: 1.55rem;
  height: 1.55rem;
}


.nav-modal__list{
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  padding: 0 clamp(0.95rem, 4.4vw, 1.35rem) clamp(0.85rem, 3.8vw, 1.15rem);
  display: grid;
  gap: 0.65rem;
  align-content: start;
}

.nav-modal__support{
  flex-shrink: 0;
  padding:
    0 clamp(0.95rem, 4.4vw, 1.35rem)
    calc(env(safe-area-inset-bottom, 0px) + clamp(0.85rem, 3.8vw, 1.2rem));
}

.nav-support-card{
  display: flex;
  align-items: center;
  gap: 0.78rem;

  padding: 0.72rem 0.88rem;
  min-height: clamp(3.1rem, 11vw, 3.55rem);
  border-radius: var(--nav-radius-item);

  text-decoration: none;
  color: var(--nav-item-text);

  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(230, 241, 235, 0.72));
  border: 2px solid var(--nav-border);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35) inset,
    0 10px 26px rgba(11, 36, 23, 0.07);

  transition: transform 140ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.nav-support-card:hover{
  border-color: rgba(0, 210, 106, 0.55);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.45) inset,
    0 12px 30px rgba(0, 210, 106, 0.12);
}
.nav-support-card:active{
  transform: translateY(1px) scale(0.995);
}

body[data-theme="dark"] .nav-support-card{
  background: linear-gradient(180deg, rgba(14, 48, 34, 0.55), rgba(6, 22, 16, 0.88));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 12px 32px rgba(0, 0, 0, 0.4);
}
body[data-theme="dark"] .nav-support-card:hover{
  border-color: rgba(120, 255, 200, 0.28);
}

.nav-support-card__icon{
  width: clamp(2.75rem, 12.5vw, 3.15rem);
  height: clamp(2.05rem, 9.5vw, 2.35rem);
  border-radius: var(--nav-radius-icon);
  display: grid;
  place-items: center;
  flex: 0 0 auto;

  background: var(--nav-icon-bg);
  border: 2px solid var(--nav-icon-border);
  color: var(--nav-icon);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35) inset,
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
}
body[data-theme="dark"] .nav-support-card__icon{
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 10px 22px rgba(0, 0, 0, 0.35);
}

.nav-support-card__svg{
  width: 1.35rem;
  height: 1.35rem;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-support-card__svg path{
  fill: none;
  stroke: currentColor;
}

.nav-support-card__text{
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.nav-support-card__title{
  font-weight: 800;
  font-size: clamp(0.92rem, 4vw, 1.05rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.nav-support-card__sub{
  font-weight: 600;
  font-size: clamp(0.78rem, 3.4vw, 0.88rem);
  color: var(--nav-arrow);
  line-height: 1.25;
}

.nav-support-card__go{
  flex: 0 0 auto;
  color: var(--nav-icon);
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 1;
}
.nav-item{
  width: 100%;
  border: 0;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;

  padding: 0.78rem 0.95rem;
  min-height: clamp(3.25rem, 11.5vw, 3.75rem);
  border-radius: var(--nav-radius-item);

  background: var(--nav-item-bg);
  border: 2px solid var(--nav-border);
  color: var(--nav-item-text);

  font-weight: 700; /* Segoe Bold */
  font-size: clamp(0.95rem, 4.4vw, 1.15rem);

  text-align: left;

  position: relative;
  overflow: hidden;
}

.nav-item::after{
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 16%;
  height: 10px;
  border-radius: 999px;
  pointer-events: none;

  /* subtle green reflection line like on the mockup */
  background: linear-gradient(90deg,
    rgba(0, 210, 106, 0),
    rgba(0, 210, 106, 0.18),
    rgba(0, 210, 106, 0)
  );
  filter: blur(0.2px);
  opacity: 0.9;
}
.nav-item__left{
  display: inline-flex;
  align-items: center;
  gap: 0.78rem;
  min-width: 0;
}
.nav-item__icon{
  width: clamp(3.15rem, 14.5vw, 3.75rem);
  height: clamp(2.25rem, 10.5vw, 2.65rem);
  border-radius: var(--nav-radius-icon);
  display: grid;
  place-items: center;

  background: var(--nav-icon-bg);
  border: 2px solid var(--nav-icon-border);
  color: var(--nav-icon);

  flex: 0 0 auto;

  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35) inset,
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
}
body[data-theme="dark"] .nav-item__icon{
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 10px 22px rgba(0, 0, 0, 0.35);
}
.nav-item__icon svg{
  width: 1rem;
  height: 1rem;
  display: block;
  margin: 0 auto;
  justify-self: center;
  align-self: center;
}

/* Единый контурный набор: --nav-icon → stroke currentColor, одинаковый вес в light/dark */
.nav-item__icon svg.nav-item__svg{
  width: 1.4rem;
  height: 1.4rem;
  flex-shrink: 0;

  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-item__icon svg.nav-item__svg path,
.nav-item__icon svg.nav-item__svg circle,
.nav-item__icon svg.nav-item__svg ellipse,
.nav-item__icon svg.nav-item__svg rect,
.nav-item__icon svg.nav-item__svg line,
.nav-item__icon svg.nav-item__svg polyline,
.nav-item__icon svg.nav-item__svg polygon{
  fill: none;
  stroke: currentColor;
}

.nav-item__arrow{
  color: var(--nav-arrow);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1;
}

/* Profile modal */
.profile-modal{
  position: fixed;
  z-index: 90;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + var(--header-gap) + var(--header-h) + 0.75rem);
  transform: translateX(-50%) translateY(12px) scale(0.99);

  width: min(94vw, 36rem);
  max-height: calc(100vh - (env(safe-area-inset-top, 0px) + var(--header-gap) + var(--header-h) + env(safe-area-inset-bottom, 0px) + 1.5rem));
  max-height: calc(100dvh - (env(safe-area-inset-top, 0px) + var(--header-gap) + var(--header-h) + env(safe-area-inset-bottom, 0px) + 1.5rem));

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), visibility 180ms ease;
}
.profile-modal.active{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

.profile-card{
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);

  padding: clamp(1rem, 4.6vw, 1.35rem);
  overflow: auto;

  max-height: inherit;
}
body[data-theme="dark"] .profile-card{
  background: rgba(10, 27, 20, 0.92);
}

.profile-card__top{
  --back-w: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.profile-top-spacer{
  flex: 0 0 auto;
  width: var(--back-w);
  height: 1px;
}

.profile-card__top .profile-user{
  flex: 1 1 auto;
  justify-content: center;
}

.profile-user{
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}
.profile-avatar{
  width: clamp(3.1rem, 14vw, 3.7rem);
  height: clamp(3.1rem, 14vw, 3.7rem);
  border-radius: 50%;
  display: grid;
  place-items: center;

  font-weight: 900;
  color: #fff;
  /*
    Profile avatar:
    - by default: gradient circle (fallback)
    - if you pass CSS vars --avatar-light / --avatar-dark on the element,
      it will use those images for light/dark theme.
      Example in HTML:
      style="--avatar-light:url('./assets/avatars/me-light.png'); --avatar-dark:url('./assets/avatars/me-dark.png');"
  */
  background-image: var(
    --avatar-light,
    linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%)
  );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 14px 28px rgba(0, 210, 106, 0.22);

  flex: 0 0 auto;
}

body[data-theme="dark"] .profile-avatar{
  background-image: var(
    --avatar-dark,
    var(--avatar-light, linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%))
  );
}
.profile-user__text{ min-width: 0; }
.profile-user__name{
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: clamp(1.15rem, 5.6vw, 1.45rem);
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-user__id{
  margin-top: 0.25rem;
  color: var(--muted);
  font-weight: 800;
}

.btn--back{
  padding: 0.55rem 0.7rem;
  min-width: var(--back-w, 86px);
  font-weight: 900;
  font-size: 0.85rem;
  color: var(--text);
  gap: 0.45rem;
}

.btn--back .svg-ico--back{
  width: 1.15em;
  height: 1.15em;
}

.btn--back .svg-ico--back path{
  stroke: currentColor;
}

.profile-balances{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.balance{
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 210, 106, 0.22);
  background: rgba(255,255,255,0.75);
  padding: 0.95rem 0.95rem;
}
body[data-theme="dark"] .balance{
  background: rgba(8, 20, 15, 0.55);
}
.balance__amount{
  display: block;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}
.balance__label{
  display: block;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.85rem;
}

.profile-actions{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
@media (max-width: 340px){
  .profile-actions{ grid-template-columns: 1fr; }
}
.btn--action{
  width: 100%;
  padding: 0.95rem 1rem;
  justify-content: center;
}

.traffic{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;

  padding: 0.95rem 1rem;
  border-radius: var(--radius-lg);

  border: 1px solid rgba(0, 210, 106, 0.22);
  background: rgba(255,255,255,0.75);

  margin-bottom: 0.85rem;
}
body[data-theme="dark"] .traffic{
  background: rgba(8, 20, 15, 0.55);
}
.traffic__title{
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.traffic__sub{
  margin-top: 0.25rem;
  font-weight: 900;
  color: rgba(0, 210, 106, 0.85);
}
body[data-theme="dark"] .traffic__sub{
  color: rgba(0, 210, 106, 0.9);
}
.traffic__right{
  text-align: right;
}
.traffic__timer{
  margin-top: 0.25rem;
  font-weight: 900;
  color: rgba(0, 210, 106, 0.85);
  font-variant-numeric: tabular-nums;
}

/* Сводка по операциям (вместо графика) */
.flow-summary{
  border-radius: var(--radius-lg);
  border: 1px solid var(--flow-border);
  background: rgba(255, 255, 255, 0.78);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
body[data-theme="dark"] .flow-summary{
  background: rgba(8, 20, 15, 0.55);
}
.flow-summary__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--flow-border);
}
.flow-summary__title{
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.flow-summary__hint{
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--flow-muted);
  max-width: 55%;
  text-align: right;
  line-height: 1.2;
}
.flow-summary__grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  padding: 0.65rem 0.65rem 0.75rem;
}
@media (max-width: 360px){
  .flow-summary__grid{
    grid-template-columns: 1fr;
  }
}
.flow-summary__cell{
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-md);
  background: rgba(0, 210, 106, 0.05);
  border: 1px solid rgba(0, 210, 106, 0.1);
}
body[data-theme="dark"] .flow-summary__cell{
  background: rgba(0, 0, 0, 0.2);
}
.flow-summary__k{
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.flow-summary__v{
  font-size: 0.88rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--text);
}
.flow-summary__v--out{
  color: rgba(163, 70, 26, 0.95);
}
body[data-theme="dark"] .flow-summary__v--out{
  color: rgba(255, 160, 120, 0.92);
}

/* Детали операции */
.tx-detail-modal{
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.tx-detail-modal.is-open{
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}
.tx-detail-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  border: 0;
  cursor: pointer;
}
.tx-detail-modal__sheet{
  position: relative;
  width: 100%;
  max-width: 28rem;
  max-height: min(78vh, 520px);
  overflow: auto;
  margin: 0 auto;
  padding: 1rem 1.1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--card, #fff);
  border: 1px solid var(--border);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.18);
}
body[data-theme="dark"] .tx-detail-modal__sheet{
  background: var(--card);
}
.tx-detail-modal__close{
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(0, 210, 106, 0.1);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.tx-detail-modal__title{
  margin: 0 2.5rem 0.35rem 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.tx-detail-modal__amount{
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.tx-detail-modal__datetime{
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.tx-detail-modal__status{
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(180, 120, 0, 0.95);
}
body[data-theme="dark"] .tx-detail-modal__status{
  color: rgba(255, 200, 100, 0.9);
}
.tx-detail-modal__body{
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(0, 210, 106, 0.06);
  border: 1px solid rgba(0, 210, 106, 0.12);
}
body[data-theme="dark"] .tx-detail-modal__body{
  background: rgba(0, 0, 0, 0.25);
}

.transactions{
  display: grid;
  gap: 0.75rem;
}
.transaction{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;

  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-lg);

  border: 1px solid rgba(0, 210, 106, 0.18);
  background: rgba(255,255,255,0.75);
}
.transaction--clickable{
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.transaction--clickable:active{
  transform: scale(0.995);
}
body[data-theme="dark"] .transaction{
  background: rgba(8, 20, 15, 0.55);
}

.transaction__type{
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}
.transaction__sub{
  font-weight: 600;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
  max-width: 14rem;
}
.transaction__badge{
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-pill);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: rgba(255, 180, 60, 0.2);
  color: rgba(140, 80, 0, 0.95);
}
body[data-theme="dark"] .transaction__badge{
  background: rgba(255, 200, 80, 0.15);
  color: rgba(255, 210, 140, 0.95);
}
.transaction__date{
  font-weight: 700;
  color: var(--muted);
  font-size: 0.72rem;
}
.transaction__amount{
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.transaction__amount--plus{ color: rgba(0, 210, 106, 0.95); }
.transaction__amount--minus{ color: rgba(163, 70, 26, 0.95); }

/* =========================
   Profile typography overrides
   (per spec: Segoe / Consolas / Arial)
========================= */
#profile-page .profile-user__name{
  font-family: "Segoe UI", SegoeUI, system-ui, -apple-system, Arial, sans-serif;
  font-weight: 700;
}
#profile-page .profile-user__id{
  font-family: "Consolas", ui-monospace, "SFMono-Regular", Menlo, Monaco, "Liberation Mono", "Courier New", monospace;
  font-weight: 400;
}

#profile-page .btn--back{
  font-family: "Segoe UI", SegoeUI, system-ui, -apple-system, Arial, sans-serif;
  font-weight: 700;
}
#profile-page .btn--back .btn__icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
}
#profile-page .btn--back svg{
  display: block;
}

#profile-page .balance__amount{
  font-family: "Segoe UI", SegoeUI, system-ui, -apple-system, Arial, sans-serif;
  font-weight: 700;
}
#profile-page .balance__label{
  font-family: "Segoe UI", SegoeUI, system-ui, -apple-system, Arial, sans-serif;
  font-weight: 600;
}

#profile-page .profile-actions .btn--action{
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-weight: 700;
}
#profile-page .profile-actions .btn__icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.55rem;
}
#profile-page .profile-actions .btn__icon svg{
  width: 1.9rem;
  height: 1.9rem;
}
/* keep provided SVG but adapt to button color */
#profile-page .profile-actions .btn--outline .btn__icon svg path{
  stroke: currentColor;
}

#profile-page .traffic__title,
#profile-page .transaction__type{
  font-family: "Arial Black", Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-weight: 900;
}
#profile-page .traffic__sub,
#profile-page .traffic__timer{
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-weight: 400;
}

#profile-page .transaction__date{
  font-family: "Consolas", ui-monospace, "SFMono-Regular", Menlo, Monaco, "Liberation Mono", "Courier New", monospace;
  font-weight: 400;
}
#profile-page .transaction__amount{
  font-family: "Arial Black", Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-weight: 900;
}

/* =========================
   Preloader
========================= */
#preloader{
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;

  /* полностью перекрываем контент, чтобы не было "фрагментов" при загрузке */
  background-color: var(--bg-base);
  background-image: var(--bg-image);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;

  transition: opacity 380ms ease, visibility 380ms ease;
}
.preloader-hidden{
  opacity: 0;
  visibility: hidden;
}

.preloader-grid{
  display: block;
  opacity: 0.7;

  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: clamp(2.1rem, 7vw, 2.8rem) clamp(2.1rem, 7vw, 2.8rem);
  pointer-events: none;
}

.loader-container{
  position: relative;
  display: grid;
  place-items: center;
}

.ripple{
  position: absolute;
  border-radius: 50%;
  background: rgba(0, 210, 106, 0.12);
  animation: ripplePulse 2.6s ease-in-out infinite;
  will-change: transform;
}
.ripple-1{ width: 220px; height: 220px; opacity: 0.6; }
.ripple-2{ width: 300px; height: 300px; opacity: 0.35; animation-delay: 0.35s; }

@keyframes ripplePulse{
  0%, 100%{ transform: scale(0.92); }
  50%{ transform: scale(1.06); }
}

.loader-core{
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  box-shadow: 0 22px 44px rgba(0, 210, 106, 0.22);
  display: grid;
  place-items: center;
}

.spinner-ring{
  width: 100%;
  height: 100%;
  position: relative;
}

.tick{
  --i: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 26px;
  background: rgba(255,255,255,0.96);
  border-radius: 999px;

  /* размещаем "палочки" по кругу */
  transform: translate(-50%, -50%) rotate(calc(var(--i) * 30deg)) translateY(-46px);

  /* плавная "бегущая" подсветка по кругу */
  opacity: 0.18;
  animation: tickFade 1.2s linear infinite;
  animation-delay: calc(var(--i) * -0.1s);
  will-change: opacity;
}

.tick:nth-child(1)  { --i: 0; }
.tick:nth-child(2)  { --i: 1; }
.tick:nth-child(3)  { --i: 2; }
.tick:nth-child(4)  { --i: 3; }
.tick:nth-child(5)  { --i: 4; }
.tick:nth-child(6)  { --i: 5; }
.tick:nth-child(7)  { --i: 6; }
.tick:nth-child(8)  { --i: 7; }
.tick:nth-child(9)  { --i: 8; }
.tick:nth-child(10) { --i: 9; }
.tick:nth-child(11) { --i: 10; }
.tick:nth-child(12) { --i: 11; }

@keyframes tickFade{
  0%{ opacity: 1; }
  12%{ opacity: 0.72; }
  100%{ opacity: 0.18; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  .btn, .nav-modal, .profile-modal, .overlay{ transition: none !important; }
  .tick{ animation: none !important; opacity: 0.75 !important; }
  .ripple{ animation: none !important; }
}


/* Tariff selected state */
.tariff.is-selected{
  /* без зелёного "ореола" вокруг карточки */
  box-shadow: var(--shadow-soft);
  border-color: rgba(0, 210, 106, 0.42);
}

body[data-theme="dark"] .tariff.is-selected{
  border-color: var(--tariff-border, rgba(0, 210, 106, 0.22));
  box-shadow: var(--shadow-soft);
}

body[data-theme="dark"] .tariff.is-selected{
  box-shadow: var(--shadow-soft);
  border-color: rgba(0, 210, 106, 0.38);
}

.tariff__cta[disabled]{
  opacity: 0.82;
  cursor: default;
  filter: saturate(1.05);
}


/* =========================
   Hero buttons (как в тарифах) + responsive fix
========================= */
.hero__actions{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.hero__actions .btn{
  border-radius: var(--radius-btn);
  min-width: 0;
  white-space: normal;
  line-height: 1.12;
  padding: 0.9rem 0.85rem;
  font-size: 0.92rem;
}
.hero__instruction{
  border-radius: var(--radius-btn);
}

/* Не даём кнопкам вылезать на очень узких экранах */
@media (max-width: 390px){
  .hero__actions{
    gap: 0.55rem;
  }
  .hero__actions .btn{
    padding: 0.85rem 0.75rem;
    font-size: 0.88rem;
  }
}


/* Center disclaimer text as in макет */
.disclaimer{
  text-align: center;
}

/* =========================
   Frames: border above image
========================= */
.hero__frame::after,
.stats__frame::after,
.live__frame::after,
.about__frame::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(0, 210, 106, 0.20);
  pointer-events: none;
  z-index: 3;
}

/* Dark mode: darker inner background for frames with images */
body[data-theme="dark"] .hero__frame,
body[data-theme="dark"] .stats__frame{
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.92) 100%);
}
body[data-theme="dark"] .hero__frame::after,
body[data-theme="dark"] .stats__frame::after{
  border-color: rgba(0, 210, 106, 0.32);
}

.section-card--tariffs .tariffs{
  margin-top: 0.85rem;
}
.calc .calc__input-group{
  margin-bottom: 0.85rem;
}
.calc__input-group{
  padding: 0.85rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(0, 210, 106, 0.28);
  background: linear-gradient(180deg, rgba(0,210,106,0.03), transparent);
}

body[data-theme="dark"] .calc__input-group{
  border-color: rgba(0, 210, 106, 0.22);
  background: linear-gradient(180deg, rgba(0,210,106,0.08), rgba(0,0,0,0));
}
.about__arrow{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: transform 220ms ease;
}
.about__details[open] .about__arrow{
  transform: rotate(180deg);
}

body[data-theme="dark"] .section-card{
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(0, 210, 106, 0.22) inset, var(--shadow-soft);
}

/* Live ticket: обводка поверх вотермарка */
.live-ticket__inner::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(0, 210, 106, 0.28);
  pointer-events: none;
  z-index: 3;
}
.live-ticket__inner > *{
  position: relative;
  z-index: 1;
}
body[data-theme="dark"] .live-ticket__inner::before{
  border-color: rgba(0, 210, 106, 0.34);
}


/* =========================
   Mobile-first typography + layout tweaks (Telegram WebApp)
   - Headings sizes tuned for phones
   - HERO: "Рассчитать прибыль" stays on one line and is wider than "Инвестировать"
   - TARIFFS: thicker borders, no green selection outline, Consolas/Arial typography
   - CALCULATOR + STATS typography
   - Frames: border goes UNDER the image (so images can overflow the outline)
========================= */

/* Headings: use Segoe UI 700 (not 900) */
.section__title,
.hero__title,
.stats__title,
.about__title{
  font-weight: 700;
}

/* =========================
   Gradient titles (requested)
   - Light theme: 184D31 -> 0B1A12 (radial, bottom -> top)
   - Dark theme:  93FFC5 -> E0FFEF

   Targets only the titles you listed:
   - "3–9% ежедневной" (HERO)
   - Section titles: tariffs / calculator / live / licenses / reviews
   - "Информация о проекте" (About)
========================= */

/* Fallback for browsers without text background-clip */
.hero__title,
.section__title--in-card,
.about__title,
.stats__title{
  color: var(--title-grad-2);
}

/* Gradient text fill */
@supports (-webkit-background-clip: text) or (background-clip: text){
  .hero__title,
  .section__title--in-card,
  .about__title,
  .stats__title{
    background-image: radial-gradient(
      140% 180% at 50% 120%,
      var(--title-grad-1) 0%,
      var(--title-grad-2) 72%
    );
    background-repeat: no-repeat;
    background-size: 100% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

/* Block titles — tuned for mobile width */
#hero-title,
#about-title{
  font-size: clamp(2.2rem, 11vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

#tariffs-title,
#calc-title{
  font-size: clamp(1.7rem, 7.6vw, 2.05rem);
  line-height: 1.05;
}

#stats-title,
#live-title{
  font-size: clamp(1.85rem, 8.2vw, 2.25rem);
  line-height: 1.05;
}

#reviews-title{
  font-size: clamp(1.8rem, 8vw, 2.2rem);
  line-height: 1.05;
}

#licenses-title{
  font-size: clamp(1.7rem, 7.2vw, 2.1rem);
  line-height: 1.05;
}

/* HERO text (mobile) */
.hero__subtitle{
  font-weight: 400;
  font-size: clamp(0.98rem, 4.2vw, 1.15rem);
}

/* HERO buttons: на мобилке спокойно умещаем и не даём вылезать */
.hero__actions{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.hero__actions .btn{
  min-width: 0;
  white-space: normal;
  line-height: 1.15;

  font-family: Arial, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  font-size: clamp(0.85rem, 3.9vw, 1.02rem);
  padding: 0.92rem 0.82rem;
}

@media (max-width: 420px){
  .hero__actions{ grid-template-columns: 1fr; }
}

/* Extra safety for very narrow screens */
@media (max-width: 360px){
  .hero__actions{ gap: 0.55rem; }
  .hero__actions .btn{
    font-size: 0.82rem;
    padding: 0.85rem 0.72rem;
  }
}

/* =========================
   TARIFFS
========================= */

/* Thicker tariff borders (1–4) */
.tariff{
  border-width: 3px;
  --wm-x: 0px;   /* press watermark to the right */
  --wm-y: 0px;   /* press watermark to the bottom */
}

/* Use a stable border-color token so "selected" state doesn't paint green */
.tariff{ border-color: var(--tariff-border, rgba(0, 210, 106, 0.22)); }
.tariff--1{ --tariff-border: rgba(244, 182, 51, 0.35); border-color: var(--tariff-border); }
.tariff--2{ --tariff-border: rgba(0, 210, 106, 0.28); border-color: var(--tariff-border); }
.tariff--3{ --tariff-border: rgba(45, 149, 255, 0.32); border-color: var(--tariff-border); }
.tariff--4{ --tariff-border: rgba(255, 146, 74, 0.36); border-color: var(--tariff-border); }

body[data-theme="dark"] .tariff--1{ --tariff-border: rgba(244, 182, 51, 0.28); border-color: var(--tariff-border); }
body[data-theme="dark"] .tariff--2{ --tariff-border: rgba(0, 210, 106, 0.22); border-color: var(--tariff-border); }
body[data-theme="dark"] .tariff--3{ --tariff-border: rgba(45, 149, 255, 0.24); border-color: var(--tariff-border); }
body[data-theme="dark"] .tariff--4{ --tariff-border: rgba(255, 146, 74, 0.26); border-color: var(--tariff-border); }

/* Remove green selection outline (keep subtle shadow only) */
.tariff.is-selected{
  border-color: var(--tariff-border, rgba(0, 210, 106, 0.22));
  box-shadow: var(--shadow-soft);
}

/* Плашки сумм: системный шрифт с цифрами (в WebView Consolas иногда «теряет» цифры) */
.tariffs .pill{
  font-family: Arial, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  letter-spacing: 0;
}
.tariffs .tariff__badge{
  font-family: Consolas, ui-monospace, "SFMono-Regular", Menlo, Monaco, "Liberation Mono", "Courier New", monospace;
  font-weight: 400;
  letter-spacing: 0;
}
.tariffs .tariff__cta{
  font-family: Arial, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
}

/* =========================
   CALCULATOR typography
========================= */
.calc__label,
.calc__currency,
.calc__value{
  font-family: "SegoeUI", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 700;
}

/* "за неделю / за месяц / за год / выбранный тариф" */
.calc__sub{
  font-family: "SegoeUI", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 600; /* Semibold */
}

/* Amount input: Arial 700 */
.calc__amount-input{
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-weight: 700;
}

/* =========================
   STATS typography
========================= */
.stat__label{
  font-family: "SegoeUI", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 600; /* Semibold */
}
.stats .disclaimer{
  font-family: "SegoeUI", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
}

/* =========================
   Frames: border UNDER image (no overlay on top of images)
========================= */

/* Disable previous border overlay pseudo-element */
.hero__frame::after,
.stats__frame::after,
.live__frame::after,
.about__frame::after{
  content: none !important;
}

/* Unify frame style (as in макет) */
.hero__frame{
  --frame-overlap: clamp(0.55rem, 3.8vw, 1.05rem);

  padding: var(--frame-pad);
  overflow: visible;
  border: 1px solid rgba(0, 210, 106, 0.20);
}

.stats__frame{
  --frame-overlap: clamp(0.55rem, 3.8vw, 1.05rem);

  padding: var(--frame-pad);
  overflow: visible;
  border: 1px solid rgba(0, 210, 106, 0.20);
}

/* Live/About frames match the same white frame look */
.live__frame,
.about__frame{
  --frame-overlap: clamp(0.55rem, 3.8vw, 1.05rem);

  padding: var(--frame-pad);
  overflow: visible;

  background: linear-gradient(180deg, rgba(255,255,255,1), rgba(246,255,251,1));
  border: 1px solid rgba(0, 210, 106, 0.20);
  box-shadow: none;
}

/* Dark theme frames */
body[data-theme="dark"] .hero__frame,
body[data-theme="dark"] .stats__frame,
body[data-theme="dark"] .live__frame,
body[data-theme="dark"] .about__frame{
  background: linear-gradient(180deg, rgba(7, 18, 12, 0.55), rgba(5, 12, 8, 0.40));
  border-color: rgba(0, 210, 106, 0.22);
}

/* Images: stick to bottom border + allow overflow above the top border */
.hero__img,
.stats__img,
.live__img,
.about__img{
  /* flush to the frame border (no bottom gap) */
  inset: 0;

  /* align content to the bottom edge */
  object-position: center bottom;

  /* lift the illustration above the top outline (as in your screenshots) */
  transform: scale(1.15);
  transform-origin: center bottom;
  filter:
    drop-shadow(0 0 14px rgba(18, 211, 119, 0.35))
    drop-shadow(0 0 34px rgba(18, 211, 119, 0.18));
}

/* Fix: selected tariff border must not turn green in dark mode */
body[data-theme="dark"] .tariff.is-selected{
  border-color: var(--tariff-border, rgba(0, 210, 106, 0.22));
}

/* ===== Nav: full screen ===== */
.nav-modal{
  padding: 0;                /* убираем внешние отступы */
  justify-content: stretch;  /* тянем панель на всю ширину */
}

.nav-modal__panel{
  width: 100vw;
  max-width: none;
  height: 100dvh;            /* полный экран (с учётом mobile) */
            /* если хочешь прям "в край" */
}

/* ===== Nav: smaller buttons + more rounding ===== */
:root{
  /* было clamp(0.9rem, 3.2vw, 1.1rem) — делаем чуть больше скругление */
  --radius-btn: clamp(1.05rem, 3.6vw, 1.35rem);
}

.nav-item{
  /* уменьшаем "высоту" и внутренние отступы */
  padding: 0.62rem 0.85rem;
  min-height: clamp(2.85rem, 10.5vw, 3.25rem);

  /* чуть меньше текст */
  font-size: clamp(0.9rem, 4vw, 1.05rem);
}

.nav-item__icon{
  /* уменьшаем иконку-блок слева */
  width: clamp(2.75rem, 12.5vw, 3.15rem);
  height: clamp(2.05rem, 9.5vw, 2.35rem);
}

/* =========================
   HERO tweaks
   - bigger SVG on buttons
   - keep rounded corner clipping on phones (no left/bottom bleed)
========================= */

/* Bigger SVG icons on HERO buttons */
.hero .btn__icon .svg-ico{
  width: 1.45em;
  height: 1.45em;
}

/* Ensure clipping works even with transformed children */
.card--clip{
  position: relative;
}

/* Respect the frame padding so scaled images don't hit the card corners */
.hero__img,
.stats__img,
.live__img,
.about__img{
  inset: var(--frame-pad, 0);
}

/* =========================
   Profile: mobile layout fixes
   - buttons don't overflow on phones
   - back button + name wrap nicely
   - icons scale down on small screens
========================= */
.content--profile{
  width: 100%;
  max-width: 100%;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.profile-card{
  width: min(100%, 44rem);
  max-width: 100%;
  margin-inline: auto;
  overflow: hidden; /* защита от вылетающих SVG */
}

.profile-card__top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.profile-user{
  min-width: 0;     /* важно для переносов */
  flex: 1 1 auto;
}

.profile-user__name,
.profile-user__id{
  overflow-wrap: anywhere;
}

.btn--back{
  flex: 0 0 auto;
  white-space: nowrap;
}

.profile-actions{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.profile-actions .btn{
  min-width: 0;
  white-space: normal;  /* у .btn по умолчанию nowrap */
  line-height: 1.12;
  text-align: center;
  justify-content: center;
  padding: 0.95rem 0.85rem;
}

.profile-actions .btn__icon{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* У кнопок профиля SVG заданы инлайном огромными (61x61, 54x54) — прижимаем к текстовому размеру */
.profile-actions .btn__icon svg{
  width: 1.35em !important;
  height: 1.35em !important;
}

@media (max-width: 420px){
  .profile-card__top{
    align-items: stretch;
  }

  .btn--back{
    width: 100%;
    justify-content: center;
  }

  .profile-actions{
    grid-template-columns: 1fr;
  }

  .profile-actions .btn{
    padding: 0.9rem 0.85rem;
    font-size: 0.92rem;
  }
}

@media (max-width: 360px){
  .profile-actions{
    gap: 0.6rem;
  }
  .profile-actions .btn{
    padding: 0.85rem 0.75rem;
    font-size: 0.9rem;
  }
}



@media (max-width: 420px){
  .profile-user__name{ font-size: 1.05rem; }
  .profile-user__id{ font-size: 0.82rem; }

  .balance__amount{ font-size: 1.05rem; }
  .balance__label{ font-size: 0.82rem; }

  .traffic__title{ font-size: 0.95rem; }
  .traffic__sub{ font-size: 0.82rem; }

  .btn--back{ font-size: 0.92rem; padding: 0.62rem 0.85rem; min-width: 92px; }
  .btn--action{ padding: 0.85rem 0.95rem; }
}

/* =========================
   Profile — requested fixes
   - full-width profile card + buttons
   - back button on the right of the name
   - theme-aware colors for Invest/Withdraw icons + text
========================= */

/* Full width card (as the rest of the app uses 100vw) */
#profile-page .profile-card{
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

/* Back button: right side next to the name */
#profile-page .profile-card__top{
  justify-content: flex-start;
}
#profile-page .profile-card__top .profile-user{
  justify-content: flex-start;
}
#profile-page .profile-user__row{
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  width: 100%;
}
#profile-page .profile-user__name{
  flex: 1 1 auto;
  min-width: 0;
}
#profile-page .btn--back-inline{
  width: auto !important;
  white-space: nowrap;
  margin-left: auto;
}
#profile-page .profile-user__text{
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}
/* Profile action buttons: always full width */
#profile-page .flow-summary{
  margin-top: 0.35rem;
}
#profile-page .profile-actions{
  grid-template-columns: 1fr;
}

/* Make button icons follow currentColor */
#profile-page .profile-actions .btn__icon svg path,
#profile-page .profile-actions .btn__icon svg circle,
#profile-page .profile-actions .btn__icon svg rect,
#profile-page .profile-actions .btn__icon svg line,
#profile-page .profile-actions .btn__icon svg polyline,
#profile-page .profile-actions .btn__icon svg polygon,
#profile-page .profile-actions .btn__icon svg ellipse{
  stroke: currentColor;
  fill: currentColor;
}

/* "Инвестировать": dark theme text + SVG should be black */
body[data-theme="dark"] #profile-page .profile-actions .btn--primary{
  color: #000;
}

/* "Вывести": light theme text black, dark theme text white. Border should stay green in both themes */
#profile-page .profile-actions .btn--outline{
  color: #000;
  border-color: var(--border-strong);
}
body[data-theme="dark"] #profile-page .profile-actions .btn--outline{
  color: #fff;
  border-color: var(--border-strong);
}
/* PROFILE: "Вывести" — круглое свечение в dark mode */
body[data-theme="dark"] #profile-page .profile-actions .btn--outline .btn__icon{
  position: relative;
  isolation: isolate; /* чтобы свечение не смешивалось со всем вокруг */
}

/* отключаем квадратный SVG-filter внутри <g filter="..."> */
body[data-theme="dark"] #profile-page .profile-actions .btn--outline .btn__icon svg g{
  filter: none !important;
}

/* круглое серое свечение */
body[data-theme="dark"] #profile-page .profile-actions .btn--outline .btn__icon::before{
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 1.05em;
  height: 1.05em;
  transform: translate(-50%, -50%);
  border-radius: 999px;

  /* сама “точка” + glow */
  background: rgba(255, 255, 255, 0.20);
  box-shadow:
    0 0 14px rgba(255, 255, 255, 0.22),
    0 0 34px rgba(255, 255, 255, 0.14);
  z-index: 0;
}

/* иконка поверх свечения */
body[data-theme="dark"] #profile-page .profile-actions .btn--outline .btn__icon svg{
  position: relative;
  z-index: 1;
}
/* =========================
   Profile: one-line labels on phones
   ========================= */

#profile-page .balance__label,
#profile-page .traffic__title,
#profile-page .traffic__sub,
#profile-page .transaction__type,
#profile-page .transaction__date{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* чтобы ellipsis работал внутри flex */
#profile-page .traffic__left,
#profile-page .traffic__right,
#profile-page .transaction__left{
  min-width: 0;
}

#profile-page .transaction__left{
  flex: 1 1 auto;
}

/* уменьшаем шрифты на телефонах */
@media (max-width: 420px){
  #profile-page .balance__label{
    font-size: clamp(0.70rem, 3.2vw, 0.82rem);
  }
  #profile-page .traffic__title{
    font-size: clamp(0.80rem, 3.6vw, 0.98rem);
  }
  #profile-page .traffic__sub{
    font-size: clamp(0.72rem, 3.2vw, 0.90rem);
  }
  #profile-page .transaction__type{
    font-size: clamp(0.86rem, 3.8vw, 1.00rem);
    margin-bottom: 0.1rem; /* чуть компактнее */
  }
  #profile-page .transaction__date{
    font-size: clamp(0.70rem, 3.2vw, 0.82rem);
  }
}
/* ===== Extra tight for 320px ===== */
@media (max-width: 320px){
  #profile-page .balance__label{
    font-size: 0.72rem;   /* было крупнее */
    letter-spacing: -0.2px;
  }

  #profile-page .traffic__title{
    font-size: 0.86rem;
    letter-spacing: -0.2px;
  }

  #profile-page .traffic__sub{
    font-size: 0.74rem;
    letter-spacing: -0.2px;
  }

  #profile-page .transaction__type{
    font-size: 0.90rem;
    letter-spacing: -0.2px;
    margin-bottom: 0.05rem;
  }

  #profile-page .transaction__date{
    font-size: 0.72rem;
    letter-spacing: -0.2px;
  }

  /* Если у тебя там flex-строки с gap — на 320 это критично */
  #profile-page .traffic__row,
  #profile-page .transaction{
    gap: 0.6rem; /* уменьшили */
  }

  /* Чуть меньше внутренние отступы карточек, если у тебя есть padding */
  #profile-page .profile-card,
  #profile-page .traffic,
  #profile-page .transaction{
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}
/* Узкий экран: превращаем блоки в 2 строки, а внутри строки — "лево/право" */
@media (max-width: 360px) {
  /* Балансы: вместо 2 колонок -> 2 строки */
  .profile-balances {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  /* Внутри каждой строки: "₽ 12 500" слева, "Доступный баланс" справа */
  .profile-balances .balance {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
  }

  .profile-balances .balance__amount {
    white-space: nowrap; /* чтобы ₽ и число не разрывались */
    flex: 0 0 auto;
  }

  .profile-balances .balance__label {
    text-align: right;
    min-width: 0;           /* важно для сжатия */
    flex: 1 1 auto;         /* чтобы занимал остаток */
    overflow: hidden;       /* и не вылезал */
    text-overflow: ellipsis;
    white-space: nowrap; /* если хочешь, чтобы подпись тоже не переносилась */
  }

  /* Трафик: вместо 2 колонок -> 2 строки */
  .traffic{
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
  }

  .traffic__left{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
  }

  .traffic__right{
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    min-width: 0;
    flex: 0 0 auto;
  }

  /* чтобы "Тариф 3 • 6,5%/день" и таймер не переносились */
  .traffic__sub,
  .traffic__timer{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
@media (max-width: 320px){
  .traffic__title{ font-size: 0.86rem; }
  .traffic__sub{ font-size: 0.74rem; }
  .traffic__timer{ font-size: 0.78rem; }
}

/* =========================
   Invest modal (bottom sheet wizard)
========================= */
.invest-modal{
  position: fixed;
  inset: 0;
  z-index: 95;

  padding:
    calc(env(safe-area-inset-top, 0px) + clamp(0.75rem, 3.6vw, 1rem))
    clamp(0.85rem, 4vw, 1.25rem)
    calc(env(safe-area-inset-bottom, 0px) + clamp(0.85rem, 4vw, 1.25rem));

  display: flex;
  align-items: flex-end;
  justify-content: center;

  pointer-events: none;
  visibility: hidden;
}

.invest-modal.active{
  pointer-events: auto;
  visibility: visible;
}

.invest-modal__sheet{
  width: min(94vw, 36rem);
  height: 100%;
  max-height: 100%;

  border-radius: var(--nav-radius-panel);

  background: linear-gradient(180deg, var(--invest-sheet-bg), var(--invest-sheet-bg-2));
  box-shadow: var(--invest-sheet-shadow);

  overflow: hidden;

  display: flex;
  flex-direction: column;

  transform: translateY(110%);
  opacity: 0;

  transition:
    transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 260ms ease;

  will-change: transform, opacity;
}

.invest-modal.active .invest-modal__sheet{
  transform: translateY(0);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce){
  .invest-modal__sheet{ transition: none; }
}

/* Header area */
.invest-modal__chrome{
  padding: clamp(1rem, 4.6vw, 1.35rem);
  padding-bottom: clamp(0.85rem, 4vw, 1.1rem);

  background: linear-gradient(180deg, var(--invest-sheet-bg), var(--invest-sheet-bg-2));

  position: sticky;
  top: 0;
  z-index: 2;
}

.invest-modal__top{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.invest-modal__title{
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: clamp(1.65rem, 7.4vw, 2.35rem);
  line-height: 1.06;
  color: var(--text);
}

.invest-modal__title-dot{
  margin: 0 0.35rem;
  opacity: 0.9;
}

.invest-modal__close{
  width: clamp(3.05rem, 12.5vw, 3.75rem);
  height: clamp(3.05rem, 12.5vw, 3.75rem);
  border-radius: var(--radius-btn);

  display: grid;
  place-items: center;

  background: rgba(255,255,255,0.78);
  border: 2px solid var(--invest-sheet-border);
  color: #000;

  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
  cursor: pointer;
}

body[data-theme="dark"] .invest-modal__close{
  background: rgba(7, 18, 12, 0.58);
  color: #ffffff;
  box-shadow: 0 18px 44px rgba(0,0,0,0.55);
}

.invest-modal__close:active{ transform: translateY(1px) scale(0.99); }

.invest-close-ico{
  width: 1.6rem;
  height: 1.6rem;
  display: block;
}

.invest-modal__rule{
  margin-top: clamp(0.85rem, 3.6vw, 1rem);
  border-bottom: 2px dashed var(--invest-rule);
}

/* Body */
.invest-modal__body{
  padding:
    0 clamp(1rem, 4.6vw, 1.35rem)
    calc(env(safe-area-inset-bottom, 0px) + 1.25rem);

  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.invest-step{
  display: grid;
  gap: 0.95rem;
  padding-bottom: 0.2rem;
}

.invest-hint{
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

/* Panels */
.invest-panel{
  border-radius: var(--radius-xl);
  border: 2px solid var(--invest-card-border);
  background: var(--invest-card-bg);
  box-shadow: 0 14px 30px rgba(0,0,0,0.06);

  padding: clamp(1rem, 4.6vw, 1.35rem);
}

body[data-theme="dark"] .invest-panel{
  box-shadow: 0 18px 44px rgba(0,0,0,0.55);
}

.invest-panel__row{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.invest-panel__left{ min-width: 0; }

.invest-panel__title{
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: clamp(1.55rem, 6.7vw, 2.1rem);
  line-height: 1.05;
}

.invest-panel__sub{
  margin-top: 0.35rem;
  color: var(--muted);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

/* Chips */
.invest-chip{
  padding: 0.52rem 0.95rem;
  border-radius: var(--radius-pill);
  border: 2px solid var(--invest-chip-border);
  background: var(--invest-chip-bg);

  font-weight: 900;
  letter-spacing: -0.01em;
  font-size: 0.9rem;

  color: rgba(11, 36, 23, 0.78);
  white-space: nowrap;
}

body[data-theme="dark"] .invest-chip{
  color: rgba(234, 255, 244, 0.76);
}

.invest-chip--muted{
  background: rgba(255,255,255,0.22);
}

body[data-theme="dark"] .invest-chip--muted{
  background: rgba(255,255,255,0.06);
}

/* Amount input */
.invest-amount{
  display: flex;
  align-items: center;
  gap: 0.7rem;

  margin-top: 0.85rem;
  margin-bottom: 0.75rem;

  padding: 0.95rem 1rem;

  border-radius: var(--radius-lg);
  border: 2px solid var(--invest-card-border);
  background: rgba(255,255,255,0.72);

  box-shadow: 0 12px 24px rgba(0,0,0,0.04);
}

body[data-theme="dark"] .invest-amount{
  background: rgba(0,0,0,0.18);
  box-shadow: 0 18px 44px rgba(0,0,0,0.55);
}

.invest-amount__cur{
  font-weight: 900;
  opacity: 0.92;
}

.invest-amount__input{
  width: 100%;
  min-width: 0;

  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);

  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: clamp(1.2rem, 6vw, 1.65rem);
}

.invest-amount__input::placeholder{ color: var(--muted); }

/* Range override (track remainder like in mockup) */
.invest-range::-webkit-slider-runnable-track{
  background:
    var(--hero-grad) 0/var(--fill) 100% no-repeat,
    var(--invest-range-track);
}

.invest-range::-moz-range-track{ background: var(--invest-range-track); }
.invest-range::-moz-range-progress{ background: var(--hero-grad); }

.invest-limits{
  margin-top: 0.65rem;
  color: var(--muted);
  font-weight: 900;
  letter-spacing: -0.01em;
  font-size: 1.05rem;
}

/* CTA buttons */
.invest-modal__primary{
  width: 100%;
  margin-top: 0.8rem;

  padding: 1.25rem 1.25rem;
  border-radius: clamp(1.5rem, 6vw, 2.2rem);

  font-size: clamp(1.05rem, 4.8vw, 1.25rem);
  font-weight: 900;
}

.invest-modal__primary .btn__dot{
  width: 0.95rem;
  height: 0.95rem;
}

.invest-modal__back{
  width: 100%;
  margin-top: 0.7rem;

  padding: 1.05rem 1.25rem;
  border-radius: clamp(1.5rem, 6vw, 2.2rem);

  background: rgba(255,255,255,0.78);
  border: 2px solid var(--invest-card-border);
  color: var(--text);

  box-shadow: 0 12px 28px rgba(0,0,0,0.06);
  font-size: clamp(1.05rem, 4.8vw, 1.25rem);
  font-weight: 900;
}

body[data-theme="dark"] .invest-modal__back{
  background: rgba(7, 18, 12, 0.52);
  box-shadow: 0 18px 44px rgba(0,0,0,0.55);
}

.invest-modal__back:active{ transform: translateY(1px) scale(0.99); }
/* ===== Invest: full screen like nav-modal ===== */

/* на всякий случай: если где-то стили перебили hidden */
.invest-modal [hidden]{
  display: none !important;
}

.invest-modal{
  /* было: padding + justify-content:center; align-items:flex-end */
  padding: 0;               /* как в nav-modal :contentReference[oaicite:2]{index=2} */
  justify-content: stretch; /* растянуть панель */
  align-items: stretch;
}

.invest-modal__sheet{
  width: 100vw;     /* вместо min(94vw, 36rem) :contentReference[oaicite:3]{index=3} */
  max-width: none;
  height: 100dvh;
  max-height: 100dvh;
}
/* =========================
   Invest — mobile compact (requested)
   - Header title in 1 line
   - Hint/sub/limits/chips: Segoe Semibold
   - Smaller panels/amount/buttons, chosen block fits ~2 lines
========================= */

/* Header: "Инвестировать • Выбор тарифа/..." -> 1 line, smaller */
.invest-modal__title{
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;          /* было nowrap */
  white-space: normal;      /* было nowrap */
  overflow: visible;        /* было hidden */
  max-width: 100%;
  row-gap: 0.15rem;
}

.invest-modal__title-main,
.invest-modal__title-dot,
.invest-modal__title-step{
  min-width: 0;
}

.invest-modal__title-step{
  white-space: normal;      /* было nowrap */
  overflow: hidden;         /* чтобы работал line-clamp */
  text-overflow: clip;      /* без троеточия */
  overflow-wrap: anywhere;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;    /* максимум 2 строки */
}

/* Segoe Semibold targets */
.invest-hint,
.invest-panel__sub,
.invest-limits,
.invest-chip{
  font-family: "Segoe UI Semibold", "Segoe UI", "SegoeUI", system-ui, -apple-system, Roboto, sans-serif;
  font-weight: 600;
}

/* Make long subtexts not explode layout */
.invest-panel__sub{
  line-height: 1.15;
  overflow-wrap: anywhere;
}

/* Chips smaller (selected/amount/Confirm) */
.invest-chip{
  padding: 0.34rem 0.55rem;
  font-size: 0.78rem;
  border-width: 1px;
}

/* Base compact tweaks (all screens a bit) */
.invest-hint{ font-size: 0.9rem; }
.invest-limits{ font-size: 0.95rem; }

/* 4) Phone-specific tightening */
@media (max-width: 600px){

  /* Header smaller to fit in one line */
  .invest-modal__chrome{
    padding: 0.85rem 0.9rem;
    padding-bottom: 0.75rem;
  }

  .invest-modal__title{
    font-size: 1.18rem;   /* was clamp(1.65rem...) */
    line-height: 1.05;
  }

  .invest-modal__title-dot{
    margin: 0 0.25rem;
  }

  /* Panels smaller so chosen block fits ~2 lines */
  .invest-panel{
    padding: 0.85rem 0.9rem;
  }

  .invest-panel__row{
    gap: 0.6rem;
  }

  .invest-panel__title{
    font-size: 1.05rem;   /* was clamp(1.55rem...) */
    line-height: 1.06;
  }

  .invest-panel__sub{
    margin-top: 0.25rem;
    font-size: 0.9rem;
  }

  .invest-hint{
    font-size: 0.86rem;
  }

  /* Amount block smaller */
  .invest-amount{
    margin-top: 0.55rem;
    margin-bottom: 0.55rem;
    padding: 0.7rem 0.8rem;
    gap: 0.5rem;
    border-width: 1px;
  }

  .invest-amount__cur{
    font-size: 0.95rem;
    font-weight: 700;
  }

  .invest-amount__input{
    font-size: 1.18rem;  /* was clamp(1.2rem, 6vw, 1.65rem) */
    font-weight: 700;
    letter-spacing: -0.01em;
  }

  .invest-limits{
    margin-top: 0.5rem;
    font-size: 0.88rem;
  }

  /* Continue / Back smaller */
  .invest-modal__primary{
    margin-top: 0.65rem;
    padding: 0.92rem 1rem;
    border-radius: 1.35rem;
    font-size: 0.95rem;
    font-weight: 800;
  }

  .invest-modal__primary .btn__dot{
    width: 0.8rem;
    height: 0.8rem;
  }

  .invest-modal__back{
    margin-top: 0.55rem;
    padding: 0.82rem 1rem;
    border-radius: 1.35rem;
    font-size: 0.92rem;
    font-weight: 800;
    border-width: 1px;
  }
}

/* Extra-small phones */
@media (max-width: 360px){
  .invest-modal__title{ font-size: 1.08rem; }

  .invest-panel__title{ font-size: 1.0rem; }
  .invest-panel__sub{ font-size: 0.86rem; }

  .invest-chip{ font-size: 0.74rem; }

  .invest-modal__primary{ font-size: 0.92rem; padding: 0.88rem 0.95rem; }
  .invest-modal__back{ font-size: 0.9rem; padding: 0.78rem 0.95rem; }
}






/* ========================
   Withdraw Modal — базовая структура (аналогично invest)
   ======================== */

.withdraw-modal {
  position: fixed;
  inset: 0;
  z-index: 95;

  padding:
    calc(env(safe-area-inset-top, 0px) + clamp(0.75rem, 3.6vw, 1rem))
    clamp(0.85rem, 4vw, 1.25rem)
    calc(env(safe-area-inset-bottom, 0px) + clamp(0.85rem, 4vw, 1.25rem));

  display: flex;
  align-items: flex-end;
  justify-content: center;

  pointer-events: none;
  visibility: hidden;
}

.withdraw-modal.active {
  pointer-events: auto;
  visibility: visible;
}

.withdraw-modal__sheet {
  width: min(94vw, 36rem);
  height: 100%;
  max-height: 100%;

  border-radius: var(--nav-radius-panel);

  background: linear-gradient(180deg, var(--invest-sheet-bg, #f8fafc), var(--invest-sheet-bg-2, #e2e8f0));
  box-shadow: var(--invest-sheet-shadow, 0 20px 50px rgba(0,0,0,0.18));

  overflow: hidden;

  display: flex;
  flex-direction: column;

  transform: translateY(110%);
  opacity: 0;

  transition:
    transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 260ms ease;

  will-change: transform, opacity;
}

.withdraw-modal.active .withdraw-modal__sheet {
  transform: translateY(0);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .withdraw-modal__sheet { transition: none; }
}

/* Полноэкранный режим на мобильных (как у invest) */
.withdraw-modal {
  padding: 0;
  justify-content: stretch;
  align-items: stretch;
}

.withdraw-modal__sheet {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: 100dvh;
}

/* Header / Chrome */
.withdraw-modal__chrome {
  padding: clamp(1rem, 4.6vw, 1.35rem);
  padding-bottom: clamp(0.85rem, 4vw, 1.1rem);

  background: linear-gradient(180deg, var(--invest-sheet-bg, #f8fafc), var(--invest-sheet-bg-2, #e2e8f0));

  position: sticky;
  top: 0;
  z-index: 2;
}

.withdraw-modal__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.withdraw-modal__title {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: clamp(1.65rem, 7.4vw, 2.35rem);
  line-height: 1.06;
  color: var(--text);
}

.withdraw-modal__title-dot {
  margin: 0 0.35rem;
  opacity: 0.9;
}

.withdraw-modal__close {
  width: clamp(3.05rem, 12.5vw, 3.75rem);
  height: clamp(3.05rem, 12.5vw, 3.75rem);
  border-radius: var(--radius-btn);

  display: grid;
  place-items: center;

  background: rgba(255,255,255,0.78);
  border: 2px solid var(--invest-sheet-border, #cbd5e1);
  color: #000;

  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
  cursor: pointer;
}

body[data-theme="dark"] .withdraw-modal__close {
  background: rgba(15, 23, 42, 0.58);
  color: #ffffff;
  box-shadow: 0 18px 44px rgba(0,0,0,0.55);
}

.withdraw-modal__close:active {
  transform: translateY(1px) scale(0.99);
}

.withdraw-close-ico {
  width: 1.6rem;
  height: 1.6rem;
  display: block;
}

.withdraw-modal__rule {
  margin-top: clamp(0.85rem, 3.6vw, 1rem);
  border-bottom: 2px dashed var(--invest-rule, #94a3b8);
}

/* Body */
.withdraw-modal__body {
  padding:
    0 clamp(1rem, 4.6vw, 1.35rem)
    calc(env(safe-area-inset-bottom, 0px) + 1.25rem);

  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.withdraw-step {
  display: grid;
  gap: 0.95rem;
  padding-bottom: 0.2rem;
}

.withdraw-panel {
  border-radius: var(--radius-xl);
  border: 2px solid var(--invest-card-border, #e2e8f0);
  background: var(--invest-card-bg, #ffffff);
  box-shadow: 0 14px 30px rgba(0,0,0,0.06);

  padding: clamp(1rem, 4.6vw, 1.35rem);
}

body[data-theme="dark"] .withdraw-panel {
  box-shadow: 0 18px 44px rgba(0,0,0,0.55);
}

/* Остальные классы (panel__row, title, sub, chip, amount и т.д.) — копируем логику invest */

.withdraw-panel__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.withdraw-panel__left { min-width: 0; }

.withdraw-panel__title {
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: clamp(1.55rem, 6.7vw, 2.1rem);
  line-height: 1.05;
}

.withdraw-panel__sub {
  margin-top: 0.35rem;
  color: var(--muted);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.withdraw-chip {
  padding: 0.52rem 0.95rem;
  border-radius: var(--radius-pill);
  border: 2px solid var(--invest-chip-border, #cbd5e1);
  background: var(--invest-chip-bg, #f1f5f9);

  font-weight: 900;
  letter-spacing: -0.01em;
  font-size: 0.9rem;

  color: rgba(30, 58, 138, 0.85);
  white-space: nowrap;
}

body[data-theme="dark"] .withdraw-chip {
  color: rgba(224, 242, 254, 0.9);
}

.withdraw-chip--muted {
  background: rgba(255,255,255,0.22);
}

body[data-theme="dark"] .withdraw-chip--muted {
  background: rgba(255,255,255,0.06);
}

/* Amount / Address block */
.withdraw-amount,
.withdraw-address {
  display: flex;
  align-items: center;
  gap: 0.7rem;

  margin-top: 0.85rem;
  margin-bottom: 0.75rem;

  padding: 0.95rem 1rem;

  border-radius: var(--radius-lg);
  border: 2px solid var(--invest-card-border, #e2e8f0);
  background: rgba(255,255,255,0.72);

  box-shadow: 0 12px 24px rgba(0,0,0,0.04);
}

body[data-theme="dark"] .withdraw-amount,
body[data-theme="dark"] .withdraw-address {
  background: rgba(0,0,0,0.18);
  box-shadow: 0 18px 44px rgba(0,0,0,0.55);
}

.withdraw-amount__cur,
.withdraw-address__cur {
  font-weight: 900;
  opacity: 0.92;
}

.withdraw-amount__input,
.withdraw-address__input {
  width: 100%;
  min-width: 0;

  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);

  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: clamp(1.2rem, 6vw, 1.65rem);
}

.withdraw-amount__input::placeholder,
.withdraw-address__input::placeholder {
  color: var(--muted);
}

/* Range (для суммы вывода) */
.withdraw-range::-webkit-slider-runnable-track {
  background:
    var(--hero-grad) 0/var(--fill) 100% no-repeat,
    var(--invest-range-track, #e2e8f0);
}

.withdraw-range::-moz-range-track { background: var(--invest-range-track, #e2e8f0); }
.withdraw-range::-moz-range-progress { background: var(--hero-grad); }

.withdraw-limits {
  margin-top: 0.65rem;
  color: var(--muted);
  font-weight: 900;
  letter-spacing: -0.01em;
  font-size: 1.05rem;
}

.withdraw-limits--hint {
  font-size: 0.92rem;
  font-weight: 800;
}

/* Способ вывода */
.withdraw-method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.withdraw-method-tile {
  display: block;
  cursor: pointer;
  margin: 0;
}

.withdraw-method-tile__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.withdraw-method-tile__body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 0.8rem;
  border-radius: var(--radius-lg);
  border: 2px solid var(--invest-card-border, #e2e8f0);
  background: rgba(255, 255, 255, 0.65);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-height: 3.6rem;
}

.withdraw-method-tile__input:focus-visible + .withdraw-method-tile__body {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.withdraw-method-tile__input:checked + .withdraw-method-tile__body {
  border-color: rgba(0, 210, 106, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 210, 106, 0.12);
  background: rgba(0, 210, 106, 0.06);
}

.withdraw-method-tile__name {
  font-weight: 900;
  font-size: 0.88rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.withdraw-method-tile__hint {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.2;
}

body[data-theme="dark"] .withdraw-method-tile__body {
  background: rgba(0, 0, 0, 0.2);
}

/* Блок полей ниже способа — скрыт, пока не выбран метод */
.withdraw-fields-shell {
  margin-top: 1rem;
}

.withdraw-fields-shell[hidden] {
  display: none !important;
}

/* Поля карта / крипто */
.withdraw-fields {
  display: grid;
  gap: 0.75rem;
}

.withdraw-fields-shell > .withdraw-fields {
  margin-top: 0;
}

.withdraw-fields[hidden] {
  display: none !important;
}

.withdraw-field__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.withdraw-field__input,
.withdraw-field__select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.72rem 0.85rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--invest-card-border, #e2e8f0);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  font-weight: 800;
  font-size: 0.98rem;
}

.withdraw-field__input--mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88rem;
}

.withdraw-field__select {
  cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 1.1rem) 55%, calc(100% - 0.72rem) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

body[data-theme="dark"] .withdraw-field__input,
body[data-theme="dark"] .withdraw-field__select {
  background: rgba(0, 0, 0, 0.25);
}

/* Подтверждение вывода */
.withdraw-summary {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.85rem;
}

.withdraw-summary__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(0, 210, 106, 0.12);
}

.withdraw-summary__k {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--muted);
}

.withdraw-summary__v {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-align: right;
}

.withdraw-summary__block {
  display: grid;
  gap: 0.45rem;
}

.withdraw-summary__details {
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.45;
  color: var(--text);
  white-space: pre-line;
  word-break: break-word;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  background: rgba(0, 210, 106, 0.06);
  border: 1px solid rgba(0, 210, 106, 0.14);
}

body[data-theme="dark"] .withdraw-summary__details {
  background: rgba(0, 0, 0, 0.22);
}

/* Кнопки */
.withdraw-modal__primary {
  width: 100%;
  margin-top: 0.8rem;

  padding: 1.25rem 1.25rem;
  border-radius: clamp(1.5rem, 6vw, 2.2rem);

  font-size: clamp(1.05rem, 4.8vw, 1.25rem);
  font-weight: 900;
}

.withdraw-modal__primary .btn__dot {
  width: 0.95rem;
  height: 0.95rem;
}

.withdraw-modal__back {
  width: 100%;
  margin-top: 0.7rem;

  padding: 1.05rem 1.25rem;
  border-radius: clamp(1.5rem, 6vw, 2.2rem);

  background: rgba(255,255,255,0.78);
  border: 2px solid var(--invest-card-border, #e2e8f0);
  color: var(--text);

  box-shadow: 0 12px 28px rgba(0,0,0,0.06);
  font-size: clamp(1.05rem, 4.8vw, 1.25rem);
  font-weight: 900;
}

body[data-theme="dark"] .withdraw-modal__back {
  background: rgba(15, 23, 42, 0.52);
  box-shadow: 0 18px 44px rgba(0,0,0,0.55);
}

.withdraw-modal__back:active {
  transform: translateY(1px) scale(0.99);
}

/* Compact-версия для мобильных (аналогично invest) */
@media (max-width: 600px) {
  .withdraw-modal__chrome {
    padding: 0.85rem 0.9rem;
    padding-bottom: 0.75rem;
  }

  .withdraw-modal__title {
    font-size: 1.18rem;
    line-height: 1.05;
  }

  .withdraw-modal__title-dot {
    margin: 0 0.25rem;
  }

  .withdraw-panel {
    padding: 0.85rem 0.9rem;
  }

  .withdraw-panel__title {
    font-size: 1.05rem;
  }

  .withdraw-panel__sub {
    font-size: 0.9rem;
  }

  .withdraw-limits {
    font-size: 0.88rem;
  }

  .withdraw-amount,
  .withdraw-address {
    margin-top: 0.55rem;
    margin-bottom: 0.55rem;
    padding: 0.7rem 0.8rem;
    gap: 0.5rem;
    border-width: 1px;
  }

  .withdraw-amount__input,
  .withdraw-address__input {
    font-size: 1.18rem;
  }

  .withdraw-modal__primary,
  .withdraw-modal__back {
    margin-top: 0.65rem;
    padding: 0.92rem 1rem;
    border-radius: 1.35rem;
    font-size: 0.95rem;
  }
}


/* Принудительно восстанавливаем поведение hidden для withdraw-шагов */
.withdraw-modal .withdraw-step[hidden] {
  display: none !important;
}

/* Явно показываем только активный шаг */
.withdraw-modal .withdraw-step:not([hidden]) {
  display: grid !important;   /* ← замените на display: flex или display: block, если у вас другой layout */
}





.payment-method__card {
  flex: 1;
  min-width: 160px;
  cursor: pointer;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.payment-method__card:hover {
  border-color: #d1d5db;
  transform: scale(1.03);
}

.payment-method__card input[type="radio"]:checked + .payment-method__card-inner {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.payment-method__card-inner {
  padding: 16px 8px;
  border: 2px solid transparent;
  border-radius: 10px;
  transition: all 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
}

.payment-method__info {
  margin-left: 8px;
}

.payment-method__name {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--text);
}

.payment-method__desc {
  font-size: 13px;
  color: #6b7280;
}




.payment-method__card--disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #d1d5db !important;
    pointer-events: none;          /* отключает hover и клики */
}

.payment-method__card--disabled .payment-method__card-inner {
    color: #9ca3af;
}

.payment-method__card--disabled .payment-method__name {
    color: #9ca3af;
}

.payment-method__card--disabled .payment-method__desc {
    color: #d1d5db;
}





.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.modal img {
    max-width: 90%;
    max-height: 90%;
    position: relative; /* Для позиционирования крестика */
}

#close_button {
    position: absolute;
    top: 20px; /* Увеличен отступ сверху */
    right: 20px; /* Увеличен отступ справа */
    color: white;
    font-size: 24px;
    cursor: pointer;
    background-color: black; /* Черный фон */
    border-radius: 50%; /* Закругленный фон */
    padding: 5px; /* Отступы для лучшего вида */
    z-index: 100000; /* Обеспечить, чтобы крестик был выше других элементов */
}

.site-maintenance {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  background: rgba(3, 12, 8, 0.82);
  backdrop-filter: blur(10px);
}

.site-maintenance__panel {
  max-width: 420px;
  border-radius: 20px;
  padding: 28px 24px;
  background: linear-gradient(155deg, #0d1828 0%, #0a101c 100%);
  border: 1px solid rgba(18, 211, 119, 0.25);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.site-maintenance__badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #12d377;
  margin-bottom: 14px;
}

.site-maintenance__text {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
}

/* Оплата картой в Mini App: явная ссылка после создания счёта */
.invest-card-pay {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius-lg, 14px);
  border: 2px solid var(--invest-card-border, rgba(0, 0, 0, 0.08));
  background: rgba(255, 255, 255, 0.55);
}
body[data-theme="dark"] .invest-card-pay {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
}
.invest-card-pay__hint {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--muted);
  font-weight: 600;
}
.invest-card-pay__link {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  box-sizing: border-box;
}
.invest-card-pay__same {
  margin-top: 0.6rem;
  width: 100%;
  font-weight: 700;
}



