/**
 * BLOCK RIFT - Scoped Stylesheet
 * Scoped strictly under [data-block-rift] and .br-*
 * Zero leakage into global Toolsyte styles.
 */

/* Container & Layout */
[data-block-rift] {
  --br-bg-dark: #040714;
  --br-bg-panel: rgba(8, 14, 32, 0.88);
  --br-border-glow: rgba(0, 243, 255, 0.35);
  --br-cyan: #00f3ff;
  --br-purple: #a855f7;
  --br-amber: #ffc700;
  --br-text: #f8fafc;
  --br-text-dim: #94a3b8;
  --br-font-hud: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;

  position: relative;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  background: var(--br-bg-dark);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 35px rgba(0, 243, 255, 0.15);
  border: 1px solid var(--br-border-glow);
  font-family: var(--br-font-hud);
  color: var(--br-text);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

/* In-page Fullscreen Immersive Fallback */
body.br-body-immersive {
  overflow: hidden !important;
}

[data-block-rift].br-immersive-active {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  z-index: 999999 !important;
  border-radius: 0 !important;
  border: none !important;
  margin: 0 !important;
}

/* Header & HUD */
[data-block-rift] .br-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 22px;
  background: rgba(6, 10, 24, 0.94);
  border-bottom: 1px solid rgba(0, 243, 255, 0.22);
}

[data-block-rift] .br-title-area {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

[data-block-rift] .br-brand-title {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 2.5px;
  color: var(--br-cyan);
  text-shadow: 0 0 12px rgba(0, 243, 255, 0.6);
  margin: 0;
}

[data-block-rift] .br-mode-indicator {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--br-purple);
  letter-spacing: 1.2px;
}

[data-block-rift] .br-hud-stats {
  display: flex;
  align-items: center;
  gap: 22px;
}

[data-block-rift] .br-stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

[data-block-rift] .br-stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--br-text-dim);
}

[data-block-rift] .br-stat-value {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

[data-block-rift] .br-top-actions {
  display: flex;
  gap: 8px;
}

[data-block-rift] .br-btn-icon {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--br-text);
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

[data-block-rift] .br-btn-icon:hover {
  background: rgba(0, 243, 255, 0.2);
  border-color: var(--br-cyan);
}

[data-block-rift] .br-btn-icon.br-muted {
  opacity: 0.5;
}

/* Main Gameplay Area - Dominant Chamber Composition */
[data-block-rift] .br-playfield-wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(360px, 460px) 250px;
  justify-content: center;
  align-items: center;
  gap: 28px;
  padding: 24px 20px;
  min-height: 680px;
  background: radial-gradient(circle at center, #08112b 0%, #030612 88%);
  box-sizing: border-box;
}

/* Side Panel (Cabinet Wing) */
[data-block-rift] .br-side-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 2;
}

[data-block-rift] .br-panel-box {
  background: var(--br-bg-panel);
  border: 1px solid rgba(0, 243, 255, 0.28);
  border-radius: 10px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(0, 243, 255, 0.05);
}

[data-block-rift] .br-panel-title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 1.8px;
  color: var(--br-cyan);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Rift Reserve Panel Components */
[data-block-rift] .br-charges-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin: 2px 0 6px 0;
}

[data-block-rift] .br-charge-icon {
  font-size: 1.4rem;
  line-height: 1;
  transition: all 0.25s ease;
}

[data-block-rift] .br-charge-icon.br-charge-active {
  color: var(--br-cyan);
  text-shadow: 0 0 10px rgba(0, 243, 255, 0.8), 0 0 20px rgba(0, 243, 255, 0.4);
}

[data-block-rift] .br-charge-icon.br-charge-used {
  color: #334155;
  opacity: 0.5;
  text-shadow: none;
}

[data-block-rift] .br-reserve-status {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

[data-block-rift] .br-reserve-status.br-status-active {
  color: var(--br-cyan);
  background: rgba(0, 243, 255, 0.12);
  border: 1px solid rgba(0, 243, 255, 0.3);
}

[data-block-rift] .br-reserve-status.br-status-depleted {
  color: var(--br-text-dim);
  background: rgba(51, 65, 85, 0.3);
  border: 1px solid rgba(51, 65, 85, 0.45);
}

[data-block-rift] .br-preview-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1.6px;
  color: var(--br-text-dim);
  text-transform: uppercase;
  margin: 4px 0 2px 0;
  text-align: center;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

[data-block-rift] .br-preview-label.br-is-rift-next {
  color: var(--br-cyan);
  text-shadow: 0 0 10px rgba(0, 243, 255, 0.7);
}

[data-block-rift] .br-tray-canvas-wrap {
  width: 100%;
  height: 130px;
  position: relative;
}

[data-block-rift] #br-canvas-tray {
  width: 100%;
  height: 100%;
  display: block;
}

[data-block-rift] .br-queued-notice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  margin: 6px 0;
  padding: 6px 8px;
  background: rgba(0, 243, 255, 0.14);
  border: 1px solid var(--br-cyan);
  border-radius: 6px;
  box-sizing: border-box;
}

[data-block-rift] .br-queued-badge {
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: var(--br-cyan);
}

[data-block-rift] .br-queued-text {
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
}

[data-block-rift] .br-btn-activate-rift {
  width: 100%;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(0, 243, 255, 0.22), rgba(168, 85, 247, 0.22));
  border: 1px solid var(--br-cyan);
  border-radius: 6px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  cursor: pointer;
  transition: all 0.18s ease;
  margin-top: 8px;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

[data-block-rift] .br-btn-activate-rift:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(0, 243, 255, 0.38), rgba(168, 85, 247, 0.38));
  box-shadow: 0 0 24px rgba(0, 243, 255, 0.45);
  transform: translateY(-1px);
}

[data-block-rift] .br-btn-activate-rift:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: #334155;
  box-shadow: none;
}

[data-block-rift] .br-key-badge {
  color: var(--br-cyan);
  font-size: 0.72rem;
}

