@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600;700&display=swap');

@font-face {
  font-family: 'Lilita One';
  src: url('/fonts/LilitaOne-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Fredoka';
  src: url('/fonts/Fredoka-VariableFont_wdth_wght.ttf') format('truetype');
  font-weight: 300 900;
  font-display: swap;
}

@font-face {
  font-family: 'Bungee';
  src: url('/fonts/Bungee-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

:root {
  /* Cartoon / Neobrutalism Palette */
  --bg-color: #fceea7;
  /* Banana Yellow */
  --clay-color-primary: #ff3b3b;
  /* Cartoon Red */
  --clay-color-accent: #3b82f6;
  /* Cartoon Blue */
  --clay-color-success: #10b981;
  /* Cartoon Green */
  --clay-color-warning: #f59e0b;
  /* Cartoon Orange */
  --clay-color-dark: #1f2937;
  /* Almost Black */

  /* Neobrutalism Shadows */
  --clay-outer-shadow: 10px 10px 0px #000;
  --clay-hover-outer: 5px 5px 0px #000;
  --clay-active-inner: 0px 0px 0px #000;

  --game-bg: #ffd6e7;
  /* Pink Zine-Style Host Screen */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Fredoka', sans-serif;
}

body {
  background-color: var(--bg-color);
  background-image: radial-gradient(#000 1px, transparent 1px);
  background-size: 20px 20px;
  color: var(--clay-color-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------------------------------
   CARTOON COMPONENTS
----------------------------------- */
.clay-card {
  background-color: #fff;
  border-radius: 20px;
  box-shadow: var(--clay-outer-shadow);
  padding: 30px;
  border: 4px solid #000;
  transition: transform 0.2s, box-shadow 0.2s;
}

.clay-btn {
  background-color: #fff;
  color: var(--clay-color-dark);
  border: 4px solid #000;
  border-radius: 16px;
  padding: 15px 30px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--clay-outer-shadow);
  transition: all 0.2s;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-transform: uppercase;
}

.clay-btn:focus-visible {
  outline: 3px solid #000;
  outline-offset: 3px;
  box-shadow: var(--clay-outer-shadow), 0 0 0 6px rgba(0,0,0,0.15);
}

.clay-card:hover {
  transform: translateY(-8px) scale(1.01) rotate(0.5deg);
  box-shadow: 14px 14px 0px #000;
}


.clay-btn:active {
  transform: translate(6px, 6px);
  box-shadow: var(--clay-active-inner);
}

.clay-btn.primary {
  background-color: var(--clay-color-primary);
  color: #fff;
}

.clay-btn.accent {
  background-color: var(--clay-color-accent);
  color: #fff;
}

.clay-btn.success {
  background-color: var(--clay-color-success);
  color: #000;
}

.clay-btn.warning {
  background-color: var(--clay-color-warning);
  color: #000;
}

.clay-btn.danger {
  background-color: #e21b3c;
  color: #fff;
}

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

.clay-btn:disabled,
.clay-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none !important;
}

/* ---------------------------------
   ZINE / NEOBRUTALISM COMPONENTS
----------------------------------- */
.zine-section {
  position: relative;
  padding: 80px 40px;
  margin: 80px auto; 
  max-width: 1400px;
  z-index: 1;
}

.zine-card {
  background: #fff;
  border: 6px solid #000;
  box-shadow: 10px 10px 0px #000;
  padding: 40px;
  transform: rotate(var(--rot, 0deg));
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.zine-card:hover {
  transform: rotate(0deg) scale(1.03) translateY(-10px);
  box-shadow: 15px 15px 0px #000;
  z-index: 10;
}

.sticker {
  position: absolute;
  background: var(--clay-color-warning);
  border: 4px solid #000;
  padding: 5px 15px;
  font-weight: 900;
  transform: rotate(-5deg);
  z-index: 20;
  box-shadow: 4px 4px 0 #000;
  text-transform: uppercase;
  font-size: 0.9rem;
  animation: stickerPulse 2.5s ease-in-out infinite;
}

@keyframes stickerPulse {
  0%, 100% { transform: rotate(-5deg) scale(1); }
  50% { transform: rotate(-5deg) scale(1.06); }
}

.outline-text {
  -webkit-text-stroke: 3px #000;
  color: transparent;
  text-shadow: 4px 4px 0px #000;
  font-size: 8rem;
  line-height: 0.8;
  text-transform: uppercase;
  font-weight: 900;
}

@media (max-width: 900px) {
  .zine-section { padding: 40px 20px; margin: 40px auto; }
  .outline-text { font-size: 5rem; -webkit-text-stroke: 2px #000; }
  .zine-card { padding: 30px 20px; }
}

.clay-input {
  width: 100%;
  border: 4px solid #000;
  background-color: #fff;
  border-radius: 12px;
  padding: 15px 20px;
  font-size: 1.2rem;
  box-shadow: 4px 4px 0px #000;
  color: var(--clay-color-dark);
  outline: none;
  font-weight: 600;
  transition: all 0.2s;
}

.clay-input:focus {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #000;
}

/* ---------------------------------
   UTILITY & LAYOUT
----------------------------------- */
.fullscreen-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.hidden {
  display: none !important;
}

.fw-bold {
  font-weight: 700;
}

.text-center {
  text-align: center;
}

/* ---------------------------------
   PAGES
----------------------------------- */

/* --- Auth --- */
.auth-wrapper {
  width: 100%;
  max-width: 450px;
}

.auth-tabs {
  display: flex;
  margin-bottom: 20px;
  gap: 10px;
}

.auth-tab {
  flex: 1;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  font-weight: 700;
  background: #fff;
  color: var(--clay-color-dark);
  border: 4px solid #000;
  border-radius: 16px;
  box-shadow: var(--clay-outer-shadow);
  transition: all 0.2s;
}

.auth-tab.active {
  background: var(--clay-color-warning);
  transform: translate(3px, 3px);
  box-shadow: var(--clay-hover-outer);
}

.auth-form-group {
  margin-bottom: 20px;
}

/* --- Dashboard --- */
.dashboard-nav {
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  background: #fff;
  border-bottom: 4px solid #000;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  padding: 0 40px 100px;
}

.floating-fab {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50px;
  padding: 20px 40px;
  font-size: 1.5rem;
  z-index: 100;
  border: 4px solid #000;
  animation: float 4s ease-in-out infinite;
}

/* --- Editor --- */
.editor-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.editor-sidebar-clay {
  width: 350px;
  background: #fff;
  border-right: 4px solid #000;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

.editor-sidebar-actions {
  flex: 0 0 auto;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: -20px -20px 0;
  padding: 20px 20px 16px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 4px solid rgba(0, 0, 0, 0);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.editor-sidebar-actions.is-scrolled {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(0, 0, 0, 0.72);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.08);
}

.editor-sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin: 0 -20px -20px;
  padding: 12px 20px 20px;
}

.editor-sidebar-import-btn {
  flex: 0 0 auto;
}

.editor-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding-top: 15px;
}

.editor-new-block-btn {
  background: #fff;
  color: #000;
}

.question-import-overlay {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
}

.question-import-overlay.active {
  display: flex;
}

.question-import-modal {
  width: min(1080px, 100%);
  max-height: min(86vh, 820px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #fff7fb;
  border: 5px solid #000;
  border-radius: 8px;
  box-shadow: 12px 12px 0 #000;
  padding: clamp(18px, 3vw, 28px);
}

.question-import-head,
.question-import-panel-top,
.question-import-actions,
.question-import-paste-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.question-import-kicker,
.question-import-panel p,
.question-import-paste p,
.question-import-status {
  margin: 0;
  color: #4b5563;
  font-size: 0.92rem;
  font-weight: 700;
}

.question-import-kicker {
  color: #111827;
  text-transform: uppercase;
}

.question-import-head h2 {
  margin: 2px 0 0;
  color: #111827;
  font-family: "Lilita One", "Fredoka", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: 0;
}

.question-import-close,
.question-import-small-btn {
  min-width: 44px;
  min-height: 44px;
  border: 4px solid #000;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  box-shadow: 4px 4px 0 #000;
  cursor: pointer;
  font-family: inherit;
  font-weight: 900;
}

.question-import-close {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.question-import-small-btn {
  padding: 9px 14px;
}

.question-import-close:hover,
.question-import-small-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 #000;
}

.question-import-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(320px, 1.2fr);
  gap: 16px;
}

.question-import-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.question-import-panel label {
  color: #111827;
  font-weight: 900;
  text-transform: uppercase;
}

.question-import-search {
  min-height: 48px;
}

.question-import-list,
.question-import-question-list {
  min-height: 220px;
  max-height: 340px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 4px 8px 0;
}

.question-import-quiz,
.question-import-question {
  width: 100%;
  border: 4px solid #000;
  border-radius: 8px;
  background: #fff;
  box-shadow: 4px 4px 0 #000;
  cursor: pointer;
}

.question-import-quiz {
  min-height: 72px;
  padding: 12px;
  text-align: left;
  font-family: inherit;
}

.question-import-quiz.active {
  background: #d9f99d;
}

.question-import-quiz strong,
.question-import-question strong {
  display: block;
  color: #111827;
  font-size: 1rem;
  line-height: 1.25;
}

.question-import-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 7px;
  color: #4b5563;
  font-size: 0.82rem;
  font-weight: 800;
}

.question-import-question {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px;
}

.question-import-question input {
  width: 24px;
  height: 24px;
  margin: 9px auto 0;
  accent-color: #10b981;
}

.question-import-empty {
  border: 4px dashed rgba(0, 0, 0, 0.28);
  border-radius: 8px;
  padding: 28px 18px;
  color: #4b5563;
  background: rgba(255, 255, 255, 0.55);
  font-weight: 800;
  text-align: center;
}

.question-import-paste {
  border: 4px solid #000;
  border-radius: 8px;
  background: #fff;
  box-shadow: 4px 4px 0 #000;
  padding: 12px 14px;
}

.question-import-paste summary {
  cursor: pointer;
  color: #111827;
  font-weight: 900;
}

.question-import-paste textarea {
  width: 100%;
  min-height: 96px;
  margin-top: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
}

.question-import-actions {
  justify-content: flex-end;
}

#questionImportSubmitBtn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

@media (max-width: 820px) {
  .question-import-overlay {
    padding: 10px;
  }

  .question-import-modal {
    max-height: 94vh;
  }

  .question-import-grid {
    grid-template-columns: 1fr;
  }

  .question-import-list,
  .question-import-question-list {
    max-height: 220px;
  }

  .question-import-actions,
  .question-import-paste-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

.editor-root-dropzone,
.editor-block-dropzone {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 14px;
  border: 3px dashed transparent;
  border-radius: 8px;
  transition: border-color 0.12s, background 0.12s;
}

.editor-root-dropzone.empty,
.editor-block-dropzone {
  padding: 10px;
}

.editor-root-title {
  font-size: 0.72rem;
  font-weight: 900;
  color: #000;
  opacity: 0.55;
  text-transform: uppercase;
  letter-spacing: 0;
}

.editor-block {
  position: relative;
  background: #f59e0b;
  border: 5px solid #000;
  border-radius: 8px;
  box-shadow: 7px 7px 0 #000;
  padding: 8px;
  overflow: visible;
}

.editor-block::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 18px;
  width: 82px;
  height: 16px;
  background: #ffd166;
  border: 5px solid #000;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  z-index: 0;
}

.editor-block > * {
  position: relative;
  z-index: 1;
}

.editor-block.collapsed {
  background: #ffd166;
}

.editor-block.drop-target-active,
.editor-block-dropzone.drop-target-active,
.editor-root-dropzone.drop-target-active {
  border-color: var(--clay-color-accent);
  background: rgba(59,130,246,0.16);
}

.editor-block-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.editor-block-toggle,
.sidebar-drag-handle,
.editor-block-delete {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border: 3px solid #000;
  border-radius: 8px;
  background: #fff;
  box-shadow: 2px 2px 0 #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.editor-block-toggle {
  cursor: pointer;
  padding: 0;
  background: #000;
  color: #ffd166;
}

.editor-block-chevron {
  transform: rotate(90deg);
  transition: transform 0.12s ease;
}

.editor-block.collapsed .editor-block-chevron {
  transform: rotate(0deg);
}

.editor-block-title-wrap {
  min-width: 0;
  flex: 1;
}

.editor-block-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  color: #000;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.editor-block-kicker span:first-child {
  background: #000;
  color: #ffd166;
  border-radius: 6px;
  padding: 2px 6px;
}

.editor-block-name {
  min-width: 0;
  width: 100%;
  border: 3px solid #000;
  border-radius: 6px;
  background: #fff;
  box-shadow: 2px 2px 0 #000;
  padding: 7px 9px;
  font-weight: 900;
  font-size: 0.98rem;
  outline: none;
}

.editor-block-delete,
.sidebar-drag-handle {
  cursor: grab;
  padding: 0;
  color: #000;
}

.editor-block-delete {
  cursor: pointer;
  background: #fff;
  color: var(--clay-color-primary);
}

.editor-block-collapsed-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 3px dashed rgba(0,0,0,0.45);
  border-radius: 6px;
  background: rgba(255,255,255,0.42);
  color: rgba(0,0,0,0.68);
  font-weight: 900;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.editor-empty-drop {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px dashed rgba(0,0,0,0.35);
  border-radius: 8px;
  color: rgba(0,0,0,0.55);
  font-weight: 900;
  font-size: 0.82rem;
  text-align: center;
  padding: 10px;
}

.editor-question-card {
  position: relative;
  cursor: pointer;
  padding: 12px 12px 12px 56px;
  margin: 0;
  border-radius: 8px;
  box-shadow: 4px 4px 0 #000;
  transition: transform 0.12s, box-shadow 0.12s, opacity 0.12s;
}

.editor-question-card:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 #000;
}

.editor-question-card.is-dragging {
  opacity: 0.35;
}

.editor-question-card .sidebar-drag-handle {
  position: absolute;
  left: 10px;
  top: 12px;
  touch-action: none;
}

.editor-question-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  color: var(--clay-color-dark);
}

.editor-type-chip {
  background: var(--clay-color-accent);
  color: #fff;
  border: 2px solid #000;
  border-radius: 8px;
  padding: 2px 7px;
  font-size: 0.72rem;
  line-height: 1.2;
}

.editor-question-card-text {
  margin-top: 7px;
  font-size: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1f2937;
}

.editor-question-delete {
  margin-top: 9px;
  border: 3px solid #000;
  border-radius: 8px;
  background: var(--clay-color-primary);
  color: #fff;
  box-shadow: 2px 2px 0 #000;
  font-weight: 900;
  font-size: 0.78rem;
  padding: 5px 10px;
  cursor: pointer;
  font-family: inherit;
  text-transform: uppercase;
}

.drop-target-active {
  border-color: var(--clay-color-accent);
  background: rgba(59,130,246,0.12);
}

.sidebar-drop-placeholder {
  border: 4px dashed #000;
  border-radius: 8px;
  background: repeating-linear-gradient(
    -45deg,
    rgba(59,130,246,0.22),
    rgba(59,130,246,0.22) 10px,
    rgba(255,255,255,0.65) 10px,
    rgba(255,255,255,0.65) 20px
  );
  box-shadow: inset 0 0 0 3px var(--clay-color-accent), 4px 4px 0 #000;
  animation: sidebarDropPulse 0.8s ease-in-out infinite alternate;
}

@keyframes sidebarDropPulse {
  from { transform: scaleY(0.96); opacity: 0.78; }
  to { transform: scaleY(1); opacity: 1; }
}

.sidebar-drag-ghost {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.92;
  transform: rotate(-1deg);
  box-shadow: 10px 10px 0 #000 !important;
}

.editor-main-clay {
  flex: 1;
  padding: 30px;
  padding-bottom: 80px;
  overflow-y: auto;
}

.thumb-card {
  cursor: pointer;
  background: #fff;
  border: 4px solid #000;
  border-radius: 16px;
  padding: 15px;
  box-shadow: 4px 4px 0px #000;
  transition: 0.2s;
}

.thumb-card.active {
  background: var(--clay-color-warning);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #000;
}

.answer-grid-clay {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

/* ---------------------------------
   HOST VIEW (Zine Theme)
----------------------------------- */
.host-body {
  background: var(--game-bg);
  background-image: radial-gradient(#000 2px, transparent 2px);
  background-size: 30px 30px;
  color: #000;
  position: relative;
  min-height: 100vh;
}

.host-title-3d {
  font-family: 'Bungee', 'Lilita One', 'Fredoka', sans-serif;
  font-size: 5rem;
  font-weight: 400;
  text-align: center;
  text-transform: uppercase;
  color: var(--clay-color-primary);
  -webkit-text-stroke: 1.5px #000;
  text-shadow: 6px 6px 0px #000;
  margin-bottom: 60px;
  transform: rotate(-1deg);
  letter-spacing: 0;
}

.host-title-3d.award-title-readable {
  font-family: 'Lilita One', 'Fredoka', sans-serif;
  color: #fff;
  -webkit-text-stroke: 0;
  text-shadow: 5px 5px 0 #000;
}

.host-body #gameCodeDisplay,
.host-body #questionTimer,
.host-body #mgTimer,
.host-body #songtimelineTimer,
.host-body .leaderboard-position,
.host-body .leaderboard-score,
.host-body .jp-cell-pts,
.host-body .jp-score-pts,
.host-body #jeopardyModalPoints,
.host-body #correctCountText,
.host-body #mgCorrectCount,
.host-body #songtimelineCorrectCount,
.host-body .geopin-score,
.host-body .host-display-number {
  font-family: 'Bungee', 'Lilita One', 'Fredoka', sans-serif;
  font-weight: 400 !important;
  letter-spacing: 0;
}

/* Range Slider Styling (Estimation Questions) */
input[type=range].clay-input {
  -webkit-appearance: none;
  background: #fff;
  padding: 0;
  height: 40px;
  border-radius: 20px;
  cursor: pointer;
}
input[type=range].clay-input::-webkit-slider-runnable-track {
  height: 12px;
  background: #eee;
  border-radius: 6px;
  border: 2px solid #000;
}
input[type=range].clay-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 32px;
  width: 32px;
  background: var(--clay-color-primary);
  border: 3px solid #000;
  border-radius: 50%;
  margin-top: -12px;
  box-shadow: 2px 2px 0 #000;
  transition: transform 0.1s;
}
input[type=range].clay-input:active::-webkit-slider-thumb {
  transform: scale(1.1);
}

.host-section {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 40px;
  position: relative;
  overflow: hidden;
  text-align: center;
  box-sizing: border-box;
}

.host-section.active {
  display: flex;
  animation: slideUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.host-section.award-section-final {
  justify-content: flex-start;
  padding-top: clamp(28px, 5vh, 56px);
  overflow-y: auto;
}

.host-section.award-section-final #awardMainTitle {
  margin-bottom: 18px !important;
}

.host-section.award-section-final #awardRevealArea {
  display: none !important;
}

.host-section.award-section-final #awardFullRankings {
  order: 2;
  margin-top: 12px !important;
}

