:root {
  --bg: #f2f3f4;
  --paper: #fff;
  --ink: #121214;
  --muted: #8b8b92;
  --line: #ececef;
  --soft: #f7f7f8;
  --accent: #ff8a1f;
  --black: #171717;
  --green: #20c45a;
  --danger: #e02a2a;
  --shadow: 0 18px 54px rgba(0, 0, 0, 0.12);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

body[data-theme="dark"] {
  --bg: #0f1012;
  --paper: #18191d;
  --ink: #f4f4f5;
  --muted: #a4a4aa;
  --line: #303238;
  --soft: #24262b;
  --shadow: 0 18px 54px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

.app {
  max-width: 640px;
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: calc(122px + var(--safe-bottom));
  background: var(--bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px 12px;
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.logo {
  width: min(205px, 52vw);
  height: 56px;
  object-fit: contain;
  object-position: left center;
  mix-blend-mode: multiply;
}

.logo-button {
  border: 0;
  background: transparent;
  padding: 0;
  transition: transform 150ms ease, opacity 150ms ease;
}

.logo-button:active {
  transform: scale(0.96);
  opacity: 0.82;
}

body[data-theme="dark"] .logo {
  filter: invert(1) contrast(1.05);
  mix-blend-mode: screen;
}

.balance {
  display: grid;
  grid-template-columns: 1fr 40px;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  min-width: 126px;
  min-height: 46px;
  padding: 5px 6px 5px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

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

.balance strong {
  grid-column: 1;
  grid-row: 1;
  font-size: 13px;
  letter-spacing: 2px;
}

.balance span {
  grid-column: 1;
  grid-row: 2;
  color: var(--muted);
  font-size: 11px;
}

.balance .avatar {
  grid-column: 2;
  grid-row: 1 / 3;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.hero {
  display: grid;
  gap: 26px;
  padding: 14px 20px 54px;
  background: var(--paper);
}

.hero h1 {
  margin: 0;
  font-size: 29px;
  font-weight: 500;
}

.search {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 52px;
}

.search b {
  font-size: 38px;
  line-height: 1;
  transform: rotate(-16deg);
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 25px;
}

.search input::placeholder {
  color: #b9b9bf;
}

.tabs {
  display: flex;
  gap: 14px;
}

.tab {
  min-width: 86px;
  min-height: 58px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 19px;
  transition: transform 150ms ease, background 150ms ease, color 150ms ease;
}

.tab.active {
  border-color: var(--line);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.feed,
.screen {
  display: grid;
  gap: 10px;
  padding: 10px 8px 18px;
}

.shop-card,
.panel,
.product-card,
.review-card {
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.shop-card {
  overflow: hidden;
}

.shop-card button,
.shop-click {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.shop-inner {
  padding: 22px 24px 20px;
}

.shop-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.shop-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.shop-title h2,
.profile-title {
  margin: 0;
  font-size: 32px;
  font-weight: 500;
}

.verify {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.desc {
  color: var(--muted);
  font-size: 22px;
  line-height: 1.25;
}

.shop-image,
.profile-cover,
.product-image {
  display: block;
  width: 100%;
  object-fit: cover;
}

.shop-image {
  aspect-ratio: 1 / 1;
  border-radius: 22px;
}

.profile-cover {
  height: 430px;
  background: var(--soft);
}

.profile-body {
  padding: 34px 38px 28px;
}

.breadcrumbs {
  color: var(--muted);
  font-size: 18px;
  margin-bottom: 34px;
}

.read-button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  padding: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 44px 0;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.stat strong {
  display: block;
  font-size: 36px;
  letter-spacing: 1px;
}

.stat span {
  color: var(--muted);
  font-size: 21px;
}

.rating {
  margin-bottom: 34px;
}

.rating strong {
  display: block;
  color: #f6aa2c;
  font-size: 34px;
}

.stars {
  color: #ffbd31;
  font-size: 30px;
  letter-spacing: 2px;
}

.primary {
  min-height: 64px;
  border: 0;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-size: 22px;
  font-weight: 600;
}

.green-dot {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-left: 16px;
  border-radius: 50%;
  background: #16c80f;
  box-shadow: 0 0 0 5px rgba(22, 200, 15, 0.16);
}

.store-age {
  margin: 26px 0;
  color: var(--muted);
  text-align: center;
}

.pill-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 18px 0;
}

.pill-tabs button {
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 20px;
}

.pill-tabs button.muted {
  background: var(--soft);
  color: var(--muted);
}

.product-card {
  overflow: hidden;
}

.product-click {
  display: grid;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.product-image {
  aspect-ratio: 1 / 1;
}

.product-body {
  padding: 18px 20px 22px;
}

.product-body h3 {
  margin: 0 0 8px;
  font-size: 23px;
  font-weight: 500;
}

.price {
  font-size: 22px;
  font-weight: 800;
}

.product-detail {
  overflow: hidden;
  padding: 0;
}

.product-gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding: 18px;
}

.product-gallery img,
.payment-product img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  object-fit: cover;
}

.product-detail-body {
  display: grid;
  gap: 12px;
  padding: 0 22px 24px;
}

.product-detail-body h1 {
  margin: 0;
  font-size: 34px;
}

.product-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-stats span {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.position-card {
  display: grid;
  gap: 18px;
}

.position-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
}

.position-grid p,
.payment-summary p {
  display: grid;
  gap: 5px;
  margin: 0;
}

.position-grid span,
.payment-summary span {
  color: var(--muted);
  font-size: 15px;
}

.payment-product {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  align-items: center;
}

.payment-product h2 {
  margin: 0 0 6px;
}

.payment-wallet,
.payment-summary {
  display: grid;
  gap: 14px;
}

.alert {
  padding: 22px;
  border-radius: 22px;
  background: #ffdfe1;
  color: #af1724;
  font-size: 20px;
  font-weight: 700;
}

.center {
  text-align: center;
}

.mega-product-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
}

.mega-product-body {
  display: grid;
  gap: 5px;
}

.product-icon-row {
  display: grid;
  grid-template-columns: repeat(5, 18px) 1fr repeat(3, 18px);
  gap: 7px;
  align-items: center;
  color: #cfcfcf;
  font-size: 12px;
}

.product-icon-row span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  background: #f1f1f1;
}

.rating-line {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--ink);
  font-weight: 700;
}

.ok-dot,
.time-dot,
.star-dot {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
}

.ok-dot { background: #31c676; }
.time-dot { background: #8fc6ff; }
.star-dot { background: #ffb733; }

.mega-product-screen .breadcrumbs {
  margin-top: 8px;
  color: var(--muted);
  font-size: 20px;
}

.product-page-title {
  margin: 14px 0 4px;
  font-size: clamp(34px, 8vw, 52px);
  font-weight: 500;
  line-height: 1.05;
}

.product-page-category {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 23px;
}

.mega-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(82px, 28%);
  gap: 16px;
  align-items: start;
}

.mega-gallery-main,
.mega-gallery-side img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.mega-gallery-main {
  aspect-ratio: 1 / 1;
}

.mega-gallery-side {
  display: grid;
  gap: 12px;
}

.mega-gallery-side img {
  aspect-ratio: 1 / 1;
}

.product-copy {
  display: grid;
  gap: 12px;
  margin: 22px 0;
  font-size: 21px;
  line-height: 1.35;
}

.shop-line {
  font-size: 22px;
}

.shop-line span {
  color: var(--muted);
}

.ltc-inline {
  color: var(--muted);
  font-size: 18px;
  font-weight: 600;
}

.big-stars {
  font-size: 20px;
}

.star-text {
  color: #ffbd31;
  letter-spacing: 1px;
}

.location-select {
  display: flex;
  width: 100%;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 22px;
}

.product-mode-tabs {
  display: flex;
  gap: 28px;
  margin: 28px 0;
  color: var(--muted);
  font-size: 22px;
}

.product-mode-tabs button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.product-mode-tabs .active {
  color: var(--ink);
}

.mega-position-card {
  display: grid;
  gap: 18px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
}

.mega-position-grid {
  grid-template-columns: 1fr 1fr;
}

.mega-position-grid .wide {
  grid-column: 1 / -1;
}

.buy-button {
  justify-self: end;
  min-width: 210px;
  min-height: 56px;
}

.payment-summary-card {
  display: grid;
  grid-template-columns: 1fr 86px;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
}

.payment-summary-card img {
  width: 86px;
  height: 86px;
  border-radius: 18px;
  object-fit: cover;
}

.payment-summary-card h2 {
  margin: 0 0 8px;
  font-size: 25px;
}

.payment-summary-card p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 18px;
}

.payment-head-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 44px;
}

.payment-head-row h1 {
  margin: 0;
  font-size: 38px;
}

.wallet-card-ltc {
  display: grid;
  grid-template-columns: 1fr 82px;
  gap: 14px;
  align-items: center;
  padding: 24px 28px;
  border-radius: 22px;
  background: var(--soft);
}

.wallet-card-ltc h3,
.wallet-card-ltc p {
  margin: 0 0 6px;
}

.ltc-coin {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5f5f5, #b7b7b7);
  color: #575757;
  font-size: 42px;
  font-weight: 900;
}

.payment-lines {
  display: grid;
  gap: 20px;
  margin: 28px 0;
}

.payment-lines p {
  display: flex;
  justify-content: space-between;
  margin: 0;
  font-size: 22px;
}

.payment-instructions {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--soft);
}

.payment-instructions h3,
.payment-instructions p {
  margin: 0;
}

.payment-instructions p {
  display: grid;
  gap: 4px;
}

.payment-instructions .row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mono-line {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  overflow-wrap: anywhere;
}

.inline-link {
  border: 0;
  background: transparent;
  color: #d88928;
  font: inherit;
}

.link-button {
  display: grid;
  place-items: center;
  text-decoration: none;
}

.review-card {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
}

.review-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.review-body {
  display: grid;
  gap: 4px;
}

.review-head strong {
  font-size: 16px;
  font-weight: 800;
}

.review-stars {
  color: #ffbd31;
  font-size: 17px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.review-body h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.review-body p {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.empty-state {
  color: var(--muted);
  font-size: 18px;
}

.form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 18px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
  padding: 12px 16px;
}

.field textarea {
  min-height: 150px;
  resize: vertical;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.panel {
  padding: 24px;
}

.panel h2 {
  margin: 0 0 18px;
  font-size: 34px;
  font-weight: 500;
}

.notice {
  padding: 14px 16px;
  border-left: 4px solid var(--danger);
  border-radius: 14px;
  background: var(--paper);
  color: var(--danger);
}

.captcha-box {
  display: flex;
  justify-content: center;
  min-height: 72px;
}

.auth-wrap {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 18px;
  background: var(--bg);
}

.auth-card {
  width: min(460px, 100%);
  padding: 24px;
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.auth-card img {
  width: 210px;
  height: 58px;
  object-fit: contain;
  object-position: left center;
  mix-blend-mode: multiply;
}

.auth-card h1 {
  margin: 20px 0;
  font-size: 30px;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 800;
}

.dock {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  width: min(640px, 100vw);
  padding: 10px 12px calc(10px + var(--safe-bottom));
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
}

.theme-toggle,
.language {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

.theme-toggle {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.theme-toggle:focus,
.theme-toggle:focus-visible,
.language button:focus,
.language button:focus-visible,
.balance:focus,
.balance:focus-visible,
.logo-button:focus,
.logo-button:focus-visible {
  outline: none;
  box-shadow: none;
}

.switch {
  display: inline-grid;
  width: 58px;
  height: 34px;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: var(--soft);
}

.switch i {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.18);
  transition: transform 160ms ease;
}

.switch.dark i {
  transform: translateX(24px);
}

.language div {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--soft);
}

.language button {
  min-width: 42px;
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.language button.active {
  background: var(--ink);
  color: var(--paper);
}

.menu {
  position: fixed;
  left: 50%;
  bottom: calc(84px + var(--safe-bottom));
  z-index: 60;
  display: grid;
  width: 56px;
  height: 56px;
  place-content: center;
  gap: 6px;
  border: 0;
  border-radius: 50%;
  background: #171717;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  transform: translateX(-50%);
}

.menu span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
}

.nav-pop,
.account-pop,
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  background: rgba(0, 0, 0, 0.18);
}

.nav-pop {
  background: transparent;
  pointer-events: none;
}

.nav-pop.open {
  pointer-events: auto;
}

.nav-pop.open,
.account-pop.open,
.modal-backdrop.open {
  display: block;
}

.nav-card {
  position: absolute;
  left: 50%;
  bottom: calc(88px + var(--safe-bottom));
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: #171717;
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.nav-icon,
.nav-close {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
}

.nav-icon.active {
  background: #fff;
  color: #171717;
}

.nav-icon svg,
.nav-close svg,
.filter-head svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-icon i {
  position: absolute;
  top: 9px;
  right: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5a68;
}

.nav-close {
  margin-left: 8px;
  color: #171717;
  background: #fff;
}

.account-card {
  position: absolute;
  top: 82px;
  right: max(10px, calc((100vw - 640px) / 2 + 10px));
  width: min(500px, calc(100vw - 74px));
  max-height: calc(100vh - 116px);
  overflow: auto;
  padding: 20px 24px;
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.account-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 17px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 20px;
}

.account-row svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-row b {
  justify-self: end;
  padding: 4px 8px;
  border-radius: 999px;
  background: #22c780;
  color: #fff;
  font-size: 11px;
}

.simple-page {
  margin-top: 30px;
  min-height: 260px;
}

.simple-page p {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.4;
}

.rules-modal {
  width: min(620px, calc(100vw - 24px));
  max-height: calc(86vh - var(--safe-bottom));
}

.rules-modal h2 {
  margin: 0 0 18px;
  font-size: 30px;
}

.rules-modal h3 {
  margin: 24px 0 10px;
  font-size: 20px;
}

.rules-modal p {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

.support-screen {
  padding: 76px 16px 150px;
}

.support-card {
  padding: 28px 24px;
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.support-card h1 {
  margin: 0 0 28px;
  font-size: clamp(34px, 8vw, 46px);
  font-weight: 400;
  letter-spacing: 0;
}

.support-card select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 28px) 50%, calc(100% - 18px) 50%;
  background-size: 10px 10px, 10px 10px;
  background-repeat: no-repeat;
}

.support-actions {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 16px;
  align-items: center;
}

.attach-button {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.attach-button svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.referral-screen {
  padding: 32px 18px 150px;
}

.referral-screen > h1 {
  margin: 24px 0 22px;
  font-size: 34px;
  font-weight: 500;
}

.referral-tabs {
  display: flex;
  grid-template-columns: none;
  gap: 14px;
}

.referral-tabs button {
  min-width: 138px;
  min-height: 58px;
}

.ref-card,
.ref-terms,
.analytics-card,
.ref-item {
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.ref-card {
  display: grid;
  gap: 16px;
  margin-top: 28px;
  padding: 24px;
}

.ref-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.ref-card h2,
.ref-section-head h2,
.details-title {
  margin: 0;
  font-size: 28px;
}

.ref-card-head span {
  padding: 9px 14px;
  border-radius: 999px;
  background: #20bf78;
  color: #fff;
}

.ref-card p {
  margin: 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.35;
}

.ref-link-row {
  display: grid;
  grid-template-columns: 1fr 44px 62px;
  gap: 8px;
  align-items: center;
}

.ref-link-row button {
  min-height: 62px;
  border: 0;
  border-radius: 18px;
  background: var(--soft);
  color: var(--ink);
  font-size: 20px;
}

.ref-link-row .qr-button {
  border-radius: 50%;
  background: #050505;
  color: #fff;
}

.qr-button svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
}

.ref-terms {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 26px 0;
  padding: 20px 24px;
  font-size: 24px;
}

.ref-terms button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 18px;
}

.ref-section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  margin: 28px 0 18px;
}

.ref-section-head .search {
  margin: 0;
}

.empty-ref {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 74px 0;
  text-align: center;
}

.empty-ref h3 {
  margin: 0;
  font-size: 28px;
}

.empty-ref p {
  margin: 0;
  color: var(--muted);
  font-size: 20px;
}

.ref-item {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  margin-bottom: 12px;
}

.ref-item h3,
.ref-item p {
  margin: 0;
}

.ref-item p,
.ref-item span {
  color: var(--muted);
}

.period-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 28px 0 20px;
}

.period-picker label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.period-picker input {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  padding: 0 12px;
}

.period-picker button {
  grid-column: 1 / -1;
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  background: #050505;
  color: #fff;
  font-size: 18px;
}

.analytics-card {
  padding: 18px;
}

.chart {
  position: relative;
  height: 320px;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 100% 10%, 10% 100%;
}

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

.chart polyline {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
}

.chart circle {
  fill: var(--paper);
  stroke: var(--accent);
  stroke-width: 2;
}

.analytics-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.analytics-summary div {
  padding: 16px;
  border-radius: 18px;
  background: var(--soft);
}

.analytics-summary strong {
  display: block;
  font-size: 22px;
}

.analytics-summary span {
  color: var(--muted);
}

.details-title {
  margin: 32px 0 18px;
}

.qr-modal {
  display: grid;
  justify-items: center;
  gap: 18px;
  width: min(520px, calc(100vw - 48px));
}

.qr-close {
  justify-self: end;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.qr-close svg,
.qr-modal .primary svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  vertical-align: middle;
}

.qr-image {
  width: min(320px, 78vw);
  height: min(320px, 78vw);
}

.qr-code {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 24px;
  font-weight: 800;
}

.qr-code button {
  border: 0;
  background: transparent;
  font-size: 24px;
}

.divider {
  height: 1px;
  margin: 12px 0;
  background: var(--line);
}

.modal {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 80px);
  overflow: auto;
  padding: 24px;
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%);
}

.filter-panel {
  top: auto;
  bottom: 0;
  width: min(640px, 100vw);
  max-height: calc(92vh - var(--safe-bottom));
  padding: 24px 22px calc(22px + var(--safe-bottom));
  border-radius: 28px 28px 0 0;
  transform: translateX(-50%);
}

.filter-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.filter-head h2 {
  margin: 0;
  font-size: 28px;
}

.filter-head button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
}

.filter-head button:first-child {
  justify-self: start;
  color: var(--accent);
}

.filter-head button:last-child {
  justify-self: end;
}

.filter-form {
  display: grid;
  gap: 18px;
}

.sort-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sort-pills label {
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
}

.sort-pills input {
  display: none;
}

.sort-pills label:has(input:checked) {
  border-color: var(--accent);
  color: var(--accent);
}

.orders-screen {
  min-height: calc(100vh - 180px);
  padding: 34px 18px 150px;
}

.big-title {
  margin: 30px 0 20px;
  font-size: clamp(54px, 16vw, 78px);
  font-weight: 400;
  letter-spacing: 0;
}

.order-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.order-tabs button {
  min-height: 64px;
  border: 1px solid transparent;
  border-radius: 28px;
  background: var(--soft);
  color: var(--muted);
  font-size: 18px;
}

.order-tabs button.active {
  border-color: var(--line);
  background: var(--paper);
  color: var(--ink);
}

.order-tabs span {
  display: inline-grid;
  min-width: 34px;
  min-height: 34px;
  margin-left: 8px;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
}

.empty-orders {
  display: grid;
  justify-items: center;
  gap: 16px;
  margin-top: 120px;
  text-align: center;
}

.empty-orders h2 {
  margin: 0;
  font-size: 30px;
}

.empty-orders p {
  margin: 0 0 50px;
  color: var(--muted);
  font-size: 22px;
}

.empty-orders button {
  width: min(360px, 90%);
  min-height: 66px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 22px;
}

.order-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.order-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.order-side,
.message-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.order-side button,
.message-actions button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.message-card p {
  white-space: normal;
  line-height: 1.45;
}

.detail-head {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: center;
}

.detail-head img {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  object-fit: cover;
}

.detail-head h1 {
  margin: 4px 0 10px;
  font-size: 30px;
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--soft);
  font-weight: 800;
}

.exchange-detail {
  display: grid;
  gap: 18px;
}

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

.quote-breakdown {
  display: grid;
  gap: 8px;
}

.quote-breakdown p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 12px;
  border-radius: 16px;
  background: var(--soft);
}

