/* ════════════════════════════════════════════════════════════
   VeloXFiles — strict mono theme
════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-app:          #0a0a0b;
  --bg-section:      rgba(255,255,255,0.02);
  --bg-hover:        rgba(255,255,255,0.06);
  --bg-input:        rgba(255,255,255,0.03);
  --bg-elev:         #0f0f12;
  --border:          rgba(255,255,255,0.06);
  --border-strong:   rgba(255,255,255,0.13);
  --text-primary:    #d0d0d8;
  --text-secondary:  #a0a0a8;
  --text-muted:      #505058;
  --text-faint:      #303038;
  --btn-primary:     #1a1a20;
  --btn-primary-h:   #24242c;
  --btn-ghost:       rgba(255,255,255,0.04);
  --btn-ghost-h:     rgba(255,255,255,0.08);
  --danger:          #c42b1c;
  --warn:            #b8923a;
  --ok:              #6f8f6f;
  --font-ui:         'Inter', system-ui, sans-serif;
  --font-mono:       'JetBrains Mono', 'Consolas', monospace;
  --radius:          6px;
  --radius-lg:       10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
body {
  background: var(--bg-app);
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
::selection { background: rgba(255,255,255,0.14); color: #fff; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }
::-webkit-scrollbar-track { background: transparent; }

/* ── Moving particles canvas ── */
#bg { position: fixed; inset: 0; z-index: -2; pointer-events: none; }
.glow { position: fixed; z-index: -1; pointer-events: none; width: 60vw; height: 60vw; left: 20vw; top: -30vw; background: radial-gradient(circle, rgba(255,255,255,.04), transparent 60%); }
/* legacy starfield (если осталось на странице) */
.starfield { display: none; }

/* ── Splash screen ── */
#splash {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 42%, #14161d 0%, var(--bg-app) 68%);
}
#splash.hide { opacity: 0; visibility: hidden; transition: opacity .5s ease-out, visibility .5s ease-out; pointer-events: none; }
.splash-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; animation: splashPulse 2.2s ease-in-out infinite; }
.splash-logo { width: 76px; height: 76px; object-fit: contain; filter: drop-shadow(0 0 22px rgba(255,255,255,.35)); }
.splash-word { font-size: clamp(34px, 6vw, 52px); font-weight: 800; letter-spacing: -.03em; color: #fff; line-height: 1; text-shadow: 0 0 16px rgba(255,255,255,.35); }
.splash-word span { position: relative; }
.splash-word span::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: rgba(255,255,255,.55); border-radius: 2px; }
.splash-tag { font-size: 11px; text-transform: uppercase; letter-spacing: .26em; color: var(--text-muted); }
.splash-bar { width: 150px; height: 2px; border-radius: 2px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 8px; }
.splash-bar > i { display: block; height: 100%; width: 40%; background: rgba(255,255,255,.55); border-radius: 2px; animation: splashSweep 1.1s ease-in-out infinite; }
@keyframes splashPulse { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.035); opacity: 1; } }
@keyframes splashSweep { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }
@media (prefers-reduced-motion: reduce) { .splash-inner { animation: none; } .splash-bar > i { animation-duration: 2s; } }

/* ── Icons ── */
.icon { width: 16px; height: 16px; object-fit: contain; opacity: .55; vertical-align: middle; transition: opacity .12s; }
.icon-lg { width: 22px; height: 22px; }
.icon-xl { width: 40px; height: 40px; opacity: .4; }
.icon-sm { width: 13px; height: 13px; }
a:hover .icon, button:hover .icon, .file-item:hover .icon { opacity: .85; }

/* ── Eyebrow / section labels ── */
.eyebrow, .section-label {
  font-size: 9px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted); display: flex; align-items: center; gap: 7px;
}