.host-section.award-section-final #awardActions {
  order: 3;
  margin-top: 28px !important;
  margin-bottom: 20px;
}

/* Host Bubbles / Particles */
.lobby-bubble {
  padding: 10px 20px;
  background: #fff;
  border: 4px solid #000;
  border-radius: 0;
  font-size: 1.5rem;
  font-weight: 900;
  box-shadow: 6px 6px 0px #000;
  transform: rotate(calc(-3deg + 6deg * var(--rot, 0.5)));
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lobby-grid-clay {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  max-width: 1000px;
  margin: 40px auto;
}

/* Host Answers */
.host-mc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  width: 100%;
  max-width: 1200px;
  margin-top: 40px;
  margin-left: auto;
  margin-right: auto;
}

.host-mc-card {
  padding: 30px;
  border-radius: 20px;
  border: 4px solid #000;
  box-shadow: 8px 8px 0px #000;
  font-size: 2.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 20px;
  background: #fff;
  color: #000;
}

.mc-color-A {
  background: #ff3b3b;
  color: #fff;
}

.mc-color-B {
  background: #3b82f6;
  color: #fff;
}

.mc-color-C {
  background: #f59e0b;
  color: #000;
}

.mc-color-D {
  background: #10b981;
  color: #fff;
}

/* Timer bar */
.clay-timer-track {
  width: 100%;
  max-width: 800px;
  height: 30px;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  margin: 20px 0;
  border: 4px solid #000;
}

.clay-timer-fill {
  height: 100%;
  background: #000;
  width: 100%;
  transform: scaleX(1);
  transform-origin: left center;
  transition: transform 1s linear, background-color 0.3s;
}

.clay-timer-fill.warning {
  background: #ff3b3b;
}

/* ---------------------------------
   HOST CARDS (White with black border on green bg)
----------------------------------- */
.host-card {
  background: #fff;
  border: 4px solid #000;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 8px 8px 0px #000;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* ---------------------------------
   SPOTIFY – Custom Play Button
   Hide the real embed, show a pretty play button
----------------------------------- */
.spotify-play-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  cursor: pointer;
}

.spotify-play-wrap .spotify-hidden-embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 300px;
  height: 80px;
  opacity: 0;
  pointer-events: none;
}

.spotify-custom-btn {
  width: 100px;
  height: 100px;
  background: #1DB954;
  border: 4px solid #000;
  border-radius: 50%;
  box-shadow: 6px 6px 0px #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.spotify-custom-btn:hover {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0px #000;
}

.spotify-custom-btn:active {
  transform: translate(6px, 6px);
  box-shadow: 0px 0px 0px #000;
  background: #000;
}

.spotify-custom-btn:active svg {
  fill: #1DB954;
}

.spotify-custom-btn svg {
  fill: white;
  width: 40px;
  height: 40px;
  margin-left: 5px;
}

.spotify-custom-btn.playing {
  background: #1DB954;
}

.spotify-custom-btn.playing svg polygon {
  display: none;
}

.spotify-custom-btn .pause-bars {
  display: none;
}

.spotify-custom-btn.playing .pause-bars {
  display: block;
  fill: white;
}

.spotify-start-field {
  flex-direction: column;
  gap: 8px;
  width: 100%;
  color: #fff;
}

.spotify-start-label {
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0;
}

.spotify-start-input-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.spotify-start-input-row .clay-input {
  max-width: 160px;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.spotify-start-auto {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 3px solid #000;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  box-shadow: 3px 3px 0 #000;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.1;
}

.spotify-start-hint {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
}

@media (max-width: 560px) {
  .spotify-start-input-row {
    flex-direction: column;
  }

  .spotify-start-input-row .clay-input {
    max-width: none;
  }
}

/* ---------------------------------
   HITSTER – Host Cards
----------------------------------- */
.songtimeline-card {
  background: #fff;
  border: 4px solid #000;
  border-radius: 20px;
  padding: 20px 30px;
  box-shadow: 6px 6px 0px #000;
  margin: 8px;
  font-weight: 700;
  text-align: center;
  min-width: 180px;
}

.songtimeline-card-artist {
  font-size: 1rem;
  color: #666;
  margin-bottom: 4px;
}

.songtimeline-card-year {
  font-size: 2rem;
  font-weight: 900;
  color: var(--clay-color-primary);
}

.songtimeline-card-name {
  font-size: 1.1rem;
  color: #333;
  margin-top: 4px;
}

.songtimeline-card-new {
  border-color: var(--clay-color-primary);
  background: #fff0f0;
}

.songtimeline-card-correct {
  border-color: var(--clay-color-success);
  background: #f0fff0;
}

.songtimeline-timeline-host-label {
  font-size: 1.2rem;
  font-weight: 700;
  color: #000;
  padding: 10px 20px;
  opacity: 0.6;
}

.songtimeline-reveal-label {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--clay-color-success);
  margin-bottom: 10px;
  text-align: center;
}

/* ---------------------------------
   HITSTER – Player Cards
----------------------------------- */
.songtimeline-player-section {
  width: 100%;
  max-width: 100vw;
  height: 100vh;
  min-height: 0;
  max-height: 100vh;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y;
}

.songtimeline-player-counter {
  width: min(100%, 420px);
  margin: 0 auto 10px;
  color: var(--clay-color-dark);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
}

.songtimeline-player-timeline {
  flex: 1;
  width: min(100%, 430px);
  max-width: calc(100vw - 28px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-x: none;
  padding: 10px 4px 24px;
  touch-action: pan-y;
}

.songtimeline-player-section.is-starter-intro {
  justify-content: center;
}

.songtimeline-player-section.is-starter-intro .songtimeline-player-counter {
  display: none;
}

.songtimeline-starter-intro {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
}

.songtimeline-starter-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 3px solid #000;
  border-radius: 999px;
  background: #d1fae5;
  color: #065f46;
  box-shadow: 3px 3px 0 #000;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.songtimeline-starter-copy {
  width: min(100%, 340px);
  color: var(--clay-color-dark);
  font-size: clamp(1.35rem, 7vw, 2.1rem);
  font-weight: 900;
  line-height: 1.05;
}

.songtimeline-starter-card {
  width: min(100%, 330px);
  margin: 4px auto;
}

.songtimeline-starter-hint {
  width: min(100%, 320px);
  color: #4b5563;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.25;
}

.songtimeline-auto-status {
  width: min(100%, 360px);
  margin: 0 auto 8px;
  padding: 9px 12px;
  border: 3px solid #000;
  border-radius: 14px;
  background: #fff7d6;
  color: var(--clay-color-dark);
  box-shadow: 3px 3px 0 #000;
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}

.songtimeline-auto-status.is-saved {
  background: #d1fae5;
  color: #065f46;
}

.songtimeline-card-player {
  background: #fff;
  border: 4px solid #000;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 6px 6px 0px #000;
  text-align: center;
  font-weight: 700;
  width: min(100%, 360px);
  max-width: calc(100vw - 34px);
  margin: 8px auto;
}

.songtimeline-card-player-artist {
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
}

.songtimeline-card-player-year {
  font-size: 2rem;
  font-weight: 900;
  color: var(--clay-color-primary);
  margin: 4px 0;
}

.songtimeline-card-player-name {
  font-size: 1rem;
  color: #666;
}

/* Mystery ? card (player) */
.songtimeline-mystery-source {
  width: min(100%, 360px);
  max-width: calc(100vw - 34px);
  margin: 20px auto;
  text-align: center;
}

.songtimeline-mystery-card,
.songtimeline-question-card {
  background: #fff;
  border: 4px solid #000;
  border-radius: 20px;
  padding: 25px;
  box-shadow: 6px 6px 0px #000;
  text-align: center;
  cursor: grab;
  touch-action: none;
  user-select: none;
  width: min(100%, 360px);
  max-width: calc(100vw - 34px);
  margin: 10px auto;
}

.songtimeline-question-card {
  position: relative;
  z-index: 5;
}

.songtimeline-mystery-card:active,
.songtimeline-question-card:active {
  cursor: grabbing;
  box-shadow: 3px 3px 0px #000;
  transform: translate(3px, 3px);
}

.songtimeline-mystery-icon {
  font-size: 3rem;
  font-weight: 900;
  color: var(--clay-color-dark);
}

.songtimeline-mystery-label {
  font-size: 0.9rem;
  color: #888;
  margin-top: 8px;
  font-weight: 600;
}

.songtimeline-drag-clone {
  opacity: 0.9;
  box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.3);
  max-width: calc(100vw - 34px);
}

/* Slots */
.songtimeline-slot {
  width: min(100%, 360px);
  max-width: calc(100vw - 34px);
  min-height: 60px;
  border: 4px dashed #aaa;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #888;
  margin: 8px auto;
  transition: 0.2s;
}

.songtimeline-slot-indicator {
  font-size: 0.9rem;
  color: #888;
}

.songtimeline-slot-minimal {
  min-height: 20px;
  border: 2px dashed transparent;
  background: transparent;
}

.songtimeline-slot-hover {
  border-color: var(--clay-color-accent) !important;
  background: rgba(59, 130, 246, 0.15) !important;
  min-height: 60px;
  border-width: 4px;
  border-style: dashed;
}