[data-block-rift] .br-reserve-helper {
  font-size: 0.68rem;
  color: var(--br-text-dim);
  text-align: center;
  margin: 6px 0 0 0;
  line-height: 1.35;
}

/* Classic Mode Panel Overrides (Hides Reserve controls cleanly) */
[data-block-rift] .br-panel-reserve.br-mode-is-classic .br-charges-row,
[data-block-rift] .br-panel-reserve.br-mode-is-classic .br-reserve-status,
[data-block-rift] .br-panel-reserve.br-mode-is-classic .br-preview-label,
[data-block-rift] .br-panel-reserve.br-mode-is-classic .br-queued-notice,
[data-block-rift] .br-panel-reserve.br-mode-is-classic .br-btn-activate-rift,
[data-block-rift] .br-panel-reserve.br-mode-is-classic .br-reserve-helper {
  display: none !important;
}

/* Center Chamber Area (Visually Dominant) */
[data-block-rift] .br-chamber-area {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  height: 640px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(0, 243, 255, 0.3);
  box-shadow: 0 0 35px rgba(0, 243, 255, 0.16), inset 0 0 25px rgba(0, 0, 0, 0.9);
}

[data-block-rift] #br-canvas-board {
  width: 100%;
  height: 100%;
  display: block;
}

/* Rift Selector Modal & Pieces */
[data-block-rift] .br-selector-card {
  max-width: 480px;
  padding: 24px 20px;
}

[data-block-rift] .br-selector-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 18px 0;
}

[data-block-rift] .br-piece-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 96px;
  background: rgba(13, 20, 38, 0.9);
  border: 1px solid rgba(0, 243, 255, 0.28);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 8px 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

[data-block-rift] .br-piece-btn:hover {
  transform: translateY(-3px);
  border-color: var(--br-cyan);
  background: rgba(0, 243, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 243, 255, 0.35);
}

[data-block-rift] .br-piece-btn:focus-visible {
  outline: 2px solid var(--br-cyan);
  outline-offset: 2px;
}

[data-block-rift] .br-piece-name {
  font-size: 0.95rem;
  font-weight: 900;
  color: #fff;
  margin-top: 6px;
}

[data-block-rift] .br-piece-key {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--br-cyan);
}

[data-block-rift] .br-selector-actions {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

/* Beveled Isometric CSS Tetromino Previews */
[data-block-rift] .br-piece-preview {
  display: grid;
  grid-template-columns: repeat(4, 11px);
  grid-template-rows: repeat(2, 11px);
  gap: 2px;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 26px;
}

[data-block-rift] .br-cube {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.5), inset -1px -1px 0 rgba(0, 0, 0, 0.35);
}

/* I piece (Cyan) */
[data-block-rift] .br-preview-I {
  grid-template-rows: 11px;
  height: 16px;
  margin: 5px 0;
}
[data-block-rift] .br-preview-I .br-cube {
  background: #00f3ff;
  box-shadow: 0 0 6px rgba(0, 243, 255, 0.6), inset 1px 1px 0 #fff;
}

/* O piece (Yellow) */
[data-block-rift] .br-preview-O {
  grid-template-columns: repeat(2, 11px);
  width: 26px;
}
[data-block-rift] .br-preview-O .br-cube {
  background: #ffc700;
  box-shadow: 0 0 6px rgba(255, 199, 0, 0.6), inset 1px 1px 0 #fff;
}

/* T piece (Purple) */
[data-block-rift] .br-preview-T {
  grid-template-columns: repeat(3, 11px);
  width: 38px;
}
[data-block-rift] .br-preview-T .br-cube:nth-child(4) {
  grid-column: 2;
  grid-row: 2;
}
[data-block-rift] .br-preview-T .br-cube {
  background: #a855f7;
  box-shadow: 0 0 6px rgba(168, 85, 247, 0.6), inset 1px 1px 0 #fff;
}

/* S piece (Green) */
[data-block-rift] .br-preview-S {
  grid-template-columns: repeat(3, 11px);
  width: 38px;
}
[data-block-rift] .br-preview-S .br-cube:nth-child(1) { grid-column: 2; grid-row: 1; }
[data-block-rift] .br-preview-S .br-cube:nth-child(2) { grid-column: 3; grid-row: 1; }
[data-block-rift] .br-preview-S .br-cube:nth-child(3) { grid-column: 1; grid-row: 2; }
[data-block-rift] .br-preview-S .br-cube:nth-child(4) { grid-column: 2; grid-row: 2; }
[data-block-rift] .br-preview-S .br-cube {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6), inset 1px 1px 0 #fff;
}

/* Z piece (Red) */
[data-block-rift] .br-preview-Z {
  grid-template-columns: repeat(3, 11px);
  width: 38px;
}
[data-block-rift] .br-preview-Z .br-cube:nth-child(1) { grid-column: 1; grid-row: 1; }
[data-block-rift] .br-preview-Z .br-cube:nth-child(2) { grid-column: 2; grid-row: 1; }
[data-block-rift] .br-preview-Z .br-cube:nth-child(3) { grid-column: 2; grid-row: 2; }
[data-block-rift] .br-preview-Z .br-cube:nth-child(4) { grid-column: 3; grid-row: 2; }
[data-block-rift] .br-preview-Z .br-cube {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6), inset 1px 1px 0 #fff;
}

/* J piece (Blue) */
[data-block-rift] .br-preview-J {
  grid-template-columns: repeat(3, 11px);
  width: 38px;
}
[data-block-rift] .br-preview-J .br-cube:nth-child(1) { grid-column: 1; grid-row: 1; }
[data-block-rift] .br-preview-J .br-cube:nth-child(2) { grid-column: 1; grid-row: 2; }
[data-block-rift] .br-preview-J .br-cube:nth-child(3) { grid-column: 2; grid-row: 2; }
[data-block-rift] .br-preview-J .br-cube:nth-child(4) { grid-column: 3; grid-row: 2; }
[data-block-rift] .br-preview-J .br-cube {
  background: #3b82f6;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.6), inset 1px 1px 0 #fff;
}

