/* Палитра взята из игрового интерфейса Roblox: сайт и игра должны читаться
   как один продукт, а не как два разных проекта. */
:root {
    --bg: #0a0f1a;
    --panel: #161f32;
    --panel-2: #1f2b44;
    --line: rgba(255, 255, 255, 0.07);
    --text: #f3f7ff;
    --muted: #9dabc6;
    --accent: #715cff;
    --accent-soft: #8f7dff;
    --good: #37d69f;
    --warn: #ffb84d;
    --danger: #ff5c74;
    --radius: 18px;
    --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
}

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

/* Атрибут `hidden` работает через стиль браузера, а любой наш класс с
   `display` его перебивает — авторские стили всегда сильнее браузерных.
   Из-за этого скрытые кнопка и плашка пользователя оставались на экране.
   Одна строка закрывает это раз и навсегда. */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
.muted { color: var(--muted); }

/* --- Фон -------------------------------------------------------------- */

.aurora {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    display: block;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    will-change: transform;
}

.blob-1 { width: 46vw; height: 46vw; left: -8vw; top: -12vw; background: #5b3fff; }
.blob-2 { width: 38vw; height: 38vw; right: -6vw; top: 10vh; background: #1f7bff; opacity: 0.38; }
.blob-3 { width: 34vw; height: 34vw; left: 30vw; bottom: -16vw; background: #b14bff; opacity: 0.3; }

/* Плёнка зерна снимает «пластиковость» больших размытых пятен. */
.grain {
    position: absolute;
    inset: -200%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
    opacity: 0.035;
    mix-blend-mode: overlay;
}

/* --- Шапка ------------------------------------------------------------ */

/* Три колонки, а не флекс: вкладки должны стоять ровно по центру экрана.
   При флексе они центрируются в остатке между логотипом и кнопкой входа,
   а те разной ширины — и середина уезжает влево. */
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    padding: 14px clamp(16px, 4vw, 40px);
    backdrop-filter: blur(18px);
    background: linear-gradient(to bottom, rgba(10, 15, 26, 0.88), rgba(10, 15, 26, 0.55));
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    letter-spacing: -0.02em;
    cursor: pointer;
}

/* Знак — аватар бота, тот же файл, что и значок вкладки. Скругление
   кружком: квадратная картинка в шапке смотрится инородно. */
.brand-mark {
    display: block;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 24px -12px var(--accent);
}

.brand-dim { color: var(--muted); font-weight: 500; }

.tabs {
    position: relative;
    display: flex;
    gap: 4px;
    justify-self: center;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
}

.tab {
    position: relative;
    z-index: 1;
    padding: 8px 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
    white-space: nowrap;
}

.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); }

.tab-glow {
    position: absolute;
    z-index: 0;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    border-radius: 999px;
    background: linear-gradient(140deg, rgba(113, 92, 255, 0.9), rgba(74, 125, 255, 0.75));
    box-shadow: 0 8px 22px -12px var(--accent);
    pointer-events: none;
}

.account { display: flex; align-items: center; justify-content: flex-end; gap: 10px; justify-self: end; }
.brand { justify-self: start; }

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 8px 5px 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    font-weight: 600;
    font-size: 14px;
}

.user-chip img { border-radius: 50%; display: block; }

.btn-ghost {
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 15px;
    padding: 2px 6px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.btn-ghost:hover { color: var(--danger); background: rgba(255, 92, 116, 0.12); }

/* --- Кнопки ----------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 20px;
    border: 1px solid transparent;
    border-radius: 12px;
    font: inherit;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
    will-change: transform;
}

.btn-primary { background: linear-gradient(140deg, var(--accent), #4a7dff); box-shadow: 0 16px 34px -18px var(--accent); }
.btn-discord { background: #5865f2; box-shadow: 0 16px 34px -18px #5865f2; }
.btn-quiet { background: rgba(255, 255, 255, 0.06); border-color: var(--line); }
.btn-quiet:hover { background: rgba(255, 255, 255, 0.1); }

/* --- Разделы ---------------------------------------------------------- */

main {
    flex: 1;
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: clamp(28px, 5vw, 64px) clamp(16px, 4vw, 40px) 64px;
}

.view { display: none; }
.view.is-active { display: block; }

.view-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.view-head h2 { font-size: clamp(26px, 4vw, 34px); }

/* --- Главная ---------------------------------------------------------- */

.hero { max-width: 760px; }

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-soft);
    margin-bottom: 18px;
}

