/* Layout: streamer lists left and right of a center column (roller, then the 20-roll history) over a painted theme scene; stacks on phones.
   Theme colors below are the Hell defaults; app.js overwrites them from public/themes.js. */
:root {
  color-scheme: dark;
  --font-display: "Luckiest Guy", "Arial Black", Impact, sans-serif;
  --font-body: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fg: #ffffff;
  --muted: rgba(255, 255, 255, .78);
  --go: #ffe100;
  --go-fg: #3a1d00;
  --white: #ffffff;
  --ink: #1d0b0b;

  /* die colors */
  --red: #e3261b;
  --orange: #ff8c00;
  --yellow: #ffd60a;
  --green: #0b8a2a;
  --blue: #1240ff;
  --purple: #7d1594;

  /* theme */
  --bg: #170403;
  --panel: rgba(110, 10, 6, .55);
  --panel-solid: #3a0805;
  --edge: rgba(255, 214, 205, .5);
  --soft: rgba(255, 255, 255, .12);
  --select-fg: #8e0f08;
  --page-fg: rgba(255, 255, 255, .78);
  --brand: #ffffff;
  --brand-accent: var(--go);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--fg);
  font: 400 15px/1.45 var(--font-body);
  background: var(--bg);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 18px 40px;
}
.scene { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
/* slow "Ken Burns" drift on image backgrounds so the scene feels alive */
#sky.kb { animation: kenburns 32s ease-in-out infinite alternate; transform-origin: 50% 45%; will-change: transform; }
@keyframes kenburns { from { transform: scale(1.04); } to { transform: scale(1.14) translate(-1.5%, -1%); } }
.page { position: relative; z-index: 1; max-width: 1260px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }

button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--go); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 14px; text-align: center; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
/* The real ColorRoll logo; hue-rotate (set per theme in app.js) shifts its red to the theme colour */
.brand-logo { height: 42px; width: auto; max-width: 240px; object-fit: contain; display: block; filter: hue-rotate(var(--logo-hue, 0deg)); transition: filter .2s ease; }
.tag { color: var(--page-fg); font-size: 13px; }

/* top navigation bar */
.nav { display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: rgba(8,10,20,.62); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; backdrop-filter: blur(8px); flex-wrap: wrap; }
.mainnav { display: flex; gap: 4px; flex-wrap: wrap; }
.mainnav a, .mainnav button { color: rgba(255,255,255,.82); background: none; border: 0; font: 400 15px/1 var(--font-display); letter-spacing: .05em; text-transform: uppercase; text-decoration: none; padding: 8px 12px; border-radius: 9px; cursor: pointer; transition: background .12s, color .12s; }
.mainnav a:hover, .mainnav button:hover { background: rgba(255,255,255,.1); color: #fff; }
.mainnav a.active { color: #fff; background: rgba(255,255,255,.12); }
.navbtns { margin-left: auto; display: flex; gap: 8px; }
.nbtn { display: inline-flex; align-items: center; gap: 5px; padding: 9px 15px; border-radius: 10px; font: 400 15px/1 var(--font-display); letter-spacing: .05em; text-decoration: none; white-space: nowrap; }
.nbtn.vip { color: #2a1c00; background: linear-gradient(180deg, #ffe07a, #f2b01e); box-shadow: 0 3px 12px rgba(242,176,30,.4); }
.nbtn.login { color: #fff; background: linear-gradient(180deg, #ff5a3d, #e3261b); box-shadow: 0 3px 12px rgba(227,38,27,.4); }
.nbtn:hover { filter: brightness(1.07); }
@media (max-width: 620px) { .nav { justify-content: center; } .navbtns { margin-left: 0; } .mainnav { order: 3; width: 100%; justify-content: center; } }

/* cards */
.layout {
  display: grid; gap: 22px; justify-content: center; align-items: start;
  grid-template-columns: minmax(0, 300px) minmax(0, 470px) minmax(0, 300px);
  grid-template-areas: "left center right";
}
.center { grid-area: center; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.streamers.left { grid-area: left; }
.streamers.right { grid-area: right; }
.layout.no-streamers { grid-template-columns: minmax(0, 470px); grid-template-areas: "center"; }

/* new 3-column layout (live rolls | dice | vip + chat) */
.layout3 { display: grid; gap: 16px; justify-content: center; align-items: start; grid-template-columns: minmax(0, 300px) minmax(0, 500px) minmax(0, 320px); }
.layout3 .center { grid-area: auto; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.layout3 .left-col { grid-area: auto; } .layout3 .right-col { grid-area: auto; }
.side-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; position: sticky; top: 14px; }
@media (max-width: 1160px) {
  .layout3 { grid-template-columns: minmax(0, 340px) minmax(0, 520px); grid-template-areas: "center center" "left right"; }
  .layout3 .center { grid-area: center; justify-self: center; width: 100%; }
  .layout3 .left-col { grid-area: left; } .layout3 .right-col { grid-area: right; }
  .side-col { position: static; }
}
@media (max-width: 820px) {
  .layout3 { grid-template-columns: minmax(0, 560px); grid-template-areas: "center" "right" "left"; }
}
.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5), 0 2px 0 rgba(255,255,255,.08) inset, 0 0 0 1px rgba(0,0,0,.25);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  padding: 22px clamp(14px, 4vw, 26px) 26px;
  display: flex; flex-direction: column; gap: 16px;
  min-width: 0;
}
/* a soft highlight along the top edge, like lit glass */
.panel::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0) 32%);
  mix-blend-mode: screen;
}
.roller { box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 2px 0 rgba(255,255,255,.1) inset, 0 0 0 1px rgba(0,0,0,.3), 0 0 40px -12px var(--accent); }
h1, h2 { margin: 0; text-align: center; font: 400 clamp(26px, 5vw, 32px)/1.05 var(--font-display); letter-spacing: .03em; text-wrap: balance; text-shadow: 0 3px 0 rgba(0,0,0,.4); }
h2 { font-size: clamp(22px, 4.4vw, 27px); }
h3 { margin: 0; font: 400 15px/1 var(--font-display); letter-spacing: .06em; }