.songtimeline-timeline-label {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: #888;
  padding: 8px 0;
}

/* ---------------------------------
   MUSIC GRID
----------------------------------- */
.music-grid-cell {
  background: #fff;
  border: 4px solid #000;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 6px 6px 0px #000;
  padding: 15px;
  transition: all 0.3s;
}

.music-grid-cell.answered {
  background: #e5e7eb;
  opacity: 0.35;
  box-shadow: 2px 2px 0px #999;
  border-color: #999;
}

.music-grid-cell.correct-cell {
  border-color: var(--clay-color-success);
  background: #d1fae5;
  opacity: 1;
  box-shadow: 6px 6px 0px var(--clay-color-success);
}

/* Player music grid buttons */
.music-grid-player-grid {
  width: min(100%, 400px);
  max-width: calc(100vw - 40px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 20px auto 0;
  padding: 0 8px 8px 0;
}

.music-grid-player-option {
  width: 100%;
  min-width: 0;
  height: 100px;
  padding: 10px;
  font-size: 3rem;
  line-height: 1;
}

.music-grid-player-option.is-answered {
  background: #e5e7eb;
  opacity: 0.3;
  border-color: #999;
  box-shadow: 2px 2px 0 #999;
  cursor: not-allowed;
}

.music-grid-player-cell.selected {
  border-color: var(--clay-color-accent);
  background: #dbeafe;
  box-shadow: 6px 6px 0px var(--clay-color-accent);
  transform: scale(1.05);
}

.music-grid-submit-btn {
  width: min(100%, 400px);
  max-width: calc(100vw - 40px);
  margin: 22px auto 0;
  padding: 20px;
  border-radius: 0;
  font-size: 1.5rem;
}

/* ---------------------------------
   PLAYER VIEW
----------------------------------- */
.player-section {
  display: none;
  min-height: 100vh;
  flex-direction: column;
  padding: 20px;
  justify-content: center;
}

.player-section.active {
  display: flex;
  animation: slideInRight 0.3s ease-out;
}

#answerSection,
#wordcloudSection,
#answeredSection {
  background-color: var(--game-bg);
  background-image: radial-gradient(#000 1.2px, transparent 1.2px);
  background-size: 20px 20px;
  justify-content: flex-start;
  gap: 16px;
  padding: max(18px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
}

/* Contain answer section exactly in the viewport — prevents the 100vh iOS scroll bug */
#answerSection {
  height: 100vh;
  height: 100svh;
  min-height: 0;
  overflow: hidden;
}

.player-question-top {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 620px;
  margin: 0 auto 4px;
  flex-shrink: 0;
}

.player-question-avatar {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border: 4px solid #000;
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
  box-shadow: 4px 4px 0 #000;
}

.player-question-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  display: block;
}

.player-question-progress-wrap {
  flex: 1;
  min-width: 0;
}

.player-question-counter {
  font-size: clamp(0.95rem, 4vw, 1.15rem) !important;
  color: #6b7280 !important;
  text-align: left !important;
  margin: 0 0 6px !important;
  font-weight: 900 !important;
  text-transform: uppercase;
}

.player-question-progress-track {
  width: 100%;
  height: 9px;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.player-question-progress-fill {
  width: var(--progress, 0%);
  height: 100%;
  background: var(--clay-color-primary);
  border-radius: 999px;
  transition: width 0.25s ease-out;
}

.player-question-mode-icon {
  width: 56px;
  height: 48px;
  flex: 0 0 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #000;
  border-radius: 12px;
  background: var(--bg-color);
  box-shadow: 4px 4px 0 #000;
  color: #000;
}

.player-question-card {
  width: 100%;
  max-width: 620px;
  margin: 4px auto 12px;
  padding: clamp(18px, 5vw, 28px) 18px;
  background: #fff;
  border: 5px solid #000;
  border-radius: 22px;
  box-shadow: 8px 8px 0 #000;
  color: var(--clay-color-dark);
  font-size: clamp(1.28rem, 5.5vw, 2rem);
  font-weight: 900;
  line-height: 1.12;
  text-align: center;
  flex-shrink: 0;
}

/* Answer grid fills all remaining vertical space — mirrors how the reveal grid works */
#answerSection .joypad-grid {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 0;
  gap: 18px;
}

#wordcloudChoiceWrap.joypad-grid {
  flex: 0 0 auto;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 0;
  gap: 18px;
  grid-auto-rows: minmax(130px, 1fr);
}

/* Answer grid fills remaining vertical space so buttons never get clipped */
#answerSection .joypad-grid {
  flex: 1;
  min-height: 0;
  grid-auto-rows: auto;
}

.player-mc-choice {
  min-height: 0;
  border-radius: 24px;
  flex-direction: column;
  gap: 14px;
  padding: 18px 12px;
  font-size: clamp(1.35rem, 5.4vw, 2.1rem);
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}

.player-mc-label {
  min-width: 48px;
  padding: 5px 13px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.16);
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1;
}

/* ─── Mobile: tighten the answer selection screen on small phones ─── */
@media (max-width: 480px) {
  #answerSection {
    gap: 10px;
    padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  }

  #answerSection .joypad-grid {
    gap: 10px;
  }

  .player-question-card {
    padding: 10px 12px;
    margin-bottom: 2px;
    font-size: clamp(1.05rem, 5vw, 1.5rem);
    border-radius: 16px;
  }

  .player-mc-choice {
    padding: 10px 8px;
    gap: 6px;
    border-radius: 16px;
    font-size: clamp(1rem, 4.8vw, 1.6rem);
  }

  .player-question-avatar,
  .player-question-mode-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }
}

.wordcloud-player-content {
  width: 100%;
  max-width: 620px;
  margin: 8px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

#wordcloudRemaining {
  font-size: clamp(1.05rem, 4.5vw, 1.35rem) !important;
  color: #777 !important;
  font-weight: 900 !important;
}

#wordcloudTextWrap {
  gap: 18px !important;
}

#wordcloudInput {
  min-height: 118px;
  border: 5px solid #000 !important;
  border-radius: 22px !important;
  box-shadow: 8px 8px 0 #000 !important;
  color: var(--clay-color-dark);
  font-size: clamp(1.35rem, 6vw, 2rem) !important;
  font-weight: 900 !important;
}

#wordcloudInput::placeholder {
  color: rgba(0, 0, 0, 0.45);
}

#wordcloudSubmitBtn {
  min-height: 86px;
  border-radius: 22px !important;
  background: #fff !important;
  color: var(--clay-color-dark) !important;
  border: 5px solid #000 !important;
  box-shadow: 8px 8px 0 #000 !important;
  font-size: clamp(1.15rem, 5.3vw, 1.75rem) !important;
  font-weight: 900 !important;
}

#wordcloudSubmitBtn:not(:disabled) {
  background: var(--clay-color-primary) !important;
  color: #fff !important;
}

.wordcloud-chip,
.answered-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  background: var(--clay-color-warning);
  border: 4px solid #000;
  border-radius: 999px;
  box-shadow: 4px 4px 0 #000;
  padding: 9px 18px;
  color: #000;
  font-size: clamp(1rem, 4.2vw, 1.28rem);
  font-weight: 900;
  line-height: 1;
  animation: chipIn 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

#wordcloudSubmittedWords {
  margin-top: 2px;
}

.answered-success-icon {
  width: clamp(112px, 31vw, 150px);
  height: clamp(112px, 31vw, 150px);
  margin: clamp(44px, 10vh, 92px) auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--clay-color-success);
  border: 5px solid #000;
  border-radius: 50%;
  box-shadow: 10px 10px 0 #000;
  color: #fff;
}

.answered-title {
  margin: 10px 0 20px !important;
  color: var(--clay-color-dark);
  font-size: clamp(2.4rem, 11vw, 4.2rem) !important;
  font-weight: 900 !important;
  line-height: 0.95;
  text-transform: uppercase;
}

#answeredSelectedWords {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: min(100%, 620px);
  margin: 0 auto 16px;
}

.answered-wait {
  color: #888;
  font-size: clamp(1rem, 4.4vw, 1.35rem);
  font-weight: 900;
}

.answered-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 16px;
}

.answered-dots span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #000;
  animation: waitingBlink 1.2s ease-in-out infinite;
}

.answered-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.answered-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

/* Massive Joypad Buttons for answers */
.joypad-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 20px;
  flex: 1;
  padding: 20px 0;
}

.joypad-btn {
  border: 6px solid #000;
  border-radius: 30px;
  font-size: 4rem;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 8px 8px 0px #000;
  transition: 0.1s;
}

.joypad-btn:active {
  transform: translate(6px, 6px);
  box-shadow: 2px 2px 0px #000;
}

.joypad-A {
  background: #ff3b3b;
}

.joypad-B {
  background: #3b82f6;
}

.joypad-C {
  background: #f59e0b;
  color: #000;
}

.joypad-D {
  background: #10b981;
}

/* Mobile: tighten the answer section so everything fits on small screens */
@media (max-width: 480px) {
  #answerSection {
    gap: 10px;
    padding: max(10px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  }

  #answerSection .joypad-grid {
    gap: 12px;
  }

  .player-question-card {
    padding: 12px 14px;
    font-size: clamp(1.05rem, 5vw, 1.5rem);
    margin: 0 auto;
    border-radius: 14px;
    box-shadow: 5px 5px 0 #000;
  }

  .player-question-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
  }

  .player-question-mode-icon {
    width: 42px;
    height: 38px;
    flex: 0 0 42px;
  }

  .player-mc-choice {
    gap: 8px;
    padding: 12px 8px;
    font-size: clamp(1.05rem, 4.8vw, 1.6rem);
    border-radius: 18px;
  }
}

/* Order Drag List */
.clay-order-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 30px 0;
}

.order-axis-label {
  display: none;
  width: min(100%, 560px);
  margin: 10px auto;
  padding: 10px 14px;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 3px solid #000;
  border-radius: 12px;
  box-shadow: 3px 3px 0 #000;
  color: var(--clay-color-dark);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.order-axis-label.is-visible {
  display: flex;
}

.order-axis-label strong {
  color: #000;
}

.order-axis-display {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(100%, 560px);
  margin: 14px auto 16px;
}

.clay-order-item {
  background: #fff;
  border: 4px solid #000;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 6px 6px 0px #000;
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 1.5rem;
  font-weight: 700;
}

.clay-order-handle {
  font-size: 2rem;
  color: var(--clay-color-dark);
  cursor: grab;
}

/* Leaderboard */
.leaderboard-item {
  background: #fff;
  border: 6px solid #000;
  border-radius: 0;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  box-shadow: 10px 10px 0px #000;
  font-size: 1.8rem;
  font-weight: 900;
  transform: rotate(var(--rot, 0.5deg));
}

.player-leaderboard-board {
  width: min(92vw, 520px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.player-leaderboard-row {
  background: #fff;
  border: 4px solid #000;
  box-shadow: 5px 5px 0 #000;
  border-radius: 8px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  font-weight: 900;
  will-change: transform;
}

.player-leaderboard-row.is-mine {
  background: var(--clay-color-warning);
  transform: scale(1.02);
}

.player-leaderboard-rank {
  min-width: 70px;
  color: #000;
  font-size: 1rem;
}

.player-leaderboard-avatar {
  width: 38px;
  height: 38px;
  object-fit: contain;
  padding: 2px;
  border: 3px solid #000;
  border-radius: 8px;
  background: #fff;
}

.player-leaderboard-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-leaderboard-name small {
  display: block;
  font-size: 0.72rem;
  opacity: 0.65;
}

.player-leaderboard-score {
  color: var(--clay-color-primary);
  white-space: nowrap;
}

.player-leaderboard-row.final-reveal {
  min-height: 64px;
}

@media (max-width: 480px) {
  .player-leaderboard-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 10px;
    gap: 8px;
    font-size: 0.95rem;
  }

  .player-leaderboard-avatar {
    display: none;
  }

  .player-leaderboard-score {
    font-size: 0.85rem;
  }
}

@media (max-width: 900px) {
  .host-body .host-section {
    padding: 24px 16px;
  }

  .host-body .host-card {
    padding: 24px 20px;
  }

  .host-body .host-title-3d {
    font-size: clamp(2.5rem, 10vw, 4rem);
    margin-bottom: 28px;
    text-shadow: 4px 4px 0px #000;
    -webkit-text-stroke: 1px #000;
  }

  .host-body #startBtn,
  .host-body #teamStartBtn,
  .host-body #leaderboardNextBtn,
  .host-body #awardNextBtn,
  .host-body #awardEndBtn {
    font-size: 1.3rem !important;
    padding: 16px 22px !important;
    max-width: calc(100vw - 32px);
    white-space: normal;
  }

  .host-body #leaderboardNextBtn,
  .host-body #awardNextBtn {
    gap: 10px;
  }

  .host-section.award-section-final #awardFullRankings {
    flex-direction: column;
    gap: 24px !important;
  }

  .host-body #gameAbortBtn,
  .host-body #lobbyBackBtn {
    padding: 12px 16px !important;
    font-size: 0.95rem !important;
  }
}

/* Reveal styles */
.host-type-info {
  grid-column: 1 / -1;
  background: #fff;
  border: 4px solid #000;
  border-radius: 20px;
  box-shadow: 8px 8px 0px #000;
  padding: 40px;
  text-align: center;
}

.host-type-info .type-icon {
  border: 4px solid #000;
  padding: 10px;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-shadow: 4px 4px 0 #000;
  margin-bottom: 15px;
}

.reveal-answer-big {
  font-size: 3rem;
  font-weight: 900;
  color: var(--clay-color-dark);
  margin-top: 15px;
}

.order-items-display {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 15px;
}

.order-display-chip {
  background: #fff;
  border: 3px solid #000;
  border-radius: 12px;
  padding: 10px 20px;
  font-weight: 700;
  box-shadow: 3px 3px 0 #000;
}

.order-display-chip.correct-order {
  background: #d1fae5;
  border-color: var(--clay-color-success);
}