/* ── Topbar ── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 0 26px; height: 56px;
  background: rgba(10,10,11,0.38);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand .wordmark { font-weight: 700; font-size: 14px; letter-spacing: 0.04em; color: var(--text-primary); }
.brand .wordmark b { color: #fff; font-weight: 700; }
.nav { display: flex; gap: 22px; }
.nav a { font-size: 12px; font-weight: 500; color: var(--text-muted); transition: color .12s; }
.nav a:hover { color: var(--text-primary); }
.auth-area { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: var(--font-ui); font-size: 12px; font-weight: 600;
  padding: 8px 14px; border-radius: var(--radius); cursor: pointer;
  border: 1px solid var(--border); background: var(--btn-ghost); color: var(--text-secondary);
  transition: background .12s, color .12s, border-color .12s, transform .12s ease;
  transform-style: preserve-3d; will-change: transform;
}
.btn:hover:not(:disabled) { background: var(--btn-ghost-h); border-color: var(--border-strong); color: var(--text-primary); }
.btn.primary { background: var(--btn-primary); border-color: var(--border-strong); color: var(--text-primary); }
.btn.primary:hover:not(:disabled) { background: var(--btn-primary-h); color: #fff; }
.btn.big { padding: 11px 20px; font-size: 13px; }
.btn.small { padding: 6px 11px; font-size: 11px; }
.btn.full { width: 100%; }
.btn.danger:hover:not(:disabled) { background: rgba(196,43,28,0.14); border-color: rgba(196,43,28,0.5); color: #e0857c; }
.btn:disabled { opacity: .35; cursor: not-allowed; }

/* ── Layout ── */
main { max-width: 1040px; margin: 0 auto; padding: 0 26px 90px; }
section { margin-top: 64px; scroll-margin-top: 80px; }
.panel { background: var(--bg-section); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
h1, h2, h3 { color: var(--text-primary); font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: 20px; }
h3 { font-size: 14px; }

/* ── Hero ── */
.hero { padding: 86px 0 28px; max-width: 720px; }
.hero .eyebrow { margin-bottom: 20px; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 700; line-height: 1.08; color: #fff; letter-spacing: -0.03em; }
.hero h1 .dim { color: var(--text-muted); }
.hero p { color: var(--text-secondary); font-size: 15px; margin-top: 20px; max-width: 560px; }
.hero-cta { display: flex; gap: 10px; margin-top: 30px; }
.hero-meta { display: flex; gap: 26px; margin-top: 46px; flex-wrap: wrap; }
.hero-meta .m { display: flex; flex-direction: column; gap: 3px; }
.hero-meta .m b { font-size: 18px; color: var(--text-primary); font-weight: 600; font-family: var(--font-mono); }
.hero-meta .m span { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); }

/* ── Upload ── */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 20px; }
.vis-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 20px; }
.vis-opt input { position: absolute; opacity: 0; pointer-events: none; }
.vis-card {
  border: 1px solid var(--border); background: var(--bg-input); border-radius: var(--radius);
  padding: 16px; cursor: pointer; transition: border-color .12s, background .12s; height: 100%;
}
.vis-card:hover { border-color: var(--border-strong); }
.vis-opt input:checked + .vis-card { border-color: var(--border-strong); background: var(--bg-hover); }
.vis-opt input:checked + .vis-card .vis-check { opacity: 1; }
.vis-top { display: flex; align-items: center; justify-content: space-between; }
.vis-check { opacity: 0; font-family: var(--font-mono); font-size: 10px; color: var(--text-primary); transition: opacity .12s; }
.vis-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin: 10px 0 4px; }
.vis-desc { font-size: 11px; color: var(--text-muted); line-height: 1.5; }
.vis-desc code { font-family: var(--font-mono); font-size: 10px; background: var(--bg-hover); padding: 1px 5px; border-radius: 3px; color: var(--text-secondary); }

.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 34px;
  text-align: center; cursor: pointer; background: var(--bg-input); transition: border-color .12s, background .12s;
}
.dropzone:hover, .dropzone.drag { border-color: rgba(255,255,255,0.28); background: var(--bg-hover); }
.dropzone.disabled { opacity: .4; pointer-events: none; }
.dz-title { font-size: 13px; color: var(--text-primary); font-weight: 500; }
.dz-sub { font-size: 11px; color: var(--text-muted); }

.progress { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.progress .track { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.06); overflow: hidden; }
.progress .track::after { content: ''; display: block; height: 100%; width: var(--p, 0%); background: var(--text-secondary); transition: width .2s; }
.progress .pct { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); min-width: 90px; text-align: right; }

