/* ============================================================
   PowerBenk Events – Stylesheet
   Brand: Mikel · PowerBenk Events · Perspektivenwechsel
   ============================================================ */

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

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

:root {
  /* Creme / Linen (Logo-Hintergrund) */
  --cream:       #ede9e2;
  --cream-dark:  #e3ddd4;
  --cream-mid:   #d6cfc4;

  /* Taupe (Logo-Textfarbe) */
  --taupe:       #8b7b65;
  --taupe-mid:   #6b5c48;
  --taupe-dark:  #3d3328;

  /* Brand Gold */
  --gold:        #DBC078;
  --gold-light:  #ede0b4;
  --gold-deep:   #c9a440;

  /* Team A – Terrakotta / Erde */
  --terra:       #7a4a2e;
  --terra-mid:   #9b6040;
  --terra-light: #ead8cc;

  /* Team B – Moos / Olive */
  --moss:        #4e6030;
  --moss-mid:    #667a42;
  --moss-light:  #d8e2c8;

  /* Aliase für Kompatibilität */
  --lake:        var(--terra);
  --lake-mid:    var(--terra-mid);
  --lake-light:  var(--terra-light);
  --forest:      var(--moss);
  --forest-mid:  var(--moss-mid);
  --forest-light:var(--moss-light);

  /* Neutral */
  --white:       #ffffff;
  --bg:          var(--cream);
  --text:        var(--taupe-dark);
  --text-muted:  var(--taupe);
  --border:      #d8d0c4;

  /* Shadows – warm, nicht kalt */
  --shadow:    0 2px 16px rgba(61, 51, 40, 0.09);
  --shadow-sm: 0 1px 6px rgba(61, 51, 40, 0.06);

  /* Layout */
  --radius:   16px;
  --header-h: 56px;
  --tab-h:    52px;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--cream);
  color: var(--text);
  height: 100dvh;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

/* ============================================================
   START-SCREEN
   ============================================================ */
.start-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--cream) 0%, #f0ece5 50%, var(--cream-dark) 100%);
  overflow: auto;
}

.start-container {
  width: 100%;
  max-width: 420px;
  padding: 48px 24px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}

.logo-area { text-align: center; }
.logo-img {
  width: 260px;
  max-width: 80vw;
  height: auto;
  display: block;
  margin: 0 auto;
}

.role-cards { display: flex; flex-direction: column; gap: 10px; width: 100%; }

.role-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-align: left;
  width: 100%;
  box-shadow: var(--shadow-sm);
}
.role-card:active { transform: scale(0.98); background: var(--cream-dark); }

/* Spielleiter – Taupe dunkel, Gold-Akzent */
.role-card.spielleiter {
  background: var(--taupe-dark);
  border-color: var(--taupe-dark);
  color: white;
}
.role-card.spielleiter .role-name { color: var(--gold-light); }
.role-card.spielleiter .role-desc { color: rgba(255,255,255,0.5); }
.role-card.spielleiter:active { background: var(--taupe-mid); }

/* Team A – Terrakotta */
.role-card.team-a {
  background: var(--terra-light);
  border-color: var(--terra-mid);
  border-left: 4px solid var(--terra);
}
.role-card.team-a .role-name { color: var(--terra); }
.role-card.team-a .role-desc { color: var(--terra-mid); }

/* Team B – Moos */
.role-card.team-b {
  background: var(--moss-light);
  border-color: var(--moss-mid);
  border-left: 4px solid var(--moss);
}
.role-card.team-b .role-name { color: var(--moss); }
.role-card.team-b .role-desc { color: var(--moss-mid); }

.role-icon { font-size: 24px; flex-shrink: 0; }
.role-name { font-size: 16px; font-weight: 700; letter-spacing: -0.2px; }
.role-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; font-weight: 400; }

.join-panel {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
}
.join-panel p { font-size: 13px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.2px; }
.join-panel input {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--cream);
  color: var(--taupe-mid);
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 6px;
  outline: none;
}
.join-panel input:focus { border-color: var(--taupe); }
.join-panel input::placeholder { color: var(--cream-mid); }
.join-panel button {
  padding: 14px;
  border-radius: 10px;
  border: none;
  background: var(--taupe-dark);
  color: var(--gold-light);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  letter-spacing: 0.2px;
}
.back-btn {
  background: var(--cream) !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--border) !important;
}
.hidden { display: none !important; }

