:root {
  --bg-dark: #0a0e17;
  --bg-card: #12182a;
  --bg-elevated: #1a2236;
  --gold: #f5c518;
  --gold-dim: #c9a012;
  --green: #00c853;
  --green-dim: #00a344;
  --red: #ff3d57;
  --text: #e8ecf4;
  --text-muted: #8892a8;
  --border: #2a3450;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --panel-bg: rgba(18, 24, 42, 0.92);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

/* Viewer page — same dark theme as host (no background image) */
body.viewer-page {
  background: var(--bg-dark);
}

body.viewer-page .header {
  background: var(--bg-card);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  position: relative;
  z-index: 980;
}

body.viewer-page .panel {
  background: var(--bg-card);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.viewer-page .viewer-intro {
  background: rgba(10, 14, 23, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

body.viewer-page .modal-overlay {
  background: rgba(10, 14, 23, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

body.viewer-page .modal {
  background: var(--panel-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--gold), var(--green));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.logo-icon--img {
  display: block;
  padding: 0;
  background: none;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.nav-links {
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: #0a0e17;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245, 197, 24, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, var(--green), var(--green-dim));
  color: #fff;
}

.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 200, 83, 0.3);
}

.btn-danger {
  background: var(--red);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff !important;
  text-decoration: none !important;
  justify-content: center;
}

.btn-whatsapp:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
  text-decoration: none !important;
  color: #fff !important;
}

.btn-whatsapp--block {
  display: flex;
  width: 100%;
  margin-top: 1rem;
}

.phone-auth-whatsapp {
  display: flex;
  width: 100%;
  margin-top: 0.75rem;
  text-decoration: none !important;
}

.whatsapp-fab {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 990;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none !important;
  box-shadow: 0 10px 28px rgba(18, 140, 126, 0.45);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.whatsapp-fab:hover {
  transform: translateY(-2px);
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: 0 14px 32px rgba(18, 140, 126, 0.55);
}

.whatsapp-fab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .whatsapp-fab {
    left: 1rem;
    right: 1rem;
    justify-content: center;
    bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
  }
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Hero */
.hero {
  text-align: center;
  padding: 4rem 2rem;
  background: radial-gradient(ellipse at center top, rgba(245, 197, 24, 0.08) 0%, transparent 60%);
}

.hero h1 {
  font-size: 2.75rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--gold), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Streams grid */
.section {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.live-dot {
  width: 10px;
  height: 10px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.streams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.stream-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s;
}

.stream-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
}

.stream-thumb {
  cursor: pointer;
}

.stream-thumb:hover {
  opacity: 0.95;
}

.stream-thumb {
  height: 160px;
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.stream-thumb .live-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--red);
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.stream-thumb .viewer-count {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(0, 0, 0, 0.7);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

.stream-info {
  padding: 1rem;
}

.stream-info h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.stream-info .broadcaster {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.share-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.share-row input {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--gold);
  font-size: 0.75rem;
  font-family: monospace;
}

.btn-sm {
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  white-space: nowrap;
}

.watch-btn {
  width: 100%;
  justify-content: center;
  text-decoration: none;
}

/* QR code section */
.qr-section {
  text-align: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.qr-section h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
  color: var(--gold);
}

.qr-hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.qr-box {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.qr-canvas,
.qr-image {
  border-radius: 12px;
  border: 4px solid var(--gold);
  background: #fff;
  display: block;
}

.qr-box-large {
  min-height: 280px;
  align-items: center;
}

.qr-preview-wrap {
  padding: 1.5rem;
}

.qr-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 1.5rem;
}

.qr-modal-content {
  background: var(--bg-card);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
}

.qr-modal-content h2 {
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.qr-modal-steps {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 1rem;
}

.qr-modal-content .link-row input {
  font-size: 0.75rem;
}

.viewer-share-box {
  margin-top: 1rem;
  padding-top: 0.5rem;
}

.viewer-share-box .qr-hint {
  margin-bottom: 0.75rem;
}

.viewer-share-box a {
  color: var(--gold);
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

/* Stream room layout */
.stream-room {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1rem;
  padding: 1rem;
  height: calc(100vh - 65px);
}

.video-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.video-container {
  flex: 1;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  min-height: min(55vh, 480px);
}

#remote-video {
  display: block !important;
  width: 100%;
  height: 100%;
  min-height: 240px;
  position: absolute;
  inset: 0;
  object-fit: contain;
  background: #000;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.35s ease;
  contain: strict;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

#remote-video.is-live {
  opacity: 1;
  z-index: 5;
}

#host-live-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  z-index: 2;
  display: none;
}

#host-live-video.is-live {
  display: block !important;
}

.host-frame-feed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  z-index: 3;
  display: none;
}

.host-frame-feed.is-live {
  display: block !important;
}

.host-status-panel {
  position: relative;
  min-height: 280px;
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-dark));
  border-radius: var(--radius);
  overflow: hidden;
}

.host-direct-badge {
  position: absolute;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.host-status-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
}

.frame-feed {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  position: absolute;
  inset: 0;
  z-index: 4;
  contain: strict;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.frame-feed.is-live {
  display: block !important;
  z-index: 5;
  opacity: 1;
}

.unmute-btn {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.unmute-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

#host-live-video,
#remote-video {
  image-rendering: auto;
  max-width: 100%;
  max-height: 100%;
}

.preview-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-dark));
  color: var(--text-muted);
  text-align: center;
  padding: 1rem;
  transition: opacity 0.28s ease;
}

.preview-overlay.is-hiding {
  opacity: 0;
  pointer-events: none;
}

#camera-preview {
  position: relative;
  min-height: 280px;
}

.stream-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.stream-meta h2 {
  font-size: 1.15rem;
}

.stream-meta .meta-details {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.broadcaster-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
}

/* Viewer desktop: keep Live Chat visible; scroll the rest of the sidebar */
@media (min-width: 769px) {
  body.viewer-page .sidebar {
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body.viewer-page .chat-panel {
    flex: 1 1 auto;
    min-height: 280px;
  }

  body.viewer-page .sidebar > .panel:not(.chat-panel) {
    flex-shrink: 0;
  }
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* Chat */
.chat-panel {
  flex: 1;
}

.chat-messages {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 100%;
}

.chat-msg {
  padding: 0.4rem 0;
  font-size: 0.9rem;
  word-break: break-word;
}

.chat-msg .name {
  font-weight: 600;
  color: var(--gold);
  margin-right: 0.4rem;
}

.chat-msg .time {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-left: 0.4rem;
}

.chat-input-area {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}

.chat-input-area input {
  flex: 1;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.9rem;
}

.chat-input-area input:focus {
  outline: none;
  border-color: var(--gold);
}

/* Lottery */
.lottery-panel .panel-body {
  padding: 1rem;
  max-height: 360px;
  overflow-y: auto;
}

.lottery-prize {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.lottery-timer {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin: 0.75rem 0;
  font-variant-numeric: tabular-nums;
}

.lottery-entries {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.lottery-winner {
  text-align: center;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.15), rgba(0, 200, 83, 0.15));
  border-radius: 8px;
  margin-top: 0.75rem;
}

.lottery-winner .winner-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
}

.lottery-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lottery-form input,
.lottery-form select {
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.9rem;
}

.lottery-form input:focus,
.lottery-form select:focus {
  outline: none;
  border-color: var(--gold);
}

.lottery-form label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.lottery-form textarea {
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.9rem;
  font-family: monospace;
  resize: vertical;
  min-height: 120px;
}

.lottery-form textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.pick-count-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.pick-count-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.65rem 0.5rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}

.pick-count-option:has(input:checked) {
  border-color: var(--gold);
  background: rgba(245, 197, 24, 0.1);
}

.pick-count-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pick-count-label {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}

.pick-count-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.ready-pick-count {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 0.5rem;
}

.lottery-number-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Lottery overlay on video — draw only */
.lottery-overlay {
  position: absolute;
  inset: 0;
  z-index: 200;
  background: rgba(8, 6, 18, 0.88);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
}

.lottery-overlay:not(.hidden) {
  pointer-events: auto;
}

.lottery-draw-overlay {
  width: 100%;
  max-width: 420px;
  text-align: center;
  padding: 1.5rem 1rem;
}

.lottery-overlay-header h2,
.lottery-draw-overlay h2 {
  color: var(--gold);
  font-size: 1.4rem;
  margin: 0.5rem 0 0.25rem;
  font-weight: 700;
}

.lottery-overlay-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 1rem;
  min-height: 1.4em;
}

.lottery-live-badge {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

.lottery-number-display {
  width: 160px;
  height: 160px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: radial-gradient(circle, rgba(245, 197, 24, 0.12), transparent 70%);
  box-shadow: 0 0 30px rgba(245, 197, 24, 0.2);
}

.lottery-spinner {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  min-width: 4ch;
  text-align: center;
  transition: opacity 0.12s ease;
  line-height: 1;
  will-change: opacity;
}

.lottery-progress {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* Sidebar winners list */
.sidebar-winners-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gold);
  margin: 0 0 0.5rem;
  text-align: center;
}

.sidebar-winners-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 360px;
  overflow-y: auto;
  margin-top: 0.5rem;
}

.sidebar-winner-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.6rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  animation: sidebarWinnerIn 0.35s ease backwards;
}

@keyframes sidebarWinnerIn {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

.sidebar-winner-rank {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 1.5rem;
}

.sidebar-winner-num {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

/* Winners panel on left of video — primary display after draw */
.winners-panel-left {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(300px, 46vw);
  z-index: 160;
  display: flex;
  flex-direction: column;
  background: linear-gradient(
    90deg,
    rgba(6, 5, 14, 0.97) 0%,
    rgba(10, 14, 23, 0.95) 78%,
    rgba(10, 14, 23, 0.55) 100%
  );
  padding: 0.9rem 0.7rem 0.9rem 0.85rem;
  overflow: hidden;
  border-right: 2px solid rgba(245, 197, 24, 0.5);
  box-shadow: 8px 0 28px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}

.winners-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  flex-shrink: 0;
}

.winners-panel-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gold);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.winners-panel-count {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--bg-dark);
  background: var(--gold);
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.winners-panel-prize {
  font-size: 0.82rem;
  color: var(--text);
  margin: 0 0 0.7rem;
  line-height: 1.35;
  flex-shrink: 0;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(245, 197, 24, 0.2);
}

.winners-panel-list {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  align-content: start;
  overflow-y: auto;
  padding-right: 0.2rem;
  -webkit-overflow-scrolling: touch;
}

.winners-panel-list::-webkit-scrollbar {
  width: 4px;
}

.winners-panel-list::-webkit-scrollbar-thumb {
  background: rgba(245, 197, 24, 0.35);
  border-radius: 4px;
}

.winners-panel-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.5rem 0.35rem;
  min-height: 54px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  border: 1px solid rgba(245, 197, 24, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: sidebarWinnerIn 0.35s ease backwards;
}

.winners-panel-item:nth-child(odd) {
  background: rgba(245, 197, 24, 0.08);
}

.winners-panel-rank {
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  line-height: 1;
}

.winners-panel-num {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  text-shadow: 0 0 12px rgba(245, 197, 24, 0.25);
  word-break: break-all;
  text-align: center;
}

/* On-screen winners grid (viewers see all numbers on the video) */
.winners-on-screen {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 170;
  background: linear-gradient(0deg, rgba(6, 5, 14, 0.96) 0%, rgba(6, 5, 14, 0.88) 75%, transparent 100%);
  padding: 0.65rem 0.75rem 0.85rem;
  max-height: 48%;
  overflow-y: auto;
  pointer-events: auto;
  border-top: 2px solid rgba(245, 197, 24, 0.4);
}

.winners-on-screen-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.55rem;
}

.winners-on-screen-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.winners-on-screen-prize {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.winners-on-screen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.4rem;
}

.winners-on-screen-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.4rem 0.35rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(245, 197, 24, 0.35);
  animation: sidebarWinnerIn 0.35s ease backwards;
}

.winners-on-screen-chip .chip-num {
  font-size: 0.82rem;
  text-align: center;
}

.winners-on-screen-chip.is-new {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(245, 197, 24, 0.25);
}

.chip-rank {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
}

.chip-num {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.chip-ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #1a1400;
  background: linear-gradient(135deg, #ffe082, #f5c518);
}

/* Settled winners — static list, no rolling animations */
.winners-on-screen.is-settled {
  max-height: 72%;
  background: linear-gradient(0deg, rgba(6, 5, 14, 0.98) 0%, rgba(6, 5, 14, 0.94) 85%, rgba(6, 5, 14, 0.88) 100%);
}

.winners-on-screen.is-settled .winners-on-screen-title::after {
  content: ' — Final';
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 0.35rem;
}

.winners-on-screen-chip--settled,
.winners-panel-item--settled,
.sidebar-winner-item--settled {
  animation: none !important;
}

.winners-on-screen.is-settled .winners-on-screen-grid {
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 0.45rem;
  max-height: none;
}

.winners-panel-list--settled,
.sidebar-winners-list--settled {
  animation: none;
}

.sidebar-winners-list--settled {
  max-height: 400px;
}

/* Live picked numbers during draw overlay — hidden when draw completes */
.winners-picked-live {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow-x: auto;
  max-width: 100%;
  margin-top: 1rem;
  padding: 0.5rem 0.25rem 0.25rem;
  border-top: 1px solid rgba(245, 197, 24, 0.25);
  -webkit-overflow-scrolling: touch;
}

.lottery-overlay.hidden .winners-picked-live {
  display: none;
}

.winners-picked-chip {
  flex: 0 0 auto;
  padding: 0.3rem 0.55rem;
  background: rgba(245, 197, 24, 0.15);
  border: 1px solid rgba(245, 197, 24, 0.45);
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  animation: sidebarWinnerIn 0.3s ease;
}

@media (max-width: 640px) {
  .winners-panel-left {
    width: min(168px, 44vw);
    padding: 0.65rem 0.5rem 0.65rem 0.6rem;
  }

  .winners-panel-title {
    font-size: 0.82rem;
  }

  .winners-panel-count {
    font-size: 0.58rem;
    padding: 0.15rem 0.35rem;
  }

  .winners-panel-prize {
    font-size: 0.72rem;
    margin-bottom: 0.5rem;
  }

  .winners-panel-list {
    gap: 0.35rem;
  }

  .winners-panel-item {
    min-height: 46px;
    padding: 0.4rem 0.25rem;
  }

  .winners-panel-num {
    font-size: 0.95rem;
  }

  .winners-on-screen {
    max-height: 52%;
  }

  .winners-on-screen-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .chip-num {
    font-size: 0.95rem;
  }

  .unmute-btn {
    bottom: auto;
    top: 0.75rem;
    z-index: 180;
  }
}

/* Setup modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.host-boot-status {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.65rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--gold);
  background: rgba(10, 14, 23, 0.92);
  border-bottom: 1px solid var(--border);
}

.host-boot-status.hidden {
  display: none;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 90%;
  max-width: 440px;
  box-shadow: var(--shadow);
}

.modal h2 {
  margin-bottom: 1.25rem;
  color: var(--gold);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-group input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.95rem;
}

.form-group input:focus {
  outline: none;
  border-color: var(--gold);
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.modal-actions .btn {
  flex: 1;
  justify-content: center;
}

.hidden {
  display: none !important;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 0.85rem 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 300;
  animation: slideIn 0.3s ease;
}

.toast.success { border-color: var(--green); }
.toast.error { border-color: var(--red); }

@keyframes slideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Camera link panel */
.link-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.link-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.link-row {
  display: flex;
  gap: 0.5rem;
}

.link-row input {
  flex: 1;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--gold);
  font-size: 0.85rem;
  font-family: monospace;
}

.camera-status {
  font-size: 0.9rem;
  font-weight: 600;
}

.camera-status.waiting { color: var(--text-muted); }
.camera-status.connected { color: var(--green); }

.camera-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.camera-live-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--green);
}

/* Camera device page */
.camera-body {
  background: #000;
  min-height: 100vh;
}

.camera-connect-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 2rem 1.5rem;
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
  text-align: center;
}

.camera-status-text {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 320px;
  line-height: 1.5;
}

.permission-help {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.25rem;
  max-width: 340px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: left;
}

.permission-help p {
  margin-bottom: 0.5rem;
}

.permission-help p:last-child {
  margin-bottom: 0;
}

.camera-start-btn {
  font-size: 1.1rem;
  padding: 1rem 1.75rem;
  width: 100%;
  max-width: 320px;
  justify-content: center;
}

.camera-flip-btn {
  margin-left: auto;
  padding: 0.4rem 0.75rem;
  min-width: auto;
  font-size: 1.1rem;
}

.camera-active-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #000;
}

.camera-active-screen video {
  flex: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.camera-active-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  z-index: 10;
}

.camera-active-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  z-index: 10;
}

/* Responsive */
@media (max-width: 900px) {
  .stream-room {
    grid-template-columns: 1fr;
    height: auto;
  }

  .sidebar {
    max-height: 500px;
  }

  .hero h1 {
    font-size: 2rem;
  }
}

/* ─── Viewer intro (rolling lottery on link open) ─── */
.viewer-intro {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(245, 197, 24, 0.12), transparent 70%),
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(0, 200, 83, 0.08), transparent 60%),
    linear-gradient(160deg, #06050e 0%, #0a0e17 45%, #12182a 100%);
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

.viewer-intro.hidden {
  display: none;
}

.viewer-intro.is-exiting {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.viewer-intro-inner {
  text-align: center;
  padding: 1.5rem;
  max-width: 420px;
  width: 100%;
  animation: viewerIntroIn 0.7s ease;
}

@keyframes viewerIntroIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.viewer-intro-badge {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  letter-spacing: 0.08em;
  margin-bottom: 0.85rem;
  animation: watermarkPulse 2s ease-in-out infinite;
}

.viewer-intro-title {
  font-size: clamp(2rem, 8vw, 2.75rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold) 0%, #fff 45%, var(--green) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 0.35rem;
  animation: jantaShimmer 3s linear infinite;
}

.viewer-intro-tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 1.5rem;
}

.viewer-intro-wheel {
  position: relative;
  width: min(200px, 52vw);
  height: min(200px, 52vw);
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.viewer-intro-wheel-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(245, 197, 24, 0.35);
  box-shadow:
    0 0 40px rgba(245, 197, 24, 0.2),
    inset 0 0 30px rgba(245, 197, 24, 0.06);
  animation: introWheelSpin 8s linear infinite;
}

.viewer-intro-wheel-ring::before {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 2px dashed rgba(245, 197, 24, 0.2);
  animation: introWheelSpin 12s linear infinite reverse;
}

@keyframes introWheelSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.viewer-intro-spinner {
  position: relative;
  z-index: 2;
  font-size: clamp(2.5rem, 10vw, 3.5rem);
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  min-width: 4ch;
  text-align: center;
  text-shadow: 0 0 24px rgba(245, 197, 24, 0.45);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.viewer-intro-spinner.is-final {
  transform: scale(1.12);
  color: #fff;
  text-shadow: 0 0 30px rgba(245, 197, 24, 0.7);
}

.viewer-intro-sub {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0 0 0.65rem;
}

.viewer-intro-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
}

.viewer-intro-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  animation: introDotBounce 1.2s ease-in-out infinite;
}

