
:root {
  --font-display: "Cinzel", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #06080f;
  --panel: rgba(13, 20, 35, 0.82);
  --panel-2: rgba(16, 26, 45, 0.92);
  --panel-3: rgba(18, 31, 53, 0.96);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 210, 118, 0.24);
  --text: #edf3ff;
  --muted: #aab8d7;
  --gold: #f2c865;
  --gold-2: #d49b2f;
  --green: #78e8b4;
  --purple: #8e7bff;
  --red: #ff8686;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.46);
  --inner: inset 0 1px 0 rgba(255,255,255,0.06);
  --radius: 28px;
  --radius-md: 22px;
  --radius-sm: 18px;
  --transition: 180ms ease;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body {
  color: var(--text);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 12% 10%, rgba(237, 191, 76, 0.12), transparent 24%),
    radial-gradient(circle at 88% 10%, rgba(118, 140, 255, 0.11), transparent 24%),
    radial-gradient(circle at 56% 68%, rgba(147, 103, 255, 0.09), transparent 28%),
    linear-gradient(180deg, #04060d 0%, #070c15 45%, #05070d 100%);
  overflow-x: hidden;
  position: relative;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.36;
  z-index: 0;
  pointer-events: none;
  animation: drift 18s ease-in-out infinite alternate;
}
.orb-1 { width: 340px; height: 340px; left: -60px; top: -40px; background: rgba(242, 200, 101, 0.18); }
.orb-2 { width: 420px; height: 420px; right: -120px; top: 130px; background: rgba(123, 146, 255, 0.16); animation-delay: 2s; }
.orb-3 { width: 440px; height: 440px; left: 40%; bottom: -200px; background: rgba(140, 123, 255, 0.12); animation-delay: 4s; }

.grid-overlay {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(circle at center, black 36%, transparent 100%);
}

.particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.28;
  background:
    radial-gradient(circle at 10% 30%, rgba(255,255,255,0.8) 0 1px, transparent 2px),
    radial-gradient(circle at 30% 70%, rgba(255,255,255,0.7) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 38%, rgba(255,255,255,0.6) 0 1px, transparent 2px),
    radial-gradient(circle at 86% 62%, rgba(255,255,255,0.6) 0 1px, transparent 2px),
    radial-gradient(circle at 54% 18%, rgba(255,255,255,0.6) 0 1px, transparent 2px);
  animation: shimmer 10s linear infinite;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(20px, -14px, 0) scale(1.08); }
}
@keyframes shimmer {
  0% { transform: translateY(0); opacity: 0.22; }
  50% { transform: translateY(-4px); opacity: 0.32; }
  100% { transform: translateY(0); opacity: 0.22; }
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1360px;
  margin: 0 auto;
  padding: 26px 22px 64px;
}

.hero-panel,
.panel,
.premium-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)),
    var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow), var(--inner);
  backdrop-filter: blur(18px);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 24px;
  padding: 26px 28px;
  border-radius: 30px;
  overflow: hidden;
  position: relative;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 20%, rgba(242, 200, 101, 0.14), transparent 24%),
    radial-gradient(circle at 90% 20%, rgba(122, 140, 255, 0.12), transparent 24%);
}

.brand-lockup {
  display: flex;
  gap: 20px;
  align-items: center;
}

.brand-mark-wrap {
  flex: 0 0 auto;
  width: 210px;
  height: 150px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  padding: 12px;
  background:
    radial-gradient(circle at center, rgba(242, 200, 101, 0.16), transparent 68%),
    linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.025));
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.09),
    0 18px 46px rgba(0, 0, 0, 0.24);
}

.brand-mark {
  width: 182px;
  max-height: 124px;
  height: auto;
  display: block;
  object-fit: contain;
  filter:
    drop-shadow(0 10px 24px rgba(0, 0, 0, 0.30))
    drop-shadow(0 0 18px rgba(242, 200, 101, 0.10));
}

.eyebrow-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe6a4, #d79d30);
  box-shadow: 0 0 18px rgba(242, 200, 101, 0.55);
}
.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--gold);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-main h1 {
  margin: 8px 0 10px;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}
.hero-subtitle {
  margin: 0 0 18px;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 1.06rem;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
}
.hero-mini-grid {
  display: grid;
  gap: 10px;
}
.mini-stat {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
}
.mini-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}
.mini-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.status-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.status-led-wrap { width: 18px; height: 18px; display: grid; place-items: center; }
.status-led {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #667;
}
.status-led.good {
  background: var(--green);
  box-shadow:
    0 0 0 4px rgba(120, 232, 180, 0.12),
    0 0 18px rgba(120, 232, 180, 0.7);
}
.status-led.bad {
  background: var(--red);
  box-shadow:
    0 0 0 4px rgba(255, 134, 134, 0.12),
    0 0 18px rgba(255, 134, 134, 0.7);
}
.status-card strong { display: block; font-size: 1rem; }
.status-card small { color: var(--muted); }

.nav-pill,
.ghost-btn,
.primary-btn,
.slot,
.wager-btn,
.wallet-tile,
.metric-card,
.entry-card,
.raffle-card,
.help-card {
  transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.nav-pill {
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}
.nav-pill:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.18); }
.nav-pill.active {
  background: linear-gradient(180deg, rgba(245, 208, 110, 0.98), rgba(214, 154, 44, 0.98));
  color: #17130a;
  border-color: rgba(255, 224, 150, 0.42);
  box-shadow: 0 12px 28px rgba(214, 154, 44, 0.22);
}

.main-content { margin-top: 18px; }

.tab-view { display: none; animation: fadeIn 220ms ease; }
.tab-view.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.18fr 1fr;
  gap: 18px;
}
.full-span { grid-column: 1 / -1; }

.panel {
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), transparent 35%);
}
.panel-tall { min-height: 320px; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}
.section-head h2 {
  margin: 4px 0 0;
  font-size: 2rem;
  line-height: 1.03;
  letter-spacing: -0.03em;
}

.muted { color: var(--muted); line-height: 1.55; }
.small-space { margin-top: 12px; }
.hidden { display: none !important; }

label {
  display: block;
  margin: 18px 0 8px;
  font-size: 0.92rem;
  font-weight: 700;
}

.input-glow-wrap { position: relative; }
.input-glow-wrap::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(242, 200, 101, 0.34), rgba(142, 123, 255, 0.18), rgba(255,255,255,0.06));
  filter: blur(8px);
  opacity: 0.65;
}
input[type="password"],
input[type="number"] {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(6, 11, 22, 0.74);
  color: var(--text);
  padding: 15px 16px;
  font-size: 1rem;
  outline: none;
}
input[type="password"]:focus,
input[type="number"]:focus {
  border-color: rgba(242, 200, 101, 0.4);
  box-shadow: 0 0 0 3px rgba(242, 200, 101, 0.08);
}

.primary-btn, .ghost-btn {
  cursor: pointer;
  border-radius: 16px;
  font-weight: 800;
  font-size: 0.98rem;
  padding: 12px 18px;
}
.primary-btn {
  border: 1px solid rgba(255, 220, 130, 0.4);
  color: #181409;
  background: linear-gradient(180deg, rgba(247, 210, 112, 0.98), rgba(214, 154, 44, 0.98));
}
.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(214, 154, 44, 0.22);
}
.ghost-btn {
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
}
.ghost-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08);
}
.premium-btn { box-shadow: 0 12px 26px rgba(214, 154, 44, 0.18); }

.identity-card,
.funding-box,
.buy-box,
.magic-result-card,
.help-card,
.entry-card,
.raffle-card,
.metric-card,
.wallet-tile {
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.09);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  box-shadow: var(--inner);
}

.identity-card,
.funding-box,
.buy-box,
.magic-result-card,
.help-card,
.entry-card,
.raffle-card {
  padding: 18px;
}

.identity-top,
.entry-title-wrap,
.raffle-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.entry-title-wrap h3,
.raffle-topline h3 {
  margin: 0 0 4px;
}

.tiny-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255,255,255,0.1);
}
.verified-chip {
  background: rgba(120, 232, 180, 0.12);
  border-color: rgba(120, 232, 180, 0.24);
  color: #98ebc7;
}
.subtle-chip {
  background: rgba(255,255,255,0.04);
  color: #dbe3fb;
}

.wallet-grid,
.metric-grid,
.help-grid,
.magic-stat-grid {
  display: grid;
  gap: 14px;
}
.wallet-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.help-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.magic-stat-grid { grid-template-columns: 1fr; }

.wallet-tile,
.metric-card {
  padding: 16px 16px 18px;
}
.wallet-tile:hover,
.metric-card:hover,
.help-card:hover,
.entry-card:hover,
.raffle-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.16);
}
.wallet-tile strong,
.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.9rem, 3vw, 2.55rem);
  line-height: 1;
  letter-spacing: -0.04em;
}
.wallet-label,
.metric-card span { color: var(--muted); font-size: 0.95rem; }

.wallet-tile.gold { border-color: rgba(242, 200, 101, 0.2); }
.wallet-tile.silver { border-color: rgba(196, 217, 255, 0.17); }
.wallet-tile.copper { border-color: rgba(229, 171, 121, 0.18); }
.accent-purple {
  border-color: rgba(142, 123, 255, 0.24);
  background: linear-gradient(180deg, rgba(142, 123, 255, 0.1), rgba(255,255,255,0.02));
}

.entries-list,
.raffles-list { display: grid; gap: 14px; }
.raffles-list { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card-meta,
.entry-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill,
.hot-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.79rem;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.11);
  background: rgba(255,255,255,0.035);
  color: var(--text);
}
.hot-tag {
  color: #181107;
  background: linear-gradient(180deg, rgba(255, 219, 126, 0.98), rgba(216, 162, 57, 0.98));
  border-color: rgba(255, 225, 152, 0.44);
}

.progress-track {
  width: 100%;
  height: 10px;
  margin-top: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
}
.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(242, 200, 101, 0.95), rgba(120, 232, 180, 0.95));
  box-shadow: 0 0 18px rgba(242, 200, 101, 0.28);
}

.card-actions { margin-top: 16px; }
.raffle-footer-line { margin-top: 10px; }