/* Answer reveal on host */
.host-answer-block {
  padding: 30px;
  border-radius: 20px;
  border: 4px solid #000;
  box-shadow: 8px 8px 0px #000;
  font-size: 2.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 20px;
}

.answer-a {
  background: #ff3b3b;
  color: #fff;
}

.answer-b {
  background: #3b82f6;
  color: #fff;
}

.answer-c {
  background: #f59e0b;
  color: #000;
}

.answer-d {
  background: #10b981;
  color: #fff;
}

.correct-highlight {
  transform: scale(1.05);
  box-shadow: 0 0 0 6px #fff, 8px 8px 0px #000;
}

.dimmed {
  opacity: 0.4;
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.3);
}

.answer-letter {
  background: rgba(255, 255, 255, 0.25);
  padding: 10px 20px;
  border-radius: 16px;
}

/* Confetti */
.confetti {
  position: absolute;
  top: -10px;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  to {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Award Ceremony */
.award-place-card {
  background: #fff;
  border: 5px solid #000;
  border-radius: 20px;
  padding: 40px 60px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 10px 10px 0 #000;
  animation: awardSlam 0.6s cubic-bezier(0.17, 0.67, 0.41, 1.3) forwards;
  max-width: 600px;
  width: 100%;
}

.award-winner-card {
  background: linear-gradient(135deg, #fff9e6 0%, #fff 60%);
  transform-origin: center bottom;
}

@keyframes awardSlam {
  0% { transform: translateY(-300px) scale(0.4) rotate(-5deg); opacity: 0; }
  60% { transform: translateY(20px) scale(1.06) rotate(1deg); opacity: 1; }
  80% { transform: translateY(-8px) scale(0.98) rotate(0deg); }
  100% { transform: translateY(0) scale(1) rotate(0deg); opacity: 1; }
}

/* Award Ceremony */
.award-place-card {
  background: #fff;
  border: 5px solid #000;
  border-radius: 20px;
  padding: 40px 60px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 10px 10px 0 #000;
  animation: awardSlam 0.6s cubic-bezier(0.17, 0.67, 0.41, 1.3) forwards;
  max-width: 600px;
  width: 100%;
}

.award-winner-card {
  background: linear-gradient(135deg, #fff9e6 0%, #fff 60%);
  transform-origin: center bottom;
}

@keyframes awardSlam {
  0% { transform: translateY(-300px) scale(0.4) rotate(-5deg); opacity: 0; }
  60% { transform: translateY(20px) scale(1.06) rotate(1deg); opacity: 1; }
  80% { transform: translateY(-8px) scale(0.98) rotate(0deg); }
  100% { transform: translateY(0) scale(1) rotate(0deg); opacity: 1; }
}

/* Animations */
@keyframes float {
  0% {
    transform: translate(-50%, 0px);
  }

  50% {
    transform: translate(-50%, -15px);
  }

  100% {
    transform: translate(-50%, 0px);
  }
}

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

  80% {
    transform: scale(1.1);
    opacity: 1;
  }

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

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

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

@keyframes slideInRight {
  from {
    transform: translateX(50px);
    opacity: 0;
  }

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

@keyframes wordcloudPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(0.55);
  }

  68% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(1.08);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(1);
  }
}

@keyframes chipIn {
  0% {
    opacity: 0;
    transform: scale(0.65) translateY(10px);
  }

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

@keyframes waitingBlink {
  0%,
  100% {
    opacity: 0.25;
  }

  50% {
    opacity: 1;
  }
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
}

/* ---------------------------------
   EDITOR – Spotify Search Results
----------------------------------- */
.spotify-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 15px;
  margin: 6px 0;
  border: 3px solid #000;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  box-shadow: 3px 3px 0px #000;
  transition: all 0.15s;
  color: var(--clay-color-dark);
  font: inherit;
  text-align: left;
}

.spotify-result-item:hover {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #000;
  background: #f0f0f0;
}

.spotify-result-img {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid #000;
  flex-shrink: 0;
}

.spotify-result-info {
  flex: 1;
  min-width: 0;
}

.spotify-result-name {
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotify-result-artist {
  display: block;
  font-size: 0.85rem;
  color: #888;
  font-weight: 600;
}

/* ---------------------------------
   EDITOR – Music Grid Pairs
----------------------------------- */
.music-grid-helper {
  margin: 8px 0 14px;
  font-weight: 800;
  color: rgba(31, 41, 55, 0.72);
}

.music-grid-pairs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 15px;
}

.music-grid-pair {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 92px;
  padding: 12px;
  border: 3px solid #000;
  border-radius: 16px;
  background: #fff;
  box-shadow: 4px 4px 0 #000;
}

.pair-number {
  position: absolute;
  top: 8px;
  right: 10px;
  font-weight: 900;
  font-size: 0.85rem;
  color: rgba(31, 41, 55, 0.45);
  line-height: 1;
}

.emoji-picker-btn {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #000;
  border-radius: 12px;
  background: #fceea7;
  cursor: pointer;
  box-shadow: 3px 3px 0px #000;
  transition: all 0.15s;
  flex-shrink: 0;
}

.emoji-picker-btn:hover,
.emoji-picker-btn:focus-visible {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #000;
}

.emoji-picker-btn.is-empty {
  background: #fff7d6;
}

.emoji-placeholder {
  color: rgba(31, 41, 55, 0.48);
  font-weight: 900;
}

.song-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.song-picked {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.song-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.song-artist {
  color: rgba(31, 41, 55, 0.62);
  font-size: 0.85rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-search-btn {
  width: 100%;
  min-height: 48px;
  padding: 8px 14px;
  border: 3px solid #000;
  border-radius: 12px;
  background: var(--clay-color-accent);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 3px 3px 0px #000;
  transition: all 0.15s;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
}

.song-search-btn:hover,
.song-search-btn:focus-visible {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #000;
}

.song-search-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 0.8rem;
  line-height: 1;
}

.song-remove-btn {
  background: var(--clay-color-primary);
  color: #fff;
  border: 3px solid #000;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0px #000;
  flex-shrink: 0;
}

.song-remove-btn:hover,
.song-remove-btn:focus-visible {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 #000;
}

/* ---------------------------------
   EDITOR – Emoji Picker Popup
----------------------------------- */
.emoji-picker-popup {
  position: fixed;
  background: #fff;
  border: 4px solid #000;
  border-radius: 18px;
  box-shadow: 8px 8px 0px #000;
  max-height: min(430px, calc(100vh - 24px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 2500;
}

.emoji-picker-search-wrap {
  padding: 12px;
  border-bottom: 3px solid #eee;
}

.emoji-picker-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 3px solid #000;
  border-radius: 12px;
  background: #fff7d6;
  box-shadow: 3px 3px 0 #000;
  padding: 0 12px;
}

.emoji-picker-search {
  width: 100%;
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  font-size: 1rem;
  outline: none;
  font-weight: 800;
}

.emoji-picker-meta {
  margin-top: 9px;
  color: rgba(31, 41, 55, 0.62);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.emoji-picker-tabs {
  display: flex;
  gap: 4px;
  padding: 6px 10px;
  border-bottom: 3px solid #eee;
  overflow-x: auto;
  flex-shrink: 0;
}

.emoji-tab {
  font-size: 1.2rem;
  min-width: 42px;
  min-height: 42px;
  padding: 4px 8px;
  border: 2px solid #000;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: 0.15s;
  box-shadow: 2px 2px 0 #000;
}

.emoji-tab.active {
  background: var(--clay-color-warning);
  border-color: #000;
}

.emoji-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  gap: 4px;
  padding: 10px;
  overflow-y: auto;
  flex: 1;
}

.emoji-grid-cell {
  position: relative;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.emoji-grid-item {
  position: relative;
  font-size: 1.6rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 8px;
  transition: 0.1s;
}

.emoji-grid-cell.has-variants .emoji-grid-item::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clay-color-accent);
  border: 1px solid #000;
}

.emoji-grid-item:hover,
.emoji-grid-item:focus-visible {
  background: #f0f0f0;
  transform: scale(1.2);
}

.emoji-variant-popover {
  position: fixed;
  z-index: 2600;
  display: none;
  grid-template-columns: repeat(5, 36px);
  gap: 4px;
  padding: 6px;
  border: 3px solid #000;
  border-radius: 12px;
  background: #fff;
  box-shadow: 5px 5px 0 #000;
}

.emoji-variant-popover.is-open {
  display: grid;
}

.emoji-variant-item {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 1.45rem;
}

.emoji-variant-item:hover,
.emoji-variant-item:focus-visible {
  background: #f0f0f0;
  transform: scale(1.1);
}

.emoji-empty-state {
  grid-column: 1 / -1;
  padding: 22px;
  text-align: center;
  color: rgba(31, 41, 55, 0.58);
  font-weight: 800;
}

/* ---------------------------------
   EDITOR – SongTimeline Track List
----------------------------------- */
.songtimeline-import-panel {
  margin: 16px 0 14px;
  padding: 16px;
  border: 4px solid #000;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fffb 0%, #fff 100%);
  box-shadow: 5px 5px 0 #000;
}

.songtimeline-import-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.songtimeline-import-kicker {
  margin: 0;
  color: var(--clay-color-dark);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.songtimeline-import-copy {
  margin: 4px 0 0;
  max-width: 52ch;
  color: #4b5563;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
}

.spotify-account-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 220px;
}

.spotify-account-label {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 2px solid #000;
  border-radius: 999px;
  background: #fff;
  color: #4b5563;
  box-shadow: 2px 2px 0 #000;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
}

.spotify-account-label.is-connected {
  background: #d1fae5;
  color: #065f46;
}

.spotify-action-btn,
.spotify-load-btn {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 0.82rem;
  box-shadow: 4px 4px 0 #000;
}

.songtimeline-inline-alert,
.songtimeline-playlist-status {
  border: 3px solid #000;
  border-radius: 12px;
  padding: 9px 11px;
  background: #fff1f2;
  color: #9f1239;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.3;
}

.songtimeline-import-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.88fr) minmax(0, 1.35fr);
  gap: 12px;
  align-items: start;
}

.songtimeline-import-settings {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 3px solid #000;
  border-radius: 14px;
  background: #fff7d6;
}

.songtimeline-import-settings p {
  margin: 0;
  color: #4b5563;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.25;
}

.songtimeline-import-source {
  min-width: 0;
  padding: 12px;
  border: 3px solid #000;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.songtimeline-source-label,
.songtimeline-field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--clay-color-dark);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
}

.songtimeline-playlist-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.songtimeline-playlist-form .clay-input {
  margin: 0;
  min-height: 48px;
  padding: 11px 13px;
  border-width: 3px;
  border-radius: 12px;
  font-size: 0.98rem;
  box-shadow: 3px 3px 0 #000;
}

.songtimeline-count-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 0 0 120px;
  color: var(--clay-color-dark);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.songtimeline-count-field .clay-input {
  width: 100%;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.songtimeline-import-submit {
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  white-space: nowrap;
}

.spotify-playlist-list {
  margin-top: 10px;
}

.spotify-playlist-list.is-loading,
.spotify-playlist-list.is-empty,
.spotify-playlist-list.is-error {
  padding: 10px 12px;
  border: 3px dashed #000;
  border-radius: 12px;
  background: #fff;
  color: #4b5563;
  font-size: 0.86rem;
  font-weight: 800;
}

.spotify-playlist-list.is-error {
  border-style: solid;
  background: #fff1f2;
  color: #9f1239;
}

.spotify-playlist-scroll {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 238px;
  overflow-y: auto;
  padding: 7px;
  border: 3px solid #000;
  border-radius: 12px;
  background: #fff;
}

.spotify-playlist-row {
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--clay-color-dark);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 0.15s, transform 0.15s;
}

.spotify-playlist-row:active {
  transform: translateY(1px);
}

.spotify-playlist-cover {
  width: 44px;
  height: 44px;
  border: 2px solid #000;
  border-radius: 8px;
  background: #e5e7eb;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  object-fit: cover;
  overflow: hidden;
}

.spotify-playlist-title {
  font-size: 0.94rem;
  font-weight: 900;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spotify-playlist-meta {
  margin-top: 3px;
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.spotify-playlist-import-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #000;
  border-radius: 50%;
  background: #d1fae5;
  color: #065f46;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
}

.songtimeline-playlist-status {
  margin-top: 12px;
  display: block;
}

.songtimeline-playlist-status.is-loading {
  background: #eff6ff;
  color: #1d4ed8;
}

.songtimeline-playlist-status.is-success {
  background: #d1fae5;
  color: #065f46;
}

.songtimeline-playlist-status.is-error {
  background: #fff1f2;
  color: #9f1239;
}

.songtimeline-track-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 15px;
  margin: 6px 0;
  border: 3px solid #000;
  border-radius: 14px;
  background: #fff;
  box-shadow: 3px 3px 0px #000;
}

.songtimeline-track-number {
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--clay-color-primary);
  min-width: 25px;
}

.songtimeline-track-info {
  flex: 1;
}

.songtimeline-track-name {
  font-weight: 700;
}

.songtimeline-track-artist {
  font-size: 0.85rem;
  color: #888;
}

.songtimeline-search-result,
.songtimeline-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 15px;
  margin: 6px 0;
  border: 3px solid #000;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  box-shadow: 3px 3px 0px #000;
  transition: all 0.15s;
}

.songtimeline-search-result:hover,
.songtimeline-search-item:hover {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #000;
  background: #f0f0f0;
}

.songtimeline-search-img {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid #000;
  flex-shrink: 0;
}

.songtimeline-search-img-placeholder {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  border: 2px solid #000;
  background: #333;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.songtimeline-search-info {
  flex: 1;
  min-width: 0;
}

.songtimeline-search-name {
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.songtimeline-search-artist {
  font-size: 0.85rem;
  color: #888;
  font-weight: 600;
}

.songtimeline-search-add {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--clay-color-success);
  flex-shrink: 0;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #000;
  border-radius: 50%;
  background: #d1fae5;
}

.songtimeline-track-year {
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--clay-color-primary);
  min-width: 45px;
  text-align: center;
}

.songtimeline-track-remove {
  background: var(--clay-color-primary);
  color: #fff;
  border: 3px solid #000;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0px #000;
  flex-shrink: 0;
  transition: all 0.15s;
}

