: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: "Manrope", "Inter", "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}

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

.field:has(input[name="stock"]) {
  display: none;
}

button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

/* CERBER red-black visual system */
:root,
body[data-theme="dark"] {
  --bg: #050506;
  --paper: #101012;
  --ink: #f5f3f3;
  --muted: #aaa4a4;
  --line: rgba(255, 82, 72, .22);
  --soft: #191416;
  --accent: #ef3d35;
  --danger: #ff5a52;
  --black: #080809;
  --shadow: 0 20px 54px rgba(0, 0, 0, .46);
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, .28);
  color-scheme: dark;
}

html,
body,
.app {
  background: #050506;
  color: var(--ink);
}

body {
  background-image: linear-gradient(145deg, rgba(105, 8, 8, .16), transparent 34%);
  background-attachment: fixed;
}

button,
a,
.shop-card,
.product-card,
.panel {
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

button:active:not(:disabled) {
  transform: scale(.97);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(255, 77, 67, .8);
  outline-offset: 2px;
}

.topbar {
  border-bottom: 1px solid rgba(255, 74, 64, .18);
  background: rgba(7, 7, 8, .94);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .3), 0 1px 18px rgba(196, 22, 17, .08);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-lockup .logo {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  filter: none !important;
  box-shadow: 0 0 24px rgba(239, 39, 31, .25);
}

.brand-lockup > span {
  display: grid;
  gap: 1px;
  text-align: left;
}

.brand-lockup strong {
  color: #fff;
  font-size: 16px;
  line-height: 1;
}

.brand-lockup small {
  color: #d15b56;
  font-size: 8px;
  font-weight: 800;
}

.balance,
.topbar-menu {
  border-color: rgba(255, 75, 66, .24) !important;
  background: #101012 !important;
  box-shadow: inset 0 0 18px rgba(177, 23, 18, .05);
}

.hero,
.feed,
.screen {
  background: transparent;
}

.hero {
  margin: 0 8px;
  padding-inline: 12px;
  border-bottom: 1px solid rgba(255, 81, 71, .14);
}

.search,
.filter-inline-button,
.location-select,
input,
textarea,
select {
  border-color: rgba(255, 82, 72, .2) !important;
  background: #0d0d0f !important;
  color: var(--ink) !important;
}

.tabs,
.pill-tabs,
.order-tabs {
  gap: 10px;
}

.tab,
.tabs button,
.pill-tabs button,
.order-tabs button,
.filter-inline-button {
  border: 1px solid rgba(255, 82, 72, .18);
  background: #111113;
  color: var(--muted);
}

.tab.active,
.tabs button.active,
.pill-tabs button:not(.muted),
.order-tabs button.active {
  border-color: rgba(255, 82, 72, .58);
  background: #281313;
  color: #fff;
  box-shadow: 0 0 18px rgba(234, 47, 39, .17), inset 0 0 18px rgba(234, 47, 39, .06);
}

.store-feed,
.product-catalog-grid,
.feed {
  gap: 16px;
}

.shop-card,
.product-card,
.panel,
.review-card,
.wallet-balance-card,
.wallet-convert-card,
.wallet-transactions,
.official-mirrors-compact {
  border: 1px solid rgba(255, 82, 72, .22);
  border-radius: 8px;
  background: linear-gradient(155deg, #131315, #0c0c0e);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .3), 0 0 22px rgba(204, 29, 23, .07);
}

.shop-card:hover,
.product-card:hover {
  border-color: rgba(255, 82, 72, .48);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .38), 0 0 28px rgba(222, 39, 31, .13);
}

.shop-card .shop-image,
.product-image,
.profile-cover,
.store-gallery img {
  background: #09090a;
}

.verify {
  background: #ef3d35;
  box-shadow: 0 0 16px rgba(239, 61, 53, .36);
}

.primary,
.store-card-actions .primary,
.group-join-button,
.product-card-buy {
  border: 1px solid #ff544b !important;
  background: linear-gradient(180deg, #ef4138, #a81713) !important;
  color: #fff !important;
  box-shadow: 0 8px 22px rgba(201, 31, 25, .24), inset 0 1px rgba(255, 255, 255, .13);
}

.ghost-button,
.store-card-actions .ghost-button {
  border-color: rgba(255, 82, 72, .26) !important;
  background: #141113 !important;
  color: var(--ink) !important;
}

.primary:hover,
.product-card-buy:hover,
.store-card-actions button:hover {
  border-color: #ff746d !important;
  box-shadow: 0 0 24px rgba(238, 52, 44, .28);
}

.product-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.product-card-buy {
  display: inline-flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.product-click:active .product-card-buy {
  background: linear-gradient(180deg, #ff5e55, #c3211b) !important;
  box-shadow: 0 0 28px rgba(255, 66, 56, .38);
}

.product-stock {
  margin-bottom: 14px !important;
}

.official-mirrors-compact {
  color: var(--ink);
}

.official-domain-list button {
  border-color: rgba(255, 82, 72, .18);
  background: #171315;
}

.buyer-sidebar,
.account-card,
.nav-card {
  background: #09090a !important;
  color: var(--ink);
}

.buyer-sidebar .account-row:hover,
.buyer-sidebar .account-row:focus-visible,
.buyer-sidebar .account-row.active {
  border-color: rgba(255, 82, 72, .38);
  background: #241112;
  color: #ff6961;
  box-shadow: inset 3px 0 #ef3d35;
}

.buyer-sidebar-language {
  border-color: rgba(255, 82, 72, .22);
  background: #111113;
}

.buyer-sidebar-language button.active {
  border-color: #ef3d35;
  background: #ef3d35;
  color: #fff;
  box-shadow: 0 0 18px rgba(239, 61, 53, .28);
}

/* Wallet and deposit remain within the phone viewport. */
.wallet-screen,
.wallet-screen > *,
.wallet-balance-row,
.wallet-actions,
.wallet-tx,
.modal,
.modal .form,
.modal .field {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.wallet-screen {
  width: 100%;
  overflow: hidden;
}

.wallet-coin-panel,
.wallet-coin-list {
  min-width: 0;
}

.wallet-actions > button {
  flex: 1 1 160px;
}

.wallet-tx-main,
.wallet-tx strong,
.deposit-address strong {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.modal-backdrop {
  background: rgba(0, 0, 0, .76);
  backdrop-filter: blur(8px);
}

.modal {
  border: 1px solid rgba(255, 82, 72, .26);
  border-radius: 8px;
  background: #101012;
  color: var(--ink);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .68), 0 0 30px rgba(203, 29, 23, .12);
}

/* Group chat and floating chat use the same dark surface. */
.group-chat-shell,
.group-join-card,
.group-chat-head,
.group-chat-list,
.group-compose,
.group-widget-panel,
.group-widget-panel header,
.group-widget-list,
.group-widget-form,
.group-widget-message,
.group-widget-message.own,
.group-widget-message.system,
.group-input-wrap,
.group-sticker-row {
  border-color: rgba(255, 82, 72, .2) !important;
  background: #0d0d0f !important;
  color: var(--ink) !important;
}

.group-chat-shell,
.group-widget-panel {
  box-shadow: 0 22px 65px rgba(0, 0, 0, .58), 0 0 24px rgba(218, 38, 31, .1);
}

.group-chat-head {
  border-bottom-color: rgba(255, 82, 72, .2) !important;
}

.group-chat-list {
  background-image: linear-gradient(180deg, #0c0c0e, #09090a) !important;
}

.group-message-bubble,
.group-message-content,
.group-pinned,
.group-roll-banner {
  border-color: rgba(255, 82, 72, .18) !important;
  background: #171315 !important;
  color: var(--ink) !important;
}

.group-message.own .group-message-bubble,
.group-message.own .group-message-content {
  background: #261314 !important;
}

.group-widget-button,
.group-widget-send,
.group-send-button {
  border-color: #ef3d35 !important;
  background: linear-gradient(145deg, #f04a42, #9d1411) !important;
  color: #fff !important;
  box-shadow: 0 12px 32px rgba(221, 42, 34, .34) !important;
}

.group-message > div {
  border-color: rgba(255, 82, 72, .2) !important;
  background: #171315 !important;
  color: var(--ink) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .24);
}

.group-message.own > div {
  border-color: rgba(255, 82, 72, .34) !important;
  background: #281415 !important;
}

.group-avatar {
  border: 1px solid rgba(255, 82, 72, .28);
  background: #151113;
  color: #ff6b63;
}

.group-live-dot {
  background: #ff554d;
  box-shadow: 0 0 0 5px rgba(255, 85, 77, .12), 0 0 18px rgba(255, 85, 77, .55);
}

.group-room-tabs button.active {
  background: #ef3d35;
  color: #fff;
  box-shadow: 0 8px 18px rgba(222, 45, 37, .24);
}

.group-live-dot {
  background: #ff554d;
  box-shadow: 0 0 0 5px rgba(255, 85, 77, .12), 0 0 18px rgba(255, 85, 77, .55);
}

.group-room-tabs {
  border-color: rgba(255, 82, 72, .22);
  background: #151113;
}

.group-room-tabs button.active {
  background: #ef3d35;
  box-shadow: 0 8px 18px rgba(222, 45, 37, .24);
}

.auth-wrap {
  background: linear-gradient(145deg, rgba(97, 9, 9, .22), transparent 42%), #050506;
}

.auth-card {
  border: 1px solid rgba(255, 82, 72, .24);
  border-radius: 8px;
  background: #0e0e10;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .62), 0 0 34px rgba(212, 32, 25, .1);
}

.auth-card > img.mfa-qr {
  display: block;
  width: min(240px, 72vw);
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  margin: 10px auto 16px;
  padding: 8px;
  object-fit: contain;
  object-position: center;
  filter: none !important;
  mix-blend-mode: normal;
  box-shadow: none;
  background: #fff;
  border: 1px solid #6d2929;
  border-radius: 6px;
}

.recovery-codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 18px;
}

.recovery-codes code {
  padding: 10px 8px;
  overflow-wrap: anywhere;
  color: #fff;
  background: #101113;
  border: 1px solid #6d2929;
  border-radius: 4px;
}

@media (max-width: 520px) {
  .recovery-codes { grid-template-columns: 1fr; }
}

.auth-card > img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  filter: none !important;
  box-shadow: 0 0 34px rgba(235, 40, 32, .2);
}

@media (max-width: 899px) {
  .brand-lockup {
    gap: 7px;
  }

  .brand-lockup .logo {
    width: 42px !important;
    height: 42px !important;
    flex-basis: 42px;
  }

  .brand-lockup strong {
    font-size: 13px;
  }

  .brand-lockup small {
    font-size: 7px;
  }

  .wallet-screen {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding-inline: 8px;
  }

  .wallet-hero h1 {
    margin-top: 6px;
    font-size: 34px;
  }

  .wallet-hero p {
    font-size: 15px;
  }

  .wallet-balance-card,
  .wallet-convert-card,
  .wallet-transactions {
    width: 100%;
    padding: 16px;
  }

  .wallet-balance-row {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
  }

  .wallet-balance-row strong {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: 22px;
  }

  .wallet-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .wallet-actions > button {
    width: 100%;
    min-height: 48px;
  }

  .wallet-coin-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .wallet-tx {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .wallet-tx-details {
    width: 100%;
  }

  .deposit-address,
  .wallet-convert-card p {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    border-radius: 8px;
    padding: 14px;
  }

  .deposit-address button {
    width: 100%;
  }

  .modal {
    top: auto;
    bottom: 0;
    width: 100%;
    max-height: calc(100dvh - 12px);
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    border-radius: 8px 8px 0 0;
    transform: translateX(-50%);
  }

  .group-chat-screen {
    width: 100%;
    height: calc(100dvh - 138px - env(safe-area-inset-bottom));
    min-height: 440px;
  }

  .group-chat-shell {
    border-radius: 8px;
  }

  .group-chat-head,
  .group-chat-list,
  .group-compose {
    padding-inline: 10px;
  }

  .group-widget-panel {
    width: calc(100vw - 16px);
    border-radius: 8px;
  }

  .product-catalog-grid .product-body {
    padding: 12px;
  }

  .product-card-buy {
    min-height: 42px;
    padding-inline: 10px;
  }
}

@media (max-width: 420px) {
  .brand-lockup > span > span {
    display: none;
  }

  .product-catalog-grid .product-card .product-click {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .product-catalog-grid .product-image {
    width: 104px;
    min-height: 184px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Unified marketplace theme and navigation. */
:root,
body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #090a0a;
  --paper: #151618;
  --ink: #f4f4f2;
  --muted: #a3a3a0;
  --line: #303134;
  --soft: #202124;
  --accent: #d7443e;
  --black: #0d0e0f;
}

html,
body,
.app,
.shop-panel-page,
.seller-dashboard-main {
  background: var(--bg);
}

input,
textarea,
select,
.location-select,
.search,
.filter-inline-button {
  border-color: var(--line);
  background: #111214;
  color: var(--ink);
}

input::placeholder,
textarea::placeholder {
  color: #77787c;
}

.dock {
  grid-template-columns: 1fr;
  background: rgba(17, 18, 20, .96);
}

.official-mirrors-compact {
  display: grid;
  grid-template-columns: minmax(130px, .7fr) minmax(0, 1.5fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171a1e;
  color: var(--ink);
}

.official-domain-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.official-domain-list button {
  min-width: 0;
  min-height: 40px;
  overflow: hidden;
  border: 1px solid #37393e;
  border-radius: 6px;
  background: #22252a;
  color: var(--ink);
  padding: 8px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.buyer-sidebar {
  color: var(--ink);
}

.buyer-sidebar-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  gap: 10px;
  align-items: center;
  padding: 8px;
}

.buyer-sidebar-head img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.buyer-sidebar-head strong {
  font-size: 17px;
  letter-spacing: 0;
}

.buyer-sidebar-primary,
.buyer-sidebar-more {
  display: grid;
  gap: 6px;
}

.buyer-sidebar-more {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.buyer-sidebar .account-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 9px 10px;
  text-align: left;
}

.buyer-sidebar .account-row:hover,
.buyer-sidebar .account-row:focus-visible {
  border-color: #49302f;
  background: #241817;
}

.buyer-sidebar .account-row svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.shop-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.shop-card .shop-click {
  width: 100%;
}

.shop-card .shop-inner {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.shop-card .shop-image {
  grid-row: 1 / span 2;
  width: 92px;
  height: 92px;
  border-radius: 6px;
  object-fit: cover;
}

.shop-card .marketplace-metrics {
  grid-column: 2;
}

.store-card-stock,
.product-stock.out-of-stock,
.catalog-selection,
.catalog-fallback {
  color: var(--muted);
}

.store-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 14px 14px;
}

.store-card-actions button {
  min-height: 44px;
  border-radius: 6px;
}

.shop-card-editor {
  display: block;
  padding: 12px 0;
}

.shop-card-editor summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  cursor: pointer;
}

.shop-card-editor .form {
  width: 100%;
  margin-top: 14px;
}

.shop-variant-list {
  display: grid;
  gap: 6px;
}

.shop-variant-list span {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
}

@media (min-width: 900px) {
  .app {
    width: calc(100% - 264px);
    max-width: 1180px;
    margin: 0 auto 0 264px;
    padding-bottom: 28px;
  }

  .nav-pop {
    inset: 0 auto 0 0;
    display: block !important;
    width: 244px;
    border-right: 1px solid var(--line);
    background: #0d0e0f;
    pointer-events: auto;
  }

  .nav-card {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    border-radius: 0;
    background: transparent;
    padding: 16px;
    transform: none;
  }

  .buyer-sidebar-head .nav-close,
  .quick-actions,
  .dock {
    display: none;
  }

  .feed,
  .screen,
  .hero {
    padding-left: 22px;
    padding-right: 22px;
  }

  .store-feed,
  .product-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 899px) {
  .nav-pop {
    background: rgba(0, 0, 0, .66);
  }

  .nav-pop.open {
    display: block;
  }

  .nav-card {
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: min(86vw, 340px);
    height: 100dvh;
    overflow-y: auto;
    border-radius: 0 8px 8px 0;
    background: #101113;
    padding: 14px;
    transform: none;
  }

  .buyer-sidebar-primary {
    flex: 0 0 auto;
  }

  .buyer-sidebar .account-row {
    min-height: 50px;
  }

  .official-mirrors-compact {
    grid-template-columns: 1fr;
  }

  .official-domain-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .official-domain-list button {
    padding-inline: 6px;
    font-size: 12px;
  }

  .shop-card .shop-inner {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .shop-card .shop-image {
    width: 76px;
    height: 76px;
  }

  .shop-card-editor summary,
  .shop-card-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .shop-card-actions {
    grid-template-columns: 1fr;
  }
}

button:not(.link-button)::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  width: 160%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0) 62%);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.22);
  transition: opacity 180ms ease, transform 220ms ease;
  pointer-events: none;
}

button:not(.link-button):active::before {
  opacity: 0.24;
  transform: translate(-50%, -50%) scale(1);
}

button:active {
  transform: scale(0.96);
}

button.tap-loading:not(:disabled):not(.is-loading) {
  filter: brightness(0.96);
}

button.tap-loading:not(:disabled):not(.is-loading)::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 0.7;
  pointer-events: none;
  animation: button-spin 720ms linear infinite;
}

button:disabled {
  cursor: default;
  opacity: 0.58;
}

button:disabled::before {
  display: none;
}

button:disabled:active {
  transform: none;
}

.cms-visual-toolbar {
  position: fixed;
  z-index: 99999;
  left: 12px;
  right: 12px;
  top: 12px;
  display: grid;
  grid-template-columns: auto minmax(130px, 1fr) auto auto minmax(140px, 1.2fr);
  gap: 8px;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(18, 18, 20, 0.94);
  color: #fff;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.28);
}

.cms-visual-toolbar input {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  background: #fff;
  color: #111;
  padding: 9px 10px;
}

.cms-visual-toolbar button,
.cms-visual-toolbar a {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #111;
  font-weight: 800;
  padding: 0 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cms-visual-toolbar a {
  background: #fff;
}

.broadcast-image {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 8px;
  margin: 10px 0;
}

.cms-visual-toolbar span {
  color: rgba(255, 255, 255, 0.78);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cms-visual-editing .app,
.cms-visual-editing .auth-wrap {
  padding-top: 76px;
}

body.cms-visual-editing * {
  scroll-margin-top: 90px;
}

.cms-visual-editing [data-cms-editing="true"],
.cms-visual-editing *:hover {
  outline: 2px solid rgba(255, 138, 31, 0.75);
  outline-offset: 2px;
}

.cms-visual-editing .cms-visual-toolbar,
.cms-visual-editing .cms-visual-toolbar * {
  outline: 0 !important;
}

.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: normal;
}

.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.08);
}

.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;
  white-space: nowrap;
}

.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;
}

