/* ═══════════════════════════════════════════════════════════════════════════
   dashboard-home.css — the home screen look (Nov 2026 redesign)
   Calm and mature: warm off-white page, one deep-indigo accent, thin borders,
   Codex 3D icons (wwwroot/images/Dashboard/icons) on distinct buttons.
   Large, bold type throughout: many players are older adults. Loaded after Dashboard.css
   on Views/Home/Dashboard.cshtml only. Everything is scoped to .dbh (the page
   body) or body.dbh-page, so Groups/Show — which
   shares Dashboard.css and the friends drawer — and every other page are untouched.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --dbh-bg: #F7F6F3;
    --dbh-surface: #FFFFFF;
    --dbh-art: #F3F1EC;
    --dbh-line: #E7E4DE;
    --dbh-line-soft: #EFEDE8;
    --dbh-ink: #1C1B22;
    --dbh-muted: #45424D;      /* 9.4:1 on white */
    --dbh-faint: #5E5B66;      /* 6.6:1 on white */
    --dbh-accent: #3730A3;
    --dbh-accent-hover: #2B2590;
    --dbh-accent-tint: #EEEDF8;
    --dbh-brass: #B08D57;
    --dbh-good: #2F7D5B;
    --dbh-radius: 14px;
}

body.dbh-page { background: var(--dbh-bg); }

/* The topbar look lives in topbar.css (same on every screen). */

/* ─── Page frame ──────────────────────────────────────────────────────────── */
.dbh {
    direction: rtl;
    background: var(--dbh-bg);
    color: var(--dbh-ink);
    font-family: 'Heebo', system-ui, sans-serif;
    min-height: calc(100vh - 68px);
    padding-bottom: calc(64px + var(--tablet-safe-bottom, 0px));
}
.dbh *, .dbh *::before, .dbh *::after { box-sizing: border-box; }
.dbh a { color: var(--dbh-accent); text-decoration: none; }
.dbh a:hover { color: var(--dbh-accent-hover); }
.dbh [hidden] { display: none !important; }
.dbh-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dbh-muted { font-size: 1.05rem; color: var(--dbh-muted); }

/* Admin line */
.dbh-admin { background: var(--dbh-surface); border-bottom: 1px solid var(--dbh-line); }
.dbh-admin-in {
    max-width: 1760px; margin: 0 auto; padding: 0 40px; min-height: 48px;
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; font-size: 1.05rem; font-weight: 600;
}
.dbh-admin-lbl { font-size: 0.9rem; font-weight: 700; color: var(--dbh-faint); letter-spacing: .4px; }
.dbh .dbh-admin a { color: var(--dbh-muted); padding: 10px 0; }
.dbh .dbh-admin a:hover { color: var(--dbh-ink); }

