/* ═══════════════════════════════════════════════
   Party-Companion – Design System v3
   White-Label Theming
   ═══════════════════════════════════════════════ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:wght@300;400;500;600;700&family=Caveat:wght@400;500;600;700&display=swap');

/* ─── Design Tokens ─── */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121c;
  --bg-card: rgba(20, 20, 35, 0.75);
  --bg-card-solid: #14141f;
  --text-primary: #fbfbfd;
  --text-secondary: #c5c5e0;
  --text-muted: #9fa0b5;
  --accent: #e63946;
  --accent-hover: #ff4757;
  --accent-glow: rgba(230, 57, 70, 0.25);
  --accent-glow-strong: rgba(230, 57, 70, 0.5);
  --accent-r: 230;
  --accent-g: 57;
  --accent-b: 70;
  --gold: #f4a261;
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-border-hover: rgba(255, 255, 255, 0.12);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px var(--accent-glow);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --font-body: 'Fira Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-handwriting: 'Caveat', cursive;
}

/* ─── Reset / Base ─── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle dot-pattern background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}

/* ─── Typography ─── */
h1,
h2,
h3,
h4 {
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

.text-accent {
  color: var(--accent);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-muted {
  color: var(--text-muted);
}

.text-handwriting {
  font-family: var(--font-handwriting);
  font-weight: 500;
}

/* ─── Glass Card ─── */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 4px 24px var(--accent-glow);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 32px var(--accent-glow);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-text, #fff);
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn:hover::before {
  opacity: 1;
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

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

.btn-outline:hover {
  background: var(--accent);
  color: var(--accent-text, #fff);
}

.btn-sm {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
}

.btn-block {
  width: 100%;
}

.btn-subtle {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-subtle:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.btn-loading .btn-text {
  opacity: 0;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ─── Form Elements ─── */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-sm);
  outline: none;
  transition: all var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--bg-primary);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

input[type="number"].form-input {
  -moz-appearance: textfield;
  appearance: textfield;
}

input[type="number"].form-input::-webkit-inner-spin-button,
input[type="number"].form-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.form-hint {
  font-size: 0.8rem;
  margin-top: 0.375rem;
  min-height: 1.2em;
}

.form-hint.success {
  color: #69DB7C;
}

.form-hint.error {
  color: var(--accent);
}

.form-error {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-glow) !important;
}

.error-shake {
  animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

  10%,
  90% {
    transform: translate3d(-1px, 0, 0);
  }

  20%,
  80% {
    transform: translate3d(2px, 0, 0);
  }

  30%,
  50%,
  70% {
    transform: translate3d(-4px, 0, 0);
  }

  40%,
  60% {
    transform: translate3d(4px, 0, 0);
  }
}

/* ─── Color Palette Picker ─── */
.color-palette {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.color-swatch {
  width: 100%;
  aspect-ratio: 1;
  max-width: 40px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.color-swatch:hover {
  transform: scale(1.15);
}

.color-swatch.selected {
  border-color: #fff;
  box-shadow: 0 0 12px currentColor;
  transform: scale(1.1);
}

/* ─── File Upload ─── */
.upload-area {
  position: relative;
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--glass-bg);
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.upload-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ─── Progress Bar ─── */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 1rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.progress-bar.active {
  opacity: 1;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 3px;
  width: 0%;
  transition: width 0.2s ease;
}

/* ─── Toast ─── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  visibility: hidden;
  background: var(--bg-card-solid);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
  max-width: 90vw;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

.toast-success {
  border-color: #2ed573;
}

.toast-error {
  border-color: var(--accent);
}

/* ─── Section Headers ─── */
.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.section-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: var(--radius-xs);
  font-size: 1.25rem;
}

/* ─── Image Preview ─── */
.image-preview {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-secondary);
  margin-top: 1rem;
  display: none;
}

.image-preview.active {
  display: block;
}

.image-preview img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 300px;
  object-fit: contain;
}

.image-preview-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.image-preview-remove {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── Success Check ─── */
.success-check {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
}

.success-check.show {
  display: flex;
}

.checkmark-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2ed573, #1e90ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ═══════════════════════════════════════════════
   DISPLAY FRONTEND
   ═══════════════════════════════════════════════ */

/* ─── Display Header ─── */
.display-header {
  text-align: center;
  padding: 1.25rem 2rem;
  position: relative;
  z-index: 10;
}

.display-title {
  font-size: 2.5rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.title-emoji {
  font-size: 2.5rem;
  filter: drop-shadow(0 0 12px var(--accent-glow-strong));
}

.title-text {
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

/* ─── Display Page ─── */
.display-page {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* Animated gradient background */
.display-page::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.07), transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(99, 102, 241, 0.05), transparent 50%),
    radial-gradient(ellipse at 50% 90%, rgba(244, 162, 97, 0.04), transparent 50%);
  background-size: 200% 200%;
  animation: bgShift 25s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes bgShift {

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

  33% {
    background-position: 100% 0%;
  }

  66% {
    background-position: 50% 100%;
  }
}

/* Floating particles (CSS-only) */
.display-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 10% 20%, rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.15), transparent),
    radial-gradient(2px 2px at 30% 70%, rgba(99, 102, 241, 0.1), transparent),
    radial-gradient(2px 2px at 70% 30%, rgba(244, 162, 97, 0.12), transparent),
    radial-gradient(2px 2px at 90% 80%, rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.1), transparent),
    radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.06), transparent),
    radial-gradient(1px 1px at 20% 90%, rgba(255, 255, 255, 0.04), transparent);
  background-size: 300px 300px, 400px 400px, 350px 350px, 250px 250px, 200px 200px, 500px 500px;
  animation: particleDrift 40s linear infinite;
  pointer-events: none;
  z-index: -1;
  opacity: 0.6;
}

