/* Партнёрка деньгами: шапка (значок 56 px + заголовок, процент пилюлей) → карточка баланса (доступно крупно,
   «Вывести» / «Обменять на 💎», в ожидании, выведено, заработано) → ссылка, друзья и метки → история →
   «Как это работает». «Поделиться» — в нижней панели .dock (chrome.css). Шторки вывода и обмена — .psheet.
   Число и значок не разрываются: суммы в .nowrap, в текстах — неразрывный пробел (screens/partner/model.js). */

.screen[data-screen="partner"] { display: flex; flex-direction: column; }
.screen[data-screen="partner"] > .partner { flex: 1 0 auto; }
.screen[data-screen="partner"] > .topbar,
.screen[data-screen="partner"] > .dock { flex: 0 0 auto; }
.partner { padding-bottom: 16px; }
.partner__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: var(--page-narrow, 760px);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Шапка ---------- */
.partner-hero {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: var(--page-narrow, 760px);
  margin-inline: auto;
  padding: 12px var(--gutter) 14px;
}
.partner-hero__row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.partner-hero__orb {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--grad-diag);
  box-shadow: 0 0 0 5px rgba(255, 45, 120, 0.12), 0 8px 26px rgba(255, 45, 120, 0.4);
}
.partner-hero__orb .icon { width: 26px; height: 26px; }
.partner-hero__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.partner-hero__title { font-size: 22px; font-weight: 900; letter-spacing: -0.02em; line-height: 1.15; }
.partner-hero__lead { font-size: 13px; line-height: 1.35; color: var(--muted); }
.partner-hero__pills { display: flex; flex-wrap: wrap; gap: 8px; }
.partner-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  color: rgba(242, 240, 255, 0.85);
  background: var(--card);
  border: 1px solid var(--line-2);
}
.partner-pill b { font-size: 16px; font-weight: 900; color: #fff; white-space: nowrap; }
.partner-pill--hot { border-color: rgba(255, 45, 120, 0.5); background: rgba(255, 45, 120, 0.14); }

/* ---------- Баланс ---------- */
.pbal {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(45, 212, 160, 0.16), transparent 60%),
    linear-gradient(160deg, var(--card-2), var(--card));
  border: 1px solid rgba(45, 212, 160, 0.28);
  box-shadow: var(--elev-1), var(--inner-hi);
}
.pbal--sk { min-height: 236px; }
.pbal__head { display: flex; flex-direction: column; gap: 2px; }
.pbal__caption { font-size: 13px; font-weight: 600; color: var(--muted); }
.pbal__amount {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.pbal__amount.is-negative { color: var(--red); }
.pbal__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pbal__btn { min-width: 0; padding-inline: 12px; white-space: nowrap; }
.pbal__btn span { overflow: hidden; text-overflow: ellipsis; }
.pbal__note, .pbal__warn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-2);
}
.pbal__note .icon, .pbal__warn .icon { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 1px; color: var(--focus); }
.pbal__warn {
  padding: 8px 10px;
  border-radius: var(--r);
  background: rgba(255, 77, 94, 0.1);
  border: 1px solid rgba(255, 77, 94, 0.3);
}
.pbal__warn .icon { color: var(--red); }
.pbal__rows { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-top: 4px; }
.pbal__row {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 12px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.pbal__row:last-child { border-bottom: 0; }
.pbal__label { font-size: 14px; color: var(--text-2); }
.pbal__value { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.pbal__hint { grid-column: 1 / -1; font-size: 12px; color: var(--muted-2); }

/* ---------- Ссылка, друзья, метки ---------- */
.partner-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line-2);
}
.partner-card__hint { font-size: 13px; line-height: 1.45; color: var(--muted); }
.partner-card__label { font-size: 13px; font-weight: 600; color: var(--muted); }
.partner-skel--label { width: 60%; height: 18px; border-radius: 6px; }
.partner-skel--link { height: 56px; border-radius: var(--r); }
.partner-skel--stat { height: 62px; border-radius: var(--r); }
.partner-skel--btn { height: var(--btn-h-lg); border-radius: var(--r-pill); }

.partner-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 8px 8px 8px 14px;
  border-radius: var(--r);
  text-align: left;
  color: var(--text);
  background: var(--bg);
  border: 1px dashed rgba(255, 45, 120, 0.55);
  transition: background var(--t-fast), border-color var(--t), transform var(--t-fast) var(--ease);
}
.partner-link:active { transform: scale(0.99); background: var(--card); }
.partner-link.is-copied { border-style: solid; border-color: var(--green); }
.partner-link__icon { display: inline-flex; color: var(--pink); }
.partner-link__icon .icon { width: 20px; height: 20px; }
.partner-link__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
}
.partner-link__copy {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  color: #fff;
  background: var(--card-3);
  transition: background var(--t);
}
.partner-link.is-copied .partner-link__copy { background: var(--green); }
.partner-link__copy .icon { width: 18px; height: 18px; }

