/* HEADER (desktop) */
.header { position: fixed; top: 0; left: 0; right: 0; height: var(--header-h); background: var(--bg-primary); transition: padding-left var(--dur-sidebar, .4s) var(--ease-sidebar); border-bottom: 1px solid var(--border-color); display: flex; align-items: center; z-index: 1002; padding: 0; }
.header::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 24px; background: linear-gradient(180deg, rgba(0,0,0,0.28) 0%, transparent 100%); pointer-events: none; z-index: 1003; }
.header-wrap-inner { display: flex; width: 100%; min-width: 0; height: 86px; align-items: center; justify-content: space-between; padding: 16px 0; max-width: 1280px; margin: 0 auto; box-sizing: border-box; }
.header-logo-link { display: flex; align-items: center; margin-left: 0; margin-right: 24px; flex-shrink: 0; height: 100%; }
.header-logo-img { width: auto; height: 52px; /* the Solz script logo (2026-10-10) */ object-fit: contain; object-position: left center; display: block; }
.header-center-section { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px; }
.header-balance-cashier-row { display: flex; align-items: center; gap: 4px; justify-content: center; position: relative; padding: 3px; background: var(--bg-input); border-radius: var(--radius-lg); }
.header-balance-cashier-row .header-cashier-btn { height: 38px; }
.header-balance-cashier-row__balance { position: relative; width: auto; min-width: 150px; height: 38px; padding: 0 10px 0 3px; background: transparent; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: flex-start; z-index: 2001; flex-shrink: 0; transition: background var(--dur-hover) var(--ease-premium); }
@media (hover: hover) { .header-balance-cashier-row__balance:hover { background: rgba(255,255,255,0.04); } }
.header-balance-cashier-row__balance .balance-dropdown-wrap { flex: 1; min-width: 0; height: 38px; display: flex; align-items: center; }
.header-balance-cashier-row__balance .header-balance-btn { width: 100%; height: 38px; padding: 0; display: flex; align-items: center; gap: 8px; background: none; border: none; color: #fff; font: 500 var(--fs-sm)/1 "RM Neue-Regular", Helvetica, Arial, sans-serif; cursor: pointer; }
.header-balance-cashier-row__balance .header-balance-display { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: visible; padding: 0; }
.header-balance-cashier-row__balance .balance-icon-img { width: 18px; height: 18px; flex-shrink: 0; object-fit: contain; }
.header-balance-static { display: flex; align-items: center; justify-content: flex-start; gap: 8px; width: 100%; height: 38px; }
/* Coin badge on the left of the amount */
.header-balance-coin { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex-shrink: 0; border-radius: var(--radius-md); background: var(--bg-card); color: var(--gold); font-size: 14px; }
.header-balance-coin img { width: 18px; height: 18px; object-fit: contain; display: block; }
/* The money figure (PC header only — the phone header has its own): 18 px since 2026-10-17 (owner: "on pc make the money
   amount bigger"; was 14 px). Undo ../removed-features-backup/balance-bigger-2026-10-17/README.txt */
.header-balance-amount { flex: 1; min-width: 0; font: 700 var(--fs-lg)/1 "RM Neue-Regular", Helvetica, Arial, sans-serif; font-variant-numeric: tabular-nums; color: #fff; margin-top: 0px; padding-left: 0; text-align: left; white-space: nowrap; }
.header-balance-cashier-row__balance .balance-icon-fa { width: 18px; height: 18px; font-size: 16px; flex-shrink: 0; }
.balance-icon-img, .balance-icon-fa { width: 18px; height: 18px; min-height: 18px; flex-shrink: 0; }

/* Balance dropdown */
.bal-drop-chevron { font-size: 9px; color: var(--text-dim); margin-left: 2px; transition: transform .24s var(--ease-premium); }
.bal-drop-chevron.open { transform: rotate(180deg); }
/* Wallet dropdown: panel + selected balance row (accent outline) + currency select */
.bal-dropdown { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: 100%; min-width: 0; box-sizing: border-box; padding: 6px;   /* owner: never wider than the balance + Wallet bar */ background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); z-index: 2000; display: flex; flex-direction: column; gap: 2px; overflow: hidden; transform-origin: top center; }
.bal-dropdown.is-closing { pointer-events: none; }
.bal-dropdown__item { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 50px; padding: 0 14px; border: 1px solid transparent; border-radius: var(--radius-md); cursor: default; }
.bal-dropdown__item--active { background: var(--bg-input); border-color: var(--accent); }
.bal-dropdown__label { display: flex; align-items: center; gap: 12px; min-width: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); }
.bal-dropdown__item--active .bal-dropdown__label { color: var(--text-primary); font-weight: 700; }
.bal-dropdown__icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex-shrink: 0; color: var(--text-dim); font-size: 14px; }
.bal-dropdown__item--active .bal-dropdown__icon { color: var(--gold); }
.bal-dropdown__value { font-size: var(--fs-sm); font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bal-dropdown__item--active .bal-dropdown__value { color: var(--text-primary); }
.bal-dropdown__divider { height: 1px; background: var(--border-color); margin: 6px 4px 2px; flex-shrink: 0; }
.bal-dropdown__section { display: flex; flex-direction: column; gap: 6px; padding: 4px 2px 2px; }
.bal-dropdown__section-label { padding: 2px 4px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); }
.bal-dropdown__select { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; height: 44px; padding: 0 12px; background: var(--bg-card); border: 1px solid transparent; border-radius: var(--radius-md); color: var(--text-primary); font: inherit; cursor: pointer; text-align: left; transition: background var(--dur-hover) var(--ease-premium), border-color var(--dur-hover) var(--ease-premium); }
@media (hover: hover) { .bal-dropdown__select:hover { background: var(--bg-elevated); } }
.bal-dropdown__select.open { border-color: var(--border-strong); }
.bal-dropdown__select:focus-visible { outline: none; border-color: var(--accent); }
.bal-dropdown__flag { font-size: 15px; line-height: 1; }
.bal-dropdown__cur-badge { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: var(--fs-sm); font-weight: 700; color: var(--text-primary); }
.bal-dropdown__cur-code { letter-spacing: 0.01em; }
.bal-dropdown__cur-chevron { font-size: 12px; color: var(--text-muted); transition: transform var(--dur-hover) var(--ease-premium), color var(--dur-hover) var(--ease-premium); }
.bal-dropdown__cur-chevron.open { transform: rotate(180deg); color: var(--text-primary); }
.bal-dropdown__currencies { display: flex; flex-direction: column; gap: 2px; max-height: 240px; overflow-y: auto; padding: 4px; background: var(--bg-input); border-radius: var(--radius-md); }
/* (scrollbar: the shared thin --scrollbar-thumb one from frame.css) */
.bal-dropdown__cur-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 10px; background: none; border: none; border-radius: var(--radius-md); cursor: pointer; font: inherit; font-size: var(--fs-sm); color: var(--text-muted); text-align: left; transition: background var(--dur-hover) var(--ease-premium), color var(--dur-hover) var(--ease-premium); }
@media (hover: hover) { .bal-dropdown__cur-item:hover { background: var(--bg-secondary); color: var(--text-primary); } }
.bal-dropdown__cur-item:focus-visible { outline: none; background: var(--bg-secondary); color: var(--text-primary); }
.bal-dropdown__cur-item.active { background: rgba(var(--accent-rgb), 0.14); color: var(--text-primary); }
.bal-dropdown__cur-name { font-weight: 700; min-width: 34px; }
.bal-dropdown__cur-full { flex: 1; min-width: 0; color: var(--text-dim); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bal-dropdown__cur-item.active .bal-dropdown__cur-full { color: var(--text-muted); }
.bal-dropdown__cur-check { font-size: 12px; color: var(--accent-hover); margin-left: auto; flex-shrink: 0; }
/* Shared header dropdown motion: open from opacity 0 / -6px / scale .98 over --dur-base,
   close over .14s ease-in (Header.tsx keeps the panel mounted for that via usePresence). */
@keyframes balDropIn { from { opacity: 0; transform: translate(-50%, -6px) scale(0.98); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes balDropOut { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -6px) scale(0.98); } }
@keyframes balListIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: no-preference) {
    .bal-dropdown { animation: balDropIn var(--dur-base, .22s) var(--ease-premium); }
    .bal-dropdown.is-closing { animation: balDropOut .14s var(--ease-in, cubic-bezier(.4,0,1,1)) forwards; }
    .bal-dropdown__currencies { animation: balListIn var(--dur-base, .22s) var(--ease-premium); }
}
@media (prefers-reduced-motion: reduce) {
    .bal-dropdown__select, .bal-dropdown__cur-chevron, .bal-dropdown__cur-item { transition: none; }
}
.header-balance-btn .balance-icon-img { display: block; object-fit: contain; }
.balance-currency-icon { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; display: block; vertical-align: middle; margin-left: 2px; }
.bal-dropdown__cur-icon { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; display: block; vertical-align: middle; }
.header-balance-btn .balance-icon-fa { font-size: 16px; }
.header-expand-down { width: 24px; height: 24px; margin: 0; padding: 0; transition: transform .24s var(--ease-premium); flex-shrink: 0; align-self: center; }
.header-cashier-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 40px; padding: 0 18px 0 12px; border-radius: var(--radius-md); background: var(--cashier); border: none; color: #fff; font-weight: 500; font-size: var(--fs-sm); cursor: pointer; transition: box-shadow var(--dur-base, .22s) var(--ease-out, cubic-bezier(.33,1,.68,1)); }
@media (hover: hover) { .header-cashier-btn:hover { box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.55); } }
/* the header buttons' icons: inline SVG in the button's colour, each trimmed to its drawing, one size (owner 2026-10-16:
   "Make sure all icons on site are even in length and size"; components/icons/SiteIcon.tsx) */