@keyframes particleDrift {
  from {
    transform: translateY(0) translateX(0);
  }

  to {
    transform: translateY(-300px) translateX(100px);
  }
}

/* ─── Scene Container ─── */
.scene-container {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.scene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}

.scene.active {
  opacity: 1;
  pointer-events: auto;
}

/* ─── Scene Controls ─── */
.scene-controls {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 500;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
}

body.has-wish-ticker .scene-controls {
  bottom: calc(1.5rem + 80px);
}

.scene-controls-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.switch-view-link {
  display: block;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 0.25rem;
  transition: color var(--transition);
}

.switch-view-link:hover {
  color: var(--accent);
}

.scene-btn {
  width: 32px;
  height: 32px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.scene-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.scene-btn.pause-active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.interval-controls-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-left: 0.5rem;
}

.interval-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.interval-row .interval-scene-label {
  min-width: 16px;
  text-align: center;
  font-size: 0.7rem;
}

.interval-row .interval-scene-label.active-scene {
  color: var(--accent);
  font-weight: 600;
}

.interval-row input[type="range"] {
  width: 52px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--glass-border);
  border-radius: 2px;
  outline: none;
}

.interval-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

.interval-row input[type="range"]::-moz-range-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

.interval-value {
  min-width: 24px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ─── Mobile Adjustments for Display Controls ─── */
@media (max-width: 768px) {

  #scenePause,
  .interval-controls-group {
    display: none !important;
  }

  .switch-view-link {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--accent) !important;
    border: 1.5px solid var(--accent);
    font-size: 0.95rem;
    padding: 0.7rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0;
    text-decoration: none;
    flex: 1;
    order: 2;
  }

  .scene-controls-row {
    display: contents;
  }

  .scene-controls-row .scene-btn {
    height: 48px;
    width: 48px;
    font-size: 1.2rem;
    flex: 0 0 48px;
  }

  #scenePrev {
    order: 1;
  }

  #sceneNext {
    order: 3;
  }
}

/* ─── Scene Indicators ─── */
.scene-indicators {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0 0.5rem;
}

.scene-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all var(--transition);
  cursor: pointer;
}

.scene-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

/* ─── Guest Counter (in controls panel) ─── */
.controls-guest-counter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  justify-content: center;
}

.guest-counter-value {
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* ─── QR Code ─── */
.qr-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 0.75rem;
  z-index: 500;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.has-wish-ticker .qr-container {
  bottom: calc(1.5rem + 80px);
}

.qr-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  border-color: var(--accent);
}

.qr-container.enlarged {
  bottom: 50%;
  right: 50%;
  transform: translate(50%, 50%);
  padding: clamp(1.5rem, 3vmin, 3rem);
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.85), 0 20px 60px rgba(0, 0, 0, 0.8);
  border-color: var(--accent);
  z-index: 1000;
}

.qr-container.enlarged:hover {
  transform: translate(50%, 50%) scale(1.02);
}

.qr-container img {
  width: 120px;
  height: 120px;
  display: block;
  border-radius: var(--radius-xs);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.qr-container.enlarged img {
  width: 75vmin;
  height: 75vmin;
  max-width: 800px;
  max-height: 800px;
}

.qr-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.375rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.qr-container.enlarged .qr-label {
  font-size: clamp(1.5rem, 4vmin, 3rem);
  margin-top: clamp(1rem, 2vmin, 2rem);
}

.qr-password {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.25rem;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
  opacity: 0.7;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.qr-container.enlarged .qr-password {
  font-size: clamp(1.8rem, 5vmin, 4rem);
  margin-top: clamp(0.5rem, 1.5vmin, 1.5rem);
  color: var(--accent);
  opacity: 1;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-shadow: 0 0 20px var(--accent-glow);
}

/* ─── Wish Ticker (Laufschrift) ─── */
.wish-ticker {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(0deg, rgba(10, 10, 15, 0.95) 60%, transparent);
  z-index: 450;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding-bottom: 4px;
}

.wish-ticker-track {
  display: flex;
  white-space: nowrap;
  will-change: transform;
}

.wish-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0 3rem;
  font-size: 1.8rem;
  flex-shrink: 0;
}

/* Avatar wrapper — provides the colored ring */
.wish-avatar-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid var(--guest-color, #FF6B6B);
  box-shadow: 0 0 10px color-mix(in srgb, var(--guest-color, #FF6B6B) 50%, transparent);
  overflow: hidden;
}

/* Photo avatar */
.wish-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* Initials fallback avatar */
.wish-avatar-initials {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}

/* Name: color set via inline style, just enforce weight */
.wish-ticker-item .wish-author {
  font-weight: 700;
}

/* Colon separator: neutral */
.wish-ticker-item .wish-colon {
  color: var(--text-secondary);
  font-weight: 500;
  margin-left: -0.4rem;
  /* close the gap between name and colon */
}

/* Message: neutral, highly readable */
.wish-ticker-item .wish-message {
  color: #ffffff;
  font-weight: 500;
}

/* Bullet separator */
.wish-ticker-item .wish-sep {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ═══════════════════════════════════════════════
   POLAROID WALL
   ═══════════════════════════════════════════════ */

.polaroid {
  background: #fff;
  padding: 10px 10px 36px 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.2);
  position: absolute;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.polaroid img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: var(--polaroid-max-h, 30vh);
  display: block;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .polaroid {
    background: transparent;
    padding: 0;
    box-shadow: none;
  }

  .polaroid img {
    max-height: 60vh;
    /* Allow single polaroid to be much larger on mobile screens */
    border: 3px solid rgba(255, 255, 255, 0.8);
    border-radius: 4px;
  }

  .polaroid-caption {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.6);
    margin-top: 12px;
    font-weight: 600;
  }

  .polaroid-author {
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  }

  .display-header {
    padding-top: 1.25rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .display-title {
    font-size: 1.25rem;
    flex-wrap: nowrap;
    /* keep emoji and text on same line */
    align-items: flex-start;
    text-align: left;
  }

  .title-emoji {
    font-size: 1.5rem;
    margin-top: -0.2rem;
  }

  .qr-container {
    display: none;
    /* QR is not needed if the user is already on a mobile device */
  }

  .wish-ticker {
    height: 36px;
  }

  .wish-ticker-item {
    font-size: 0.8rem;
    gap: 0.4rem;
    padding: 0 1rem;
  }

  .wish-avatar-wrap {
    width: 20px;
    height: 20px;
    border-width: 1.5px;
  }

  .wish-avatar-initials {
    font-size: 0.6rem;
  }

  .scene-controls {
    bottom: 0.5rem;
    left: 1rem;
    width: calc(100% - 2rem);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    transform: none;
  }

  body.has-wish-ticker .scene-controls {
    bottom: calc(0.5rem + 36px);
  }

  .scene-indicators {
    display: none !important;
  }
}

.polaroid-caption {
  font-family: var(--font-handwriting);
  font-size: 1.6rem;
  /* Even larger caption font */
  color: #333;
  text-align: center;
  margin-top: 6px;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  /* Limit to 2 lines, then add ... */
  line-clamp: 2;
  -webkit-box-orient: vertical;
  /* Prevent text from stretching the shrink-to-fit parent */
  width: 0;
  min-width: 100%;
}

.polaroid-author {
  font-family: var(--font-handwriting);
  font-size: 1.3rem;
  /* Even larger author font */
  color: #777;
  text-align: right;
  margin-top: 2px;
  /* Prevent text from stretching the shrink-to-fit parent */
  width: 0;
  min-width: 100%;
}

.polaroid-wall {
  width: 100%;
  height: 100%;
  position: relative;
  padding: 1rem;
}

.polaroid-wall-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 1.25rem;
  gap: 1rem;
}

.polaroid-wall-empty .empty-icon {
  font-size: 4rem;
  opacity: 0.3;
}

/* Polaroid Pagination */
.polaroid-pagination {
  position: absolute;
  bottom: 5.5rem;
  /* Above the wish ticker */
  left: 50%;
  transform: translateX(-50%);
  width: 50vw;
  max-width: 400px;
  height: 20px;
  display: flex;
  align-items: center;
  z-index: 100;
  opacity: 0.6;
  transition: opacity var(--transition);
}

.polaroid-pagination:hover {
  opacity: 1;
}

.polaroid-pagination-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  position: relative;
}

.polaroid-pagination-dot {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-glow-strong), 0 2px 4px rgba(0, 0, 0, 0.5);
  transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 768px) {
  .polaroid-pagination {
    position: fixed;
    bottom: 120px;
    width: 70vw;
  }
}

