/* Gooner Gacha - shared styles for the player page and admin dashboard */

:root {
  --bg: #0e0f13;
  --bg-2: #15171d;
  --card: #1a1d24;
  --card-2: #20242d;
  --line: #2b303b;
  --text: #eceef3;
  --muted: #9aa1b0;
  --accent: #ff4b3e;
  --accent-2: #ff7a45;
  --ok: #2fbf71;
  --warn: #f2b84b;
  --bad: #ef4b5a;
  --info: #5b9dff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 600px at 50% -200px, #2a1416 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--accent-2); }
a:hover { color: #ffa07a; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }
.mono { font-family: var(--mono); }

/* ---------- layout ---------- */
.wrap { max-width: 720px; margin: 0 auto; padding: 24px 16px 64px; }
.wrap.wide { max-width: 1280px; }

.brand {
  display: flex; align-items: center; gap: 12px;
  margin: 8px 0 28px;
}
.brand svg { width: 44px; height: 44px; flex: none; }
.brand h1 { font-size: 1.6rem; letter-spacing: -.02em; margin: 0; }
.brand .tag { color: var(--muted); font-size: .9rem; }
.brand .grow { flex: 1; min-width: 0; }
.sound-toggle { align-self: flex-start; flex: none; }

.card {
  background: linear-gradient(180deg, var(--card) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.card h2 { font-size: 1.15rem; display: flex; align-items: center; gap: 10px; }
.step {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: .85rem; font-weight: 700;
}

/* ---------- forms & buttons ---------- */
.btn {
  appearance: none; border: 1px solid transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px;
  font: inherit; font-weight: 600; color: #fff;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  transition: transform .06s ease, filter .15s ease, opacity .15s;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn.secondary { background: var(--card-2); border-color: var(--line); color: var(--text); }
.btn.secondary:hover { border-color: #3a4150; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.ok { background: linear-gradient(180deg, #3fd486, var(--ok)); }
.btn.bad { background: linear-gradient(180deg, #f26a77, var(--bad)); }
.btn.sm { padding: 6px 10px; font-size: .85rem; border-radius: 8px; }
.btn.lg { padding: 15px 26px; font-size: 1.1rem; border-radius: 12px; }
.btn.block { width: 100%; }

input[type=text], input[type=password], input[type=number], input[type=url],
input[type=search], textarea, select {
  width: 100%; padding: 11px 13px; border-radius: 10px;
  background: #0f1116; color: var(--text);
  border: 1px solid var(--line); font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(255, 122, 69, .18);
}
textarea { resize: vertical; min-height: 70px; }
label { display: block; font-size: .875rem; color: var(--muted); margin: 0 0 6px; }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1 1 200px; min-width: 0; }

.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text); margin: 0; font-size: 1rem; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle .knob {
  width: 46px; height: 26px; border-radius: 13px; background: #3a3f4b; position: relative; transition: background .2s; flex: none;
}
.toggle .knob::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; transition: transform .2s;
}
.toggle input:checked + .knob { background: var(--ok); }
.toggle input:checked + .knob::after { transform: translateX(20px); }
.toggle input:focus-visible + .knob { box-shadow: 0 0 0 3px rgba(47, 191, 113, .35); }

/* ---------- player: code box ---------- */
.code-box {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: #0f1116; border: 1px dashed #4a3a3a; border-radius: 12px;
  padding: 14px 16px; margin: 14px 0;
}
.code-box .code {
  font-family: var(--mono); font-size: clamp(1.1rem, 4.6vw, 1.55rem); font-weight: 700;
  letter-spacing: .06em; color: #fff; word-break: break-all;
}
.notice {
  border-radius: 12px; padding: 12px 14px; margin: 12px 0;
  background: rgba(91, 157, 255, .1); border: 1px solid rgba(91, 157, 255, .35);
}
.notice.warn { background: rgba(242, 184, 75, .1); border-color: rgba(242, 184, 75, .4); }
.notice.bad { background: rgba(239, 75, 90, .1); border-color: rgba(239, 75, 90, .4); }
.notice.ok { background: rgba(47, 191, 113, .1); border-color: rgba(47, 191, 113, .4); }
ol.steps { padding-left: 1.25rem; margin: 0 0 .5rem; }
ol.steps li { margin-bottom: 6px; }

.status-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }

/* status pills (shared with admin) */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  border: 1px solid transparent; white-space: nowrap;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.pending { color: var(--warn); background: rgba(242, 184, 75, .12); border-color: rgba(242, 184, 75, .3); }
.pill.approved { color: var(--ok); background: rgba(47, 191, 113, .12); border-color: rgba(47, 191, 113, .3); }
.pill.rejected { color: var(--bad); background: rgba(239, 75, 90, .12); border-color: rgba(239, 75, 90, .3); }
.pill.success { color: var(--ok); background: rgba(47, 191, 113, .12); border-color: rgba(47, 191, 113, .3); }
.pill.failure { color: var(--bad); background: rgba(239, 75, 90, .12); border-color: rgba(239, 75, 90, .3); }
.pill.neutral { color: var(--muted); background: rgba(154, 161, 176, .1); border-color: rgba(154, 161, 176, .25); }

/* ---------- result ---------- */
.result { text-align: center; }
.result h3.headline {
  font-size: clamp(1.45rem, 5.5vw, 2.3rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.2;
  margin: 6px 0 4px; white-space: pre-line; overflow-wrap: anywhere;
}
.result .outcome-name { margin: 4px 0 2px; }
.result .description { white-space: pre-line; overflow-wrap: anywhere; }
.result .media {
  margin: 14px auto 10px; max-width: 100%;
  border-radius: 12px; overflow: hidden; background: #000; border: 1px solid var(--line);
}
.result .media img, .result .media video { display: block; width: 100%; max-height: 70vh; object-fit: contain; }
.result.success h3 { color: #5be39a; }
.result.failure h3 { color: #ff6b6b; }

/* ---------- reveal animation ---------- */
.reveal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 5, 8, .94);
  display: grid; place-items: center; text-align: center; padding: 24px;
}
.reveal-overlay .cyl { width: min(240px, 60vw); height: auto; }
.reveal-overlay .cyl.spin { animation: spin 0.45s linear infinite; }
.reveal-overlay .cyl.slow { animation: spin-slow 2.2s cubic-bezier(.15, .7, .3, 1) forwards; }
.reveal-overlay .caption { margin-top: 22px; font-size: 1.25rem; font-weight: 600; letter-spacing: .02em; min-height: 1.6em; }
.reveal-overlay .dots::after { content: ""; animation: dots 1.2s steps(4) infinite; }
.reveal-overlay.flash { animation: flash .6s ease-out; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-slow { from { transform: rotate(0); } to { transform: rotate(1020deg); } }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
@keyframes flash { 0% { background: rgba(255, 255, 255, .9); } 100% { background: rgba(5, 5, 8, .94); } }
@keyframes pop { 0% { transform: scale(.92); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.pop { animation: pop .35s ease-out; }
.shake { animation: shake .45s ease-in-out; }
@keyframes shake {
  0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); } 80% { transform: translateX(5px); }
}
@media (prefers-reduced-motion: reduce) {
  .reveal-overlay .cyl.spin, .reveal-overlay .cyl.slow, .pop, .shake, .reveal-overlay.flash { animation: none; }
}

/* ---------- toast ---------- */
.toast-host { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(92vw, 460px); }
.toast {
  background: #232733; border: 1px solid var(--line); border-left: 4px solid var(--info);
  color: var(--text); padding: 12px 14px; border-radius: 10px; box-shadow: var(--shadow);
  animation: pop .2s ease-out;
}
.toast.ok { border-left-color: var(--ok); }
.toast.bad { border-left-color: var(--bad); }

/* ---------- admin ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.topbar .brand { margin: 0; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button {
  appearance: none; background: none; border: none; color: var(--muted); font: inherit; font-weight: 600;
  padding: 10px 14px; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap;
}
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stat .n { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.stat.ok .n { color: var(--ok); } .stat.bad .n { color: var(--bad); } .stat.warn .n { color: var(--warn); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar input[type=search] { flex: 1 1 220px; width: auto; }
.toolbar select { width: auto; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  appearance: none; border: 1px solid var(--line); background: var(--card-2); color: var(--muted);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .85rem; cursor: pointer;
}
.chip.active { color: #fff; border-color: var(--accent); background: rgba(255, 75, 62, .15); }
.chip .count { opacity: .75; margin-left: 4px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; background: var(--bg-2); position: sticky; top: 0; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255, 255, 255, .02); }
td.code-cell { font-family: var(--mono); font-weight: 600; white-space: nowrap; }
td .user-input { min-width: 150px; padding: 7px 10px; font-size: .9rem; }
td .user-input.dup { border-color: var(--warn); }
td.actions { white-space: nowrap; }
td.actions .btn + .btn { margin-left: 6px; }
.empty { text-align: center; color: var(--muted); padding: 30px; }
.time { white-space: nowrap; color: var(--muted); font-size: .85rem; }
.flag { color: var(--warn); font-size: .78rem; display: block; margin-top: 3px; }

.outcome-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.outcome { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.outcome .thumb { aspect-ratio: 16 / 10; background: #000; display: grid; place-items: center; overflow: hidden; }
.outcome .thumb img, .outcome .thumb video { width: 100%; height: 100%; object-fit: cover; }
.outcome .body { padding: 12px 14px; flex: 1; }
.outcome .body h3 { font-size: 1.05rem; margin-bottom: 4px; }
.outcome .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.outcome .prob { font-size: 1.3rem; font-weight: 700; }
.outcome .foot { display: flex; gap: 6px; padding: 10px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.bar { height: 10px; border-radius: 5px; background: var(--bad); overflow: hidden; margin: 8px 0 4px; }
.bar > span { display: block; height: 100%; background: var(--ok); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.card.flat { box-shadow: none; }

dialog {
  background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0; width: min(560px, 94vw); box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(0, 0, 0, .65); }
dialog .dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
dialog .dlg-head h2 { margin: 0; font-size: 1.1rem; }
dialog .dlg-body { padding: 18px 20px; max-height: 70vh; overflow: auto; }
dialog .dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.radio-row { display: flex; gap: 10px; }
.radio-row label { flex: 1; margin: 0; }
.radio-row input { position: absolute; opacity: 0; }
.radio-row span {
  display: block; text-align: center; padding: 10px; border-radius: 10px; border: 1px solid var(--line);
  background: #0f1116; color: var(--muted); cursor: pointer; font-weight: 600;
}
.radio-row input:checked + span.s { border-color: var(--ok); color: var(--ok); background: rgba(47, 191, 113, .1); }
.radio-row input:checked + span.f { border-color: var(--bad); color: var(--bad); background: rgba(239, 75, 90, .1); }
.radio-row input:focus-visible + span { box-shadow: 0 0 0 3px rgba(255, 122, 69, .25); }

.login-card { max-width: 400px; margin: 10vh auto 0; }
footer.foot { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 30px; }

#rounds-table { margin-top: 16px; }
@media (max-width: 640px) {
  .card { padding: 18px; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
  .stat { padding: 8px 10px; }
  .stat .n { font-size: 1.25rem; }
  .stat .l { font-size: .68rem; }
  .brand h1 { font-size: 1.35rem; }
  th, td { padding: 8px 10px; }
}
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* player: this browser's codes */
.my-codes { display: grid; gap: 8px; margin: 6px 0 14px; }
.code-item {
  appearance: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: #0f1116; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.code-item:hover { border-color: #3a4150; }
.code-item.active { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(255, 122, 69, .15); }
.code-item .mono { font-weight: 700; letter-spacing: .04em; }
.code-item-main { display: grid; gap: 2px; }

/* player: game picker (several rounds running at once) */
.game-pick { display: grid; gap: 8px; margin: 4px 0 16px; }
.game-opt {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: #0f1116;
}
.game-opt:hover { border-color: #3a4150; }
.game-opt:has(input:checked) { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(255, 122, 69, .15); }
.game-opt:has(input:disabled) { cursor: default; }
.game-opt input { accent-color: var(--accent-2); width: 18px; height: 18px; margin: 0; flex: none; }
.game-opt .game-icon { font-size: 1.5rem; line-height: 1; }
.game-opt .game-text { display: grid; gap: 2px; min-width: 0; }
.game-pick.single .game-opt { cursor: default; box-shadow: none; border-color: var(--line); }
.game-pick.single input { display: none; }
.other-games { margin: 12px 0 0; color: var(--muted); }
.status-game { margin: -4px 0 10px; }
.result .download-row { display: flex; justify-content: center; margin: 12px 0 2px; }
details.check-other { margin-top: 4px; }
details.check-other summary { cursor: pointer; color: var(--muted); font-size: .9rem; margin-bottom: 10px; }

/* admin: outcome thumbnails, hover preview, replied, deleted */
.outcome-cell { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.outcome-cell .pill { margin-top: 3px; }
.thumb-btn {
  position: relative; flex: none; width: 64px; height: 40px; padding: 0; border-radius: 7px; overflow: hidden;
  border: 1px solid var(--line); background: #000; cursor: zoom-in; display: grid; place-items: center;
}
.thumb-btn:hover, .thumb-btn:focus-visible { border-color: var(--accent-2); outline: none; }
.thumb-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-ph { color: var(--muted); font-size: .9rem; }
.thumb-play {
  position: absolute; right: 3px; bottom: 2px; font-size: .6rem; color: #fff;
  background: rgba(0, 0, 0, .6); border-radius: 4px; padding: 0 3px; line-height: 1.4;
}
.media-pop {
  position: fixed; z-index: 150; width: 340px; max-width: 80vw; pointer-events: none;
  background: #000; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow);
}
.media-pop img, .media-pop video { display: block; width: 100%; max-height: 260px; object-fit: contain; background: #000; }
.media-pop-cap { padding: 6px 10px; font-size: .82rem; background: var(--card); color: var(--text); }
td.replied-cell { text-align: center; }
input.replied { width: 20px; height: 20px; accent-color: var(--ok); cursor: pointer; }
td.actions .del-btn { color: var(--muted); }
td.actions .del-btn:hover { color: var(--bad); border-color: var(--bad); }
td.actions .final + .del-btn { margin-left: 8px; }
tr.deleted-row td { opacity: .6; }
tr.deleted-row td.actions { opacity: 1; }

/* admin: auto-approve */
.bot-line { margin: -4px 0 10px; }
.ok-text { color: var(--ok); }
.warn-text { color: var(--warn); }
.flag.bot-note { color: var(--info); }
.auto-tag { display: block; margin-top: 4px; font-size: .75rem; color: var(--muted); }
a.comment-link { display: block; font-family: var(--font); font-weight: 500; font-size: .78rem; margin-top: 3px; }
.small-code { font-size: .85rem !important; letter-spacing: 0 !important; word-break: break-all; }
details.setup-steps { margin-top: 12px; }
details.setup-steps summary { cursor: pointer; margin-bottom: 8px; }
details.setup-steps ol { color: var(--text); }
#rounds-table th, #rounds-table td { padding: 8px 10px; }
#rounds-table td:first-child { white-space: normal; }
td .user-input { min-width: 130px; }

/* ---------- surprise outcome ---------- */
:root { --gold: #f5c542; }
.pill.surprise { color: var(--gold); background: rgba(245, 197, 66, .12); border-color: rgba(245, 197, 66, .35); }
.stat.gold .n { color: var(--gold); }
.bar { display: flex; }
.bar > span { flex: none; }
.bar > span.seg-success { background: var(--ok); }
.bar > span.seg-surprise { background: var(--gold); }
.radio-row { flex-wrap: wrap; }
.radio-row label { flex: 1 1 130px; }
.radio-row input:checked + span.u { border-color: var(--gold); color: var(--gold); background: rgba(245, 197, 66, .1); }
.result.surprise h3.headline { color: #ffd34d; text-shadow: 0 0 22px rgba(255, 200, 60, .45); }

/* reveal: rattle, then a golden burst */
.reveal-overlay .reveal-inner { position: relative; z-index: 1; }
.reveal-overlay .burst { position: absolute; inset: 0; pointer-events: none; opacity: 0; overflow: hidden; }
.reveal-overlay .burst::before {
  content: ""; position: absolute; left: 50%; top: 45%; width: 240vmax; height: 240vmax; margin: -120vmax 0 0 -120vmax;
  background: repeating-conic-gradient(from 0deg, rgba(255, 214, 90, .40) 0deg 6deg, rgba(255, 214, 90, 0) 6deg 20deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .7) 12%, transparent 30%);
  mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .7) 12%, transparent 30%);
}
.reveal-overlay .burst::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(255, 248, 210, .95) 0%, rgba(255, 210, 80, .75) 12%,
                              rgba(255, 175, 20, .30) 30%, rgba(255, 150, 0, 0) 58%);
}
.reveal-overlay.golden { animation: gold-flash .8s ease-out; }
.reveal-overlay.golden .burst { animation: burst-in 2.1s ease-out forwards; }
.reveal-overlay.golden .burst::before { animation: rays-spin 7s linear infinite; }
@keyframes gold-flash { 0% { background: rgba(255, 238, 180, .97); } 100% { background: rgba(5, 5, 8, .94); } }
@keyframes burst-in {
  0% { opacity: 0; transform: scale(.15); } 15% { opacity: 1; transform: scale(1.1); }
  35% { transform: scale(1); } 100% { opacity: .9; transform: scale(1); }
}
@keyframes rays-spin { to { transform: rotate(360deg); } }
.reveal-overlay .cyl.glow {
  transform: scale(1.12); transition: transform .45s ease-out, filter .45s ease-out;
  filter: drop-shadow(0 0 16px rgba(255, 214, 90, .95)) drop-shadow(0 0 46px rgba(255, 175, 30, .7)) brightness(1.18) saturate(1.25);
}
.reveal-overlay .caption.gold { color: #ffd34d; font-size: 1.7rem; letter-spacing: .06em; text-shadow: 0 0 18px rgba(255, 200, 60, .85); }
.reveal-overlay .cyl.rumble-1 { animation: rumble-1 .12s linear infinite; }
.reveal-overlay .cyl.rumble-2 { animation: rumble-2 .09s linear infinite; }
.reveal-overlay .cyl.rumble-3 { animation: rumble-3 .065s linear infinite; }
@keyframes rumble-1 {
  0%, 100% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(-2px, 1px) rotate(-1.5deg); }
  50% { transform: translate(2px, -1px) rotate(1.5deg); } 75% { transform: translate(-1px, -2px) rotate(-1deg); }
}
@keyframes rumble-2 {
  0%, 100% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(-5px, 3px) rotate(-4deg); }
  50% { transform: translate(5px, -2px) rotate(4deg); } 75% { transform: translate(-3px, -4px) rotate(-3deg); }
}
@keyframes rumble-3 {
  0%, 100% { transform: translate(0, 0) rotate(0) scale(1.03); } 25% { transform: translate(-10px, 5px) rotate(-8deg) scale(1.05); }
  50% { transform: translate(10px, -4px) rotate(8deg) scale(1.04); } 75% { transform: translate(-6px, -8px) rotate(-6deg) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .reveal-overlay.golden, .reveal-overlay.golden .burst, .reveal-overlay.golden .burst::before { animation: none; }
  .reveal-overlay.golden .burst { opacity: .9; }
  .reveal-overlay .cyl.glow { transition: none; }
}
.toast.gold { border-left-color: var(--gold); }
#alerts-hint { margin: -4px 0 10px; }
.pill.once { color: #c9b6ff; background: rgba(160, 130, 255, .12); border-color: rgba(160, 130, 255, .35); }
.pill.once::before { display: none; }
.outcome .claimed { color: var(--gold); margin: 6px 0 0; }

/* ======================= the bigger reveal ======================= */
.reveal-overlay { transition: background-color .35s ease; }
.reveal-overlay .cyl-wrap { position: relative; width: min(240px, 60vw); margin: 0 auto; }
.reveal-overlay .cyl-wrap .cyl { position: relative; z-index: 2; width: 100%; height: auto; display: block; will-change: transform, filter; }
.reveal-overlay .cyl-wrap.enter { animation: cyl-enter .45s cubic-bezier(.2, 1.7, .4, 1) both; }
.reveal-overlay .cyl-wrap.bump { animation: cyl-bump .18s ease-out; }
@keyframes cyl-enter { 0% { transform: scale(.35) rotate(-40deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes cyl-bump { 0% { transform: scale(1); } 40% { transform: scale(1.045); } 100% { transform: scale(1); } }

/* darkness closing in, red pulse on each heartbeat */
.reveal-overlay .vignette {
  position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: 0; transition: opacity .6s ease;
  background: radial-gradient(circle at 50% 45%, transparent 30%, rgba(0, 0, 0, .85) 100%);
}
.reveal-overlay.dimmed .vignette { opacity: .7; }
.reveal-overlay .vignette.tense { opacity: 1; background: radial-gradient(circle at 50% 45%, transparent 22%, rgba(40, 0, 0, .9) 100%); }
.reveal-overlay .vignette.beat { animation: vig-beat .38s ease-out; }
.reveal-overlay .vignette.red { opacity: 1; background: radial-gradient(circle at 50% 45%, rgba(120, 0, 0, .15) 15%, rgba(110, 0, 0, .85) 100%); }
@keyframes vig-beat { 0% { filter: brightness(2.6) saturate(1.6); } 100% { filter: brightness(1); } }

/* captions */
.reveal-overlay .caption.count {
  font-size: clamp(3.4rem, 16vw, 6rem); font-weight: 900; line-height: 1; color: #fff;
  text-shadow: 0 0 28px rgba(255, 90, 60, .7); animation: count-pop .38s cubic-bezier(.2, 1.8, .4, 1);
}
.reveal-overlay .caption.big {
  font-size: clamp(2.6rem, 12vw, 5rem); font-weight: 900; letter-spacing: .04em; line-height: 1.05;
  animation: count-pop .45s cubic-bezier(.2, 1.8, .4, 1);
}
.reveal-overlay .caption.win { color: #5be39a; text-shadow: 0 0 26px rgba(91, 227, 154, .7); }
.reveal-overlay .caption.lose { color: #ff4b3e; text-shadow: 0 0 26px rgba(255, 75, 62, .8); }
@keyframes count-pop { 0% { transform: scale(2.2); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* jolts and shakes */
.reveal-overlay .reveal-inner.jolt { animation: jolt .28s ease-out; }
.reveal-overlay .reveal-inner.heavy-shake { animation: heavy-shake .7s cubic-bezier(.36, .07, .19, .97); }
@keyframes jolt { 0% { transform: translateY(0); } 30% { transform: translateY(-10px) scale(1.03); } 100% { transform: translateY(0); } }
@keyframes heavy-shake {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  10% { transform: translate(-22px, 10px) rotate(-3deg); } 20% { transform: translate(20px, -12px) rotate(3deg); }
  30% { transform: translate(-16px, -8px) rotate(-2deg); } 40% { transform: translate(14px, 10px) rotate(2deg); }
  55% { transform: translate(-9px, 5px) rotate(-1deg); } 70% { transform: translate(6px, -4px); } 85% { transform: translate(-3px, 2px); }
}

/* shockwave ring */
.reveal-overlay .shockwave {
  position: absolute; left: 50%; top: 42%; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%;
  border: 5px solid #fff; z-index: 2; pointer-events: none; animation: shock .8s ease-out forwards;
}
.reveal-overlay .shockwave.green { border-color: #5be39a; box-shadow: 0 0 30px rgba(91, 227, 154, .8); }
.reveal-overlay .shockwave.red { border-color: #ff4b3e; box-shadow: 0 0 30px rgba(255, 75, 62, .8); }
.reveal-overlay .shockwave.gold { border-color: #ffd34d; box-shadow: 0 0 40px rgba(255, 210, 80, .9); }
@keyframes shock { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(14); opacity: 0; border-width: 1px; } }

/* cracked glass after a bang */
.reveal-overlay .cracks { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.reveal-overlay .cracks path {
  fill: none; stroke: rgba(255, 255, 255, .55); stroke-width: .35; vector-effect: non-scaling-stroke;
  stroke-dasharray: 200; stroke-dashoffset: 200; animation: crack .35s ease-out forwards;
}
@keyframes crack { to { stroke-dashoffset: 0; } }

/* particles */
.reveal-overlay canvas.fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal-overlay .cyl-wrap.enter, .reveal-overlay .cyl-wrap.bump, .reveal-overlay .vignette.beat, .reveal-overlay .caption.count, .reveal-overlay .caption.big,
  .reveal-overlay .reveal-inner.jolt, .reveal-overlay .reveal-inner.heavy-shake { animation: none; }
}
.or-label { margin-top: 10px; }
/* the cylinder stays put: captions live in a fixed-size area below it */
.reveal-overlay .cyl-wrap { margin: 0 auto 26px; }
.reveal-overlay .reveal-inner { display: flex; flex-direction: column; align-items: center; }
.reveal-overlay .caption {
  margin-top: 0; width: min(92vw, 640px); height: 7.5rem; min-height: 0;
  display: flex; align-items: flex-start; justify-content: center; text-align: center;
}
td .tags { display: block; margin-top: 3px; font-size: .78rem; color: var(--muted); }

/* ======================= lottery: dashboard ======================= */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { appearance: none; border: 0; background: var(--card-2); color: var(--muted); font: inherit; font-weight: 600; padding: 9px 14px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.active { background: rgba(255, 75, 62, .18); color: #fff; }
.seg button:disabled { cursor: not-allowed; opacity: .55; }
.lottery-tools { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; margin-bottom: 4px; }
@media (max-width: 900px) { .lottery-tools { grid-template-columns: 1fr; } }
.lib-grid { display: grid; gap: 10px; max-height: 520px; overflow: auto; padding-right: 4px; }
.lib-item { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; align-items: center; background: var(--card);
            border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.lib-thumb { width: 96px; height: 60px; border-radius: 7px; overflow: hidden; background: #000; display: grid; place-items: center; }
.lib-thumb img, .lib-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-body { min-width: 0; display: grid; gap: 4px; }
.lib-actions { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 640px) { .lib-item { grid-template-columns: 72px 1fr; } .lib-thumb { width: 72px; height: 48px; } .lib-actions { grid-column: 1 / -1; flex-direction: row; } }
.kind-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.kind-chip { appearance: none; font: inherit; font-size: .75rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; cursor: pointer;
             border: 1px dashed var(--line); background: transparent; color: var(--muted); }
.kind-chip.on.success { color: var(--ok); border: 1px solid rgba(47, 191, 113, .5); background: rgba(47, 191, 113, .12); }
.kind-chip.on.failure { color: var(--bad); border: 1px solid rgba(239, 75, 90, .5); background: rgba(239, 75, 90, .12); }
.kind-chip.on.surprise { color: var(--gold); border: 1px solid rgba(245, 197, 66, .5); background: rgba(245, 197, 66, .12); }
.gen-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.gen-row label, .gen-heads label { display: grid; gap: 4px; font-size: .85rem; }
.gen-heads { margin: 4px 0 12px; }
.gen-heads summary { cursor: pointer; color: var(--muted); margin-bottom: 8px; }
.gen-heads label { margin-bottom: 8px; }
.kind-checks { display: flex; gap: 18px; flex-wrap: wrap; }
.outcome .thumb { position: relative; }
.ball-badge {
  position: absolute; left: 8px; top: 8px; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 15px;
  display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: #111;
  background: radial-gradient(circle at 35% 30%, #fff 0 18%, hsl(var(--h) 85% 62%) 45%, hsl(var(--h) 75% 40%) 100%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .5);
}
.weight-edit { display: inline-flex; align-items: center; gap: 6px; }
.weight-input { width: 86px !important; padding: 4px 8px !important; font-size: .85rem; }
.outcome.claimed-card { opacity: .55; }

/* ======================= lottery: reveal ======================= */
.reveal-overlay .lotto-wrap { position: relative; width: min(260px, 64vw); aspect-ratio: 1; margin: 0 auto 26px; }
.reveal-overlay .lotto-wrap.enter { animation: cyl-enter .45s cubic-bezier(.2, 1.7, .4, 1) both; }
.reveal-overlay .lotto-wrap canvas.globe { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .6s, filter .6s; }
.reveal-overlay .lotto-wrap.fade-globe canvas.globe { opacity: .3; filter: blur(1.5px); }
.lotto-ball { position: absolute; left: 50%; top: 50%; width: 34%; aspect-ratio: 1; z-index: 2; transform: translate(-50%, -50%) scale(.56); }
.lotto-ball .half {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 7%, hsl(var(--h) 85% 64%) 30%, hsl(var(--h) 75% 34%) 100%);
  box-shadow: inset -6px -8px 14px rgba(0, 0, 0, .35);
  transition: transform .75s cubic-bezier(.2, .8, .3, 1), opacity .3s, filter .4s;
}
.lotto-ball.open .half { transition: transform .75s cubic-bezier(.2, .8, .3, 1), opacity .35s .5s, filter .4s; }
.lotto-ball .half.top { clip-path: inset(0 0 50% 0); }
.lotto-ball .half.bottom { clip-path: inset(50% 0 0 0); }
.lotto-ball .num {
  position: absolute; left: 50%; top: 50%; width: 48%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; background: #fff; color: #111; display: grid; place-items: center;
  font-weight: 900; font-size: clamp(.95rem, 4.6vw, 1.5rem); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .12);
  transition: opacity .3s, transform .6s;
}
.lotto-ball.drop { animation: lotto-drop .7s cubic-bezier(.3, .2, .4, 1) both; }
.lotto-ball.grow { animation: lotto-grow .5s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.lotto-ball.big { transform: translate(-50%, -50%) scale(1.45); }
.lotto-ball.wobble { animation: lotto-wobble .5s ease-in-out infinite; }
.lotto-ball.rattle { animation: lotto-rattle .07s linear infinite; }
.lotto-ball.glow .half { filter: drop-shadow(0 0 14px rgba(255, 214, 90, .95)) brightness(1.15); }
.lotto-ball.open .half.top { transform: translateY(-80%) rotate(-28deg); opacity: 0; }
.lotto-ball.open .half.bottom { transform: translateY(80%) rotate(22deg); opacity: 0; }
.lotto-ball.open .num { opacity: 0; transform: translate(-50%, -50%) scale(1.7); }
.lotto-ball.dud .half { filter: grayscale(1) brightness(.6); }
@keyframes lotto-drop {
  0% { transform: translate(-50%, -140%) scale(.3); opacity: 0; } 12% { transform: translate(-50%, -205%) scale(.36); opacity: 1; }
  55% { transform: translate(-50%, -40%) scale(.5); } 70% { transform: translate(-50%, -80%) scale(.52); }
  86% { transform: translate(-50%, -46%) scale(.55); } 100% { transform: translate(-50%, -50%) scale(.56); }
}
@keyframes lotto-grow { from { transform: translate(-50%, -50%) scale(.56) rotate(-200deg); } to { transform: translate(-50%, -50%) scale(1.45) rotate(0); } }
@keyframes lotto-wobble {
  0%, 100% { transform: translate(-50%, -50%) scale(1.45) rotate(-5deg); } 50% { transform: translate(-50%, -50%) scale(1.5) rotate(5deg); }
}
@keyframes lotto-rattle {
  0%, 100% { transform: translate(-50%, -50%) scale(1.45); }
  25% { transform: translate(calc(-50% - 6px), calc(-50% + 3px)) scale(1.47) rotate(-5deg); }
  50% { transform: translate(calc(-50% + 6px), calc(-50% - 3px)) scale(1.46) rotate(5deg); }
  75% { transform: translate(calc(-50% - 3px), calc(-50% - 5px)) scale(1.48) rotate(-3deg); }
}
@media (prefers-reduced-motion: reduce) {
  .reveal-overlay .lotto-wrap.enter, .lotto-ball.drop, .lotto-ball.grow, .lotto-ball.wobble, .lotto-ball.rattle { animation: none; }
  .lotto-ball .half, .lotto-ball .num { transition: none; }
}

/* admin: running rounds (Game controls) */
.round-cards { display: grid; gap: 12px; }
.round-card { border: 1px solid var(--line); border-radius: 12px; background: #13161c; padding: 14px; display: grid; gap: 10px; }
.round-card.fresh { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(255, 122, 69, .18); }
.rc-head, .rc-row, .rc-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rc-name { font-size: 1.05rem; }
.rc-label { color: var(--muted); font-size: .8rem; min-width: 96px; }
.rc-url { word-break: break-all; font-size: .85rem; }
.rc-thread { display: flex; gap: 8px; flex: 1 1 320px; min-width: 0; }
.rc-thread input { flex: 1; min-width: 0; }
.round-card p { margin: 0; }
.sub-h { font-size: .95rem; margin: 22px 0 8px; }
td .tags.flair.nutter { color: var(--bad); font-weight: 600; }
td .round-tag { margin-top: 2px; }
#export-round { max-width: 260px; }
.pill.hot { background: rgba(255, 122, 69, .16); color: #ffb08a; border-color: rgba(255, 122, 69, .45); }
.file-count { color: var(--accent-2); margin: 6px 0 0; }
.file-count:empty { display: none; }
#lib-sort, #out-sort { width: auto; max-width: 210px; }
.media-facts { white-space: nowrap; }
#lib-show, #out-show { width: auto; max-width: 230px; }
.shown-count:empty { display: none; }
.shown-count { margin: 0 0 8px; }
.media-facts .source-link { color: var(--muted); }
.dupes-toggle { margin-top: 10px; }
.heads-grid { display: grid; gap: 8px; margin: 6px 0 10px; }
.heads-grid label { display: grid; gap: 4px; }
.gen-buttons { gap: 8px; }
.refill-toggle { margin-top: 10px; }
.flair-word-row { margin: 8px 0 4px; gap: 8px; }
.flair-word-row input { max-width: 220px; }

/* Gooner Gacha: header actions, badges */
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px;
  border-radius: 999px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 800; }
.signed-in { margin: -6px 0 14px; }
.collection-note { margin: 10px 0 8px; text-align: center; }

/* Gooner Gacha: collection page */
.wrap.wide-ish { max-width: 980px; }
.signin-form { max-width: 380px; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 10px; }
.pick-grid, .trade-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.pick-grid { margin: 8px 0 12px; max-height: 420px; overflow: auto; padding: 2px; }
.tile { appearance: none; display: grid; text-align: left; padding: 0; border: 1px solid var(--line); border-radius: 12px;
  background: #13161c; color: var(--text); font: inherit; cursor: pointer; overflow: hidden; }
.tile:hover { border-color: #3a4150; }
.tile.picked { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(255, 122, 69, .3); }
.tile.picked .tile-media::after { content: "✓"; position: absolute; top: 6px; left: 6px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent-2); color: #fff; font-weight: 800; }
.tile-media { position: relative; aspect-ratio: 4 / 3; background: #0b0d11; display: grid; place-items: center; overflow: hidden; }
.tile-media img, .tile-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-ball { position: absolute; top: 6px; right: 6px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px;
  background: rgba(0, 0, 0, .65); color: #fff; font-size: .75rem; font-weight: 800; display: grid; place-items: center; }
.tile-body { display: grid; gap: 3px; padding: 8px 10px 10px; justify-items: start; }
.tile.small .tile-body { padding: 6px 8px 8px; }
.tile-name { font-size: .9rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tile.small .tile-name { font-size: .8rem; }
.trade { margin-top: 12px; display: grid; gap: 12px; }
.trade.my-turn { border-color: var(--accent-2); }
.trade-sides { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: start; }
.trade-side h4 { margin: 0 0 6px; font-size: .9rem; }
.trade-arrow { font-size: 1.6rem; color: var(--muted); padding-top: 28px; }
.trade-log { margin: 0; padding-left: 18px; }
.trade-actions { gap: 8px; }
@media (max-width: 640px) {
  .trade-sides { grid-template-columns: 1fr; }
  .trade-arrow { padding: 0; text-align: center; transform: rotate(90deg); }
  .item-grid { grid-template-columns: repeat(2, 1fr); }
}
#item-dialog .result .media img, #item-dialog .result .media video { max-height: 60vh; }
.acct-results { margin-top: 12px; }
.acct-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.acct-row .grow { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
.acct-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.game-opt.played { opacity: .75; }
.game-opt.played .warn-text { display: block; }
/* Player header: on a phone, the Collection and Sound buttons drop below the title instead of squeezing it. */
.brand:has(> .head-actions) { flex-wrap: wrap; row-gap: 10px; }
.brand:has(> .head-actions) .grow { flex: 1 1 220px; }
.backup-part-list { margin: 8px 0 4px; padding-left: 1.4em; display: grid; gap: 4px; }
#backup-parts-box summary { cursor: pointer; margin-top: 8px; }
.tile-copies { position: absolute; bottom: 6px; right: 6px; min-width: 28px; height: 22px; padding: 0 7px; border-radius: 999px;
  display: grid; place-items: center; font-size: .78rem; font-weight: 700; background: rgba(11, 13, 17, .85); color: #fff;
  border: 1px solid rgba(255, 255, 255, .25); }
/* Per-game auto-approve rules (round cards and the new-round form) */
.rc-rule-list { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.rc-flair { display: inline-flex; align-items: center; gap: 8px; }
input.flair-word { width: 120px; padding: 4px 8px; font-size: .85rem; }
.new-round-rules { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.new-round-rules legend { font-size: .85rem; color: var(--muted); padding: 0 4px; }
.new-round-rules p { flex-basis: 100%; margin: 0; }
.game-opt .game-rules { color: var(--warn); }
.checklist { margin: 6px 0 8px; padding-left: 1.3em; display: grid; gap: 4px; }
.rc-earlier { display: grid; gap: 4px; min-width: 0; }
.rc-earlier-item { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rc-earlier-item a { overflow-wrap: anywhere; }
.tile-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-size: .85rem; color: #fff; background: rgba(11, 13, 17, .6); border: 1px solid rgba(255, 255, 255, .35);
  pointer-events: none; }
.tile-media .thumb-ph { font-size: 1.4rem; color: var(--muted); }
/* Preview images instead of videos (videos load only when played) */
.outcome .thumb.clickable, .lib-thumb.clickable { cursor: pointer; }
.lib-thumb { position: relative; }
.outcome .thumb .thumb-play, .lib-thumb .thumb-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.r2-progress { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 8px 0 6px; }
.r2-progress span { display: block; height: 100%; background: var(--ok); }