.viewer-intro-dots span:nth-child(2) { animation-delay: 0.15s; }
.viewer-intro-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes introDotBounce {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-5px); }
}

/* ─── Janta Bets watermark (viewer video, bottom-right) ─── */
.janta-watermark {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 175;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.7rem 0.4rem 0.5rem;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(10, 14, 23, 0.82), rgba(18, 24, 42, 0.88));
  border: 1px solid rgba(245, 197, 24, 0.35);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
  user-select: none;
  animation: watermarkFloat 4s ease-in-out infinite;
  overflow: hidden;
}

.janta-watermark-glow {
  position: absolute;
  inset: -50%;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(245, 197, 24, 0.12) 50%,
    transparent 60%
  );
  animation: jantaShimmer 3.5s ease-in-out infinite;
  pointer-events: none;
}

.video-container:has(#winners-on-screen:not(.hidden)) .janta-watermark {
  bottom: calc(min(48%, 260px) + 0.5rem);
}

.janta-watermark-icon {
  position: relative;
  z-index: 1;
  font-size: 1.15rem;
  line-height: 1;
  animation: watermarkIconSpin 6s ease-in-out infinite;
}

@keyframes watermarkIconSpin {
  0%, 100% { transform: rotate(-6deg) scale(1); }
  50% { transform: rotate(6deg) scale(1.08); }
}

.janta-watermark-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  text-align: left;
}

.janta-watermark-brand {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.janta-watermark-bets {
  font-size: 0.95rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--gold), #fff, var(--green));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: jantaShimmer 2.8s linear infinite;
}

@keyframes jantaShimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

@keyframes watermarkFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes watermarkPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 61, 87, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(255, 61, 87, 0); }
}

@media (max-width: 640px) {
  .janta-watermark {
    right: 0.5rem;
    bottom: 0.5rem;
    padding: 0.32rem 0.55rem 0.32rem 0.4rem;
    gap: 0.35rem;
  }

  .janta-watermark-icon {
    font-size: 1rem;
  }

  .janta-watermark-brand {
    font-size: 0.62rem;
  }

  .janta-watermark-bets {
    font-size: 0.82rem;
  }

  .video-container:has(#winners-on-screen:not(.hidden)) .janta-watermark {
    bottom: calc(min(52%, 240px) + 0.4rem);
  }
}

/* ─── janta.ke animated banner (top of video / site) ─── */
/* Never show on host/admin panel or camera capture */
body.host-page .shopwin-banner,
body.camera-body .shopwin-banner {
  display: none !important;
}

.shopwin-banner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  background: linear-gradient(
    90deg,
    rgba(8, 12, 28, 0.94) 0%,
    rgba(22, 16, 48, 0.92) 25%,
    rgba(12, 40, 28, 0.92) 50%,
    rgba(22, 16, 48, 0.92) 75%,
    rgba(8, 12, 28, 0.94) 100%
  );
  background-size: 200% 100%;
  animation: shopwinBgShift 6s ease-in-out infinite;
  border-bottom: 2px solid rgba(245, 197, 24, 0.55);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(245, 197, 24, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.shopwin-banner--site {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  margin: 0;
}

.shopwin-banner--camera {
  position: relative;
  top: auto;
  flex-shrink: 0;
}

.shopwin-banner-tagline-static {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a5f3c4;
  animation: shopwinTaglineGlow 2s ease-in-out infinite;
}

@keyframes shopwinTaglineGlow {
  0%, 100% { opacity: 0.85; text-shadow: 0 0 8px rgba(74, 222, 128, 0.4); }
  50% { opacity: 1; text-shadow: 0 0 16px rgba(74, 222, 128, 0.8); }
}

.shopwin-banner-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 215, 80, 0.2) 48%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 215, 80, 0.2) 52%,
    transparent 70%
  );
  background-size: 200% 100%;
  animation: shopwinShine 3s ease-in-out infinite;
}

.shopwin-banner-sparkles span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffd54f;
  box-shadow: 0 0 6px #ffd54f;
  animation: shopwinSparkle 2.5s ease-in-out infinite;
}

.shopwin-banner-sparkles span:nth-child(1) { left: 8%; top: 30%; animation-delay: 0s; }
.shopwin-banner-sparkles span:nth-child(2) { left: 22%; top: 65%; animation-delay: 0.4s; }
.shopwin-banner-sparkles span:nth-child(3) { left: 45%; top: 25%; animation-delay: 0.8s; }
.shopwin-banner-sparkles span:nth-child(4) { left: 72%; top: 55%; animation-delay: 1.2s; }
.shopwin-banner-sparkles span:nth-child(5) { left: 90%; top: 35%; animation-delay: 1.6s; }

.shopwin-banner-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.55rem 1rem;
  min-height: 44px;
}

.shopwin-banner-icon {
  font-size: 1.15rem;
  line-height: 1;
  animation: shopwinBounce 1.8s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(255, 213, 79, 0.6));
}

.shopwin-banner-icon-right {
  animation-delay: 0.9s;
}

.shopwin-banner-brand {
  display: inline-flex;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  flex-shrink: 0;
}

.shopwin-letter {
  display: inline-block;
  background: linear-gradient(180deg, #fff8e1 0%, #ffd54f 40%, #f5a623 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  animation: shopwinLetterPop 2.4s ease-in-out infinite;
}

.shopwin-letter:nth-child(1) { animation-delay: 0s; }
.shopwin-letter:nth-child(2) { animation-delay: 0.1s; }
.shopwin-letter:nth-child(3) { animation-delay: 0.2s; }
.shopwin-letter:nth-child(4) { animation-delay: 0.3s; }
.shopwin-letter:nth-child(5) { animation-delay: 0.4s; }
.shopwin-letter:nth-child(6) { animation-delay: 0.5s; }
.shopwin-letter:nth-child(7) { animation-delay: 0.6s; }
.shopwin-letter:nth-child(8) { animation-delay: 0.7s; }

.shopwin-letter-dot {
  font-size: 1.2em;
  line-height: 0.8;
}

.shopwin-banner-divider {
  width: 2px;
  height: 1.25rem;
  background: linear-gradient(180deg, transparent, #ffd54f, transparent);
  flex-shrink: 0;
  animation: shopwinPulse 1.5s ease-in-out infinite;
}

.shopwin-banner-marquee {
  flex: 1;
  max-width: 320px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.shopwin-banner-marquee-track {
  display: flex;
  width: max-content;
  gap: 2.5rem;
  animation: shopwinMarquee 12s linear infinite;
  white-space: nowrap;
}

.shopwin-banner-marquee-track span {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a5f3c4;
  text-shadow:
    0 0 12px rgba(74, 222, 128, 0.5),
    0 1px 2px rgba(0, 0, 0, 0.8);
}

@keyframes shopwinBgShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes shopwinShine {
  0%, 100% { background-position: 200% 0; opacity: 0.6; }
  50% { background-position: -200% 0; opacity: 1; }
}

@keyframes shopwinMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes shopwinLetterPop {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.08); }
}

@keyframes shopwinBounce {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.15) rotate(-8deg); }
  75% { transform: scale(1.15) rotate(8deg); }
}

@keyframes shopwinSparkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 1; transform: scale(1.2); }
}

@keyframes shopwinPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@media (max-width: 600px) {
  .shopwin-banner-inner {
    padding: 0.45rem 0.65rem;
    gap: 0.45rem;
    min-height: 40px;
  }

  .shopwin-banner-brand {
    font-size: 0.95rem;
  }

  .shopwin-banner-marquee {
    max-width: 140px;
  }

  .shopwin-banner-marquee-track span {
    font-size: 0.72rem;
  }

  .shopwin-banner-icon {
    font-size: 0.95rem;
  }

  .shopwin-banner-icon-right {
    display: none;
  }
}

/* ─── Lottery-only stage (no video) ─── */
.lottery-stage {
  min-height: min(52vh, 480px);
  background: linear-gradient(165deg, #0a0e17 0%, #12182a 50%, #0d1520 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lottery-stage-idle {
  text-align: center;
  padding: 3rem 1.5rem;
  max-width: 560px;
  margin: 0 auto;
}

.lottery-stage-idle:has(.draw-ball-arena--with-winners) {
  max-width: min(100%, 1280px);
  width: 100%;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.lottery-stage-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem 1.1rem;
  flex-wrap: wrap;
  margin: 0 auto 1rem;
  max-width: 100%;
}

.lottery-stage-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  margin: 0;
  flex-shrink: 0;
}

.lottery-stage-icon-img {
  display: block;
  width: min(9.5rem, 42vw);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.45),
    0 0 0 3px rgba(245, 197, 24, 0.28);
}

