/* AdPost · Telegram Mini App demo (light theme on top of kit.css) */

:root {
  --app-bg: #f1f3f6;
  --app-bg-2: #ffffff;
  --app-card: #ffffff;
  --app-text: #0f1419;
  --app-hint: #707a86;
  --app-line: rgba(15, 20, 25, 0.08);
  --app-accent: #2aabee;
  --app-accent-text: #ffffff;
  --hdr-bg: #ffffff;
  --app-danger: #e5484d;
  --app-success: #1f9d55;

  --accent-ink: #1679c1;
  --accent-soft: rgba(42, 171, 238, 0.12);
  --accent-fill: linear-gradient(180deg, #33b3f2 0%, #1b98e3 100%);
  --green-ink: #178a46;
  --green-soft: rgba(31, 157, 85, 0.12);
  --amber-ink: #b26b00;
  --amber-soft: rgba(255, 170, 30, 0.16);
  --fill-2: rgba(118, 128, 140, 0.12);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 6px 18px rgba(16, 24, 40, 0.08), 0 1px 3px rgba(16, 24, 40, 0.05);

  --stage-text: #0f1419;
  --stage-hint: #556170;
  --stage-bg: radial-gradient(55% 65% at 22% 35%, rgba(42, 171, 238, 0.26), transparent 62%),
    radial-gradient(45% 55% at 82% 78%, rgba(110, 140, 255, 0.2), transparent 62%),
    radial-gradient(40% 40% at 90% 10%, rgba(42, 171, 238, 0.12), transparent 60%), linear-gradient(160deg, #f4f9fe 0%, #e4eff9 100%);
}

body {
  background: var(--stage-bg);
  background-attachment: fixed;
}

/* ——— Kit tweaks for a light app ——— */
.phone {
  box-shadow:
    0 0 0 2px #2b2c31,
    0 0 0 6px #121316,
    0 40px 80px rgba(20, 60, 110, 0.28),
    0 12px 24px rgba(20, 60, 110, 0.12);
}

.tg-header {
  border-bottom-color: rgba(15, 20, 25, 0.07);
}

.tg-header__close {
  color: var(--accent-ink);
}

.tg-header__more {
  border-color: var(--accent-ink);
  color: var(--accent-ink);
}

.info__kicker {
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 0 1px rgba(15, 20, 25, 0.06), 0 4px 12px rgba(20, 60, 110, 0.06);
  color: #3d4855;
}

.info__try {
  border-color: rgba(15, 20, 25, 0.18);
  background: rgba(255, 255, 255, 0.45);
}

.info__foot {
  opacity: 1;
}

.sheet.is-open {
  background: rgba(15, 20, 25, 0.4);
}

.sheet__panel {
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  outline: none;
}

.sheet__grip {
  background: rgba(15, 20, 25, 0.16);
}

.toast {
  bottom: var(--toast-b, 84px);
  background: rgba(22, 27, 34, 0.94);
  box-shadow: 0 10px 30px rgba(15, 20, 25, 0.25);
}

.mainbtn {
  background: var(--accent-fill);
  box-shadow: 0 6px 16px rgba(27, 152, 227, 0.28);
  font-variant-numeric: tabular-nums;
  animation: mainIn 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

.mainbtn.is-bump {
  animation: mainBump 0.45s ease;
}

@keyframes mainIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes mainBump {
  30% {
    transform: scale(1.035);
  }
  60% {
    transform: scale(0.985);
  }
}

.demo-note {
  padding-top: 22px;
}

.demo-note a {
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 600;
}

/* ——— Basics ——— */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.hint {
  color: var(--app-hint);
  font-size: 13px;
}

.card {
  border-radius: 16px;
  background: var(--app-card);
  box-shadow: var(--shadow-sm);
}

h1,
h2,
h3 {
  letter-spacing: -0.01em;
}

.view {
  display: none;
  padding: 14px 16px 12px;
  animation: viewIn 0.28s ease;
}

.view.is-active {
  display: block;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.page-head {
  margin: 4px 2px 16px;
}

.page-head h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-head .hint {
  margin-top: 2px;
  font-size: 14px;
}

.sec {
  margin: 22px 4px 8px;
  color: var(--app-hint);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sec--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
  margin-bottom: 8px;
}

.sec__h {
  font: inherit;
  letter-spacing: inherit;
}

.fine {
  margin: 10px 4px 0;
  color: var(--app-hint);
  font-size: 12.5px;
  line-height: 1.45;
}

.fine--tight {
  margin-top: 8px;
}

.fine--icon {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-bottom: 8px;
}

.fine--icon svg {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: var(--green-ink);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  border-radius: 13px;
  font-weight: 650;
  font-size: 16px;
  transition: transform 0.15s ease, opacity 0.2s ease, background-color 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn svg {
  width: 20px;
  height: 20px;
}

.btn--primary {
  background: var(--accent-fill);
  color: #fff;
  box-shadow: 0 6px 16px rgba(27, 152, 227, 0.25);
}

.btn--ghost {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.btn--plain {
  color: var(--app-danger);
  min-height: 44px;
  font-size: 15px;
}

.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 650;
  font-size: 13.5px;
  transition: transform 0.15s ease, background-color 0.2s ease;
}

.btn-sm:active {
  transform: scale(0.96);
}

.btn-sm svg {
  width: 16px;
  height: 16px;
}

.btn-sm--muted {
  background: var(--fill-2);
  color: var(--app-text);
}

:focus-visible {
  outline: 2px solid var(--app-accent);
  outline-offset: 2px;
}

.sheet__panel:focus,
.sheet__panel:focus-visible {
  outline: none;
}

.ic {
  flex: none;
  width: 18px;
  height: 18px;
}

.is-quiet .ch,
.is-quiet .order,
.is-quiet .order.is-open .cbar i {
  animation: none;
}

/* ——— Avatars ——— */
.av {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  user-select: none;
}

.av--emoji {
  font-size: 22px;
  line-height: 1;
}

.av--lg {
  width: 60px;
  height: 60px;
  font-size: 19px;
}

.av--lg.av--emoji {
  font-size: 30px;
}

.av--sm {
  width: 36px;
  height: 36px;
  font-size: 12.5px;
}

.av--sm.av--emoji {
  font-size: 18px;
}

.av--xs {
  width: 26px;
  height: 26px;
  font-size: 10px;
}

.av--xs.av--emoji {
  font-size: 13px;
}

.vf {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--app-accent);
}

/* ——— Catalog head ——— */
.cat-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 2px 0;
}

.cat-head__text {
  min-width: 0;
}

.eyebrow {
  color: var(--app-hint);
  font-size: 14px;
  font-weight: 500;
}

.cat-head h1 {
  margin-top: 1px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.wallet-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px 0 10px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--app-line);
  font-variant-numeric: tabular-nums;
  transition: transform 0.15s ease;
}

.wallet-pill:active {
  transform: scale(0.96);
}

.wallet-pill svg {
  width: 18px;
  height: 18px;
  color: var(--app-accent);
}

.wallet-pill b {
  font-size: 14.5px;
  font-weight: 700;
}

/* ——— Search ——— */
.search {
  position: relative;
  margin-top: 16px;
}

.search input {
  width: 100%;
  height: 44px;
  padding: 0 42px 0 40px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--app-line);
  font-size: 15px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: box-shadow 0.2s ease;
}

.search input::placeholder {
  color: #8d96a1;
}

.search input:focus {
  box-shadow: 0 0 0 3px rgba(42, 171, 238, 0.18), inset 0 0 0 1.5px var(--app-accent);
}

.search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.search__icon {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 20px;
  height: 20px;
  color: #8d96a1;
  pointer-events: none;
}

.search__clear {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(118, 128, 140, 0.18);
  color: #5b6570;
}

.search__clear[hidden] {
  display: none;
}

.search__clear svg {
  width: 14px;
  height: 14px;
}

/* ——— Chips ——— */
.chips {
  display: flex;
  gap: 8px;
  margin: 12px -16px 0;
  padding: 2px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-padding: 0 16px;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--app-line);
  color: var(--app-text);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.chip:active {
  transform: scale(0.95);
}

.chip small {
  color: var(--app-hint);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.chip.is-active {
  background: var(--app-text);
  box-shadow: none;
  color: #fff;
}

.chip.is-active small {
  color: rgba(255, 255, 255, 0.6);
}

/* ——— Segmented control ——— */
.seg {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 12px;
  padding: 3px;
  border-radius: 11px;
  background: rgba(118, 128, 140, 0.14);
}

.seg__glider {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / 3);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 20, 25, 0.12), 0 1px 1px rgba(15, 20, 25, 0.04);
  transform: translateX(calc(var(--i, 0) * 100%));
  transition: transform 0.32s cubic-bezier(0.3, 0.8, 0.3, 1);
}