/* L piece (Orange) */
[data-block-rift] .br-preview-L {
  grid-template-columns: repeat(3, 11px);
  width: 38px;
}
[data-block-rift] .br-preview-L .br-cube:nth-child(1) { grid-column: 3; grid-row: 1; }
[data-block-rift] .br-preview-L .br-cube:nth-child(2) { grid-column: 1; grid-row: 2; }
[data-block-rift] .br-preview-L .br-cube:nth-child(3) { grid-column: 2; grid-row: 2; }
[data-block-rift] .br-preview-L .br-cube:nth-child(4) { grid-column: 3; grid-row: 2; }
[data-block-rift] .br-preview-L .br-cube {
  background: #f97316;
  box-shadow: 0 0 6px rgba(249, 115, 22, 0.6), inset 1px 1px 0 #fff;
}

/* Mobile Touch Button for Rift */
[data-block-rift] .br-touch-rift-btn {
  background: linear-gradient(135deg, rgba(0, 243, 255, 0.25), rgba(168, 85, 247, 0.25)) !important;
  border-color: var(--br-cyan) !important;
  color: var(--br-cyan) !important;
  font-weight: 900 !important;
  box-shadow: 0 0 12px rgba(0, 243, 255, 0.25);
}

[data-block-rift] .br-touch-rift-btn:disabled {
  opacity: 0.3 !important;
  border-color: #334155 !important;
  color: var(--br-text-dim) !important;
  box-shadow: none !important;
}

/* Floating Banners & Badges */
[data-block-rift] .br-banner-overlay {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10;
  text-align: center;
}

[data-block-rift] .br-riftbreak-banner {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 4px;
  color: #fff;
  text-shadow: 0 0 20px var(--br-cyan), 0 0 40px var(--br-purple);
  padding: 10px 24px;
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid var(--br-cyan);
  border-radius: 8px;
}

[data-block-rift] .br-combo-badge {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--br-amber);
  text-shadow: 0 0 12px rgba(255, 199, 0, 0.6);
  padding: 6px 16px;
  background: rgba(10, 16, 35, 0.9);
  border: 1px solid var(--br-amber);
  border-radius: 20px;
  margin-top: 8px;
}

[data-block-rift] .br-pop {
  animation: brPopIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes brPopIn {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Level-Up Announcement Overlay (Centered over 3D Chamber) */
[data-block-rift] .br-level-announcement {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 12;
  text-align: center;
  padding: 12px 28px;
  border-radius: 12px;
  background: radial-gradient(ellipse at center, rgba(6, 12, 30, 0.72) 0%, rgba(3, 6, 16, 0) 75%);
  box-sizing: border-box;
}

[data-block-rift] .br-level-announcement.is-active {
  animation: brLevelAnnounce 850ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

[data-block-rift] .br-level-number {
  font-family: inherit;
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: 3.5px;
  color: #ffffff;
  text-shadow: 0 0 16px rgba(0, 243, 255, 0.85), 0 0 32px rgba(0, 243, 255, 0.45);
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}

[data-block-rift] .br-level-theme {
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--br-cyan, #00f3ff);
  text-shadow: 0 0 12px rgba(0, 243, 255, 0.75);
  margin-top: 6px;
  text-transform: uppercase;
  white-space: nowrap;
}

@keyframes brLevelAnnounce {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
  }
  16% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  72% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.04);
  }
}

@media (max-width: 720px) {
  [data-block-rift] .br-level-announcement {
    top: 36%;
    padding: 8px 18px;
  }
  [data-block-rift] .br-level-number {
    font-size: 1.85rem;
    letter-spacing: 2px;
  }
  [data-block-rift] .br-level-theme {
    font-size: 0.82rem;
    letter-spacing: 2.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-block-rift] .br-level-announcement.is-active {
    animation: brLevelAnnounceReduced 850ms ease forwards;
  }
  @keyframes brLevelAnnounceReduced {
    0% { opacity: 0; transform: translate(-50%, -50%); }
    15% { opacity: 1; transform: translate(-50%, -50%); }
    72% { opacity: 1; transform: translate(-50%, -50%); }
    100% { opacity: 0; transform: translate(-50%, -50%); }
  }
}

[data-block-rift] .br-hidden {
  display: none !important;
}

/* Overlays & Modals */
[data-block-rift] .br-screen {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 18, 0.58);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 20;
  padding: 24px;
  box-sizing: border-box;
}

[data-block-rift] .br-screen.br-active {
  display: flex;
}

[data-block-rift] .br-modal-card {
  background: rgba(10, 16, 36, 0.90);
  border: 1px solid var(--br-border-glow);
  border-radius: 12px;
  padding: 30px 38px;
  max-width: 440px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 30px rgba(0, 243, 255, 0.22);
  box-sizing: border-box;
}

[data-block-rift] .br-modal-card.br-pause-card {
  max-width: 420px;
  padding: 28px 32px;
}

[data-block-rift] .br-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--br-cyan);
  background: rgba(0, 243, 255, 0.12);
  border: 1px solid rgba(0, 243, 255, 0.3);
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

[data-block-rift] .br-pause-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
  margin-bottom: 20px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
  box-sizing: border-box;
}

[data-block-rift] .br-stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

[data-block-rift] .br-stat-pill-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--br-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

[data-block-rift] .br-stat-pill-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

[data-block-rift] .br-pause-secondary-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  width: 100%;
}

[data-block-rift] .br-pause-secondary-group button {
  margin-bottom: 0;
  padding: 10px 8px;
  font-size: 0.82rem;
}

[data-block-rift] .br-modal-card.br-confirm-card {
  max-width: 380px;
  padding: 24px 28px;
}

[data-block-rift] .br-confirm-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-top: 10px;
}

