/* ==========================================================================
   ZENTRALE TEXT-/BUTTON-FARBEN
   --------------------------------------------------------------------------
   Hier kannst du die Schriftfarben der Anwendung zentral ändern.

   --text-primary       = normale Hauptschrift
   --text-secondary     = sekundäre Schrift / Beschreibungen
   --text-muted         = dezente Hinweise
   --button-primary-text= Schrift auf GELBEN Primärbuttons
   --button-secondary-text = Schrift auf blauen Buttons
   --button-danger-text = Schrift auf roten Buttons

   Jeopardy und Schnitzeljagd können darunter separat überschrieben werden.
   ========================================================================== */
:root{
  --bg:#07142d; --panel:#0d2148; --panel2:#12315f; --accent:#f4c542;
  --text-primary:#ffffff;
  --text-secondary:#ffffff;
  --text-muted:#d7e0ef;
  --category-text:#ffffff;
  --tile-points-text:#f4c542;
  --button-primary-text:#07142d;
  --button-secondary-text:#ffffff;
  --button-danger-text:#ffffff;
  --hub-card-text:#172033;
  --hub-card-secondary-text:#4b5565;
  --text:#ffffff; --muted:#d7e0ef; --good:#45d483; --danger:#ff6b6b;
}

/* Jeopardy: nur diese Werte ändern, wenn du die Jeopardy-Schrift anpassen willst. */
body.jeopardy-page{
  --text-primary:#ffffff;
  --text-secondary:#ffffff;
  --text-muted:#d7e0ef;
  --category-text:#ffffff;
  --tile-points-text:#f4c542;
  --button-primary-text:#07142d;
  --button-secondary-text:#ffffff;
  --button-danger-text:#ffffff;
  --hub-card-text:#172033;
  --hub-card-secondary-text:#4b5565;
}

/* Schnitzeljagd: nur diese Werte ändern, wenn du die Schnitzeljagd-Schrift anpassen willst. */
body.scavenger-page{
  --text-primary:#ffffff;
  --text-secondary:#ffffff;
  --text-muted:#d7e0ef;
  --category-text:#ffffff;
  --tile-points-text:#f4c542;
  --button-primary-text:#07142d;
  --button-secondary-text:#ffffff;
  --button-danger-text:#ffffff;
  --hub-card-text:#172033;
  --hub-card-secondary-text:#4b5565;
}
*{box-sizing:border-box}

body{
  margin:0;
  font-family:Inter,system-ui,Arial,sans-serif;
  background:#f4f5f7;
  color:var(--text-primary);
  min-height:100vh;
}

body.jeopardy-page{
  background-color:#07142d;
  background-image:url("/background.webp");
  background-size:cover;
  background-position:center center;
  background-repeat:no-repeat;
  background-attachment:fixed;
  color:var(--text-primary);
}

