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

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #151515;
  color: white;
}

.container {
  max-width: 430px;
  margin: 0 auto;
  padding: 20px;
  /* Account for Telegram Mini App header + device safe area */
  padding-top: calc(20px + var(--tg-content-safe-area-inset-top, 0px) + var(--tg-safe-area-inset-top, 0px));
}

h1 {
  text-align: center;
  margin: 20px 0 30px;
}

.card {
  background: #222;
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 20px;
  text-align: center;
}

.card h2 {
  margin-bottom: 15px;
}

.card h3 {
  margin-bottom: 15px;
  font-size: 24px;
}

#balance {
  font-size: 30px;
  font-weight: bold;
  color: #32d74b;
}

.buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

button {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 14px;
  color: white;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: .2s;
}

button:active {
  transform: scale(.98);
}

button:disabled {
  opacity: .6;
  cursor: not-allowed;
}

#claimButton {
  background: #2ea043;
}

#claimButton {
  background: #2ea043;
}

#businessButton {
  background: linear-gradient(135deg, #c084fc, #a855f7);
}

#shopButton {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

#profileButton {
  background: linear-gradient(135deg, #475569, #334155);
}

#adsButton {
  background: linear-gradient(135deg, #3478f6, #245dcc);
}

#dailyButton {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

#withdrawButton {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

#referralButton {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}

#achievementButton {
  background: linear-gradient(135deg, #9333ea, #7c3aed);
}

#tasksButton {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

#playersButton {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

/* Buttons added in later phases — missing backgrounds caused them to
   appear white/faded on iOS (browser default transparent + white text). */
#clanButton {
  background: linear-gradient(135deg, #a855f7, #9333ea);
}

#globalChatButton {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
}

#dmListButton {
  background: linear-gradient(135deg, #818cf8, #6366f1);
}

#adminListButton {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

#modMainMenuBtn {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.business-card {
  background: #2b2b2b;
  border-radius: 15px;
  padding: 18px;
  margin-bottom: 18px;
}

.business-card h3 {
  margin-bottom: 12px;
  text-align: center;
}

.business-card p {
  margin: 8px 0;
  font-size: 17px;
}

.buy-button {
  margin-top: 15px;
  background: #2d88ff;
}

.back-button {
  margin-bottom: 20px;
  background: #555;
}

.hidden {
  display: none;
}

/* ========================= */
/* Toast уведомление */
/* ========================= */

.toast {
  position: fixed;
  left: 50%;
  bottom: 35px;
  transform: translateX(-50%) translateY(120px);

  min-width: 240px;
  max-width: 90%;

  background: rgba(35, 35, 35, 0.95);
  color: white;

  padding: 14px 18px;

  border-radius: 14px;

  text-align: center;
  font-size: 17px;
  font-weight: bold;

  opacity: 0;

  transition:
      opacity .3s ease,
      transform .3s ease;

  pointer-events: none;

  z-index: 9999;

  border: 1px solid rgba(255,255,255,.08);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  border-left: 5px solid #32d74b;
}

.toast.error {
  border-left: 5px solid #ff453a;
}

.toast.info {
  border-left: 5px solid #0a84ff;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

/* ========================= */
/* PLAYER HEADER */
/* ========================= */

.player-header {
  margin-bottom: 22px;
}

.player-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.player-name {
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
}

.vip-badge {
  display: inline-flex;
  align-items: center;

  padding: 6px 12px;

  border-radius: 12px;

  background: linear-gradient(
    135deg,
    #ffd700,
    #ff9f00
  );

  color: #171717;

  font-size: 14px;
  font-weight: 800;

  box-shadow:
    0 4px 15px rgba(255,190,0,0.25);
}

.stat-card {
  background: linear-gradient(
    145deg,
    #242424,
    #1d1d1d
  );

  border-radius: 24px;

  padding: 22px 16px;

  text-align: center;

  border: 1px solid rgba(255,255,255,0.06);

  box-shadow:
    0 8px 25px rgba(0,0,0,0.22);
}

.stat-title {
  color: #aaa;
  font-size: 14px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  color: #32d74b;
}

.buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

#claimButton {
  grid-column: 1 / 3;
}

/* ================================================= */
/* PUBLIC PLAYER PROFILE */
/* ================================================= */

.public-profile-screen {
    padding-bottom: 40px;
}


/* ========================= */
/* HERO */
/* ========================= */

.public-profile-hero {
    margin-top: 28px;
    margin-bottom: 18px;
    padding: 30px 20px;
    text-align: center;

    background:
        linear-gradient(
            145deg,
            #252525,
            #1b1b1b
        );

    border-radius: 28px;

    border: 1px solid rgba(255,255,255,0.07);

    box-shadow:
        0 12px 35px rgba(0,0,0,0.35);
}


.public-profile-avatar {
    width: 92px;
    height: 92px;

    margin: 0 auto 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 48px;

    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            #353535,
            #202020
        );

    border: 2px solid rgba(255,255,255,0.12);

    box-shadow:
        0 0 30px rgba(255,255,255,0.05);
}


.public-profile-name-row {
    display: flex;

    align-items: center;
    justify-content: center;

    flex-wrap: wrap;

    gap: 10px;
}


.public-profile-name-row h1 {
    margin: 0;

    font-size: 29px;

    line-height: 1.2;
}


.public-profile-username {
    margin-top: 8px;

    font-size: 16px;

    color: #8e8e93;
}


.public-profile-status {
    margin: 15px auto 0;

    max-width: 90%;

    padding: 9px 15px;

    border-radius: 14px;

    background: rgba(255,255,255,0.06);

    color: #d7d7d7;

    font-size: 15px;

    word-break: break-word;
}


/* ========================= */
/* VIP */
/* ========================= */

/* ─────────────────────────────────────────
   OWNER PROFILE — golden theme
   Applied when backend returns is_project_owner=true.
   The class is set/cleared in app.js based solely on the API flag —
   no name/username/player_tag checks are ever used.
   ───────────────────────────────────────── */

.pp-screen--owner .public-profile-hero {
    background: linear-gradient(145deg, #1c1500 0%, #2a1d00 50%, #1c1500 100%);
    border-color: rgba(184, 134, 11, 0.6);
    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.5),
        0 0 24px rgba(184, 134, 11, 0.25),
        0 0 60px rgba(184, 134, 11, 0.10);
}

.pp-screen--owner .public-profile-avatar {
    background: linear-gradient(145deg, #3a2800, #251b00);
    border-color: rgba(212, 175, 55, 0.55);
    box-shadow:
        0 0 20px rgba(212, 175, 55, 0.30),
        0 0 50px rgba(212, 175, 55, 0.10);
}

.pp-owner-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.6px;
    background: linear-gradient(135deg, #b8860b 0%, #ffd700 50%, #b8860b 100%);
    color: #1a1000;
    box-shadow:
        0 0 10px rgba(255, 215, 0, 0.40),
        0 2px 6px rgba(0, 0, 0, 0.40);
}

.pp-owner-badge.hidden { display: none; }

/* ─────────────────────────────────────────
   FORUM OWNER BADGE
   Shown next to thread/post author name when
   the backend returns is_project_owner=true.
   ───────────────────────────────────────── */

.forum-owner-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    background: linear-gradient(135deg, #b8860b, #ffd700, #b8860b);
    color: #1a1000;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.35);
    flex-shrink: 0;
}

/* ========================= */
/* VIP */
/* ========================= */

.public-vip-badge {
    display: inline-flex;

    align-items: center;

    padding: 6px 11px;

    border-radius: 12px;

    font-size: 13px;
    font-weight: 700;

    background:
        linear-gradient(
            135deg,
            #ffd700,
            #ff9f00
        );

    color: #171717;

    box-shadow:
        0 4px 15px rgba(255,190,0,0.25);
}


/* ========================= */
/* PROFILE TAGS */
/* ========================= */

.public-profile-tags {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

    margin-top: 12px;

    max-width: 100%;
}


/* ОСНОВНОЙ ТЕГ */

.profile-tag {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 5px;

    min-height: 30px;

    padding: 6px 11px;

    border-radius: 10px;

    font-size: 12px;
    font-weight: 800;

    line-height: 1;

    white-space: nowrap;

    border: 1px solid rgba(255,255,255,0.10);

    box-shadow:
        0 4px 12px rgba(0,0,0,0.20);

    transition:
        transform .15s ease,
        box-shadow .15s ease;
}


.profile-tag:hover {
    transform: translateY(-1px);
}


/* ========================= */
/* АДМИНИСТРАЦИЯ */
/* ========================= */


/* Основатель */

.profile-tag-founder {
    background:
        linear-gradient(
            135deg,
            #ffd700,
            #ff9500
        );

    color: #171717;

    border-color: rgba(255,215,0,0.45);

    box-shadow:
        0 4px 16px rgba(255,180,0,0.25);
}


/* Старший админ */

.profile-tag-senior-admin {
    background:
        linear-gradient(
            135deg,
            #ff453a,
            #c62828
        );

    color: white;

    border-color: rgba(255,80,70,0.35);

    box-shadow:
        0 4px 16px rgba(255,60,50,0.20);
}


/* Администратор */

.profile-tag-admin {
    background:
        linear-gradient(
            135deg,
            #ff9500,
            #e76f00
        );

    color: white;

    border-color: rgba(255,150,0,0.35);
}


/* Технический специалист */

.profile-tag-tech {
    background:
        linear-gradient(
            135deg,
            #0a84ff,
            #0066cc
        );

    color: white;

    border-color: rgba(10,132,255,0.35);
}


/* Команда проекта */

.profile-tag-team {
    background:
        linear-gradient(
            135deg,
            #8b5cf6,
            #6d28d9
        );

    color: white;

    border-color: rgba(139,92,246,0.35);
}


/* ========================= */
/* ОСОБЫЕ ТЕГИ */
/* ========================= */


/* Блогер */

.profile-tag-blogger {
    background:
        linear-gradient(
            135deg,
            #ec4899,
            #c026d3
        );

    color: white;

    border-color: rgba(236,72,153,0.35);
}


/* VIP */

.profile-tag-vip {
    background:
        linear-gradient(
            135deg,
            #ffd700,
            #ffb000
        );

    color: #171717;

    border-color: rgba(255,215,0,0.40);

    box-shadow:
        0 4px 16px rgba(255,200,0,0.25);
}


/* ========================= */
/* ИГРОВЫЕ ТЕГИ */
/* ========================= */


/* ТОП */

.profile-tag-top {
    background:
        linear-gradient(
            135deg,
            #ffcc00,
            #ff9500
        );

    color: #171717;
}


/* Миллионер */

.profile-tag-millionaire {
    background:
        linear-gradient(
            135deg,
            #34c759,
            #248a3d
        );

    color: white;
}


/* Активный */

.profile-tag-active {
    background:
        linear-gradient(
            135deg,
            #ff453a,
            #ff6b00
        );

    color: white;
}


/* Бизнесмен */

.profile-tag-businessman {
    background:
        linear-gradient(
            135deg,
            #ff9500,
            #ff6d00
        );

    color: white;
}


/* Выполнил 100 заданий */

.profile-tag-tasks {
    background:
        linear-gradient(
            135deg,
            #5e5ce6,
            #7c3aed
        );

    color: white;
}


/* Gold Master */

.profile-tag-gold {
    background:
        linear-gradient(
            135deg,
            #ffd60a,
            #ff9f0a
        );

    color: #171717;
}


/* Ветеран */

.profile-tag-veteran {
    background:
        linear-gradient(
            135deg,
            #636366,
            #3a3a3c
        );

    color: white;
}


/* ========================= */
/* МОБИЛЬНАЯ ВЕРСИЯ */
/* ========================= */

@media (max-width: 430px) {

    .public-profile-tags {
        gap: 7px;
        margin-top: 10px;
    }

    .profile-tag {
        min-height: 29px;

        padding: 6px 9px;

        font-size: 11px;
    }

}

/* ========================= */
/* ACTION BUTTONS */
/* ========================= */

.profile-actions {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 10px;

    margin-bottom: 18px;
}


.profile-action-button {
    min-height: 72px;

    border: none;

    border-radius: 18px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 5px;

    font-size: 14px;

    font-weight: 700;

    color: white;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        opacity 0.15s ease;
}


.profile-action-button:active {
    transform: scale(0.96);
}


.message-button {
    background:
        linear-gradient(
            135deg,
            #3478f6,
            #245dcc
        );
}


.gift-button {
    background:
        linear-gradient(
            135deg,
            #ec4899,
            #c026d3
        );
}


.clan-button {
    background:
        linear-gradient(
            135deg,
            #8b5cf6,
            #6d28d9
        );
}


.profile-action-button:first-line {
    font-size: 22px;
}


/* ========================= */
/* CARDS */
/* ========================= */

.public-profile-card {
    margin-bottom: 16px;

    padding: 22px;

    background:
        linear-gradient(
            145deg,
            #242424,
            #1d1d1d
        );

    border-radius: 24px;

    border: 1px solid rgba(255,255,255,0.06);

    box-shadow:
        0 8px 25px rgba(0,0,0,0.22);
}


.profile-card-title {
    display: flex;

    align-items: center;

    justify-content: center;

    gap: 9px;

    margin-bottom: 20px;

    font-size: 25px;

    font-weight: 800;
}


/* ========================= */
/* STATS */
/* ========================= */

.profile-stats-grid {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 10px;
}


.profile-stat {
    padding: 17px 10px;

    text-align: center;

    background: rgba(255,255,255,0.045);

    border-radius: 17px;

    border: 1px solid rgba(255,255,255,0.04);
}


.profile-stat-icon {
    font-size: 23px;

    margin-bottom: 5px;
}


.profile-stat-value {
    font-size: 21px;

    font-weight: 800;

    overflow-wrap: anywhere;
}


.profile-stat-label {
    margin-top: 3px;

    color: #929292;

    font-size: 13px;
}


.profile-total-earned {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 15px;

    margin-top: 12px;

    padding: 15px 16px;

    border-radius: 16px;

    background:
        rgba(255,255,255,0.05);

    font-size: 14px;
}


.profile-total-earned strong {
    font-size: 16px;

    color: #4ade80;

    overflow-wrap: anywhere;

    text-align: right;
}


/* ========================= */
/* ACHIEVEMENTS */
/* ========================= */

.profile-section-value {
    text-align: center;

    margin-bottom: 15px;

    font-size: 17px;
}


.profile-section-value strong {
    color: #facc15;
}


.profile-wide-button {
    width: 100%;

    min-height: 54px;

    border: none;

    border-radius: 16px;

    background:
        linear-gradient(
            135deg,
            #f59e0b,
            #d97706
        );

    color: white;

    font-size: 16px;

    font-weight: 700;
}


/* ========================= */
/* GIFTS */
/* ========================= */

.gift-stats {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 10px;
}


.gift-stats > div {
    padding: 16px;

    text-align: center;

    border-radius: 17px;

    background:
        rgba(255,255,255,0.045);
}


.gift-stats span {
    display: block;

    color: #999;

    font-size: 13px;

    margin-bottom: 6px;
}


.gift-stats strong {
    display: block;

    font-size: 23px;
}


/* ========================= */
/* CLAN */
/* ========================= */

.profile-clan {
    padding: 16px;

    text-align: center;

    border-radius: 16px;

    background:
        rgba(139,92,246,0.12);

    color: #c4b5fd;

    font-size: 16px;
}


/* ========================= */
/* ID */
/* ========================= */

.public-profile-id {
    text-align: center;

    color: #666;

    font-size: 12px;

    margin-top: 8px;
}


.public-profile-id span {
    color: #888;
}

/* =========================
   ТЕГИ ПОЛЬЗОВАТЕЛЯ
========================= */

.user-tags-cell {
    min-width: 300px;
    max-width: 420px;

    white-space: normal !important;
}

.user-tags {
    display: flex;
    flex-wrap: wrap;

    justify-content: center;

    gap: 7px;

    margin-bottom: 10px;
}

.user-tag {
    display: inline-flex;

    align-items: center;
    gap: 4px;

    padding: 6px 9px;

    border-radius: 9px;

    background: linear-gradient(
        135deg,
        #333,
        #252525
    );

    border: 1px solid rgba(255,255,255,.10);

    color: white;

    font-size: 12px;
    font-weight: bold;

    white-space: nowrap;
}

.user-tag-selector {
    width: 100%;

    min-height: 110px;

    padding: 10px;

    border-radius: 12px;

    background: #181818;

    border: 1px solid #444;

    color: white;

    font-size: 14px;

    outline: none;
}

.user-tag-selector:focus {
    border-color: #777;
}

.user-tag-selector option {
    padding: 7px;

    background: #222;

    color: white;
}

/* ========================= */
/* MOBILE */
/* ========================= */

@media (max-width: 430px) {

    .profile-actions {
        gap: 8px;
    }

    .profile-action-button {
        min-height: 68px;

        font-size: 13px;
    }

    .public-profile-name-row h1 {
        font-size: 25px;
    }

    .profile-card-title {
        font-size: 23px;
    }

}

/* ================================================= */
/* PUBLIC PROFILE — SPECIAL TAGS */
/* ================================================= */

.public-profile-tags {
    margin-top: 14px;
    padding: 18px;

    background:
        linear-gradient(
            145deg,
            #252525,
            #1c1c1c
        );

    border-radius: 20px;

    border: 1px solid rgba(255,255,255,0.07);

    box-shadow:
        0 8px 25px rgba(0,0,0,0.20);

    text-align: center;
}


/* Заголовок */

.public-profile-tags-title {
    margin-bottom: 14px;

    font-size: 16px;

    font-weight: 800;

    color: #d7d7d7;
}


/* Контейнер тегов */

.public-profile-tags-list {
    display: flex;

    flex-wrap: wrap;

    justify-content: center;

    gap: 8px;
}


/* Общий тег */

.special-tag {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 34px;

    padding: 7px 12px;

    border-radius: 12px;

    font-size: 13px;

    font-weight: 800;

    line-height: 1.2;

    border: 1px solid rgba(255,255,255,0.10);

    box-shadow:
        0 4px 12px rgba(0,0,0,0.18);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}


/* Небольшой эффект нажатия */

.special-tag:active {
    transform: scale(0.96);
}


/* ================================================= */
/* OFFICIAL TAGS */
/* ================================================= */


/* Владелец проекта */

.special-tag.owner {
    background:
        linear-gradient(
            135deg,
            #ffd700,
            #ff9f00
        );

    color: #171717;

    box-shadow:
        0 4px 18px rgba(255,190,0,0.25);
}


/* Старший администратор */

.special-tag.senior-admin {
    background:
        linear-gradient(
            135deg,
            #ff453a,
            #b91c1c
        );

    color: white;
}


/* Администратор */

.special-tag.admin {
    background:
        linear-gradient(
            135deg,
            #ef4444,
            #991b1b
        );

    color: white;
}


/* Технический специалист */

.special-tag.tech {
    background:
        linear-gradient(
            135deg,
            #3478f6,
            #6d28d9
        );

    color: white;
}


/* Админ + тех */

.special-tag.admin-tech {
    background:
        linear-gradient(
            135deg,
            #ef4444,
            #3478f6
        );

    color: white;
}


/* Команда проекта */

.special-tag.team {
    background:
        linear-gradient(
            135deg,
            #8b5cf6,
            #6d28d9
        );

    color: white;
}


/* Блогер */

.special-tag.blogger {
    background:
        linear-gradient(
            135deg,
            #ec4899,
            #9333ea
        );

    color: white;
}


/* ================================================= */
/* GAME TAGS */
/* ================================================= */


/* ТОП 1 */

.special-tag.top {
    background:
        linear-gradient(
            135deg,
            #ffd700,
            #f59e0b
        );

    color: #171717;
}


/* Миллионер */

.special-tag.millionaire {
    background:
        linear-gradient(
            135deg,
            #22c55e,
            #15803d
        );

    color: white;
}


/* VIP */

.special-tag.vip {
    background:
        linear-gradient(
            135deg,
            #ffd700,
            #ff9f00
        );

    color: #171717;
}


/* Активный */

.special-tag.active {
    background:
        linear-gradient(
            135deg,
            #ff6b35,
            #dc2626
        );

    color: white;
}


/* Бизнесмен */

.special-tag.businessman {
    background:
        linear-gradient(
            135deg,
            #ff9500,
            #ea580c
        );

    color: white;
}


/* 100 заданий */

.special-tag.tasks {
    background:
        linear-gradient(
            135deg,
            #ec4899,
            #be185d
        );

    color: white;
}


/* Gold Master */

.special-tag.gold-master {
    background:
        linear-gradient(
            135deg,
            #38bdf8,
            #2563eb
        );

    color: white;
}


/* Основатель */

.special-tag.founder {
    background:
        linear-gradient(
            135deg,
            #a855f7,
            #6d28d9
        );

    color: white;
}


/* Ветеран */

.special-tag.veteran {
    background:
        linear-gradient(
            135deg,
            #64748b,
            #334155
        );

    color: white;
}


/* ================================================= */
/* MY PERSONAL PROFILE                               */
/* ================================================= */

.mp-screen {
    padding-bottom: 44px;
}

/* --- Avatar override (initial letter instead of emoji) --- */
.mp-avatar {
    font-size: 38px;
    font-weight: 800;
    background: linear-gradient(145deg, #3a3a4a, #202028);
    border: 2px solid rgba(255,255,255,0.14);
    box-shadow: 0 0 30px rgba(52,120,246,0.15);
}

/* --- Level badge below username --- */
.mp-level-row {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.mp-level-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.55);
    letter-spacing: 0.04em;
}

/* --- Colour helpers --- */
.mp-gold-val {
    color: #ffd60a !important;
}

.mp-orange-val {
    color: #ff9f0a !important;
}

.mp-green-val {
    color: #32d74b !important;
}

/* --- profile-wide-button colour variants --- */
.mp-btn-green {
    background: linear-gradient(135deg, #2ea043, #1a7a30) !important;
    color: white !important;
    margin-top: 14px;
}

.mp-btn-vip {
    background: linear-gradient(135deg, #ffd60a, #ff9f0a) !important;
    color: #1a1000 !important;
    margin-top: 14px;
}

.mp-btn-blue {
    background: linear-gradient(135deg, #3478f6, #245dcc) !important;
    color: white !important;
    margin-top: 14px;
}

/* ── Notification settings toggles ─────────────────────────────────────── */
.notif-settings-desc {
    color: #64748b;
    font-size: 13px;
    margin: 0 0 14px;
    line-height: 1.4;
}

.notif-toggle-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.notif-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s;
}

.notif-toggle-row:hover {
    background: #1c1c1e;
}

.notif-cb {
    width: 18px;
    height: 18px;
    accent-color: #3478f6;
    flex-shrink: 0;
    cursor: pointer;
}

.notif-toggle-label {
    font-size: 15px;
    color: #e5e5ea;
    user-select: none;
}

/* --- VIP card states --- */
.mp-vip-active-card {
    border-color: rgba(255,214,10,0.3) !important;
    background: linear-gradient(145deg, #242410, #1e1e10) !important;
}

.mp-vip-status-row {
    text-align: center;
    margin-bottom: 8px;
}

.mp-vip-status-text {
    font-size: 19px;
    font-weight: 800;
}

.mp-vip-status-text.active {
    color: #ffd60a;
}

.mp-vip-status-text.inactive {
    color: #636366;
}

.mp-vip-until {
    text-align: center;
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 10px;
}

.mp-vip-perk {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 14px 0 4px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(255,214,10,0.07);
    border: 1px solid rgba(255,214,10,0.15);
}

.mp-vip-perk-x {
    font-size: 26px;
    font-weight: 900;
    color: #ffd60a;
    line-height: 1;
}

.mp-vip-perk-label {
    font-size: 14px;
    color: rgba(255,255,255,0.55);
}

/* --- Referral code block --- */
.mp-ref-code-block {
    text-align: center;
    margin-bottom: 14px;
    padding: 16px;
    border-radius: 17px;
    background: rgba(52,120,246,0.08);
    border: 1px solid rgba(52,120,246,0.18);
}

.mp-ref-code-label {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.mp-ref-code {
    font-size: 22px;
    font-weight: 800;
    color: #3478f6;
    font-family: monospace;
    letter-spacing: 0.08em;
    word-break: break-all;
}

/* --- Edit fields --- */
.mp-field-group {
    margin-bottom: 18px;
}

.mp-field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.45);
    margin-bottom: 8px;
}

.mp-field-input {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    color: white;
    font-size: 16px;
    padding: 13px 16px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.15s, background 0.15s;
}

.mp-field-input:focus {
    border-color: rgba(52,120,246,0.55);
    background: rgba(52,120,246,0.07);
}

.mp-field-input option {
    background: #242424;
    color: white;
}

/* --- Service card --- */
.mp-service-card {
    opacity: 0.6;
}

.mp-service-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.mp-service-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.mp-service-key {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
}

.mp-service-val {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    font-family: monospace;
}

/* ================================================= */
/* CLAN SYSTEM — Phase 2                             */
/* ================================================= */

.clan-screen {
    padding-bottom: 48px;
}

/* ---- Loading ---- */

.clan-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 200px;
    color: rgba(255,255,255,0.45);
    font-size: 15px;
}

.clan-loading-spinner {
    font-size: 44px;
    animation: clanPulse 1.6s ease-in-out infinite;
}

@keyframes clanPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.92); }
}