[data-block-rift] .br-confirm-actions button {
  flex: 1;
  margin-bottom: 0;
}

[data-block-rift] .br-btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

[data-block-rift] .br-btn-danger:hover {
  box-shadow: 0 0 22px rgba(239, 68, 68, 0.6);
  transform: translateY(-1px);
}

[data-block-rift] .br-modal-title {
  font-size: 1.9rem;
  font-weight: 900;
  letter-spacing: 2.5px;
  color: var(--br-cyan);
  text-shadow: 0 0 16px rgba(0, 243, 255, 0.5);
  margin: 0 0 6px 0;
  text-align: center;
}

[data-block-rift] .br-modal-sub {
  font-size: 0.88rem;
  color: var(--br-text-dim);
  margin-bottom: 22px;
  text-align: center;
}

/* Mode Tabs */
[data-block-rift] .br-mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  width: 100%;
}

[data-block-rift] .br-mode-tab {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--br-text-dim);
  padding: 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

[data-block-rift] .br-mode-tab:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

[data-block-rift] .br-mode-tab.br-active {
  background: rgba(0, 243, 255, 0.2);
  border-color: var(--br-cyan);
  color: #fff;
  box-shadow: 0 0 12px rgba(0, 243, 255, 0.35);
}

/* Dynamic Mode Description Paragraph */
[data-block-rift] .br-menu-mode-desc {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--br-text-dim);
  text-align: center;
  margin: 0 0 22px 0;
  min-height: 44px;
}

/* Buttons */
[data-block-rift] .br-btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #00f3ff 0%, #3b82f6 100%);
  color: #030712;
  border: none;
  border-radius: 6px;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 1.2px;
  padding: 13px 20px;
  cursor: pointer;
  margin-bottom: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

[data-block-rift] .br-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(0, 243, 255, 0.65);
}

[data-block-rift] .br-menu-helper {
  font-size: 0.76rem;
  color: var(--br-text-dim);
  text-align: center;
  margin: 4px 0 0 0;
  opacity: 0.85;
  line-height: 1.4;
}

[data-block-rift] button:focus-visible {
  outline: 2px solid var(--br-cyan);
  outline-offset: 2px;
}

[data-block-rift] button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

[data-block-rift] .br-btn-secondary {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--br-text);
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 10px 18px;
  cursor: pointer;
  margin-bottom: 8px;
  transition: all 0.15s ease;
}

[data-block-rift] .br-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--br-cyan);
}

[data-block-rift] .br-btn-ghost {
  background: transparent;
  border: none;
  color: var(--br-text-dim);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 6px 12px;
  transition: color 0.15s ease;
}

[data-block-rift] .br-btn-ghost:hover {
  color: var(--br-cyan);
}

/* Countdown Overlay */
[data-block-rift] .br-countdown-wrap {
  text-align: center;
}

[data-block-rift] .br-countdown-num {
  font-size: 5rem;
  font-weight: 900;
  color: var(--br-cyan);
  text-shadow: 0 0 30px rgba(0, 243, 255, 0.7);
}

/* Game Over Stats Grid */
[data-block-rift] .br-results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
  margin-bottom: 20px;
}

[data-block-rift] .br-result-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
}

[data-block-rift] .br-result-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--br-text-dim);
}

[data-block-rift] .br-result-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

[data-block-rift] .br-newbest-badge {
  background: var(--br-amber);
  color: #000;
  font-weight: 900;
  font-size: 0.75rem;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 14px;
}

/* Settings Modal */
[data-block-rift] .br-settings-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  margin-bottom: 22px;
}

[data-block-rift] .br-setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

[data-block-rift] .br-setting-row label {
  font-size: 0.9rem;
  font-weight: 600;
}

[data-block-rift] .br-select-custom {
  background: rgba(15, 23, 42, 0.9);
  color: var(--br-text);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 0.85rem;
}

/* Mobile Touch Controls */
[data-block-rift] .br-touch-controls {
  display: none; /* hidden on desktop */
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: rgba(8, 12, 28, 0.95);
  border-top: 1px solid rgba(0, 243, 255, 0.2);
}

[data-block-rift] .br-touch-row {
  display: flex;
  justify-content: center;
  gap: 12px;
}

[data-block-rift] .br-touch-btn {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(0, 243, 255, 0.35);
  color: var(--br-text);
  font-size: 1.1rem;
  font-weight: 800;
  border-radius: 8px;
  min-width: 54px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: none;
  transition: background 0.1s ease, transform 0.1s ease;
}

[data-block-rift] .br-touch-btn:active {
  background: rgba(0, 243, 255, 0.35);
  transform: scale(0.95);
}

[data-block-rift] .br-touch-wide {
  flex: 1;
  max-width: 140px;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

[data-block-rift] .br-touch-primary {
  border-color: var(--br-cyan);
  background: rgba(0, 243, 255, 0.18);
}

/* WebGL Warning */
[data-block-rift] .br-webgl-warning {
  padding: 16px;
  background: #7f1d1d;
  color: #fecaca;
  font-size: 0.9rem;
  text-align: center;
  border-bottom: 1px solid #b91c1c;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  [data-block-rift] .br-playfield-wrap {
    grid-template-columns: minmax(320px, 420px) 220px;
    gap: 16px;
    padding: 16px;
    min-height: 580px;
  }
  [data-block-rift] .br-chamber-area {
    height: 560px;
  }
}

@media (max-width: 860px) {
  [data-block-rift] .br-playfield-wrap {
    grid-template-columns: minmax(280px, 360px) 200px;
    gap: 12px;
    padding: 12px;
    min-height: 520px;
  }
  [data-block-rift] .br-chamber-area {
    height: 490px;
  }
}

