:root {
  --bg: #0a0a0b;
  --panel: #131315;
  --panel-2: #1c1c1f;
  --border: #2a2a2a;
  --text: #f5f5f2;
  --text-dim: #9b9b93;
  --accent: #cdfa5c;
  --accent-2: #a3d936;
  --accent-contrast: #0a0a0b;
  --danger: #ff6b4a;
  --danger-bg: #3a1f1a;
  --danger-text: #ffb4a0;
  --ok-bg: #17301f;
  --ok-text: #a6f0c2;
  --warn-bg: #33241a;
  --warn-text: #f0b183;
  --info-bg: #1a2c3a;
  --info-text: #7ec0f0;
  --radius: 16px;
}

[data-theme="light"] {
  --bg: #f7f7f2;
  --panel: #ffffff;
  --panel-2: #eef0e6;
  --border: #dcdfd0;
  --text: #14150f;
  --text-dim: #63665a;
  --accent: #5c8a1a;
  --accent-2: #4a7314;
  --accent-contrast: #ffffff;
  --danger: #c0392b;
  --danger-bg: #fbe4e0;
  --danger-text: #a3291b;
  --ok-bg: #e3f5e6;
  --ok-text: #1f7a3d;
  --warn-bg: #fbeee0;
  --warn-text: #a5620f;
  --info-bg: #e3edfa;
  --info-text: #1f5fa3;
}

* { box-sizing: border-box; }

.icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.icon-accent { color: var(--accent); }

body, button, input, select, textarea, a {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

h1, h2, h3, .brand, .card-big, button, .mini-btn-accent, .mini-btn { font-weight: 600; }
.content h1, .auth-card h1, .legal-page h1 { font-weight: 800; letter-spacing: -0.01em; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Auth --- */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}
.auth-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 340px;
  max-width: 92vw;
  box-sizing: border-box;
}
.auth-card h1 { margin: 0 0 4px; font-size: 28px; }
.auth-sub { color: var(--text-dim); margin: 0 0 20px; font-size: 14px; }
.auth-switch { margin-top: 16px; font-size: 13px; color: var(--text-dim); }
.auth-card form { display: flex; flex-direction: column; gap: 10px; }
.auth-card label { font-size: 13px; color: var(--text-dim); margin-top: 6px; }
.auth-card input {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
}
.auth-card button {
  margin-top: 8px;
  background: var(--accent);
  border: none;
  border-radius: 999px;
  padding: 14px;
  color: var(--accent-contrast);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px -6px var(--accent);
}
.auth-card button:hover { opacity: 0.9; }
.checkbox-label {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 8px;
  margin-top: 4px !important;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
}
.checkbox-label input { margin-top: 2px; flex-shrink: 0; }
.checkbox-label a { color: var(--accent); }
.field-hint { font-size: 12px; color: var(--text-dim); margin-top: -4px; }
.link-button {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.auth-card .inline-form { margin: 10px 0 0; }

/* --- Legal pages --- */
.legal-page {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 40px;
  width: 640px;
  max-width: 90vw;
}
.legal-page h1 { margin: 0 0 4px; font-size: 26px; }
.legal-page h2 { font-size: 16px; margin: 22px 0 8px; }
.legal-page p { line-height: 1.6; color: var(--text); }
.legal-draft-notice {
  background: var(--warn-bg);
  color: var(--warn-text);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin: 0 0 18px;
}

/* --- Shell / layout --- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
}
.brand { display: block; color: var(--text); font-weight: 800; font-size: 19px; padding: 0 10px 24px; letter-spacing: -0.01em; }
.brand:hover { color: var(--text); text-decoration: none; opacity: 0.85; }
.brand-dot { color: var(--accent); }
.sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 4px;
  font-weight: 500;
}
.sidebar a .icon { color: inherit; }
.sidebar a:hover { background: var(--panel-2); text-decoration: none; color: var(--text); }
.sidebar a.active { background: var(--panel-2); color: var(--text); font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }

.main-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 14px 32px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}
.topbar-actions { display: flex; align-items: center; gap: 12px; }

.wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.wallet-chip .icon { color: var(--accent); }

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  padding: 0;
}
.theme-toggle:hover { border-color: var(--accent); }
#lang-toggle-label { font-size: 11px; font-weight: 700; letter-spacing: 0.02em; }
.lang-flash { position: fixed; top: 16px; right: 16px; z-index: 200; max-width: 320px; box-shadow: 0 12px 32px -8px rgba(0,0,0,0.4); }

.account-menu { position: relative; }
.account-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px 5px 5px;
  cursor: pointer;
  color: var(--text);
}
.account-trigger:hover { border-color: var(--accent); }
.account-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  object-fit: cover;
}
.account-name { font-size: 13px; font-weight: 600; }
.account-chevron { color: var(--text-dim); transition: transform 0.15s ease; }
.account-trigger:has(+ .account-dropdown.open) .account-chevron { transform: rotate(180deg); }

.account-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  min-width: 180px;
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.4);
  z-index: 20;
}
.account-dropdown.open { display: block; }
.account-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}
.account-dropdown a:hover { background: var(--panel-2); text-decoration: none; }
.account-dropdown-divider { height: 1px; background: var(--border); margin: 6px 4px; }
.account-logout { color: var(--danger) !important; }

.content { flex: 1; padding: 32px 40px; max-width: 1100px; }
.content h1 { margin: 0 0 6px; font-size: 32px; }
.subtitle { color: var(--text-dim); margin: 0 0 20px; font-size: 14px; }

/* --- Flash --- */
.flash {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}
.flash-error { background: var(--danger-bg); border: 1px solid var(--danger); color: var(--danger-text); }
.flash-success { background: var(--ok-bg); border: 1px solid var(--accent-2); color: var(--ok-text); }

/* --- Grids / cards --- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 20px 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
.card, .panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.card-label { color: var(--text-dim); font-size: 13px; margin-bottom: 6px; }
.card-big { font-size: 34px; font-weight: 800; }
.card-sub { color: var(--text-dim); font-size: 13px; margin-top: 4px; }
.panel h2 { margin: 0 0 12px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.row-line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; gap: 10px; }
.row-line span:first-child { color: var(--text-dim); }
.mono { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 12px; word-break: break-all; text-align: right; }

/* --- Lists --- */
.activity-list { list-style: none; margin: 0; padding: 0; }
.activity-list li {
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}
.activity-content { color: var(--text); }
.activity-time { color: var(--text-dim); font-size: 12px; margin-left: auto; }

.badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.badge-pending { background: var(--warn-bg); color: var(--warn-text); }
.badge-xp { background: var(--ok-bg); color: var(--ok-text); }

.empty { color: var(--text-dim); font-size: 14px; padding: 10px 0; }

/* --- Table --- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.table th, .table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.table th { color: var(--text-dim); font-weight: 500; font-size: 12px; text-transform: uppercase; }
.table tr.me-row { background: var(--panel-2); }
.table tr.me-row td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

/* --- XP bar --- */
.xp-bar-wrap { margin: -8px 0 20px; }
.xp-bar { height: 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border); overflow: hidden; }
.xp-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }

/* --- Wallet / badges --- */
.wallet-panel .row-line { border-bottom: 1px solid var(--border); }
.wallet-panel .row-line:last-of-type { border-bottom: none; }
.badge-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.badge-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
}
.badge-item { color: var(--text); }
.badge-item .icon { color: var(--accent); }

.topup-form { display: flex; gap: 8px; margin-top: 12px; }
.topup-form input {
  flex: 1;
  min-width: 0;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  font-size: 13px;
}
.mini-btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: var(--accent-contrast);
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.1s ease, opacity 0.1s ease;
}
.mini-btn-accent:active { transform: scale(0.97); }
.mini-btn-accent:hover { opacity: 0.9; }

/* --- Settings --- */
.settings-label { display: block; font-size: 13px; color: var(--text-dim); margin: 12px 0 4px; }
.settings-label:first-child { margin-top: 0; }
.panel input[type="text"], .panel input[type="number"], .panel input[type="password"],
.panel input[type="tel"], .panel textarea {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
.panel textarea { resize: vertical; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.about-video-wrap {
  max-width: 720px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.about-video { display: block; width: 100%; max-height: 480px; background: #000; }

.avatar-row { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.avatar-preview { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-preview-empty {
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-contrast);
  font-size: 24px; font-weight: 700;
}
.avatar-row .inline-row-form { margin-top: 0; }

.input-with-icon { position: relative; flex: 1; min-width: 140px; }
.input-with-icon input { width: 100%; padding-right: 34px !important; }
.input-edit-icon { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; }

.chip-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip-checkbox { cursor: pointer; }
.chip-checkbox input { display: none; }
.chip-checkbox span {
  display: inline-block;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-dim);
}
.chip-checkbox input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
  font-weight: 600;
}

.inline-row-form { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.inline-row-form input { flex: 1; min-width: 140px; }
.mini-btn {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.mini-btn:hover { border-color: var(--accent); }

.verify-row { padding: 12px 0; border-bottom: 1px solid var(--border); }
.verify-row:last-child { border-bottom: none; }
.verify-status { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.verify-done { color: var(--ok-text); }
.verify-done .icon { color: var(--ok-text); }
.verify-pending { color: var(--text-dim); }
.verify-forms { display: flex; flex-direction: column; gap: 8px; }

.promo-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--accent-contrast);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
}
.promo-card-icon { flex-shrink: 0; opacity: 0.85; }
.promo-card-title { font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.promo-card-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.promo-card-list li { display: flex; align-items: center; gap: 6px; }

.settings-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.settings-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-dim);
}
.settings-tab:hover { color: var(--text); text-decoration: none; }
.settings-tab.active { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); font-weight: 600; }

.verify-level { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.verify-level-num {
  font-size: 22px;
  font-weight: 700;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  color: var(--accent);
}

/* --- Hero-баннер (Главная) --- */
/* --- Экран-заставка (клик по лого CSM) --- */
.welcome-screen {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  height: calc(100vh - 130px);
  min-height: 420px;
}
.welcome-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.welcome-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--bg) 0%, rgba(10,10,11,0.5) 40%, rgba(10,10,11,0.15) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}
[data-theme="light"] .welcome-overlay {
  background: linear-gradient(0deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.55) 40%, rgba(255,255,255,0.1) 100%);
}
.hero-banner-eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.hero-banner-title { margin: 0 0 22px; font-size: 44px; font-weight: 800; letter-spacing: -0.01em; color: var(--text); max-width: 680px; line-height: 1.12; }
.hero-cta { box-shadow: 0 6px 24px -6px var(--accent); }