.songtimeline-track-remove:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px #000;
}

.songtimeline-track-count {
  font-weight: 700;
  font-size: 0.95rem;
  color: #666;
  padding: 8px 0;
  text-align: center;
}

.spotify-playlist-row:hover,
.spotify-playlist-row:focus-visible {
  background: #eefbf3;
  outline: none;
}

.spotify-playlist-row:focus-visible {
  outline: 3px solid #000;
  outline-offset: 2px;
}

@media (max-width: 780px) {
  .songtimeline-import-head,
  .spotify-account-status {
    align-items: stretch;
  }

  .songtimeline-import-head {
    flex-direction: column;
  }

  .spotify-account-status {
    justify-content: flex-start;
  }

  .songtimeline-import-grid,
  .songtimeline-import-settings,
  .songtimeline-playlist-form {
    grid-template-columns: 1fr;
  }

  .songtimeline-import-settings {
    align-items: stretch;
    flex-direction: column;
  }

  .songtimeline-count-field {
    flex-basis: auto;
  }

  .songtimeline-import-submit,
  .spotify-load-btn {
    width: 100%;
  }
}

@keyframes spotify-label-fadeout {
  0%   { opacity: 1; transform: translateY(0); }
  70%  { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-4px); }
}

.spotify-label-fadeout {
  animation: spotify-label-fadeout 2.2s ease forwards;
  pointer-events: none;
}

/* ---------------------------------
   BARCHART + GEOPIN
----------------------------------- */
.host-section.wordcloud-mode {
  justify-content: flex-start;
  align-items: center;
  padding: clamp(18px, 2.2vw, 36px) clamp(18px, 3.4vw, 54px) 130px;
  overflow: hidden;
}

#revealSection.wordcloud-mode {
  justify-content: center;
  gap: clamp(14px, 1.6vw, 24px);
  padding: clamp(18px, 2.2vw, 36px) clamp(18px, 3.4vw, 54px);
}

.host-section.wordcloud-mode #questionCounter,
.host-section.wordcloud-mode .clay-timer-track,
.host-section.wordcloud-mode #questionTimer {
  display: none !important;
}

.host-section.wordcloud-mode .host-card {
  width: min(90vw, 1680px) !important;
  max-width: none !important;
  border-radius: 24px;
  padding: clamp(22px, 2.6vw, 42px);
  margin-top: 6px;
  margin-bottom: 22px;
}

#questionSection.wordcloud-mode .host-card {
  flex: 0 0 auto;
}

#revealSection.wordcloud-mode .host-card {
  flex: 0 1 auto;
  margin: 0 auto;
}

.host-section.wordcloud-mode #questionDisplayText {
  margin: 0 !important;
  color: var(--clay-color-dark) !important;
  font-size: clamp(2rem, 3.2vw, 4.6rem) !important;
  line-height: 1.05;
}

.host-section.wordcloud-mode #hostAnswersGrid {
  margin-top: 0 !important;
  justify-items: center;
  align-items: stretch;
}

#questionSection.wordcloud-mode #hostAnswersGrid {
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  width: min(90vw, 1680px) !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

#revealSection.wordcloud-mode #revealAnswersGrid {
  width: 100% !important;
  max-width: none !important;
  margin: 0 auto !important;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-items: stretch;
}

.host-wordcloud-container {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: clamp(440px, calc(100dvh - 280px), 820px);
  min-height: 0;
  overflow: hidden;
  border: 4px solid #000;
  border-radius: 22px;
  box-shadow: 7px 7px 0 #000;
  background-color: var(--game-bg);
  background-image:
    radial-gradient(#000 1.25px, transparent 1.25px),
    linear-gradient(rgba(0, 0, 0, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.08) 1px, transparent 1px);
  background-size: 22px 22px, 44px 44px, 44px 44px;
  background-position: 0 0, 0 0, 0 0;
}

#revealSection.wordcloud-mode .host-wordcloud-container {
  height: clamp(440px, 64dvh, 760px);
}

.host-wordcloud-container.is-packed {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 0.95vw, 18px) clamp(10px, 1.25vw, 22px);
  padding: clamp(18px, 2.4vw, 42px);
}

.host-wordcloud-container::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(255, 214, 231, 0.45) 100%);
}

.wordcloud-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(31, 41, 55, 0.38);
  font-size: clamp(1.4rem, 2vw, 2.1rem);
  font-weight: 900;
  font-style: italic;
  user-select: none;
}

.wordcloud-word {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  z-index: var(--z, 1);
  display: inline-block;
  max-width: 46%;
  color: var(--word-color, var(--clay-color-primary));
  font-family: 'Lilita One', 'Fredoka', sans-serif;
  font-size: clamp(1.35rem, var(--word-size, 3rem), 7.4rem);
  font-weight: 400;
  line-height: 0.92;
  white-space: nowrap;
  text-align: center;
  text-shadow: 2px 2px 0 #000;
  transform: translate(-50%, -50%) rotate(var(--r, 0deg));
  animation: wordcloudPop 0.42s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
  animation-delay: var(--delay, 0ms);
  transform-origin: center;
  user-select: none;
}

.host-wordcloud-container.is-packed .wordcloud-word {
  position: relative;
  left: auto;
  top: auto;
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(100%, 42vw, 560px);
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.02;
  transform: none;
  animation-name: wordcloudPackedPop;
}

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

  68% {
    opacity: 1;
    transform: scale(1.04);
  }

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

.wc-join-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  align-self: start;
}

.wc-join-cta,
.wc-join-code,
.wc-join-qr-card {
  border: 4px solid #000;
  box-shadow: 6px 6px 0 #000;
}

.wc-join-cta {
  background: #000;
  color: #fff;
  border-radius: 18px;
  padding: 18px 16px;
  font-size: clamp(1rem, 1.3vw, 1.5rem);
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  line-height: 1.1;
}

.wc-join-qr-card {
  background: #fff;
  border-radius: 22px;
  padding: 22px;
}

.wc-join-qr-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.wc-join-code {
  width: 100%;
  background: var(--clay-color-warning);
  color: #000;
  border-radius: 16px;
  padding: 14px 12px;
  font-size: clamp(1.5rem, 2vw, 2.4rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-align: center;
}

.host-section.wordcloud-mode #answerCountDisplay {
  position: absolute;
  left: clamp(24px, 4vw, 58px);
  bottom: 44px;
  margin: 0 !important;
  color: var(--clay-color-dark) !important;
  font-size: clamp(1.15rem, 1.6vw, 2rem) !important;
  line-height: 1.1;
}

.host-section.wordcloud-mode #answerCountDisplay::first-letter {
  font-size: 1.8em;
}

.host-section.wordcloud-mode #wordcloudRevealBtn {
  position: absolute;
  left: 50%;
  bottom: 42px;
  transform: translateX(-50%);
  margin: 0 !important;
  min-width: min(430px, 40vw);
  border-radius: 18px !important;
  box-shadow: 8px 8px 0 #000;
}

.host-section.wordcloud-mode #wordcloudRevealBtn:active {
  transform: translate(calc(-50% + 6px), 6px);
}

.host-section.wordcloud-mode #skipQuestionBtn {
  position: absolute;
  right: clamp(24px, 4vw, 58px);
  bottom: 48px;
  margin: 0 !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 5px 5px 0 #000;
  opacity: 0.9 !important;
}

@media (max-width: 980px) {
  .host-section.wordcloud-mode {
    padding-bottom: 230px;
  }

  .host-section.wordcloud-mode #hostAnswersGrid {
    grid-template-columns: 1fr !important;
  }

  .wc-join-panel {
    display: grid;
    grid-template-columns: 1fr minmax(120px, 160px) 1fr;
    align-items: stretch;
  }

  .host-section.wordcloud-mode #answerCountDisplay,
  .host-section.wordcloud-mode #wordcloudRevealBtn,
  .host-section.wordcloud-mode #skipQuestionBtn {
    position: static;
    transform: none;
    margin-top: 16px !important;
  }
}

.host-barchart-container {
  width: min(100%, 1100px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ── Säulendiagramm (vertical column chart) ── */
.host-columnchart {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  min-height: 340px;
  padding: 20px 20px 0;
}

.host-columnchart-yaxis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 72px;
  min-width: 40px;
  text-align: right;
  padding-right: 12px;
}

.host-columnchart-ylabel {
  font-size: 1rem;
  font-weight: 900;
  color: #555;
  line-height: 1;
}

.host-columnchart-bars {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  border-left: 4px solid #000;
  border-bottom: 4px solid #000;
  padding: 16px 16px 0;
  background: repeating-linear-gradient(
    transparent,
    transparent calc(20% - 1px),
    rgba(0,0,0,0.06) calc(20% - 1px),
    rgba(0,0,0,0.06) 20%
  );
  position: relative;
}

.host-columnchart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.host-columnchart-bar-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  height: clamp(220px, 34vh, 430px);
  min-height: 0;
}

.host-columnchart-count {
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  font-weight: 900;
  color: #111;
  margin-bottom: 6px;
  min-height: 1.5em;
}

.host-columnchart-bar {
  width: 80%;
  min-height: 4px;
  border: 4px solid;
  border-radius: 10px 10px 0 0;
  box-shadow: 4px 0 0 rgba(0,0,0,0.18);
  transition: height 0.35s ease-out;
}

.host-columnchart-label {
  width: 100%;
  padding: 10px 4px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  border-top: 4px solid #000;
  margin-top: 0;
}

.host-columnchart-letter {
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
  border: 3px solid #000;
  border-radius: 8px;
  padding: 2px 10px;
  -webkit-text-stroke: 0.5px #000;
}

.host-columnchart-optlabel {
  font-size: clamp(0.75rem, 1.4vw, 1.1rem);
  font-weight: 700;
  color: #111;
  text-align: center;
  word-break: break-word;
  max-width: 100%;
}

.geopin-editor-card {
  background: #e0f2fe;
  border: 4px solid #000;
  border-radius: 18px;
  box-shadow: 7px 7px 0 #000;
  padding: 20px;
}

.geopin-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.geopin-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-weight: 900;
  color: #111;
}

.geopin-field span {
  font-size: 0.78rem;
  text-transform: uppercase;
}

.geopin-status {
  background: #fff;
  border: 3px solid #000;
  border-radius: 12px;
  box-shadow: 3px 3px 0 #000;
  padding: 10px 12px;
  color: #333;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.geopin-player-section {
  gap: 10px;
  padding: 12px;
  overscroll-behavior: contain;
}

.geopin-player-toolbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
  border: 4px solid #000;
  border-radius: 12px;
  box-shadow: 5px 5px 0 #000;
  padding: 10px 12px;
}

.geopin-player-kicker {
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--clay-color-primary);
}

.geopin-player-target {
  font-size: 1.05rem;
  font-weight: 900;
  color: #111;
  line-height: 1.15;
}

.geopin-zoom-controls {
  display: flex;
  gap: 8px;
}

.geopin-map-btn {
  width: 48px;
  height: 48px;
  border: 4px solid #000;
  border-radius: 10px;
  background: #fff;
  box-shadow: 3px 3px 0 #000;
  font-size: 1.6rem;
  font-weight: 900;
  cursor: pointer;
}

.geopin-map {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 340px;
  max-height: 68vh;
  overflow: hidden;
  border: 5px solid #000;
  border-radius: 14px;
  box-shadow: 6px 6px 0 #000;
  background: #cfe8ff;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
  background-size: 32px 32px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.geopin-map:focus-visible {
  outline: 4px solid var(--clay-color-accent);
  outline-offset: 4px;
}

.geopin-map.is-dragging {
  cursor: grabbing;
}

.geopin-tile-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.geopin-tile {
  position: absolute;
  width: 256px;
  height: 256px;
  max-width: none;
  pointer-events: none;
  user-select: none;
  transition: opacity 160ms ease-out;
  background: rgba(255, 255, 255, 0.45);
}

.geopin-tile.is-loading {
  opacity: 0.45;
}

.geopin-tile.is-error {
  opacity: 0;
}

.geopin-pin {
  position: absolute;
  width: 34px;
  height: 34px;
  margin-left: -17px;
  margin-top: -34px;
  background: var(--clay-color-primary);
  border: 4px solid #000;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
  z-index: 5;
}

.geopin-pin::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  left: 8px;
  top: 8px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #000;
}

.geopin-attribution {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 6;
  background: rgba(255, 255, 255, 0.86);
  border: 2px solid #000;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #111;
}

.geopin-selection-label {
  width: 100%;
  background: #fff;
  border: 3px solid #000;
  border-radius: 10px;
  box-shadow: 3px 3px 0 #000;
  padding: 10px 12px;
  text-align: center;
  font-weight: 900;
  color: #222;
}

.geopin-reveal {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) 1.4fr;
  gap: 24px;
  align-items: start;
  width: 100%;
}

.geopin-reveal-target,
.geopin-reveal-row {
  background: #fff;
  border: 4px solid #000;
  border-radius: 14px;
  box-shadow: 5px 5px 0 #000;
}

.geopin-reveal-target {
  padding: 22px;
  text-align: left;
}

