:root {
  --bg: #070709;
  --card: #121218;
  --line: rgba(228, 180, 42, .16);
  --line2: #23232c;
  --gold: #e4b42a;
  --gold2: #f6d56b;
  --ink: #f4f1ea;
  --muted: #8c887c;
  --ok: #3ecf8e;
  --bad: #e85d5d;
  --in: #18181f;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
  --r: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { height: 100%; }
body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: Manrope, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: -30% -20% auto -20%;
  height: 70vh;
  background: radial-gradient(55% 55% at 50% 0%, rgba(228, 180, 42, .18), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  z-index: 0;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; }
img { max-width: 100%; display: block; }
.top, .wrap, .chat-head, .composer, .anav, .admin-chat, .site-foot { position: relative; z-index: 1; }
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 8px; max-width: 560px; margin: 0 auto;
}
.admin-top { max-width: 1080px; }
.brand { display: flex; align-items: center; gap: 10px; }
.mark {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px;
  background: linear-gradient(180deg, #f0cc5a, #b07f0a); color: #1a1406;
  font-family: Unbounded, sans-serif; font-size: 14px; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.brand-txt { font-family: Unbounded, sans-serif; font-size: 13px; letter-spacing: .12em; font-weight: 600; }
.brand-txt em { font-style: normal; color: var(--gold); }
.rate { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.rate b { color: var(--gold2); font-weight: 700; }
.ghost-link { font-size: 13px; color: var(--muted); }
.wrap { width: min(560px, calc(100% - 32px)); margin: 8px auto 16px; flex: 1 0 auto; }
.wrap.slim { width: min(440px, calc(100% - 32px)); }
.admin-wrap { width: min(880px, calc(100% - 32px)); }
.kicker {
  display: inline-block; font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--muted); font-weight: 700;
}
.raffle, .sell-card, .panel, .aside-block {
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.04);
}
.raffle { padding: 22px 22px 20px; margin-bottom: 16px; position: relative; overflow: hidden; }
.raffle::after {
  content: ""; position: absolute; right: -40px; top: -50px; width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(228,180,42,.22), transparent 68%);
  pointer-events: none;
}
.raffle-top { display: flex; justify-content: space-between; align-items: center; }
.raffle-live { font-size: 11px; color: var(--ok); letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.raffle-n, .gold-n {
  font-family: Unbounded, sans-serif; font-weight: 700; line-height: .95; margin: 10px 0 16px;
}
.raffle-n {
  font-size: clamp(48px, 14vw, 72px);
  background: linear-gradient(110deg, #8a6a12 0%, #ffe9a0 42%, #c9a227 50%, #ffe9a0 58%, #8a6a12 100%);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 4.8s ease-in-out infinite;
}
.raffle-n span, .g-unit { font-size: .38em; margin-left: 6px; letter-spacing: .08em; }
@keyframes shine { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.raffle-form { display: flex; gap: 8px; }
.raffle-form input, .fld input, .fld select, textarea, select {
  background: #0b0b0f; border: 1px solid var(--line2); color: var(--ink);
  border-radius: 12px; padding: 14px 16px; font-size: 16px; outline: none; width: 100%;
}
.raffle-form input:focus, .fld input:focus, .fld select:focus, textarea:focus, select:focus { border-color: var(--gold); }
.raffle-form button {
  flex: 0 0 auto; border: 0; border-radius: 12px; padding: 0 18px;
  background: linear-gradient(180deg, #f0cc5a, #b07f0a); color: #1a1406;
  font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: 12px; cursor: pointer;
}
.sell-card { padding: 24px 22px 22px; }
.gold-n { font-size: clamp(52px, 16vw, 78px); color: var(--ink); margin: 8px 0 18px; }
.gold-n.sm { font-size: 40px; margin: 6px 0 10px; }
input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 3px;
  border-radius: 3px; background: #2a2a32; outline: none; margin: 6px 0 18px;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3c4, #e4b42a 45%, #8a6910);
  border: 0; box-shadow: 0 0 0 6px rgba(228,180,42,.12); cursor: pointer;
}
input[type=range]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: #e4b42a; border: 0; cursor: pointer;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chips button, .tabs button, .quick button, .tiny {
  border: 1px solid var(--line2); background: #0d0d12; color: var(--muted);
  border-radius: 999px; padding: 8px 12px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.chips button.on, .tabs button.on {
  border-color: var(--gold); color: #1a1406; background: linear-gradient(180deg, #f0cc5a, #c49214);
}
.payout {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 6px 0 18px; padding: 14px 4px 0; border-top: 1px solid var(--line2);
}
.payout.tight { margin: 0 0 18px; padding-top: 12px; }
.payout span { color: var(--muted); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.payout b { font-family: Unbounded, sans-serif; font-size: 22px; color: var(--gold2); }
.btn-gold {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 52px;
  border: 0; border-radius: 14px;
  background: linear-gradient(180deg, #f0cc5a 0%, #d7a21c 48%, #b07f0a 100%);
  color: #1a1406; font-weight: 800; font-size: 14px; letter-spacing: .08em;
  text-transform: uppercase; cursor: pointer;
  box-shadow: 0 12px 28px rgba(215,162,28,.22), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn-gold:active { transform: translateY(1px); }

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 16px; }
.tabs button { border-radius: 12px; padding: 12px; font-size: 13px; }
.pay-form { display: flex; flex-direction: column; gap: 12px; }
.fld {
  display: flex; flex-direction: column; gap: 8px; font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700;
}
.hidden { display: none !important; }
.check {
  display: flex; align-items: center; gap: 10px; color: var(--ink);
  font-size: 14px; letter-spacing: 0; text-transform: none; font-weight: 500;
}
.check input { width: auto; }
.toast {
  margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  background: rgba(62, 207, 142, .12); color: var(--ok); font-size: 13px; font-weight: 600;
}
.toast.bad, .toast.show.bad { background: rgba(232, 93, 93, .12); color: var(--bad); }
.toast.show { display: block; }
.chat-page { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
body.chat-page::before { height: 36vh; opacity: .7; }
.chat-head {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-bottom: 1px solid var(--line2); background: rgba(7,7,9,.72); backdrop-filter: blur(12px);
}
.back {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--line2); color: var(--muted); font-size: 18px;
}
.who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.who-ava {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(180deg, #f0cc5a, #b07f0a); color: #1a1406;
  font-family: Unbounded, sans-serif; font-weight: 700;
}
.who-name { font-weight: 800; font-size: 14px; }
.who-sub { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 3px rgba(62,207,142,.15); display: inline-block;
}
.who-gold { font-family: Unbounded, sans-serif; font-size: 12px; color: var(--gold); }
.thread {
  flex: 1; overflow-y: auto; padding: 16px 14px 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.msg {
  max-width: 82%; padding: 10px 12px 6px; border-radius: 16px;
  font-size: 15px; line-height: 1.4; position: relative;
}
.msg.in {
  align-self: flex-start; background: var(--in); border: 1px solid var(--line2);
  border-bottom-left-radius: 6px;
}
.msg.out {
  align-self: flex-end; background: linear-gradient(180deg, #d7a21c, #b07f0a);
  color: #1a1406; border-bottom-right-radius: 6px;
}
.msg-text { white-space: pre-wrap; word-break: break-word; }
.msg-meta { font-size: 10px; opacity: .65; text-align: right; margin-top: 4px; }
.msg-img { display: block; margin-bottom: 6px; border-radius: 10px; overflow: hidden; }
.msg-img img { max-height: 220px; width: 100%; object-fit: cover; }
.composer {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line2); background: #0b0b0f;
}
.composer textarea { min-height: 42px; max-height: 120px; resize: none; padding: 11px 14px; line-height: 1.3; }
.attach, .send {
  width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center;
  border-radius: 12px; border: 1px solid var(--line2); background: #121218; color: var(--gold); cursor: pointer;
}
.send { border: 0; background: linear-gradient(180deg, #f0cc5a, #b07f0a); color: #1a1406; }
.anav {
  display: flex; gap: 6px; width: min(1080px, calc(100% - 32px));
  margin: 0 auto 8px; padding: 0 0 8px; overflow-x: auto;
}
.anav a {
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700;
  color: var(--muted); padding: 8px 12px; border-radius: 999px; border: 1px solid transparent;
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.anav a.on { color: var(--gold2); border-color: var(--line); background: rgba(228,180,42,.08); }
.anav a.out { margin-left: auto; }
.anav b, .ub {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: var(--gold); color: #1a1406; font-size: 10px;
  display: inline-grid; place-items: center; font-style: normal;
}
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.stat span { display: block; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.stat b { font-family: Unbounded, sans-serif; font-size: 22px; }
.panel { padding: 8px; }
.panel-h {
  display: flex; align-items: center; justify-content: space-between; padding: 10px 12px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700;
}
.row {
  display: grid; grid-template-columns: 1.1fr .7fr .8fr .8fr .9fr auto; gap: 8px;
  align-items: center; padding: 12px; border-top: 1px solid var(--line2); font-size: 13px;
}
.row.static { cursor: default; }
.mono { font-variant-numeric: tabular-nums; font-weight: 700; }
.muted { color: var(--muted); }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.st { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; }
.st-new { color: var(--gold); }
.st-work { color: #7eb6ff; }
.st-done { color: var(--ok); }
.st-cancel { color: var(--bad); }
.clist { display: block; padding: 12px 14px; border-top: 1px solid var(--line2); }
.clist.unread { background: rgba(228,180,42,.06); }
.clist-top { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.clist-pre { color: var(--muted); font-size: 13px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-chat {
  display: grid; grid-template-columns: 280px 1fr; width: min(1080px, calc(100% - 24px));
  margin: 0 auto 16px; gap: 12px; height: calc(100dvh - 118px);
}
.aside { display: flex; flex-direction: column; gap: 10px; overflow: auto; }
.aside-block { padding: 16px; }
.aside-gold { font-family: Unbounded, sans-serif; font-size: 28px; margin: 8px 0 2px; }
.aside-pay { color: var(--gold2); font-weight: 700; margin-bottom: 12px; }
.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 7px 0; border-top: 1px solid var(--line2); }
.kv span { color: var(--muted); }
.kv b { font-weight: 700; text-align: right; word-break: break-all; }
.achat {
  display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden; background: #0c0c10;
}
.quick { display: flex; gap: 6px; padding: 8px 10px 0; overflow-x: auto; }
.quick button { white-space: nowrap; }
.login-wrap { padding-top: 12vh; }
.site-foot {
  width: min(560px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 calc(22px + env(safe-area-inset-bottom));
  flex: 0 0 auto;
}
.legal-box {
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.04);
  padding: 18px 20px 16px;
}
.legal-box-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.legal-link {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--gold2);
}
.legal-name {
  font-family: Unbounded, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 14px;
}
.legal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
.legal-wide { grid-column: 1 / -1; }
.legal-cell span,
.legal-row span {
  display: block;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 5px;
}
.legal-cell b,
.legal-row b {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  word-break: break-word;
}
.legal-cell a,
.legal-row a { color: var(--gold2); }
.legal-title {
  font-family: Unbounded, sans-serif;
  font-size: clamp(20px, 5.6vw, 26px);
  font-weight: 600;
  line-height: 1.25;
  margin: 12px 0 6px;
}
.legal-rows { margin-top: 8px; }
.legal-row {
  padding: 13px 0;
  border-top: 1px solid var(--line2);
}
.legal-page .wrap { width: min(480px, calc(100% - 32px)); }
.tiny { padding: 6px 10px; }
.lot-table .row { grid-template-columns: 1.2fr 1fr 1fr auto; }
@media (max-width: 860px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .admin-chat { grid-template-columns: 1fr; height: auto; }
  .aside { order: 1; }
  .achat { order: 0; min-height: 62dvh; }
  .row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .raffle-form { flex-direction: column; }
  .raffle-form button { height: 48px; }
  .legal-grid { grid-template-columns: 1fr; }
}
