:root {
  color-scheme: light;
  --canvas: #f4f7f6;
  --paper: #ffffff;
  --paper-soft: #f8fafc;
  --panel: rgba(255, 255, 255, .78);
  --ink: #15171d;
  --muted: #697381;
  --line: #dfe5ea;
  --line-strong: #c9d2dc;
  --brand: #18a875;
  --brand-ink: #087650;
  --blue: #306fe8;
  --amber: #d99021;
  --rose: #dc4f68;
  --danger: #dc3d42;
  --shadow-sm: 0 8px 24px rgba(22, 27, 33, .06);
  --shadow-md: 0 18px 48px rgba(22, 27, 33, .10);
  --shadow-lg: 0 28px 80px rgba(22, 27, 33, .14);
  --radius: 8px;
}

:root.dark {
  color-scheme: dark;
  --canvas: #101214;
  --paper: #181b1f;
  --paper-soft: #121519;
  --panel: rgba(24, 27, 31, .78);
  --ink: #f4f7fb;
  --muted: #a4adb8;
  --line: #2b323a;
  --line-strong: #3a4350;
  --brand: #38d79a;
  --brand-ink: #7cf0bd;
  --blue: #7aa7ff;
  --amber: #f0bb63;
  --rose: #ff8094;
  --danger: #ff6f73;
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, .20);
  --shadow-md: 0 18px 48px rgba(0, 0, 0, .28);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, .36);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--canvas);
}

body {
  position: relative;
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(21, 23, 29, .035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(21, 23, 29, .028) 1px, transparent 1px),
    linear-gradient(180deg, #eef5f2 0, #f7f8fb 420px, #f4f7f8 100%);
  background-size: 44px 44px, 44px 44px, auto;
  background-attachment: fixed;
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

.dark body {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(180deg, #141814 0, #101214 520px, #0d0f12 100%);
  background-size: 44px 44px, 44px 44px, auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(24, 168, 117, .055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(48, 111, 232, .045) 1px, transparent 1px),
    linear-gradient(135deg, transparent 0 45%, rgba(255, 255, 255, .42) 45% 46%, transparent 46% 100%);
  background-size: 72px 72px, 72px 72px, 360px 360px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .68), rgba(0, 0, 0, .24));
}

.dark body::before {
  background:
    linear-gradient(90deg, rgba(124, 240, 189, .055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(122, 167, 255, .045) 1px, transparent 1px),
    linear-gradient(135deg, transparent 0 45%, rgba(255, 255, 255, .035) 45% 46%, transparent 46% 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
}

:focus-visible {
  outline: 3px solid rgba(48, 111, 232, .26);
  outline-offset: 2px;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 10px;
  padding: 10px 18px;
  border: 1px solid rgba(217, 226, 234, .82);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(24px) saturate(150%);
  box-shadow: var(--shadow-sm);
}

.dark .topbar {
  border-color: rgba(58, 67, 80, .78);
  background: rgba(18, 21, 25, .88);
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 850;
}

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

.brand-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(24, 168, 117, .22);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(24, 168, 117, .16), rgba(48, 111, 232, .10)),
    #fff;
  color: var(--brand-ink);
  font-size: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
  overflow: hidden;
}

.brand-icon.image {
  background: var(--paper);
}

.brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
}

.main-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 7px;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease;
}

.main-nav a.active,
.main-nav a:hover {
  background: rgba(24, 168, 117, .10);
  color: var(--ink);
}

.main-nav a.active {
  box-shadow: inset 0 0 0 1px rgba(24, 168, 117, .18);
}

.nav-icons {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-icons button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .72);
  color: var(--ink);
  font-size: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .64);
}

.dark .nav-icons button {
  background: rgba(255, 255, 255, .04);
}

.notice,
.flash {
  margin: 14px 0 0;
  padding: 11px 14px;
  border: 1px solid rgba(217, 226, 234, .86);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .68);
  color: var(--muted);
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 18px rgba(22, 27, 33, .04);
}

.flash.success {
  border-color: rgba(24, 168, 117, .22);
  background: rgba(236, 253, 245, .86);
  color: #047857;
}

.flash.error {
  border-color: rgba(220, 61, 66, .22);
  background: rgba(254, 242, 242, .88);
  color: #b91c1c;
}