.hero-title {
    font-size: clamp(38px, 7vw, 74px);
    font-weight: 800;
    margin-bottom: 22px;
}

.hero-title .line { display: block; }
.hero-title em {
    font-style: normal;
    background: linear-gradient(120deg, var(--accent-soft), #58c8ff 60%, var(--good));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-text { color: var(--muted); font-size: clamp(16px, 2vw, 19px); max-width: 56ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.auth-note {
    margin-top: 18px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 184, 77, 0.3);
    background: rgba(255, 184, 77, 0.08);
    color: var(--warn);
    font-size: 14px;
    max-width: 56ch;
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-top: clamp(40px, 7vw, 76px);
}

.stat {
    padding: 20px 22px;
    border-radius: var(--radius);
    background: linear-gradient(160deg, rgba(31, 43, 68, 0.75), rgba(22, 31, 50, 0.55));
    border: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

.stat-label { display: block; color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.stat-value { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; }

/* --- Карточки --------------------------------------------------------- */

.card {
    padding: 24px;
    border-radius: var(--radius);
    background: linear-gradient(160deg, rgba(31, 43, 68, 0.7), rgba(22, 31, 50, 0.5));
    border: 1px solid var(--line);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
    will-change: transform;
}

.gate {
    max-width: 460px;
    margin: 40px auto;
    padding: 34px;
    text-align: center;
    border-radius: var(--radius);
    background: linear-gradient(160deg, rgba(31, 43, 68, 0.7), rgba(22, 31, 50, 0.5));
    border: 1px solid var(--line);
}

.gate h2 { font-size: 24px; margin-bottom: 10px; }
.gate p { color: var(--muted); margin-bottom: 22px; }

/* --- Профиль ---------------------------------------------------------- */

.profile { display: grid; gap: 16px; }

/* Карточка с фоном пользователя. Фон отдельным слоем под затемнением:
   иначе на светлой картинке текст пропадает, а темнить саму картинку
   фильтром — значит гасить и текст вместе с ней. */
/* Цвета премиального стиля живут переменными на самой карточке. Поэтому
   ползунок в настройках меняет вид мгновенно: браузеру достаточно
   пересчитать значения, ничего перерисовывать заново не нужно. */
.hero-card {
    --p-gradient-start: #111827;
    --p-gradient-end: #312e81;
    --p-accent-1: #8b5cf6;
    --p-accent-2: #22d3ee;
    --p-panel-rgba: rgba(15, 23, 42, 0.58);
    --p-border: rgba(255, 255, 255, 0.12);
    --p-avatar-frame: #f8fafc;
    --p-avatar-glow: #8b5cf6;
    --p-progress-start: #22d3ee;
    --p-progress-end: #8b5cf6;

    position: relative;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: linear-gradient(150deg, var(--p-gradient-start), var(--p-gradient-end));
}

.hero-card .glass,
.hero-card .mini-card,
.hero-card .slot-row {
    background: var(--p-panel-rgba);
    border-color: var(--p-border);
}

.hero-card .bar-fill { background: linear-gradient(90deg, var(--p-progress-start), var(--p-progress-end)); }
.hero-card .ring-fill { stroke: var(--p-accent-1); }
.hero-card .ring img { box-shadow: 0 0 0 3px var(--p-avatar-frame), 0 0 26px -4px var(--p-avatar-glow); }
.hero-card .metric-1, .hero-card .act-voice { color: var(--p-accent-1); }
.hero-card .metric-2, .hero-card .act-msg, .hero-card .rank-text, .hero-card .progress-percent { color: var(--p-accent-2); }
.hero-card .balance-card { background: linear-gradient(150deg, var(--p-accent-1), var(--p-gradient-end)); }

.hero-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.5;
}

.hero-card-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(10, 15, 26, 0.72), rgba(10, 15, 26, 0.9));
}