@media (max-width: 720px) {
  /* Compact Mobile Portrait Layout */
  [data-block-rift] .br-header-bar {
    padding: 8px 12px;
  }

  [data-block-rift] .br-brand-title {
    font-size: 0.95rem;
    letter-spacing: 1.5px;
    white-space: nowrap;
  }

  [data-block-rift] .br-mode-indicator {
    display: none;
  }

  [data-block-rift] .br-hud-stats {
    gap: 8px;
  }

  [data-block-rift] .br-stat-label {
    font-size: 0.55rem;
  }

  [data-block-rift] .br-stat-value {
    font-size: 0.95rem;
  }

  [data-block-rift] .br-playfield-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    gap: 10px;
    min-height: auto;
  }

  [data-block-rift] .br-chamber-area {
    height: 380px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    order: 1;
  }

  [data-block-rift] .br-side-panel.br-panel-right {
    order: 2;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  [data-block-rift] .br-panel-reserve {
    padding: 10px 12px;
  }

  [data-block-rift] .br-panel-reserve .br-panel-title {
    font-size: 0.72rem;
    margin-bottom: 4px;
  }

  [data-block-rift] .br-tray-canvas-wrap {
    height: 80px;
  }

  [data-block-rift] .br-charge-icon {
    font-size: 1.15rem;
  }

  [data-block-rift] .br-btn-activate-rift {
    padding: 8px 12px;
    font-size: 0.78rem;
    margin-top: 6px;
  }

  [data-block-rift] .br-touch-controls {
    display: flex;
    order: 3;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 8px 6px;
    gap: 6px;
  }

  [data-block-rift] .br-touch-row {
    gap: 8px;
  }

  [data-block-rift] .br-touch-btn {
    height: 48px;
    min-width: 48px;
    font-size: 1rem;
  }

  /* Compact Selector Card on Mobile */
  [data-block-rift] .br-selector-card {
    max-width: 340px;
    padding: 16px 12px;
  }

  [data-block-rift] .br-selector-grid {
    gap: 8px;
    margin: 12px 0;
  }

  [data-block-rift] .br-piece-btn {
    width: 70px;
    height: 74px;
    padding: 6px 2px;
  }

  [data-block-rift] .br-piece-name {
    font-size: 0.82rem;
    margin-top: 4px;
  }

  [data-block-rift] .br-piece-key {
    font-size: 0.6rem;
  }
}

@media (max-width: 360px) {
  [data-block-rift] .br-brand-title {
    font-size: 0.85rem;
    letter-spacing: 1px;
  }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  [data-block-rift] .br-pop,
  [data-block-rift] .br-btn-primary {
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================================
   BLOCK RIFT — LANDING PAGE SCOPED STYLING
   ============================================================ */

.br-landing-page {
  width: 100%;
  margin: 0;
  padding: 0;
  color: #1e293b;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: clip;
}

/* Full-Width Band System */
.br-band {
  width: 100%;
  position: relative;
  box-sizing: border-box;
}

.br-band-inner {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: clamp(16px, 3vw, 24px);
  padding-right: clamp(16px, 3vw, 24px);
  box-sizing: border-box;
}

/* Section Header Typography */
.br-section {
  margin: 0;
}

.br-section-header {
  margin-bottom: 26px;
}

.br-section-header .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(2, 132, 199, 0.25);
  margin-bottom: 10px;
}

.br-section-title {
  margin: 0 0 8px 0;
  color: #0f172a;
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  font-weight: 850;
  line-height: 1.22;
  letter-spacing: -0.015em;
}

.br-section-lead {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #64748b;
}

/* Dark Band Typography Overrides */
.br-band--dark {
  color: #f8fafc;
}

.br-band--dark .br-section-header .eyebrow {
  background: rgba(0, 243, 255, 0.12);
  color: #00f3ff;
  border-color: rgba(0, 243, 255, 0.35);
}

.br-band--dark .br-section-title {
  color: #ffffff;
}

.br-band--dark .br-section-lead {
  color: #94a3b8;
}

/* ============================================================
   BAND 1: HERO & GAME CONTAINER (LIGHT BAND)
   ============================================================ */
.br-band--hero {
  background-color: #f1f5f9;
  background-image:
    radial-gradient(#cbd5e1 1px, transparent 1px),
    radial-gradient(circle at 50% 40%, rgba(0, 243, 255, 0.12) 0%, rgba(241, 245, 249, 0) 65%),
    linear-gradient(180deg, #edf3f8 0%, #f8fafc 100%);
  background-size: 24px 24px, 100% 100%, 100% 100%;
  background-position: 0 0, center center, 0 0;
  padding-top: 24px;
  padding-bottom: 36px;
  border-bottom: 1px solid #e2e8f0;
}

.br-landing-hero {
  margin-bottom: 24px;
  max-width: 880px;
}

.br-hero-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.br-language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.br-language-label {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  color: #64748b;
  cursor: pointer;
  margin: 0;
}

.br-language-globe {
  font-size: 0.95rem;
  line-height: 1;
}

.br-language-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  min-height: 32px;
  padding: 4px 28px 4px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  background-color: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 6px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.br-language-select:hover {
  border-color: #0284c7;
}

.br-language-select:focus-visible {
  outline: none;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

.br-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.br-lang-noscript {
  display: inline-flex;
  gap: 8px;
  font-size: 0.82rem;
  margin-left: 8px;
}
.br-lang-noscript a {
  color: #0284c7;
  text-decoration: underline;
}

.br-landing-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(2, 132, 199, 0.25);
  margin-bottom: 12px;
}

.br-hero-title {
  margin: 0 0 12px 0;
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  font-weight: 850;
  color: #0f172a;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.br-hero-intro {
  margin: 0;
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  line-height: 1.68;
  color: #334155;
}

/* ============================================================
   BAND 2: GAME AT A GLANCE (SOFT TINTED STRIP)
   ============================================================ */
.br-band--glance {
  background: linear-gradient(180deg, #eaf2f8 0%, #e1edf5 100%);
  border-top: 1px solid #d4e2ed;
  border-bottom: 1px solid #d4e2ed;
  padding-top: 14px;
  padding-bottom: 14px;
}

.br-glance-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin: 0;
}

.br-glance-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #cfe0ed;
  border-radius: 999px;
  padding: 10px 12px;
  font-size: 0.85rem;
  font-weight: 750;
  color: #1e293b;
  text-align: center;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.br-glance-chip:hover {
  transform: translateY(-2px);
  border-color: #0284c7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
}

.br-glance-icon {
  font-size: 1rem;
  line-height: 1;
}

@media (max-width: 960px) {
  .br-glance-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 540px) {
  .br-glance-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .br-glance-chip {
    padding: 8px 6px;
    font-size: 0.8rem;
  }
}

/* ============================================================
   BAND 3: HOW TO PLAY (DARK BAND)
   ============================================================ */
.br-band--how-to-play {
  background-color: #070d1e;
  background-image:
    radial-gradient(circle at 50% 0%, rgba(0, 243, 255, 0.09) 0%, transparent 60%),
    linear-gradient(rgba(0, 243, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 243, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 100%, 36px 36px, 36px 36px;
  border-top: 1px solid rgba(0, 243, 255, 0.18);
  border-bottom: 1px solid rgba(0, 243, 255, 0.12);
  padding-top: 58px;
  padding-bottom: 64px;
}

.br-band--how-to-play .br-section-header {
  margin-bottom: 32px; /* Breathing room between intro and cards */
}

.br-steps-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.br-band--how-to-play .br-step-card {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 14px;
  padding: 24px 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.br-band--how-to-play .br-step-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 243, 255, 0.55);
  box-shadow: 0 12px 28px rgba(0, 243, 255, 0.15);
}

.br-step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

/* Strengthened circular indicators */
.br-band--how-to-play .br-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 243, 255, 0.22) 0%, rgba(2, 132, 199, 0.28) 100%);
  border: 2px solid #00f3ff;
  color: #ffffff;
  font-weight: 900;
  font-size: 1.05rem;
  text-shadow: 0 0 8px rgba(0, 243, 255, 0.6);
  box-shadow: 0 0 16px rgba(0, 243, 255, 0.35), inset 0 0 8px rgba(0, 243, 255, 0.2);
  flex-shrink: 0;
}

.br-band--how-to-play .br-step-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #f8fafc;
}