.filter-inline-button {
  width: fit-content;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 800;
}

.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);
}

@media (max-width: 560px) {
  .app {
    max-width: 100%;
    background: #fff;
  }

  .topbar {
    padding: 8px 14px;
  }

  .hero {
    padding: 14px 12px 10px;
  }

  .hero h1 {
    margin: 8px 0 18px;
    font-size: 16px;
    font-weight: 600;
  }

  .search {
    min-height: 42px;
    margin-bottom: 14px;
    padding: 0 4px;
    border-radius: 0;
    background: transparent;
  }

  .search b {
    font-size: 24px;
    color: #111;
  }

  .search input {
    font-size: 15px;
  }

  .tabs {
    gap: 10px;
  }

  .tab {
    min-width: 58px;
    min-height: 44px;
    font-size: 13px;
  }

  .official-mirrors {
    border-radius: 0 0 18px 18px;
    background: #f6f7f8;
  }

  .official-mirrors summary {
    padding: 10px 12px;
  }

  .official-mirrors summary span {
    font-size: 13px;
  }

  .official-mirrors summary small {
    font-size: 13px;
  }

  .mega-product-screen .breadcrumbs,
  .product-page-category,
  .product-copy,
  .shop-line {
    font-size: 13px;
  }

  .product-page-title {
    font-size: 24px;
    line-height: 1.12;
  }

  .mega-gallery {
    grid-template-columns: minmax(0, 2fr) minmax(92px, 1fr);
    gap: 10px;
  }

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

  .mega-position-card,
  .payment-summary-card,
  .wallet-card-ltc,
  .order-card {
    border-radius: 8px;
  }

  .mega-position-card {
    gap: 12px;
    padding: 14px;
  }

  .mega-position-grid {
    gap: 10px;
  }

  .mega-position-grid span,
  .payment-lines span {
    font-size: 12px;
  }

  .mega-position-grid strong,
  .payment-lines strong {
    font-size: 13px;
  }

  .buy-button {
    justify-self: end;
    min-width: 132px;
    min-height: 42px;
    font-size: 14px;
  }

  .orders-screen {
    padding: 18px 10px 128px;
  }

  .big-title {
    margin: 12px 0 16px;
    font-size: 34px;
  }

  .order-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .order-tabs button {
    min-width: max-content;
    min-height: 42px;
    font-size: 13px;
    border-radius: 999px;
  }

  .order-card {
    align-items: start;
    padding: 14px;
  }
}

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

.home-mirrors-first {
  padding-bottom: 0;
}

.home-mirrors-first + .hero {
  padding-top: 18px;
}

.home-feed {
  padding-top: 2px;
}

.store-feed {
  display: grid;
  gap: 10px;
}

.official-mirrors {
  overflow: hidden;
  border-radius: 20px;
  background: #eaf2ff;
  color: #1f2a3a;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

body[data-theme="dark"] .official-mirrors {
  background: #182131;
  color: var(--ink);
}

.official-mirrors summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px 10px;
  align-items: center;
  padding: 17px 18px;
  list-style: none;
  cursor: pointer;
}

.official-mirrors summary::-webkit-details-marker {
  display: none;
}

.official-mirrors summary span {
  font-size: 17px;
  color: var(--muted);
}

.official-mirrors summary small {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.official-mirrors summary b {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.official-mirrors[open] summary b {
  color: var(--accent);
}

.mirror-list {
  display: grid;
  gap: 8px;
  padding: 0 14px 16px;
}

.mirror-list h3 {
  margin: 10px 4px 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.mirror-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px 10px 10px 13px;
}

body[data-theme="dark"] .mirror-row {
  background: rgba(255, 255, 255, 0.06);
}

.mirror-row span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 13px;
  line-height: 1.25;
}

.mirror-copy {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 19px;
  transition: transform 150ms ease, background 150ms ease;
}

.mirror-copy:active {
  transform: scale(0.9);
  background: var(--soft);
}

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

.group-chat-screen {
  width: min(100%, 920px);
  margin: 0 auto;
  height: calc(100dvh - 92px);
  min-height: 560px;
  padding: 0;
}

.group-chat-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(148, 163, 184, .32);
  border-radius: 24px;
  overflow: hidden;
  background: #f8fafc;
  box-shadow: 0 22px 70px rgba(15, 23, 42, .12);
}

.group-join-card {
  display: grid;
  justify-items: center;
  gap: 16px;
  width: min(100%, 520px);
  margin: 8vh auto 0;
  padding: 34px 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 50px rgba(17, 24, 39, .1);
  text-align: center;
  animation: group-pop-in 220ms ease both;
}

.group-join-card h1,
.group-join-card p {
  margin: 0;
}

.group-join-card h1 {
  font-size: 30px;
}

.group-join-card p {
  color: var(--muted);
  line-height: 1.5;
}

.group-join-stats {
  display: grid;
  gap: 3px;
  padding: 14px 20px;
  border-radius: 16px;
  background: var(--soft);
}

.group-join-stats strong {
  font-size: 28px;
}

.group-join-stats span {
  color: var(--muted);
  font-size: 13px;
}

.group-join-button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: #17191f;
  color: #fff;
  padding: 0 22px;
  font-weight: 900;
}

.group-chat-head {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid rgba(148, 163, 184, .28);
  backdrop-filter: blur(16px);
}

.group-chat-title {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.group-live-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #2ed47a;
  box-shadow: 0 0 0 5px rgba(46, 212, 122, .16), 0 0 18px rgba(46, 212, 122, .75);
}

.group-chat-title h2,
.group-chat-title p {
  margin: 0;
}

.group-chat-title h2 {
  font-size: 21px;
  line-height: 1.2;
}

.group-chat-title p {
  color: var(--muted);
  font-size: 13px;
}

.group-room-tabs {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 999px;
  background: rgba(241, 245, 249, .82);
}

.group-room-tabs button {
  min-width: 54px;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}

.group-room-tabs button.active {
  background: #17191f;
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .18);
}

.group-title-form {
  display: grid;
  grid-template-columns: minmax(140px, 220px) auto;
  gap: 8px;
}

.group-title-form input,
.group-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.group-title-form input {
  padding: 10px 12px;
}

.group-pinned,
.group-roll-banner {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff9ec;
}

.group-pinned span,
.group-roll-banner strong {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #9a6515;
}

.group-pinned p {
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.group-roll-banner {
  background: #eef8f2;
}

.group-roll-banner strong {
  color: #1f8a4f;
}

.group-roll-banner span {
  font-weight: 800;
  color: #15633a;
}

.group-chat-list {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
  overflow-y: auto;
  min-height: 0;
  scroll-behavior: smooth;
  padding: 20px 18px 22px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, .96) 0%, rgba(241, 245, 249, .96) 100%),
    radial-gradient(circle at 20px 20px, rgba(148, 163, 184, .12) 1px, transparent 1px);
  background-size: auto, 22px 22px;
}

.group-message {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  width: min(82%, 660px);
  align-self: flex-start;
  animation: group-message-in 180ms ease both;
}

.group-message.own {
  grid-template-columns: minmax(0, 1fr) 42px;
  align-self: flex-end;
}

.group-message.own .group-avatar {
  order: 2;
}

.group-message > div {
  position: relative;
  padding: 12px 15px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 18px 18px 18px 6px;
  background: var(--paper);
  box-shadow: 0 10px 26px rgba(15, 23, 42, .07);
}

.group-message.own > div {
  border-color: rgba(56, 189, 248, .32);
  border-radius: 18px 18px 6px 18px;
  background: #e7f6ff;
}

.group-avatar {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #16181d;
  color: #fff;
  font-weight: 900;
}

.group-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.group-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.group-message p {
  margin: 7px 0 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.group-message.sticker-message > div {
  width: max-content;
  max-width: 160px;
  padding: 8px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.group-message.sticker-message {
  width: max-content;
  max-width: min(92%, 220px);
  grid-template-columns: 40px max-content;
  align-items: start;
}

.group-message.sticker-message.own {
  grid-template-columns: max-content 40px;
}

.group-message.sticker-message .group-meta {
  justify-content: flex-start;
  gap: 6px;
  font-size: 12px;
  line-height: 1.2;
}

.group-message.sticker-message .group-meta span {
  white-space: nowrap;
}

.chat-sticker {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-top: 4px;
}

.chat-inline-emojis {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.chat-inline-emojis img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.message-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.message-reactions button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 26px;
  padding: 3px 7px;
  border: 1px solid rgba(148, 163, 184, .45);
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.message-reactions img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.message-reaction-picker {
  position: absolute;
  left: 8px;
  bottom: calc(100% + 8px);
  display: block;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 16px 40px rgba(15, 23, 42, .2);
  z-index: 12;
}

.group-message.own .message-reaction-picker {
  right: 8px;
  left: auto;
}

.message-reaction-picker[hidden] {
  display: none;
}

.message-reaction-grid {
  display: grid;
  grid-template-columns: repeat(6, 34px);
  gap: 5px;
}

.message-reaction-grid button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(244, 238, 234, .94);
}

.message-reaction-grid img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.message-action-menu {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, .35);
}

.message-action-menu button {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: rgba(15, 23, 42, .06);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 10px;
  text-align: left;
}

.group-system-message {
  display: flex;
  align-self: center;
  gap: 8px;
  max-width: min(92%, 620px);
  padding: 9px 12px;
  border: 1px solid #efd6a5;
  border-radius: 999px;
  background: #fff8e8;
  color: #7a5416;
  font-weight: 800;
  animation: group-pop-in 180ms ease both;
}

.group-system-message p {
  margin: 0;
}

.group-attachments {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.group-attachment {
  width: min(100%, 420px);
  max-height: 360px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--soft);
}

.group-audio {
  width: min(100%, 420px);
}

.group-like-badge {
  margin-top: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: #e54862;
  font: inherit;
  font-weight: 800;
}

.group-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.group-actions button,
.group-title-form button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  padding: 9px 12px;
}