.header-btn-icon { display: block; flex-shrink: 0; width: 20px; height: 20px; color: #fff; overflow: visible; }
.header-cashier-btn .header-btn-icon { margin-top: -1px; }
.header-cashier-btn span { color: #fff; line-height: 1; margin-top: -1px; font-weight: 550; }
.header-cashier-btn.deposit-trigger--clicked { transform: scale(0.98); transition: transform var(--dur-fast, .16s) var(--ease-out, cubic-bezier(.33,1,.68,1)); }
.header-right-section { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.header-icon-buttons { display: flex; align-items: center; gap: 6px; }
.header-icon-btn-wrapper { display: flex; align-items: center; gap: 8px; }
.header-icon-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border-radius: var(--radius-md); background: var(--bg-chip); cursor: pointer; transition: background var(--dur-fast, .16s) var(--ease-out, cubic-bezier(.33,1,.68,1)), box-shadow var(--dur-fast, .16s) var(--ease-out, cubic-bezier(.33,1,.68,1)); border: none; }
/* State is shown with colour, never by dimming the button (focus ring comes from the global :focus-visible). */
@media (hover: hover) { .header-icon-btn:hover { background: var(--bg-chip-hover); } }
.header-icon-btn:focus-visible { background: var(--bg-chip-hover); }
.header-icon-btn:active { background: var(--bg-elevated); }
.header-account-btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 4px 0; margin-left: 12px; background: transparent; border: none; border-radius: 0; cursor: pointer; font: inherit; color: inherit; transition: opacity var(--dur-fast, .16s) var(--ease-out, cubic-bezier(.33,1,.68,1)); }
/* unread notifications (no bell since 2026-10-23): a dot at the account button's top right, like the phone's account
   button (mobile-header.css .mobile-header__account-dot), and the count on the menu's Notifications row */
.header-account-dot { position: absolute; top: 0; right: -7px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--bg-primary); pointer-events: none; }
.header-user-menu-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--danger); color: #fff; font-size: 12px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .header-account-btn:hover { opacity: 0.9; } }
/* the rank icon right before the name (owner 2026-10-10: "show the level icon in the top right next to users name") */
.header-account-rank { flex: none; display: block; margin-right: -3px; }
.header-account-name { font-family: "RM Neue-Bold", Helvetica, Arial, sans-serif; font-weight: 700; color: #fff; font-size: var(--fs-md); white-space: nowrap; }
/* the player's crown next to their name (owner 2026-10-20; TeamCrest, 12 x 10 pixel art at 12 px tall) */
.header-account-crest { display: block; flex: none; width: 14px; height: 12px; margin-left: -2px; image-rendering: pixelated; }
.header-account-chevron { width: 12px; height: 12px; object-fit: contain; flex-shrink: 0; transition: transform .24s var(--ease-premium); }
.header-user-wrap.open .header-account-chevron { transform: rotate(180deg); }

/* Header layout helpers + user menu */
.header-left { display: flex; align-items: center; gap: 20px; }
.header-balance-deposit-wrap { display: contents; }
.header-center { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; }
.header-logo { height: 40px; width: auto; }
.header-logo-mobile { display: none; }
.menu-toggle { background: var(--bg-chip-hover); border: 1px solid var(--border-color); width: 44px; height: 44px; border-radius: var(--radius-md); color: var(--text-primary); font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background var(--dur-fast, .16s) var(--ease-out, cubic-bezier(.33,1,.68,1)); }
@media (hover: hover) { .menu-toggle:hover { background: var(--bg-elevated); } }
.header-right { display: flex; align-items: center; gap: 12px; }
.balance-dropdown-wrap { position: relative; }
.balance-dropdown-btn { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-primary); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; transition: border-color var(--dur-fast, .16s) var(--ease-out, cubic-bezier(.33,1,.68,1)); }
@media (hover: hover) { .balance-dropdown-btn:hover { border-color: var(--accent-blue); } }
.balance-dropdown-btn .balance-icon { color: var(--success); font-size: 18px; }
.balance-dropdown-btn .balance-chevron { color: var(--text-secondary); font-size: 12px; transition: transform .24s var(--ease-premium); }
.balance-dropdown-wrap.open .balance-chevron { transform: rotate(180deg); }
.balance-both { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.balance-sep { color: var(--text-secondary); font-size: var(--fs-xs); margin: 0 2px; }
.balance-label, .bonus-label { font-size: 10px; font-style: normal; color: var(--text-secondary); margin-left: 2px; }
.balance-dropdown-menu { display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0; width: 100%; min-width: 0; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); z-index: 1001; overflow: hidden; }
.balance-dropdown-wrap.open .balance-dropdown-menu { display: block; }
.balance-dropdown-menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: none; border: none; color: var(--text-primary); font-size: var(--fs-sm); cursor: pointer; text-align: left; transition: background var(--dur-fast, .16s) var(--ease-out, cubic-bezier(.33,1,.68,1)); }
@media (hover: hover) { .balance-dropdown-menu button:hover { background: var(--bg-card); } }
.balance-switch-option { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; border: none; background: none; color: var(--text-muted); font-size: var(--fs-sm); cursor: pointer; border-radius: var(--radius-md); transition: background var(--dur-fast, .16s) var(--ease-out, cubic-bezier(.33,1,.68,1)), color var(--dur-fast, .16s) var(--ease-out, cubic-bezier(.33,1,.68,1)); }
@media (hover: hover) { .balance-switch-option:hover { background: var(--bg-chip-hover); color: #fff; } }
.balance-switch-option--active { background: rgba(var(--info-rgb),0.1); color: var(--info); }
@media (hover: hover) { .balance-switch-option--active:hover { background: rgba(var(--info-rgb),0.15); } }
.balance-switch-option--locked { opacity: 0.45; cursor: default; }
.balance-switch-option b { margin-left: auto; font-weight: 700; }
.balance-switch-toast { position: fixed; top: 14px; left: 0; right: 0; width: fit-content; margin: 0 auto; z-index: 10000; background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card)); color: var(--accent); padding: 10px 24px; border-radius: var(--radius-md); font-size: var(--fs-sm); font-weight: 600; border: 1px solid rgba(var(--accent-rgb),0.3); box-shadow: var(--shadow-lg); animation: balToastIn var(--dur-modal, .3s) var(--ease-out, cubic-bezier(.33,1,.68,1)); pointer-events: none; white-space: nowrap; }
@keyframes balToastIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
.header-deposit-btn { display: flex; align-items: center; gap: 8px; padding: 10px 20px; background: var(--accent-pink); color: var(--accent-text); border: none; border-radius: var(--radius-md); font-size: var(--fs-sm); font-weight: 700; cursor: pointer; transition: filter var(--dur-fast, .16s) var(--ease-out, cubic-bezier(.33,1,.68,1)), transform var(--dur-base, .22s) var(--ease-premium); }
@media (hover: hover) { .header-deposit-btn:hover { filter: brightness(1.1); transform: translateY(-1px); } }
.header-deposit-mobile { display: none; }
.header-user-wrap { display: inline-block; position: relative; }
/* Account menu: avatar + name/badge + wager progress, icon rows, red Logout */
/* Same motion as the other header dropdowns: opens over --dur-base with --ease-premium, closes over .14s ease-in.
   .is-instant (a link inside was clicked) hides it with no fade. */