.br-band--how-to-play .br-step-desc {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #cbd5e1;
}

@media (min-width: 861px) {
  .br-step-card:nth-child(1),
  .br-step-card:nth-child(2),
  .br-step-card:nth-child(3) {
    grid-column: span 2;
  }
  .br-step-card:nth-child(4) {
    grid-column: 2 / span 2;
  }
  .br-step-card:nth-child(5) {
    grid-column: 4 / span 2;
  }
}

@media (max-width: 860px) and (min-width: 601px) {
  .br-steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .br-step-card {
    grid-column: span 1;
  }
  .br-step-card:nth-child(5) {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .br-steps-grid {
    grid-template-columns: 1fr;
  }
  .br-step-card {
    grid-column: span 1;
  }
}

/* ============================================================
   BAND 4: WHAT IS THE RIFT RESERVE? (LIGHT / CYAN-TINTED BAND)
   ============================================================ */
.br-band--rift-reserve {
  background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 50%, #f0f9ff 100%);
  border-top: 1px solid #bae6fd;
  border-bottom: 1px solid #bae6fd;
  padding-top: 56px;
  padding-bottom: 60px;
}

/* 2-Column Desktop Composition */
.br-rift-feature-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #7dd3fc;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(2, 132, 199, 0.08);
}

.br-rift-feature-text p {
  margin: 0 0 14px 0;
  font-size: 1.02rem;
  line-height: 1.72;
  color: #1e293b;
}

.br-rift-feature-text p:last-child {
  margin-bottom: 0;
}

.br-rift-feature-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.br-rift-visual-panel {
  width: 100%;
  max-width: 330px;
  background:
    radial-gradient(circle at 50% 40%, rgba(56, 189, 248, 0.12) 0%, transparent 65%),
    linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1.5px solid #7dd3fc;
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.12), inset 0 0 20px rgba(0, 243, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.br-rift-visual-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(2, 132, 199, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(2, 132, 199, 0.04) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
}

.br-rift-diamonds {
  font-size: 1.15rem;
  color: #0284c7;
  letter-spacing: 0.25em;
  margin-bottom: 12px;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
  position: relative;
}

.br-rift-badge-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
  position: relative;
}

.br-rift-visual-sub {
  margin: 12px 0 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: #0369a1;
  line-height: 1.45;
  position: relative;
}

@media (max-width: 820px) {
  .br-rift-feature-card {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
  }
  .br-rift-visual-panel {
    max-width: 100%;
  }
}

/* ============================================================
   BAND 5: RIFT MODE VS CLASSIC MODE (LIGHT / NEUTRAL BAND)
   ============================================================ */
.br-band--modes {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding-top: 56px;
  padding-bottom: 60px;
}

.br-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.br-mode-card {
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.br-mode-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

/* Rift Mode subtle identity & watermark */
.br-mode-card.br-mode-rift-card {
  border: 2px solid #38bdf8;
  border-top: 5px solid #0284c7;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 45%);
}

.br-mode-card.br-mode-rift-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(#0284c7 0.75px, transparent 0.75px),
    radial-gradient(circle at 85% 85%, rgba(2, 132, 199, 0.08) 0%, transparent 60%);
  background-size: 14px 14px, 100% 100%;
  opacity: 0.04;
  pointer-events: none;
}

.br-mode-card.br-mode-rift-card::after {
  content: '◆';
  position: absolute;
  right: 14px;
  bottom: 8px;
  font-size: 5rem;
  line-height: 1;
  color: #0284c7;
  opacity: 0.035;
  pointer-events: none;
}

/* Classic Mode subtle identity & watermark */
.br-mode-card.br-mode-classic-card {
  border: 2px solid #cbd5e1;
  border-top: 5px solid #6366f1;
  background: linear-gradient(180deg, #faf5ff 0%, #ffffff 45%);
}

.br-mode-card.br-mode-classic-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.04) 1px, transparent 1px);
  background-size: 14px 14px, 14px 14px;
  opacity: 0.04;
  pointer-events: none;
}

