﻿/* CS Rabbits — logged-in dashboard (index #appContent) */

    .wrap {
      position: relative; z-index: 1;
      max-width: 1280px; margin: 0 auto;
      padding: 20px 24px 60px;
    }

    /* ═══════════════════════════════════════════════
       BANNERS
       ═══════════════════════════════════════════════ */
    .banner {
      position: relative;
      overflow: hidden;
      padding: 10px 14px;
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 6px;
      font-size: 13px; margin-bottom: 16px;
      color: var(--muted);
      transition: all .3s;
    }
    .banner::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      bottom: 0;
      width: 3px;
      border-radius: 3px 0 0 3px;
    }
    .banner.err::before { background: var(--red); }
    .banner.ok::before { background: var(--mint); }
    .banner.err { border-color: rgba(240,72,72,.3); color: #faa; }
    .banner.ok { border-color: rgba(48,232,160,.3); color: var(--mint); }

    body.is-guest #profile,
    body.is-guest #challengesBlock {
      display: none !important;
    }

    /* ═══════════════════════════════════════════════
       PROFILE
       ═══════════════════════════════════════════════ */
    .home-layout {
      display: grid;
      grid-template-columns: minmax(200px, 240px) minmax(0, 1fr) minmax(220px, 280px);
      gap: 16px;
      align-items: start;
    }
    .home-sidebar {
      min-width: 0;
      position: sticky;
      top: calc(var(--home-banner-h) + var(--home-header-h) + 12px);
    }
    .dashboard-main {
      min-width: 0;
    }
    .weekly-prizes-block {
      display: none;
      margin-bottom: 16px;
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 14px 16px;
    }
    .weekly-prizes-block h3 {
      font-size: 14px;
      font-weight: 800;
      margin: 0 0 10px;
      color: var(--text);
    }
    .weekly-prizes-hint {
      font-size: 12px;
      color: var(--muted);
      margin: 0 0 8px;
      line-height: 1.5;
    }
    .weekly-prizes-entry-rule {
      font-size: 13px;
      font-weight: 600;
      color: var(--text);
      margin: 0 0 8px;
      line-height: 1.55;
    }
    .weekly-prizes-entry-rule.is-qualified {
      color: var(--mint);
    }
    .weekly-prizes-status {
      font-size: 13px;
      font-weight: 700;
      color: var(--text);
      margin: 0 0 8px;
      line-height: 1.45;
    }
    .weekly-prizes-block.is-confirmed {
      border-color: rgba(48, 232, 160, 0.35);
    }
    .weekly-prizes-progress {
      display: none;
      margin: 0 0 14px;
    }
    .weekly-prizes-progress.is-visible {
      display: block;
    }
    .weekly-prizes-progress-track {
      height: 8px;
      border-radius: 999px;
      background: var(--surface);
      border: 1px solid var(--border);
      overflow: hidden;
    }
    .weekly-prizes-progress-fill {
      height: 100%;
      border-radius: 999px;
      background: linear-gradient(90deg, var(--orange), var(--gold));
      width: 0;
      transition: width 0.25s ease;
    }
    .weekly-prizes-block.is-confirmed .weekly-prizes-progress-fill {
      background: linear-gradient(90deg, var(--mint), var(--gold));
    }
    .weekly-prizes-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
      gap: 10px;
    }
    .weekly-prize-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 8px;
      text-align: center;
    }
    .weekly-prize-card img {
      width: 100%;
      max-height: 72px;
      object-fit: contain;
      display: block;
      margin: 0 auto 6px;
      background: #111;
      border-radius: 6px;
    }
    .weekly-prize-card span {
      font-size: 11px;
      font-weight: 600;
      color: var(--text);
      line-height: 1.3;
      display: block;
    }
    .profile-trade-box {
      margin: 0;
      padding: 0;
      border: 0;
    }
    .profile-promo-box {
      margin: 0;
      padding: 0;
      border: 0;
    }
    .profile-promo-box label {
      display: block;
      font-size: 11px;
      color: var(--muted);
      margin-bottom: 6px;
    }
    .profile-promo-box input {
      width: 100%;
      box-sizing: border-box;
      font-family: inherit;
      font-size: 12px;
      padding: 8px 10px;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text);
      margin-bottom: 8px;
      text-transform: uppercase;
    }
    .profile-promo-hint, .profile-promo-done {
      font-size: 11px;
      color: var(--muted);
      line-height: 1.45;
      margin-bottom: 8px;
    }
    .profile-promo-done strong { color: var(--mint); }
    .profile-trade-box label {
      display: block;
      font-size: 11px;
      color: var(--muted);
      margin-bottom: 6px;
    }
    .profile-trade-box input {
      width: 100%;
      box-sizing: border-box;
      font-family: inherit;
      font-size: 12px;
      padding: 8px 10px;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text);
      margin-bottom: 8px;
    }
    .profile-trade-hint {
      font-size: 11px;
      color: var(--muted);
      line-height: 1.45;
      margin-bottom: 8px;
    }
    .profile-trade-hint a { color: var(--orange); }
    .profile-trade-raffle-hint {
      font-size: 11px;
      color: var(--gold);
      margin-top: 8px;
      line-height: 1.4;
    }
    .profile {
      display: none;
      margin-bottom: 24px;
    }
    .home-sidebar-card {
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 14px;
    }
    .home-sidebar-stack {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .home-sidebar-card__title {
      font-size: 14px;
      font-weight: 800;
      color: var(--text);
      margin: 0 0 8px;
      line-height: 1.25;
    }
    .home-sidebar-card--promo .btn-outline,
    .home-sidebar-card--trade .btn-outline {
      width: 100%;
    }
    .home-sidebar-card--referral .profile-referral {
      margin: 0;
      padding: 0;
      border: 0;
    }
    .telegram-banner {
      justify-self: stretch;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      background: linear-gradient(160deg, rgba(0, 136, 204, 0.14) 0%, var(--panel) 55%);
      border: 1px solid rgba(0, 136, 204, 0.35);
      border-radius: 12px;
      padding: 16px;
    }
    .telegram-banner__head {
      display: flex;
      align-items: center;
      gap: 12px;
      margin: 0 0 10px;
    }
    .telegram-banner__icon {
      width: 44px;
      height: 44px;
      flex-shrink: 0;
      border-radius: 50%;
      overflow: hidden;
      line-height: 0;
    }
    .telegram-banner__icon .telegram-logo-img {
      width: 44px;
      height: 44px;
      display: block;
      object-fit: contain;
    }
    .telegram-banner__title {
      font-size: 14px;
      font-weight: 800;
      color: var(--text);
      margin: 0;
      line-height: 1.25;
      flex: 1;
      min-width: 0;
    }
    .telegram-banner__desc {
      font-size: 12px;
      color: var(--muted);
      line-height: 1.5;
      margin: 0 0 12px;
    }
    .telegram-banner__status {
      display: inline-flex;
      align-items: center;
      align-self: flex-start;
      gap: 6px;
      font-size: 11px;
      font-weight: 700;
      padding: 5px 10px;
      border-radius: 999px;
      margin: 0 0 12px;
    }
    #telegramLinkPanel,
    .telegram-host #telegramLinkPanel {
      margin-top: auto;
    }
    body.is-guest .home-sidebar {
      display: none !important;
    }
    body.is-guest .home-layout {
      grid-template-columns: 1fr;
    }
    body.is-guest #profile,
    body.is-guest #challengesBlock {
      display: none !important;
    }
    .telegram-banner__status.is-linked {
      background: rgba(48, 232, 160, 0.12);
      color: var(--mint);
      border: 1px solid rgba(48, 232, 160, 0.35);
    }
    .telegram-banner__status.is-pending {
      background: rgba(240, 160, 48, 0.1);
      color: var(--orange);
      border: 1px solid rgba(240, 160, 48, 0.35);
    }
    .telegram-banner__status.is-off {
      background: var(--surface);
      color: var(--muted);
      border: 1px solid var(--border);
    }
    .telegram-banner__status-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: currentColor;
      opacity: 0.85;
    }
    .telegram-link-actions {
      display: flex;
      flex-direction: column;
      gap: 8px;
      align-items: stretch;
    }
    .telegram-link-actions .btn-primary,
    .telegram-link-actions .btn-outline,
    .telegram-link-actions a.btn-primary {
      width: 100%;
      text-align: center;
      box-sizing: border-box;
    }
    #telegramLinkPanel .btn-outline,
    #telegramLinkPanel .btn-primary,
    #telegramLinkPanel a.btn-primary {
      width: 100%;
      box-sizing: border-box;
    }
    #telegramLinkPanel .tg-code-block {
      font-size: 11px;
      color: var(--muted);
      line-height: 1.45;
      margin: 0 0 8px;
      text-align: left;
    }
    #telegramLinkPanel .tg-code-block code {
      color: var(--orange);
      background: var(--surface);
      padding: 2px 6px;
      border-radius: 4px;
      font-size: 11px;
    }
    .stat-box {
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 14px;
      transition: all .3s;
    }
    .stat-box h3 {
      font-size: 11px; font-weight: 600;
      letter-spacing: .04em; text-transform: uppercase;
      color: var(--muted); margin-bottom: 6px;
    }
    .stat-box .big {
      font-size: 1.5rem; font-weight: 800; color: var(--text); line-height: 1;
    }
    .stat-box .big.orange { color: var(--orange); }
    .stat-box .big.gold { color: var(--gold); }
    .stat-box .big.green { color: var(--mint); }
    .stat-box .sub { font-size: 11px; color: var(--muted); margin-top: 4px; }

    .bar-track {
      height: 6px; background: var(--surface);
      border-radius: 3px; margin-top: 8px; overflow: hidden;
    }
    .bar-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--orange), var(--gold));
      border-radius: 3px; transition: width 1s cubic-bezier(.4,0,.2,1);
    }
    .week-summary {
      display: grid;
      grid-template-columns: 1fr auto;
      align-items: end;
      gap: 8px 12px;
      margin-bottom: 10px;
    }
    .week-summary .week-summary-counter {
      text-align: right;
    }
    .week-summary .week-summary-counter .big {
      color: var(--text);
    }
    .week-summary .big {
      font-size: 1.35rem;
      font-weight: 800;
      color: var(--orange);
      line-height: 1;
    }
    .week-summary .sub {
      font-size: 11px;
      color: var(--muted);
      margin-top: 4px;
    }
    .week-scale {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 6px;
      margin-top: 8px;
    }
    .week-step {
      min-height: 54px;
      min-width: 0;
      border-radius: 8px;
      background: var(--surface);
      border: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 2px;
      text-align: center;
      padding: 6px 4px;
      transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    }
    /* Не выполнена, не сегодня */
    .week-step.day-pending {
      background: var(--surface);
      border: 1px solid var(--border);
      opacity: 0.7;
    }
    /* Не выполнена, сегодня — нужно закрыть */
    .week-step.day-today-pending {
      background: rgba(240, 160, 48, 0.08);
      border: 2px solid var(--gold);
      box-shadow: 0 0 0 1px rgba(240, 160, 48, 0.22), 0 4px 14px rgba(240, 160, 48, 0.16);
      opacity: 1;
    }
    /* Выполнена, не сегодня */
    .week-step.day-done {
      background: linear-gradient(145deg, rgba(240, 160, 48, 0.48), rgba(190, 125, 38, 0.42));
      border: 1px solid rgba(240, 160, 48, 0.32);
      color: #fff;
      opacity: 1;
    }
    /* Выполнена сегодня */
    .week-step.day-today-done {
      background: linear-gradient(145deg, var(--orange), var(--gold));
      border: 2px solid rgba(255, 220, 150, 0.75);
      box-shadow: 0 0 0 1px rgba(255, 230, 160, 0.4), 0 4px 16px rgba(240, 160, 48, 0.32);
      color: #fff;
      opacity: 1;
    }
    .week-step.day-streak-complete {
      background: linear-gradient(145deg, var(--orange), var(--gold));
      border: 2px solid rgba(255, 220, 150, 0.75);
      box-shadow: 0 0 0 1px rgba(255, 230, 160, 0.4), 0 4px 16px rgba(240, 160, 48, 0.32);
      color: #fff;
      opacity: 1;
    }
    .week-scale.week-scale--complete {
      padding: 4px;
      border-radius: 10px;
      border: 1px solid rgba(240, 160, 48, 0.35);
      background: rgba(240, 160, 48, 0.06);
    }
    .week-step .day-title {
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: .04em;
      color: var(--muted);
      font-weight: 600;
    }
    .week-step .day-xp {
      font-size: 12px;
      font-weight: 800;
      color: var(--text);
      line-height: 1;
    }
    .week-step.day-done .day-title,
    .week-step.day-done .day-xp,
    .week-step.day-today-done .day-title,
    .week-step.day-today-done .day-xp,
    .week-step.day-streak-complete .day-title,
    .week-step.day-streak-complete .day-xp {
      color: #fff;
    }
    .week-step.day-today-pending .day-title {
      color: var(--gold);
      font-weight: 800;
    }
    .week-step.day-today-pending .day-xp {
      color: var(--orange);
    }

    /* ═══════════════════════════════════════════════
       SECTION HEADER
       ═══════════════════════════════════════════════ */
    .section-head {
      display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
    }
    .section-head h2 {
      font-size: 15px; font-weight: 700; color: var(--text);
    }
    .section-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }

    /* ═══════════════════════════════════════════════
       CHALLENGE GRID
       ═══════════════════════════════════════════════ */
    .challenges-list {
      display: flex;
      flex-direction: column;
      gap: 20px;
    }
    .challenges-block--weekly {
      padding-top: 4px;
      border-top: 1px solid var(--border);
    }
    .challenges-section-title {
      font-size: 13px;
      font-weight: 800;
      color: var(--text);
      margin: 0 0 10px;
      letter-spacing: 0.02em;
    }
    .challenges-section-title .challenges-section-badge {
      display: inline-block;
      margin-left: 8px;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      padding: 2px 7px;
      border-radius: 4px;
      vertical-align: middle;
    }
    .challenges-block--daily .challenges-section-badge {
      color: var(--mint);
      border: 1px solid rgba(48, 232, 160, 0.25);
      background: rgba(48, 232, 160, 0.08);
    }
    .challenges-block--weekly .challenges-section-badge {
      color: var(--gold);
      border: 1px solid rgba(232, 192, 96, 0.3);
      background: rgba(232, 192, 96, 0.08);
    }
    .challenge-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
      align-items: stretch;
    }
    .challenge-grid > .card {
      min-width: 0;
      height: 100%;
      box-sizing: border-box;
    }
    .challenge-grid > .card.card--full-width {
      grid-column: 1 / -1;
    }
    .challenge-grid > .card.card--weekly {
      border-color: rgba(232, 192, 96, 0.35);
    }

    /* ═══════════════════════════════════════════════
       CARD
       ═══════════════════════════════════════════════ */
    .card {
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 16px;
      position: relative; overflow: hidden;
      transition: all .2s;
    }
    .card:hover:not(.done) {
      border-color: rgba(240,160,48,.4);
      transform: translateY(-2px);
      box-shadow: 0 8px 24px rgba(0,0,0,.15), 0 0 16px var(--glow-bg);
    }
    .card::before { content: none; }

    .card-top {
      display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 6px;
    }
    .card-icon {
      width: 32px; height: 32px; border-radius: 8px;
      background: var(--surface); border: 1px solid var(--border);
      display: flex; align-items: center; justify-content: center;
      font-size: 16px; flex-shrink: 0;
    }
    .card-diff {
      font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
      padding: 2px 7px; border-radius: 4px;
    }
    .card.diff-3 .card-diff, .card.diff-4 .card-diff {
      background: rgba(48,232,160,.1); color: var(--mint); border: 1px solid rgba(48,232,160,.2);
    }
    .card.diff-5 .card-diff, .card.diff-6 .card-diff {
      background: rgba(240,160,48,.08); color: var(--orange); border: 1px solid rgba(240,160,48,.2);
    }
    .card.diff-7 .card-diff, .card.diff-8 .card-diff {
      background: rgba(240,72,72,.08); color: var(--red); border: 1px solid rgba(240,72,72,.2);
    }
    .card.diff-9 .card-diff, .card.diff-10 .card-diff {
      background: rgba(232,192,96,.06); color: var(--gold); border: 1px solid rgba(232,192,96,.2);
    }

    .card-title {
      font-size: 14px; font-weight: 700; margin-bottom: 4px; color: var(--text);
    }
    .card-desc {
      font-size: 12px; color: var(--muted); line-height: 1.4; margin-bottom: 10px;
    }
    .xp-badge { font-size: 11px; font-weight: 700; color: var(--gold); }
    .streak-insurance-banner {
      margin-top: 14px;
      padding: 12px 14px;
      border-radius: 10px;
      border: 1px solid rgba(240, 160, 48, 0.45);
      background: rgba(240, 160, 48, 0.08);
      font-size: 13px;
      line-height: 1.45;
      color: var(--text);
    }
    .streak-insurance-banner .sub { display: block; font-size: 11px; color: var(--muted); margin-top: 6px; }
    .streak-insurance-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
    .challenge-booster-actions {
      display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px;
    }
    .challenge-booster-actions .btn-outline {
      font-size: 11px; padding: 5px 8px;
    }
    .challenge-booster-actions .challenge-booster-buy {
      font-size: 12px;
      font-weight: 700;
      padding: 6px 10px;
      border-color: var(--orange);
      color: var(--orange);
    }
    .challenge-booster-actions .challenge-booster-buy:not(:disabled):hover {
      background: rgba(240, 160, 48, 0.14);
      border-color: var(--orange);
      color: var(--orange);
    }
    .xp-badge .booster-chip {
      display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700;
      padding: 1px 5px; border-radius: 4px; vertical-align: middle;
    }
    .xp-badge .booster-chip.double { color: var(--gold); border: 1px solid rgba(232, 192, 96, 0.35); }
    .xp-badge .booster-chip.ease { color: var(--mint); border: 1px solid rgba(48, 232, 160, 0.25); }
    .profile-referral-box .profile-referral { margin: 0; padding: 0; border: 0; }
    .profile-referral { margin-top: 0; padding-top: 0; border-top: 0; }
    .profile-referral .ref-link {
      display: block; word-break: break-all; font-size: 12px; line-height: 1.45; color: var(--orange);
      margin: 8px 0; padding: 10px 12px; background: var(--surface); border-radius: 8px; border: 1px solid var(--border);
      font-family: inherit;
    }
    .profile-referral .referral-copy-btn { width: 100%; margin-top: 4px; }
    .card-top-right { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; flex-shrink: 0; }
    .card-reroll {
      width: 30px; height: 30px; padding: 0; border-radius: 8px;
      border: 1px solid var(--border); background: var(--surface); color: var(--orange);
      font-size: 16px; line-height: 1; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
    }
    .card-reroll:hover { border-color: var(--orange); background: rgba(240,160,48,.1); }
    .card.done .card-reroll { display: none; }
    .progress-wrap { margin-top: 10px; }
    .progress-meta {
      display: flex; justify-content: space-between;
      font-size: 11px; color: var(--muted); margin-bottom: 5px;
    }
    .progress-track {
      height: 5px; background: var(--surface);
      border-radius: 3px; overflow: hidden;
    }
    .progress-fill {
      height: 100%; border-radius: 3px;
      transition: width 1.2s cubic-bezier(.4,0,.2,1);
    }
    .card.diff-3 .progress-fill, .card.diff-4 .progress-fill { background: linear-gradient(90deg, #1a8858, var(--mint)); }
    .card.diff-5 .progress-fill, .card.diff-6 .progress-fill { background: linear-gradient(90deg, #c07010, var(--orange)); }
    .card.diff-7 .progress-fill, .card.diff-8 .progress-fill { background: linear-gradient(90deg, #a02020, var(--red)); }
    .card.diff-9 .progress-fill, .card.diff-10 .progress-fill { background: linear-gradient(90deg, #a07010, var(--gold)); }

    .card.done > :not(.card-feedback):not(.card-claim-row) { opacity: 0.5; }
    .card.done .progress-fill { width: 100% !important; background: var(--mint) !important; opacity: 1; }
    .card.done .card-icon { opacity: 0.55; }
    .card.done .card-feedback { opacity: 1; }

    .card.claimable {
      border-color: rgba(240, 160, 48, 0.55);
      box-shadow: 0 0 0 1px rgba(240, 160, 48, 0.12);
    }
    .card-claim-row {
      margin-top: 12px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .card-claim-hint {
      font-size: 11px;
      color: var(--muted);
      line-height: 1.45;
    }
    .card-claim-btn {
      width: 100%;
      padding: 11px 14px;
      font-size: 14px;
      font-weight: 700;
    }

    .card-feedback {
      margin-top: 12px;
    }
    .fb-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
    .fb-icon {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 28px;
      height: 28px;
      padding: 0;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: var(--surface);
      font-size: 13px;
      line-height: 1;
      cursor: pointer;
      filter: grayscale(1);
      opacity: 0.55;
      transition: border-color .15s, background .15s, opacity .15s, filter .15s;
    }
    .fb-icon:hover {
      border-color: var(--muted);
      opacity: 0.75;
      filter: grayscale(0.85);
    }
    .fb-icon.fb-like.on {
      border-color: var(--mint);
      background: rgba(48,232,160,.12);
      filter: none;
      opacity: 1;
    }
    .fb-icon.fb-dislike.on {
      border-color: var(--red);
      background: rgba(240,72,72,.1);
      filter: none;
      opacity: 1;
    }
    .fb-dislike-panel { margin-top: 10px; }
    .fb-hint { font-size: 11px; color: var(--muted); margin-bottom: 8px; line-height: 1.35; }
    .fb-reasons { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
    .fb-reasons label {
      font-size: 12px; color: var(--text);
      cursor: pointer;
      display: flex; align-items: center; gap: 8px;
    }
    .fb-reasons input { accent-color: var(--orange); }
    .fb-comment {
      width: 100%; min-height: 56px; max-height: 160px; resize: vertical;
      padding: 8px 10px; border-radius: 6px;
      border: 1px solid var(--border);
      background: var(--input-bg); color: var(--text);
      font-family: var(--font); font-size: 12px;
      margin-bottom: 8px;
    }
    .fb-comment:focus { outline: none; border-color: var(--orange); }
    .fb-comment::placeholder { color: var(--muted); }
    .fb-submit { width: 100%; }
    .fb-summary {
      margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.45;
    }
    .fb-summary strong { color: var(--text); font-weight: 600; }
    .fb-sum-comment {
      margin-top: 6px; padding: 8px 10px;
      background: var(--surface); border-radius: 6px;
      border: 1px solid var(--border); color: var(--text); white-space: pre-wrap; word-break: break-word;
    }
    .fb-edit { margin-top: 8px; }

    .empty-state { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 14px; }
    .empty-state-icon { font-size: 36px; margin-bottom: 10px; }

    /* ═══════════════════════════════════════════════
       LEADERBOARD
       ═══════════════════════════════════════════════ */
    .leaderboard {
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 8px; overflow: hidden;
      transition: all .3s;
    }
    .lb-header {
      background: var(--surface);
      padding: 8px 12px;
      font-size: 12px; font-weight: 700;
      color: var(--muted); border-bottom: 1px solid var(--border);
    }
    .lb-row {
      display: flex; align-items: center; gap: 10px;
      padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: 13px;
    }
    .lb-row:last-child { border-bottom: none; }
    .lb-rank { font-size: 14px; font-weight: 700; width: 22px; color: var(--muted); }
    .lb-rank.top1 { color: var(--gold); }
    .lb-rank.top2 { color: #9aa0b0; }
    .lb-rank.top3 { color: #b08050; }
    .lb-name { flex: 1; color: var(--text); }
    .lb-xp { font-weight: 700; color: var(--gold); }

    /* ═══════════════════════════════════════════════
       RESPONSIVE
       ═══════════════════════════════════════════════ */
    /* Tablet / mobile dashboard layout (959px) */
    @media (max-width: 959px) {
      .home-layout {
        grid-template-columns: 1fr;
        gap: 20px;
      }
      .home-sidebar {
        position: static;
        top: auto;
      }
    }

    @media (max-width: 768px) {
      .wrap {
        padding-left: var(--page-gutter, 16px);
        padding-right: var(--page-gutter, 16px);
      }
    }

    @media (max-width: 640px) {
      .wrap { padding: 12px 12px 40px; }
      .challenge-grid { grid-template-columns: 1fr; }
      .stat-box { padding: 12px; }
      .week-scale {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 4px;
      }
      .week-step {
        min-height: 46px;
        padding: 4px 2px;
        border-radius: 6px;
      }
      .week-step .day-title {
        font-size: 8px;
        letter-spacing: 0;
        line-height: 1.15;
      }
      .week-step .day-xp {
        font-size: 10px;
      }
      .week-summary .big {
        font-size: 1.15rem;
      }
      .streak-insurance-actions {
        flex-direction: column;
        align-items: stretch;
      }
      .streak-insurance-actions .btn-primary {
        width: 100%;
      }
      .card { padding: 14px; }
      .card-title { font-size: 13px; }
      .challenge-booster-actions .challenge-booster-buy,
      .challenge-booster-actions .btn-outline {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        text-align: center;
      }
      body.is-guest #leaderboardBlock .section-head {
        margin-top: 8px;
      }
      .lb-row {
        padding: 10px 12px;
        font-size: 12px;
        gap: 8px;
      }
      .lb-name {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .lb-xp {
        font-size: 12px;
        white-space: nowrap;
      }
      .telegram-banner {
        position: static;
        max-width: none;
        padding: 14px;
      }
      .telegram-banner__head {
        gap: 10px;
      }
      .telegram-banner__icon,
      .telegram-banner__icon .telegram-logo-img {
        width: 40px;
        height: 40px;
      }
    }
