/* EXTRAS: home hub tiles, phone bottom nav, challenges, deals, live, clips, discord, sheets, chat chips.
   Crimson / steel / fire. No purple. Motion only with prefers-reduced-motion: no-preference. */
:root { --sbx-crim: #c13537; --sbx-ember: #f05338; --sbx-fire: #ff8f1f; --sbx-gold: #ffb21e; --sbx-steel: #9fb0c8; --sbx-steel2: #2a3446; --sbx-ink: #05070f; --sbx-card: rgba(12,16,28,.92); }

/* ---- home hub ---- */
.sb-online-strip:empty { display: none; }
.sb-quick { grid-template-columns: 1fr 1fr; }
.sb-qt-sm { min-height: 6.4rem; padding: .8rem .85rem; gap: .5rem; border-color: rgba(159,176,200,.32); background: linear-gradient(150deg, rgba(42,52,70,.75), rgba(8,11,20,.94) 75%); }
.sb-qt-sm .sb-qt-ic { width: 2.2rem; height: 2.2rem; border-radius: 12px; }
.sb-qt-sm .sb-qt-ic svg { width: 1.3rem; height: 1.3rem; }
.sb-qt-sm strong { font-size: .98rem; }
.sb-qt-sm small { font-size: .74rem; }
.sb-qt-squad, .sb-qt-checkin { border-color: rgba(240,83,56,.5); background: linear-gradient(150deg, rgba(193,53,55,.3), rgba(8,11,20,.94) 72%); }
.sb-qt-deals .sb-qt-ic svg, .sb-qt-challenge .sb-qt-ic svg { stroke: var(--sbx-gold); }
.sb-qt-live .sb-qt-ic svg { stroke: #ff6a54; }
.sb-qt[hidden] { display: none; }
.sbx-home-card, .sbx-home-strip { margin: .8rem 0 0; padding: .85rem .9rem; border-radius: 18px; border: 1px solid rgba(255,178,30,.28); background: var(--sbx-card); position: relative; z-index: 3; }
.sbx-home-strip[hidden] { display: none; }
.sbx-strip-h { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; margin-bottom: .55rem; }
.sbx-strip-h h3 { margin: 0; font-size: 1rem; color: #fff; display: flex; align-items: center; gap: .45rem; }
.sbx-strip-h a { color: var(--sbx-gold); font-weight: 700; font-size: .85rem; text-decoration: none; padding: .4rem 0; }

/* ---- bottom nav (phones) ---- */
.sbx-bnav { display: none; }
@media (max-width: 760px) {
  .sbx-bnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; padding: .3rem .3rem calc(.3rem + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(10,13,22,.96), rgba(5,7,15,.99)); border-top: 1px solid rgba(240,83,56,.45); box-shadow: 0 -8px 24px rgba(0,0,0,.5); }
  .sbx-bn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; min-height: 54px; border: 0; background: none; color: var(--sbx-steel); font: 700 .7rem/1 system-ui, sans-serif; letter-spacing: .02em; border-radius: 12px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .sbx-bn .sbx-ic svg { width: 1.45rem; height: 1.45rem; }
  .sbx-bn.on { color: #fff; background: rgba(193,53,55,.22); }
  .sbx-bn.on .sbx-ic svg { stroke: var(--sbx-fire); }
  .sbx-bn:focus-visible { outline: 2px solid var(--sbx-gold); outline-offset: -2px; }
  body.has-bnav { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  body.has-bnav .mb-chat-fab { bottom: calc(76px + env(safe-area-inset-bottom)) !important; }
  body.has-bnav .mb-chat { bottom: calc(66px + env(safe-area-inset-bottom)) !important; max-height: calc(100dvh - 140px) !important; }
}
.sbx-ic { display: inline-grid; place-items: center; }
.sbx-ic svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- sheets + toast ---- */
html.sbx-lock { overflow: hidden; }
.sbx-sheet { position: fixed; inset: 0; z-index: 1200; background: rgba(2,3,8,.72); display: flex; align-items: flex-end; justify-content: center; }
.sbx-sheet-panel { width: min(100%, 560px); max-height: 88dvh; overflow: auto; background: linear-gradient(180deg, #121826, #070a13); border: 1px solid rgba(240,83,56,.45); border-bottom: 0; border-radius: 22px 22px 0 0; padding: 1rem 1rem calc(1.2rem + env(safe-area-inset-bottom)); color: #eef2ff; }
@media (min-width: 761px) { .sbx-sheet { align-items: center; } .sbx-sheet-panel { border-radius: 22px; border-bottom: 1px solid rgba(240,83,56,.45); } }
.sbx-sheet-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.sbx-sheet-top h3 { margin: 0; font-size: 1.2rem; }
.sbx-x { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(159,176,200,.35); background: rgba(255,255,255,.06); color: #fff; font-size: 1.5rem; cursor: pointer; }
.sbx-toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; z-index: 1300; max-width: 92vw; padding: .7rem 1rem; border-radius: 14px; background: #1b2333; border: 1px solid var(--sbx-fire); color: #fff; font-weight: 700; font-size: .9rem; pointer-events: none; transition: opacity .2s, transform .2s; }
.sbx-toast.on { opacity: 1; transform: translate(-50%, 0); }
.sbx-more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.sbx-more-t { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; min-height: 84px; padding: .5rem .3rem; border-radius: 16px; border: 1px solid rgba(159,176,200,.28); background: rgba(27,35,51,.75); color: #fff; text-decoration: none; font: 700 .78rem/1.15 system-ui, sans-serif; text-align: center; cursor: pointer; }
.sbx-more-t .sbx-ic svg { stroke: var(--sbx-fire); width: 1.5rem; height: 1.5rem; }
.sbx-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: .5rem; }
.sbx-member { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .6rem .3rem; min-height: 88px; border-radius: 14px; border: 1px solid rgba(159,176,200,.25); background: rgba(27,35,51,.7); color: #fff; cursor: pointer; font: 700 .8rem/1.1 system-ui, sans-serif; }
.sbx-member b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbx-member .mb-face, .sbx-ava { width: 40px; height: 40px; }
.sbx-ava { display: grid; place-items: center; border-radius: 50%; background: var(--sbx-crim); }
.sbx-steps { margin: .4rem 0 1rem; padding-left: 1.3rem; display: grid; gap: .5rem; font-size: 1rem; }

/* ---- rooms ---- */
.sbx-room { padding-bottom: 2rem; }
.sbx-sh .sbx-kicker { margin: 0 0 .2rem; font: 800 .72rem/1 system-ui, sans-serif; letter-spacing: .18em; text-transform: uppercase; color: var(--sbx-ember); }
.sbx-sh h2 em { color: var(--sbx-fire); font-style: normal; }
.sbx-lede { color: #c9d2e6; }
.sbx-wrap { max-width: 980px; margin: 0 auto; display: grid; gap: .9rem; }
.sbx-card { padding: 1rem; border-radius: 18px; border: 1px solid rgba(159,176,200,.22); background: var(--sbx-card); color: #eef2ff; }
.sbx-card h3 { margin: 0 0 .6rem; font-size: 1.05rem; }
.sbx-card h4 { margin: .8rem 0 .4rem; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sbx-steel); }
.sbx-p { font-size: 1rem; line-height: 1.5; margin: 0 0 .7rem; }
.sbx-small { font-size: .82rem; line-height: 1.4; color: #aab4cc; margin: .3rem 0; }
.sbx-big { font-size: 1.15rem; margin: .2rem 0; }
.sbx-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.sbx-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.sbx-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .55rem 1rem; border-radius: 12px; border: 1px solid rgba(159,176,200,.4); background: rgba(27,35,51,.85); color: #fff; font: 700 .92rem/1.1 system-ui, sans-serif; text-decoration: none; cursor: pointer; }
.sbx-btn-hot { border-color: transparent; background: linear-gradient(135deg, var(--sbx-ember), var(--sbx-crim)); }
.sbx-btn-sm { min-height: 40px; padding: .35rem .8rem; font-size: .85rem; }
.sbx-btn-lg { min-height: 54px; width: 100%; font-size: 1.05rem; }
.sbx-linkbtn { border: 0; background: none; color: var(--sbx-gold); font: inherit; text-decoration: underline; cursor: pointer; padding: .3rem 0; }
.sbx-in { width: 100%; min-height: 46px; padding: .55rem .8rem; border-radius: 12px; border: 1px solid rgba(159,176,200,.35); background: #0a0e18; color: #fff; font-size: 1rem; box-sizing: border-box; }
.sbx-form { display: grid; gap: .55rem; }
/* challenges */
.sbx-chl { display: grid; gap: .55rem; }
.sbx-ch { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .7rem; padding: .75rem .85rem; border-radius: 14px; border: 1px solid rgba(255,178,30,.25); background: rgba(27,35,51,.6); }
.sbx-ch.done { border-color: rgba(74,222,128,.5); }
.sbx-ch-t { display: grid; gap: .25rem; min-width: 0; }
.sbx-ch-t b { color: #fff; font-size: .98rem; }
.sbx-ch-t small { color: #b8c2d8; font-size: .8rem; }
.sbx-ch-n { color: var(--sbx-gold) !important; font-weight: 700; }
.sbx-bar { height: 8px; border-radius: 99px; background: rgba(159,176,200,.18); overflow: hidden; }
.sbx-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sbx-crim), var(--sbx-fire), var(--sbx-gold)); }
.sbx-chl.compact .sbx-ch { padding: .55rem .7rem; }
.sbx-xp { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; text-align: center; }
.sbx-xp small { display: block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sbx-steel); }
.sbx-xp b { font-size: 1.5rem; color: var(--sbx-gold); }
.sbx-ol { margin: 0; padding-left: 1.4rem; display: grid; gap: .35rem; }
.sbx-ol li { display: flex; gap: .5rem; align-items: center; }
.sbx-ol li > :first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.sbx-ol a { color: #fff; }
.sbx-rk { font-size: .7rem; font-weight: 800; padding: .1rem .45rem; border-radius: 99px; color: var(--rk); border: 1px solid var(--rk); }
.sbx-runs { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.sbx-runs li { display: flex; justify-content: space-between; gap: .6rem; font-size: .9rem; }
.sbx-runs a { color: #eef2ff; text-transform: capitalize; }
/* deals */
.sbx-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 62%); gap: .6rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .4rem; -webkit-overflow-scrolling: touch; }
@media (min-width: 761px) { .sbx-rail { grid-auto-columns: 240px; } }
.sbx-deal { scroll-snap-align: start; display: grid; grid-template-rows: auto 1fr; border-radius: 14px; overflow: hidden; border: 1px solid rgba(159,176,200,.25); background: #0b0f1b; color: #eef2ff; text-decoration: none; }
.sbx-deal img, .sbx-deal-ph { width: 100%; aspect-ratio: 460 / 215; object-fit: cover; display: block; background: #151b2a; }
.sbx-deal-ph { display: grid; place-items: center; color: var(--sbx-steel); }
.sbx-deal-ph svg { width: 2rem; height: 2rem; fill: none; stroke: currentColor; stroke-width: 1.6; }
.sbx-deal-b { display: grid; gap: .25rem; padding: .6rem .7rem .7rem; }
.sbx-deal-b strong { font-size: .92rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sbx-deal-b small { color: #9fb0c8; font-size: .74rem; }
.sbx-deal-p { display: flex; align-items: center; justify-content: space-between; gap: .4rem; margin-top: .15rem; }
.sbx-free { color: #0b0f1b; background: var(--sbx-gold); padding: .15rem .5rem; border-radius: 8px; font-size: .78rem; letter-spacing: .06em; }
.sbx-soon { color: var(--sbx-gold); font-size: .8rem; }
.sbx-price { display: inline-flex; gap: .35rem; align-items: baseline; font-size: .85rem; }
.sbx-price b { color: #fff; background: var(--sbx-crim); padding: .1rem .4rem; border-radius: 7px; }
.sbx-price s { color: #7d8aa3; font-size: .75rem; }
/* live */
.sbx-streams { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .55rem; }
.sbx-stream { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: .6rem; row-gap: .15rem; align-items: center; padding: .7rem .8rem; border-radius: 14px; border: 1px solid rgba(159,176,200,.22); background: rgba(27,35,51,.6); }
.sbx-stream.is-live { border-color: rgba(240,83,56,.65); background: linear-gradient(135deg, rgba(193,53,55,.25), rgba(12,16,28,.9)); }
.sbx-stream > small { grid-column: 1; color: #b8c2d8; font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbx-stream > a { grid-row: 1 / 3; grid-column: 2; }
.sbx-stream-n { display: flex; gap: .45rem; align-items: center; border: 0; background: none; color: #fff; font: 700 1rem/1.2 system-ui, sans-serif; padding: 0; cursor: pointer; text-align: left; }
.sbx-livepill { display: inline-block; padding: .12rem .42rem; border-radius: 6px; background: #e8362f; color: #fff; font: 800 .66rem/1.2 system-ui, sans-serif; letter-spacing: .08em; }
.sbx-offpill { display: inline-block; padding: .12rem .42rem; border-radius: 6px; background: var(--sbx-steel2); color: var(--sbx-steel); font: 700 .66rem/1.2 system-ui, sans-serif; }
/* clips */
.sbx-clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .7rem; }
.sbx-clip { border-radius: 16px; overflow: hidden; border: 1px solid rgba(159,176,200,.22); background: #0b0f1b; }
.sbx-clip-f { position: relative; aspect-ratio: 16 / 9; background: #000; }
.sbx-clip-f.tall { aspect-ratio: 9 / 14; }
.sbx-clip-f iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sbx-clip-play { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; background: #11141c; cursor: pointer; }
.sbx-clip-play img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sbx-clip-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--sbx-steel); font-weight: 800; background: radial-gradient(circle at 30% 30%, rgba(193,53,55,.35), transparent 60%), #11141c; }
.sbx-clip-btn { position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center; background: rgba(193,53,55,.9); box-shadow: 0 0 0 3px rgba(255,255,255,.2); }
.sbx-clip-btn svg { width: 26px; height: 26px; fill: #fff; stroke: none; }
.sbx-clip-b { display: grid; gap: .2rem; padding: .6rem .75rem .75rem; }
.sbx-clip-b small { color: #9fb0c8; }
/* chat plus */
.cp-chips { display: flex; gap: .4rem; overflow-x: auto; padding: .45rem .6rem; border-bottom: 1px solid rgba(159,176,200,.15); -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.cp-chip { flex: 0 0 auto; min-height: 36px; padding: .3rem .75rem; border-radius: 99px; border: 1px solid rgba(240,83,56,.55); background: rgba(193,53,55,.16); color: #fff; font: 700 .8rem/1 system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.cp-bot .cp-ava { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--sbx-ember), var(--sbx-crim)); color: #fff; font: 800 .7rem/1 system-ui, sans-serif; }
.cp-bot .mb-cm-n small { color: #8d99b3; font-weight: 400; }
.cp-body { display: grid; gap: .35rem; }
.cp-p { margin: 0; }
.cp-list { margin: 0; padding-left: 1.1rem; display: grid; gap: .25rem; font-size: .88rem; }
.cp-list a { color: var(--sbx-gold); }
.cp-btn { justify-self: start; min-height: 36px; padding: .3rem .8rem; border-radius: 10px; border: 1px solid rgba(159,176,200,.4); background: rgba(27,35,51,.85); color: #fff; font: 700 .82rem/1 system-ui, sans-serif; cursor: pointer; }
.cp-btn.hot { background: linear-gradient(135deg, var(--sbx-ember), var(--sbx-crim)); border-color: transparent; }
.cp-bot .sbx-members { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.cp-cmdform { margin-top: .3rem; }
@media (prefers-reduced-motion: no-preference) {
  .sbx-livepill { animation: sbxPulse 1.6s ease-in-out infinite; }
  .sbx-sheet-panel { animation: sbxUp .22s ease-out; }
}
@keyframes sbxPulse { 50% { opacity: .55; } }
@keyframes sbxUp { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }
/* Keep the home hub inside the phone width (the hero is a grid, whose items default to min-width:auto). */
.hero > .rd-hero-copy, .rd-hero-copy { min-width: 0; }
.sb-quick, .sbx-home-card, .sbx-home-strip, .sbx-rail { min-width: 0; max-width: 100%; }
/* Rooms: side gutters on phones, centred column on desktop. */
.sbx-room > .sbx-sh, .sbx-room > .sbx-wrap { box-sizing: border-box; width: 100%; max-width: 980px; margin-left: auto; margin-right: auto; padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }
.sbx-room *, .sbx-room *::before, .sbx-room *::after { box-sizing: border-box; }
.sbx-room .sbx-wrap > * { max-width: 100%; min-width: 0; }
/* Chat chips stay one tidy scrollable row; the members-only gate really hides the send box. */
.cp-chips > * { flex: 0 0 auto; white-space: nowrap; }
.mb-chat-form[hidden] { display: none !important; }
.mb-chat .cp-chips { flex: 0 0 auto; height: auto; min-height: 3.1rem; align-items: center; overflow-y: hidden; }
.mb-chat .cp-chips > * { height: 2.2rem; min-height: 2.2rem; line-height: 1; display: inline-flex; align-items: center; padding: 0 .85rem; }
/* members.css lays the dock out as 3 grid rows; with the chip row added it needs 4+ (chips stay short, the list gets the space). */
.mb-chat:has(> .cp-chips) { grid-template-rows: auto auto minmax(0, 1fr); grid-auto-rows: auto; }