.dbh-grid {
    max-width: 1760px; margin: 0 auto; padding: 32px 40px 0;
    display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start;
}
.dbh-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 40px; }
.dbh-side { flex: 1 1 360px; max-width: 460px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
/* Course-group homes without the side panel content: the main column centres. */
.dbh--solo .dbh-grid { max-width: 1200px; }
.dbh--solo .dbh-side { display: none; }

/* ─── Hero ────────────────────────────────────────────────────────────────── */
.dbh-hero {
    background: var(--dbh-surface); border: 1px solid var(--dbh-line); border-radius: 16px;
    overflow: hidden; display: flex; flex-wrap: wrap;
}
/* A compact greeting box: date, greeting, one line and the buttons, centred. */
.dbh-hero-text { flex: 1 1 420px; padding: 22px 32px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.dbh-hero-date { font-size: 1.05rem; font-weight: 600; color: var(--dbh-muted); }
.dbh-hero-date .db-greeting-day { display: inline; color: inherit; font: inherit; letter-spacing: 0; text-transform: none; }
.dbh-hero-date .db-greeting-day::after { content: ', '; }
.dbh-hero-title { margin: 0; font-size: 2.2rem; line-height: 1.15; font-weight: 800; letter-spacing: -0.4px; color: var(--dbh-ink); }
.dbh-hero-sub { margin: 0; font-size: 1.15rem; line-height: 1.5; font-weight: 500; color: var(--dbh-muted); max-width: 680px; }
.dbh-hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px; margin-top: 8px; }
.dbh .dbh-btn {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--dbh-accent); color: #fff; font-size: 1.3rem; font-weight: 700;
    border-radius: 14px; padding: 0 32px; min-height: 54px; transition: background .15s;
}
.dbh .dbh-btn:hover { background: var(--dbh-accent-hover); color: #fff; }
.dbh .dbh-btn:focus-visible, .dbh .dbh-link:focus-visible, .dbh-card:focus-visible { outline: 3px solid #A5A1E0; outline-offset: 2px; }
.dbh .dbh-link { font-size: 1.25rem; font-weight: 700; padding: 14px 0; }
/* The brain is a small tile beside the greeting, in the same soft-tile language as the
   buttons below (the user found the half-width picture too big). */
.dbh-hero-art {
    flex: none; align-self: center; width: 128px; height: 128px; min-height: 0;
    margin: 20px 32px 20px 24px; border-radius: 22px; overflow: hidden; background: #EEEDF8;
}
.dbh-hero-art picture, .dbh-hero-art img { display: block; width: 100%; height: 100%; }
.dbh-hero-art img { min-height: 0; object-fit: cover; object-position: 50% 42%; }

/* ─── Sections ────────────────────────────────────────────────────────────── */
.dbh-section { display: flex; flex-direction: column; gap: 16px; }
.dbh-section-hdr { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dbh-h2 { margin: 0; font-size: 1.85rem; font-weight: 800; color: var(--dbh-ink); }
.dbh-hint { font-size: 1.1rem; font-weight: 500; color: var(--dbh-muted); }

/* Training cards: distinct buttons, a 3D icon on a tinted tile + a large bold title */
/* Flex, not a fixed grid: the number of cards differs per player (admin, subscriber,
   non-subscriber, course group), and the last row must stretch instead of leaving holes. */
.dbh-cards { display: flex; flex-wrap: wrap; gap: 18px; }
/* How many buttons a row depends on the column width, not the screen (the side panel takes part of it). */
.dbh-section { container-type: inline-size; }
@container (min-width: 1320px) { .dbh-cards > .dbh-card { flex-basis: calc((100% - 36px) / 3); } }
@container (min-width: 640px) and (max-width: 1319.98px) { .dbh-cards > .dbh-card { flex-basis: calc((100% - 18px) / 2); } }
@container (max-width: 639.98px) { .dbh-cards > .dbh-card { flex-basis: 100%; } }
.dbh-card {
    --tile: var(--dbh-accent-tint);
    flex: 1 1 100%; min-width: 0;
    position: relative; display: flex; align-items: center; gap: 14px;
    min-height: 132px; padding: 20px 18px;
    /* A clear frame: a darker 2px line plus a soft lift, so each card reads as a button. */
    background: var(--dbh-surface); border: 2px solid #C9C4D8; border-radius: 18px;
    color: var(--dbh-ink); transition: border-color .2s, box-shadow .2s, transform .2s;
    box-shadow: 0 1px 2px rgba(28,27,34,.06), 0 6px 16px -10px rgba(28,27,34,.22);
}
.dbh a.dbh-card { color: var(--dbh-ink); }
.dbh-card:hover { border-color: #6F68C9; box-shadow: 0 12px 28px -18px rgba(55,48,163,.45); transform: translateY(-2px); }
/* A soft tint per button so neighbours read as separate buttons; colours stay in the palette. */
#dbmc-course       { --tile: #EEEDF8; }
#dbmc-old-way      { --tile: #F4EEE2; }
#dbmc-cognitive    { --tile: #E9F1EC; }
#dbmc-brain-room, #dbmc-play-friend { --tile: #EAF0F6; }
#dbmc-share-promo  { --tile: #F6ECEE; }
#dbmc-personal     { --tile: #F4EEE2; }
.dbh-card-icon {
    flex: none; width: 88px; height: 88px; border-radius: 20px; background: var(--tile);
    display: grid; place-items: center;
}
/* The icons are drawn on white; multiply lets the tile colour show through the white. */
.dbh-card-icon img { width: 78px; height: 78px; object-fit: contain; mix-blend-mode: multiply; display: block; }
/* Text centred in the button. The far side (arrow, or an empty slot on cards without one) is as
   wide as the picture tile, so the text sits in the true middle of the card. */
.dbh-card-body { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; flex: 1; min-width: 0; }
.dbh-card-title { font-size: 1.45rem; font-weight: 800; line-height: 1.25; }
.dbh-card-sub { font-size: 1.12rem; font-weight: 500; color: var(--dbh-muted); line-height: 1.45; }
/* "Go" arrow on links, so each card reads as a button. */
a.dbh-card::after {
    content: '←'; flex: none; align-self: center; font-size: 1.6rem; font-weight: 700;
    color: var(--dbh-accent); width: 88px; height: 48px; display: grid; place-items: center;
    background: radial-gradient(circle at center, var(--dbh-accent-tint) 23.5px, transparent 24px);
}
a.dbh-card:hover::after { color: #fff; background: radial-gradient(circle at center, var(--dbh-accent) 23.5px, transparent 24px); }
.dbh-card:not(a)::after { content: ''; flex: none; width: 88px; }
.dbh-card.is-loading { opacity: .6; pointer-events: none; }
.dbh-card--locked { cursor: not-allowed; }
.dbh-card--locked .dbh-card-icon img { filter: grayscale(1); opacity: .55; }
.dbh-card--locked .dbh-card-title { color: var(--dbh-muted); }
.dbh-lock { font-size: 0.85em; }
.dbh-share { display: flex; gap: 10px; margin-top: 8px; }
.dbh-share-btn {
    flex: 1; font: inherit; font-size: 1.1rem; font-weight: 700; color: var(--dbh-accent);
    background: var(--dbh-accent-tint); border: 0; border-radius: 12px; min-height: 52px; cursor: pointer;
}
.dbh-share-btn:hover { background: #E3E1F4; }
/* The 👏 kudos badge (_KudosInboxBadge) rides on a card: keep it on the picture's corner (the
   picture is on the right in RTL), like an app-icon notification, so it never covers the title. */
.dbh-card .kudos-inbox-badge { top: 4px; left: auto; right: auto; inset-inline-start: 4px; padding: 4px 10px 4px 8px; }

/* Small picture beside a section or panel title, on the same soft tile as the button icons.
   The tile is a wrapper (.dbh-htile): with the colour on the <img> itself, the picture's white
   background would not multiply into it and a white square would show inside the tile. */
.dbh-htile {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 72px; height: 72px; border-radius: 18px; background: var(--tile, #EEEDF8);
}
.dbh-hicon { flex: none; width: 60px; height: 60px; object-fit: contain; mix-blend-mode: multiply; display: block; }
#daily-card .dbh-htile  { --tile: #EEEDF8; }
#weekly-card .dbh-htile { --tile: #F4EEE2; }
.db-friends-card .dbh-htile { --tile: #EAF0F6; }
.dbh-htile:has(img[src*="trophy"]) { --tile: #F4EEE2; }
.dbs-card .dbh-htile { --tile: #F6ECEE; }

/* ─── Challenges ──────────────────────────────────────────────────────────── */
.dbh-challenges { display: flex; flex-wrap: wrap; gap: 16px; }
.dbh-ch {
    flex: 1 1 320px; min-width: 0; background: var(--dbh-surface);
    /* Same clear frame as the training buttons. */
    border: 2px solid #C9C4D8; border-radius: 18px; overflow: hidden;
    box-shadow: 0 1px 2px rgba(28,27,34,.06), 0 6px 16px -10px rgba(28,27,34,.22);
    display: flex; flex-direction: column;
}
.dbh-ch-in { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 16px; }
.dbh-ch-hdr { display: flex; align-items: center; gap: 16px; }

/* Title centred: the count on the far side is as wide as the picture tile, so the name sits in the middle. */
.dbh-ch-name { flex: 1; min-width: 0; text-align: center; }
.dbh-ch-count { flex: none; width: 72px; text-align: end; }
.dbh-ch-title { font-size: 1.5rem; font-weight: 800; }
.dbh-ch-time { font-size: 1.05rem; font-weight: 500; color: var(--dbh-muted); margin-top: 2px; }
.dbh-ch-count { font-size: 1.05rem; font-weight: 700; color: var(--dbh-muted); white-space: nowrap; }
.dbh-slots { display: flex; flex-direction: column; gap: 8px; }

/* Daily / weekly / special: each card is one button that opens a pop-up where the player chooses. */
.dbh-ch-btn { cursor: pointer; user-select: none; transition: border-color .15s, background .15s; }
.dbh-ch.dbh-ch-btn:hover { border-color: #A5A1E0; background: #FBFAFF; }
.dbh-ch-btn:focus-visible { outline: 2px solid var(--dbh-accent); outline-offset: 3px; }
.dbh-ch-go { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
    background: var(--dbh-accent-tint); color: var(--dbh-accent); font-size: 1.2rem; font-weight: 700; }
.dbs-open-btn { border-radius: 12px; }
.dbs-open-btn:hover .dbh-panel-title { color: var(--dbh-accent); }
.dbh-ch-modal .db-modal { width: 560px; }
.dbh-ch-modal .db-modal-title { font-size: 1.35rem; font-weight: 800; color: var(--dbh-ink); }
.dbh-ch-modal-hint { font-size: 1rem; font-weight: 500; color: var(--dbh-muted); margin-inline-start: 8px; }
.dbh-ch-modal .db-modal-body { padding: 16px 20px 20px; }
@media (max-width: 520px) {
    .dbh-ch .dbh-ch-go { display: none; }
    .dbh-ch-hdr { gap: 10px; }
    .dbh-ch-modal .db-modal-body { padding: 12px 12px 16px; }
}

/* Special-challenge row pictures (matte 3D set, images/Dashboard/special/). */
.dbh .dbs-item-icon img { width: 42px; height: 42px; object-fit: contain; display: block; mix-blend-mode: multiply; }
/* Same pictures in the all-specials list and the challenge pop-up (white background blended into the tile). */
.asc-item-icon img { width: 40px; height: 40px; object-fit: contain; display: block; mix-blend-mode: multiply; }
.sc-ch-hero-emoji img { width: 84px; height: 84px; object-fit: contain; display: block; margin: 0 auto; }
.dbs-coin-img { width: 20px; height: 20px; object-fit: contain; vertical-align: -4px; mix-blend-mode: multiply; }

/* Rows drawn by dashboard.js renderChallengeSlots() */
.dbh .dbcc-loading, .dbh .dbcc-guest-note { color: var(--dbh-muted); font-size: 1.1rem; padding: 14px 0; text-align: center; }
.dbh .dbcc-slot {
    background: var(--dbh-surface); border: 1px solid var(--dbh-line); border-radius: 10px;
    padding: 16px 18px; transition: border-color .15s, background .15s;
}
.dbh .dbcc-slot:hover:not(.dbcc-slot--rewarded) { transform: none; background: #FAF9F7; border-color: #CFCBE6; }
.dbh .dbcc-slot--selected { background: var(--dbh-accent-tint); border-color: #C9C5EA; }
.dbh .dbcc-slot--completed { background: #FBF7EF; border-color: #E2D3B6; }
.dbh .dbcc-slot--rewarded { background: #FAF9F7; border-color: var(--dbh-line-soft); opacity: 1; }
.dbh .dbcc-slot-left { gap: 10px; }
.dbh .dbcc-slot-check { width: 26px; height: 26px; border: 2px solid #9C98A6; font-size: 14px; }
.dbh .dbcc-slot--selected .dbcc-slot-check { background: var(--dbh-accent); border-color: var(--dbh-accent); color: #fff; }
.dbh .dbcc-slot--completed .dbcc-slot-check,
.dbh .dbcc-slot--rewarded .dbcc-slot-check { background: var(--dbh-brass); border-color: var(--dbh-brass); color: #fff; }
.dbh .dbcc-slot-title { color: var(--dbh-ink); font-size: 1.2rem; font-weight: 700; }
.dbh .dbcc-slot--rewarded .dbcc-slot-title { color: var(--dbh-faint); text-decoration: line-through; }
.dbh .dbcc-slot-pts { color: var(--dbh-muted); font-size: 1.05rem; font-weight: 700; }
.dbh .dbcc-slot-desc { color: var(--dbh-muted); font-size: 1.05rem; margin: 6px 36px 0 0; line-height: 1.5; }
.dbh .dbcc-slot-progress-wrap { margin: 10px 36px 0 0; }
.dbh .dbcc-slot-bar { height: 8px; background: var(--dbh-line-soft); border-radius: 2px; }
.dbh .dbcc-slot-bar-fill { background: var(--dbh-accent); border-radius: 2px; }
.dbh .dbcc-slot-prog-txt { color: var(--dbh-muted); font-size: 1rem; font-weight: 600; }
.dbh .dbcc-claim-btn {
    margin-top: 12px; width: 100%; min-height: 54px; font: inherit; font-size: 1.15rem; font-weight: 700;
    background: var(--dbh-accent); color: #fff; border: 0; border-radius: 8px; box-shadow: none; animation: none; cursor: pointer;
}
.dbh .dbcc-claim-btn:hover { background: var(--dbh-accent-hover); transform: none; }

/* ─── Subscription band ───────────────────────────────────────────────────── */
.dbh-upsell {
    background: #1E1B3A; color: #fff; border-radius: 16px; padding: 36px 40px;
    display: flex; flex-wrap: wrap; gap: 32px; align-items: center;
}
.dbh-upsell-text { flex: 1 1 280px; display: flex; flex-direction: column; gap: 12px; }
.dbh-upsell-eyebrow { font-size: 1.05rem; font-weight: 600; color: #C9C5E0; letter-spacing: .4px; }
.dbh-upsell-title { margin: 0; font-size: 2.1rem; font-weight: 800; line-height: 1.25; }
.dbh-upsell-sub { margin: 0; font-size: 1.25rem; line-height: 1.6; color: #DCD9EE; }
.dbh .dbh-upsell-btn {
    align-self: flex-start; margin-top: 8px; display: inline-flex; align-items: center;
    background: #fff; color: #1E1B3A; font-size: 1.25rem; font-weight: 700;
    border-radius: 14px; padding: 0 32px; min-height: 60px;
}
.dbh .dbh-upsell-btn:hover { background: #EEEDF8; color: #1E1B3A; }
.dbh-upsell-art { flex: 1 1 320px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dbh-upsell-art img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; display: block; }

/* ─── Side panels ─────────────────────────────────────────────────────────── */
.dbh-panel {
    background: var(--dbh-surface); border: 1px solid var(--dbh-line); border-radius: var(--dbh-radius);
    padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 8px; overflow: hidden;
    animation: none !important;   /* dashboard.js adds .db-animated to these; keep this page still */
}
/* The panels still carry .db-friends-card / .dbs-card (scripts look them up); undo their old look. */
.dbh .dbh-panel.db-friends-card,
.dbh .dbh-panel.dbs-card {
    max-height: none; border-radius: var(--dbh-radius); border: 1px solid var(--dbh-line);
    background: var(--dbh-surface); box-shadow: none; flex: none; min-width: 0; position: relative;
}
.dbh .dbh-panel.dbs-card::before { display: none; }
.dbh-panel-hdr { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.dbh-panel-hdr .dbh-htile { width: 56px; height: 56px; border-radius: 14px; }
.dbh-panel-hdr .dbh-hicon { width: 46px; height: 46px; }
.dbh-panel-hdr .dbh-panel-title { flex: 1; min-width: 0; }
.dbh-panel-title { margin: 0; font-size: 1.45rem; font-weight: 800; color: var(--dbh-ink); }
.dbh-panel-meta { font-size: 1rem; font-weight: 600; color: var(--dbh-muted); }
.dbh-count { font-size: 1rem; font-weight: 600; color: var(--dbh-faint); }
.dbh-count:not(:empty)::before { content: '('; }
.dbh-count:not(:empty)::after { content: ')'; }
.dbh-textbtn {
    font: inherit; font-size: 1.1rem; font-weight: 700; color: var(--dbh-accent);
    background: none; border: 0; padding: 10px 0; cursor: pointer;
}
.dbh-textbtn:hover { color: var(--dbh-accent-hover); }
.dbh-panel-foot { align-self: flex-start; }
.dbh-sub-hdr {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--dbh-line-soft);
    font-size: 1.05rem; font-weight: 700; color: var(--dbh-muted);
}
.dbh-search {
    display: flex; align-items: center; gap: 6px; margin-top: 10px;
    border: 2px solid var(--dbh-line); border-radius: 12px; padding: 0 6px 0 12px; min-height: 54px;
}
.dbh-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1.1rem; color: var(--dbh-ink); outline: none; padding: 10px 12px 10px 0; }
.dbh-search button { width: 36px; height: 36px; border: 0; background: none; color: var(--dbh-muted); cursor: pointer; display: grid; place-items: center; border-radius: 8px; }
.dbh-search button:hover { background: var(--dbh-line-soft); }
.dbh-search:focus-within { border-color: #A5A1E0; }

/* "מובילים" — one button at the foot of the friends panel, opens the leaderboard screen. */
.dbh-leaders-btn {
    display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px;
    font: inherit; font-size: 1.15rem; font-weight: 700; color: var(--dbh-ink);
    background: var(--dbh-accent-tint); border: 1px solid #D9D6F0; border-radius: 12px;
    padding: 10px 14px; min-height: 54px; cursor: pointer; text-align: start;
    transition: background .15s, border-color .15s;
}
.dbh-leaders-btn img { width: 32px; height: 32px; object-fit: contain; flex: none; }
.dbh-leaders-btn span:first-of-type { flex: 1; }
.dbh-leaders-btn-arrow { color: var(--dbh-accent); }
.dbh-leaders-btn:hover { background: #E4E2F5; border-color: #C9C5EA; }
.dbh-leaders-btn:focus-visible { outline: 2px solid var(--dbh-accent); outline-offset: 2px; }

/* Friend rows drawn by dashboard.js renderFriendRow() / renderSuggestions() */
.dbh .dbf-friend { padding: 10px 0; border-bottom: 1px solid var(--dbh-line-soft); gap: 12px; }
.dbh .dbf-friend-wrap:last-of-type .dbf-friend { border-bottom: 0; }
.dbh .dbf-friend:hover, .dbh .dbf-friend.open { background: none; }
.dbh .dbf-friend:hover .dbf-avatar, .dbh .dbf-suggestion:hover .dbf-avatar { transform: none; }
.dbh .dbf-avatar { box-shadow: none; }
.dbh .dbf-friend-name { color: var(--dbh-ink); font-weight: 700; font-size: 1.15rem; }
.dbh .dbf-last-seen { color: var(--dbh-muted); font-size: 0.95rem; }
.dbh .dbf-rank-badge { background: var(--dbh-line-soft) !important; color: var(--dbh-muted); text-shadow: none; box-shadow: none; font-weight: 500; }
.dbh .dbf-group-tag { background: var(--dbh-accent-tint); color: var(--dbh-accent); }
.dbh .dbf-dot--online { background: var(--dbh-good); box-shadow: none; animation: none; }
.dbh .dbf-envelope, .dbh .dbf-trophy {
    background: transparent; border: 1px solid var(--dbh-line); color: var(--dbh-muted);
    box-shadow: none; animation: none;
}
.dbh .dbf-envelope:hover, .dbh .dbf-trophy:hover { background: var(--dbh-line-soft); transform: none; box-shadow: none; }
.dbh .dbf-envelope--active { color: var(--dbh-accent); border-color: #C9C5EA; background: var(--dbh-accent-tint); }
.dbh .dbf-envelope:not(.dbf-envelope--active), .dbh .dbf-trophy { background: #fff; }
.dbh .dbf-trophy { border-color: #EBDDB8; }
.dbh .dbf-envelope:not(.dbf-envelope--active):hover, .dbh .dbf-trophy:hover { background: var(--dbh-line-soft); }
.dbh .dbf-envelope--active::after { top: 3px; right: 3px; }
.dbh .dbf-chevron { color: var(--dbh-faint); }
.dbh .dbf-chevron.open { color: var(--dbh-accent); }
.dbh .dbf-menu { background: #FAF9F7; border: 1px solid var(--dbh-line-soft); box-shadow: none; }
.dbh .dbf-btn { background: var(--dbh-surface); color: var(--dbh-ink); border: 1px solid var(--dbh-line); box-shadow: none; font-weight: 500; }
.dbh .dbf-btn:hover { background: var(--dbh-line-soft); }
.dbh .dbf-btn--remove, .dbh .dbf-btn--block { color: #9B2C2C; }
.dbh .dbf-more-link { color: var(--dbh-accent); padding: 10px 0 2px; text-align: start; font-size: 1.05rem; }
.dbh .dbf-empty { padding: 14px 0; }
.dbh .dbf-empty-icon { display: none; }
.dbh .dbf-empty-text { color: var(--dbh-muted); font-size: 1.1rem; }
.dbh .dbf-suggestion { padding: 9px 0; gap: 12px; }
.dbh .dbf-suggestion:hover { background: none; }
.dbh .dbf-suggestion-name { color: var(--dbh-ink); font-weight: 700; font-size: 1.12rem; }
.dbh .dbf-suggestion-mutual { color: var(--dbh-muted); font-size: 0.95rem; }
.dbh .dbf-add-btn {
    background: var(--dbh-accent-tint); color: var(--dbh-accent); box-shadow: none;
    font-weight: 700; font-size: 1.05rem; border-radius: 10px; padding: 0 16px; min-height: 44px;
}
.dbh .dbf-add-btn:hover { background: #E3E1F4; transform: none; box-shadow: none; opacity: 1; }
.dbh .dbf-add-btn:disabled { background: #EAF4EE; color: var(--dbh-good); border: 0; }

/* Leaders (dashboard-home.js) */
.dbh-leaders { display: flex; flex-direction: column; }
.dbh-leader { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--dbh-line-soft); font-size: 1.15rem; font-weight: 600; }
.dbh-leader:first-child { border-top: 0; }
.dbh-leader-rank { width: 24px; font-weight: 800; color: var(--dbh-faint); font-variant-numeric: tabular-nums; }
.dbh-leader-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbh-leader-pts { font-weight: 800; font-variant-numeric: tabular-nums; }
.dbh-leader--me .dbh-leader-name { font-weight: 800; color: var(--dbh-accent); }

/* Special challenges rows drawn by dashboard.js renderSpecialChallenges() */
.dbh .dbs-list { display: flex; flex-direction: column; gap: 0; }
.dbh .dbs-item {
    background: none; border: 0; border-top: 1px solid var(--dbh-line-soft); border-radius: 0;
    box-shadow: none; padding: 12px 0; gap: 12px;
}
.dbh .dbs-item:first-child { border-top: 0; }
.dbh .dbs-item::before { display: none; }
.dbh .dbs-item:hover { transform: none; box-shadow: none; }
.dbh .dbs-item:hover .dbs-item-name { color: var(--dbh-accent); }
.dbh .dbs-item--active { background: none; box-shadow: none; }
.dbh .dbs-item--locked { opacity: .6; }
.dbh .dbs-item-icon {
    width: 52px; height: 52px; border-radius: 12px; font-size: 1.6rem;
    background: var(--dbh-art) !important; box-shadow: none;
}
.dbh .dbs-item:hover .dbs-item-icon { transform: none; }
.dbh .dbs-item-name { color: var(--dbh-ink); font-weight: 700; font-size: 1.15rem; }
.dbh .dbs-coins, .dbh .dbs-reward { color: var(--dbh-muted); font-weight: 500; font-size: 0.78rem; text-shadow: none; background: none; border: 0; padding: 0; font-size: 1rem; }
.dbh .dbs-tier-pip { background: #FBF7EF !important; color: #7A5A2B !important; border-color: #E2D3B6 !important; font-weight: 500; }
.dbh .dbs-item-info { min-width: 0; }
.dbh .dbs-lock-msg { display: block; color: var(--dbh-muted); font-size: 0.95rem; white-space: normal; line-height: 1.4; }
.dbh .dbs-status--active { background: var(--dbh-accent-tint); color: var(--dbh-accent); }
.dbh .dbs-empty { color: var(--dbh-muted); font-size: 1.1rem; padding: 8px 0; }
.dbh-shop {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--dbh-line-soft);
}
.dbh-shop-title { font-size: 1.15rem; font-weight: 700; }

/* ─── Narrow screens ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .dbh-grid { padding: 24px 20px 0; gap: 28px; }
    .dbh-admin-in { padding: 0 20px; }
    .dbh-hero-text { padding: 20px 24px 22px; }
    .dbh-side { max-width: none; }
}
@media (max-width: 720px) {
    .dbh-grid { padding: 16px 16px 0; gap: 24px; }
    .dbh-admin-in { padding: 0 16px; gap: 2px 18px; }
    .dbh-main { gap: 30px; }
    /* Hero: picture on top as a wide strip, text below */
    .dbh-hero { flex-direction: column-reverse; border-radius: 16px; }
    /* No picture on a phone: the greeting and the buttons fit the first screen. */
    .dbh-hero-art { display: none; }
    .dbh-hero-art img { min-height: 0; }
    .dbh-hero-text { flex: none; padding: 18px 18px 20px; gap: 6px; }
    .dbh-hero-title { font-size: 1.8rem; }
    .dbh-hero-sub { font-size: 1.05rem; }
    .dbh-hero-actions { gap: 16px; margin-top: 8px; }
    .dbh .dbh-btn { flex: 1; }
    .dbh-h2 { font-size: 1.6rem; }
    /* One full-width button a row: big targets on a phone */
    .dbh-cards { gap: 12px; }
    .dbh-card { min-height: 104px; padding: 14px 16px; gap: 14px; }
    .dbh-card-icon { width: 76px; height: 76px; border-radius: 18px; }
    .dbh-card-icon img { width: 68px; height: 68px; }
    .dbh-card-title { font-size: 1.4rem; }
    .dbh-card-sub { font-size: 1.05rem; }
    /* The whole card is the button; on a phone the arrow only steals width from the title. */
    a.dbh-card::after, .dbh-card:not(a)::after { display: none; }
    /* Phone order: "בחר משחק אישי", then the course, then "שחק עם חבר"; the rest keep their order after them. */
    #dbmc-old-way { order: -3; }
    #dbmc-course { order: -2; }
    #dbmc-play-friend, #dbmc-brain-room { order: -1; }
    .dbh-ch-in { padding: 18px 16px 20px; }
    .dbh-ch-hdr .dbh-htile { width: 60px; height: 60px; border-radius: 16px; }
    .dbh-ch-count { width: 60px; }
    .dbh-ch-hdr .dbh-hicon { width: 50px; height: 50px; }
    .dbh-ch-title { font-size: 1.35rem; }
    .dbh-upsell { padding: 26px 20px; gap: 18px; border-radius: 16px; }
    .dbh-upsell-title { font-size: 1.7rem; }
    .dbh-upsell-art img { aspect-ratio: 1; }
    .dbh .dbh-upsell-btn { align-self: stretch; justify-content: center; }
}

/* Guests: the special-challenges panel is locked like the friends panel (dashboard-home.js). */
.dbh .dbh-panel .db-locked-overlay { border-radius: 0; z-index: 2; }