.group-compose {
  flex: 0 0 auto;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .92);
  border-top: 1px solid rgba(148, 163, 184, .28);
  backdrop-filter: blur(18px);
}

.group-form {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 58px;
  gap: 10px;
  align-items: center;
  position: relative;
}

.group-input-wrap {
  position: relative;
  min-width: 0;
}

.group-emoji-draft {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  min-height: 34px;
  margin: 0 48px 8px 12px;
  padding: 5px 8px;
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, .35);
  border-radius: 18px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}

.group-emoji-draft[hidden] {
  display: none;
}

.group-emoji-draft .chat-inline-emojis {
  flex-wrap: nowrap;
  margin-left: 0;
}

.group-emoji-draft button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: #17191f;
  color: #fff;
  font: inherit;
  font-weight: 900;
}

.group-form textarea {
  display: block;
  min-height: 58px;
  max-height: 124px;
  border-radius: 999px;
  padding: 16px 56px 16px 22px;
  resize: none;
  background: rgba(241, 245, 249, .96);
  box-shadow: inset 0 1px 5px rgba(15, 23, 42, .08);
  font-size: 18px;
}

.group-form textarea::placeholder {
  color: #8d8d89;
}

.group-sticker-row {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  left: auto;
  width: min(580px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  max-height: min(360px, 48dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .18);
  animation: group-picker-in 150ms ease both;
  z-index: 30;
}

.group-sticker-row[hidden] {
  display: none;
}

.group-sticker-row button,
.group-round-button,
.group-emoji-toggle {
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(244, 238, 234, .94);
  color: var(--ink);
  font: inherit;
}

.group-sticker-row button {
  width: 100%;
  aspect-ratio: 1;
  min-width: 0;
  min-height: 0;
  font-size: 20px;
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: transform 120ms ease, background 120ms ease;
}

.group-sticker-row button img {
  width: 84%;
  height: 84%;
  object-fit: contain;
  pointer-events: none;
}

.group-sticker-row button:active {
  transform: scale(.92);
  background: var(--soft);
}

.group-round-button {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  font-size: 28px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .13);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.group-send-button {
  background: #17191f;
  color: #fff;
}

.group-round-button:active {
  transform: scale(.94);
  box-shadow: 0 5px 12px rgba(15, 23, 42, .12);
}

.group-round-button.recording {
  background: var(--danger);
  color: #fff;
  animation: group-record-pulse 900ms ease-in-out infinite;
}

.group-emoji-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 40px;
  height: 40px;
  transform: translateY(-50%);
  font-size: 28px;
  color: #74736e;
}

.group-emoji-toggle.active {
  background: #17191f;
  color: #fff;
}

.group-send-button {
  grid-column: 2;
  display: none;
  background: #17191f;
  color: #fff;
}

.group-form.has-content .group-voice-button {
  display: none;
}

.group-form.has-content .group-send-button {
  display: grid;
  grid-column: 3;
}

.group-file-name {
  grid-column: 2;
  min-height: 17px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.group-widget {
  position: fixed;
  right: 18px;
  bottom: 88px;
  z-index: 20;
}

.group-widget-button {
  position: relative;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #1f8bff, #315cff);
  color: #fff;
  font-size: 25px;
  box-shadow: 0 16px 34px rgba(49, 92, 255, .34);
  animation: group-pop-in 180ms ease both;
}

.group-widget-button span {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ff3b5f;
  color: #fff;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 900;
}

.group-widget-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(360px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 22px 60px rgba(15, 23, 42, .22);
  animation: group-picker-in 160ms ease both;
}

.group-widget-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.group-widget-panel header button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--soft);
  color: var(--ink);
  font-size: 20px;
}

.group-widget-list {
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  padding: 12px;
  background: #f8fafc;
}

.group-widget-message {
  width: 88%;
  padding: 9px 10px;
  border-radius: 14px 14px 14px 5px;
  background: #fff;
  border: 1px solid var(--line);
}

.group-widget-message.own {
  justify-self: end;
  border-radius: 14px 14px 5px 14px;
  background: #eaf7ff;
}

.group-widget-message.system {
  justify-self: center;
  width: auto;
  max-width: 92%;
  border-radius: 999px;
  background: #fff8e8;
}

.group-widget-message span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.group-widget-message p {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.35;
}

.group-widget-form {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px 38px;
  gap: 7px;
  align-items: center;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.group-widget-form textarea {
  min-height: 38px;
  max-height: 92px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  resize: none;
  font: inherit;
  font-size: 14px;
}

.group-widget-form button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
}

.group-widget-send {
  background: #315cff !important;
  color: #fff !important;
  border-color: #315cff !important;
}

.group-widget-form button.recording {
  background: var(--danger);
  color: #fff;
}

.group-widget-form [data-group-widget-file-name] {
  grid-column: 2 / -1;
  min-height: 15px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

@keyframes group-message-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes group-pop-in {
  from { opacity: 0; transform: scale(.96); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes group-picker-in {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes group-record-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 72, 98, .35); }
  50% { box-shadow: 0 0 0 8px rgba(229, 72, 98, 0); }
}

@media (max-width: 720px) {
  .ref-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ref-link-row {
    grid-template-columns: 1fr 48px 54px;
  }

  .group-chat-screen {
    width: 100%;
    height: calc(100dvh - 78px);
    min-height: 520px;
    padding: 0;
  }

  .group-chat-shell {
    border-radius: 0;
    border-right: 0;
    border-left: 0;
  }

  .group-chat-head,
  .group-title-form {
    grid-template-columns: 1fr;
  }

  .group-chat-list {
    padding: 14px 10px;
  }

  .group-message {
    width: 92%;
  }

  .group-form {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    gap: 8px;
  }

  .group-round-button {
    width: 52px;
    height: 52px;
    font-size: 25px;
  }

  .group-form textarea {
    min-height: 52px;
    padding: 14px 50px 14px 18px;
    font-size: 17px;
  }

  .group-sticker-row {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(92px + env(safe-area-inset-bottom));
    width: auto;
    grid-template-columns: repeat(4, minmax(64px, 1fr));
    gap: 10px;
    max-height: min(460px, 58dvh);
    padding: 12px;
    border-radius: 22px;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateZ(0);
  }

  .group-sticker-row button {
    min-height: 64px;
    border-radius: 18px;
  }

  .group-widget {
    right: 12px;
    bottom: 78px;
  }

  .group-widget-button {
    width: 54px;
    height: 54px;
  }

  .group-widget-panel {
    width: calc(100vw - 20px);
    right: -2px;
  }
}

.empty-chat {
  text-align: center;
  color: var(--muted);
  padding: 40px 0;
}

.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;
}

.home-feed .shop-inner {
  padding: 14px;
}

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

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

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

.home-feed .shop-title h2 {
  font-size: 17px;
  font-weight: 600;
}

.verify {
  display: inline-grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  background: var(--accent);
  color: #fff;
  clip-path: polygon(50% 0, 61% 9%, 75% 6%, 82% 19%, 96% 24%, 93% 39%, 100% 50%, 91% 62%, 94% 76%, 79% 82%, 74% 96%, 59% 92%, 49% 100%, 38% 91%, 24% 94%, 18% 80%, 4% 75%, 8% 60%, 0 49%, 10% 38%, 7% 24%, 21% 18%, 27% 4%, 42% 9%);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.home-feed .verify {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  font-size: 13px;
}

.shop-message-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--ink);
}

.shop-message-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.new-store-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #101820;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.stopped-store-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 6px;
  margin-left: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f1c40f;
  color: #101820;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.shop-card.is-stopped {
  opacity: 0.72;
}

.shop-card.is-stopped .shop-click {
  cursor: not-allowed;
}

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

.home-feed .desc {
  margin: 2px 0 10px;
  font-size: 13px;
  line-height: 1.3;
}

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

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

.home-feed .shop-image {
  margin: 10px 0 9px;
  border-radius: 8px;
}

.home-feed .shop-card {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.home-feed .shop-card p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.profile-cover {
  height: auto;
  aspect-ratio: 16 / 6;
  background: var(--soft);
  object-position: center;
}

.panel.store-profile-panel {
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
}

.profile-body {
  position: relative;
  padding: 0 38px 28px;
}

.profile-avatar {
  display: block;
  width: 148px;
  height: 148px;
  margin-top: -74px;
  margin-bottom: 30px;
  border: 7px solid var(--paper);
  border-radius: 50%;
  background: var(--paper);
  object-fit: cover;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.16);
}

.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: 54px;
  border: 0;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  padding: 0 22px;
}

.primary.is-loading,
.ghost-button.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.button-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: button-spin 750ms linear infinite;
}

@keyframes button-spin {
  to {
    transform: rotate(360deg);
  }
}

.checkout-mini {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--soft);
}

.checkout-mini span {
  color: var(--muted);
}

.checkout-actions {
  display: grid;
  gap: 10px;
}

.checkout-balance-summary {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.checkout-balance-summary p {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
}

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

.primary.checkout-bonus-button {
  border-color: #f1a93a !important;
  background: linear-gradient(180deg, #f2b84b, #b96c0d) !important;
}

.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: 56px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
}

.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: 8px;
  background: var(--paper);
}

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

.product-store-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-store-name .verify {
  width: 23px;
  height: 23px;
  flex-basis: 23px;
  font-size: 13px;
}

.marketplace-metrics {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
  color: var(--ink);
  font-size: 16px;
}

.marketplace-metrics strong {
  margin-left: 3px;
  font-size: 17px;
}

.market-rating-summary,
.rating-summary {
  white-space: nowrap;
}

.market-metric-divider {
  color: var(--muted);
}

.market-metric-icon {
  position: relative;
  display: inline-grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.market-metric-ok { background: #31c676; }
.market-metric-time { background: #63aef2; }
.market-metric-star { background: #ffb733; }

.market-metric-time::before {
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  content: "";
}

.market-metric-time::after {
  position: absolute;
  width: 4px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  content: "";
  transform: translate(1px, -1px);
}

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

.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, 2fr) minmax(112px, 1fr);
  gap: 12px;
  align-items: start;
  width: min(100%, 820px);
}

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

.mega-gallery.single-image {
  grid-template-columns: minmax(0, 1fr);
}

.mega-gallery.single-image .mega-gallery-side {
  display: none;
}

.mega-gallery-button {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--soft);
  cursor: zoom-in;
  overflow: hidden;
}

.mega-gallery-button:focus-visible,
.product-lightbox-thumbs button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

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

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

.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: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 28px 0;
  color: var(--muted);
  font-size: 17px;
}

.product-mode-tabs button {
  min-width: 0;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: inherit;
  font: inherit;
}

.product-mode-tabs .active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
}

.product-review-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.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;
}

.top-cerberus {
  display: inline-grid;
  width: 1.65em;
  height: 1.12em;
  margin-left: 8px;
  vertical-align: -.15em;
  place-items: center;
  line-height: 1;
}

.group-message.pending-send > div {
  opacity: .68;
}

.message-send-failed {
  display: block;
  margin-top: 4px;
  color: #ff7373;
  font-size: .72rem;
  font-weight: 700;
}

.telegram-link-modal {
  width: min(460px, calc(100vw - 28px));
}

.telegram-link-status {
  margin: 0 0 14px;
  color: var(--muted, #aaa);
}

.telegram-link-code {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid rgba(239, 61, 53, .55);
  border-radius: 6px;
  background: #080809;
}

.telegram-link-code code {
  overflow-wrap: anywhere;
  color: #fff;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
}

.telegram-link-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.telegram-link-command {
  display: block;
  margin: 14px 0;
  overflow-wrap: anywhere;
  color: #d7d7d9;
  font-size: .88rem;
  letter-spacing: 0;
  text-align: center;
}

.top-cerberus svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 5px rgba(239, 61, 53, .34));
  transform-origin: 50% 78%;
  animation: topCerberusBarkNod 4.2s ease-out infinite both;
}

.top-cerberus-neck,
.top-cerberus-skull {
  fill: #09090b;
  stroke: #d83a34;
  stroke-width: 1.35;
  stroke-linejoin: round;
}

.top-cerberus-mark {
  fill: none;
  stroke: #6e2221;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-cerberus-muzzle {
  fill: #191012;
  stroke: #782321;
  stroke-width: .8;
}