.hero {
  position: relative;
  min-height: 438px;
  display: grid;
  grid-template-columns: minmax(0, .98fr) minmax(420px, .82fr);
  align-items: center;
  gap: 44px;
  margin-top: 18px;
  padding: clamp(32px, 5vw, 72px);
  overflow: hidden;
  border: 1px solid rgba(213, 225, 232, .86);
  border-radius: var(--radius);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .96), rgba(244, 250, 247, .92) 44%, rgba(235, 243, 255, .82)),
    var(--paper);
  box-shadow: var(--shadow-lg);
}

.dark .hero {
  border-color: rgba(58, 67, 80, .82);
  background:
    linear-gradient(115deg, rgba(28, 31, 35, .95), rgba(18, 29, 25, .92) 50%, rgba(20, 27, 41, .86)),
    var(--paper);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(24, 168, 117, .12) 1px, transparent 1px),
    linear-gradient(180deg, rgba(48, 111, 232, .10) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, .26), transparent 70%);
  pointer-events: none;
}

.hero-copy,
.hero-visual {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(24, 168, 117, .20);
  border-radius: 999px;
  background: rgba(24, 168, 117, .09);
  color: var(--brand-ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 24px 0 16px;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.04;
  font-weight: 900;
}

.hero-copy p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.community-btn,
.primary-btn,
.buy-form button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, #15171d, #28313d);
  color: #fff;
  font-weight: 850;
  padding: 0 20px;
  box-shadow: 0 14px 28px rgba(21, 23, 29, .16);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.community-btn:hover,
.primary-btn:hover,
.buy-form button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 18px 38px rgba(21, 23, 29, .20);
}

.secondary-link,
.ghost-btn {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .58);
  color: var(--ink);
  font-weight: 800;
}

.dark .secondary-link,
.dark .ghost-btn {
  background: rgba(255, 255, 255, .05);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-points span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(201, 210, 220, .72);
  border-radius: 999px;
  background: rgba(255, 255, 255, .52);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.dark .hero-points span {
  background: rgba(255, 255, 255, .04);
}

.hero-visual {
  min-height: 320px;
  display: grid;
  place-items: center;
}

.trade-panel {
  width: min(430px, 100%);
  padding: 18px;
  border: 1px solid rgba(201, 210, 220, .82);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(18px) saturate(145%);
  box-shadow: var(--shadow-lg);
}

.dark .trade-panel {
  background: rgba(18, 21, 25, .76);
}

.trade-panel-head {
  display: grid;
  grid-template-columns: 10px 10px 10px 1fr;
  align-items: center;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.trade-panel-head span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rose);
}

.trade-panel-head span:nth-child(2) {
  background: var(--amber);
}

.trade-panel-head span:nth-child(3) {
  background: var(--brand);
}

.trade-panel-head strong {
  justify-self: end;
}

.trade-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft);
  color: var(--muted);
}

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

.trade-row.success {
  border-color: rgba(24, 168, 117, .24);
  background: rgba(236, 253, 245, .70);
}

.trade-row.accent {
  border-color: rgba(217, 144, 33, .24);
  background: rgba(255, 247, 237, .78);
}

.dark .trade-row.success,
.dark .trade-row.accent {
  background: rgba(255, 255, 255, .05);
}

.trade-code {
  display: grid;
  grid-template-columns: 1.1fr .72fr .92fr .56fr;
  gap: 8px;
  margin-top: 18px;
}

.trade-code i {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(48, 111, 232, .45), rgba(24, 168, 117, .45));
}

.key-stack {
  position: absolute;
  right: 4%;
  bottom: 2%;
  display: grid;
  gap: 8px;
}

.key-stack span {
  min-width: 78px;
  min-height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(201, 210, 220, .82);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .80);
  color: var(--ink);
  font-weight: 900;
  box-shadow: var(--shadow-sm);
}

.dark .key-stack span {
  background: rgba(18, 21, 25, .84);
}

.shop-filter {
  padding: 34px 0 30px;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .64);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}