.partner-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.partner-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 10px;
  border-radius: var(--r);
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.partner-stat b { font-size: 19px; font-weight: 900; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.partner-stat > span { font-size: 12px; line-height: 1.25; color: var(--muted); }

.plinks { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; border-top: 1px solid var(--line); }
.plinks__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.plinks__title { font-size: 16px; font-weight: 800; }
.plinks__count { font-size: 12px; color: var(--muted-2); white-space: nowrap; }
.plinks__list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.plinks__empty { font-size: 13px; line-height: 1.45; color: var(--muted); }
.plink {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 6px 8px 12px;
  border-radius: var(--r);
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.plink__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.plink__name { font-size: 15px; font-weight: 800; color: var(--text); overflow-wrap: anywhere; }
.plink__stats { font-size: 12px; line-height: 1.4; color: var(--muted); }
.plink__btn {
  flex: 0 0 auto;
  width: var(--tap);
  height: var(--tap);
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  color: #fff;
  background: var(--card-3);
  transition: background var(--t);
}
.plink__btn .icon { width: 18px; height: 18px; }
.plink__btn.is-copied { background: var(--green); }
.plink__btn--ghost { background: transparent; color: var(--muted); }
.plinks__form { display: flex; flex-direction: column; gap: 6px; }
.plinks__row { display: flex; gap: 8px; }
.plinks__input { flex: 1; min-width: 0; }
.plinks__row .btn { flex: 0 0 auto; }

/* ---------- История ---------- */
.phist__list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); }
.phist__row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.phist__row:last-child { border-bottom: 0; }
.phist__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.phist__label { font-size: 14px; font-weight: 600; }
.phist__details { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.phist__side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.phist__amount { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.phist__amount.is-plus { color: var(--green); }
.phist__amount.is-minus { color: var(--text-2); }
.phist__amount.is-pending { color: var(--amber); }
.phist__date { font-size: 12px; color: var(--muted-2); white-space: nowrap; }
.phist__empty { font-size: 13px; color: var(--muted); padding: 4px 2px; }

/* ---------- Как это работает ---------- */
.partner-steps { padding-top: 4px; }
.partner-steps__list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.partner-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r);
  background: var(--card);
  border: 1px solid var(--line);
}
.partner-step__num {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  background: var(--grad-diag);
}
.partner-step__body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.partner-step__body b { font-size: 15px; }
.partner-step__body span { font-size: 13px; line-height: 1.4; color: var(--muted); }
.partner-step__reward {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  color: var(--amber);
  background: rgba(255, 181, 71, 0.12);
  border: 1px solid rgba(255, 181, 71, 0.3);
}
.partner-example {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: var(--r);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--text);
  background: rgba(45, 212, 160, 0.1);
  border: 1px solid rgba(45, 212, 160, 0.28);
}
.partner-fine { margin-top: 10px; padding: 0 4px; font-size: 12px; line-height: 1.5; color: var(--muted-2); }

/* ---------- Шторки вывода и обмена ---------- */
.psheet__body { display: flex; flex-direction: column; gap: 12px; padding-bottom: 8px; }
.psheet__lead { font-size: 13px; line-height: 1.45; color: var(--muted); }
.psheet__field { margin-bottom: 0; }
.psheet__amount-row { display: flex; align-items: center; gap: 8px; }
.psheet__currency { font-size: 22px; font-weight: 900; color: var(--muted); }
.psheet__amount { flex: 1; min-width: 0; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.psheet__all { flex: 0 0 auto; }
.psheet__seg { width: 100%; }
.psheet__result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px;
  border-radius: var(--r);
  background: rgba(110, 231, 249, 0.08);
  border: 1px solid rgba(110, 231, 249, 0.26);
  text-align: center;
}
.psheet__gems { font-size: 28px; font-weight: 900; color: var(--gem, #6ee7f9); }
.psheet__split { font-size: 13px; color: var(--text-2); }
.psheet__confirm { display: flex; flex-direction: column; gap: 12px; }
.psheet__confirm-title { font-size: 20px; font-weight: 900; line-height: 1.25; }
.psheet__rows { display: flex; flex-direction: column; margin: 0; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); }
.psheet__row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.psheet__row:last-child { border-bottom: 0; }
.psheet__row dt { font-size: 13px; color: var(--muted); }
.psheet__row dd { margin: 0; font-size: 14px; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.psheet__warn { font-size: 13px; line-height: 1.45; color: var(--amber); }
.psheet__buttons { gap: 8px; }

/* ---------- Планшет и десктоп ---------- */
@media (min-width: 600px) {
  .partner-hero__title { font-size: 26px; }
  .partner-card, .pbal { padding: 18px; }
}