.top-cerberus-eye {
  fill: #ff3d33;
  filter: drop-shadow(0 0 2px #ff3d33);
}

.top-cerberus-nose {
  fill: #050506;
}

.top-cerberus-mouth {
  transform-box: fill-box;
  transform-origin: center top;
  animation: topCerberusBarkMouth 4.2s cubic-bezier(.3, 0, .25, 1) infinite both;
}

.top-cerberus-mouth-left {
  transform-origin: right top;
}

.top-cerberus-mouth-right {
  transform-origin: left top;
}

.top-cerberus-mouth-shape {
  fill: #050506;
  stroke: #f04a42;
  stroke-width: .8;
}

.top-cerberus-fangs {
  fill: #e7e1dc;
}

.top-cerberus-steam {
  fill: none;
  stroke: #d5d7da;
  stroke-width: 1.6;
  stroke-linecap: round;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.top-cerberus-steam-left {
  animation: topCerberusSteamLeft 4.2s ease-out infinite;
}

.top-cerberus-steam-center {
  animation: topCerberusSteamCenter 4.2s ease-out infinite;
}

.top-cerberus-steam-right {
  animation: topCerberusSteamRight 4.2s ease-out infinite;
}

@keyframes topCerberusBarkNod {
  0%, 7%, 20%, 100% {
    transform: translateY(0) scale(1);
  }

  10% {
    transform: translateY(-1px) scale(1.025);
  }

  16% {
    transform: translateY(1px) scale(.99);
  }
}

@keyframes topCerberusBarkMouth {
  0%, 8%, 19%, 100% {
    transform: scaleY(.14);
  }

  11%, 15% {
    transform: scaleY(1);
  }
}

@keyframes topCerberusSteamLeft {
  0%, 10%, 24%, 100% { opacity: 0; transform: translate(0, 0) scale(.45); }
  13% { opacity: .88; }
  21% { opacity: 0; transform: translate(-5px, -2px) scale(1.25); }
}

@keyframes topCerberusSteamCenter {
  0%, 10%, 24%, 100% { opacity: 0; transform: translate(0, 0) scale(.45); }
  13% { opacity: .82; }
  21% { opacity: 0; transform: translate(1px, 4px) scale(1.2); }
}

@keyframes topCerberusSteamRight {
  0%, 10%, 24%, 100% { opacity: 0; transform: translate(0, 0) scale(.45); }
  13% { opacity: .88; }
  21% { opacity: 0; transform: translate(5px, -2px) scale(1.25); }
}

@media (prefers-reduced-motion: reduce) {
  .top-cerberus svg,
  .top-cerberus-mouth,
  .top-cerberus-steam {
    animation: none;
  }

  .top-cerberus-mouth {
    transform: scaleY(.14);
  }
}

@media (max-width: 360px) {
  .top-cerberus {
    width: 1.23em;
    height: .92em;
    margin-left: 4px;
    vertical-align: -.12em;
  }
}

.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;
}

.wallet-card-ltc .ltc-coin {
  width: 76px;
  height: 76px;
  margin: 0;
  background: linear-gradient(135deg, #5586c8, #345d9d);
  color: #fff;
  font-size: 42px;
}

.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-body small {
  color: var(--muted);
}

.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;
}

.wallet-deposit-close-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.wallet-deposit-close-row .ghost-button {
  width: auto;
  min-width: 118px;
}

.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;
}

.check-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.check-row label {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
}

.check-row input {
  accent-color: var(--accent);
  height: 17px;
  width: 17px;
}

.admin-create-result h3 {
  margin: 0 0 10px;
}

.admin-create-result p {
  color: var(--muted);
  margin: 8px 0;
}

.admin-create-result a {
  color: var(--accent);
  overflow-wrap: anywhere;
}

.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);
}

.admin-store-panel {
  border: 1px solid var(--line);
}

.admin-store-form {
  gap: 16px;
}

.admin-section-title {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--soft);
}

.admin-section-title strong {
  font-size: 18px;
}

.admin-section-title span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.3;
}

.captcha-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  justify-content: center;
  min-height: 72px;
}

.captcha-status {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
}

.captcha-retry {
  padding: 0;
  font-size: 14px;
  font-weight: 700;
}

.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: 8px;
  align-items: center;
  width: min(520px, calc(100vw - 24px));
  padding: 7px 10px calc(7px + var(--safe-bottom));
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 18px 18px 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: 6px;
  color: var(--ink);
  font-size: 13px;
  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: 46px;
  height: 27px;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  background: var(--soft);
}

.switch i {
  display: grid;
  width: 23px;
  height: 23px;
  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(19px);
}

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

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

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

.quick-actions {
  position: fixed;
  left: 50%;
  bottom: calc(62px + var(--safe-bottom));
  z-index: 60;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
}

.quick-action {
  display: grid;
  width: 48px;
  height: 48px;
  place-content: center;
  border: 0;
  border-radius: 50%;
  background: #171717;
  color: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.quick-action svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu {
  gap: 5px;
}

.menu span {
  display: block;
  width: 18px;
  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;
}

.menu-count-badge {
  justify-self: end;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ff2b2b;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(255, 43, 43, .28);
}

.nav-icon .menu-count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 10px;
}

.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;
}

.account-head {
  cursor: default;
}

.account-deposit {
  justify-self: end;
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.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;
}

.support-screen {
  display: grid;
  gap: 18px;
}

.support-thread {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.support-thread summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-weight: 700;
}

.support-thread summary small {
  color: var(--muted);
  font-weight: 500;
}

.support-thread-body {
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.support-message {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
}

.support-message.own {
  background: var(--paper);
}

.support-message p {
  margin: 6px 0 0;
}

.support-reply-form {
  display: grid;
  gap: 10px;
}

.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-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}

.ref-summary-grid article {
  display: grid;
  gap: 6px;
  min-width: 0;
  min-height: 92px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}

.ref-summary-grid span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.ref-summary-grid strong {
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.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: 16px;
  overflow-wrap: anywhere;
  text-align: left;
  padding: 10px 14px;
}

.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;
}

@media (max-width: 560px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  body {
    font-size: 15px;
  }

  .app {
    min-height: 100svh;
    padding-bottom: calc(190px + var(--safe-bottom));
  }

  .topbar {
    gap: 10px;
    min-height: 86px;
  }

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

  .balance {
    grid-template-columns: minmax(0, 1fr) 38px;
    min-width: 178px;
    max-width: 48vw;
    min-height: 56px;
    padding: 7px 7px 7px 14px;
  }

  .balance strong {
    font-size: 12px;
    letter-spacing: 1.6px;
    line-height: 1.1;
  }

  .balance span {
    font-size: 11px;
  }

  .balance .avatar,
  .avatar {
    width: 36px;
    height: 36px;
  }

  .feed,
  .screen,
  .wallet-screen,
  .exchange-screen,
  .referral-screen {
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: calc(190px + var(--safe-bottom));
  }

  .screen > h1,
  .referral-screen > h1,
  .wallet-hero h1 {
    margin-top: 22px;
    font-size: clamp(30px, 9vw, 40px);
    line-height: 1.08;
    letter-spacing: 0;
  }

  .stats,
  .ref-summary-grid,
  .seller-dashboard-stats,
  .analytics-summary,
  .exchange-hero-stats,
  .exchange-stats,
  .product-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .stats {
    margin: 22px 0;
    padding-top: 18px;
  }

  .stat,
  .ref-summary-grid article,
  .seller-dash-stat,
  .analytics-summary div,
  .exchange-hero-stats div,
  .exchange-stats .stat {
    min-width: 0;
    min-height: 96px;
    padding: 14px 12px;
    border-radius: 18px;
    overflow: hidden;
  }

  .stat span,
  .ref-summary-grid span,
  .seller-dash-stat span,
  .seller-dash-stat small,
  .analytics-summary span,
  .exchange-hero-stats span,
  .exchange-stats span {
    display: block;
    max-width: 100%;
    font-size: 13px;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
  }

  .stat strong,
  .ref-summary-grid strong,
  .seller-dash-stat strong,
  .analytics-summary strong,
  .exchange-hero-stats strong,
  .exchange-stats strong {
    max-width: 100%;
    font-size: clamp(24px, 8vw, 34px);
    line-height: 1.08;
    letter-spacing: 0;
    overflow-wrap: anywhere;
  }

  .ref-summary-grid {
    margin-bottom: 24px;
  }

  .ref-summary-grid article {
    align-content: space-between;
  }

  .referral-tabs,
  .pill-tabs,
  .order-tabs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(132px, 1fr);
    gap: 10px;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }

  .referral-tabs button,
  .pill-tabs button,
  .order-tabs button {
    min-width: 0;
    min-height: 52px;
    padding: 0 16px;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .ref-card,
  .ref-terms,
  .analytics-card,
  .wallet-balance-card,
  .wallet-convert-card,
  .wallet-transactions,
  .panel,
  .modal {
    border-radius: 20px;
  }

  .ref-card,
  .ref-terms,
  .analytics-card {
    padding: 18px;
  }

  .ref-card-head,
  .ref-terms,
  .ref-item,
  .wallet-balance-row,
  .wallet-actions,
  .ref-section-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: stretch;
  }

  .ref-card h2,
  .ref-section-head h2,
  .details-title,
  .empty-ref h3 {
    font-size: 24px;
    line-height: 1.15;
  }

  .ref-card p,
  .empty-ref p {
    font-size: 15px;
  }

  .ref-card-head span {
    justify-self: start;
  }

  .ref-link-row {
    grid-template-columns: 1fr 48px;
  }

  .ref-link-row button:first-child {
    grid-column: 1 / -1;
    min-height: 56px;
    font-size: 13px;
  }

  .ref-link-row .primary {
    min-width: 0;
  }

  .period-picker {
    grid-template-columns: 1fr;
  }

  input,
  textarea,
  select,
  .primary,
  .ghost-button {
    max-width: 100%;
  }

  .dock {
    left: 12px;
    right: 12px;
    bottom: calc(10px + var(--safe-bottom));
    width: auto;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    transform: none;
  }

  .theme-toggle,
  .language {
    width: 100%;
  }

  .quick-actions {
    bottom: calc(98px + var(--safe-bottom));
  }

  .quick-action {
    width: 54px;
    height: 54px;
  }

  .chat-launcher {
    right: 16px;
    bottom: calc(102px + var(--safe-bottom));
  }
}

@media (max-width: 380px) {
  .topbar {
    padding-left: 10px;
    padding-right: 10px;
  }

  .logo {
    width: min(148px, 42vw);
  }

  .balance {
    min-width: 154px;
    max-width: 52vw;
    padding-left: 12px;
  }

  .balance strong {
    font-size: 11px;
    letter-spacing: 1.2px;
  }

  .feed,
  .screen,
  .wallet-screen,
  .exchange-screen,
  .referral-screen {
    padding-left: 12px;
    padding-right: 12px;
  }

  .stat,
  .ref-summary-grid article,
  .seller-dash-stat,
  .analytics-summary div,
  .exchange-hero-stats div,
  .exchange-stats .stat {
    padding: 12px 10px;
  }
}

.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;
}

.filter-result-count {
  margin: -4px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.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-card-issued {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
}

.order-card-issued > div,
.order-issued-description > div {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.order-card-issued a,
.order-issued-description a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

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

.order-delivery-facts > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.order-delivery-facts dt {
  color: var(--muted);
  font-size: 12px;
}

.order-delivery-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.order-issued-description {
  display: grid;
  gap: 8px;
}

.order-issued-description h3 {
  margin: 0;
}

.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;
}

.order-side .order-dispute-button,
.order-dispute-button {
  border-color: rgba(240, 83, 74, .72);
  background: #2a1717;
  color: #ff766e;
}

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

.private-messages-screen {
  display: grid;
  gap: 14px;
  padding-bottom: 128px;
}

.private-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 14px;
  align-items: center;
}

.private-search-panel h2,
.private-search-panel p {
  margin: 0;
}

.private-search-panel p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.private-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

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

.private-layout {
  display: grid;
  grid-template-columns: minmax(170px, 0.38fr) minmax(0, 1fr);
  gap: 12px;
  min-height: min(680px, calc(100dvh - 210px));
}

.private-layout.is-list-only {
  grid-template-columns: 1fr;
}

.private-list {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: calc(100dvh - 230px);
  overflow: auto;
}

.private-list h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.private-list button {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  padding: 12px 14px;
}

.private-list button.active {
  border-color: #111;
  background: var(--soft);
}

.private-list span {
  font-weight: 900;
}

.private-list small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.private-chat {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: min(680px, calc(100dvh - 210px));
  overflow: hidden;
}

.private-chat-head {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.private-chat-head h3,
.private-chat-head p {
  margin: 0;
}

.private-chat-head p {
  color: var(--muted);
}

.private-close-chat {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--soft);
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
}

.private-chat-list {
  display: grid;
  gap: 10px;
  align-content: start;
  flex: 1 1 auto;
  max-height: none;
  min-height: 280px;
  overflow: auto;
  padding: 12px 4px 12px 0;
}

.private-form {
  flex: 0 0 auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.order-dispute-chat {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.order-dispute-chat h3 {
  margin: 0;
}

.order-dispute-chat-list {
  min-height: 160px;
  max-height: 320px;
}

.order-dispute-form {
  padding-top: 10px;
}

@media (max-width: 620px) {
  .private-search-panel {
    grid-template-columns: 1fr;
  }

  .private-layout {
    grid-template-columns: 1fr;
    min-height: calc(100dvh - 220px);
  }

  .private-layout.has-active .private-list {
    display: none;
  }

  .private-list {
    display: grid;
    overflow: visible;
    max-height: none;
  }

  .private-list button {
    min-width: 0;
  }

  .private-search {
    grid-template-columns: 1fr;
  }

  .private-chat {
    min-height: calc(100dvh - 300px);
  }
}

.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;
}

.owner-builder,
.owner-store-manager,
.owner-products,
.owner-product-box,
.owner-position-list {
  display: grid;
  gap: 18px;
}

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

.owner-gallery img,
.owner-thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  object-fit: cover;
  background: var(--soft);
}

.owner-thumb {
  width: 74px;
  min-width: 74px;
}

.owner-product-box {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
}

.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: auto;
    aspect-ratio: 16 / 7;
  }

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

  .profile-avatar {
    width: 132px;
    height: 132px;
    margin-top: -62px;
    margin-bottom: 26px;
    border-width: 6px;
  }
}

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

.exchange-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
  margin: 12px 0 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.exchange-hero p {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.exchange-hero .eyebrow {
  margin-bottom: 6px;
  color: #ff8a1d;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.exchange-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 8px;
}

.exchange-hero-stats span {
  display: grid;
  gap: 2px;
  min-height: 72px;
  padding: 12px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
}

.exchange-hero-stats strong {
  color: var(--ink);
  font-size: 24px;
}

.exchange-search {
  margin-bottom: 14px;
}

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

.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);
}

.exchanger-catalog-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.exchanger-catalog-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 138, 29, 0.42);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.08);
}

.exchanger-catalog-card .shop-inner {
  padding: 0;
}

.exchanger-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--soft);
}

.exchanger-cover .shop-image {
  height: 100%;
  border-radius: 0;
  aspect-ratio: auto;
}

.exchanger-rating-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.exchanger-card-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.exchanger-title-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.exchanger-title-row h2 {
  margin: 0;
  font-size: 22px;
}

.exchanger-title-row p,
.exchanger-card-body .desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.exchanger-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--soft);
}

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

.exchanger-meta-grid span {
  display: grid;
  gap: 1px;
  padding: 10px;
  border-radius: 8px;
  background: var(--soft);
}

.exchanger-meta-grid b {
  font-size: 18px;
}