.br-mode-card.br-mode-classic-card::after {
  content: '■';
  position: absolute;
  right: 14px;
  bottom: 8px;
  font-size: 5rem;
  line-height: 1;
  color: #6366f1;
  opacity: 0.035;
  pointer-events: none;
}

.br-mode-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.br-mode-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 850;
  color: #0f172a;
  letter-spacing: 0.02em;
}

.br-mode-card.br-mode-rift-card .br-mode-tagline {
  background: #e0f2fe;
  color: #0369a1;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.br-mode-card.br-mode-classic-card .br-mode-tagline {
  background: #f1f5f9;
  color: #4f46e5;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.br-mode-body {
  margin: 0 0 16px 0;
  font-size: 0.98rem;
  line-height: 1.68;
  color: #334155;
  flex-grow: 1;
  position: relative;
  z-index: 1;
}

.br-mode-support {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: #64748b;
  padding-top: 14px;
  border-top: 1px dashed #e2e8f0;
  position: relative;
  z-index: 1;
}

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

/* ============================================================
   BAND 6: CONTROLS & GAMEPLAY RULES (DARK BAND)
   ============================================================ */
.br-band--controls {
  background-color: #091124;
  background-image:
    radial-gradient(circle at 50% 10%, rgba(56, 189, 248, 0.08) 0%, transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 28px;
  border-top: 1px solid rgba(0, 243, 255, 0.18);
  border-bottom: 1px solid rgba(0, 243, 255, 0.18);
  padding-top: 58px;
  padding-bottom: 64px;
}

.br-controls-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  align-items: start; /* Allow natural content heights, aligned to top */
}

.br-band--controls .br-controls-card {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 14px;
  padding: 26px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
}

.br-band--controls .br-controls-card-title {
  margin: 0 0 18px 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: #f8fafc;
}

.br-controls-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.br-band--controls .br-controls-table tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.br-band--controls .br-controls-table tr:last-child {
  border-bottom: none;
}

.br-band--controls .br-controls-table td {
  padding: 9px 4px;
  font-size: 0.94rem;
  color: #cbd5e1;
  vertical-align: middle;
}

.br-band--controls .br-controls-table td:first-child {
  width: 44%;
  white-space: nowrap;
}

.br-band--controls .br-controls-subtitle {
  margin: 20px 0 12px 0;
  padding-top: 14px;
  border-top: 1px dashed rgba(56, 189, 248, 0.3);
  font-size: 0.88rem;
  font-weight: 800;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.br-mobile-controls-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.br-band--controls .br-mobile-controls-list li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.94rem;
  color: #cbd5e1;
  line-height: 1.55;
}

.br-band--controls .br-mobile-controls-list li:last-child {
  border-bottom: none;
}

.br-band--controls .br-mobile-controls-list strong {
  color: #38bdf8;
  font-weight: 750;
}