@media (max-width: 600px) {
  .welcome-screen { height: calc(100vh - 110px); }
  .hero-banner-title { font-size: 28px; }
}

/* --- Профиль: баннер + аватар внахлёст --- */
.profile-banner {
  height: 160px;
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse at 30% 30%, var(--accent-2) 0%, transparent 60%),
    linear-gradient(135deg, var(--panel-2), var(--bg) 75%);
  opacity: 1;
  border: 1px solid var(--border);
  position: relative;
  margin-bottom: 56px;
  overflow: visible;
}
[data-theme="light"] .profile-banner { background: linear-gradient(135deg, var(--panel-2), var(--bg) 75%); }
.profile-avatar {
  position: absolute;
  left: 28px;
  bottom: -40px;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  border: 5px solid var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  object-fit: cover;
  font-size: 38px;
  font-weight: 700;
}
.profile-header-info { padding-left: 28px; margin-bottom: 8px; }
.profile-header-info h1 { margin: 0 0 4px; }
.profile-stats { display: flex; gap: 20px; margin-top: 10px; font-size: 14px; color: var(--text-dim); }
.profile-stats b { color: var(--text); font-weight: 700; }

@media (max-width: 600px) {
  .profile-banner { height: 120px; margin-bottom: 48px; }
  .profile-avatar { width: 84px; height: 84px; font-size: 30px; left: 18px; bottom: -34px; }
  .profile-header-info, .profile-stats { padding-left: 18px; }
}

/* --- Главная: новости --- */
.section-title { display: flex; align-items: center; gap: 8px; margin: 32px 0 14px; font-size: 22px; font-weight: 700; }
.news-list { display: flex; flex-direction: column; gap: 10px; }
.news-item { padding: 14px 18px; }
.news-title { font-weight: 600; margin-bottom: 4px; }

/* --- Комнаты --- */
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.room-card { display: flex; flex-direction: column; }
.room-thumb {
  position: relative;
  height: 110px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--panel-2), var(--bg));
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 10px;
}
.room-status-badge { position: absolute; top: 8px; right: 8px; font-weight: 700; letter-spacing: 0.03em; }
.badge-live { background: var(--danger-bg); color: var(--danger-text); }
.room-title { font-weight: 600; font-size: 15px; }
.room-meta { display: flex; justify-content: space-between; color: var(--text-dim); font-size: 13px; margin-top: 8px; }
.room-meta span { display: flex; align-items: center; gap: 4px; }