.funding-box {
  display: flex;
  gap: 14px;
  align-items: center;
}
.funding-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #181107;
  font-size: 1.1rem;
  font-weight: 900;
  background: linear-gradient(180deg, rgba(247, 210, 112, 0.98), rgba(214, 154, 44, 0.98));
}

.detail-panel { margin-top: 18px; }

.join-panel {
  margin: 18px 0;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(242, 200, 101, 0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.02));
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}
.join-actions { display: flex; gap: 10px; align-items: center; }

.slot-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.slot {
  min-height: 90px;
  border-radius: 18px;
  padding: 12px 10px;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.11);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.slot strong { font-size: 1.08rem; }
.slot.open.selectable {
  cursor: pointer;
  border-color: rgba(120, 232, 180, 0.24);
  background: linear-gradient(180deg, rgba(120, 232, 180, 0.08), rgba(255,255,255,0.02));
}
.slot.open.selectable:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(120, 232, 180, 0.11);
}
.slot.taken,
.slot.held {
  opacity: 0.78;
  border-color: rgba(255, 134, 134, 0.18);
  background: linear-gradient(180deg, rgba(255, 134, 134, 0.07), rgba(255,255,255,0.02));
}
.slot.selected {
  border-color: rgba(255, 221, 146, 0.44);
  background: linear-gradient(180deg, rgba(242, 200, 101, 0.18), rgba(255,255,255,0.04));
  box-shadow: 0 0 0 1px rgba(242, 200, 101, 0.18), 0 12px 32px rgba(242, 200, 101, 0.12);
}

.magic-layout {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 18px;
}
.orb-stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: 26px 0 22px;
}
.orb-halo {
  position: absolute;
  width: 370px;
  height: 370px;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, rgba(142, 123, 255, 0.18), transparent 48%),
    radial-gradient(circle at center, rgba(255, 214, 120, 0.08), transparent 62%);
  filter: blur(16px);
  animation: pulseHalo 4s ease-in-out infinite;
}
@keyframes pulseHalo {
  0%, 100% { transform: scale(0.96); opacity: 0.85; }
  50% { transform: scale(1.04); opacity: 1; }
}
.magic-orb {
  width: min(360px, 74vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 28%, rgba(255,255,255,0.26), transparent 15%),
    radial-gradient(circle at 48% 46%, rgba(14, 25, 62, 0.5), transparent 34%),
    radial-gradient(circle at center, #06080f 0%, #04060c 62%, #000 100%);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    inset -40px -30px 80px rgba(0,0,0,0.5),
    inset 10px 10px 40px rgba(75,109,255,0.08),
    0 30px 80px rgba(0,0,0,0.45),
    0 0 50px rgba(142, 123, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  position: relative;
}
.magic-orb::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.05);
}
.magic-orb span {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #ebedf4 100%);
  color: #06070d;
  font-weight: 900;
  font-size: 3.9rem;
  line-height: 1;
  box-shadow: inset 0 -8px 20px rgba(0,0,0,0.1);
}
.magic-orb small {
  color: #d8dff7;
  font-size: 0.92rem;
  font-weight: 700;
}

.magic-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.wager-btn {
  padding: 14px 12px;
  border-radius: 16px;
  border: 1px solid rgba(142, 123, 255, 0.25);
  background: linear-gradient(180deg, rgba(82, 72, 162, 0.38), rgba(39, 34, 89, 0.34));
  color: #f3f5ff;
  font-weight: 800;
  cursor: pointer;
}
.wager-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(142, 123, 255, 0.18);
}
.wager-btn:disabled { opacity: 0.48; cursor: not-allowed; }

.buy-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}
.magic-result-card { margin-top: 16px; }
.magic-result-card.win {
  border-color: rgba(120, 232, 180, 0.26);
  background: linear-gradient(180deg, rgba(120, 232, 180, 0.12), rgba(255,255,255,0.02));
}
.magic-result-card.lose {
  border-color: rgba(255, 134, 134, 0.24);
  background: linear-gradient(180deg, rgba(255, 134, 134, 0.11), rgba(255,255,255,0.02));
}
.magic-result-card h3 {
  margin: 4px 0 8px;
  font-size: 2rem;
  line-height: 1;
}

.empty-state {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.02);
}