.dark .catalog-toolbar {
  background: rgba(18, 21, 25, .68);
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-tabs button {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.category-tabs button:hover,
.category-tabs button.active {
  border-color: rgba(24, 168, 117, .22);
  background: rgba(24, 168, 117, .10);
  color: var(--ink);
}

.search-box {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--muted);
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
}

.search-box button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
  padding: 0 0 80px;
}

.product-card[hidden] {
  display: none;
}

.product-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.dark .product-card {
  background: rgba(24, 27, 31, .80);
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(24, 168, 117, .32);
  box-shadow: var(--shadow-md);
}

.product-cover,
.detail-cover {
  position: relative;
  min-height: 244px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .18)),
    var(--paper-soft);
}

.product-cover::before,
.detail-cover::before {
  content: "";
  width: 146px;
  height: 146px;
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .25), transparent 42%),
    linear-gradient(135deg, #25c7f0, #1279ed);
  box-shadow: 0 18px 48px rgba(18, 121, 237, .24);
}

.product-cover::after,
.detail-cover::after {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(255, 255, 255, .46);
  border-radius: var(--radius);
  pointer-events: none;
}

.cover-rose::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .24), transparent 42%),
    linear-gradient(135deg, #306fe8, #d84f83 58%, #f1a640);
}

.cover-blue::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .22), transparent 42%),
    linear-gradient(135deg, #1388d9, #064f9b);
}

.cover-indigo::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .22), transparent 42%),
    linear-gradient(135deg, #2e5fc9, #12a7c5);
}

.cover-sky::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .22), transparent 42%),
    linear-gradient(135deg, #45c4ed, #1c93ce);
}

.cover-emerald::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .22), transparent 42%),
    linear-gradient(135deg, #3ad99c, #078a60);
}

.cover-amber::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .22), transparent 42%),
    linear-gradient(135deg, #e7a72e, #dc4f68);
}

.cover-violet::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .22), transparent 42%),
    linear-gradient(135deg, #7557d9, #d84f83);
}

.cover-mark {
  position: absolute;
  z-index: 1;
  color: #fff;
  font-size: 50px;
  font-weight: 950;
  letter-spacing: 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .16);
}

.badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 7px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(22, 27, 33, .16);
}

.badge.auto {
  background: var(--brand);
}

.badge.manual {
  background: var(--blue);
}

.badge.danger {
  background: var(--danger);
}

.product-info {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.product-card h3 {
  min-height: 48px;
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
}

.product-meta {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.price {
  color: var(--ink);
  font-size: 23px;
  font-weight: 900;
}

.product-meta span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.stock-line {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(105, 115, 129, .14);
}

.stock-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--blue), var(--amber));
}

.detail-layout,
.order-layout,
.query-layout,
.editorial-layout {
  display: grid;
  grid-template-columns: minmax(0, 470px) minmax(0, 1fr);
  gap: 28px;
  padding: 44px 0 86px;
}

.detail-cover {
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.detail-cover::before {
  width: 230px;
  height: 230px;
  border-radius: 44px;
}

.detail-cover .cover-mark {
  font-size: 72px;
}

.detail-panel,
.order-card,
.query-panel,
.help-panel,
.auth-panel,
.auth-side,
.open-site-form,
.account-sidebar,
.account-main {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-md);
}

.detail-panel,
.order-card,
.query-panel,
.help-panel,
.auth-panel,
.auth-side,
.open-site-form,
.account-sidebar,
.account-main {
  padding: clamp(22px, 3vw, 34px);
}

.crumb {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.detail-panel h1,
.query-panel h1,
.auth-panel h1,
.open-site-hero h1,
.account-sidebar h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.12;
}

.detail-panel > p,
.auth-side p,
.open-site-hero p {
  color: var(--muted);
  line-height: 1.8;
}