/* Mobile Polaroid Carousel */
@media (max-width: 1024px) {
  .polaroid-wall {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    padding: 1rem;
    align-items: center;
  }

  .polaroid {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    flex-shrink: 0;
    width: 85vw;
    max-width: 400px;
    scroll-snap-align: center;
    margin: 0 0.5rem;
    background: transparent;
    padding: 0;
    box-shadow: none;
  }

  .polaroid img {
    max-height: 60vh;
    border: 3px solid rgba(255, 255, 255, 0.8);
    border-radius: 4px;
  }

  .polaroid-caption {
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.6);
    font-weight: 600;
  }

  .polaroid-author {
    color: rgba(255, 255, 255, 0.85) !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  }
}

/* ═══════════════════════════════════════════════
   STATISTICS SCENE
   ═══════════════════════════════════════════════ */

/* Rainbow animated border */
@keyframes rainbowBorder {
  0% {
    border-color: var(--accent);
  }

  14% {
    border-color: #f4a261;
  }

  28% {
    border-color: #FFD43B;
  }

  42% {
    border-color: #69DB7C;
  }

  57% {
    border-color: #4DABF7;
  }

  71% {
    border-color: #9775FA;
  }

  85% {
    border-color: #F783AC;
  }

  100% {
    border-color: var(--accent);
  }
}

/* Gradient Angle for animated borders */
@property --gradient-angle {
  syntax: "<angle>";
  initial-value: 135deg;
  inherits: true;
}

@keyframes rotateGradient {
  0% {
    --gradient-angle: 0deg;
  }

  100% {
    --gradient-angle: 360deg;
  }
}