.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.98);
  width: min(460px, calc(100% - 32px));
  max-width: 460px;
  padding: 18px 22px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)),
    rgba(14, 22, 39, 0.96);
  color: var(--text);
  box-shadow: 0 30px 100px rgba(0,0,0,0.45);
  z-index: 9999;
  text-align: center;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.toast.showing {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 1120px) {
  .hero-panel,
  .dashboard-grid,
  .magic-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 860px) {
  .wallet-grid,
  .metric-grid,
  .help-grid,
  .magic-actions {
    grid-template-columns: 1fr 1fr;
  }
  .brand-lockup {
    align-items: flex-start;
  }
  .join-panel {
    flex-direction: column;
    align-items: stretch;
  }
  .join-actions {
    width: 100%;
  }
  .join-actions button {
    flex: 1;
  }
}
@media (max-width: 620px) {
  .app-shell { padding: 16px 12px 44px; }
  .hero-panel,
  .panel {
    border-radius: 22px;
    padding: 18px;
  }
  .wallet-grid,
  .metric-grid,
  .help-grid,
  .magic-actions {
    grid-template-columns: 1fr;
  }
  .buy-row {
    grid-template-columns: 1fr;
  }
  .hero-main h1 {
    font-size: clamp(2.2rem, 11vw, 3.6rem);
  }
  .brand-lockup {
    flex-direction: column;
  }
  .brand-mark-wrap {
    width: 92px;
    height: 92px;
  }
  .brand-mark {
    width: 76px;
  }
  .section-head h2 {
    font-size: 1.55rem;
  }
  .slot-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* V4 cleanup polish */
.hero-panel {
  align-items: center;
}

.brand-copy {
  min-width: 0;
}

.brand-lockup {
  align-items: center;
}

.hero-main {
  min-width: 0;
}

.hero-side {
  position: relative;
  z-index: 2;
}

.panel,
.hero-panel {
  isolation: isolate;
}

.entries-list {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.entry-card {
  min-height: 160px;
}

.raffle-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
}

.raffle-card .card-actions {
  margin-top: auto;
}

.card-meta,
.entry-meta,
.detail-meta {
  margin-top: 14px;
}

.funding-box p,
.buy-box p,
.help-card p {
  margin-bottom: 0;
}

.magic-panel-side {
  align-self: start;
}

.magic-stat-grid .metric-card:nth-child(n+2) {
  display: none !important;
}

.toast {
  backdrop-filter: blur(18px);
}

/* Better mobile logo behavior */
@media (max-width: 860px) {
  .brand-lockup {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-mark-wrap {
    width: 190px;
    height: 136px;
  }

  .brand-mark {
    width: 166px;
    max-height: 112px;
  }
}

@media (max-width: 620px) {
  .brand-mark-wrap {
    width: 160px;
    height: 116px;
  }

  .brand-mark {
    width: 140px;
    max-height: 96px;
  }

  .entries-list {
    grid-template-columns: 1fr;
  }

  .hero-mini-grid {
    grid-template-columns: 1fr;
  }
}

/* V5 casino/elegant typography system */
html,
body {
  font-family: var(--font-body);
}

body,
p,
span,
div,
li,
input,
button,
textarea,
select,
label,
small {
  font-family: var(--font-body);
}

h1,
h2,
h3,
.hero-main h1,
.brand-copy h1,
.section-head h2,
.raffle-topline h3,
.entry-title-wrap h3,
.magic-result-card h3,
.help-card strong,
.funding-box strong,
.buy-box strong {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.015em;
}

.hero-main h1,
.brand-copy h1 {
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.015em;
  text-shadow:
    0 2px 18px rgba(255, 255, 255, 0.06),
    0 16px 42px rgba(0, 0, 0, 0.35);
}

.section-head h2 {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.eyebrow,
.section-kicker {
  font-family: var(--font-display);
  letter-spacing: 0.18em;
  font-weight: 700;
}

.nav-pill,
.ghost-btn,
.primary-btn,
.wager-btn,
.pill,
.hot-tag,
.tiny-chip {
  font-family: var(--font-body);
  letter-spacing: 0.01em;
}

.hero-subtitle,
.muted,
.wallet-label,
.metric-card span,
.status-card small,
.tiny-warning {
  font-family: var(--font-body);
  letter-spacing: 0;
}

/* V5 refined casino polish */
.nav-pill.active,
.primary-btn {
  background:
    linear-gradient(180deg, rgba(255, 231, 154, 0.98), rgba(226, 165, 52, 0.98) 54%, rgba(184, 124, 28, 0.98));
  border-color: rgba(255, 232, 162, 0.54);
  box-shadow:
    0 14px 30px rgba(214, 154, 44, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.hero-panel {
  background:
    radial-gradient(circle at 18% 22%, rgba(242, 200, 101, 0.09), transparent 28%),
    radial-gradient(circle at 90% 15%, rgba(142, 123, 255, 0.09), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.018)),
    var(--panel);
}

.wallet-tile.gold,
.nav-pill.active,
.primary-btn,
.hot-tag {
  position: relative;
  overflow: hidden;
}

.wallet-tile.gold::after,
.nav-pill.active::after,
.primary-btn::after,
.hot-tag::after {
  content: "";
  position: absolute;
  top: -80%;
  left: -45%;
  width: 38%;
  height: 240%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: rotate(20deg);
  opacity: 0.5;
  pointer-events: none;
}

.wallet-tile.gold:hover::after,
.nav-pill.active:hover::after,
.primary-btn:hover::after,
.hot-tag:hover::after {
  animation: casinoShine 900ms ease forwards;
}

@keyframes casinoShine {
  from { left: -45%; }
  to { left: 120%; }
}

.raffle-card,
.entry-card,
.help-card,
.metric-card,
.wallet-tile,
.buy-box,
.funding-box,
.magic-result-card {
  border-color: rgba(255, 255, 255, 0.10);
}

.raffle-card:hover,
.entry-card:hover,
.help-card:hover {
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(242, 200, 101, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.magic-orb {
  box-shadow:
    inset -40px -30px 80px rgba(0,0,0,0.5),
    inset 10px 10px 40px rgba(75,109,255,0.08),
    0 30px 80px rgba(0,0,0,0.48),
    0 0 60px rgba(142, 123, 255, 0.16),
    0 0 34px rgba(242, 200, 101, 0.08);
}

.magic-orb span {
  font-family: var(--font-body);
  font-weight: 900;
}

/* logo sits on the hero, not inside a visible box */
.brand-mark-wrap {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  padding: 0;
}

.brand-mark {
  filter:
    drop-shadow(0 12px 28px rgba(0, 0, 0, 0.38))
    drop-shadow(0 0 18px rgba(242, 200, 101, 0.14));
}

/* V6 logo replacement: transparent emblem sits naturally on the hero */
.brand-mark-wrap {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  width: 190px !important;
  height: 150px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.brand-mark {
  width: 180px !important;
  max-height: 145px !important;
  object-fit: contain !important;
  filter:
    drop-shadow(0 14px 32px rgba(0, 0, 0, 0.44))
    drop-shadow(0 0 18px rgba(242, 200, 101, 0.16)) !important;
}

@media (max-width: 860px) {
  .brand-mark-wrap {
    width: 170px !important;
    height: 136px !important;
  }

  .brand-mark {
    width: 160px !important;
    max-height: 130px !important;
  }
}

@media (max-width: 620px) {
  .brand-mark-wrap {
    width: 145px !important;
    height: 116px !important;
  }

  .brand-mark {
    width: 136px !important;
    max-height: 110px !important;
  }
}


/* V7 clean hero update */
.hero-subtitle {
  display: none !important;
}

.brand-mark-wrap {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  width: 160px !important;
  height: 126px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.brand-mark {
  width: 150px !important;
  max-height: 118px !important;
  object-fit: contain !important;
  background: transparent !important;
  filter:
    drop-shadow(0 12px 28px rgba(0, 0, 0, 0.38))
    drop-shadow(0 0 18px rgba(242, 200, 101, 0.14)) !important;
}

.hero-main h1,
.brand-copy h1 {
  margin-bottom: 0 !important;
}

@media (max-width: 860px) {
  .brand-mark-wrap {
    width: 148px !important;
    height: 116px !important;
  }

  .brand-mark {
    width: 138px !important;
    max-height: 108px !important;
  }
}


/* Services request UI */
.services-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 0.85fr;
  gap: 18px;
}

.service-form {
  display: grid;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field-group {
  display: grid;
  gap: 8px;
}

select,
textarea,
input[type="text"] {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(6, 11, 22, 0.74);
  color: var(--text);
  padding: 14px 16px;
  font-size: 1rem;
  outline: none;
}

select:focus,
textarea:focus,
input[type="text"]:focus {
  border-color: rgba(242, 200, 101, 0.4);
  box-shadow: 0 0 0 3px rgba(242, 200, 101, 0.08);
}

textarea {
  resize: vertical;
  min-height: 150px;
}

.service-dynamic-card {
  padding: 16px 18px;
  border-radius: 20px;
}

.service-dynamic-card strong {
  font-family: var(--font-display);
}

.service-steps {
  display: grid;
  gap: 12px;
}

.service-step {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px;
}

.service-step > span {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #181107;
  font-weight: 900;
  background: linear-gradient(180deg, rgba(247, 210, 112, 0.98), rgba(214, 154, 44, 0.98));
}

.service-step strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.service-step p {
  margin: 4px 0 0;
}

.last-request-card {
  margin-top: 16px;
  padding: 18px;
}

.last-request-card h3 {
  margin: 6px 0 8px;
  font-family: var(--font-display);
}

@media (max-width: 980px) {
  .services-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}


/* Torn live monitor */
.torn-monitor-panel {
  position: relative;
}

.torn-monitor-body {
  display: grid;
  gap: 16px;
}

.monitor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.monitor-bar-card {
  padding: 16px;
  border-radius: 22px;
}

.monitor-bar-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.monitor-bar-top strong {
  font-family: var(--font-display);
}

.monitor-bar-top span {
  color: var(--muted);
  font-weight: 800;
  font-size: 0.92rem;
}

.monitor-progress-track {
  width: 100%;
  height: 10px;
  margin-top: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.07);
}

.monitor-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(242, 200, 101, 0.96), rgba(120, 232, 180, 0.96));
  box-shadow: 0 0 18px rgba(242, 200, 101, 0.22);
}

.monitor-bar-card.energy .monitor-progress-fill {
  background: linear-gradient(90deg, rgba(242, 200, 101, 0.96), rgba(255, 231, 154, 0.96));
}

.monitor-bar-card.nerve .monitor-progress-fill {
  background: linear-gradient(90deg, rgba(142, 123, 255, 0.96), rgba(177, 164, 255, 0.96));
}

.monitor-bar-card.happy .monitor-progress-fill {
  background: linear-gradient(90deg, rgba(255, 218, 94, 0.96), rgba(255, 173, 84, 0.96));
}

.monitor-bar-card.life .monitor-progress-fill {
  background: linear-gradient(90deg, rgba(255, 98, 98, 0.96), rgba(120, 232, 180, 0.96));
}

.monitor-side-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.monitor-status-card {
  padding: 18px;
  border-radius: 22px;
}

.monitor-status-card h3 {
  margin: 6px 0 8px;
  font-family: var(--font-display);
}

.cooldown-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.cooldown-card {
  padding: 16px;
  border-radius: 22px;
}

.cooldown-card span {
  color: var(--muted);
  font-weight: 800;
}

.cooldown-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.45rem;
  font-family: var(--font-display);
}

.cooldown-card.ready {
  border-color: rgba(120, 232, 180, 0.24);
}

.cooldown-card.waiting {
  border-color: rgba(242, 200, 101, 0.18);
}

@media (max-width: 1050px) {
  .monitor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cooldown-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .monitor-grid,
  .monitor-side-grid,
  .cooldown-grid {
    grid-template-columns: 1fr;
  }
}


/* Persistent Torn HUD */
.persistent-hud-shell {
  position: sticky;
  top: 12px;
  z-index: 30;
  margin: 14px 0 18px;
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 26px;
  padding: 16px 18px;
  background:
    radial-gradient(circle at 12% 20%, rgba(240, 199, 92, 0.13), transparent 26%),
    radial-gradient(circle at 88% 0%, rgba(120, 232, 180, 0.08), transparent 28%),
    rgba(14, 20, 34, 0.88);
  box-shadow: 0 24px 80px rgba(0,0,0,0.34);
  backdrop-filter: blur(18px);
}

.persistent-hud-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.persistent-hud-head h2 {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.8rem);
}

.compact-btn {
  padding: 10px 14px !important;
  border-radius: 14px !important;
}

.persistent-hud-body {
  display: grid;
  gap: 12px;
}

.hud-bars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.hud-stat {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  padding: 12px;
  background: rgba(255,255,255,0.045);
}

.hud-stat-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.hud-stat-top strong {
  font-family: var(--font-display);
  font-size: 1rem;
}

.hud-stat-top span {
  color: var(--muted);
  font-weight: 900;
  font-size: 0.82rem;
}

.hud-track {
  margin-top: 10px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.hud-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(242, 200, 101, 0.98), rgba(120, 232, 180, 0.95));
  box-shadow: 0 0 16px rgba(242, 200, 101, 0.2);
}

.hud-stat.energy .hud-fill {
  background: linear-gradient(90deg, rgba(242, 200, 101, 0.98), rgba(255, 231, 154, 0.98));
}

.hud-stat.nerve .hud-fill {
  background: linear-gradient(90deg, rgba(142, 123, 255, 0.98), rgba(188, 176, 255, 0.98));
}

.hud-stat.happy .hud-fill {
  background: linear-gradient(90deg, rgba(255, 213, 91, 0.98), rgba(255, 159, 84, 0.98));
}

.hud-stat.life .hud-fill {
  background: linear-gradient(90deg, rgba(255, 94, 94, 0.98), rgba(120, 232, 180, 0.95));
}

.hud-stat small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.75rem;
}

.hud-row {
  display: grid;
  grid-template-columns: 1.25fr 1.25fr repeat(3, minmax(120px, 0.65fr));
  gap: 10px;
}

.hud-chip {
  min-height: 58px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  padding: 11px 12px;
  background: rgba(255,255,255,0.045);
}

.hud-chip span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hud-chip strong {
  display: block;
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.05;
}

.hud-chip.ready {
  border-color: rgba(120, 232, 180, 0.26);
}

.hud-chip.waiting {
  border-color: rgba(242, 200, 101, 0.2);
}

.hud-updated {
  margin: 8px 0 0;
  text-align: right;
}

.compact-empty {
  padding: 10px 12px !important;
  border-radius: 16px !important;
}

@media (max-width: 1150px) {
  .persistent-hud-shell {
    position: relative;
    top: auto;
  }

  .hud-bars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hud-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .hud-bars,
  .hud-row {
    grid-template-columns: 1fr;
  }

  .persistent-hud-head {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* Live activity feed + Discord CTA */
.activity-shell {
  margin: 0 0 18px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 26px;
  padding: 16px 18px;
  background:
    radial-gradient(circle at 8% 20%, rgba(88, 101, 242, 0.14), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(242, 200, 101, 0.12), transparent 24%),
    rgba(12, 18, 31, 0.72);
  box-shadow: 0 22px 70px rgba(0,0,0,0.24);
  overflow: hidden;
}

.activity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.activity-head h2 {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.discord-join-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 148px;
  border-radius: 16px;
  padding: 12px 18px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 900;
  background: linear-gradient(180deg, rgba(88, 101, 242, 1), rgba(72, 83, 214, 1));
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 14px 34px rgba(88, 101, 242, 0.24), inset 0 1px 0 rgba(255,255,255,0.24);
}

.discord-join-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 44px rgba(88, 101, 242, 0.34), inset 0 1px 0 rgba(255,255,255,0.28);
}

.activity-marquee-wrap {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.activity-feed-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: activityScroll 42s linear infinite;
}

.activity-feed-track:hover {
  animation-play-state: paused;
}

.activity-pill {
  flex: 0 0 auto;
  width: 310px;
  min-height: 92px;
  border-radius: 20px;
  padding: 14px 15px;
  display: grid;
  grid-template-columns: 38px 1fr;
  column-gap: 12px;
  row-gap: 3px;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.045);
}

.activity-pill > span {
  grid-row: 1 / span 3;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255,255,255,0.075);
  font-size: 1.25rem;
}

