/* ─── Grouped table (iOS): section-card → section title → rows / cells ─────── */

.section-card {
  background: var(--section-bg);
  border-radius: 26px;
  overflow: hidden;
}

.section-title,
.section-card__title {
  margin: 20px 0 0;
  padding: 4px 16px 8px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hint);
}

/* Static info row: label left, value right. */
.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  font-size: 1rem;
}
.profile-row + .profile-row { border-top: 0.5px solid var(--separator); }

.profile-row__label { color: var(--text); }
.profile-row__value {
  color: var(--hint);
  font-variant-numeric: tabular-nums;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-row--action { width: 100%; text-align: left; }
.profile-row--action:active { background: color-mix(in srgb, var(--text) 5%, transparent); }
.profile-row__trail { display: flex; align-items: center; gap: 7px; flex: none; color: var(--hint); }
.profile-row__trail svg { width: 16px; height: 16px; }

.sub-activity-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
}
.sub-activity-row + .sub-activity-row { border-top: 0.5px solid var(--separator); }
.sub-activity-row__body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sub-activity-row__title { color: var(--text); font-size: 0.96rem; font-weight: 500; line-height: 1.25; }
.sub-activity-row__context { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; min-width: 0; color: var(--hint); font-size: 0.82rem; line-height: 1.25; }
.sub-activity-row__link {
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  line-height: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sub-activity-row__date { flex: none; padding-top: 2px; color: var(--hint); font-size: 0.78rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

.auction-countdown { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 20px 0 0; }
.auction-countdown__label { color: var(--text); font-size: 0.95rem; font-weight: 500; }
.auction-countdown__digits { display: flex; align-items: center; justify-content: center; gap: 5px; font-variant-numeric: tabular-nums; }
.auction-countdown__unit {
  display: inline-flex; align-items: baseline; justify-content: center; min-width: 49px; height: 52px; padding: 0 9px;
  color: var(--text); background: var(--section-bg); border: 0.5px solid var(--separator); border-radius: 16px;
}
.auction-countdown__unit--days { min-width: 62px; }
.auction-countdown__unit strong { font-size: 1.3rem; font-weight: 650; line-height: 51px; }
.auction-countdown__unit small { margin-left: 3px; color: var(--hint); font-size: 0.72rem; font-weight: 600; }
.auction-countdown__separator { color: var(--hint); font-size: 1rem; font-weight: 700; }

@media (max-width: 360px) {
  .auction-countdown__digits { gap: 3px; }
  .auction-countdown__unit { min-width: 43px; height: 48px; padding: 0 6px; border-radius: 14px; }
  .auction-countdown__unit--days { min-width: 53px; }
  .auction-countdown__unit strong { font-size: 1.12rem; line-height: 47px; }
}

/* Native grouped list: one rounded section containing inset-separated rows. */
.site-list {
  margin-top: 1rem;
}
.site-detail-heading {
  display: flex;
  align-items: center;
  min-width: 0;
}
.site-detail-heading .screen__title {
  min-width: 0;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.site-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 8px 16px;
  text-align: left;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s ease;
}
.site-row + .site-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 0.5px;
  background: var(--separator);
  pointer-events: none;
}
.site-row:active {
  background: color-mix(in srgb, var(--text) 6%, transparent);
}
.site-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; }
/* Per-site "Link" / "Re-link" pill (kicks off the on-chain DNS link from Sites). */
.site-row__link {
  flex: none;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  transition: background 0.12s;
}
.site-row__link:active { background: color-mix(in srgb, var(--accent) 22%, transparent); }
/* Inline text button that reads as a link (e.g. Retry inside a hint line). */
.tg-inline-link { color: var(--link); font: inherit; font-weight: 600; }
.tg-inline-link:active { opacity: 0.6; }
.site-row__name {
  font-size: 16px;
  font-weight: 590;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-list__hint {
  margin: 0.75rem 0.25rem 0;
  color: var(--hint);
  font-size: 0.8rem;
}
.site-row__meta {
  font-size: 13px;
  color: var(--hint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-row__value {
  flex: none;
  max-width: 42%;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  line-height: 19px;
  font-weight: 590;
  font-variant-numeric: tabular-nums;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Optional visual DNS catalog. Images are mounted only in card mode; generated
   artwork has explicit dimensions so the grid never shifts while it loads. */
.domain-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 1rem;
}
.domain-card-grid--search { margin-top: 0; }
.domain-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: var(--section-bg);
  color: var(--text);
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.domain-card:active { opacity: 0.72; transform: scale(0.985); }
.domain-card__artwork {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: color-mix(in srgb, var(--section-bg) 82%, var(--accent));
}
.domain-card__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.domain-card__fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 14px;
  color: var(--text);
  background: radial-gradient(circle at 12% 0%, #fff 0%, transparent 45%), linear-gradient(145deg, #cdeef3, #bfe0f7);
  font-size: 13px;
  font-weight: 650;
  overflow-wrap: anywhere;
  text-align: center;
}
.domain-card__corner {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.domain-card__corner .site-live-icon { width: 22px; height: 22px; }
.domain-card__corner .collection-mode-icon { flex-basis: 24px; width: 24px; height: 24px; }
.domain-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 10px 11px 12px;
}
.domain-card__name {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.2;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.domain-card__meta {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--hint);
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.domain-card__footer {
  display: flex;
  align-items: center;
  min-height: 24px;
  margin-top: auto;
  padding-top: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 590;
  font-variant-numeric: tabular-nums;
}
.domain-card-load-more { margin-top: 10px; }

/* TON Storage bag rows: a plain flex container with trailing seeder count + Delete. */
.bag-row { gap: 8px; align-items: center; }
.bag-row--busy { opacity: 0.5; pointer-events: none; }
/* Full bag id under the filename — wraps across lines (it's 64 hex chars) instead of
   truncating, so the whole shareable handle is visible; monospace for legibility. */
.site-row__meta--bag {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  line-height: 1.35;
}
.bag-row__btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: var(--hint);
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s, color 0.12s;
}
.bag-row__btn svg { width: 19px; height: 19px; }
.bag-row__btn:active { background: color-mix(in srgb, var(--text) 8%, transparent); }
.bag-row__btn--danger:active { color: var(--destructive); background: color-mix(in srgb, var(--destructive) 12%, transparent); }

.bag-row__seeders {
  flex: none;
  min-width: 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.bag-row__seeders-value { color: var(--text); font-size: 15px; line-height: 18px; font-weight: 590; }
.bag-row__seeders-label { color: var(--hint); font-size: 10px; line-height: 12px; }

/* The bag id/name area is tappable to open the detail screen. */
.bag-row__open {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px;
  text-align: left; background: none; border: 0; padding: 0; color: inherit;
  -webkit-tap-highlight-color: transparent; cursor: pointer;
}
.bag-row__open:active { opacity: 0.6; }

/* Under the bag name: short bag id + live status on one line (wraps if cramped). */
.bag-row__sub { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 2px; }
.bag-row__id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--hint); }
/* Small live status line (dot + label). */
.bag-row__live { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--hint); }
.bag-dot { width: 7px; height: 7px; border-radius: 999px; flex: none; background: var(--hint); }
.bag-dot--ok { background: var(--ok); }
.bag-dot--warn { background: #f0b429; }
.bag-dot--off { background: var(--hint); }

/* Upload / Import segmented toggle on the Create page. */
.bag-seg {
  display: flex; gap: 3px; padding: 3px; margin-bottom: 18px;
  background: var(--section-bg); border-radius: 12px;
}
.bag-seg__btn {
  flex: 1; height: 34px; border: 0; border-radius: 9px; background: none;
  color: var(--hint); font-size: 14px; font-weight: 590; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: background 0.15s, color 0.15s;
}
.bag-seg__btn--on { background: var(--bg); color: var(--text); }
/* TON DNS keeps the segmented behavior but uses the requested fully-rounded pill. */
.bag-seg--pill { border-radius: 999px; }
.bag-seg--pill .bag-seg__btn { border-radius: 999px; }

.provider-sort {
  display: flex; gap: 7px; overflow-x: auto; padding: 2px 2px 8px; margin: 16px -2px 4px;
  scrollbar-width: none;
}
.provider-sort::-webkit-scrollbar { display: none; }
.provider-sort__btn {
  flex: none; height: 30px; padding: 0 12px; border: 0; border-radius: 999px;
  background: var(--section-bg); color: var(--hint); font: 590 12px/1 inherit; cursor: pointer;
}
.provider-sort__btn--on { background: var(--accent); color: var(--accent-text, #fff); }
.provider-list { overflow: hidden; }
.provider-row {
  width: 100%;
  min-height: 58px;
  gap: 10px;
  padding: 5px 14px;
}
.provider-list .provider-row + .provider-row::before { left: 14px; right: 14px; }
.provider-row--on { box-shadow: inset 3px 0 var(--accent); }
.provider-row__flag {
  width: 34px;
  height: 34px;
  flex: none;
  overflow: hidden;
  border: 0.5px solid color-mix(in srgb, var(--text) 12%, transparent);
  border-radius: 50%;
  background: var(--secondary-bg);
}
.provider-row__flag .fi {
  display: block;
  width: 100%;
  height: 100%;
  background-size: cover;
}
.provider-row__flag-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--hint);
  font-size: 14px;
  font-weight: 590;
}
.provider-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0; text-align: left; }
.provider-row__identity { min-width: 0; display: flex; align-items: center; gap: 6px; }
.provider-row__name { min-width: 0; overflow: hidden; color: var(--text); font-size: 14px; line-height: 17px; font-weight: 590; text-overflow: ellipsis; white-space: nowrap; }
.provider-row__stored { flex: none; padding: 2px 7px; color: var(--hint); font-size: 10.5px; line-height: 14px; }
.provider-row__meta,
.provider-row__price {
  overflow: hidden;
  color: var(--hint);
  font-size: 11.5px;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.provider-quote { margin-top: 14px; overflow: hidden; }
.paid-pin__menu { margin-top: 18px; overflow: hidden; }
.paid-pin-row {
  width: 100%; min-height: 62px; display: flex; align-items: center; gap: 11px;
  padding: 10px 14px; border: 0; background: none; color: inherit;
  font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.paid-pin-row + .paid-pin-row { border-top: 1px solid var(--separator); }
.paid-pin-row:active { background: color-mix(in srgb, var(--text) 5%, transparent); }
.paid-pin-row:disabled { opacity: 0.45; cursor: default; }
.paid-pin-row__copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.paid-pin-row__copy strong { color: var(--text); font-size: 15px; line-height: 19px; font-weight: 590; }
.paid-pin-row__copy small {
  overflow: hidden; color: var(--hint); font-size: 12px; line-height: 16px;
  text-overflow: ellipsis; white-space: nowrap;
}
.paid-pin-row__value { max-width: 42%; color: var(--accent); font-size: 13px; text-align: right; }
.paid-pin-row__chevron {
  width: 8px; height: 8px; flex: none; margin-right: 2px;
  border-top: 1.5px solid var(--hint); border-right: 1.5px solid var(--hint);
  transform: rotate(45deg);
}
.paid-pin__note { margin: 4px 6px 0; font-size: 12.5px; line-height: 17px; text-align: center; }
.paid-pin__cta { margin-top: 16px; }
.provider-picker { width: 100%; min-height: 0; display: flex; flex-direction: column; }
.provider-picker__summary { flex: none; margin: 0 4px 3px; font-size: 12.5px; }
.provider-picker__sort { flex: none; margin-top: 8px; }
.provider-picker__scroll {
  min-height: 0;
  max-height: 52dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: max(var(--safe-bottom), 4px);
}
.provider-picker__empty { margin: 36px 8px; text-align: center; }
.provider-telemetry { margin: 12px 4px 0; color: var(--hint); font-size: 11.5px; line-height: 16px; text-align: center; }
.provider-telemetry a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.provider-check {
  width: 24px; height: 24px; flex: none; display: grid; place-items: center;
  border: 1.5px solid color-mix(in srgb, var(--hint) 45%, transparent);
  border-radius: 999px; color: #fff; font-size: 14px; font-weight: 700;
}
.provider-check--on { border-color: var(--accent); background: var(--accent); }
.funding-choices { margin-top: 0; overflow: hidden; }
.funding-choice {
  width: 100%;
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px 11px 16px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.funding-choice + .funding-choice { border-top: 1px solid var(--separator); }
.funding-choice:active { background: color-mix(in srgb, var(--text) 5%, transparent); }
.funding-choice--on { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.funding-choice:disabled { opacity: 0.45; cursor: default; }
.funding-choice__copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.funding-choice__copy strong {
  color: var(--text);
  font-size: 16px;
  line-height: 21px;
  font-weight: 590;
  letter-spacing: -0.2px;
}
.funding-choice__copy small {
  overflow: hidden;
  color: var(--hint);
  font-size: 13px;
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.funding-choice__radio {
  width: 22px;
  height: 22px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1.5px solid color-mix(in srgb, var(--hint) 45%, transparent);
  border-radius: 999px;
}
.funding-choice--on .funding-choice__radio { border-color: var(--accent); }
.funding-choice__radio span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
}
.funding-slider { margin: 18px 0 16px; }
.funding-slider--explained {
  padding: 14px 0 10px;
  border-radius: 14px;
  background: var(--section-bg);
}
.funding-slider__heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 0 16px 10px;
}
.funding-slider__copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.funding-slider__copy strong {
  color: var(--text);
  font-size: 15px;
  line-height: 19px;
  font-weight: 590;
}
.funding-slider__copy small {
  color: var(--hint);
  font-size: 12px;
  line-height: 16px;
}
.funding-slider__selected {
  flex: none;
  padding-top: 1px;
  color: var(--accent);
  font-size: 14px;
  line-height: 19px;
  font-weight: 590;
  font-variant-numeric: tabular-nums;
}
.funding-slider__value {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 22px;
  line-height: 28px;
  font-weight: 650;
  text-align: center;
}
.funding-slider__control { position: relative; padding: 0 16px; }
.funding-slider__input {
  --funding-progress: 25%;
  display: block;
  width: 100%;
  height: 32px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
  touch-action: pan-x;
}
.funding-slider__input::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    var(--accent) 0 var(--funding-progress),
    color-mix(in srgb, var(--text) 20%, transparent) var(--funding-progress) 100%
  );
}
.funding-slider__input::-webkit-slider-thumb {
  width: 38px;
  height: 24px;
  margin-top: -9px;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0.5px 4px rgba(0, 0, 0, 0.12), 0 6px 13px rgba(0, 0, 0, 0.12);
}
.funding-slider__input::-moz-range-track {
  height: 6px;
  border: 0;
  border-radius: 3px;
  background: color-mix(in srgb, var(--text) 20%, transparent);
}
.funding-slider__input::-moz-range-progress {
  height: 6px;
  border-radius: 3px;
  background: var(--accent);
}
.funding-slider__input::-moz-range-thumb {
  width: 38px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0.5px 4px rgba(0, 0, 0, 0.12), 0 6px 13px rgba(0, 0, 0, 0.12);
}
.funding-slider__input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 999px; }
.funding-slider__bounds {
  display: flex;
  justify-content: space-between;
  padding: 0 16px;
  color: var(--hint);
  font-size: 11px;
  line-height: 14px;
  font-variant-numeric: tabular-nums;
}
.funding-slider__markers {
  position: relative;
  min-height: 16px;
  margin: 0 16px;
  color: var(--hint);
  font-size: 11px;
  line-height: 14px;
}
.funding-slider__marker {
  position: absolute;
  top: 0;
  max-width: 88px;
  transform: translateX(-50%);
  text-align: center;
  white-space: nowrap;
}
.funding-slider__marker--start { left: 0; transform: none; text-align: left; }
.funding-slider__marker--end { transform: translateX(-100%); text-align: right; }
.funding-slider--loading .funding-slider__input { opacity: 0.45; cursor: default; }
.funding-settings { margin: 12px 0; overflow: hidden; }
.funding-settings .paid-pin-row { min-height: 58px; }
.funding-settings .paid-pin-row:disabled { opacity: 1; }
.funding-settings .paid-pin-row:disabled .paid-pin-row__value { color: var(--ok); }
.funding-slider__ticks {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 16px;
  left: 16px;
  height: 10px;
  transform: translateY(-50%);
  pointer-events: none;
}
.funding-slider__ticks span {
  position: absolute;
  top: 0;
  width: 2px;
  height: 10px;
  border-radius: 1px;
  background: color-mix(in srgb, var(--text) 30%, var(--bg));
  transform: translateX(-50%);
  transition: opacity 120ms ease;
}
.funding-slider__ticks .funding-slider__tick--active { opacity: 0; }
.funding-breakdown { overflow: hidden; }
.funding-breakdown__total {
  min-height: 48px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.funding-breakdown__total span:first-child { color: var(--text); font-weight: 590; }
.funding-breakdown__total span:last-child { color: var(--accent); font-size: 15px; font-weight: 700; }
.funding-value-skeleton {
  display: inline-block;
  width: 58px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--hint) 16%, transparent) 20%,
    color-mix(in srgb, var(--hint) 30%, transparent) 50%,
    color-mix(in srgb, var(--hint) 16%, transparent) 80%
  );
  background-size: 220% 100%;
  animation: funding-value-shimmer 1.1s ease-in-out infinite;
}
.funding-value-skeleton--wide { width: 76px; }
.value-skeleton--file { width: 132px; height: 13px; border-radius: 5px; }
.value-skeleton--meta { width: 54px; height: 9px; }
.value-skeleton--status { width: 68px; height: 20px; }
@keyframes funding-value-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .funding-value-skeleton { animation: none; }
}
.funding-status { margin: 18px 6px 2px; font-size: 12.5px; line-height: 17px; text-align: center; }
.funding-error { margin: 14px 6px 0; text-align: center; }
.funding-error .errtext { margin: 0; font-size: 12.5px; line-height: 17px; }
.funding-retry {
  margin-top: 7px;
  padding: 5px 10px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: 590 13px/17px inherit;
}
.funding-wallet-fee { margin: 8px 6px 0; font-size: 12px; line-height: 16px; text-align: center; }
.provider-quote { margin-top: 0; }
.provider-review__total { min-height: 48px; background: color-mix(in srgb, var(--accent) 8%, transparent); }
.provider-review__total span:first-child { color: var(--text); font-weight: 590; }
.provider-review__total span:last-child { color: var(--accent); font-size: 15px; font-weight: 700; }
.provider-review__section-title { margin-top: 18px; }
.provider-quote__pay { margin-top: 8px; }
.provider-review__notes { display: grid; gap: 2px; margin-top: 6px; }
.provider-review__notes .funding-wallet-fee { margin: 0 6px; }

