/* === Шрифты Museo Sans Cyrl === */
@font-face{
  font-family:"MuseoSansCyrl";
  src:url("/static/fonts/museo/museosanscyrl-100.otf") format("opentype");
  font-weight:100; font-style:normal; font-display:swap;
}
@font-face{
  font-family:"MuseoSansCyrl";
  src:url("/static/fonts/museo/museosanscyrl-300.otf") format("opentype");
  font-weight:300; font-style:normal; font-display:swap;
}
@font-face{
  font-family:"MuseoSansCyrl";
  src:url("/static/fonts/museo/museosanscyrl-500.otf") format("opentype");
  font-weight:500; font-style:normal; font-display:swap;
}
@font-face{
  font-family:"MuseoSansCyrl";
  src:url("/static/fonts/museo/museosanscyrl-700.otf") format("opentype");
  font-weight:700; font-style:normal; font-display:swap;
}
@font-face{
  font-family:"MuseoSansCyrl";
  src:url("/static/fonts/museo/museosanscyrl-900.otf") format("opentype");
  font-weight:900; font-style:normal; font-display:swap;
}

:root{
  --text:#0F172A;
  --muted:#6B7280;
  --chip:#DEE4EE;
  --today:#9CA3AF;
  --divider:#E5E7EB;
  --shadow:0 6px 20px rgba(0,0,0,.06);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background:#FFFFFF;
  color:var(--text);
  font-family:"MuseoSansCyrl", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

.app{
  max-width:420px;
  margin:0 auto;
  padding:0 16px 84px;
}

/* ===== Topbar ===== */
.topbar{
  width:100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 18px;
  display:flex;
  align-items:center;
  background:#3F3F46;
  border-radius:0 0 24px 24px; /* только снизу */
  padding:12px 16px;
  box-shadow:var(--shadow);
  overflow:hidden;
}
.avatar{
  width:48px; height:48px;
  border-radius:50%;
  object-fit:cover;
  margin-right:12px;
}
.fullname{
  flex:1;
  text-align:center;
  color:#fff;
  font-weight:500;
  font-size:20px;
  line-height:1;
}
.topbar .spacer{ width:48px; height:1px; }

/* ===== Title ===== */
.title{
  text-align:center;
  margin:20px 0 10px;
  font-size:22px;
  font-weight:500;
}

/* ===== Calendar ===== */
.calendar{
  background:#fff;
  border-radius:22px;
  box-shadow:var(--shadow);
  padding:12px;
}
.cal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:4px 2px 10px;
}
.cal-caption{ font-weight:300; font-size:18px; }

/* стрелки больше и без рамок */
.nav-btn{
  background:transparent;
  border:none;
  width:44px; height:44px;
  display:grid; place-items:center;
  padding:0;
}
.nav-btn img{ width:22px; height:22px; }