.seg__btn {
  position: relative;
  z-index: 1;
  height: 32px;
  border-radius: 8px;
  color: #5b6570;
  font-weight: 600;
  font-size: 13.5px;
  transition: color 0.2s ease;
}

.seg__btn.is-active {
  color: var(--app-text);
}

/* ——— Channel list ——— */
.results {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 16px 4px 8px;
  color: var(--app-hint);
  font-size: 13px;
}

.results b {
  color: var(--app-text);
  font-weight: 600;
}

.list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.ch {
  position: relative;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  animation: rise 0.36s ease both;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ch.is-in {
  box-shadow: var(--shadow-sm), inset 0 0 0 1.5px rgba(42, 171, 238, 0.55);
}

.ch__open {
  display: block;
  width: 100%;
  padding: 14px 14px 12px;
  border-radius: inherit;
  text-align: left;
}

.ch__top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ch__who {
  flex: 1;
  min-width: 0;
}

.ch__name {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-weight: 650;
  font-size: 15.5px;
  line-height: 1.25;
}

.ch__name-t {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag {
  flex: none;
  margin-left: 3px;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.tag--hot {
  background: rgba(255, 112, 60, 0.13);
  color: #c4461a;
}

.tag--deal {
  background: var(--green-soft);
  color: var(--green-ink);
}

.tag--new {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.ch__handle {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--app-hint);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch__price {
  flex: none;
  text-align: right;
}

.ch__price b {
  display: block;
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.ch__price s {
  margin-right: 4px;
  color: var(--app-hint);
  font-size: 12.5px;
  font-weight: 500;
}

.ch__price small {
  color: var(--app-hint);
  font-size: 11.5px;
}

.ch__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
  padding-top: 11px;
  padding-right: 96px;
  border-top: 1px solid var(--app-line);
}

.stat {
  min-width: 0;
}

.stat span {
  display: block;
  color: var(--app-hint);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.stat b {
  display: block;
  margin-top: 1px;
  font-size: 14px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.stat.is-hl b {
  color: var(--accent-ink);
}

/* Add button */
.add {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 88px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 650;
  font-size: 14px;
  transition: background-color 0.22s ease, color 0.22s ease, transform 0.15s ease;
}

.add svg {
  width: 16px;
  height: 16px;
}

.add:active {
  transform: scale(0.94);
}

.add.is-added {
  background: var(--accent-fill);
  color: #fff;
}

.add.is-added svg path {
  stroke-dasharray: 22;
  stroke-dashoffset: 0;
  animation: tickDraw 0.35s ease 0.05s both;
}

.add.is-pop {
  animation: pop 0.42s cubic-bezier(0.3, 1.6, 0.5, 1);
}

@keyframes pop {
  0% {
    transform: scale(0.88);
  }
  55% {
    transform: scale(1.07);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes tickDraw {
  from {
    stroke-dashoffset: 22;
  }
}

.fly {
  position: fixed;
  z-index: 100;
  margin: 0;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(15, 20, 25, 0.25);
}

.empty {
  padding: 36px 20px 28px;
  border-radius: 18px;
  background: #fff;
  text-align: center;
}

.empty__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.empty__icon svg {
  width: 26px;
  height: 26px;
}

.empty b {
  display: block;
  font-size: 16px;
}

.empty p {
  margin: 4px 0 14px;
}

/* ——— Channel sheet ——— */
.chs__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.chs__who {
  flex: 1;
  min-width: 0;
}

.chs__who h2 {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
}

.chs__who h2 .vf {
  width: 18px;
  height: 18px;
}

.chs__who .hint {
  margin-top: 2px;
  font-size: 14px;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 14px;
  list-style: none;
}

.fact {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--app-bg);
  color: #4a5562;
  font-size: 12px;
  white-space: nowrap;
}

.fact b {
  color: var(--app-text);
  font-weight: 650;
}

.fact--cat {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 650;
}

.fact__star {
  width: 13px;
  height: 13px;
  color: #f5a524;
}

.icon-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  transition: transform 0.15s ease;
}

.icon-btn:active {
  transform: scale(0.92);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.chs__desc {
  margin: 14px 0 0;
  color: #3a4450;
  font-size: 14.5px;
  line-height: 1.5;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.kpi {
  padding: 11px 12px;
  border-radius: 14px;
  background: var(--app-bg);
}

.kpi span {
  display: block;
  color: var(--app-hint);
  font-size: 12px;
  font-weight: 500;
}

.kpi b {
  display: block;
  margin-top: 2px;
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.kpi em {
  display: block;
  color: var(--app-hint);
  font-style: normal;
  font-size: 11.5px;
}

.kpi em.up {
  color: var(--green-ink);
  font-weight: 600;
}

.block {
  margin-top: 20px;
}

.block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.block__head h3 {
  font-size: 15px;
  font-weight: 700;
}

/* Last posts mini bar chart */
.bars {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  height: 128px;
  padding: 0 2px;
}

.bar {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  cursor: default;
}

.bar b {
  margin-bottom: 4px;
  color: var(--app-text);
  font-size: 11.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.bar.is-label b {
  opacity: 1;
}

.bars:hover .bar.is-label b {
  opacity: 0;
}

.bars .bar:hover b {
  opacity: 1;
}

.bar i {
  display: block;
  width: 100%;
  max-width: 34px;
  height: var(--h);
  border-radius: 4px 4px 2px 2px;
  background: rgba(42, 171, 238, 0.35);
  transform-origin: bottom;
  animation: grow 0.5s cubic-bezier(0.2, 0.8, 0.3, 1) both;
  transition: background-color 0.15s ease;
}

.bar.is-last i,
.bars .bar:hover i {
  background: var(--app-accent);
}

.bar span {
  margin-top: 6px;
  color: var(--app-hint);
  font-size: 11px;
  white-space: nowrap;
}

@keyframes grow {
  from {
    transform: scaleY(0);
  }
}

/* GEO */
.geo {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  list-style: none;
}

.geo li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 112px 38px;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
}

.cc {
  display: grid;
  place-items: center;
  width: 30px;
  height: 21px;
  border-radius: 5px;
  background: #e8f3fc;
  box-shadow: inset 0 0 0 1px rgba(22, 121, 193, 0.18);
  color: var(--accent-ink);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.cc--other {
  background: var(--fill-2);
  box-shadow: none;
  color: var(--app-hint);
}

.cc svg {
  width: 13px;
  height: 13px;
}

.geo__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo__bar {
  height: 8px;
  border-radius: 999px;
  background: var(--app-bg);
  overflow: hidden;
}

.geo__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--app-accent);
  transform-origin: left;
  animation: growX 0.6s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.geo li.is-other .geo__bar i {
  background: #b8c0ca;
}

.geo li b {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

@keyframes growX {
  from {
    transform: scaleX(0);
  }
}

/* Formats */
.fmts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.fmt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--app-bg);
  box-shadow: inset 0 0 0 1.5px transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.fmt input,
.pm input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.fmt__radio {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #c3cad3;
  background: #fff;
  transition: box-shadow 0.2s ease;
}

.fmt__main {
  flex: 1;
  min-width: 0;
}

.fmt__main b {
  display: block;
  font-size: 15px;
  font-weight: 650;
}

.fmt__main span {
  display: block;
  color: var(--app-hint);
  font-size: 12.5px;
}

.fmt__price {
  flex: none;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.fmt input:checked ~ .fmt__radio {
  box-shadow: inset 0 0 0 6.5px var(--app-accent);
}

.fmt.is-checked {
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--app-accent), 0 2px 8px rgba(42, 171, 238, 0.12);
}

.fmt input:focus-visible ~ .fmt__radio {
  outline: 2px solid var(--app-accent);
  outline-offset: 2px;
}

.sheet-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  margin-top: 18px;
}

/* ——— Checkout ——— */
.days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 8px 0 7px;
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-variant-numeric: tabular-nums;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.day:active:not(:disabled) {
  transform: scale(0.94);
}

.day span {
  color: var(--app-hint);
  font-size: 11px;
  font-weight: 600;
}

.day b {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.day em {
  color: var(--app-hint);
  font-style: normal;
  font-size: 10.5px;
}

.day.is-active {
  background: var(--accent-fill);
  box-shadow: 0 6px 14px rgba(27, 152, 227, 0.28);
  color: #fff;
}

.day.is-active span,
.day.is-active em {
  color: rgba(255, 255, 255, 0.85);
}

.day:disabled {
  opacity: 0.45;
  cursor: default;
}

.co-items {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.co-item {
  padding: 12px 12px 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  animation: rise 0.3s ease both;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.co-item.is-removing {
  opacity: 0;
  transform: translateX(30px);
}

.co-item__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.co-item__who {
  flex: 1;
  min-width: 0;
}

.co-item__who b {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  font-weight: 650;
}

.co-item__who b span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.co-item__who .vf {
  width: 15px;
  height: 15px;
}

.co-item__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: var(--app-hint);
  font-size: 12.5px;
}

.co-item__meta .ic-eye {
  width: 14px;
  height: 14px;
  margin-left: 4px;
  margin-right: -2px;
}

.fmt-tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 22px;
  padding: 0 4px 0 8px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 650;
  font-size: 12px;
}

.fmt-tag svg {
  width: 14px;
  height: 14px;
}

.co-item__price {
  font-size: 15.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.co-item__x {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: -2px;
  border-radius: 50%;
  color: #8d96a1;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.co-item__x:hover {
  background: rgba(229, 72, 77, 0.1);
  color: var(--app-danger);
}

.co-item__x svg {
  width: 17px;
  height: 17px;
}

.slots {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 11px;
}

.slot,
.slot-legend {
  height: 32px;
  border-radius: 9px;
  background: var(--app-bg);
  color: var(--app-text);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.slot:active:not(:disabled) {
  transform: scale(0.94);
}

.slot.is-active {
  background: var(--app-text);
  color: #fff;
}

.slot:disabled,
.slot-legend {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--app-line);
  color: #a8b0ba;
  text-decoration: line-through;
  cursor: default;
}

.slot-legend {
  display: inline-grid;
  place-items: center;
  height: 20px;
  margin-right: 4px;
  padding: 0 5px;
  border-radius: 6px;
  font-size: 11px;
  vertical-align: 1px;
}

/* Editor */
.editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
}

.field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.field__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.field__label {
  color: #4a5562;
  font-size: 13px;
  font-weight: 600;
}

.field textarea,
.field input {
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 12px;
  background: var(--app-bg);
  box-shadow: inset 0 0 0 1px transparent;
  font-size: 15px;
  line-height: 1.45;
  outline: none;
  resize: none;
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.field input {
  height: 44px;
}

.field textarea:focus,
.field input:focus {
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--app-accent), 0 0 0 3px rgba(42, 171, 238, 0.15);
}

.field [aria-invalid="true"] {
  box-shadow: inset 0 0 0 1.5px var(--app-danger);
}

.field__hint {
  color: var(--app-hint);
  font-size: 12px;
}

.field__hint b {
  color: #4a5562;
  font-weight: 600;
}

.counter {
  color: var(--app-hint);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: color 0.2s ease;
}

.counter.is-warn {
  color: var(--amber-ink);
}

.counter.is-over {
  color: var(--app-danger);
}

.is-shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  20%,
  60% {
    transform: translateX(-5px);
  }
  40%,
  80% {
    transform: translateX(5px);
  }
}

/* Media attach */
.attach {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1.5px dashed rgba(42, 171, 238, 0.45);
  border-radius: 14px;
  background: rgba(42, 171, 238, 0.05);
  color: var(--accent-ink);
  text-align: left;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.attach:hover {
  background: rgba(42, 171, 238, 0.09);
}

.attach:active {
  transform: scale(0.98);
}

.attach__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--accent-soft);
}

.attach__icon svg {
  width: 22px;
  height: 22px;
}

.attach__text {
  flex: 1;
}

.attach__text b {
  display: block;
  font-size: 14.5px;
  font-weight: 650;
}

.attach__text small {
  color: var(--app-hint);
  font-size: 12px;
}

.attach > svg {
  width: 20px;
  height: 20px;
}

.att {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 14px;
  background: var(--app-bg);
  animation: rise 0.3s ease both;
}

.att__thumb {
  flex: none;
  width: 76px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
}

.att__info {
  flex: 1;
  min-width: 0;
}

.att__info b {
  display: block;
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.att__info small {
  display: block;
  color: var(--app-hint);
  font-size: 12px;
}

.att__progress {
  height: 4px;
  margin-top: 6px;
  border-radius: 999px;
  background: rgba(42, 171, 238, 0.18);
  overflow: hidden;
}

.att__progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--app-accent);
  transform-origin: left;
  animation: upload 0.9s cubic-bezier(0.4, 0, 0.3, 1) both;
}

@keyframes upload {
  from {
    transform: scaleX(0);
  }
}

.att__btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  color: #5b6570;
  box-shadow: var(--shadow-sm);
}

.att__btn svg {
  width: 16px;
  height: 16px;
}

/* UTM */
.utm {
  margin-top: -6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(31, 157, 85, 0.07);
  font-size: 12px;
}

.utm__head {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--green-ink);
  font-weight: 650;
}

.utm__head svg {
  width: 14px;
  height: 14px;
}

.utm code {
  display: block;
  margin-top: 4px;
  color: #3a4450;
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.5;
  word-break: break-all;
}

.utm code mark {
  background: none;
  color: var(--green-ink);
}

.utm.is-error {
  background: rgba(229, 72, 77, 0.08);
  color: var(--app-danger);
  font-weight: 600;
}

/* Preview */
.pv-switch {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  text-transform: none;
  letter-spacing: 0;
}

.pv-switch::-webkit-scrollbar {
  display: none;
}

.pv-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px 0 3px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--app-line);
  color: var(--app-text);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.pv-chip .av {
  width: 22px;
  height: 22px;
  font-size: 9px;
}

.pv-chip .av--emoji {
  font-size: 12px;
}

.pv-chip.is-active {
  box-shadow: inset 0 0 0 1.5px var(--app-accent);
  background: #eef8fe;
  color: var(--accent-ink);
}

.pv {
  overflow: hidden;
  border-radius: 18px;
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--app-line);
}

.pv__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--app-line);
}