.stat-card {
  background: linear-gradient(#1c1c28, #1c1c28) padding-box,
    conic-gradient(from var(--gradient-angle), var(--accent) 0%, var(--accent) 80%, var(--accent-comp) 100%) border-box;
  border: 3px solid transparent;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Hero card: full-width inline sentence */
.stat-hero {
  grid-column: 1 / -1;
  padding: 1.25rem 2.5rem;
}

.stat-hero-text {
  font-size: 1.6rem;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.4;
}

.stat-hero-number {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  vertical-align: baseline;
  line-height: 1;
}

.stat-value {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.375rem;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.stat-detail {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.stats-scene-layout {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto 1fr;
  gap: 1rem;
  padding: 1rem 10%;
  width: 100%;
  height: 82%;
  align-self: flex-start;
  margin-top: 4vh;
  overflow: hidden;
  animation: rotateGradient 15s linear infinite;
}

/* Bottom text panels: each spans 2 columns */
.stat-panel {
  grid-column: span 2;
  text-align: left;
  overflow: hidden;
  justify-content: flex-start;
  align-items: stretch;
}

.stat-panel h3 {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  text-align: center;
  flex-shrink: 0;
}

/* Relations Panel */
.relations-card {
  overflow: hidden;
}

.relations-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 1;
  overflow: hidden;
  align-content: flex-start;
}

.relation-tag {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-size: 1.05rem;
  animation: fadeIn 0.5s ease forwards;
}

.relation-tag .relation-name {
  font-weight: 500;
  /* color set inline via guest's favorite color */
}

/* Anecdote Box */
.anecdote-box {
  justify-content: flex-start;
}

.anecdote-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.anecdote-entry {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--glass-border);
}

.anecdote-entry:last-child {
  border-bottom: none;
}

.anecdote-entry blockquote {
  font-family: var(--font-handwriting);
  font-size: 1.6rem;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 0.25rem;
  font-style: italic;
}

.anecdote-entry blockquote::before {
  content: '„';
}

.anecdote-entry blockquote::after {
  content: '"';
}

.anecdote-entry cite {
  font-size: 1rem;
  color: var(--text-secondary);
  font-style: normal;
  display: block;
}

.anecdote-empty {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ═══════════════════════════════════════════════
   MAP SCENE
   ═══════════════════════════════════════════════ */


.map-container {
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
}

.leaflet-container {
  background: var(--bg-primary) !important;
}

.animated-curve {
  animation: dashAnimation 10s linear infinite;
}

@keyframes dashAnimation {
  to {
    stroke-dashoffset: -100;
  }
}

.guest-label {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  font-family: var(--font-body) !important;
  font-size: 0.75rem !important;
  color: var(--text-primary) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 6px rgba(0, 0, 0, 0.5) !important;
  white-space: nowrap !important;
  font-weight: 500 !important;
  overflow: visible !important;
  line-height: 1.4 !important;
  text-align: center !important;
}

/* When a label contains multiple names (grouped city), allow wrapping */
.guest-label-multi {
  white-space: normal !important;
}

.venue-marker {
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 20px var(--accent-glow-strong);
  position: relative;
}

.venue-marker::after {
  content: '';
  position: absolute;
  inset: -6px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  animation: pulse-ring 2s ease-out infinite;
}

.guest-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
}

/* ═══════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════ */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

@keyframes popIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  70% {
    transform: scale(1.15);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.5s ease forwards;
}

.animate-slideUp {
  animation: slideUp 0.5s ease forwards;
}

.animate-popIn {
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* ═══════════════════════════════════════════════
   GUEST PAGE
   ═══════════════════════════════════════════════ */

.hidden {
  display: none !important;
}

.guest-page {
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  position: relative;
  z-index: 1;
}

.guest-page .page-header {
  text-align: center;
  padding: 1.5rem 0 2rem;
}

.guest-page .page-header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.guest-page .page-header .subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
}

.guest-page .emoji-crown {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
  animation: float 3s ease-in-out infinite;
}

.guest-section {
  margin-bottom: 2rem;
  animation: fadeIn 0.5s ease forwards;
}

.guest-welcome {
  text-align: center;
  padding: 0.5rem 0 1rem 0;
  /* Compact padding */
}

.guest-welcome .welcome-name {
  font-size: 1.4rem;
  /* Slightly more compact font size */
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0;
}

.success-check p {
  margin: 0.25rem 0;
}

/* ─── Avatar & Cropper ─── */
.avatar-preview-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.5rem 0;
}

.avatar-round {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--glass-border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  background-color: var(--bg-card);
}

.avatar-round-small {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--glass-border);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.avatar-round-small:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.avatar-cropper-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  box-sizing: border-box;
}

.avatar-cropper-modal.hidden {
  display: none;
}

.cropper-dialog {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 400px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glass-border);
  box-sizing: border-box;
}

/* Feedback Modal Styles */
.feedback-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  box-sizing: border-box;
}

.feedback-modal.hidden {
  display: none;
}

.feedback-dialog {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 400px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glass-border);
  box-sizing: border-box;
}

.cropper-frame {
  width: 100%;
  aspect-ratio: 1;
  background-color: #000;
  overflow: hidden;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  position: relative;
}

.cropper-frame img {
  display: block;
  max-width: 100%;
}

.cropper-actions {
  display: flex;
  gap: 1rem;
}

.cropper-actions .btn {
  flex: 1;
}

/* Make cropper area round */
.cropper-view-box,
.cropper-face {
  border-radius: 50%;
}

.cropper-actions .btn {
  flex: 1;
}

/* ─── Profile Switcher (Paten / Schützling) ─── */
.profile-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  scrollbar-width: none;
}

.profile-switcher::-webkit-scrollbar {
  display: none;
}

.profile-switcher-item {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition);
  border: 3px solid transparent;
  overflow: hidden;
  background: var(--bg-secondary);
}

.profile-switcher-item:hover {
  transform: scale(1.08);
}

.profile-switcher-item.active {
  border-color: var(--accent);
  box-shadow: 0 0 14px var(--accent-glow-strong);
  transform: scale(1.1);
}

.profile-switcher-item img,
.profile-switcher-item canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.profile-switcher-add {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px dashed var(--glass-border-hover);
  background: var(--glass-bg);
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.profile-switcher-add:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
  transform: scale(1.08);
}

.profile-switcher-divider {
  width: 1px;
  height: 32px;
  background: var(--glass-border);
  flex-shrink: 0;
}

/* Ward check-in header bar with cancel button */
.ward-checkin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.ward-checkin-header h2 {
  margin: 0;
}

.ward-cancel-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-xs);
  transition: color var(--transition), background var(--transition);
}

.ward-cancel-btn:hover {
  color: var(--accent);
  background: var(--accent-glow);
}


.autocomplete-wrapper {
  position: relative;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-card-solid);
  border: 1px solid var(--glass-border-hover);
  border-radius: var(--radius-xs);
  margin-top: 4px;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.autocomplete-dropdown.hidden {
  display: none;
}

.autocomplete-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--glass-border);
  transition: background var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background: var(--accent-glow);
}

.autocomplete-item .city-name {
  font-weight: 600;
}