.room-comments { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.room-comment { font-size: 13px; margin-bottom: 6px; line-height: 1.4; }
.room-comment-user { font-weight: 600; color: var(--accent); }
.room-comments .inline-row-form { margin-top: 8px; }
.room-comments .inline-row-form input { min-width: 0; }

/* --- Модалка входа в комнату --- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  width: 360px;
  max-width: 100%;
}
.modal-card h2 { margin: 0 0 14px; font-size: 17px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

/* --- Tablets: сетки в один столбец, сайдбар превращается в верхнюю панель --- */
@media (max-width: 900px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .shell { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 16px;
  }
  .brand { padding: 0 10px 0 0; }
  .sidebar a { padding: 8px 12px; margin-bottom: 0; }
  .topbar { padding: 12px 16px; }
  .content { padding: 24px; }
}

/* --- Телефоны --- */
@media (max-width: 600px) {
  .content { padding: 16px; }
  .content h1 { font-size: 24px; }
  .card-big { font-size: 24px; }
  .sidebar { padding: 10px 12px; gap: 4px; }
  .topbar { padding: 10px 12px; gap: 8px; }
  .account-name { display: none; }
  .account-trigger { padding: 4px; }
  .wallet-chip span { font-size: 12px; }
  .auth-card, .legal-page { padding: 22px; }
  .row-line { flex-wrap: wrap; }
  .row-line .mono { text-align: left; width: 100%; }
  .table th, .table td { padding: 8px 10px; font-size: 13px; }
}

@media (max-width: 380px) {
  .sidebar a { padding: 7px 9px; font-size: 13px; }
  .brand { font-size: 14px; }
}

/* --- Новости: метка категории --- */
.news-category { margin-left: 8px; font-size: 11px; vertical-align: middle; }

/* --- Fan Passport статус --- */
.passport-status {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 12px; font-size: 13px; font-weight: 600; color: var(--accent);
}

/* --- Co-Creation Voting --- */
.vote-grid { display: flex; flex-direction: column; gap: 16px; }
.vote-card { padding: 18px 20px; }
.vote-title { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.vote-options { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.vote-option { }
.vote-option-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.vote-option-label { font-size: 14px; }
.vote-option-label.mine { font-weight: 700; color: var(--accent); }
.vote-option-pct { font-size: 13px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.vote-bar { height: 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border); overflow: hidden; }
.vote-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.vote-cast-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.vote-weight-hint { color: var(--text-dim); font-size: 12px; margin-top: 10px; }

/* --- Genesis Economy --- */
.genesis-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.genesis-card { display: flex; flex-direction: column; }
.genesis-card-kind { text-transform: uppercase; letter-spacing: 0.04em; font-size: 11px; color: var(--accent); font-weight: 700; }
.genesis-card-title { font-weight: 700; font-size: 16px; margin: 4px 0 6px; }
.genesis-card-price { font-size: 22px; font-weight: 800; margin-top: 10px; }
.genesis-card-stock { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.genesis-purchase-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.genesis-purchase-item { display: flex; justify-content: space-between; font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.genesis-purchase-item:last-child { border-bottom: none; }

/* --- 3D-аватар --- */
.avatar-canvas-wrap {
  width: 100%; max-width: 320px; height: 360px; border-radius: 14px;
  background: radial-gradient(circle at 50% 30%, var(--panel-2), var(--bg) 80%);
  border: 1px solid var(--border); overflow: hidden; margin: 0 auto;
}
.avatar-canvas-hint { text-align: center; color: var(--text-dim); font-size: 12px; margin-top: 8px; }
.avatar-panel-layout { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
@media (max-width: 800px) { .avatar-panel-layout { grid-template-columns: 1fr; } }

.avatar-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 16px; }
.avatar-swatch {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border); cursor: pointer;
  padding: 0; box-sizing: border-box;
}
.avatar-swatch.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-2); }

.avatar-slot-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.avatar-slot-row:last-child { border-bottom: none; }
.avatar-slot-label { font-size: 13px; color: var(--text-dim); min-width: 100px; }
.avatar-slot-row select { flex: 1; }

.avatar-shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 24px; }
.avatar-shop-item { display: flex; flex-direction: column; padding: 16px; }
.avatar-shop-item-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.avatar-shop-item-price { font-size: 18px; font-weight: 800; margin-top: 10px; }
.avatar-shop-item-stock { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