.pv__back {
  color: var(--accent-ink);
  font-size: 22px;
  line-height: 1;
}

.pv__bar div {
  flex: 1;
  min-width: 0;
  line-height: 1.2;
}

.pv__bar b {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv__bar div span {
  color: var(--app-hint);
  font-size: 12px;
}

.pv__chat {
  position: relative;
  padding: 12px 12px 14px;
  background-color: #c7dcb3;
  background-image: radial-gradient(rgba(255, 255, 255, 0.22) 1.2px, transparent 1.6px),
    radial-gradient(70% 60% at 15% 10%, rgba(240, 236, 180, 0.85), transparent 70%),
    radial-gradient(70% 70% at 90% 90%, rgba(140, 196, 168, 0.9), transparent 70%),
    linear-gradient(150deg, #d8e7b8 0%, #b5d6b0 55%, #a6cfb6 100%);
  background-size: 16px 16px, auto, auto, auto;
}

.pv__date {
  display: table;
  margin: 0 auto 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(46, 82, 58, 0.32);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.pv__msg {
  max-width: 300px;
  margin-left: 6px;
}

.pv__bubble {
  position: relative;
  border-radius: 16px 16px 16px 0;
  background: #fff;
  filter: drop-shadow(0 1px 0.75px rgba(30, 60, 40, 0.2));
}

.pv__bubble::before {
  content: "";
  position: absolute;
  left: -9px;
  bottom: 0;
  width: 10px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 18'%3E%3Cpath d='M10 0v18H1.2C.4 18-.2 17.2.5 16.6 4.6 13 9.6 9.4 10 0z' fill='%23fff'/%3E%3C/svg%3E") no-repeat;
}

.pv__media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px 16px 4px 4px;
  object-fit: cover;
  animation: viewIn 0.35s ease;
}

.pv__text {
  padding: 8px 12px 9px;
  font-size: 14.5px;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.pv__text::after {
  content: "";
  display: inline-block;
  width: 96px;
  height: 10px;
}

.pv__text b {
  font-weight: 700;
}

.pv__link {
  color: #1d7ec8;
}

.pv__ph {
  color: var(--app-hint);
}

.pv__meta {
  position: absolute;
  right: 10px;
  bottom: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
  color: #8a96a3;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.pv__meta svg {
  width: 14px;
  height: 14px;
}

.pv__meta i {
  margin-left: 5px;
  font-style: normal;
}

.pv__kb {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 40px;
  margin-top: 4px;
  padding: 8px 24px;
  border-radius: 10px;
  background: rgba(46, 82, 58, 0.34);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  text-align: center;
  animation: viewIn 0.3s ease;
}

.pv__kb svg {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 12px;
  height: 12px;
}

/* Payment */
.pay {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pm {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm), inset 0 0 0 1.5px transparent;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.15s ease, background-color 0.2s ease;
}

.pm:active {
  transform: scale(0.97);
}

.pm.is-checked {
  background: #f3faff;
  box-shadow: 0 2px 10px rgba(42, 171, 238, 0.14), inset 0 0 0 1.5px var(--app-accent);
}

.pm.is-checked::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
      center / 12px no-repeat,
    var(--app-accent);
  animation: pop 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.pm input:focus-visible ~ .pm__icon {
  outline: 2px solid var(--app-accent);
  outline-offset: 2px;
}

.pm__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.pm__icon svg {
  width: 34px;
  height: 34px;
}

.pm__icon--bal,
.pm__icon--card {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.pm__icon--card {
  background: rgba(118, 128, 140, 0.14);
  color: #4a5562;
}

.pm__icon--bal svg,
.pm__icon--card svg {
  width: 19px;
  height: 19px;
}

.pm__text {
  min-width: 0;
  padding-right: 14px;
}

.pm__text b {
  display: block;
  font-size: 14.5px;
  font-weight: 650;
}

.pm__text small {
  display: block;
  overflow: hidden;
  color: var(--app-hint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pm__text small.is-low {
  color: var(--app-danger);
  font-weight: 600;
  white-space: normal;
}

/* Summary */
.summary {
  padding: 6px 14px;
}

.sum-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
}

.sum-row span {
  color: #4a5562;
}

.sum-row--total {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--app-line);
  font-size: 17px;
}

.sum-row--total span {
  color: var(--app-text);
  font-weight: 650;
}

.sum-row--total b {
  font-weight: 800;
}

.sum-row--note {
  padding-top: 2px;
  font-size: 13px;
}

.sum-row--note span,
.sum-row--note b {
  color: var(--app-hint);
  font-weight: 500;
}

.sum-row--warn span,
.sum-row--warn b {
  color: var(--app-danger);
  font-weight: 600;
}

.sum-link {
  color: var(--accent-ink);
  font-weight: 650;
  font-size: 13px;
}

/* ——— Success ——— */
.ok {
  padding: 18px 0 4px;
  text-align: center;
}

.ok__mark {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 14px;
}

.ok__mark svg {
  position: relative;
  z-index: 1;
  width: 96px;
  height: 96px;
}

.ok__circle {
  fill: var(--app-success);
  stroke: var(--app-success);
  stroke-width: 4;
  stroke-dasharray: 227;
  animation: circleDraw 0.55s ease-out both, circleFill 0.3s ease 0.45s both;
  transform: rotate(-90deg);
  transform-origin: center;
}

.ok__tick {
  fill: none;
  stroke: #fff;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  animation: tickDraw2 0.35s ease 0.6s both;
}

@keyframes circleDraw {
  from {
    stroke-dashoffset: 227;
  }
}

@keyframes circleFill {
  from {
    fill: rgba(31, 157, 85, 0);
  }
}

@keyframes tickDraw2 {
  from {
    stroke-dashoffset: 48;
  }
}

.ok__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(31, 157, 85, 0.25);
  animation: ring 1.1s ease-out 0.55s both;
}

@keyframes ring {
  from {
    transform: scale(0.8);
    opacity: 1;
  }
  to {
    transform: scale(1.9);
    opacity: 0;
  }
}

.ok__dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  margin: -4px;
  border-radius: 50%;
  opacity: 0;
  animation: burst 0.8s cubic-bezier(0.2, 0.8, 0.3, 1) 0.6s both;
}

.ok__dot--1 {
  --tx: 0px;
  --ty: -70px;
  background: var(--app-accent);
}

.ok__dot--2 {
  --tx: 62px;
  --ty: -34px;
  background: #ffb020;
}

.ok__dot--3 {
  --tx: 60px;
  --ty: 38px;
  background: #7c6cff;
}

.ok__dot--4 {
  --tx: 0px;
  --ty: 70px;
  background: var(--app-success);
}

.ok__dot--5 {
  --tx: -60px;
  --ty: 36px;
  background: #ff6b8b;
}

.ok__dot--6 {
  --tx: -62px;
  --ty: -36px;
  background: var(--app-accent);
}

@keyframes burst {
  0% {
    opacity: 0;
    transform: translate(calc(var(--tx) * 0.55), calc(var(--ty) * 0.55)) scale(0.5);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--tx) * 1.15), calc(var(--ty) * 1.15)) scale(1);
  }
}