.exchanger-meta-grid small {
  color: var(--muted);
}

.exchanger-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  background: #111217;
  color: #fff;
  font-weight: 800;
}

.exchanger-card-action svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 760px) {
  .exchange-hero {
    grid-template-columns: 1fr;
    padding: 18px;
  }

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

  .exchange-hero-stats span {
    min-height: 64px;
    padding: 10px;
  }

  .exchange-hero-stats strong {
    font-size: 20px;
  }

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

.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: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 750;
}

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

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

.wallet-screen {
  display: grid;
  gap: 22px;
  padding-bottom: 190px;
}

.wallet-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(36px, 9vw, 56px);
  font-weight: 700;
}

.wallet-hero p {
  max-width: 620px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.45;
}

.coin-tabs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

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

.coin-tabs .active {
  box-shadow: var(--shadow-soft);
}

.ltc-badge,
.ltc-coin {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5586c8, #345d9d);
  color: #fff;
  font-weight: 900;
}

.wallet-balance-card,
.wallet-convert-card,
.wallet-transactions {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.wallet-balance-card > p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 20px;
}

.wallet-balance-row {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-bottom: 46px;
}

.wallet-balance-row strong {
  font-size: 28px;
}

.wallet-balance-card.wallet-bonus-card {
  border-color: rgba(241, 169, 58, .5);
  background: linear-gradient(145deg, rgba(89, 53, 11, .34), var(--paper));
}

.wallet-bonus-card .wallet-balance-row {
  margin-bottom: 16px;
}

.wallet-bonus-card > .wallet-bonus-note {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.wallet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.wallet-convert-card {
  display: grid;
  gap: 16px;
  background: var(--soft);
}

.wallet-convert-card p,
.deposit-address {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}

.wallet-convert-card span {
  color: var(--muted);
  font-size: 22px;
}

.wallet-transactions {
  box-shadow: none;
}

.wallet-transactions h2 {
  margin: 0 0 18px;
}

.wallet-deposit-addresses .desc {
  margin: 0 0 12px;
}

.wallet-deposit-address-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.wallet-deposit-address-row > div {
  min-width: 0;
}

.wallet-deposit-address-row small {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  color: var(--muted);
}

@media (max-width: 620px) {
  .wallet-deposit-address-row {
    align-items: stretch;
    flex-direction: column;
  }
}

.wallet-tx {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.wallet-tx[data-wallet-deposit] {
  cursor: pointer;
}

.wallet-tx-main {
  min-width: 0;
}

.wallet-tx h3,
.wallet-tx p {
  margin: 0;
}

.wallet-tx p {
  margin-top: 4px;
  color: var(--muted);
}

.wallet-tx small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.wallet-tx-details {
  min-height: 40px;
  padding-inline: 14px;
}

.wallet-tx .plus {
  color: #22b573;
}

.wallet-tx .minus {
  color: var(--danger);
}

.wallet-tx.processing strong {
  color: #d68a11;
}

.wallet-tx.cancelled {
  opacity: 0.62;
}

.deposit-address {
  margin: 14px 0;
  border-radius: 18px;
}

.deposit-address strong {
  overflow-wrap: anywhere;
}

.wallet-deposit-qr {
  display: grid;
  place-items: center;
  gap: 8px;
  margin: 18px 0;
  text-align: center;
}

.wallet-deposit-qr img {
  width: min(260px, 72vw);
  aspect-ratio: 1;
  object-fit: contain;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.wallet-deposit-qr p,
.wallet-deposit-qr small {
  margin: 0;
  color: var(--muted);
}

.owner-store-manager label:has(input[name="isTop"]),
.owner-store-manager label:has(input[name="visibleInCatalog"]),
.owner-store-manager label:has(input[name="salesBlocked"]) {
  display: none !important;
}

.wallet-hero .coin-tabs {
  display: none;
}

.wallet-coin-panel {
  display: grid;
  gap: 12px;
}

.wallet-coin-main,
.wallet-coin-small {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}

.wallet-coin-main {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  padding: 12px 18px;
  border-radius: 999px;
  color: #1f4f96;
}

.wallet-coin-main small,
.wallet-coin-small small {
  color: var(--muted);
}

.wallet-coin-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.wallet-coin-small {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 16px;
  opacity: 0.72;
}

.wallet-coin-small span {
  color: var(--coin-accent);
  font-weight: 800;
}

.wallet-fee-grid {
  display: grid;
  gap: 12px;
}

.wallet-fee-row {
  display: grid;
  grid-template-columns: 1fr auto minmax(120px, 0.55fr) minmax(120px, 0.55fr);
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--soft);
}

.wallet-fee-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 560px) {
  .wallet-fee-row {
    grid-template-columns: 1fr;
  }
}

/* Compact business typography */
.app {
  font-size: 14px;
}

h1,
h2,
h3,
p,
button,
input,
textarea,
select,
label,
.store-title,
.profile-title,
.details-title,
.ref-section-head h2,
.product-body h3,
.wallet-page,
.message-title {
  letter-spacing: 0;
}

.hero h1,
.screen > h1 {
  font-size: clamp(28px, 7vw, 38px);
  line-height: 1.1;
  font-weight: 700;
}

.big-title {
  font-size: clamp(34px, 9vw, 48px);
  line-height: 1.05;
  font-weight: 700;
}

.panel h2,
.profile-title,
.details-title,
.wallet-page h1,
.support-card h1,
.ref-page h1 {
  font-size: clamp(24px, 6vw, 32px);
  line-height: 1.14;
  font-weight: 700;
}

.store-title,
.product-body h3,
.ref-card h2,
.owner-section h2 {
  font-size: clamp(19px, 4.8vw, 24px);
  line-height: 1.2;
  font-weight: 700;
}

.desc,
.store-card p,
.product-body p,
.profile-short,
.ref-card p,
.field,
.field input,
.field textarea,
.field select,
.primary,
.ghost-button,
.account-row,
.tab,
.pill-tabs button,
.menu-sheet,
.wallet-tx,
.message-preview {
  font-size: 14px;
}

.muted,
.store-meta,
.review-card,
.wallet-tx small,
.caption {
  font-size: 13px;
}

.seller-admin-screen > .panel:first-child .status-pill,
.seller-admin-screen > .panel:first-child .stats {
  display: none;
}

.seller-dashboard-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 18px 60px rgba(15, 23, 42, .12);
}

.seller-dashboard-nav {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 720px;
  padding: 18px;
  background: #111318;
  color: #f8fafc;
}

.seller-dashboard-brand {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.seller-dashboard-brand img {
  width: 142px;
  filter: invert(1) contrast(1.08);
}

.shop-panel-page {
  min-height: 100dvh;
  padding: 16px;
  background: var(--bg);
}

.seller-dashboard-nav a,
.seller-dashboard-nav button {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 255, 255, .82);
  padding: 0 12px;
  text-decoration: none;
  font-weight: 800;
  font: inherit;
  text-align: left;
}

.seller-dashboard-nav a:first-of-type,
.seller-dashboard-nav a:hover,
.seller-dashboard-nav button:hover,
.seller-dashboard-nav button.active {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.seller-dashboard-main {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 18px;
  background: linear-gradient(180deg, var(--soft), var(--paper) 220px);
}

.seller-dashboard-top,
.seller-dashboard-hero,
.seller-card-head,
.seller-source,
.seller-tree-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.seller-dashboard-top {
  flex-wrap: nowrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .76);
  min-height: 72px;
  padding: 10px 14px;
}

.seller-dashboard-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  margin-left: auto;
}

body[data-theme="dark"] .seller-dashboard-top {
  background: rgba(20, 22, 28, .76);
}

.seller-dashboard-top strong,
.seller-dashboard-top span,
.seller-dashboard-balance strong,
.seller-dashboard-balance span,
.seller-dashboard-balance small {
  display: block;
}

.seller-dashboard-top span,
.seller-dashboard-balance span,
.seller-dashboard-balance small,
.seller-card-head span {
  color: var(--muted);
  font-size: 13px;
}

.seller-dashboard-balance,
.seller-dashboard-user {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  padding: 8px 14px;
}

.seller-dashboard-balance strong {
  white-space: nowrap;
}

.shop-delivery-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.shop-delivery-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}

.shop-delivery-editor-head {
  display: grid;
  gap: 4px;
}

.shop-delivery-editor-head span {
  color: var(--muted);
  font-size: 13px;
}

.shop-delivery-editor-list {
  display: grid;
  gap: 10px;
}

.shop-delivery-editor-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.shop-delivery-editor-number {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
  color: var(--ink);
  font-weight: 900;
}

.shop-delivery-editor-row .field {
  min-width: 0;
  margin: 0;
}

.shop-delivery-editor-row textarea {
  min-height: 92px;
  resize: vertical;
  white-space: pre-wrap;
}

.shop-delivery-editor-row [data-shop-delivery-remove]:disabled {
  opacity: .38;
  cursor: not-allowed;
}

.shop-delivery-add {
  justify-self: start;
  min-width: 128px;
}

@media (max-width: 720px) {
  .order-delivery-facts {
    grid-template-columns: 1fr;
  }

  .shop-delivery-editor-row {
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: start;
  }

  .shop-delivery-editor-row [data-shop-delivery-remove] {
    grid-column: 2;
    justify-self: start;
  }
}

.shop-delivery-preview-head,
.shop-delivery-preview-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(130px, .35fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
}

.shop-delivery-preview-head {
  grid-template-columns: minmax(0, 1fr) auto;
  border-bottom: 1px solid var(--line);
}

.shop-delivery-preview-head span {
  color: #49c77d;
  font-weight: 800;
}

.shop-delivery-preview-head span.has-errors,
.shop-delivery-preview-row.duplicate strong {
  color: var(--danger);
}

.shop-delivery-preview-row {
  border-bottom: 1px solid var(--line);
}

.shop-delivery-preview-row:last-child {
  border-bottom: 0;
}

.shop-delivery-preview-row.head {
  background: var(--soft);
}

.shop-delivery-preview-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.is-staff-panel [data-shop-card-edit],
.is-staff-panel [data-shop-card-delete],
.is-staff-panel [data-shop-card-move],
.is-staff-panel [data-shop-position-edit],
.is-staff-panel [data-shop-position-delete] {
  display: none !important;
}

.shop-activity-log time {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.seller-dashboard-user {
  min-height: 46px;
  font-weight: 900;
}

.seller-dashboard-hero {
  border-radius: 22px;
  background: #17191f;
  color: #fff;
  padding: 22px;
}

.seller-dashboard-hero h2,
.seller-dashboard-hero p,
.seller-card-head h3 {
  margin: 0;
}

.seller-dashboard-hero p {
  color: rgba(255, 255, 255, .72);
  margin-top: 4px;
}

.seller-dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.seller-dash-stat,
.seller-dashboard-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  padding: 16px;
}

.seller-dash-stat {
  display: grid;
  gap: 6px;
}

.seller-dash-stat span,
.seller-dash-stat small {
  color: var(--muted);
  font-size: 13px;
}

.seller-dash-stat strong {
  font-size: 26px;
}

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

.seller-wide-card {
  grid-column: span 2;
}

.seller-money {
  display: block;
  margin: 18px 0;
  font-size: 34px;
}

.seller-bars {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 7px;
  height: 120px;
}

.seller-bars i {
  display: block;
  min-height: 12px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, #111318, #5b6170);
}

.seller-source,
.seller-tree-row,
.seller-stock-row {
  min-height: 42px;
  border-bottom: 1px solid var(--line);
}

.seller-source:last-child,
.seller-tree-row:last-child,
.seller-stock-row:last-child {
  border-bottom: 0;
}

details[data-shop-storage-item],
details[data-shop-sale-item] {
  display: block;
  padding: 10px 0;
}

details[data-shop-storage-item] summary,
details[data-shop-sale-item] summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  list-style-position: inside;
}

details[data-shop-storage-item] .form {
  margin-top: 14px;
}

.seller-sale-details {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
}

.seller-sale-details p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
}

.seller-sale-details span {
  color: var(--muted);
}

.seller-sale-details strong {
  text-align: right;
}

.staff-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.check-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  font-weight: 800;
}

.check-pill input {
  accent-color: var(--accent);
}

.seller-stock-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px 92px;
  gap: 10px;
  align-items: center;
}

.seller-stock-row progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
}

.seller-dashboard-table {
  display: grid;
  gap: 0;
  overflow-x: auto;
}

.seller-dashboard-table > div {
  display: grid;
  grid-template-columns: 1.2fr 1fr .8fr .8fr;
  gap: 10px;
  min-width: 560px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.seller-dashboard-table p {
  margin: 12px 0 0;
}

@media (max-width: 760px) {
  .seller-dashboard-shell {
    grid-template-columns: 1fr;
  }

  .seller-dashboard-nav {
    min-height: 0;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    position: sticky;
    top: 0;
    z-index: 4;
    padding: 10px;
    -webkit-overflow-scrolling: touch;
  }

  .seller-dashboard-brand {
    flex: 0 0 auto;
    min-width: 138px;
    margin: 0;
  }

  .seller-dashboard-brand img {
    width: 110px;
  }

  .seller-dashboard-nav a,
  .seller-dashboard-nav button {
    flex: 0 0 auto;
    width: auto;
    min-width: 118px;
    justify-content: center;
    border-radius: 999px;
    padding: 0 14px;
    white-space: nowrap;
  }

  .seller-dashboard-stats,
  .seller-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .shop-panel-page input,
  .shop-panel-page select,
  .shop-panel-page textarea,
  .seller-admin-screen input,
  .seller-admin-screen select,
  .seller-admin-screen textarea {
    min-height: 44px;
    font-size: 16px;
  }

  .seller-wide-card {
    grid-column: auto;
  }

  .seller-dashboard-hero,
  .seller-dashboard-top {
    align-items: stretch;
    flex-direction: column;
  }

  .shop-panel-page {
    padding: 8px;
  }

  .seller-dashboard-main {
    gap: 12px;
    padding: 10px;
  }

  .seller-dashboard-card,
  .seller-dash-stat {
    border-radius: 14px;
    padding: 12px;
  }

  .seller-dashboard-balance,
  .seller-dashboard-user {
    width: 100%;
    border-radius: 14px;
  }

  .shop-panel-page .row,
  .seller-admin-screen .row,
  .shop-panel-page .form .row,
  .seller-admin-screen .form .row {
    grid-template-columns: 1fr;
  }

  .shop-panel-page .field,
  .seller-admin-screen .field {
    gap: 8px;
  }

  .shop-panel-page .primary,
  .shop-panel-page .ghost-button,
  .seller-admin-screen .primary,
  .seller-admin-screen .ghost-button {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }

  details[data-shop-storage-item] summary,
  details[data-shop-sale-item] summary,
  .seller-card-head,
  .seller-source,
  .seller-tree-row {
    align-items: stretch;
    flex-direction: column;
  }

  .seller-stock-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .seller-dashboard-table > div {
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 10px;
  }
}

.shop-mobile-section-picker {
  display: none;
}

.owner-market-settings-panel,
.owner-store-control-panel {
  display: none;
}

.store-filter-selects {
  align-items: stretch;
}

.store-filter-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: min(100%, 220px);
}