.dow-row{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:6px;
  color:var(--muted);
  font-size:12px;
  text-align:center;
  margin:0 2px 6px;
}
.days{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:8px 6px;
}
.day{
  display:grid; place-items:center;
  height:44px;
  border-radius:12px;
  font-weight:300;
}
.day.muted{ color:#94A3B8; }
.day.studied{ background:var(--chip); }
.day.today{ background:var(--today); color:#fff; }

/* анимация переключения месяцев */
.days.anim-left  { animation: slideLeft 180ms ease both; }
.days.anim-right { animation: slideRight 180ms ease both; }
@keyframes slideLeft  { from{opacity:.2; transform:translateX(12px)} to{opacity:1; transform:none} }
@keyframes slideRight { from{opacity:.2; transform:translateX(-12px)} to{opacity:1; transform:none} }

/* ===== Stats ===== */
.stats{
  margin:14px 0 16px;
  background:#fff;
  border-radius:22px;
  box-shadow:var(--shadow);
  padding:16px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:0;
}
.stat{
  background:transparent;
  border-radius:0;
  box-shadow:none;
  padding:10px 8px;
  text-align:center;
}
.stat-number{
  font-weight:500;
  font-size:30px;
  line-height:1;
}
.stat .percent{ font-size:.6em; font-weight:500; margin-left:2px; }
.stat-label{
  margin-top:6px;
  color:#6B7280;
  font-size:13px;
}

/* ===== Tabs ===== */
.tabs{
  position:fixed;
  left:0; right:0; bottom:0;
  background:#fff;
  border-top:1px solid var(--divider);
  display:flex; justify-content:space-around; align-items:center;
  padding:10px 8px env(safe-area-inset-bottom, 8px);
}
.tab{
  background:none; border:none; padding:6px 10px;
  display:flex; flex-direction:column; align-items:center; gap:4px;
  color:#6B7280;
  text-decoration:none;
}
.tab.active{ color:var(--text); }
.tab[aria-disabled="true"]{ opacity:.55; pointer-events:none; }
.tab-icon{ width:26px; height:26px; }
.tab span{ font-size:12px; font-weight:500; }

/* ===== SAVED PAGE (scoped) ===== */
.page-saved .topbar { min-height:72px; }          /* высота как с аватаром */
.page-saved .topbar .spacer { width:48px; flex:0 0 48px; }  /* как на профиле */
.page-saved .topbar .fullname{
  flex:1;
  text-align:center;
  color:#fff;
  font-weight:500;
  font-size:20px;
  line-height:1;
}

/* Поиск — прижат вправо, скругление 8, рамка/фон D9D9D9 @ 70% */
.page-saved .saved-toolbar{ display:flex; justify-content:flex-end; padding:14px 16px 4px; }
.page-saved .search-wrap{ position:relative; width:220px; max-width:60vw; }
.page-saved .search{
  height:36px; width:100%;
  border-radius:8px;
  border:1px solid rgba(217,217,217,0.7);
  background:rgba(217,217,217,0.7);
  padding:0 36px 0 12px;
  font-size:14px; outline:none;
}
.page-saved .search-ic{
  position:absolute; right:10px; top:50%; transform:translateY(-50%);
  width:18px; height:18px; opacity:.6;
}

/* Список карточек */
.page-saved .saved-list{ display:flex; flex-direction:column; gap:12px; padding:6px 16px 96px; }
.page-saved .saved-empty{ text-align:center; color:#6B7280; padding:24px 8px; }

/* Карточка — как в макете */
.page-saved .saved-card{
  background:#fff;
  border-radius:8px;                               /* radius 8 */
  border:0.5px solid rgba(0,0,0,0.5);              /* stroke 0.5 black */
  box-shadow:0 2px 8px rgba(0,0,0,0.06);           /* drop shadow */
  overflow:hidden;
}

/* Свернутый вид */
.page-saved .saved-head{
  width:100%;
  border:0;
  background:#fff;
  cursor:pointer;
  padding:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:nowrap;          /* запрет на перенос строк */
}

.page-saved .saved-head .row{
  display:flex;
  align-items:center;
  gap:16px;
  flex:1 1 auto;             /* строка тянется и сжимается */
  min-width:0;               /* позволяет сжиматься в WebKit */
}

.page-saved .word-en{
  font-family:"Museo","Museo Sans",system-ui,-apple-system,Segoe UI,Roboto,Arial;
  font-weight:500;
  font-size:20px;
  color:#000;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  min-width:0;
}

.page-saved .tr{
  font-family:"Museo","Museo Sans",system-ui,-apple-system,Segoe UI,Roboto,Arial;
  font-weight:500;
  font-size:12px;
  color:#6B7280;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  min-width:0;
}

.page-saved .icons{
  display:flex;
  align-items:center;
  gap:6px;
  flex:0 0 auto;             /* иконки фиксированной ширины, не переносятся */
  flex-shrink:0;
}
.page-saved .icon-btn{
  background:transparent;
  border:0;
  padding:6px;
  display:grid;
  place-items:center;
}
.page-saved .icon-btn img{ width:22px; height:22px; }

/* Развернутый вид — без дубля слова и sound */
.page-saved .saved-body{ display:none; border-top:1px solid #E5E7EB; background:#fff; padding:12px 14px 14px; }
.page-saved .saved-card.open .saved-body{ display:block; }

.page-saved .meta{ display:flex; align-items:center; gap:12px; margin-bottom:8px; }
.page-saved .pos{
  font-size:12px; color:#6B7280; border:1px solid #E5E7EB; border-radius:999px; padding:4px 10px;
}
.page-saved .ipa{ font-size:14px; color:#111827; font-weight:500; }

/* Примеры — слева */
.page-saved .examples{ margin:8px 0 0 18px; padding:0; }
.page-saved .examples li{ margin:6px 0; text-align:left; }

/* Табы — без перекраски активной иконки */
.page-saved .tabs .tab.active .tab-icon{ filter:none; }

/* ===== INDEX PAGE ===== */
.page-index .ix-wrap { padding:16px; max-width:720px; margin:0 auto; }

.page-index .ix-card{
  background:#fff;
  border-radius:16px;
  box-shadow:0 10px 24px rgba(0,0,0,0.06);
  padding:20px;
  margin-bottom:16px;
}

/* текст блока: Museo 500, 20px, чёрный */
.page-index .ix-text{
  font-family:"Museo","Museo Sans",system-ui,-apple-system,Segoe UI,Roboto,Arial;
  font-weight:500; font-size:20px; line-height:1.4; color:#000;
  user-select:text;
}

/* кликабельные английские слова */
.page-index .ix-word{
  cursor:pointer; border-radius:8px; padding:0 4px;
}
.page-index .ix-word.selected{
  background:#CED4DA;
}

/* кнопка Перевести / In English — как в макете */
.page-index .ix-btn{
  margin-top:16px;
  width:100%;
  background:#fff;
  color:#292D32;
  font-family:"Museo","Museo Sans",system-ui,-apple-system,Segoe UI,Roboto,Arial;
  font-weight:500; font-size:16px;
  border:0.5px solid #292D32;        /* stroke 0.5 */
  border-radius:12px;
  padding:12px 14px;
  box-shadow:0 4px 20px rgba(0,0,0,0.08);   /* drop shadow */
}

/* слот под карточку слова (реюзим .saved-card стили) */
.page-index .ix-word-slot{ margin-top:16px; }

/* ===== Index: hover/active для слов и кнопки ===== */

/* Ховеры только на устройствах с реальным hover (десктопы, тачпады) */
@media (hover: hover) and (pointer: fine) {
  .page-index .ix-word:hover{
    background:#F1F5F9;
  }
  .page-index .ix-btn:hover{
    background:#292D32;
    color:#fff;
  }
}

/* Актив/нажато — и для мобайла, и для десктопа */
.page-index .ix-word.pressed,
.page-index .ix-word:active{
  background:#E5E7EB;
}
.page-index .ix-btn.is-pressed,
.page-index .ix-btn:active{
  transform: translateY(1px);
  box-shadow:0 2px 12px rgba(0,0,0,0.08);
}

/* Плавность состояний */
.page-index .ix-word,
.page-index .ix-btn{
  transition: background-color .15s ease, color .15s ease, transform .1s ease, box-shadow .15s ease;
}

/* Кнопка в состоянии загрузки */
.page-index .ix-btn.loading{
  opacity:.85;
  pointer-events:none;
}
.page-index .ix-btn.loading .btn-inner{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}

/* Спиннер */
.btn-spinner{
  width:16px; height:16px;
  border-radius:50%;
  border:2px solid currentColor;
  border-top-color: transparent;
  animation: ixSpin .8s linear infinite;
}
@keyframes ixSpin {
  to { transform: rotate(360deg); }
}
/* ===== Hover для слов на index ===== */

/* Работает только на десктопах, где есть hover */
@media (hover: hover) and (pointer: fine) {
  .page-index .ix-word:hover {
    background: #F1F5F9;  /* светло-серый фон */
    cursor: pointer;
  }
}
/* Иконки в карточке слова кликабельны на странице index */
/* Index: клики по иконкам внутри saved-head */
.page-index .saved-head{
  position: relative;
  pointer-events: auto;           /* шапка клики не ловит */
}
.page-index .saved-head .icons,
.page-index .saved-head .icon-btn{
  pointer-events: auto;           /* а иконки ловят */
  cursor: pointer;
}
.page-index .saved-head .icon-btn img{
  pointer-events: none;           /* клик попадёт в кнопку, не в <img> */
}
.page-index .saved-head .icons{
  position: relative;
  z-index: 2;
}

/* ===== Sentence chunks on index ===== */
.sent-chunks{
  display:flex; flex-wrap:wrap; gap:8px; margin-top:8px;
}
.sent-chunk{
  display:inline-flex; align-items:baseline; gap:6px;
  background:#F8FAFC; border:1px solid #E5E7EB; border-radius:8px;
  padding:6px 8px; font-size:14px;
}
.sent-chunk b{ font-weight:600; }

/* ============= SETTINGS: выровнять с Saved ============= */
/* Saved: min-height:72px и spacer 48px — повторяем */
.page-settings .topbar { min-height:72px; }
.page-settings .topbar .spacer { width:48px; flex:0 0 48px; }

/* Контейнер */
:root { --tabs-h: 64px; } /* поправь, если таб-бар другой высоты */
.page-settings .settings-list{
  display:flex; flex-direction:column; gap:16px;
  padding:6px 16px calc(var(--tabs-h) + 16px); /* зазор над табами */
}

/* ============= Базовые кнопки: ниже и компактнее ============= */
.page-settings .set-item{
  display:flex; align-items:center; gap:12px;
  min-height:64px;                 /* меньше высота (было 75px) */
  padding:14px 16px;
  background:#fff; border-radius:8px;
  border:0.5px solid rgba(0,0,0,.5);
  box-shadow:0 2px 8px rgba(0,0,0,.06);
}
.page-settings a.set-item{ text-decoration:none; color:inherit; }
.page-settings a.set-item:visited{ color:inherit; }

/* Иконки у кнопок — меньше */
.page-settings .set-ic{ width:20px; height:20px; flex:0 0 20px; }

/* Тайтлы кнопок — меньше */
.page-settings .set-title{
  font-weight:500; font-size:17px;   /* было 18/20 */
  line-height:1.1; color:var(--text,#111);
}

.level-note{
  margin-left:auto;           /* уедет вправо */
  font-family:"MuseoSansCyrl";
  font-weight:300;
  font-size:14px;
  line-height:1;
  color:#9CA3AF;
}

/* Manage Payment — показывать/прятать тело (если вдруг базовые стили не подтянулись) */
#managePaymentCard[aria-expanded="false"] #managePaymentBody { display: none; }
#managePaymentCard[aria-expanded="true"]  #managePaymentBody { display: block; }

/* В раскрытом состоянии скрываем метку срока в шапке */
#managePaymentCard[aria-expanded="true"] .level-note { display: none; }

/* ============= Referral: одна карточка + внутренняя рамка ============= */
.page-settings .ref-card{
  background:#fff; border-radius:8px;
  border:0.5px solid rgba(0,0,0,.5);
  box-shadow:0 2px 8px rgba(0,0,0,.06);
  overflow:hidden;
}
.page-settings .ref-card .ref-head{
  width:100%; display:flex; align-items:center; gap:12px;
  min-height:64px; padding:14px 16px;  /* как у остальных */
  background:transparent; border:0; cursor:pointer;
}

/* Шеврон: скрыт в закрытом состоянии; в открытом — вверх */
.page-settings .ref-card .caret{ display:none; }
.page-settings .ref-card[aria-expanded="true"] .caret{
  display:block; margin-left:auto; width:20px; height:20px; 
  transform:rotate(180deg); transition:transform .2s ease;
}

/* Внутренний блок с рамкой вокруг текста и поля кода (#9CA3AF, 0.5px) */
.page-settings .ref-card .ref-body{
  display:none; position:relative; padding:14px;
}
.page-settings .ref-card[aria-expanded="true"] .ref-body{ display:block; }
.page-settings .ref-card .ref-body::before{
  content:""; position:absolute; z-index:0; inset:6px;
  border:0.5px solid #9CA3AF; border-radius:8px; background:transparent;
}
.page-settings .ref-text,
.page-settings .ref-code{ position:relative; z-index:1; }

/* Текст внутри рамки */
.page-settings .ref-text{
  margin:6px 6px 10px;              /* отступы от рамки */
  font-weight:300; font-size:15px; color:var(--text,#111);
}

/* Поле кода — ниже и по центру */
.page-settings .ref-code{
  height:36px; border-radius:8px;
  background:rgba(222,228,238,.7);  /* DEE4EE @70% */
  display:flex; align-items:center; justify-content:space-between;
  padding:0 10px 0 12px; margin:0 6px 6px;
  font-weight:300; font-size:15px;
}
.page-settings .ref-code .code{
  flex:1; text-align:center; user-select:all; letter-spacing:.3px;
}

/* Копировать — ещё компактнее */
.page-settings .copy-btn{ background:none; border:0; padding:4px; margin:0; cursor:pointer; }
.page-settings .copy-btn img{ width:14px; height:14px; }

/* ============= How to use Engify: большие отступы ============= */
.page-settings #btnHow{
  min-height:40px;
  margin-top:150px;      /* ЕЩЁ больше зазор после Referral */
  margin-bottom:38px;   /* отступ до таб-бара */
}

/* ===== SUBSCRIPTION (цельный блок) ===== */
.page-subscription .topbar { min-height:72px; }
.page-subscription .topbar .spacer { width:48px; flex:0 0 48px; }

/* компоновка: прижать контент к низу с зазором над табами */
.page-subscription .app{
  min-height:100dvh;
  display:flex; flex-direction:column;
}
.page-subscription .sub-wrap{
  flex:1;
  display:flex; flex-direction:column; justify-content:flex-end;
  padding:0 16px calc(84px + 12px);
  max-width:420px; margin:0 auto;
}

/* заголовок/линия скрыты */
.page-subscription .sub-title,
.page-subscription .sub-divider{ display:none; }

/* список преимуществ */
.page-subscription .sub-features{
  list-style:disc; padding-left:28px; margin:0 0 14px;
}
.page-subscription .sub-features li{
  font-weight:500; font-size:18px; color:#0F172A; margin:8px 0;
}

/* карточки тарифов */
.page-subscription .sub-card{
  background:#fff; border-radius:8px;
  border:.5px solid #292D32;
  box-shadow:0 2px 8px rgba(0,0,0,.06);
  min-height:75px; padding:12px 16px;
  position:relative;
  display:flex; align-items:center; justify-content:center;
  gap:8px; /* ближе к "-65%" */
  margin-bottom:12px; color:inherit; text-decoration:none;
}
.page-subscription .plan-left{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  line-height:1.1; margin:0;
}
.page-subscription .plan-left .p-name{ font-weight:500; font-size:16px; }
.page-subscription .plan-left .p-price{ font-weight:500; font-size:20px; margin-top:6px; }

/* бейдж процента не смещает центр */
.page-subscription .plan-badge{
  font-weight:500; font-size:20px; color:#9CA3AF;
  position:absolute; right:16px; top:50%; transform:translateY(-50%);
}

/* промокод */
.page-subscription .promo{
  height:40px; border-radius:8px;
  background:rgba(222,228,238,.7); /* DEE4EE @70% */
  display:flex; align-items:center; justify-content:space-between;
  padding:0 10px 0 12px; margin:6px 0 4px; position:relative;
}
.page-subscription .promo input{
  flex:1; height:100%; border:0; outline:0; background:transparent;
  font-family:"MuseoSansCyrl",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  font-weight:300; font-size:16px; color:#0F172A;
}
.page-subscription .promo input::placeholder{ color:#0F172A; opacity:.6; }
.page-subscription .promo .apply{
  background:none; border:0; padding:0; margin-left:8px; cursor:pointer;
  text-decoration:underline; font-weight:500; font-size:16px; color:#9CA3AF;
}

/* состояния (инпут остаётся активным) */
.page-subscription .promo.ok,
.page-subscription .promo.err{ justify-content:center; }
.page-subscription .promo.ok .apply,
.page-subscription .promo.err .apply{ display:none; }
.page-subscription .promo.ok input,
.page-subscription .promo.err input{ text-align:center; }

/* сообщения под полем */
.page-subscription .promo-msg{
  font-weight:500; font-size:18px; text-align:center; margin:6px 0 10px; display:none;
}
.page-subscription .promo-msg.show{ display:block; }
.page-subscription .promo-msg.ok{ color:#4BC477; }
.page-subscription .promo-msg.err{ color:#CB808E; }
/* цвета текста в инпуте при состояниях */
.page-subscription .promo.ok  input{ color:#4BC477; }
.page-subscription .promo.err input{ color:#CB808E; }

/* ===== Offer link under promo ===== */
.offer-link{
  background:none; border:0; padding:0;
  font-family:"MuseoSansCyrl",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  font-weight:500; font-size:14px; line-height:1.2;
  color:#9CA3AF; text-decoration:underline; cursor:pointer;
  display:block;
  margin:8px auto 0;   /* центрирует как блок */
  text-align:center;   /* текст внутри по центру */
}

/* Строка согласия */
.agree-sub{
  display:flex;
  align-items:center;        /* чекбокс и текст по вертикали посередине */
  gap:10px;
  margin:12px 0 6px;
  font-size:14px;
  line-height:1.35;
  color:#9CA3AF;             /* цвет текста */
}
.agree-sub.center{           /* по центру контейнера (горизонтально) */
  justify-content:center;
}
.agree-sub span{ color:#9CA3AF; }

/* Кастомный чекбокс: белый фон, галочка #6B7280, размер крупнее */
.agree-sub input[type="checkbox"]{
  -webkit-appearance:none;
  appearance:none;
  width:20px;
  height:20px;
  min-width:20px;
  border:1.5px solid #9CA3AF;
  border-radius:6px;
  background:#fff;           /* белая заливка */
  display:grid;
  place-content:center;
  cursor:pointer;
  outline:none;
}
.agree-sub input[type="checkbox"]::after{
  content:"";
  width:12px;                /* размер галочки внутри */
  height:12px;
  transform:scale(0);
  transition:transform .12s ease;
  background:no-repeat center/contain;
}
.agree-sub input[type="checkbox"]:checked{
  border-color:#6B7280;
  background:#fff;           /* белый фон остаётся */
}
.agree-sub input[type="checkbox"]:checked::after{
  transform:scale(1);
  /* галочка цвета #6B7280 (SVG-иконка) */
  background-image:url('data:image/svg+xml;utf8,\
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">\
<path fill="%236B7280" d="M6.2 11.6L2.9 8.3l1.4-1.4 1.9 1.9 5-5L12.6 5z"/>\
</svg>');
}
/* аккуратный фокус */
.agree-sub input[type="checkbox"]:focus-visible{
  box-shadow:0 0 0 3px #6B728022;
  border-color:#6B7280;
}


/* ===== Modal (Оферта) ===== */
.modal{ 
  position:fixed; inset:0; z-index:1000; display:none;
  font-family:"MuseoSansCyrl",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}
.modal.open{ display:block; }
.modal-backdrop{
  position:absolute; inset:0; background:rgba(0,0,0,.35);
}
.modal-dialog{
  position:absolute; left:50%; top:50%;
  transform:translate(-50%,-50%);
  width:min(92vw, 720px);
  max-height:80vh; overflow:auto;
  background:#fff; border-radius:10px; box-shadow:var(--shadow);
  padding:18px 16px 20px;
}
.modal-title{
  margin:0 28px 8px 0;
  font-weight:500; font-size:18px; color:#0F172A;
}
.modal-close{
  position:absolute; right:10px; top:10px;
  background:none; border:0; font-size:18px; line-height:1;
  color:#9CA3AF; cursor:pointer;
}
.modal-content{
  font-weight:300; font-size:14px; color:#0F172A;
}
.modal-content h3{
  margin:14px 0 6px; font-weight:500; font-size:16px; color:#0F172A;
}
.modal-content p{ margin:8px 0; }
.modal-content ol{ margin:6px 0 10px 18px; padding:0; }
.modal-content li{ margin:4px 0; }


/* ==================== HOWTOUSE (mobile clean circle) ==================== */

.howuse-page{ background:#fff; -webkit-overflow-scrolling:touch; }

.howuse{
  max-width:360px; margin:0 auto;
  padding:16px 14px calc(64px + env(safe-area-inset-bottom,16px));
  color:#111827; font-weight:500; font-size:20px; line-height:1.4;
}

.howuse h1{ margin:12px 0 12px; font-size:20px; line-height:1.3; font-weight:500; }
.howuse p{ margin:10px 0; }
.howuse .note{ margin-top:8px; font-size:16px; color:#6B7280; }
.howuse .final{ text-align:center; margin:28px 0 0; }

.logo-ring{ width:64px; height:64px; border-radius:50%; border:1px solid #9CA3AF; overflow:hidden; }
.logo-ring img{ width:100%; height:100%; object-fit:cover; }
.logo-ring.hero{ width:140px; height:140px; margin:8px auto 12px; }

.block{ margin:14px 0; }
.sep{ border:0; border-top:1px solid #9CA3AF; margin:20px 0; }

/* === КРУГ С ОДНИМ ОБОДКОМ и ВНУТРЕННИМ «ВОЗДУХОМ» ===
   Никаких псевдо-элементов. Внутри padding создаёт зазор, видео в круглой маске.
*/
:root{
  --circle-d: 380px;   /* диаметр круга (можешь 400) */
  --circle-gap: 16px;  /* «воздух» между ободком и видео */
}

.video-circle{
  width:var(--circle-d);
  height:var(--circle-d);
  margin:12px auto;
  padding:var(--circle-gap);    /* зазор ВНУТРИ круга */
  border:1px solid #9CA3AF;     /* единственный видимый круг */
  border-radius:50%;
  box-sizing:border-box;
  background:transparent;       /* чтобы «воздух» был цветом страницы */
}

/* круглая маска для видео */
.video-window{
  width:100%; height:100%;
  border-radius:50%;
  overflow:hidden;              /* обрезаем контент по кругу */
  background:#000;              /* фон под видео (как в телеге) */
}

/* видео целиком, без обрезки */
.video-window video{
  width:100%; height:100%;
  display:block;
  object-fit:contain;           /* ничего не режем */
  object-position:center;
}

/* чуть больше на шире 480 */
@media (min-width:480px){
  .howuse{ max-width:420px; }
  :root{ --circle-d: 400px; }
}