/* Seeding pill pushed to the right of the bag name on the detail title line. */
.bag-detail__pill { margin-left: auto; flex: none; }
.value-loading-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* Live seeding pill. */
.bag-detail__status { margin: -2px 0 16px; }

/* Shared iOS-style detail actions: icon-over-label tinted cards. */
.detail-actions,
.bag-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 22px; }
.detail-action,
.bag-action {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 4px 10px; border: 0; border-radius: 24px;
  background: var(--section-bg); color: var(--accent); cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: opacity 0.12s;
}
.detail-action { height: 76px; padding: 9px 4px; border-radius: 26px; }
.detail-action:active,
.bag-action:active { opacity: 0.6; }
.detail-action:disabled,
.bag-action:disabled { opacity: 0.4; cursor: default; }
.detail-action svg,
.bag-action svg { width: 24px; height: 24px; }
.domain-action-icon {
  display: block;
  width: 24px;
  height: 24px;
  flex: none;
  background: currentColor;
}
.domain-action-icon--send {
  -webkit-mask: url("../assets/telegram-domain-send.svg") center / contain no-repeat;
  mask: url("../assets/telegram-domain-send.svg") center / contain no-repeat;
}
.domain-action-icon--fragment {
  -webkit-mask: url("../assets/telegram-fragment.svg") center / contain no-repeat;
  mask: url("../assets/telegram-fragment.svg") center / contain no-repeat;
}
.domain-sell-icon {
  display: block; width: 29px; height: 24px; flex: none;
  background: url("../assets/telegram-domain-sell.svg") center / contain no-repeat;
}
.icon-link {
  display: block;
  width: 24px;
  height: 24px;
  flex: none;
  background: currentColor;
  -webkit-mask: url("../assets/telegram-addlink.svg") center / contain no-repeat;
  mask: url("../assets/telegram-addlink.svg") center / contain no-repeat;
}
.detail-action__label,
.bag-action__label { max-width: 100%; font-size: 12px; font-weight: 590; line-height: 1.15; overflow-wrap: anywhere; }
.detail-action__label {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.detail-action--danger,
.bag-action--danger { color: var(--destructive); }

.site-versions__loading { padding: 32px 0; }
.site-version {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 11px 16px;
}
.site-version + .site-version { border-top: 0.5px solid var(--separator); }
.site-version__copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 3px; }
.site-version__copy strong { overflow: hidden; color: var(--text); font-size: 15px; font-weight: 590; text-overflow: ellipsis; white-space: nowrap; }
.site-version__copy small { overflow: hidden; color: var(--hint); font-size: 12px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.site-version__restore {
  min-height: 34px;
  padding: 7px 13px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 600;
}
.site-version__restore:active { opacity: 0.7; }
.site-version__restore:disabled { opacity: 0.45; }
.site-versions__note { margin-top: 14px; }

/* A file row in the detail screen carries a trailing download button. */
.bag-file { gap: 8px; align-items: center; }

/* Key/value details block. */
.bag-kv__row { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; font-size: 15px; }
.bag-kv__row + .bag-kv__row { border-top: 0.5px solid var(--separator); }
.bag-kv__row > span:first-child { color: var(--hint); }
.bag-kv__row > span:last-child { font-variant-numeric: tabular-nums; }
.paid-storage-action {
  width: 100%; min-height: 50px; display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; border: 0; border-top: 0.5px solid var(--separator);
  background: none; color: var(--accent); font: 590 15px/19px inherit;
  text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.paid-storage-action:active { background: color-mix(in srgb, var(--text) 6%, transparent); }
.paid-storage-action:disabled { opacity: 0.45; cursor: default; }
.paid-storage-action[aria-disabled="true"] { opacity: 0.45; cursor: default; }
.paid-storage-action--danger { color: var(--destructive); }
.paid-storage-action__value {
  min-width: 0; flex: 1; overflow: hidden; color: var(--hint); font-size: 13px;
  font-weight: 400; text-align: right; text-overflow: ellipsis; white-space: nowrap;
}
.paid-storage-action > .paid-pin-row__chevron { margin-left: auto; }
.provider-status-row { align-items: center; padding-top: 11px; padding-bottom: 11px; }
.provider-status { display: flex; flex-direction: column; gap: 2px; color: var(--hint); }
.provider-status__line {
  overflow: visible;
  color: var(--hint);
  font-size: 13px;
  line-height: 17px;
  overflow-wrap: anywhere;
  white-space: normal;
}
.site-row + .provider-add-row { border-top: 0.5px solid var(--separator); }
.provider-add-row { min-height: 56px; gap: 14px; color: var(--accent); }
.provider-add-row__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: none;
  border: 1.5px dashed currentColor;
  border-radius: 50%;
}
.provider-add-row__icon svg { width: 18px; height: 18px; }
.runway-editor { display: grid; gap: 10px; }
.runway-editor__submit { margin-top: 10px; }

/* Action row (full-width tappable, accent or destructive). */
.action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 16px;
  font-size: 1rem;
  color: var(--link);
  text-align: left;
  transition: background 0.12s, opacity 0.15s;
}
.action-row + .action-row,
.profile-row + .action-row { border-top: 0.5px solid var(--separator); }
.action-row:disabled { opacity: 0.5; cursor: not-allowed; }
.action-row:not(:disabled):active { background: color-mix(in srgb, var(--text) 6%, transparent); }
.action-row--destructive { color: var(--destructive); }
.action-row__icon { display: inline-flex; width: 22px; justify-content: center; }
.action-row__label { flex: 1; }