.activity-pill strong {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.1;
}

.activity-pill small {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.2;
}

.activity-pill em {
  color: rgba(255,255,255,0.48);
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 800;
}

.activity-pill.win {
  border-color: rgba(242, 200, 101, 0.24);
  background: linear-gradient(180deg, rgba(242, 200, 101, 0.09), rgba(255,255,255,0.035));
}

.activity-pill.join {
  border-color: rgba(120, 232, 180, 0.20);
}

.activity-pill.service {
  border-color: rgba(88, 101, 242, 0.24);
}

.activity-pill.magic {
  border-color: rgba(142, 123, 255, 0.24);
}

.muted-pill {
  width: 360px;
}

@keyframes activityScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 720px) {
  .activity-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .discord-join-btn {
    width: 100%;
  }

  .activity-pill {
    width: 285px;
  }
}



/* Full Site V2: top HUD + right-side raffle activity chat + raffle art */
@media (min-width: 1180px) {
  .app-shell {
    width: min(100% - 420px, 1160px);
    margin-left: max(32px, calc((100vw - 1560px) / 2));
    margin-right: 380px;
  }

  .activity-rail {
    position: fixed !important;
    top: 24px;
    right: 24px;
    z-index: 60;
    width: 340px;
    max-height: calc(100vh - 48px);
    margin: 0 !important;
  }
}

.activity-rail {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 26px;
  padding: 16px;
  background:
    radial-gradient(circle at 18% 0%, rgba(242, 200, 101, 0.12), transparent 28%),
    radial-gradient(circle at 90% 12%, rgba(88, 101, 242, 0.14), transparent 30%),
    rgba(11, 17, 30, 0.92);
  box-shadow: 0 26px 80px rgba(0,0,0,0.42);
  backdrop-filter: blur(18px);
}

.activity-rail .activity-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.activity-rail .activity-head h2 {
  margin: 2px 0 0;
  font-size: 1.35rem;
}

.activity-rail .discord-join-btn {
  width: 100%;
}

.activity-chat-wrap {
  overflow-y: auto;
  max-height: calc(100vh - 190px);
  padding-right: 4px;
  mask-image: none !important;
  -webkit-mask-image: none !important;
}

.activity-chat-track {
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  width: 100% !important;
  animation: none !important;
  transform: none !important;
}

.activity-chat-track .activity-pill {
  width: 100%;
  min-height: auto;
  grid-template-columns: 34px 1fr;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.045);
}

.activity-chat-track .activity-pill > span {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.activity-chat-track .activity-pill strong {
  font-size: 0.94rem;
}

.activity-chat-track .activity-pill small {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
}

.activity-chat-track .activity-pill em {
  display: block;
  margin-top: 4px;
}

.activity-chat-track .activity-pill.join {
  border-left: 3px solid var(--gold);
}

.activity-chat-track .activity-pill.win {
  border-left: 3px solid var(--green);
  background: linear-gradient(180deg, rgba(120,232,180,0.10), rgba(255,255,255,0.04));
}

.persistent-hud-shell {
  position: sticky;
  top: 12px;
  z-index: 40;
}

.raffle-card-with-art {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  align-items: stretch;
}

.raffle-art-wrap {
  position: relative;
  min-height: 118px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, rgba(242, 200, 101, 0.15), transparent 45%),
    rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
}

.raffle-art {
  max-width: 92px;
  max-height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 16px 18px rgba(0,0,0,0.35));
  z-index: 2;
}

.raffle-art-fallback {
  display: none;
  width: 70px;
  height: 70px;
  border-radius: 22px;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gold);
  background: rgba(242, 200, 101, 0.10);
  border: 1px solid rgba(242, 200, 101, 0.24);
}

.raffle-art-wrap.image-failed .raffle-art-fallback {
  display: grid;
}

.raffle-card-body {
  min-width: 0;
}

@media (max-width: 720px) {
  .raffle-card-with-art {
    grid-template-columns: 1fr;
  }

  .raffle-art-wrap {
    min-height: 104px;
  }

  .activity-rail {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    width: auto !important;
    max-height: none !important;
  }

  .activity-chat-wrap {
    max-height: 360px;
  }
}


/* Layout V3: compact Torn HUD + 5-item right chat rail */
.persistent-hud-shell {
  position: sticky !important;
  top: 10px !important;
  z-index: 50 !important;
  padding: 14px 16px !important;
  border-radius: 24px !important;
  margin-bottom: 18px !important;
}

.persistent-hud-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
}

.persistent-hud-head h2 {
  font-size: clamp(1.1rem, 1.6vw, 1.45rem) !important;
  margin: 0 !important;
}

.hud-v3-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
}

.hud-bar-card,
.hud-mini-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 76px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.045);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.hud-card-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255,255,255,0.07);
  font-size: 1.05rem;
}

.hud-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.hud-card-top strong,
.hud-mini-card strong {
  color: var(--text);
  font-weight: 950;
}

.hud-card-top span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.hud-progress-track {
  height: 8px;
  margin: 8px 0 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.hud-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(242,200,101,0.98), rgba(120,232,180,0.96));
  box-shadow: 0 0 16px rgba(242,200,101,0.2);
}

.hud-bar-card.energy .hud-progress-fill {
  background: linear-gradient(90deg, #8ad45b, #f2c865);
}

.hud-bar-card.nerve .hud-progress-fill {
  background: linear-gradient(90deg, #ff884d, #f2c865);
}

.hud-bar-card.happy .hud-progress-fill {
  background: linear-gradient(90deg, #f2c865, #ffe78e);
}

.hud-bar-card.life .hud-progress-fill {
  background: linear-gradient(90deg, #6b7cff, #79e8b4);
}

.hud-bar-card small,
.hud-mini-card small {
  color: var(--muted);
  font-weight: 800;
  font-size: 0.72rem;
}

.hud-mini-card strong {
  display: block;
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  line-height: 1.05;
}

.hud-mini-card.ready {
  border-color: rgba(120,232,180,0.22);
}

.hud-mini-card.waiting {
  border-color: rgba(242,200,101,0.20);
}

.hud-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 12px;
  border-radius: 18px;
  border: 1px dashed rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
}

.hud-updated {
  margin-top: 8px !important;
  text-align: right;
  font-size: 0.78rem;
}

@media (min-width: 1180px) {
  .activity-rail {
    width: 360px !important;
  }

  .activity-chat-wrap {
    max-height: 560px !important;
    overflow: hidden !important;
  }
}

.activity-chat-track {
  min-height: 470px;
  justify-content: flex-start;
}

.activity-chat-track .activity-pill {
  opacity: 0;
  transform: translateY(8px);
  animation: chatItemIn 280ms ease forwards;
  animation-delay: var(--activity-delay, 0ms);
}

.activity-chat-track .activity-pill:nth-child(n + 6) {
  display: none !important;
}

.activity-chat-track .activity-pill strong {
  font-size: 0.98rem !important;
}

.activity-chat-track .activity-pill small {
  font-size: 0.82rem !important;
}

.activity-chat-track .activity-pill em {
  font-size: 0.72rem !important;
  color: rgba(255,255,255,0.48) !important;
}

@keyframes chatItemIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.activity-rail::after {
  content: "auto-cycling latest raffle activity";
  display: block;
  margin-top: 10px;
  color: rgba(255,255,255,0.42);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 1180px) {
  .hud-v3-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .activity-chat-track {
    min-height: auto;
  }
}

@media (max-width: 680px) {
  .hud-v3-grid {
    grid-template-columns: 1fr;
  }

  .persistent-hud-head {
    align-items: flex-start !important;
    flex-direction: column;
  }
}


/* Layout V4: true landscape Torn HUD + Chain Discord logo card */
.persistent-hud-shell {
  position: sticky !important;
  top: 10px !important;
  z-index: 70 !important;
  width: 100% !important;
  margin: 0 0 18px !important;
  padding: 12px 14px !important;
  border-radius: 22px !important;
  background:
    radial-gradient(circle at 8% 0%, rgba(242, 200, 101, 0.12), transparent 30%),
    linear-gradient(135deg, rgba(18, 24, 48, 0.94), rgba(8, 12, 28, 0.96)) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  box-shadow: 0 18px 54px rgba(0,0,0,0.34) !important;
}

.persistent-hud-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 10px !important;
}

.persistent-hud-head h2 {
  margin: 0 !important;
  font-size: clamp(1rem, 1.35vw, 1.35rem) !important;
  line-height: 1 !important;
}

.persistent-hud-head .section-kicker {
  margin: 0 0 5px !important;
}

.persistent-hud-head .ghost-btn,
.persistent-hud-head button {
  padding: 9px 12px !important;
  border-radius: 14px !important;
}

.top-hud-strip {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  align-items: stretch !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 2px 2px 8px !important;
  scrollbar-width: thin;
}

.top-hud-pill {
  flex: 0 0 auto;
  min-width: 176px;
  max-width: 230px;
  min-height: 64px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 10px 11px;
  border-radius: 17px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.055);
}

.top-hud-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(255,255,255,0.075);
  font-size: 1.05rem;
}

.top-hud-content {
  min-width: 0;
}

.top-hud-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.top-hud-line strong {
  color: var(--text);
  font-weight: 950;
  font-size: 0.84rem;
}

.top-hud-line span {
  color: rgba(238, 242, 255, 0.92);
  font-weight: 900;
  font-size: 0.78rem;
  white-space: nowrap;
}

.top-hud-track {
  height: 7px;
  margin: 7px 0 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.top-hud-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(242,200,101,1), rgba(120,232,180,0.95));
}