/* ============================================================
   APP-SCREEN
   ============================================================ */
.app-screen {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

.app-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  z-index: 100;
}

.spielleiter-header { background: var(--taupe-dark); color: white; }
.team-header-a      { background: var(--lake); color: white; }
.team-header-b      { background: var(--forest); color: white; }

.header-left { display: flex; align-items: center; gap: 10px; }
.header-icon { font-size: 20px; }
.header-title { font-size: 16px; font-weight: 700; letter-spacing: -0.2px; }

.session-badge {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--gold-light);
}
.team-header-a .session-badge,
.team-header-b .session-badge { color: rgba(255,255,255,0.85); }

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: block;
}
.status-dot.online  { background: var(--gold); }
.status-dot.offline { background: #c94040; }

/* ============================================================
   TAB NAVIGATION
   ============================================================ */
.tab-nav {
  display: flex;
  height: var(--tab-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 0;
  transition: color 0.2s;
  border-bottom: 2px solid transparent;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.tab.active { color: var(--taupe-dark); border-bottom-color: var(--taupe); }

/* ============================================================
   TAB CONTENT
   ============================================================ */
.tab-content {
  display: none;
  flex: 1;
  overflow: hidden;
  position: relative;
}
.tab-content.active { display: flex; flex-direction: column; }

/* ============================================================
   MAP
   ============================================================ */
#map { flex: 1; width: 100%; }

.map-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.map-btn {
  background: var(--taupe-dark);
  border: none;
  border-radius: 50px;
  padding: 11px 16px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(61, 51, 40, 0.28);
  cursor: pointer;
  color: var(--gold-light);
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.map-btn:active { opacity: 0.85; }

.map-hint {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--taupe-dark);
  color: var(--gold-light);
  padding: 9px 18px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 500;
  z-index: 10;
  white-space: nowrap;
}

.map-status {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(61, 51, 40, 0.78);
  color: rgba(255,255,255,0.85);
  padding: 8px 14px;
  border-radius: 50px;
  font-size: 11.5px;
  font-weight: 500;
  z-index: 10;
}

/* ============================================================
   TEAM PANEL (Spielleiter)
   ============================================================ */
.team-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
  background: var(--cream);
}

.team-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid;
}
.team-a-card { border-color: var(--lake-mid); }
.team-b-card { border-color: var(--forest-mid); }

.team-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 10px;
}
.team-status {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 50px;
  background: var(--cream);
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.team-status.online { background: var(--forest-light); color: var(--forest); border-color: var(--forest-light); }

.team-tasks { padding: 4px 0; }

.team-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.team-actions button {
  flex: 1;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--cream);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
}