/* Status badge — ONE system (sites + storage), mirroring the web dashboard: a neutral
   pill with NO status dot; the state is read from the text tone alone (on = bright
   active, warn = amber, off = dimmed). */
.sbadge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  background: color-mix(in srgb, var(--text) 9%, transparent);
  white-space: nowrap;
}
.sbadge--on { color: var(--text); }
.sbadge--warn { color: #d99a12; }
.sbadge--off { color: var(--hint); }

.site-live-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
}
.site-live-icon::before {
  content: "";
  position: absolute;
  inset: 10.71%;
  background: var(--hint);
  -webkit-mask: url("../assets/site-live.svg") center / 100% 100% no-repeat;
  mask: url("../assets/site-live.svg") center / 100% 100% no-repeat;
}

.site-status {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--hint);
}
.site-live-icon--live::before { background: #34c759; }
.site-live-icon--warning::before { background: #ff9f0a; }
.site-live-icon--error::before { background: #ff3b30; }
.site-status__label { color: var(--text); }

.collection-mode-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  overflow: hidden;
}
.collection-mode-icon::before,
.collection-mode-icon::after {
  content: "";
  position: absolute;
  background: var(--hint);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}
.collection-mode-icon--locked::before {
  inset: 10.71% 21.43%;
  -webkit-mask-image: url("../assets/collection-locked.svg");
  mask-image: url("../assets/collection-locked.svg");
}
.collection-mode-icon--linked::before {
  inset: 10.71%;
  -webkit-mask-image: url("../assets/collection-linked.svg");
  mask-image: url("../assets/collection-linked.svg");
}
.collection-mode-icon--unlinked::before {
  inset: 25% 10.71% 14.29% 21.43%;
  -webkit-mask-image: url("../assets/collection-unlinked-chain.svg");
  mask-image: url("../assets/collection-unlinked-chain.svg");
}
.collection-mode-icon--unlinked::after {
  inset: 10.71% 53.57% 53.57% 10.71%;
  -webkit-mask-image: url("../assets/collection-unlinked-spark.svg");
  mask-image: url("../assets/collection-unlinked-spark.svg");
}
