/* Flow Mini App — профиль */

.profile-mark { background: linear-gradient(135deg, #ffb02e, #ff4a1c 55%, #a855f7); }
.profile-root { padding-bottom: 14px; }

/* ---------- уровень ---------- */
.pf-level {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 4px 14px 0;
  padding: 16px 18px 16px 14px;
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(255, 255, 255, 0.22), transparent 55%),
    linear-gradient(135deg, #5b7cff, #7c5cff 55%, #a855f7);
  box-shadow: 0 14px 34px -16px rgba(91, 124, 255, 0.8);
}
.pf-ring { position: relative; flex-shrink: 0; width: 110px; height: 110px; }
.pf-ring svg { transform: rotate(-90deg); }
.pf-ring .ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.2); stroke-width: 9; }
.pf-ring .ring-fg { fill: none; stroke: #fff; stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset 0.8s cubic-bezier(.2, .8, .2, 1); }
.pf-lvl {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}
.pf-lvl small { font-size: 11px; font-weight: 600; opacity: 0.8; letter-spacing: 0; margin-bottom: 3px; }
.pf-level-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; }
.pf-title { font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.pf-xp { font-size: 13.5px; opacity: 0.9; }
.pf-xp b { font-weight: 800; }
.pf-bar { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.22); overflow: hidden; }
.pf-bar i { display: block; height: 100%; border-radius: 4px; background: #fff; }
.pf-hint { font-size: 12px; opacity: 0.78; line-height: 1.35; }

/* ---------- стрики ---------- */
.pf-risk-pill {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--amber);
  background: var(--amber-soft);
}
.pf-streaks { display: flex; flex-direction: column; gap: 8px; padding: 0 14px; }
.pf-streak {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.pf-streak.risk { box-shadow: inset 0 0 0 1.5px var(--amber-soft), inset 0 0 0 1px var(--line); }
.pf-fire {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 64px;
  padding: 5px 9px 5px 5px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 122, 26, 0.18), rgba(255, 74, 28, 0.08));
}
.pf-fire b {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  color: #ff7a1a;
  letter-spacing: -0.02em;
}
.pf-streak.risk .pf-flame { animation: flick 1.2s ease-in-out infinite; }
@keyframes flick { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.92); } }
.pf-flame.dim { filter: grayscale(1); opacity: .5; }
.pf-s-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pf-s-name { font-size: 15px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-ok { font-size: 12.5px; color: #1fb36b; font-weight: 600; }
.pf-warn { font-size: 12.5px; color: var(--amber); font-weight: 600; }
.pf-s-best { flex-shrink: 0; font-size: 12px; color: var(--ink-3); }
.pf-empty {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0 14px;
  padding: 14px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-2);
}
.pf-empty b { color: var(--ink); }
.pf-empty svg { flex-shrink: 0; }

/* ---------- неделя ---------- */
.pf-week {
  margin: 0 14px;
  padding: 16px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.pf-week-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pf-week-num { font-family: var(--display); font-size: 28px; font-weight: 700; color: var(--ink); letter-spacing: -0.03em; }
.pf-week-sub { font-size: 13px; color: var(--ink-2); }
.pf-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 110px; margin-top: 14px; }
.pf-col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.pf-col i { display: block; width: 100%; max-width: 30px; border-radius: 8px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.pf-col.top i { background: var(--flow); box-shadow: none; }
.pf-col small { font-size: 11.5px; color: var(--ink-3); }
.pf-col.top small { color: var(--ink); font-weight: 700; }
.pf-recap {
  width: 100%;
  margin-top: 14px;
  padding: 11px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--flow);
  background: var(--flow-soft);
}
.pf-recap:disabled { opacity: .8; }

/* ---------- ачивки ---------- */
.pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 14px; }
.pf-ach {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px 11px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: center;
}
.pf-ach:active { transform: scale(.97); }
.pf-badge { position: relative; display: grid; place-items: center; }
.pf-badge .pf-medal { filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .22)); }
.pf-medal.locked { opacity: .55; }
.pf-emoji { position: absolute; font-size: 26px; line-height: 1; }
.pf-ach.locked .pf-emoji { filter: grayscale(1); opacity: .55; }
.pf-badge.big .pf-emoji { font-size: 40px; }
.pf-tier {
  position: absolute;
  bottom: -4px;
  padding: 1px 7px;
  border-radius: 8px;
  font-family: var(--display);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: rgba(10, 14, 23, .82);
}
.pf-a-title { font-size: 12.5px; font-weight: 700; color: var(--ink); line-height: 1.2; margin-top: 2px; }
.pf-a-bar { width: 80%; height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.pf-a-bar i { display: block; height: 100%; border-radius: 2px; background: var(--flow); }
.pf-a-goal { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.pf-sheet-head { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 18px 8px; text-align: center; }
.pf-sheet-head h2 { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-top: 8px; color: var(--ink); }
.pf-sheet-head p { font-size: 14px; color: var(--ink-2); }
.pf-steps { display: flex; flex-direction: column; gap: 8px; padding: 10px 18px 16px; }
.pf-step {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-2);
}
.pf-step-t {
  display: grid;
  place-items: center;
  height: 30px;
  border-radius: 9px;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--ta), var(--tb));
  opacity: .45;
}
.pf-step.done .pf-step-t, .pf-step.cur .pf-step-t { opacity: 1; }
.pf-step-goal { font-family: var(--display); font-size: 15px; font-weight: 600; color: var(--ink); }
.pf-step-goal small { font-family: inherit; font-size: 12px; font-weight: 500; color: var(--ink-2); }
.pf-step-st { font-size: 12.5px; color: var(--ink-3); }
.pf-step.done .pf-step-st { color: #1fb36b; font-weight: 600; }
.pf-step.cur { box-shadow: inset 0 0 0 1.5px var(--flow); }
#profile-sheet .btn-case { margin: 0 18px calc(18px + var(--safe-bottom)); width: calc(100% - 36px); }

/* ---------- уведомления ---------- */
.pf-notify { margin: 0 14px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.pf-n-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; }
.pf-n-row + .pf-n-row { border-top: 1px solid var(--line); }
.pf-n-row span { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.pf-n-row b { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.pf-n-row small { font-size: 12.5px; color: var(--ink-3); }

.pf-foot { padding: 16px 20px 4px; font-size: 12px; line-height: 1.45; color: var(--ink-3); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .pf-streak.risk .pf-flame { animation: none; }
}

/* ---------- архив (бывшая вкладка «Статистика») ---------- */
.pf-sep { display: flex; flex-direction: column; gap: 2px; padding: 26px 18px 2px; }
.pf-sep h2 { font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.pf-sep span { font-size: 12.5px; color: var(--ink-3); }
.pf-lock {
  display: flex;
  align-items: center;
  gap: 14px;
  width: calc(100% - 28px);
  margin: 16px 14px 0;
  padding: 14px 16px;
  border-radius: 20px;
  text-align: left;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.pf-lock-ico { flex-shrink: 0; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: var(--flow); background: var(--flow-soft); }
.pf-lock-body { display: flex; flex-direction: column; gap: 3px; }
.pf-lock-body b { font-size: 15px; font-weight: 600; color: var(--ink); }
.pf-lock-body small { font-size: 12.5px; line-height: 1.4; color: var(--ink-3); }

/* ---------- FLOW+ ---------- */
.pp-card {
  --gold: #f5b301;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 14px 0;
  padding: 16px;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(245, 179, 1, 0.16), transparent 60%),
    var(--surface);
  box-shadow: inset 0 0 0 1px rgba(245, 179, 1, 0.28);
}
.pp-card.low { box-shadow: inset 0 0 0 1px rgba(255, 77, 109, 0.4); }
.pp-top { display: flex; align-items: center; gap: 10px; }
.pp-crown {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #3b2600;
  background: linear-gradient(135deg, #ffe08a, #f5b301 60%, #e08a00);
  box-shadow: 0 6px 16px -6px rgba(245, 179, 1, 0.7);
}
.pp-crown.big { width: 60px; height: 60px; border-radius: 19px; }
.pp-crown.big svg { width: 32px; height: 32px; }
.pp-name { font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.pp-pill {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  background: var(--surface-2);
}
.pp-card.on .pp-pill { color: #1f9d55; background: rgba(34, 197, 94, 0.14); }
.pp-card.low .pp-pill { color: var(--caught); background: var(--caught-soft); }

.pp-main { display: flex; align-items: baseline; gap: 10px; }
.pp-big {
  font-family: var(--display);
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.pp-inf { color: var(--gold); }
.pp-unit { font-size: 14px; line-height: 1.3; color: var(--ink-2); }

.pp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pp-btn {
  height: 46px;
  border-radius: 14px;
  font-size: 14.5px;
  font-weight: 700;
  color: #3b2600;
  background: linear-gradient(135deg, #ffe08a, #f5b301);
}
.pp-btn.ghost { color: var(--ink); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.pp-btn.wide { width: 100%; height: 50px; font-size: 15px; }
.pp-btn:active { transform: scale(0.98); }
.pp-note { font-size: 12.5px; color: var(--ink-3); }
.pp-link { align-self: center; padding: 2px 8px; font-size: 13.5px; font-weight: 600; color: var(--flow); }

.pp-lead { margin: -2px 0 0; font-size: 14px; color: var(--ink-2); }
.pp-perks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pp-perk {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 10px;
  border-radius: 14px;
  background: var(--surface-2);
}
.pp-perk-ico {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: var(--pc);
  background: color-mix(in srgb, var(--pc) 15%, transparent);
}
.pp-perk b { display: block; font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.pp-perk small { display: block; font-size: 11.5px; color: var(--ink-3); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-perk > span:last-child { min-width: 0; }

/* история */
.pp-hist { display: flex; flex-direction: column; margin: 0 14px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.pp-h-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.pp-h-row + .pp-h-row { box-shadow: inset 0 1px 0 var(--line); }
.pp-h-ico { flex-shrink: 0; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; }
.pp-h-ico.star { color: #f5b301; background: rgba(245, 179, 1, 0.14); }
.pp-h-ico.card { color: var(--flow); background: var(--flow-soft); }
.pp-h-ico.gift { color: #a855f7; background: rgba(168, 85, 247, 0.14); }
.pp-h-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pp-h-body b { font-size: 14px; font-weight: 600; color: var(--ink); }
.pp-h-body small { font-size: 12px; color: var(--ink-3); }
.pp-h-days { font-size: 14px; font-weight: 700; color: #1f9d55; white-space: nowrap; }

/* шторка тарифов */
.pp-sheet-head { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 18px 6px; text-align: center; }
.pp-sheet-head h2 { margin-top: 8px; font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.pp-sheet-head p { font-size: 13.5px; color: var(--ink-2); }
.pp-plans { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 6px; }
.pp-plan {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 14px;
  border-radius: 16px;
  text-align: left;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.pp-plan:active { transform: scale(0.985); }
.pp-plan.best { background: radial-gradient(120% 140% at 100% 0%, rgba(245, 179, 1, 0.14), transparent 60%), var(--surface-2); box-shadow: inset 0 0 0 1.5px rgba(245, 179, 1, 0.55); }
.pp-plan-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pp-plan-main b { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.pp-plan-main small { font-size: 12.5px; color: var(--ink-3); }
.pp-tag { flex-shrink: 0; padding: 3px 8px; border-radius: 8px; font-size: 11.5px; font-weight: 700; color: #1f9d55; background: rgba(34, 197, 94, 0.14); }
.pp-tag.gold { color: #c98a00; background: rgba(245, 179, 1, 0.16); }
.pp-price { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 64px; }
.pp-price b { font-family: var(--display); font-size: 15px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.pp-price s { font-family: var(--text); font-size: 12px; font-weight: 500; color: var(--ink-3); }
.pp-price small { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; color: #e0a200; }
.pp-sheet-foot { padding: 6px 18px calc(18px + var(--safe-bottom)); font-size: 12px; text-align: center; color: var(--ink-3); }

/* ---------- шестерёнка и настройки ---------- */
.pf-gear { flex-shrink: 0; color: var(--ink-2); }
.ps-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 14px; }
.ps-head h2 { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.ps-body { display: flex; flex-direction: column; gap: 20px; overflow-y: auto; padding-bottom: 4px; }
.ps-sec { display: flex; flex-direction: column; gap: 10px; }
.ps-title { padding-left: 2px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.ps-sec .pf-notify { margin: 0; background: var(--surface-2); box-shadow: none; }
.ps-sec .pf-n-row { padding: 13px 14px; }

.ps-themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ps-theme {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 6px 11px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1.5px transparent;
  transition: box-shadow 0.18s ease, color 0.18s ease;
}
.ps-theme.on { color: var(--ink); box-shadow: inset 0 0 0 2px var(--flow); }
.ps-swatch {
  display: flex;
  width: 46px;
  height: 32px;
  overflow: hidden;
  border-radius: 9px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.ps-swatch i { flex: 1; }
.ps-swatch.t-light i { background: #eef0f4; }
.ps-swatch.t-light i + i { background: #ffffff; }
.ps-swatch.t-dark i { background: #0a0e17; }
.ps-swatch.t-dark i + i { background: #1a2232; }
.ps-swatch.t-auto i { background: #eef0f4; }
.ps-swatch.t-auto i + i { background: #0a0e17; }
.ps-swatch { box-shadow: inset 0 0 0 1px rgba(128, 128, 140, 0.45); }

/* разрешения бота */
.rt-pill { flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.rt-pill.on { color: #1f9d55; background: rgba(34, 197, 94, 0.14); }
.rt-pill.off { color: var(--caught); background: var(--caught-soft); }
.rt-how { margin: 2px 2px 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
.rt-how b { color: var(--ink-2); font-weight: 600; }
.pf-n-row span.rt-pill { flex: 0 0 auto; flex-direction: row; gap: 4px; }