/* controls */
.controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.controls select {
  width: 100%; min-width: 0;
  background: var(--white); color: var(--select-fg);
  border: 3px solid var(--select-fg); border-radius: 6px;
  padding: 9px 8px; font: 400 16px/1 var(--font-display); letter-spacing: .03em;
}

/* dice */
.dice {
  --n: 4; --max: 92px;
  display: grid; grid-template-columns: repeat(var(--n), minmax(0, var(--max)));
  gap: clamp(7px, 2vw, 14px); justify-content: center; padding-block: 6px;
}
/* A premium rounded die: white bezel, a colour face with a top-light gradient,
   a diagonal gloss, and a soft 3D pip. */
.die {
  position: relative;
  aspect-ratio: 1; max-width: 100%;
  border-radius: 26%;
  display: grid; place-items: center;
  filter: drop-shadow(0 7px 9px rgba(0,0,0,.45));
}
/* soft colour halo behind each die, matching its face colour */
#dice .die::before { content: ""; position: absolute; inset: 6%; border-radius: 24%; background: var(--glow, transparent); filter: blur(14px); opacity: .6; z-index: -1; transition: background-color .08s; }
.face {
  position: relative; width: 100%; height: 100%; border-radius: 24%;
  display: grid; place-items: center; overflow: hidden;
  border: 5px solid #ffffff;
  background:
    linear-gradient(180deg, rgba(255,255,255,.30), rgba(255,255,255,0) 40%, rgba(0,0,0,.14)),
    var(--c, #e3261b);
  box-shadow: inset 0 2px 3px rgba(255,255,255,.38), inset 0 -8px 12px rgba(0,0,0,.20);
  transition: background .08s;
}
.face.blank { border-color: #ffffff; background: #f1f2f5; box-shadow: inset 0 -5px 9px rgba(0,0,0,.08); }
.face.blank .dot { background: #d2d4da; box-shadow: none; }
.face.blank::after { display: none; }
/* a soft diagonal gloss across the top-left corner */
.face::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(135deg, rgba(255,255,255,.34), rgba(255,255,255,0) 46%); }
.face .dot { width: 30%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 42% 38%, #ffffff, #e9ebf0); box-shadow: 0 1px 2px rgba(0,0,0,.26), inset 0 -1px 1px rgba(0,0,0,.08); z-index: 1; }
.die.num .face { background: #ffffff; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 14%; }
.die.num .pip { width: 72%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 38% 32%, #3a3a42, #15151a); box-shadow: inset 0 -1px 2px rgba(255,255,255,.2); }
.die.num .pip.off { visibility: hidden; }
.die.num.red-one .pip { background: radial-gradient(circle at 38% 32%, #ff6a5a, #c2160c); }

/* gentle up-and-down bob while the (blank) dice are rolling — no colour flashing */
.dice.shaking .die { animation: bob .55s ease-in-out infinite; animation-delay: calc(var(--i) * 90ms); }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-13px) rotate(-4deg); } }
.die.pop { animation: pop .36s cubic-bezier(.3, 1.7, .5, 1) both; }
/* Each die pops in from small when its colour is revealed. */
@keyframes pop { 0% { transform: scale(.4) rotate(-14deg); opacity: .25; } 55% { transform: scale(1.15) rotate(3deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }

/* suspense caption shown while the dice tumble */
.suspense { margin: 0; text-align: center; font: 400 clamp(20px, 4.5vw, 28px)/1.1 var(--font-display); letter-spacing: .03em; color: var(--white); text-shadow: 0 3px 0 rgba(0,0,0,.4); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: .88; } 50% { transform: scale(1.05); opacity: 1; } }

.die.mini { width: 28px; border-radius: 18%; box-shadow: 0 2px 0 rgba(0,0,0,.25); flex: none; background: none; padding: 0; }
.die.mini { filter: none; }
.die.mini .face { width: 100%; height: 100%; border-radius: 26%; border-width: 2px; box-shadow: inset 0 1px 2px rgba(255,255,255,.4), inset 0 -2px 4px rgba(0,0,0,.25); }
.die.mini .face::after { display: none; }
.die.mini .face .dot { width: 26%; }
.die.num.mini .face { box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }

/* roll id + verify */
.rollid { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.rollid .lbl { font-size: 14px; color: var(--muted); }
.rollid code { font: 800 clamp(20px, 5vw, 26px)/1 var(--font-body); letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.ghost { background: var(--soft); border: 1px solid var(--edge); border-radius: 999px; padding: 4px 12px; font-size: 13px; }
.ghost:hover { background: rgba(255,255,255,.2); }
.verify {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--white); color: #1a3fd0; border: 0; border-radius: 10px;
  padding: 13px; font-weight: 800; font-size: 18px; text-decoration: underline; text-underline-offset: 3px;
}
.verify svg { width: 20px; height: 20px; flex: none; }

.rollmeta { margin: -8px 0 0; text-align: center; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.rollmeta b { color: var(--fg); font-weight: 600; }
.err { margin: 0; text-align: center; font-weight: 600; background: rgba(0,0,0,.35); border: 1px solid #ff4a3d; border-radius: 8px; padding: 8px 10px; }
.notice { background: rgba(0,0,0,.55); border: 2px dashed var(--go); border-radius: 12px; padding: 10px 14px; text-align: center; font-size: 14px; }
.notice b { color: var(--go); }

/* go button — premium game control in the theme's accent */
.go {
  position: relative; overflow: hidden;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 82%, #fff) 0%, var(--accent) 48%, color-mix(in srgb, var(--accent) 70%, #000) 100%);
  color: var(--accent-fg);
  border: 1px solid color-mix(in srgb, var(--accent) 60%, #fff);
  border-radius: 12px;
  padding: 15px; font: 400 clamp(22px, 5vw, 28px)/1 var(--font-display); letter-spacing: .05em;
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
  box-shadow: 0 7px 0 color-mix(in srgb, var(--accent) 55%, #000), 0 14px 26px rgba(0,0,0,.4), inset 0 2px 1px rgba(255,255,255,.6);
  transition: transform .09s, box-shadow .09s, filter .12s;
}
/* moving sheen sweep */
.go::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, rgba(255,255,255,0), rgba(255,255,255,.55), rgba(255,255,255,0));
  transform: skewX(-20deg); animation: sweep 3.6s ease-in-out infinite;
}
.go:hover { filter: brightness(1.06); }
.go:active { transform: translateY(6px); box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 55%, #000), 0 5px 12px rgba(0,0,0,.4), inset 0 2px 1px rgba(255,255,255,.6); }
@keyframes sweep { 0%, 60% { left: -60%; } 100% { left: 140%; } }

/* counter */
.counter { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; background: rgba(255,255,255,.18); border: 1px solid var(--edge); border-radius: 6px; overflow: hidden; }
.counter .side { display: grid; }
.counter .side button { background: rgba(0,0,0,.18); border: 0; padding: 4px 0; font-weight: 600; font-size: 16px; }
.counter .side button:hover { background: rgba(0,0,0,.32); }
.counter .val { display: grid; place-items: center; font: 800 36px/1 var(--font-body); font-variant-numeric: tabular-nums; padding: 8px; }
.under { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; align-items: center; }
.pill { background: rgba(255,255,255,.18); border-radius: 6px; padding: 5px 10px; font-size: 14px; font-variant-numeric: tabular-nums; }

.possible { margin: 0; background: rgba(0,0,0,.32); border-radius: 6px; padding: 10px 12px; text-align: center; font-weight: 600; }
.possible b { font-weight: 800; text-shadow: 0 1px 0 rgba(0,0,0,.4); }
.c-red { color: #ff4a3d; } .c-orange { color: #ffa733; } .c-yellow { color: var(--yellow); }
.c-green { color: #2bd35a; } .c-blue { color: #6f8dff; } .c-purple { color: #d26cf0; }

.link { background: none; border: 0; color: var(--white); text-decoration: underline; text-underline-offset: 3px; font-size: 15px; justify-self: center; align-self: center; }
.toggles { display: flex; justify-content: center; align-items: center; gap: 10px 22px; flex-wrap: wrap; color: #fff; background: rgba(0,0,0,.36); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 12px 16px; margin: 2px auto 0; }
.switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; cursor: pointer; }
.switch input { appearance: none; width: 44px; height: 24px; border-radius: 999px; background: rgba(0,0,0,.45); border: 1px solid var(--edge); position: relative; cursor: pointer; margin: 0; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--white); transition: transform .15s; }
.switch input:checked { background: #2bb04f; }
.switch input:checked::after { transform: translateX(20px); }

/* history */
.history { position: relative; }
.statbox { background: rgba(255,255,255,.12); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--white); color: var(--ink); border-radius: 5px; padding: 3px 7px 3px 4px; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.chip .die.mini { width: 20px; box-shadow: none; background: none; }
.chip .die.mini .face { width: 100%; height: 100%; }
.empty { color: var(--muted); font-size: 14px; }
.rolls { display: flex; flex-direction: column; }
.rolls h3 { padding-block: 10px 6px; }
.row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 4px; border: 0; border-bottom: 1px dashed rgba(255,255,255,.55); background: none; text-align: left; width: 100%; }
.row:hover { background: rgba(255,255,255,.08); }
.row .when { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.row .no { font: 400 16px/1 var(--font-display); text-align: right; }
.row .set { gap: 6px; }
.hist-foot { display: flex; justify-content: center; }

footer { text-align: center; color: rgba(255,255,255,.92); font-size: 13px; margin-top: 10px; text-shadow: 0 1px 3px rgba(0,0,0,.75); }
footer kbd { background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.3); border-radius: 5px; padding: 1px 6px; font-family: var(--font-body); }
kbd { background: var(--soft); border: 1px solid var(--edge); border-radius: 4px; padding: 0 5px; font-family: inherit; }

/* dialogs */
dialog {
  width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  background: var(--panel-solid); color: var(--fg);
  border: 3px solid var(--edge); border-radius: 20px; padding: 0;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
dialog::backdrop { background: rgba(0,0,0,.6); }
.dlg { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dlg-head h2 { text-align: left; }
.x { background: var(--white); color: var(--ink); border: 0; border-radius: 50%; width: 30px; height: 30px; font-size: 20px; line-height: 1; flex: none; }
.dlg p { margin: 0; color: var(--muted); }
.vform { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.vform label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); min-width: 0; }
.vform input { background: var(--white); color: var(--ink); border: 0; border-radius: 6px; padding: 10px; width: 100%; font-weight: 800; letter-spacing: .08em; }
.vform .go { font-size: 18px; padding: 9px 16px; box-shadow: 0 4px 0 #b39300; }
.vresult { display: flex; flex-direction: column; gap: 12px; }
.vresult .dice { --max: 70px; }
.verdict { border-radius: 10px; padding: 10px 12px; font-weight: 800; display: flex; gap: 10px; align-items: flex-start; }
.verdict small { display: block; font-weight: 400; color: var(--muted); margin-top: 2px; }
.verdict.ok { background: rgba(43, 211, 90, .18); border: 1px solid #2bd35a; }
.verdict.bad { background: rgba(255, 74, 61, .18); border: 1px solid #ff4a3d; }
.verdict.warn { background: rgba(255, 170, 40, .2); border: 1px solid #ffaa28; }
.verdict.warn .mark { color: #ffaa28; }
.verdict .mark { font-size: 20px; line-height: 1; }
.linkish { background: none; border: 0; padding: 0; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.report { background: rgba(0, 0, 0, .28); border: 1px solid var(--soft); border-radius: 10px; padding: 4px 12px; }
.report summary { cursor: pointer; font-weight: 600; padding: 6px 0; font-size: 14px; }
.rform { display: flex; flex-direction: column; gap: 8px; padding-bottom: 10px; }
.rtext { background: var(--white); color: var(--ink); border: 0; border-radius: 8px; padding: 9px 10px; font: inherit; resize: vertical; width: 100%; }
.go.small { font-size: 16px; padding: 8px 14px; box-shadow: 0 4px 0 #b39300; align-self: flex-start; }
.rmsg { margin: 0; font-weight: 600; }
.rmsg.ok { color: #2bd35a; padding: 8px 0; }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; margin: 0; font-variant-numeric: tabular-nums; }
.facts dt { color: var(--muted); font-size: 13px; padding-top: 1px; }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.vlist { display: flex; flex-direction: column; max-height: 300px; overflow: auto; }
.vrow { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 4px; border-bottom: 1px solid var(--soft); font-variant-numeric: tabular-nums; }
.vrow.me { background: rgba(255, 225, 0, .16); border-radius: 6px; }
.vrow .seq { color: var(--muted); font-size: 13px; }
.vrow .when { text-align: right; font-size: 13px; color: var(--muted); }
.vrow .when b { color: var(--fg); font-weight: 600; }
.vrow button { background: none; border: 0; padding: 0; font-weight: 800; letter-spacing: .06em; text-decoration: underline; text-underline-offset: 2px; text-align: left; }
.set { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.vrow .die.mini { width: 20px; }
.tl-note { font-size: 13px; }
.share { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

.odds { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.odds th, .odds td { padding: 8px 6px; border-bottom: 1px solid var(--soft); text-align: right; }
.odds th:first-child, .odds td:first-child { text-align: left; }
.odds th { font: 400 13px/1 var(--font-display); letter-spacing: .06em; color: var(--muted); }
.odds tr.hl td { background: rgba(255,225,0,.14); font-weight: 800; }
.odds-wrap { overflow-x: auto; }

/* how it works / about */
.info { gap: 12px; padding-inline: clamp(18px, 5vw, 32px); }
.info h2 { text-align: left; }
.info p { margin: 0; font-size: 16px; line-height: 1.55; max-width: 62ch; }
.info b[class^="c-"] { text-shadow: 0 1px 0 rgba(0, 0, 0, .5); }

/* top streamers */
.streamers { gap: 10px; padding-inline: 14px; }
.streamers h2 { font-size: 19px; }
.slist { display: flex; flex-direction: column; gap: 8px; }
.streamer {
  display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 10px; align-items: center;
  background: rgba(255, 255, 255, .16); border: 2px solid rgba(255, 255, 255, .45); border-radius: 10px;
  padding: 6px 10px; color: var(--fg); text-decoration: none; transition: background .12s;
}
.streamer:hover { background: rgba(255, 255, 255, .26); }
.streamer .pic { position: relative; width: 50px; height: 50px; }
.streamer img, .streamer .noimg { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; border: 2px solid var(--white); background: var(--panel-solid); display: grid; place-items: center; font: 400 20px/1 var(--font-display); }
.streamer.live img, .streamer.live .noimg { border-color: #ff2a5c; box-shadow: 0 0 0 2px #ff2a5c; }
.streamer .badge { position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%); background: #ff2a5c; color: var(--white); font-size: 11px; font-weight: 800; padding: 0 6px; border-radius: 4px; line-height: 15px; }
.streamer .who { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.streamer .name { display: flex; align-items: center; gap: 5px; font: 400 17px/1.1 var(--font-display); letter-spacing: .02em; text-transform: uppercase; }
.streamer .name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.streamer .tick { width: 16px; height: 16px; flex: none; }
.streamer .handle { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.x.corner { position: absolute; top: 14px; right: 14px; width: 26px; height: 26px; font-size: 18px; }
.show-history { align-self: center; }

@media (max-width: 1180px) {
  .layout { grid-template-columns: repeat(2, minmax(0, 360px)); grid-template-areas: "center center" "left right"; }
  .center { justify-self: center; width: min(100%, 520px); }
}
@media (max-width: 760px) {
  .layout, .layout.no-streamers { grid-template-columns: minmax(0, 520px); grid-template-areas: "center" "left" "right"; }
}
@media (max-width: 480px) {
  .controls { gap: 6px; }
  .controls select { font-size: 13px; padding: 8px 2px; letter-spacing: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .dice.shaking .die, .die.pop { animation: none; }
  .suspense { animation: none; }
  .go, .switch input, .switch input::after { transition: none; }
  .go::after { display: none; }
  #sky.kb { animation: none; }
}

/* 404 page */
body.lost { background: radial-gradient(130% 70% at 50% 115%, #ff6a1f 0%, #a3170a 25%, #3a0604 55%, #170403 85%); min-height: 100vh; display: grid; place-items: center; }
.lost-card { width: min(420px, 100%); text-align: center; align-items: center; }
.lost-card p { margin: 0; color: var(--muted); }
.lost-card .go { text-decoration: none; display: block; width: 100%; }

/* Eye comfort / epilepsy-safe mode: blurs the dice into soft blobs so there are no
   sharp, high-contrast colour edges, and (in app.js) removes the flashing roll
   animation. The background is left exactly as it is. Hovering (or tapping) one
   die briefly un-blurs just that die so you can read the exact colour. */
body.comfort #dice .die { filter: blur(15px) saturate(.9); transition: filter .18s ease; }
body.comfort #dice .die:hover, body.comfort #dice .die:active { filter: none; }
body.comfort #dice .die .face::after { display: none; }   /* drop the glossy edge highlight */
body.comfort .die.mini .face { filter: blur(2px) saturate(.85); }
body.comfort .go::after { display: none; }                 /* no sheen sweep */

/* odds panel — a row of dice with k filled, and the fair percentage */
.odds-wrap { display: flex; flex-direction: column; gap: 8px; }
.odds-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: rgba(0,0,0,.28); border: 1px solid var(--soft); border-radius: 12px; padding: 10px 14px; }
.odds-dice { display: flex; gap: 6px; }
.odds-dice .die.mini { width: 30px; }
.odds-fig { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.odds-fig b { font: 400 17px/1 var(--font-display); letter-spacing: .03em; }
.odds-fig span { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 15px; color: var(--muted); }

/* footer nav links */
.footnav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 12px auto 0; width: fit-content; max-width: 100%; background: rgba(0,0,0,.42); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 10px 20px; }
.footnav a { color: #fff; font: 400 15px/1 var(--font-display); letter-spacing: .04em; text-transform: uppercase; text-decoration: none; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.footnav a:hover { color: var(--accent); }

/* volume slider (sits with the Sound / Eye comfort toggles) */
.vol { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: inherit; font-weight: 800; }
.vol input[type="range"] { width: 110px; max-width: 40vw; accent-color: var(--brand-accent, #e3261b); cursor: pointer; }

/* VIP room header — like the reference: round avatar + big chunky outlined "NAME'S VIP ROOM", no box */
.vip-room { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; width: 100%; margin: -2px 0 6px; padding: 0; background: none; border: 0; box-shadow: none; }
.vip-room[hidden] { display: none; }
.vr-pic { flex: none; width: 54px; height: 54px; border-radius: 50%; background: var(--panel-solid) center/cover no-repeat; border: 3px solid #fff; display: grid; place-items: center; font: 400 24px/1 var(--font-display); color: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.55), 0 4px 14px rgba(0,0,0,.55), 0 0 22px -4px var(--accent); }
.vr-text { display: inline-flex; align-items: baseline; gap: .32em; flex-wrap: wrap; justify-content: center; }
.vr-text b, .vr-sub { font: 400 clamp(22px, 5.2vw, 32px)/1.05 var(--font-display); letter-spacing: .02em; color: #fff; text-transform: uppercase; white-space: nowrap;
  text-shadow: -2px -2px 0 #120d12, 2px -2px 0 #120d12, -2px 2px 0 #120d12, 2px 2px 0 #120d12, 0 -2px 0 #120d12, 0 2px 0 #120d12, -2px 0 0 #120d12, 2px 0 0 #120d12, 0 5px 0 rgba(0,0,0,.55), 0 0 18px rgba(0,0,0,.45); }
.vr-live { margin-left: 2px; display: inline-flex; align-items: center; gap: 6px; font: 800 11px/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: #fff; background: linear-gradient(180deg, #ff5a3d, #e3261b); padding: 6px 11px; border-radius: 999px; text-decoration: none; white-space: nowrap; box-shadow: 0 2px 8px rgba(227,38,27,.5); }
.vr-live:hover { filter: brightness(1.08); }
.vr-live[hidden] { display: none; }
.vr-live-dot, .live-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; display: inline-block; animation: livePulse 1.6s ease-out infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.6); } 70% { box-shadow: 0 0 0 6px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }

/* Cog button beside Copy — opens the lounge (everyone's live rolls + chat) */
.cog-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--white); background: rgba(0,0,0,.3); border: 1px solid var(--soft); text-decoration: none; transition: transform .2s, background .12s; }
.cog-btn svg { width: 18px; height: 18px; }
.cog-btn:hover { background: rgba(0,0,0,.5); transform: rotate(45deg); }

/* Ad slots. Hidden until ads.js fills them with a real, approved ad unit — so an
   empty/disabled slot takes no space and never shows a fake ad. Never overlaps the
   dice, roll button, verify or counter; always full-width and responsive. */
.adslot { width: 100%; max-width: 728px; margin: 10px auto; text-align: center; min-height: 0; }
.adslot[hidden] { display: none; }
.adslot .ad-label { display: block; font: 400 11px/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); opacity: .7; margin-bottom: 4px; }
.adslot .adsbygoogle { display: block; }

/* ===== 3-column side panels: Live Rolls + Chat ===== */
.side-panel { padding: 16px 16px 14px; gap: 10px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-head h2 { margin: 0; font: 400 20px/1 var(--font-display); letter-spacing: .02em; color: var(--white); }
.panel-sub { margin: 0; color: var(--muted); font-size: 12.5px; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; font: 800 11px/1 var(--font-body); letter-spacing: .12em; color: #fff; background: rgba(227,38,27,.9); padding: 5px 9px; border-radius: 999px; }
.live-badge .live-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: livePulse 1.6s ease-out infinite; }
.panel-foot-link { color: var(--accent); text-decoration: none; font-weight: 700; font-size: 13px; text-align: center; padding-top: 4px; }
.panel-foot-link:hover { text-decoration: underline; }

/* live rolls rows */
.live-feed { display: flex; flex-direction: column; gap: 6px; max-height: 560px; overflow-y: auto; }
.lrow { display: flex; align-items: center; gap: 10px; width: 100%; background: rgba(0,0,0,.26); border: 1px solid var(--soft); border-radius: 12px; padding: 7px 10px; cursor: pointer; color: inherit; font: inherit; text-align: left; transition: background .12s, transform .12s; }
.lrow:hover { background: rgba(0,0,0,.42); transform: translateX(2px); }
.lr-av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 800 15px/1 var(--font-body); color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.lr-mid { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.lr-who { font-weight: 800; font-size: 13px; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-who.vip { color: #ffd84a; }
.lr-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.lr-meta .when { color: var(--muted); font-size: 11px; white-space: nowrap; }
.lr-id { font: 800 11px/1 var(--font-body); letter-spacing: .06em; color: var(--muted); background: rgba(0,0,0,.35); border-radius: 6px; padding: 2px 5px; }
.live-feed .empty { color: var(--muted); text-align: center; padding: 14px; }

/* chat */
.online { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.online b { color: var(--white); }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: #2bd35a; box-shadow: 0 0 8px #2bd35a; }
.chat-messages { display: flex; flex-direction: column; gap: 7px; height: 340px; overflow-y: auto; padding-right: 3px; }
.cmsg { background: rgba(0,0,0,.24); border: 1px solid var(--soft); border-radius: 11px; padding: 6px 10px; font-size: 13.5px; }
.cm-time { color: var(--muted); font-size: 10.5px; float: right; }
.cm-who { font-weight: 800; color: var(--accent); margin-right: 6px; }
.cm-text { word-wrap: break-word; overflow-wrap: anywhere; color: var(--white); }
.chat-messages .empty { color: var(--muted); text-align: center; padding: 12px; }
.chatbar { display: flex; gap: 7px; flex-wrap: wrap; }
.chatbar input { background: rgba(0,0,0,.35); border: 1px solid var(--edge); border-radius: 9px; padding: 9px 10px; color: var(--white); font: inherit; font-size: 13px; }
.chatbar .cname { flex: 0 0 84px; min-width: 0; }
.chatbar .cbody { flex: 1 1 120px; min-width: 0; }
.chatbar .send { background: linear-gradient(180deg, #ff5a3d, #e3261b); color: #fff; border: 0; border-radius: 9px; padding: 9px 14px; font: 400 16px/1 var(--font-display); letter-spacing: .03em; cursor: pointer; box-shadow: 0 3px 0 #9c1409; }
.chatbar .send:hover { filter: brightness(1.07); }
.chatbar .send:active { transform: translateY(2px); box-shadow: 0 1px 0 #9c1409; }
.chat-panel .err { color: #ff8a8a; font-weight: 600; font-size: 13px; margin: 2px 0 0; }
.side-ad { max-width: 100%; margin: 0; }

/* ===== site stats bar ===== */
.stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; background: rgba(8,10,20,.55); border: 1px solid rgba(255,255,255,.1); border-radius: 18px; padding: 16px 18px; backdrop-filter: blur(8px); }
.stat { display: flex; align-items: center; gap: 12px; justify-content: center; }
.stat-ico { font-size: 24px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.stat-n { display: flex; flex-direction: column; line-height: 1.1; }
.stat-n b { font: 400 24px/1 var(--font-display); color: var(--white); letter-spacing: .02em; }
.stat-n span { font-size: 12px; color: var(--muted); }
@media (max-width: 620px) { .stats-bar { grid-template-columns: repeat(2, 1fr); } }

/* ===== popular rooms ===== */
.popular { display: flex; flex-direction: column; gap: 12px; }
.popular h2 { margin: 0; font: 400 22px/1 var(--font-display); letter-spacing: .02em; color: var(--white); text-align: center; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.room-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.room-card { position: relative; border: 2px solid rgba(255,255,255,.12); border-radius: 14px; overflow: hidden; cursor: pointer; background: #111; padding: 0; color: #fff; text-align: left; transition: transform .14s, border-color .14s, box-shadow .14s; }
.room-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.3); box-shadow: 0 10px 24px rgba(0,0,0,.4); }
.room-card.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 10px 24px rgba(0,0,0,.4); }
.rc-prev { display: block; height: 72px; background-size: cover; background-position: center; }
.rc-name { display: block; padding: 8px 10px; font: 400 15px/1 var(--font-display); letter-spacing: .03em; background: rgba(0,0,0,.55); }