.hero-card-inner {
    position: relative;
    padding: clamp(18px, 3vw, 28px);
    backdrop-filter: blur(2px);
}

.identity-head {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.identity-text h2 { font-size: clamp(26px, 4.5vw, 40px); font-weight: 800; }
.identity-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; }
.rank-text { color: var(--good); font-weight: 800; font-size: 15px; }

/* Стекло — тот же приём, что drawGlassRect в Canvas: полупрозрачная
   подложка со светлой рамкой поверх фона пользователя. */
.glass {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(18, 25, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
}

.head-right { margin-left: auto; display: grid; gap: 10px; justify-items: stretch; min-width: 190px; }

.mini-card {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 4px 8px;
    padding: 11px 15px;
    border-radius: 14px;
    background: rgba(18, 25, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.mini-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.mini-label { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; }
.mini-name { grid-column: 1 / -1; font-size: 15px; font-weight: 800; }

/* Пять слотов достижений — как пять кружков на карточке. Пустые остаются
   пустыми: так видно, сколько ещё можно собрать. */
.slot-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    padding: 9px 11px;
    border-radius: 14px;
    background: rgba(18, 25, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.slot {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 15px;
}

.slot.is-empty { opacity: 0.45; }

.pcard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.balance-card {
    padding: 22px 24px;
    border-radius: 18px;
    background: linear-gradient(150deg, #4b6cb7, #182848);
    box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.balance-label { font-size: 15px; font-weight: 700; opacity: 0.85; }
.balance-value { display: block; font-size: clamp(34px, 6vw, 46px); font-weight: 800; letter-spacing: -0.03em; margin: 4px 0 14px; }
.balance-sub { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; opacity: 0.9; }

.pcard-column { display: grid; gap: 16px; align-content: start; }

.metric-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; }
.metric-cap { display: block; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.09em; }
.metric-big { display: block; font-size: clamp(20px, 3vw, 27px); font-weight: 800; letter-spacing: -0.02em; margin-top: 6px; }
.metric-1 { color: var(--accent-soft); }
.metric-2 { color: var(--good); }

.progress-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.progress-percent { color: var(--good); font-weight: 800; font-size: 13px; }
.progress-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 9px; color: var(--muted); font-size: 11.5px; font-weight: 700; }

.pill-premium {
    background: linear-gradient(140deg, rgba(255, 184, 77, 0.22), rgba(255, 92, 116, 0.22));
    border-color: rgba(255, 184, 77, 0.45);
    color: var(--warn);
}

.partner-card {
    margin-left: auto;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
}

.partner-row { display: flex; align-items: center; gap: 9px; margin-top: 6px; }
.partner-row img { border-radius: 50%; }

.tile-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.tile {
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
}

.tile-wide { grid-column: span 1; }
.tile-value { display: block; font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -0.03em; margin: 2px 0 8px; }
.tile-small { font-size: 18px; }
.tile-accent { color: var(--warn); }

.tile-sub { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 13px; }
.tile-sub b { color: var(--text); }

.block-title { font-size: 17px; margin: 24px 0 12px; }

/* Три колонки с разделителями — как вертикальные линии в Canvas. */
.activity-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 18px 0;
}

.activity-col { padding: 0 18px; }
.activity-col + .activity-col { border-left: 1px solid rgba(255, 255, 255, 0.12); }

.act-line { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; }
.act-voice, .act-msg { font-size: clamp(16px, 2.6vw, 20px); font-weight: 800; letter-spacing: -0.02em; }
.act-voice { color: var(--accent-soft); }
.act-msg { color: var(--good); }
.act-tag { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 0.05em; }

/* Кнопки-разделы: те же, что были под карточкой в Discord. */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
    padding: 9px 16px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font: inherit;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.chip:hover { color: var(--text); background: rgba(255, 255, 255, 0.09); }

.chip.is-active {
    color: var(--text);
    background: rgba(113, 92, 255, 0.2);
    border-color: rgba(113, 92, 255, 0.5);
}

.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }

/* --- Разделы профиля --------------------------------------------------- */

.family-block { display: flex; align-items: center; gap: 16px; }
.family-block img { border-radius: 50%; background: var(--panel-2); }
.family-block strong { font-size: 20px; font-weight: 800; }

.quest-list { display: grid; gap: 12px; }

.quest {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
}

.quest-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.quest-name { font-weight: 800; font-size: 15px; }
.quest-reward { color: var(--warn); font-weight: 800; font-size: 13px; }
.quest-goal { display: grid; gap: 6px; margin-top: 9px; }
.quest-goal-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.quest .bar { height: 7px; }

.history-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }

.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    font-size: 13.5px;
}