.lottery-stage-transfer-note {
  margin: 0;
  max-width: 14rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  text-align: left;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
  color: #fff8d6;
  background: rgba(245, 197, 24, 0.12);
  border: 1px solid rgba(245, 197, 24, 0.35);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.lottery-stage-transfer-note a {
  color: #fff;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lottery-stage-idle h3 {
  font-size: 1.35rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.lottery-stage-idle p:not(.lottery-stage-transfer-note) {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.lottery-stage:has(#winners-on-screen:not(.hidden)) .lottery-stage-idle,
.lottery-stage:has(#winners-panel-left:not(.hidden)) .lottery-stage-idle,
.lottery-stage:has(#lottery-overlay:not(.hidden)) .lottery-stage-idle,
.lottery-stage:has(#participate-overlay:not(.hidden)) .lottery-stage-idle {
  display: none;
}

.lottery-stage.has-open-draws #viewer-lottery-idle {
  display: block !important;
}

.lottery-stage.has-open-draws #viewer-lottery-idle.hidden {
  display: block !important;
}

.lottery-stage:has(.winners-on-screen.is-settled) .shopwin-banner {
  opacity: 0.85;
}

.lottery-stage .participate-overlay {
  top: 3.25rem;
}

.lottery-stage:has(#participate-overlay:not(.hidden)) .shopwin-banner {
  z-index: 220;
}

.lottery-thumb {
  background: linear-gradient(135deg, #12182a, #1a2236) !important;
}

/* ─── Previous winners history ─── */
.drawing-live-list {
  max-height: 220px;
  margin-top: 0.5rem;
}

.drawing-status {
  color: var(--green);
  font-size: 0.88rem;
  text-align: center;
  font-weight: 600;
  margin: 0.25rem 0;
}

.drawing-picked-count {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

.history-draw-card--latest {
  border-color: rgba(245, 197, 24, 0.55);
  box-shadow: 0 0 0 1px rgba(245, 197, 24, 0.2);
}

.history-draw-meta {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 0.35rem;
}

/* ─── Previous winners history ─── */
.history-panel .panel-body {
  max-height: 380px;
  overflow-y: auto;
}

.empty-history {
  color: var(--text-muted);
  font-size: 0.88rem;
  text-align: center;
  padding: 1rem 0.5rem;
}

.history-draw-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
}

.history-download-btn {
  width: 100%;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  padding: 0.45rem 0.65rem;
}

.btn-sm {
  font-size: 0.8rem;
  padding: 0.45rem 0.75rem;
}

.history-draw-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.history-draw-prize {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.3;
}

.history-draw-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.history-draw-winners {
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.history-draw-details {
  margin-top: 0.4rem;
  font-size: 0.75rem;
}

.history-draw-details summary {
  cursor: pointer;
  color: var(--text-muted);
  user-select: none;
}

.history-draw-all {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.5rem;
}

.history-winner-chip {
  font-size: 0.72rem;
  padding: 0.2rem 0.4rem;
  background: rgba(245, 197, 24, 0.1);
  border: 1px solid rgba(245, 197, 24, 0.25);
  border-radius: 4px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.history-winner-chip b {
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 0.15rem;
}

/* ─── Weekly draw schedule (waiting state) ─── */
.lottery-stage-lead {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.draw-schedule {
  margin-top: 0.5rem;
  width: 100%;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.draw-schedule-intro {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.draw-schedule-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.draw-schedule-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  animation: sidebarWinnerIn 0.5s ease backwards;
}

.draw-schedule-tuesday {
  border-color: rgba(0, 200, 83, 0.35);
  background: linear-gradient(160deg, rgba(0, 200, 83, 0.12), rgba(255, 255, 255, 0.03));
}

.draw-schedule-friday {
  border-color: rgba(245, 197, 24, 0.4);
  background: linear-gradient(160deg, rgba(245, 197, 24, 0.14), rgba(255, 255, 255, 0.03));
  animation-delay: 0.1s;
}

.draw-schedule-day {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.draw-schedule-winners {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.draw-schedule-winners strong {
  font-size: 1.35rem;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.draw-schedule-amount {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--green);
}

.draw-schedule--compact .draw-schedule-cards {
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.draw-schedule--compact .draw-schedule-card {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.75rem;
  text-align: left;
}

.draw-schedule--compact .draw-schedule-winners {
  font-size: 0.85rem;
}

.draw-schedule--compact .draw-schedule-winners strong {
  font-size: 1rem;
}

.lottery-idle-panel {
  padding: 0.75rem 0.25rem;
}

.lottery-idle-title {
  text-align: center;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

@media (max-width: 480px) {
  .draw-schedule-cards {
    grid-template-columns: 1fr;
  }

  .draw-schedule-card {
    padding: 0.85rem;
  }
}

/* ─── Host draw board (open draws + winners) ─── */
.host-draw-board {
  max-width: 100%;
  width: 100%;
  padding: 1.25rem 1rem 1rem;
  text-align: left;
}

.host-open-draws-header {
  text-align: center;
  margin-bottom: 1rem;
}

.host-open-draws-header h3 {
  font-size: 1.35rem;
  color: var(--gold);
  margin: 0.35rem 0 0.25rem;
}

.host-open-live-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #fff;
  background: var(--red);
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  animation: participatePulse 1.4s ease-in-out infinite;
}

.host-open-draws-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.host-stage-winners-section {
  margin: 0.5rem 0 1rem;
  padding: 1rem;
  border: 1px solid rgba(0, 200, 83, 0.22);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(0, 200, 83, 0.06) 0%, rgba(0, 0, 0, 0.2) 100%);
}

.host-stage-winners-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.host-stage-winners-heading h4 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  color: var(--text);
}

.host-stage-winners-lead {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.host-stage-winners-total {
  flex-shrink: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--green);
  background: rgba(0, 200, 83, 0.12);
  border: 1px solid rgba(0, 200, 83, 0.28);
  font-variant-numeric: tabular-nums;
}

.host-stage-winners-total:empty {
  display: none;
}

.host-winners-history {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: min(42vh, 360px);
  overflow-y: auto;
  padding-right: 0.15rem;
}

.host-winners-history-card {
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.host-winners-history-card.tier-500 {
  border-color: rgba(186, 104, 255, 0.3);
}

.host-winners-history-card.tier-200 {
  border-color: rgba(245, 197, 24, 0.28);
}

.host-winners-history-card.tier-100 {
  border-color: rgba(0, 200, 83, 0.25);
}

.host-winners-history-card.tier-50 {
  border-color: rgba(79, 195, 247, 0.25);
}

.host-winners-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

.host-winners-history-prize {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gold);
}

.host-winners-history-date {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.host-winners-history-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  flex-shrink: 0;
}

.host-winners-history-count {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--green);
}

.host-winners-history-status {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
}

.host-winners-history-status--open {
  color: var(--gold);
  background: rgba(245, 197, 24, 0.12);
  border: 1px solid rgba(245, 197, 24, 0.28);
}

.host-winners-history-status--done {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.host-winners-history-status--closed {
  color: #f0a060;
  background: rgba(240, 160, 96, 0.1);
  border: 1px solid rgba(240, 160, 96, 0.28);
}

.host-winners-history-meta {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.host-winners-history-panel {
  margin-top: 0.35rem;
}

.host-winners-sheet-wrap {
  overflow: auto;
  max-height: min(42vh, 320px);
  border: 1px solid rgba(0, 200, 83, 0.22);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
}

.host-winners-sheet {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  table-layout: fixed;
}

.host-winners-sheet thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.host-winners-sheet th {
  padding: 0.45rem 0.55rem;
  text-align: left;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(12, 18, 28, 0.98);
  border-bottom: 1px solid rgba(0, 200, 83, 0.2);
}

.host-winners-sheet td {
  padding: 0.48rem 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.host-winners-sheet tr:last-child td {
  border-bottom: none;
}

.host-winners-sheet-row:hover td {
  background: rgba(0, 200, 83, 0.06);
}

.host-winners-sheet-col--num {
  width: 2.1rem;
  text-align: center;
  color: var(--text-muted);
  font-weight: 800;
}

.host-winners-sheet-col--ball {
  width: 3.2rem;
  text-align: center;
  padding-left: 0.35rem !important;
  padding-right: 0.35rem !important;
}

.host-winners-sheet td.host-winners-sheet-col--ball {
  overflow: visible;
}

.host-winners-sheet-col--contact {
  font-weight: 700;
  color: var(--green);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.host-winners-contact {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
}

.host-winners-sheet-col--amount {
  width: 5.8rem;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
  padding-right: 0.55rem !important;
}

.host-winners-sheet th.host-winners-sheet-col--amount {
  text-align: right;
  padding-right: 0.55rem !important;
}

.host-winners-sheet-col--time {
  width: 4.2rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@keyframes hostWinnersPanelIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.host-mini-sheet-wrap--stage {
  max-height: 220px;
}

.host-open-draw-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 0.65rem;
  text-align: center;
}

.host-open-draw-card.tier-500 {
  border-color: rgba(186, 104, 255, 0.45);
  background: rgba(186, 104, 255, 0.08);
}

.host-open-draw-card.tier-200 {
  border-color: rgba(245, 197, 24, 0.45);
  background: rgba(245, 197, 24, 0.06);
}

.host-open-draw-card.tier-100 {
  border-color: rgba(0, 200, 83, 0.35);
  background: rgba(0, 200, 83, 0.05);
}

.host-open-draw-card.tier-50 {
  border-color: rgba(79, 195, 247, 0.35);
  background: rgba(79, 195, 247, 0.05);
}

.host-open-draw-status {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--green);
  margin-bottom: 0.35rem;
}

.host-open-draw-amount {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.host-open-draw-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.host-open-draw-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.host-open-draw-card-actions .btn {
  width: 100%;
}

.host-draw-block-close {
  margin-left: auto;
  flex-shrink: 0;
}

.host-stage-winners {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem;
  margin-bottom: 0.75rem;
  max-height: min(42vh, 320px);
  overflow: auto;
}

.host-stage-winners-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.host-stage-winners-head h4 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
}

.host-stage-winners-total {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.host-draw-winners-section {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem;
  margin-bottom: 0.55rem;
  background: rgba(255, 255, 255, 0.03);
}

.host-draw-winners-section:last-child {
  margin-bottom: 0;
}

.host-draw-winners-section.tier-500 {
  border-color: rgba(186, 104, 255, 0.32);
}

.host-draw-winners-section.tier-200 {
  border-color: rgba(245, 197, 24, 0.3);
}

.host-draw-winners-section.tier-100 {
  border-color: rgba(0, 200, 83, 0.28);
}

.host-draw-winners-section.tier-50 {
  border-color: rgba(79, 195, 247, 0.28);
}

.host-draw-winners-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.host-draw-winners-label {
  font-weight: 700;
  color: var(--gold);
  font-size: 0.88rem;
}

.host-draw-winners-count {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.host-draw-winners-empty {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.host-draw-winners-nums {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.host-winner-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  background: rgba(0, 200, 83, 0.08);
  border: 1px solid rgba(0, 200, 83, 0.2);
}

.host-winner-rank {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  min-width: 1.25rem;
}

.host-winner-phone {
  font-size: 0.88rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.host-winner-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.host-batch-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.host-batch-hint summary {
  cursor: pointer;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.lottery-stage:has(#host-lottery-idle:not(.hidden)) {
  align-items: flex-start;
  justify-content: flex-start;
  overflow: auto;
}

@media (max-width: 720px) {
  .host-open-draws-grid {
    grid-template-columns: 1fr;
  }
}

.host-draw-presets {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.host-draw-preset-card {
  border-radius: 12px;
  padding: 0.85rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.host-draw-preset-card.tier-500 {
  border-color: rgba(186, 104, 255, 0.45);
  background: rgba(186, 104, 255, 0.08);
}

.host-draw-preset-card.tier-200 {
  border-color: rgba(245, 197, 24, 0.4);
  background: rgba(245, 197, 24, 0.06);
}

.host-draw-preset-card.tier-100 {
  border-color: rgba(0, 200, 83, 0.35);
  background: rgba(0, 200, 83, 0.05);
}

.host-draw-preset-card.tier-50 {
  border-color: rgba(79, 195, 247, 0.35);
  background: rgba(79, 195, 247, 0.05);
}

.host-draw-preset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.host-draw-preset-amount {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold);
}

.host-draw-preset-status {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #fff;
  background: var(--green);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.host-draw-preset-card label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.host-draw-preset-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.host-draw-preset-field--full {
  grid-column: 1 / -1;
}

.host-draw-preset-field label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.host-draw-preset-field input[type="number"],
.host-draw-preset-field input[type="datetime-local"] {
  width: 100%;
  margin-bottom: 0;
}

.host-draw-preset-card input[type="number"],
.host-draw-preset-card input[type="datetime-local"] {
  width: 100%;
  margin-bottom: 0.6rem;
}

.host-pool-hint {
  font-size: 0.72rem;
  color: var(--gold);
  margin: -0.35rem 0 0.35rem;
  line-height: 1.35;
}

.host-autodraw-hint {
  font-size: 0.72rem;
  color: rgba(200, 210, 230, 0.78);
  margin: 0 0 0.55rem;
  line-height: 1.35;
}

.host-autodraw-save-btn {
  width: 100%;
  margin-top: 0.4rem;
}

.host-autodraw-live {
  margin: 0.35rem 0 0.55rem;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff8d6;
  background: rgba(245, 197, 24, 0.12);
  border: 1px solid rgba(245, 197, 24, 0.28);
}

.host-autodraw-live--manual {
  color: rgba(200, 210, 230, 0.7);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  font-weight: 600;
}

.host-draw-preset-btn {
  width: 100%;
}

.host-draw-preset-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.host-stage-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.host-stage-panel {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  max-height: min(44vh, 340px);
  overflow: auto;
}

.host-stage-panel--participants {
  border-color: rgba(79, 195, 247, 0.3);
}

.host-stage-panel--winners {
  border-color: rgba(0, 200, 83, 0.35);
}

.host-stage-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  position: sticky;
  top: 0;
  background: inherit;
  z-index: 1;
  padding-bottom: 0.35rem;
}

.host-stage-panel-head h4 {
  margin: 0;
  font-size: 0.92rem;
}

.host-stage-panel-total {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.host-stage-panel-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.host-draw-block {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem;
  background: rgba(255, 255, 255, 0.03);
}

.host-draw-block--winners {
  border-color: rgba(0, 200, 83, 0.28);
  background: rgba(0, 200, 83, 0.04);
}

.host-draw-block-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.host-draw-block-title {
  font-weight: 700;
  color: var(--gold);
  font-size: 0.9rem;
}

.host-draw-block-badge {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.host-draw-block-badge--open {
  color: #fff;
  background: var(--green);
}

.host-draw-block-badge--done {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.08);
}

.host-draw-block-badge--win {
  color: #052e16;
  background: linear-gradient(135deg, #4ade80, var(--green));
}

.host-draw-block-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0 0 0.45rem;
}

.host-draw-block-empty {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.host-phone-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-height: 200px;
  overflow: auto;
  counter-reset: host-phone;
}

.host-phone-list--participants .host-phone-row {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.host-phone-list--winners .host-phone-row--winner {
  background: rgba(0, 200, 83, 0.1);
  border: 1px solid rgba(0, 200, 83, 0.28);
}

.host-phone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  counter-increment: host-phone;
}

.host-phone-row::before {
  content: counter(host-phone);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold);
  min-width: 1.25rem;
}

.host-phone-num {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.host-phone-time {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.host-open-draw-participants-section {
  margin: 0.5rem 0 0.65rem;
}

.host-open-draw-participants-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.35rem;
}

@media (max-width: 900px) {
  .host-stage-split {
    grid-template-columns: 1fr;
  }
}

.host-open-draw-card--closed {
  opacity: 0.55;
  border-style: dashed !important;
}

.host-open-draw-status--closed {
  color: var(--text-muted) !important;
}

.open-draw-form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.35rem 0 0.75rem;
  line-height: 1.45;
}

.host-open-draws-list {
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.host-open-draws-list-label {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.host-open-draw-manage {
  border: 1px solid rgba(0, 200, 83, 0.35);
  border-radius: 10px;
  padding: 0.75rem;
  background: rgba(0, 200, 83, 0.05);
}

.host-open-draw-manage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.host-open-draw-manage-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--green);
}

.host-open-draw-manage-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.host-open-draw-participants {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
  max-height: 120px;
  overflow: auto;
}

.host-participant-chip {
  font-size: 0.75rem;
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

.host-open-draw-manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.host-no-open-draws {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 1rem;
  grid-column: 1 / -1;
}

.participate-open-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--green);
  margin-bottom: 0.35rem;
}

.host-open-draw-card--live {
  border-color: rgba(0, 200, 83, 0.45) !important;
  animation: hostOpenPulse 2s ease-in-out infinite;
}

@keyframes hostOpenPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 200, 83, 0.2); }
  50% { box-shadow: 0 0 0 6px rgba(0, 200, 83, 0); }
}

.link-prefix {
  padding: 0.6rem 0.5rem 0.6rem 0.85rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 8px 0 0 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: monospace;
  white-space: nowrap;
}

.link-row:has(.link-prefix) input {
  border-radius: 0 8px 8px 0;
}

.viewer-link-preview {
  font-size: 0.8rem;
  color: var(--gold);
  font-family: monospace;
  margin-top: 0.4rem;
  word-break: break-all;
}

.hero-permalink {
  margin: 0.75rem 0 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

.permalink-url {
  font-family: monospace;
  color: var(--gold);
  font-weight: 600;
}

/* ─── Viewer participate draws ─── */
.viewer-account-badge {
  font-size: 0.8rem;
  color: var(--green);
  background: rgba(0, 200, 83, 0.12);
  border: 1px solid rgba(0, 200, 83, 0.35);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  margin-right: 0.5rem;
}

.viewer-wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-right: 0.5rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(245, 197, 66, 0.4);
  background: linear-gradient(145deg, rgba(245, 197, 66, 0.16), rgba(13, 27, 61, 0.85));
  color: #f5c542;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.viewer-wallet-chip:hover {
  box-shadow: 0 0 14px rgba(245, 197, 66, 0.35);
}

.viewer-wallet-chip.hidden {
  display: none;
}

.viewer-wallet-chip-label {
  opacity: 0.75;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.viewer-wallet-chip-bal {
  font-family: ui-monospace, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.viewer-wallet-panel--pulse {
  box-shadow: 0 0 0 2px rgba(245, 197, 66, 0.55), 0 8px 28px rgba(245, 197, 66, 0.2);
}

.viewer-wallet-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.viewer-wallet-balance-card {
  padding: 0.85rem 0.9rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(245, 197, 66, 0.3);
  background:
    linear-gradient(160deg, rgba(245, 197, 66, 0.14), rgba(8, 16, 40, 0.9));
  text-align: center;
}

.viewer-wallet-balance-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.25rem;
}

.viewer-wallet-balance {
  display: block;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1.85rem;
  font-weight: 800;
  color: #f5c542;
  line-height: 1.1;
}

.viewer-wallet-balance small {
  font-size: 0.5em;
  opacity: 0.85;
}

.viewer-wallet-hint {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.35;
}

.viewer-wallet-withdraw-btn {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(245, 197, 66, 0.55);
  border-radius: 0.65rem;
  background: linear-gradient(180deg, #f5c542, #d4a017);
  color: #1a1200;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
}

.viewer-wallet-withdraw-btn:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.viewer-wallet-withdraw-btn:active:not(:disabled) {
  transform: translateY(0);
}

.viewer-wallet-withdraw-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

.viewer-wallet-txns-head {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.4rem;
}

.viewer-wallet-txns {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 220px;
  overflow-y: auto;
}

.viewer-wallet-txn {
  padding: 0.45rem 0.55rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
}

.viewer-wallet-txn.is-credit {
  border-color: rgba(0, 200, 83, 0.28);
}

.viewer-wallet-txn.is-debit {
  border-color: rgba(248, 113, 113, 0.28);
}

.viewer-wallet-txn-main {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
}

.viewer-wallet-txn-note {
  color: rgba(255, 255, 255, 0.85);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer-wallet-txn-amt {
  flex-shrink: 0;
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 700;
}

.viewer-wallet-txn.is-credit .viewer-wallet-txn-amt {
  color: #86efac;
}

.viewer-wallet-txn.is-debit .viewer-wallet-txn-amt {
  color: #fca5a5;
}

.viewer-wallet-txn-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.2rem;
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 640px) {
  .viewer-wallet-chip-label {
    display: none;
  }
}

/* ─── Phone registration gate (first screen) ─── */
.phone-auth-screen {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% 35%, rgba(245, 197, 24, 0.14), transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 75%, rgba(0, 200, 83, 0.1), transparent 60%),
    linear-gradient(160deg, #06050e 0%, #0a0e17 45%, #12182a 100%);
}

.phone-auth-screen.hidden {
  display: none;
}

.phone-auth-screen-inner {
  width: 100%;
  max-width: 420px;
  text-align: center;
  animation: phoneAuthIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes phoneAuthIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.phone-auth-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--gold);
  background: rgba(245, 197, 24, 0.12);
  border: 1px solid rgba(245, 197, 24, 0.35);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.phone-auth-title {
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.phone-auth-lead {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.phone-auth-card {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: left;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.phone-auth-submit {
  width: 100%;
  margin-top: 0.25rem;
}

.phone-auth-send-otp {
  width: 100%;
  margin-top: 0.35rem;
  margin-bottom: 0.35rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text);
}

.phone-auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.35rem;
  border-radius: 12px;
}

.phone-auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.65rem 0.5rem;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.phone-auth-tab--active {
  background: var(--bg-elevated);
  color: var(--gold);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.phone-auth-switch-hint {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.phone-auth-forgot {
  text-align: center;
  margin-top: 0.75rem;
}

.phone-auth-tabs.hidden {
  display: none;
}

.phone-auth-link-btn {
  background: none;
  border: none;
  color: var(--gold);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
  text-decoration: underline;
}

.viewer-logout-btn {
  font-size: 0.78rem;
  padding: 0.4rem 0.65rem;
  min-height: 36px;
}

.phone-auth-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.phone-auth-required {
  color: #f87171;
  font-weight: 700;
}

.participate-tiers {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.participate-tiers--stage {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.participate-tiers--sidebar {
  grid-template-columns: 1fr;
}

.participate-card {
  background: rgba(18, 24, 42, 0.88);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}

.participate-card.tier-500 {
  border-color: rgba(186, 104, 255, 0.65);
  background: linear-gradient(160deg, rgba(186, 104, 255, 0.16), rgba(18, 24, 42, 0.9));
}

.participate-card.tier-200 {
  border-color: rgba(245, 197, 24, 0.65);
  background: linear-gradient(160deg, rgba(245, 197, 24, 0.15), rgba(18, 24, 42, 0.9));
}

.participate-card.tier-100 {
  border-color: rgba(0, 200, 83, 0.55);
  background: linear-gradient(160deg, rgba(0, 200, 83, 0.12), rgba(18, 24, 42, 0.9));
}

.participate-card.tier-50 {
  border-color: rgba(79, 195, 247, 0.55);
  background: linear-gradient(160deg, rgba(79, 195, 247, 0.12), rgba(18, 24, 42, 0.9));
}

.participate-btn {
  width: 100%;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.participate-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.participate-card-tier {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.participate-card-pool {
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.5rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.participate-card-pool-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.participate-card-pool-balance {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.participate-card-pool-balance small {
  font-size: 0.55em;
  font-weight: 700;
  opacity: 0.9;
}

.participate-card-pool-meta {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.4;
}

.host-open-draw-pool-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.host-pool-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--gold);
  background: rgba(245, 197, 24, 0.12);
  border: 1px solid rgba(245, 197, 24, 0.35);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

.host-pool-badge--paid {
  color: var(--green);
  background: rgba(0, 200, 83, 0.12);
  border-color: rgba(0, 200, 83, 0.35);
}

#host-registered-viewers-panel .panel-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ─── Host control panel layout ─── */
body.host-page .stream-room {
  grid-template-columns: minmax(0, 1fr) min(400px, 36vw);
  gap: 1rem;
  padding: 1rem 1.1rem 1.25rem;
}

body.host-page .video-container {
  overflow-y: auto;
  overflow-x: hidden;
  min-height: min(68vh, 620px);
  -webkit-overflow-scrolling: touch;
}

body.host-page .lottery-stage {
  min-height: auto;
  align-items: stretch;
}

body.host-page .lottery-stage-idle.host-draw-board {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 1rem 0.85rem 1.25rem;
  text-align: left;
}

body.host-page .host-panel--winners-sidebar {
  border-color: rgba(0, 200, 83, 0.25);
}

body.host-page .host-panel-body--winners {
  max-height: 320px;
  padding: 0.65rem 0.75rem;
  overflow-y: auto;
}

body.host-page .host-panel-body--winners .host-winners-history {
  max-height: none;
  overflow: visible;
}

body.host-page .host-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  max-height: calc(100vh - 65px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.15rem;
  scrollbar-gutter: stable;
}

body.host-page .host-sidebar-section {
  padding-bottom: 0.85rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.host-page .host-sidebar-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

body.host-page .host-sidebar-section-label {
  margin: 0 0 0.5rem;
  padding: 0 0.15rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.85;
}

body.host-page .host-panel {
  margin-bottom: 0.55rem;
}

body.host-page .host-panel:last-child {
  margin-bottom: 0;
}

body.host-page .host-panel--primary {
  border-color: rgba(245, 197, 24, 0.28);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.22);
}

body.host-page .panel-header--host {
  padding: 0.7rem 0.85rem;
  gap: 0.55rem;
  align-items: flex-start;
  background: rgba(0, 0, 0, 0.18);
}

body.host-page .panel-header-icon {
  font-size: 1rem;
  line-height: 1.2;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

body.host-page .panel-header-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}

body.host-page .panel-header-title {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

body.host-page .host-registered-open-btn {
  margin-left: auto;
  flex-shrink: 0;
  text-decoration: none;
  white-space: nowrap;
}

#host-registered-viewers-panel .panel-header-badge {
  margin-left: 0;
}

body.host-page .host-registered-sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

body.host-page .host-registered-sheet-actions .btn {
  text-decoration: none;
}

body.host-page .panel-header-sub {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.35;
}

body.host-page .panel-header-badge {
  margin-left: auto;
  flex-shrink: 0;
  min-width: 1.5rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  text-align: center;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

body.host-page .panel-header-badge:not(:empty) {
  color: var(--gold);
  background: rgba(245, 197, 24, 0.1);
  border-color: rgba(245, 197, 24, 0.28);
}

body.host-page .panel-header-badge--win:not(:empty) {
  color: var(--green);
  background: rgba(0, 200, 83, 0.1);
  border-color: rgba(0, 200, 83, 0.28);
}

body.host-page .lottery-panel .panel-body {
  padding: 0.85rem;
  max-height: none;
}

body.host-page .host-panel-body--compact {
  max-height: 220px;
  padding: 0.65rem 0.75rem;
}

body.host-page .host-panel-body--accounts {
  max-height: 280px;
  padding: 0.65rem 0.75rem;
}

body.host-page .history-panel .panel-body {
  max-height: none;
}

body.host-page .host-activity-panels {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.host-withdrawals-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.host-withdrawal-row {
  padding: 0.65rem 0.7rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(245, 197, 66, 0.28);
  background: linear-gradient(160deg, rgba(245, 197, 66, 0.1), rgba(8, 16, 40, 0.85));
}

.host-withdrawal-row.is-paid {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.08);
  opacity: 0.85;
}

.host-withdrawal-main {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
}

.host-withdrawal-amt {
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 800;
  color: #f5c542;
  font-size: 1rem;
}

.host-withdrawal-phone {
  font-weight: 700;
  color: #fff;
  font-size: 0.9rem;
}

.host-withdrawal-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.25rem;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
}

.host-withdrawal-paid-btn {
  width: 100%;
  margin-top: 0.55rem;
}

.host-withdrawal-paid-label {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #86efac;
}

body.host-page .host-draw-presets {
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

body.host-page .host-draw-preset-card {
  padding: 0.7rem 0.75rem;
}

body.host-page .host-batch-hint--sidebar {
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

body.host-page .host-batch-btn {
  width: 100%;
  margin-top: 0.65rem;
}

body.host-page .host-batch-btn--secondary {
  margin-top: 0.45rem;
}

body.host-page .host-panel--chat {
  max-height: 240px;
}

body.host-page .host-panel--chat .chat-messages {
  max-height: 160px;
  min-height: 120px;
  padding: 0.65rem;
}

body.host-page .host-sidebar-section--chat {
  margin-top: auto;
  padding-top: 0.25rem;
}

body.host-page .chat-panel {
  flex: 0 0 auto;
}

body.host-page .host-draw-block {
  margin-bottom: 0;
}

body.host-page .host-draw-block + .host-draw-block {
  margin-top: 0.55rem;
}

.host-mini-sheet-wrap {
  overflow: auto;
  max-height: 140px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.15);
}

.host-mini-sheet {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
  table-layout: fixed;
}

.host-mini-sheet thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.host-mini-sheet th {
  padding: 0.35rem 0.45rem;
  text-align: left;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(18, 18, 26, 0.98);
  border-bottom: 1px solid var(--border);
}

.host-mini-sheet td {
  padding: 0.32rem 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.host-mini-sheet tr:last-child td {
  border-bottom: none;
}

.host-mini-sheet-col--num {
  width: 1.75rem;
  text-align: center;
  color: var(--text-muted);
  font-weight: 700;
}

.host-mini-sheet-col--phone {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.host-mini-sheet-col--time {
  width: 38%;
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.host-mini-sheet--winners tbody tr td {
  color: var(--green);
}

.host-registered-count {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.host-storage-warning {
  margin: 0 0 0.65rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #ffb74d;
  background: rgba(255, 183, 77, 0.1);
  border: 1px solid rgba(255, 183, 77, 0.35);
  border-radius: 8px;
}

.host-storage-ok {
  margin: 0 0 0.65rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #86efac;
  background: rgba(0, 200, 83, 0.1);
  border: 1px solid rgba(0, 200, 83, 0.35);
  border-radius: 8px;
}

.host-registered-sheet-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.host-registered-sheet-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.host-registered-sheet-wrap {
  overflow: auto;
  max-height: 320px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
}

.host-registered-sheet {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 0.82rem;
  table-layout: fixed;
}

.host-registered-sheet thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.host-registered-sheet th {
  padding: 0.55rem 0.65rem;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
  background: rgba(20, 20, 28, 0.98);
  border-bottom: 2px solid rgba(245, 197, 24, 0.35);
  white-space: nowrap;
}

.host-registered-sheet td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}

.host-registered-sheet td:not(.host-registered-sheet-col--ball):not(.host-registered-sheet-col--pin) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.host-registered-sheet-row:nth-child(even) td {
  background: rgba(255, 255, 255, 0.03);
}

.host-registered-sheet-row:hover td {
  background: rgba(245, 197, 24, 0.08);
}

.host-registered-sheet-row:last-child td {
  border-bottom: none;
}

.host-registered-sheet col.host-registered-sheet-col--num {
  width: 2.5rem;
}

.host-registered-sheet col.host-registered-sheet-col--ball {
  width: 3.5rem;
}

.host-registered-sheet col.host-registered-sheet-col--wallet,
.host-registered-sheet col.host-registered-sheet-col--won {
  width: 6.25rem;
}

.host-registered-sheet col.host-registered-sheet-col--wins {
  width: 3rem;
}

.host-registered-sheet col.host-registered-sheet-col--pin {
  width: 3.5rem;
}

.host-registered-sheet col.host-registered-sheet-col--date {
  width: 7.5rem;
}

.host-registered-sheet-col--num {
  text-align: right;
  font-weight: 800;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  padding-right: 0.45rem !important;
}

.host-registered-sheet th.host-registered-sheet-col--num {
  text-align: center;
  padding-right: 0.65rem !important;
}

.host-registered-sheet-col--ball {
  text-align: center;
  padding-left: 0.35rem !important;
  padding-right: 0.35rem !important;
}

.host-registered-sheet td.host-registered-sheet-col--ball {
  overflow: visible;
}

.host-registered-sheet-col--phone {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
}

.host-registered-sheet-col--wallet,
.host-registered-sheet-col--won {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--gold);
  font-size: 0.78rem;
  padding-left: 0.35rem !important;
  padding-right: 0.55rem !important;
}

.host-registered-sheet th.host-registered-sheet-col--wallet,
.host-registered-sheet th.host-registered-sheet-col--won {
  text-align: right;
  padding-right: 0.55rem !important;
}

.host-registered-sheet-col--wins {
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.host-registered-sheet-col--pin {
  text-align: center;
}

.host-registered-sheet-col--date {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.host-sheet-money {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.35rem;
  width: 100%;
  font-variant-numeric: tabular-nums;
}

.host-sheet-money-value {
  text-align: right;
  min-width: 0;
}

.host-sheet-money-unit {
  flex-shrink: 0;
  min-width: 1.65rem;
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: left;
}

.host-registered-pin {
  display: inline-block;
  min-width: 2.5rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
}

.host-registered-pin--set {
  color: var(--green);
  background: rgba(0, 200, 83, 0.12);
  border: 1px solid rgba(0, 200, 83, 0.3);
}

.host-registered-pin--none {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.participate-card--won {
  border-color: rgba(0, 200, 83, 0.45);
  box-shadow: 0 0 0 1px rgba(0, 200, 83, 0.2);
}

.participate-card--entered {
  opacity: 0.92;
}

.participate-btn--won {
  background: rgba(0, 200, 83, 0.2) !important;
  border-color: rgba(0, 200, 83, 0.45) !important;
  color: var(--green) !important;
}

.participate-btn--entered {
  opacity: 0.85;
}

.participate-card-amount {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.participate-card-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.participate-overlay {
  position: absolute;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
}

.participate-overlay.hidden {
  display: none;
}

.participate-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 16, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.participate-overlay-card {
  position: relative;
  z-index: 1;
  background: linear-gradient(165deg, #1a2236 0%, #0f1424 55%, #12182a 100%);
  border: 1px solid rgba(245, 197, 24, 0.25);
  border-radius: 16px;
  padding: 1.75rem 1.5rem 1.5rem;
  max-width: min(100%, 380px);
  width: 100%;
  text-align: center;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  overflow: hidden;
  animation: participateCardIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.participate-overlay--brand .participate-overlay-card {
  border-color: rgba(245, 197, 24, 0.45);
  background:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgba(245, 197, 24, 0.22), transparent 60%),
    linear-gradient(165deg, #1a2236 0%, #0f1424 55%, #12182a 100%);
}

.participate-brand-phase {
  position: relative;
  padding: 0.5rem 0.25rem 0.75rem;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.participate-brand-phase.hidden {
  display: none;
}

.participate-brand-glow {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 197, 24, 0.35), transparent 70%);
  top: 28%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
}

.participate-brand-phase--play .participate-brand-glow {
  animation: participateBrandGlow 2.4s ease-out both;
}

.participate-brand-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.participate-brand-sparkles span {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f5c518;
  opacity: 0;
  box-shadow: 0 0 8px rgba(245, 197, 24, 0.8);
}

.participate-brand-phase--play .participate-brand-sparkles span {
  animation: participateBrandSpark 2.2s ease-in-out both;
}

.participate-brand-sparkles span:nth-child(1) { left: 12%; top: 22%; animation-delay: 0.15s; }
.participate-brand-sparkles span:nth-child(2) { left: 82%; top: 18%; animation-delay: 0.35s; }
.participate-brand-sparkles span:nth-child(3) { left: 18%; top: 70%; animation-delay: 0.55s; }
.participate-brand-sparkles span:nth-child(4) { left: 88%; top: 64%; animation-delay: 0.7s; }
.participate-brand-sparkles span:nth-child(5) { left: 50%; top: 8%; animation-delay: 0.45s; }

.participate-brand-kicker {
  position: relative;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.85rem;
  opacity: 0;
}

.participate-brand-phase--play .participate-brand-kicker {
  animation: participateBrandFadeUp 0.55s ease-out 0.1s both;
}

.participate-brand-logo {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.02em;
  margin-bottom: 0.85rem;
  line-height: 1;
}

.participate-brand-letter {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2.4rem, 9vw, 3.2rem);
  font-weight: 700;
  color: #f5c518;
  opacity: 0;
  transform: translateY(18px) scale(0.85);
  text-shadow: 0 0 24px rgba(245, 197, 24, 0.35);
}

.participate-brand-letter--dot {
  color: #fff;
  margin: 0 0.04em;
}

.participate-brand-phase--play .participate-brand-letter {
  animation: participateBrandLetter 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.participate-brand-phase--play .participate-brand-letter:nth-child(1) { animation-delay: 0.18s; }
.participate-brand-phase--play .participate-brand-letter:nth-child(2) { animation-delay: 0.26s; }
.participate-brand-phase--play .participate-brand-letter:nth-child(3) { animation-delay: 0.34s; }
.participate-brand-phase--play .participate-brand-letter:nth-child(4) { animation-delay: 0.42s; }
.participate-brand-phase--play .participate-brand-letter:nth-child(5) { animation-delay: 0.5s; }
.participate-brand-phase--play .participate-brand-letter:nth-child(6) { animation-delay: 0.58s; }
.participate-brand-phase--play .participate-brand-letter:nth-child(7) { animation-delay: 0.66s; }
.participate-brand-phase--play .participate-brand-letter:nth-child(8) { animation-delay: 0.74s; }

.participate-brand-headline {
  position: relative;
  font-size: clamp(1.05rem, 3.8vw, 1.25rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.4rem;
  letter-spacing: 0.01em;
  opacity: 0;
}

.participate-brand-phase--play .participate-brand-headline {
  animation: participateBrandFadeUp 0.6s ease-out 0.95s both;
}

.participate-brand-tagline {
  position: relative;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f5c518;
  margin: 0 0 1rem;
  opacity: 0;
}

.participate-brand-phase--play .participate-brand-tagline {
  animation: participateBrandFadeUp 0.55s ease-out 1.2s both;
}

.participate-brand-bar {
  position: relative;
  width: 72%;
  max-width: 220px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  opacity: 0;
}

.participate-brand-phase--play .participate-brand-bar {
  animation: participateBrandFadeUp 0.4s ease-out 1.35s both;
}

.participate-brand-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #f5c518, #ffe566, #f5c518);
}

.participate-brand-phase--play .participate-brand-bar span {
  animation: participateBrandBar 1s ease-in-out 1.45s both;
}

@keyframes participateBrandGlow {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  40% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  100% { opacity: 0.55; transform: translate(-50%, -50%) scale(1); }
}

@keyframes participateBrandSpark {
  0%, 100% { opacity: 0; transform: scale(0.4); }
  40% { opacity: 1; transform: scale(1.2); }
  70% { opacity: 0.7; transform: scale(1); }
}

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

@keyframes participateBrandFadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes participateBrandBar {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes participateCardIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.participate-live-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #fff;
  background: var(--red);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
  animation: participatePulse 1.4s ease-in-out infinite;
}

@keyframes participatePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 61, 87, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(255, 61, 87, 0); }
}

.participate-draw-tier {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.participate-wheel-wrap {
  position: relative;
  width: 148px;
  height: 148px;
  margin: 0 auto 1.25rem;
}

.participate-wheel-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(245, 197, 24, 0.35);
  animation: participateRingSpin 3s linear infinite;
}

.participate-wheel-ring--inner {
  inset: 12px;
  border-color: rgba(0, 200, 83, 0.35);
  animation-direction: reverse;
  animation-duration: 2.2s;
}

@keyframes participateRingSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.participate-wheel-spinner {
  position: absolute;
  inset: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2a3450, #0a0e17 70%);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) inset;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.participate-wheel-spinner--pulse {
  transform: scale(1.06);
}

.participate-draw-status {
  font-size: 0.95rem;
  color: var(--text-muted);
  min-height: 1.4em;
  margin-bottom: 1rem;
  transition: opacity 0.25s ease;
}

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

.participate-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold), var(--green));
  border-radius: 999px;
  transition: width 0.15s ease-out;
}

.participate-draw-phase.hidden,
.participate-result-phase.hidden {
  display: none;
}

.participate-result-phase {
  position: relative;
  animation: participateResultIn 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.participate-result-phase.is-celebrating .participate-result-details {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.participate-result-details {
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.participate-result-details.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  animation: participateDetailsIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes participateDetailsIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.participate-win-flash {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 234, 0, 0.55) 0%, rgba(0, 200, 83, 0.25) 40%, transparent 70%);
  z-index: 4;
}

.participate-win-flash.is-active {
  animation: participateWinFlash 0.55s ease-out forwards;
}

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

.participate-win-rays {
  position: absolute;
  inset: -30%;
  pointer-events: none;
  z-index: 1;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(245, 197, 24, 0.12) 30deg,
    transparent 60deg,
    rgba(0, 200, 83, 0.1) 90deg,
    transparent 120deg,
    rgba(245, 197, 24, 0.12) 150deg,
    transparent 180deg,
    rgba(0, 200, 83, 0.1) 210deg,
    transparent 240deg,
    rgba(245, 197, 24, 0.12) 270deg,
    transparent 300deg,
    rgba(0, 200, 83, 0.1) 330deg,
    transparent 360deg
  );
  animation: participateWinRays 4s linear infinite;
  opacity: 0.85;
}

@keyframes participateWinRays {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.participate-win-celebration {
  position: relative;
  z-index: 3;
  padding: 0.5rem 0 1rem;
  animation: participateCongratsIn 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.participate-win-celebration.is-exiting {
  animation: participateCongratsOut 0.45s ease forwards;
}

@keyframes participateCongratsIn {
  0% {
    opacity: 0;
    transform: scale(0.75) translateY(20px);
  }
  60% {
    opacity: 1;
    transform: scale(1.04) translateY(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes participateCongratsOut {
  to {
    opacity: 0;
    transform: scale(1.05) translateY(-10px);
  }
}

.participate-win-trophy {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 0.75rem;
  animation: participateTrophyBounce 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
  filter: drop-shadow(0 0 20px rgba(245, 197, 24, 0.6));
}

@keyframes participateTrophyBounce {
  0% {
    opacity: 0;
    transform: scale(0.2) rotate(-20deg);
  }
  50% {
    transform: scale(1.15) rotate(8deg);
  }
  75% {
    transform: scale(0.95) rotate(-4deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.participate-congrats-heading {
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  font-weight: 900;
  margin: 0 0 0.35rem;
  letter-spacing: 0.02em;
  background: linear-gradient(
    120deg,
    #fff 0%,
    var(--gold) 25%,
    #fff 50%,
    var(--green) 75%,
    var(--gold) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: participateCongratsShimmer 2s linear infinite, participateCongratsPop 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}

@keyframes participateCongratsShimmer {
  to { background-position: 200% center; }
}

@keyframes participateCongratsPop {
  0% {
    opacity: 0;
    transform: scale(0.85);
    letter-spacing: 0.2em;
  }
  100% {
    opacity: 1;
    transform: scale(1);
    letter-spacing: 0.02em;
  }
}

.participate-congrats-sub {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0;
  animation: participateCongratsSubIn 0.6s ease 0.5s both;
}

@keyframes participateCongratsSubIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.participate-win-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

.participate-win-sparkle {
  position: absolute;
  font-size: 0.85rem;
  color: var(--gold);
  opacity: 0;
  animation: participateSparklePop ease-out forwards;
}

@keyframes participateSparklePop {
  0% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }
  30% {
    opacity: 1;
    transform: scale(1.2) rotate(20deg);
  }
  100% {
    opacity: 0;
    transform: scale(0.6) rotate(60deg) translateY(-20px);
  }
}

.participate-overlay--win.participate-overlay--celebrating .participate-overlay-card {
  border-color: rgba(0, 200, 83, 0.55);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 48px rgba(0, 200, 83, 0.18);
  animation: participateWinCardGlow 2s ease-in-out infinite;
}

@keyframes participateWinCardGlow {
  0%, 100% {
    box-shadow:
      0 24px 64px rgba(0, 0, 0, 0.55),
      0 0 32px rgba(0, 200, 83, 0.2);
  }
  50% {
    box-shadow:
      0 24px 64px rgba(0, 0, 0, 0.55),
      0 0 56px rgba(245, 197, 24, 0.35),
      0 0 80px rgba(0, 200, 83, 0.25);
  }
}

.participate-result-details.is-visible .participate-result-amount {
  animation: participateAmountPop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes participateResultIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.participate-result-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.participate-result-badge--win {
  color: #052e16;
  background: linear-gradient(135deg, #4ade80, var(--green));
}

.participate-result-badge--lose {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
}

.participate-result-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
}

.participate-result-icon--win {
  color: #052e16;
  background: linear-gradient(145deg, #86efac, var(--green));
  box-shadow: 0 0 32px rgba(0, 200, 83, 0.45);
  animation: participateWinPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.participate-result-icon--lose {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid var(--border);
}

@keyframes participateWinPop {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.participate-result-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.participate-overlay--win .participate-result-title {
  background: linear-gradient(135deg, var(--gold), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.participate-result-amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.participate-overlay--win .participate-overlay-card {
  border-color: rgba(0, 200, 83, 0.55);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 48px rgba(0, 200, 83, 0.18);
}

@keyframes participateAmountPop {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.participate-overlay--lose .participate-overlay-card {
  border-color: var(--border);
}

.participate-overlay-msg {
  color: var(--text-muted);
  margin: 0 0 1.35rem;
  line-height: 1.55;
  font-size: 0.92rem;
}

.participate-overlay-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.participate-result-btn {
  width: 100%;
}

.participate-claim-btn {
  background: linear-gradient(135deg, #16a34a, #22c55e, #4ade80) !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff !important;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
  animation: claimBtnPulse 1.8s ease-in-out infinite;
}

.participate-claim-btn:hover {
  color: #fff !important;
  filter: brightness(1.05);
}

.participate-claim-note {
  margin: 0.15rem 0 0.35rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(245, 197, 24, 0.1);
  border: 1px solid rgba(245, 197, 24, 0.28);
  color: #ffe9a8;
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: left;
}

.participate-transfer-note {
  margin: 0 0 0.55rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #d8ffe8;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.participate-transfer-note a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.winnings-transfer-note {
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: rgba(245, 197, 24, 0.1);
  border: 1px solid rgba(245, 197, 24, 0.28);
  color: #ffe9a8;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
}

.winnings-transfer-note a {
  color: #fff;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.participate-claim-note strong {
  color: #fff;
}

.participate-claim-note--inline {
  grid-column: 1 / -1;
  margin-top: 0.35rem;
}

@keyframes claimBtnPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 6px 28px rgba(34, 197, 94, 0.6);
  }
}

.my-entry-claim {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.25rem;
  padding: 0.45rem 0.7rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}

.my-entry-claim:hover {
  filter: brightness(1.08);
  color: #fff;
}

.participate-continue-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text-muted);
}

.participate-continue-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.participate-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.participate-confetti-piece {
  position: absolute;
  top: -8px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  opacity: 0;
  animation: participateConfettiFall linear forwards;
}

@keyframes participateConfettiFall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(280px) rotate(540deg);
  }
}

.my-entry-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  background: var(--bg-elevated);
}

.my-entry-row--win {
  border-left: 3px solid var(--green);
}

.my-entry-row--joined {
  border-left: 3px solid var(--gold);
}

.my-entry-row--lose {
  border-left: 3px solid var(--text-muted);
  opacity: 0.85;
}

.my-entry-tier {
  font-weight: 700;
  color: var(--gold);
}

.my-entry-result {
  font-size: 0.8rem;
}

.my-entry-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════
   MOBILE — professional phone layout
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
  }

  body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow-x: hidden;
  }

  .header {
    padding: 0.65rem max(1rem, env(safe-area-inset-right, 0px)) 0.65rem max(1rem, env(safe-area-inset-left, 0px));
    padding-top: max(0.65rem, env(safe-area-inset-top, 0px));
  }

  .logo {
    font-size: 1.15rem;
    gap: 0.5rem;
  }

  .logo-icon {
    width: 34px;
    height: 34px;
    font-size: 1rem;
    border-radius: 9px;
  }

  .nav-links {
    gap: 0.45rem;
    align-items: center;
  }

  .nav-links .btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.82rem;
    min-height: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-links .btn-whatsapp {
    padding: 0.5rem 0.65rem;
    font-size: 0.75rem;
    max-width: 9.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .viewer-account-badge {
    font-size: 0.68rem;
    padding: 0.28rem 0.5rem;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 0.2rem;
  }

  .btn {
    min-height: 44px;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    border-radius: 10px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .btn-sm {
    min-height: 40px;
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
  }

  .stream-room {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100dvh - 56px);
    padding:
      0.75rem
      max(0.75rem, env(safe-area-inset-right, 0px))
      max(1rem, env(safe-area-inset-bottom, 0px))
      max(0.75rem, env(safe-area-inset-left, 0px));
    gap: 0.75rem;
  }

  .video-panel {
    gap: 0.65rem;
    min-width: 0;
  }

  .video-container {
    min-height: min(58vh, 520px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  }

  body.viewer-page .video-container {
    border: 1px solid var(--border);
    min-height: 0;
    height: auto;
    overflow-x: hidden;
    overflow-y: visible;
  }

  body.viewer-page .lottery-stage {
    min-height: 0;
    height: auto;
    align-items: stretch;
    justify-content: flex-start;
  }

  body.viewer-page .lottery-stage-idle {
    width: 100%;
    max-width: none;
    padding: 0.55rem 0.5rem 0.85rem;
  }

  body.viewer-page .lottery-stage-brand-row {
    display: none;
  }

  body.viewer-page .lottery-stage-icon-img {
    width: min(5.5rem, 38vw);
  }

  body.viewer-page .lottery-stage-transfer-note {
    display: none;
  }

  body.viewer-page .stream-room {
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  }

  body.viewer-page .nav-links .btn-whatsapp {
    display: none;
  }

  body.viewer-page .viewer-wallet-chip {
    padding: 0.35rem 0.55rem;
    font-size: 0.72rem;
    max-width: 7.5rem;
  }

  body.viewer-page .viewer-logout-btn {
    padding: 0.4rem 0.55rem;
    font-size: 0.72rem;
    min-height: 36px;
  }

  .lottery-stage-idle h3 {
    font-size: 1.15rem;
    line-height: 1.35;
    padding: 0 0.25rem;
  }

  .lottery-stage-idle p:not(.lottery-stage-transfer-note),
  .lottery-stage-lead {
    font-size: 0.86rem !important;
    line-height: 1.5;
    padding: 0 0.35rem;
  }

  .participate-tiers--stage {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin-top: 0.85rem;
    max-width: none;
    padding: 0 0.15rem;
  }

  .participate-card {
    padding: 1.2rem 1rem;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.28);
  }

  .participate-card-pool-balance {
    font-size: 1.85rem;
  }

  .participate-card-hint {
    font-size: 0.85rem;
    margin-bottom: 0.9rem;
  }

  .participate-btn {
    min-height: 50px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    letter-spacing: 0.03em;
  }

  body.viewer-page .sidebar .lottery-panel {
    display: none;
  }

  .sidebar {
    max-height: none;
    gap: 0.65rem;
    min-width: 0;
  }

  .chat-panel {
    max-height: 300px;
    min-height: 220px;
  }

  .chat-messages {
    max-height: 200px;
  }

  .chat-input-area {
    padding: 0.65rem;
    gap: 0.4rem;
  }

  .chat-input-area input {
    min-height: 44px;
    font-size: 16px;
    border-radius: 10px;
  }

  .chat-input-area .btn {
    flex-shrink: 0;
    padding: 0.65rem 1rem;
  }

  .stream-meta {
    padding: 0.85rem 1rem;
    border-radius: 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .stream-meta h2 {
    font-size: 1rem;
    line-height: 1.3;
  }

  .stream-meta .meta-details {
    font-size: 0.78rem;
    line-height: 1.45;
  }

  .broadcaster-controls {
    width: 100%;
  }

  .broadcaster-controls .btn {
    flex: 1;
    justify-content: center;
  }

  .participate-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    padding:
      max(0.75rem, env(safe-area-inset-top, 0px))
      0.85rem
      max(0.85rem, env(safe-area-inset-bottom, 0px));
  }

  .lottery-stage .participate-overlay {
    top: 0;
  }

  .participate-overlay-card {
    max-width: none;
    border-radius: 20px;
    padding: 1.5rem 1.2rem;
    max-height: calc(100dvh - 1.5rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .participate-wheel-spinner {
    font-size: 2.25rem;
  }

  .participate-congrats-heading {
    font-size: 1.65rem;
  }

  .participate-result-title {
    font-size: 1.35rem;
  }

  .phone-auth-screen {
    padding:
      max(1rem, env(safe-area-inset-top, 0px))
      1.15rem
      max(1.15rem, env(safe-area-inset-bottom, 0px));
  }

  .phone-auth-card {
    padding: 1.25rem;
    border-radius: 16px;
  }

  .phone-auth-screen .form-group input {
    min-height: 48px;
    font-size: 16px;
    border-radius: 10px;
  }

  .phone-auth-submit {
    min-height: 50px;
    font-size: 1rem;
  }

  .phone-auth-tab {
    min-height: 44px;
  }

  .viewer-logout-btn {
    min-height: 40px;
  }

  .hero {
    padding: 2.25rem 1.15rem;
  }

  .hero h1 {
    font-size: 1.7rem;
    line-height: 1.2;
  }

  .hero p {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .hero-permalink {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    font-size: 0.88rem;
  }

  .hero-permalink .btn {
    width: 100%;
    justify-content: center;
  }

  .permalink-url {
    word-break: break-all;
    font-size: 0.82rem;
    display: block;
    padding: 0.5rem 0.65rem;
    background: var(--bg-elevated);
    border-radius: 8px;
    border: 1px solid var(--border);
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.65rem;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .section {
    padding: 1.25rem 1rem;
  }

  .section-title {
    font-size: 1.2rem;
  }

  .streams-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .stream-card {
    border-radius: 14px;
  }

  .host-draw-board {
    padding: 1rem 0.65rem;
  }

  .host-open-draws-header h3 {
    font-size: 1.15rem;
  }

  .host-open-draws-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .host-stage-winners-section {
    padding: 0.85rem;
    border-radius: 14px;
  }

  .host-stage-winners-header {
    flex-direction: column;
    align-items: stretch;
  }

  .host-stage-winners-total {
    align-self: flex-start;
  }

  .host-winners-history {
    max-height: none;
  }

  .host-winners-history-head {
    flex-direction: column;
    gap: 0.45rem;
  }

  .host-winners-history-badges {
    flex-direction: row;
    align-items: center;
    align-self: flex-start;
  }

  .host-open-draw-card {
    padding: 1rem;
    border-radius: 14px;
  }

  .host-stage-split {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .host-stage-panel {
    max-height: none;
    border-radius: 14px;
  }

  .host-draw-preset-card {
    border-radius: 14px;
  }

  body.host-page .host-sidebar {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  body.host-page .host-sidebar-section--chat {
    margin-top: 0;
  }

  body.host-page .host-panel-body--compact,
  body.host-page .host-panel-body--accounts {
    max-height: none;
  }

  body.host-page .host-draw-preset-fields {
    grid-template-columns: 1fr;
  }

  .link-panel {
    padding: 0.85rem;
    border-radius: 14px;
  }

  .link-row {
    flex-direction: column;
  }

  .link-row input {
    font-size: 0.8rem;
    min-height: 44px;
    border-radius: 10px;
  }

  .link-row .btn {
    width: 100%;
    justify-content: center;
  }

  .modal {
    padding: 1.35rem;
    margin: 0.85rem;
    max-height: calc(100dvh - 1.75rem);
    overflow-y: auto;
    border-radius: 16px;
    -webkit-overflow-scrolling: touch;
  }

  .modal-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .modal-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .toast {
    left: max(1rem, env(safe-area-inset-left, 0px));
    right: max(1rem, env(safe-area-inset-right, 0px));
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    text-align: center;
    font-size: 0.9rem;
  }

  .panel {
    border-radius: 14px;
  }

  .panel-header {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
  }

  .history-panel .panel-body,
  .lottery-panel .panel-body {
    max-height: none;
  }

  .my-entry-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
  }

  .my-entry-time {
    grid-column: 2;
    grid-row: 1;
  }

  .my-entry-result {
    grid-column: 1 / -1;
    font-size: 0.82rem;
  }

  .shopwin-banner--site {
    margin: 0;
  }

  .shopwin-banner-inner {
    padding: 0.5rem 0.7rem;
    min-height: 42px;
  }

  .shopwin-banner-brand {
    font-size: 0.88rem;
  }

  .shopwin-banner-marquee {
    max-width: 95px;
  }

  .shopwin-banner-marquee-track span {
    font-size: 0.68rem;
  }

  .viewer-intro-inner {
    padding: 1.25rem;
  }

  .form-group input,
  .form-group textarea {
    font-size: 16px;
    border-radius: 10px;
  }

  .host-open-draw-manage-actions {
    flex-direction: column;
  }

  .host-open-draw-manage-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .host-open-draw-card-actions .btn {
    min-height: 44px;
  }

  .host-phone-list {
    max-height: 160px;
  }

  .host-registered-sheet-wrap {
    max-height: 240px;
  }

  .host-registered-sheet {
    font-size: 0.78rem;
  }

  .host-registered-sheet th,
  .host-registered-sheet td {
    padding: 0.45rem 0.5rem;
  }

  .host-registered-sheet-col--date {
    font-size: 0.7rem;
  }

  .host-registered-sheet-toolbar {
    flex-wrap: wrap;
  }

  .host-registered-sheet-toolbar .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 380px) {
  .logo {
    font-size: 1.05rem;
  }

  .participate-card-pool-balance {
    font-size: 1.55rem;
  }

  .nav-links .btn-outline {
    padding: 0.45rem 0.6rem;
    font-size: 0.78rem;
  }

  .viewer-account-badge {
    display: none;
  }
}

/* ─── Pool / billiard balls + basket ─── */
.lottery-ball,
.pool-ball {
  --ball-color: #f5d031;
  --ball-size: 2.55rem;
  position: relative;
  width: var(--ball-size);
  height: var(--ball-size);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  isolation: isolate;
  background: transparent;
  border: none;
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.18),
    0 8px 14px rgba(0, 0, 0, 0.38);
}

.pool-ball-shell {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.35) 10%, transparent 32%),
    radial-gradient(circle at 72% 78%, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.15) 30%, transparent 48%),
    radial-gradient(circle at 50% 100%, color-mix(in srgb, var(--ball-color) 40%, #000) 0%, transparent 40%),
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--ball-color) 88%, #fff) 0%, var(--ball-color) 42%, color-mix(in srgb, var(--ball-color) 55%, #000) 100%);
  box-shadow:
    inset 0 -5px 10px rgba(0, 0, 0, 0.35),
    inset 0 4px 7px rgba(255, 255, 255, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.15);
  z-index: 0;
}

.pool-ball--cue .pool-ball-shell,
.pool-ball--cue {
  --ball-color: #f4f0e6;
}

.pool-ball--stripe .pool-ball-shell {
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.5) 0%, transparent 36%),
    radial-gradient(circle at 70% 78%, rgba(0, 0, 0, 0.3) 0%, transparent 48%),
    linear-gradient(
      180deg,
      #f7f4ec 0%,
      #f7f4ec 28%,
      var(--ball-color) 28%,
      var(--ball-color) 72%,
      #f7f4ec 72%,
      #f7f4ec 100%
    );
}

.pool-ball-stripe {
  display: none;
}

.pool-ball-spot {
  position: relative;
  z-index: 2;
  width: 46%;
  height: 46%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff 0%, #f3f3f3 70%, #e4e4e4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

.pool-ball-num {
  font-weight: 900;
  font-size: calc(var(--ball-size) * 0.28);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: #111;
  letter-spacing: -0.03em;
  text-shadow: 0 0.5px 0 rgba(255, 255, 255, 0.4);
}

.pool-ball--wide-num .pool-ball-num {
  font-size: calc(var(--ball-size) * 0.2);
}

.pool-ball--digits-4 .pool-ball-num {
  font-size: calc(var(--ball-size) * 0.155);
}

.pool-ball--digits-5 .pool-ball-num {
  font-size: calc(var(--ball-size) * 0.125);
  letter-spacing: -0.05em;
}

.pool-ball--c8 .pool-ball-num {
  color: #111;
}

.pool-ball-shine {
  position: absolute;
  z-index: 3;
  top: 12%;
  left: 18%;
  width: 28%;
  height: 18%;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0));
  transform: rotate(-18deg);
  pointer-events: none;
}

.lottery-ball--hero {
  --ball-size: 5rem;
}

.lottery-ball--assign {
  --ball-size: 7rem;
  margin: 0.75rem auto 1rem;
}

.lottery-ball--mine {
  box-shadow:
    0 0 0 3px rgba(245, 197, 24, 0.85),
    0 3px 0 rgba(0, 0, 0, 0.18),
    0 8px 16px rgba(0, 0, 0, 0.45);
}

.lottery-ball--pop {
  animation: lotteryBallPop 0.45s ease;
}

.lottery-ball--falling {
  animation: lotteryBallFall 1.65s cubic-bezier(0.33, 0.02, 0.55, 1) forwards;
  transform-origin: 50% 50%;
  will-change: transform, filter, opacity;
}

.lottery-ball--landed {
  opacity: 0;
  transform: translateY(150px) scale(0.45);
  pointer-events: none;
}

.lottery-ball--sky-drop {
  position: absolute;
  top: -0.35rem;
  --spin-dir: 1;
  --drop-drift: 0px;
  animation: lotteryBallHopperDrop 1.65s cubic-bezier(0.22, 0.08, 0.28, 1) forwards;
  transform-origin: 50% 50%;
  z-index: 6;
  will-change: transform, filter, opacity;
  filter: drop-shadow(0 12px 10px rgba(0, 0, 0, 0.4));
}

.lottery-ball--sky-drop::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 140%;
  height: 220%;
  transform: translate(-50%, -30%);
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(251, 191, 36, 0.18) 35%,
    rgba(125, 211, 252, 0.12) 70%,
    transparent 100%
  );
  opacity: 0;
  animation: lotteryBallTrail 1.65s ease-out forwards;
  pointer-events: none;
  z-index: -1;
}

.lottery-ball--sky-drop .lottery-ball-drop-shadow {
  position: absolute;
  left: 50%;
  bottom: -0.55rem;
  width: 70%;
  height: 0.45rem;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.45), transparent 70%);
  transform: translateX(-50%) scaleX(0.55);
  opacity: 0.35;
  animation: lotteryBallShadowGrow 1.65s cubic-bezier(0.22, 0.08, 0.28, 1) forwards;
  z-index: -1;
  pointer-events: none;
}

.lottery-ball--dropping {
  animation: lotteryBallSettle 0.85s cubic-bezier(0.22, 1.35, 0.36, 1) both;
  transform-origin: 50% 100%;
}

.draw-ball-basket--impact {
  animation: drawBasketImpact 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes lotteryBallPop {
  0% { transform: scale(0.4); opacity: 0; }
  70% { transform: scale(1.12); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes lotteryBallFall {
  0% {
    transform: translate3d(0, -8px, 0) scale(1) rotate(0deg);
    opacity: 1;
    filter: blur(0);
  }
  18% {
    transform: translate3d(4px, 12px, 0) scale(1.02) rotate(70deg);
  }
  42% {
    transform: translate3d(-2px, 78px, 0) scale(1.04) rotate(210deg);
    filter: blur(0.3px);
  }
  /* Impact squash */
  58% {
    transform: translate3d(0, 118px, 0) scale(1.14, 0.78) rotate(300deg);
    filter: blur(0);
  }
  /* Rebound */
  72% {
    transform: translate3d(3px, 88px, 0) scale(0.92, 1.08) rotate(360deg);
  }
  84% {
    transform: translate3d(-1px, 112px, 0) scale(1.06, 0.9) rotate(400deg);
  }
  94% {
    transform: translate3d(0, 126px, 0) scale(0.7, 0.7) rotate(430deg);
    opacity: 0.85;
  }
  100% {
    transform: translate3d(0, 148px, 0) scale(0.4) rotate(460deg);
    opacity: 0;
  }
}

@keyframes lotteryBallHopperDrop {
  0% {
    transform: translate3d(var(--drop-drift), -56px, 0) scale(1.35) rotate(0deg);
    opacity: 0;
    filter: blur(1.2px);
  }
  10% {
    opacity: 1;
    filter: blur(0);
  }
  /* Hover above hopper */
  22% {
    transform: translate3d(calc(var(--drop-drift) * 0.7), -8px, 0) scale(1.08) rotate(calc(var(--spin-dir) * 90deg));
  }
  /* Dive into mouth */
  48% {
    transform: translate3d(calc(var(--drop-drift) * 0.25), 62px, 0) scale(0.98) rotate(calc(var(--spin-dir) * 280deg));
  }
  /* Glass impact squash */
  62% {
    transform: translate3d(0, 118px, 0) scale(1.22, 0.68) rotate(calc(var(--spin-dir) * 360deg));
  }
  /* Rebound tumble */
  76% {
    transform: translate3d(calc(var(--drop-drift) * -0.12), 88px, 0) scale(0.88, 1.12) rotate(calc(var(--spin-dir) * 430deg));
  }
  88% {
    transform: translate3d(0, 124px, 0) scale(0.78) rotate(calc(var(--spin-dir) * 500deg));
    opacity: 0.7;
  }
  100% {
    transform: translate3d(0, 148px, 0) scale(0.42) rotate(calc(var(--spin-dir) * 560deg));
    opacity: 0;
  }
}

@keyframes lotteryBallTrail {
  0% { opacity: 0; }
  18% { opacity: 0.85; }
  55% { opacity: 0.35; }
  100% { opacity: 0; }
}

@keyframes lotteryBallSkyDrop {
  0% {
    transform: translate3d(var(--drop-drift), -28px, 0) scale(1.12) rotate(0deg);
    opacity: 0;
    filter: blur(0.8px);
  }
  8% {
    opacity: 1;
    filter: blur(0);
  }
  /* Gravity accelerate */
  40% {
    transform: translate3d(calc(var(--drop-drift) * 0.55), 48px, 0) scale(1.02) rotate(calc(var(--spin-dir) * 200deg));
  }
  /* Hit basket rim — squash */
  58% {
    transform: translate3d(calc(var(--drop-drift) * 0.2), 108px, 0) scale(1.18, 0.72) rotate(calc(var(--spin-dir) * 320deg));
  }
  /* First bounce up */
  70% {
    transform: translate3d(calc(var(--drop-drift) * 0.08), 78px, 0) scale(0.9, 1.1) rotate(calc(var(--spin-dir) * 390deg));
  }
  /* Second smaller bounce */
  82% {
    transform: translate3d(0, 104px, 0) scale(1.08, 0.88) rotate(calc(var(--spin-dir) * 440deg));
  }
  92% {
    transform: translate3d(0, 118px, 0) scale(0.85) rotate(calc(var(--spin-dir) * 470deg));
    opacity: 0.75;
  }
  100% {
    transform: translate3d(0, 132px, 0) scale(0.55) rotate(calc(var(--spin-dir) * 500deg));
    opacity: 0;
  }
}

@keyframes lotteryBallShadowGrow {
  0% {
    transform: translateX(-50%) scaleX(0.4);
    opacity: 0.15;
  }
  58% {
    transform: translateX(-50%) scaleX(1.15);
    opacity: 0.55;
  }
  70% {
    transform: translateX(-50%) scaleX(0.7);
    opacity: 0.3;
  }
  100% {
    transform: translateX(-50%) scaleX(0.95);
    opacity: 0;
  }
}

@keyframes lotteryBallSettle {
  0% {
    transform: translateY(-18px) scale(0.55, 0.55);
    opacity: 0;
  }
  35% {
    transform: translateY(4px) scale(1.12, 0.86);
    opacity: 1;
  }
  55% {
    transform: translateY(-7px) scale(0.94, 1.08);
  }
  75% {
    transform: translateY(2px) scale(1.04, 0.96);
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes drawBasketImpact {
  0% { transform: translateY(0) scale(1); }
  25% { transform: translateY(4px) scale(1.015, 0.975); }
  50% { transform: translateY(-2px) scale(0.99, 1.015); }
  75% { transform: translateY(1px) scale(1.005, 0.995); }
  100% { transform: translateY(0) scale(1); }
}

.draw-ball-arena {
  width: min(100%, 420px);
  margin: 0.75rem auto 1.25rem;
  position: relative;
}

.draw-ball-arena--with-hostess {
  width: min(100%, 1100px);
  display: grid;
  grid-template-columns: minmax(100px, 0.7fr) minmax(220px, 1.4fr);
  gap: 0.35rem 0.75rem;
  align-items: end;
}

.draw-ball-arena--with-winners {
  width: min(100%, 1280px);
  grid-template-columns: minmax(90px, 0.55fr) minmax(240px, 1.2fr) minmax(220px, 0.85fr);
  align-items: stretch;
}

.draw-ball-arena--no-hostess {
  width: min(100%, 1120px);
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(220px, 0.85fr);
  gap: 0.35rem 0.75rem;
  align-items: stretch;
}

.draw-ball-arena-main {
  position: relative;
  min-width: 0;
  z-index: 1;
  display: flex;
  justify-content: center;
}

/* Premium React bingo lottery mount */
.bingo-lottery-mount {
  width: min(100%, 1100px);
  margin: 0 auto;
}

.bingo-lottery-mount #bingo-lottery-root {
  width: 100%;
}

/* Right column: open draws above winners board */
.lottery-side-column {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
  min-height: 0;
}

.viewer-open-draws {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.75rem 0.8rem;
  border-radius: 1rem;
  border: 1px solid rgba(245, 197, 66, 0.28);
  background:
    linear-gradient(165deg, rgba(21, 42, 92, 0.95) 0%, rgba(8, 16, 40, 0.96) 100%);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  max-height: 260px;
  overflow: hidden;
}

.viewer-open-draws-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.viewer-open-draws-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f5c542;
}

.viewer-open-draws-status {
  flex-shrink: 0;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.viewer-open-draws-status.is-live {
  border-color: rgba(0, 200, 83, 0.45);
  background: rgba(0, 200, 83, 0.12);
  color: #86efac;
}

.viewer-open-draws-empty {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  padding: 0.65rem 0.25rem;
}

.viewer-open-draws-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  overflow-y: auto;
  min-height: 0;
  padding-right: 0.1rem;
}

.viewer-open-draw-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.55rem 0.6rem 0.65rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  text-align: left;
  animation: lotteryWinnerRowIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.viewer-open-draw-card.tier-500 {
  border-color: rgba(186, 104, 255, 0.45);
  background: linear-gradient(145deg, rgba(186, 104, 255, 0.16), rgba(0, 0, 0, 0.35));
}

.viewer-open-draw-card.tier-200 {
  border-color: rgba(245, 197, 66, 0.4);
  background: linear-gradient(145deg, rgba(245, 197, 66, 0.14), rgba(0, 0, 0, 0.35));
}

.viewer-open-draw-card.tier-100 {
  border-color: rgba(0, 200, 83, 0.35);
  background: linear-gradient(145deg, rgba(0, 200, 83, 0.12), rgba(0, 0, 0, 0.35));
}

.viewer-open-draw-card.tier-50 {
  border-color: rgba(79, 195, 247, 0.35);
  background: linear-gradient(145deg, rgba(79, 195, 247, 0.12), rgba(0, 0, 0, 0.35));
}

.viewer-open-draw-card.is-joined {
  box-shadow: inset 0 0 0 1px rgba(245, 197, 66, 0.35);
}

.viewer-open-draw-card.is-won {
  box-shadow: inset 0 0 0 1px rgba(0, 200, 83, 0.45);
}

.viewer-open-draw-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.viewer-open-draw-live {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #86efac;
}

.viewer-open-draw-live::before {
  content: '';
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: viewerOpenPulse 1.4s ease-in-out infinite;
}

@keyframes viewerOpenPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.viewer-open-draw-tier {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.65);
}

.viewer-open-draw-prize {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}

.viewer-open-draw-pool {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  padding: 0.35rem 0.45rem;
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.viewer-open-draw-pool-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.viewer-open-draw-pool-value {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1.15rem;
  font-weight: 800;
  color: #f5c542;
  line-height: 1.1;
}

.viewer-open-draw-pool-value small {
  font-size: 0.55em;
  opacity: 0.85;
}

.viewer-open-draw-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.viewer-open-draw-stats strong {
  color: #fff;
  font-weight: 700;
}

.viewer-open-draw-meta {
  margin: 0;
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.38);
}

.viewer-open-draw-btn {
  width: 100%;
  margin-top: 0.15rem;
  padding: 0.45rem 0.6rem;
  border: none;
  border-radius: 0.55rem;
  background: linear-gradient(180deg, #f5c542, #c9a035);
  color: #0d1b3d;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  box-shadow: 0 4px 12px rgba(245, 197, 66, 0.25);
  touch-action: manipulation;
}

.viewer-open-draw-btn:hover:not(:disabled) {
  filter: brightness(1.06);
  box-shadow: 0 0 18px rgba(245, 197, 66, 0.4);
}

.viewer-open-draw-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.viewer-open-draw-btn:disabled {
  cursor: default;
  opacity: 0.85;
}

.viewer-open-draw-btn.is-joined {
  background: rgba(245, 197, 66, 0.15);
  color: #f5c542;
  border: 1px solid rgba(245, 197, 66, 0.4);
  box-shadow: none;
}

.viewer-open-draw-btn.is-won {
  background: rgba(0, 200, 83, 0.18);
  color: #86efac;
  border: 1px solid rgba(0, 200, 83, 0.4);
  box-shadow: none;
}

/* Winners board — always beside lottery machine */
.lottery-winners-board {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 220px;
  flex: 1;
  max-height: 420px;
  padding: 0.85rem 0.9rem;
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #ffffff;
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  color: #0f172a;
}

.lottery-winners-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.lottery-winners-board-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #0f172a;
}

.lottery-winners-board-count {
  flex-shrink: 0;
  min-width: 1.6rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(232, 0, 42, 0.28);
  background: rgba(232, 0, 42, 0.08);
  color: #e8002a;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}

.lottery-winners-board-sub {
  margin: 0 0 0.55rem;
  font-size: 0.7rem;
  color: rgba(15, 23, 42, 0.55);
}

.lottery-winners-board-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

.lottery-winners-hostess {
  margin: 0;
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(245, 197, 66, 0.28);
  background:
    radial-gradient(circle at 50% 20%, rgba(245, 197, 66, 0.18), transparent 55%),
    #0a1228;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.35);
  min-height: 140px;
}

.lottery-winners-hostess-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.lottery-winners-hostess::after {
  content: 'janta.ke';
  position: absolute;
  left: 0.35rem;
  right: 0.35rem;
  bottom: 0.35rem;
  padding: 0.2rem 0.35rem;
  border-radius: 0.4rem;
  background: rgba(8, 16, 40, 0.72);
  border: 1px solid rgba(245, 197, 66, 0.35);
  color: #f5c542;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  backdrop-filter: blur(4px);
}

.lottery-winners-board-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  overflow-y: auto;
  min-height: 0;
  min-width: 0;
  padding-right: 0.15rem;
}

.lottery-winners-board-cols,
.lottery-winners-board-row {
  display: grid;
  grid-template-columns: 1.4rem 2.7rem minmax(0, 1fr) minmax(3.5rem, auto);
  align-items: center;
  column-gap: 0.55rem;
}

.lottery-winners-board-cols {
  padding: 0 0.45rem 0.25rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.45);
}

.lottery-winners-board-col-rank,
.lottery-winners-board-rank {
  text-align: center;
}

.lottery-winners-board-col-ball,
.lottery-winners-board-ball {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lottery-winners-board-col-phone {
  text-align: left;
}

.lottery-winners-board-col-prize {
  text-align: right;
}

.lottery-winners-board-empty {
  margin: auto;
  padding: 1.5rem 0.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(15, 23, 42, 0.4);
}

.lottery-winners-board-row {
  padding: 0.4rem 0.45rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(15, 23, 42, 0.03);
  animation: lotteryWinnerRowIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.lottery-winners-board-row.is-latest {
  border-color: rgba(232, 0, 42, 0.35);
  background: rgba(232, 0, 42, 0.06);
  box-shadow: 0 0 14px rgba(232, 0, 42, 0.1);
}

.lottery-winners-board-rank {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.7rem;
  color: rgba(15, 23, 42, 0.45);
}

.lottery-winners-board-ball .lottery-ball,
.lottery-winners-board-ball .pool-ball,
.lottery-winners-board-row .lottery-ball,
.lottery-winners-board-row .pool-ball {
  width: 2.4rem;
  height: 2.4rem;
  flex-shrink: 0;
  font-size: 0.7rem;
}

.lottery-winners-board-noball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.15);
  color: rgba(15, 23, 42, 0.45);
  font-size: 0.85rem;
  font-weight: 800;
}

.lottery-winners-board-phone {
  min-width: 0;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lottery-winners-board-row.is-latest .lottery-winners-board-phone {
  color: #e8002a;
}

.lottery-winners-board-prize {
  font-size: 0.68rem;
  font-weight: 650;
  color: #15803d;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes lotteryWinnerRowIn {
  from {
    opacity: 0;
    transform: translateX(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@media (max-width: 900px) {
  .draw-ball-arena--no-hostess {
    grid-template-columns: minmax(200px, 1fr);
    grid-template-areas:
      "machine"
      "board";
  }

  .draw-ball-arena--no-hostess .draw-ball-arena-main {
    grid-area: machine;
  }

  .draw-ball-arena--no-hostess .lottery-side-column {
    grid-area: board;
    max-height: none;
  }

  .draw-ball-arena--with-winners {
    grid-template-columns: 1fr;
    grid-template-areas:
      "machine"
      "board";
  }

  .draw-ball-arena--with-winners .draw-ball-hostess {
    display: none;
  }

  .draw-ball-arena--with-winners .draw-ball-arena-main {
    grid-area: machine;
  }

  .draw-ball-arena--with-winners .lottery-side-column {
    grid-area: board;
    max-height: none;
  }

  .viewer-open-draws {
    max-height: 220px;
  }

  .lottery-winners-board {
    max-height: 240px;
    min-height: 160px;
  }
}

@media (max-width: 768px) {
  /* Mobile: single column — machine, then open draws, then winners */
  .draw-ball-arena--no-hostess,
  .draw-ball-arena--with-hostess,
  .draw-ball-arena--with-winners {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    width: 100%;
    grid-template-columns: none !important;
    grid-template-areas: none !important;
  }

  .draw-ball-arena--with-winners .draw-ball-hostess,
  .draw-ball-arena--no-hostess .draw-ball-hostess {
    display: none !important;
  }

  .draw-ball-arena--no-hostess .draw-ball-arena-main,
  .draw-ball-arena--with-winners .draw-ball-arena-main {
    width: 100%;
    order: 1;
    grid-column: auto !important;
  }

  .draw-ball-arena--no-hostess .lottery-side-column,
  .draw-ball-arena--with-winners .lottery-side-column {
    display: contents;
    grid-column: auto !important;
  }

  .draw-ball-arena--no-hostess .viewer-open-draws,
  .draw-ball-arena--with-winners .viewer-open-draws {
    order: 2;
    width: 100%;
    max-width: none;
  }

  .draw-ball-arena--no-hostess .lottery-winners-board,
  .draw-ball-arena--with-winners .lottery-winners-board {
    order: 3;
    width: 100%;
    max-width: none;
  }

  .bingo-lottery-mount {
    width: 100%;
    max-width: min(100%, 360px);
    margin-left: auto;
    margin-right: auto;
  }

  .bingo-lottery-mount #bingo-lottery-root,
  .bingo-lottery-mount .bingo-lottery-root-inner,
  #bingo-lottery-root.bingo-lottery-root-inner,
  .bingo-lottery-root-inner {
    min-height: 0 !important;
    padding: 0.25rem 0.15rem 0.5rem !important;
  }

  /* Enlarge machine so logo + balls are readable */
  .janta-red-machine {
    max-width: min(100%, 340px) !important;
  }

  .janta-red-machine-drum-wrap {
    width: min(100%, 280px) !important;
  }

  .viewer-open-draws {
    max-height: none;
    overflow: visible;
    padding: 0.65rem 0.7rem;
    display: flex;
    flex-direction: column;
  }

  .viewer-open-draws-list {
    max-height: none;
    flex: 1;
    min-height: 0;
    overflow-y: visible;
  }

  .viewer-open-draw-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .viewer-open-draw-stats span:last-child {
    grid-column: auto;
  }

  .viewer-open-draw-card {
    padding: 0.7rem 0.65rem;
  }

  .viewer-open-draw-pool-value {
    font-size: 1.15rem;
  }

  .viewer-open-draw-btn {
    min-height: 44px;
    font-size: 0.85rem;
    padding: 0.55rem 0.5rem;
  }

  .lottery-winners-board {
    max-height: min(42vh, 300px);
    min-height: 160px;
  }

  .lottery-winners-board-body {
    grid-template-columns: 1fr;
  }

  .lottery-winners-hostess {
    display: none;
  }

  .lottery-winners-board-list {
    max-height: none;
    flex: 1;
  }

  .lottery-winners-board-row {
    padding: 0.4rem 0.4rem;
    column-gap: 0.4rem;
    grid-template-columns: 1.2rem 2.4rem minmax(0, 1fr) minmax(3rem, auto);
  }

  .lottery-winners-board-ball .lottery-ball,
  .lottery-winners-board-ball .pool-ball,
  .lottery-winners-board-row .lottery-ball,
  .lottery-winners-board-row .pool-ball,
  .lottery-winners-board-noball {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 0.72rem;
  }

  .lottery-winners-board-phone {
    font-size: 0.8rem;
  }

  .lottery-winners-board-title {
    font-size: 0.92rem;
  }

  .lottery-winners-board-sub {
    font-size: 0.72rem;
  }
}

@media (max-width: 420px) {
  .draw-ball-arena--no-hostess,
  .draw-ball-arena--with-winners {
    gap: 0.55rem;
  }

  .bingo-lottery-mount {
    max-width: min(100%, 320px);
  }

  .janta-red-machine {
    max-width: min(100%, 310px) !important;
  }

  .janta-red-machine-drum-wrap {
    width: min(100%, 255px) !important;
  }

  .viewer-open-draws {
    padding: 0.55rem 0.5rem;
  }

  .viewer-open-draw-stats {
    grid-template-columns: 1fr;
  }

  .viewer-open-draws-title,
  .lottery-winners-board-title {
    font-size: 0.85rem;
  }
}

/* ─── Lottery draw machine v2 (realistic drum + tube + tray) ─── */
.lottery-machine {
  --machine-brown: #3a2418;
  --machine-glass: rgba(210, 225, 240, 0.22);
  position: relative;
  width: min(100%, 360px);
  margin: 0 auto;
  padding: 0.15rem 0 0.65rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  perspective: 900px;
  animation: lotteryMachineIdle 5.5s ease-in-out infinite;
}

.lottery-machine--v2 {
  filter: drop-shadow(0 20px 32px rgba(0, 0, 0, 0.5));
}

.lottery-machine-sky {
  position: relative;
  width: 100%;
  height: 3.1rem;
  margin-bottom: -0.55rem;
  overflow: visible;
  pointer-events: none;
  z-index: 8;
}

.lottery-machine-stage {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0.65rem 1rem;
  border-radius: 30px;
  background:
    radial-gradient(ellipse 68% 48% at 50% 22%, rgba(120, 75, 45, 0.55), transparent 68%),
    radial-gradient(ellipse 90% 60% at 50% 100%, rgba(0, 0, 0, 0.45), transparent 55%),
    linear-gradient(180deg, #523426 0%, #2c1a12 46%, #140e0b 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 180, 0.14),
    inset 0 -24px 44px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 200, 140, 0.08);
  overflow: hidden;
  transform-style: preserve-3d;
}

.lottery-machine-glow {
  position: absolute;
  top: 8%;
  left: 50%;
  width: 70%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 180, 255, 0.18), transparent 68%);
  filter: blur(22px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  animation: lotteryMachineAura 4s ease-in-out infinite;
}

.lottery-machine-globe {
  position: relative;
  width: min(100%, 248px);
  aspect-ratio: 1;
  border-radius: 50%;
  z-index: 4;
  overflow: hidden;
  transform: rotateX(6deg);
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.62) 0%, transparent 26%),
    radial-gradient(circle at 70% 78%, rgba(20, 40, 70, 0.35) 0%, transparent 42%),
    radial-gradient(circle at 50% 55%, rgba(150, 185, 220, 0.14) 0%, rgba(35, 50, 75, 0.22) 48%, rgba(10, 16, 28, 0.55) 100%);
  border: 2.5px solid rgba(235, 244, 255, 0.62);
  box-shadow:
    inset 0 0 0 12px rgba(255, 255, 255, 0.07),
    inset 0 -34px 54px rgba(8, 16, 32, 0.38),
    inset 0 18px 30px rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.28),
    0 14px 34px rgba(0, 0, 0, 0.42),
    0 0 40px rgba(100, 160, 255, 0.08);
}

.lottery-machine-globe-shadow {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -10%;
  height: 22%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.45), transparent 70%);
  filter: blur(6px);
  pointer-events: none;
  z-index: 0;
}

.lottery-machine-globe-inner {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 32%, rgba(255, 255, 255, 0.16), transparent 40%),
    radial-gradient(circle at 50% 62%, rgba(25, 40, 65, 0.35), rgba(8, 14, 26, 0.55));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 10px 22px rgba(255, 255, 255, 0.1),
    inset 0 -14px 24px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  z-index: 1;
}

.lottery-machine-vortex {
  position: absolute;
  inset: 20%;
  border-radius: 50%;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background:
    conic-gradient(
      from 0deg,
      transparent 0deg,
      rgba(255, 255, 255, 0.08) 40deg,
      transparent 80deg,
      rgba(120, 180, 255, 0.12) 140deg,
      transparent 180deg,
      rgba(255, 255, 255, 0.06) 240deg,
      transparent 300deg,
      rgba(120, 180, 255, 0.1) 340deg,
      transparent 360deg
    );
  mix-blend-mode: screen;
}

.lottery-machine-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 5;
  background:
    repeating-conic-gradient(
      from 0deg,
      rgba(255, 255, 255, 0.7) 0deg 2.5deg,
      transparent 2.5deg 11deg
    );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
  opacity: 0.55;
  animation: lotteryMachineRing 18s linear infinite;
}

.lottery-machine-globe-rim {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  z-index: 6;
}

.lottery-machine-globe-glass {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    linear-gradient(128deg, rgba(255, 255, 255, 0.38) 0%, transparent 24%, transparent 62%, rgba(255, 255, 255, 0.1) 100%),
    radial-gradient(circle at 50% 100%, rgba(180, 210, 255, 0.12), transparent 45%);
  pointer-events: none;
  z-index: 6;
}

.lottery-machine-globe-shine {
  position: absolute;
  top: 9%;
  left: 13%;
  width: 40%;
  height: 26%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.85), transparent 72%);
  pointer-events: none;
  z-index: 7;
  animation: lotteryMachineShine 5s ease-in-out infinite;
}

.lottery-machine-balls {
  position: absolute;
  inset: 17% 13% 15%;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 0.16rem;
  justify-content: center;
  align-content: flex-end;
  overflow: hidden;
  border-radius: 50%;
  padding: 0.2rem;
}

.lottery-machine-balls .lottery-ball,
.lottery-machine-balls .pool-ball {
  --ball-size: 1.58rem;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.4));
  animation: lotteryMachineIdleTumble 3.4s ease-in-out infinite;
  will-change: transform;
}

.lottery-machine-balls .lottery-ball:nth-child(2n) {
  animation-duration: 2.9s;
  animation-delay: 0.2s;
}

.lottery-machine-balls .lottery-ball:nth-child(3n) {
  animation-duration: 3.8s;
  animation-delay: 0.45s;
}

.lottery-machine-balls .lottery-ball:nth-child(4n) {
  animation-duration: 3.1s;
  animation-delay: 0.7s;
}

.lottery-machine-balls .lottery-ball:nth-child(5n) {
  animation-duration: 4.2s;
  animation-delay: 0.15s;
}

.lottery-machine-count,
.lottery-machine-rack-count,
.lottery-machine-rack-label {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.winner-ball-phone {
  display: none;
}

.lottery-machine-tube {
  position: relative;
  width: 58px;
  height: 52px;
  margin-top: -8px;
  z-index: 3;
  pointer-events: none;
}

.lottery-machine-tube-glass,
.lottery-machine-tube::before {
  content: none;
}

.lottery-machine-tube-glass {
  position: absolute;
  left: 50%;
  top: 0;
  width: 24px;
  height: 30px;
  transform: translateX(-50%);
  border-radius: 0 0 14px 14px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28), rgba(170, 200, 230, 0.14) 45%, rgba(255, 255, 255, 0.3));
  border: 1.5px solid rgba(235, 245, 255, 0.55);
  border-top: none;
  box-shadow:
    inset 0 0 10px rgba(255, 255, 255, 0.2),
    0 4px 10px rgba(0, 0, 0, 0.2);
}

.lottery-machine-tube-bend {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 52px;
  height: 30px;
  transform: translateX(-16%);
  border: 1.5px solid rgba(235, 245, 255, 0.5);
  border-top: none;
  border-left: none;
  border-radius: 0 0 24px 0;
  background:
    linear-gradient(135deg, rgba(200, 220, 245, 0.18), rgba(255, 255, 255, 0.1));
  box-shadow: inset -5px -3px 12px rgba(255, 255, 255, 0.16);
}

.lottery-machine-tube-shine {
  position: absolute;
  left: 42%;
  top: 8%;
  width: 6px;
  height: 42%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), transparent);
  opacity: 0.65;
  animation: lotteryMachineTubeShine 2.8s ease-in-out infinite;
}

.lottery-machine-chute-sky {
  position: absolute;
  left: 40%;
  bottom: 3.9rem;
  width: 52%;
  height: 3.4rem;
  overflow: visible;
  pointer-events: none;
  z-index: 7;
}

.lottery-machine-rack {
  width: min(100%, 292px);
  margin-top: 0.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 4;
}

.lottery-machine-rack-tray {
  position: relative;
  width: 100%;
  min-height: 3.65rem;
  padding: 0.5rem 0.6rem 0.55rem;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(225, 236, 248, 0.38) 0%, rgba(130, 158, 188, 0.22) 100%);
  border: 1.5px solid rgba(235, 245, 255, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -10px 18px rgba(20, 30, 45, 0.22),
    0 10px 22px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(8px);
  overflow: hidden;
}

.lottery-machine-rack-slot {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  pointer-events: none;
  animation: lotteryMachineTrayShimmer 4.5s ease-in-out infinite;
}

.lottery-machine-rack-lip {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  pointer-events: none;
}

.lottery-machine-rack-balls {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.32rem;
  justify-content: flex-start;
  align-items: center;
  min-height: 2.55rem;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  padding: 0 0.1rem;
}

.lottery-machine-rack-balls .lottery-ball,
.lottery-machine-rack-balls .pool-ball {
  --ball-size: 1.95rem;
  animation: lotteryMachineTrayBallIn 0.55s cubic-bezier(0.22, 1.2, 0.36, 1) both;
}

/* Mixing / draw animations */
.lottery-machine.is-mixing {
  animation: none;
}

.lottery-machine.is-mixing .lottery-machine-glow {
  opacity: 1;
  animation-duration: 1.2s;
  background: radial-gradient(circle, rgba(140, 200, 255, 0.35), transparent 68%);
}

.lottery-machine.is-mixing .lottery-machine-vortex {
  opacity: 1;
  animation: lotteryMachineSpin 0.85s linear infinite;
}

.lottery-machine.is-mixing .lottery-machine-ring {
  opacity: 0.9;
  animation: lotteryMachineRing 1.1s linear infinite;
}

.lottery-machine.is-mixing .lottery-machine-globe {
  animation: lotteryMachineShake 0.35s ease-in-out infinite;
  box-shadow:
    inset 0 0 0 12px rgba(255, 255, 255, 0.07),
    inset 0 -34px 54px rgba(8, 16, 32, 0.38),
    inset 0 18px 30px rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.35),
    0 0 36px rgba(120, 190, 255, 0.4),
    0 14px 34px rgba(0, 0, 0, 0.42);
}

.lottery-machine.is-mixing .lottery-machine-balls .lottery-ball {
  animation: lotteryMachineTumble 0.42s ease-in-out infinite alternate !important;
}

.lottery-machine.is-mixing .lottery-machine-balls .lottery-ball:nth-child(2n) {
  animation-name: lotteryMachineTumbleB !important;
  animation-duration: 0.36s !important;
}

.lottery-machine.is-mixing .lottery-machine-balls .lottery-ball:nth-child(3n) {
  animation-name: lotteryMachineTumbleC !important;
  animation-duration: 0.5s !important;
}

.lottery-machine.is-mixing .lottery-machine-balls .lottery-ball:nth-child(4n) {
  animation-name: lotteryMachineTumble !important;
  animation-duration: 0.38s !important;
  animation-delay: 0.05s !important;
}

.lottery-machine.is-mixing .lottery-machine-tube-shine {
  animation-duration: 0.7s;
  opacity: 1;
}

.lottery-machine.is-drawing .lottery-machine-tube-glass,
.lottery-machine.is-drawing .lottery-machine-tube-bend {
  box-shadow:
    inset 0 0 14px rgba(255, 255, 255, 0.45),
    0 0 18px rgba(120, 190, 255, 0.45);
}

.lottery-machine.is-drawing .lottery-machine-rack-tray {
  animation: lotteryMachineTrayPulse 0.7s ease-out;
}

.lottery-machine--impact .lottery-machine-globe,
.lottery-machine-globe.draw-ball-basket--impact,
.lottery-machine-rack.draw-ball-basket--impact {
  animation: drawBasketImpact 0.55s ease-out;
}

.lottery-machine--mini {
  width: min(100%, 200px);
  animation: none;
  filter: none;
}

.lottery-machine--mini .lottery-machine-glow,
.lottery-machine--mini .lottery-machine-vortex,
.lottery-machine--mini .lottery-machine-globe-shadow {
  display: none;
}

.lottery-machine--mini .lottery-machine-stage {
  padding: 0.55rem 0.4rem 0.55rem;
  border-radius: 18px;
}

.lottery-machine--mini .lottery-machine-globe {
  width: 132px;
  transform: none;
}

.lottery-machine--mini .lottery-machine-balls .lottery-ball {
  --ball-size: 1.55rem;
  animation: none;
}

.lottery-machine--mini .lottery-machine-tube {
  height: 28px;
  width: 36px;
}

.lottery-machine--mini .lottery-machine-tube-glass {
  width: 16px;
  height: 16px;
}

.lottery-machine--mini .lottery-machine-tube-bend {
  width: 30px;
  height: 16px;
}

.lottery-machine--mini .lottery-machine-rack {
  width: 100%;
}

.lottery-machine--mini .lottery-machine-rack-tray {
  min-height: 2.2rem;
  padding: 0.25rem;
}

.lottery-machine--mini .lottery-machine-chute-sky {
  display: none;
}

/* Join-draw overlay — mini red machine */
.ball-join-machine.janta-red-machine--mini {
  width: min(100%, 160px);
  margin: 0 auto;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.35));
}

.janta-red-machine--mini .janta-red-machine-drum-wrap {
  width: 100%;
}

.janta-red-machine--mini .janta-red-machine-base {
  gap: 0.45rem;
  padding: 0.35rem 0.5rem 0.5rem;
}

.janta-red-machine--mini .janta-red-machine-start {
  width: 1.5rem;
  height: 1.5rem;
  border-width: 2px;
}

.janta-red-machine--mini .janta-red-machine-panel {
  max-width: 5rem;
  padding: 0.2rem 0.3rem;
}

.janta-red-machine--mini .janta-red-machine-display {
  font-size: 0.55rem;
}

.janta-red-machine--mini .janta-red-machine-tray {
  min-height: 1.5rem;
}

.janta-red-machine--mini .janta-red-machine-drum-rim {
  border-width: 6px;
}

/* JANTA.ke logo inside machine drum (main + mini) */
.janta-red-machine-drum {
  background:
    radial-gradient(circle at 50% 88%, rgba(255, 220, 80, 0.1) 0%, transparent 42%),
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.4) 0%, transparent 38%),
    linear-gradient(160deg, #f4f7fb 0%, #dce5f0 55%, #b8c4d4 100%) !important;
  isolation: isolate;
}

.janta-red-machine-drum::before {
  content: '';
  position: absolute;
  inset: 14%;
  z-index: 1;
  border-radius: 50%;
  background: url('/images/janta-ke-logo-clear.png?v=20260731a') center center / contain no-repeat;
  pointer-events: none;
}

.janta-drum-logo-injected,
.janta-red-machine-drum-logo-wrap {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  padding: 14%;
}

.janta-drum-logo-injected img,
.janta-red-machine-drum-logo {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  filter: saturate(1.15) contrast(1.05) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18));
}

.janta-red-machine-drum-glass {
  z-index: 4 !important;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent 48%, #000 90%);
  mask-image: radial-gradient(circle at 50% 50%, transparent 48%, #000 90%);
}

.janta-red-machine--mini .janta-red-machine-drum {
  inset: 8px;
}

@keyframes lotteryMachineIdle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes lotteryMachineAura {
  0%, 100% { opacity: 0.45; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.9; transform: translateX(-50%) scale(1.08); }
}

@keyframes lotteryMachineRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes lotteryMachineSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes lotteryMachineShine {
  0%, 100% { opacity: 0.75; transform: translate(0, 0) scale(1); }
  50% { opacity: 1; transform: translate(4px, 2px) scale(1.05); }
}

@keyframes lotteryMachineTubeShine {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.9; }
}

@keyframes lotteryMachineTrayShimmer {
  0%, 100% { opacity: 0.5; transform: translateX(-8%); }
  50% { opacity: 1; transform: translateX(8%); }
}

@keyframes lotteryMachineIdleTumble {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  35% { transform: translate(2px, -5px) rotate(10deg); }
  70% { transform: translate(-2px, -2px) rotate(-8deg); }
}

@keyframes lotteryMachineTumble {
  from { transform: translate(-6px, 4px) rotate(-20deg) scale(0.96); }
  to { transform: translate(10px, -16px) rotate(40deg) scale(1.05); }
}

@keyframes lotteryMachineTumbleB {
  from { transform: translate(8px, 2px) rotate(25deg); }
  to { transform: translate(-12px, -14px) rotate(-35deg); }
}

@keyframes lotteryMachineTumbleC {
  from { transform: translate(0, 6px) rotate(5deg); }
  to { transform: translate(6px, -18px) rotate(50deg); }
}

@keyframes lotteryMachineShake {
  0%, 100% { transform: rotateX(6deg) rotate(-0.6deg); }
  50% { transform: rotateX(6deg) rotate(0.6deg); }
}

@keyframes lotteryMachineTrayPulse {
  0% { transform: scale(1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 10px 22px rgba(0, 0, 0, 0.32); }
  40% { transform: scale(1.03); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 0 24px rgba(120, 190, 255, 0.4); }
  100% { transform: scale(1); }
}

@keyframes lotteryMachineTrayBallIn {
  from { transform: translateY(-10px) scale(0.7); opacity: 0; }
  60% { transform: translateY(2px) scale(1.08); opacity: 1; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.draw-ball-buckets {
  display: none;
}

.draw-ball-bucket-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.draw-ball-bucket-label {
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(200, 210, 230, 0.75);
}

.draw-ball-bucket-label--winners {
  color: #f5c518;
  text-shadow: 0 0 12px rgba(245, 197, 24, 0.35);
}

.draw-ball-arena-sky--winners {
  height: 2.75rem;
}

.draw-ball-basket--winners {
  border-color: rgba(245, 197, 24, 0.45);
}

.lottery-ball--winner {
  box-shadow:
    0 0 0 2px rgba(245, 197, 24, 0.9),
    0 3px 0 rgba(0, 0, 0, 0.18),
    0 8px 16px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(245, 197, 24, 0.35);
}

.lottery-ball--winner-drop {
  filter: drop-shadow(0 10px 10px rgba(245, 197, 24, 0.35));
}

.winner-ball-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  flex-shrink: 0;
}

.winner-ball-phone {
  display: block;
  max-width: 4.4rem;
  padding: 0.1rem 0.22rem;
  border-radius: 999px;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: #fff8d6;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(245, 197, 24, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.open-draw-winner-results {
  margin-top: 0.65rem;
  padding: 0.65rem 0.7rem;
  border-radius: 12px;
  background: rgba(12, 10, 4, 0.72);
  border: 1px solid rgba(245, 197, 24, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.open-draw-winner-results.hidden {
  display: none;
}

.open-draw-winner-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.open-draw-winner-results-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #f5c518;
}

.open-draw-winner-results-note {
  font-size: 0.65rem;
  color: rgba(255, 230, 150, 0.65);
}

.open-draw-winner-results-grid {
  display: grid;
  gap: 0.4rem;
}

.open-draw-winner-chip {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.55rem;
  row-gap: 0.1rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  background: rgba(245, 197, 24, 0.08);
  border: 1px solid rgba(245, 197, 24, 0.22);
  animation: openDrawWinnerIn 0.35s ease both;
}

.open-draw-winner-chip-ball {
  grid-row: 1 / span 2;
  min-width: 2.1rem;
  padding: 0.3rem 0.4rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #1a1400;
  background: linear-gradient(135deg, #ffe082, #f5c518);
}

.open-draw-winner-chip-phone {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff8d6;
  letter-spacing: 0.04em;
}

.open-draw-winner-chip-prize {
  grid-column: 2;
  font-size: 0.68rem;
  color: rgba(255, 230, 150, 0.75);
}

@keyframes openDrawWinnerIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.draw-ball-hostess {
  margin: 0;
  position: relative;
  z-index: 2;
  align-self: end;
  justify-self: end;
  width: 100%;
  max-width: 280px;
  padding-top: 3.75rem;
}

/* Remove lady image: hide hostess and collapse the layout grid to 2 columns (machine + board). */
.draw-ball-arena--with-hostess .draw-ball-hostess {
  display: none !important;
}

@media (min-width: 769px) {
  .draw-ball-arena--with-hostess.draw-ball-arena--with-winners {
    grid-template-columns: minmax(240px, 1.2fr) minmax(220px, 0.85fr);
  }

  .draw-ball-arena--with-hostess.draw-ball-arena--with-winners .draw-ball-arena-main {
    grid-column: 1;
  }

  .draw-ball-arena--with-hostess.draw-ball-arena--with-winners .lottery-side-column {
    grid-column: 2;
  }
}

.hostess-speech {
  position: absolute;
  left: 50%;
  top: auto;
  bottom: calc(100% - 0.35rem);
  z-index: 5;
  width: min(12.5rem, 108%);
  padding: 0.65rem 0.75rem 0.7rem;
  border-radius: 14px 14px 14px 14px;
  background: linear-gradient(165deg, #fff8e7 0%, #ffe7a8 55%, #f5c518 100%);
  color: #1a1208;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(180, 130, 20, 0.45);
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  animation: hostessSpeechPop 0.55s ease both, hostessSpeechBob 3.2s ease-in-out 0.55s infinite;
}

.hostess-speech::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  background: #f5c518;
  border-right: 1px solid rgba(180, 130, 20, 0.45);
  border-bottom: 1px solid rgba(180, 130, 20, 0.45);
  transform: rotate(45deg);
  border-radius: 2px;
}

.hostess-speech-text {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.01em;
  min-height: 2.6em;
  text-align: center;
}

.hostess-speech-caret {
  display: inline-block;
  width: 0.12em;
  height: 1em;
  margin-left: 1px;
  vertical-align: -0.1em;
  background: #1a1208;
  animation: hostessCaretBlink 0.7s step-end infinite;
}

.hostess-speech-caret.is-done {
  opacity: 0;
  animation: none;
}

@keyframes hostessSpeechPop {
  0% { opacity: 0; transform: translateX(-50%) scale(0.7) translateY(8px); }
  100% { opacity: 1; transform: translateX(-50%) scale(1) translateY(0); }
}

@keyframes hostessSpeechBob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-3px); }
}

@keyframes hostessCaretBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.draw-ball-hostess-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
  object-position: center bottom;
  background: transparent;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.45));
  animation: hostessIdle 4.5s ease-in-out infinite;
}

@keyframes hostessIdle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.draw-ball-arena-sky {
  position: relative;
  height: 3.75rem;
  margin-bottom: 0.15rem;
  overflow: visible;
  pointer-events: none;
}

.draw-ball-basket,
.ball-join-basket {
  position: relative;
  min-height: 8.5rem;
  padding: 1.85rem 0.95rem 1.1rem;
  border-radius: 0 0 28px 28px;
  overflow: visible;
  background:
    linear-gradient(180deg, rgba(40, 52, 78, 0.35) 0%, rgba(12, 16, 28, 0.72) 45%, rgba(8, 10, 18, 0.92) 100%);
  border: 1px solid rgba(180, 190, 210, 0.28);
  border-top: none;
  box-shadow:
    inset 0 22px 36px rgba(0, 0, 0, 0.45),
    inset 0 -10px 18px rgba(255, 255, 255, 0.04),
    0 16px 28px rgba(0, 0, 0, 0.4);
}

.draw-ball-basket--realistic {
  border-radius: 18px 18px 42% 42% / 12px 12px 55% 55%;
  background:
    radial-gradient(ellipse 90% 55% at 50% 18%, rgba(120, 150, 200, 0.22), transparent 55%),
    linear-gradient(185deg, rgba(55, 68, 95, 0.55) 0%, rgba(22, 28, 44, 0.88) 38%, rgba(10, 12, 22, 0.96) 100%);
  border: 1.5px solid rgba(210, 220, 235, 0.35);
  border-top-color: rgba(255, 215, 120, 0.55);
  box-shadow:
    inset 0 28px 40px rgba(0, 0, 0, 0.5),
    inset 0 -14px 22px rgba(40, 80, 40, 0.12),
    0 18px 32px rgba(0, 0, 0, 0.48);
}

.draw-ball-basket-glow {
  position: absolute;
  left: 12%;
  right: 12%;
  top: -6px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 214, 90, 0.45), transparent 70%);
  filter: blur(4px);
  pointer-events: none;
  z-index: 0;
}

.draw-ball-basket-rim {
  position: absolute;
  left: -3px;
  right: -3px;
  top: -11px;
  height: 22px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, #fff3b0 0%, #f5c518 28%, #c9970e 58%, #8a6a08 100%);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.45),
    inset 0 2px 2px rgba(255, 255, 255, 0.65),
    inset 0 -2px 3px rgba(0, 0, 0, 0.35);
  z-index: 4;
}

.draw-ball-basket-rim-inner {
  position: absolute;
  left: 8px;
  right: 8px;
  top: -2px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(20, 24, 36, 0.85), rgba(40, 48, 68, 0.35));
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.55);
  z-index: 3;
  pointer-events: none;
}

.draw-ball-basket-glass {
  position: absolute;
  inset: 8px 10px 36px;
  border-radius: 10px 10px 40% 40% / 8px 8px 55% 55%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, transparent 35%, transparent 65%, rgba(255, 255, 255, 0.05) 100%),
    linear-gradient(180deg, rgba(160, 190, 230, 0.08), rgba(20, 30, 50, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
  z-index: 1;
}

.draw-ball-basket-wire {
  position: absolute;
  inset: 14px 14px 40px;
  border-radius: 8px 8px 38% 38% / 6px 6px 52% 52%;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 9px,
      rgba(200, 210, 225, 0.16) 9px,
      rgba(200, 210, 225, 0.16) 10px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 9px,
      rgba(200, 210, 225, 0.12) 9px,
      rgba(200, 210, 225, 0.12) 10px
    );
  mask-image: radial-gradient(ellipse 95% 100% at 50% 40%, #000 55%, transparent 100%);
  pointer-events: none;
  z-index: 2;
  opacity: 0.9;
}

.draw-ball-basket-net {
  position: absolute;
  inset: 16px 14px 34px;
  border-radius: 0 0 40% 40% / 0 0 55% 55%;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(20, 90, 40, 0.35), transparent 60%);
  pointer-events: none;
  z-index: 1;
}

.draw-ball-basket-base {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 6px;
  height: 14px;
  border-radius: 50%;
  background:
    linear-gradient(180deg, #1f6b3a 0%, #0f3d22 55%, #0a2816 100%);
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.12),
    0 4px 8px rgba(0, 0, 0, 0.35);
  z-index: 0;
  pointer-events: none;
}

.draw-ball-basket-shadow {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -10px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.45), transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.draw-ball-basket-balls {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  align-content: flex-end;
  min-height: 4.5rem;
  padding-bottom: 0.35rem;
}

.draw-ball-basket-count {
  position: relative;
  z-index: 3;
  margin: 0.45rem 0 0.15rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(230, 235, 245, 0.78);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.ball-join-stage {
  width: min(100%, 280px);
  margin: 0.5rem auto 0.85rem;
}

.ball-join-sky {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 5.5rem;
  margin-bottom: 0.35rem;
  overflow: visible;
}

.ball-join-basket {
  min-height: 5.5rem;
  padding-top: 1.45rem;
}

@media (max-width: 640px) {
  .draw-ball-arena--no-hostess {
    width: 100%;
    justify-items: stretch;
  }

  .draw-ball-arena--with-hostess {
    width: 100%;
    justify-items: stretch;
  }

  .draw-ball-arena--with-winners .draw-ball-hostess {
    display: none;
  }

  .hostess-speech {
    left: 50%;
    bottom: calc(100% - 0.2rem);
    width: min(11rem, 100%);
    font-size: 0.72rem;
  }

  .draw-ball-hostess-img {
    max-height: 140px;
  }

  .draw-ball-arena-main {
    width: 100%;
  }

  .lottery-machine {
    width: min(100%, 280px);
  }

  .lottery-machine-globe {
    width: min(100%, 200px);
  }

  .lottery-machine-stage {
    padding: 0.65rem 0.4rem 0.7rem;
  }

  .draw-ball-buckets {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .draw-ball-arena-sky--winners {
    height: 2.25rem;
  }

  body.viewer-page .shopwin-banner {
    min-height: 0;
    padding: 0.35rem 0.45rem;
  }

  body.viewer-page .shopwin-banner-title {
    font-size: 0.85rem;
  }

  body.viewer-page .participate-brand-letter {
    font-size: clamp(1.6rem, 8vw, 2.4rem);
  }

  body.viewer-page .wallet-panel,
  body.viewer-page .history-panel {
    border-radius: 14px;
  }

  body.viewer-page .viewer-wallet-balance {
    font-size: 1.55rem;
  }
}

.ball-assign-overlay {
  position: fixed;
  inset: 0;
  z-index: 980;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(6, 8, 16, 0.82);
  backdrop-filter: blur(8px);
}

.ball-assign-overlay.hidden {
  display: none;
}

.ball-assign-card {
  width: min(100%, 360px);
  text-align: center;
  padding: 1.75rem 1.35rem;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid rgba(245, 197, 24, 0.35);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
}

.ball-assign-kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.ball-assign-title {
  margin: 0.35rem 0;
  font-size: 1.45rem;
  color: var(--text);
}

.ball-assign-msg {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.host-mini-sheet-col--ball {
  width: 3.6rem;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  text-align: center;
  padding-left: 0.35rem !important;
  padding-right: 0.35rem !important;
}

.host-mini-sheet td.host-mini-sheet-col--ball {
  overflow: visible;
}

.host-mini-pool-ball {
  --ball-color: #f5d031;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.85rem;
  height: 1.85rem;
  margin: 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.55), transparent 40%),
    radial-gradient(circle at 50% 50%, var(--ball-color), color-mix(in srgb, var(--ball-color) 65%, #000));
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.25), 0 2px 4px rgba(0, 0, 0, 0.3);
  vertical-align: middle;
}

.host-mini-pool-ball--stripe {
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.45), transparent 40%),
    linear-gradient(180deg, #f7f4ec 0%, #f7f4ec 28%, var(--ball-color) 28%, var(--ball-color) 72%, #f7f4ec 72%, #f7f4ec 100%);
}

.host-mini-pool-num {
  width: 58%;
  height: 58%;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 0.58rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0 0.05rem;
}

.host-mini-pool-num--2 {
  font-size: 0.5rem;
}

.host-mini-pool-num--3 {
  font-size: 0.42rem;
  letter-spacing: -0.03em;
}

/* --- Phone performance: cut continuous paint work --- */
@media (max-width: 768px) {
  .lottery-stage-icon,
  .lottery-machine,
  .lottery-machine--v2,
  .lottery-machine-balls .lottery-ball,
  .lottery-machine-glow,
  .viewer-intro-wheel-ring,
  .viewer-intro-spinner {
    animation: none !important;
  }

  /* Bingo drum cage: JS physics drives --js rotor; CSS fallback otherwise */
  .janta-drum-cage-rotor:not(.janta-drum-cage-rotor--js) {
    animation: jantaDrumCageSpin 3.2s linear infinite !important;
  }

  .janta-drum-cage-rotor--js {
    animation: none !important;
  }

  .janta-drum-cage--fast .janta-drum-cage-rotor:not(.janta-drum-cage-rotor--js),
  .janta-red-machine--live .janta-drum-cage-rotor:not(.janta-drum-cage-rotor--js) {
    animation-duration: 0.55s !important;
  }

  .lottery-machine--v2,
  .lottery-machine {
    filter: none !important;
  }

  .lottery-winners-board,
  .viewer-open-draws,
  .participate-overlay-card,
  .viewer-wallet-balance-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .participate-win-rays,
  .participate-win-celebration {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  /* Drum cage stays spinning even with OS reduce-motion (CSS fallback only) */
  .janta-drum-cage-rotor:not(.janta-drum-cage-rotor--js) {
    animation: jantaDrumCageSpin 3.2s linear infinite !important;
    animation-duration: 3.2s !important;
    animation-iteration-count: infinite !important;
  }

  .janta-drum-cage-rotor--js {
    animation: none !important;
  }

  .janta-drum-cage--fast .janta-drum-cage-rotor:not(.janta-drum-cage-rotor--js),
  .janta-red-machine--live .janta-drum-cage-rotor:not(.janta-drum-cage-rotor--js) {
    animation-duration: 0.55s !important;
  }
}

@keyframes jantaDrumCageSpin {
  from {
    transform: translateZ(0) rotate(0deg);
  }
  to {
    transform: translateZ(0) rotate(360deg);
  }
}
/* ═══ Host console — professional layout overrides ═══ */
body.host-page {
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(232, 0, 42, 0.08), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(245, 197, 24, 0.06), transparent 45%),
    var(--bg-dark);
}

body.host-page .header { display: none !important; }

body.host-page .host-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 0.85rem 1.25rem;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 16, 28, 0.94);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 40;
}

body.host-page .host-topbar-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

body.host-page .host-topbar-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.55rem;
  background: linear-gradient(145deg, #e8002a, #9f0018);
  color: #fff;
  font-family: "Instrument Sans", "DM Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

body.host-page .host-topbar-name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

body.host-page .host-topbar-name strong {
  font-family: "Instrument Sans", "DM Sans", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

body.host-page .host-topbar-name span {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.host-page .host-topbar-status {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
}

body.host-page .host-topbar-live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 61, 87, 0.35);
  background: rgba(255, 61, 87, 0.1);
  color: #ff8a9a;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

body.host-page .host-topbar-sep {
  width: 1px;
  height: 1rem;
  background: rgba(255, 255, 255, 0.12);
}

body.host-page .host-topbar-viewers {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

body.host-page .host-topbar-title:empty { display: none; }
body.host-page .host-topbar-title:not(:empty) {
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.host-page .host-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  justify-content: flex-end;
}

body.host-page .host-topbar-btn {
  min-height: 36px;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
}

body.host-page .stream-room.host-shell,
body.host-page .stream-room {
  grid-template-columns: minmax(0, 1fr) min(400px, 36vw) !important;
  gap: 1rem !important;
  padding: 1rem 1.1rem 1.25rem !important;
  height: calc(100vh - 58px);
  align-items: stretch;
}

body.host-page .host-main { min-width: 0; gap: 0.85rem; }

body.host-page .host-toolbar {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(18, 24, 42, 0.88);
}

body.host-page .host-toolbar-share label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.host-page .host-toolbar-hint {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
}

body.host-page .video-container.host-stage,
body.host-page .video-container {
  overflow-y: auto;
  overflow-x: hidden;
  min-height: min(62vh, 580px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(18, 24, 42, 0.5), rgba(8, 12, 22, 0.92));
}

body.host-page .lottery-stage-idle.host-draw-board {
  padding: 1.15rem 1.1rem 1.35rem !important;
  text-align: left;
}

body.host-page .host-stage-title-block h3 {
  margin: 0.35rem 0 0.25rem;
  font-family: "Instrument Sans", "DM Sans", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

body.host-page .host-stage-title-block .lottery-stage-lead {
  margin: 0;
  max-width: 36rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

body.host-page .host-open-live-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(245, 197, 24, 0.3);
  background: rgba(245, 197, 24, 0.1);
  color: var(--gold);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.host-page .host-stage-winners-section {
  margin-top: 1.15rem;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}

body.host-page .host-stage-winners-heading h4 {
  margin: 0 0 0.2rem;
  font-family: "Instrument Sans", "DM Sans", sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

body.host-page .host-sidebar {
  max-height: calc(100vh - 74px) !important;
  padding: 0.15rem 0.35rem 0.15rem 0;
}

body.host-page .host-panel {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(18, 24, 42, 0.92);
  overflow: hidden;
}

body.host-page .panel-header--host {
  background: rgba(255, 255, 255, 0.02) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.host-page .panel-header-title {
  font-family: "Instrument Sans", "DM Sans", sans-serif;
  color: #fff !important;
}

body.host-page .stream-meta,
body.host-page .link-panel,
body.host-page .broadcaster-controls {
  display: none !important;
}

body.host-page .host-boot-status {
  background: rgba(12, 16, 28, 0.96);
}

@media (max-width: 980px) {
  body.host-page .host-topbar {
    grid-template-columns: 1fr auto;
  }
  body.host-page .host-topbar-status {
    grid-column: 1 / -1;
    justify-content: flex-start;
    order: 3;
  }
  body.host-page .stream-room.host-shell,
  body.host-page .stream-room {
    grid-template-columns: 1fr !important;
    height: auto !important;
    min-height: calc(100vh - 58px);
  }
  body.host-page .host-sidebar {
    max-height: none !important;
    overflow: visible !important;
  }
}