/* Refined physical keycaps */
.br-band--controls kbd {
  display: inline-block;
  padding: 4px 9px;
  min-width: 22px;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.25;
  color: #38bdf8;
  background: linear-gradient(180deg, #1e293b 0%, #0d1527 100%);
  border: 1px solid #475569;
  border-bottom: 2px solid #00f3ff;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .br-controls-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   BAND 7: SCORING MULTIPLIERS & LEVEL PROGRESSION (LIGHT BAND)
   ============================================================ */
.br-band--scoring {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding-top: 56px;
  padding-bottom: 60px;
}

.br-scoring-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.br-score-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 14px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.br-score-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.br-score-card.br-score-card-highlight {
  border: 2px solid #0284c7;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.15);
}

.br-score-card-label {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 6px;
}

.br-score-card.br-score-card-highlight .br-score-card-label {
  color: #0284c7;
}

.br-score-card-val {
  font-size: 1.4rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.br-score-card.br-score-card-highlight .br-score-card-val {
  color: #0369a1;
}

.br-scoring-notes {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 22px;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #334155;
}

.br-scoring-notes p {
  margin: 0 0 8px 0;
}

.br-scoring-notes p:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .br-scoring-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 440px) {
  .br-scoring-grid {
    grid-template-columns: 1fr;
  }
}

/* Level Progression Connected Milestones */
.br-progression-block {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px dashed #cbd5e1;
}

.br-progression-header {
  margin-bottom: 20px;
}

.br-progression-title {
  font-size: clamp(1.2rem, 1.6vw, 1.5rem);
  margin: 0 0 8px 0;
}

.br-themes-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-top: 24px;
  position: relative;
}

@media (min-width: 901px) {
  .br-themes-grid::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 36px;
    right: 36px;
    height: 3px;
    background: linear-gradient(90deg, #0284c7 0%, #2563eb 35%, #6366f1 70%, #9333ea 100%);
    opacity: 0.35;
    z-index: 0;
  }
}

.br-theme-chip {
  position: relative;
  z-index: 1;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px 8px 14px 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Milestone progression node */
.br-theme-chip::before {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0284c7;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1.5px #cbd5e1;
  margin-bottom: 8px;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.br-theme-chip:nth-child(1)::before { background: #0284c7; }
.br-theme-chip:nth-child(2)::before { background: #0369a1; }
.br-theme-chip:nth-child(3)::before { background: #2563eb; }
.br-theme-chip:nth-child(4)::before { background: #4f46e5; }
.br-theme-chip:nth-child(5)::before { background: #7c3aed; }
.br-theme-chip:nth-child(6)::before { background: #9333ea; }

.br-theme-chip:hover {
  transform: translateY(-2px);
  border-color: #0284c7;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.14);
}

.br-theme-chip:hover::before {
  transform: scale(1.25);
}

.br-theme-range {
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 850;
  color: #ffffff;
  background: #0284c7;
  border-radius: 999px;
  padding: 2px 9px;
  margin-bottom: 6px;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2);
}

.br-theme-chip:nth-child(1) .br-theme-range { background: #0284c7; }
.br-theme-chip:nth-child(2) .br-theme-range { background: #0369a1; }
.br-theme-chip:nth-child(3) .br-theme-range { background: #2563eb; }
.br-theme-chip:nth-child(4) .br-theme-range { background: #4f46e5; }
.br-theme-chip:nth-child(5) .br-theme-range { background: #7c3aed; }
.br-theme-chip:nth-child(6) .br-theme-range { background: #9333ea; }

.br-theme-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

@media (max-width: 900px) {
  .br-themes-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .br-themes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   BAND 8: ABOUT BLOCK RIFT (SOFT / TINTED BAND)
   ============================================================ */
.br-band--about {
  background: linear-gradient(180deg, #edf4f9 0%, #f4f8fb 100%);
  border-top: 1px solid #dbe6ef;
  border-bottom: 1px solid #dbe6ef;
  padding-top: 56px;
  padding-bottom: 60px;
}

.br-about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
}

.br-about-prose {
  font-size: 1rem;
  line-height: 1.72;
  color: #334155;
}

.br-about-prose p {
  margin: 0 0 14px 0;
}

.br-about-prose p:last-child {
  margin-bottom: 0;
}

.br-facts-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
  height: fit-content;
}

.br-facts-title {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  font-weight: 850;
  color: #0f172a;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.br-facts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}

.br-fact-item {
  display: flex;
  flex-direction: column;
}

.br-fact-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
  opacity: 0.85;
}

.br-fact-val {
  font-size: 0.98rem;
  font-weight: 850;
  color: #0f172a;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .br-about-layout {
    grid-template-columns: 1fr;
  }
}

.br-gameplay-showcase {
  margin: 36px auto 0;
  padding: 0;
  width: 100%;
  max-width: 1080px;
  box-sizing: border-box;
}

.br-gameplay-showcase img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .br-gameplay-showcase {
    margin-top: 28px;
  }

  .br-gameplay-showcase img {
    border-radius: 10px;
  }
}

@media (max-width: 480px) {
  .br-gameplay-showcase {
    margin-top: 20px;
  }
}


/* ============================================================
   BAND 9: FAQ SECTION (LIGHT BAND)
   ============================================================ */
.br-band--faq {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding-top: 56px;
  padding-bottom: 60px;
}

.br-faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.br-faq-item {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.br-faq-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.br-faq-item[open] {
  border-color: #7dd3fc;
  border-left: 4px solid #0284c7;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.08);
}

.br-faq-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  min-height: 52px;
  font-size: 1.05rem;
  font-weight: 750;
  color: #0f172a;
  cursor: pointer;
  user-select: none;
  list-style: none;
  box-sizing: border-box;
}

.br-faq-summary::-webkit-details-marker {
  display: none;
}

.br-faq-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #64748b;
  transition: transform 0.2s ease;
}

.br-faq-item[open] .br-faq-chevron {
  transform: rotate(180deg);
  color: #0284c7;
}

.br-faq-content {
  padding: 0 22px 20px 22px;
  font-size: 0.98rem;
  line-height: 1.7;
  color: #475569;
}

/* ============================================================
   BAND 10: RELATED GAMES (SOFT BLUE-GRAY BAND)
   Separated from black footer via natural contrast
   ============================================================ */
.br-band--related {
  background-color: #edf3f8;
  background-image:
    radial-gradient(#d6e4ef 1px, transparent 1px),
    linear-gradient(180deg, #edf4f9 0%, #e5eef5 100%);
  background-size: 24px 24px, 100% 100%;
  border-top: 1px solid #d4e0eb;
  padding-top: 60px;
  padding-bottom: 64px;
}

.br-band--related .br-section-title {
  color: #0f172a;
}

.br-band--related .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(2, 132, 199, 0.25);
  margin-bottom: 10px;
}

.br-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
}

.br-band--related .br-related-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.br-band--related .br-related-card:hover {
  transform: translateY(-3px);
  border-color: #cbd5e1;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
}

.br-band--related .card-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  margin: 0 0 16px 0;
  background: #e2e8f0;
}

.br-band--related .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.br-band--related .br-related-title {
  margin: 0 0 8px 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
}

.br-band--related .card-desc {
  margin: 0 0 16px 0;
  font-size: 0.93rem;
  line-height: 1.6;
  color: #64748b;
  flex-grow: 1;
}

.br-card-overlay-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  text-indent: -9999px;
  border-radius: 12px;
}

.br-band--related .card-actions {
  position: relative;
  z-index: 2;
  margin-top: auto;
}

.br-band--related .btn-open {
  display: inline-block;
  padding: 8px 18px;
  background: #0284c7;
  color: #ffffff;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.br-band--related .btn-open:hover {
  background: #0369a1;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

@media (max-width: 700px) {
  .br-related-grid {
    grid-template-columns: 1fr;
  }
}

/* Consistent responsive band padding */
@media (max-width: 900px) {
  .br-band--how-to-play,
  .br-band--controls,
  .br-band--related {
    padding-top: 50px;
    padding-bottom: 54px;
  }
  .br-band--rift-reserve,
  .br-band--modes,
  .br-band--scoring,
  .br-band--about,
  .br-band--faq {
    padding-top: 48px;
    padding-bottom: 50px;
  }
}

@media (max-width: 600px) {
  .br-band--how-to-play,
  .br-band--controls,
  .br-band--related {
    padding-top: 40px;
    padding-bottom: 44px;
  }
  .br-band--rift-reserve,
  .br-band--modes,
  .br-band--scoring,
  .br-band--about,
  .br-band--faq {
    padding-top: 38px;
    padding-bottom: 40px;
  }
}
