:root {
  --bg0: #0a0607;
  --bg1: #160b0e;
  --blood: #8f1d2a;
  --blood-hot: #c2313f;
  --gold: #d4af62;
  --gold-dim: #9a7b3f;
  --ink: #1a1012;
  --text: #f2e6d8;
  --muted: #a8978a;
  --line: rgba(212, 175, 98, 0.28);
  --danger: #b33a3a;
  --ok: #8fbf8a;
  --font-display: "Cinzel", serif;
  --font-body: "Manrope", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 70% -10%, rgba(143, 29, 42, 0.28), transparent 55%),
    radial-gradient(900px 500px at 10% 100%, rgba(212, 175, 98, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg1), var(--bg0) 60%, #050304);
  overflow-x: hidden;
}

.noise, .ember {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
}
.noise {
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}
.ember {
  background: radial-gradient(circle at 50% 120%, rgba(194, 49, 63, 0.18), transparent 40%);
  animation: emberPulse 7s ease-in-out infinite;
}
@keyframes emberPulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: #f0d392; }
code {
  font-family: ui-monospace, monospace;
  background: rgba(0,0,0,0.35);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.brand {
  font-family: var(--font-display);
  letter-spacing: 0.28em;
  text-transform: lowercase;
  font-size: clamp(3rem, 10vw, 6.5rem);
  margin: 0;
  color: var(--text);
  text-shadow: 0 0 40px rgba(143, 29, 42, 0.45);
}
.brand-sm {
  font-size: 1.35rem;
  letter-spacing: 0.22em;
}

.hub {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 2rem;
  padding: 2rem 1.25rem 4rem;
  text-align: center;
}
.hub-line {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 0.4rem 0 0;
  color: var(--gold);
}
.hub-sub { color: var(--muted); margin: 0.6rem auto 0; max-width: 28rem; }
.hub-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}
.hub-btn {
  --i: 0;
  position: relative;
  min-width: 180px;
  padding: 1.1rem 1.6rem;
  border: 1px solid var(--line);
  color: var(--text);
  background: linear-gradient(180deg, rgba(42, 14, 18, 0.85), rgba(16, 8, 10, 0.9));
  overflow: hidden;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  animation: riseIn 0.8s ease both;
  animation-delay: calc(var(--i) * 80ms + 300ms);
}
.hub-btn span {
  font-family: var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.95rem;
}
.hub-btn i {
  position: absolute;
  inset: auto -40% -40% auto;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(194,49,63,0.45), transparent 70%);
  transition: transform 0.45s ease;
}
.hub-btn:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 98, 0.7);
  box-shadow: 0 12px 40px rgba(143, 29, 42, 0.25);
}
.hub-btn:hover i { transform: translate(-20px, -20px) scale(1.3); }
.hub-foot {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.hub-foot button, .inline button {
  background: none;
  border: none;
  color: var(--gold);
  cursor: pointer;
  font: inherit;
  padding: 0;
}
.inline { display: inline; margin: 0; }

.reveal { animation: riseIn 0.9s ease both; }
.delay-1 { animation-delay: 0.12s; }
.delay-2 { animation-delay: 0.22s; }
.delay-3 { animation-delay: 0.32s; }
@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.auth-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}
.auth-panel {
  width: min(420px, 100%);
  padding: 2rem;
  border: 1px solid var(--line);
  background: rgba(12, 7, 8, 0.82);
  backdrop-filter: blur(8px);
  display: grid;
  gap: 0.85rem;
}
.auth-panel h1 {
  font-family: var(--font-display);
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
}
.auth-panel .back { color: var(--muted); font-size: 0.9rem; }

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: left;
}
input, select, textarea, button {
  font: inherit;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  padding: 0.7rem 0.8rem;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(212,175,98,0.25);
}
.btn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  padding: 0.7rem 1rem;
  cursor: pointer;
  transition: 0.2s ease;
}
.btn:hover { border-color: var(--gold); }
.btn.primary {
  background: linear-gradient(180deg, var(--blood-hot), var(--blood));
  border-color: rgba(212,175,98,0.35);
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { border-color: rgba(179,58,58,0.5); color: #f0b4b4; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.wide, button.wide { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.muted { color: var(--muted); }
.error { color: #f0a0a0; min-height: 1.2em; }
.ok { color: var(--ok); min-height: 1.2em; }
.check { display: flex; align-items: center; gap: 0.5rem; }

.panel-page {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 4rem;
}
.panel-note { margin: 0 0 1rem; }
.subhead {
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  font-size: 1.15rem;
  margin: 1.4rem 0 0.6rem;
}
.inline-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.inline-label select { min-width: 180px; }
.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.panel-top nav { display: flex; gap: 1rem; align-items: center; }
.panel-block h1, .tab-panel h1 {
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  margin: 0 0 0.4rem;
  font-size: 1.7rem;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 1.2rem 0;
}
.form-grid .wide { grid-column: 1 / -1; }
@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
}

.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.65rem; border-bottom: 1px solid rgba(255,255,255,0.06); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-weight: 500; font-size: 0.8rem; }
.row-actions { display: flex; gap: 0.4rem; }

.tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.6rem;
}
.tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}
.tab.active, .tab:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(143, 29, 42, 0.18);
}
.tab-panel { display: none; animation: riseIn 0.45s ease; }
.tab-panel.active { display: block; }