.broadcast-panel {
  margin: 0 16px 16px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.broadcast-panel h3 {
  margin-bottom: 10px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.broadcast-panel textarea {
  width: 100%;
  height: 70px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  font-family: inherit;
  font-size: 14px;
  resize: none;
  outline: none;
  background: var(--cream);
  color: var(--text);
}
.broadcast-btns { display: flex; gap: 8px; margin-top: 10px; }
.broadcast-btns button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--taupe-dark);
  color: var(--gold-light);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  letter-spacing: 0.3px;
}
.danger-btn { background: #6e1a1a !important; color: #ffcece !important; }

/* ============================================================
   ACTIONS GRID (Spielleiter)
   ============================================================ */
.actions-grid {
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--cream);
}
.action-section h3 {
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.action-card {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 8px;
  text-align: left;
  border: 1px solid transparent;
}
.sabotage { background: #f0ddd6; color: #7a2e22; border-color: #e8c8be; }
.support  { background: var(--lake-light); color: #1d4e6b; border-color: #b8d8ec; }
.secret   { background: var(--gold-light); color: #7a5e10; border-color: #d8c888; }

/* ============================================================
   NOTIZEN (Spielleiter)
   ============================================================ */
.notizen-panel {
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--cream);
}
.notizen-panel h3 { font-size: 16px; font-weight: 700; }
.notizen-hint { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.notizen-input textarea {
  width: 100%;
  height: 80px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  font-family: inherit;
  font-size: 14px;
  resize: none;
  outline: none;
  background: var(--white);
  margin-bottom: 8px;
}
.notizen-tags { display: flex; gap: 8px; }
.notizen-tags button {
  flex: 1;
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
}

.notiz-item {
  background: var(--white);
  border-radius: 10px;
  padding: 12px;
  box-shadow: var(--shadow-sm);
  font-size: 14px;
  border-left: 3px solid var(--taupe);
}
.notiz-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ============================================================
   AUFGABEN (Team)
   ============================================================ */
.aufgaben-panel { padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; background: var(--cream); }

.current-task {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--taupe);
}
.task-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--taupe);
  margin-bottom: 8px;
}
.task-text { font-size: 16px; font-weight: 600; line-height: 1.5; margin-bottom: 16px; }
.task-actions { display: flex; gap: 10px; }
.task-actions button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.task-actions button:first-child { background: var(--taupe-dark); color: var(--gold-light); }
.task-actions button:last-child  { background: #f0ddd6; color: #7a2e22; }

/* ============================================================
   QUIZ (Team)
   ============================================================ */
.quiz-panel { padding: 16px; overflow-y: auto; background: var(--cream); }
.quiz-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.quiz-header h3 { font-size: 16px; font-weight: 700; }
.quiz-score { font-weight: 700; font-size: 16px; color: var(--taupe); }
.quiz-question {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

/* ============================================================
   CHAT (Team)
   ============================================================ */
.chat-panel { display: flex; flex-direction: column; height: 100%; background: var(--cream); }
.chat-messages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.chat-msg {
  background: var(--white);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 14px;
  max-width: 85%;
  box-shadow: var(--shadow-sm);
  line-height: 1.45;
}
.chat-msg.incoming { align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.outgoing {
  align-self: flex-end;
  background: var(--taupe-dark);
  color: var(--gold-light);
  border-bottom-right-radius: 4px;
}
.chat-msg .msg-meta { font-size: 10px; opacity: 0.45; margin-top: 4px; }

.chat-input { padding: 12px 12px 0; display: flex; gap: 8px; }
.chat-input textarea {
  flex: 1;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  resize: none;
  outline: none;
  background: var(--white);
}
.chat-input button {
  padding: 0 18px;
  background: var(--taupe-dark);
  color: var(--gold-light);
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.chat-quickbtns { display: flex; gap: 8px; padding: 8px 12px 16px; }
.chat-quickbtns button {
  flex: 1;
  padding: 10px 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
}

/* ============================================================
   OVERLAY
   ============================================================ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(61, 51, 40, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.overlay-card {
  background: var(--cream);
  border-radius: 20px;
  padding: 28px 24px;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 24px 60px rgba(61, 51, 40, 0.25);
  border: 1px solid var(--border);
}
.overlay-card h2, .overlay-card h3 { font-size: 18px; font-weight: 700; color: var(--taupe-dark); }
.overlay-card p { font-size: 14px; color: var(--text-muted); }
.overlay-card input, .overlay-card textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-family: inherit;
  font-size: 15px;
  outline: none;
  background: var(--white);
  color: var(--text);
}
.overlay-card input:focus, .overlay-card textarea:focus { border-color: var(--taupe); }
.overlay-card textarea { height: 100px; resize: none; }
.overlay-card button {
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--taupe-dark);
  color: var(--gold-light);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.overlay-btns { display: flex; gap: 10px; }
.overlay-btns button:last-child {
  background: var(--white);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ============================================================
   NOTIFICATIONS & ACTION INCOMING
   ============================================================ */
.notification {
  position: fixed;
  top: calc(var(--header-h) + var(--tab-h) + 12px);
  left: 12px;
  right: 12px;
  background: var(--white);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 8px 30px rgba(61, 51, 40, 0.18);
  z-index: 500;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  border-left: 4px solid var(--taupe);
  border: 1px solid var(--border);
  border-left: 4px solid var(--taupe);
}
.notification-content { font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--text); }
.notification button {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  color: var(--text-muted);
}

.action-incoming {
  position: absolute;
  inset: 0;
  background: rgba(61, 51, 40, 0.70);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
  gap: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.action-incoming-content {
  background: var(--cream);
  border-radius: 20px;
  padding: 28px;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  width: 100%;
  line-height: 1.55;
  white-space: pre-line;
  border-top: 4px solid var(--taupe);
  color: var(--taupe-dark);
}
.action-incoming button {
  padding: 14px 44px;
  background: var(--taupe-dark);
  color: var(--gold-light);
  border: none;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

/* ============================================================
   EVENT LOG
   ============================================================ */
.event-log {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 260px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 400;
  pointer-events: none;
}
.log-item {
  background: var(--taupe-dark);
  color: var(--gold-light);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 11.5px;
  font-weight: 500;
  animation: slideIn 0.3s ease;
  border-left: 3px solid var(--taupe);
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
/* ── Spielleiter Chat-Tab ── */
#tab-chat {
  display: none;
  flex-direction: column;
}
#tab-chat.active {
  display: flex;
}
.sl-chat-tabs {
  display: flex;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.sl-chat-tab {
  flex: 1;
  padding: 12px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}
.sl-chat-tab.active { color: var(--taupe-dark); border-bottom-color: var(--gold); }
.sl-chat-tab.has-unread { color: var(--gold-deep); }
.sl-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--cream);
}
.sl-chat-msg {
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
  max-width: 82%;
  word-wrap: break-word;
}
.sl-chat-msg.incoming {
  background: var(--white);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.sl-chat-msg.outgoing {
  background: var(--taupe-dark);
  color: var(--gold-light);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.sl-chat-meta {
  font-size: 10px;
  margin-top: 3px;
  opacity: 0.6;
}
.sl-chat-msg.incoming .sl-chat-meta { color: var(--text-muted); }
.sl-chat-msg.outgoing .sl-chat-meta { color: var(--gold-light); }
.sl-chat-input {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: var(--white);
  border-top: 1px solid var(--border);
}
.sl-chat-input textarea {
  flex: 1;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  resize: none;
  outline: none;
  background: var(--cream);
}
.sl-chat-input textarea:focus { border-color: var(--taupe); background: var(--white); }
.sl-chat-input button {
  padding: 0 20px;
  background: var(--taupe-dark);
  color: var(--gold-light);
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.sl-chat-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

.log-item.log-alert {
  background: var(--gold);
  color: var(--taupe-dark);
  border-left-color: var(--gold-deep);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

/* ============================================================
   QUIZ CONTROL PANEL (Spielleiter)
   ============================================================ */
.quiz-ctrl-panel {
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--cream);
  height: 100%;
}

.quiz-ctrl-section { display: flex; flex-direction: column; gap: 8px; }

.quiz-ctrl-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

.quiz-stufe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.stufe-btn {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 10px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.stufe-btn.active {
  background: var(--taupe-dark);
  border-color: var(--taupe-dark);
  color: white;
}
.stufe-btn.active .stufe-desc { color: var(--gold-light); }
.stufe-name { font-size: 13px; font-weight: 700; }
.stufe-desc { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.stufe-btn.active .stufe-name { color: white; }

.quiz-kat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.kat-btn {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: var(--white);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  transition: all 0.15s;
}
.kat-btn.active {
  background: var(--taupe-dark);
  border-color: var(--taupe-dark);
  color: var(--gold-light);
}

.quiz-info-bar {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
  padding: 4px 0;
}

.quiz-start-btn {
  width: 100%;
  padding: 14px;
  background: var(--taupe-dark);
  color: var(--gold-light);
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
}

/* Aktive Frage */
.quiz-progress-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0 2px;
}
.quiz-scores-inline { display: flex; gap: 12px; font-size: 13px; font-weight: 700; color: var(--taupe-dark); }

.quiz-q-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.quiz-q-text { font-size: 15px; font-weight: 600; line-height: 1.5; color: var(--taupe-dark); }
.quiz-q-options { display: flex; flex-direction: column; gap: 6px; }
.quiz-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  background: var(--cream);
  border: 1px solid var(--border);
}
.quiz-option.correct-option {
  background: var(--forest-light);
  border-color: var(--forest-mid);
  font-weight: 600;
  color: var(--forest);
}
.opt-letter {
  font-weight: 700;
  font-size: 12px;
  width: 20px;
  flex-shrink: 0;
  color: var(--taupe);
}
.quiz-option.correct-option .opt-letter { color: var(--forest); }

.quiz-send-btn {
  width: 100%;
  padding: 13px;
  background: var(--taupe-dark);
  color: var(--gold-light);
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.quiz-answers-panel {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quiz-answer-row { display: flex; flex-direction: column; gap: 8px; }
.quiz-answer-team {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  background: var(--cream);
  border: 1px solid var(--border);
}
.quiz-answer-team.answer-correct { background: var(--forest-light); border-color: var(--forest-mid); color: var(--forest); }
.quiz-answer-team.answer-wrong   { background: #f0ddd6; border-color: #e8c8be; color: #7a2e22; }

.quiz-eval-btn {
  width: 100%;
  padding: 13px;
  background: var(--taupe-dark);
  color: var(--gold-light);
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
}

.quiz-reset-btn {
  background: none;
  border: none;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  padding: 4px 0;
}

/* Misc */
.empty-hint {
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  padding: 24px 0;
  line-height: 1.6;
}

/* ============================================================
   REFLEXION – Team-Formular & Spielleiter-Ansicht
   ============================================================ */
.reflexion-panel {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  height: 100%;
}
.reflexion-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  flex: 1;
  color: var(--text-muted);
  padding: 40px 24px;
}
.reflexion-locked p { font-size: 14px; line-height: 1.6; }

.reflexion-group {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.reflexion-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}
.reflexion-group-title.pos { color: var(--moss-mid); }
.reflexion-group-title.neg { color: var(--terra-mid); }

.reflexion-input {
  display: flex;
  align-items: center;
  gap: 10px;
}
.reflexion-input-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  width: 20px;
  flex-shrink: 0;
  text-align: center;
}
.reflexion-input input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  background: var(--cream);
  color: var(--text);
}
.reflexion-input input:focus { border-color: var(--taupe); background: var(--white); }

.reflexion-submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--taupe-dark);
  color: var(--gold-light);
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.reflexion-done-card {
  text-align: center;
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.reflexion-done-card .big-icon { font-size: 48px; }
.reflexion-done-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* Spielleiter: Reflexion-Antworten im Notizen-Tab */
.reflexion-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.reflexion-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}
.reflexion-send-btn {
  width: 100%;
  padding: 12px;
  background: var(--cream-dark);
  color: var(--taupe-dark);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.reflexion-send-btn.sent {
  background: var(--moss-light);
  border-color: var(--moss-mid);
  color: var(--moss);
}
.reflexion-antwort-card {
  background: var(--cream);
  border-radius: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.reflexion-antwort-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--taupe-dark);
}
.reflexion-antwort-items { display: flex; flex-direction: column; gap: 4px; }
.reflexion-antwort-item {
  font-size: 12px;
  color: var(--text);
  line-height: 1.4;
  padding-left: 10px;
  border-left: 2px solid var(--border);
}
.reflexion-antwort-item.pos { border-color: var(--moss-mid); }
.reflexion-antwort-item.neg { border-color: var(--terra-mid); }

.protokoll-btn {
  width: 100%;
  padding: 14px;
  background: var(--gold);
  color: var(--taupe-dark);
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.protokoll-btn:disabled { opacity: 0.5; cursor: default; }
.protokoll-output {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--gold);
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
}
/* ============================================================
   AUFGABEN-BIBLIOTHEK – Karten
   ============================================================ */
.aufg-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-left: 3px solid var(--taupe);
  transition: opacity 0.3s, border-color 0.3s;
}
.aufg-card.aufg-sent {
  opacity: 0.5;
  border-left-color: var(--moss-mid);
}
.aufg-card-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}
.aufg-card-btns {
  display: flex;
  gap: 6px;
}
.aufg-card-btns button {
  flex: 1;
  padding: 8px 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--cream);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
}
.aufg-card-btns button:disabled {
  opacity: 0.4;
  cursor: default;
}

.protokoll-copy-btn {
  width: 100%;
  padding: 11px;
  background: var(--cream-dark);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
}