.detail-meta,
.order-lines {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 18px;
  align-items: center;
  margin: 24px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.detail-meta strong {
  font-size: 32px;
  font-weight: 950;
}

.order-lines span {
  color: var(--muted);
}

.order-lines strong {
  text-align: right;
}

.buy-form,
.query-panel form,
.auth-panel form,
.open-site-form,
.account-site-form {
  display: grid;
  gap: 16px;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

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

.option-group legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.option-pill {
  position: relative;
  display: block;
  color: var(--ink);
}

.option-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-pill span {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.option-pill input:checked + span {
  border-color: rgba(24, 168, 117, .42);
  background: rgba(24, 168, 117, .09);
  box-shadow: inset 0 0 0 1px rgba(24, 168, 117, .28);
}

.option-pill em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.wholesale-box,
.price-preview,
.domain-note,
.result-empty {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft);
  color: var(--muted);
}

.wholesale-box strong,
.price-preview strong,
.domain-note strong,
.result-empty strong {
  color: var(--ink);
}

.domain-field {
  transition: opacity .18s ease, filter .18s ease;
}

.domain-field.is-muted {
  opacity: .46;
  filter: saturate(.7);
}

.domain-field.is-muted input {
  background: var(--paper-soft);
}

.price-preview {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.price-preview small {
  grid-column: 1 / -1;
  line-height: 1.6;
}

.price-preview strong {
  font-size: 28px;
  font-weight: 950;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 11px 13px;
  outline: 0;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

textarea {
  resize: vertical;
  line-height: 1.7;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(48, 111, 232, .52);
  box-shadow: 0 0 0 4px rgba(48, 111, 232, .12);
}

.primary-btn:disabled,
.buy-form button:disabled {
  opacity: .52;
  transform: none;
  box-shadow: none;
}

.order-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.qr-wrap {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.qr-wrap img {
  width: 260px;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.glass-query {
  grid-template-columns: 420px minmax(0, 1fr);
}

.query-result-card {
  min-height: 390px;
  display: grid;
  align-content: start;
}

.order-result-item {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.order-result-item:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.order-result-item h2 {
  margin: 0 0 12px;
}

.result-empty {
  min-height: 250px;
  place-content: center;
  text-align: center;
}

.auth-layout,
.open-site-layout,
.account-layout {
  display: grid;
  gap: 24px;
  padding: 44px 0 86px;
}

.auth-layout {
  grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
}

.auth-panel {
  align-self: start;
}

.auth-side,
.open-site-hero {
  min-height: 360px;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(24, 168, 117, .12), rgba(48, 111, 232, .10)),
    rgba(255, 255, 255, .70);
  box-shadow: var(--shadow-md);
}

.dark .auth-side,
.dark .open-site-hero {
  background:
    linear-gradient(135deg, rgba(24, 168, 117, .12), rgba(48, 111, 232, .12)),
    rgba(18, 21, 25, .78);
}

.side-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.side-metrics span {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .56);
  color: var(--muted);
}

.dark .side-metrics span {
  background: rgba(255, 255, 255, .04);
}

.side-metrics strong {
  color: var(--ink);
}

.open-site-layout {
  grid-template-columns: minmax(0, 1fr) minmax(390px, 520px);
}

.domain-preview {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0;
  width: fit-content;
  max-width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .62);
  box-shadow: var(--shadow-sm);
  font-size: 20px;
}

.domain-preview span {
  color: var(--muted);
}

.domain-preview strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.open-site-info {
  display: grid;
  gap: 8px;
  max-width: 760px;
  padding: 18px;
  border: 1px solid rgba(201, 210, 220, .72);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .58);
  box-shadow: var(--shadow-sm);
}

.dark .open-site-info {
  background: rgba(255, 255, 255, .045);
}

.open-site-info strong {
  font-size: 15px;
  font-weight: 900;
}

.open-site-info p {
  margin: 0;
  color: var(--muted);
}

.account-layout {
  grid-template-columns: 320px minmax(0, 1fr);
}

.account-sidebar {
  align-self: start;
  display: grid;
  gap: 14px;
}

.account-sidebar p {
  margin: 0;
  color: var(--muted);
}

.account-main {
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

.dark .account-main {
  background: transparent;
}

.account-balance,
.account-panel,
.account-site-form,
.account-metrics article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .62);
  box-shadow: var(--shadow-sm);
}

.dark .account-balance,
.dark .account-panel,
.dark .account-site-form,
.dark .account-metrics article {
  background: rgba(255, 255, 255, .045);
}

.account-balance {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.account-balance span,
.account-balance small {
  color: var(--muted);
}

.account-balance strong {
  font-size: 30px;
  font-weight: 950;
}

.account-sites {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.account-sites a {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft);
  transition: border-color .18s ease, background .18s ease;
}

.account-sites a.active {
  border-color: rgba(24, 168, 117, .40);
  background: rgba(24, 168, 117, .09);
}

.account-sites span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.account-sites em {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(24, 168, 117, .10);
  color: var(--brand-ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.account-sites em.pending_payment {
  background: rgba(217, 144, 33, .14);
  color: #a16207;
}

.account-sites em.offline {
  background: rgba(105, 115, 129, .14);
  color: var(--muted);
}

.account-alert {
  margin-bottom: 18px;
}

.account-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.account-metrics article {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.account-metrics span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.account-metrics strong {
  font-size: 24px;
  font-weight: 950;
}

.account-panel {
  padding: clamp(18px, 2vw, 24px);
}

.account-site-form {
  padding: clamp(18px, 2vw, 24px);
}

.account-panel h2,
.account-site-form h2 {
  margin: 0;
}

.account-work-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(320px, .7fr);
  gap: 16px;
  margin-top: 18px;
}

.account-catalog-form,
.account-panel {
  margin-top: 18px;
}

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

.check-line {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.check-line input {
  width: 18px;
  min-height: 18px;
  padding: 0;
}

.account-table {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.account-table table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: rgba(255, 255, 255, .50);
}

.dark .account-table table {
  background: rgba(255, 255, 255, .035);
}

.account-table th,
.account-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.account-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.account-table td input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
}

.account-table td input[type="number"] {
  min-width: 120px;
}

.account-list {
  display: grid;
  gap: 10px;
}

.account-list article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.account-list span,
.account-list small {
  color: var(--muted);
}

.form-row {
  display: grid;
  gap: 12px;
}

.form-row.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.muted {
  color: var(--muted);
}

.card-secret {
  margin-top: 20px;
  line-height: 1.8;
}

pre {
  white-space: pre-wrap;
  word-break: break-all;
  padding: 18px;
  border: 1px solid rgba(124, 240, 189, .16);
  border-radius: var(--radius);
  background: #11161d;
  color: #bbf7d0;
}

.empty {
  min-height: 380px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.footer {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 1180px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .hero-visual {
    justify-items: start;
  }

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

@media (max-width: 980px) {
  .site-shell {
    width: min(100% - 24px, 920px);
  }

  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .main-nav {
    order: 3;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .catalog-toolbar,
  .detail-layout,
  .order-layout,
  .query-layout,
  .auth-layout,
  .open-site-layout,
  .account-layout {
    grid-template-columns: 1fr;
  }

  .glass-query {
    grid-template-columns: 1fr;
  }

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

  .account-sites {
    grid-template-columns: 1fr;
  }

  .account-metrics,
  .account-work-grid,
  .category-manage {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-shell {
    width: min(100% - 18px, 680px);
  }

  .topbar {
    top: 8px;
    padding: 10px;
  }

  .brand {
    font-size: 18px;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
  }

  .nav-icons button {
    width: 38px;
    height: 38px;
  }

  .main-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    font-size: 13px;
  }

  .hero {
    min-height: 0;
    padding: 28px 18px;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .hero-actions,
  .hero-points {
    align-items: stretch;
  }

  .community-btn,
  .secondary-link {
    width: 100%;
  }

  .hero-visual {
    display: none;
  }

  .catalog-toolbar {
    padding: 10px;
  }

  .category-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .product-cover {
    min-height: 176px;
  }

  .product-cover::before {
    width: 108px;
    height: 108px;
    border-radius: 24px;
  }

  .cover-mark {
    font-size: 36px;
  }

  .product-info {
    padding: 12px;
  }

  .product-card h3 {
    min-height: 44px;
    font-size: 15px;
  }

  .price {
    font-size: 20px;
  }

  .detail-cover {
    min-height: 300px;
  }

  .detail-cover::before {
    width: 150px;
    height: 150px;
  }

  .detail-cover .cover-mark {
    font-size: 48px;
  }

  .option-group,
  .side-metrics,
  .form-row.two {
    grid-template-columns: 1fr;
  }

  .price-preview,
  .order-lines,
  .detail-meta {
    grid-template-columns: 1fr;
  }

  .order-lines strong {
    text-align: left;
  }
}