.header-user-menu { opacity: 0; visibility: hidden; pointer-events: none; position: absolute; top: calc(100% + 12px); right: 0; transform: translateY(-6px) scale(0.98); transform-origin: top right; min-width: 264px; padding: 6px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); z-index: 1004; overflow: hidden; transition: opacity .14s var(--ease-in, cubic-bezier(.4,0,1,1)), transform .14s var(--ease-in, cubic-bezier(.4,0,1,1)), visibility 0s linear .14s; }
.header-user-wrap.open .header-user-menu { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition: opacity var(--dur-base, .22s) var(--ease-premium), transform var(--dur-base, .22s) var(--ease-premium), visibility 0s linear 0s; }
.header-user-wrap.is-instant:not(.open) .header-user-menu { transition: none; }
.header-user-menu-header { display: flex; align-items: center; gap: 12px; padding: 10px 10px 14px; margin-bottom: 4px; border-bottom: 1px solid var(--border-color); }
.header-user-menu-avatar { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18), var(--shadow-sm); color: var(--accent-text); font-size: var(--fs-lg); font-weight: 800; line-height: 1; user-select: none; }
.header-user-menu-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.header-user-menu-name-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.header-user-menu-name { font-weight: 800; font-size: var(--fs-md); line-height: 1.2; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-user-menu-badge { font-size: 12px; color: var(--badge-blue); flex-shrink: 0; }
.header-user-wager-stats { display: flex; align-items: baseline; gap: 2px; margin-top: 6px; font-size: var(--fs-xs); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-user-wager-current { color: var(--progress); font-weight: 700; }
.header-user-wager-sep { color: var(--text-dim); }
.header-user-wager-total { color: var(--text-muted); }
.header-user-wager-bar { height: 6px; background: var(--bg-input); border-radius: 999px; margin-top: 8px; overflow: hidden; }
/* A restricted account: no VIP numbers, one line saying progress is paused (MA-25) */
.header-user-wager-paused { margin: 6px 0 0; font-size: var(--fs-xs); line-height: 1.4; color: var(--text-muted); }
.header-user-wager-fill { height: 100%; background: linear-gradient(90deg, var(--progress-dark) 0%, var(--progress) 100%); border-radius: 999px; min-width: 6px; transition: width 0s linear .14s; }
/* Width is 0 while the menu is closed (Header.tsx); it refills on every open and resets once the menu has faded out. */
.header-user-wrap.open .header-user-wager-fill { transition: width .7s var(--ease-premium) .12s; }
.header-user-menu-section { display: flex; flex-direction: column; gap: 2px; padding: 2px 0; }
.header-user-menu-section-title { padding: 8px 12px 4px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-dim); }
.header-user-menu a, .header-user-menu button { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; background: none; border: none; border-radius: var(--radius-md); color: var(--text-muted); font-family: "RM Neue-Regular", Helvetica, Arial, sans-serif !important; font-size: var(--fs-sm); font-weight: 700; line-height: 1.2; cursor: pointer; text-align: left; text-decoration: none; transition: background var(--dur-hover) var(--ease-premium), color var(--dur-hover) var(--ease-premium); box-sizing: border-box; }
@media (hover: hover) { .header-user-menu a:hover, .header-user-menu button:hover { background: var(--bg-card); color: var(--text-primary); } }
.header-user-menu a:focus-visible, .header-user-menu button:focus-visible { outline: none; background: var(--bg-card); color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--accent); }
.header-user-menu .user-menu-icon { width: 20px; font-size: 15px; color: var(--text-muted); flex-shrink: 0; text-align: center; transition: color var(--dur-hover) var(--ease-premium); }
@media (hover: hover) { .header-user-menu a:hover .user-menu-icon, .header-user-menu button:hover .user-menu-icon { color: var(--text-primary); } }
.header-user-menu a:focus-visible .user-menu-icon, .header-user-menu button:focus-visible .user-menu-icon { color: var(--text-primary); }
.header-user-menu .menu-item-logout, .header-user-menu .menu-item-logout .user-menu-icon { color: var(--danger); }
@media (hover: hover) {
.header-user-menu .menu-item-logout:hover { background: rgba(var(--danger-rgb),0.12); color: var(--danger); }
.header-user-menu .menu-item-logout:hover .user-menu-icon { color: var(--danger); }
}
.header-user-menu .menu-item-logout:focus-visible { background: rgba(var(--danger-rgb),0.12); color: var(--danger); box-shadow: inset 0 0 0 1px rgba(var(--danger-rgb),0.6); }
.header-user-menu .menu-item-logout:focus-visible .user-menu-icon { color: var(--danger); }
.header-user-menu hr { border: none; border-top: 1px solid var(--border-color); margin: 4px 0; }
.header-user-menu-footer { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--border-color); }
@media (prefers-reduced-motion: reduce) {
    .header-user-wrap .header-user-menu { transform: none; transition: opacity var(--dur-fast, .16s) linear, visibility 0s linear var(--dur-fast, .16s); }
    .header-user-wrap.open .header-user-menu { transform: none; transition: opacity var(--dur-fast, .16s) linear, visibility 0s linear 0s; }
    .header-user-wrap.is-instant:not(.open) .header-user-menu { transition: none; }
    .header-user-menu a, .header-user-menu button, .header-user-menu .user-menu-icon,
    .header-user-wager-fill, .header-user-wrap.open .header-user-wager-fill,
    .bal-drop-chevron, .header-expand-down, .header-account-chevron, .balance-dropdown-btn .balance-chevron,
    .header-icon-btn, .header-cashier-btn, .header-deposit-btn { transition: none; }
    .header { transition: none; }
}
.header-right-section .btn-login, .header-right-section .btn-register { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 22px; border: none; border-radius: var(--radius-md); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; white-space: nowrap; transition: background var(--dur-fast, .16s) var(--ease-out, cubic-bezier(.33,1,.68,1)), color var(--dur-fast, .16s) var(--ease-out, cubic-bezier(.33,1,.68,1)); }
/* Join now: also ease the hover glow in/out (idle breathing glow + hover shadow live in frame.css .btn-register) */
.header-right-section .btn-register { transition: background var(--dur-fast, .16s) var(--ease-out, cubic-bezier(.33,1,.68,1)), color var(--dur-fast, .16s) var(--ease-out, cubic-bezier(.33,1,.68,1)), box-shadow var(--dur-base, .22s) var(--ease-out, cubic-bezier(.33,1,.68,1)); }
.header-right-section--guest { display: flex; align-items: center; gap: 12px; }