.autocomplete-item .city-region {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.autocomplete-item .city-detail {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.autocomplete-spinner {
  padding: 0.75rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ─── Responsive ─── */
@media (max-width: 480px) {
  .guest-page {
    padding: 1rem 0.75rem;
  }

  .card {
    padding: 1.25rem;
    border-radius: var(--radius-sm);
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .btn {
    padding: 0.75rem 1.25rem;
  }

  .color-palette {
    grid-template-columns: repeat(8, 1fr);
    gap: 0.375rem;
  }
}

/* Stats responsive: tablet / narrow screens */
@media (max-width: 900px) {
  .display-page {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .scene-container {
    overflow: visible;
  }

  .scene {
    position: relative;
    inset: auto;
    display: none;
  }

  .scene.active {
    display: flex;
    min-height: 70vh;
  }

  .map-container {
    height: 70vh;
  }

  .stats-scene-layout {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    height: auto;
    overflow: visible;
    padding: 1rem 1.5rem 12rem;
  }

  .stat-hero {
    grid-column: 1 / -1;
    padding: 1rem 1.5rem;
  }

  .stat-hero-text {
    font-size: 1.2rem;
  }

  .stat-hero-number {
    font-size: 2.5rem;
  }

  .stat-panel {
    grid-column: 1 / -1;
    overflow: visible;
    max-height: none;
  }

  .relations-card {
    overflow-y: visible;
  }

  .relations-list {
    overflow: visible;
    flex: none;
  }

  .anecdote-content {
    overflow: visible;
  }

  .stat-value {
    font-size: 2rem;
  }
}

/* ═══════════════════════════════════════════════
   IDLE STATE
   ═══════════════════════════════════════════════ */
body.idle {
  cursor: none;
}

body.idle .scene-controls,
body.idle .qr-container {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 768px) {
  body.idle .scene-controls {
    opacity: 1;
    pointer-events: auto;
  }
}

.scene-controls {
  transition: opacity 0.5s ease;
}

/* ═══════════════════════════════════════════════
   TIMELINE SCENE
   ═══════════════════════════════════════════════ */

/* ─── Timeline Scene Layout ─── */
.timeline-scene {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ─── Focus Zone (upper area) ─── */
.timeline-focus {
  flex: 1;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.timeline-focus-card {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  box-sizing: border-box;
  opacity: 0;
  transform: translateX(100vw);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-focus-card.visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-focus-card.exit {
  opacity: 0;
  transform: translateX(-100vw);
}

.timeline-focus-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
  max-width: 1400px;
  width: 100%;
  height: 100%;
}

.timeline-focus-image {
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 62vh;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 80px var(--accent-glow);
  flex: 1 1 auto;
  min-height: 0;
  animation: timelineImageIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes timelineImageIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.timeline-focus-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.timeline-focus-date {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
  white-space: nowrap;
  animation: timelineFadeIn 0.5s ease forwards;
}

.timeline-focus-text {
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.4;
  animation: timelineFadeIn 0.5s ease 0.15s both;
}

.timeline-focus-card.guest-focus .timeline-focus-date {
  font-size: 2rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.3));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.timeline-focus-card.guest-focus .timeline-focus-text {
  font-size: 1.3rem;
  color: var(--text-secondary);
}

@keyframes timelineFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* ─── Axis Container (lower area) ─── */
.timeline-axis-container {
  flex: 0 0 24%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem 2rem 0;
  position: relative;
  box-sizing: border-box;
}

.timeline-axis {
  position: relative;
  width: 90%;
  height: 40px;
}

.timeline-axis-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.35) 8%, rgba(255, 255, 255, 0.35) 92%, transparent 100%);
  transform: translateY(-50%);
}

/* Year ticks */
.timeline-year-tick {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 16px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
  z-index: 2;
  /* Render below active dots */
}

.timeline-year-label {
  position: absolute;
  top: 28px;
  /* Pushed down 4px to be covered beautifully by active badges */
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  /* Dimmed/darkened white for elegant hierarchy */
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  z-index: 2;
}

/* ─── Event Dots ─── */
.timeline-event-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  transition: all 0.4s ease;
  cursor: pointer;
  padding: 12px;
  /* Increases clickable area for excellent UX */
}

.timeline-event-dot .timeline-star {
  font-size: 1.4rem;
  color: var(--accent);
  filter: drop-shadow(0 0 6px var(--accent-glow));
  display: block;
  transition: all 0.3s ease;
}

.timeline-event-dot:hover .timeline-star {
  transform: scale(1.3);
  filter: drop-shadow(0 0 12px var(--accent-glow-strong));
}

.timeline-event-dot.active .timeline-star {
  font-size: 2rem;
  filter: drop-shadow(0 0 16px var(--accent-glow-strong));
  color: var(--accent);
}

.timeline-event-dot .timeline-star.is-emoji {
  color: unset !important;
  font-size: 1.0rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.timeline-event-dot.active .timeline-star.is-emoji {
  color: unset !important;
  font-size: 1.3rem;
  /* Slightly smaller so the behind pulsing marker is beautifully visible */
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
}

/* ─── Guest Dots (Axis) ─── */
.timeline-guest-dot {
  z-index: 5;
}

.timeline-guest-simple-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all 0.3s ease;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.timeline-event-dot:hover .timeline-guest-simple-dot {
  transform: scale(1.4);
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.timeline-event-dot.active .timeline-guest-simple-dot {
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow-strong);
  transform: scale(1.4);
}

.timeline-guest-dot.active .timeline-guest-simple-dot {
  background: var(--accent);
  transform: scale(1.5);
  box-shadow: 0 0 12px var(--accent-glow-strong);
}

/* ─── Stacked Events Count Badges ─── */
.timeline-event-dot.active {
  z-index: 25;
  /* Bring active stacked dot to the front */
}

.timeline-dot-count-badge {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translate(-50%, 6px) scale(0.8);
  opacity: 0;
  /* Completely hidden by default when inactive! */
  background: rgba(0, 0, 0, 0.6);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 6px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  /* Elegant spring-pop animation */
  white-space: nowrap;
}

.timeline-dot-count-badge::before {
  content: attr(data-count);
}

.timeline-event-dot:hover .timeline-dot-count-badge {
  /* Only show hover details if parent dot is active, keeping inactive dots fully hidden as requested */
  opacity: 0;
}

.timeline-event-dot.active .timeline-dot-count-badge {
  background: var(--accent);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 8px var(--accent-glow-strong);
  font-weight: 800;
  opacity: 1;
  /* Make visible on active! */
  transform: translate(-50%, 0) scale(1);
  /* Spring-pop up in size and position! */
}

.timeline-event-dot.active .timeline-dot-count-badge::before {
  content: attr(data-active-text);
}

/* ─── Guest Cluster (Focus Area) ─── */
.timeline-focus-guests {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2.5rem;
}

.focus-guest-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  animation: timelineFadeIn 0.5s ease backwards;
}

.focus-guest-wrap img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--accent);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.timeline-guest-initials {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4.5rem;
  font-weight: 700;
  color: white;
  border: 5px solid var(--accent);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.focus-guest-name {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ─── Animated Marker ─── */
.timeline-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 20px var(--accent-glow-strong), 0 0 40px var(--accent-glow);
  z-index: 20;
  transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
}

.timeline-marker.active {
  opacity: 1;
  animation: timelinePulse 2s ease-in-out infinite;
}

.timeline-marker::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
  pointer-events: none;
  opacity: 0;
}

.timeline-marker.active::after {
  animation: markerRipple 1.8s cubic-bezier(0.25, 0, 0, 1) infinite;
}

@keyframes timelinePulse {

  0%,
  100% {
    box-shadow: 0 0 25px var(--accent-glow-strong), 0 0 50px var(--accent-glow);
  }

  50% {
    box-shadow: 0 0 45px var(--accent-glow-strong), 0 0 85px var(--accent-glow), 0 0 120px var(--accent-glow);
  }
}

@keyframes markerRipple {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(4.2);
    /* Significantly expanded scale so it is beautifully visible outside the large emojis */
    opacity: 0;
  }
}

/* ─── Guest Popup ─── */
.timeline-guest-popup {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  white-space: nowrap;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.timeline-guest-popup.visible {
  opacity: 1;
}

/* ─── Desktop/Mobile Visibility ─── */
.timeline-mobile {
  display: none;
}

/* ─── Mobile Responsive Timeline ─── */
@media (max-width: 768px) {
  .timeline-desktop {
    display: none !important;
  }

  .timeline-mobile {
    display: flex;
    width: 100%;
    height: calc(100vh - 80px);
    height: calc(100dvh - 80px);
    /* Lock exact height to prevent infinite expansion */
    overflow: hidden;
    position: relative;
    padding-bottom: calc(1.5rem + 80px);
    /* Space for controls */
  }

  .timeline-mobile-scroll {
    flex: 1;
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding: 0 1rem;
    padding-right: 50px;
    /* Space for axis */
    /* Hide scrollbar */
    -ms-overflow-style: none;
    scrollbar-width: none;
    box-sizing: border-box;
  }

  .timeline-mobile-scroll::-webkit-scrollbar {
    display: none;
  }

  .timeline-mobile-panel {
    height: 100%;
    min-height: 100%;
    /* Better than 100vh to fit exactly in container */
    max-height: 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    text-align: center;
    box-sizing: border-box;
    overflow: hidden;
  }

  .timeline-mobile-date {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
  }

  .timeline-mobile-image {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 48vh;
    /* Constrain so text/other contents fit */
    max-height: 48dvh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 1.25rem;
    flex-shrink: 1;
    min-height: 0;
  }

  .timeline-mobile-desc {
    font-size: 1.1rem;
    color: var(--text-primary);
    line-height: 1.4;
    max-height: 25%;
    overflow-y: auto;
  }

  .timeline-mobile-guests {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    max-height: 40%;
    overflow-y: auto;
    flex-shrink: 1;
    min-height: 0;
  }

  .timeline-mobile-guest-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .timeline-mobile-guest-item img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--glass-border);
  }

  .timeline-mobile-guest-item .timeline-guest-initials {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
  }

  .timeline-mobile-guest-item div:last-child {
    font-size: 0.9rem;
    color: var(--text-secondary);
  }

  /* Fixed Right Axis */
  .timeline-mobile-axis {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    z-index: 10;
  }

  .timeline-mobile-axis::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.1) 10%, rgba(255, 255, 255, 0.1) 90%, transparent);
    z-index: -1;
  }

  .timeline-mobile-axis-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: auto;
    min-height: 12px;
    margin: 1px 0;
    /* Slightly smaller fixed margin */
    flex: 1 1 0%;
    /* Allow full shrinking */
    max-height: 40px;
    text-decoration: none;
  }

  .timeline-mobile-axis-dot.collapsed-dot {
    display: none;
  }

  .timeline-mobile-axis-dot.collapsed-dot.active {
    display: flex;
  }

  .timeline-mobile-axis-dot .timeline-star {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s;
  }

  .timeline-mobile-axis-dot .timeline-guest-simple-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
  }



  /* Active state handled by JS IntersectionObserver */
  .timeline-mobile-axis-dot.active .timeline-star {
    color: var(--accent);
    font-size: 1.8rem;
    filter: drop-shadow(0 0 10px var(--accent-glow-strong));
  }

  .timeline-mobile-axis-dot .timeline-star.is-emoji {
    color: unset !important;
    opacity: 0.5;
    font-size: 1.1rem;
    filter: grayscale(80%) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  }

  .timeline-mobile-axis-dot.active .timeline-star.is-emoji {
    color: unset !important;
    opacity: 1;
    font-size: 1.5rem;
    filter: grayscale(0%) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
  }

  .timeline-mobile-axis-dot.active .timeline-guest-simple-dot {
    background: var(--accent);
    transform: scale(1.5);
    box-shadow: 0 0 10px var(--accent-glow);
  }
}