.clan-loading-text {
    color: rgba(255,255,255,0.38);
    font-size: 14px;
    text-align: center;
    padding: 24px;
}

/* ---- Empty states ---- */

.clan-empty-text {
    color: rgba(255,255,255,0.35);
    font-size: 14px;
    text-align: center;
    padding: 20px 0;
}

.clan-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 36px 20px;
    color: rgba(255,255,255,0.38);
    font-size: 15px;
}

.clan-empty-icon {
    font-size: 40px;
    opacity: 0.55;
}

/* ---- Section card (generic container) ---- */

.clan-section-card {
    margin-bottom: 16px;
    padding: 22px;
    background: linear-gradient(145deg, #242424, #1d1d1d);
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 8px 25px rgba(0,0,0,0.22);
}

.clan-section-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 16px;
    color: #e2d9f8;
}

.clan-section-header {
    margin-top: 28px;
    margin-bottom: 4px;
}

.clan-section-header h2 {
    font-size: 24px;
    margin: 0 0 16px;
}

/* ---- NO-CLAN HERO ---- */

.clan-no-clan-hero {
    margin-top: 28px;
    margin-bottom: 18px;
    padding: 36px 20px;
    text-align: center;
    background: linear-gradient(145deg, #1e1628, #150f20);
    border-radius: 28px;
    border: 1px solid rgba(139,92,246,0.20);
    box-shadow: 0 12px 40px rgba(0,0,0,0.38), 0 0 0 1px rgba(139,92,246,0.08);
}

.clan-no-clan-emblem {
    font-size: 64px;
    margin-bottom: 14px;
    filter: drop-shadow(0 0 18px rgba(139,92,246,0.40));
}

.clan-no-clan-title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 800;
    color: #e2d9f8;
}

.clan-no-clan-subtitle {
    margin: 0 0 24px;
    font-size: 15px;
    color: rgba(196,181,253,0.65);
}

.clan-no-clan-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ---- Generic clan action buttons ---- */

.clan-action-btn {
    border: none;
    border-radius: 16px;
    padding: 14px 12px;
    font-size: 15px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.clan-action-btn:active {
    transform: scale(0.96);
}

.clan-action-btn--search {
    background: linear-gradient(135deg, #3478f6, #245dcc);
}

.clan-action-btn--create {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.clan-action-btn--join {
    width: 100%;
    min-height: 52px;
    font-size: 16px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.clan-action-btn--apply {
    width: 100%;
    min-height: 52px;
    font-size: 16px;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.clan-action-wrap {
    margin-bottom: 16px;
}

/* ---- MY CLAN HERO ---- */

.clan-hero {
    margin-top: 28px;
    margin-bottom: 18px;
    padding: 30px 22px;
    text-align: center;
    background: linear-gradient(145deg, #1e1628, #150f20);
    border-radius: 28px;
    border: 1px solid rgba(139,92,246,0.22);
    box-shadow: 0 12px 40px rgba(0,0,0,0.38), 0 0 0 1px rgba(139,92,246,0.08);
}

.clan-hero-emblem {
    font-size: 72px;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 22px rgba(139,92,246,0.50));
    line-height: 1;
}

.clan-hero-name {
    font-size: 26px;
    font-weight: 800;
    color: #e9e4ff;
    margin-bottom: 4px;
    word-break: break-word;
}

.clan-hero-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 10px;
    background: rgba(139,92,246,0.22);
    color: #c4b5fd;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
}

.clan-hero-level {
    font-size: 15px;
    color: rgba(196,181,253,0.70);
    margin-bottom: 14px;
    font-weight: 600;
}

/* ---- XP Progress Bar ---- */

.clan-xp-bar-wrap {
    margin-bottom: 14px;
}

.clan-xp-bar-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.10);
    overflow: hidden;
    margin-bottom: 6px;
}

.clan-xp-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
    transition: width 0.6s ease;
    box-shadow: 0 0 8px rgba(139,92,246,0.55);
}

.clan-xp-label {
    font-size: 12px;
    color: rgba(196,181,253,0.65);
    text-align: center;
}

/* ---- Hero meta (members, date) ---- */

.clan-hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
    color: rgba(196,181,253,0.75);
    margin-bottom: 10px;
}

.clan-hero-description {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(139,92,246,0.12);
    color: rgba(196,181,253,0.80);
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
    word-break: break-word;
}

/* Open/Closed badges */

.clan-open-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 8px;
    background: rgba(34,197,94,0.18);
    color: #4ade80;
    font-size: 12px;
    font-weight: 700;
}

.clan-closed-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 8px;
    background: rgba(239,68,68,0.18);
    color: #f87171;
    font-size: 12px;
    font-weight: 700;
}

.clan-mine-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 10px;
    background: rgba(34,197,94,0.18);
    color: #4ade80;
    font-size: 13px;
    font-weight: 700;
}