body.scavenger-page{
  background-color:#07142d;
  background-image:
    linear-gradient(rgba(0,0,0,.22),rgba(0,0,0,.22)),
    url("/assets/schnitzeljagd-background.webp");
  background-size:cover;
  background-position:center center;
  background-repeat:no-repeat;
  background-attachment:fixed;
  color:var(--text-primary);
}
button,input,textarea{font:inherit} button{cursor:pointer;border:0;border-radius:10px;padding:10px 14px}
.container{max-width:1250px;margin:auto;padding:24px}.center{min-height:100vh;display:grid;place-items:center}
.card{background:rgba(13,33,72,.94);border:1px solid #254777;border-radius:18px;padding:24px;box-shadow:0 18px 50px #0004}
h1,h2,h3{margin-top:0}.muted{color:var(--text-muted)}.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
input,textarea,select{width:100%;background:#081a38;color:white;border:1px solid #31558c;border-radius:9px;padding:10px}
label{display:block;margin:12px 0 6px;color:var(--text-secondary)}
.primary{background:var(--accent);color:var(--button-primary-text);font-weight:800}.secondary{background:#254777;color:var(--button-secondary-text)}.danger{background:#8f2834;color:var(--button-danger-text)}.ghost{background:transparent;color:var(--button-secondary-text);border:1px solid #31558c}
.topbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}
.board{display:grid;grid-template-columns:repeat(var(--board-cols,5),minmax(120px,1fr));gap:8px}
.cat,.tile{background:linear-gradient(180deg,rgba(22,69,138,.68),rgba(14,46,99,.68));border:2px solid rgba(49,93,160,.78);border-radius:10px;text-align:center}
.cat{padding:16px 8px;font-weight:900;text-transform:uppercase;font-size:clamp(12px,1.4vw,18px);color:var(--category-text)}
.tile{min-height:105px;display:grid;place-items:center;color:var(--tile-points-text);font-weight:900;font-size:clamp(24px,3vw,42px)}
.tile.used{opacity:.25;filter:grayscale(.7);pointer-events:none}.tile.clickable:hover{transform:translateY(-2px);background:#1b519c}
.scorebar{display:flex;gap:10px;overflow:auto;margin:15px 0}.score{min-width:150px;background:#0d2148;border:1px solid #31558c;padding:10px 14px;border-radius:12px}.score b{font-size:24px}
.modal{position:fixed;inset:0;background:#000b;display:grid;place-items:center;padding:20px;z-index:10;overflow-y:auto}.question{max-width:900px;width:100%;max-height:calc(100vh - 40px);overflow-y:auto;background:#0d2148;border:2px solid #315da0;border-radius:22px;padding:35px;text-align:center}
.question .points{color:#f4c542;font-size:20px;font-weight:800}.question .text{font-size:clamp(25px,4vw,52px);font-weight:800;margin:30px 0}
.answer{background:#09213f;border-radius:12px;padding:20px;font-size:28px;margin:20px 0}.audio{width:100%;margin:20px 0}.video{display:block;width:min(100%,860px);max-height:55vh;margin:20px auto;border-radius:14px;border:1px solid #31558c;background:#000;box-shadow:0 12px 35px #0007}
.editor{display:grid;gap:12px}.category-editor{background:rgba(11,29,62,.78);border:1px solid rgba(44,79,132,.85);border-radius:15px;padding:16px}.clue-editor{display:block;margin-top:12px;padding:12px 0;background:transparent;border:0;border-radius:0;border-top:1px solid rgba(49,71,105,.55)}
.host-editor-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin:16px 0 10px;padding:4px 0}.host-editor-toolbar .row{margin:0}.host-editor-toolbar select{width:auto}.clue-main-row{display:grid;grid-template-columns:90px minmax(0,1fr) 120px;gap:10px;align-items:stretch}.clue-points{min-width:0}.clue-question{min-width:0;min-height:78px;resize:vertical}.clue-tips-toggle{height:100%;margin:0;justify-content:center;white-space:nowrap}.clue-answer{display:block;width:100%;min-height:78px;margin-top:10px;resize:vertical}.clue-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin-top:12px}.clue-action-buttons{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.clue-action-buttons .estimate-toggle{margin:0}.media-upload{display:inline-flex;align-items:center;justify-content:center;margin:0;min-width:110px}.media-block{display:grid;gap:8px}.media-label{font-size:13px}.clue-actions .audio{width:100%;margin:0}.clue-actions .video{width:min(100%,760px);max-height:360px;margin:0 auto}.clue-status{margin-top:0}.small{font-size:12px;color:var(--text-muted)}
.login{width:min(420px,92vw)}.code{font-size:28px;letter-spacing:5px;font-weight:900;color:#f4c542}
@media(max-width:850px){.board{grid-template-columns:repeat(var(--board-cols,5),minmax(90px,1fr))}.clue-main-row{grid-template-columns:80px minmax(0,1fr)}.clue-tips-toggle{grid-column:1/-1;justify-content:flex-start}.container{padding:12px}.tile{min-height:75px}}

.host-board-card{margin:15px 0}.host-board .tile{min-height:110px}.tile.empty{opacity:.35;color:#aebdd7;cursor:default}.host-board .tile:not(.used):hover{transform:translateY(-2px);background:#1b519c}.team-score{font-size:18px;margin-top:3px}.question-teams{margin-top:28px;text-align:left;background:#081a38;border:1px solid #31558c;border-radius:14px;padding:16px}.question-team{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid #254777}.question-team:last-child{border-bottom:0}.question-team small{display:block;color:var(--text-muted);margin-top:2px}.tile:disabled{cursor:default}.tile.used{cursor:pointer}.
@media(max-width:850px){.question-team{align-items:flex-start;flex-direction:column}}
.category-editor .row{align-items:flex-end}
.category-editor .row > div{min-width:0}
@media(max-width:850px){.category-editor .row{align-items:stretch;flex-direction:column}.category-editor .row button{width:100%}}
.player-score-header{margin:10px 0 18px;padding:16px 18px;background:rgba(8,26,56,.88);border:1px solid #31558c;border-radius:14px}.player-score-header h3{margin:0 0 8px}.player-score-panel{margin-top:24px;text-align:left;background:#081a38;border:1px solid #31558c;border-radius:14px;padding:16px}.player-score-panel .scorebar{margin:8px 0 0}.host-solution{margin-top:22px;text-align:left;background:#081a38;border:1px solid #31558c;border-radius:14px;padding:16px}.host-solution .answer{margin:8px 0 0}.player-answer{text-align:left}.player-answer .small{margin-bottom:6px}.question .score{min-width:140px}.question .score b{font-size:18px}
.estimate-toggle{display:flex;align-items:center;gap:8px;background:#081a38;border:1px solid #31558c;border-radius:9px;padding:9px 10px;margin:0 0 10px}.estimate-toggle input{width:auto;accent-color:#f4c542}
.estimate-host-panel,.estimate-player-panel,.revealed-estimates{margin-top:22px;text-align:left;background:#081a38;border:1px solid #31558c;border-radius:14px;padding:16px}.estimate-host-panel h3,.revealed-estimates h3{margin-bottom:8px}.estimate-list{display:grid;gap:8px;margin-top:12px}.estimate-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid #254777}.estimate-row:last-child{border-bottom:0}.estimate-value{margin-top:4px;font-size:20px;font-weight:800}.estimate-player-panel .estimate-input{font-size:24px;margin-top:10px}.revealed-estimate{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #254777;font-size:20px}.revealed-estimate:last-child{border-bottom:0}.revealed-estimate span{font-weight:900;color:#f4c542}
@media(max-width:850px){.estimate-row,.revealed-estimate{align-items:flex-start;flex-direction:column}.estimate-row button{width:100%}}
.question .text{white-space:pre-line}
.question-reveal-controls{display:flex;justify-content:center;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0 8px;padding:10px 12px;background:#081a38;border:1px solid #31558c;border-radius:12px}
.question-reveal-controls button:disabled{opacity:.45;cursor:default}
.question-progress{text-align:center;margin:8px 0 14px}

.tips-editor{margin:8px 0 12px;display:grid;gap:8px}
.tips-editor textarea{min-height:58px}
.question-tips-host,.question-tips-player{margin:14px 0;display:grid;gap:8px}
.question-tip-host,.question-tip-player{padding:10px 12px;border:1px solid rgba(255,255,255,.12);border-radius:10px;background:rgba(0,0,0,.18)}
.question-tip-host.revealed{border-color:rgba(69,212,131,.45)}

/* Screenshot support */
.question-image{display:block;width:auto;max-width:100%;max-height:58vh;margin:20px auto;border-radius:14px;border:1px solid #31558c;background:#000;box-shadow:0 12px 35px #0007;object-fit:contain}
.screenshot-preview{display:block;width:auto;max-width:min(100%,760px);max-height:360px;margin:0 auto;border-radius:12px;border:1px solid #31558c;background:#000;object-fit:contain}

.solution-image{display:block;width:auto;max-width:100%;max-height:55vh;margin:14px auto;border-radius:12px;border:1px solid #31558c;background:#000;object-fit:contain;box-shadow:0 12px 35px #0007}


/* Game-mode selection */
.mode-selection{
  min-height:100vh;
  position:relative;
  display:block;
  padding:110px 20px 40px;
  box-sizing:border-box;
  background-color:#07142d;
  background-image:
    linear-gradient(rgba(3,12,25,.28),rgba(3,12,25,.28)),
    url("/assets/hub-background.jpg");
  background-size:cover;
  background-position:center center;
  background-repeat:no-repeat;
  background-attachment:fixed;
  color:#fff;
}
.mode-selection-inner{width:min(1100px,94vw);margin:0 auto;text-align:center;}
.mode-selection h1{
  margin:0;
  font-size:clamp(32px,5vw,52px);
  font-weight:800;
  letter-spacing:-1px;
  text-shadow:0 3px 18px rgba(0,0,0,.65);
}
.mode-selection-subtitle{
  margin:10px 0 34px;
  color:rgba(255,255,255,.9);
  text-shadow:0 2px 12px rgba(0,0,0,.55);
  font-size:18px;
}
.mode-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:20px;
}
.mode-card{
  appearance:none;
  width:100%;
  min-height:270px;
  padding:34px 28px;
  border:1px solid #d9dde5;
  border-radius:20px;
  background:rgba(255,255,255,.86);
  color:var(--hub-card-text);
  box-shadow:0 10px 30px rgba(0,0,0,.24);
  backdrop-filter:blur(3px);
  -webkit-backdrop-filter:blur(3px);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  text-align:center;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.mode-card:hover{
  transform:translateY(-4px);
  border-color:#b8c0cf;
  box-shadow:0 16px 38px rgba(16,24,40,.12);
}
.mode-icon{font-size:54px;line-height:1}
.mode-title{font-size:27px;font-weight:800}
.mode-description{
  max-width:360px;
  color:var(--hub-card-secondary-text);
  line-height:1.55;
  font-size:15px;
}
.coming-soon-card{
  width:min(520px,92vw);
  text-align:center;
  background:#fff;
  color:#172033;
  border:1px solid #d9dde5;
}
.coming-soon-icon{font-size:62px;margin-bottom:8px}
.coming-soon-title{
  font-size:30px;
  font-weight:800;
  margin:8px 0 12px;
}
.scavenger-page .muted{color:#667085}
.scavenger-page .ghost{
  color:#fff;
  border-color:#31558c;
  background:transparent;
}
.scavenger-page .ghost:hover{
  color:#fff;
  background:rgba(49,85,140,.28);
}
.scavenger-page .geo-map-zoom-controls .ghost{
  color:#fff;
  background:#254777;
  border-color:#31558c;
  font-weight:800;
  min-width:42px;
}
@media(max-width:700px){
  .mode-grid{grid-template-columns:1fr}
  .mode-card{min-height:220px}
}


/* Theme selector for the public mode-selection / coming-soon pages */
.theme-switcher{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  width:max-content;
  margin:0 auto 28px;
  padding:4px;
  border:1px solid #d9dde5;
  border-radius:12px;
  background:#fff;
  box-shadow:0 6px 18px rgba(16,24,40,.06);
}
.theme-option{
  appearance:none;
  border:0;
  border-radius:9px;
  padding:8px 11px;
  background:transparent;
  color:#667085;
  font:inherit;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  transition:background .15s ease,color .15s ease,box-shadow .15s ease;
}
.theme-option:hover{color:#172033;background:#f2f4f7}
.theme-option.active{
  background:#172033;
  color:#fff;
  box-shadow:0 2px 7px rgba(16,24,40,.16);
}
.scavenger-page-content{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:32px 20px;
  position:relative;
}
.scavenger-page-content > .theme-switcher{
  position:absolute;
  top:24px;
  left:50%;
  transform:translateX(-50%);
}

/* Dark mode is intentionally scoped to the new public pages.
   The existing Jeopardy design remains independent. */
html.dark-mode body.mode-selection-page{
  background:#07142d;
}
html.dark-mode body.mode-selection-page .mode-selection{
  background-color:#07142d;
  background-image:
    linear-gradient(rgba(0,0,0,.38),rgba(0,0,0,.38)),
    url("/assets/hub-background.jpg");
  background-size:cover;
  background-position:center center;
  background-repeat:no-repeat;
  background-attachment:fixed;
  color:#f2f4f7;
}
html.dark-mode body.mode-selection-page .mode-selection-subtitle,
html.dark-mode body.mode-selection-page .mode-description{
  color:#a9b1bf;
}
html.dark-mode body.mode-selection-page .mode-card{
  background:rgba(25,29,36,.88);
  color:#f2f4f7;
  border-color:#2d3440;
  box-shadow:0 12px 32px rgba(0,0,0,.28);
}
html.dark-mode body.mode-selection-page .mode-card:hover{
  border-color:#465161;
  box-shadow:0 18px 42px rgba(0,0,0,.35);
}
html.dark-mode body.mode-selection-page .theme-switcher,
html.dark-mode body.scavenger-page .theme-switcher{
  background:#191d24;
  border-color:#2d3440;
  box-shadow:0 6px 18px rgba(0,0,0,.25);
}
html.dark-mode body.mode-selection-page .theme-option,
html.dark-mode body.scavenger-page .theme-option{
  color:#a9b1bf;
}
html.dark-mode body.mode-selection-page .theme-option:hover,
html.dark-mode body.scavenger-page .theme-option:hover{
  color:#f2f4f7;
  background:#242a33;
}
html.dark-mode body.mode-selection-page .theme-option.active,
html.dark-mode body.scavenger-page .theme-option.active{
  background:#f2f4f7;
  color:#101318;
}
html.dark-mode body.scavenger-page{
  background-color:#07142d;
  background-image:
    linear-gradient(rgba(0,0,0,.22),rgba(0,0,0,.22)),
    url("/assets/schnitzeljagd-background.webp");
  background-size:cover;
  background-position:center center;
  background-repeat:no-repeat;
  background-attachment:fixed;
  color:#f2f4f7;
}
html.dark-mode body.scavenger-page .coming-soon-card{
  background:#191d24;
  color:#f2f4f7;
  border-color:#2d3440;
  box-shadow:0 12px 32px rgba(0,0,0,.28);
}
html.dark-mode body.scavenger-page .scavenger-page-content .muted,
html.dark-mode body.scavenger-page .scavenger-page-content .coming-soon-card .muted{
  color:#a9b1bf;
}
html.dark-mode body.scavenger-page .scavenger-page-content .ghost{
  color:#f2f4f7;
  border-color:#465161;
  background:transparent;
}
@media(max-width:560px){
  .theme-option{padding:8px 9px}
  .theme-option span{display:none}
  .theme-switcher{margin-bottom:22px}
}

/* Question timer */
.question{position:relative}
.question-header{position:relative;min-height:104px;padding-right:190px;text-align:left}
.question-header .points{padding-top:8px;text-align:left}
.question-timer-wrap{position:absolute;top:0;right:0;display:flex;flex-direction:column;align-items:center;gap:8px}
.question-timer{
  --timer-progress:360deg;
  width:88px;
  height:88px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:conic-gradient(#24d7d0 var(--timer-progress),rgba(36,215,208,.18) 0deg);
  position:relative;
  box-shadow:0 0 0 2px rgba(36,215,208,.18);
}
.question-timer::after{
  content:"";
  position:absolute;
  inset:7px;
  border-radius:50%;
  background:#0d2148;
}
.question-timer-number{
  position:relative;
  z-index:1;
  color:#fff;
  font-size:26px;
  line-height:1;
  font-weight:900;
}
.question-timer.expired{
  background:conic-gradient(#24d7d0 0deg,rgba(36,215,208,.18) 0deg);
}
.question-timer-controls{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:5px;
  max-width:190px;
}
.question-timer-controls button{
  padding:6px 8px;
  min-width:42px;
  border-radius:8px;
  font-size:12px;
  font-weight:800;
}
.timer-start{background:#24d7d0;color:#062a2a}
.timer-stop{background:#254777;color:var(--button-secondary-text)}
.timer-cancel{background:#8f2834;color:var(--button-danger-text)}
.question-header + .video,
.question-header + .audio,
.question-header + .question-image,
.question-header + .text{margin-top:10px}
@media(max-width:650px){
  .question{padding:24px 18px}
  .question-header{min-height:118px;padding-right:0;padding-top:105px}
  .question-header .points{text-align:center;padding-top:0}
  .question-timer-wrap{top:0;left:50%;right:auto;transform:translateX(-50%)}
  .question-timer{width:76px;height:76px}
  .question-timer::after{inset:6px}
  .question-timer-number{font-size:22px}
}

/* Geo-Guesser / GamerMaps */
.geo-toggle { border-color: rgba(70, 211, 195, .45); }
.geo-question-locked { opacity: .85; border-color: rgba(70, 211, 195, .55); }
.geo-host-panel {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  margin:18px 0 14px;
  padding:14px 16px;
  border:1px solid rgba(70, 211, 195, .35);
  border-radius:14px;
  background:rgba(70, 211, 195, .07);
}
.geo-map-panel {
  margin:14px 0 18px;
  padding:10px;
  border-radius:16px;
  background:#071326;
  border:1px solid rgba(255,255,255,.12);
}
.geo-map-panel .small { margin:2px 4px 9px; }
.geo-map-frame {
  display:block;
  width:100%;
  height:min(68vh, 720px);
  min-height:420px;
  border:0;
  border-radius:12px;
  background:#071326;
}
.geo-locked-panel {
  margin:14px 0 18px;
  padding:22px;
  text-align:center;
  border:1px dashed rgba(70, 211, 195, .38);
  border-radius:14px;
  color:rgba(255,255,255,.8);
  background:rgba(70, 211, 195, .05);
}
@media (max-width: 700px) {
  .geo-map-frame { min-height:360px; height:62vh; }
}

/* Geo-Guesser: self-hosted interactive map */
.geo-map-toolbar{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;margin:2px 4px 10px}
.geo-map-zoom-controls{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.geo-team-controls{display:flex;gap:8px;flex-wrap:wrap}
.geo-map-shell{position:relative;width:100%;height:min(68vh,720px);min-height:420px;overflow:hidden;border-radius:12px;background:#071326;border:1px solid rgba(255,255,255,.10);user-select:none}
.geo-map-viewport{position:absolute;inset:0;overflow:hidden;cursor:grab;touch-action:none;background:#071326}
.geo-map-viewport.dragging{cursor:grabbing}
/* Let the browser rasterize tiles again at the current zoom scale. */
.geo-map-content{position:absolute;left:0;top:0;width:100%;height:100%;transform-origin:0 0}
.geo-map-image{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;background:#071326}
.geo-map-overview{position:absolute;left:0;top:0;width:100%;height:100%;object-fit:fill;display:block;z-index:0;pointer-events:none;user-select:none;-webkit-user-drag:none}
.geo-tile-layer{position:absolute;left:0;top:0;overflow:hidden;pointer-events:none}
.geo-map-tile{position:absolute;display:block;max-width:none;max-height:none;pointer-events:none;user-select:none;-webkit-user-drag:none}
.geo-map-marker-layer{position:absolute;inset:0;pointer-events:none}
.geo-marker{position:absolute;transform:translate(-50%,-50%);width:8px;height:8px;border-radius:50%;background:#46d3c3;border:1px solid #fff;box-shadow:0 0 0 2px rgba(0,0,0,.55),0 1px 5px rgba(0,0,0,.55);pointer-events:none}
.geo-marker span{position:absolute;left:50%;top:50%;width:3px;height:3px;background:#fff;border-radius:50%;transform:translate(-50%,-50%)}
.geo-marker b{position:absolute;left:9px;top:-8px;white-space:nowrap;background:rgba(0,0,0,.82);padding:3px 6px;border-radius:6px;font-size:11px;color:#fff;font-weight:700}
.geo-marker.revealed-team{background:#f3a63b}
.geo-marker.own{background:#46d3c3;z-index:4}
.geo-placement-layer{position:absolute;inset:0;z-index:6;cursor:crosshair;background:rgba(70,211,195,.04)}
.geo-placement-layer.active{display:block}
.geo-map-hint{position:absolute;left:10px;bottom:10px;z-index:7;padding:5px 8px;border-radius:7px;background:rgba(0,0,0,.72);color:rgba(255,255,255,.78);font-size:11px;pointer-events:none}
.geo-help{margin:9px 4px 0}
.geo-reveal-list{margin-top:12px;display:grid;gap:7px}
.geo-reveal-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:9px 10px;border:1px solid rgba(255,255,255,.09);border-radius:10px;background:rgba(255,255,255,.035)}
.geo-reveal-row span:first-child{display:flex;flex-direction:column;gap:2px}
.geo-reveal-row small{opacity:.65}
@media(max-width:700px){.geo-map-shell{min-height:360px;height:62vh}.geo-map-hint{font-size:10px}}

.geo-solution-panel{margin-top:14px;padding:14px;border:1px solid rgba(0,220,200,.28);border-radius:14px;background:rgba(0,220,200,.06)}
.geo-solution-actions{margin-top:10px;flex-wrap:wrap}
.geo-distance-list{margin-top:12px;display:grid;gap:7px}
.geo-distance-row{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:8px 10px;border-radius:9px;background:rgba(255,255,255,.04)}
.geo-distance-row strong{color:#35e0d0;white-space:nowrap}
.geo-marker.solution{pointer-events:none}
.geo-marker.solution span{background:#fff;border-color:#35e0d0;box-shadow:0 0 0 2px rgba(53,224,208,.25),0 0 10px rgba(53,224,208,.5)}
.geo-marker.solution b{background:#35e0d0;color:#071312}


/* Geo-Guesser: solution point editor */
.geo-editor-panel{margin:10px 0 14px;padding:12px;border:1px solid rgba(70,211,195,.28);border-radius:12px;background:rgba(70,211,195,.05);width:100%}
.geo-editor-map{position:relative;width:100%;aspect-ratio:3/2;min-height:240px;margin-top:10px;overflow:hidden;border-radius:10px;border:1px solid rgba(255,255,255,.12);background:#071326;touch-action:none;user-select:none;cursor:crosshair}
.geo-editor-content{position:absolute;overflow:visible;transform-origin:center center;width:100%;height:100%}
.geo-editor-content img{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none}.geo-editor-content .geo-map-overview{z-index:0}.geo-editor-content .geo-tile-layer{z-index:1}.geo-editor-content .geo-map-marker-layer{z-index:4}
.geo-editor-marker{position:absolute;transform:translate(-50%,-50%);width:8px;height:8px;border-radius:50%;background:#ff5d6c;border:1px solid #fff;box-shadow:0 0 0 2px rgba(0,0,0,.55),0 1px 6px rgba(0,0,0,.6);pointer-events:none;z-index:3}
.geo-editor-marker span{position:absolute;left:50%;top:50%;width:3px;height:3px;background:#fff;border-radius:50%;transform:translate(-50%,-50%)}
.geo-editor-marker.hidden{display:none}
.geo-editor-hint{position:absolute;left:8px;bottom:8px;z-index:5;padding:5px 8px;border-radius:7px;background:rgba(0,0,0,.72);color:rgba(255,255,255,.8);font-size:11px;pointer-events:none}
.geo-editor-controls{position:absolute;right:8px;top:8px;z-index:6;display:flex;gap:5px}
.geo-editor-controls button{min-width:38px}
.geo-editor-coords{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;white-space:nowrap}
.geo-distance-player{margin-top:14px;padding:14px;border:1px solid rgba(0,220,200,.28);border-radius:14px;background:rgba(0,220,200,.06)}
.geo-distance-player h3{margin:0 0 10px}
@media(max-width:700px){.geo-editor-map{min-height:200px}.geo-editor-hint{font-size:10px}}

/* Schnitzeljagd lobby / host / player entry */
.scavenger-entry-card{padding:34px 30px}
.scavenger-entry-actions{justify-content:center;flex-wrap:wrap}
.scavenger-auth-page{min-height:100vh}
.scavenger-host-container .topbar{align-items:flex-start}
.scavenger-room-panel{margin-top:8px;padding:20px;border:1px solid #31558c;border-radius:14px;background:#081a38;text-align:left}
.scavenger-room-panel h2{margin:0 0 8px}
.scavenger-team-list{margin-top:22px}
.scavenger-team-list h3{margin-bottom:8px}
.scavenger-team-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid #254777}
.scavenger-team-row:last-child{border-bottom:0}
.scavenger-lobby-card{text-align:center}
html.dark-mode body.scavenger-page .scavenger-entry-card{background:#191d24;color:#f2f4f7;border-color:#2d3440}
@media(max-width:700px){.scavenger-entry-actions{flex-direction:column}.scavenger-entry-actions button{width:100%}.scavenger-room-panel{padding:15px}}

/* Schnitzeljagd-Erweiterung */
.scavenger-host-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap}
.scavenger-score-card,.scavenger-preview-card,.scavenger-editor-section{margin-top:16px}
.scavenger-board{margin-top:16px;display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:10px}
.scavenger-riddle-tile{min-height:92px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.075);border-radius:14px;box-shadow:0 8px 24px rgba(0,0,0,.14)}
.scavenger-riddle-tile span{font-weight:800;font-size:1.05rem}.scavenger-riddle-tile small{opacity:.7;font-size:.78rem}
.scavenger-riddle-editor{padding:18px;margin-top:14px;border:1px solid rgba(255,255,255,.12);border-radius:14px;background:rgba(255,255,255,.07);box-shadow:0 8px 24px rgba(0,0,0,.14)}
.scavenger-riddle-editor label{display:block;margin-top:12px;margin-bottom:6px}.scavenger-riddle-editor textarea,.scavenger-riddle-editor input{width:100%;box-sizing:border-box}
.scavenger-tip-editor{margin-top:16px;padding:14px;border-radius:12px;border:1px solid rgba(70,211,195,.18);background:rgba(70,211,195,.035)}
.scavenger-tip-editor h4{margin:0 0 8px}.scavenger-tip-editor>div{margin-top:8px}
.scavenger-media-status{margin-top:8px;color:rgba(255,255,255,.65);font-size:.85rem}
.scavenger-riddle-modal{max-width:1100px}.scavenger-host-open-actions-top{display:flex;justify-content:flex-start;margin:10px 0 4px}.scavenger-host-open-actions-top .primary{margin:0}.scavenger-riddle-text{font-size:1.3rem;line-height:1.6;white-space:pre-wrap;margin:18px 0}
.scavenger-host-tips,.scavenger-solution-host,.scavenger-host-answers,.scavenger-award-panel,.scavenger-answer-upload{margin-top:18px;padding:14px;border-radius:14px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.035)}
.scavenger-tip-row{display:grid;grid-template-columns:90px 1fr auto;gap:10px;align-items:center;padding:9px 0;border-bottom:1px solid rgba(255,255,255,.07)}
.scavenger-tip-row:last-child{border-bottom:0}.scavenger-answer-review{padding:12px;margin-top:10px;border:1px solid rgba(255,255,255,.09);border-radius:12px;background:rgba(0,0,0,.10)}
.scavenger-answer-shot{display:block;max-width:min(100%,700px);max-height:420px;object-fit:contain;border-radius:10px;margin:10px 0;border:1px solid rgba(255,255,255,.12)}
.scavenger-award-row{display:grid;grid-template-columns:180px 180px 1fr;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid rgba(255,255,255,.07)}
.scavenger-award-row:last-child{border-bottom:0}.scavenger-award-row .row{flex-wrap:wrap}
.scavenger-geo-wrap{margin-top:18px}.scavenger-geo-wrap .geo-map-shell{height:min(62vh,650px);min-height:360px}
.scavenger-geo-marker{pointer-events:none}.scavenger-feedback{position:fixed;right:22px;bottom:22px;z-index:9999;padding:15px 18px;border-radius:12px;display:flex;align-items:center;gap:16px;box-shadow:0 12px 35px rgba(0,0,0,.35);color:#fff}.scavenger-feedback.correct{background:#15803d}.scavenger-feedback.wrong{background:#b91c1c}.scavenger-feedback button{color:var(--text-primary)}
@media(max-width:850px){.scavenger-board{grid-template-columns:repeat(2,minmax(120px,1fr))}.scavenger-award-row{grid-template-columns:1fr}.scavenger-tip-row{grid-template-columns:1fr}.scavenger-geo-wrap .geo-map-shell{min-height:320px;height:55vh}}

/* Schnitzeljagd: Host score controls and reset */
.scavenger-score-controls{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:8px}
.scavenger-score-controls input{width:92px;min-width:92px;text-align:center}
.scavenger-score-controls button{min-width:52px}
.scavenger-reset-panel{margin-top:14px;padding:12px 14px;border:1px solid rgba(255,107,107,.35);border-radius:12px;background:rgba(143,40,52,.08);display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.scavenger-reset-panel .danger{font-weight:800}
.scavenger-page .media-upload{color:var(--text-primary)}
.scavenger-page .media-upload:hover{color:var(--text-primary)}

/* Transparenz-Patch: blaue Fenster ca. 30% transparenter.
   Text, Eingabefelder und Buttons bleiben unverändert gut lesbar. */
.card,
.question,
.score,
.question-teams,
.player-score-header,
.player-score-panel,
.host-solution,
.estimate-host-panel,
.estimate-player-panel,
.revealed-estimates,
.question-reveal-controls,
.category-editor,
.clue-editor,
.scavenger-room-panel,
.scavenger-score-card,
.scavenger-preview-card,
.scavenger-editor-section {
  background-color: rgba(13, 33, 72, .70);
}

/* Dunklere Unterfenster ebenfalls etwas durchscheinender. */
.answer,
.estimate-toggle,
.scavenger-host-tips,
.scavenger-solution-host,
.scavenger-host-answers,
.scavenger-award-panel,
.scavenger-answer-upload {
  background-color: rgba(9, 33, 63, .70);
}

/* Schnitzeljagd-Rätsel-Editoren */
.scavenger-riddle-editor {
  background-color: rgba(13, 33, 72, .70);
}

/* Buzzer */
.buzzer-panel{margin:16px 0;padding:14px;border:1px solid #31558c;border-radius:14px;background:rgba(8,26,56,.88);text-align:left}
.buzzer-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.buzzer-button{min-width:180px;padding:14px 22px;border-radius:12px;border:2px solid #eab308;background:#eab308;color:var(--button-primary-text);font-weight:900;font-size:1.05rem;cursor:pointer;box-shadow:0 5px 0 rgba(0,0,0,.22)}
.buzzer-button:hover:not(:disabled){transform:translateY(-1px)}
.buzzer-button:disabled{opacity:.5;cursor:default}
.buzzer-button.buzzed{border-color:#22c55e;background:#15803d;color:var(--button-secondary-text)}
.buzzer-list{margin-top:10px;display:grid;gap:6px;max-height:190px;overflow:auto}
.buzzer-entry{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 10px;border-radius:9px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.08)}
.buzzer-entry small{display:block;color:var(--text-muted);margin-top:2px}
.team-buzzed{border-color:#22c55e !important;box-shadow:0 0 0 2px rgba(34,197,94,.65),0 0 18px rgba(34,197,94,.28)}

.team-players{
  margin:5px 0 6px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:5px;
  line-height:1.25;
}
.team-player-name{
  display:inline-block;
  padding:2px 7px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.1);
  font-size:.82rem;
}

/* Hub tile customization */
.mode-card.has-custom-bg{color:#fff;border-color:rgba(255,255,255,.35);text-shadow:0 2px 10px rgba(0,0,0,.7)}
.mode-card.has-custom-bg .mode-description{color:#fff;text-shadow:0 2px 10px rgba(0,0,0,.7)}
.hub-customize-button{margin-top:20px}
.hub-customizer-card{width:min(900px,94vw)}
.hub-customizer-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.hub-upload-label{margin-top:14px;width:100%}
.scavenger-background-card{margin-top:16px}
.scavenger-host-heading .row{justify-content:flex-end}
@media(max-width:850px){.hub-customizer-grid{grid-template-columns:1fr}.scavenger-host-heading .row{width:100%}.scavenger-host-heading .row button{flex:1}}

/* Central authentication / three-tile hub */
.mode-grid-three{grid-template-columns:repeat(3,minmax(0,1fr));}
.role-login-card{width:min(620px,94vw);text-align:center;}
.role-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:24px;}
.role-choice{min-height:150px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;}
.role-choice span{font-size:38px;line-height:1;}
.role-choice b{font-size:21px;}
.role-choice small{opacity:.8;}
@media(max-width:900px){.mode-grid-three{grid-template-columns:1fr;}.mode-card{min-height:220px;}}
@media(max-width:600px){.role-choice-grid{grid-template-columns:1fr;}}


/* Board tile customization */

.board .tile,.board .cat{overflow:hidden}
.category-style-controls{display:grid;grid-template-columns:minmax(180px,1fr) 170px auto;gap:10px;align-items:end;margin-top:8px}
.category-style-controls label{margin:0}
.category-style-controls select,.tile-style-inline select{width:100%}
.tile-style-inline{display:flex;align-items:end;gap:10px;flex-wrap:wrap}
.tile-style-inline label{margin:0;min-width:180px}
.tile-style-inline .media-upload{min-width:90px}
.board-style-card{background:#0b1d3e}
.host-board-card h3,.host-board-card h2,.host-board-card p,.host-board-card label,
.host-board-card .muted,.host-board-card .small,
body.jeopardy-page .container h1,body.jeopardy-page .container h2,body.jeopardy-page .container h3,
body.jeopardy-page .container p,body.jeopardy-page .container label{color:var(--text-primary)}
.host-board-card .muted,.host-board-card .small{color:var(--text-secondary)}
.scavenger-host-container h1,.scavenger-host-container h2,.scavenger-host-container h3,
.scavenger-host-container h4,.scavenger-host-container p,.scavenger-host-container label,
.scavenger-host-container .muted,.scavenger-host-container .small{color:var(--text-primary)}
.scavenger-host-container .muted,.scavenger-host-container .small{color:var(--text-secondary)}
.scavenger-host-container .card,.host-board-card .card{color:var(--text-primary)}
.role-login-card{position:relative}
.hub-customize-button{margin-top:18px}
@media(max-width:850px){
  .category-style-controls{grid-template-columns:1fr}
  .tile-style-inline{display:grid;grid-template-columns:1fr}
  .tile-style-inline label{min-width:0}
}

/* High-contrast host/player text overrides */
.host-board-card,
.host-board-card h1,
.host-board-card h2,
.host-board-card h3,
.host-board-card h4,
.host-board-card p,
.host-board-card label,
.host-board-card .muted,
.host-board-card .small,
.host-board-card .score b,
.host-board-card .team-score,
.host-board-card .cat,
.host-board-card .tile,
.scavenger-host-container,
.scavenger-host-container h1,
.scavenger-host-container h2,
.scavenger-host-container h3,
.scavenger-host-container h4,
.scavenger-host-container p,
.scavenger-host-container label,
.scavenger-host-container .score b,
.scavenger-host-container .team-score,
.scavenger-host-container .tile,
.scavenger-host-container .cat{color:var(--text-primary) !important}
.host-board-card .muted,
.host-board-card .small,
.scavenger-host-container .muted,
.scavenger-host-container .small{color:var(--text-secondary) !important;opacity:.9}
.question,
.question h1,
.question h2,
.question h3,
.question h4,
.question p,
.question label,
.question .text,
.question .answer,
.question .small,
.question .muted,
.question .question-team,
.question .question-team b,
.question .question-team small,
.question .estimate-value,
.question .estimate-row{color:var(--text-primary) !important}
.question .points{color:var(--tile-points-text) !important}
.scavenger-page .muted,
.scavenger-page .small,
.scavenger-page label{color:var(--text-secondary) !important;opacity:.9}
.scavenger-page .scavenger-host-container .muted,
.scavenger-page .scavenger-host-container .small{color:var(--text-primary) !important}


/* Spieleransicht: kompakter Kopf + Score-Kacheln ohne zusätzliche Übersichtsbox.
   Die Positionen sind bewusst hier zentral steuerbar. */
.player-view-container{
  max-width:none;
  width:100%;
  padding:10px 14px 18px;
}
.player-view-topbar{
  justify-content:flex-start;
  margin-bottom:6px;
}
.player-view-topbar > div{
  width:100%;
}
.player-view-topbar h1{
  margin:0;
  line-height:1.05;
  text-align:left;
}
.player-view-meta{
  margin-top:3px;
  line-height:1.15;
}
.player-scorebar{
  margin:0 0 9px;
}
.player-scorebar .scorebar{
  margin:0;
  gap:8px;
}
.player-scorebar .score{
  min-width:140px;
  padding:8px 12px;
}
.player-scorebar .score b{
  font-size:20px;
}
.player-view-container .board{
  margin-top:0;
}
.player-view-container .cat{
  padding:10px 6px;
}
.player-view-container .tile{
  min-height:94px;
}

/* Die Kategorie- und Punktfarben sind separat in :root bzw. body.jeopardy-page steuerbar. */
body.jeopardy-page{
  --category-text:#ffffff;
  --tile-points-text:#f4c542;
}
@media(max-height:900px) and (min-width:851px){
  .player-view-container{padding-top:7px;padding-bottom:10px}
  .player-view-topbar{margin-bottom:4px}
  .player-scorebar{margin-bottom:6px}
  .player-view-container .cat{padding:7px 5px}
  .player-view-container .tile{min-height:84px}
}
@media(max-width:850px){
  .player-view-container{padding:8px 10px 14px}
  .player-view-container .tile{min-height:75px}
}

/* Board-/Editor-Layout: keine separate Kachel für Board-Design, Hintergrund- oder Fragen-Editor. */
/* Avoid backdrop blur on scrolling boards: this card can span the entire editor. */
.host-board-card{background:rgba(13,33,72,.78)}
.host-board-card .cat,.host-board-card .tile{background:linear-gradient(180deg,rgba(22,69,138,.60),rgba(14,46,99,.60));}
.host-board-card .score{background:rgba(13,33,72,.78)}
.board-style-card,.scavenger-background-card{display:none !important}
.scavenger-host-container > .card{background:rgba(13,33,72,.78)}
.scavenger-host-container .scavenger-score-card,.scavenger-host-container .scavenger-preview-card,.scavenger-host-container .scavenger-editor-section{background:transparent;border:0;box-shadow:none;padding-left:0;padding-right:0}
.scavenger-host-container .scavenger-riddle-editor{background:transparent;border:0;border-top:1px solid rgba(255,255,255,.12);border-radius:0;padding-left:0;padding-right:0}
.scavenger-host-container .scavenger-board .tile{background:linear-gradient(180deg,rgba(22,69,138,.60),rgba(14,46,99,.60));}
.scavenger-host-toolbar{margin-top:4px}
.scav-editor-solution-panel{margin:14px 0;padding:12px;border:1px solid rgba(70,211,195,.28);border-radius:12px;background:rgba(70,211,195,.05)}
.scav-editor-map{position:relative;width:100%;height:min(52vh,520px);min-height:300px;margin-top:10px;overflow:hidden;border-radius:10px;border:1px solid rgba(255,255,255,.12);background:#071326;touch-action:none;user-select:none;cursor:crosshair}
.scav-editor-viewport{position:absolute;inset:0;overflow:hidden}
.scav-editor-content{position:absolute;transform-origin:0 0}
.scav-editor-content .geo-tile-layer{position:absolute;inset:0;z-index:1}
.scav-editor-viewport > [data-scav-editor-layer]{position:absolute;inset:0;z-index:3;pointer-events:none}
.scav-editor-viewport .geo-editor-marker{z-index:4;transform-origin:50% 50%}
.scav-editor-map .geo-editor-controls{z-index:8}


/* Quiz-Auswahl: Session-Aktion */
.hub-session-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.hub-session-actions-top{position:absolute;top:18px;right:22px;z-index:20;justify-content:flex-end;margin-top:0}
.hub-logout-button,.hub-customize-button{min-width:150px}
.hub-logout-button,.hub-customize-button{background:var(--primary,#f4c542)!important;color:var(--button-primary-text,#07142d)!important;border:1px solid rgba(0,0,0,.18)!important}
.hub-logout-button:hover,.hub-customize-button:hover{filter:brightness(1.06)}



/* Quiz-Auswahl: Layout */
.mode-selection .hub-title{
  text-align:center;
  margin-left:auto;
  margin-right:auto;
}
.mode-selection .mode-selection-subtitle{
  display:none!important;
}
.mode-selection .hub-cards{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:min(1100px,92vw);
  margin:0!important;
}
.mode-selection .hub-session-actions-top{
  position:absolute;
  top:18px;
  right:22px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  margin:0;
  z-index:50;
}

@media(max-width:900px){
  .mode-selection{
    padding-top:95px;
  }
  .mode-selection .hub-cards{
    position:relative;
    left:auto;
    top:auto;
    transform:none;
    width:100%;
    margin:35px auto 0!important;
  }
  .mode-selection .hub-session-actions-top{
    top:14px;
    right:14px;
  }
}

/* v20: Spieler-Scoreboard neben der geöffneten Jeopardy-Frage */
.player-question-modal{
  display:flex;
  align-items:center;
  justify-content:center;
}
.player-question-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 220px;
  gap:18px;
  width:min(1180px, calc(100vw - 40px));
  max-height:calc(100vh - 40px);
  align-items:stretch;
}
.player-question-layout > .question{
  width:auto;
  max-width:none;
  min-width:0;
  max-height:calc(100vh - 40px);
}
.player-side-scoreboard{
  min-width:0;
  max-height:calc(100vh - 40px);
  overflow-y:auto;
  box-sizing:border-box;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
  text-align:left;
}
.player-side-scoreboard-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.player-side-scoreboard .score{
  min-width:0;
  width:100%;
  box-sizing:border-box;
  margin:0;
  padding:11px 12px;
  border-radius:12px;
  text-align:left;
}
.player-side-scoreboard .score b{
  display:block;
  font-size:18px;
  line-height:1.2;
}
.player-side-scoreboard .score > div:last-child{
  margin-top:5px;
  font-weight:700;
}

@media (max-width:900px){
  .player-question-modal{align-items:flex-start;overflow-y:auto;padding:12px;}
  .player-question-layout{
    grid-template-columns:1fr;
    width:min(900px,100%);
    max-height:none;
  }
  .player-question-layout > .question,
  .player-side-scoreboard{max-height:none;}
  .player-side-scoreboard{order:2;}
}

.scavenger-map-status{padding:10px 12px;margin-top:8px;border:1px solid rgba(255,255,255,.10);border-radius:10px;background:rgba(255,255,255,.035);color:var(--text-secondary);}
.geo-map-content{overflow:visible}
.geo-tile-layer{position:absolute;inset:0;z-index:1;pointer-events:none}
.geo-map-tile{z-index:1}
.geo-map-unavailable{position:absolute;inset:0;display:grid;place-items:center;color:rgba(255,255,255,.78);font-weight:700;background:#071326}
/* v33: map markers must always sit above the overview and deep-zoom tiles. */
.geo-map-marker-layer{z-index:4;}
.geo-marker{z-index:5;}
.geo-marker.solution{z-index:7;}
.geo-map-overview{z-index:0;}
.geo-tile-layer{z-index:1;}
.geo-map-content{isolation:isolate;}
.scavenger-geo-wrap .geo-map-marker-layer{z-index:4;}
.scavenger-geo-wrap .geo-marker{z-index:5;}
.scavenger-geo-wrap .geo-marker.solution{z-index:7;}


/* v35: Schnitzeljagd-Scoreboard wie beim geöffneten Jeopardy-Fenster. */
.scavenger-board-page-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 220px;
  gap:18px;
  width:min(1180px,calc(100vw - 40px));
  margin:0 auto;
  align-items:start;
}
.scavenger-board-page-layout .scavenger-preview-card{margin-top:0;min-width:0}
.scavenger-board-scoreboard{width:220px}
.scavenger-riddle-modal-wrap{align-items:flex-start}
.scavenger-riddle-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 220px;
  gap:18px;
  width:min(1180px,calc(100vw - 40px));
  align-items:start;
}
.scavenger-riddle-layout > .scavenger-riddle-modal{
  width:auto;
  max-width:none;
  min-width:0;
}
.scavenger-modal-scoreboard{width:220px;max-height:calc(100vh - 40px)}
.scav-review-correct,.scav-review-wrong{
  border:1px solid rgba(255,255,255,.22);
  color:#fff !important;
  font-weight:800;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
}
.scav-review-correct{background:#15803d !important}
.scav-review-wrong{background:#b91c1c !important}
.scav-review-correct:hover:not(:disabled){background:#166534 !important}
.scav-review-wrong:hover:not(:disabled){background:#991b1b !important}
.scav-review-correct span,.scav-review-wrong span{color:#fff;font-size:1.15em;line-height:1}
@media(max-width:900px){
  .scavenger-board-page-layout,.scavenger-riddle-layout{grid-template-columns:1fr;width:min(900px,100%)}
  .scavenger-board-scoreboard,.scavenger-modal-scoreboard{width:auto;max-height:none;order:2}
  .scavenger-riddle-modal-wrap{padding:12px}
}


/* Pokémon Quiz */
.pokemon-mode-switch{
  display:flex;
  gap:8px;
  margin:0 0 16px;
  padding:6px;
  width:max-content;
  max-width:100%;
  background:rgba(8,26,56,.9);
  border:1px solid #31558c;
  border-radius:12px;
}
.pokemon-mode-switch button{
  border:1px solid transparent;
  background:transparent;
  color:var(--text);
  padding:10px 16px;
  border-radius:8px;
  font-weight:800;
  cursor:pointer;
}
.pokemon-mode-switch button.active{
  background:#1b519c;
  border-color:#4d82c7;
  color:#fff;
}
.pokemon-room-header{
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:flex-start;
  margin-bottom:16px;
}
.sequence-board{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:10px;margin-top:18px;overflow:auto}.sequence-column{display:grid;gap:8px;min-width:120px}.sequence-column .cat{min-height:58px;display:flex;align-items:center;justify-content:center;text-align:center;padding:8px}.sequence-column .tile{min-height:64px}.sequence-column .tile:disabled{opacity:.72;cursor:default}
.sequence-board-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap}.sequence-board-header h3{margin:0 0 4px}.sequence-board-editor{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:14px;margin-top:18px}.sequence-tile-editor{min-width:0}.sequence-tile{position:relative;min-height:0;aspect-ratio:1 / 1;border:1px solid var(--border);border-radius:14px;background:linear-gradient(145deg,rgba(255,255,255,.08),rgba(0,0,0,.18)),var(--surface-2);background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;overflow:hidden;box-shadow:0 8px 20px rgba(0,0,0,.16)}.sequence-tile span{font-size:58px;line-height:1;font-weight:900;color:#fff;text-shadow:0 3px 12px rgba(0,0,0,.75)}.sequence-tile.has-image{border-color:rgba(255,255,255,.3)}.sequence-tile-actions{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin-top:8px}.sequence-tile-actions .media-upload{flex:1;min-width:110px}.sequence-tile-actions button{min-height:38px}.sequence-empty{grid-column:1/-1;padding:28px;text-align:center;border:1px dashed var(--border);border-radius:12px}.sequence-teams-panel{margin-top:24px;padding-top:22px;border-top:1px solid var(--border)}.sequence-teams-header{align-items:center}.sequence-team-scorebar{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;margin-top:14px}.sequence-team-score{min-width:0}.sequence-team-heading{display:flex;justify-content:space-between;align-items:center;gap:10px}.sequence-team-controls{margin-top:10px}.sequence-team-controls input{width:90px;min-width:90px}.sequence-player-card{margin-top:24px}
@media(max-width:1100px){.sequence-board-editor{grid-template-columns:repeat(4,minmax(140px,1fr))}}
@media(max-width:850px){.pokemon-mode-switch{width:100%}.pokemon-mode-switch button{flex:1}.pokemon-room-header{flex-direction:column}.sequence-board-editor{grid-template-columns:repeat(2,minmax(130px,1fr))}.sequence-team-scorebar{grid-template-columns:1fr}}
@media(max-width:520px){.sequence-board-editor{grid-template-columns:1fr}}
.sequence-player-card{
  margin-top:24px;
}
@media(max-width:850px){
  .pokemon-mode-switch{width:100%}
  .pokemon-mode-switch button{flex:1}
  .pokemon-room-header{flex-direction:column}
  .sequence-board{grid-template-columns:repeat(5,minmax(100px,1fr))}
}

.sequence-player-grid{display:grid;grid-template-columns:repeat(5,minmax(140px,1fr));gap:14px;margin-top:18px}.sequence-player-tile{min-width:0;min-height:150px;perspective:1000px}.sequence-player-tile-inner{position:relative;width:100%;height:150px;transform-style:preserve-3d;transition:transform .55s ease}.sequence-player-tile.is-revealed .sequence-player-tile-inner{transform:rotateY(180deg)}.sequence-player-tile-face{position:absolute;inset:0;border:1px solid var(--border);border-radius:14px;backface-visibility:hidden;overflow:hidden;box-shadow:0 8px 20px rgba(0,0,0,.16)}.sequence-player-tile-front{display:flex;align-items:center;justify-content:center;background:linear-gradient(145deg,rgba(255,255,255,.08),rgba(0,0,0,.18)),var(--surface-2)}.sequence-player-tile-front span{font-size:58px;line-height:1;font-weight:900;color:#fff;text-shadow:0 3px 12px rgba(0,0,0,.75)}.sequence-player-tile-back{transform:rotateY(180deg);background-size:cover;background-position:center;background-color:var(--surface-2)}.sequence-tile-editor .sequence-tile[role="button"]{cursor:pointer}.sequence-tile-editor .sequence-tile[role="button"]:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(0,0,0,.22)}.sequence-tile-editor .sequence-tile.is-revealed{outline:2px solid rgba(255,255,255,.35)}
@media(max-width:850px){.sequence-player-grid{grid-template-columns:repeat(3,minmax(110px,1fr))}}
@media(max-width:520px){.sequence-player-grid{grid-template-columns:repeat(2,minmax(110px,1fr))}}

/* Pokémon Reihenfolge Quiz – Turn order, hearts and active team */
.sequence-team-score{
  min-width:218px;
  padding:10px 12px;
  transition:border-color .25s ease, opacity .25s ease;
}
.sequence-team-score.is-sequence-active,
.sequence-player-team.is-sequence-active{
  border-color:rgba(74,222,128,.85);
  box-shadow:0 0 0 1px rgba(74,222,128,.28), 0 0 24px rgba(74,222,128,.42), inset 0 0 18px rgba(74,222,128,.08);
}
.sequence-team-score.is-sequence-eliminated,
.sequence-player-team.is-sequence-eliminated{
  opacity:.42;
  filter:grayscale(.9);
  box-shadow:none;
}
.sequence-team-heading>div:first-child{display:flex;align-items:center;gap:9px;min-width:0}
.sequence-hearts{display:inline-flex;gap:2px;white-space:nowrap;font-size:15px;line-height:1}
.sequence-heart{color:rgba(255,255,255,.22);text-shadow:none}
.sequence-heart.alive{color:#ff5d6c;text-shadow:0 0 8px rgba(255,93,108,.35)}
.sequence-team-controls{align-items:center;flex-wrap:wrap}
.sequence-team-controls input{width:72px;min-width:72px}
.sequence-start-button{border:1px solid rgba(74,222,128,.5);background:rgba(74,222,128,.12);color:#b7f7c9;border-radius:9px;padding:8px 12px;cursor:pointer;font-weight:800}
.sequence-start-button:hover{background:rgba(74,222,128,.2)}
.sequence-start-button.active{background:rgba(74,222,128,.2);border-color:rgba(74,222,128,.9);color:#d8ffe2}
.sequence-start-button:disabled{opacity:.45;cursor:not-allowed}
.sequence-heart-loss{min-height:38px;padding:8px 10px;border:1px solid rgba(255,93,108,.45);border-radius:9px;background:rgba(255,93,108,.08);color:#ff8b96;cursor:pointer;font-weight:800}
.sequence-heart-loss:hover{background:rgba(255,93,108,.16)}
.sequence-heart-loss:disabled{opacity:.35;cursor:not-allowed}
.sequence-player-team{min-width:180px;padding:8px 12px;transition:border-color .25s ease,opacity .25s ease}
.sequence-player-team .sequence-team-heading>div:first-child{gap:7px}
.sequence-player-team .sequence-hearts{font-size:14px}
.sequence-player-team>span{font-size:15px}
@media(max-width:850px){
  .sequence-team-score{min-width:200px}
}

/* Pokémon Reihenfolge Quiz: Hauptkacheln + geöffnete ?-Boards */
.sequence-main-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(150px,1fr));
  gap:14px;
  margin-top:18px;
}
.sequence-main-tile{
  min-height:150px;
  border:1px solid rgba(255,255,255,.16);
  border-radius:16px;
  background:linear-gradient(145deg,rgba(255,255,255,.10),rgba(0,0,0,.20)),var(--surface-2);
  color:var(--text-primary);
  box-shadow:0 10px 26px rgba(0,0,0,.18);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  text-align:center;
  padding:16px;
}
button.sequence-main-tile{cursor:pointer}
button.sequence-main-tile:hover{transform:translateY(-2px);box-shadow:0 14px 30px rgba(0,0,0,.24);background:linear-gradient(145deg,rgba(255,255,255,.14),rgba(0,0,0,.22)),var(--surface-2)}
.sequence-main-tile-number{font-size:14px;font-weight:900;opacity:.6}
.sequence-main-tile-title{font-size:clamp(20px,2.2vw,30px);font-weight:900;line-height:1.15}
.sequence-main-tile small{opacity:.65}
.sequence-editor-section{margin-top:28px;padding-top:24px;border-top:1px solid var(--border)}
.sequence-group-editor-list{display:grid;gap:18px;margin-top:16px}
.sequence-group-editor{margin:0;background:rgba(8,26,56,.55)}
.sequence-group-editor-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap}
.sequence-group-editor-head h3{margin:4px 0 0}
.sequence-group-editor-head .row{align-items:center;margin:0}
.sequence-group-editor-head input{min-width:260px}
.sequence-group-board-header{margin-top:18px}
.sequence-group-board-header h4{margin:0 0 4px}
.sequence-group-editor-grid{grid-template-columns:repeat(5,minmax(120px,1fr));margin-top:14px}
.sequence-tile-preview{position:relative;min-height:0;width:100%;aspect-ratio:1 / 1;background:linear-gradient(145deg,rgba(255,255,255,.08),rgba(0,0,0,.18)),var(--surface-2);background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center}
.sequence-tile-preview span{font-size:58px;line-height:1;font-weight:900;color:#fff;text-shadow:0 3px 12px rgba(0,0,0,.75)}
.sequence-overlay-grid{display:grid;grid-template-columns:repeat(10,minmax(90px,1fr));gap:14px;margin-top:18px}
.sequence-overlay-tile-wrap{min-width:0}
.sequence-overlay-tile{position:relative;min-height:0;aspect-ratio:1 / 1;border:1px solid var(--border);border-radius:14px;background:linear-gradient(145deg,rgba(255,255,255,.08),rgba(0,0,0,.18)),var(--surface-2);overflow:hidden;box-shadow:0 8px 20px rgba(0,0,0,.16);display:flex;align-items:center;justify-content:center}
.sequence-overlay-tile[role="button"]{cursor:pointer}
.sequence-overlay-tile[role="button"]:hover{transform:translateY(-2px);box-shadow:0 12px 26px rgba(0,0,0,.24)}
.sequence-overlay-tile.is-revealed{outline:2px solid rgba(74,222,128,.5)}
.sequence-overlay-image{position:absolute;inset:0;background-size:cover;background-position:center}
.sequence-overlay-question{font-size:58px;font-weight:900;text-shadow:0 3px 12px rgba(0,0,0,.75)}
.sequence-overlay-revealed{position:absolute;right:8px;top:8px;border-radius:999px;padding:4px 8px;background:rgba(15,120,65,.88);font-weight:900}
.sequence-group-modal-wrap{align-items:flex-start;padding:20px;overflow-y:auto}
.sequence-group-modal-layout{width:min(1800px,calc(100vw - 40px));margin:auto}
.sequence-group-modal{width:100%;max-width:none;background:rgba(13,33,72,.40);border:2px solid #315da0;border-radius:22px;padding:24px;box-shadow:0 24px 70px rgba(0,0,0,.45)}
.sequence-modal-header{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;flex-wrap:wrap}
.sequence-modal-header h2{margin:3px 0 6px;font-size:clamp(28px,4vw,42px)}
.sequence-modal-scoreboard{margin-top:24px;padding-top:20px;border-top:1px solid var(--border)}
.sequence-player-main-grid{margin-top:18px}
.sequence-player-main-grid .sequence-main-tile{min-height:170px}
@media(max-width:1000px){
  .sequence-main-grid,.sequence-overlay-grid,.sequence-group-editor-grid{grid-template-columns:repeat(3,minmax(120px,1fr))}
}
@media(max-width:700px){
  .sequence-main-grid,.sequence-overlay-grid,.sequence-group-editor-grid{grid-template-columns:repeat(2,minmax(110px,1fr))}
  .sequence-group-editor-head .row{width:100%;align-items:stretch;flex-direction:column}
  .sequence-group-editor-head input{min-width:0;width:100%;box-sizing:border-box}
  .sequence-group-modal{padding:16px}
}
@media(max-width:480px){
  .sequence-main-grid,.sequence-overlay-grid,.sequence-group-editor-grid{grid-template-columns:1fr}
}


body{isolation:isolate}

/* Empty teams stay manageable in preparation, but disappear from play scoreboards. */
.score.empty-team,.question-team.empty-team{display:none!important}
body:not(.qol-play) #hostArea .score.empty-team,
body:not(.qol-play) #scavHostArea .score.empty-team{display:block!important}

.player-hub-button{position:fixed;right:18px;bottom:16px;z-index:1100;min-width:76px;box-shadow:0 4px 14px #0005}
.sequence-player-main-grid .sequence-player-main-tile{
  background:linear-gradient(180deg,rgba(22,69,138,.88),rgba(14,46,99,.94));
  border:2px solid #3666a5;border-radius:14px;box-shadow:0 8px 22px #0004;color:#fff;
}
.sequence-player-main-tile .sequence-main-tile-title{color:var(--tile-points-text,#f4c542);overflow-wrap:anywhere}

body:has(#playerHubButton) .sequence-screen{padding-bottom:66px}

/* Keep the Jeopardy board itself centered, with equal room on either side. */
.jeopardy-player-view{
  box-sizing:border-box;min-height:100vh;min-height:100dvh;
  display:grid;place-items:center;padding:100px 24px;
}
.jeopardy-player-frame{position:relative;width:min(1100px,52vw,calc(100vw - 520px));min-width:0}
.jeopardy-player-view .player-view-topbar{
  position:absolute;bottom:100%;left:0;width:100%;margin:0 0 18px;
}
.jeopardy-player-view .player-view-topbar h1{font-size:clamp(22px,2vw,32px)}
.jeopardy-player-view #playerBoard{position:relative}
.jeopardy-player-view .board{grid-template-columns:repeat(var(--board-cols,5),minmax(0,1fr));grid-template-rows:minmax(46px,.65fr) repeat(5,minmax(0,1fr));height:68dvh;gap:8px}
.jeopardy-player-view .cat{display:grid;place-items:center;min-height:46px;box-sizing:border-box;padding:8px 6px;overflow-wrap:anywhere}
.jeopardy-player-view .tile{min-height:0;height:auto;padding:6px;font-size:clamp(22px,2.4vw,36px)}
.jeopardy-player-view .jeopardy-board-scoreboard{
  position:absolute;left:calc(100% + 20px);top:50%;transform:translateY(-50%);
  width:220px;max-height:calc(100dvh - 160px);overflow-y:auto;overflow-wrap:anywhere;
}
@media(max-width:1100px){
  .jeopardy-player-view{padding:32px 20px 80px}
  .jeopardy-player-frame{width:min(900px,100%)}
  .jeopardy-player-view .player-view-topbar{position:static;margin-bottom:18px}
  .jeopardy-player-view #playerBoard{display:flex;flex-direction:column;gap:18px}
  .jeopardy-player-view .jeopardy-board-scoreboard{position:static;transform:none;width:220px;max-width:100%;max-height:none;order:2;align-self:center}
  .jeopardy-board-scoreboard .player-side-scoreboard-list{display:grid;grid-template-columns:220px;gap:10px}
}
@media(max-width:600px){
  .jeopardy-player-view{padding:24px 10px 80px}
  .jeopardy-player-view .board{gap:5px;height:auto;grid-template-rows:auto}
  .jeopardy-player-view .cat{font-size:11px;padding:6px 3px}
  .jeopardy-player-view .tile{font-size:22px;height:56px}
}

.soullink-hub-tile{position:fixed;right:24px;bottom:24px;z-index:20;display:grid;grid-template-columns:36px 1fr;gap:2px 10px;align-items:center;padding:14px 20px;border:1px solid #80cee7;border-radius:16px;background:linear-gradient(130deg,#183c67,#28315c);color:white;text-decoration:none;box-shadow:0 8px 26px #0005;transition:transform .2s}.soullink-hub-tile>span{grid-row:span 2;font-size:36px;color:#87dfde}.soullink-hub-tile>small{opacity:.8}.soullink-hub-tile:hover{transform:translateY(-4px)}@media(max-width:600px){.soullink-hub-tile{position:static;margin:20px auto;width:max-content}}
/* Reihenfolge-Quiz (Host): Hauptkacheln ein-/ausklappen */
.sequence-group-toggle{display:flex;align-items:center;gap:12px;flex:1;min-width:0;padding:0;margin:0;background:none;border:0;box-shadow:none;color:inherit;text-align:left;cursor:pointer}
.sequence-group-toggle:hover h3{text-decoration:underline;text-underline-offset:3px}
.sequence-group-toggle:focus-visible{outline:2px solid #f4c542;outline-offset:4px;border-radius:8px}
.sequence-group-toggle>span:last-child{min-width:0}
.sequence-group-chevron{display:inline-grid;place-items:center;flex:none;width:32px;height:32px;border-radius:50%;background:rgba(255,255,255,.08);font-size:18px;transition:transform .15s ease}
.sequence-group-editor.is-collapsed .sequence-group-chevron{transform:rotate(-90deg)}
.sequence-group-editor.is-collapsed .sequence-group-body,.sequence-group-editor.is-collapsed .sequence-group-editor-head>.row{display:none}
.sequence-group-editor.is-collapsed{padding-top:12px;padding-bottom:12px}
.sequence-group-editor.is-collapsed .sequence-group-editor-head{align-items:center}
.sequence-collapse-all{margin:0;gap:8px}