.top-hud-pill.energy .top-hud-fill {
  background: linear-gradient(90deg, #8ad45b, #f2c865);
}

.top-hud-pill.nerve .top-hud-fill {
  background: linear-gradient(90deg, #ff884d, #f2c865);
}

.top-hud-pill.happy .top-hud-fill {
  background: linear-gradient(90deg, #f2c865, #ffe78e);
}

.top-hud-pill.life .top-hud-fill {
  background: linear-gradient(90deg, #6b7cff, #79e8b4);
}

.top-hud-pill small {
  display: block;
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 800;
  white-space: nowrap;
}

.top-hud-pill.travel,
.top-hud-pill.status,
.top-hud-pill.ready,
.top-hud-pill.waiting {
  min-width: 156px;
}

.top-hud-pill.ready {
  border-color: rgba(120,232,180,0.25);
}

.top-hud-pill.waiting {
  border-color: rgba(242,200,101,0.24);
}

.top-hud-empty {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 16px;
  padding: 12px;
  color: var(--muted);
  background: rgba(255,255,255,0.035);
  border: 1px dashed rgba(255,255,255,0.12);
}

.hud-updated {
  margin: 6px 4px 0 !important;
  text-align: right !important;
  font-size: 0.74rem !important;
  color: rgba(255,255,255,0.48) !important;
}

/* Hide old stacked HUD cards if any old classes survived */
.hud-v3-grid,
.hud-bars,
.hud-row {
  display: none !important;
}

/* Discord logo card */
.discord-join-card {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  padding: 10px 12px !important;
  border-radius: 18px !important;
  text-decoration: none !important;
  color: #ffffff !important;
  background:
    radial-gradient(circle at 20% 20%, rgba(242,200,101,0.20), transparent 34%),
    linear-gradient(135deg, rgba(30,36,66,0.96), rgba(12,16,35,0.96)) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  box-shadow: 0 16px 34px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

.discord-join-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 44px rgba(0,0,0,0.36), inset 0 1px 0 rgba(255,255,255,0.12) !important;
}

.discord-join-card img {
  width: 58px !important;
  height: 58px !important;
  object-fit: contain !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,0.04) !important;
}

.discord-join-card span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.discord-join-card strong {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.05;
}

.discord-join-card small {
  color: rgba(230,235,255,0.72);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.15;
}

/* Better right chat rail sizing */
@media (min-width: 1180px) {
  .activity-rail {
    width: 360px !important;
    max-height: calc(100vh - 48px) !important;
  }

  .activity-chat-wrap {
    max-height: 520px !important;
  }

  .activity-chat-track {
    min-height: 430px !important;
  }
}

@media (max-width: 780px) {
  .top-hud-pill {
    min-width: 160px;
  }

  .persistent-hud-head {
    align-items: flex-start !important;
    flex-direction: column !important;
  }
}


/* Layout V5 FIXED PANELS: force true top landscape HUD and right chat rail */

/* Give main site room for the right fixed chat panel on desktop */
@media (min-width: 1200px) {
  body .app-shell {
    width: calc(100vw - 410px) !important;
    max-width: 1280px !important;
    margin-left: 32px !important;
    margin-right: 390px !important;
  }
}

/* Top HUD must live across top, not inside dashboard body */
body .persistent-hud-shell#persistentTornHud {
  display: block !important;
  position: sticky !important;
  top: 10px !important;
  z-index: 90 !important;
  width: 100% !important;
  max-width: none !important;
  margin: 14px 0 18px !important;
  padding: 12px 14px !important;
  border-radius: 22px !important;
  background:
    radial-gradient(circle at 8% 0%, rgba(242, 200, 101, 0.12), transparent 30%),
    linear-gradient(135deg, rgba(18, 24, 48, 0.96), rgba(8, 12, 28, 0.97)) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  box-shadow: 0 18px 54px rgba(0,0,0,0.38) !important;
  backdrop-filter: blur(14px) !important;
}

body .persistent-hud-shell#persistentTornHud .persistent-hud-head {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 10px !important;
}

body .persistent-hud-shell#persistentTornHud .persistent-hud-head h2 {
  margin: 0 !important;
  font-size: clamp(1rem, 1.4vw, 1.35rem) !important;
  line-height: 1 !important;
}

body .persistent-hud-shell#persistentTornHud .section-kicker {
  margin-bottom: 4px !important;
}

/* The real horizontal HUD strip */
body #tornMonitorBody.persistent-hud-body,
body #tornMonitorBody {
  display: block !important;
  width: 100% !important;
}

body #tornMonitorBody .top-hud-strip {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 10px !important;
  width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 2px 2px 8px !important;
  white-space: nowrap !important;
  scrollbar-width: thin !important;
}

/* Hide any old stacked HUD markup/classes if cached JS leaves them behind */
body #tornMonitorBody .hud-v3-grid,
body #tornMonitorBody .hud-bars,
body #tornMonitorBody .hud-row,
body #tornMonitorBody .hud-stat,
body #tornMonitorBody .hud-mini-card,
body #tornMonitorBody .hud-bar-card {
  display: none !important;
}

body #tornMonitorBody .top-hud-pill {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  gap: 9px !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  min-width: 176px !important;
  max-width: 235px !important;
  min-height: 64px !important;
  padding: 10px 11px !important;
  border-radius: 17px !important;
  background: rgba(255,255,255,0.055) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07) !important;
}

body #tornMonitorBody .top-hud-icon {
  width: 34px !important;
  height: 34px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 13px !important;
  background: rgba(255,255,255,0.08) !important;
  font-size: 1.05rem !important;
}

body #tornMonitorBody .top-hud-line {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

body #tornMonitorBody .top-hud-line strong {
  color: var(--text, #f6f7ff) !important;
  font-weight: 950 !important;
  font-size: 0.84rem !important;
}

body #tornMonitorBody .top-hud-line span {
  color: rgba(238, 242, 255, 0.94) !important;
  font-weight: 900 !important;
  font-size: 0.78rem !important;
  white-space: nowrap !important;
}

body #tornMonitorBody .top-hud-track {
  display: block !important;
  height: 7px !important;
  margin: 7px 0 5px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,0.09) !important;
  overflow: hidden !important;
}

body #tornMonitorBody .top-hud-fill {
  display: block !important;
  height: 100% !important;
  border-radius: inherit !important;
  background: linear-gradient(90deg, rgba(242,200,101,1), rgba(120,232,180,0.95)) !important;
}

body #tornMonitorBody .top-hud-pill.energy .top-hud-fill { background: linear-gradient(90deg, #8ad45b, #f2c865) !important; }
body #tornMonitorBody .top-hud-pill.nerve .top-hud-fill { background: linear-gradient(90deg, #ff884d, #f2c865) !important; }
body #tornMonitorBody .top-hud-pill.happy .top-hud-fill { background: linear-gradient(90deg, #f2c865, #ffe78e) !important; }
body #tornMonitorBody .top-hud-pill.life .top-hud-fill { background: linear-gradient(90deg, #6b7cff, #79e8b4) !important; }

body #tornMonitorBody .top-hud-pill small {
  display: block !important;
  color: var(--muted, #aeb8d6) !important;
  font-size: 0.69rem !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

body #tornMonitorBody .top-hud-pill.travel,
body #tornMonitorBody .top-hud-pill.status,
body #tornMonitorBody .top-hud-pill.ready,
body #tornMonitorBody .top-hud-pill.waiting {
  min-width: 156px !important;
}

/* Right-side panel: never in main body */
body .activity-shell#activityShell,
body .activity-shell.activity-rail#activityShell {
  display: block !important;
  position: fixed !important;
  top: 24px !important;
  right: 24px !important;
  bottom: 24px !important;
  width: 350px !important;
  height: auto !important;
  max-height: none !important;
  z-index: 100 !important;
  margin: 0 !important;
  padding: 16px !important;
  border-radius: 26px !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(242,200,101,0.14), transparent 30%),
    radial-gradient(circle at 90% 12%, rgba(88,101,242,0.15), transparent 32%),
    rgba(11,17,30,0.94) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  box-shadow: 0 26px 80px rgba(0,0,0,0.46) !important;
  backdrop-filter: blur(18px) !important;
  overflow: hidden !important;
}

body .activity-shell#activityShell .activity-head {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
  margin-bottom: 14px !important;
}

body .activity-shell#activityShell .activity-head h2 {
  margin: 2px 0 0 !important;
  font-size: 1.35rem !important;
}

body .activity-chat-wrap,
body .activity-marquee-wrap {
  display: block !important;
  overflow: hidden !important;
  max-height: calc(100vh - 235px) !important;
  mask-image: none !important;
  -webkit-mask-image: none !important;
}

body .activity-feed-track,
body .activity-chat-track {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  width: 100% !important;
  min-height: 430px !important;
  animation: none !important;
  transform: none !important;
}

body .activity-feed-track .activity-pill,
body .activity-chat-track .activity-pill {
  display: grid !important;
  grid-template-columns: 34px minmax(0,1fr) !important;
  gap: 10px !important;
  align-items: center !important;
  width: 100% !important;
  min-height: auto !important;
  padding: 12px !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,0.052) !important;
  border: 1px solid rgba(255,255,255,0.09) !important;
  opacity: 1 !important;
}

body .activity-feed-track .activity-pill:nth-child(n+6),
body .activity-chat-track .activity-pill:nth-child(n+6) {
  display: none !important;
}