/* ── File lists ── */
.file-list { display: flex; flex-direction: column; }
.file-item {
  display: flex; align-items: center; gap: 13px; padding: 13px 4px;
  border-bottom: 1px solid var(--border); transition: background .1s;
}
.file-item:last-child { border-bottom: none; }
.file-item:hover { background: var(--bg-hover); }
.fi-main { flex: 1; min-width: 0; }
.fi-name { font-size: 13px; color: var(--text-primary); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fi-meta { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); margin-top: 2px; }
.fi-actions { display: flex; gap: 14px; flex-shrink: 0; }
.txt-link { font-size: 11px; font-weight: 500; color: var(--text-muted); cursor: pointer; background: none; border: none; font-family: var(--font-ui); padding: 0; transition: color .12s; }
.txt-link:hover { color: var(--text-primary); }
.txt-link.danger:hover { color: #e0857c; }

.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.file-card { border: 1px solid var(--border); background: var(--bg-input); border-radius: var(--radius); padding: 15px; transition: border-color .12s; }
.file-card:hover { border-color: var(--border-strong); }
.fc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.fc-name { font-size: 13px; color: var(--text-primary); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-meta { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); margin-top: 3px; }
.fc-actions { display: flex; gap: 14px; margin-top: 12px; }

.tag { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; padding: 2px 7px; border-radius: 3px; border: 1px solid var(--border); color: var(--text-muted); }
.tag.warn { color: var(--warn); border-color: rgba(184,146,58,0.35); }

/* ── Key redeem ── */
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; }

/* ── Feature grid ── */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.feature { border: 1px solid var(--border); background: var(--bg-section); border-radius: var(--radius); padding: 20px; }
.feature .icon { margin-bottom: 12px; }
.feature h3 { margin-bottom: 6px; }
.feature p { font-size: 12px; color: var(--text-muted); }

/* ── Inputs ── */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 7px; }
/* Покрываем ВСЕ текстовые поля (в т.ч. без type и type=number) + select + textarea */
input:not([type=checkbox]):not([type=radio]):not([type=file]),
select, textarea, .inp {
  width: 100%; padding: 11px 13px; font-family: var(--font-ui); font-size: 13px;
  background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text-primary); transition: border-color .12s;
  -webkit-appearance: none; appearance: none;
}
/* стрелка для select */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0a8' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; cursor: pointer;
}
/* выпадающий список select (нативный) — тёмные опции */
select option { background: var(--bg-elev); color: var(--text-primary); }
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--border-strong); }
input:disabled { color: var(--text-muted); opacity: .7; }
/* убрать спиннеры у number */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

/* ── Modal ── */
.modal-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); animation: fade .15s ease; }
.modal { position: relative; width: min(380px, 92vw); background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: 12px; padding: 26px; box-shadow: 0 24px 80px rgba(0,0,0,0.8); }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; cursor: pointer; padding: 4px; }
.tabs { display: flex; gap: 4px; background: var(--bg-input); padding: 4px; border-radius: var(--radius); margin-bottom: 22px; }
.tab { flex: 1; padding: 8px; border: none; border-radius: 4px; background: none; color: var(--text-muted); font-weight: 600; font-size: 12px; cursor: pointer; font-family: var(--font-ui); transition: background .12s, color .12s; }
.tab.active { background: var(--btn-primary); color: var(--text-primary); }
.form-hint { font-size: 11px; color: var(--text-muted); margin-bottom: 16px; }
.checkrow { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--text-secondary); margin-bottom: 14px; cursor: pointer; }
.checkrow input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--text-primary); cursor: pointer; flex-shrink: 0; }
.checkrow a { color: var(--text-primary); text-decoration: underline; }