.status-pill {
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.status-pill[data-status="online"] { color: var(--ok); border-color: rgba(143,191,138,0.45); }
.status-pill[data-status="connecting"] { color: var(--gold); }
.status-pill[data-status="error"],
.status-pill[data-status="offline"] { color: #e0a0a0; }

.member-list {
  display: grid;
  gap: 0.45rem;
  margin-top: 1rem;
  max-height: 420px;
  overflow: auto;
}
.member-list.compact { max-height: 260px; }
.member {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid transparent;
  background: rgba(0,0,0,0.22);
  cursor: pointer;
  text-align: left;
  color: inherit;
  width: 100%;
}
.member:hover, .member.selected {
  border-color: var(--line);
  background: rgba(143, 29, 42, 0.18);
}
.member img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
}
.member .meta { display: grid; gap: 0.1rem; }
.member .meta small { color: var(--muted); }

.deck-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}
.deck-card {
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.28);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.35s ease;
}
.deck-card:hover { transform: translateY(-6px) rotateX(4deg); }
.deck-card img {
  width: 100%;
  aspect-ratio: 3/5;
  object-fit: cover;
  display: block;
  animation: cardBreath 4.5s ease-in-out infinite;
}
@keyframes cardBreath {
  0%, 100% { filter: brightness(0.95); }
  50% { filter: brightness(1.08); }
}
.deck-card .body { padding: 0.7rem; display: grid; gap: 0.4rem; }
.deck-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.deck-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  min-height: 2.4em;
}

.reading-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
}
@media (max-width: 860px) {
  .reading-layout { grid-template-columns: 1fr; }
}
.selected-user {
  margin: 0.8rem 0;
  padding: 0.7rem;
  border: 1px dashed var(--line);
  color: var(--muted);
}
.stage {
  position: relative;
  min-height: 340px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 70%, rgba(143,29,42,0.25), transparent 55%),
    linear-gradient(180deg, rgba(20,10,12,0.9), rgba(8,4,5,0.95));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 1rem 1.5rem;
  overflow: hidden;
  perspective: 900px;
}
.stage-glow {
  position: absolute;
  inset: 10% 20% auto;
  height: 40%;
  background: radial-gradient(circle, rgba(212,175,98,0.18), transparent 70%);
  animation: emberPulse 5s ease-in-out infinite;
}
.deal-slot {
  width: 110px;
  height: 170px;
  position: relative;
  transform-style: preserve-3d;
}
.card-3d {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(.2,.8,.2,1);
}
.face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border: 2px solid var(--gold-dim);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 40%, rgba(194,49,63,0.45), transparent 55%),
    linear-gradient(160deg, #3a1218, #14080a);
  box-shadow: 0 16px 30px rgba(0,0,0,0.45);
}
.face.front {
  transform: rotateY(180deg);
  background-size: cover;
  background-position: center;
  background-color: #1a1012;
}
.deal-slot.dealing .card-3d {
  animation: dealDrop 0.85s cubic-bezier(.2,.85,.2,1) both;
}
.deal-slot.flipped .card-3d { transform: rotateY(180deg); }
.deal-slot[data-i="0"].dealing .card-3d { animation-delay: 0s; }
.deal-slot[data-i="1"].dealing .card-3d { animation-delay: 0.28s; }
.deal-slot[data-i="2"].dealing .card-3d { animation-delay: 0.56s; }
.deal-slot[data-i="0"].flipped .card-3d { transition-delay: 0.55s; }
.deal-slot[data-i="1"].flipped .card-3d { transition-delay: 0.85s; }
.deal-slot[data-i="2"].flipped .card-3d { transition-delay: 1.15s; }

