/* ReactionX skin: "the whoopee cushion at a game show". A deep night-purple room, a gassy lime accent,
   a hot-pink second. Layers on core.css (the family chrome); only token VALUES and ReactionX's own
   components live here. */
:root {
  --sx-accent: #9be37a;
  --sx-accent2: #ff4fa3;
  --sx-accent-hover: #b4f095;
  --sx-accent-ink: #13260a;
  --sx-accent-soft: rgba(155, 227, 122, .16);
  --sx-bg: #0f0b18;
  --sx-bg-hi: #171126;
  --sx-bg-lo: #08060e;
  --sx-panel: #171126;
  --sx-panel2: #1f1733;
  --sx-surface: #1a142b;
  --sx-surface2: #241b3a;
  --sx-glow-1: rgba(155, 227, 122, .14);
  --sx-glow-2: rgba(255, 79, 163, .1);
}

/* --- landing ---------------------------------------------------------------- */
.rx-hero { display: grid; grid-template-columns: 1fr 1.1fr; gap: 28px; align-items: center; max-width: 1180px; margin: 0 auto; padding: 44px 18px 18px; }
.rx-hero h1 { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.04; margin: 0 0 14px; letter-spacing: -.5px; }
.rx-hero h1 .hl { color: var(--sx-accent); }
.rx-hero p.lead { color: var(--sx-muted); font-size: clamp(16px, 2vw, 19px); line-height: 1.6; margin: 0 0 22px; max-width: 540px; }
.rx-hero .btns { display: flex; gap: 12px; flex-wrap: wrap; }
.rx-shot { position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: var(--sx-radius); overflow: hidden; border: 1px solid var(--sx-border); background: #05040b; box-shadow: var(--sx-shadow); }
.rx-shot iframe, .rx-shot video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; object-fit: cover; }
@media (max-width: 860px) { .rx-hero { grid-template-columns: 1fr; text-align: center; } .rx-hero .btns { justify-content: center; } .rx-hero p.lead { margin-inline: auto; } }
.rx-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; max-width: 1180px; margin: 18px auto 40px; padding: 0 18px; }
.rx-card { background: var(--sx-panel); border: 1px solid var(--sx-border); border-radius: var(--sx-radius); padding: 18px; }
.rx-card .ico { font-size: 26px; margin-bottom: 8px; }
.rx-card h3 { margin: 0 0 6px; font-size: 16px; }
.rx-card p { margin: 0; color: var(--sx-muted); font-size: 14px; line-height: 1.55; }
.rx-card code, .rx-panel code { font-family: var(--sx-mono); color: var(--sx-accent); }