.quote-breakdown span {
  color: var(--muted);
}

.proof-link {
  color: var(--accent);
  font-weight: 900;
}

.exchange-note {
  margin: -6px 0 4px;
  color: var(--muted);
  line-height: 1.45;
}

.modal h2 {
  margin-top: 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(126px + var(--safe-bottom));
  z-index: 90;
  display: none;
  width: min(540px, calc(100vw - 28px));
  padding: 14px 18px;
  border-radius: 18px;
  background: var(--paper);
  color: var(--danger);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.toast.show {
  display: block;
}

@media (max-width: 480px) {
  .topbar {
    padding-inline: 18px;
  }

  .logo {
    width: min(178px, 50vw);
    height: 50px;
  }

  .dock {
    grid-template-columns: 1fr;
  }

  .profile-cover {
    height: 390px;
  }

  .profile-body {
    padding-inline: 26px;
  }
}

.exchange-screen h1 {
  margin: 18px 0 24px;
  font-size: clamp(34px, 8vw, 54px);
  font-weight: 500;
}

.exchange-grid {
  display: grid;
  gap: 14px;
}

.exchange-card .shop-head svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.rate-row,
.exchange-actions,
.requisites-list p,
.calc-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rate-row {
  margin-top: 10px;
  color: var(--muted);
}

.rate-row strong {
  color: var(--ink);
}

.exchange-profile .profile-cover {
  aspect-ratio: 16 / 10;
}

.exchange-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.exchange-tool {
  display: grid;
  gap: 16px;
}

.exchange-tool h2 {
  margin: 0;
  font-size: 28px;
}

.calc-result {
  padding: 16px;
  border-radius: 20px;
  background: var(--soft);
}

.calc-result span,
.requisites-list span {
  color: var(--muted);
}

.calc-result strong {
  font-size: 24px;
}

.exchange-actions {
  align-items: stretch;
}

.ghost-button {
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.requisites-list {
  display: grid;
  gap: 8px;
}

.requisites-list p {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