body .activity-pill.join { border-left: 3px solid #f2c865 !important; }
body .activity-pill.win { border-left: 3px solid #79e8b4 !important; }

body .activity-pill > span {
  width: 34px !important;
  height: 34px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 12px !important;
  background: rgba(255,255,255,0.08) !important;
  font-size: 1rem !important;
}

body .activity-pill strong {
  color: var(--text, #f6f7ff) !important;
  font-size: 0.95rem !important;
  line-height: 1.15 !important;
}

body .activity-pill small {
  display: block !important;
  color: var(--muted, #aeb8d6) !important;
  font-size: 0.8rem !important;
  margin-top: 2px !important;
}

body .activity-pill em {
  display: block !important;
  color: rgba(255,255,255,0.48) !important;
  font-style: normal !important;
  font-size: 0.72rem !important;
  margin-top: 4px !important;
}

/* Correct logo card */
body .discord-join-card {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  padding: 10px 12px !important;
  border-radius: 18px !important;
  text-decoration: none !important;
  color: #fff !important;
  background:
    radial-gradient(circle at 20% 20%, rgba(242,200,101,0.20), transparent 34%),
    linear-gradient(135deg, rgba(30,36,66,0.96), rgba(12,16,35,0.96)) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  box-shadow: 0 16px 34px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

body .discord-join-card img {
  width: 62px !important;
  height: 62px !important;
  object-fit: contain !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,0.04) !important;
}

body .discord-join-card strong {
  display: block !important;
  color: #fff !important;
  font-size: 1rem !important;
  font-weight: 950 !important;
}

body .discord-join-card small {
  display: block !important;
  color: rgba(230,235,255,0.72) !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
}

@media (max-width: 1199px) {
  body .app-shell {
    width: min(100% - 28px, 980px) !important;
    margin: 14px auto !important;
  }

  body .activity-shell#activityShell {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    margin: 18px 0 !important;
  }

  body .activity-chat-wrap,
  body .activity-marquee-wrap {
    max-height: 420px !important;
  }
}


/* Layout V6 Premium Cleanup: centered dashboard, sticky chat column, clean HUD/nav */

/* General page composition */
html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 22% 10%, rgba(242, 200, 101, 0.08), transparent 26%),
    radial-gradient(circle at 76% 8%, rgba(88, 101, 242, 0.11), transparent 32%),
    linear-gradient(135deg, #070b14 0%, #0a0f1d 48%, #0a0a14 100%) !important;
}

/* Desktop: centered two-column layout, not a floating fixed chat overlay */
@media (min-width: 1200px) {
  body .app-shell {
    display: grid !important;
    grid-template-columns: minmax(0, 1120px) 340px !important;
    grid-template-areas:
      "hero chat"
      "hud chat"
      "main chat" !important;
    gap: 18px 24px !important;
    width: min(100vw - 64px, 1510px) !important;
    max-width: 1510px !important;
    margin: 22px auto 44px !important;
    align-items: start !important;
  }

  body .hero,
  body header.hero,
  body .site-hero,
  body .hero-card {
    grid-area: hero !important;
  }

  body .persistent-hud-shell#persistentTornHud {
    grid-area: hud !important;
  }

  body main,
  body .main-content {
    grid-area: main !important;
  }

  body .activity-shell#activityShell {
    grid-area: chat !important;
  }
}

/* Hero / header polish */
body .hero,
body header.hero,
body .site-hero,
body .hero-card {
  width: 100% !important;
  margin: 0 !important;
  border-radius: 28px !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  background:
    radial-gradient(circle at 8% 14%, rgba(242, 200, 101, 0.11), transparent 32%),
    radial-gradient(circle at 84% 10%, rgba(88, 101, 242, 0.13), transparent 34%),
    linear-gradient(135deg, rgba(24, 29, 49, 0.96), rgba(13, 18, 32, 0.98)) !important;
  box-shadow: 0 28px 80px rgba(0,0,0,0.34) !important;
}

/* Navigation: make button row stay handy without pinning the huge hero */
body .hero nav,
body header.hero nav,
body .hero-actions,
body .tabs,
body .tab-buttons,
body .nav-buttons {
  position: sticky !important;
  top: 12px !important;
  z-index: 95 !important;
  width: fit-content !important;
  max-width: 100% !important;
  padding: 6px !important;
  border-radius: 999px !important;
  background: rgba(9, 13, 25, 0.58) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  backdrop-filter: blur(12px) !important;
}

/* Top HUD: cleaner, centered, no ugly scrollbar */
body .persistent-hud-shell#persistentTornHud {
  position: sticky !important;
  top: 74px !important;
  z-index: 88 !important;
  margin: 0 !important;
  padding: 14px 16px 12px !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at 4% 0%, rgba(242, 200, 101, 0.12), transparent 30%),
    linear-gradient(135deg, rgba(18, 24, 48, 0.96), rgba(8, 12, 28, 0.98)) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  box-shadow: 0 22px 70px rgba(0,0,0,0.38) !important;
  backdrop-filter: blur(16px) !important;
}

body .persistent-hud-shell#persistentTornHud .persistent-hud-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
}

body .persistent-hud-shell#persistentTornHud .persistent-hud-head h2 {
  font-size: clamp(1rem, 1.35vw, 1.28rem) !important;
  letter-spacing: -0.015em !important;
}

/* Horizontal HUD strip: hidden scrollbar, better spacing */
body #tornMonitorBody .top-hud-strip {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 2px 2px 6px !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

body #tornMonitorBody .top-hud-strip::-webkit-scrollbar {
  display: none !important;
}

body #tornMonitorBody .top-hud-pill {
  min-width: 162px !important;
  max-width: 210px !important;
  min-height: 62px !important;
  border-radius: 18px !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.065), rgba(255,255,255,0.035)) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
}

body #tornMonitorBody .top-hud-pill:hover {
  transform: translateY(-1px);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.085), rgba(255,255,255,0.045)) !important;
}

/* Main content polish */
body main,
body .main-content {
  width: 100% !important;
  margin: 0 !important;
}

body .premium-card,
body .panel,
body section:not(.activity-shell):not(.persistent-hud-shell) {
  border-color: rgba(255,255,255,0.11) !important;
}

/* Raffle board/cards: better balance */
body .raffles-grid,
body #rafflesList,
body .raffle-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr)) !important;
  gap: 16px !important;
}

body .raffle-card,
body .raffle-card-with-art {
  min-height: 260px !important;
  border-radius: 24px !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(242, 200, 101, 0.07), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.065), rgba(255,255,255,0.035)) !important;
  border: 1px solid rgba(255,255,255,0.11) !important;
}

body .raffle-art-wrap {
  min-height: 132px !important;
  border-radius: 20px !important;
  background:
    radial-gradient(circle at 50% 30%, rgba(242, 200, 101, 0.17), transparent 46%),
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.035)) !important;
}

body .raffle-art-wrap::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.055);
  pointer-events: none;
}

body .raffle-art {
  max-width: 104px !important;
  max-height: 104px !important;
}

body .raffle-art-fallback {
  display: grid !important;
  opacity: 0.92 !important;
}

/* If external item images failed, make the placeholder intentional, not blank */
body .raffle-art-wrap.image-failed,
body .raffle-art-wrap:not(:has(img)) {
  background:
    radial-gradient(circle at 50% 28%, rgba(242, 200, 101, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.032)) !important;
}

/* Right activity rail: sticky column inside layout, not awkward fixed overlay */
body .activity-shell#activityShell,
body .activity-shell.activity-rail#activityShell {
  position: sticky !important;
  top: 22px !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  height: calc(100vh - 44px) !important;
  max-height: calc(100vh - 44px) !important;
  margin: 0 !important;
  padding: 16px !important;
  border-radius: 28px !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(242,200,101,0.14), transparent 30%),
    radial-gradient(circle at 90% 12%, rgba(88,101,242,0.15), transparent 32%),
    linear-gradient(180deg, rgba(12,18,32,0.96), rgba(7,11,21,0.98)) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  box-shadow: 0 26px 80px rgba(0,0,0,0.38) !important;
  backdrop-filter: blur(18px) !important;
}

body .activity-shell#activityShell .activity-head {
  display: grid !important;
  gap: 12px !important;
  margin-bottom: 14px !important;
}

body .activity-shell#activityShell .activity-head h2 {
  font-size: 1.32rem !important;
  margin: 2px 0 0 !important;
}

body .discord-join-card {
  min-height: 78px !important;
  border-radius: 20px !important;
}

body .discord-join-card img {
  width: 58px !important;
  height: 58px !important;
  padding: 2px !important;
  background: rgba(255,255,255,0.05) !important;
}

body .activity-chat-wrap,
body .activity-marquee-wrap {
  max-height: calc(100vh - 230px) !important;
  overflow: hidden !important;
}

body .activity-chat-track,
body .activity-feed-track {
  min-height: auto !important;
  gap: 10px !important;
}

body .activity-pill {
  border-radius: 18px !important;
  padding: 13px !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.04)) !important;
}

body .activity-pill:hover {
  transform: translateX(-2px);
  border-color: rgba(242,200,101,0.34) !important;
}

body .activity-rail::after {
  content: "cycling latest raffle activity";
  display: block;
  margin-top: 12px;
  color: rgba(255,255,255,0.44);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

/* Medium/small screens: stack naturally */
@media (max-width: 1199px) {
  body .app-shell {
    display: block !important;
    width: min(100% - 28px, 980px) !important;
    margin: 14px auto 44px !important;
  }

  body .persistent-hud-shell#persistentTornHud {
    top: 8px !important;
  }

  body .activity-shell#activityShell {
    position: relative !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    margin: 18px 0 !important;
  }

  body .activity-chat-wrap,
  body .activity-marquee-wrap {
    max-height: 420px !important;
  }
}

@media (max-width: 680px) {
  body .persistent-hud-shell#persistentTornHud .persistent-hud-head {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  body #tornMonitorBody .top-hud-pill {
    min-width: 156px !important;
  }
}


/* Mobile V7 Optimization: phone-first readability and scale fixes */