.clan-mine-banner {
    padding: 14px;
    border-radius: 14px;
    background: rgba(34,197,94,0.12);
    color: #4ade80;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

/* ---- Role badges ---- */

.clan-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.role-owner {
    background: linear-gradient(135deg, #ffd700, #ff9f00);
    color: #171717;
    box-shadow: 0 2px 8px rgba(255,180,0,0.30);
}

.role-deputy {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
    box-shadow: 0 2px 8px rgba(139,92,246,0.30);
}

.role-moderator {
    background: linear-gradient(135deg, #3478f6, #245dcc);
    color: white;
    box-shadow: 0 2px 8px rgba(52,120,246,0.25);
}

.role-member {
    background: rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.55);
}

/* Hero role badge (larger) */
.clan-hero .clan-role-badge {
    font-size: 14px;
    padding: 6px 14px;
    border-radius: 12px;
    margin-bottom: 14px;
}

/* ---- Member rows ---- */

.clan-member-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.clan-member-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.clan-member-row--manage {
    flex-wrap: wrap;
    align-items: flex-start;
}

/* ======================================================= */
/* 🏦 КАЗНА КЛАНА — Phase 3.6                              */
/* ======================================================= */

/* Кнопка казны — отличается от обычных кнопок управления */
.clan-manage-btn--treasury {
    background: linear-gradient(135deg, rgba(251,191,36,0.22), rgba(245,158,11,0.14)) !important;
    border: 1px solid rgba(251,191,36,0.40) !important;
    color: #fbbf24 !important;
}
.clan-manage-btn--treasury:hover {
    background: linear-gradient(135deg, rgba(251,191,36,0.32), rgba(245,158,11,0.22)) !important;
}

/* Карточка баланса */
.trs-balance-card {
    background: linear-gradient(135deg, rgba(139,92,246,0.20), rgba(109,40,217,0.12));
    border: 1px solid rgba(139,92,246,0.35);
    border-radius: 20px;
    padding: 24px 20px;
    text-align: center;
    margin-bottom: 16px;
}
.trs-balance-label {
    font-size: 14px;
    color: #a78bfa;
    margin-bottom: 8px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.trs-balance-value {
    font-size: 36px;
    font-weight: 800;
    color: #fbbf24;
    margin-bottom: 6px;
}
.trs-balance-total {
    font-size: 13px;
    color: #6b6b80;
}

/* Сетка статистики */
.trs-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}
.trs-stat-cell {
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    padding: 10px 8px;
    text-align: center;
}
.trs-stat-period {
    font-size: 11px;
    color: #888;
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
}
.trs-stat-earn {
    font-size: 13px;
    font-weight: 700;
    color: #34d399;
    margin-bottom: 3px;
}
.trs-stat-spend {
    font-size: 13px;
    font-weight: 700;
    color: #f87171;
}

/* Строка транзакции */
.trs-tx-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.trs-tx-row:last-child {
    border-bottom: none;
}
.trs-tx-amount {
    font-size: 15px;
    font-weight: 800;
    min-width: 64px;
    text-align: right;
    padding-top: 2px;
    flex-shrink: 0;
}
.trs-tx-income { color: #34d399; }
.trs-tx-spend  { color: #f87171; }
.trs-tx-body {
    flex: 1;
    min-width: 0;
}
.trs-tx-desc {
    font-size: 14px;
    color: #e2e8f0;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.trs-tx-meta {
    font-size: 12px;
    color: #6b6b80;
}
.trs-tx-date {
    margin-left: 4px;
    opacity: 0.7;
}
.trs-more-hint {
    text-align: center;
    font-size: 12px;
    color: #555;
    margin-top: 10px;
    padding-top: 6px;
}

/* Вклад участников */
.trs-contrib-legend {
    font-size: 12px;
    color: #6b6b80;
    margin-bottom: 8px;
    text-align: right;
}
.trs-contrib-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.trs-contrib-row:last-child {
    border-bottom: none;
}
.trs-contrib-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
    font-size: 12px;
}
.trs-contrib-cc   { color: #fbbf24; font-weight: 700; }
.trs-contrib-xp   { color: #a78bfa; }
.trs-contrib-acts { color: #60a5fa; }
.trs-contrib-dep  { color: #34d399; font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════════
   TREASURY HUB — Phase 3.8 redesign
   ═══════════════════════════════════════════════════════════════════ */

/* ── Хаб: баланс-шапка ──────────────────────────────────────────── */
.trs-hub-balance {
    background: linear-gradient(135deg, rgba(139,92,246,.22) 0%, rgba(109,40,217,.12) 100%);
    border: 1px solid rgba(139,92,246,.35);
    border-radius: 20px;
    padding: 22px 18px 18px;
    text-align: center;
    margin-bottom: 12px;
}
.trs-hub-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    color: #a78bfa;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.trs-hub-amounts {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
}
.trs-hub-cc {
    font-size: 24px;
    font-weight: 800;
    color: #fbbf24;
    text-shadow: 0 0 18px rgba(251,191,36,.35);
}
.trs-hub-gold {
    font-size: 24px;
    font-weight: 800;
    color: #a78bfa;
    text-shadow: 0 0 18px rgba(167,139,250,.35);
}
.trs-deposit-btn {
    width: 100%;
    padding: 13px 0;
    border-radius: 14px;
    border: 1px solid rgba(52,211,153,.4);
    background: rgba(52,211,153,.14);
    color: #34d399;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .15s;
}
.trs-deposit-btn:active { opacity: .75; }

/* ── Хаб: навигационные карточки ────────────────────────────────── */
.trs-hub-nav-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 8px;
    cursor: pointer;
    text-align: left;
    transition: background .15s;
}
.trs-hub-nav-card:active { background: rgba(255,255,255,.08); }
.trs-hub-nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.trs-hub-nav-icon { font-size: 22px; line-height: 1; }
.trs-hub-nav-title {
    font-size: 15px;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 3px;
}
.trs-hub-badge {
    display: inline-block;
    font-size: 12px;
    color: #6b6b80;
    background: rgba(255,255,255,.06);
    border-radius: 8px;
    padding: 2px 8px;
}
.trs-hub-badge--active {
    color: #34d399;
    background: rgba(52,211,153,.12);
}
.trs-hub-nav-arrow {
    font-size: 22px;
    color: #4a4a5a;
    line-height: 1;
}

/* ── Подпанели: заголовок + section label ────────────────────────── */
.trs-subpanel-title {
    font-size: 20px;
    font-weight: 800;
    color: #e2e8f0;
    margin: 4px 0 16px;
    padding: 0 4px;
}
.trs-subpanel-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #6b6b80;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin: 18px 0 8px 4px;
}

/* ── Бусты: карточки в сетке ─────────────────────────────────────── */
.trs-boost-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.trs-boost-card {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    padding: 14px 16px;
}
.trs-boost-card--active {
    background: rgba(52,211,153,.08);
    border-color: rgba(52,211,153,.3);
}
.trs-boost-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.trs-boost-card-label {
    font-size: 15px;
    font-weight: 700;
    color: #e2e8f0;
}
.trs-boost-active-badge {
    font-size: 12px;
    color: #34d399;
    background: rgba(52,211,153,.15);
    border-radius: 8px;
    padding: 3px 9px;
    font-weight: 700;
}
.trs-boost-card-desc {
    font-size: 13px;
    color: #8888a0;
    margin-bottom: 10px;
    line-height: 1.4;
}
.trs-boost-card-footer {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}
.trs-boost-card-cost {
    font-size: 14px;
    font-weight: 700;
    color: #fbbf24;
}
.trs-boost-card-dur {
    font-size: 13px;
    color: #6b6b80;
}
.trs-boost-timer {
    font-size: 13px;
    color: #34d399;
    font-weight: 700;
    margin-bottom: 4px;
}
.trs-boost-activate-btn {
    width: 100%;
    padding: 11px;
    border-radius: 12px;
    border: 1px solid rgba(139,92,246,.45);
    background: rgba(139,92,246,.15);
    color: #a78bfa;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.trs-boost-activate-btn--disabled {
    opacity: .38;
    cursor: default;
}

/* ── Прогресс-бар события ────────────────────────────────────────── */
.trs-event-progress-wrap {
    height: 10px;
    background: rgba(255,255,255,.1);
    border-radius: 5px;
    overflow: hidden;
}
.trs-event-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #f97316);
    border-radius: 5px;
    transition: width .4s ease;
}
.trs-ev-done { background: linear-gradient(90deg, #34d399, #10b981) !important; }

/* ── Карточка активного события ─────────────────────────────────── */
.trs-event-card {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 8px;
}
.trs-event-card--active {
    background: rgba(239,68,68,.08);
    border-color: rgba(239,68,68,.3);
}
.trs-event-card-title {
    font-size: 18px;
    font-weight: 800;
    color: #f87171;
    margin-bottom: 10px;
}
.trs-ev-prog-label {
    font-size: 13px;
    color: #8888a0;
    margin-bottom: 8px;
    text-align: right;
}
.trs-ev-my-contrib {
    font-size: 14px;
    color: #e2e8f0;
    margin-bottom: 8px;
}
.trs-ev-timer {
    font-size: 14px;
    color: #f87171;
    font-weight: 700;
    margin-bottom: 10px;
}
.trs-ev-rewards {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.trs-ev-rewards span {
    background: rgba(251,191,36,.12);
    border: 1px solid rgba(251,191,36,.25);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 700;
    color: #fbbf24;
}
.trs-no-event {
    padding: 24px 0;
}
.trs-ev-history-row {
    padding: 10px 12px;
    background: rgba(255,255,255,.03);
    border-radius: 12px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 14px;
    color: #e2e8f0;
}
.trs-ev-history-status { font-size: 12px; color: #6b6b80; margin-top: 2px; }
.trs-launch-btn {
    width: 100%;
    margin-top: 12px;
    padding: 13px;
    border-radius: 14px;
    border: 1px solid rgba(239,68,68,.4);
    background: rgba(239,68,68,.12);
    color: #f87171;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

/* ── Диалог события (modal-overlay) ─────────────────────────────── */
.trs-event-option {
    background: rgba(255,255,255,.04);
    border-radius: 14px;
    padding: 14px;
    margin: 12px 0;
}
.trs-ev-label {
    font-size: 16px;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 4px;
}
.trs-ev-cost {
    font-size: 14px;
    color: #fbbf24;
    margin-bottom: 4px;
}
.trs-ev-desc {
    font-size: 12px;
    color: #6b6b80;
}
.trs-deposit-warn {
    font-size: 12px;
    color: #f87171;
    text-align: center;
    margin: 10px 0;
}
.trs-deposit-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}
.trs-deposit-actions .btn-secondary,
.trs-deposit-actions .btn-primary {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.trs-deposit-actions .btn-secondary { background: rgba(255,255,255,.08); color: #888; }
.trs-deposit-actions .btn-primary   { background: linear-gradient(135deg,#8b5cf6,#7c3aed); color:#fff; }

/* ── Bottom sheet взноса ─────────────────────────────────────────── */
.trs-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 1200;
    display: flex;
    align-items: flex-end;
    animation: fadeIn .15s ease;
}
.trs-sheet {
    width: 100%;
    background: #1a1a2e;
    border-radius: 22px 22px 0 0;
    padding: 12px 18px 32px;
    max-height: 90vh;
    overflow-y: auto;
}
.trs-sheet-handle {
    width: 40px;
    height: 4px;
    background: rgba(255,255,255,.18);
    border-radius: 2px;
    margin: 0 auto 14px;
}
.trs-sheet-title {
    font-size: 19px;
    font-weight: 800;
    color: #e2e8f0;
    margin-bottom: 14px;
    text-align: center;
}
.trs-deposit-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}
.trs-tab {
    flex: 1;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.12);
    background: transparent;
    color: #888;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.trs-tab--active {
    background: rgba(139,92,246,.2);
    border-color: rgba(139,92,246,.5);
    color: #a78bfa;
}
.trs-quick-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.trs-quick-btn {
    padding: 10px 4px;
    border-radius: 12px;
    border: 1px solid rgba(251,191,36,.3);
    background: rgba(251,191,36,.08);
    color: #fbbf24;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.trs-amount-input {
    width: 100%;
    padding: 13px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.06);
    color: #e2e8f0;
    font-size: 16px;
    box-sizing: border-box;
    margin-bottom: 12px;
    outline: none;
}
.trs-amount-input:focus { border-color: rgba(139,92,246,.5); }

/* Превью баланса */
.trs-preview-box {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 12px;
}
.trs-preview-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #8888a0;
    padding: 4px 0;
}
.trs-preview-row--amount {
    color: #f87171;
    font-weight: 700;
}
.trs-preview-arrow {
    text-align: center;
    color: #4a4a5a;
    font-size: 14px;
    line-height: 1.2;
}

.trs-sheet-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}
.trs-sheet-cancel {
    flex: 1;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.06);
    color: #888;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}
.trs-sheet-confirm {
    flex: 2;
    padding: 14px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #34d399, #10b981);
    color: #0a0a1a;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

/* ── Подтверждение (поверх bottom sheet) ─────────────────────────── */
.trs-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.trs-confirm-card {
    background: #1a1a2e;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 20px;
    padding: 24px 20px;
    width: 100%;
    max-width: 340px;
    text-align: center;
}
.trs-confirm-text {
    font-size: 16px;
    color: #e2e8f0;
    margin-bottom: 8px;
    line-height: 1.5;
}
.trs-confirm-warn {
    font-size: 13px;
    color: #f87171;
    margin-bottom: 20px;
}
.trs-confirm-actions {
    display: flex;
    gap: 10px;
}

/* Кликабельная зона: аватар + имя + уровень + роль (без кнопок управления) */
.clan-member-clickable {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    cursor: pointer;
    border-radius: 10px;
    padding: 6px 8px;
    margin: -6px -8px;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.clan-member-clickable:hover {
    background: rgba(139, 92, 246, 0.08);
}

.clan-member-clickable:active {
    background: rgba(139, 92, 246, 0.18);
}

.clan-member-avatar {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(145deg, #2e2547, #1e1628);
    border: 1px solid rgba(139,92,246,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: #c4b5fd;
}

.clan-member-info {
    flex: 1;
    min-width: 0;
}

.clan-member-name-row {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.clan-member-name {
    font-size: 15px;
    font-weight: 700;
    color: #e9e4ff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clan-member-sub {
    font-size: 12px;
    color: rgba(196,181,253,0.55);
    margin-top: 3px;
}

.clan-member-vip {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 7px;
    background: linear-gradient(135deg, #ffd700, #ff9f00);
    color: #171717;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.clan-member-right {
    flex-shrink: 0;
}

.clan-members-more {
    text-align: center;
    color: rgba(196,181,253,0.45);
    font-size: 13px;
    padding-top: 12px;
}

/* ---- Member actions (management panel) ---- */

.clan-member-actions {
    width: 100%;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.clan-role-select {
    flex: 1;
    min-width: 130px;
    height: 38px;
    border-radius: 10px;
    background: rgba(139,92,246,0.14);
    border: 1px solid rgba(139,92,246,0.30);
    color: #c4b5fd;
    font-size: 13px;
    font-weight: 600;
    padding: 0 10px;
    outline: none;
    cursor: pointer;
}

.clan-role-select option {
    background: #1e1628;
    color: white;
}

.clan-kick-btn {
    padding: 8px 13px;
    border-radius: 10px;
    border: none;
    background: rgba(239,68,68,0.18);
    color: #f87171;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.clan-kick-btn:active {
    background: rgba(239,68,68,0.30);
}

.clan-transfer-btn {
    padding: 8px 13px;
    border-radius: 10px;
    border: none;
    background: rgba(255,215,0,0.15);
    color: #ffd700;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.clan-transfer-btn:active {
    background: rgba(255,215,0,0.28);
}

/* ---- Manage buttons grid ---- */

.clan-manage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.clan-manage-btn {
    min-height: 54px;
    border: none;
    border-radius: 16px;
    background: rgba(139,92,246,0.18);
    border: 1px solid rgba(139,92,246,0.28);
    color: #c4b5fd;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.12s;
}

.clan-manage-btn:active {
    background: rgba(139,92,246,0.30);
    transform: scale(0.97);
}

.clan-manage-btn--settings {
    background: rgba(100,116,139,0.18);
    border-color: rgba(148,163,184,0.22);
    color: #cbd5e1;
}

/* ---- Danger zone ---- */

.clan-danger-zone {
    margin-top: 8px;
    margin-bottom: 8px;
}

.clan-leave-btn,
.clan-danger-btn {
    width: 100%;
    min-height: 50px;
    border: none;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.12s;
}

.clan-leave-btn {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.22);
    color: #f87171;
}

.clan-danger-btn {
    background: rgba(239,68,68,0.18);
    border: 1px solid rgba(239,68,68,0.30);
    color: #fca5a5;
    font-weight: 800;
}

.clan-leave-btn:active,
.clan-danger-btn:active {
    transform: scale(0.97);
}

/* ---- Search ---- */

.clan-search-header {
    margin-top: 20px;
    margin-bottom: 16px;
}

.clan-search-title {
    font-size: 22px;
    margin: 0 0 14px;
}

.clan-search-input {
    width: 100%;
    height: 48px;
    border-radius: 14px;
    background: rgba(139,92,246,0.10);
    border: 1px solid rgba(139,92,246,0.28);
    color: white;
    font-size: 15px;
    padding: 0 16px;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
    box-sizing: border-box;
}

.clan-search-input:focus {
    border-color: rgba(139,92,246,0.55);
    background: rgba(139,92,246,0.15);
}

.clan-search-input::placeholder {
    color: rgba(196,181,253,0.45);
}

.clan-search-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ---- Clan search / rating card ---- */

.clan-search-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(145deg, #242424, #1d1d1d);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 6px 20px rgba(0,0,0,0.20);
    cursor: pointer;
    transition: transform 0.12s, border-color 0.12s;
}

.clan-search-card:active {
    transform: scale(0.98);
    border-color: rgba(139,92,246,0.30);
}

.clan-search-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.clan-search-emblem {
    font-size: 34px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(139,92,246,0.30));
}

.clan-search-info {
    flex: 1;
    min-width: 0;
}

.clan-search-name {
    font-size: 15px;
    font-weight: 800;
    color: #e9e4ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clan-search-tag {
    color: #a78bfa;
    font-size: 13px;
}

.clan-search-meta {
    font-size: 13px;
    color: rgba(196,181,253,0.60);
    margin-top: 3px;
}

.clan-search-xp {
    font-size: 12px;
    color: rgba(139,92,246,0.80);
    margin-top: 2px;
    font-weight: 700;
}

.clan-search-card-right {
    flex-shrink: 0;
}

.clan-join-btn,
.clan-apply-btn {
    padding: 9px 14px;
    border-radius: 11px;
    border: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s, transform 0.12s;
}

.clan-join-btn {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.clan-apply-btn {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
}

.clan-join-btn:active,
.clan-apply-btn:active {
    transform: scale(0.95);
}

/* ---- Top clans list (no-clan screen) ---- */

.clan-top-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    transition: opacity 0.12s;
}

.clan-top-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.clan-top-item:active {
    opacity: 0.72;
}

.clan-top-rank {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(139,92,246,0.18);
    border: 1px solid rgba(139,92,246,0.28);
    color: #c4b5fd;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.clan-top-emblem {
    font-size: 28px;
    flex-shrink: 0;
}

.clan-top-info {
    flex: 1;
    min-width: 0;
}

.clan-top-name {
    font-size: 15px;
    font-weight: 700;
    color: #e9e4ff;
}

.clan-top-tag {
    color: #a78bfa;
    font-size: 13px;
}

.clan-top-meta {
    font-size: 12px;
    color: rgba(196,181,253,0.55);
    margin-top: 3px;
}

.clan-top-arrow {
    color: rgba(196,181,253,0.35);
    font-size: 20px;
    flex-shrink: 0;
}

/* ---- Pending app items (no-clan screen / my apps) ---- */

.clan-app-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.clan-app-item:last-child {
    border-bottom: none;
}

.clan-app-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.clan-app-emblem {
    font-size: 26px;
    flex-shrink: 0;
}

.clan-app-clan-info {
    flex: 1;
    min-width: 0;
}

.clan-app-clan-name {
    font-size: 14px;
    font-weight: 700;
    color: #e9e4ff;
}

.clan-app-status {
    font-size: 12px;
    color: rgba(251,191,36,0.75);
    margin-top: 2px;
}

.clan-cancel-app-btn {
    padding: 8px 12px;
    border-radius: 10px;
    border: none;
    background: rgba(239,68,68,0.14);
    border: 1px solid rgba(239,68,68,0.22);
    color: #f87171;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
}

/* ---- Application cards (moderator panel) ---- */

.clan-app-card {
    padding: 16px;
    background: rgba(139,92,246,0.07);
    border: 1px solid rgba(139,92,246,0.16);
    border-radius: 18px;
    margin-bottom: 12px;
}

.clan-app-card:last-child {
    margin-bottom: 0;
}

.clan-app-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.clan-app-user-info {
    flex: 1;
}

.clan-app-message {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.70);
    font-size: 14px;
    font-style: italic;
    margin-bottom: 12px;
    word-break: break-word;
}

.clan-app-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.clan-accept-btn {
    padding: 11px 10px;
    border-radius: 12px;
    border: none;
    background: rgba(34,197,94,0.18);
    border: 1px solid rgba(34,197,94,0.28);
    color: #4ade80;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.12s;
}

.clan-accept-btn:active {
    background: rgba(34,197,94,0.30);
    transform: scale(0.97);
}

.clan-reject-btn {
    padding: 11px 10px;
    border-radius: 12px;
    border: none;
    background: rgba(239,68,68,0.14);
    border: 1px solid rgba(239,68,68,0.24);
    color: #f87171;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.12s;
}

.clan-reject-btn:active {
    background: rgba(239,68,68,0.28);
    transform: scale(0.97);
}

/* ---- Create / Settings form ---- */

.clan-create-header h2,
.clan-section-header h2 {
    font-size: 22px;
    margin: 20px 0 16px;
    color: #e9e4ff;
}

.clan-form-group {
    margin-bottom: 18px;
}

.clan-form-group:last-child {
    margin-bottom: 0;
}

.clan-form-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: rgba(196,181,253,0.75);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.clan-form-hint {
    text-transform: none;
    font-weight: 500;
    color: rgba(196,181,253,0.45);
    letter-spacing: 0;
}

.clan-form-input {
    width: 100%;
    height: 48px;
    border-radius: 14px;
    background: rgba(139,92,246,0.09);
    border: 1px solid rgba(139,92,246,0.25);
    color: white;
    font-size: 15px;
    padding: 0 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s, background 0.15s;
}

.clan-form-input:focus {
    border-color: rgba(139,92,246,0.55);
    background: rgba(139,92,246,0.14);
}

.clan-form-textarea {
    height: auto;
    padding: 12px 14px;
    resize: none;
    line-height: 1.5;
    font-family: inherit;
}

/* Emblem picker */

.clan-emblem-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.clan-emblem-pick {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 2px solid transparent;
    background: rgba(255,255,255,0.06);
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.12s, background 0.12s, transform 0.12s;
}

.clan-emblem-pick:active {
    transform: scale(0.92);
}

.clan-emblem-pick.selected {
    border-color: #8b5cf6;
    background: rgba(139,92,246,0.22);
    box-shadow: 0 0 0 3px rgba(139,92,246,0.20);
}

.clan-emblem-preview {
    font-size: 40px;
    text-align: center;
    margin-top: 4px;
    filter: drop-shadow(0 0 10px rgba(139,92,246,0.40));
}

/* Type toggle */

.clan-type-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.clan-type-btn {
    height: 46px;
    border-radius: 13px;
    border: 1px solid rgba(139,92,246,0.22);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.50);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.clan-type-btn.active {
    background: rgba(139,92,246,0.22);
    border-color: rgba(139,92,246,0.50);
    color: #c4b5fd;
}

/* Preview card */

.clan-preview-card {
    margin-bottom: 16px;
    padding: 18px 20px;
    background: rgba(139,92,246,0.08);
    border: 1px solid rgba(139,92,246,0.20);
    border-radius: 22px;
}

.clan-preview-title {
    font-size: 13px;
    font-weight: 700;
    color: rgba(196,181,253,0.55);
    text-align: center;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.clan-preview-hero {
    text-align: center;
}

.clan-preview-emblem {
    font-size: 48px;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 12px rgba(139,92,246,0.40));
}

.clan-preview-name {
    font-size: 18px;
    font-weight: 800;
    color: #e9e4ff;
    margin-bottom: 4px;
    word-break: break-word;
}

.clan-preview-meta {
    font-size: 13px;
    color: rgba(196,181,253,0.55);
    margin-top: 6px;
}

/* Submit button */

.clan-submit-btn {
    width: 100%;
    min-height: 54px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    margin-top: 6px;
    transition: opacity 0.15s, transform 0.12s;
    box-shadow: 0 4px 20px rgba(139,92,246,0.35);
}

.clan-submit-btn:active {
    transform: scale(0.97);
}

.clan-submit-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ---- Mobile adaptations ---- */

@media (max-width: 430px) {
    .clan-hero-emblem { font-size: 58px; }
    .clan-hero-name { font-size: 22px; }
    .clan-no-clan-emblem { font-size: 54px; }
    .clan-no-clan-title { font-size: 21px; }
    .clan-emblem-pick { width: 40px; height: 40px; font-size: 20px; }
    .clan-manage-btn { font-size: 13px; min-height: 48px; }
    .clan-search-name { font-size: 14px; }
}

/* ================================================================
   UPGRADES PANEL — Phase 3.4
   ================================================================ */

/* ---- Header info card (coins + XP) ---- */

.upg-header-card {
    margin-bottom: 16px;
    padding: 22px 22px 18px;
    background: linear-gradient(145deg, #1e1628, #150f20);
    border-radius: 24px;
    border: 1px solid rgba(139,92,246,0.22);
    box-shadow: 0 10px 32px rgba(0,0,0,0.30), 0 0 0 1px rgba(139,92,246,0.07);
}

.upg-coins-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.upg-coins-icon {
    font-size: 28px;
    filter: drop-shadow(0 0 8px rgba(255,215,0,0.45));
    line-height: 1;
}

.upg-coins-amount {
    font-size: 30px;
    font-weight: 900;
    color: #ffd700;
    letter-spacing: -0.5px;
    text-shadow: 0 0 14px rgba(255,215,0,0.35);
    line-height: 1;
}

.upg-coins-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,215,0,0.55);
    align-self: flex-end;
    margin-bottom: 2px;
}

.upg-clan-lvl {
    font-size: 13px;
    color: rgba(196,181,253,0.60);
    margin-bottom: 12px;
    font-weight: 600;
}

/* ---- Upgrade cards ---- */

.upg-card {
    margin-bottom: 14px;
    padding: 20px;
    background: linear-gradient(145deg, #242424, #1d1d1d);
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 6px 20px rgba(0,0,0,0.22);
    transition: border-color 0.2s;
}

.upg-card--locked {
    opacity: 0.58;
}

.upg-card--maxed {
    border-color: rgba(255,215,0,0.28) !important;
}

/* ---- Card header row ---- */

.upg-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.upg-card-icon {
    font-size: 26px;
    line-height: 1;
    flex-shrink: 0;
}

.upg-card-title-wrap {
    flex: 1;
    min-width: 0;
}

.upg-card-name {
    font-size: 14px;
    font-weight: 900;
    color: #e9e4ff;
    letter-spacing: 0.04em;
}

.upg-level-badge {
    flex-shrink: 0;
    padding: 5px 11px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

/* ---- Level dots ---- */

.upg-dots-row {
    display: flex;
    gap: 5px;
    margin-bottom: 16px;
}

.upg-dot {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.09);
    transition: background 0.2s;
}

/* ---- Effects row ---- */

.upg-effects-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.04);
    border-radius: 14px;
    margin-bottom: 14px;
}

.upg-effect {
    flex: 1;
}

.upg-effect-label {
    font-size: 11px;
    font-weight: 700;
    color: rgba(196,181,253,0.45);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.upg-effect-value {
    font-size: 15px;
    font-weight: 800;
    color: #e9e4ff;
}

.upg-effect-arrow {
    font-size: 18px;
    color: rgba(196,181,253,0.30);
    flex-shrink: 0;
}

/* ---- Action area ---- */

.upg-action {
    /* container for lock/max/buy states */
}

.upg-lock-msg {
    padding: 12px 14px;
    border-radius: 13px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.09);
    color: rgba(255,255,255,0.42);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.upg-max-badge {
    padding: 12px 14px;
    border-radius: 13px;
    background: rgba(255,215,0,0.10);
    border: 1px solid rgba(255,215,0,0.22);
    font-size: 14px;
    font-weight: 900;
    text-align: center;
    letter-spacing: 0.04em;
}

.upg-buy-btn {
    width: 100%;
    min-height: 50px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    line-height: 1.3;
    transition: transform 0.13s, opacity 0.13s;
    padding: 10px 14px;
}

.upg-buy-btn:active:not(:disabled) {
    transform: scale(0.97);
}

.upg-buy-btn--disabled {
    background: rgba(255,255,255,0.05) !important;
    color: rgba(255,255,255,0.32) !important;
    cursor: not-allowed;
    opacity: 0.80;
}

.upg-deficit {
    font-size: 12px;
    font-weight: 600;
    color: rgba(239,68,68,0.75);
}

.upg-cost-view {
    padding: 12px 14px;
    border-radius: 13px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(196,181,253,0.60);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.upg-cost-view strong {
    color: #ffd700;
}

@media (max-width: 430px) {
    .upg-card-name { font-size: 13px; }
    .upg-buy-btn   { font-size: 14px; min-height: 46px; }
    .upg-coins-amount { font-size: 26px; }
}

/* ============================================================
   QUEST PANEL — Stage 3.6
   ============================================================ */

/* Section header line (e.g. "🗓 Ежедневные задания") */
.qst-section-hd {
    font-size: 17px;
    font-weight: 800;
    color: #e2d9f8;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.qst-section-timer {
    font-size: 12px;
    font-weight: 600;
    color: rgba(196,181,253,0.55);
    margin-left: auto;
}

/* ── Quest card ─────────────────────────────────────────── */

.qst-card {
    margin-bottom: 12px;
    padding: 18px 18px 14px;
    background: linear-gradient(145deg, #242424, #1d1d1d);
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 6px 20px rgba(0,0,0,0.22);
    transition: border-color 0.2s;
    overflow: hidden;
}

.qst-card--done {
    border-color: rgba(74,222,128,0.28) !important;
    background: linear-gradient(145deg, #1a2820, #161e18);
}

/* ── Card header row ─────────────────────────────────────── */

.qst-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.qst-type-icon {
    font-size: 26px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
    filter: drop-shadow(0 0 6px rgba(139,92,246,0.35));
}

.qst-title-wrap {
    flex: 1;
    min-width: 0;
}

.qst-title {
    font-size: 14px;
    font-weight: 800;
    color: #e9e4ff;
    line-height: 1.25;
    word-break: break-word;
}

.qst-desc {
    font-size: 12px;
    color: rgba(196,181,253,0.52);
    margin-top: 3px;
    line-height: 1.35;
    word-break: break-word;
}

/* ── Difficulty badge ───────────────────────────────────── */

.qst-diff-badge {
    flex-shrink: 0;
    padding: 3px 9px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
    align-self: flex-start;
}

.qst-diff-badge--easy {
    background: rgba(74,222,128,0.15);
    color: #4ade80;
    border: 1px solid rgba(74,222,128,0.22);
}

.qst-diff-badge--medium {
    background: rgba(250,204,21,0.15);
    color: #facc15;
    border: 1px solid rgba(250,204,21,0.22);
}

.qst-diff-badge--hard {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.22);
}

/* ── Collective label ───────────────────────────────────── */

.qst-progress-label {
    font-size: 12px;
    font-weight: 700;
    color: rgba(196,181,253,0.65);
    margin-bottom: 6px;
}

/* ── Progress bar ───────────────────────────────────────── */

.qst-bar-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.qst-bar-track {
    flex: 1;
    height: 7px;
    border-radius: 999px;
    background: rgba(255,255,255,0.10);
    overflow: hidden;
}

.qst-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
    transition: width 0.6s ease;
    box-shadow: 0 0 7px rgba(139,92,246,0.50);
}

.qst-bar-fill--done {
    background: linear-gradient(90deg, #22c55e, #4ade80);
    box-shadow: 0 0 7px rgba(74,222,128,0.45);
}

.qst-bar-text {
    font-size: 12px;
    font-weight: 700;
    color: rgba(196,181,253,0.65);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Individual contribution ────────────────────────────── */

.qst-contrib {
    font-size: 12px;
    font-weight: 600;
    color: rgba(196,181,253,0.55);
    margin-bottom: 10px;
    min-height: 16px;
}

/* ── Footer row (active quests) ─────────────────────────── */

.qst-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.qst-reward {
    font-size: 13px;
    font-weight: 800;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255,215,0,0.30);
}

.qst-timer {
    font-size: 11px;
    color: rgba(196,181,253,0.45);
    font-weight: 600;
    flex-shrink: 0;
}

/* ── Completed banner ───────────────────────────────────── */

.qst-done-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(74,222,128,0.12);
    border: 1px solid rgba(74,222,128,0.22);
    font-size: 13px;
    font-weight: 800;
    color: #4ade80;
}

.qst-done-reward {
    font-size: 12px;
    color: #ffd700;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255,215,0,0.25);
    white-space: nowrap;
}

/* ── Mobile tweaks ──────────────────────────────────────── */

@media (max-width: 430px) {
    .qst-card         { padding: 14px 14px 12px; }
    .qst-title        { font-size: 13px; }
    .qst-type-icon    { font-size: 22px; }
    .qst-diff-badge   { font-size: 10px; padding: 2px 7px; }
    .qst-done-banner  { font-size: 12px; }
    .qst-section-hd   { font-size: 15px; }
}

/* ============================================================ */
/* PERSONAL QUESTS SCREEN — Phase 4.4                          */
/* ============================================================ */

/* ── Loading / Error ────────────────────────────────────────── */
.pq-loading, .pq-error {
    text-align: center;
    padding: 40px 20px;
    color: rgba(196,181,253,0.55);
    font-size: 15px;
}

/* ── Header card ─────────────────────────────────────────────── */
.pq-header {
    background: linear-gradient(135deg, rgba(139,92,246,0.20) 0%, rgba(167,139,250,0.08) 100%);
    border: 1px solid rgba(139,92,246,0.28);
    border-radius: 18px;
    padding: 18px 18px 14px;
    margin-bottom: 20px;
}

.pq-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.pq-header-title {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pq-vip-badge {
    font-size: 11px;
    font-weight: 700;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    padding: 3px 8px;
    border-radius: 20px;
    display: inline-block;
}

.pq-level-row {
    font-size: 14px;
    color: rgba(196,181,253,0.85);
    margin-bottom: 10px;
    font-weight: 600;
}

.pq-xp-bar-wrap {
    margin-bottom: 12px;
}

.pq-xp-bar-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.10);
    overflow: hidden;
    margin-bottom: 5px;
}

.pq-xp-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
    transition: width 0.8s ease;
    box-shadow: 0 0 8px rgba(139,92,246,0.55);
    width: 0%;
}

.pq-xp-label {
    font-size: 12px;
    color: rgba(196,181,253,0.65);
    text-align: right;
}

.pq-streak {
    font-size: 16px;
    font-weight: 700;
    color: #fb923c;
    margin-bottom: 8px;
}

.pq-stats-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(196,181,253,0.65);
    font-weight: 600;
    flex-wrap: wrap;
}

.pq-stats-sep {
    color: rgba(196,181,253,0.30);
}

/* ── Section titles ──────────────────────────────────────────── */
.pq-section-title {
    font-size: 15px;
    font-weight: 800;
    color: rgba(196,181,253,0.80);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pq-section-gap {
    margin-top: 24px;
}

/* ── Quest card ──────────────────────────────────────────────── */
.pq-card {
    background: #222;
    border-radius: 16px;
    padding: 14px 16px 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(255,255,255,0.06);
    transition: border-color 0.3s;
}

.pq-card--completed {
    border-color: rgba(74,222,128,0.38);
    background: rgba(34,197,94,0.04);
}

.pq-card--claimed {
    opacity: 0.65;
    border-color: transparent;
}

.pq-card--locked {
    background: rgba(34,34,34,0.50);
    border: 1px dashed rgba(255,255,255,0.08);
}

/* ── Card head ───────────────────────────────────────────────── */
.pq-card-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.pq-icon {
    font-size: 22px;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 1px;
}

.pq-name-wrap {
    flex: 1;
    min-width: 0;
}

.pq-name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    display: block;
    margin-bottom: 3px;
    line-height: 1.3;
}

.pq-desc {
    font-size: 12px;
    color: rgba(196,181,253,0.55);
    display: block;
    line-height: 1.4;
}

/* ── Progress bar ────────────────────────────────────────────── */
.pq-bar-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.pq-bar-track {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.10);
    overflow: hidden;
}

.pq-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
    transition: width 0.6s ease;
    box-shadow: 0 0 5px rgba(139,92,246,0.45);
}

.pq-bar-fill--done {
    background: linear-gradient(90deg, #22c55e, #4ade80);
    box-shadow: 0 0 5px rgba(74,222,128,0.45);
}

.pq-bar-text {
    font-size: 11px;
    font-weight: 700;
    color: rgba(196,181,253,0.60);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Card footer ─────────────────────────────────────────────── */
.pq-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.pq-rewards-wrap {
    flex: 1;
    min-width: 0;
}

.pq-reward-text {
    font-size: 13px;
    font-weight: 800;
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255,215,0,0.25);
    display: block;
    margin-bottom: 4px;
}

.pq-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.pq-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
}

.pq-badge--cxp {
    background: rgba(139,92,246,0.18);
    color: rgba(196,181,253,0.90);
    border: 1px solid rgba(139,92,246,0.28);
}

.pq-badge--cc {
    background: rgba(255,215,0,0.10);
    color: rgba(255,215,0,0.85);
    border: 1px solid rgba(255,215,0,0.20);
}

/* ── ЗАБРАТЬ button ──────────────────────────────────────────── */
.pq-claim-btn {
    padding: 8px 16px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    color: #fff !important;
    border: none !important;
    cursor: pointer !important;
    width: auto !important;
    flex-shrink: 0 !important;
    animation: pqClaimPulse 1.8s ease-in-out infinite;
    transition: opacity 0.2s, transform 0.15s;
}

.pq-claim-btn:active { transform: scale(0.97); }

.pq-claim-btn:disabled {
    animation: none !important;
    opacity: 0.55 !important;
    cursor: not-allowed !important;
}

@keyframes pqClaimPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.55); }
    50%       { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
}

/* ── Done banner ─────────────────────────────────────────────── */
.pq-done-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    padding: 9px 13px;
    border-radius: 10px;
    background: rgba(74,222,128,0.08);
    border: 1px solid rgba(74,222,128,0.20);
    font-size: 13px;
    font-weight: 700;
    color: #4ade80;
}

.pq-done-reward {
    font-size: 12px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 6px rgba(255,215,0,0.20);
    white-space: nowrap;
}

/* ── Weekly timer ────────────────────────────────────────────── */
.pq-timer {
    font-size: 11px;
    color: rgba(196,181,253,0.42);
    font-weight: 600;
    margin-top: 7px;
}

/* ── Longterm chain ──────────────────────────────────────────── */
.pq-lt-pair {
    position: relative;
}

.pq-lt-connector {
    text-align: center;
    font-size: 14px;
    color: rgba(139,92,246,0.45);
    margin: -2px 0;
    line-height: 1.2;
}

.pq-locked-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    color: rgba(255,255,255,0.28);
    font-size: 14px;
    font-weight: 600;
}