/* --- control page ----------------------------------------------------------- */
.rx-dash { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 18px; max-width: 1280px; margin: 0 auto; padding: 16px; }
@media (max-width: 1000px) { .rx-dash { grid-template-columns: minmax(0, 1fr); } }
.rx-col { display: grid; gap: 14px; align-content: start; min-width: 0; }
.rx-panel { background: var(--sx-panel); border: 1px solid var(--sx-border); border-radius: var(--sx-radius); padding: 16px; min-width: 0; }
.rx-panel h3 { margin: 0 0 10px; font-size: 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rx-panel h3 small { font-weight: 500; color: var(--sx-muted); font-size: 12.5px; }
.rx-sub { color: var(--sx-muted); font-size: 13px; margin: 0 0 12px; line-height: 1.5; }
.rx-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rx-status { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 2px; }
.rx-chip { display: inline-flex; gap: 6px; align-items: center; padding: 5px 10px; border-radius: 99px; background: var(--sx-surface2); font-size: 13px; font-weight: 600; }
.rx-chip.live { background: var(--sx-accent-soft); color: var(--sx-accent); }
.rx-copy { display: flex; gap: 8px; }
.rx-copy input { flex: 1; min-width: 0; font-family: var(--sx-mono); font-size: 12px; }
.rx-linkrow { margin-top: 12px; }
.rx-linkrow .sxs-ctl { flex: 1 1 0; min-width: 0; max-width: 75%; }
.rx-linkrow .sxs-ctl input { width: 0; flex: 1 1 auto; min-width: 0; }
.rx-linkrow .sxs-name { flex: none; }
/* the soundboard: one tile per card, a tap plays it on stream */
.rx-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.rx-tile { position: relative; display: grid; gap: 4px; align-content: start; min-height: 104px; padding: 12px 10px 10px; border-radius: 16px; border: 3px solid var(--ink, #3a0020);
  background: var(--hue, #ff4fa3); color: var(--ink, #3a0020); font: inherit; text-align: left; cursor: pointer; box-shadow: 0 5px 0 var(--ink, #3a0020);
  transition: transform .12s ease, box-shadow .12s ease; }
.rx-tile:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink, #3a0020); }
.rx-tile:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink, #3a0020); }
.rx-tile b { font-size: 15px; line-height: 1.1; }
.rx-tile span { font-size: 12px; opacity: .8; line-height: 1.25; }
.rx-tile .ear { position: absolute; right: 6px; bottom: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .18); color: inherit; font-size: 13px; cursor: pointer; }
.rx-tile.off { opacity: .35; }
.rx-tile.pop { animation: tilepop .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes tilepop { 30% { transform: scale(1.08, .9); } 60% { transform: scale(.96, 1.05); } }
/* pretend chat */
.rx-fake { display: grid; gap: 10px; }
.rx-fake .say { display: flex; gap: 8px; }
.rx-fake .say input[name=who] { width: 110px; flex: none; }
.rx-fake .say input[name=text] { flex: 1; min-width: 0; }
.rx-log { max-height: 140px; overflow: auto; font-size: 13px; color: var(--sx-muted2); display: grid; gap: 3px; font-family: var(--sx-mono); }
.rx-shotbox { position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: var(--sx-radius-sm); overflow: hidden; border: 1px solid var(--sx-border); background: #160f24; }
.rx-shotbox iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* ranks editor */
.rx-ranks { display: grid; gap: 6px; width: 100%; }
.rx-rank { display: grid; grid-template-columns: 56px minmax(0, 1fr) 34px; gap: 6px; align-items: center; }
.rx-rank input[type=number] { width: 100%; }
.rx-rank .sw { height: 10px; border-radius: 99px; grid-column: 1 / -1; margin-top: -2px; opacity: .8; }
.rx-hist { display: grid; gap: 6px; font-size: 13px; }
.rx-hist div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--sx-border); }
.rx-hist div:last-child { border-bottom: 0; }
.rx-foot { grid-column: 1 / -1; text-align: center; color: var(--sx-muted); font-size: 12px; padding: 10px; }
.rx-perk { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .06em; padding: 2px 8px; border-radius: 99px; background: var(--sx-accent2); color: #2a0618; margin-left: 6px; }
[hidden] { display: none !important; }
:is(#app) .sx-btn { min-height: 40px; }
.rx-panel .sxs-row { border-bottom-color: var(--sx-border); }

/* --- leaderboards page ---------------------------------------------------------- */
.rx-boards { max-width: 1180px; margin: 0 auto; padding: 18px; display: grid; gap: 16px; }
.rx-boards .head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rx-boards h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); }
.rx-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, .25); }
.rx-tabs button { border: 0; border-radius: 10px; padding: 9px 16px; background: transparent; color: var(--sx-muted); font: inherit; font-weight: 700; cursor: pointer; }
.rx-tabs button.on { background: var(--sx-accent); color: var(--sx-accent-ink); }
.rx-grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.rx-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rx-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--sx-surface2); font-size: 14px; }
.rx-list li .pos { width: 22px; text-align: center; font-weight: 800; color: var(--sx-accent); }
.rx-list li .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-list li .nm small { display: block; color: var(--sx-muted); font-size: 12px; }
.rx-list li .sc { flex: none; padding: 2px 10px; border-radius: 9px; font-weight: 900; color: #1a1020; }
.rx-list li.empty { color: var(--sx-muted); background: transparent; }
.rx-hall { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.rx-hall .h { padding: 12px; border-radius: 16px; background: linear-gradient(160deg, #ffd76a, #f4b400); color: #4a3200; border: 3px solid #4a3200; box-shadow: 0 4px 0 #4a3200; }
.rx-hall .h b { display: block; font-size: 15px; }
.rx-hall .h span { font-size: 12.5px; }
.rx-hall .h .s { float: right; font-weight: 900; font-size: 18px; }
/* the card switches in Settings: compact, three to a row */
#cardsOn { width: 100%; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
#cardsOn .rx-tile { min-height: 58px; padding: 8px 8px 8px; box-shadow: 0 3px 0 var(--ink, #3a0020); }
#cardsOn .rx-tile b { font-size: 13px; }
#cardsOn .rx-tile span, #cardsOn .rx-tile .ear { display: none; }
@media (min-width: 1100px) { .rx-grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