.geopin-reveal-kicker {
  color: var(--clay-color-primary);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.geopin-reveal-title {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 900;
  color: #111;
  margin: 8px 0;
}

.geopin-reveal-coords {
  color: #555;
  font-weight: 700;
}

.geopin-reveal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.geopin-reveal-row {
  display: grid;
  grid-template-columns: 70px 1fr 150px 150px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  font-weight: 900;
}

.geopin-place {
  color: var(--clay-color-primary);
}

.geopin-distance,
.geopin-score {
  text-align: right;
}

@media (max-width: 760px) {
  .host-barchart-row,
  .geopin-editor-grid,
  .geopin-reveal,
  .geopin-reveal-row {
    grid-template-columns: 1fr;
  }

  .geopin-distance,
  .geopin-score {
    text-align: left;
  }
}

/* ---------------------------------
   EDITOR – Sidebar Active Card
----------------------------------- */
.editor-sidebar-clay .clay-card.active,
.thumb-card.active {
  border-color: var(--clay-color-primary);
  background: #fff0f0;
}

/* ---------------------------------
   EDITOR – Music Grid Search Modal
----------------------------------- */
.music-grid-search-overlay,
.music-grid-search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.music-grid-search-panel {
  background: #fff;
  border: 4px solid #000;
  border-radius: 24px;
  box-shadow: 12px 12px 0px #000;
  padding: 24px;
  width: 90%;
  max-width: 560px;
  max-height: 80vh;
  overflow-y: auto;
}

.music-grid-search-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.music-grid-search-kicker {
  margin: 0 0 3px;
  color: rgba(31, 41, 55, 0.58);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.music-grid-search-head h3 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 900;
}

.music-grid-modal-close {
  width: 44px;
  height: 44px;
  border: 3px solid #000;
  border-radius: 12px;
  background: var(--clay-color-primary);
  color: #fff;
  box-shadow: 3px 3px 0 #000;
  cursor: pointer;
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1;
}

.music-grid-modal-close:hover,
.music-grid-modal-close:focus-visible {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #000;
}

.music-grid-search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  border: 4px solid #000;
  border-radius: 16px;
  background: #fceea7;
  box-shadow: 5px 5px 0 #000;
  padding: 0 16px;
}

.music-grid-search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--clay-color-dark);
  font-size: 1.05rem;
  font-weight: 900;
}

.music-grid-results {
  margin-top: 16px;
}

.music-grid-empty-state,
.music-grid-loading,
.music-grid-search-error {
  padding: 16px;
  border: 3px dashed rgba(0, 0, 0, 0.28);
  border-radius: 14px;
  color: rgba(31, 41, 55, 0.68);
  font-weight: 800;
  text-align: center;
}

.music-grid-search-error {
  color: #e21b3c;
  border-color: #e21b3c;
}

.spotify-result-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fceea7;
  font-size: 1.5rem;
  font-weight: 900;
}

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

@media (max-width: 640px) {
  .music-grid-pairs {
    grid-template-columns: 1fr;
  }

  .music-grid-search-panel {
    width: calc(100vw - 24px);
    padding: 18px;
  }
}

/* ---------------------------------
   EDITOR – Text Answer Rows
----------------------------------- */
.text-answer-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.text-answer-field {
  flex: 1;
  border: 4px solid #000;
  background-color: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 1.1rem;
  box-shadow: 3px 3px 0px #000;
  color: var(--clay-color-dark);
  outline: none;
  font-weight: 600;
  transition: all 0.2s;
}

.text-answer-field:focus {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #000;
}

.text-answer-remove {
  background: var(--clay-color-primary);
  color: #fff;
  border: 3px solid #000;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0px #000;
  flex-shrink: 0;
  transition: all 0.15s;
}

.text-answer-remove:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px #000;
}

/* ---------------------------------
   EDITOR – Order Items
----------------------------------- */
.order-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.order-number {
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--clay-color-accent);
  min-width: 30px;
  text-align: center;
}

.order-item-input {
  flex: 1;
  border: 4px solid #000;
  background-color: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 1.1rem;
  box-shadow: 3px 3px 0px #000;
  color: var(--clay-color-dark);
  outline: none;
  font-weight: 600;
  transition: all 0.2s;
}

.order-item-input:focus {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #000;
}

.order-remove-btn {
  background: var(--clay-color-primary);
  color: #fff;
  border: 3px solid #000;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0px #000;
  flex-shrink: 0;
  transition: all 0.15s;
}

.order-remove-btn:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px #000;
}

.order-axis-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 16px;
}

.order-axis-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--clay-color-dark);
  text-transform: uppercase;
}

.order-axis-field .clay-input {
  width: 100%;
  font-size: 1rem;
}

@media (max-width: 640px) {
  .order-axis-editor {
    grid-template-columns: 1fr;
  }

  .order-axis-label {
    font-size: 0.9rem;
  }
}

/* ---------------------------------
   EDITOR – Text Answer Rows
----------------------------------- */
.text-answer-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.text-answer-field {
  flex: 1;
  border: 4px solid #000;
  background-color: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 1.1rem;
  box-shadow: 3px 3px 0px #000;
  color: var(--clay-color-dark);
  outline: none;
  font-weight: 600;
  transition: all 0.2s;
}

.text-answer-field:focus {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #000;
}

.text-answer-remove {
  background: var(--clay-color-primary);
  color: #fff;
  border: 3px solid #000;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0px #000;
  flex-shrink: 0;
  transition: all 0.15s;
}

.text-answer-remove:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px #000;
}

/* ---------------------------------
   EDITOR – Order Items
----------------------------------- */
.order-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.order-number {
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--clay-color-accent);
  min-width: 30px;
  text-align: center;
}

.order-item-input {
  flex: 1;
  border: 4px solid #000;
  background-color: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 1.1rem;
  box-shadow: 3px 3px 0px #000;
  color: var(--clay-color-dark);
  outline: none;
  font-weight: 600;
  transition: all 0.2s;
}

.order-item-input:focus {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #000;
}

.order-remove-btn {
  background: var(--clay-color-primary);
  color: #fff;
  border: 3px solid #000;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0px #000;
  flex-shrink: 0;
  transition: all 0.15s;
}

.order-remove-btn:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px #000;
}

/* Correct toggle in MC editor */
.correct-toggle {
  transition: all 0.15s;
}

.correct-toggle.selected {
  background: var(--clay-color-success) !important;
  color: white;
  transform: scale(1.1);
}

/* ---------------------------------
   TUTORIAL MODAL & ANIMATIONS
----------------------------------- */
.tutorial-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.tutorial-modal {
  width: 100%;
  max-width: 750px;
  background: #fff;
  text-align: center;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tutorial-modal.hiding {
  animation: popOut 0.3s forwards;
}

.tutorial-anim-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  justify-content: flex-start;
  background: #f0f0f0;
  border-radius: 16px;
  border: 4px solid #000;
  padding: 15px;
  height: auto;
  min-height: 250px;
  overflow: hidden;
  position: relative;
}

/* Split Screen Layout & Captions */
.anim-split {
  display: flex;
  gap: 15px;
  flex: 1;
}

.tutorial-captions {
  position: relative;
  text-align: center;
  font-weight: 800;
  color: #111;
  font-size: 1.02rem;
  background: #fff;
  border: 3px solid #000;
  padding: 9px 18px;
  border-radius: 999px;
  box-shadow: 3px 3px 0px #000;
  min-height: 22px;
  margin: 0 auto 4px;
  max-width: fit-content;
  letter-spacing: 0.2px;
}
.tutorial-captions::after {
  content: "1. Host startet Song ▶️";
  animation: mgCaptionText 30s infinite;
}

.anim-screen {
  flex: 1;
  border: 4px solid #000;
  background: #fff;
  border-radius: 10px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.anim-screen-host {
  background: #bbf7d0; /* Match game-bg */
}

.anim-screen-player {
  background: #ffec99; /* A distinct phone color */
  border-radius: 20px; /* More phone-like curvature */
}

.anim-title-bar {
  background: #000;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 0;
  text-transform: uppercase;
}

/* MUSIC GRID SPECIFIC ANIMATION ELEMENTS */
/* Host Elements */
.mg-host-playbtn {
  margin: 5px auto;
  border: 3px solid #000;
  border-radius: 50%;
  width: 45px; height: 45px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 2px 2px 0px #000;
  position: relative;
  background: #1DB954;
}
.mg-host-playbtn svg {
  width: 24px;  height: 24px;
  fill: white;  position: absolute;
}
.icon-play { animation: mgIconPlay 30s infinite; }
.icon-pause { animation: mgIconPause 30s infinite; }

#host-curs {
  top: 20px; left: 20px;
  right: auto; bottom: auto;
  animation: mgHostCurs 30s infinite;
}

