:root {
  color-scheme: dark;
  --bg: #0b0c0d;
  --bg-2: #121416;
  --bg-3: #1a1b1e;
  --bg-4: #222428;
  --lime: #bbeb00;
  --lime-dim: rgba(187, 235, 0, 0.16);
  --text: #f4f5f6;
  --muted: #a9afb5;
  --muted-2: #7b828a;
  --line: rgba(255, 255, 255, 0.06);
  --glass: rgba(169, 175, 181, 0.12);
  --danger: #ff4d4f;
  --radius: 12px;
  --radius-s: 8px;
  --rail: 56px;
  --side: 212px;
  --top: 64px;
  --tabbar: 72px;
  --font: Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); }
body { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.shell {
  display: grid;
  grid-template-columns: var(--rail) var(--side) minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}
.rail, .sidebar { background: #0e1012; border-right: 1px solid var(--line); min-height: 0; }
.rail { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; }
.sidebar {
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 10px 24px;
  overflow: auto;
}
.rail-btn, .nav-item {
  display: flex; align-items: center; gap: 10px;
  border: 0; border-radius: var(--radius-s); color: var(--muted); background: transparent;
}
.rail-btn { width: 40px; height: 40px; flex: 0 0 40px; justify-content: center; background: var(--bg-3); }
.rail-btn.is-on { background: var(--lime); color: #111; }
.nav-item {
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
}
.nav-item:hover { background: var(--glass); color: var(--text); }
.nav-item.is-active {
  color: var(--lime);
  background: var(--lime-dim);
  box-shadow: inset 3px 0 0 var(--lime);
}
.nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.nav-label { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); padding: 4px 12px 2px; font-weight: 700; }
.stage { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.topbar {
  min-height: var(--top);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  flex: 0 0 auto;
}
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 800; }
.brand-mark { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--lime); color: #111; }
.brand-word { letter-spacing: .04em; }
.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.top-actions form { margin: 0; }
.btn { height: 44px; padding: 0 16px; border: 0; border-radius: var(--radius-s); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.btn-ghost { background: var(--glass); color: var(--text); }
.btn-lime { background: var(--lime); color: #111; }
.btn-lime:disabled { opacity: .45; cursor: not-allowed; }
.btn-block { width: 100%; }
.main { flex: 1; min-height: 0; overflow: auto; padding: 8px 20px 28px; }
.hero-board { display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 12px; }
.hero-card, .promo, .account-card, .trust article, .auth-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
}
.hero-card { background: radial-gradient(120% 120% at 0% 0%, rgba(187,235,0,.28), transparent 45%), var(--bg-3); }
.hero-card h1, .page-head h1 { margin: 8px 0; font-size: 32px; overflow-wrap: anywhere; }
.badge { display: inline-flex; align-items: center; align-self: flex-start; width: auto; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--lime); color: #111; font-size: 11px; font-weight: 800; }
.hero-slider { position: relative; overflow: hidden; border-radius: var(--radius); }
.hero-track { display: flex; transition: transform .35s ease; }
.hero-slide { flex: 0 0 100%; min-width: 0; }
.hero-nav { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; }
.hero-nav button, .row-nav button {
  width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: rgba(16, 17, 20, .72); color: var(--text);
}
.chips { display: flex; gap: 8px; margin: 16px 0 0; overflow: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button {
  height: 36px; padding: 0 14px; border: 0; border-radius: 10px;
  background: #1a1c20; color: var(--muted); white-space: nowrap;
}
.chips button.is-on { background: var(--lime); color: #111; }
.row-head { display: flex; justify-content: space-between; align-items: center; margin: 22px 0 10px; }
.row-head h2 { margin: 0; font-size: 18px; }
.row-nav { display: flex; align-items: center; gap: 8px; }
.tile-scroller { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.tile-scroller::-webkit-scrollbar { display: none; }
.tile-scroller .tile { flex: 0 0 168px; scroll-snap-align: start; }
.shelf.is-hidden { display: none; }
.tile-grid, .account-grid, .trust { display: grid; gap: 12px; }
.tile-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.account-grid, .trust { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; }
.tile { display: flex; flex-direction: column; gap: 8px; }
.tile-art { display: block; aspect-ratio: 3/4; border-radius: var(--radius); background: linear-gradient(160deg, #2a2d12, #121416 60%); border: 1px solid var(--line); }
.tile-art[data-tone="1"] { background: linear-gradient(160deg, #243018, #121416 62%); }
.tile-art[data-tone="2"] { background: linear-gradient(160deg, #1c2830, #121416 62%); }
.tile-art[data-tone="3"] { background: linear-gradient(160deg, #302418, #121416 62%); }
.tile-name { font-size: 13px; font-weight: 700; }
.dev-note, .page-head p, .promo p, .account-card p, .trust p { color: var(--muted); line-height: 1.45; }
.form-error { background: rgba(255,77,79,.12); color: #ffb4b4; border-radius: var(--radius-s); padding: 10px 12px; }
.auth-card { max-width: 420px; display: grid; gap: 12px; }
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(0, 0, 0, .72);
}
.reg-modal {
  display: grid;
  grid-template-columns: minmax(280px, 42%) minmax(0, 58%);
  width: min(920px, 100%);
  height: auto;
  background: #16181c;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
}
.reg-promo { min-height: 560px; background: #101114; }
.reg-promo img { width: 100%; height: 100%; min-height: 560px; object-fit: cover; display: block; }
.reg-form { padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 10px; overflow: visible; }
.reg-head { display: flex; align-items: center; justify-content: space-between; }
.reg-head h1 { margin: 0; font-size: 28px; }
.reg-head a { width: 32px; height: 32px; display: grid; place-items: center; color: var(--muted); font-size: 28px; }
.reg-form form { display: grid; gap: 10px; }
.reg-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 12px;
  border-radius: 10px;
  background: #101114;
  border: 1px solid var(--line);
}
.reg-field input, .reg-field select {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 12px 0;
  outline: none;
}
.phone-box {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding-right: 12px;
  border-radius: 12px;
  background: #101114;
  border: 1px solid var(--line);
}
.phone-flag {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 10px 0 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
}
.phone-flag img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; display: block; }
.phone-plus { color: var(--text); margin-right: 4px; }
.phone-box input[type="tel"] {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 12px 0;
  outline: none;
}
.country-dialog {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .45);
}
.country-dialog[hidden] { display: none; }
.country-sheet {
  width: min(420px, 100%);
  max-height: min(520px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  background: #1c1e22;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  overflow: hidden;
}
.country-sheet input {
  margin: 12px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #101114;
  color: var(--text);
  padding: 0 12px;
}
.country-sheet ul { margin: 0; padding: 0 8px 8px; list-style: none; overflow: auto; }
.country-sheet li[hidden] { display: none; }
.country-sheet button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 10px;
  border-radius: 8px;
  text-align: left;
}
.country-sheet button img { width: 22px; height: 16px; object-fit: cover; border-radius: 2px; }
.country-sheet .dial { margin-left: auto; color: var(--muted); }
.country-sheet button:hover { background: rgba(187, 235, 0, .16); }
.field-error { margin: -4px 0 0; color: #ffb4b4; font-size: 12px; line-height: 1.35; }
.social-note { margin: 0; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.35; }
.promo-toggle {
  height: 46px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, .18);
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.pick-btn .pick-label { flex: 1; text-align: left; }
.pick-btn .field-ico { color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 14px; line-height: 1.35; }
.check input {
  appearance: none;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin: 1px 0 0;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: #101114;
}
.check input:checked {
  background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23111' stroke-width='3' stroke-linecap='round' d='m5 12 5 5 9-9'/%3E%3C/svg%3E") center / 14px no-repeat;
  border-color: var(--lime);
}
.check a { color: var(--text); }
.pick { position: relative; }
.pick-btn { width: 100%; justify-content: space-between; cursor: pointer; }
.pick-list {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 220px;
  overflow-x: hidden;
  overflow-y: auto;
  background: #1c1e22;
  color: #f4f5f6;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}
.phone-row .pick-list { width: 260px; right: auto; }
.pick-list button {
  width: 100%;
  white-space: nowrap;
  text-align: left;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #f4f5f6;
  padding: 10px 12px;
}
.pick-list button:hover,
.pick-list button.is-on { background: rgba(187, 235, 0, .18); }
.promo-fold { color: var(--muted); }
.promo-fold summary { cursor: pointer; padding: 8px 0; }
.field-ico { display: grid; color: var(--muted); flex: 0 0 auto; }
.login-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: #101114;
  border: 1px solid var(--line);
}
.login-switch button {
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #c8ccd2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
}
.login-switch button.is-on { background: #2c3036; color: #fff; }
.login-switch svg { display: block; }
.reg-form form.login-stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.login-stack .btn-block { margin-top: auto; height: 48px; border-radius: 10px; }
.forgot { color: var(--lime); font-weight: 700; font-size: 14px; width: fit-content; }
.form-note { background: var(--lime-dim); color: var(--text); border-radius: var(--radius-s); padding: 10px 12px; }
.switch-auth a { color: var(--lime); }
.social-split { margin: 4px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.social-row { display: flex; justify-content: center; align-items: center; gap: 12px; }
.social-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--line); background: #101114; font-weight: 800;
}
.auth-card label, .auth-tabs { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.auth-card input, .auth-card textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px; color: var(--text);
}
.auth-tabs { grid-auto-flow: column; }
.auth-tabs a { text-align: center; padding: 8px; border-radius: var(--radius-s); }
.auth-tabs a.is-on { background: var(--lime-dim); color: var(--lime); }
.account-card dl { margin: 0; display: grid; gap: 8px; }
.account-card dt { color: var(--muted-2); font-size: 12px; }
.account-card dd { margin: 0; }
.site-foot { margin: 28px 0 8px; color: var(--muted-2); font-size: 13px; }
.impersonation-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--lime-dim); }
.menu-mobile, .tabbar, .nav-backdrop { display: none; }
.nav-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 35; }
@media (max-width: 980px) {
  body { overflow: auto; }
  .shell { display: block; height: auto; min-height: 100%; }
  .menu-mobile { display: grid; }
  .rail { display: none; }
  .sidebar { display: none; }
  .sidebar.is-open {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 86vw);
    z-index: 40;
    padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom));
  }
  .nav-backdrop.is-open { display: block; }
  .stage { min-height: 100vh; }
  .main { overflow: visible; padding: 8px 16px calc(var(--tabbar) + 24px + env(safe-area-inset-bottom)); }
  .hero-board, .tile-grid, .account-grid, .trust { grid-template-columns: 1fr 1fr; }
  .tabbar {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: calc(var(--tabbar) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: #121314;
    border-top: 1px solid var(--line);
    z-index: 50;
  }
  .tab {
    display: grid;
    place-items: center;
    min-width: 0;
    padding: 0 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
  }
  .tab.is-on { color: var(--lime); }
}
@media (max-width: 640px) {
  .hero-board, .tile-grid, .account-grid, .trust { grid-template-columns: 1fr; }
  .topbar { gap: 8px; padding: 8px 12px; }
  .top-actions .btn { height: 40px; padding: 0 12px; }
  .hero-card h1, .page-head h1 { font-size: 28px; }
  .auth-overlay { padding: 0; align-items: stretch; }
  .reg-modal { width: 100%; height: auto; max-height: none; border-radius: 0; grid-template-columns: 1fr; }
  .reg-promo, .reg-promo img { height: 168px; min-height: 168px; }
}