@keyframes dealDrop {
  0% { transform: translateY(-220px) rotate(-18deg) scale(0.85); opacity: 0; }
  70% { opacity: 1; }
  100% { transform: translateY(0) rotate(0) scale(1); opacity: 1; }
}

.reading-desc {
  margin-top: 1.2rem;
  display: grid;
  gap: 0.8rem;
}
.reading-desc article {
  border-left: 2px solid var(--blood);
  padding: 0.4rem 0 0.4rem 0.9rem;
  animation: riseIn 0.5s ease both;
}
.reading-desc h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--gold);
}
.reading-desc p { margin: 0; color: var(--muted); }
.reading-desc .rarity-badge { margin-left: 0.45rem; vertical-align: middle; }

/* Rarity system */
.rarity-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.18rem 0.45rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  width: fit-content;
}
.rarity-edit { font-size: 0.75rem; margin-top: 0.2rem; }

.rarity-common { --rarity: #a0a0a5; --rarity-glow: rgba(160,160,165,0.25); }
.rarity-uncommon { --rarity: #46aa5f; --rarity-glow: rgba(70,170,95,0.35); }
.rarity-rare { --rarity: #4682dc; --rarity-glow: rgba(70,130,220,0.4); }
.rarity-epic { --rarity: #a050dc; --rarity-glow: rgba(160,80,220,0.5); }
.rarity-legendary { --rarity: #e6aa37; --rarity-glow: rgba(230,170,55,0.55); }

.rarity-badge.rarity-common,
.rarity-badge.rarity-uncommon,
.rarity-badge.rarity-rare,
.rarity-badge.rarity-epic,
.rarity-badge.rarity-legendary { color: var(--rarity); }

.deck-card.rarity-common,
.deck-card.rarity-uncommon,
.deck-card.rarity-rare,
.deck-card.rarity-epic,
.deck-card.rarity-legendary {
  border-color: color-mix(in srgb, var(--rarity) 65%, transparent);
  box-shadow: 0 0 0 1px var(--rarity-glow), 0 10px 28px rgba(0,0,0,0.35);
}
.deck-card.rarity-epic { animation: epicPulse 3.2s ease-in-out infinite; }
.deck-card.rarity-legendary { animation: legendaryPulse 2.4s ease-in-out infinite; }
@keyframes epicPulse {
  0%, 100% { box-shadow: 0 0 12px var(--rarity-glow); }
  50% { box-shadow: 0 0 28px var(--rarity-glow); }
}
@keyframes legendaryPulse {
  0%, 100% { box-shadow: 0 0 16px var(--rarity-glow), 0 0 2px var(--rarity); }
  50% { box-shadow: 0 0 36px var(--rarity-glow), 0 0 8px var(--gold); }
}

.deal-slot.rarity-uncommon .face { border-color: #46aa5f; }
.deal-slot.rarity-rare .face { border-color: #4682dc; box-shadow: 0 0 18px rgba(70,130,220,0.35); }
.deal-slot.rarity-epic .face {
  border-color: #a050dc;
  box-shadow: 0 0 26px rgba(160,80,220,0.45);
}
.deal-slot.rarity-legendary .face {
  border-color: #e6aa37;
  box-shadow: 0 0 34px rgba(230,170,55,0.55), 0 16px 30px rgba(0,0,0,0.45);
}
.deal-slot.rarity-epic.dealing .card-3d {
  animation-duration: 1s;
  animation-name: dealDropEpic;
}
.deal-slot.rarity-legendary.dealing .card-3d {
  animation-duration: 1.15s;
  animation-name: dealDropLegendary;
}
@keyframes dealDropEpic {
  0% { transform: translateY(-240px) rotate(-24deg) scale(0.8); opacity: 0; filter: drop-shadow(0 0 0 rgba(160,80,220,0)); }
  70% { opacity: 1; }
  100% { transform: translateY(0) rotate(0) scale(1); opacity: 1; filter: drop-shadow(0 0 16px rgba(160,80,220,0.55)); }
}
@keyframes dealDropLegendary {
  0% { transform: translateY(-280px) rotate(-32deg) scale(0.7); opacity: 0; filter: drop-shadow(0 0 0 rgba(230,170,55,0)); }
  60% { opacity: 1; }
  80% { transform: translateY(8px) rotate(4deg) scale(1.03); }
  100% { transform: translateY(0) rotate(0) scale(1); opacity: 1; filter: drop-shadow(0 0 22px rgba(230,170,55,0.7)); }
}
.reading-desc article.rarity-rare { border-left-color: #4682dc; }
.reading-desc article.rarity-uncommon { border-left-color: #46aa5f; }
.reading-desc article.rarity-epic { border-left-color: #a050dc; }
.reading-desc article.rarity-legendary { border-left-color: #e6aa37; }
.reading-desc article.rarity-common { border-left-color: #a0a0a5; }

/* ---- Suggest / roulette ---- */
.suggest-page .suggest-hero {
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: clamp(2rem, 6vw, 3.2rem);
  margin: 0 0 0.6rem;
  color: var(--text);
  text-shadow: 0 0 36px rgba(143, 29, 42, 0.4);
}
.suggest-gate {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 4rem auto;
  text-align: center;
  display: grid;
  gap: 1rem;
  justify-items: center;
  animation: riseIn 0.7s ease both;
}
.suggest-login {
  font-size: 1.05rem;
  padding: 0.85rem 1.6rem;
  animation: loginPulse 2.4s ease-in-out infinite;
}
@keyframes loginPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 98, 0.25); }
  50% { box-shadow: 0 0 28px 2px rgba(143, 29, 42, 0.45); }
}
.suggest-user {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.suggest-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  object-fit: cover;
}
.suggest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.suggest-card {
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(30,14,18,0.92), rgba(10,5,7,0.95));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), border-color 0.25s, box-shadow 0.35s;
  animation: cardIn 0.55s ease both;
}
.suggest-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 98, 0.55);
  box-shadow: 0 18px 40px rgba(0,0,0,0.4), 0 0 24px rgba(143,29,42,0.2);
}
.suggest-card.leaving {
  opacity: 0;
  transform: scale(0.92);
  transition: 0.28s ease;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.suggest-card-art {
  height: 150px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--line);
}
.suggest-card-body { padding: 0.85rem 0.95rem 1rem; display: grid; gap: 0.35rem; flex: 1; }
.suggest-card-body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--gold);
}
.suggest-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.suggest-cat {
  display: inline-block;
  width: fit-content;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border: 1px solid currentColor;
  color: var(--gold-dim);
}
.suggest-card.cat-game .suggest-cat,
.case-tile.cat-game { --cat: #4682dc; }
.suggest-card.cat-movie .suggest-cat,
.case-tile.cat-movie { --cat: #c2313f; }
.suggest-card.cat-series .suggest-cat,
.case-tile.cat-series { --cat: #a050dc; }
.suggest-card.cat-other .suggest-cat,
.case-tile.cat-other { --cat: var(--gold); }
.suggest-card.cat-game .suggest-cat,
.suggest-card.cat-movie .suggest-cat,
.suggest-card.cat-series .suggest-cat,
.suggest-card.cat-other .suggest-cat { color: var(--cat); }
.suggest-card-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 0.55rem;
  color: var(--muted);
  font-size: 0.8rem;
}
.suggest-card-meta img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}
.btn.sm { padding: 0.25rem 0.55rem; font-size: 0.75rem; margin-left: auto; }

.admin-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid var(--line);
}

/* Case roulette */
.case-stage {
  position: relative;
  height: 210px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 50%, rgba(143,29,42,0.22), transparent 55%),
    linear-gradient(180deg, rgba(18,8,10,0.95), rgba(6,3,4,0.98));
  overflow: hidden;
  margin-top: 0.8rem;
}
.case-stage.landed {
  animation: landFlash 0.7s ease;
}
@keyframes landFlash {
  0% { box-shadow: inset 0 0 0 0 rgba(212,175,98,0); }
  40% { box-shadow: inset 0 0 60px 4px rgba(212,175,98,0.35); }
  100% { box-shadow: inset 0 0 0 0 rgba(212,175,98,0); }
}
.case-pointer {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 5;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 22px solid var(--gold);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}
.case-pointer::after {
  content: "";
  position: absolute;
  top: 22px;
  left: -1px;
  width: 2px;
  height: 168px;
  background: linear-gradient(180deg, rgba(212,175,98,0.85), rgba(212,175,98,0.05));
}
.case-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 72px;
  z-index: 4;
  pointer-events: none;
}
.case-fade-l {
  left: 0;
  background: linear-gradient(90deg, rgba(6,3,4,0.95), transparent);
}
.case-fade-r {
  right: 0;
  background: linear-gradient(270deg, rgba(6,3,4,0.95), transparent);
}
.case-track-wrap {
  position: absolute;
  inset: 28px 0 18px;
  overflow: hidden;
}
.case-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  height: 100%;
  will-change: transform;
  padding-left: 0;
  width: max-content;
}
.case-tile {
  flex: 0 0 auto;
  width: 140px;
  min-width: 140px;
  height: 100%;
  box-sizing: border-box;
  border: 2px solid var(--cat, var(--gold));
  background: #14080a;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 16px rgba(212, 175, 98, 0.2);
}
.case-tile-img {
  flex: 1 1 auto;
  background-size: cover;
  background-position: center;
  background-color: #1a1012;
  min-height: 0;
  height: auto;
}
.case-tile-label {
  flex: 0 0 auto;
  padding: 0.35rem 0.4rem;
  font-size: 0.72rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(0,0,0,0.75);
  color: var(--text);
  border-top: 1px solid rgba(212, 175, 98, 0.35);
}
.spin-result {
  margin-top: 1.2rem;
  display: flex;
  gap: 1rem;
  align-items: stretch;
  border: 1px solid var(--line);
  padding: 1rem;
  background: linear-gradient(120deg, rgba(143,29,42,0.18), transparent 60%);
  opacity: 0;
  transform: translateY(12px);
  transition: 0.45s cubic-bezier(.2,.8,.2,1);
}
.spin-result.show {
  opacity: 1;
  transform: none;
}
.spin-result h2 {
  margin: 0.25rem 0 0.4rem;
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.35rem;
}
.spin-winner-art {
  width: 120px;
  min-height: 120px;
  flex: 0 0 120px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--gold-dim);
  box-shadow: 0 0 28px rgba(212,175,98,0.25);
}
@media (max-width: 640px) {
  .spin-result { flex-direction: column; }
  .spin-winner-art { width: 100%; min-height: 160px; }
  .case-stage { height: 190px; }
}

/* Admin: allowed role chips */
.role-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 2.2rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
}
.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.35rem 0.28rem 0.65rem;
  border: 1px solid rgba(212, 175, 98, 0.4);
  background: linear-gradient(135deg, rgba(143, 29, 42, 0.35), rgba(20, 10, 12, 0.85));
  color: var(--text);
  font-size: 0.85rem;
}
.role-chip-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-chip-remove {
  border: 0;
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  padding: 0 0.35rem;
  opacity: 0.85;
}
.role-chip-remove:hover {
  color: var(--blood-hot);
  opacity: 1;
}

