/* ═══════════════════════════════════════════════════════════
   ИНА Клуб — приложението на клиента.

   Една кодова база, две усещания. Разликите между iOS и Android
   са само там, където потребителят наистина ги усеща: шрифт,
   заглавие, форма и лента отдолу. Всичко останало е общо.

   Телефон на първо място. Няма таблетни изгледи — това се държи
   в ръка.
   ═══════════════════════════════════════════════════════════ */

:root {
  --brand: #e53935;
  --brand-dark: #c62828;
  --brand-soft: #fdecea;
  --brand-ring: #f5c6c4;
  --bg: #f6f4f0;
  --surface: #ffffff;
  --fg: #1a1a1a;
  --fg-muted: #5a5a5a;
  --fg-subtle: #8a8a8a;
  --border: #e8e4dd;
  --border-strong: #d9d4cb;
  --ok: #2e7d32;

  /* Заглавията и числата са с фирмения шрифт от brand.css — той има
     кирилица, за разлика от Poppins и Bebas в магазина. Текстът остава
     на системния шрифт: така приложението изглежда свое на всяка
     платформа, а брандът се носи от заглавията. */
  --font-display: 'INA Display', 'Oswald', system-ui, sans-serif;
  --font-brand: 'INA Text', system-ui, sans-serif;
  --radius: 16px;
  --tabbar-h: 64px;

  --font-sys: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
              'Helvetica Neue', Arial, sans-serif;
}

/* Android обича малко по-квадратни форми и по-плътни ленти */
[data-platform="android"] { --radius: 14px; --tabbar-h: 62px; }
[data-platform="ios"]     { --radius: 18px; --tabbar-h: 68px; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  color: var(--fg);
  font-family: var(--font-sys);
  font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

/* Височината на екрана в мобилен браузър се мени, докато адресната лента
   се скрива и показва. 100vh е ГОЛЯМАТА стойност, затова с нея долният
   край на съдържанието изпада под видимото. dvh следи истинската височина;
   vh остава за старите браузъри. */
html { height: 100vh; height: 100dvh; background: #0a0504; }
/* Тялото остава прозрачно — иначе покрива снимката отдолу */
body { min-height: 100vh; min-height: 100dvh; background: transparent; }

body {
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-top: env(safe-area-inset-top);
}
/* На входа лентата с разделите я няма — да не пази място за нея */
[data-screen="signin"] body { padding-bottom: env(safe-area-inset-bottom); }

/* ── Фонът на бранда — същият като в играта ────────────────
   Тъмна основа, снимката бавно се движи, отгоре тъмен воал.
   Стои неподвижно зад съдържанието; белите панели плуват върху него. */
/* Слой 0 е фонът, слой 1 е съдържанието. Без отрицателни стойности —
   с тях слоят пада зад фона на страницата и снимката изчезва. */
.app-bg {
  position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
}
.app-bg i {
  position: absolute; inset: -4%;
  background: var(--ina-bg) center / cover no-repeat;
  animation: app-drift 56s cubic-bezier(.4,0,.2,1) infinite alternate;
}
.app-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(52,15,13,.16) 0%, rgba(18,6,5,.44) 52%, rgba(8,3,3,.74) 100%),
    radial-gradient(128% 96% at 50% 40%, rgba(8,3,3,0) 0%, rgba(6,2,2,.58) 80%);
}
@keyframes app-drift {
  from { transform: scale(1) translate3d(0,0,0); }
  to   { transform: scale(1.05) translate3d(-1%,-.8%,0); }
}