.history-type { font-weight: 700; }
.history-amount { margin-left: auto; font-weight: 800; }
.history-amount.is-plus { color: var(--good); }
.history-amount.is-minus { color: var(--danger); }
.history-when { color: var(--muted); font-size: 12px; min-width: 84px; text-align: right; }

/* --- Настройка стиля --------------------------------------------------- */

.style-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.style-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.style-field {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
}

.style-field label { flex: 1; font-size: 13px; font-weight: 700; }

/* Родной выбор цвета: он открывает системную палитру, знакомую человеку,
   и работает на телефоне без единой строки нашего кода. */
.style-field input[type="color"] {
    width: 38px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: transparent;
    cursor: pointer;
}

.style-field input[type="range"] { flex: 1; accent-color: var(--accent); }
.style-value { color: var(--muted); font-size: 12px; font-weight: 700; min-width: 42px; text-align: right; }

.style-note {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}

.style-note.is-good { color: var(--good); border-color: rgba(55, 214, 159, 0.35); background: rgba(55, 214, 159, 0.08); }
.style-note.is-bad { color: var(--danger); border-color: rgba(255, 92, 116, 0.35); background: rgba(255, 92, 116, 0.08); }

.bg-preview {
    height: 190px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04) center / cover no-repeat;
    margin-bottom: 12px;
}

.achievement {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 12px;
    background: rgba(255, 184, 77, 0.1);
    border: 1px solid rgba(255, 184, 77, 0.28);
    font-size: 13.5px;
    font-weight: 700;
}

.ring { position: relative; width: 116px; height: 116px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; stroke-linecap: round; }
.ring-track { stroke: rgba(255, 255, 255, 0.08); }
.ring-fill { stroke: url(#none); stroke: var(--accent); }

.ring img {
    position: absolute;
    inset: 14px;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--panel-2);
}

.identity-text h2 { font-size: clamp(24px, 3vw, 30px); }
.identity-text p { font-size: 14px; margin-bottom: 10px; }

.pill {
    display: inline-block;
    padding: 5px 13px;
    border-radius: 999px;
    background: rgba(113, 92, 255, 0.16);
    border: 1px solid rgba(113, 92, 255, 0.35);
    color: var(--accent-soft);
    font-size: 13px;
    font-weight: 700;
}

.level-line-head {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 9px;
}

.bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
}

.bar-fill {
    display: block;
    height: 100%;
    width: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), #58c8ff);
    transform: scaleX(0);
    transform-origin: left center;
}

.roles { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 24px; }

.role-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    font-size: 12.5px;
    font-weight: 600;
}

.role-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

.card-column { display: grid; gap: 16px; }

.card-metric { text-align: left; }
.metric-label { display: block; color: var(--muted); font-size: 13px; font-weight: 700; }
.metric-value { display: block; font-size: 38px; font-weight: 800; letter-spacing: -0.03em; margin: 4px 0 2px; }
.metric-hint { color: var(--muted); font-size: 13px; }
.roblox-name { display: block; font-size: 20px; font-weight: 800; margin: 6px 0 2px; }

/* --- Магазин ---------------------------------------------------------- */

.wallet { text-align: right; }
.wallet span { display: block; font-size: 13px; font-weight: 600; }
.wallet strong { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
}