/* ── User chip ── */
.user-chip { display: flex; align-items: center; gap: 9px; padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-input); }
.user-chip .uname { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.user-chip .chip-av { width: 20px; height: 20px; border-radius: 6px; object-fit: cover; }
.user-chip .urole { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }
.user-chip .urole.admin { color: var(--text-primary); }

/* ── Toasts ── */
.toasts { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 9px; padding: 12px 15px; min-width: 240px; max-width: 360px; background: var(--bg-elev); border: 1px solid var(--border-strong); border-left: 2px solid var(--text-muted); border-radius: var(--radius); font-size: 12px; color: var(--text-primary); box-shadow: 0 12px 40px rgba(0,0,0,0.6); animation: slidein .22s ease; }
.toast.ok { border-left-color: var(--ok); }
.toast.warn { border-left-color: var(--warn); }
.toast.bad { border-left-color: var(--danger); }
@keyframes slidein { from { transform: translateX(110%); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

/* ── Footer ── */
.footer { max-width: 1040px; margin: 60px auto 0; padding: 22px 26px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--text-muted); }
.footer .mono { font-family: var(--font-mono); }

.muted { color: var(--text-muted); }
.hidden { display: none !important; }

/* ── Соцсеть: посты ── */
textarea { width: 100%; padding: 12px 13px; font-family: var(--font-ui); font-size: 13px; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-primary); resize: vertical; }
textarea:focus { outline: none; border-color: var(--border-strong); }
.post { display: flex; gap: 12px; border: 1px solid var(--border); background: var(--bg-section); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 12px; }
.post-av { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.post-main { flex: 1; min-width: 0; }
.post-head { display: flex; align-items: center; gap: 8px; }
.post-author { font-weight: 700; color: var(--text-primary); }
.post-time { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); }
.post-body { color: var(--text-secondary); margin-top: 6px; white-space: pre-wrap; word-break: break-word; }
.post-file { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--text-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 10px; }
.post-reacts { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.react { font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-input); color: var(--text-secondary); cursor: pointer; transition: border-color .12s, background .12s; }
.react:hover { border-color: var(--border-strong); }
.react.on { border-color: var(--text-muted); background: var(--bg-hover); color: var(--text-primary); }

/* ── Соцсеть: мессенджер ── */
.msg-layout { display: grid; grid-template-columns: 280px 1fr; gap: 16px; }
.msg-list { padding: 0; max-height: 70vh; overflow-y: auto; }
.convo { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.convo:hover { background: var(--bg-hover); }
.convo.active { background: var(--bg-hover); }
.convo-name { font-size: 13px; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 6px; }
.convo-last { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge-unread { background: var(--danger); color: #fff; font-size: 9px; border-radius: 999px; padding: 1px 6px; }
.msg-thread { display: flex; flex-direction: column; height: 70vh; padding: 0; }
.thread-head { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.thread-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.thread-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.thread-input input { flex: 1; }
.bubble { max-width: 75%; padding: 8px 12px; border-radius: 12px; background: var(--bg-input); border: 1px solid var(--border); align-self: flex-start; }
.bubble.mine { align-self: flex-end; background: var(--btn-primary); border-color: var(--border-strong); }
.bubble-text { font-size: 13px; color: var(--text-primary); white-space: pre-wrap; word-break: break-word; }
.bubble-time { font-family: var(--font-mono); font-size: 9px; color: var(--text-muted); margin-top: 3px; text-align: right; }

/* ── Соцсеть: друзья ── */
.frow { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.frow:last-child { border-bottom: none; }

/* фон-превью в профиле */
.bg-preview { height: 90px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-input) center/cover no-repeat; }

/* ── Кроппер изображений ── */
.crop-modal { width: auto; }
.crop-view { overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border-strong); background: #000; position: relative; cursor: grab; touch-action: none; }
.crop-view:active { cursor: grabbing; }
.crop-img { position: absolute; top: 0; left: 0; user-select: none; -webkit-user-drag: none; will-change: transform; }
.crop-controls { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.crop-controls input[type=range] { flex: 1; accent-color: var(--text-primary); }

/* ── Карточка профиля (общая для /profile и /u/:ник) ── */
.pcard { position: relative; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-section); }
.pcard-banner { height: 200px; background: radial-gradient(120% 160% at 20% 0%, #1a1d27 0%, #0c0d12 70%); background-size: cover; background-position: center; border-bottom: 1px solid var(--border); }
.pcard-body { padding: 0 26px 24px; margin-top: -46px; position: relative; }
.pavatar { width: 92px; height: 92px; border-radius: 20px; border: 3px solid var(--bg-app); object-fit: cover; background: var(--bg-input); box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.pname { font-size: 26px; font-weight: 800; color: #fff; margin-top: 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pbadges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pbadge { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-secondary); }
.pbadge.role { color: #fff; border-color: rgba(255,255,255,.3); }
.pstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap: 14px; margin-top: 22px; }
.pstat { border: 1px solid var(--border); background: var(--bg-input); border-radius: var(--radius); padding: 16px; }
.pstat b { font-family: var(--font-mono); font-size: 22px; color: var(--text-primary); display: block; }
.pstat span { font-size: 9px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-muted); }

@media (max-width: 680px) { .msg-layout { grid-template-columns: 1fr; } .msg-thread { height: 60vh; } }

/* ── Профиль ── */
.prof-row { display: flex; gap: 16px; align-items: center; margin-bottom: 22px; }
.avatar-box { width: 72px; height: 72px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border-strong); background: var(--bg-input); flex-shrink: 0; }
.avatar-box img { width: 100%; height: 100%; object-fit: cover; }
.prof-name { font-size: 16px; color: var(--text-primary); }
.prof-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 26px; height: 26px; border-radius: 7px; cursor: pointer; border: 2px solid transparent; transition: transform .12s, border-color .12s; }
.swatch:hover { transform: scale(1.12); }
.swatch.active { border-color: #fff; }
.swatch.reset { display: grid; place-items: center; background: var(--bg-input); border: 1px solid var(--border-strong); color: var(--text-muted); font-size: 14px; }
.gbox { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
@media (max-width: 680px) { .prof-grid { grid-template-columns: 1fr; } }

/* ── brand as link ── */
a.brand { text-decoration: none; }

/* ── chips in topbar ── */
.balance-chip { display: flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-input); font-family: var(--font-mono); font-size: 12px; color: var(--text-primary); transition: border-color .12s; }
.balance-chip:hover { border-color: var(--border-strong); }
.nav a.active { color: var(--text-primary); }

/* ── page header ── */
.page-head { padding: 70px 0 26px; }
.page-head h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.page-head p { color: var(--text-secondary); margin-top: 10px; max-width: 560px; }

/* ── usage bar ── */
.usage { display: flex; flex-direction: column; gap: 10px; }
.usage-top { display: flex; align-items: baseline; justify-content: space-between; }
.usage-top .big { font-family: var(--font-mono); font-size: 22px; color: var(--text-primary); }
.usage-bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,0.06); overflow: hidden; }
.usage-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--text-muted), var(--text-primary)); transition: width .4s ease; }
.usage-bar.warn > i { background: linear-gradient(90deg, #8a6a2a, var(--warn)); }
.usage-bar.full > i { background: linear-gradient(90deg, #7a2a22, var(--danger)); }
.meta-row { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 6px; }
.meta-row .m { display: flex; flex-direction: column; gap: 2px; }
.meta-row .m b { font-family: var(--font-mono); font-size: 15px; color: var(--text-primary); }
.meta-row .m span { font-size: 9px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); }

/* ── tier / store cards ── */
.tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px; }
.tier-card { border: 1px solid var(--border); background: var(--bg-section); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 14px; transition: border-color .15s, transform .15s; }
.tier-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.tier-card.current { border-color: var(--text-muted); }
.tier-card .t-name { font-size: 16px; font-weight: 700; color: #fff; display: flex; align-items: center; justify-content: space-between; }
.tier-card .t-gb { font-family: var(--font-mono); font-size: 30px; color: var(--text-primary); }
.tier-card .t-gb span { font-size: 13px; color: var(--text-muted); }
.tier-card .t-perk { font-size: 12px; color: var(--text-muted); flex: 1; }
.tier-card .t-price { font-family: var(--font-mono); font-size: 14px; color: var(--text-secondary); }
.tier-card .t-price b { color: var(--text-primary); }

/* ── search + pagination ── */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; }
.search { display: flex; align-items: center; gap: 8px; flex: 1; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-input); padding: 0 12px; }
.search input { border: none; background: none; padding: 11px 0; }
.search input:focus { border: none; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 24px; }
.pager .pinfo { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }

/* ── store layout ── */
.store-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.bonus-box { display: flex; align-items: center; gap: 14px; border: 1px solid var(--border); background: var(--bg-input); border-radius: var(--radius); padding: 14px 18px; }
.bonus-box .b-amt { font-family: var(--font-mono); font-size: 18px; color: var(--text-primary); }

/* ── dashboard ── */
.dash-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.kv { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--text-muted); }
.kv .v { color: var(--text-primary); font-family: var(--font-mono); }

@media (max-width: 680px) {
  .nav { display: none; }
  .vis-row { grid-template-columns: 1fr; }
  .hero { padding-top: 56px; }
}