.store-filter-picker-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.mini-filter-toggle {
  min-height: 34px;
  padding: 8px 14px;
}

.store-filter-list {
  border: 1px solid var(--line);
  border-radius: 18px;
  max-height: 210px;
  overflow: auto;
  padding: 10px;
}

.store-filter-option {
  align-items: center;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  font-size: 14px;
  gap: 10px;
  justify-content: space-between;
  padding: 9px 8px;
}

.store-filter-option:hover {
  background: var(--soft);
}

.store-filter-option input {
  accent-color: var(--accent);
  height: 18px;
  width: 18px;
}
.dispute-chat-block,
.seller-dispute-card {
  display: grid;
  gap: 12px;
  padding: 12px 0;
}

.shop-dispute-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 16px;
}

.shop-dispute-table {
  display: grid;
  gap: 8px;
  overflow-x: auto;
}

.shop-dispute-head,
.shop-dispute-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) minmax(110px, 0.8fr) minmax(90px, 0.6fr) minmax(86px, 0.6fr) minmax(86px, 0.5fr);
  gap: 10px;
  align-items: center;
  min-width: 720px;
}

.shop-dispute-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.shop-dispute-row {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
}

.shop-dispute-row.active,
.shop-dispute-row:hover {
  border-color: var(--accent);
}

.shop-dispute-row strong {
  display: grid;
  gap: 4px;
}

.shop-dispute-row small {
  color: var(--muted);
  font-weight: 600;
}

.shop-dispute-detail h2,
.shop-dispute-detail h3 {
  margin-top: 0;
}

.admin-dispute-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 12px 0;
}

.admin-dispute-summary p {
  margin: 0;
}

.admin-dispute-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.admin-dispute-chat {
  display: grid;
  gap: 12px;
  max-height: 520px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.03);
}

.admin-dispute-message {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: end;
  max-width: 88%;
}

.admin-dispute-message.own {
  grid-template-columns: minmax(0, 1fr) 36px;
  justify-self: end;
}

.admin-dispute-message.own .admin-dispute-avatar {
  grid-column: 2;
  grid-row: 1;
}

.admin-dispute-message.own .admin-dispute-bubble {
  grid-column: 1;
  grid-row: 1;
  border-color: rgba(255, 132, 31, 0.35);
  background: rgba(255, 132, 31, 0.12);
}

.admin-dispute-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.admin-dispute-bubble {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.admin-dispute-bubble p {
  margin: 0;
  white-space: normal;
}

.admin-dispute-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.admin-dispute-meta strong {
  color: var(--ink);
}

.admin-dispute-reply {
  margin-top: 12px;
}

.modal.dispute-chat-modal {
  width: min(920px, calc(100vw - 32px));
  display: grid;
  gap: 14px;
}

.modal.dispute-chat-modal .admin-dispute-chat {
  max-height: min(48vh, 520px);
}

.admin-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.admin-modal-head h2,
.admin-modal-head p {
  margin: 0;
}

@media (max-width: 980px) {
  .shop-dispute-layout {
    grid-template-columns: 1fr;
  }

  .admin-dispute-summary {
    grid-template-columns: 1fr;
  }
}

.store-gallery {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}

.store-gallery-item {
  min-height: 0;
  border: 0;
  border-radius: 8px;
  background: var(--soft);
  padding: 0;
  overflow: hidden;
}

.store-gallery-item.main {
  grid-row: span 2;
}

.store-gallery-item img,
.modal-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-gallery-item img {
  aspect-ratio: 1;
}

.modal-image {
  max-height: min(72vh, 760px);
  border-radius: 8px;
  background: var(--soft);
  object-fit: contain;
}

.product-lightbox {
  display: grid;
  gap: 14px;
}

.product-lightbox-main {
  width: 100%;
  max-height: min(68dvh, 760px);
}

.product-lightbox-thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 76px;
  gap: 8px;
  overflow-x: auto;
  padding: 3px;
}

.product-lightbox-thumbs button {
  width: 76px;
  height: 76px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--soft);
  overflow: hidden;
}

.product-lightbox-thumbs button.active {
  border-color: var(--accent);
}

.product-lightbox-thumbs img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.internal-captcha-question {
  display: inline-flex;
  width: fit-content;
  min-height: 34px;
  align-items: center;
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  padding: 0 10px;
  font-weight: 900;
}

.auth-captcha-modal .modal {
  width: min(420px, calc(100vw - 24px));
  border-radius: 8px;
  padding: 22px;
}

.auth-captcha-dialog {
  display: grid;
  gap: 14px;
}

.auth-captcha-dialog h2,
.auth-captcha-dialog p {
  margin: 0;
}

.auth-modal-captcha {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 14px;
}

.auth-modal-captcha .internal-captcha-question {
  min-height: 48px;
  font-size: 24px;
}

.auth-modal-captcha input {
  min-height: 54px;
  font-size: 20px;
  text-align: center;
}

.auth-captcha-dialog .primary,
.auth-captcha-dialog .ghost-button {
  width: 100%;
  min-height: 52px;
}

@media (max-width: 560px) {
  .mega-gallery {
    grid-template-columns: minmax(0, 2fr) minmax(92px, 1fr);
    gap: 10px;
  }

  .mega-gallery.single-image {
    grid-template-columns: minmax(0, 1fr);
  }

  .mega-gallery-side {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .product-lightbox-modal {
    width: calc(100vw - 20px);
    padding: 14px;
  }

  .store-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .auth-captcha-modal .modal {
    align-self: end;
    width: 100%;
    max-height: calc(100dvh - 24px);
    border-radius: 8px 8px 0 0;
    padding: 20px;
  }

  .auth-modal-captcha {
    padding: 16px;
  }

  .store-gallery-item.main {
    grid-column: span 3;
    grid-row: auto;
  }

  .store-gallery-item.main img {
    aspect-ratio: 16 / 10;
  }

  .shop-panel-page {
    padding: 0;
  }

  .shop-panel-page .seller-dashboard-main {
    padding: 12px 12px calc(84px + env(safe-area-inset-bottom));
  }

  .shop-panel-page .seller-dashboard-top,
  .shop-panel-page .seller-dashboard-hero,
  .shop-panel-page .seller-dashboard-card {
    border-radius: 8px;
    padding: 14px;
  }

  .shop-panel-page .seller-dashboard-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 30;
    display: flex;
    overflow-x: auto;
    gap: 8px;
    min-height: 64px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 255, 255, .12);
    -webkit-overflow-scrolling: touch;
  }

  .shop-panel-page .seller-dashboard-brand {
    display: none;
  }

  .shop-panel-page .seller-dashboard-nav a,
  .shop-panel-page .seller-dashboard-nav button {
    flex: 0 0 auto;
    min-height: 44px;
    min-width: 108px;
    white-space: nowrap;
    touch-action: manipulation;
    scroll-snap-align: center;
  }

  .shop-panel-page .seller-dashboard-nav {
    scroll-snap-type: x proximity;
  }

  .shop-panel-page .seller-dashboard-nav button[data-shop-tab="dashboard"] { order: 1; }
  .shop-panel-page .seller-dashboard-nav button[data-shop-tab="finances"] { order: 2; }
  .shop-panel-page .seller-dashboard-nav button[data-shop-tab="orders"] { order: 3; }
  .shop-panel-page .seller-dashboard-nav button[data-shop-tab="disputes"] { order: 4; }

  .shop-mobile-section-picker {
    position: sticky;
    top: 0;
    z-index: 12;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    font-weight: 800;
  }

  .shop-mobile-section-picker select {
    width: 100%;
    min-width: 0;
    min-height: 46px;
  }

  .shop-panel-page .row,
  .shop-panel-page .seller-dashboard-grid,
  .shop-panel-page .seller-dashboard-stats {
    grid-template-columns: 1fr;
  }

  .shop-panel-page input,
  .shop-panel-page select,
  .shop-panel-page textarea,
  .shop-panel-page .primary,
  .shop-panel-page .ghost-button {
    min-height: 48px;
    font-size: 16px;
  }

  .seller-source {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .seller-source strong {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .orders-screen .order-tabs {
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding-bottom: 0;
  }

  .orders-screen .order-tabs button {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
    white-space: normal;
  }

  .orders-screen .order-tabs span {
    min-width: 24px;
    min-height: 24px;
    margin-left: 4px;
  }

  .shop-panel-page,
  .shop-panel-page .seller-dashboard-shell,
  .shop-panel-page .seller-dashboard-main,
  .shop-panel-page .seller-dashboard-card,
  .shop-panel-page .seller-dashboard-top > *,
  .shop-panel-page .shop-dispute-layout {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .shop-panel-page .seller-dashboard-top strong,
  .shop-panel-page .seller-dashboard-top span,
  .shop-panel-page .seller-dashboard-top small,
  .shop-panel-page .seller-dashboard-user,
  .shop-panel-page .seller-dashboard-card,
  .shop-panel-page .admin-dispute-bubble {
    overflow-wrap: anywhere;
  }

  .shop-panel-page .shop-dispute-table {
    overflow: visible;
  }

  .shop-panel-page .shop-dispute-head {
    display: none;
  }

  .shop-panel-page .shop-dispute-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    min-width: 0;
    padding: 12px;
  }

  .shop-panel-page .shop-dispute-row > strong {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .shop-panel-page .shop-dispute-row > span[data-label] {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px;
    min-width: 0;
  }

  .shop-panel-page .shop-dispute-row > span[data-label]::before {
    content: attr(data-label) ":";
    color: var(--muted);
    font-size: 12px;
  }

  .shop-panel-page .shop-dispute-row .status-pill,
  .shop-panel-page .shop-dispute-row .shop-dispute-open {
    justify-self: start;
  }

  .shop-panel-page .admin-dispute-actions,
  .shop-panel-page .admin-dispute-actions > *,
  .shop-panel-page .admin-dispute-reply .primary {
    width: 100%;
  }
}

/* Final dark/mobile overrides live last so legacy light rules cannot win. */
:root,
body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #090a0a;
  --paper: #151618;
  --ink: #f4f4f2;
  --muted: #a3a3a0;
  --line: #303134;
  --soft: #202124;
  --accent: #d7443e;
  --black: #0d0e0f;
}

html,
body,
.app,
.shop-panel-page,
.seller-dashboard-main {
  background: var(--bg);
}

body[data-theme="dark"] input,
body[data-theme="dark"] textarea,
body[data-theme="dark"] select,
body[data-theme="dark"] .location-select,
body[data-theme="dark"] .search,
body[data-theme="dark"] .filter-inline-button,
body[data-theme="dark"] .seller-dashboard-top {
  border-color: var(--line);
  background: #111214;
  color: var(--ink);
}

.dock {
  grid-template-columns: 1fr;
  background: rgba(17, 18, 20, .96);
}

.official-mirrors-compact {
  display: grid;
  grid-template-columns: minmax(130px, .7fr) minmax(0, 1.5fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171a1e;
  color: var(--ink);
}

.official-domain-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.official-domain-list button {
  min-width: 0;
  min-height: 40px;
  overflow: hidden;
  border: 1px solid #37393e;
  border-radius: 6px;
  background: #22252a;
  color: var(--ink);
  padding: 8px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.buyer-sidebar-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  gap: 10px;
  align-items: center;
  padding: 8px;
}

.buyer-sidebar-head img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.buyer-sidebar-primary,
.buyer-sidebar-more {
  display: grid;
  gap: 6px;
}

.buyer-sidebar-more {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.buyer-sidebar .account-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 9px 10px;
  text-align: left;
}

.buyer-sidebar .account-row svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.shop-card {
  overflow: hidden;
  border-radius: 8px;
}

.shop-card .shop-inner {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.shop-card .shop-image {
  grid-row: 1 / span 2;
  width: 92px;
  height: 92px;
  border-radius: 6px;
  object-fit: cover;
}

.shop-card .marketplace-metrics {
  grid-column: 2;
}

.store-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 14px 14px;
}

.store-card-actions button,
.shop-variant-list span {
  border-radius: 6px;
}

.shop-card-editor {
  display: block;
  width: 100%;
  padding: 12px 0;
}

.shop-card-editor summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  cursor: pointer;
}

.shop-card-editor .form {
  width: 100%;
  margin-top: 14px;
}

.shop-variant-list {
  display: grid;
  gap: 6px;
}

.shop-variant-list span {
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--soft);
}

.product-stock.out-of-stock,
.catalog-selection,
.catalog-fallback,
.deleted-message,
.edited-message {
  color: var(--muted);
}

.deleted-message {
  font-style: italic;
}

.dispute-message-menu {
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}

.dispute-message-menu:not([hidden]) {
  display: grid;
}

.dispute-message-menu button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  color: var(--ink);
}