/* ─── Admin Drag & Drop Question Ordering ─── */
.question-card {
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.question-card.dragging {
  opacity: 0.45;
  border-color: var(--accent) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
  transform: scale(0.985);
}

.question-drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 32px;
  cursor: grab;
  color: var(--text-muted);
  opacity: 0.4;
  transition: opacity 0.2s, color 0.2s;
  align-self: center;
  margin-right: 0.25rem;
}

.question-drag-handle:hover {
  opacity: 0.9;
  color: var(--accent);
}

.question-drag-handle:active {
  cursor: grabbing;
}

/* ═══════════════════════════════════════════════
   GAME HELP MODAL (TRUE FULL-SCREEN PRESENTER VIEW)
   ═══════════════════════════════════════════════ */

/* Large Beamer Help Button */
.game-help-btn {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10001;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: white;
  font-size: 1.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.game-help-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
  transform: scale(1.12);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 255, 255, 0.1);
}

.game-help-btn:active {
  transform: scale(0.92);
}

/* Widescreen Modal Overlay (Strictly Full Screen, No Padding, No Scrollbars) */
.game-help-modal {
  position: fixed;
  inset: 0;
  z-index: 10002;
  background: rgba(6, 6, 12, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0; /* Cover every pixel of the screen */
  overflow: hidden; /* Absolutely no page scrollbars */
  animation: helpFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.game-help-modal.hidden {
  display: none;
}

@keyframes helpFadeIn {
  from { opacity: 0; backdrop-filter: blur(0px); }
  to   { opacity: 1; backdrop-filter: blur(24px); }
}

/* 100% Fullscreen Dialog Container */
.game-help-dialog {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  background: linear-gradient(155deg, rgba(22, 22, 38, 0.96), rgba(8, 8, 16, 0.99));
  border: none;
  border-radius: 0; /* Fully native presentation look */
  box-shadow: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.game-help-close {
  position: absolute;
  top: 3vh;
  right: 3vw;
  z-index: 10005;
  width: 5.5vh;
  height: 5.5vh;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  font-size: 2.8vh;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.game-help-close:hover {
  background: rgba(255, 75, 75, 0.25);
  border-color: rgba(255, 75, 75, 0.45);
  color: #ff5555;
  transform: rotate(90deg);
}

/* Widescreen Body Area (Strictly Full Screen, No Padding, No Scrollbars) */
.game-help-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden; /* No scrollbars on body */
  position: relative;
  height: 100vh; /* Full viewport height */
}

/* Slides Track */
.game-help-slides {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  height: 93vh; /* Responsive remaining height */
}

/* Single Help Slide optimized dynamically for 16:9 vertical heights */
.game-help-slide {
  display: none;
  opacity: 0;
  transform: scale(0.97) translateY(10px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  height: 100%;
  padding: 7vh 6vw 8vh; /* Further increased padding for larger top/bottom margins */
  box-sizing: border-box;
  justify-content: space-between; /* Spread elements vertically to fill screen */
}

.game-help-slide.active {
  display: flex;
  flex-direction: column;
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Slide Badge Category label */
.game-help-slide-badge {
  align-self: flex-start;
  font-size: 1.8vh;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.6vh 1.8vh;
  border-radius: 99px;
  margin-bottom: 0.5vh;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Intro wrapper to keep title and description together */
.game-help-slide-intro {
  display: flex;
  flex-direction: column;
  gap: 0.4vh;
  align-self: flex-start;
  width: 100%;
}

/* Giant Widescreen slide titles */
.game-help-slide h2 {
  margin: 0;
  font-size: 5.5vh; /* Massive title */
  font-weight: 900;
  color: white;
  letter-spacing: -0.03em;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Giant description text */
.game-help-lead {
  margin: 0;
  font-size: 2.4vh; /* Giant and comfortable to read */
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

/* Giant Widescreen Scoring Deck to utilize full screen width */
.game-help-scoring-large {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 2vw;
  margin-bottom: 2vh;
  flex: 1;
  max-height: 34vh; /* Slightly adjusted to accommodate column titles */
  width: 100%;
}

/* Responsive columns wrapping titles and cards */
.score-card-column {
  flex: 1;
  max-width: 46%; /* 100% relative percentage to scale flawlessly on any resolution or size */
  display: flex;
  flex-direction: column;
  gap: 0.8vh; /* Reduced space between title and card */
  box-sizing: border-box;
}

/* Elegant uppercase column labels */
.points-group-title {
  font-size: 2.8vh; /* Larger column labels */
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  align-self: flex-start;
  padding-left: 0.5vw;
}

.points-group-title.basis {
  color: rgba(206, 212, 218, 0.45);
  text-shadow: 0 0 10px rgba(206, 212, 218, 0.1);
}

.points-group-title.bonus {
  color: rgba(255, 169, 77, 0.65);
  text-shadow: 0 0 12px rgba(255, 169, 77, 0.2);
}

.game-help-score-card {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 0.6vh 2.5vw; /* Significantly reduced vertical padding */
  display: flex;
  align-items: center;
  gap: 1.8vw;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.game-help-score-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* Colored card variants based on point type */
.game-help-score-card.card-silver {
  background: rgba(206, 212, 218, 0.05);
  border-color: rgba(206, 212, 218, 0.22);
}

.game-help-score-card.card-silver:hover {
  background: rgba(206, 212, 218, 0.08);
  border-color: rgba(206, 212, 218, 0.35);
}

.game-help-score-card.card-gold {
  background: rgba(255, 169, 77, 0.05);
  border-color: rgba(255, 169, 77, 0.25);
}

.game-help-score-card.card-gold:hover {
  background: rgba(255, 169, 77, 0.09);
  border-color: rgba(255, 169, 77, 0.4);
}

.game-help-score-card.card-perfect {
  background: rgba(59, 201, 219, 0.05);
  border-color: rgba(59, 201, 219, 0.25);
}

.game-help-score-card.card-perfect:hover {
  background: rgba(59, 201, 219, 0.09);
  border-color: rgba(59, 201, 219, 0.4);
}

/* Giant Widescreen Score Badges - circular! */
.score-badge-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 9.5vh;
  height: 9.5vh;
  min-width: 9.5vh;
  border-radius: 50%; /* Perfect circle! */
  font-size: 3.8vh; /* Highly visible scoring number */
  font-weight: 900;
  letter-spacing: -0.01em;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}

.score-badge-large.score-silver {
  border: 3px solid rgba(206, 212, 218, 0.45);
  color: #ced4da;
  background: rgba(206, 212, 218, 0.04);
  text-shadow: 0 0 10px rgba(206, 212, 218, 0.2);
}

.score-badge-large.score-gold {
  border: 3px solid rgba(255, 169, 77, 0.65);
  color: #ffa94d;
  background: rgba(255, 169, 77, 0.04);
  text-shadow: 0 0 12px rgba(255, 169, 77, 0.25);
}

.score-badge-large.score-perfect {
  border: 3px solid rgba(59, 201, 219, 0.65);
  color: #3bc9db;
  background: rgba(59, 201, 219, 0.04);
  text-shadow: 0 0 12px rgba(59, 201, 219, 0.25);
}

/* Description inside card */
.score-desc-large {
  display: flex;
  flex-direction: column;
  gap: 0.6vh;
}

.score-desc-large strong {
  font-size: 2.8vh; /* Highly visible card title */
  color: white;
  font-weight: 800;
}

.score-desc-large span {
  font-size: 2.2vh; /* Detailed description text */
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

/* Giant Speed Bonus Badge inside scoring card */
.speed-badge-large {
  display: inline-flex;
  align-items: center;
  gap: 0.3vw;
  background: rgba(255, 215, 0, 0.16);
  color: #FFD43B;
  font-size: 1.4vh;
  font-weight: 900;
  padding: 0.4vh 1vh;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 215, 0, 0.35);
  margin-left: 0.5vw;
  vertical-align: middle;
  box-shadow: 0 4px 10px rgba(255, 215, 0, 0.1);
}

/* Presentation Help Tip */
.game-help-tip-large {
  margin: 0 !important;
  font-size: 2vh !important; /* Perfect legibility */
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 600;
  line-height: 1.6 !important;
  padding: 1.8vh 2.5vw;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  border-left: 6px solid #FFA94D; /* Match dot brand color */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

/* Special presentation card for Structural Section rounds */
.game-help-section-card {
  display: flex;
  align-items: center;
  gap: 4vw;
  background: rgba(255, 255, 255, 0.015);
  border: 2px dashed rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 4vh 4vw;
  margin-bottom: 2vh;
  flex: 1;
  align-self: stretch;
  box-sizing: border-box;
  justify-content: center;
}

.section-card-icon {
  font-size: 8vh;
  width: 16vh;
  height: 16vh;
  background: rgba(206, 212, 218, 0.06);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.section-card-text {
  display: flex;
  flex-direction: column;
  gap: 1vh;
}

.section-card-text h3 {
  font-size: 3vh;
  font-weight: 850;
  color: white;
  margin: 0;
}

.section-card-text p {
  font-size: 2.2vh;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin: 0;
}

/* Footer slide navigation controls */
.game-help-footer-controls {
  padding: 0.5vh 6vw; /* Reduced padding */
  border-top: 2px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  height: 5.5vh; /* Further reduced height */
}

/* Giant Widescreen nav buttons */
.game-help-nav-btn {
  font-size: 1.2vh; /* Further reduced font size */
  font-weight: 850;
  color: white;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  padding: 0.4vh 1.5vw; /* Further reduced padding */
  border-radius: 8px; /* Further reduced border-radius */
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 0.4vw; /* Further reduced gap */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.game-help-nav-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

.game-help-nav-btn:active {
  transform: translateY(0);
}

/* Center Pagination indicator dots */
.game-help-dots {
  display: flex;
  gap: 0.5vw; /* Further reduced gap */
  align-items: center;
}

.game-help-dot {
  width: 0.9vh; /* Further reduced width */
  height: 0.9vh; /* Further reduced height */
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
}

.game-help-dot:hover {
  background: rgba(255, 255, 255, 0.45);
  transform: scale(1.25);
}

.game-help-dot.active {
  background: #FFA94D; /* Match branding */
  transform: scale(1.4);
  box-shadow: 0 0 6px rgba(255, 169, 77, 0.7); /* Reduced glow */
}

/* Hide 'Zum Spiel wechseln' button on mobile */
@media (max-width: 768px) {
  #gameActiveBtn {
    display: none !important;
  }
}

/* ─── Lightbox Overlay ─── */
.display-lightbox {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.display-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-overlay-bg {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 12, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: -1;
}

.lightbox-content {
  position: relative;
  max-width: 95vw;
  max-height: 90vh;
  max-height: 90dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-sizing: border-box;
}

.display-lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7), 0 0 100px rgba(255, 255, 255, 0.05);
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none; /* Block default panning/pinching so we handle it precisely in JS */
  transition: transform 0.1s ease-out; /* Smooth transition for pinch gestures */
}

.lightbox-image.zoomed {
  cursor: zoom-out;
}

.lightbox-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
  backdrop-filter: blur(5px);
}

.lightbox-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}

.lightbox-close-btn:active {
  transform: scale(0.95);
}

@media (max-width: 768px) {
  .lightbox-close-btn {
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    font-size: 1.6rem;
  }
  
  .lightbox-content {
    max-width: 100vw;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .lightbox-image {
    border-radius: 0;
  }
}