/* Game Timer Bar inside Host Screen */
.mg-game-timer-container {
  width: 80%; height: 6px;
  background: white; border: 2px solid #000; border-radius: 4px;
  margin: 5px auto; overflow: hidden;
}
.mg-game-timer-fill {
  height: 100%; width: 100%; background: #10b981;
  animation: mgTimerFillAnim 30s linear infinite;
}
@keyframes mgTimerFillAnim {
  /* Round 1 (0%-32.6%): drain continuously from song start until reveal at 26.3% */
  0%, 5.2% { width: 100%; background: #10b981; }
  5.3% { width: 100%; background: #10b981; }
  20% { width: 50%; background: #10b981; }
  24% { width: 25%; background: #f59e0b; }
  26.3%, 32.6% { width: 18%; background: #3b82f6; } /* freeze on reveal */

  /* Round 2 (32.7%-66%): reveal at 55.3% */
  32.7%, 38.5% { width: 100%; background: #10b981; }
  38.6% { width: 100%; background: #10b981; }
  48% { width: 55%; background: #10b981; }
  53% { width: 25%; background: #f59e0b; }
  55.3%, 66% { width: 18%; background: #3b82f6; }

  /* Round 3 (66.1%-100%): reveal at 88% */
  66.1%, 71.9% { width: 100%; background: #10b981; }
  72% { width: 100%; background: #10b981; }
  82% { width: 45%; background: #10b981; }
  86% { width: 25%; background: #f59e0b; }
  88%, 98.3% { width: 18%; background: #3b82f6; }

  98.4%, 100% { width: 100%; background: #10b981; }
}

.mg-host-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 5px;
  padding: 10px;
  flex: 1;
}

.mg-host-cell {
  background: #fff;
  border: 3px solid #000;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* Player Elements */
.mg-player-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 8px;
  padding: 20px 10px;
  flex: 1;
}

.mg-player-btn {
  background: #fff;
  border: 3px solid #000;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 2px 2px 0px #000;
  transform-origin: center;
  position: relative; /* For cursor positioning */
}

/* Simulated Cursor/Hand */
.mg-cursor {
  position: absolute;
  right: -5px;
  bottom: -20px;
  z-index: 10;
  opacity: 0;
}
.svg-cursor {
  width: 25px;
  height: 25px;
  filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.5));
}
.tutorial-progress-container {
  width: 100%;
  height: 12px;
  background: #e5e7eb;
  border-radius: 6px;
  border: 3px solid #000;
  overflow: hidden;
  margin-top: 10px;
  cursor: pointer;
}
.tutorial-progress-bar {
  height: 100%;
  background: var(--clay-color-accent);
  width: 0%;
  animation: mgProgressLoop 30s linear infinite;
}
@keyframes mgProgressLoop {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* Points Popup / Score Hint */
.mg-pts {
  position: absolute;
  top: -20px;
  font-size: 1.4rem;
  font-weight: 900;
  color: #10b981;
  text-shadow: 2px 2px 0px #000, -1px -1px 0 #fff, 1px -1px 0 #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 20;
}

/* KEYFRAMES FOR MUSIC GRID ANIMATION LOOP (Total 30s, 3 Rounds) */
@keyframes mgCaptionText {
  0%, 8% { content: "1. Host startet den Song"; }
  8.1%, 19% { content: "Spieler hoeren & ueberlegen..."; }
  19.1%, 24% { content: "2. Spieler tippt das passende Symbol!"; }
  24.1%, 33.2% { content: "3. Richtig = 810 Punkte!"; }
  33.3%, 41% { content: "Runde 2: Naechster Song startet"; }
  41.1%, 50% { content: "Spieler hoeren & ueberlegen..."; }
  50.1%, 55% { content: "Spieler tippt schnell!"; }
  55.1%, 66.5% { content: "Superschnell = 930 Punkte!"; }
  66.6%, 81% { content: "Runde 3: Naechster Song"; }
  81.1%, 87.9% { content: "Spieler tippt diesmal falsch..."; }
  88%, 100% { content: "Falsches Symbol = 0 Punkte!"; }
}

@keyframes mgIconPlay {
  0%, 5.2%, 32.7%, 38.5%, 66.1%, 71.9%, 98.1%, 100% { opacity: 1; }
  5.3%, 32.6%, 38.6%, 66%, 72%, 98% { opacity: 0; }
}

@keyframes mgIconPause {
  0%, 5.2%, 32.7%, 38.5%, 66.1%, 71.9%, 98.1%, 100% { opacity: 0; }
  5.3%, 32.6%, 38.6%, 66%, 72%, 98% { opacity: 1; }
}

@keyframes mgHostCurs {
  0%, 1.5%, 9.3%, 34.8%, 42.6%, 68.2%, 76%, 100% { transform: translate(20px, 20px); opacity: 0; }
  
  2.5%, 8.3% { transform: translate(0, 0); opacity: 1; }
  5.3%, 6.5% { transform: translate(0, 0) scale(0.8); opacity: 1; }
  
  35.8%, 41.6% { transform: translate(0, 0); opacity: 1; }
  38.6%, 39.8% { transform: translate(0, 0) scale(0.8); opacity: 1; }
  
  69.2%, 75% { transform: translate(0, 0); opacity: 1; }
  72%, 73.2% { transform: translate(0, 0) scale(0.8); opacity: 1; }
}

@keyframes mgRoundText {
  0%, 33.2% { content: " (Runde 1/3)"; color: #ccc; }
  33.3%, 66.5% { content: " (Runde 2/3)"; color: #ccc; }
  66.6%, 100% { content: " (Runde 3/3)"; color: #ccc; }
}
.round-indicator::after {
  content: " (Runde 1/3)";
  animation: mgRoundText 30s infinite;
}

/* PC-4 (Rocket) - Round 1 — pushed later so players can "listen" first */
@keyframes mgPC4 {
  0%, 22.6% { transform: scale(1); box-shadow: 2px 2px 0px #000; background: #fff; border-color: #000; color: #000; }
  23.6% { transform: scale(0.9) translate(2px, 2px); box-shadow: 0px 0px 0px #000; background: #ddd; border-color: #000; color: #000; }
  24.6%, 32.6% { transform: scale(1); box-shadow: 2px 2px 0px #000; background: #dbeafe; border-color: #3b82f6; color: #000; }
  32.7%, 100% { transform: scale(1); box-shadow: 2px 2px 0px #000; background: #e5e7eb; border-color: #aaa; color: #888; }
}

@keyframes mgHC4 {
  0%, 25.3% { background: #fff; border-color: #000; transform: scale(1); box-shadow: none; opacity: 1; }
  26.3%, 32.6% { background: #d1fae5; border-color: #10b981; transform: scale(1.1); box-shadow: 4px 4px 0px #10b981; opacity: 1; }
  32.7%, 100% { background: #e5e7eb; border-color: #999; transform: scale(1); box-shadow: none; opacity: 0.5; }
}

@keyframes mgCurs1 {
  0%, 22%, 25%, 100% { transform: translate(20px, 20px); opacity: 0; }
  22.8% { transform: translate(0, 0) scale(1); opacity: 1; }
  23.6% { transform: translate(0, 0) scale(0.8); opacity: 1; }
  24.4% { transform: translate(0, 0) scale(1); opacity: 1; }
}

@keyframes mgPts1 {
  0%, 25.3%, 32%, 100% { transform: translateY(10px); opacity: 0; }
  27.3%, 31.3% { transform: translateY(-30px); opacity: 1; }
}

/* PC-3 (Cat) - Round 2 — pushed later for listening time */
@keyframes mgPC3 {
  0%, 50.6% { transform: scale(1); box-shadow: 2px 2px 0px #000; background: #fff; border-color: #000; color: #000; }
  51.6% { transform: scale(0.9) translate(2px, 2px); box-shadow: 0px 0px 0px #000; background: #ddd; border-color: #000; color: #000; }
  52.6%, 66% { transform: scale(1); box-shadow: 2px 2px 0px #000; background: #dbeafe; border-color: #3b82f6; color: #000; }
  66.1%, 100% { transform: scale(1); box-shadow: 2px 2px 0px #000; background: #e5e7eb; border-color: #aaa; color: #888; }
}

@keyframes mgHC3 {
  0%, 54.3% { background: #fff; border-color: #000; transform: scale(1); box-shadow: none; opacity: 1; }
  55.3%, 66% { background: #d1fae5; border-color: #10b981; transform: scale(1.1); box-shadow: 4px 4px 0px #10b981; opacity: 1; }
  66.1%, 100% { background: #e5e7eb; border-color: #999; transform: scale(1); box-shadow: none; opacity: 0.5; }
}

@keyframes mgCurs2 {
  0%, 50%, 53%, 100% { transform: translate(20px, 20px); opacity: 0; }
  50.8% { transform: translate(0, 0) scale(1); opacity: 1; }
  51.6% { transform: translate(0, 0) scale(0.8); opacity: 1; }
  52.4% { transform: translate(0, 0) scale(1); opacity: 1; }
}

@keyframes mgPts2 {
  0%, 54.3%, 65%, 100% { transform: translateY(10px); opacity: 0; }
  56.3%, 64% { transform: translateY(-30px); opacity: 1; }
}

/* PC-6 (Apple) - Round 3 WRONG */
@keyframes mgPC6 {
  0%, 80.3% { transform: scale(1); box-shadow: 2px 2px 0px #000; background: #fff; border-color: #000; color: #000; }
  81.3% { transform: scale(0.9) translate(2px, 2px); box-shadow: 0px 0px 0px #000; background: #ddd; border-color: #000; color: #000; }
  82.3%, 87.9% { transform: scale(1); box-shadow: 2px 2px 0px #000; background: #dbeafe; border-color: #3b82f6; color: #000; }
  88%, 98.3% { transform: scale(1); box-shadow: 2px 2px 0px #000; background: #fee2e2; border-color: #ef4444; color: #000; }
  98.4%, 100% { transform: scale(1); box-shadow: 2px 2px 0px #000; background: #e5e7eb; border-color: #aaa; color: #888; }
}

@keyframes mgHC9 {
  0%, 87% { background: #fff; border-color: #000; transform: scale(1); box-shadow: none; opacity: 1; }
  88%, 98.3% { background: #d1fae5; border-color: #10b981; transform: scale(1.1); box-shadow: 4px 4px 0px #10b981; opacity: 1; }
  98.4%, 100% { background: #e5e7eb; border-color: #999; transform: scale(1); box-shadow: none; opacity: 0.5; }
}

@keyframes mgCurs3 {
  0%, 79.6%, 82.6%, 100% { transform: translate(20px, 20px); opacity: 0; }
  80.4% { transform: translate(0, 0) scale(1); opacity: 1; }
  81.3% { transform: translate(0, 0) scale(0.8); opacity: 1; }
  82.2% { transform: translate(0, 0) scale(1); opacity: 1; }
}

@keyframes mgPts3 {
  0%, 87%, 97%, 100% { transform: translateY(10px); opacity: 0; }
  89%, 95% { transform: translateY(-30px); opacity: 1; }
}

#hc-4 { animation: mgHC4 30s infinite; }
#hc-3 { animation: mgHC3 30s infinite; }
#hc-9 { animation: mgHC9 30s infinite; }
#pc-4 { animation: mgPC4 30s infinite; }
#pc-3 { animation: mgPC3 30s infinite; }
#pc-6 { animation: mgPC6 30s infinite; }
#curs-1 { animation: mgCurs1 30s infinite; }
#curs-2 { animation: mgCurs2 30s infinite; }
#curs-3 { animation: mgCurs3 30s infinite; }
#pts-1 { animation: mgPts1 30s infinite; }
#pts-2 { animation: mgPts2 30s infinite; }
#pts-3 { animation: mgPts3 30s infinite; }


/* ---------------------------------
   SONG-TIMELINE TUTORIAL CSS (rewritten)
----------------------------------- */

/* Caption text animation matches the keyframe percentages below */
.st-captions::after { content: "1. Host startet den Song"; animation: stCaptions 30s infinite; }
@keyframes stCaptions {
  0%, 21%   { content: "1. Host startet den Song"; }
  22%, 32%  { content: "2. Anker-Song erscheint"; }
  33%, 41%  { content: "Runde 2: Neuer Song"; }
  42%, 53%  { content: "3. Spieler zieht ihn in die richtige Luecke"; }
  54%, 65%  { content: "Richtig! +10000 Punkte"; }

  66%, 76%  { content: "Runde 3: Naechster Song"; }
  77%, 87%  { content: "Spieler zieht in den falschen Slot..."; }
  88%, 100% { content: "Falsche Position = 0 Punkte"; }
}

/* Tall enough to fit the expanded R3 layout (5 slots + labels + parking) */
.st-screen { min-height: 320px; }

/* Layout for both host & player columns */
.st-host-layout, .st-player-layout {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 6px 8px 8px;
  flex: 1;
  gap: 4px;
}

/* Host top controls (timer + play button) */
.st-host-playbtn {
  margin: 2px auto 4px;
  width: 36px; height: 36px;
}
.st-host-playbtn svg { width: 18px; height: 18px; }
.st-icon-play  { animation: mgIconPlay 30s infinite;  position: absolute; fill: #fff; }
.st-icon-pause { animation: mgIconPause 30s infinite; position: absolute; fill: #fff; }
.st-game-timer-fill {
  animation: stTimerFillAnim 30s linear infinite;
  height: 100%; background: #10b981;
}
@keyframes stTimerFillAnim {
  /* Round 1 (0%-32.6%): reveal anchor at 22% */
  0%, 4% { width: 100%; background: #10b981; }
  5% { width: 100%; background: #10b981; }
  16% { width: 50%; background: #10b981; }
  20% { width: 25%; background: #f59e0b; }
  22%, 32.6% { width: 18%; background: #3b82f6; }

  /* Round 2 (33%-65%): reveal at 54% */
  33%, 37% { width: 100%; background: #10b981; }
  38% { width: 100%; background: #10b981; }
  47% { width: 55%; background: #10b981; }
  52% { width: 25%; background: #f59e0b; }
  54%, 65% { width: 18%; background: #3b82f6; }

  /* Round 3 (66%-100%): reveal at 88% */
  66%, 70% { width: 100%; background: #10b981; }
  71% { width: 100%; background: #10b981; }
  82% { width: 45%; background: #10b981; }
  86% { width: 25%; background: #f59e0b; }
  88%, 98% { width: 18%; background: #3b82f6; }
  99%, 100% { width: 100%; background: #10b981; }
}

/* 5 slot rows + 2 labels — extras collapse to 0 in R1/R2, expand in R3 */
.st-timeline {
  display: grid;
  grid-template-rows: 16px auto 30px auto 30px 30px 16px;
  gap: 5px;
  width: 100%;
  align-content: start; /* prevent auto rows from stretching to fill */
}
/* Extra slot rows (above & between) — collapsed by default, expand in R3 */
.st-h-extra-above, .st-p-extra-above,
.st-h-extra-between, .st-p-extra-between {
  height: 0;
  border-width: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  opacity: 0;
  animation: stExtraReveal 30s infinite;
}
@keyframes stExtraReveal {
  0%, 65%   { height: 0; border-width: 0; opacity: 0; background: #fff; border-color: #b0b0b0; }
  66%, 67%  { height: 0; border-width: 0; opacity: 0; }
  68%       { height: 30px; border-width: 2px; opacity: 1; background: #eff6ff; border-style: dashed; border-color: #3b82f6; }
  76%, 87%  { height: 30px; border-width: 2px; opacity: 1; background: #dbeafe; border-style: dashed; border-color: #3b82f6; }
  88%, 100% { height: 30px; border-width: 2px; opacity: 0.6; background: #fff; border-style: dashed; border-color: #b0b0b0; }
}
.st-label {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #444;
  line-height: 16px;
}
.st-slot {
  border: 2px dashed #b0b0b0;
  border-radius: 7px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
  text-align: center;
  padding: 0 4px;
  position: relative;
  overflow: hidden;
  transition: background 0.2s;
}

/* Anchor card (always visible) */
.st-h-anchor, .st-p-anchor {
  background: #dbeafe !important;
  border: 2px solid #3b82f6 !important;
  border-style: solid;
  color: #000;
  animation: stAnchorPop 30s infinite;
}
@keyframes stAnchorPop {
  0%, 9%   { transform: scale(1); }
  10%, 14% { transform: scale(1.06); background: #93c5fd; }
  15%, 100% { transform: scale(1); background: #dbeafe; }
}

/* HOST slot 1 — pulses as candidate during round 2, fills green at ~54% */
.st-h-slot1 { animation: stHSlot1 30s infinite; }
@keyframes stHSlot1 {
  0%, 32%   { background: #fff; border: 2px dashed #b0b0b0; }
  /* Round 2: this is a possible drop target — pulse blue */
  34%, 41%  { background: #eff6ff; border: 2px dashed #3b82f6; }
  42%, 49%  { background: #dbeafe; border: 2px dashed #3b82f6; }
  50%, 53%  { background: #fef3c7; border: 2px dashed #f59e0b; } /* drop hover */
  54%, 100% { background: #d1fae5; border: 2px solid #10b981; }
}
.st-h-slot1-text::before { content: ""; animation: stHSlot1Text 30s infinite; }
@keyframes stHSlot1Text {
  0%, 53%   { content: ""; }
  54%, 100% { content: "Shape of You (2017)"; }
}

/* HOST slot 3 — also a candidate slot in round 2 + 3, fills red at ~88% (wrong) */
.st-h-slot3 { animation: stHSlot3 30s infinite; }
@keyframes stHSlot3 {
  0%, 32%   { background: #fff; border: 2px dashed #b0b0b0; }
  /* Round 2: also a possible drop target — show as candidate (blue) */
  34%, 53%  { background: #eff6ff; border: 2px dashed #3b82f6; }
  /* Player chose slot 1 — slot 3 dims */
  54%, 65%  { background: #fff; border: 2px dashed #b0b0b0; opacity: 0.6; }
  /* Round 3: candidate again */
  66%, 76%  { background: #eff6ff; border: 2px dashed #3b82f6; opacity: 1; }
  77%, 83%  { background: #dbeafe; border: 2px dashed #3b82f6; opacity: 1; }
  84%, 87%  { background: #fef3c7; border: 2px dashed #f59e0b; opacity: 1; }
  88%, 100% { background: #fee2e2; border: 2px solid #ef4444; opacity: 1; }
}
.st-h-slot3-text::before { content: ""; animation: stHSlot3Text 30s infinite; }
@keyframes stHSlot3Text {
  0%, 87%   { content: ""; }
  88%, 100% { content: "Candy Shop (2005)"; }
}

/* PLAYER slot 1 — candidate pulse + drop highlight + green fill */
.st-p-slot1 { animation: stPSlot1 30s infinite; }
@keyframes stPSlot1 {
  0%, 32%   { background: #fff; border: 2px dashed #b0b0b0; }
  34%, 41%  { background: #eff6ff; border: 2px dashed #3b82f6; }
  42%, 49%  { background: #dbeafe; border: 2px dashed #3b82f6; }
  50%, 53%  { background: #fef3c7; border: 2px dashed #f59e0b; } /* drop hover */
  54%, 100% { background: #d1fae5; border: 2px solid #10b981; }
}
.st-p-slot1-text::before { content: ""; animation: stPSlot1Text 30s infinite; }
@keyframes stPSlot1Text {
  0%, 53%   { content: ""; }
  54%, 100% { content: "Shape of You (2017)"; }
}

/* PLAYER slot 3 — also a candidate in round 2 + 3, wrong red drop at end */
.st-p-slot3 { animation: stPSlot3 30s infinite; }
@keyframes stPSlot3 {
  0%, 32%   { background: #fff; border: 2px dashed #b0b0b0; }
  34%, 53%  { background: #eff6ff; border: 2px dashed #3b82f6; }
  /* Player chose slot 1 instead — slot 3 dims */
  54%, 65%  { background: #fff; border: 2px dashed #b0b0b0; opacity: 0.6; }
  /* Round 3: candidate again */
  66%, 76%  { background: #eff6ff; border: 2px dashed #3b82f6; opacity: 1; }
  77%, 83%  { background: #dbeafe; border: 2px dashed #3b82f6; opacity: 1; }
  84%, 87%  { background: #fef3c7; border: 2px dashed #f59e0b; opacity: 1; }
  88%, 100% { background: #fee2e2; border: 2px solid #ef4444; opacity: 1; }
}
.st-p-slot3-text::before { content: ""; animation: stPSlot3Text 30s infinite; }
@keyframes stPSlot3Text {
  0%, 87%   { content: ""; }
  88%, 100% { content: "Candy Shop (2005)"; }
}

/* ─── Mystery cards (player drags these into slots) ───
   Positioning math (player layout 260px screen, padding 6/8):
   Layout content rows from top of layout (after 6px padding-top):
     0-16   : "Später" label
     21-51  : Slot 1   → translateY ≈ 21px from layout top
     56-86  : Slot 2 (anchor)
     91-121 : Slot 3   → translateY ≈ 91px
     126-142: "Früher" label
   Mystery card lives absolutely in the player layout at top:0 width=100%-padding,
   so its un-transformed position equals slot 1. We use translateY to slide it
   from below the layout up to the target slot. */
.st-mystery-card {
  position: absolute;
  /* Full-width "song card" shape so it matches the real slot cards */
  left: 8px;
  right: 8px;
  top: 32px;             /* aligned with slot 1's top in R1/R2 layout */
  height: 30px;
  background: #fef3c7;
  border: 2px solid #000;
  border-radius: 7px;
  color: #111;
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 3px 3px 0 #000;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
}

/* Round 2 mystery card: parks below, drags into slot 1 (correct), tight snap */
.st-myst-r2 { animation: stMystR2 30s infinite; }
@keyframes stMystR2 {
  0%, 33%    { transform: translateY(180px) scale(1); opacity: 0; }       /* hidden below */
  34%        { transform: translateY(180px) scale(1); opacity: 0; }
  36%, 41%   { transform: translateY(125px) scale(1); opacity: 1; }       /* parked, visible */
  42%        { transform: translateY(125px) scale(0.94); opacity: 1; }    /* grab */
  48%        { transform: translateY(0)     scale(0.96); opacity: 1; }    /* arrives at slot 1 */
  49.5%      { transform: translateY(0)     scale(1.04); opacity: 1; }    /* tiny snap pop */
  50.5%      { transform: translateY(0)     scale(1);    opacity: 1; }    /* settle */
  53.5%      { transform: translateY(0)     scale(1);    opacity: 1; }    /* hold briefly */
  54%        { transform: translateY(0)     scale(1);    opacity: 0; }    /* fade — slot fills */
  55%, 100%  { transform: translateY(180px) scale(1);    opacity: 0; }
}

/* Round 3 mystery card: parks below, drags up into wrong slot 3 (in expanded layout), tight snap */
.st-myst-r3 { animation: stMystR3 30s infinite; }
@keyframes stMystR3 {
  0%, 67%    { transform: translateY(220px) scale(1); opacity: 0; }
  68%        { transform: translateY(220px) scale(1); opacity: 0; }
  70%, 76%   { transform: translateY(190px) scale(1); opacity: 1; }     /* parked below expanded layout */
  77%        { transform: translateY(190px) scale(0.94); opacity: 1; }  /* grab */
  84%        { transform: translateY(135px) scale(0.96); opacity: 1; }  /* arrives at slot 3 (R3 pos) */
  85.5%      { transform: translateY(135px) scale(1.04); opacity: 1; }  /* snap pop */
  86.5%      { transform: translateY(135px) scale(1);    opacity: 1; }  /* settle */
  87.5%      { transform: translateY(135px) scale(1);    opacity: 1; }  /* hold */
  88%        { transform: translateY(135px) scale(1);    opacity: 0; }  /* fade — slot fills red */
  89%, 100%  { transform: translateY(220px) scale(1);    opacity: 0; }
}

/* Cursor that follows the mystery card during drag */
.st-curs {
  position: absolute;
  /* Cursor sits near right edge of the full-width mystery card */
  right: 14px;
  top: 32px;
  width: 22px; height: 22px;
  z-index: 50;
  opacity: 0;
}
.st-curs { animation: stCursor 30s infinite; }
@keyframes stCursor {
  0%, 41%      { transform: translate(0, 125px) scale(1);    opacity: 0; }
  42%          { transform: translate(0, 125px) scale(0.85); opacity: 1; } /* grab R2 */
  48%          { transform: translate(0, 0)     scale(0.85); opacity: 1; } /* drag R2 to slot 1 */
  50.5%        { transform: translate(0, 0)     scale(1);    opacity: 1; } /* release */
  54%, 76%     { transform: translate(0, 0)     scale(1);    opacity: 0; }
  77%          { transform: translate(0, 190px) scale(0.85); opacity: 1; } /* grab R3 (parked lower) */
  84%          { transform: translate(0, 135px) scale(0.85); opacity: 1; } /* drag R3 to slot 3 */
  86.5%        { transform: translate(0, 135px) scale(1);    opacity: 1; } /* release */
  88%, 100%    { transform: translate(0, 135px) scale(1);    opacity: 0; }
}

/* +1 / 0 Punkt floaty for the player slots */
.st-slot::after { content: ""; }
.st-p-slot1::after {
  content: "";
  position: absolute;
  right: 4px;
  font-size: 0.7rem;
  font-weight: 900;
  color: #10b981;
  text-shadow: 1px 1px 0 #fff;
  animation: stPlus1 30s infinite;
  opacity: 0;
}
@keyframes stPlus1 {
  0%, 55%    { opacity: 0; transform: translateY(8px); content: "+10000"; }
  57%, 64%   { opacity: 1; transform: translateY(0); content: "+10000"; }
  65%, 100%  { opacity: 0; transform: translateY(-6px); content: "+10000"; }
}
.st-p-slot3::after {
  content: "";
  position: absolute;
  right: 4px;
  font-size: 0.7rem;
  font-weight: 900;
  color: #ef4444;
  text-shadow: 1px 1px 0 #fff;
  animation: stPlus0 30s infinite;
  opacity: 0;
}
@keyframes stPlus0 {
  0%, 89%    { opacity: 0; transform: translateY(8px); content: "0"; }
  91%, 98%   { opacity: 1; transform: translateY(0); content: "0"; }
  99%, 100%  { opacity: 0; transform: translateY(-6px); content: "0"; }
}

/* Make the host screen also tall enough */
.st-host-layout { padding-top: 4px; }

@keyframes popOut {
  from { transform: scale(1); opacity: 1; }
  to { transform: scale(0.9); opacity: 0; }
}

/* ─── JEOPARDY BOARD ─── */
/* ── Jeopardy Board (host + player shared classes) ── */
.jp-board { display:flex; flex-direction:column; gap:8px; width:100%; }
.jp-row { display:flex; gap:8px; align-items:stretch; }
.jp-corner { flex:0 0 52px; min-width:52px; }
.jp-cat-header {
    flex:1; min-width:80px; font-weight:900; font-size:1rem; text-align:center;
    padding:10px 6px; color:#000; letter-spacing:0.02em;
}
.jp-pts-label {
    flex:0 0 52px; min-width:52px; display:flex; align-items:center; justify-content:center;
    font-weight:900; font-size:1rem; color:#555;
}
.jp-cell {
    flex:1; min-width:80px; min-height:64px; border:4px solid #000; border-radius:14px;
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    text-align:center; font-weight:900; padding:8px 6px;
    box-shadow:4px 4px 0 #000; transition:transform 0.1s, box-shadow 0.1s;
    user-select:none;
}
.jp-cell-pts { font-size:1.5rem; font-weight:900; }
.jp-cell-check { font-size:1.6rem; font-weight:900; line-height:1; }
.jp-cell-winner { font-size:0.8rem; font-weight:700; margin-top:2px; }
.jp-cell-unplayed { background:#fff; color:#000; }
.jp-cell-mine { background:#fff3cd; border-color:#f59e0b; box-shadow:4px 4px 0 #f59e0b; cursor:pointer; }
.jp-cell-mine:hover { transform:translate(-2px,-2px); box-shadow:6px 6px 0 #f59e0b; }
.jp-cell-correct { background:#22c55e; color:#fff; border-color:#16a34a; box-shadow:4px 4px 0 #16a34a; }
.jp-cell-wrong { background:#ef4444; color:#fff; border-color:#b91c1c; box-shadow:4px 4px 0 #b91c1c; }

/* Player board: slightly compact */
#jeopardyPlayerSection {
    padding-bottom: calc(26px + env(safe-area-inset-bottom)) !important;
}

#jeopardyPlayerGrid {
    padding: 0 6px 10px 0;
    box-sizing: border-box;
}

.jp-board-player .jp-cat-header { font-size:0.8rem; padding:6px 4px; }
.jp-board-player .jp-pts-label { font-size:0.85rem; flex:0 0 38px; min-width:38px; }
.jp-board-player .jp-corner { flex:0 0 38px; min-width:38px; }
.jp-board-player .jp-cell { min-height:52px; border-radius:10px; border-width:3px; box-shadow:3px 3px 0 #000; }
.jp-board-player .jp-cell-pts { font-size:1.1rem; }
.jp-board-player .jp-cell-correct { box-shadow:3px 3px 0 #16a34a; }
.jp-board-player .jp-cell-wrong { box-shadow:3px 3px 0 #b91c1c; }
.jp-board-player .jp-cell-mine { box-shadow:3px 3px 0 #f59e0b; }

/* Turn banner */
.jp-turn-banner { font-weight:900; font-size:1rem; padding:10px 20px; margin-bottom:10px; border:3px solid #000; border-radius:12px; text-align:center; }
.jp-turn-mine { background:#fef08a; color:#000; }
.jp-turn-other { background:#f3f4f6; color:#555; }

/* Timer */
.jp-timer-urgent { background:#b91c1c !important; animation: jp-pulse 0.5s infinite alternate; }
@keyframes jp-pulse { from { transform:scale(1); } to { transform:scale(1.1); } }

/* Score chips */
.jp-score-chip { display:flex; justify-content:space-between; align-items:center; background:#fff; border:3px solid #000; border-radius:10px; padding:8px 12px; box-shadow:3px 3px 0 #000; font-size:0.95rem; }
.jp-score-pts { color:var(--clay-color-primary); font-weight:900; margin-left:8px; }

/* Editor jeopardy table */
.jeopardy-editor-table-wrap {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 4px 8px 10px 4px;
}

.jp-edit-table {
  border-collapse: separate;
  border-spacing: 5px;
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}

.jp-edit-corner-th,
.jp-edit-add-col-th,
.jp-edit-cat-th,
.jp-edit-pts-td,
.jp-edit-cell-td,
.jp-edit-side-spacer {
  border: 3px solid #000;
  border-radius: 10px;
  box-shadow: 3px 3px 0 #000;
}

.jp-edit-corner-th {
  width: 150px;
  min-width: 150px;
  background: #fff;
  padding: 6px;
}

.jp-edit-add-col-th,
.jp-edit-side-spacer {
  width: 76px;
  min-width: 76px;
  background: #fff;
  padding: 6px;
}

.jp-edit-cat-th {
  background: #f59e0b;
  padding: 6px;
  min-width: 0;
}

.jp-edit-pts-td {
  background: #1f2937;
  color: #fff;
  padding: 6px;
  width: 150px;
  min-width: 150px;
  white-space: nowrap;
}

.jp-edit-cell-td {
  background: #fff;
  padding: 6px;
  vertical-align: top;
  min-width: 0;
}

.jp-edit-head-control,
.jp-edit-row-control {
  display: grid;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.jp-edit-head-control {
  grid-template-columns: 30px minmax(0, 1fr) 34px;
}

.jp-edit-row-control {
  grid-template-columns: 26px 30px 70px;
  gap: 4px;
  justify-content: center;
}

.jp-edit-head-control.is-single,
.jp-edit-row-control.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.jp-edit-cell-fields {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.jp-edit-cat-input,
.jp-edit-pts-input,
.jp-edit-cell-input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 6px 7px !important;
  font-size: 0.82rem;
}

.jp-edit-cat-input,
.jp-edit-pts-input {
  font-weight: 900;
}

.jp-edit-pts-input {
  appearance: textfield;
  -moz-appearance: textfield;
  height: 38px;
  padding-inline: 8px !important;
  text-align: center;
}

.jp-edit-answer-input {
  opacity: 0.72;
}

.jp-edit-pts-input::-webkit-outer-spin-button,
.jp-edit-pts-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.jp-edit-add-btn,
.jp-edit-remove-btn,
.jp-edit-drag-btn {
  border: 3px solid #000;
  border-radius: 9px;
  background: #fff;
  box-shadow: 2px 2px 0 #000;
  color: #000;
  cursor: pointer;
  font-weight: 900;
  min-height: 34px;
}

.jp-edit-add-btn {
  width: 100%;
  padding: 6px 5px;
  font-size: 0.74rem;
  line-height: 1.05;
}

.jp-edit-remove-btn {
  width: 30px;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
}

.jp-edit-drag-btn {
  width: 26px;
  min-height: 34px;
  padding: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.jp-edit-drag-btn:active {
  cursor: grabbing;
}

body.jp-edit-dragging {
  cursor: grabbing;
  user-select: none;
}

.jp-edit-drag-ghost {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  opacity: 0.92;
  transform: rotate(-1deg);
}

.jp-edit-row-drag-ghost .jp-edit-table {
  margin: 0;
}

.jp-edit-col-drag-ghost {
  background: #f59e0b;
  border: 3px solid #000;
  border-radius: 10px;
  box-shadow: 4px 4px 0 #000;
  padding: 6px;
}

.jp-edit-col-drag-ghost .jp-edit-head-control {
  width: 100%;
}

.jp-edit-row-source-hidden,
.jp-edit-col-source-hidden {
  display: none;
}

.jp-edit-row-placeholder td,
.jp-edit-col-placeholder {
  background: #dbeafe;
  border: 4px dashed var(--clay-color-accent);
  border-radius: 10px;
  box-shadow: none;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  vertical-align: middle;
}

.jp-edit-row-placeholder td {
  height: 78px;
}

.jp-edit-col-placeholder {
  width: 36px;
  min-width: 36px;
  padding: 4px 10px;
}

.jp-edit-add-btn:active,
.jp-edit-remove-btn:active,
.jp-edit-drag-btn:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* ── Accessibility: respect user motion preferences ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
