:root {
  /* Розовый акцент: мягче, чем алый логотипа */
  --yellow: #ff2e55;
  --yellow-press: #d42448;
  --yellow-soft: rgba(255, 46, 85, .18);
  --yellow-soft-ink: #ff6b82;
  --on-yellow: #ffffff;

  --dark: #ff2e55;
  --dark-2: rgba(255, 255, 255, .16);
  --on-dark: #ffffff;
  --on-dark-muted: rgba(255, 255, 255, .78);
  --tabbar-bg: #1f0e11;
  --tab-idle: #c9a0a5;

  --primary: #ff2e55;
  --primary-press: #d42448;
  --primary-soft: rgba(255, 46, 85, .22);
  --green: #22c55e;
  --red: #ff2e55;
  --purple: #ff2e55;
  --blue: #d42448;

  --bg: #1a0c0e;
  --bg-image: none;
  --bg-tile: 420px;
  --on-bg: #fff5f6;
  --on-bg-muted: rgba(255, 245, 246, .7);
  --card: #2a1518;
  --ink: #fff5f6;
  --ink-2: #e8c9cd;
  --muted: #b0898e;
  --line: #4a2228;
  --radius: 12px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --shadow: none;
  --tabbar-h: 64px;
  --tabbar-bottom: 0px;

  --toast-bg: #ff2e55;
  --toast-ink: #ffffff;
  --toast-shadow: 0 0 0 1px rgba(255,255,255,.07), 0 8px 24px rgba(0,0,0,.55);

  --sum-green-bg: rgba(56, 189, 248, .16);
  --sum-green: #7dd3fc;
  --sum-yellow-bg: rgba(251, 191, 36, .16);
  --sum-yellow: #fbbf24;
  --sum-red-bg: #ff2e55;
  --sum-red: #ffffff;

  --surface-2: #3a1b20;
  --chip-bg: #2a1518;
  --ghost-bg: #3a1b20;
  --row-active: #35181c;
  --input-bg: #3a1b20;
  --input-bg-focus: #421e24;
  --note-ink: #ffb3b9;
  --badge-wait-bg: rgba(255, 46, 85, .22); --badge-wait-ink: #ff5a75;
  --badge-ok-bg: rgba(34, 197, 94, .16);   --badge-ok-ink: #4ade80;
  --badge-no-bg: rgba(255, 77, 79, .16);   --badge-no-ink: #ff7b7d;
  --streak-bg: rgba(255, 46, 85, .22);     --streak-ink: #ff5a75; --streak-cap: #c98c92;
  --avatar-bg: #ff2e55;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Manrope", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background-color: var(--bg); background-image: var(--bg-image);
  background-size: var(--bg-tile) var(--bg-tile); background-repeat: repeat;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }

#app { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- шапка ---------- */
.topbar {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 8px;
  padding: 12px 16px 10px; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.close-app-btn {
  justify-self: start; min-width: 0;
  border: none; background: none; padding: 6px 0; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 15px; letter-spacing: -.02em;
  color: var(--muted);
}
.close-app-btn:active { opacity: .65; }
.screen-head {
  display: flex; align-items: center; gap: 8px;
  margin: 10px 16px 0;
}
.screen-head[hidden] { display: none !important; }
.screen-title {
  margin: 0; font-size: 16px; line-height: 1.2;
  font-weight: 800; letter-spacing: -.03em; color: var(--ink);
  text-align: center; justify-self: center;
  max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.online { justify-self: end; min-width: 0; }
.screen-back {
  width: 36px; height: 36px; flex: 0 0 36px; padding: 0;
  border: none; border-radius: 10px; cursor: pointer;
  background: var(--card); color: var(--ink);
  display: grid; place-items: center;
}
.screen-back[hidden] { display: none !important; }
.screen-back:active { background: var(--row-active); }
.screen-back .ic { width: 20px; height: 20px; }

#content { flex: 1; padding: 0 12px calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom)); }
.screen { padding-top: 12px; }

/* ---------- карточки ---------- */
.card {
  background: var(--card); border-radius: var(--radius); padding: 16px;
  border: 1px solid var(--line);
}
.card + .card { margin-top: 12px; }

/* Тёмная карточка с тёплым свечением в углу */
.dark-card {
  position: relative; overflow: hidden;
  background: var(--dark);
  color: var(--on-dark); border-radius: var(--radius); padding: 16px;
  margin-bottom: 12px;
}
.hello-row { display: flex; align-items: center; gap: 12px; }
.hello-text { min-width: 0; flex: 1; }
.hello-name {
  font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--on-dark);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hello-sub { font-size: 14px; color: var(--on-dark-muted); margin-top: 1px; }
.hero-note { font-size: 13px; color: var(--on-dark-muted); margin: 2px 0 16px; }
.balance {
  font-size: 44px; font-weight: 900; line-height: 1.02; margin: 14px 0 16px;
  letter-spacing: -.04em; color: var(--on-dark); font-variant-numeric: tabular-nums;
}
.wallet .balance { margin: 6px 0 4px; }

/* Карточка баланса на «Заданиях» — одна строка */
.hero-compact {
  padding: 12px 12px 12px 14px; margin-bottom: 10px; border-radius: var(--radius);
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-left: 4px solid var(--yellow);
}
.hero-compact .mascot { display: none; }
.hero-compact .hello-name { color: var(--ink); }
.hero-compact .hello-sub { color: var(--muted); }
.hero-compact .balance { color: var(--yellow); }
.hero-compact .kpi { background: var(--surface-2); color: var(--ink); }
.hero-compact .kpi span { color: var(--muted); }
.hero-compact .kpi-accent { background: var(--yellow); color: #fff; }
.hero-compact .kpi-accent span { color: rgba(255,255,255,.8); }
.hero-compact .btn-dark { background: var(--yellow); color: #fff; }
.hero-compact .btn-dark:active { background: var(--yellow-press); }
.hero-compact .hello-row { gap: 10px; }
.hero-compact .avatar { width: 38px; height: 38px; font-size: 16px; }
.hero-compact .hello-sub { font-size: 12px; margin: 0; line-height: 1.2; }
.hero-compact .balance {
  font-size: 22px; margin: 0; line-height: 1.15; letter-spacing: -.03em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn-sm { padding: 10px 14px; font-size: 14px; border-radius: 14px; gap: 6px; flex: 0 0 auto; }
.profile-hero .btn-dark { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .4); }
.profile-hero .btn-dark:active { background: rgba(255, 255, 255, .24); }
.hist-link {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 12px; padding: 4px 8px;
  border: none; background: none; cursor: pointer;
  color: rgba(255, 255, 255, .82); font-family: inherit;
  font-size: 14.5px; font-weight: 700; letter-spacing: -.01em;
}
.hist-link .ic { stroke: currentColor; }
.hist-link:active { color: #fff; }

/* Приглашение узкой строкой */
.invite-row {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 10px; width: 100%;
  cursor: pointer; font-family: inherit; text-align: left; color: #fff;
  background: linear-gradient(135deg, #ff6b8a 0%, var(--yellow) 48%, #d91e4a 100%);
  border-radius: var(--radius); padding: 11px 12px; border: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.38), 0 8px 18px rgba(255, 46, 85, .28);
  isolation: isolate;
}
.invite-row::after {
  content: ""; position: absolute; inset: -20% -40%;
  background: linear-gradient(115deg, transparent 36%, rgba(255,255,255,.55) 50%, transparent 64%);
  transform: translateX(-80%) rotate(8deg);
  animation: inviteShine 2.8s ease-in-out infinite;
  pointer-events: none; z-index: 1;
}
@keyframes inviteShine {
  0%, 35% { transform: translateX(-80%) rotate(8deg); }
  70%, 100% { transform: translateX(80%) rotate(8deg); }
}
@media (prefers-reduced-motion: reduce) { .invite-row::after { animation: none; opacity: .22; transform: none; } }
.invite-row { transition: transform .12s cubic-bezier(.2,.7,.3,1), filter .15s; }
.invite-row:active, .invite-row.is-press { transform: scale(.97); }
.invite-ic,
.invite-text,
.invite-arrow { position: relative; z-index: 2; }
.invite-ic {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 8px;
  background: rgba(255,255,255,.22); color: #fff; display: grid; place-items: center;
}
.invite-ic .ic { width: 18px; height: 18px; }
.invite-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.invite-title { font-size: 14.5px; font-weight: 800; line-height: 1.2; color: #fff; }
.invite-sub { font-size: 12.5px; color: rgba(255,255,255,.88); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invite-sub b { color: #fff; font-weight: 800; }
.invite-arrow { color: rgba(255,255,255,.85); }
.invite-prog {
  display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; vertical-align: 1px;
  background: rgba(255,255,255,.22); color: #fff; font-size: 11.5px; font-weight: 700;
}
[data-screen="tasks"] .section-h,
[data-screen="vacancies"] .section-h { margin: 16px 4px 10px; }
[data-screen="tasks"] .link-btn,
[data-screen="vacancies"] .link-btn { margin-top: 4px; flex: 0 0 auto; }
.section-row .section-h { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Приветствие на «Вакансиях»: имя и два маленьких счётчика в одной строке */
.hero-compact .hello-name { font-size: 15.5px; line-height: 1.2; }
.kpis-mini { margin: 0; gap: 6px; flex: 0 0 auto; }
.kpis-mini .kpi { flex: 0 0 auto; min-width: 62px; padding: 6px 9px; border-radius: 12px; text-align: center; }
.kpis-mini .kpi b { font-size: 18px; line-height: 1.1; }
.kpis-mini .kpi span { font-size: 10.5px; margin-top: 1px; overflow: visible; text-overflow: clip; }
.hero-compact .hello-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Подпись приглашения может уйти на вторую строку — лучше, чем обрезать сумму */
.invite-sub { white-space: normal; }
/* Фильтр городов — одна строка с прокруткой вбок вместо двух рядов */
.chips.chips-left {
  flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none;
  margin: 0 -12px; padding: 2px 12px 12px;
}
.chips.chips-left::-webkit-scrollbar { height: 0; }
.hero-compact + .tiles:not(:has(> .tile:not([hidden]))) { display: none; }

.kpis { display: flex; gap: 8px; margin-top: 16px; }
.kpis > .kpi { flex: 1 1 0; }
.kpi {
  background: var(--dark-2); border-radius: 18px; padding: 12px 12px 11px; min-width: 0;
}
.kpi b {
  display: block; font-size: 26px; font-weight: 900; line-height: 1.1;
  letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.kpi span { display: block; font-size: 13px; color: var(--on-dark-muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-accent { background: #fff; color: var(--yellow); }
.kpi-accent span { color: rgba(177, 18, 32, .7); }

.avatar {
  width: 48px; height: 48px; border-radius: 10px;
  background: var(--avatar-bg); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 20px;
  overflow: hidden; flex: 0 0 auto;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; display: block; }
.avatar-lg { width: 72px; height: 72px; font-size: 30px; }

/* Две плитки под приветствием */
.tiles { display: flex; gap: 10px; }
.tiles > .tile { flex: 1 1 0; min-width: 0; }
.tile {
  position: relative; overflow: hidden; text-align: left; cursor: pointer;
  border: none; border-radius: var(--radius); padding: 16px; min-height: 124px;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow);
  display: flex; flex-direction: column; justify-content: flex-end;
  transition: transform .08s;
}
.tile:active, .tile.is-press { transform: scale(.97); }
.tile-accent { background: var(--yellow); color: var(--on-yellow); }
.tile-title { position: relative; font-size: 16px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.tile-sub { position: relative; font-size: 12.5px; line-height: 1.3; margin-top: 3px; color: var(--muted); }
/* Иконка стоит абсолютом сверху — оставляем под неё место, чтобы длинная
   подпись не залезала на кружок */
.tile { padding-top: 66px; }
.tile-accent .tile-sub { color: rgba(255, 255, 255, .78); }
/* Сумма за друга внутри подписи — жирным, чтобы цепляла взгляд */
.tile-reward { color: var(--ink); font-weight: 800; }
.tile-accent .tile-reward { color: #fff; }
.tile-ic {
  position: absolute; left: 16px; top: 16px;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface-2); color: var(--ink);
  display: grid; place-items: center;
}
.tile-accent .tile-ic { background: rgba(255, 255, 255, .2); color: var(--on-yellow); }
.tile-ic .ic { width: 20px; height: 20px; }

/* ---------- иконки и кнопки ---------- */
.ic {
  width: 22px; height: 22px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.ic-sm { width: 18px; height: 18px; }

.btn {
  border: none; border-radius: 10px;
  font-size: 15px; font-weight: 700; letter-spacing: -.01em;
  padding: 16px 22px; cursor: pointer; font-family: inherit;
  transition: background .15s, transform .12s cubic-bezier(.2,.7,.3,1), filter .12s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-decoration: none;
}
.btn:active, .btn.is-press { transform: scale(.96); filter: brightness(.92); }
.btn:disabled { opacity: .55; cursor: default; transform: none; filter: none; }
.btn-block { display: flex; width: 100%; }
/* Главная кнопка — жёлтая */
.btn-dark { background: var(--yellow); color: var(--on-yellow); }
.btn-dark:active { background: var(--yellow-press); }
/* Вторичная — светло-жёлтая */
.btn-yellow { background: var(--yellow-soft); color: var(--yellow-soft-ink); }
.btn-ghost {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; background: transparent; border: none;
  color: var(--ink); font-size: 14px; font-weight: 600; padding: 12px; margin-top: 8px; cursor: pointer;
}
.btn-ghost2 { background: var(--ghost-bg); color: var(--ink); }

/* ---------- лента выплат: карточка с капсулами ---------- */
.ticker {
  background: linear-gradient(135deg, #ff6b8a 0%, var(--yellow) 48%, #d91e4a 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 7px 8px;
  margin: 0 0 10px;
  min-height: 44px;
  overflow: hidden; white-space: nowrap;
  border: none;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.38), 0 8px 18px rgba(255, 46, 85, .18);
}
.ticker::before, .ticker::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 22px;
  z-index: 2; pointer-events: none;
}
.ticker::before { left: 0;  background: linear-gradient(90deg, #ff5a7a, transparent); }
.ticker::after  { right: 0; background: linear-gradient(270deg, #dc1e4a, transparent); }
.ticker-track {
  display: inline-block; font-size: 12.5px; will-change: transform;
  animation: tickerRun var(--ticker-dur, 80s) linear infinite;
}
/* Не display:none: иначе CSS-анимация начинается с нуля при возврате на вкладку. */
.ticker.ticker-parked {
  visibility: hidden; height: 0; min-height: 0; margin: 0; padding: 0;
  overflow: hidden; pointer-events: none; box-shadow: none;
}
.ticker.ticker-parked .ticker-track { animation-play-state: paused; }
.tick-item {
  display: inline-flex; align-items: center; gap: 6px;
  margin-right: 8px; padding: 5px 10px 5px 5px; vertical-align: middle;
  background: rgba(255, 255, 255, .18);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28);
}
.tick-ava {
  display: grid; place-items: center;
  width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%;
  background: rgba(255,255,255,.28) !important;
}
.tick-ava svg { width: 12px; height: 12px; fill: none; stroke: #fff !important; stroke-width: 1.8; }
.tick-name {
  color: #fff; font-weight: 700;
  display: inline-flex; align-items: center; line-height: 1;
}
.nick-plain { display: inline; }
.nick-blur {
  display: inline-block;
  filter: blur(4.5px);
  user-select: none;
  pointer-events: none;
  transform: scaleY(1.15);
}
.tick-job { color: #fff; font-weight: 700; }
.tick-amount {
  color: #fff; font-weight: 800; font-variant-numeric: tabular-nums;
  background: rgba(0, 0, 0, .16);
  padding: 3px 7px; border-radius: 999px; line-height: 1.1;
}
.tick-time { color: rgba(255, 255, 255, .78); font-size: 11.5px; }
@keyframes tickerRun { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ---------- секции и списки ---------- */
.section-h { font-size: 13px; font-weight: 800; margin: 20px 2px 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.list {
  display: flex; flex-direction: column; gap: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
#tasksList:empty,
#vacList:empty { display: none; }
.list > .empty { border: none; }
#adminBody.list { background: none; border: none; overflow-y: auto; gap: 10px; min-height: 0; }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-row .section-h { margin-right: auto; }
.link-btn {
  background: none; border: none; color: var(--yellow); border-radius: 0;
  font-family: inherit; font-size: 13px; font-weight: 800;
  cursor: pointer; padding: 8px 0; white-space: nowrap; margin-top: 12px;
}
.empty { text-align: center; color: var(--muted); padding: 28px 20px; font-size: 14px; line-height: 1.45; }

/* Поиск */
.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border-radius: var(--radius); padding: 12px 14px;
  border: 1px solid var(--line); margin-bottom: 12px; color: var(--muted);
}
.search input {
  flex: 1; min-width: 0; border: none; background: none; padding: 0;
  font-family: inherit; font-size: 16px; color: var(--ink);
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; background: none; }
.search-clear {
  border: none; background: var(--surface-2); color: var(--ink-2);
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer;
  font-size: 12px; line-height: 1; flex: 0 0 24px;
}

/* Чипы-фильтры */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; padding: 0 0 12px; }
.chips-left { justify-content: flex-start; }
.chip {
  flex: 0 0 auto; border: 1px solid var(--line); border-radius: 8px;
  background: var(--chip-bg); color: var(--ink);
  font-family: inherit; font-size: 13px; font-weight: 700;
  padding: 8px 12px; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s, transform .12s cubic-bezier(.2,.7,.3,1);
}
.chip.active { border-color: var(--yellow); }
.chip:active, .chip.is-press { transform: scale(.96); }
.chip.active { background: var(--yellow); color: var(--on-yellow); }

/* ---------- вакансии ---------- */
.vac {
  display: flex; align-items: flex-start; gap: 12px; width: 100%;
  text-align: left; border: none; cursor: pointer; font-family: inherit; color: var(--ink);
  background: transparent; border-radius: 0; padding: 14px 14px; box-shadow: none;
}
.vac + .vac { border-top: 1px solid var(--line); }
.vac { transition: background .15s, transform .12s cubic-bezier(.2,.7,.3,1); }
.vac:active, .vac.is-press { background: var(--row-active); transform: scale(.985); }
.vac-logo {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 8px;
  background: var(--yellow); color: #fff;
  display: grid; place-items: center; font-size: 17px; font-weight: 800;
}
.vac-body { flex: 1; min-width: 0; }
.vac-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.vac-title { font-weight: 800; font-size: 16.5px; letter-spacing: -.02em; line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
.vac-top .badge { flex: 0 0 auto; }
.vac-meta { font-size: 13.5px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vac-salary {
  display: inline-block; margin-top: 8px; padding: 0;
  background: none; color: var(--yellow);
  font-weight: 800; font-size: 14px;
}
.vac-modal-head { display: flex; align-items: center; gap: 13px; padding-right: 40px; }
.vac-modal-head .modal-title { padding-right: 0; }
.vac-modal-text { min-width: 0; }
.vac-company { font-size: 14px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.vac-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.vac-tags:empty { display: none; }
.vac-tag { font-size: 12.5px; font-weight: 700; padding: 5px 9px; border-radius: 6px; background: var(--surface-2); color: var(--ink); }
.vac-tag:first-child { background: var(--yellow-soft); color: var(--yellow-soft-ink); }
.vac-desc { font-size: 15px; line-height: 1.5; color: var(--ink-2); margin-top: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.vac-desc:empty { display: none; }

/* ---------- задания ---------- */
#tasksList,
#allTasksList {
  gap: 8px;
  background: none;
  border: none;
  overflow: visible;
  padding: 0;
}
.task {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 12px; box-shadow: none;
  display: grid; grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center; gap: 12px;
}
.task-info { min-width: 0; text-align: left; }
.task-ic {
  width: 42px; height: 42px; border-radius: 12px; justify-self: start;
  display: flex; align-items: center; justify-content: center;
}
.task-ic svg { width: 22px; height: 22px; display: block; }
.task-title {
  font-weight: 800; font-size: 15px; letter-spacing: -.02em; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.task-desc { font-size: 12.5px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3; }
.task-right { justify-self: end; display: flex; justify-content: flex-end; align-items: center; }
.task-cta {
  background: none; color: var(--yellow); border: none; border-radius: 12px;
  min-width: 86px; height: 36px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; cursor: pointer; font-family: inherit; white-space: nowrap;
}
.task-cta { transition: transform .12s cubic-bezier(.2,.7,.3,1), filter .12s, background .15s; }
.task-cta:active, .task-cta.is-press { transform: scale(.96); filter: brightness(.92); }
/* Сумма: мало — голубая, средне — золотая, крупно — красная заливка как у логотипа. */
.task-cta.cta-green  { background: var(--sum-green-bg);  border-color: transparent; color: var(--sum-green); }
.task-cta.cta-yellow { background: var(--sum-yellow-bg); border-color: transparent; color: var(--sum-yellow); }
.task-cta.cta-red    { background: var(--yellow);        border-color: transparent; color: #fff; }
.badge { font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 6px; white-space: nowrap; }
.badge-pending { background: var(--badge-wait-bg); color: var(--badge-wait-ink); }
.badge-approved { background: var(--badge-ok-bg); color: var(--badge-ok-ink); }
.badge-rejected { background: var(--badge-no-bg); color: var(--badge-no-ink); }
.task-group {
  font-size: 12px; font-weight: 700; color: var(--muted);
  margin: 16px 4px 2px; text-transform: uppercase; letter-spacing: .05em;
}
.task-group:first-child { margin-top: 0; }


/* ---------- квесты за приглашения: лестница уровней ---------- */
.quests {
  background: var(--card); border-radius: var(--radius); border: 1px solid var(--line);
  padding: 8px 14px 10px 4px;
}
.quest {
  display: grid; grid-template-columns: 22px 1fr; gap: 10px;
  position: relative; padding: 12px 2px;
}
.quest + .quest { border-top: none; }
.quest-rail {
  position: relative; display: flex; justify-content: center;
}
.quest-rail::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 2px; background: var(--line); transform: translateX(-50%);
}
.quest:first-child .quest-rail::before { top: 10px; }
.quest:last-child .quest-rail::before { bottom: calc(100% - 12px); }
.quest-dot {
  width: 12px; height: 12px; margin-top: 5px; z-index: 1;
  border-radius: 50%; background: #fff;
  border: 2.5px solid var(--muted); box-sizing: border-box;
}
.quest.current .quest-dot { border-color: var(--yellow); background: var(--yellow); box-shadow: 0 0 0 4px var(--yellow-soft); }
.quest.done .quest-dot { border-color: var(--yellow); background: var(--yellow); }
.quest.locked .quest-dot { border-color: var(--line); background: var(--surface-2); }
.quest-panel { min-width: 0; }
.quest-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.quest-lvl {
  font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.quest.current .quest-lvl { color: var(--yellow); }
.quest-reward {
  font-size: 15px; font-weight: 900; letter-spacing: -.02em;
  background: var(--yellow-soft); color: var(--yellow-soft-ink);
  padding: 3px 9px; border-radius: 999px;
}
.quest-title { font-weight: 800; font-size: 15px; letter-spacing: -.02em; margin-top: 3px; }
.quest.locked .quest-title { color: var(--muted); font-weight: 700; }
.quest-bar { height: 4px; border-radius: 4px; background: var(--surface-2); margin-top: 10px; overflow: hidden; }
.quest-bar span { display: block; height: 100%; background: var(--yellow); border-radius: 4px; }
.quest-foot { margin-top: 8px; display: flex; justify-content: flex-end; }
.quest-cta {
  border: none; border-radius: 8px; padding: 8px 14px; font-weight: 800; font-size: 13px;
  font-family: inherit; cursor: pointer; white-space: nowrap;
  background: var(--yellow); color: var(--on-yellow);
  transition: transform .12s cubic-bezier(.2,.7,.3,1), filter .12s;
}
.quest-cta:active, .quest-cta.is-press { transform: scale(.96); filter: brightness(.92); }
.quest-cta:disabled { background: var(--surface-2); color: var(--muted); cursor: default; }
.quest-frac { font-size: 13px; font-weight: 800; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.quest-wait { font-size: 12px; font-weight: 700; color: var(--muted); }
.quest.done { opacity: 1; }
.quest.done .quest-title { color: var(--muted); }
.quest-done-mark { font-size: 12px; font-weight: 800; color: var(--sum-green); }

/* ---------- друзья ---------- */
.hint { font-size: 13px; line-height: 1.5; color: var(--muted); margin: 14px 6px; }
.ref-hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(135deg, #ff6b8a 0%, var(--yellow) 48%, #d91e4a 100%);
  color: #fff; border-radius: var(--radius);
  padding: 18px 16px 16px; margin-bottom: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.38), 0 8px 18px rgba(255, 46, 85, .28);
}
.ref-hero::after {
  content: ""; position: absolute; inset: -20% -40%;
  background: linear-gradient(115deg, transparent 36%, rgba(255,255,255,.55) 50%, transparent 64%);
  transform: translateX(-80%) rotate(8deg);
  animation: inviteShine 2.8s ease-in-out infinite;
  pointer-events: none; z-index: 1;
}
.ref-hero-kicker,
.ref-hero-sum,
.ref-hero-cap { position: relative; z-index: 2; }
@media (prefers-reduced-motion: reduce) { .ref-hero::after { animation: none; opacity: .22; transform: none; } }
.ref-hero-kicker {
  font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  opacity: .85;
}
.ref-hero-sum {
  font-size: 42px; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; margin: 6px 0 4px;
  font-variant-numeric: tabular-nums;
}
.ref-hero-cap { font-size: 13px; font-weight: 600; opacity: .88; line-height: 1.35; }
.ref-label { font-size: 11px; color: var(--yellow); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ref-link {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.4;
  word-break: break-all; margin: 8px 0 12px; padding: 12px 12px;
  background: var(--surface-2); border-left: 3px solid var(--yellow); border-radius: 0;
}
.ref-card .btn + .btn { margin-top: 8px; }
.ref-steps {
  display: flex; flex-direction: column; gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--card); margin: 12px 0 0;
}
.ref-step {
  display: flex; align-items: baseline; gap: 12px; padding: 12px 14px;
  font-size: 14px; font-weight: 700; line-height: 1.35;
}
.ref-step + .ref-step { border-top: 1px solid var(--line); }
.ref-step-n {
  font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--yellow);
  flex: 0 0 28px;
}
.howto-title { font-weight: 800; font-size: 17px; letter-spacing: -.02em; margin-bottom: 16px; }
.howto-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.howto-list li { display: flex; align-items: center; gap: 14px; font-size: 15px; line-height: 1.4; }
.howto-num {
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: 6px;
  background: var(--yellow); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
}

.stat-row { display: flex; gap: 10px; margin: 12px 0; }
.stat-row > .stat-box { flex: 1 1 0; }
.stat-box { background: var(--card); border-radius: var(--radius); padding: 14px 12px; border: 1px solid var(--line); min-width: 0; }
.stat-num {
  font-size: 22px; font-weight: 900; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat-cap { font-size: 13px; color: var(--muted); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- профиль ---------- */
.profile-hero { padding: 16px; margin-bottom: 12px; }
.profile-mark {
  position: absolute; right: 6px; top: -18px; z-index: 0;
  font-size: 148px; font-weight: 900; line-height: 1;
  color: rgba(255, 255, 255, .16); letter-spacing: -.08em;
  pointer-events: none; user-select: none;
}
.profile-hero .profile-head,
.profile-hero .wallet { position: relative; z-index: 1; }
.profile-head { display: flex; align-items: center; gap: 14px; padding: 0 0 14px; }
.profile-hero .streak {
  background: rgba(255, 255, 255, .2);
}
.profile-hero .streak-ic,
.profile-hero .streak-num { color: #fff; }
.profile-hero .streak-cap { color: rgba(255, 255, 255, .78); }
.profile-hero .prof-name { color: #fff; }
.profile-hero .prof-id { color: rgba(255, 255, 255, .78); }
.profile-hero .avatar { box-shadow: 0 0 0 3px rgba(255, 255, 255, .28); }
.profile-name { min-width: 0; }
.prof-name { font-size: 22px; font-weight: 900; letter-spacing: -.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prof-id { font-size: 14px; color: var(--muted); margin-top: 2px; }
[data-screen="profile"] .menu-ic {
  background: var(--yellow-soft); color: var(--yellow);
}
.streak {
  margin-left: auto; display: flex; align-items: center; gap: 6px; flex: 0 0 auto;
  background: var(--streak-bg); border-radius: 999px; padding: 8px 14px;
}
.streak-ic { width: 20px; height: 20px; color: var(--streak-ink); }
.streak-num { font-size: 20px; font-weight: 900; color: var(--streak-ink); line-height: 1; }
.streak-cap { font-size: 11px; color: var(--streak-cap); line-height: 1.1; }
.streak-sm { padding: 6px 11px; gap: 4px; }
.streak-sm .streak-ic { width: 17px; height: 17px; }
.streak-sm .streak-num { font-size: 16px; }

.achievements {
  display: flex; flex-direction: column; gap: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.ach {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: none; border: none; border-radius: 0; padding: 12px 14px; min-width: 0;
}
.ach + .ach { border-top: 1px solid var(--line); }
.ach-ic {
  width: 36px; height: 36px; margin: 0; border-radius: 8px; flex: 0 0 36px;
  display: grid; place-items: center;
  background: var(--yellow); color: #fff;
}
.ic-ach { width: 18px; height: 18px; }
.ach-name { font-size: 14px; font-weight: 800; margin: 0; flex: 1; line-height: 1.25; letter-spacing: -.01em; }
.ach-state {
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--yellow); flex: 0 0 auto;
}
.ach.locked { opacity: 1; }
.ach.locked .ach-ic { background: var(--surface-2); color: var(--muted); }
.ach.locked .ach-name { color: var(--muted); font-weight: 600; }
.ach.locked .ach-state { color: var(--muted); }

.income-bar { display: flex; height: 12px; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.income-bar span { display: block; height: 100%; }
#barTasks { background: var(--yellow); }
#barRefs { background: #7a1018; }
.income-legend { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; font-size: 15px; }
.income-legend div { display: flex; align-items: center; }
.income-legend b { margin-left: auto; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.dot-y { background: var(--yellow); } .dot-b { background: var(--dark); }

.hist { background: transparent; border-radius: 0; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hist + .hist { border-top: 1px solid var(--line); }
.hist-amt { font-weight: 800; }
.hist-meta { font-size: 13px; color: var(--muted); }
.info-body .hist { background: var(--surface-2); box-shadow: none; }

.menu-list {
  display: flex; flex-direction: column; gap: 8px;
  border: none; border-radius: 0; overflow: visible; background: none;
}
.menu-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; cursor: pointer;
  font-family: inherit; text-align: left; color: var(--ink);
}
.menu-row { transition: background .15s, transform .12s cubic-bezier(.2,.7,.3,1); }
.menu-row:active, .menu-row.is-press { background: var(--row-active); transform: scale(.985); }
.menu-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.menu-kicker {
  font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--yellow);
}
.menu-ic { display: none; }
.menu-title { font-weight: 800; font-size: 15px; letter-spacing: -.02em; }
.menu-go {
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); flex: 0 0 auto;
}
.menu-arrow { display: none; }
.legal { text-align: center; font-size: 12px; line-height: 1.45; color: var(--muted); margin: 28px 16px 12px; }

/* ---------- розыгрыш ---------- */
.gv-head {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, 0) 60%),
    var(--dark);
  color: var(--on-dark); border-radius: var(--radius); padding: 18px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.gv-cap { font-size: 12px; color: var(--muted); font-weight: 600; }
.gv-head .gv-cap { color: var(--on-dark-muted); }
.gv-timer { font-size: 28px; font-weight: 900; font-variant-numeric: tabular-nums; margin-top: 4px; letter-spacing: -.03em; }
.gv-participants { font-size: 28px; font-weight: 900; margin-top: 4px; color: var(--yellow); letter-spacing: -.03em; }
.gv-sub { font-weight: 600; color: var(--muted); font-size: 14px; letter-spacing: 0; }

.prize-row {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.prize-row::-webkit-scrollbar { height: 0; }
.prize-card {
  position: relative; overflow: hidden;
  flex: 0 0 74%; scroll-snap-align: start; border-radius: var(--radius);
  padding: 16px; color: #fff; min-height: 140px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.prize-1 { background: linear-gradient(135deg, #ff2e55, #c23a62); }
.prize-2 { background: linear-gradient(135deg, #ff6b8d, #d42448); }
.prize-3 { background: linear-gradient(135deg, #fff, #ffe5e8); color: #1a1213; }
.prize-4 { background: linear-gradient(135deg, #d42448, #9a2a4a); }
.prize-5 { background: linear-gradient(135deg, #ffecee, #fff); color: #1a1213; }
.prize-3 .prize-sub, .prize-5 .prize-sub { color: #5a4548; opacity: 1; }
.prize-place {
  align-self: flex-start; background: var(--yellow); color: var(--on-yellow); border-radius: 20px;
  padding: 4px 10px; font-size: 11px; font-weight: 800; margin-bottom: auto;
}
.prize-title { font-size: 20px; font-weight: 900; margin-top: 12px; letter-spacing: -.02em; }
.prize-sub { font-size: 12px; opacity: .85; margin-top: 2px; }

.prize-card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(0,0,0,.28) 22%, rgba(0,0,0,0) 68%);
  pointer-events: none;
}
.prize-card::after {
  content: ""; position: absolute; right: -14px; bottom: -20px;
  width: 132px; height: 132px; background: no-repeat center / contain;
  pointer-events: none;
}
.prize-card > * { position: relative; z-index: 1; }
.pz-iphone::after  { background-image: url("prize-iphone.svg?v=62"); }
.pz-macbook::after { background-image: url("prize-macbook.svg?v=62"); }
.pz-airpods::after { background-image: url("prize-airpods.svg?v=62"); }
.pz-ipad::after    { background-image: url("prize-ipad.svg?v=62"); }
.pz-watch::after   { background-image: url("prize-watch.svg?v=62"); }
.pz-money::after   { background-image: url("prize-money.svg?v=62"); }
.pz-gift::after    { background-image: url("prize-gift.svg?v=62"); }
.prize-card.pz-photo::after {
  right: 0; bottom: 0; width: 58%; height: 100%;
  background-image:
    linear-gradient(95deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.28) 42%, rgba(0,0,0,0) 78%),
    var(--pz-photo);
  background-size: auto, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 46%);
          mask-image: linear-gradient(90deg, transparent 0, #000 46%);
}
.prize-card.pz-photo::before { background: linear-gradient(100deg, rgba(0,0,0,.34) 30%, rgba(0,0,0,0) 72%); }
.prize-card.pz-photo.pz-macbook { background: linear-gradient(135deg, #4a4a4d, #000); }
.prize-card.pz-photo.pz-iphone  { background: linear-gradient(135deg, #8c4a6a, #4b2a3b); }
.prize-card.pz-photo.pz-airpods { background: linear-gradient(135deg, #6b6b6e, #2a2a2a); }
.prize-card.pz-photo.pz-ipad    { background: linear-gradient(135deg, #fff, #fafafa); }
.prize-card.pz-photo.pz-watch   { background: linear-gradient(135deg, #f2eeeb, #bcb3af); }
.prize-card.pz-light { color: #16181c; box-shadow: inset 0 0 0 1px var(--line); }
.prize-card.pz-light .prize-sub { color: #4a4f57; opacity: 1; }
.prize-card.pz-light::before { background: linear-gradient(100deg, rgba(255,255,255,.88) 26%, rgba(255,255,255,0) 72%); }
.prize-card.pz-light.pz-photo::after {
  background-image:
    linear-gradient(95deg, rgba(255,255,255,.9) 0%, rgba(255,255,255,.35) 40%, rgba(255,255,255,0) 76%),
    var(--pz-photo);
}

.gv-tickets { background: var(--card); border-radius: var(--radius); padding: 18px; margin-top: 12px; border: 1px solid var(--line); }
.gv-tickets-row { display: flex; justify-content: space-between; align-items: flex-start; }
.gv-num { font-size: 36px; font-weight: 900; color: var(--ink); line-height: 1.1; margin-top: 4px; letter-spacing: -.03em; }
.gv-hint { font-size: 13px; color: var(--muted); margin-top: 2px; }
.gv-place { font-size: 30px; font-weight: 900; margin-top: 4px; letter-spacing: -.03em; }
.gv-actions { display: flex; gap: 10px; margin-top: 16px; }
.gv-actions .btn { flex: 1 1 0; min-width: 0; padding-left: 12px; padding-right: 12px; }

.top-wrap { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.top-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.top-table th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--muted);
  padding: 13px 16px 9px; border-bottom: 1px solid var(--line);
}
.top-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); }
.top-table tr:last-child td { border-bottom: none; }
.top-place { width: 38px; font-weight: 800; color: var(--ink-2); }
.top-name { font-weight: 600; color: var(--ink); }
.top-tickets { text-align: right; width: 64px; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.top-table .top-me { background: var(--yellow-soft); }
.top-table .top-me td { color: var(--yellow-soft-ink); }

/* ---------- онлайн ---------- */
.online {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  background: var(--yellow-soft); border: 1px solid rgba(255, 46, 85, .22);
  border-radius: 8px; padding: 5px 9px; line-height: 1;
}
.online b {
  font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums;
  color: var(--ink); letter-spacing: -.02em;
}
.online-cap {
  font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--yellow);
}

/* ---------- нижнее меню: полоса на всю ширину ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  max-width: none; margin: 0; z-index: 40;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
  background: var(--tabbar-bg);
  background: color-mix(in srgb, var(--tabbar-bg) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 0;
  display: flex; align-items: center; justify-content: stretch; gap: 8px;
  border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  box-shadow: 0 -10px 28px rgba(20, 16, 16, .06);
}
.tab {
  flex: 1 1 0; height: 44px; padding: 0; min-width: 0;
  border: none; background: none; border-radius: 0; cursor: pointer;
  color: var(--tab-idle); font-family: inherit;
  display: flex; flex-direction: row; align-items: center; justify-content: center;
  white-space: nowrap; overflow: visible;
  transition: color .2s, transform .16s cubic-bezier(.2,.7,.3,1);
}
.tab:active, .tab.is-press { transform: scale(.97); }
.tab-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; min-width: 40px; padding: 0 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  transition: background .22s ease, padding .28s cubic-bezier(.22,.8,.28,1),
    box-shadow .22s ease, color .2s, min-width .28s ease;
}
.tab .ic { width: 19px; height: 19px; stroke-width: 1.9; }
.tab-pill > span {
  display: none; font-size: 13.5px; font-weight: 800; letter-spacing: -.02em;
}
.tab.active { background: none; color: var(--on-yellow); }
.tab.active .tab-pill {
  background: var(--yellow); color: var(--on-yellow); padding: 0 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    0 8px 18px rgba(255, 46, 85, .34);
}
.tab.active .tab-pill > span { display: inline; overflow: hidden; text-overflow: ellipsis; }

/* ---------- модалки ---------- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; z-index: 50; }
.modal-card {
  position: relative; background: var(--card); width: 100%;
  border-radius: 16px 16px 0 0; padding: 22px 18px calc(20px + env(safe-area-inset-bottom));
  max-height: 88vh; overflow-y: auto;
}
.modal-x {
  position: absolute; top: 16px; right: 16px; width: 36px; height: 36px;
  border: none; border-radius: 50%; background: var(--surface-2); color: var(--ink-2);
  display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2;
}
.modal-title { font-size: 22px; font-weight: 900; letter-spacing: -.03em; padding-right: 44px; line-height: 1.2; }
.modal-desc { font-size: 15px; color: var(--muted); margin: 6px 0 14px; line-height: 1.45; }
.field-label { display: block; font-size: 13px; color: var(--ink-2); margin: 14px 0 6px; font-weight: 600; }
textarea, input[type="text"], input[type="number"], select {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--radius-xs); padding: 14px;
  font-family: inherit; font-size: 16px; background: var(--input-bg); transition: border-color .15s;
  color: var(--ink); -webkit-appearance: none; appearance: none;
}
.search input[type="text"] { border: none; border-radius: 0; padding: 0; background: none; }
select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' stroke='%2397979d' stroke-width='2' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--yellow); background-color: var(--input-bg-focus); }
.auto-note {
  background: var(--yellow-soft); color: var(--note-ink); border-radius: var(--radius-xs);
  padding: 12px 14px; font-size: 13.5px; line-height: 1.4; margin-top: 14px;
}
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1 1 0; min-width: 0; padding-left: 14px; padding-right: 14px; }
.seg { display: flex; background: var(--surface-2); border-radius: var(--radius-xs); padding: 4px; margin-top: 6px; }
.seg-btn { flex: 1; border: none; background: none; padding: 11px; border-radius: 11px; font-weight: 700; font-family: inherit; cursor: pointer; color: var(--muted); }
.seg-btn.active { background: var(--yellow); color: var(--on-yellow); }

.info-body { font-size: 15px; line-height: 1.5; color: var(--ink-2); margin-top: 8px; }
.info-body h4 { font-size: 15px; font-weight: 800; color: var(--ink); margin: 16px 0 6px; }
.info-body h4:first-child { margin-top: 4px; }
.info-body p { margin: 0 0 8px; }
.info-body ul { margin: 0 0 8px; padding-left: 18px; }
.info-body li { margin-bottom: 5px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 26px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--toast-bg); color: var(--toast-ink); padding: 12px 16px; border-radius: 10px;
  font-size: 14px; font-weight: 600; z-index: 100; max-width: 90%; text-align: center; box-shadow: var(--toast-shadow);
}

/* Полноэкранные страницы («Все задания», админ-панель) */
.modal.page { background: none; align-items: stretch; }
.modal-card.page {
  width: 100%; height: 100%; max-height: none;
  border-radius: 0; padding: 0; overflow: hidden;
  display: flex; flex-direction: column;
  background-color: var(--bg); background-image: var(--bg-image);
  background-size: var(--bg-tile) var(--bg-tile); background-repeat: repeat;
}
.page-head {
  position: relative; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  padding: calc(14px + env(safe-area-inset-top)) 16px 12px;
}
.page-head .page-back { position: absolute; left: 10px; }
.page-back {
  width: 42px; height: 42px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  border: none; background: var(--card); color: var(--ink); cursor: pointer;
  border-radius: 50%; padding: 0; box-shadow: var(--shadow);
}
.page-back:active { background: var(--row-active); }
.page-back .ic { width: 22px; height: 22px; }
.page-title { font-size: 20px; font-weight: 900; letter-spacing: -.03em; }
.modal-card.page > .chips { flex: 0 0 auto; padding: 6px 14px 10px; margin: 0; }
/* Поиск и фильтр над списком — не прокручиваются вместе с ним */
.page-tools { flex: 0 0 auto; padding: 6px 14px 0; }
.page-tools .search { margin-bottom: 10px; }
/* Вкладки «Все вакансии»: четыре штуки видны сразу, двумя рядами по две */
.page-tools .chips.chips-left {
  display: grid; grid-template-columns: 1fr 1fr; gap: 7px;
  margin: 0; padding: 0 0 10px; overflow: visible;
}
.page-tools .chips.chips-left .chip { text-align: center; padding: 10px 8px; }
.modal-card.page > .list {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 6px 14px calc(24px + env(safe-area-inset-bottom));
}

/* Экран «сервис недоступен в вашей стране» */
body.geo-blocked .tabbar,
body.geo-blocked .online,
body.geo-blocked .ticker,
body.geo-blocked .screen-title,
body.geo-blocked .screen-head { display: none !important; }
.geo-wall { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 64px 28px; color: var(--ink); }
.geo-ic { width: 56px; height: 56px; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.geo-title { font-size: 22px; font-weight: 900; margin-top: 18px; letter-spacing: -.02em; }
.geo-text { font-size: 15px; color: var(--ink-2); margin-top: 8px; line-height: 1.5; white-space: pre-line; }

/* ---------- админ-панель в приложении ---------- */
.adm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.adm-stat { background: var(--card); border-radius: var(--radius-sm); padding: 14px; box-shadow: var(--shadow); }
.adm-stat-title { font-size: 12px; color: var(--muted); font-weight: 700; }
.adm-stat-value { font-size: 24px; font-weight: 900; margin-top: 4px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.adm-stat-sub { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.adm-note { font-size: 13px; color: var(--muted); font-weight: 700; margin: 0 4px 2px; }
.adm-card { background: var(--card); border-radius: var(--radius-sm); padding: 14px; box-shadow: var(--shadow); }
.adm-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.adm-card-title { font-size: 16px; font-weight: 800; }
.adm-card-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.adm-card-id { font-size: 12px; color: var(--muted); font-weight: 700; flex: 0 0 auto; }
.adm-details {
  margin-top: 10px; padding: 9px 11px; border-radius: 10px; background: var(--input-bg); font-size: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all;
}
.adm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.adm-actions .btn { flex: 1 1 auto; font-size: 13px; padding: 12px 14px; }

.lnk-search {
  display: flex; align-items: center; gap: 9px;
  background: var(--card); border-radius: 999px; padding: 12px 16px;
  box-shadow: var(--shadow); margin-bottom: 12px; color: var(--muted);
}
.lnk-search input { flex: 1; min-width: 0; border: none; background: none; padding: 0; font-family: inherit; font-size: 15px; color: var(--ink); border-radius: 0; }
.lnk-search input:focus { outline: none; background: none; }
.lnk-clear {
  border: none; background: var(--surface-2); color: var(--ink-2);
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer; font-size: 12px; line-height: 1; flex: 0 0 24px;
}
.lnk-chips { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: none; align-items: center; }
.lnk-chips::-webkit-scrollbar { height: 0; }
.lnk-chip {
  flex: 0 0 auto; align-self: flex-start; display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-family: inherit;
  background: var(--card); color: var(--ink); padding: 10px 12px;
}
.lnk-chip.active { background: var(--yellow); color: var(--on-yellow); }
.lnk-chip-name { font-weight: 800; font-size: 15px; }
.lnk-chip-num { font-weight: 800; font-size: 13px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.lnk-chip.active .lnk-chip-num { background: rgba(255, 255, 255, .22); color: var(--on-yellow); }
.lnk-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: 0 0 8px; }
.lnk-dot.on { background: var(--green); }
.lnk-dot.promo { background: var(--purple); }
.lnk-chip.active .lnk-dot,
.lnk-chip.active .lnk-dot.on,
.lnk-chip.active .lnk-dot.promo { background: rgba(0, 0, 0, .55); }
.lnk-chip-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.lnk-chip-code, .lnk-card-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.lnk-chip.active .lnk-chip-code { color: rgba(255, 255, 255, .75); }
.lnk-card-code { margin: 2px 0 0 16px; font-size: 13px; }

.lnk-card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.lnk-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.lnk-card-head > div:first-child { min-width: 0; }
.lnk-card-name { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 900; letter-spacing: -.02em; }
.lnk-card-url { font-size: 12px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lnk-copy {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--yellow-soft); color: var(--yellow-soft-ink); display: grid; place-items: center;
}
.lnk-card-btns { display: flex; gap: 8px; flex: 0 0 auto; }
.lnk-del { background: var(--badge-no-bg); color: var(--badge-no-ink); }
.lnk-totals {
  display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 14px;
  background: var(--surface-2); border-radius: var(--radius-xs); padding: 14px 8px;
}
.lnk-totals.two { grid-template-columns: repeat(2, 1fr); }
.lnk-totals.two b { font-size: 18px; }
.lnk-totals > div { text-align: center; position: relative; }
.lnk-totals > div + div { border-left: 1px solid rgba(128, 128, 128, .22); }
.lnk-totals b { display: block; font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.lnk-totals span { display: block; font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 3px; }
.lnk-periods { display: flex; background: var(--card); border-radius: 999px; padding: 4px; margin: 12px 0; box-shadow: var(--shadow); }
.lnk-per {
  flex: 1; border: none; background: none; cursor: pointer; font-family: inherit;
  padding: 11px 8px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--muted);
}
.lnk-per.active { background: var(--yellow); color: var(--on-yellow); }
.lnk-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.lnk-cell { background: var(--card); padding: 20px 14px; text-align: center; }
.lnk-cell b { display: block; font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.lnk-cell span { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
.lnk-cell em { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-top: 3px; }
.lnk-grid.three { grid-template-columns: repeat(3, 1fr); }
.lnk-grid.three .lnk-cell { padding: 18px 6px; }
.lnk-grid.three .lnk-cell b { font-size: 24px; }
.lnk-grid.three .lnk-cell span { font-size: 12px; }
.c-blue { color: var(--blue); }
.c-green { color: #13823e; }
.c-amber { color: #ff2e55; }
.c-red { color: var(--red); }
.c-purple { color: var(--purple); }
.c-muted { color: var(--ink-2); }
#adminBody { display: block; }
#adminBody > * + * { margin-top: 10px; }
#adminBody .adm-grid,
#adminBody .lnk-grid { margin-top: 10px; }

.stat-dash-tools { justify-content: flex-end; margin-bottom: 2px; }
.stat-dash {
  background: #2a1518; color: #fff5f6;
  border-radius: 18px; padding: 16px 14px 14px;
  border: 1px solid #4a2228;
}
.stat-dash-kicker { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.stat-dash-period { font-size: 12.5px; color: #b0898e; margin-top: 4px; font-weight: 600; }
.stat-dash-body {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 12px; align-items: center; margin-top: 14px;
}
.stat-donut { position: relative; width: 100%; max-width: 158px; margin: 0 auto; aspect-ratio: 1; }
.stat-donut-ring {
  position: absolute; inset: 0; border-radius: 50%;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(62% - 1px), #000 63%);
  mask: radial-gradient(farthest-side, transparent calc(62% - 1px), #000 63%);
  filter: drop-shadow(0 0 10px rgba(255, 46, 85, .35));
}
.stat-donut-center {
  position: absolute; inset: 22%; display: grid; place-content: center; text-align: center;
  background: #2a1518; border-radius: 50%;
}
.stat-donut-center b { font-size: 28px; font-weight: 900; line-height: 1; letter-spacing: -.03em; }
.stat-donut-center span { font-size: 11px; color: #b0898e; font-weight: 700; margin-top: 4px; }
.stat-rows { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.stat-metric {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #3a1b1f; border: 1px solid #4a2228; border-radius: 12px;
  padding: 10px 12px;
}
.stat-metric span { font-size: 13px; color: #c9a8ac; font-weight: 650; }
.stat-metric b { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-chart {
  margin-top: 14px; border: 1px solid #4a2228; border-radius: 14px; padding: 12px 10px 8px;
  background: #241114;
}
.stat-chart-title { font-size: 13px; font-weight: 800; margin: 0 4px 8px; }
.stat-chart-svg { width: 100%; height: 168px; display: block; }
.stat-chart-svg line { stroke: #4a2228; stroke-width: 1; }
.stat-chart-svg .axis, .stat-chart-svg text { fill: #b0898e; font-size: 10px; font-family: Manrope, sans-serif; }
.lnk-per { font-size: 12.5px; padding: 10px 6px; }

/* Текст, который лежит прямо на фоне */
.close-app-btn, .screen-title, .page-title { color: var(--on-bg); }
.hint, .legal, .task-group, .adm-note, .gv-sub,
.list > .empty, #giveawayWrap > .empty { color: var(--on-bg-muted); }
.hint { font-weight: 500; }

.c-green { color: #4ade80; }
.c-amber { color: #ff5a75; }
.kpi-accent { background: #fff; color: #ff2e55; }

.prem-pay {
  font-size: 15px; font-weight: 800; color: var(--sum-green); margin: 4px 0 8px;
}
#premBox {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}
#premBox > * { margin: 0; box-sizing: border-box; width: 100%; }
.prem-reward,
.prem-sla {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 16px;
}
.prem-reward {
  justify-content: space-between;
  gap: 12px;
  background: #241114;
  border: 1px solid #4a2228;
}
.prem-reward span {
  font-size: 14px; font-weight: 700; color: #c9a8ac; line-height: 1;
}
.prem-reward b {
  font-size: 20px; font-weight: 900; letter-spacing: -.03em; color: #fff;
  line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.prem-sla {
  gap: 10px;
  min-height: 0;
  padding: 0 4px;
  background: none;
  font-size: 13px; line-height: 1.35; color: #b0898e;
}
.prem-sla b {
  flex: 0 0 auto; background: none; color: #ff8fa0;
  font-size: 12px; font-weight: 800; letter-spacing: .02em; text-transform: none;
  border-radius: 0; padding: 0; line-height: 1.35;
}
.prem-sla span { min-width: 0; }
.prem-how {
  padding: 0; margin: 0; list-style: none;
  display: grid; gap: 8px;
  background: none; border: none;
  counter-reset: prem-step;
}
.prem-how li {
  display: flex; align-items: center; gap: 10px;
  min-height: 64px; padding: 12px 12px 12px 14px;
  background: #2a1518; border: 1px solid #4a2228; border-radius: 16px;
  font-size: 14px; font-weight: 650; line-height: 1.3; color: #fff5f6;
  counter-increment: prem-step;
}
.prem-how li::before {
  content: counter(prem-step);
  flex: 0 0 auto;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--yellow); color: #fff;
  font-size: 13px; font-weight: 800; line-height: 28px; text-align: center;
}
.prem-how-text { flex: 1; min-width: 0; }
.prem-how-btn,
.prem-how-wait {
  flex: 0 0 124px;
  width: 124px;
  height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 8px;
  border: none; border-radius: 12px;
  background: var(--yellow); color: #fff;
  font-family: inherit; font-size: 13px; font-weight: 800;
  text-decoration: none; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-sizing: border-box;
}
.prem-how-wait {
  background: #3a1b20; color: #ff8fa0; cursor: default;
}
#premFileLabel.has { background: #16a34a; }
.prem-preview {
  display: block; width: 100%; max-height: 180px; object-fit: cover;
  border-radius: 16px;
}
#taskModal.prem-open .auto-note { display: none; }
#taskModal.prem-open #taskModalLink { display: none; }
#taskModal.prem-open .modal-actions { margin-top: 12px; }
#taskModal.prem-open .modal-actions .btn {
  border-radius: 16px; min-height: 52px;
  box-shadow: 0 8px 18px rgba(255, 46, 85, .34);
}

.mascot {
  position: absolute; right: 4px; top: 2px; z-index: 3;
  border: none; background: none; padding: 0; cursor: pointer;
  display: flex; flex-direction: row; align-items: center; gap: 4px;
  animation: mascotFloat 3.4s ease-in-out infinite;
}
.mascot:active { transform: scale(.94); }
.mascot-m {
  width: auto; height: auto; border-radius: 0;
  background: none; color: var(--yellow);
  display: grid; place-items: center;
  font-size: 34px; font-weight: 800; letter-spacing: -.08em; line-height: 1;
  box-shadow: none;
}
.mascot-bubble {
  background: var(--yellow); color: #fff; font-size: 10px; font-weight: 800;
  padding: 4px 9px; border-radius: 11px 7px 7px 11px; white-space: nowrap;
  filter: drop-shadow(0 3px 6px rgba(255, 46, 85, .22)); position: relative;
}
.mascot-bubble::after {
  content: ""; position: absolute; right: -3.5px; top: 50%;
  width: 9px; height: 9px; margin-top: -4.5px;
  background: var(--yellow); transform: rotate(45deg); border-radius: 0 2px 0 0;
}
@keyframes mascotFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) { .mascot { animation: none; } }

body.geo-blocked .mascot { display: none !important; }
body.ban-loading::before { display: none !important; }
body.ban-loading #app,
body.ban-loading .tabbar,
body.ban-loading #toast,
body.ban-loading .modal { display: none !important; }
.ban-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.ban-spinner {
  width: 36px; height: 36px;
  border: 3px solid #ebebeb;
  border-top-color: #ff2e55;
  border-radius: 50%;
  animation: banSpin .7s linear infinite;
}
@keyframes banSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ban-spinner { animation: none; border-top-color: #ebebeb; }
}

/* Узкие телефоны: плитки и цифры чуть компактнее */
@media (max-width: 360px) {
  .screen-title { font-size: 14px; }
  .kpi b { font-size: 22px; }
  .kpi span, .stat-cap { font-size: 12px; }
  .stat-num { font-size: 19px; }
  .tile-title { font-size: 15px; }
  .tab { font-size: 10px; }
}
