@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@500;600&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

:root {
  --ink: #12171e;
  --text: #1c2430;
  --muted: #5d6878;
  --faint: #8b95a3;
  --line: #d5dbe3;
  --line-strong: #b7c0cc;
  --paper: #e7ebf0;
  --card: #ffffff;
  --wash: #f3f5f8;
  --header: #0e1217;
  --accent: #0e1217;
  --gold: #e2b340;
  --green: #1f7a4d;
  --red: #b42318;
  --link: #1d4e89;
  --font: "IBM Plex Sans", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--paper);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }

.topbar {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--header);
  color: #f4f6f8;
  border-bottom: 1px solid #1c232c;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.03em;
}
.mark {
  width: 22px;
  height: 16px;
  border-radius: 3px;
  background: #e11d2e;
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
}
.mark::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 4px;
  border-style: solid;
  border-width: 4px 0 4px 6px;
  border-color: transparent transparent transparent #fff;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: #b7c0cc;
}
.nav-links a:hover { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}
.btn-signin {
  background: #f4f6f8;
  color: #0e1217;
  border-radius: 6px;
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
}
.btn-signup {
  background: transparent;
  color: #f4f6f8;
  border: 1px solid #3c4656;
  border-radius: 6px;
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
}
.btn-signin:hover { background: #fff; }
.btn-signup:hover { border-color: #8b95a3; color: #fff; }
.main .btn-signin,
.panel .btn-signin,
.auth-card .btn-block,
.btn-buy,
.btn-apply,
.btn-block {
  background: #0e1217;
  color: #f4f6f8;
}
.main .btn-signin:hover,
.panel .btn-signin:hover,
.btn-buy:hover,
.btn-apply:hover,
.btn-block:hover { background: #242b34; color: #fff; }
.main .btn-signup {
  background: #fff;
  color: #0e1217;
  border-color: #c5ccd6;
}
.main .btn-signup:hover { background: #f3f5f8; color: #0e1217; }
.btn-buy {
  width: 100%;
  height: 32px;
  margin-top: auto;
  border-radius: 6px;
  font-size: 12px;
}
.btn-buy.is-off { opacity: 0.4; cursor: default; }
.btn-apply { border-radius: 6px; height: 32px; padding: 0 14px; font-size: 12px; }
.btn-block { width: 100%; height: 42px; border-radius: 6px; font-size: 14px; }

.chip {
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid #2c3542;
  font-size: 13px;
  font-weight: 500;
  color: #f4f6f8;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.chip:hover { border-color: #6d7886; color: #fff; }
.btn-funds {
  background: #f4f6f8;
  color: #0e1217;
  border-radius: 8px;
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
}
.btn-funds:hover { background: #fff; }
.nav-actions .top-chip {
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
  border-radius: 8px;
}

.chip.balance {
  font-family: inherit;
  color: #f4f6f8;
  border-color: #2c3542;
  font-size: 13px;
  font-weight: 500;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 6px 2px 18px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero h1 {
  margin: 0;
  max-width: 560px;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.lede {
  max-width: 460px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.hero-points {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.hero-points li {
  min-width: 112px;
  padding: 10px 14px;
  border-right: 1px solid var(--line);
}
.hero-points li:last-child { border-right: 0; }
.hero-points strong { display: block; font-size: 14px; letter-spacing: -0.02em; }
.hero-points span { color: var(--muted); font-size: 12px; }

.cat-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0 12px;
  color: #3d4754;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.cat-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px 12px;
}
.card {
  min-height: 286px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card:hover { border-color: #b7c0cc; }
.cover-link { display: block; }
.cover {
  position: relative;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  overflow: hidden;
}
.cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.18), transparent 46%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 22px);
  pointer-events: none;
}
.cover.shot::before { display: none; }
.cover.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover.face span {
  position: relative;
  font-size: 42px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}
.cover.pack {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 12px;
  gap: 2px;
}
.cover.pack strong, .cover.pack em { position: relative; }
.cover.pack strong {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cover.pack em { font-style: normal; font-size: 11px; opacity: 0.9; }
.play {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 22px;
  height: 16px;
  border-radius: 3px;
  background: #e11d2e;
  z-index: 1;
}
.play::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 4px;
  border-style: solid;
  border-width: 4px 0 4px 6px;
  border-color: transparent transparent transparent #fff;
}
.card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
}
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: #111;
  line-height: 1.2;
}
.stock {
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  background: #e7f3ec;
  border-radius: 999px;
  padding: 2px 7px;
}
.stock.out { color: var(--red); background: #f8e8e6; }
.pname {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #1c2430;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.meta {
  margin: 4px 0 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 11px;
  line-height: 1.3;
  color: var(--faint);
}
.meta span { white-space: nowrap; }

.tone-navy { background: #24315f; }
.tone-blue { background: #1a4478; }
.tone-ink { background: #2a3138; }
.tone-plum { background: #4a3568; }
.tone-red { background: #8e2a2a; }
.tone-green { background: #1d5c40; }
.tone-slate { background: #3a4654; }
.tone-wine { background: #6d2433; }

.shell { display: block; min-height: calc(100vh - 58px); }
body.app .shell,
body.desk .shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}
.side {
  padding: 14px 12px 20px;
  border-right: 1px solid var(--line);
  background: #f7f8fa;
}
.side-label {
  margin: 14px 10px 6px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.side a {
  display: flex;
  align-items: center;
  height: 34px;
  padding: 0 10px;
  margin-bottom: 2px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #2a3340;
}
.side a:hover { background: #eef1f5; }
.side a.is-on {
  background: #fff;
  color: #0e1217;
  font-weight: 600;
  box-shadow: inset 2px 0 0 #0e1217, 0 1px 2px rgba(16, 24, 40, 0.05);
}
.main { padding: 16px 22px 36px; min-width: 0; }
.page-title {
  margin: 2px 0 14px;
  text-align: left;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.filters {
  display: flex;
  align-items: center;
  height: 46px;
  margin: 0 0 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 6px 0 0;
}
.filters label,
.filters .seg {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 12px;
  border-right: 1px solid var(--line);
  font-size: 13px;
  color: #222;
  gap: 8px;
}
.filters select,
.filters input[type="number"] {
  border: 0;
  background: transparent;
  font-size: 13px;
  color: #222;
  outline: none;
  height: 32px;
}
.filters input[type="number"] { width: 72px; }
.filters .price-label { border-right: 0; color: var(--muted); font-size: 12px; }
.filters .dash { color: var(--faint); padding: 0 2px; }
.filters .apply-wrap { margin-left: auto; border-right: 0; }

.detail {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.detail-cover {
  height: 240px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}
.detail-cover .cover { height: 100%; }
.detail h1 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.detail .price { font-size: 26px; margin: 4px 0 14px; }
.detail .buy-wrap { max-width: 240px; margin-top: 16px; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.gallery img { width: 100%; height: 120px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: var(--wash); }
.facts {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  border-top: 1px solid var(--line);
}
.facts li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.facts span { color: var(--muted); }
.prose {
  margin: 0 0 8px;
  padding: 12px 0 0;
  line-height: 1.6;
  color: #2a3340;
}

.list { max-width: 760px; }
.list article { padding: 16px 0; border-bottom: 1px solid var(--line); }
.list h2 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.list p { margin: 0; color: #4b5563; font-size: 14px; }
.list time { display: block; margin-bottom: 6px; color: var(--faint); font-size: 12px; }
.tools-lead { margin: 0 0 14px; color: var(--muted); font-size: 14px; }

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  background: #fff;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); }
th { font-weight: 600; background: #f7f8fa; color: #3d4754; font-size: 12px; }
tr:last-child td { border-bottom: 0; }
.table-wrap button {
  border: 0;
  background: #0e1217;
  color: #fff;
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
}
.table-wrap a { color: var(--link); font-weight: 600; }
code { font-family: var(--mono); font-size: 12px; }

.auth-page { background: #0e1217; min-height: 100vh; }
.auth-page .footer, .auth-page .to-top { display: none; }
.auth-wrap { display: flex; justify-content: center; padding: 36px 16px 64px; }
.auth-card {
  width: 440px;
  max-width: 100%;
  background: #fff;
  border-radius: 10px;
  padding: 28px 28px 22px;
  border: 1px solid #1c232c;
}
.auth-card h1 { margin: 0 0 18px; font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
.google-btn {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.or { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: var(--faint); font-size: 12px; }
.or i { flex: 1; height: 1px; background: var(--line); font-style: normal; }
.field {
  width: 100%;
  height: 40px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  font-size: 14px;
  color: #222;
  background: #fff;
  outline: none;
}
textarea.field { height: auto; padding: 10px 12px; }
.field:focus { border-color: #8b95a3; }
.pass-wrap { position: relative; }
.pass-wrap .field { padding-right: 42px; }
.eye {
  position: absolute;
  right: 8px;
  top: 6px;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #8b95a3;
  cursor: pointer;
}
.row-between { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 14px; font-size: 13px; }
.check { display: flex; align-items: center; gap: 8px; color: #5d6878; }
.link { color: var(--link); }
.auth-foot { margin: 12px 0 0; text-align: center; font-size: 13px; color: #6d7886; }
.form-error { min-height: 18px; margin: 0 0 8px; color: var(--red); font-size: 13px; }

.footer {
  margin-top: 28px;
  background: #0e1217;
  color: #d5dbe3;
  padding: 28px 28px 18px;
}
.footer-row { display: flex; justify-content: space-between; gap: 24px; }
.footer .brand { color: #fff; }
.footer .tag { margin: 8px 0 0; font-size: 13px; color: #9aa3af; max-width: 280px; }
.footer-links { display: flex; gap: 22px; padding-top: 6px; }
.footer-links a { font-size: 13px; color: #c5ccd6; }
.footer-links a:hover { color: #fff; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; }
.socials { display: flex; gap: 14px; }
.socials a { color: #c5ccd6; display: flex; }
.copy { font-size: 12px; color: #8b95a3; }
.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid #d5dbe3;
  background: #fff;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}
.to-top.show { display: flex; }
.empty { text-align: center; color: var(--muted); padding: 36px 0; }

body.app { background: var(--paper); }
body.app .shell { min-height: calc(100vh - 58px); align-items: stretch; }
body.app .side {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 58px);
}
.side-user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 8px 4px;
  font-size: 13px;
  font-weight: 600;
  border-top: 1px solid var(--line);
}
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #0e1217;
  color: #f4f6f8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}
.avatar.lg { width: 56px; height: 56px; font-size: 18px; border-radius: 8px; }
.cover-band { height: 72px; margin: 0 0 -28px; border-radius: 8px 8px 0 0; background: #0e1217; }
.profile-head { display: flex; align-items: center; gap: 14px; padding: 0 8px 8px; }
.profile-head h1 { margin: 0; font-size: 20px; letter-spacing: -0.03em; }
.profile-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.profile-head .btn { margin-left: auto; }
.role {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.stat-row div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
}
.stat-row span { display: block; color: var(--muted); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.stat-row strong { font-family: var(--mono); font-size: 16px; font-weight: 600; }
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin: 0 0 14px;
}
.panel.hidden { display: none; }
.panel h1, .panel h2, body.app .main > h1 {
  font-size: 20px;
  margin: 0 0 12px;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.notice {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  color: #3d4754;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 12px;
}
.funds-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
  align-items: start;
}
.funds-grid .table-wrap { grid-column: 1 / -1; }
.method {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  background: #fff;
}
.method:has(input:checked) { border-color: #0e1217; background: #f7f8fa; }
.method em { display: block; font-style: normal; color: var(--muted); font-size: 12px; }
.amount-line { display: block; margin: 10px 0 8px; font-size: 13px; color: var(--muted); }
.pay-address {
  font-family: var(--mono);
  font-size: 13px;
  word-break: break-all;
  background: #f3f5f8;
  border: 1px solid var(--line);
  padding: 8px 10px;
  border-radius: 6px;
}
.trc-box { margin: 12px 0; }
.asset-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.net {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 6px;
  height: 34px;
  padding: 0 12px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.net.is-on { background: #0e1217; color: #fff; border-color: #0e1217; }
.qr-box {
  width: 180px;
  height: 180px;
  margin: 8px 0;
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}
.qr-box img, .qr-box canvas, .qr-box table { max-width: 168px; max-height: 168px; }
.pay-top { display: flex; gap: 18px; align-items: center; margin: 4px 0 16px; }
.pay-warn { margin: 0; color: #d01212; font-size: 22px; font-weight: 700; line-height: 1.35; }
.pay-warn a { color: #d01212; text-decoration: underline; }
.pay-copy { display: flex; gap: 8px; align-items: center; }
.pay-copy .pay-address { flex: 1; margin: 0; }
#copy-addr { height: 36px; padding: 0 14px; border-radius: 6px; background: #0e1217; color: #fff; flex: none; }
.creds { margin-top: 12px; border-top: 1px solid var(--line); }
.creds h2 { margin: 12px 0; font-size: 16px; }
.creds p { display: flex; justify-content: space-between; gap: 16px; margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line); }
.creds span { color: var(--muted); }
.creds strong { font-family: var(--mono); font-weight: 500; font-size: 13px; }
.copy-line { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.copy-line span { width: 120px; flex: none; color: var(--muted); font-size: 13px; }
.copy-line .field { flex: 1; font-family: var(--mono); }
.copy-line .btn { height: 36px; padding: 0 14px; border-radius: 6px; background: #0e1217; color: #fff; flex: none; }
.mod-row { display: flex; gap: 8px; margin: 0 0 8px; }
.mod-row .field { flex: 1; }
.nav-count { display: inline-block; min-width: 18px; margin-left: 8px; padding: 0 5px; border-radius: 9px; background: #d01212; color: #fff; font-size: 12px; font-weight: 700; line-height: 18px; text-align: center; }
.nav-count[hidden] { display: none !important; }

.brand-logo { height: 48px; width: auto; display: block; }
.footer .brand-logo { height: 56px; }
.pay-asset { margin: 0 0 14px; color: #000; font-size: 22px; font-weight: 800; letter-spacing: 0.02em; }
.pay-warn button { border: 0; padding: 0; background: none; color: #d01212; font: inherit; font-weight: 800; letter-spacing: inherit; text-decoration: underline; cursor: pointer; }
.chat-launcher { position: fixed; right: 22px; bottom: 22px; z-index: 60; width: 58px; height: 58px; padding: 0; border: 0; border-radius: 50%; background: #d01212; color: #fff; box-shadow: 0 12px 28px rgba(208,18,18,.35); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.chat-teaser { position: fixed; right: 96px; bottom: 34px; z-index: 60; width: 240px; padding: 14px 36px 14px 16px; background: #fff; border-radius: 16px; box-shadow: 0 14px 36px rgba(14,18,23,.18); }
.chat-teaser::after { content: ""; position: absolute; right: -6px; bottom: 22px; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); }
.chat-teaser[hidden] { display: none !important; }
.chat-teaser-body { display: block; width: 100%; border: 0; padding: 0; background: none; text-align: left; cursor: pointer; font: inherit; color: #12171d; }
.chat-teaser-body strong { display: block; font-size: 15px; margin-bottom: 2px; }
.chat-teaser-body span { display: block; color: #5c6770; font-size: 13px; line-height: 1.35; }
.chat-teaser-x { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: #f1f3f6; color: #5c6770; cursor: pointer; line-height: 22px; }
.chat-panel { position: fixed; right: 22px; bottom: 92px; z-index: 60; width: 360px; max-width: calc(100vw - 24px); height: 520px; max-height: calc(100vh - 120px); background: #fff; border: 0; border-radius: 18px; box-shadow: 0 22px 60px rgba(14,18,23,.28); display: flex; flex-direction: column; overflow: hidden; }
.chat-panel[hidden] { display: none !important; }
.chat-head { display: flex; gap: 10px; align-items: center; padding: 14px 12px 14px 14px; background: #12171d; color: #fff; }
.chat-avatar { width: 36px; height: 36px; border-radius: 50%; background: #d01212; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.chat-head strong { display: block; font-size: 15px; }
.chat-head p { margin: 2px 0 0; color: #c5ced8; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.chat-dot { width: 8px; height: 8px; border-radius: 50%; background: #3dce7a; display: inline-block; }
.chat-head button { margin-left: auto; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.chat-log { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #f4f6f8; }
.chat-hello { margin: auto 8px; padding: 16px; background: #fff; border-radius: 14px; text-align: center; box-shadow: 0 1px 0 rgba(14,18,23,.04); }
.chat-hello strong { display: block; font-size: 16px; margin-bottom: 4px; }
.chat-hello p, .chat-empty { margin: 0; color: #5c6770; font-size: 13px; line-height: 1.45; }
.chat-panel .bubble { max-width: 82%; padding: 10px 12px; border-radius: 16px; }
.chat-panel .bubble p { margin: 2px 0 0; font-size: 14px; line-height: 1.4; }
.chat-panel .bubble small { display: block; font-size: 11px; opacity: .7; }
.chat-panel .bubble.buyer { align-self: flex-end; background: #d01212; color: #fff; border-bottom-right-radius: 4px; }
.chat-panel .bubble.desk { align-self: flex-start; background: #fff; color: #12171d; border-bottom-left-radius: 4px; box-shadow: 0 1px 2px rgba(14,18,23,.06); }
.chat-form { display: flex; gap: 8px; align-items: center; padding: 10px; border-top: 1px solid #e6ebf1; background: #fff; }
.chat-form .field { margin: 0; height: 42px; border-radius: 21px; padding: 0 14px; }
.chat-send { width: 42px; height: 42px; border: 0; border-radius: 50%; background: #12171d; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.chat-badge { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #12171d; color: #fff; font-size: 12px; font-weight: 800; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.chat-badge[hidden] { display: none !important; }

.desk-chat { display: grid; grid-template-columns: 280px 1fr; gap: 12px; min-height: 560px; }
.thread-list { background: #fff; border: 1px solid #e1e6ed; border-radius: 10px; overflow: auto; max-height: 70vh; }
.thread { display: block; padding: 12px; border-bottom: 1px solid #eef2f6; color: inherit; text-decoration: none; }
.thread strong, .thread span, .thread em { display: block; }
.thread span, .thread em { color: #66707c; font-size: 12px; font-style: normal; }
.thread em { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread.is-on { background: #0e1217; color: #fff; }
.thread.is-on span, .thread.is-on em { color: #c5ced8; }
.thread-pane { background: #fff; border: 1px solid #e1e6ed; border-radius: 10px; display: flex; flex-direction: column; min-height: 560px; }
.thread-title { padding: 12px 14px; border-bottom: 1px solid #eef2f6; font-weight: 700; }
.thread-pane .chat-log { min-height: 380px; }
.to-top { bottom: 84px; }
.brief-form { font-size: 16px; }
.brief-form h2 { font-size: 22px; }
.brief-form .need { display: block; margin: 14px 0 6px; color: #d01212; font-size: 15px; font-weight: 800; }
.brief-form .field { font-size: 16px; }
.rich-edit { margin: 0 0 14px; }
.rich-edit .need { color: #d01212; font-weight: 800; margin: 0 0 8px; }
.rich-tools { display: flex; gap: 6px; align-items: center; margin: 0 0 8px; flex-wrap: wrap; }
.rich-tools button, .rich-tools select { height: 32px; border: 1px solid #c5ced8; border-radius: 6px; background: #fff; padding: 0 8px; }
.rich-box { min-height: 160px; border: 1px solid #c5ced8; border-radius: 8px; padding: 12px; background: #fff; font-size: 16px; line-height: 1.5; }
.prose p { margin: 0 0 8px; }
.ord-row { cursor: pointer; }
.ord-row:hover td { filter: brightness(0.97); }
.tone-wait td { background: #fff4cc; }
.tone-key td { background: #fde2e2; }
.tone-sent td { background: #d9f5e5; }
.tone-done td { background: #eef1f5; color: #5c6770; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.pill-wait { background: #e0a100; color: #1c1400; }
.pill-key { background: #d01212; color: #fff; }
.pill-sent { background: #14804a; color: #fff; }
.pill-done { background: #8b95a3; color: #fff; }
.btn-done { height: 32px; padding: 0 12px; border-radius: 6px; background: #14804a; color: #fff; }
.panel.tone-wait { border-left: 6px solid #e0a100; }
.panel.tone-key { border-left: 6px solid #d01212; }
.panel.tone-sent { border-left: 6px solid #14804a; }
.panel.tone-done { border-left: 6px solid #8b95a3; }
.spin { width: 36px; height: 36px; border: 4px solid #e6ebf1; border-top-color: #d01212; border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; flex: none; }
.wait-inline .spin { width: 16px; height: 16px; border-width: 2px; vertical-align: -3px; margin-right: 6px; }
.wait-inline { display: inline-flex; align-items: center; color: #9a3412; font-weight: 700; }
.wait-box { display: flex; gap: 16px; align-items: center; }
.wait-box h2 { margin: 0 0 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.editor label, .photo-tools { display: block; margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.editor .field, .photo-tools .field { margin-top: 4px; }
.photo-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.photo-row img { width: 96px; height: 64px; object-fit: cover; border-radius: 4px; }

body.desk { background: #10151c; color: #d5dbe3; }
body.desk .topbar, body.desk .side { background: #10151c; color: #d5dbe3; border-color: #243041; }
body.desk .mark { width: 26px; height: 26px; border-radius: 4px; background: #1d4e89; }
body.desk .mark::after { display: none; }
body.desk .side a { color: #d5dbe3; }
body.desk .side a:hover { background: #1a222e; }
body.desk .side a.is-on { background: #1d4e89; color: #fff; box-shadow: none; }
body.desk .side-label { color: #8b95a3; }
body.desk .main { background: #e7ebf0; color: var(--ink); min-height: calc(100vh - 58px); }
body.desk .brand, body.desk .chip { color: #f4f6f8; }
body.desk .chip { border-color: #3a4656; background: transparent; }

@media (max-width: 1200px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.app .shell, body.desk .shell { grid-template-columns: 1fr; }
  .side { display: block; }
  .detail, .funds-grid, .stat-row, .profile-head { grid-template-columns: 1fr; display: block; }
  .profile-head .btn { margin: 12px 0 0; }
  .filters { flex-wrap: wrap; height: auto; padding: 8px; }
  .filters label, .filters .seg { border-right: 0; height: 36px; }
  .hero h1 { font-size: 22px; }
  .pay-top { display: block; }
  .pay-warn { font-size: 18px; margin-top: 12px; }
  .footer-row, .footer-bottom { flex-direction: column; }
}

tr[data-user] { cursor: pointer; }
tr[data-user]:hover td { background: #f7f1e8; }
.books em { display: block; font-style: normal; color: #14804a; font-weight: 800; }
.books strong { display: block; }

.desk-alert { background: #ff1f1f !important; color: #fff !important; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #ff1f1f; animation: desk-blink 1s steps(2) infinite; }
@keyframes desk-blink { 50% { opacity: .25; } }
#desk-log { background: #e7edf3; }
#desk-log .bubble { max-width: 78%; padding: 10px 12px 8px; border-radius: 16px; }
#desk-log .bubble small { display: block; font-size: 12px; font-weight: 800; }
#desk-log .bubble p { margin: 4px 0; font-size: 15px; line-height: 1.45; }
#desk-log .bubble time { display: block; font-size: 11px; opacity: .7; }
#desk-log .bubble.buyer { align-self: flex-start; background: #fff; color: #12171d; border: 2px solid #d01212; border-bottom-left-radius: 4px; }
#desk-log .bubble.buyer small { color: #d01212; }
#desk-log .bubble.desk { align-self: flex-end; background: #12171d; color: #fff; border-bottom-right-radius: 4px; }
#desk-log .bubble.desk small { color: #ffb4b4; }
.thread.is-hot { border-left: 4px solid #d01212; background: #fff1f1; }
.thread.is-hot em { color: #d01212 !important; font-weight: 800; }

.title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.title-row h1 { margin: 0; flex: 1; }
.title-row .btn-buy { flex: none; }

.title-row { align-items: center; }
.title-row h1 { min-width: 0; }
.title-row .btn-buy { width: auto; flex: none; margin-top: 0; height: 36px; padding: 0 16px; }
.buy-wrap .btn-buy { width: auto; margin-top: 12px; padding: 0 16px; }
.st-ok { color: #14804a; font-weight: 800; }
.st-wait { color: #b45309; font-weight: 800; }
td .amt { width: 90px; height: 32px; margin-right: 8px; }

#paid-btn { display: block; width: 240px; height: 46px; margin: 18px auto 0; padding: 0 22px; border: 0; border-radius: 8px; background: #0e1217; color: #fff; font-size: 15px; font-weight: 700; letter-spacing: 0; cursor: pointer; }
#paid-btn:hover { background: #242b34; }
#paid-btn:disabled { opacity: .6; cursor: default; }

.desk-pick { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; font-weight: 800; }
.desk-pick .field { max-width: 420px; font-weight: 500; }
.reach-btn { height: 36px; padding: 0 14px; }
.desk-copy span.need { width: 130px; color: #d01212; font-weight: 800; font-size: 13px; }
.mod-copy { margin: 8px 0 12px; padding-top: 8px; border-top: 1px solid #e6ebf1; }
.brief-form h2 { margin-top: 16px; }

.pay-asset .min-deposit { color: #d01212; }