@media (min-width: 900px) {
  .app {
    width: calc(100% - 264px);
    max-width: 1180px;
    margin: 0 auto 0 264px;
    padding-bottom: 28px;
  }

  .nav-pop {
    inset: 0 auto 0 0;
    display: block !important;
    width: 244px;
    border-right: 1px solid var(--line);
    background: #0d0e0f;
    pointer-events: auto;
  }

  .nav-card {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    border-radius: 0;
    background: transparent;
    padding: 16px;
    transform: none;
  }

  .buyer-sidebar-head .nav-close,
  .quick-actions,
  .dock {
    display: none;
  }

  .store-feed,
  .product-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 899px) {
  .nav-pop {
    background: rgba(0, 0, 0, .66);
  }

  .nav-pop.open {
    display: block;
  }

  .nav-card {
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: min(86vw, 340px);
    height: 100dvh;
    overflow-y: auto;
    border-radius: 0 8px 8px 0;
    background: #101113;
    padding: 14px;
    transform: none;
  }

  .buyer-sidebar .account-row {
    min-height: 50px;
  }

  .official-mirrors-compact {
    grid-template-columns: 1fr;
  }

  .official-domain-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .official-domain-list button {
    padding-inline: 6px;
    font-size: 12px;
  }

  .shop-card .shop-inner {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .shop-card .shop-image {
    width: 76px;
    height: 76px;
  }

  .store-card-actions,
  .shop-card-actions {
    grid-template-columns: 1fr;
  }
}

/* Mobile buyer shell: compact fixed navigation without covering page content. */
.topbar-menu,
.mobile-bottom-nav {
  display: none;
}

.buyer-sidebar-language {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #151618;
}

@media (max-width: 899px) {
  .app {
    padding-bottom: calc(82px + var(--safe-bottom));
  }

  .feed,
  .screen,
  .wallet-screen,
  .exchange-screen,
  .referral-screen {
    padding-bottom: 22px;
  }

  .home-mirrors-first {
    padding-bottom: 0;
  }

  .home-feed,
  .orders-screen {
    padding-bottom: calc(92px + var(--safe-bottom));
  }

  .topbar {
    gap: 8px;
    min-height: 72px;
    padding: 8px 12px;
  }

  .topbar .logo {
    width: min(116px, 31vw);
    height: 42px;
  }

  .topbar .balance {
    min-width: 0;
    width: min(174px, 46vw);
  }

  .topbar-menu {
    display: grid;
    flex: 0 0 42px;
    gap: 4px;
    width: 42px;
    height: 42px;
    place-content: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #17181a;
    color: var(--ink);
  }

  .topbar-menu span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: calc(66px + var(--safe-bottom));
    padding: 6px 6px calc(6px + var(--safe-bottom));
    border-top: 1px solid var(--line);
    background: rgba(13, 14, 15, .97);
    backdrop-filter: blur(16px);
  }

  .mobile-bottom-nav button {
    position: relative;
    display: grid;
    grid-template-rows: 23px auto;
    gap: 3px;
    min-width: 0;
    min-height: 54px;
    place-items: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    padding: 5px 2px;
  }

  .mobile-bottom-nav button.active {
    background: #241817;
    color: #f06a61;
  }

  .mobile-bottom-nav svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
  }

  .mobile-bottom-nav button > span:not(.menu-count-badge) {
    max-width: 100%;
    overflow: hidden;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-bottom-nav .menu-count-badge {
    position: absolute;
    top: 2px;
    right: 8px;
  }

  .dock,
  .quick-actions {
    display: none !important;
  }

  .chat-launcher {
    bottom: calc(78px + var(--safe-bottom));
  }

  .official-mirrors-compact {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 8px;
    padding: 10px 12px;
  }

  .official-mirrors-compact > strong {
    font-size: 12px;
    line-height: 1.25;
  }

  .official-domain-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
  }

  .official-domain-list button {
    min-height: 34px;
    border: 0;
    background: transparent;
    padding: 2px;
    font-size: 10px;
  }

  .hero {
    gap: 14px;
  }

  .home-mirrors-first + .hero {
    padding-top: 16px;
  }

  .store-card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-catalog-grid .product-card .product-click {
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: stretch;
  }

  .product-catalog-grid .product-image {
    width: 112px;
    height: 100%;
    min-height: 178px;
    aspect-ratio: auto;
    object-fit: cover;
  }

  .product-catalog-grid .product-body {
    min-width: 0;
    padding: 12px;
  }

  .product-catalog-grid .product-body h3 {
    font-size: 16px;
  }

  .product-catalog-grid .product-body p {
    margin: 6px 0;
  }

  .product-catalog-grid .price {
    font-size: 16px;
  }

  .product-catalog-grid .marketplace-metrics {
    gap: 5px;
  }

  .product-catalog-grid .market-metric-icon {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }

  .shop-panel-page .seller-dashboard-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 5px 4px calc(5px + env(safe-area-inset-bottom));
  }

  .shop-panel-page .seller-dashboard-nav > * {
    display: none;
  }

  .shop-panel-page .seller-dashboard-nav button[data-shop-tab="cards"],
  .shop-panel-page .seller-dashboard-nav button[data-shop-tab="products"],
  .shop-panel-page .seller-dashboard-nav button[data-shop-tab="orders"],
  .shop-panel-page .seller-dashboard-nav button[data-shop-tab="disputes"],
  .shop-panel-page .seller-dashboard-nav button[data-shop-tab="finances"] {
    display: grid;
    grid-template-rows: 18px auto;
    gap: 2px;
    min-width: 0;
    min-height: 54px;
    width: 100%;
    place-items: center;
    overflow: hidden;
    border-radius: 6px;
    padding: 5px 1px;
    font-size: 10px;
    line-height: 1.05;
    text-align: center;
    white-space: normal;
  }

  .shop-panel-page .seller-dashboard-nav button[data-shop-tab="cards"] { order: 1; }
  .shop-panel-page .seller-dashboard-nav button[data-shop-tab="products"] { order: 2; }
  .shop-panel-page .seller-dashboard-nav button[data-shop-tab="orders"] { order: 3; }
  .shop-panel-page .seller-dashboard-nav button[data-shop-tab="disputes"] { order: 4; }
  .shop-panel-page .seller-dashboard-nav button[data-shop-tab="finances"] { order: 5; }

  .shop-panel-page .seller-dashboard-nav button span {
    min-width: 0;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
  }

  .shop-panel-page.is-staff-panel .seller-dashboard-nav {
    display: flex;
  }

  .shop-panel-page.is-staff-panel .seller-dashboard-nav button {
    flex: 1 1 0;
    width: auto;
  }
}

/* Final CERBER cascade: keep the storefront consistently red and dark. */
:root,
body[data-theme="dark"] {
  --bg: #050506;
  --paper: #101012;
  --ink: #f5f3f3;
  --muted: #aaa4a4;
  --line: rgba(255, 82, 72, .22);
  --soft: #191416;
  --accent: #ef3d35;
  --danger: #ff5a52;
  --black: #080809;
  --shadow: 0 20px 54px rgba(0, 0, 0, .46);
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, .28);
}

html,
body,
.app,
.shop-panel-page,
.seller-dashboard-main {
  background-color: #050506;
  color: var(--ink);
}

.topbar {
  border-bottom: 1px solid rgba(255, 74, 64, .18);
  background: rgba(7, 7, 8, .94);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .3), 0 1px 18px rgba(196, 22, 17, .08);
}

body[data-theme="dark"] .brand-lockup .logo,
.brand-lockup .logo {
  width: 52px;
  height: 52px;
  filter: none;
}

.hero,
.feed,
.screen {
  background-color: transparent;
}