/* Header desktop @media */
@media (min-width: 769px) {
    /* + the landscape notch insets (0 everywhere else), see frame.css */
    .header { padding-left: calc(var(--sidebar-w) + env(safe-area-inset-left, 0px)); padding-right: env(safe-area-inset-right, 0px); }
    body:not(.sidebar-open) .header { padding-left: calc(52px + env(safe-area-inset-left, 0px)); }
    /* Side gutters so the logo / account never touch the sidebar or the window edge
       (1441–1552px, e.g. 1536px); the content column itself stays 1280px max. */
    .header-wrap-inner { padding-inline: clamp(16px, 2.2vw, 32px); max-width: calc(1280px + 2 * clamp(16px, 2.2vw, 32px)); }
}
@media (max-width: 768px) {
    .header.header-wrap { display: none !important; }
    .header { height: 62px; padding: 0 16px !important; align-items: center; }
    .header-left { gap: 10px; min-width: 0; flex: 0 0 auto; }
    .header-deposit-desktop { display: none; }
    .header-deposit-mobile { display: flex; }
    .header { justify-content: flex-start; gap: 6px; }
    .header-balance-deposit-wrap { display: flex; align-items: center; gap: 6px; }
    .header-center { position: static !important; left: auto !important; transform: none !important; margin-left: auto; flex: none; justify-content: flex-end; align-items: center; gap: 8px; max-width: none; }
    .header-right { flex-shrink: 0; gap: 6px; }
    .header-logo { height: 32px; display: block; }
    .header-logo-desktop { display: none; }
    .header-logo-mobile { display: block; height: 32px; width: auto; align-self: center; object-fit: contain; margin-top: -8px; }
    .casino-btn, .menu-toggle { display: none; }
    .header-icon-bell { display: none !important; }
    .header-user-wrap { position: fixed; bottom: 72px; right: 16px; width: 1px; height: 1px; z-index: 10000; }
    .header-user-wrap .header-icon-btn { display: none !important; }
    .header-user-wrap .header-user-menu { top: auto; bottom: 100%; margin-bottom: 10px; right: 0; transform: translateY(6px) scale(0.98); transform-origin: bottom right; }
    .header-user-wrap.open .header-user-menu { transform: none; }
    .header { z-index: 1002; }
    body.sidebar-open .header { z-index: 999; filter: brightness(0.55); }
}
@media (max-width: 480px) {
    .header-logo-mobile { height: 32px; }
    .header { height: 62px; padding: 0 12px; }
}

