/* Main Log In button + signed-in profile card (Shadowblade Gaming). Crimson / steel / fire. No purple. */
:root { --lb-red: #c13537; --lb-red2: #ea7071; --lb-fire: #f05338; --lb-steel: #aeb6c2; --lb-steel2: #6c7686; --lb-ink: #0b0d14; --lb-on: #3ddc84; }
#sb-lb { position: relative; display: inline-flex; align-items: center; flex: 0 0 auto; font-family: Inter, "Rajdhani", system-ui, sans-serif; z-index: 86; }
#rd-nav #mb-nav-btn { display: none !important; }
#rd-nav #sb-lb { margin-left: auto; }
/* nav hidden (museum hub) or no nav (rules page): float in the top-right corner, left of the flame button */
#sb-lb.is-float { position: fixed; top: max(10px, env(safe-area-inset-top)); right: calc(max(10px, env(safe-area-inset-right)) + 54px); }
html[data-hub="ac-museum"] #sb-lb:not(.is-float) { display: none; }
body.is-locked #sb-lb { display: none; }

.sb-lb-login { display: inline-flex; align-items: center; gap: .45rem; height: 40px; padding: 0 1rem; border-radius: 10px; border: 1px solid rgba(255,255,255,.18); cursor: pointer; font: 800 .86rem/1 Inter, system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: linear-gradient(100deg, var(--lb-red2), var(--lb-red) 60%, var(--lb-fire)); box-shadow: 0 4px 18px rgba(193,53,55,.4), inset 0 1px 0 rgba(255,255,255,.25); -webkit-tap-highlight-color: transparent; }
.sb-lb-login svg { width: 17px; height: 17px; fill: currentColor; }
.sb-lb-login:hover { box-shadow: 0 6px 24px rgba(240,83,56,.55), inset 0 1px 0 rgba(255,255,255,.25); transform: translateY(-1px); }

.sb-lb-card { display: inline-flex; align-items: center; gap: .6rem; min-height: 46px; max-width: 220px; padding: 5px 10px 5px 6px; border-radius: 12px; cursor: pointer; text-align: left; color: #eef0f4; border: 1px solid rgba(174,182,194,.38); border-left: 3px solid var(--lb-red); background: linear-gradient(160deg, #202531 0%, #11141c 70%); box-shadow: 0 4px 16px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.07); -webkit-tap-highlight-color: transparent; }
.sb-lb-card:hover, .sb-lb-card[aria-expanded="true"] { border-color: rgba(234,112,113,.7); box-shadow: 0 4px 18px rgba(193,53,55,.35), inset 0 1px 0 rgba(255,255,255,.08); }
.sb-lb-card .mb-face { width: 36px; height: 36px; box-shadow: 0 0 0 2px var(--lb-steel), 0 0 0 3px rgba(0,0,0,.6); background: #1e090a; }
.sb-lb-card .mb-face img, .sb-lb-card .mb-face svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.sb-lb-txt { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.sb-lb-nick { font: 800 .86rem/1.1 Inter, system-ui, sans-serif; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.sb-lb-st { display: inline-flex; align-items: center; gap: .35rem; font: 700 .7rem/1 Inter, system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--lb-on); }
.sb-lb-st i { width: 8px; height: 8px; border-radius: 50%; background: var(--lb-on); box-shadow: 0 0 0 2px rgba(61,220,132,.22), 0 0 8px var(--lb-on); animation: sbLbPulse 2.4s ease-in-out infinite; }
.sb-lb-card.is-off .sb-lb-st { color: var(--lb-steel2); } .sb-lb-card.is-off .sb-lb-st i { background: var(--lb-steel2); box-shadow: none; animation: none; }
.sb-lb-chev { width: 14px; height: 14px; fill: none; stroke: var(--lb-steel); stroke-width: 2.4; flex: 0 0 auto; transition: transform .15s; }
.sb-lb-card[aria-expanded="true"] .sb-lb-chev { transform: rotate(180deg); }
@keyframes sbLbPulse { 0%, 100% { box-shadow: 0 0 0 2px rgba(61,220,132,.22), 0 0 6px var(--lb-on); } 50% { box-shadow: 0 0 0 4px rgba(61,220,132,.12), 0 0 12px var(--lb-on); } }
@media (prefers-reduced-motion: reduce) { .sb-lb-st i { animation: none; } }

.sb-lb-menu { position: fixed; z-index: 99970; min-width: 190px; padding: 6px; border-radius: 12px; border: 1px solid rgba(174,182,194,.35); background: linear-gradient(170deg, #1b1f2a, #0d0f16); box-shadow: 0 18px 44px rgba(0,0,0,.65); }
.sb-lb-menu[hidden] { display: none; }
.sb-lb-menu button, .sb-lb-menu a { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 .8rem; border: 0; border-radius: 8px; background: none; color: #e8e6ea; font: 700 .88rem Inter, system-ui, sans-serif; text-align: left; text-decoration: none; cursor: pointer; }
.sb-lb-menu button:hover, .sb-lb-menu a:hover, .sb-lb-menu button:focus-visible { background: rgba(193,53,55,.22); outline: none; }
.sb-lb-menu .sb-lb-out { color: var(--lb-red2); border-top: 1px solid rgba(174,182,194,.18); border-radius: 0 0 8px 8px; margin-top: 4px; }
.sb-lb-login:focus-visible, .sb-lb-card:focus-visible { outline: 2px solid var(--lb-red2); outline-offset: 2px; }

@media (max-width: 700px) {
  .sb-lb-login { height: 38px; padding: 0 .8rem; font-size: .8rem; } .sb-lb-login svg { display: none; }
  .sb-lb-card { gap: .45rem; padding: 4px 8px 4px 5px; max-width: 168px; } .sb-lb-card .mb-face { width: 32px; height: 32px; }
  .sb-lb-nick { max-width: 78px; font-size: .78rem; } .sb-lb-chev { display: none; }
}

/* two signed-out buttons + Profile tab */
#sb-lb:not(.is-float) { gap: .45rem; }
#sb-lb.is-float { gap: .4rem; }
.sb-lb-ghost { background: rgba(14,16,24,.8); border-color: rgba(174,182,194,.5); box-shadow: none; }
.sb-lb-ghost:hover { border-color: var(--lb-red2); background: rgba(193,53,55,.2); }
.rd-nav-links a.sb-lb-tab { color: #fff; background: rgba(193,53,55,.28); border: 1px solid rgba(234,112,113,.5); font-weight: 800; }
.rd-nav-links a.sb-lb-tab:hover, .rd-nav-links a.sb-lb-tab.on { background: var(--lb-red); }
.sb-lb-tab.is-chip { display: inline-flex; align-items: center; height: 40px; padding: 0 .9rem; border-radius: 10px; color: #fff; text-decoration: none; font: 800 .84rem Inter, system-ui, sans-serif; background: rgba(193,53,55,.3); border: 1px solid rgba(234,112,113,.5); }
@media (max-width: 700px) {
  /* the logo sits right under the header on the home page; free its space so Log In / Sign Up / Profile fit on a phone */
  #rd-nav .rd-nav-brand { display: none !important; }
  #rd-nav .rd-nav-links { min-width: 0; flex: 1 1 0; }
  #rd-nav #btn-vsound { display: none; }
  #sb-lb:not(.is-float) { gap: .35rem; }
  .sb-lb-login { height: 38px; padding: 0 .7rem; font-size: .78rem; letter-spacing: .04em; }
  .sb-lb-tab.is-chip { height: 38px; padding: 0 .7rem; font-size: .78rem; }
  #sb-lb.is-float { right: calc(max(8px, env(safe-area-inset-right)) + 50px); }
}
@media (max-width: 400px) { .sb-lb-card { max-width: 156px; } .sb-lb-nick { max-width: 76px; } }

/* phones: stray wide layers (intro/vignette/glow) must not stretch the page, or the fixed header and its buttons slide off-screen */
@media (max-width: 700px) { html, body { overflow-x: clip; max-width: 100%; } }

/* rules page: the badge lives in the page's own header row, replacing its single "Join and enter" link */
.top > #sb-lb { margin-left: auto; }
.top > a.mb-btn[href="/#join"] { display: none; }

/* Visitors tile in the home hero "Site at a glance" strip (same running total as the footer odometer) */
.rd-stats:has(> .rd-stat-visits:not([hidden])) { grid-template-columns: repeat(5, 1fr); }
.rd-stat-visits dd { color: #ff8a6d; text-shadow: 0 0 14px rgba(240,83,56,.45); }
@media (max-width: 700px) { .rd-stats:has(> .rd-stat-visits:not([hidden])) { grid-template-columns: repeat(2, 1fr); } .rd-stat-visits:not([hidden]) { grid-column: 1 / -1; } }

/* card tap opens My Profile; the small chevron button beside it holds the account menu (hidden on phones: sign out lives in My Profile) */
#sb-lb .sb-lb-card { border-radius: 12px 0 0 12px; border-right-width: 0; }
.sb-lb-more { display: inline-flex; align-items: center; justify-content: center; align-self: stretch; width: 34px; margin-left: -.45rem; padding: 0; border-radius: 0 12px 12px 0; cursor: pointer; border: 1px solid rgba(174,182,194,.38); border-left: 1px solid rgba(174,182,194,.16); background: linear-gradient(160deg, #202531 0%, #11141c 70%); -webkit-tap-highlight-color: transparent; }
#sb-lb.is-float .sb-lb-more { margin-left: -.4rem; }
.sb-lb-more:hover, .sb-lb-more[aria-expanded="true"] { border-color: rgba(234,112,113,.7); }
.sb-lb-more[aria-expanded="true"] .sb-lb-chev { transform: rotate(180deg); }
.sb-lb-more:focus-visible { outline: 2px solid var(--lb-red2); outline-offset: 2px; }
@media (max-width: 700px) { .sb-lb-more { display: none; } #sb-lb .sb-lb-card { border-radius: 12px; border-right-width: 1px; } }