/* Tablet and below */
@media (max-width: 900px) {
  html {
    font-size: 15px;
  }

  body {
    overflow-x: hidden !important;
  }

  body .app-shell {
    width: min(100% - 20px, 760px) !important;
    margin: 10px auto 28px !important;
    display: block !important;
  }

  body .hero,
  body header.hero,
  body .site-hero,
  body .hero-card {
    border-radius: 22px !important;
    padding: 18px !important;
    min-height: auto !important;
  }

  body .hero img,
  body header.hero img,
  body .site-hero img,
  body .hero-card img {
    max-width: 92px !important;
    max-height: 92px !important;
  }

  body .hero h1,
  body header.hero h1,
  body .site-hero h1,
  body .hero-card h1 {
    font-size: clamp(2rem, 10vw, 3.1rem) !important;
    line-height: 0.95 !important;
    letter-spacing: -0.04em !important;
  }

  body .hero nav,
  body header.hero nav,
  body .hero-actions,
  body .tabs,
  body .tab-buttons,
  body .nav-buttons {
    position: sticky !important;
    top: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    justify-content: flex-start !important;
    gap: 7px !important;
    padding: 6px !important;
    border-radius: 16px !important;
    scrollbar-width: none !important;
  }

  body .hero nav::-webkit-scrollbar,
  body .hero-actions::-webkit-scrollbar,
  body .tabs::-webkit-scrollbar,
  body .tab-buttons::-webkit-scrollbar,
  body .nav-buttons::-webkit-scrollbar {
    display: none !important;
  }

  body button,
  body .ghost-btn,
  body .tab-btn,
  body .hero button,
  body .hero a {
    min-height: 38px !important;
    padding: 9px 12px !important;
    font-size: 0.86rem !important;
    border-radius: 14px !important;
  }

  /* HUD compact on mobile */
  body .persistent-hud-shell#persistentTornHud {
    top: 6px !important;
    border-radius: 20px !important;
    padding: 12px !important;
    margin: 12px 0 !important;
  }

  body .persistent-hud-shell#persistentTornHud .persistent-hud-head {
    gap: 8px !important;
    margin-bottom: 8px !important;
  }

  body .persistent-hud-shell#persistentTornHud .persistent-hud-head h2 {
    font-size: 1.02rem !important;
  }

  body .persistent-hud-shell#persistentTornHud .section-kicker {
    font-size: 0.67rem !important;
    letter-spacing: 0.14em !important;
  }

  body #tornMonitorBody .top-hud-strip {
    gap: 8px !important;
    padding-bottom: 4px !important;
  }

  body #tornMonitorBody .top-hud-pill {
    min-width: 142px !important;
    max-width: 160px !important;
    min-height: 54px !important;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    gap: 7px !important;
    padding: 8px !important;
    border-radius: 15px !important;
  }

  body #tornMonitorBody .top-hud-icon {
    width: 28px !important;
    height: 28px !important;
    border-radius: 11px !important;
    font-size: 0.9rem !important;
  }

  body #tornMonitorBody .top-hud-line strong {
    font-size: 0.74rem !important;
  }

  body #tornMonitorBody .top-hud-line span {
    font-size: 0.69rem !important;
  }

  body #tornMonitorBody .top-hud-track {
    height: 6px !important;
    margin: 5px 0 3px !important;
  }

  body #tornMonitorBody .top-hud-pill small {
    font-size: 0.62rem !important;
  }

  body .hud-updated {
    font-size: 0.66rem !important;
    margin-top: 5px !important;
  }

  /* Main panels */
  body .premium-card,
  body .panel,
  body section:not(.activity-shell):not(.persistent-hud-shell),
  body .card {
    border-radius: 20px !important;
    padding: 14px !important;
  }

  body h2 {
    font-size: clamp(1.25rem, 6vw, 1.75rem) !important;
  }

  body h3 {
    font-size: 1rem !important;
  }

  body p,
  body .muted,
  body small {
    font-size: 0.84rem !important;
  }

  /* Wallet/stat cards */
  body .stat-grid,
  body .metrics-grid,
  body .wallet-grid,
  body .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  /* Raffles */
  body .raffles-grid,
  body #rafflesList,
  body .raffle-list {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  body .raffle-card,
  body .raffle-card-with-art {
    display: grid !important;
    grid-template-columns: 92px minmax(0, 1fr) !important;
    gap: 12px !important;
    min-height: auto !important;
    padding: 12px !important;
    border-radius: 20px !important;
  }

  body .raffle-art-wrap {
    min-height: 98px !important;
    border-radius: 16px !important;
  }

  body .raffle-art {
    max-width: 76px !important;
    max-height: 76px !important;
  }

  body .raffle-art-fallback {
    width: 56px !important;
    height: 56px !important;
    border-radius: 18px !important;
    font-size: 1.15rem !important;
  }

  body .raffle-card h3 {
    font-size: 1rem !important;
    line-height: 1.08 !important;
  }

  body .card-meta {
    gap: 6px !important;
  }

  body .pill,
  body .tiny-chip,
  body .hot-tag {
    font-size: 0.67rem !important;
    padding: 5px 7px !important;
  }

  body .progress-track {
    height: 8px !important;
    margin: 8px 0 !important;
  }

  /* Right rail becomes compact section */
  body .activity-shell#activityShell {
    position: relative !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    margin: 14px 0 0 !important;
    padding: 14px !important;
    border-radius: 22px !important;
  }

  body .activity-shell#activityShell .activity-head {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
  }

  body .activity-shell#activityShell .activity-head h2 {
    font-size: 1.15rem !important;
  }

  body .discord-join-card {
    min-height: 62px !important;
    padding: 9px 10px !important;
    border-radius: 16px !important;
  }

  body .discord-join-card img {
    width: 46px !important;
    height: 46px !important;
  }

  body .discord-join-card strong {
    font-size: 0.9rem !important;
  }

  body .discord-join-card small {
    font-size: 0.68rem !important;
  }

  body .activity-chat-wrap,
  body .activity-marquee-wrap {
    max-height: 292px !important;
  }

  body .activity-chat-track,
  body .activity-feed-track {
    min-height: auto !important;
    gap: 8px !important;
  }

  body .activity-feed-track .activity-pill,
  body .activity-chat-track .activity-pill {
    grid-template-columns: 28px minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 10px !important;
    border-radius: 14px !important;
  }

  body .activity-pill > span {
    width: 28px !important;
    height: 28px !important;
    border-radius: 10px !important;
    font-size: 0.85rem !important;
  }

  body .activity-pill strong {
    font-size: 0.83rem !important;
  }

  body .activity-pill small {
    font-size: 0.72rem !important;
  }

  body .activity-pill em {
    font-size: 0.64rem !important;
  }

  body .activity-feed-track .activity-pill:nth-child(n+4),
  body .activity-chat-track .activity-pill:nth-child(n+4) {
    display: none !important;
  }
}

/* Small phones */
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  body .app-shell {
    width: calc(100% - 14px) !important;
    margin: 7px auto 22px !important;
  }

  body .hero,
  body header.hero,
  body .site-hero,
  body .hero-card {
    padding: 14px !important;
    border-radius: 18px !important;
  }

  body .hero img,
  body header.hero img,
  body .site-hero img,
  body .hero-card img {
    max-width: 72px !important;
    max-height: 72px !important;
  }

  body .hero h1,
  body header.hero h1,
  body .site-hero h1,
  body .hero-card h1 {
    font-size: clamp(1.65rem, 11vw, 2.45rem) !important;
  }

  body .hero nav,
  body header.hero nav,
  body .hero-actions,
  body .tabs,
  body .tab-buttons,
  body .nav-buttons {
    gap: 5px !important;
    padding: 5px !important;
  }

  body button,
  body .ghost-btn,
  body .tab-btn,
  body .hero button,
  body .hero a {
    min-height: 34px !important;
    padding: 7px 10px !important;
    font-size: 0.78rem !important;
  }

  body .persistent-hud-shell#persistentTornHud {
    padding: 10px !important;
    border-radius: 18px !important;
  }

  body #tornMonitorBody .top-hud-pill {
    min-width: 128px !important;
    max-width: 142px !important;
    min-height: 50px !important;
    grid-template-columns: 24px minmax(0, 1fr) !important;
    gap: 6px !important;
    padding: 7px !important;
  }

  body #tornMonitorBody .top-hud-icon {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.78rem !important;
  }

  body #tornMonitorBody .top-hud-line {
    gap: 4px !important;
  }

  body #tornMonitorBody .top-hud-line strong {
    font-size: 0.68rem !important;
  }

  body #tornMonitorBody .top-hud-line span {
    font-size: 0.62rem !important;
  }

  body #tornMonitorBody .top-hud-pill small {
    font-size: 0.57rem !important;
  }

  body .stat-grid,
  body .metrics-grid,
  body .wallet-grid,
  body .overview-grid {
    grid-template-columns: 1fr !important;
  }

  body .raffle-card,
  body .raffle-card-with-art {
    grid-template-columns: 78px minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 10px !important;
  }

  body .raffle-art-wrap {
    min-height: 86px !important;
  }

  body .raffle-art {
    max-width: 62px !important;
    max-height: 62px !important;
  }

  body .raffle-card h3 {
    font-size: 0.92rem !important;
  }

  body .pill,
  body .tiny-chip,
  body .hot-tag {
    font-size: 0.61rem !important;
    padding: 4px 6px !important;
  }

  body .activity-shell#activityShell {
    padding: 12px !important;
  }
}

/* Extra narrow phones */
@media (max-width: 380px) {
  body .hero h1,
  body header.hero h1,
  body .site-hero h1,
  body .hero-card h1 {
    font-size: 1.55rem !important;
  }

  body #tornMonitorBody .top-hud-pill {
    min-width: 118px !important;
  }

  body .raffle-card,
  body .raffle-card-with-art {
    grid-template-columns: 1fr !important;
  }

  body .raffle-art-wrap {
    min-height: 76px !important;
  }
}

/* =====================================================
   CLEAN RAFFLE CARDS
   Removes acronym badges like BO/FH/XV/XS and tightens layout
   ===================================================== */

/* Hide generated acronym/initial badges inside raffle item art */
.raffle-card .item-initials,
.raffle-card .raffle-initials,
.raffle-card .item-code,
.raffle-card .acronym,
.raffle-card .initials,
.raffle-card [class*="initial"],
.raffle-card [class*="acronym"],
.raffle-card [class*="code-badge"] {
  display: none !important;
}

/* Cleaner raffle cards */
.raffle-card,
.raffle-item-card,
.raffle-tile {
  min-height: 300px !important;
  display: grid !important;
  grid-template-columns: 130px minmax(0, 1fr) !important;
  gap: 20px !important;
  align-items: stretch !important;
  padding: 20px !important;
  overflow: hidden !important;
}

/* Image/art area */
.raffle-card .item-art,
.raffle-card .raffle-art,
.raffle-card .prize-art,
.raffle-card .item-image-wrap,
.raffle-card .image-wrap,
.raffle-card [class*="art"],
.raffle-card [class*="image"] {
  min-width: 120px !important;
  max-width: 130px !important;
  min-height: 220px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}

