:root {
  --bg: #050505;
  --card: #141414;
  --line: #232323;
  --gold: #e8c44a;
  --gold-2: #c9a227;
  --text: #f4f4f4;
  --muted: #8d8d8d;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, system-ui, sans-serif; }
body { padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.hidden { display: none !important; }
html.has-session #header-auth { display: none !important; }
html.has-session #header-balance { display: flex !important; }
.gate, .shell { min-height: 100dvh; }
.gate {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
}
.gate-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: #1a1a1a;
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.gate.is-busy .gate-close,
.gate.is-busy .auth-card { pointer-events: none; }
.auth-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 5, 0.72);
  backdrop-filter: blur(12px);
}
.auth-loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.auth-loading-card p {
  margin: 0;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: .04em;
}
.auth-orb {
  position: relative;
  width: 72px;
  height: 72px;
}
.auth-orb-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(232, 196, 74, 0.18);
  border-top-color: var(--gold);
  border-right-color: var(--gold-2);
  animation: auth-spin 0.85s linear infinite;
}
.auth-orb-core {
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe08a, var(--gold) 55%, var(--gold-2));
  box-shadow: 0 0 22px rgba(232, 196, 74, 0.45);
  animation: auth-pulse 1.2s ease-in-out infinite;
}
@keyframes auth-spin {
  to { transform: rotate(360deg); }
}
@keyframes auth-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.86); opacity: 0.75; }
}
.auth-card { width: min(420px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px; text-align: left; }
.auth-switch { display: flex; gap: 8px; margin-bottom: 14px; }
.divider { text-align: center; color: var(--muted); margin: 14px 0; font-size: 12px; }
#tg-login { display: flex; justify-content: center; margin-bottom: 10px; min-height: 20px; }
.admin-page main { padding: 16px 16px 40px; max-width: 860px; margin: 0 auto; }
.admin-page .panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 16px; }
.admin-nav {
  display: flex; gap: 8px; margin-bottom: 18px; overflow-x: auto;
}
.admin-nav button {
  flex: 0 0 auto; min-width: 108px; border: 1px solid var(--line); background: #111; color: var(--muted);
  border-radius: 12px; padding: 10px 12px; font-weight: 700; cursor: pointer;
}
.admin-nav button.active { background: var(--gold); color: #111; border-color: var(--gold); }
.admin-subnav {
  display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; flex-wrap: wrap;
}
.admin-subnav button {
  border: 1px solid var(--line); background: #111; color: var(--muted);
  border-radius: 12px; padding: 8px 12px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.admin-subnav button.active { background: var(--gold); color: #111; border-color: var(--gold); }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}
.stat-card strong { display: block; font-size: 16px; margin: 6px 0 4px; word-break: break-word; }
.stats-range {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin: 0 0 16px;
}
.stats-range .btn { width: auto; min-width: 132px; padding: 10px 16px; }
.stats-range-hint { margin: 0; align-self: center; }
.stats-range label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.stats-range input[type="date"] {
  background: #111;
  color: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  color-scheme: dark;
}
.finance-wrap {
  overflow-x: auto;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}
.finance-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.finance-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: left;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.finance-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.finance-table tr:last-child td { border-bottom: none; }
.finance-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 800;
}
.finance-table .finance-title { font-weight: 800; }
.finance-table .finance-note { color: var(--muted); font-size: 12px; margin-top: 4px; font-weight: 500; }
.finance-minus { color: #f0a0a0; }
.finance-plus { color: #c6e8a8; }
.finance-table tr.finance-total td {
  background: linear-gradient(90deg, rgba(212, 175, 55, .16), transparent 70%);
  color: var(--gold);
  font-weight: 800;
}
.finance-table tr.finance-total .finance-note { color: rgba(212, 175, 55, .75); }
.pay-box { display: flex; flex-direction: column; gap: 10px; }
.pay-instruction { font-size: 20px; font-weight: 800; line-height: 1.3; }
.pay-phone { font-size: 22px; font-weight: 800; letter-spacing: .02em; color: var(--gold); }
.pay-bank { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.bank-icon { width: 22px; height: 22px; border-radius: 6px; flex: 0 0 auto; }
.bank-checks, .bank-grid { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; }
.bank-check, .bank-card {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left; cursor: pointer;
  background: #141414; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
  color: var(--text); font-weight: 700;
  touch-action: manipulation;
}
.bank-card img, .bank-icon { pointer-events: none; }
.bank-card:hover, .bank-check:hover { border-color: var(--gold); }
.bank-check input { width: auto; margin: 0; }
.bank-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.bank-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: #1a1710; border: 1px solid #3a3218; border-radius: 999px;
  padding: 4px 8px; font-size: 12px; font-weight: 700;
}
.bank-pill .bank-icon { width: 16px; height: 16px; }
.rate-row label { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }
.rate-row input { margin-top: 4px; }
.admin-row-actions .btn { width: auto; padding: 10px 14px; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check-row input { width: auto; }
.logo, .brand { font-weight: 700; letter-spacing: .04em; }
.logo { font-size: 34px; }
.logo span, .brand span { color: var(--gold); }
.top { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: rgba(5,5,5,.92); backdrop-filter: blur(12px); }
#view { position: relative; z-index: 0; padding-bottom: calc(108px + env(safe-area-inset-bottom)); overflow-x: hidden; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.balance-wrap { display: flex; align-items: stretch; }
.credits-pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: #1b1b1b; color: var(--text);
  border-radius: 999px 0 0 999px; padding: 8px 12px; font-weight: 700; cursor: pointer;
}
.coin {
  width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe08a, var(--gold) 55%, var(--gold-2));
  box-shadow: inset 0 0 0 1px #b8860b;
}
.topup-btn {
  border: 0; background: var(--gold); color: #111; font-weight: 800;
  border-radius: 0 999px 999px 0; padding: 8px 12px; cursor: pointer;
}
.muted { color: var(--muted); font-size: 13px; }
.profile-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  margin: 0 0 14px;
}
.profile-card h3 { margin: 0 0 8px; font-size: 16px; }
.profile-card .btn { margin-top: 8px; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.profile-card .profile-actions .btn { margin-top: 0; }
.balance-hero {
  background: linear-gradient(180deg, #1c1a12 0%, #141414 100%);
  border: 1px solid rgba(232, 196, 74, .28);
  border-radius: 22px;
  padding: 22px 18px 20px;
  margin: 0 0 14px;
  text-align: center;
}
.balance-value {
  font-size: 48px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--gold);
  margin: 8px 0 4px;
}
.balance-unit { font-weight: 700; margin-bottom: 8px; }
.balance-hero .btn { margin-top: 12px; }
.balance-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 14px;
}
.balance-stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.balance-stat strong { font-size: 18px; }
.ledger-feed { display: flex; flex-direction: column; gap: 8px; }
.ledger-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.ledger-row:last-child { border-bottom: 0; }
.ledger-row-amt { text-align: right; flex-shrink: 0; }
@media (max-width: 640px) {
  .balance-stats { grid-template-columns: 1fr; }
  .balance-value { font-size: 40px; }
}
.tg-bind { display: flex; justify-content: flex-start; margin-top: 10px; min-height: 0; }
.carousel { position: relative; margin: 0 0 18px; }
.carousel-track { position: relative; height: 190px; border-radius: 22px; overflow: hidden; background: #111; }
.banner-slide { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .35s ease; }
.banner-slide.active { opacity: 1; pointer-events: auto; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-copy {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 16px 16px 22px; background: linear-gradient(180deg, transparent 20%, rgba(0,0,0,.78));
}
.banner-kicker { color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .04em; margin-bottom: 6px; }
.banner-copy h2 { margin: 0 0 10px; font-size: 22px; line-height: 1.15; }
.banner-cta { display: inline-flex; background: var(--gold); color: #111; font-weight: 800; border-radius: 12px; padding: 8px 12px; font-size: 13px; width: fit-content; }
.banner-dots { display: flex; justify-content: center; gap: 6px; padding: 10px 0 2px; }
.banner-dot { width: 7px; height: 7px; border: 0; border-radius: 999px; background: #3a3a3a; padding: 0; cursor: pointer; }
.banner-dot.active { width: 18px; background: #fff; }
.section-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; margin: 6px 0 12px; }
.section-title .bar { width: 4px; height: 18px; background: var(--gold); border-radius: 2px; }
.start-card {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  background: #141414; border: 1px solid var(--line); border-radius: 18px;
  padding: 14px; margin-bottom: 10px; color: var(--text); cursor: pointer;
}
.start-card-gold { box-shadow: 0 0 0 1px rgba(232,196,74,.28), 0 8px 28px rgba(232,196,74,.08); }
.start-icon {
  width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; flex-shrink: 0;
}
.plus-gold { background: var(--gold); color: #111; }
.plus-outline { background: #1a1a1a; color: #fff; border: 1px solid #3a3a3a; }
.start-text { flex: 1; min-width: 0; }
.start-text strong { display: block; font-size: 17px; margin: 2px 0 2px; }
.start-kicker { color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.start-chevron { color: #666; font-size: 28px; line-height: 1; }
.soon-card {
  background: #141414;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 16px;
  text-align: center;
}
.soon-card strong { display: block; font-size: 17px; margin: 0 0 8px; }
.nn-card {
  position: relative;
  z-index: 9;
  background: #120f0a;
  border: 1.5px solid var(--gold);
  border-radius: 22px;
  padding: 16px 16px 18px;
  margin: 0 0 16px;
}
.nn-card-top { display: flex; align-items: center; justify-content: space-between; }
.nn-play { color: var(--gold); font-size: 12px; }
.nn-live { color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.nn-title { font-size: 32px; font-weight: 800; margin: 18px 0 16px; }
.nn-select {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0c0c0c;
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 8px 12px 8px 8px;
  color: var(--text);
  cursor: pointer;
}
.nn-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold);
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
}
.nn-name { flex: 1; text-align: left; font-weight: 700; }
.nn-chevron { color: var(--gold); font-size: 14px; }
.nn-backdrop {
  position: fixed;
  inset: 0;
  z-index: 8;
  background: transparent;
}
.nn-menu {
  position: absolute;
  left: 12px;
  right: 12px;
  top: calc(100% - 8px);
  z-index: 10;
  background: #1c1c1c;
  border-radius: 18px;
  padding: 6px 0;
  box-shadow: 0 16px 40px rgba(0,0,0,.55);
  max-height: 280px;
  overflow: auto;
}
.nn-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 12px 16px;
  text-align: left;
  cursor: pointer;
  font-size: 16px;
}
.nn-item.active { font-weight: 700; }
.nn-check { width: 18px; color: #fff; }
.kind-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #171717;
  border-radius: 999px;
  padding: 4px;
  margin: 18px 0 14px;
}
.kind-switch button {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 8px;
  font-weight: 800;
  cursor: pointer;
}
.kind-switch button.active { color: #111; }
.kind-knob {
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: calc(50% - 4px);
  left: 4px;
  background: var(--gold);
  border-radius: 999px;
  transition: left .25s ease;
  pointer-events: none;
}
.kind-knob[data-kind-knob="photo"] { left: calc(50%); }
.cover-section {
  margin: 14px 0 22px;
  padding: 4px 0 10px;
  isolation: isolate;
  overflow: hidden;
}
.cover-cat {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 0 16px 10px;
}
.cover-cat::before,
.cover-cat::after {
  content: "";
  flex: 1;
  height: 1px;
  max-width: 72px;
  background: linear-gradient(90deg, transparent, rgba(232, 196, 74, 0.55));
}
.cover-cat::after {
  background: linear-gradient(90deg, rgba(232, 196, 74, 0.55), transparent);
}
.cover-cat span {
  flex: 0 1 auto;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 7px 18px;
  border: 1px solid rgba(232, 196, 74, 0.55);
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(232, 196, 74, 0.18);
  background: rgba(8, 8, 8, 0.72);
}
.coverflow {
  position: relative;
  z-index: 0;
  isolation: isolate;
  contain: paint;
  height: calc(min(45.5vw, 198px) * 14 / 9 + 12px);
  margin: 0;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.cover-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cover-card {
  position: absolute;
  width: min(45.5vw, 198px);
  transform-origin: center center;
  transition: transform .78s cubic-bezier(0.22, 1, 0.36, 1), opacity .48s ease;
  will-change: transform;
  cursor: pointer;
  backface-visibility: hidden;
}
.coverflow.is-dragging .cover-card { transition: none; }
.cover-card.is-side { filter: brightness(.78); }
.cover-card.is-center { filter: none; }
.cover-card.is-side .sound-btn { display: none; }
.cover-card.is-center .sound-btn {
  pointer-events: auto;
  z-index: 8;
}
.cover-still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  pointer-events: none;
  opacity: 1;
  background: #111;
  transition: opacity .25s ease;
}
.cover-card.is-center.is-ready .cover-still { opacity: 0; }
.cover-card.is-center video { position: relative; z-index: 0; }
.trend-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trend-card { border: 0; padding: 0; background: transparent; cursor: pointer; width: 100%; color: inherit; text-align: inherit; font: inherit; }
.trend-media {
  position: relative;
  aspect-ratio: 9 / 14;
  border-radius: 16px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 14px 28px rgba(0,0,0,.45);
}
.trend-media video, .trend-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trend-empty { width: 100%; height: 100%; background: #111; }
.trend-type {
  position: absolute; top: 8px; left: 8px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0,0,0,.5); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.trend-type svg { width: 14px; height: 14px; }
.trend-title {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px 10px 10px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.78));
  font-weight: 800; font-size: 13px; text-align: center;
  text-transform: uppercase;
}
.sound-btn {
  position: absolute; top: 8px; right: 8px;
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff;
  display: flex; align-items: center; justify-content: center;
  z-index: 3; cursor: pointer;
}
.sound-btn svg { width: 18px; height: 18px; display: block; }
.sound-btn.muted .waves { display: none; }
.sound-btn:not(.muted) .mute-x { display: none; }
.sound-btn.on { box-shadow: 0 0 0 2px rgba(232,196,74,.55); }
.sound-btn.on .waves { animation: sound-pulse .9s ease-in-out infinite; transform-origin: 14px 12px; }
.preview-source .sound-btn { top: auto; bottom: 8px; }
.model-tag {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 200;
  font-size: 13px;
  letter-spacing: 0.14em;
  font-family: "Segoe UI", "Helvetica Neue", Inter, sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 4px;
}
.ref-guide {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  margin: 0 0 14px;
  padding: 12px 12px 12px 10px;
  border: 1px solid rgba(232, 196, 74, 0.28);
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(232, 196, 74, 0.12), #141414 42%);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}
.ref-guide-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.ref-guide .start-chevron { margin-left: auto; }
.sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet.hidden { display: none !important; pointer-events: none; }
.sheet-backdrop { position: absolute; inset: 0; z-index: 1; background: rgba(0, 0, 0, 0.62); }
.sheet-card {
  position: relative;
  z-index: 2;
  width: min(520px, 100%);
  max-height: min(88dvh, 720px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #121212;
  border-radius: 22px 22px 0 0;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
  border: 1px solid var(--line);
  border-bottom: 0;
}
.sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: 99px;
  background: #3a3a3a;
  margin: 4px auto 12px;
}
.sheet-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #1c1c1c;
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
}
.sheet-card h2 { margin: 8px 36px 8px 0; font-size: 22px; }
.sheet-lead { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 0 0 14px; }
.guide-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.guide-ok { color: #7dcc8a; font-weight: 800; font-size: 12px; margin-bottom: 8px; }
.guide-bad { color: #e27a7a; font-weight: 800; font-size: 12px; margin-bottom: 8px; }
.guide-shot { margin-bottom: 10px; }
.guide-shot span { display: block; color: var(--muted); font-size: 11px; margin-top: 6px; line-height: 1.3; }
.guide-face {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  background: radial-gradient(circle at 40% 35%, #e8c8a8, #b07a58 58%, #6a4630);
}
.guide-face.good { box-shadow: inset 0 0 0 2px #4caf7a; }
.guide-face.bad { box-shadow: inset 0 0 0 2px #c45c5c; filter: contrast(1.15); }
.guide-face.cover { background: linear-gradient(135deg, #2a2a2a 20%, #8a6a50 55%, #1a1a1a); }
.guide-face.angle { background: linear-gradient(210deg, #c9a07a, #5a3a28); }
.guide-tips { margin: 0 0 16px; padding-left: 18px; color: var(--text); font-size: 13px; line-height: 1.45; }
.guide-tips li { margin: 0 0 6px; }
@keyframes sound-pulse {
  0%, 100% { opacity: .3; }
  50% { opacity: 1; }
}
.pill { border: 0; background: #1b1b1b; color: var(--gold); border-radius: 999px; padding: 8px 12px; font-weight: 600; }
main { padding: 8px 16px 96px; }
.hero { background: linear-gradient(180deg, #1a1608, #0d0d0d); border: 1px solid #2a230e; border-radius: 22px; padding: 20px; margin-bottom: 18px; }
.hero h1 { margin: 0 0 8px; font-size: 28px; line-height: 1.1; }
.hero p { margin: 0; color: var(--muted); }
.cats { display: flex; gap: 8px; overflow: auto; padding: 4px 0 14px; }
.cats button, .chip { white-space: nowrap; border: 0; background: #171717; color: var(--text); border-radius: 999px; padding: 8px 12px; }
.cats button.active, .chip.active { background: var(--gold); color: #111; font-weight: 700; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card { background: var(--card); border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.card video { width: 100%; height: 210px; object-fit: cover; background: #000; display: block; }
.card .meta, .panel { padding: 10px 12px 12px; }
.card h3 { margin: 0 0 4px; font-size: 14px; }
.price { color: var(--gold); font-size: 12px; font-weight: 700; margin-top: 4px; }
.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #0b0b0b;
  border-top: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  padding: 8px 6px calc(10px + env(safe-area-inset-bottom));
}
.tabs button {
  border: 0;
  background: transparent;
  color: #b8b8b8;
  padding: 6px 4px 4px;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.tabs button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tabs button.active { color: var(--gold); }
.btn { display: inline-flex; justify-content: center; align-items: center; width: 100%; border: 0; border-radius: 14px; padding: 14px; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn.gold { background: linear-gradient(180deg, var(--gold), var(--gold-2)); color: #111; }
.btn.ghost { background: #1a1a1a; color: var(--text); }
.preview { border-radius: 20px; overflow: hidden; margin-bottom: 14px; border: 1px solid var(--line); }
.preview-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 14px 8px; text-align: left; }
.preview-head h3 { margin: 0 0 4px; font-size: 20px; line-height: 1.2; }
.preview-stage { display: flex; justify-content: center; align-items: center; background: #0a0a0a; padding: 0 12px 14px; }
.preview-source { position: relative; width: 100%; border-radius: 14px; overflow: hidden; background: #000; }
.preview-media { position: relative; width: 100%; }
.preview-media video, .preview-media img {
  width: 100%; height: auto; max-height: 52vh; display: block; object-fit: contain; background: #000;
}
.preview-empty { background: #111; min-height: 180px; width: 100%; }
.opt-block { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin-bottom: 14px; }
.opt-label { color: var(--muted); font-size: 12px; margin: 8px 0 8px; }
.opt-row { display: flex; gap: 8px; }
.opt-row-wrap { flex-wrap: wrap; margin-bottom: 10px; }
.opt-dur-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.opt-dur-value { color: var(--gold); font-weight: 800; font-size: 16px; }
input[data-opt-dur-range] {
  width: 100%;
  margin: 4px 0 10px;
  accent-color: var(--gold);
}
.opt-chip { flex: 1; border: 1px solid var(--line); background: #121212; color: var(--text); border-radius: 12px; padding: 10px 8px; font-size: 12px; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.opt-chip.active { background: var(--gold); color: #111; border-color: var(--gold); font-weight: 700; }
.opt-shape { display: inline-block; border: 1.5px solid currentColor; border-radius: 2px; opacity: .85; }
.opt-shape.tall { width: 8px; height: 14px; }
.opt-shape.wide { width: 16px; height: 9px; }
.opt-shape.square { width: 11px; height: 11px; }
.slot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--card);
  border-radius: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  padding: 14px;
  overflow: visible;
}
.slot-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.slot-head strong { flex: 1; min-width: 0; font-size: 15px; line-height: 1.35; }
.slot-hint { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.file-pick {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px;
  border: 1px dashed #3a3a3a;
  border-radius: 12px;
  background: #101010;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}
.file-pick input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.add-photo {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px auto 0;
  border: 1px dashed #3a3a3a;
  border-radius: 50%;
  background: #101010;
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.add-photo:hover { border-color: var(--gold); color: var(--gold); }
.list { display: flex; flex-direction: column; gap: 10px; }
.item { background: var(--card); border-radius: 16px; padding: 12px; border: 1px solid var(--line); }
.item video, .item img { width: 100%; border-radius: 12px; margin-top: 8px; }
.quality-hint { color: var(--muted); font-size: 12px; line-height: 1.4; margin: 10px 0 8px; }
.item .btn, #gen-status .btn { margin-top: 4px; }
.form input, .form textarea, .form select { width: 100%; background: #101010; color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 0 0 10px; }
.form input[type="checkbox"] { width: 18px; height: 18px; margin: 0; padding: 0; }
.pack-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 14px; }
.pack-card {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%; text-align: left; cursor: pointer;
  background: #141414; border: 1px solid var(--line); border-radius: 16px; padding: 14px;
  color: var(--text);
}
.pack-card:hover { border-color: var(--gold); }
.pack-price { font-weight: 800; color: var(--gold); white-space: nowrap; }
.pack-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.pack-chips .chip { margin: 0; }
.topup-field { display: block; color: var(--muted); font-size: 13px; margin: 0 0 10px; }
.topup-field input { width: 100%; margin-top: 6px; background: #101010; color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.auth-link {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--gold);
  font-weight: 700;
  font-size: 13px;
  margin: 0 0 10px;
  cursor: pointer;
  text-align: left;
}
.cat-picker { position: relative; margin: 0 0 10px; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; min-height: 8px; }
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1a1710;
  color: var(--gold);
  border: 1px solid #3a3218;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
}
.cat-chip button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}
.cat-picker select { margin: 0; }
.tpl-slots-head { margin-top: 18px; }
.tpl-admin-extra {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.tpl-slot-edit { margin-bottom: 12px; }
.tpl-slot-edit .slot-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tpl-slot-edit .btn,
#tpl-add-slot { width: auto; padding: 8px 12px; }
#tpl-nn-card { margin-bottom: 14px; }
.cat-suggest {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 8;
  max-height: 180px;
  overflow: auto;
  background: #101010;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-top: 4px;
}
.cat-suggest button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
  cursor: pointer;
}
.cat-suggest button:hover { background: #1c1c1c; }
.help-link {
  border: 0;
  background: transparent;
  color: var(--gold);
  font-weight: 700;
  font-size: 13px;
  padding: 0;
  cursor: pointer;
}
.help-q {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: transparent;
  color: var(--gold);
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
}
.help-outline {
  display: inline-flex;
  align-items: center;
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid var(--gold);
  border-radius: 12px;
  background: transparent;
  color: var(--gold);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.help-body p { color: var(--muted); line-height: 1.45; margin: 0 0 10px; }
.scratch-hero { margin: 4px 0 12px; }
.sec-kicker { color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.sec-head { color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; margin: 14px 0 8px; }
.prompt-box textarea { margin-bottom: 0; }
.slot .thumb,
.slot .thumb-video {
  display: none;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 12px;
}
.slot.is-disabled { opacity: .45; pointer-events: none; }
.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 8px; }
.mode-tabs button {
  border: 0;
  border-radius: 12px;
  padding: 12px 8px;
  background: #171717;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}
.mode-tabs button.active { background: var(--gold); color: #111; }
.mode-hint { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.media-fold {
  width: 100%;
  display: flex;
  justify-content: space-between;
  background: #141414;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  padding: 12px 14px;
  margin: 10px 0;
  font-weight: 700;
  cursor: pointer;
}
.sound-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  margin: 0 0 14px;
}
.sound-switch {
  width: 48px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #333;
  position: relative;
  cursor: pointer;
}
.sound-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: left .2s;
}
.sound-switch.on { background: var(--gold); }
.sound-switch.on::after { left: 23px; }
.status { padding: 12px; border-radius: 12px; background: #17140a; color: var(--gold); margin: 10px 0; }
.error { padding: 12px; border-radius: 12px; background: #2a1010; color: #ffb4b4; margin: 10px 0; }
.empty { color: var(--muted); text-align: center; padding: 40px 12px; }
.user-id { font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.ledger { width: 100%; border-collapse: collapse; font-size: 13px; }
.ledger th, .ledger td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ledger th { color: var(--muted); font-weight: 600; }
.amt-plus { color: #8fdf8f; font-weight: 700; }
.amt-minus { color: #f0a0a0; font-weight: 700; }