.pq-lock-icon {
    font-size: 20px;
}

/* ── Longterm toggle ─────────────────────────────────────────── */
.pq-longterm-toggle {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.pq-longterm-toggle:active { opacity: 0.7; }

.pq-toggle-icon {
    font-size: 12px;
    color: rgba(196,181,253,0.50);
    transition: transform 0.25s;
    margin-left: 2px;
}

/* ── Adsgram link ────────────────────────────────────────────── */
.pq-adsgram-link {
    text-align: center;
    margin-top: 8px;
    margin-bottom: 4px;
    padding: 13px;
    background: rgba(52,120,246,0.10);
    border: 1px solid rgba(52,120,246,0.20);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    color: rgba(100,170,255,0.85);
    cursor: pointer;
    transition: background 0.2s;
}

.pq-adsgram-link:active {
    background: rgba(52,120,246,0.18);
}

/* ── Level-up overlay ────────────────────────────────────────── */
.pq-levelup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.pq-levelup-overlay.hidden { display: none; }

.pq-levelup-overlay.pq-levelup-visible {
    opacity: 1;
    pointer-events: auto;
}

.pq-levelup-box {
    background: linear-gradient(145deg, #1a1230, #12102a);
    border: 2px solid rgba(139,92,246,0.55);
    border-radius: 24px;
    padding: 32px 28px;
    text-align: center;
    width: 85%;
    max-width: 340px;
    box-shadow: 0 0 50px rgba(139,92,246,0.35), 0 20px 60px rgba(0,0,0,0.60);
    animation: pqLuBounce 0.42s cubic-bezier(0.36,0.07,0.19,0.97) both;
}

@keyframes pqLuBounce {
    0%   { transform: scale(0.65); opacity: 0; }
    60%  { transform: scale(1.06); opacity: 1; }
    100% { transform: scale(1); }
}

.pq-levelup-emoji {
    font-size: 56px;
    margin-bottom: 8px;
    display: block;
    animation: pqLuSpin 0.55s ease-out;
}

@keyframes pqLuSpin {
    0%   { transform: rotate(-12deg) scale(0.75); }
    55%  { transform: rotate(6deg)  scale(1.12); }
    100% { transform: rotate(0deg)  scale(1); }
}

.pq-levelup-title {
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(90deg, #a78bfa, #c4b5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.pq-levelup-num {
    font-size: 36px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 6px;
}

.pq-levelup-title-text {
    font-size: 14px;
    color: rgba(196,181,253,0.75);
    margin-bottom: 12px;
}

.pq-levelup-reward {
    font-size: 16px;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 5px;
    text-shadow: 0 0 12px rgba(255,215,0,0.35);
}

.pq-levelup-slots {
    background: rgba(34,197,94,0.10);
    border: 1px solid rgba(34,197,94,0.25);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #4ade80;
    margin: 12px 0 4px;
}

.pq-levelup-close {
    margin-top: 18px !important;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9) !important;
    padding: 13px 24px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    border-radius: 12px !important;
    color: #fff !important;
    border: none !important;
    cursor: pointer !important;
    width: 100% !important;
}

/* ── Mobile tweaks ───────────────────────────────────────────── */
@media (max-width: 430px) {
    .pq-header          { padding: 14px 14px 12px; }
    .pq-card            { padding: 12px 13px 10px; }
    .pq-levelup-box     { padding: 26px 20px; width: 90%; }
    .pq-levelup-num     { font-size: 30px; }
    .pq-levelup-emoji   { font-size: 46px; }
}

/* ======================================================= */
/* CLAN SEASON PANEL — Phase 5.8                           */
/* ======================================================= */

/* Manage-grid button colour */
.clan-manage-btn--season {
    background: linear-gradient(135deg, rgba(139,92,246,0.22), rgba(99,102,241,0.14)) !important;
    border: 1px solid rgba(139,92,246,0.40) !important;
    color: #a78bfa !important;
}
.clan-manage-btn--season:hover {
    background: linear-gradient(135deg, rgba(139,92,246,0.32), rgba(99,102,241,0.22)) !important;
}

/* Empty state */
.season-empty {
    display: flex; flex-direction: column; align-items: center;
    padding: 60px 20px; text-align: center; gap: 12px;
}
.season-empty-icon  { font-size: 56px; }
.season-empty-title { font-size: 20px; font-weight: 800; color: #c4b5fd; }
.season-empty-sub   { font-size: 14px; color: #6b7280; }

/* ====================================================================
   BATTLE PASS UI  (bp-* namespace) — Phase 6.4r
   Full mobile-first redesign: hero · segmented switch · progression line
   ==================================================================== */

/* ── Hero ─────────────────────────────────────────────────────────── */
.bp-hero {
    background: linear-gradient(135deg, rgba(139,92,246,0.22), rgba(99,102,241,0.12));
    border: 1px solid rgba(139,92,246,0.35);
    border-radius: 20px;
    padding: 18px 16px 16px;
    margin-bottom: 12px;
}
.bp-hero-eyebrow {
    font-size: 10px; font-weight: 800; letter-spacing: 0.13em;
    color: #a78bfa; text-transform: uppercase; text-align: center;
    margin-bottom: 5px;
}
.bp-hero-name {
    font-size: 20px; font-weight: 900; color: #e9d5ff;
    text-align: center; margin-bottom: 8px;
}
.bp-hero-meta {
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: 5px;
    font-size: 12px; color: #6b7280; margin-bottom: 14px;
}
.bp-hero-sep   { color: #1f2937; }
.bp-hero-time  { color: #9ca3af; }
.bp-hero-stat  { color: #6b7280; }
.bp-hero-lvl-row {
    display: flex; align-items: center;
    justify-content: space-between; margin-bottom: 7px;
}
.bp-hero-lvl-badge { font-size: 13px; color: #c4b5fd; font-weight: 700; }
.bp-hero-lvl-badge strong { font-size: 20px; font-weight: 900; }
.bp-hero-lvl-max   { font-size: 12px; color: #6b7280; font-weight: 700; }
.bp-hero-xp        { font-size: 11px; color: #8b5cf6; font-weight: 600; }
.bp-hero-bar {
    height: 10px; border-radius: 8px; overflow: hidden;
    background: rgba(139,92,246,0.14);
    border: 1px solid rgba(139,92,246,0.22);
}
.bp-hero-bar-fill {
    height: 100%; border-radius: 8px;
    background: linear-gradient(90deg, #8b5cf6, #6366f1, #a78bfa);
    transition: width 0.4s ease;
}

/* ── Segmented switch ─────────────────────────────────────────────── */
.bp-switch-wrap {
    display: flex; justify-content: center; margin: 0 0 10px;
}
.bp-switch {
    display: flex; width: 100%;
    background: rgba(17,24,39,0.85);
    border: 1px solid rgba(55,65,81,0.8);
    border-radius: 12px; padding: 3px; gap: 3px;
}
.bp-tab {
    flex: 1; padding: 9px 10px; border: none; border-radius: 9px;
    font-size: 12px; font-weight: 800; letter-spacing: 0.04em;
    cursor: pointer; background: transparent; color: #6b7280;
    transition: all 0.2s ease;
}
.bp-tab--free.bp-tab--active {
    background: rgba(96,165,250,0.18);
    color: #60a5fa;
    border: 1px solid rgba(96,165,250,0.35);
}
.bp-tab--prem.bp-tab--active {
    background: rgba(251,191,36,0.18);
    color: #fbbf24;
    border: 1px solid rgba(251,191,36,0.35);
}

/* ── Premium CTA ──────────────────────────────────────────────────── */
.bp-prem-cta {
    background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(217,119,6,0.07));
    border: 1px solid rgba(245,158,11,0.32);
    border-radius: 16px; padding: 14px 14px; margin-bottom: 12px;
}
.bp-prem-cta-inner {
    display: flex; align-items: center; gap: 12px;
}
.bp-prem-cta-left  { flex: 1; min-width: 0; }
.bp-prem-cta-title {
    font-size: 13px; font-weight: 900; color: #fbbf24; margin-bottom: 3px;
}
.bp-prem-cta-desc  { font-size: 11px; color: #b45309; line-height: 1.4; }
.bp-prem-cta-right {
    flex-shrink: 0; display: flex; flex-direction: column;
    align-items: center; gap: 6px;
}
.bp-prem-cta-price { font-size: 13px; font-weight: 900; color: #fbbf24; white-space: nowrap; }
.bp-prem-cta-btn {
    padding: 8px 14px; border: none; border-radius: 10px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff; font-size: 12px; font-weight: 800;
    cursor: pointer; white-space: nowrap;
    box-shadow: 0 3px 12px rgba(245,158,11,0.28);
    transition: opacity 0.2s;
}
.bp-prem-cta-btn:hover    { opacity: 0.88; }
.bp-prem-cta-btn:disabled { opacity: 0.5; cursor: default; }

.bp-prem-active {
    text-align: center; padding: 11px 14px; border-radius: 13px;
    margin-bottom: 12px;
    background: rgba(34,197,94,0.10);
    border: 1px solid rgba(34,197,94,0.25);
    color: #4ade80; font-size: 13px; font-weight: 800;
}

/* ── Track ────────────────────────────────────────────────────────── */
.bp-track {
    position: relative;
    padding-bottom: 16px;
}
/* Vertical progression line */
.bp-track::before {
    content: '';
    position: absolute;
    left: 16px;          /* centre of the 33 px node column  */
    top: 20px; bottom: 20px;
    width: 2px;
    background: linear-gradient(to bottom,
        rgba(99,102,241,0.55) 0%,
        rgba(139,92,246,0.20) 70%,
        rgba(99,102,241,0.04) 100%
    );
    border-radius: 1px;
    z-index: 0;
}

/* ── Level card ───────────────────────────────────────────────────── */
.bp-card {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 4px 0; position: relative;
}
.bp-card--current-level { padding: 6px 0 8px; }
.bp-card--milestone     { padding: 6px 0 8px; }
.bp-card--grand         { padding: 8px 0 16px; }

/* Node column — sits on top of the progression line */
.bp-card-left {
    width: 33px; flex-shrink: 0;
    display: flex; justify-content: center;
    padding-top: 3px; position: relative; z-index: 1;
}

/* ── Node circle ──────────────────────────────────────────────────── */
.bp-node {
    width: 24px; height: 24px; border-radius: 50%;
    border: 2px solid #1f2937; background: #0f1319;
    display: flex; align-items: center; justify-content: center;
    font-size: 9px; font-weight: 900; color: #374151;
    flex-shrink: 0; transition: all 0.2s;
}
.bp-node--done {
    border-color: #059669; background: #052e1c; color: #34d399; font-size: 11px;
}
.bp-node--current {
    border-color: #6366f1; background: #1e1b4b; color: #a5b4fc;
    font-size: 10px; box-shadow: 0 0 10px rgba(99,102,241,0.50);
}
.bp-node--future { border-color: #1a2030; color: #2d3748; }
.bp-node--milestone {
    width: 28px; height: 28px;
    border-color: #d97706; background: #1c1006; color: #fbbf24;
    font-size: 11px; box-shadow: 0 0 8px rgba(245,158,11,0.22);
}
.bp-node--milestone.bp-node--done {
    color: #fbbf24; font-size: 10px;
}
.bp-node--grand {
    width: 32px; height: 32px; font-size: 15px;
    border-color: #f59e0b;
    background: linear-gradient(135deg, #1c1006, #2d1800);
    color: #fbbf24; box-shadow: 0 0 14px rgba(245,158,11,0.38);
}

/* ── Card right side ──────────────────────────────────────────────── */
.bp-card-right {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: 4px;
}

/* Milestone / grand banners */
.bp-milestone-label {
    font-size: 10px; font-weight: 900; color: #fbbf24;
    letter-spacing: 0.10em; text-transform: uppercase; padding: 2px 0;
}
.bp-grand-label {
    font-size: 11px; font-weight: 900; color: #fbbf24;
    letter-spacing: 0.06em; text-align: center;
    text-shadow: 0 0 12px rgba(251,191,36,0.45);
    padding: 6px 0 8px;
    border-bottom: 1px solid rgba(251,191,36,0.22);
    margin-bottom: 4px;
}

/* ── Reward slot ──────────────────────────────────────────────────── */
.bp-card-slots { display: flex; flex-direction: column; gap: 4px; }
.bp-card-slot {
    display: flex; align-items: center;
    justify-content: space-between; gap: 8px;
    padding: 7px 10px; border-radius: 10px;
    border: 1px solid transparent;
    background: rgba(17,24,39,0.55); min-height: 38px;
    transition: all 0.2s;
}
.bp-slot-left {
    display: flex; flex-direction: column; gap: 1px;
    min-width: 0; flex: 1;
}
.bp-slot-label {
    font-size: 9px; font-weight: 800;
    letter-spacing: 0.10em; line-height: 1;
}
.bp-slot-reward {
    font-size: 11px; font-weight: 600;
    color: #d1d5db; line-height: 1.45;
    word-break: break-word;
}
.bp-slot-icon { font-size: 13px; flex-shrink: 0; color: #374151; }
.bp-claim-btn {
    padding: 5px 11px; border: none; border-radius: 8px;
    font-size: 11px; font-weight: 800; cursor: pointer;
    flex-shrink: 0; transition: opacity 0.2s; white-space: nowrap;
}
.bp-claim-btn:hover    { opacity: 0.85; }
.bp-claim-btn:disabled { opacity: 0.5; cursor: default; }

/* FREE track colours */
.bp-card-slot--free .bp-slot-label { color: rgba(96,165,250,0.80); }
.bp-card-slot--free { border-color: rgba(96,165,250,0.10); }
.bp-card-slot--free.bp-slot--available {
    border-color: rgba(96,165,250,0.48);
    background: rgba(30,58,138,0.22);
    box-shadow: 0 0 8px rgba(96,165,250,0.10);
}
.bp-card-slot--free.bp-slot--claimed {
    border-color: rgba(16,185,129,0.18); background: rgba(5,46,28,0.20);
}
.bp-card-slot--free.bp-slot--claimed  .bp-slot-reward { color: #4b5563; }
.bp-card-slot--free.bp-slot--claimed  .bp-slot-icon   { color: #059669; font-weight: 900; font-size: 12px; }
.bp-card-slot--free.bp-slot--locked   { opacity: 0.42; }
.bp-card-slot--free .bp-claim-btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff; box-shadow: 0 2px 8px rgba(59,130,246,0.28);
}

/* PREMIUM track colours */
.bp-card-slot--premium .bp-slot-label { color: rgba(251,191,36,0.80); }
.bp-card-slot--premium { border-color: rgba(251,191,36,0.08); }
.bp-card-slot--premium.bp-slot--available {
    border-color: rgba(251,191,36,0.42);
    background: rgba(120,53,15,0.18);
    box-shadow: 0 0 8px rgba(251,191,36,0.10);
}
.bp-card-slot--premium.bp-slot--claimed {
    border-color: rgba(16,185,129,0.18); background: rgba(5,46,28,0.20);
}
.bp-card-slot--premium.bp-slot--claimed  .bp-slot-reward { color: #4b5563; }
.bp-card-slot--premium.bp-slot--claimed  .bp-slot-icon   { color: #059669; font-weight: 900; font-size: 12px; }
.bp-card-slot--premium.bp-slot--locked,
.bp-card-slot--premium.bp-slot--prem-locked { opacity: 0.38; }
.bp-card-slot--premium .bp-claim-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff; box-shadow: 0 2px 8px rgba(245,158,11,0.28);
}

/* Milestone slot overrides */
.bp-card--milestone .bp-card-slot { border-color: rgba(245,158,11,0.18); background: rgba(28,16,6,0.50); }
.bp-card--milestone .bp-card-slot.bp-slot--available {
    border-color: rgba(245,158,11,0.50); box-shadow: 0 0 10px rgba(245,158,11,0.14);
}

/* Grand (Level 50) slot overrides */
.bp-card--grand .bp-card-slot     { padding: 11px 14px; border-radius: 12px; min-height: 50px; }
.bp-card--grand .bp-card-slot--free {
    border-color: rgba(251,191,36,0.28); background: rgba(120,53,15,0.18);
}
.bp-card--grand .bp-card-slot--premium {
    border-color: rgba(139,92,246,0.32); background: rgba(88,28,135,0.14);
}
.bp-card--grand .bp-slot-reward  { font-size: 12px; font-weight: 700; }

/* Current-level glow on the card */
.bp-card--current-level > .bp-card-right > .bp-card-slots > .bp-card-slot--free {
    border-color: rgba(99,102,241,0.50) !important;
    background: rgba(30,27,75,0.35) !important;
    box-shadow: 0 0 12px rgba(99,102,241,0.14) !important;
}

/* ── Tab filtering: show only active track's slots ────────────────── */
.bp-track[data-active-track="free"]    .bp-card-slot--premium { display: none; }
.bp-track[data-active-track="premium"] .bp-card-slot--free    { display: none; }
/* Grand card (Level 50): always show BOTH tracks */
.bp-card--grand .bp-card-slot { display: flex !important; }

/* (season-progress, season-level, season-bar removed — replaced by bp-hero) */

/* (season-rating, season-tabs, season-track, season-premium-btn, sp-legend removed — replaced by bp-*) */

/* (sp-track, sp-row, sp-slot, sp-milestone, sp-grand removed — replaced by bp-*) */

/* ====================================================================
   CLAN STATS  (cs-*)
   showClanStats screen — Phase 5.7 / 5.9
   ==================================================================== */

/* ── Hero banner ─────────────────────────────────────────────────── */
.cs-hero {
    text-align: center;
    padding: 10px 0 6px;
}
.cs-hero-title {
    font-size: 18px;
    font-weight: 900;
    color: #e2d9f8;
    letter-spacing: 0.06em;
}

/* ── Stat rows: label ↔ value on one line ──────────────────────── */
.cs-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    gap: 8px;
}
.cs-stat-row:last-child { border-bottom: none; }

.cs-stat-label {
    font-size: 13px;
    color: rgba(196,181,253,0.70);
    flex-shrink: 0;
}
.cs-stat-val {
    font-size: 14px;
    font-weight: 700;
    color: #e2d9f8;
    text-align: right;
}

/* ── Progress bars ─────────────────────────────────────────────── */
.cs-bar-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 14px;
}
.cs-bar-track {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.10);
    border-radius: 99px;
    overflow: hidden;
}
.cs-bar-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.4s ease;
}
.cs-bar--xp    { background: linear-gradient(90deg, #a78bfa, #8b5cf6); }
.cs-bar--power { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.cs-bar-label {
    font-size: 12px;
    font-weight: 700;
    color: rgba(196,181,253,0.70);
    min-width: 32px;
    text-align: right;
    flex-shrink: 0;
}

/* ── Clan Power big number ─────────────────────────────────────── */
.cs-power-number {
    font-size: 42px;
    font-weight: 900;
    color: #fbbf24;
    text-align: center;
    line-height: 1.1;
    margin: 4px 0 12px;
    letter-spacing: -0.02em;
}

/* ── Power breakdown 2-column grid ────────────────────────────── */
.cs-breakdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}
.cs-bd-item {
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cs-bd-label {
    font-size: 11px;
    color: rgba(196,181,253,0.60);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.cs-bd-val {
    font-size: 18px;
    font-weight: 800;
    color: #e2d9f8;
}

/* ── Rating 3-column grid ──────────────────────────────────────── */
.cs-rating-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 4px;
}
.cs-rating-item {
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cs-rating-label {
    font-size: 11px;
    color: rgba(196,181,253,0.60);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.cs-rating-rank {
    font-size: 20px;
    font-weight: 900;
    color: #e2d9f8;
    line-height: 1;
}
.cs-rating-sub {
    font-size: 11px;
    color: rgba(196,181,253,0.50);
}

/* ── Battle section ────────────────────────────────────────────── */
.cs-battle-summary {
    font-size: 15px;
    font-weight: 700;
    color: #e2d9f8;
    margin-bottom: 6px;
}
.cs-winrate {
    font-size: 13px;
    color: #4ade80;
    font-weight: 700;
    margin-bottom: 12px;
}

/* ── Active battle / event badge ───────────────────────────────── */
.cs-active-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #4ade80;
    background: rgba(74,222,128,0.10);
    border: 1px solid rgba(74,222,128,0.25);
    border-radius: 10px;
    padding: 6px 12px;
    margin: 8px 0;
}

/* ── Top-member leaderboard rows ───────────────────────────────── */
.cs-top-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    transition: background 0.15s;
    border-radius: 8px;
}
.cs-top-row:last-child { border-bottom: none; }
.cs-top-row:active { background: rgba(255,255,255,0.04); }

.cs-top-avatar {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}
.cs-top-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.cs-top-name {
    font-size: 14px;
    font-weight: 700;
    color: #e2d9f8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cs-top-val {
    font-size: 12px;
    color: rgba(196,181,253,0.65);
}

/* =========================================================
   BATTLE PANEL — Phase 6.2
   ========================================================= */

/* Navigation button */
.clan-manage-btn--battle {
    background: linear-gradient(135deg, rgba(239,68,68,0.22), rgba(220,38,38,0.14)) !important;
    border: 1px solid rgba(239,68,68,0.40) !important;
    color: #f87171 !important;
}
.clan-manage-btn--battle:hover {
    background: linear-gradient(135deg, rgba(239,68,68,0.32), rgba(220,38,38,0.24)) !important;
}

/* VS header */
.battle-vs-header {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; padding: 16px 0 8px;
}
.battle-vs-clan {
    flex: 1; text-align: center;
}
.battle-vs-name {
    font-size: 14px; font-weight: 700; color: #f1f5f9;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.battle-vs-tag  { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.battle-vs-power { font-size: 12px; color: #f87171; margin-top: 2px; }
.battle-vs-sep  { font-size: 22px; font-weight: 900; color: #ef4444; flex-shrink: 0; }

/* Score row */
.battle-score-row {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; padding: 8px 0 4px;
}
.battle-score-own      { font-size: 32px; font-weight: 900; color: #34d399; min-width: 60px; text-align: right; }
.battle-score-opp      { font-size: 32px; font-weight: 900; color: #f87171; min-width: 60px; text-align: left; }
.battle-score-dash     { font-size: 24px; color: #64748b; }

/* Progress bar */
.battle-progress-wrap  { padding: 4px 0 8px; }
.battle-progress-track {
    height: 10px; border-radius: 5px;
    background: rgba(100,116,139,0.3);
    overflow: hidden; position: relative;
}
.battle-progress-own {
    height: 100%; border-radius: 5px;
    background: linear-gradient(90deg, #10b981, #34d399);
    transition: width 0.6s ease;
}
.battle-progress-labels {
    display: flex; justify-content: space-between;
    font-size: 11px; color: #94a3b8; margin-top: 4px;
}

/* Timer */
.battle-timer {
    text-align: center; padding: 8px 0;
    font-size: 13px; color: #94a3b8;
}
.battle-timer-val {
    font-size: 18px; font-weight: 700; color: #fbbf24;
    font-variant-numeric: tabular-nums;
}
.battle-timer-label { margin-top: 2px; }

/* Status badge */
.battle-status-badge {
    display: inline-block; padding: 3px 10px;
    border-radius: 12px; font-size: 12px; font-weight: 700;
    margin: 4px auto; text-align: center;
}
.battle-status-badge--winning {
    background: rgba(16,185,129,0.15); color: #34d399;
    border: 1px solid rgba(16,185,129,0.3);
}
.battle-status-badge--losing {
    background: rgba(239,68,68,0.15); color: #f87171;
    border: 1px solid rgba(239,68,68,0.3);
}
.battle-status-badge--even {
    background: rgba(251,191,36,0.15); color: #fbbf24;
    border: 1px solid rgba(251,191,36,0.3);
}

/* Contribution card */
.battle-contrib-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 8px;
}
.battle-contrib-total { font-size: 22px; font-weight: 800; color: #f1f5f9; }
.battle-contrib-cap   { font-size: 12px; color: #94a3b8; text-align: right; }
.battle-contrib-bar-wrap { margin-bottom: 10px; }
.battle-contrib-bar-track {
    height: 6px; border-radius: 3px;
    background: rgba(100,116,139,0.3); overflow: hidden;
}
.battle-contrib-bar-fill {
    height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, #6366f1, #a78bfa);
    transition: width 0.4s ease;
}
.battle-contrib-pct { font-size: 11px; color: #6366f1; margin-top: 2px; }

/* Source rows */
.battle-src-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 4px 0; font-size: 13px; color: #cbd5e1;
    border-bottom: 1px solid rgba(100,116,139,0.12);
}
.battle-src-row:last-child { border-bottom: none; }
.battle-src-label { flex: 1; }
.battle-src-pts   { font-weight: 700; color: #a78bfa; margin-left: 8px; }

/* How to earn */
.battle-earn-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 5px 0; font-size: 12px; color: #94a3b8;
    border-bottom: 1px solid rgba(100,116,139,0.10);
}
.battle-earn-row:last-child { border-bottom: none; }
.battle-earn-action { flex: 1; }
.battle-earn-pts    { font-weight: 700; color: #fbbf24; white-space: nowrap; }
.battle-earn-cap    { font-size: 11px; color: #64748b; margin-left: 6px; white-space: nowrap; }

/* Rewards table */
.battle-reward-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 5px 0; font-size: 13px; color: #cbd5e1;
}
.battle-reward-result { width: 72px; font-weight: 700; }
.battle-reward-result--win  { color: #34d399; }
.battle-reward-result--loss { color: #f87171; }
.battle-reward-result--draw { color: #fbbf24; }
.battle-reward-val { font-size: 12px; color: #a78bfa; }

/* Enroll / waiting screens */
.battle-enroll-card {
    padding: 24px 0; text-align: center;
}
.battle-enroll-icon  { font-size: 52px; margin-bottom: 12px; }
.battle-enroll-title { font-size: 18px; font-weight: 800; color: #f1f5f9; margin-bottom: 6px; }
.battle-enroll-sub   { font-size: 13px; color: #94a3b8; margin-bottom: 20px; }
.battle-window-btns  { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.battle-window-btn {
    padding: 10px 20px; border-radius: 10px;
    background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.35);
    color: #f87171; font-size: 14px; font-weight: 700;
    cursor: pointer; transition: background 0.2s;
}
.battle-window-btn:hover {
    background: rgba(239,68,68,0.22);
}
.battle-window-label { font-size: 13px; color: #94a3b8; margin-bottom: 6px; }

/* Waiting */
.battle-waiting-icon  { font-size: 48px; margin-bottom: 12px; }
.battle-waiting-title { font-size: 18px; font-weight: 800; color: #fbbf24; margin-bottom: 8px; }
.battle-waiting-info  { font-size: 13px; color: #94a3b8; margin-bottom: 16px; }

/* Result banner */
.battle-result-banner {
    text-align: center; padding: 20px;
    border-radius: 14px; margin-bottom: 14px;
}
.battle-result-banner--win {
    background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(5,150,105,0.08));
    border: 1px solid rgba(16,185,129,0.3);
}
.battle-result-banner--loss {
    background: linear-gradient(135deg, rgba(239,68,68,0.15), rgba(185,28,28,0.08));
    border: 1px solid rgba(239,68,68,0.3);
}
.battle-result-banner--draw {
    background: linear-gradient(135deg, rgba(251,191,36,0.15), rgba(245,158,11,0.08));
    border: 1px solid rgba(251,191,36,0.3);
}
.battle-result-banner--bye {
    background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(79,70,229,0.08));
    border: 1px solid rgba(99,102,241,0.3);
}
.battle-result-emoji  { font-size: 40px; margin-bottom: 8px; }
.battle-result-label  { font-size: 22px; font-weight: 900; }
.battle-result-banner--win  .battle-result-label { color: #34d399; }
.battle-result-banner--loss .battle-result-label { color: #f87171; }
.battle-result-banner--draw .battle-result-label { color: #fbbf24; }
.battle-result-banner--bye  .battle-result-label { color: #818cf8; }
.battle-result-score  { font-size: 14px; color: #94a3b8; margin-top: 4px; }

/* History list */
.battle-hist-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid rgba(100,116,139,0.15);
    cursor: pointer;
}
.battle-hist-row:last-child { border-bottom: none; }
.battle-hist-opp   { font-size: 13px; color: #f1f5f9; flex: 1; }
.battle-hist-score { font-size: 13px; color: #94a3b8; margin: 0 8px; }
.battle-hist-badge {
    font-size: 11px; font-weight: 700; padding: 2px 8px;
    border-radius: 8px;
}
.battle-hist-badge--win  { background: rgba(16,185,129,0.15); color: #34d399; }
.battle-hist-badge--loss { background: rgba(239,68,68,0.15);  color: #f87171; }
.battle-hist-badge--draw { background: rgba(251,191,36,0.15); color: #fbbf24; }
.battle-hist-badge--bye  { background: rgba(99,102,241,0.15); color: #818cf8; }

/* Starts-soon overlay */
.battle-starts-soon { text-align: center; padding: 16px 0 8px; }
.battle-starts-label { font-size: 13px; color: #94a3b8; }
.battle-starts-timer { font-size: 20px; font-weight: 800; color: #fbbf24; }

/* No-enroll notice */
.battle-no-enroll-note {
    font-size: 12px; color: #6b7280; text-align: center;
    padding: 10px; border-radius: 8px;
    background: rgba(100,116,139,0.08);
    border: 1px solid rgba(100,116,139,0.15);
}

/* Boost badge */
.battle-boost-badge {
    display: inline-block; padding: 2px 10px; border-radius: 10px;
    font-size: 11px; font-weight: 700;
    background: rgba(251,191,36,0.15); color: #fbbf24;
    border: 1px solid rgba(251,191,36,0.3);
    margin-left: 6px;
}

/* =========================================================
   BATTLE UI — Phase 6.3 redesign (btl-* namespace)
   ========================================================= */

/* ── Hero card (State 1) ───────────────────────────────── */
.btl-hero-card {
    background: linear-gradient(135deg, rgba(239,68,68,0.10), rgba(30,41,59,0.60));
    border: 1px solid rgba(239,68,68,0.22);
    border-radius: 16px;
    padding: 24px 20px 20px;
    text-align: center;
    margin: 0 0 12px;
}
.btl-hero-icon  { font-size: 40px; margin-bottom: 8px; }
.btl-hero-title {
    font-size: 20px; font-weight: 900; letter-spacing: .06em;
    color: #f1f5f9; margin-bottom: 6px;
}
.btl-hero-sub {
    font-size: 13px; color: #94a3b8; margin-bottom: 18px;
    line-height: 1.4;
}
.btl-hero-label { font-size: 12px; color: #6b7280; margin-bottom: 8px; }

/* Window buttons — dark compact */
.btl-win-row { display: flex; gap: 10px; justify-content: center; }
.btl-win-btn {
    display: flex; flex-direction: column; align-items: center;
    padding: 10px 24px; border-radius: 12px; cursor: pointer;
    background: rgba(239,68,68,0.10);
    border: 1px solid rgba(239,68,68,0.30);
    transition: background .2s;
    min-width: 100px;
}
.btl-win-btn:hover { background: rgba(239,68,68,0.20); }
.btl-win-time { font-size: 20px; font-weight: 800; color: #f87171; }
.btl-win-utc  { font-size: 10px; color: #6b7280; margin-top: 1px; }

.btl-no-access {
    font-size: 12px; color: #6b7280; padding: 10px 16px;
    border-radius: 8px; background: rgba(100,116,139,0.08);
    border: 1px solid rgba(100,116,139,0.15);
}
.btl-limit-note {
    font-size: 12px; color: #fbbf24; background: rgba(251,191,36,0.08);
    border: 1px solid rgba(251,191,36,0.20); border-radius: 8px;
    padding: 6px 10px; margin-bottom: 10px; text-align: center;
}

/* ── Matchup row (States 2, 3, 4) ──────────────────────── */
.btl-matchup-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 4px; padding: 12px 0 8px;
}
.btl-team {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; text-align: center; min-width: 0;
}
.btl-team--opp { opacity: .9; }
.btl-team-emblem {
    font-size: 28px; width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px; background: rgba(100,116,139,0.12);
    margin-bottom: 6px;
}
.btl-team-name {
    font-size: 12px; font-weight: 700; color: #f1f5f9;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 110px;
}
.btl-team-cp {
    font-size: 11px; color: #94a3b8; margin-top: 3px;
}
.btl-team-cp--own  { color: #34d399; }
.btl-team-cp--opp  { color: #f87171; }
.btl-team-cp--unk  { color: #64748b; font-style: italic; }

.btl-vs-col { flex-shrink: 0; display: flex; align-items: center; }
.btl-vs-badge {
    font-size: 15px; font-weight: 900; color: #475569;
    background: rgba(100,116,139,0.15);
    border: 1px solid rgba(100,116,139,0.25);
    border-radius: 8px; padding: 6px 8px;
}

/* ── Waiting state badges ───────────────────────────────── */
.btl-wait-badge {
    text-align: center; font-size: 14px; font-weight: 700;
    color: #fbbf24; margin: 8px 0 4px;
}
.btl-wait-meta {
    text-align: center; font-size: 12px; color: #94a3b8;
}
.btl-wait-note {
    text-align: center; font-size: 11px; color: #64748b;
    margin-top: 4px;
}
.btl-cancel-btn {
    display: block; width: 100%; margin-top: 14px;
    padding: 10px; border-radius: 10px; cursor: pointer;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.25);
    color: #f87171; font-size: 13px; font-weight: 600;
    text-align: center; transition: background .2s;
}
.btl-cancel-btn:hover { background: rgba(239,68,68,0.16); }

/* Searching pulse */
.btl-searching { animation: btlPulse 1.4s ease-in-out infinite; }
@keyframes btlPulse {
    0%, 100% { opacity: 1; } 50% { opacity: .4; }
}

/* ── Starts-soon ────────────────────────────────────────── */
.btl-start-soon {
    text-align: center; padding: 10px 0 6px;
    border-top: 1px solid rgba(100,116,139,0.15);
    margin-top: 8px;
}
.btl-start-label { font-size: 12px; color: #94a3b8; }
.btl-start-timer {
    font-size: 22px; font-weight: 800; color: #fbbf24;
    font-variant-numeric: tabular-nums; margin-top: 2px;
}

/* ── Active battle scoreboard ───────────────────────────── */
.btl-scoreboard {
    display: flex; align-items: baseline; justify-content: center;
    gap: 8px; padding: 10px 0 6px;
}
.btl-score-own  { font-size: 36px; font-weight: 900; color: #34d399; min-width: 64px; text-align: right; }
.btl-score-col  { font-size: 28px; color: #475569; }
.btl-score-opp  { font-size: 36px; font-weight: 900; color: #f87171; min-width: 64px; text-align: left; }

/* Dual progress bars */
.btl-dual-bars { padding: 6px 0 4px; }
.btl-bar-row {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 5px;
}
.btl-bar-row:last-child { margin-bottom: 0; }
.btl-bar-label { font-size: 11px; color: #64748b; width: 88px; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btl-bar-row--own  .btl-bar-label { text-align: right; order: -1; }
.btl-bar-row--opp  .btl-bar-label { text-align: left; }
.btl-bar-track {
    flex: 1; height: 8px; border-radius: 4px;
    background: rgba(100,116,139,0.20); overflow: hidden;
}
.btl-bar-fill--own {
    height: 100%; border-radius: 4px;
    background: linear-gradient(90deg, #10b981, #34d399);
    transition: width .6s ease;
}
.btl-bar-fill--opp {
    height: 100%; border-radius: 4px;
    background: linear-gradient(90deg, #ef4444, #f87171);
    transition: width .6s ease;
}

/* Status + remaining */
.btl-status-row { text-align: center; padding: 4px 0; }
.btl-remaining {
    text-align: center; font-size: 13px; color: #94a3b8;
    padding: 6px 0 2px;
}
.btl-remaining-val { font-weight: 700; color: #fbbf24; }

/* ── Contribution card ───────────────────────────────────── */
.btl-contrib-big {
    font-size: 28px; font-weight: 800; color: #f1f5f9;
    margin-bottom: 8px;
}
.btl-contrib-cap { font-size: 14px; color: #64748b; font-weight: 400; }

/* ── CTA button ──────────────────────────────────────────── */
.btl-cta-btn {
    display: block; width: 100%;
    padding: 12px; border-radius: 12px; cursor: pointer;
    background: rgba(239,68,68,0.10);
    border: 1px solid rgba(239,68,68,0.28);
    color: #f87171; font-size: 14px; font-weight: 700;
    text-align: center; transition: background .2s;
}
.btl-cta-btn:hover { background: rgba(239,68,68,0.20); }

/* ── Result card ─────────────────────────────────────────── */
.btl-result-card {
    border-radius: 16px; padding: 24px 20px;
    text-align: center; margin-bottom: 12px;
}
.btl-result-card--win {
    background: linear-gradient(135deg, rgba(16,185,129,0.14), rgba(5,150,105,0.06));
    border: 1px solid rgba(16,185,129,0.30);
}
.btl-result-card--loss {
    background: linear-gradient(135deg, rgba(239,68,68,0.14), rgba(185,28,28,0.06));
    border: 1px solid rgba(239,68,68,0.30);
}
.btl-result-card--draw {
    background: linear-gradient(135deg, rgba(251,191,36,0.14), rgba(245,158,11,0.06));
    border: 1px solid rgba(251,191,36,0.30);
}
.btl-result-card--bye {
    background: linear-gradient(135deg, rgba(99,102,241,0.14), rgba(79,70,229,0.06));
    border: 1px solid rgba(99,102,241,0.30);
}
.btl-result-emoji  { font-size: 44px; margin-bottom: 6px; }
.btl-result-title  { font-size: 26px; font-weight: 900; letter-spacing: .05em; }
.btl-result-card--win  .btl-result-title { color: #34d399; }
.btl-result-card--loss .btl-result-title { color: #f87171; }
.btl-result-card--draw .btl-result-title { color: #fbbf24; }
.btl-result-card--bye  .btl-result-title { color: #818cf8; }

.btl-result-score-row {
    display: flex; align-items: baseline; justify-content: center;
    gap: 6px; margin: 8px 0 4px;
}
.btl-result-score-own { font-size: 30px; font-weight: 900; color: #34d399; }
.btl-result-score-sep { font-size: 22px; color: #475569; }
.btl-result-score-opp { font-size: 30px; font-weight: 900; color: #f87171; }
.btl-result-vs   { font-size: 13px; color: #94a3b8; margin-top: 2px; }
.btl-result-meta { font-size: 11px; color: #64748b; margin-top: 4px; }

/* Rewards grid */
.btl-reward-grid {
    display: flex; gap: 10px; margin-bottom: 10px;
}
.btl-reward-item {
    flex: 1; background: rgba(100,116,139,0.08);
    border: 1px solid rgba(100,116,139,0.18);
    border-radius: 10px; padding: 10px 12px;
}
.btl-reward-label { font-size: 11px; color: #94a3b8; margin-bottom: 5px; }
.btl-reward-val   { font-size: 13px; color: #f1f5f9; font-weight: 600; margin-bottom: 2px; }
.btl-reward-note  { font-size: 11px; color: #64748b; text-align: center; margin-top: 4px; }

/* ── History items ───────────────────────────────────────── */
.btl-hist-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(100,116,139,0.14);
}
.btl-hist-item:last-child { border-bottom: none; }
.btl-hist-vs {
    font-size: 13px; font-weight: 600; color: #f1f5f9;
    margin-bottom: 4px;
}
.btl-hist-row {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.btl-hist-score { font-size: 13px; color: #94a3b8; font-variant-numeric: tabular-nums; }
.btl-hist-date  { font-size: 11px; color: #64748b; margin-left: auto; }
.btl-hist-badge {
    font-size: 11px; font-weight: 700; padding: 2px 8px;
    border-radius: 8px; flex-shrink: 0;
}
.btl-hist-badge--win  { background: rgba(16,185,129,0.15); color: #34d399; }
.btl-hist-badge--loss { background: rgba(239,68,68,0.15);  color: #f87171; }
.btl-hist-badge--draw { background: rgba(251,191,36,0.15); color: #fbbf24; }
.btl-hist-badge--bye  { background: rgba(99,102,241,0.15); color: #818cf8; }
.btl-hist-rewards { font-size: 11px; color: #64748b; margin-top: 4px; }

/* =========================================================
   CLAN EVENT GUIDE — Phase 6.3 (ev-guide-* namespace)
   ========================================================= */

.ev-guide-card {
    border-radius: 14px;
    border: 1px solid rgba(251,191,36,0.20);
    background: rgba(251,191,36,0.04);
    padding: 14px 14px 10px;
    margin-bottom: 12px;
}
.ev-guide-row {
    display: flex; gap: 6px; align-items: flex-start;
    margin-bottom: 7px; font-size: 13px;
}
.ev-guide-row:last-child { margin-bottom: 0; }
.ev-guide-icon  { flex-shrink: 0; width: 18px; text-align: center; }
.ev-guide-text  { color: #cbd5e1; line-height: 1.4; }
.ev-guide-label { color: #94a3b8; font-size: 11px; display: block; margin-bottom: 1px; }

.ev-guide-src-list { margin: 4px 0 4px 24px; }
.ev-guide-src-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 5px 0; font-size: 12px; color: #94a3b8;
    border-bottom: 1px solid rgba(100,116,139,0.10);
}
.ev-guide-src-row:last-child { border-bottom: none; }
.ev-guide-src-action { flex: 1; color: #cbd5e1; }
.ev-guide-src-pts    { font-weight: 700; color: #34d399; margin-left: 8px; white-space: nowrap; }
.ev-guide-src-cap    { font-size: 10px; color: #64748b; margin-left: 4px; }

.ev-guide-bonus {
    display: flex; gap: 6px; align-items: flex-start;
    font-size: 12px; color: #fbbf24; margin-top: 6px;
    padding: 6px 8px; border-radius: 8px;
    background: rgba(251,191,36,0.06);
    border: 1px solid rgba(251,191,36,0.14);
}

/* ══ Phase 6.3 Fix Pass ══════════════════════════════════════════════ */

/* Back button — tighter gap below (was 20px) */
.back-button { margin-bottom: 10px; }

/* Battle window buttons — clearly interactive, not ghost */
.btl-win-btn {
    background: rgba(239,68,68,0.22);
    border-color: rgba(239,68,68,0.55);
    box-shadow: 0 2px 8px rgba(239,68,68,0.12);
}
.btl-win-btn:hover  { background: rgba(239,68,68,0.32); }
.btl-win-btn:active { background: rgba(239,68,68,0.44); transform: scale(0.97); }
.btl-win-utc { color: #9ca3af; }

/* Cancel button — obvious danger action */
.btl-cancel-btn {
    background: rgba(239,68,68,0.18);
    border-color: rgba(239,68,68,0.45);
}
.btl-cancel-btn:active { background: rgba(239,68,68,0.30); }

/* Waiting state — no confusing "???" */
.btl-team-cp--unk {
    font-style: normal;
    font-size: 10px;
    color: #475569;
    line-height: 1.3;
}

/* Active Clan Event screen — "АКТИВНОЕ КЛАНОВОЕ СОБЫТИЕ" badge */
.ev-active-badge {
    text-align: center;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
    color: #fbbf24;
    text-transform: uppercase;
    padding: 4px 0 2px;
    opacity: .9;
}

/* Event guide — structured sections */
.ev-guide-section {
    margin: 10px 0 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #94a3b8;
}
.ev-guide-section:first-child { margin-top: 0; }

.ev-guide-numbered-row {
    display: flex; align-items: baseline; gap: 6px;
    font-size: 12px; color: #cbd5e1; padding: 4px 0;
    border-bottom: 1px solid rgba(100,116,139,0.10);
}
.ev-guide-numbered-row:last-child { border-bottom: none; }
.ev-guide-num   { min-width: 16px; color: #475569; font-size: 11px; flex-shrink: 0; }
.ev-guide-n-action { flex: 1; }
.ev-guide-n-pts { font-weight: 700; color: #34d399; white-space: nowrap; margin-left: 4px; }
.ev-guide-n-cap { font-size: 10px; color: #64748b; margin-left: 4px; white-space: nowrap; }

.ev-guide-contrib-block {
    display: flex; flex-direction: column; align-items: center;
    padding: 8px 0 4px;
}
.ev-guide-contrib-val   { font-size: 32px; font-weight: 900; color: #34d399; line-height: 1; }
.ev-guide-contrib-sub   { font-size: 11px; color: #64748b; margin-top: 3px; }

.ev-guide-reward-text {
    font-size: 13px; color: #cbd5e1; line-height: 1.5;
    padding: 4px 0;
}

/* ====================================================================
   CHAT SYSTEM — Phase 7  (gc-* global chat / cc-* clan chat)
   ==================================================================== */

/* ── Hero banner ─────────────────────────────────────────────────── */
.gc-hero {
    text-align: center;
    padding: 10px 0 6px;
}
.gc-hero-title {
    font-size: 18px; font-weight: 900; color: #e9d5ff;
    letter-spacing: 0.03em;
}
.gc-hero-sub {
    font-size: 12px; color: #9ca3af; margin-top: 3px;
}
.cc-hero--officers .gc-hero-title { color: #fbbf24; }

/* ── Message list ────────────────────────────────────────────────── */
.gc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 280px);
    min-height: 120px;
    padding: 4px 0 6px;
    scrollbar-width: none;
}
.gc-list::-webkit-scrollbar { display: none; }

.gc-loading,
.gc-empty {
    text-align: center;
    color: #6b7280;
    font-size: 13px;
    padding: 24px 0;
}

/* ── Message bubble ──────────────────────────────────────────────── */
.gc-msg {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 8px 12px;
    transition: background 0.15s;
}
.gc-msg--own {
    background: rgba(139,92,246,0.10);
    border-color: rgba(139,92,246,0.25);
}

.gc-msg-header {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.gc-msg-author {
    font-size: 12px;
    font-weight: 800;
    color: #c4b5fd;
}
.gc-msg--own .gc-msg-author { color: #a5b4fc; }
.gc-msg-time {
    font-size: 11px;
    color: #6b7280;
    margin-left: auto;
}
.gc-msg-body {
    font-size: 14px;
    color: #e9d5ff;
    line-height: 1.45;
    word-break: break-word;
    white-space: pre-wrap;
}

/* ── Role badges ─────────────────────────────────────────────────── */
.gc-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 6px;
    letter-spacing: 0.04em;
}
.gc-badge--owner  { background: rgba(251,191,36,0.20); color: #fbbf24; }
.gc-badge--deputy { background: rgba(139,92,246,0.22); color: #c4b5fd; }
.gc-badge--mod    { background: rgba(96,165,250,0.18); color: #60a5fa; }

/* ── Delete button ───────────────────────────────────────────────── */
.gc-del-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    opacity: 0.5;
    padding: 0 2px;
    transition: opacity 0.2s;
    flex-shrink: 0;
}
.gc-del-btn:hover { opacity: 1; }

/* ── Input row ───────────────────────────────────────────────────── */
.gc-input-wrap {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    margin-top: 10px;
}
.gc-textarea {
    flex: 1;
    min-width: 0;          /* prevent flex item from overflowing its container */
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 12px;
    color: #e9d5ff;
    font-size: 14px;
    padding: 10px 12px;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    line-height: 1.4;
}
.gc-textarea:focus { border-color: rgba(139,92,246,0.55); }
.gc-textarea::placeholder { color: #6b7280; }

.gc-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gc-send-btn:disabled { opacity: 0.5; cursor: default; }
.gc-send-btn:not(:disabled):hover { opacity: 0.85; }

/* ── Cooldown bar ────────────────────────────────────────────────── */
.gc-cooldown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

/* ── Clan chat manage button ─────────────────────────────────────── */
.clan-manage-btn--chat {
    background: linear-gradient(135deg, rgba(99,102,241,0.22), rgba(139,92,246,0.15));
    border-color: rgba(99,102,241,0.35);
    color: #a5b4fc;
}

/* ── Global chat menu button on main screen ──────────────────────── */
#globalChatButton {
    background: linear-gradient(135deg, rgba(99,102,241,0.85), rgba(139,92,246,0.70));
}

/* ── Clan chat menu screen ───────────────────────────────────────── */
.cc-menu-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}
.cc-menu-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    cursor: pointer;
    text-align: left;
    font-size: 15px;
    font-weight: 800;
    color: #e9d5ff;
    transition: background 0.2s, border-color 0.2s;
}
.cc-menu-btn:hover { background: rgba(255,255,255,0.09); }
.cc-menu-btn--general  { border-color: rgba(99,102,241,0.35);  color: #a5b4fc; }
.cc-menu-btn--officers { border-color: rgba(251,191,36,0.35);  color: #fbbf24; }
.cc-menu-hint {
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
}

/* ══════════════════════════════════════════════════════════════
   Phase 8: Gift System
   ══════════════════════════════════════════════════════════════ */

/* ── Gift Modal Overlay ─────────────────────────────────────── */
.gift-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 9000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.gift-modal-overlay.hidden { display: none; }

.gift-modal-sheet {
    background: #1c1c1e;
    border-radius: 24px 24px 0 0;
    padding: 24px 20px 40px;
    width: 100%;
    max-width: 430px;
    box-shadow: 0 -6px 40px rgba(0, 0, 0, 0.5);
    animation: giftSlideUp 0.25s ease;
}

@keyframes giftSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.gift-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.gift-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}
.gift-modal-close {
    background: #2c2c2e;
    border: none;
    color: #888;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.gift-modal-close:hover { background: #3a3a3c; }

.gift-modal-recipient {
    text-align: center;
    color: #aaa;
    font-size: 13px;
    margin-bottom: 16px;
}

/* ── Currency selector ──────────────────────────────────────── */
.gift-currency-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.gift-currency-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid #3a3a3c;
    background: #2c2c2e;
    border-radius: 12px;
    color: #888;
    font-size: 15px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.gift-currency-btn.active {
    border-color: #f5c518;
    color: #f5c518;
    background: rgba(245, 197, 24, 0.08);
}

/* ── Limits hint ────────────────────────────────────────────── */
.gift-limits-hint {
    text-align: center;
    color: #555;
    font-size: 12px;
    margin-bottom: 14px;
}

/* ── Inputs ─────────────────────────────────────────────────── */
.gift-field { margin-bottom: 14px; }

.gift-input {
    width: 100%;
    background: #2c2c2e;
    border: 1.5px solid #3a3a3c;
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}
.gift-input:focus { border-color: #f5c518; }

.gift-textarea {
    width: 100%;
    background: #2c2c2e;
    border: 1.5px solid #3a3a3c;
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-size: 14px;
    outline: none;
    resize: none;
    min-height: 70px;
    transition: border-color 0.2s;
}
.gift-textarea:focus { border-color: #555; }

.gift-char-count {
    text-align: right;
    color: #555;
    font-size: 12px;
    margin-top: 4px;
}

/* ── Submit button ──────────────────────────────────────────── */
.gift-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #f5c518, #e8a000);
    border: none;
    border-radius: 14px;
    color: #000;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 6px;
    transition: opacity 0.2s;
}
.gift-submit-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ── Gift History (profile screen) ─────────────────────────── */
.gift-hist-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.gift-hist-tab {
    flex: 1;
    padding: 8px;
    border: 1.5px solid #3a3a3c;
    background: #2c2c2e;
    border-radius: 10px;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.gift-hist-tab.active {
    border-color: #f5c518;
    color: #f5c518;
    background: rgba(245, 197, 24, 0.07);
}

.gift-hist-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.gift-hist-item {
    background: #2c2c2e;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}
.gift-hist-item-left { flex: 1; min-width: 0; }
.gift-hist-item-who {
    font-size: 13px;
    color: #ccc;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gift-hist-item-msg {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
    font-style: italic;
}
.gift-hist-item-time {
    font-size: 11px;
    color: #555;
    margin-top: 3px;
}

.gift-hist-item-right { text-align: right; flex-shrink: 0; }
.gift-hist-item-amount {
    font-size: 15px;
    font-weight: 700;
}
.gift-hist-item-amount.sent     { color: #f87171; }
.gift-hist-item-amount.received { color: #4ade80; }

.gift-hist-empty {
    text-align: center;
    color: #555;
    font-size: 14px;
    padding: 20px 0;
}

/* ══════════════════════════════════════════════════════════════
   Phase 9: Virtual Gift System
   ══════════════════════════════════════════════════════════════ */

/* ── Public profile action: 💸 Перевести button ─────────────── */
.transfer-button { background: #2c2c2e; color: #aaa; border: 1.5px solid #3a3a3c; }
.transfer-button:active { background: #3a3a3c; }

/* ── Public profile showcase ────────────────────────────────── */
.pub-vg-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 0 10px;
    min-height: 20px;
}
.pub-vg-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #2c2c2e;
    border: 1.5px solid #3a3a3c;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.pub-vg-pill:hover { border-color: #f5c518; }
.pub-vg-pill-emoji { font-size: 18px; }
.pub-vg-pill-count { color: #888; font-size: 12px; }

.pub-vg-list {
    margin-bottom: 10px;
    border-top: 1px solid #2c2c2e;
    padding-top: 10px;
}
.pub-vg-list.hidden { display: none; }

.pub-vg-item {
    background: #2c2c2e;
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.pub-vg-item-emoji { font-size: 26px; flex-shrink: 0; }
.pub-vg-item-info { flex: 1; min-width: 0; }
.pub-vg-item-title { font-size: 14px; font-weight: 600; color: #fff; }
.pub-vg-item-qty   { font-size: 12px; color: #888; margin-top: 1px; }
.pub-vg-item-sender{ font-size: 12px; color: #aaa; margin-top: 2px; }
.pub-vg-item-msg   { font-size: 11px; color: #666; font-style: italic; margin-top: 3px; }
.pub-vg-item-time  { font-size: 11px; color: #555; margin-top: 3px; }

/* ── Virtual gift catalog modal ─────────────────────────────── */
.vg-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.76);
    z-index: 9100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.vg-modal-overlay.hidden { display: none; }

.vg-modal-sheet {
    background: #1c1c1e;
    border-radius: 24px 24px 0 0;
    padding: 20px 16px 44px;
    width: 100%;
    max-width: 430px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 -6px 40px rgba(0, 0, 0, 0.55);
    animation: giftSlideUp 0.25s ease;
}

.vg-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.vg-modal-title  { font-size: 18px; font-weight: 700; color: #fff; }
.vg-modal-close  { background: #2c2c2e; border: none; color: #888; border-radius: 50%;
                   width: 32px; height: 32px; font-size: 16px; cursor: pointer;
                   display: flex; align-items: center; justify-content: center;
                   transition: background 0.15s; }
.vg-modal-close:hover { background: #3a3a3c; }

.vg-modal-recipient {
    text-align: center;
    color: #aaa;
    font-size: 13px;
    margin-bottom: 14px;
}

/* ── Catalog grid ───────────────────────────────────────────── */
.vg-catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.vg-catalog-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: #2c2c2e;
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 12px 6px 10px;
    cursor: pointer;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.12s;
    user-select: none;
    -webkit-user-select: none;
}
.vg-catalog-item:active { transform: scale(0.95); }
.vg-catalog-item.selected {
    border-color: #f5c518;
    box-shadow: 0 0 14px rgba(245, 197, 24, 0.45);
    background: rgba(245, 197, 24, 0.07);
}

.vg-item-emoji  { font-size: 30px; line-height: 1.1; }
.vg-item-name   { font-size: 11px; color: #ccc; text-align: center; margin-top: 2px; }
.vg-item-price  {
    font-size: 10px;
    color: #888;
    margin-top: 2px;
    text-align: center;
    white-space: nowrap;
}
.vg-item-price.coins-price { color: #f5c518; }
.vg-item-price.gold-price  { color: #60bfff; }

/* ── Quantity stepper ───────────────────────────────────────── */
.vg-stepper-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.vg-stepper-label { font-size: 14px; color: #aaa; }
.vg-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    background: #2c2c2e;
    border-radius: 12px;
    overflow: hidden;
}
.vg-stepper-btn {
    background: #3a3a3c;
    border: none;
    color: #fff;
    font-size: 20px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vg-stepper-btn:hover   { background: #4a4a4e; }
.vg-stepper-btn:disabled{ opacity: 0.3; cursor: not-allowed; }
.vg-qty-display {
    min-width: 40px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

/* ── Total cost ─────────────────────────────────────────────── */
.vg-total-cost {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #f5c518;
    margin: 8px 0 12px;
    min-height: 24px;
}
.vg-total-cost.gold { color: #60bfff; }
.vg-total-cost.none { color: #555; font-weight: 400; }

/* ── Submit button ──────────────────────────────────────────── */
.vg-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #f5c518, #e8a000);
    border: none;
    border-radius: 14px;
    color: #000;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: 4px;
}
.vg-submit-btn:disabled { opacity: 0.38; cursor: not-allowed; }

/* ── Personal virtual gift history ─────────────────────────── */
.vg-personal-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.vg-personal-item {
    background: #2c2c2e;
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.vg-personal-item-emoji { font-size: 24px; flex-shrink: 0; margin-top: 2px; }
.vg-personal-item-body  { flex: 1; min-width: 0; }
.vg-personal-item-title { font-size: 14px; font-weight: 600; color: #fff; }
.vg-personal-item-who   { font-size: 12px; color: #aaa; margin-top: 2px; }
.vg-personal-item-msg   { font-size: 11px; color: #666; font-style: italic; margin-top: 3px; }
.vg-personal-item-time  { font-size: 11px; color: #555; margin-top: 3px; }
.vg-personal-item-right { text-align: right; flex-shrink: 0; }
.vg-personal-item-amount{ font-size: 13px; font-weight: 700; color: #f5c518; }
.vg-personal-item-amount.gold-cost { color: #60bfff; }

/* =============================================================
   Phase 25 — Direct Messages
   ============================================================= */

.dm-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 12px 80px;
}

.dm-dialog-item {
    background: #2c2c2e;
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background .15s;
}
.dm-dialog-item:active { background: #3a3a3c; }

.dm-dialog-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700; color: #fff;
    flex-shrink: 0;
}

.dm-dialog-body { flex: 1; min-width: 0; }
.dm-dialog-name {
    font-size: 14px; font-weight: 600; color: #f4f4f5;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dm-dialog-last {
    font-size: 12px; color: #888;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-top: 2px;
}
.dm-dialog-last.own::before { content: "Вы: "; color: #666; }

.dm-dialog-meta { text-align: right; flex-shrink: 0; }
.dm-unread-badge {
    display: inline-block;
    background: #6366f1; color: #fff;
    font-size: 11px; font-weight: 700;
    border-radius: 999px; padding: 1px 7px; min-width: 20px;
    text-align: center;
}

/* ── Single conversation ───────────────────────────────────────── */

.dm-conv-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dm-msg {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
    background: #2c2c2e;
    color: #e4e4e7;
    align-self: flex-start;
}
.dm-msg.own {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    align-self: flex-end;
}
.dm-msg-time {
    font-size: 10px;
    margin-top: 3px;
    color: rgba(255,255,255,0.45);
    text-align: right;
}
.dm-msg:not(.own) .dm-msg-time { text-align: left; color: #666; }

.dm-input-wrap {
    position: sticky;
    bottom: 0;
    background: #1c1c1e;
    padding: 8px 12px 12px;
    display: flex;
    gap: 8px;
    align-items: flex-end;
    border-top: 1px solid #2c2c2e;
}
.dm-textarea {
    flex: 1;
    background: #2c2c2e;
    border: 1px solid #3a3a3c;
    border-radius: 12px;
    color: #f4f4f5;
    padding: 8px 12px;
    font-size: 14px;
    resize: none;
    max-height: 100px;
    outline: none;
}
.dm-send-btn {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: none; border-radius: 12px;
    color: #fff; font-size: 18px;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0;
}
.dm-send-btn:disabled { opacity: 0.45; }

.dm-hero {
    text-align: center;
    padding: 16px 16px 8px;
}
.dm-hero-title { font-size: 18px; font-weight: 700; color: #f4f4f5; }
.dm-hero-sub   { font-size: 12px; color: #888; margin-top: 3px; }

.dm-empty {
    text-align: center;
    color: #666; font-size: 13px;
    padding: 32px 20px;
}

.dm-block-note {
    font-size: 12px; color: #f87171;
    text-align: center; padding: 4px 12px 8px;
}

/* ── Moderator GC delete button ────────────────────────────────── */

.gc-mod-btn {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.5;
    font-size: 13px;
    padding: 0 3px;
    transition: opacity .15s;
}
.gc-mod-btn:hover { opacity: 1; }

/* =============================================================
   Phase 25 — Moderation Panel
   ============================================================= */

.mod-panel-overlay {
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.mod-panel-overlay.hidden { display: none; }

.mod-panel-sheet {
    background: #1c1c1e;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mod-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 10px;
    border-bottom: 1px solid #2c2c2e;
}
.mod-panel-title { font-size: 16px; font-weight: 700; color: #f4f4f5; }
.mod-panel-close {
    background: none; border: none;
    color: #888; font-size: 18px; cursor: pointer;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: background .15s;
}
.mod-panel-close:hover { background: #2c2c2e; }

.mod-panel-tabs {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid #2c2c2e;
    overflow-x: auto;
}
.mod-tab {
    flex-shrink: 0;
    background: #2c2c2e;
    border: none; border-radius: 20px;
    color: #aaa; font-size: 12px; font-weight: 600;
    padding: 6px 12px; cursor: pointer;
    transition: background .15s, color .15s;
}
.mod-tab.active { background: #4f46e5; color: #fff; }

.mod-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mod-loading { text-align: center; color: #666; padding: 24px; }
.mod-empty   { text-align: center; color: #555; font-size: 13px; padding: 24px; }

.mod-user-card {
    background: #2c2c2e;
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.mod-user-name { font-size: 14px; font-weight: 600; color: #f4f4f5; }
.mod-user-sub  { font-size: 11px; color: #888; margin-top: 2px; }
.mod-user-action {
    margin-left: auto;
    background: none; border: 1px solid #f87171;
    color: #f87171; font-size: 11px; font-weight: 600;
    border-radius: 8px; padding: 4px 10px; cursor: pointer;
    transition: background .15s;
}
.mod-user-action:hover { background: rgba(248,113,113,.15); }
.mod-user-action.green { border-color: #4ade80; color: #4ade80; }
.mod-user-action.green:hover { background: rgba(74,222,128,.12); }

.mod-del-card {
    background: #2c2c2e;
    border-radius: 12px;
    padding: 10px 14px;
}
.mod-del-content {
    font-size: 13px; color: #d4d4d8;
    white-space: pre-wrap; word-break: break-word;
}
.mod-del-meta { font-size: 11px; color: #666; margin-top: 6px; }

.mod-log-item {
    background: #2c2c2e;
    border-radius: 12px;
    padding: 10px 14px;
}
.mod-log-action {
    font-size: 13px; font-weight: 700; color: #c4b5fd;
}
.mod-log-detail { font-size: 12px; color: #888; margin-top: 3px; }
.mod-log-time   { font-size: 11px; color: #555; margin-top: 4px; }

/* Moderation menu button in main screen */
.mod-menu-btn {
    background: linear-gradient(135deg, #312e81, #4f46e5);
    border: none; border-radius: 12px;
    color: #fff; font-size: 13px; font-weight: 600;
    padding: 10px 16px; cursor: pointer; width: 100%;
    margin-top: 6px;
    transition: opacity .15s;
}
.mod-menu-btn:active { opacity: .75; }

/* Phase 25 — Moderators tab */
.mod-grant-form {
    background: #2c2c2e;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
}
.mod-grant-label { font-size: 12px; color: #aaa; margin-bottom: 8px; }
.mod-grant-row { display: flex; gap: 8px; align-items: center; }
.mod-grant-input {
    flex: 1;
    background: #1c1c1e; border: 1px solid #3a3a3c; border-radius: 10px;
    color: #f4f4f5; padding: 7px 10px; font-size: 14px; outline: none;
}
.mod-grant-btn {
    background: #4f46e5; border: none; border-radius: 10px;
    color: #fff; font-size: 13px; font-weight: 600;
    padding: 7px 14px; cursor: pointer; white-space: nowrap;
    transition: opacity .15s;
}
.mod-grant-btn:active { opacity: .75; }
.mod-grant-hint { font-size: 11px; color: #555; margin-top: 5px; }

.mod-sa-badge  { font-size: 11px; font-weight: 600; color: #fbbf24; }
.mod-mod-badge { font-size: 11px; font-weight: 600; color: #60a5fa; }

/* ═══════════════════════════════════════════════════════════════
   Phase 25b — Moderation action menu + mute/ban modals
   ═══════════════════════════════════════════════════════════════ */

/* ── Shared overlay base ──────────────────────────────────────── */
.mod-action-overlay,
.mod-mute-overlay,
.mod-ban-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 9100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.mod-action-overlay.hidden,
.mod-mute-overlay.hidden,
.mod-ban-overlay.hidden { display: none; }

/* ── Shared sheet base ────────────────────────────────────────── */
.mod-action-sheet,
.mod-mute-sheet,
.mod-ban-sheet {
    background: #1c1c1e;
    border-radius: 24px 24px 0 0;
    padding: 20px 20px 36px;
    width: 100%;
    max-width: 430px;
    box-shadow: 0 -6px 40px rgba(0,0,0,.5);
    animation: modSheetUp .22s ease;
}
@keyframes modSheetUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* ── Sheet header ─────────────────────────────────────────────── */
.mod-action-header,
.mod-mute-header,
.mod-ban-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.mod-action-title,
.mod-mute-title,
.mod-ban-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}
.mod-action-close,
.mod-mute-close,
.mod-ban-close {
    background: #2c2c2e; border: none; color: #888;
    border-radius: 50%; width: 30px; height: 30px;
    font-size: 14px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.mod-action-close:hover,
.mod-mute-close:hover,
.mod-ban-close:hover { background: #3a3a3c; }

/* ── Action list ──────────────────────────────────────────────── */
.mod-action-list { display: flex; flex-direction: column; gap: 6px; }
.mod-action-item {
    background: #2c2c2e;
    border: none;
    border-radius: 14px;
    color: #f4f4f5;
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    padding: 13px 16px;
    cursor: pointer;
    transition: background .15s;
    width: 100%;
}
.mod-action-item:active { background: #3a3a3c; }
.mod-action-item.danger { color: #ef4444; }
.mod-action-item.warn   { color: #f59e0b; }
.mod-action-item.safe   { color: #34d399; }

/* ── Mute modal ───────────────────────────────────────────────── */
.mod-mute-user,
.mod-ban-user {
    text-align: center;
    color: #aaa;
    font-size: 13px;
    margin-bottom: 14px;
}
.mod-mute-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.mod-mute-opt {
    background: #2c2c2e;
    border: 2px solid transparent;
    border-radius: 12px;
    color: #f4f4f5;
    font-size: 14px;
    padding: 10px 8px;
    cursor: pointer;
    text-align: center;
    transition: border-color .15s, background .15s;
}
.mod-mute-opt.selected {
    border-color: #6366f1;
    background: #312e81;
    color: #a5b4fc;
}
.mod-mute-reason,
.mod-ban-reason {
    width: 100%;
    background: #2c2c2e;
    border: 1px solid #3a3a3c;
    border-radius: 12px;
    color: #f4f4f5;
    font-size: 14px;
    padding: 10px 14px;
    margin-bottom: 14px;
    box-sizing: border-box;
    outline: none;
}
.mod-mute-submit {
    width: 100%;
    background: #6366f1;
    border: none; border-radius: 14px;
    color: #fff; font-size: 15px; font-weight: 700;
    padding: 14px;
    cursor: pointer;
    transition: opacity .15s;
}
.mod-mute-submit:disabled { opacity: .5; cursor: default; }
.mod-mute-submit:active { opacity: .8; }

/* ── Ban modal ────────────────────────────────────────────────── */
.mod-ban-actions {
    display: flex;
    gap: 10px;
}
.mod-ban-cancel {
    flex: 1; background: #2c2c2e; border: none;
    border-radius: 14px; color: #aaa;
    font-size: 15px; font-weight: 600;
    padding: 14px; cursor: pointer; transition: background .15s;
}
.mod-ban-cancel:active { background: #3a3a3c; }
.mod-ban-confirm {
    flex: 2; background: #dc2626; border: none;
    border-radius: 14px; color: #fff;
    font-size: 15px; font-weight: 700;
    padding: 14px; cursor: pointer; transition: opacity .15s;
}
.mod-ban-confirm:active { opacity: .8; }

/* ── Status badges on messages ────────────────────────────────── */
.gc-status-muted { font-size: 12px; opacity: .75; }
.gc-status-banned { font-size: 12px; opacity: .75; }

/* ═══════════════════════════════════════════════════════════════
   Phase 27 — System events + role badges in Global Chat
   ═══════════════════════════════════════════════════════════════ */

/* ── System event card ────────────────────────────────────────── */
.gc-sys-event {
    background: rgba(99,102,241,.12);
    border: 1px solid rgba(99,102,241,.3);
    border-radius: 12px;
    padding: 8px 12px;
    margin: 4px 0;
    font-size: 13px;
}
.gc-sys-header {
    font-size: 11px;
    font-weight: 700;
    color: #818cf8;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 3px;
}
.gc-sys-action { color: #e0e7ff; font-weight: 500; }
.gc-sys-reason { color: #a5b4fc; font-size: 12px; margin-top: 2px; }

/* ── Role badges ──────────────────────────────────────────────── */
.gc-role-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    border-radius: 6px;
    padding: 1px 5px;
    margin-left: 4px;
    vertical-align: middle;
    line-height: 1.5;
}
.gc-role-owner    { background: rgba(251,191,36,.2); color: #fbbf24; }
.gc-role-superadmin { background: rgba(139,92,246,.2); color: #a78bfa; }
.gc-role-mod      { background: rgba(96,165,250,.15); color: #60a5fa; }

/* ── Moderator list detail lines ──────────────────────────────── */
.mod-detail-line {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   Phase 27 UI — Clickable author names + admin cards
   ═══════════════════════════════════════════════════════════════ */

/* ── Clickable author name in Global Chat ─────────────────────── */
.gc-author-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: inherit;
    cursor: pointer;
    text-align: left;
    line-height: inherit;
    vertical-align: baseline;
}
.gc-author-link:hover {
    text-decoration: underline;
    opacity: .85;
}

/* ── Admin card in administration tab ────────────────────────── */
.mod-user-card--admin {
    cursor: pointer;
    transition: background .15s;
}
.mod-user-card--admin:hover {
    background: rgba(255,255,255,.06);
}

/* Role label line (below name, above sub) */
.mod-user-role {
    font-size: 12px;
    color: #a5b4fc;
    margin-top: 1px;
}

/* ═══════════════════════════════════════════════════════════════
   👑 Публичный список администрации (adminListScreen)
   ═══════════════════════════════════════════════════════════════ */

#adminListScreen {
    /* Full-viewport overlay — escapes .container padding so it fills edge-to-edge */
    position: fixed;
    inset: 0;
    z-index: 100;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    background: var(--bg, #0f0f1a);
    padding-bottom: 24px;
}
/* ID-selector specificity (1,0,0) beats .hidden class (0,1,0), so we need
   a combined selector (1,1,0) to correctly hide this fixed overlay. */
#adminListScreen.hidden { display: none; }

.al-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 10px;
    /* Fixed overlay: offset below Telegram header */
    padding-top: calc(14px + var(--tg-content-safe-area-inset-top, 0px) + var(--tg-safe-area-inset-top, 0px));
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.al-back-btn {
    background: none;
    border: none;
    color: #a5b4fc;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px 4px 0;
    flex-shrink: 0;
}
.al-title {
    font-size: 17px;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
}
.al-subtitle {
    font-size: 13px;
    color: #94a3b8;
    margin: 10px 16px 16px;
    line-height: 1.5;
}
.al-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 16px;
    box-sizing: border-box;
    width: 100%;
}
.al-loading, .al-empty {
    text-align: center;
    color: #64748b;
    font-size: 14px;
    padding: 32px 0;
}

/* ── Admin card ───────────────────────────────────────────────── */
.al-card {
    /* Vertical stack: name → role → button.
       Column direction means the global button{width:100%} applies
       in-column, not in-row, so it can never cause horizontal overflow. */
    display: flex;
    flex-direction: column;
    gap: 0;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 14px;
    padding: 14px;
    box-sizing: border-box;
    width: 100%;
    cursor: pointer;
}
.al-card:active { opacity: .85; }
.al-card-info {
    /* tappable area for public profile */
    min-width: 0;
}
.al-card-name {
    font-size: 15px;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.al-card-role {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 3px;
}
.al-card-dm {
    /* Full-width DM button at the bottom of the card.
       width:100% comes from the global button{} rule — correct in column layout. */
    background: rgba(99,102,241,.18);
    border: 1px solid rgba(99,102,241,.35);
    color: #a5b4fc;
    border-radius: 9px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    box-sizing: border-box;
}
.al-card-dm:active { opacity: .75; }

/* ═══════════════════════════════════════════════════════════════
   UNIFIED DESIGN PASS — legacy screens aligned with the reference UI
   ═══════════════════════════════════════════════════════════════ */

body { background: #0f0f1a; }

.card {
  background: linear-gradient(145deg, #242424, #1d1d1d);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 4px 16px rgba(0,0,0,0.20);
}

.business-card {
  background: linear-gradient(145deg, #1e1e2e, #181824);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 4px 16px rgba(0,0,0,0.24);
  padding: 14px;
  margin-bottom: 12px;
  overflow: hidden;
}
/* Name row */
.bc-name {
  font-size: 15px;
  font-weight: 800;
  color: #f1f5f9;
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 2-column stats grid */
.bc-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}
.bc-stat {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 7px 9px;
  min-width: 0;
}
.bc-stat-label {
  display: block;
  font-size: 10px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
}
.bc-stat-value {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bc-profit { color: #4ade80; }
/* Action buttons row */
.bc-actions { display: flex; flex-direction: column; gap: 7px; }
.business-card .buy-button {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-radius: 12px;
  font-size: 13px;
  min-height: 42px;
}
.business-card .buy-button:disabled {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #64748b;
  opacity: 1;
}

.back-button {
  background: rgba(255,255,255,0.07) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 12px;
  color: #a5b4fc;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 16px;
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  min-height: 40px;
  transition: opacity .15s;
}
.back-button:active { opacity: .7; transform: none; }

.buttons button, .buttons-grid button {
  font-size: 15px;
  min-height: 52px;
  border-radius: 16px;
  font-weight: 700;
  transition: opacity .15s, transform .12s;
}
.buttons button:active, .buttons-grid button:active { transform: scale(0.97); }

.player-name {
  font-size: 22px;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: -0.3px;
}
.player-header { margin-bottom: 18px; }
.vip-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  color: #fff;
  vertical-align: middle;
  margin-left: 8px;
}

.stat-card {
  background: linear-gradient(145deg, #1e1e2e, #181824);
  border-radius: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 4px 16px rgba(0,0,0,0.28);
  text-align: center;
}
.stat-title {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}
.stat-value, #balance {
  font-size: 26px;
  font-weight: 900;
  color: #4ade80;
  line-height: 1.1;
}
#incomePerHour { font-size: 20px; font-weight: 800; color: #4ade80; }

#playerSearchInput {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  padding: 12px 14px;
  color: #f1f5f9;
  font-size: 14px;
  outline: none;
}
#playerSearchInput::placeholder { color: #64748b; }
#playerSearchInput:focus { border-color: rgba(139,92,246,0.40); }
.player-card {
  background: linear-gradient(145deg, #1e1e2e, #181824);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.07);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: opacity .15s;
  min-width: 0;
}
.player-card:active { opacity: .75; }
.player-card-info { flex: 1; min-width: 0; }
.player-card-name {
  font-size: 14px; font-weight: 700; color: #f1f5f9;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-card-meta {
  font-size: 12px; color: #64748b; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-card-badge {
  flex-shrink: 0;
  background: rgba(139,92,246,0.15);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: 8px;
  font-size: 11px; font-weight: 700; color: #a78bfa;
  padding: 3px 8px;
}

#businessesScreen > h1,
#shopScreen > h1,
#playersScreen > h1,
#vipScreen > h1,
#withdrawScreen > h1,
#achievementScreen > h1,
#referralScreen > h1 {
  font-size: 20px;
  font-weight: 800;
  color: #f1f5f9;
  margin-bottom: 18px;
  text-align: center;
}

.shop-card {
  background: linear-gradient(145deg, #1e1e2e, #181824);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.07);
  padding: 18px 16px 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}
.shop-card-title { font-size: 16px; font-weight: 700; color: #f1f5f9; }
.shop-card-desc { font-size: 13px; color: #94a3b8; line-height: 1.45; margin-bottom: 2px; }
#buyGoldButton { background: linear-gradient(135deg, #f59e0b, #d97706) !important; border-radius: 12px; font-size: 14px; min-height: 46px; }
#buyVipButton { background: linear-gradient(135deg, #8b5cf6, #6d28d9) !important; border-radius: 12px; font-size: 14px; min-height: 46px; }
#depositButton { background: linear-gradient(135deg, #22c55e, #16a34a) !important; border-radius: 12px; font-size: 14px; min-height: 46px; }
#promoButton { background: linear-gradient(135deg, #06b6d4, #0891b2) !important; border-radius: 12px; font-size: 14px; min-height: 46px; }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
#claimButton {
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  min-height: 54px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 4px 20px rgba(34,197,94,0.30);
  width: 100%;
}
.section-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 16px 0; }

/* ══════════════════════════════════════════════════════════════════
   SECONDARY SCREENS — remaining old elements unified
   ══════════════════════════════════════════════════════════════════ */

/* ── Generic .card internals (VIP, ads, referral, withdrawal, promo) */
.card h3 { font-size: 15px; font-weight: 700; color: #f1f5f9; margin: 0 0 10px; }
.card h2 { font-size: 22px; font-weight: 800; color: #a78bfa; margin: 8px 0; }
.card p  { font-size: 13px; color: #94a3b8; margin: 5px 0; line-height: 1.5; }
.card strong { color: #f1f5f9; font-weight: 700; }
/* Suppress raw <br> spacers inside cards — we use margin/gap now */
.card br { display: none; }

/* ── Referral code big display */
#referralCode { font-size: 20px; font-weight: 800; color: #a78bfa; margin: 12px 0; }

/* ── Input fields (withdrawal, promo, referral) */
#walletInput, #amountInput, #promoInput {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  padding: 12px 14px;
  color: #f1f5f9;
  font-size: 14px;
  outline: none;
  margin: 6px 0;
  display: block;
}
#walletInput:focus, #amountInput:focus, #promoInput:focus {
  border-color: rgba(139,92,246,0.45);
  background: rgba(255,255,255,0.08);
}
#walletInput::placeholder, #amountInput::placeholder, #promoInput::placeholder { color: #64748b; }

/* ── Withdrawal radio buttons */
.card label { display: block; font-size: 14px; color: #cbd5e1; margin: 8px 0; cursor: pointer; }
.card input[type="radio"] { accent-color: #8b5cf6; margin-right: 8px; }

/* ── Specific button colors (missing backgrounds from old screens) */
#watchAdButton {
  background: linear-gradient(135deg, #3478f6, #245dcc);
  border-radius: 12px; font-size: 14px; min-height: 46px;
}
#copyReferralButton {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-radius: 12px; font-size: 14px; min-height: 46px;
  margin-top: 12px;
}
#createWithdrawButton {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-radius: 12px; font-size: 14px; min-height: 46px;
  margin-top: 10px;
}
#activatePromoButton {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  border-radius: 12px; font-size: 14px; min-height: 46px;
  margin-top: 4px;
}
#saveProfileButton {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-radius: 12px; font-size: 14px; min-height: 46px;
}

/* ── VIP buy buttons */
.vip-buy-button {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border-radius: 12px; font-size: 14px; font-weight: 700;
  min-height: 46px; width: 100%; color: #fff; border: none;
  cursor: pointer; transition: opacity .15s, transform .12s;
}
.vip-buy-button:active { opacity: .75; transform: scale(0.97); }
.vip-buy-button:disabled { opacity: .4; cursor: not-allowed; }

/* VIP options container (replaces <br><br> spacing) */
.vip-options { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }

/* VIP features list */
.vip-features { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.vip-features p { margin: 0; }

/* ── Claim achievement button */
.claim-achievement-button {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-radius: 12px; font-size: 13px; font-weight: 700;
  min-height: 42px; width: 100%; color: #fff; border: none;
  cursor: pointer; margin-top: 10px;
  transition: opacity .15s, transform .12s;
}
.claim-achievement-button:active { opacity: .8; transform: scale(0.97); }

/* Achievement progress bar — upgrade inline #333/#4CAF50 without touching JS */
/* The inline style wins for width%, but we can layer a CSS-driven look via outline */
#achievementList .card { margin-bottom: 10px; }
/* Achievement progress bar — CSS classes (replaces inline #333/#4CAF50) */
.ach-track {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.10);
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0;
}
.ach-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
  border-radius: 999px;
  transition: width .3s ease;
}

/* ── Watch-ad stats nested card */
#adsScreen .card .card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 10px 0;
  box-shadow: none;
}
#adsScreen .card h3 { margin-bottom: 8px; }

/* ── Player card internals — legacy selectors hidden (replaced by .pc-*) */
.player-card h3 { display: none; }
.player-card p  { display: none; }

/* ── Business card upgrade button ─────────────────────────────── */
.upgrade-button {
  margin-top: 6px;
  background: linear-gradient(135deg, rgba(139,92,246,0.20), rgba(109,40,217,0.18));
  border: 1px solid rgba(139,92,246,0.30);
  border-radius: 12px;
  color: #a78bfa;
  font-size: 13px;
  font-weight: 600;
  min-height: 38px;
  width: 100%;
  cursor: pointer;
  transition: opacity .15s, transform .12s;
}
.upgrade-button:active { opacity: .75; transform: scale(0.97); }
.upgrade-button:disabled { opacity: .4; cursor: not-allowed; }

/* ================================================= */
/* PLAYERS SCREEN — Redesigned card                  */
/* ================================================= */

/* Reset old horizontal flex; make card vertical */
.player-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
  padding: 14px 16px !important;
  border-radius: 16px !important;
  margin-bottom: 10px !important;
  min-width: 0;
  box-sizing: border-box;
}

/* Header: rank + name */
.pc-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 9px;
}

.pc-rank {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 800;
  color: #a78bfa;
  min-width: 26px;
}

.pc-name {
  font-size: 16px;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  min-width: 0;
}

/* Meta: role tag + level badge */
.pc-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 11px;
}

.pc-badge-tag {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 3px 8px;
}

.pc-badge-level {
  font-size: 12px;
  font-weight: 600;
  color: #fbbf24;
  background: rgba(251,191,36,0.10);
  border: 1px solid rgba(251,191,36,0.20);
  border-radius: 8px;
  padding: 3px 8px;
}

/* Stats: 2-column grid */
.pc-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pc-stat-cell {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 8px 10px;
  min-width: 0;
}

.pc-stat-label {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 3px;
}

.pc-stat-val {
  font-size: 15px;
  font-weight: 700;
  color: #f1f5f9;
  overflow-wrap: anywhere;
}

/* ── Deposit / Telegram Stars packages ───────────────────────────────────── */

.dep-subtitle {
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
  margin: -4px 0 18px;
  line-height: 1.4;
}

.dep-pkg-card {
  background: linear-gradient(145deg, #1e1e2e, #181824);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  padding: 18px 16px 14px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: opacity .15s, transform .12s;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
.dep-pkg-card:active {
  opacity: .8;
  transform: scale(0.98);
}

.dep-pkg-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.dep-pkg-emoji  { font-size: 22px; }

.dep-pkg-title  {
  flex: 1;
  font-size: 17px;
  font-weight: 700;
  color: #f1f5f9;
}

.dep-pkg-stars  {
  font-size: 15px;
  font-weight: 700;
  color: #fbbf24;
}

.dep-pkg-desc   {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 6px;
  line-height: 1.4;
}

.dep-pkg-coins  {
  font-size: 14px;
  font-weight: 700;
  color: #4ade80;
  margin-bottom: 14px;
}

.dep-pkg-btn {
  width: 100%;
  min-height: 46px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s;
  box-sizing: border-box;
}
.dep-pkg-btn:active   { opacity: .75; }
.dep-pkg-btn:disabled { opacity: .45; cursor: not-allowed; }