/* Текстът, който стои ВЪРХУ фона, а не в бял панел, става светъл */
.screen-head h1 { color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.45); }
.screen-head p { color: rgba(255,255,255,.82); text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.section-title { color: rgba(255,255,255,.72); text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.empty { color: rgba(255,255,255,.66); }
.section > p { color: rgba(255,255,255,.6) !important; }

h1, h2, h3 {
  font-family: var(--font-display); font-weight: 700;
  letter-spacing: .005em; margin: 0; text-transform: uppercase;
}
/* Oswald е тесен и висок — на главните заглавия стои по-добре леко разреден */
.screen-head h1 { letter-spacing: .02em; }

/* ── Лента „демо“ ─────────────────────────────────────────── */
.demo-ribbon {
  position: sticky; top: 0; z-index: 40;
  background: #1a1a1a; color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  text-align: center; padding: 7px 12px;
}
.demo-ribbon[hidden] { display: none; }

/* ── Екран ────────────────────────────────────────────────── */
.view { padding: 0 0 14px; position: relative; z-index: 1; }

/* Отгоре се пести най-много: на телефон с 667 пиксела всеки ред,
   похабен за въздух, изтласква съдържание под видимото. */
.screen-head { padding: 10px 16px 6px; }
.screen-head h1 { font-size: 23px; line-height: 1.12; }
.screen-head p { color: var(--fg-subtle); font-size: 13.5px; margin: 3px 0 0; }

[data-platform="ios"] .screen-head h1 { font-size: 27px; }
[data-platform="android"] .screen-head { padding-top: 13px; }
[data-platform="android"] .screen-head h1 { font-size: 21px; }

.section { padding: 0 16px; }
.section + .section { margin-top: 14px; }
.section-title {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--fg-subtle); font-weight: 700; margin: 0 0 6px;
}

/* ── Карти (панели) ───────────────────────────────────────── */
.panel {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); padding: 16px;
}
[data-platform="android"] .panel { border: none; box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* ── Голямата карта с баркода ─────────────────────────────── */
/* ── Картата: същият език като играта — червено фолио, розетка като
   воден знак, един мек отблясък и нищо, което мига. ── */
.memcard {
  margin: 2px 16px 0; border-radius: 20px; overflow: hidden;
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff; box-shadow: 0 12px 30px rgba(198,40,40,.30);
  position: relative;
}
/* розетката от логото, едва загатната в ъгъла */
.memcard::before {
  content: ''; position: absolute; top: -34px; right: -46px;
  width: 210px; height: 210px; opacity: .16; pointer-events: none;
  background: var(--ina-swirl) center/contain no-repeat;
}
.memcard::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 70% at 22% -6%, rgba(255,255,255,.26), transparent 58%);
}
.memcard-top { display: flex; align-items: center; gap: 11px; padding: 14px 15px 0; position: relative; }
.memcard-logo {
  width: 40px; height: 40px; flex: 0 0 auto;
  background: var(--ina-logo) center/contain no-repeat;   /* бяло, с прозрачност */
}
.memcard-name { font-family: var(--font-display); font-weight: 600; font-size: 16px; line-height: 1.15; letter-spacing: .01em; }
.memcard-sub { font-size: 12px; opacity: .85; }
.memcard-balance { margin-left: auto; text-align: right; }
.memcard-balance b {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: 27px; line-height: 1; letter-spacing: .01em;
}
.memcard-balance span { font-size: 10px; opacity: .85; text-transform: uppercase; letter-spacing: .1em; }