.shop-card,
.product-card,
.panel,
.review-card,
.wallet-balance-card,
.wallet-convert-card,
.wallet-transactions,
.official-mirrors-compact {
  border: 1px solid rgba(255, 82, 72, .22);
  border-radius: 8px;
  background: linear-gradient(155deg, #131315, #0c0c0e);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .3), 0 0 22px rgba(204, 29, 23, .07);
}

.search,
.filter-inline-button,
.location-select,
body[data-theme="dark"] input,
body[data-theme="dark"] textarea,
body[data-theme="dark"] select {
  border-color: rgba(255, 82, 72, .2);
  background: #0d0d0f;
  color: var(--ink);
}

.tab.active,
.tabs button.active,
.pill-tabs button:not(.muted),
.order-tabs button.active {
  border-color: rgba(255, 82, 72, .58);
  background: #281313;
  color: #fff;
  box-shadow: 0 0 18px rgba(234, 47, 39, .17);
}

.primary,
.store-card-actions .primary,
.group-join-button,
.product-card-buy {
  border: 1px solid #ff544b !important;
  background: linear-gradient(180deg, #ef4138, #a81713) !important;
  color: #fff !important;
  box-shadow: 0 8px 22px rgba(201, 31, 25, .24), inset 0 1px rgba(255, 255, 255, .13);
}

.group-chat-shell,
.group-join-card,
.group-chat-head,
.group-chat-list,
.group-compose,
.group-widget-panel,
.group-widget-panel header,
.group-widget-list,
.group-widget-form,
.group-widget-message,
.group-widget-message.own,
.group-widget-message.system,
.group-input-wrap,
.group-sticker-row {
  border-color: rgba(255, 82, 72, .2) !important;
  background-color: #0d0d0f !important;
  color: var(--ink) !important;
}

.group-chat-list {
  background-image: linear-gradient(180deg, #0c0c0e, #09090a) !important;
}

.group-widget-button,
.group-widget-send,
.group-send-button {
  border-color: #ef3d35 !important;
  background: linear-gradient(145deg, #f04a42, #9d1411) !important;
  color: #fff !important;
  box-shadow: 0 12px 32px rgba(221, 42, 34, .34) !important;
}

.modal {
  border: 1px solid rgba(255, 82, 72, .26);
  border-radius: 8px;
  background: #101012;
  color: var(--ink);
}

@media (max-width: 899px) {
  body[data-theme="dark"] .brand-lockup .logo,
  .brand-lockup .logo {
    width: 42px !important;
    height: 42px !important;
  }

  .wallet-screen {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
    padding-inline: 8px;
  }

  .wallet-screen > *,
  .wallet-balance-card,
  .wallet-convert-card,
  .wallet-transactions {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .wallet-actions,
  .wallet-balance-row,
  .wallet-tx {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .wallet-actions > button,
  .wallet-tx-details {
    width: 100%;
  }

  .wallet-coin-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .modal {
    top: auto;
    bottom: 0;
    width: 100%;
    max-height: calc(100dvh - 12px);
    transform: translateX(-50%);
  }
}

.auth-card > img {
  display: block;
  width: 150px;
  height: 150px;
  margin: 0 auto 12px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  mix-blend-mode: normal;
  filter: brightness(1.18) saturate(1.15) !important;
  box-shadow: 0 0 34px rgba(235, 40, 32, .2);
}

.product-catalog-grid .product-card .product-click {
  grid-template-columns: minmax(150px, .8fr) minmax(0, 1fr);
  align-items: stretch;
  min-height: 248px;
}

.mega-product-card .product-click {
  grid-template-columns: minmax(140px, .75fr) minmax(0, 1fr);
  align-items: stretch;
  min-height: 220px;
}

.mega-product-card .product-image {
  width: 100%;
  height: 100%;
  min-height: 220px;
  aspect-ratio: auto;
  object-fit: cover;
}

.product-catalog-grid .product-image {
  width: 100%;
  height: 100%;
  min-height: 248px;
  aspect-ratio: auto;
  object-fit: cover;
}

.product-catalog-grid .product-body {
  padding: 16px;
}

@media (max-width: 560px) {
  .auth-card > img {
    width: 112px;
    height: 112px;
  }

  .product-catalog-grid .product-card .product-click {
    grid-template-columns: 104px minmax(0, 1fr);
    min-height: 190px;
  }

  .product-catalog-grid .product-image {
    min-height: 190px;
  }

  .mega-product-card .product-click {
    grid-template-columns: 104px minmax(0, 1fr);
    min-height: 184px;
  }

  .mega-product-card .product-image {
    min-height: 184px;
  }

  .mega-product-card .product-body {
    padding: 12px;
  }
}

.group-message > div {
  border-color: rgba(255, 82, 72, .2) !important;
  background: #171315 !important;
  color: var(--ink) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .24);
}

.group-message.own > div {
  border-color: rgba(255, 82, 72, .34) !important;
  background: #281415 !important;
}

.group-avatar {
  border: 1px solid rgba(255, 82, 72, .28);
  background: #151113;
  color: #ff6b63;
}

.group-live-dot {
  background: #ff554d !important;
  box-shadow: 0 0 0 5px rgba(255, 85, 77, .12), 0 0 18px rgba(255, 85, 77, .55) !important;
}

.group-room-tabs button.active {
  background: #ef3d35;
  color: #fff;
  box-shadow: 0 8px 18px rgba(222, 45, 37, .24);
}

/* Final mobile containment layer. */
html,
body,
.app {
  max-width: 100%;
  overflow-x: hidden;
}

.screen,
.screen > *,
.panel,
.store-profile-panel,
.profile-body,
.mega-product-screen,
.mega-product-screen > *,
.mega-position-card,
.mega-position-grid,
.mega-position-grid > *,
.product-copy,
.product-mode-tabs,
.pill-tabs {
  min-width: 0;
  max-width: 100%;
}

[data-dynamic-translate],
.profile-short,
.profile-description,
.product-description-preview,
.position-description,
.modal-content-description,
.breadcrumbs,
.product-page-title,
.product-page-category,
.mega-position-grid strong {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.modal-content-description {
  white-space: pre-wrap;
  line-height: 1.55;
}

@media (max-width: 560px) {
  .screen,
  .mega-product-screen {
    width: 100%;
    overflow: hidden;
    padding-inline: 12px;
  }

  .seller-dashboard-top {
    min-height: 0;
  }

  .seller-dashboard-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
    margin-left: 0;
  }

  .seller-dashboard-actions .seller-dashboard-balance {
    grid-column: 1 / -1;
  }

  .shop-delivery-preview-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .shop-delivery-preview-row > :last-child {
    grid-column: 2;
  }

  .order-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .order-card > div:first-child {
    min-width: 0;
  }

  .order-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: stretch;
    width: 100%;
  }

  .order-side > span,
  .order-side > small {
    grid-column: 1 / -1;
  }

  .order-side button {
    width: 100%;
    min-width: 0;
    border-radius: 6px;
    white-space: normal;
  }

  .store-profile-panel {
    width: 100%;
    overflow: hidden;
  }

  .profile-cover {
    width: 100%;
    max-height: 176px;
    aspect-ratio: 16 / 7;
    object-fit: cover;
  }

  .profile-body {
    padding: 0 16px 22px;
  }

  .profile-avatar {
    width: 96px;
    height: 96px;
    margin-top: -48px;
    margin-bottom: 16px;
    border-width: 4px;
  }

  .store-profile-panel .breadcrumbs {
    margin: 8px 0 14px;
    font-size: 13px;
    line-height: 1.35;
  }

  .store-profile-panel .shop-title {
    align-items: center;
    gap: 8px;
  }

  .store-profile-panel .profile-title {
    margin: 0;
    font-size: 25px;
    line-height: 1.15;
  }

  .profile-short,
  .profile-description {
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.45;
  }

  .profile-description,
  .product-description-preview,
  .position-description {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .read-button {
    min-height: 38px;
    font-size: 13px;
  }

  .store-profile-panel .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 20px 0;
    padding-top: 18px;
  }

  .store-profile-panel .stat {
    min-height: 0;
    padding: 0;
    border-radius: 0;
    overflow: visible;
  }

  .store-profile-panel .stat strong {
    font-size: 27px;
    line-height: 1.05;
  }

  .store-profile-panel .stat span {
    font-size: 13px;
  }

  .store-profile-panel .rating {
    margin: 18px 0;
  }

  .store-profile-panel .rating strong {
    font-size: 28px;
  }

  .store-profile-panel .stars {
    font-size: 24px;
  }

  .store-profile-panel > .profile-body > .primary {
    width: 100%;
    min-height: 46px;
    font-size: 14px;
  }

  .store-age {
    margin: 16px 0;
    font-size: 12px;
  }

  .mega-product-screen .breadcrumbs {
    margin: 8px 0 12px;
    font-size: 12px;
    line-height: 1.4;
  }

  .mega-product-screen .product-page-title {
    margin: 8px 0 4px;
    font-size: 25px;
    line-height: 1.12;
  }

  .mega-product-screen .product-page-category {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.35;
  }

  .mega-gallery,
  .mega-gallery.single-image {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .mega-gallery-main {
    max-height: 250px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
  }

  .mega-gallery-side {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

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

  .product-copy {
    gap: 8px;
    margin: 14px 0;
    font-size: 14px;
    line-height: 1.45;
  }

  .product-copy > p {
    margin: 0;
  }

  .product-copy .shop-line {
    font-size: 14px;
  }

  .product-copy .price {
    font-size: 20px;
  }

  .product-copy .big-stars {
    flex-wrap: wrap;
    font-size: 15px;
  }

  .location-select {
    min-height: 46px;
    padding: 0 16px;
    font-size: 15px;
  }

  .pill-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0;
  }

  .pill-tabs button {
    min-width: 0;
    min-height: 44px;
    padding: 8px;
    font-size: 13px;
    line-height: 1.2;
    white-space: normal;
  }

  .product-mode-tabs {
    gap: 6px;
    margin: 14px 0;
    font-size: 13px;
  }

  .product-mode-tabs button {
    min-height: 42px;
    padding: 7px 5px;
    line-height: 1.2;
    white-space: normal;
  }

  .mega-position-card {
    gap: 10px;
    width: 100%;
    padding: 14px;
    border-radius: 8px;
  }

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

  .mega-position-grid p {
    min-width: 0;
  }

  .mega-position-grid span {
    font-size: 11px;
  }

  .mega-position-grid strong {
    font-size: 13px;
    line-height: 1.35;
  }

  .position-description {
    margin: 2px 0;
    font-size: 13px;
    line-height: 1.4;
  }

  .buy-button {
    justify-self: end;
    width: auto;
    min-width: 124px;
    max-width: 160px;
    min-height: 40px;
    padding: 0 20px;
    border-radius: 7px;
    font-size: 13px;
    box-shadow: 0 8px 18px rgba(218, 38, 31, .22), 0 0 14px rgba(239, 61, 53, .12);
  }
}

/* Compact mobile product cards without empty bands around their artwork. */
@media (max-width: 560px) {
  .product-catalog-grid .product-card .product-click,
  .mega-product-card .product-click {
    grid-template-columns: clamp(118px, 40vw, 154px) minmax(0, 1fr);
    align-items: stretch;
    min-height: 0;
    padding: 8px;
  }

  .product-catalog-grid .product-image,
  .mega-product-card .product-image {
    align-self: stretch;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: 3 / 4;
    border: 1px solid rgba(255, 82, 72, .2);
    border-radius: 6px;
    background: #09090a;
    object-fit: cover;
    object-position: center;
  }

  .product-catalog-grid .product-body,
  .mega-product-card .product-body {
    min-width: 0;
    padding: 1px 2px 1px 10px;
  }

  .product-catalog-grid .product-body h3,
  .mega-product-card .product-body h3 {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 4px;
    font-size: 15px;
    line-height: 1.2;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .product-catalog-grid .product-body p,
  .mega-product-card .product-body p {
    margin: 3px 0;
    font-size: 12px;
    line-height: 1.25;
  }

  .product-catalog-grid .price,
  .mega-product-card .price {
    font-size: 14px;
    line-height: 1.25;
  }

  .product-catalog-grid .product-stock,
  .mega-product-card .product-stock {
    margin: 4px 0 6px !important;
    font-size: 11px;
  }

  .product-catalog-grid .product-card-buy,
  .mega-product-card .product-card-buy {
    min-height: 36px;
    padding: 6px 8px;
    font-size: 12px;
  }
}

.courier-school-promo {
  grid-column: 1 / -1;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255, 82, 72, .16);
  padding-top: 12px;
}

.courier-school-copy {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.3;
}

.courier-school-arrow {
  flex: 0 0 auto;
  color: #ff5a52;
  font-size: 18px;
  line-height: 1;
}

.courier-school-link {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 82, 72, .5);
  border-radius: 6px;
  background: linear-gradient(180deg, #ef4138, #a81713);
  box-shadow: 0 7px 18px rgba(201, 31, 25, .2);
  color: #fff;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.courier-school-link:hover,
.courier-school-link:focus-visible {
  border-color: #ff7770;
  box-shadow: 0 0 22px rgba(238, 52, 44, .3);
}

.courier-school-link:active {
  transform: translateY(1px);
}

@media (max-width: 560px) {
  .courier-school-promo {
    gap: 8px;
    padding-top: 10px;
  }

  .courier-school-copy {
    gap: 5px;
    font-size: 11px;
  }

  .courier-school-arrow {
    font-size: 15px;
  }

  .courier-school-link {
    min-height: 34px;
    padding: 6px 11px;
    font-size: 11px;
  }
}

/* Customer catalog and cascading purchase picker. */
.catalog-quick-filters {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 82, 72, .22);
  border-radius: 10px;
  background: linear-gradient(155deg, rgba(20, 20, 22, .96), rgba(10, 10, 12, .96));
}

.catalog-category-select,
.catalog-choice-group,
.purchase-choice-block,
.purchase-district-block {
  display: grid;
  gap: 8px;
}

.catalog-category-select > span,
.catalog-choice-group > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.catalog-category-select select {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255, 82, 72, .28);
  border-radius: 8px;
  background: #09090a;
  color: var(--ink);
  padding: 0 16px;
  font: inherit;
  font-size: 17px;
}

.catalog-choice-pills,
.purchase-choice-pills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.catalog-choice-pills button,
.purchase-choice-pills button {
  min-width: 0;
  min-height: 46px;
  border: 1px solid rgba(255, 82, 72, .3);
  border-radius: 8px;
  background: #121214;
  color: var(--ink);
  padding: 9px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  overflow-wrap: anywhere;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.catalog-choice-pills button:hover,
.purchase-choice-pills button:hover {
  border-color: rgba(255, 104, 96, .75);
}

.catalog-choice-pills button:active,
.purchase-choice-pills button:active {
  transform: translateY(1px);
}

.catalog-choice-pills button.active,
.purchase-choice-pills button.active {
  border-color: #ff5b52;
  background: linear-gradient(180deg, #ef4138, #a81713);
  box-shadow: 0 7px 20px rgba(216, 39, 32, .25);
  color: #fff;
}

.product-market-body {
  gap: 3px;
}

.product-market-body .product-category {
  color: var(--muted);
}

.product-market-body .product-store-name {
  flex-wrap: wrap;
  gap: 5px;
  margin: 5px 0;
}

.product-market-body .product-store-name > span {
  color: var(--muted);
  font-size: .88em;
}

.product-market-body .product-store-name > strong {
  color: var(--ink);
}

.product-market-body .product-store-name > i {
  font-style: normal;
}

.product-card-facts {
  display: grid;
  gap: 4px;
  margin: 5px 0 7px;
}

.product-card-facts > div {
  display: grid;
  grid-template-columns: minmax(70px, .42fr) minmax(0, 1fr);
  gap: 7px;
  align-items: start;
}

.product-card-facts dt,
.product-card-facts dd {
  min-width: 0;
  margin: 0;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.product-card-facts dt {
  color: var(--muted);
  font-size: 12px;
}

.product-card-facts dd {
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.product-purchase-selector {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.purchase-choice-block {
  padding: 16px;
  border: 1px solid rgba(255, 82, 72, .2);
  border-radius: 9px;
  background: #0e0e10;
}

.purchase-choice-block h2,
.purchase-district-block h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.purchase-position-card {
  gap: 20px;
  border-color: rgba(255, 82, 72, .34);
  background: linear-gradient(155deg, #141416, #0b0b0d);
}

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

.purchase-position-summary p {
  display: grid;
  min-width: 0;
  gap: 5px;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(255, 82, 72, .14);
  border-radius: 7px;
  background: #0d0d0f;
}

.purchase-position-summary span {
  color: var(--muted);
  font-size: 12px;
}

.purchase-position-summary strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.district-pills button {
  display: grid;
  gap: 3px;
}

.purchase-offers {
  display: grid;
  gap: 10px;
}

.purchase-offers-title {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.purchase-offer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 82, 72, .2);
  border-radius: 8px;
  background: #0d0d0f;
}

.purchase-offer-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.purchase-offer-copy strong,
.purchase-offer-copy span,
.purchase-offer-copy small {
  overflow-wrap: anywhere;
}

.purchase-offer-copy span,
.purchase-offer-copy small {
  color: var(--muted);
  font-size: 12px;
}

.purchase-offer .buy-button,
.purchase-awaiting-district {
  margin: 0;
}

.purchase-awaiting-district:disabled {
  border-color: rgba(255, 82, 72, .18) !important;
  background: #211617 !important;
  box-shadow: none !important;
  color: rgba(255, 255, 255, .5) !important;
}

@media (max-width: 560px) {
  .products-catalog-hero {
    gap: 11px;
  }

  .catalog-quick-filters {
    gap: 11px;
    padding: 11px;
    border-radius: 8px;
  }

  .catalog-category-select select {
    min-height: 46px;
    padding-inline: 12px;
    font-size: 15px;
  }

  .catalog-choice-pills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .catalog-choice-pills button {
    min-height: 42px;
    padding: 7px 8px;
    font-size: 12px;
  }

  .product-catalog-grid .product-card .product-click,
  .mega-product-card .product-click {
    grid-template-columns: clamp(120px, 39vw, 150px) minmax(0, 1fr);
    padding: 7px;
  }

  .product-catalog-grid .product-body,
  .mega-product-card .product-body {
    gap: 1px;
    padding: 1px 1px 1px 9px;
  }

  .product-market-body .product-store-name {
    margin: 3px 0;
  }

  .product-card-facts {
    gap: 2px;
    margin: 3px 0 5px;
  }

  .product-card-facts > div {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 4px;
  }

  .product-card-facts dt,
  .product-card-facts dd {
    font-size: 10px;
    line-height: 1.22;
  }

  .product-catalog-grid .product-stock,
  .mega-product-card .product-stock {
    margin: 3px 0 5px !important;
    font-size: 10px;
  }

  .product-catalog-grid .product-card-buy,
  .mega-product-card .product-card-buy {
    min-height: 34px;
    padding: 5px 7px;
    font-size: 11px;
  }

  .product-purchase-selector {
    gap: 12px;
  }

  .purchase-choice-block {
    gap: 9px;
    padding: 12px;
  }

  .purchase-choice-block h2,
  .purchase-district-block h2 {
    font-size: 15px;
  }

  .purchase-choice-pills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .weight-pills {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .purchase-choice-pills button {
    min-height: 42px;
    padding: 7px 6px;
    font-size: 12px;
  }

  .purchase-position-card {
    gap: 14px;
    padding: 12px;
  }

  .purchase-position-summary {
    gap: 8px;
  }

  .purchase-position-summary p {
    gap: 3px;
    padding: 9px;
  }

  .purchase-position-summary p:first-child {
    grid-column: 1 / -1;
  }

  .purchase-position-summary span {
    font-size: 10px;
  }

  .purchase-position-summary strong {
    font-size: 13px;
  }

  .purchase-offer {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    padding: 10px;
  }

  .purchase-offer .buy-button,
  .purchase-awaiting-district {
    justify-self: stretch;
    width: 100%;
    max-width: none;
  }
}

.auth-card > img.loading-screen-logo {
  width: 100%;
  max-width: 320px;
  height: auto;
  aspect-ratio: 2 / 1;
  margin: 0 auto 16px;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
  filter: invert(1) brightness(1.05) !important;
}

.official-domain-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.official-onion-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-top: 1px solid rgba(255, 82, 72, .16);
  padding-top: 12px;
}

.official-onion-label {
  border: 1px solid rgba(255, 82, 72, .45);
  border-radius: 5px;
  color: #ff7770;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}

.official-onion-row a {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
  line-height: 1.35;
  text-decoration: none;
}

.official-onion-row a:hover,
.official-onion-row a:focus-visible {
  color: #ff7770;
}

.official-onion-row button {
  min-height: 34px;
  border: 1px solid rgba(255, 82, 72, .35);
  border-radius: 6px;
  background: #211416;
  color: #fff;
  padding: 6px 11px;
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 560px) {
  .official-domain-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .official-onion-row {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 7px;
    padding-top: 10px;
  }

  .official-onion-row a {
    font-size: 9px;
  }

  .official-onion-row button {
    grid-column: 1 / -1;
    width: 100%;
  }
}