.ok h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ok__num {
  display: inline-block;
  margin: 8px 0 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.ok .hint {
  font-size: 14px;
}

.timeline {
  padding: 14px 14px 4px;
  list-style: none;
}

.tl {
  position: relative;
  display: flex;
  gap: 12px;
  padding-bottom: 14px;
}

.tl::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 2px;
  left: 11px;
  width: 2px;
  border-radius: 2px;
  background: var(--app-line);
}

.tl:last-child::before {
  display: none;
}

.tl.is-done::before {
  background: var(--app-success);
}

.tl__dot {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 2px #d3d9e0;
  color: #fff;
}

.tl__dot svg {
  width: 14px;
  height: 14px;
}

.tl.is-done .tl__dot {
  background: var(--app-success);
  box-shadow: none;
}

.tl.is-new .tl__dot {
  animation: pop 0.4s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.tl.is-active .tl__dot {
  box-shadow: inset 0 0 0 2px var(--app-accent);
}

.tl.is-active .tl__dot::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--app-accent);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    transform: scale(0.6);
    opacity: 0.55;
  }
}

.tl__main {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.tl__main b {
  display: block;
  font-size: 15px;
  font-weight: 650;
}

.tl:not(.is-done):not(.is-active) .tl__main b {
  color: #8a949f;
  font-weight: 600;
}

.tl__main span {
  display: block;
  margin-top: 1px;
  color: var(--app-hint);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.placements {
  padding: 4px 14px;
  list-style: none;
}

.pl {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}

.pl + .pl {
  border-top: 1px solid var(--app-line);
}

.pl__main {
  flex: 1;
  min-width: 0;
}

.pl__main b {
  display: block;
  overflow: hidden;
  font-size: 14.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pl__main span {
  display: block;
  color: var(--app-hint);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.pill--approval {
  background: var(--amber-soft);
  color: var(--amber-ink);
}

.pill--approval::before {
  animation: pulse 1.4s ease-in-out infinite;
}

.pill--scheduled {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.pill--live,
.pill--report {
  background: var(--green-soft);
  color: var(--green-ink);
}

.pill--declined {
  background: rgba(118, 128, 140, 0.14);
  color: #5b6570;
}

.pill.is-flash {
  animation: pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1);
}

#okMore {
  margin-top: 16px;
  margin-bottom: 8px;
}

/* ——— Orders ——— */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.tile {
  padding: 11px 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.tile span {
  display: block;
  color: var(--app-hint);
  font-size: 12px;
  font-weight: 500;
}

.tile b {
  display: block;
  margin-top: 2px;
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.orders {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.order {
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  animation: rise 0.35s ease both;
}

.order.is-fresh {
  box-shadow: var(--shadow-sm), inset 0 0 0 1.5px rgba(42, 171, 238, 0.5);
}

.order__head {
  display: block;
  width: 100%;
  padding: 14px 14px 12px;
  border-radius: 18px;
  text-align: left;
}

.order__row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stack {
  flex: none;
  display: flex;
  padding-left: 8px;
}

.stack .av {
  width: 34px;
  height: 34px;
  margin-left: -10px;
  font-size: 11.5px;
  box-shadow: 0 0 0 2px #fff;
}

.stack .av--emoji {
  font-size: 16px;
}

.stack__more {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-left: -10px;
  border-radius: 50%;
  background: #e9edf1;
  box-shadow: 0 0 0 2px #fff;
  color: #4a5562;
  font-size: 12px;
  font-weight: 700;
}

.order__main {
  flex: 1;
  min-width: 0;
}

.order__main b {
  display: block;
  font-size: 15px;
  font-weight: 700;
}

.order__main > span {
  display: block;
  overflow: hidden;
  color: var(--app-hint);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order__right {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.order__right b {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin-top: 13px;
}

.progress i {
  height: 4px;
  border-radius: 999px;
  background: #e6eaee;
  overflow: hidden;
}

.progress i.is-done {
  background: var(--app-success);
}

.progress i.is-active {
  background: linear-gradient(90deg, var(--app-accent) 0%, #8fd3f7 50%, var(--app-accent) 100%);
  background-size: 200% 100%;
  animation: flow 1.6s linear infinite;
}

@keyframes flow {
  to {
    background-position: -200% 0;
  }
}

.order__line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: #4a5562;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.order__line em {
  font-style: normal;
  font-weight: 650;
  color: var(--app-text);
}

.order__chev {
  flex: none;
  width: 20px;
  height: 20px;
  color: #8d96a1;
  transition: transform 0.3s ease;
}

.order.is-open .order__chev {
  transform: rotate(180deg);
}

.order__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s cubic-bezier(0.3, 0.8, 0.3, 1);
}

.order.is-open .order__body {
  grid-template-rows: 1fr;
}

.order__inner {
  min-height: 0;
  overflow: hidden;
}

.order__pad {
  padding: 0 14px 14px;
}

.order__pad > .placements {
  padding: 0;
  border-top: 1px solid var(--app-line);
}

.note {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--app-bg);
  color: #4a5562;
  font-size: 13px;
  line-height: 1.45;
}

.note svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--accent-ink);
}

.note b {
  color: var(--app-text);
  font-variant-numeric: tabular-nums;
}

.order__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* Report */
.report {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--app-line);
}

.report__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.report__head h4 {
  font-size: 15px;
  font-weight: 700;
}

.rk {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.rk div {
  padding: 9px 9px 8px;
  border-radius: 12px;
  background: var(--app-bg);
}

.rk span {
  display: block;
  color: var(--app-hint);
  font-size: 11.5px;
}

.rk b {
  display: block;
  font-size: 15.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.chart {
  margin-top: 12px;
  padding: 12px 12px 8px;
  border-radius: 12px;
  background: var(--app-bg);
}

.chart__head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12.5px;
}

.chart__head span:first-child {
  color: #4a5562;
  font-weight: 600;
}

.chart__tip {
  color: var(--app-text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.chart__bars {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 3px;
  align-items: end;
  height: 76px;
  border-bottom: 1px solid rgba(15, 20, 25, 0.12);
}

.cbar {
  display: flex;
  align-items: flex-end;
  height: 100%;
  cursor: default;
}

.cbar i {
  display: block;
  width: 100%;
  height: var(--h);
  border-radius: 4px 4px 0 0;
  background: rgba(42, 171, 238, 0.5);
  transform-origin: bottom;
  transition: background-color 0.15s ease;
}

.order.is-open .cbar i {
  animation: grow 0.5s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.cbar:hover i,
.cbar.is-hl i {
  background: var(--app-accent);
}

.chart__axis {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  color: var(--app-hint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.rt {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.rt th {
  padding: 6px 0;
  color: var(--app-hint);
  font-size: 11.5px;
  font-weight: 500;
  text-align: right;
}

.rt th:first-child,
.rt td:first-child {
  text-align: left;
}

.rt td {
  padding: 7px 0;
  border-top: 1px solid var(--app-line);
  text-align: right;
  white-space: nowrap;
}

.rt td:first-child {
  max-width: 120px;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
}

.rt td.is-muted {
  color: var(--app-hint);
}

/* ——— Wallet ——— */
.bal {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 16px;
  border-radius: 22px;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(140, 220, 255, 0.55), transparent 55%),
    linear-gradient(135deg, #2aabee 0%, #1f8fe0 55%, #3a6cf0 100%);
  box-shadow: 0 14px 30px rgba(31, 143, 224, 0.3);
  color: #fff;
}

.bal__glow {
  position: absolute;
  right: -50px;
  bottom: -70px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 28px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.bal__top {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 600;
}

.bal__cur {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.bal__amount {
  position: relative;
  margin-top: 6px;
  font-size: 38px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.bal__amount.is-bump {
  animation: balBump 0.5s ease;
}

@keyframes balBump {
  40% {
    transform: scale(1.04);
  }
}

.bal__escrow {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.bal__escrow svg {
  width: 15px;
  height: 15px;
}

.bal__topup {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.topup {
  position: relative;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.topup:hover {
  background: rgba(255, 255, 255, 0.28);
}

.topup:active {
  transform: scale(0.95);
}

.topup.is-loading {
  color: transparent;
  pointer-events: none;
}

.topup.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 16px;
  height: 16px;
  margin: auto;
  border: 2.5px solid #fff;
  border-right-color: transparent;
  border-radius: 50%;
  animation: kit-spin 0.7s linear infinite;
}

.dep {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
}

.dep__qr {
  flex: none;
  width: 92px;
  height: 92px;
  padding: 6px;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--app-line);
}

.dep__qr svg {
  width: 100%;
  height: 100%;
}

.dep__main {
  flex: 1;
  min-width: 0;
}

.dep__net {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #4a5562;
  font-size: 12.5px;
  font-weight: 600;
}

.dep__net svg {
  width: 16px;
  height: 16px;
}

.dep__addr {
  display: block;
  margin: 6px 0 9px;
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  word-break: break-all;
}

.txg + .txg {
  margin-top: 14px;
}

.txg__day {
  margin: 0 4px 6px;
  color: var(--app-hint);
  font-size: 13px;
  font-weight: 600;
}

.txs {
  padding: 2px 14px;
  list-style: none;
}

.tx {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
}

.tx + .tx {
  border-top: 1px solid var(--app-line);
}

.tx.is-new {
  animation: txIn 0.5s ease both;
}

@keyframes txIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.tx__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.tx__icon svg {
  width: 19px;
  height: 19px;
}

.tx__icon--in {
  background: var(--green-soft);
  color: var(--green-ink);
}

.tx__icon--order {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.tx__icon--ext {
  background: rgba(118, 128, 140, 0.14);
  color: #4a5562;
}

.tx__icon--refund {
  background: rgba(124, 108, 255, 0.13);
  color: #5b4bd6;
}

.tx__main {
  flex: 1;
  min-width: 0;
}

.tx__main b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
}

.tx__main span {
  display: block;
  overflow: hidden;
  color: var(--app-hint);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tx__amt {
  flex: none;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.tx__amt.is-plus {
  color: var(--green-ink);
}

.tx__amt.is-ext {
  color: var(--app-hint);
  font-weight: 600;
}

.tx__amt small {
  display: block;
  color: var(--app-hint);
  font-size: 11px;
  font-weight: 500;
}

/* ——— Tab bar ——— */
.tabbar {
  position: relative;
  z-index: 5;
  flex: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 6px 10px 8px;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid rgba(15, 20, 25, 0.07);
}

.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 0 3px;
  border-radius: 12px;
  color: #8a949f;
  font-weight: 600;
  font-size: 11px;
  transition: color 0.2s ease;
}

.tab svg {
  width: 26px;
  height: 26px;
  transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.tab.is-active {
  color: var(--accent-ink);
}

.tab.is-active svg {
  color: var(--app-accent);
  transform: scale(1.06);
}

.badge {
  position: absolute;
  top: 1px;
  left: calc(50% + 7px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff3b5c;
  box-shadow: 0 0 0 2px #fff;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 18px;
}

.badge[hidden] {
  display: none;
}

.screen.is-flow .tabbar {
  display: none;
}

@media (max-width: 880px) {
  .tabbar {
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 370px) {
  .view {
    padding-left: 12px;
    padding-right: 12px;
  }

  .chips {
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .ch__open {
    padding-left: 12px;
    padding-right: 12px;
  }

  .ch__top {
    gap: 10px;
  }

  .ch__stats {
    padding-right: 90px;
  }

  .add {
    right: 12px;
    width: 84px;
  }

  .stat b {
    font-size: 13.5px;
  }

  .geo li {
    grid-template-columns: 30px minmax(0, 1fr) 92px 36px;
    gap: 8px;
  }

  .rk b {
    font-size: 14.5px;
  }

  .facts {
    gap: 4px;
  }

  .fact {
    padding: 0 6px;
    font-size: 11.5px;
  }


  .pm {
    padding: 11px 10px;
    gap: 8px;
  }

  .pm__icon,
  .pm__icon svg {
    width: 30px;
    height: 30px;
  }

  .bal__amount {
    font-size: 34px;
  }
}

@media (hover: hover) {
  .ch:hover {
    box-shadow: var(--shadow-md);
  }

  .ch.is-in:hover {
    box-shadow: var(--shadow-md), inset 0 0 0 1.5px rgba(42, 171, 238, 0.55);
  }

  .order:hover {
    box-shadow: var(--shadow-md);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ok__dot,
  .ok__ring {
    display: none;
  }
}