/* Session known, profile still loading (Header.tsx sessionPending): a grey balance bar
   where the balance + Wallet will appear, so a logged-in player never sees Login / Join now. */
.header-balance-pending { display: flex; align-items: center; padding: 3px; background: var(--bg-input); border-radius: var(--radius-lg); }
.header-balance-skeleton { display: block; width: 236px; height: 38px; border-radius: var(--radius-md); background: var(--bg-card); }
@media (prefers-reduced-motion: no-preference) {
    .header-balance-skeleton { animation: hdrSkeletonPulse 1.2s ease-in-out infinite; }
}
@keyframes hdrSkeletonPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* Account button: on a touch screen 769-960px wide (a phone turned sideways) the logo, balance,
   Wallet, four icon buttons and a long name do not fit; the name gave way to nothing but the
   chevron. Show the player's avatar tile there instead (the menu it opens shows the name). */
.header-account-avatar { display: none; }
@media (pointer: coarse) and (min-width: 769px) and (max-width: 960px) {
    .header-account-avatar { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0; overflow: hidden; border-radius: var(--radius-md); background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%); color: var(--accent-text); font-size: var(--fs-md); font-weight: 800; line-height: 1; user-select: none; }
    .header-account-name { display: none; }
    .header-account-btn { min-height: 44px; margin-left: 4px; }
}