.shop-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    border-radius: var(--radius);
    background: linear-gradient(160deg, rgba(31, 43, 68, 0.7), rgba(22, 31, 50, 0.5));
    border: 1px solid var(--line);
    will-change: transform;
}

.shop-card.is-locked { opacity: 0.55; }

.shop-top { display: flex; align-items: center; gap: 10px; }
.shop-emoji { font-size: 24px; }
.shop-name { font-size: 17px; font-weight: 800; }
.shop-desc { color: var(--muted); font-size: 13.5px; flex: 1; }

.shop-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.shop-price { font-size: 20px; font-weight: 800; }
.shop-price.is-locked { color: var(--muted); }

.shop-buy {
    padding: 8px 15px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font: inherit;
    font-weight: 700;
    font-size: 13px;
    cursor: not-allowed;
}

.shop-tag {
    align-self: flex-start;
    padding: 3px 9px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* --- Сервер ----------------------------------------------------------- */

.server-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
    gap: 16px;
    align-items: start;
}

.card-guild { text-align: center; }
.card-guild img { border-radius: 22px; margin-bottom: 14px; background: var(--panel-2); }
.card-guild h3 { font-size: 22px; margin-bottom: 20px; }

.guild-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.guild-stats strong { display: block; font-size: 24px; font-weight: 800; }
.guild-stats span { color: var(--muted); font-size: 12px; }

.card-voice h3 { font-size: 18px; margin-bottom: 16px; }

.voice-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.voice-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
}

.voice-item img { width: 30px; height: 30px; border-radius: 50%; flex: none; }
.voice-name { font-weight: 700; font-size: 14px; }
.voice-channel { color: var(--muted); font-size: 12.5px; margin-left: auto; }

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--good);
    flex: none;
    box-shadow: 0 0 0 3px rgba(55, 214, 159, 0.18);
}

.empty { padding: 20px 0; text-align: center; }

/* --- Подвал ----------------------------------------------------------- */

.footer {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 22px clamp(16px, 4vw, 40px);
    border-top: 1px solid var(--line);
    font-size: 13px;
    font-weight: 600;
}

/* --- Узкие экраны ----------------------------------------------------- */

@media (max-width: 900px) {
    .server-layout { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    /* На телефоне шапка складывается в колонку: партнёр и достижения
       уходят под имя, а не жмутся сбоку. */
    .identity-head { flex-direction: column; align-items: stretch; text-align: center; }
    .identity-head .ring { align-self: center; }
    .identity-badges { justify-content: center; }
    .head-right { margin-left: 0; }
    .mini-card { justify-items: center; text-align: center; grid-template-columns: 1fr; }
    .mini-dot { display: none; }

    /* Активность в три узкие колонки нечитаема — ставим друг под друга. */
    .activity-row { grid-template-columns: 1fr; padding: 8px 0; }
    .activity-col { padding: 12px 16px; }
    .activity-col + .activity-col { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.12); }
    .act-line { margin-top: 6px; }
}

@media (max-width: 760px) {
    /* На телефоне логотип и вход в одной строке, вкладки — во второй
       на всю ширину: в три колонки они бы сжались до нечитаемого. */
    .topbar { grid-template-columns: auto 1fr; row-gap: 12px; }
    .brand { grid-column: 1; }
    .account { grid-column: 2; }
    .tabs { grid-column: 1 / -1; justify-self: stretch; }
    /* Четыре вкладки в полный размер не влезают в 375 точек и уезжают в
       прокрутку — последний раздел тогда не видно вовсе. Ужимаем их так,
       чтобы помещались все четыре сразу. */
    .tabs { width: 100%; justify-content: space-between; }
    .tab { padding: 8px 10px; font-size: 13px; }
    .brand-text { display: none; }
    .identity-head { flex-direction: column; text-align: center; }
    .btn-discord span { display: none; }
    .btn-discord { padding: 11px 14px; }
}

/* Отключаем движение фона тем, кому оно мешает. Остальное гасит GSAP
   через matchMedia — здесь только то, что живёт в CSS. */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