.memcard-progress { padding: 11px 15px 0; position: relative; }
.progress-track { height: 7px; border-radius: 999px; background: rgba(255,255,255,.28); overflow: hidden; }
.progress-track i { display: block; height: 100%; background: #fff; border-radius: 999px; transition: width .5s ease; }
.progress-label { font-size: 12.5px; margin-top: 6px; opacity: .95; }

/* Баркодът е бял правоъгълник — така се сканира най-лесно.
   Височината му е долната граница за уверено сканиране; свива се
   всичко около него, но не и той. */
.memcard-code { margin: 12px; background: #fff; border-radius: 12px; padding: 10px 10px 7px; position: relative; }
.memcard-code svg { width: 100%; height: 68px; display: block; }
.memcard-code .num {
  text-align: center; margin-top: 5px; color: #1a1a1a;
  font: 600 17px var(--font-display); letter-spacing: .2em;
  font-variant-numeric: tabular-nums;
}
.memcard-hint { text-align: center; font-size: 11.5px; opacity: .88; padding: 0 16px 12px; position: relative; line-height: 1.35; }

/* ── Списъци ──────────────────────────────────────────────── */
.list { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }
[data-platform="android"] .list { border: none; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.row {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px; border-bottom: 1px solid var(--border);
}
.row:last-child { border-bottom: none; }
.row-ico {
  width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); font-size: 18px;
}
.row-main { flex: 1; min-width: 0; }
.row-main b { display: block; font-weight: 600; font-size: 15px; }
.row-main span { display: block; color: var(--fg-subtle); font-size: 13px; margin-top: 1px; }
.row-end { text-align: right; font-size: 14px; font-weight: 600; white-space: nowrap; }
.row-end small { display: block; font-weight: 400; color: var(--fg-subtle); font-size: 12px; }

/* ── Оферти: кампании и пакети ────────────────────────────── */
.offer-mine {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(150deg, var(--brand), var(--brand-dark));
  color: #fff; border-radius: var(--radius); padding: 16px;
  box-shadow: 0 8px 22px rgba(198,40,40,.26); position: relative; overflow: hidden;
}
.offer-mine::before {
  content: ''; position: absolute; top: -40px; right: -40px; width: 150px; height: 150px;
  background: var(--ina-swirl) center/contain no-repeat; opacity: .18; pointer-events: none;
}
.offer-mine-ico { font-size: 30px; line-height: 1; position: relative; }
.offer-mine b { display: block; font-family: var(--font-display); font-size: 17px; letter-spacing: .01em; position: relative; }
.offer-mine span { display: block; font-size: 13.5px; opacity: .92; margin-top: 3px; position: relative; }

.offer-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 15px 16px; margin-bottom: 12px;
}
[data-platform="android"] .offer-card { border: none; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.offer-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.offer-card-head b {
  flex: 1; min-width: 0; font-family: var(--font-display);
  font-size: 17px; letter-spacing: .01em; line-height: 1.2;
}
.offer-card p { margin: 0; font-size: 14px; color: var(--fg-muted); line-height: 1.5; }
.offer-foot { font-size: 12.5px; color: var(--fg-subtle); margin-top: 10px; }

/* Кампанията носи тънка червена ивица отляво — личи от списъка */
.offer-campaign { border-left: 3px solid var(--brand); }

/* Пакетът е по-„продуктов“: списък и две цени */
.offer-items { margin: 10px 0 0; padding: 0; list-style: none; }
.offer-items li {
  font-size: 13.5px; color: var(--fg-muted); padding: 4px 0 4px 18px; position: relative;
}
.offer-items li::before {
  content: ''; position: absolute; left: 4px; top: 12px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--brand);
}
.offer-prices { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.offer-prices s { color: var(--fg-subtle); font-size: 14px; }
.offer-prices b { font-family: var(--font-display); font-size: 26px; color: var(--brand); letter-spacing: .01em; }
.offer-save { font-size: 12.5px; font-weight: 700; color: var(--ok); }

/* ── Значки ───────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 4px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700;
  background: var(--brand-soft); color: var(--brand-dark);
}
.badge-ok { background: #e8f5e9; color: var(--ok); }
.badge-mute { background: var(--bg); color: var(--fg-subtle); }

/* Стъпките за iPhone: номерирани, защото са ред, а не списък */
.install-steps { margin: 0; padding-left: 20px; }
.install-steps li { margin-bottom: 10px; line-height: 1.55; }
.install-steps b { font-weight: 700; }

/* Редът за препоръки: тих на главния екран, но го има */
.refer-row { text-decoration: none; color: inherit; }
.refer-row:active { background: var(--bg); }

/* ── Отброяване на ваучера ─────────────────────────────────
   Ваучер за 30 минути с ЗАМРЪЗНАЛ надпис обещава време, което
   вече го няма. Последните пет минути се виждат. */
.left { display: block; font-variant-numeric: tabular-nums; }
.left.is-soon { color: var(--brand); font-weight: 700; }
.left.is-gone { color: var(--fg-subtle); text-decoration: line-through; }

/* ── Спечелена награда ─────────────────────────────────────
   Печели се на КАСАТА; телефонът научава при изравняване. Този
   екран прави момента видим, вместо да мине като ред в списък. */
.win {
  position: fixed; inset: 0; z-index: 960;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(20, 18, 16, .62);
}
.win-card {
  background: var(--surface); border-radius: 22px; padding: 30px 26px 24px;
  text-align: center; max-width: 21rem; width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
  animation: win-in .28s cubic-bezier(.2,.9,.3,1.2);
}
.win-ico { font-size: 52px; line-height: 1; margin-bottom: 10px; }
.win-card b { display: block; font: 700 22px/1.2 var(--font-display); margin-bottom: 8px; }
.win-card p { margin: 0; color: var(--fg-muted); font-size: 15px; line-height: 1.55; }
.win-soon {
  margin-top: 14px; padding: 12px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand-dark);
}
.win-soon span { display: block; font-size: 13.5px; }
.win-soon b {
  display: block; font: 700 22px/1.2 var(--font-display);
  margin: 2px 0 0; font-variant-numeric: tabular-nums;
}
.win-card .btn { margin-top: 18px; }
@keyframes win-in { from { opacity: 0; transform: scale(.9) translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .win-card { animation: none; } }

/* ── Картата на цял екран ──────────────────────────────────
   Единствената задача тук е скенерът да прочете от първия път.
   Затова: чисто бяло, максимален контраст, свободно поле около
   баркода и нищо друго на екрана. */
.showcard {
  position: fixed; inset: 0; z-index: 950;
  background: #fff;                 /* НЕ var(--surface): тъмната тема пречи на скенера */
  display: flex; flex-direction: column; justify-content: center;
  padding: 20px; gap: 22px;
  color: #111;
}
.showcard-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; font-size: 13.5px; color: #666;
}
.showcard-x {
  width: 40px; height: 40px; border: none; background: none;
  font-size: 20px; color: #666; cursor: pointer; line-height: 1;
}

/* Тихата зона около баркода не е украса: без нея скенерът реже краищата */
.showcard-code { padding: 22px 18px; background: #fff; }
/* Едър, но не проточен: скенерът иска ширина и тиха зона, не височина */
.showcard-code svg { width: 100%; height: auto; max-height: 38vh; display: block; margin: 0 auto; }
.showcard-num {
  display: block; width: 100%; margin-top: 18px;
  border: none; background: none; cursor: pointer;
  font: 700 clamp(26px, 8vw, 40px)/1.1 var(--font-mono, ui-monospace, monospace);
  letter-spacing: .12em; color: #111; font-variant-numeric: tabular-nums;
}
.showcard-num.copied { color: var(--ok); }

.showcard-foot { text-align: center; color: #555; }
.showcard-foot b { display: block; font-size: 17px; color: #111; margin-bottom: 4px; }
.showcard-foot span { font-size: 13.5px; }

/* Докато картата е отворена, отдолу не бива да се вижда нищо */
[data-showcard] body { overflow: hidden; }
[data-showcard] .tabbar, [data-showcard] #demoRibbon { display: none; }

/* ── Покана за известия ───────────────────────────────────
   Не е тревога и не е реклама: една стъпка, която човекът може
   да откаже. Затова е в цветовете на марката, но приглушено,
   и с × отдясно, който я маха завинаги. */
.nudge {
  position: relative; display: flex; gap: 13px; padding: 16px 16px 17px;
  background: var(--brand-soft); border-radius: var(--radius);
}
.nudge-ico { font-size: 21px; line-height: 1.2; flex: none; }
.nudge-main { min-width: 0; }
.nudge-main b { display: block; font-size: 15.5px; color: var(--brand-dark); }
.nudge-main span {
  display: block; margin-top: 3px; padding-right: 18px;
  font-size: 13.5px; line-height: 1.5; color: var(--fg-muted);
}
.nudge-go { height: 46px; margin-top: 12px; font-size: 15px; }
.nudge-x {
  position: absolute; top: 6px; right: 6px; width: 34px; height: 34px;
  border: none; background: none; cursor: pointer;
  font-size: 20px; line-height: 1; color: var(--fg-subtle);
}

/* ── Бутони ───────────────────────────────────────────────── */
.btn {
  display: block; width: 100%; border: none; cursor: pointer;
  height: 52px; border-radius: 14px; margin-top: 10px;
  background: var(--brand); color: #fff;
  font: 700 16px var(--font-sys);
}
.btn:active { transform: scale(.985); }
/* Бутон, направен от връзка: без подчертаване, текстът остава бял */
a.btn { text-decoration: none; text-align: center; line-height: 52px; }
.btn-ghost { background: var(--bg); color: var(--fg); }
.btn-quiet { background: none; color: var(--fg-subtle); height: 44px; font-weight: 600; }
/* Изтриването на профила: видимо е, но не приканва. Затова е
   очертано, не запълнено, и стои под изхода, а не над него. */
.btn-ghost.btn-danger {
  background: none;
  color: var(--brand);
  box-shadow: inset 0 0 0 1px currentColor;
  margin-top: 10px;
}
.btn-ghost.btn-danger:active { background: rgba(229, 57, 53, .07); }
[data-platform="ios"] .btn { border-radius: 14px; }
[data-platform="android"] .btn { border-radius: 10px; text-transform: none; letter-spacing: .01em; }

.input {
  width: 100%; height: 52px; padding: 0 15px; margin-top: 8px;
  border: 1px solid var(--border-strong); border-radius: 12px;
  background: #fff; font: 16px var(--font-sys); color: var(--fg);
}
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); }
.field-label { font-size: 13px; font-weight: 600; color: var(--fg-muted); margin-top: 14px; }

/* ── Превключвател ────────────────────────────────────────── */
.switch { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.switch:last-child { border-bottom: none; }
.switch-main { flex: 1; }
.switch-main b { display: block; font-size: 15px; font-weight: 600; }
.switch-main span { display: block; font-size: 13px; color: var(--fg-subtle); margin-top: 2px; }
.knob {
  width: 52px; height: 31px; border-radius: 999px; background: #d4d0c8;
  position: relative; flex: 0 0 auto; border: none; cursor: pointer; transition: background .2s;
}
.knob::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s;
}
.knob.on { background: var(--ok); }
.knob.on::after { transform: translateX(21px); }
[data-platform="android"] .knob { width: 46px; height: 26px; }
[data-platform="android"] .knob::after { width: 20px; height: 20px; top: 3px; left: 3px; }
[data-platform="android"] .knob.on::after { transform: translateX(20px); }

/* ── Лента с разделите ────────────────────────────────────── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex; align-items: stretch;
  background: rgba(16,7,6,.78);
  border-top: 1px solid rgba(255,255,255,.10);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; text-decoration: none; color: rgba(255,255,255,.58);
  font-size: 10.5px; font-weight: 600;
}
.tabbar .ico { font-size: 19px; line-height: 1; }
.tabbar a.on { color: #fff; }
/* Android слага дискретна чертичка под избрания раздел */
[data-platform="android"] .tabbar a.on { position: relative; }
[data-platform="android"] .tabbar a.on::before {
  content: ''; position: absolute; top: 6px; width: 34px; height: 26px;
  border-radius: 999px; background: rgba(229,57,53,.34); z-index: -1;
}
[data-platform="android"] .tabbar { background: rgba(16,7,6,.92); backdrop-filter: none; }

/* ── Панел отдолу ─────────────────────────────────────────── */
.sheet-wrap { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; }
.sheet-veil { position: absolute; inset: 0; background: rgba(0,0,0,.34); opacity: 0; transition: opacity .25s; }
.sheet-wrap.open .sheet-veil { opacity: 1; }
.sheet {
  position: relative; width: 100%; background: var(--surface);
  border-radius: 22px 22px 0 0; padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .28s cubic-bezier(.22,1,.32,1);
  max-height: 88vh; overflow-y: auto;
}
.sheet-wrap.open .sheet { transform: none; }
.sheet-grab { width: 38px; height: 4px; border-radius: 999px; background: var(--border-strong); margin: 0 auto 14px; }
.sheet h2 { font-size: 21px; margin-bottom: 6px; }
.sheet-sub { color: var(--fg-subtle); font-size: 14px; margin: 0 0 14px; }
.sheet-body ol { margin: 0 0 6px; padding-left: 22px; color: var(--fg-muted); line-height: 1.7; }

/* ── Съобщение ────────────────────────────────────────────── */
.toast-root {
  position: fixed; left: 0; right: 0; z-index: 300;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px);
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.toast {
  background: #1a1a1a; color: #fff; padding: 12px 18px; border-radius: 12px;
  font-size: 14.5px; max-width: 90vw; text-align: center;
  animation: toast-in .22s ease-out;
}
.toast.ok { background: #1b5e20; }
.toast.out { opacity: 0; transition: opacity .4s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ── Празно състояние ─────────────────────────────────────── */
.empty { text-align: center; padding: 40px 24px; color: var(--fg-subtle); }
.empty .big { font-size: 34px; opacity: .45; margin-bottom: 8px; }

/* ── Вход ─────────────────────────────────────────────────── */
/* Входът стои върху снимката на бранда — единственото място освен
   заглавието на картата, където пускаме фона. Всекидневните екрани
   остават спокойни. */
.signin {
  padding: 28px 20px 24px; text-align: center; position: relative;
  min-height: 100vh; min-height: 100dvh;
}
/* Фонът идва от .app-bg. Тук слагаме воал точно зад текста — иначе
   върху светлите места на снимката буквите се губят. */
.signin::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(90% 55% at 50% 38%, rgba(8,3,3,.72) 0%, rgba(8,3,3,.30) 70%, transparent 100%),
    linear-gradient(180deg, rgba(8,3,3,.34) 0%, rgba(8,3,3,.62) 100%);
}
.signin > * { position: relative; z-index: 1; }
.signin h1 { color: #fff; }
.signin p { color: rgba(255,255,255,.76); }
.signin .field-label { color: rgba(255,255,255,.8); }
.signin .mark {
  width: 96px; height: 96px; margin: 0 auto 16px;
  background: var(--ina-logo) center/contain no-repeat;
  filter: drop-shadow(0 6px 18px rgba(198,40,40,.35));
}
/* логото е бяло — върху светлия фон му трябва червена подложка */
.signin .mark-plate {
  width: 108px; height: 108px; border-radius: 28px; margin: 0 auto 18px;
  background: linear-gradient(150deg, var(--brand), var(--brand-dark));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(198,40,40,.32);
}
.signin .mark-plate .mark { width: 78px; height: 78px; margin: 0; filter: none; }
.signin h1 { font-size: 27px; margin-bottom: 8px; }
.signin p { color: var(--fg-muted); font-size: 15px; margin: 0 0 20px; }
.signin .form { text-align: left; }

/* ── На широк екран остава телефонна колона ────────────────
   Приложението е за телефон. Ако някой го отвори на компютър,
   по-добре да изглежда като телефон в средата, отколкото като
   разтеглена страница. */
/* ── Регистрация ──────────────────────────────────────────── */
.signin .form { text-align: left; }
.signin-note {
  font-size: 12.5px; color: rgba(255,255,255,.62); margin-top: 16px; line-height: 1.55;
}
select.input {
  -webkit-appearance: none; appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #8a8a8a 50%),
    linear-gradient(135deg, #8a8a8a 50%, transparent 50%);
  background-position: calc(100% - 19px) 22px, calc(100% - 14px) 22px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
  padding-right: 36px;
}
.consent {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 16px; cursor: pointer;
  font-size: 13.5px; line-height: 1.45; color: rgba(255,255,255,.82);
}
.consent input { width: 22px; height: 22px; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--brand); }
.input.bad { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(229,57,53,.28); }
.note-under { font-size: 12.5px; color: rgba(255,255,255,.6); margin-top: 8px; line-height: 1.55; }
/* ⚠ .note-under е БЯЛО, защото стои върху снимката на бранда. В панела
   фонът е светъл и текстът изчезва. Засягаше и поканата за инсталиране,
   където бележката за Chrome на iPhone беше невидима отдавна. */
.sheet .note-under { color: var(--fg-muted); }

/* Полетата на тъмен фон искат малко повече присъствие */
.signin .input { background: rgba(255,255,255,.96); }

@media (min-width: 620px) {
  body { background: #0a0504; }
  .view, .demo-ribbon { max-width: 460px; margin-left: auto; margin-right: auto; }
  .view { min-height: calc(100dvh - var(--tabbar-h)); }
  .tabbar { max-width: 460px; margin: 0 auto; }
  .sheet { max-width: 460px; margin: 0 auto; border-radius: 22px 22px 0 0; }
  .signin { max-width: 460px; margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .app-bg i { animation: none; }
}

/* ── За нас ────────────────────────────────────────────── */
.about-cover { padding: 26px 18px 20px; text-align: center; }
.about-kicker {
  font: 700 11px/1 var(--font-display, inherit); letter-spacing: .2em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 12px;
}
.about-cover h1 {
  margin: 0 0 12px; font-size: clamp(24px, 7.4vw, 32px); line-height: 1.16;
  letter-spacing: -.01em;
}
.about-quote {
  margin: 0; font-size: 14px; line-height: 1.55; font-style: italic;
  color: var(--fg-subtle); max-width: 34ch; margin-inline: auto;
}

/* Числата, които казват всичко за десет секунди */
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.fact {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
}
.fact b { display: block; font-size: 22px; line-height: 1.1; letter-spacing: -.02em; }
.fact span { display: block; font-size: 12px; color: var(--fg-subtle); margin-top: 3px; }

.about-plain {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.about-plain p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.6; color: var(--fg-subtle); }
.about-plain p.last { margin-bottom: 0; }

/* Хронология: една линия, точки по нея, годините на видно място */
/* Цялата хронология е върху една плоскост: иначе текстът ляга
   директно върху снимката на фона и не се чете. */
.tl {
  position: relative; padding: 16px 16px 16px 40px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.tl::before {
  content: ''; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px;
  background: linear-gradient(180deg, var(--brand), rgba(229,57,53,.18));
  border-radius: 2px;
}
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item + .tl-item { padding-top: 16px; border-top: 1px solid var(--border); }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -24px; top: 5px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--brand);
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px rgba(229,57,53,.2);
}
.tl-item + .tl-item .tl-dot { top: 21px; }
.tl-year {
  font: 700 11.5px/1 var(--font-display, inherit); letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 4px;
}
.tl-title { display: block; font-size: 15.5px; margin-bottom: 4px; }
.tl-text { margin: 0; font-size: 14px; line-height: 1.6; color: var(--fg-subtle); }

/* Правният текст: прибран, но на едно докосване */
.legal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.legal summary {
  list-style: none; cursor: pointer; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 2px;
}
.legal summary::-webkit-details-marker { display: none; }
.legal summary::after {
  content: '›'; position: absolute; right: 18px; font-size: 20px;
  color: var(--fg-subtle); transition: transform .2s;
}
.legal { position: relative; }
.legal[open] summary::after { transform: rotate(90deg); }
.legal summary b { font-size: 15px; }
.legal summary span { font-size: 12.5px; color: var(--fg-subtle); }
.legal-body { padding: 0 16px 16px; border-top: 1px solid var(--border); }
.legal-body p { margin: 12px 0 0; font-size: 13.5px; line-height: 1.65; color: var(--fg-subtle); }
.legal-body b { color: var(--fg); }
.legal-body a { color: var(--brand); }
.legal-body .fine { font-size: 12.5px; }

.about-firm { text-align: center; font-size: 12.5px; color: var(--fg-subtle); margin: 0; }

/* Редовете за връзка са линкове, но не бива да изглеждат като линкове */
.list a.row, .list a.row:visited { color: inherit; text-decoration: none; }
.list a.row .row-main b { color: var(--fg); }
.list a.row:active { background: var(--bg); }

/* Редът за данните под формата за регистрация */
.signin-fine { font-size: 12.5px; line-height: 1.5; color: rgba(255,255,255,.72); margin: 10px 0 0; text-align: center; }
.signin-fine a { color: #fff; text-decoration: underline; }

/* Магазините: адрес, работно време и връзка към картата */
.shops { display: flex; flex-direction: column; gap: 8px; }
.shop {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.shop:active { background: var(--bg); }
.shop-city {
  font: 700 11px/1 var(--font-display, inherit); letter-spacing: .16em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 5px;
}
.shop-name { display: block; font-size: 15.5px; margin-bottom: 4px; }
.shop-addr { font-size: 14px; line-height: 1.5; color: var(--fg); }
.shop-hours { font-size: 13px; line-height: 1.5; color: var(--fg-subtle); margin-top: 4px; }
.shop-map {
  display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600;
  color: var(--brand);
}

/* ── Награда за точки ─────────────────────────────────────
   Показва се, но не се взима оттук: точките се теглят на
   касата, за да не се разминават устройствата. */
.offer-points .offer-foot { color: var(--fg-muted); }
.offer-points.is-ready { border-color: var(--brand); }
.offer-points.is-ready .offer-foot { color: var(--brand); font-weight: 600; }
.offer-points-img {
  width: 100%; max-width: 160px; height: auto;
  display: block; margin: 10px auto 4px; border-radius: 12px;
}

/* Връзката в дребния текст под бутона за изтриване трябва да се вижда,
   че е връзка: магазините искат адресът за изтриване да е достъпен. */
.note-under a { color: var(--brand); text-decoration: underline; }

/* ── Поканете приятел ─────────────────────────────────────
   Стои най-отгоре в Награди: това е екранът, на който човек
   мисли какво може да получи, значи и мястото за поканата. */
.refer { text-align: left; }
.refer-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.refer-ico { font-size: 26px; line-height: 1; }
.refer-top b { font-family: var(--font-display); font-size: 19px; }
.refer p { margin: 0 0 14px; font-size: 14.5px; line-height: 1.55; color: var(--fg-muted); }
.refer-code {
  display: flex; align-items: baseline; gap: 10px;
  padding: 12px 14px; margin-bottom: 12px;
  background: var(--bg); border-radius: 12px;
}
.refer-code small { font-size: 12px; color: var(--fg-subtle); text-transform: uppercase; letter-spacing: .06em; }
.refer-code b { font-family: var(--font-mono); font-size: 21px; letter-spacing: .08em; margin-left: auto; }
.refer.is-vip { box-shadow: inset 0 0 0 2px var(--brand); }



/* ── Картата в уолета ─────────────────────────────────────
   Apple и Google имат свои правила за този бутон и всеки телефон
   ги показва еднакво навсякъде. Затова тук НЕ се измисля нов вид:
   черно, ръб, лого отляво. Разпознава се, преди да се прочете. */
.wallet-row { display: grid; gap: 10px; }
.wallet-btn {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 16px; border: 0; border-radius: 14px;
  background: #000; color: #fff; cursor: pointer;
  text-align: left; font: inherit;
  transition: transform var(--dur-fast, 150ms) ease, opacity var(--dur-fast, 150ms) ease;
}
.wallet-btn:active { transform: scale(.98); }
.wallet-btn:disabled { opacity: .6; cursor: default; }
.wallet-btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.wallet-ico {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 16px; line-height: 1; font-weight: 700;
}
.wallet-ico svg { display: block; }
.wallet-google .wallet-ico { background: #fff; }

.wallet-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.wallet-txt small { font-size: 11.5px; opacity: .72; letter-spacing: .02em; }
.wallet-txt b { font-size: 16px; font-weight: 600; }

/* На тъмна тема черното се слива с фона: остава само ръбът. */
@media (prefers-color-scheme: dark) {
  .wallet-btn { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); }
}

@media (prefers-reduced-motion: reduce) {
  .wallet-btn { transition: none; }
  .wallet-btn:active { transform: none; }
}

/* Списъкът с това, което заминава при Google. Не е украса: това е
   съдържанието, върху което човек дава съгласие, значи се чете. */
.wallet-what { margin: 10px 0 14px; padding-left: 20px; }
.wallet-what li { margin-bottom: 6px; line-height: 1.5; }