/* Actual item image */
.raffle-card img {
  max-width: 88px !important;
  max-height: 88px !important;
  object-fit: contain !important;
  display: block !important;
}

/* Text side */
.raffle-card .raffle-info,
.raffle-card .item-info,
.raffle-card .card-info,
.raffle-card .content,
.raffle-card [class*="info"] {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}

/* Prize title */
.raffle-card h3,
.raffle-card h4,
.raffle-card .raffle-title,
.raffle-card .item-title,
.raffle-card .prize-title {
  margin: 0 0 12px 0 !important;
  line-height: 1.12 !important;
  font-size: 20px !important;
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
}

/* Status pill should not float over text */
.raffle-card .live-badge,
.raffle-card .status-badge,
.raffle-card .badge,
.raffle-card [class*="live"] {
  align-self: flex-start !important;
  position: static !important;
  margin-bottom: 8px !important;
}

/* Almost full pill should stop sitting in the middle of the title */
.raffle-card .almost-full,
.raffle-card .almostFull,
.raffle-card [class*="almost"] {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  z-index: 3 !important;
}

/* Progress and buttons */
.raffle-card button,
.raffle-card .btn {
  width: auto !important;
  min-width: 130px !important;
  white-space: normal !important;
}

/* Mobile / skinny cards */
@media (max-width: 760px) {
  .raffle-card,
  .raffle-item-card,
  .raffle-tile {
    grid-template-columns: 105px minmax(0, 1fr) !important;
    gap: 14px !important;
    padding: 16px !important;
  }

  .raffle-card .item-art,
  .raffle-card .raffle-art,
  .raffle-card .prize-art,
  .raffle-card .item-image-wrap,
  .raffle-card .image-wrap,
  .raffle-card [class*="art"],
  .raffle-card [class*="image"] {
    min-width: 96px !important;
    max-width: 105px !important;
    min-height: 180px !important;
  }

  .raffle-card h3,
  .raffle-card h4,
  .raffle-card .raffle-title,
  .raffle-card .item-title,
  .raffle-card .prize-title {
    font-size: 18px !important;
  }
}


/* =====================================================
   RAFFLE CARD POLISH - no acronym blocks, cleaner layout
   ===================================================== */

.raffle-art-fallback {
  display: none !important;
}

/* Keep cards consistent and readable */
.raffle-card {
  position: relative;
  overflow: hidden;
}

/* Main card body should stay side-by-side on desktop */
.raffle-card-body {
  display: grid !important;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

/* Art frame: image only, no fake letters */
.raffle-art,
.raffle-card-art,
.raffle-item-art {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 220px;
  overflow: hidden;
}

/* Item images should look premium and not oversized */
.raffle-art img,
.raffle-card-art img,
.raffle-item-art img,
.raffle-card img {
  max-width: 92px;
  max-height: 92px;
  object-fit: contain;
}

/* Text column cleanup */
.raffle-card h3,
.raffle-card .raffle-title {
  margin-top: 0;
  margin-bottom: 12px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

/* Stop badges from crushing the title */
.raffle-card .raffle-status,
.raffle-card .live-badge {
  position: static !important;
  align-self: flex-start;
  width: fit-content;
}

/* Almost full badge should sit top right, not mid-card */
.raffle-card .almost-full,
.raffle-card [class*="almost"] {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  z-index: 3 !important;
}

/* Cleaner button sizing */
.raffle-card button,
.raffle-card .btn {
  min-width: 128px;
  width: fit-content;
  max-width: 100%;
  white-space: normal;
}

/* Mobile: stack neatly */
@media (max-width: 700px) {
  .raffle-card-body {
    grid-template-columns: 105px minmax(0, 1fr);
    gap: 14px;
  }

  .raffle-art,
  .raffle-card-art,
  .raffle-item-art {
    min-height: 180px;
  }

  .raffle-art img,
  .raffle-card-art img,
  .raffle-item-art img,
  .raffle-card img {
    max-width: 78px;
    max-height: 78px;
  }
}

/* =====================================================
   SAFE UI FIX: Timers normal flow, raffle cards below
   No sticky/frozen overlay behavior
   ===================================================== */

/* Timer/HUD stays in normal page flow */
.torn-monitor,
.torn-monitor-card,
.torn-monitor-section,
.live-torn-hud,
.timer-section,
.timers-section,
.cooldowns-section,
#tornMonitor,
#timers,
#cooldowns {
  position: relative !important;
  top: auto !important;
  z-index: 5 !important;
  overflow: visible !important;
}

/* Raffle board stays below timer section */
.raffles-section,
.open-raffles-section,
.raffles-panel,
.open-raffles,
.live-boards,
.raffles-grid,
#raffles,
#openRaffles {
  position: relative !important;
  z-index: 1 !important;
  margin-top: 22px !important;
}

/* Raffle cards never layer above timer/HUD */
.raffle-card,
.raffle-card-with-art,
.raffle-item-card,
.raffle-tile {
  position: relative !important;
  z-index: 1 !important;
  overflow: hidden !important;
}

/* Hide the fake acronym fallback if app.js still renders it */
.raffle-art-fallback {
  display: none !important;
}

/* Keep the Almost Full badge readable without crushing */
.raffle-card .almost-full,
.raffle-card .almostFull,
.raffle-card [class*="almost"],
.raffle-card [class*="Almost"] {
  width: auto !important;
  min-width: 72px !important;
  max-width: 90px !important;
  padding: 8px 10px !important;
  white-space: normal !important;
  text-align: center !important;
  font-size: 12px !important;
  line-height: 1.05 !important;
  border-radius: 999px !important;
}

/* Clean card body spacing */
.raffle-card-body {
  display: grid !important;
  grid-template-columns: 130px minmax(0, 1fr) !important;
  gap: 22px !important;
  align-items: stretch !important;
}

.raffle-card h3,
.raffle-card h4,
.raffle-card .raffle-title,
.raffle-card .item-title,
.raffle-card .prize-title {
  line-height: 1.12 !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}


/* =====================================================
   FINAL TIMER HUD STICKY FIX
   Timer bar stays above raffles while scrolling
   ===================================================== */

/* Make sure parent containers do not break sticky positioning */
body,
main,
.page,
.page-shell,
.dashboard,
.dashboard-page,
.content,
.content-area {
  overflow: visible !important;
}

/* Timer HUD should stick below the top header/hero area */
.torn-monitor,
.torn-monitor-card,
.torn-monitor-section,
.live-torn-hud,
.timer-section,
.timers-section,
.cooldowns-section,
#tornMonitor,
#timers,
#cooldowns {
  position: sticky !important;
  top: 12px !important;
  z-index: 500 !important;

  background: rgba(17, 20, 36, 0.97) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;

  border-radius: 24px !important;
  overflow: hidden !important;
}

/* Everything inside timer bar stays above cards */
.torn-monitor *,
.torn-monitor-card *,
.torn-monitor-section *,
.live-torn-hud *,
.timer-section *,
.timers-section *,
.cooldowns-section *,
#tornMonitor *,
#timers *,
#cooldowns * {
  position: relative;
  z-index: 501;
}

/* Raffle section/cards must stay underneath timer HUD */
.raffles-section,
.open-raffles-section,
.raffles-panel,
.open-raffles,
.live-boards,
#raffles,
#openRaffles {
  position: relative !important;
  z-index: 10 !important;
}

.raffle-card,
.raffle-card-with-art,
.raffle-item-card,
.raffle-tile {
  position: relative !important;
  z-index: 11 !important;
}

/* Header/hero can stay above normal page, but timer still beats raffle cards */
.hero,
.hero-card,
.dashboard-hero,
.top-hero {
  position: relative !important;
  z-index: 100 !important;
}

/* =====================================================
   REAL TIMER SECTION STICKY FIX
   Sticky class is now on the full timer section, not an inner div.
   ===================================================== */

html,
body,
main,
.app,
.app-shell,
.page,
.page-shell,
.dashboard,
.dashboard-page,
.content,
.content-area {
  overflow: visible !important;
}

/* The full timer section stays above raffle cards while scrolling */
.chain-real-timer-layer {
  position: sticky !important;
  top: 12px !important;
  z-index: 999999 !important;
  isolation: isolate !important;
  background: rgba(17, 20, 36, 0.98) !important;
  border-radius: 24px !important;
  box-shadow: 0 24px 70px rgba(0,0,0,0.42) !important;
}

/* Keep timer contents visible */
.chain-real-timer-layer,
.chain-real-timer-layer * {
  visibility: visible !important;
}

/* Anything below stays below */
.raffles-section,
.open-raffles-section,
.raffles-panel,
.open-raffles,
.live-boards,
#raffles,
#openRaffles,
.raffle-card,
.raffle-card-with-art,
.raffle-item-card,
.raffle-tile {
  position: relative !important;
  z-index: 1 !important;
}

/* Hero/header should not cover the sticky timer */
.hero,
.hero-card,
.dashboard-hero,
.top-hero {
  position: relative !important;
  z-index: 2 !important;
}


/* =====================================================
   TIMER OFFSET FIX
   Keeps Timers & Cooldowns above page content,
   but below the top hero/nav area.
   ===================================================== */

.chain-real-timer-layer {
  position: sticky !important;
  top: 92px !important;
  z-index: 999999 !important;
  margin-top: 18px !important;
  margin-bottom: 28px !important;
  background: rgba(17, 20, 36, 0.98) !important;
  border-radius: 24px !important;
  overflow: hidden !important;
  box-shadow: 0 24px 70px rgba(0,0,0,0.42) !important;
}

/* Make sure top hero/nav stays above normal content but below timer if needed */
.hero,
.hero-card,
.dashboard-hero,
.top-hero {
  position: relative !important;
  z-index: 100 !important;
}

/* Raffles and other sections stay below the timer layer */
.raffles-section,
.open-raffles-section,
.raffles-panel,
.open-raffles,
.live-boards,
.identity-section,
.portal-section,
#raffles,
#openRaffles {
  position: relative !important;
  z-index: 1 !important;
}