/* Touch screens wider than 768px (tablet, phone turned sideways): the balance and Wallet
   buttons are 40px tap targets like the icon buttons next to them (38px for a mouse). */
@media (pointer: coarse) and (min-width: 769px) {
    .header-balance-cashier-row__balance, .header-balance-static, .header-balance-cashier-row .header-cashier-btn { height: 40px; }
}

/* The computer header a little taller, its buttons with it (owner 2026-10-25: "make this top header slightly thicker and
   all the buttons text bigger with it"): the bar 66 px, 62 up to 1440 px (--header-h: frame.css, desktop-density.css;
   was 60 / 56); Sign In / Register, the chat / rewards blocks and the Wallet 44 px (were 40); Sign In / Register's words
   16 px (were 14), the Wallet's 18 (were 16, theme-castle.css); the balance beside the Wallet 42 (was 38; 40 on touch
   screens). The pixel icons stay 24 px (2 screen px a block), the balance figure 20 px (2 per font pixel), the logo 49 px.
   Phones keep their header. Undo ../removed-features-backup/header-thicker-2026-10-25/README.txt */
@media (min-width: 769px) {
    .header-right-section .btn-login, .header-right-section .btn-register { height: 44px; padding: 0 24px; font-size: var(--fs-md); }
    .header-icon-btn { width: 44px; height: 44px; }
    .header-cashier-btn { height: 44px; font-size: var(--fs-md); }
    .header-balance-cashier-row .header-cashier-btn { height: 42px; }
    .header-balance-cashier-row__balance, .header-balance-cashier-row__balance .balance-dropdown-wrap,
    .header-balance-cashier-row__balance .header-balance-btn, .header-balance-static { height: 42px; }
}

/* The balance + Wallet in the header's true middle (owner 2026-10-25: "is the wallet section in the middle of the top
   header on pc it doesnt look like it" — it sat in the middle of the room BETWEEN the logo (142 px) and the right-hand
   buttons (~240 px), so 38–39 px left of the column's centre at every width, the side menu open or closed): three
   columns, the two sides equal (1fr auto 1fr), so the wallet stands on the centre of the header's column — the page
   column's centre. A side never gets narrower than what it holds (1fr = at least its content), so on a tight header the
   wallet gives way toward the smaller side, always 16 px clear of it (column-gap; centred, the gaps change nothing).
   From 1025 px only: below it the account name is the part that shrinks (desktop-density.css 769–1024 px) and equal
   sides would cut it sooner; there the old flow stays.
   Check ../banner-work/header-wallet-centre-2026-10-25/tools/wallet-centre-check.mjs; undo
   ../removed-features-backup/header-wallet-centre-2026-10-25/README.txt */
@media (min-width: 1025px) {
    .header-wrap-inner { display: grid; grid-template-columns: 1fr auto 1fr; column-gap: 16px; }
    .header-logo-link { justify-self: start; }
    .header-right-section { justify-self: end; }
}
