/* ============================================================
   MEMEMIC - Design nach dem Vorbild "The Choicer Voicer"
   Helles Fernsehstudio: Himmelblau, weiße Tafeln, graue Rahmen,
   Überschriften weiß mit cyanfarbener Kontur.
   ============================================================ */

:root {
  --sky:      #bfe7f4;
  --sky2:     #d9f2fa;
  --panel:    #ffffff;
  --panel2:   #eef8fc;
  --edge:     #8fa2ab;
  --edge2:    #5d6f78;
  --ink:      #23323a;
  --muted:    #6d7f88;
  --cyan:     #29c3e6;
  --cyan2:    #7fd9ef;
  --btn1:     #dcf1f9;
  --btn2:     #a9d9ea;
  --magenta:  #ff1fd0;
  --dark:     #3a3a3a;
  --dark2:    #2e2e2e;
  --radius:   12px;
  --shadow:   0 2px 0 rgba(0,0,0,.14);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--sky);
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  min-height: 100%;
}
body {
  background-image:
    linear-gradient(180deg, #cfeef8 0%, var(--sky) 42%, #aeddec 100%);
  background-attachment: fixed;
}

.wrap { width: min(1000px, 94vw); margin: 0 auto; }

/* ------------------------------------------------------------ Typografie */

h1, h2, h3 {
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-weight: 700; margin: 0; line-height: 1.1;
}
h1 { font-size: clamp(30px, 6vw, 56px); }
h2 { font-size: clamp(20px, 3vw, 30px); }

/* Überschriften wie im Spiel: weiß mit cyanfarbener Kontur */
.shout {
  color: #fff;
  -webkit-text-stroke: 4px var(--cyan);
  paint-order: stroke fill;
  text-shadow: 0 3px 0 rgba(20,119,143,.45);
  letter-spacing: -.01em;
}

p { line-height: 1.6; color: #3d4d56; }
a { color: #1a90ae; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: Consolas, "Cascadia Mono", monospace; letter-spacing: .04em; }

/* ---------------------------------------------------------------- Header */

header.top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 0; flex-wrap: wrap;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 22px; font-weight: 700; text-decoration: none; color: var(--ink);
}
.logo .dot {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--panel); border: 2px solid var(--edge);
  border-radius: 10px; font-size: 17px;
}
.logo b { color: #1a90ae; }
.navlinks { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }

/* ----------------------------------------------------------------- Tafeln */

.card {
  background: var(--panel);
  border: 2px solid var(--edge);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.hero { padding: clamp(20px, 4vw, 38px); margin-top: 10px; }

.kicker {
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: #14778f;
  background: var(--panel2); border: 2px solid var(--cyan2);
  border-radius: 999px; padding: 5px 13px; margin-bottom: 16px;
}
.hl  { color: #1a90ae; }
.hl2 { color: #c2179e; }

/* ---------------------------------------------------------------- Knöpfe */

.btn {
  appearance: none; cursor: pointer;
  /* verhindert den Zoom beim Doppeltippen und die 300-ms-Verzoegerung */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  font: 700 15px/1 "Trebuchet MS", "Segoe UI", sans-serif;
  padding: 13px 22px;
  border-radius: 11px;
  background: linear-gradient(180deg, var(--btn1), var(--btn2));
  color: var(--ink);
  border: 2px solid var(--edge2);
  box-shadow: 0 2px 0 rgba(0,0,0,.18), inset 0 1px 0 #fff;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: filter .1s, transform .06s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(2px); box-shadow: 0 0 0 rgba(0,0,0,.18), inset 0 1px 0 #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.btn.pink {
  background: linear-gradient(180deg, #ffd3f4, #f79fe0);
  border-color: #a3308a;
}
.btn.ghost { background: linear-gradient(180deg, #fff, #e8f4f9); }
.btn.small { padding: 8px 13px; font-size: 13px; border-radius: 9px; }

/* ------------------------------------------------------------- Preis-Box */

.pricebox {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  margin-top: 20px; padding: 16px;
  border: 2px solid var(--cyan2); border-radius: var(--radius);
  background: var(--panel2);
}
.price { font-size: 42px; font-weight: 700; line-height: 1; color: #14778f; }
.price s { color: var(--muted); font-size: 21px; margin-right: 9px; }

/* "License Key" - so heisst der Zugangs-Code bei Payhip. Wer danach nicht
   sucht, findet ihn nicht, also faellt der Begriff hier bewusst auf. */
.lizenz {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--panel2);
  border: 1.5px solid var(--cyan2);
  color: #0d6f88;
  font-weight: 700;
  white-space: nowrap;
}

.badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
  border: 2px solid var(--edge); color: var(--muted); background: #fff;
}
.badge.on   { border-color: #46a83c; color: #2f7a28; }
.badge.warn { border-color: #d08a1c; color: #96620d; }

/* -------------------------------------------------- Kauf + Code einlösen */

.steps2 {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px; margin-bottom: 16px;
}
.s2 { display: flex; gap: 10px; align-items: flex-start; }
.s2num {
  flex: 0 0 auto; width: 27px; height: 27px; display: grid; place-items: center;
  border-radius: 8px; background: var(--btn2); border: 2px solid var(--edge2);
  font: 700 13px/1 "Trebuchet MS", sans-serif; color: var(--ink);
}
.codeform { display: flex; gap: 9px; flex-wrap: wrap; }
.codeform input[type="text"] {
  flex: 1 1 240px; font-family: Consolas, monospace;
  letter-spacing: .12em; text-transform: uppercase;
}
.codeform input[type="text"]::placeholder { letter-spacing: .04em; text-transform: none; }

.restorebox {
  margin-top: 12px; padding: 13px 15px;
  border: 2px dashed var(--cyan2); border-radius: var(--radius); background: var(--panel2);
}
.restorebox code {
  display: block; margin: 8px 0; padding: 10px 12px;
  background: #fff; border: 2px solid var(--edge); border-radius: 8px;
  font-size: 12px; word-break: break-all; color: #14778f;
}
.restorebox code.bigcode {
  font-size: clamp(18px, 5vw, 28px); font-weight: 700; letter-spacing: .16em;
  text-align: center; padding: 14px 10px; word-break: normal;
}

/* ------------------------------------------------------- Bezahl-Overlay */

.paylayer {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(30,52,62,.62);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 20px 12px; overflow-y: auto;
}
.paysheet {
  width: min(560px, 100%); background: #fff;
  border: 2px solid var(--edge2); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 16px 40px rgba(0,0,0,.35);
}
.payhead {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 16px; background: var(--panel2); border-bottom: 2px solid var(--edge);
}
.payhead b { display: block; font-size: 15px; }
.payfoot { padding: 11px 16px 14px; background: var(--panel2); color: var(--muted); line-height: 1.5; }
#checkout { min-height: 320px; background: #fff; }
.payloading { padding: 55px 18px; text-align: center; color: var(--muted); font-size: 14px; }

/* ----------------------------------------------------------------- Raster */

.grid3 {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 14px; margin-top: 20px;
}
.step { padding: 18px; background: var(--panel2); border: 2px solid var(--cyan2); border-radius: var(--radius); }
.step .num { font-size: 30px; font-weight: 700; color: var(--cyan); line-height: 1; }
.step h3 { font-size: 16px; margin: 6px 0 5px; }
.step p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* ------------------------------------------------------------------ Spiel */

.stage {
  margin: 12px 0 30px; padding: clamp(16px, 3vw, 30px);
  text-align: center; min-height: 430px;
  display: flex; flex-direction: column; justify-content: center;
}

.hud {
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 11px 14px; background: var(--panel);
  border: 2px solid var(--edge); border-radius: var(--radius);
}
.hud div { text-align: left; }
.hud .lbl { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hud .val { font-size: 20px; font-weight: 700; }
.hud .val.lime { color: #14778f; }
.hud .val.pink { color: #c2179e; }

.soundtitle {
  font-size: clamp(28px, 6.5vw, 56px); font-weight: 700;
  line-height: 1.05; margin: 4px 0; color: #fff;
  -webkit-text-stroke: 4px var(--cyan); paint-order: stroke fill;
}
.soundhint { color: var(--muted); font-size: 14.5px; margin-bottom: 16px; }
.phase {
  font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase;
  color: #14778f; font-weight: 700; margin-bottom: 10px;
}

/* Sprechblase des Moderators */
.host {
  position: relative;
  background: #fff; border: 2px solid var(--edge2); border-radius: var(--radius);
  padding: 14px 40px 14px 18px; margin: 0 auto 16px; max-width: 620px;
  text-align: left; font-size: 15.5px; color: var(--ink);
  box-shadow: var(--shadow);
}
.host::after {
  content: ""; position: absolute; right: 14px; bottom: 12px;
  width: 13px; height: 13px; border: 2px solid var(--edge);
  border-radius: 50%;
}

/* Clip-Fenster mit grauem Rahmen wie im Vorbild */
.screen {
  position: relative; width: 100%; max-width: 620px; margin: 0 auto 14px;
  aspect-ratio: 16 / 9; background: #000;
  border: 8px solid #9aa7ad; border-radius: 16px;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 0 rgba(0,0,0,.18);
}
.screen video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.screen .noclip { color: #9aa7ad; font-size: 13px; padding: 18px; }
.screen.audioonly { aspect-ratio: auto; height: 116px; }

/* Handy hat den Start verweigert - dann muss man antippen */
.screen.tippen { cursor: pointer; border-color: var(--cyan); }
.screen.tippen .noclip {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0,0,0,.45); color: #fff; font-size: 19px; font-weight: 700;
}

/* Wellenform-Kasten: schwarz mit cyanfarbenem Rahmen */
.viz {
  width: 100%; max-width: 620px; height: 108px; display: block; margin: 12px auto 4px;
  border-radius: 10px; background: #000; border: 4px solid var(--cyan2);
}

.recdot {
  width: 11px; height: 11px; border-radius: 50%; background: #e0202f;
  display: inline-block; margin-right: 7px; animation: pulse 1s infinite;
  box-shadow: 0 0 8px #e0202f;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* Großer Mikrofonknopf */
.micbtn {
  width: 150px; height: 66px; margin: 6px auto 0;
  border-radius: 33px; border: 3px solid var(--edge2);
  background: linear-gradient(180deg, #e2f4fb, var(--btn2));
  display: grid; place-items: center; font-size: 30px;
  box-shadow: 0 3px 0 rgba(0,0,0,.2), inset 0 2px 0 #fff;
}

.countdown {
  font-size: clamp(64px, 15vw, 132px); font-weight: 700; line-height: 1;
  color: #fff; -webkit-text-stroke: 4px var(--cyan2); paint-order: stroke fill;
}

.scorebig {
  font-size: clamp(52px, 12vw, 104px); font-weight: 700; line-height: 1;
  color: #fff; -webkit-text-stroke: 3px var(--cyan2); paint-order: stroke fill;
}
.rankstamp {
  display: inline-block; font-size: 25px; font-weight: 700;
  padding: 5px 18px; border: 3px solid currentColor; border-radius: 10px;
  margin: 6px 0 10px;
}

.meter {
  height: 14px; width: min(480px, 100%); margin: 10px auto;
  background: #fff; border: 2px solid var(--edge); border-radius: 999px; overflow: hidden;
}
.meter > i {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--magenta), #ffb32b, #37c24a);
  transition: width .8s ease;
}
/* Waehrend der Ausschnitt vorgespielt wird (nicht aufgenommen): cyan */
.meter > i.hoeren { background: linear-gradient(90deg, #00c8e6, #00e5ff); }
.recdot.hoeren { background: #00c8e6; box-shadow: 0 0 8px #00c8e6; }

.legend {
  display: flex; justify-content: center; gap: 18px;
  font-size: 12px; color: var(--muted); margin-top: 4px;
}
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 15px; height: 10px; display: inline-block; border-radius: 2px; }
.legend .sw.orig { background: #00e5ff; }
.legend .sw.take { background: #ff1fd0; }

.subscores { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; }
.chip {
  font-size: 12px; padding: 6px 11px; border-radius: 999px;
  border: 2px solid var(--cyan2); background: var(--panel2); color: var(--muted);
}
.chip b { color: var(--ink); }

.row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }

/* ------------------------------------------------------------------ Jury */

.judges {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px; margin: 14px auto 4px; max-width: 640px;
}
.judge {
  background: var(--panel); border: 2px solid var(--edge);
  border-radius: var(--radius); padding: 12px 10px; text-align: center;
  opacity: 0; transform: translateY(6px); animation: judgein .3s ease forwards;
  box-shadow: var(--shadow);
}
@keyframes judgein { to { opacity: 1; transform: none; } }
.judge .face { font-size: 25px; line-height: 1; }
.judge .name { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 5px 0 3px; }
.judge .pts { font-size: 30px; font-weight: 700; color: #14778f; line-height: 1; }
.judge .pts .of { font-size: 13px; color: var(--muted); }
.judge .say { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.4; min-height: 2.6em; }
.judge.absolut { border-color: var(--magenta); background: #fff0fb; }
.judge.absolut .pts { color: #c2179e; }

/* --------------------------------------------------------------- Spieler */

.players { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 12px 0; }
.pchip {
  border: 2px solid var(--edge); border-radius: 10px; padding: 9px 14px;
  font: 700 13px/1 "Trebuchet MS", sans-serif; color: var(--muted);
  background: #fff; cursor: pointer;
}
.pchip.active { border-color: var(--cyan); color: #14778f; background: var(--panel2); }

.packgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 12px 0 4px; }
.pack {
  background: #fff; border: 2px solid var(--edge); border-radius: var(--radius);
  padding: 13px 12px; cursor: pointer; text-align: left; color: var(--ink); font: inherit;
}
.pack:hover { border-color: var(--cyan); }
.pack.sel { border-color: var(--cyan); background: var(--panel2); }
.pack b { display: block; font-size: 16px; }
.pack span { font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------- Dub-Modus dunkel */

body.dub {
  background: var(--dark);
  background-image: repeating-linear-gradient(0deg, #3d3d3d 0 3px, var(--dark) 3px 9px);
}
body.dub .card, body.dub .hud {
  background: var(--dark2); border-color: #5a5a5a; color: #e9e9e9;
}
body.dub .hud .lbl, body.dub .soundhint, body.dub .muted, body.dub .judge .say { color: #a5a5a5; }
body.dub .host { background: #444; border-color: #6a6a6a; color: #eee; }
body.dub .logo, body.dub .hud .val { color: #eee; }
body.dub footer { color: #9a9a9a; }

/* Bedienfeld rechts wie im Dub-Modus des Vorbilds */
.dubpanel {
  background: var(--dark2); border: 2px solid #6a6a6a; border-radius: var(--radius);
  padding: 12px; display: grid; gap: 7px; align-content: start;
  min-width: 190px;
}
.dubpanel .head { color: #ddd; font-size: 13px; font-weight: 700; text-align: center; margin-bottom: 3px; }
.dubpanel .btn { width: 100%; font-size: 13px; padding: 9px 10px; }
.dubwrap { display: flex; gap: 14px; align-items: flex-start; justify-content: center; flex-wrap: wrap; }
.dubwrap .screen { margin: 0; flex: 1 1 380px; }

/* -------------------------------------------------------------- Tabellen */

table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid #c8dbe3; font-size: 13.5px; }
th { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
tr.me td { color: #14778f; font-weight: 700; }
td.rank { width: 40px; color: var(--muted); font-weight: 700; }

/* ---------------------------------------------------------------- Studio */

.dropzone {
  border: 3px dashed var(--cyan2); border-radius: var(--radius);
  padding: 32px 18px; text-align: center; color: var(--muted);
  cursor: pointer; background: var(--panel2);
}
.dropzone.hot { border-color: var(--cyan); color: #14778f; background: #e2f6fd; }

.soundlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 14px; }
.soundcard {
  display: flex; align-items: center; justify-content: space-between; gap: 9px;
  background: var(--panel2); border: 2px solid var(--edge); border-radius: var(--radius); padding: 11px 12px;
}
.soundcard b { display: block; font-size: 14px; }
.soundcard span { font-size: 11.5px; color: var(--muted); }
.iconbtn {
  background: #fff; border: 2px solid var(--edge); color: var(--ink);
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.iconbtn:hover { border-color: var(--cyan); color: #14778f; }
.iconbtn.del:hover { border-color: #c2179e; color: #c2179e; }

input[type="text"], input[type="password"], select {
  background: #fff; border: 2px solid var(--edge); color: var(--ink);
  border-radius: 9px; padding: 12px 13px; font-size: 16px;
  width: 100%; outline: none; font-family: inherit;
}
input[type="text"]:focus, input[type="password"]:focus { border-color: var(--cyan); }

/* ---------------------------------------------------------------- Footer */

footer { padding: 28px 0 44px; color: var(--muted); font-size: 12px; text-align: center; }

.notice {
  margin-top: 12px; padding: 11px 14px; border-radius: var(--radius);
  border: 2px solid var(--cyan2); background: var(--panel2); color: #14778f; font-size: 13px;
}
.notice.bad { border-color: #e08a8a; background: #fdeeee; color: #9c2b2b; }

.hidden { display: none !important; }

/* ============================================================
   Duell-Modus: Facecam, Lobby, Vergleich
   ============================================================ */

/* Kamerabild im grauen Rahmen, passend zum Clip-Fenster */
.camframe {
  position: relative; background: #10171b;
  border: 6px solid #9aa7ad; border-radius: 14px;
  overflow: hidden; aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 0 rgba(0,0,0,.18);
}
.camframe video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scaleX(-1);            /* Spiegel - so kennt man sich selbst */
  background: #10171b;
}
/* Fremde Aufnahmen nicht spiegeln, die sollen wirken wie gefilmt */
.vscard video { transform: none; }
.camframe.big { max-width: 420px; margin: 16px auto 10px; }
.camframe.small { border-width: 4px; border-radius: 11px; }
.camframe.rec { border-color: #e0202f; }

/* Muss ueber dem <video> liegen, sonst schiebt das leere Videofeld
   den Text an den Rand und schneidet ihn ab. */
.camoff {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #8fa2ab; font-size: 13px; text-align: center; padding: 14px; line-height: 1.5;
}
.camoff.big { font-size: 34px; }
.camoff.big span { font-size: 13px; }

.camwrap { display: flex; justify-content: center; }

/* Untertitel im Aufnahmebild - was gesagt werden soll */
.recline {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 9px 12px; background: rgba(0,0,0,.62);
  color: #fff; font-size: 16px; font-weight: 700; line-height: 1.3;
}

/* Spielerkacheln im Warteraum */
.camrow {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px; max-width: 640px; margin: 16px auto;
}
.camcard {
  background: var(--panel2); border: 2px solid var(--edge);
  border-radius: var(--radius); padding: 10px;
}
.camcard.bereit { border-color: #46a83c; background: #eefbec; }
.camcard b { display: block; font-size: 14px; margin-top: 8px; }
.camcard span { font-size: 12px; }
.camcard .ok { color: #2f7a28; font-weight: 700; }

/* Ohne Kamera gibt es nichts zu zeigen. Ein Bilderrahmen im 4:3-Format
   waere dann ein riesiger schwarzer Kasten mit einem Wort darin - bei
   einem einzelnen Spieler fuellt der den halben Bildschirm. Also flach. */
.camrow.nurton { grid-template-columns: repeat(auto-fit, minmax(150px, 200px)); justify-content: center; }
.camrow.nurton .camframe { aspect-ratio: auto; min-height: 62px; background: #eef7fa; border-color: var(--cyan2); }
.camrow.nurton .camoff { position: static; color: #2b6d80; font-size: 14px; padding: 10px; }

.roomcode {
  display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap;
  justify-content: center; margin: 4px auto 0; padding: 12px 18px;
  background: var(--panel2); border: 2px solid var(--cyan2); border-radius: var(--radius);
}
.roomcode .lbl { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.roomcode b {
  font-family: Consolas, monospace; font-size: clamp(26px, 7vw, 40px);
  letter-spacing: .1em; color: #14778f;
}

/* Gegner suchen */
.findbox {
  max-width: 420px; margin: 18px auto 0; padding: 18px;
  background: var(--panel2); border: 2px solid var(--cyan2); border-radius: var(--radius);
}
.btn.big { width: 100%; font-size: 19px; padding: 17px 22px; }

/* Dritte Kachel auf der Startseite: der eigene Raum, volle Breite */
.moduskarte.breit { grid-column: 1 / -1; }
.moduskarte.aktiv { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,196,228,.25); }

.startprivat {
  max-width: 560px; margin: 12px auto 0; padding: 16px; text-align: left;
  border: 2px solid var(--edge); border-radius: var(--radius); background: #fff;
  display: grid; gap: 12px;
}
.tonwahl { display: grid; gap: 6px; }
.tonwahlknoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tonwahlknoepfe .btn { width: 100%; }
.btn.ghost.aktiv { border-color: var(--cyan); background: var(--cyan); color: #fff; }

/* Frage nach dem Streamer-Modus - eine Zeile zum Anhaken */
.streamerfrage {
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  padding: 10px 12px; border-radius: 10px; background: #f2fafc;
  border: 2px solid #d6ecf3;
}
.streamerfrage input { margin-top: 3px; width: 17px; height: 17px; flex: 0 0 auto; }
.streamerfrage > span { display: grid; gap: 2px; }

/* Verdeckter Raum-Code */
.roomcode b.verdeckt { letter-spacing: .18em; color: #7d949c; }

/* Gruppe: eigenen Raum aufmachen oder einem beitreten */
.gruppe {
  max-width: 560px; margin: 18px auto 0; padding: 16px;
  border: 2px solid var(--edge); border-radius: var(--radius); background: #fff;
}
.gruppekopf { display: grid; gap: 3px; margin-bottom: 12px; }
.gruppekopf b { font-size: 15px; }
.gruppeknoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gruppeknoepfe .btn { width: 100%; padding: 14px 10px; font-size: 14.5px; }
/* Der gedrueckte Knopf muss sichtbar bleiben - sonst weiss man nach dem
   Aufklappen nicht mehr, ob man gerade eroeffnet oder beitritt. */
.gruppeknoepfe .btn.aktiv {
  border-color: var(--cyan); background: var(--cyan); color: #fff;
}
.codeleiste {
  display: grid; gap: 8px; text-align: left;
  margin-top: 14px; padding-top: 14px; border-top: 2px solid #e2eef3;
}
/* Nur die Feldbeschriftung ist Kleinkram in Grossbuchstaben - nicht jedes
   label in der Leiste. Die Streamer-Frage ist auch eins und stand sonst
   komplett in gesperrten Versalien da. */
.codeleiste label.feldname {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.codezeile { display: flex; gap: 10px; }
.codezeile .codein { flex: 1 1 auto; min-width: 0; }
.codezeile .btn { flex: 0 0 auto; white-space: nowrap; }
.codein {
  text-align: center; font-family: Consolas, monospace;
  font-size: 22px; letter-spacing: .3em; text-transform: uppercase;
}

/* Suchbildschirm mit Radar */
.radar {
  position: relative; width: 132px; height: 132px; margin: 10px auto 18px;
  display: grid; place-items: center;
}
.radar b { font-size: 42px; line-height: 1; }
.radar span {
  position: absolute; inset: 0; border: 3px solid var(--cyan);
  border-radius: 50%; opacity: 0; animation: puls 2.4s ease-out infinite;
}
.radar span:nth-child(2) { animation-delay: .8s; }
.radar span:nth-child(3) { animation-delay: 1.6s; }
@keyframes puls {
  0%   { transform: scale(.35); opacity: .85; }
  100% { transform: scale(1);   opacity: 0; }
}

/* Gegenüberstellung mit Urteil */
.vsgrid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 12px; margin: 14px auto; max-width: 700px;
}
.vscard {
  background: var(--panel2); border: 2px solid var(--edge);
  border-radius: var(--radius); padding: 10px;
  display: grid; gap: 7px; align-content: start;
}
.vscard.selbst { border-color: var(--magenta); background: #fff0fb; }
.vscard.sieger { border-color: #46a83c; box-shadow: 0 0 0 3px #cdeec8; }
.vscard .vshead { font-size: 13.5px; font-weight: 700; }
.vscard .camframe { aspect-ratio: 4 / 3; border-width: 4px; }
.vscard video { width: 100%; height: 100%; object-fit: contain; background: #000; }

/* Die Note von 1 bis 10 */
.notebig {
  font-size: 52px; font-weight: 700; line-height: 1; color: #fff;
  -webkit-text-stroke: 3px var(--cyan); paint-order: stroke fill;
}
.notebig span { font-size: 17px; -webkit-text-stroke-width: 2px; margin-left: 2px; }
.vscard.sieger .notebig { -webkit-text-stroke-color: #46a83c; }

.teile { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; font-size: 11px; }
.teile span {
  border: 1px solid var(--cyan2); border-radius: 999px;
  padding: 3px 8px; background: #fff; color: var(--muted);
}
.teile b { color: var(--ink); }
.jurysatz { line-height: 1.4; min-height: 2.6em; }

/* Das Kino: Szene mit getauschter Stimme und getauschtem Gesicht */
/* Die Leinwand richtet sich nach dem Clip (siehe kinoSpielen in duel.js) -
   deshalb keine feste Breite, sondern nur Obergrenzen. Sonst wuerde ein
   Hochformat-Clip die halbe Seite fuellen. */
.kinowrap {
  position: relative; width: fit-content; max-width: 100%; margin: 14px auto 4px;
}
#kino {
  max-width: 100%; max-height: 56vh; height: auto; display: block; background: #000;
  border: 6px solid #9aa7ad; border-radius: 14px;
  box-shadow: 0 3px 0 rgba(0,0,0,.18);
}
.kinolabel {
  position: absolute; left: 10px; right: 10px; bottom: 12px; z-index: 2;
  padding: 6px 10px; border-radius: 8px; text-align: center;
  background: rgba(0,0,0,.62); color: #fff;
  font-size: 14px; font-weight: 700;
}
.kinolabel.selbst { background: rgba(194,23,158,.78); }
.kinolabel.gegner { background: rgba(20,119,143,.78); }

.versteckt {
  position: absolute; width: 1px; height: 1px;
  opacity: 0; pointer-events: none; left: -9999px;
}

/* Laufender Zaehler: die Runde schaltet von selbst weiter */
.zaehler {
  margin-top: 12px; min-height: 1.4em;
  font-size: 13.5px; font-weight: 700; color: #14778f;
}
.zaehler.knapp { color: #c2179e; }
@media (prefers-reduced-motion: no-preference) {
  .zaehler.knapp { animation: pochen .6s ease-in-out infinite; }
}
@keyframes pochen { 50% { opacity: .45; } }

/* ------------------------------------------- Nachsprechen in Teilen */
/*
 * Ein Meme ist selten ein einziger Satz. Reden zwei Leute, wird Satz fuer
 * Satz nachgesprochen - erst der eine, anhoeren, notfalls nochmal, dann
 * der naechste. Die Leiste zeigt, wo man dabei steht.
 */
.teilhinweis {
  margin: 6px auto 0; max-width: 620px;
  font-size: 13.5px; font-weight: 700; color: #14778f;
}
.teilleiste {
  display: flex; gap: 7px; justify-content: center; flex-wrap: wrap;
  margin: 10px auto 4px; max-width: 620px;
}
.teilleiste span {
  min-width: 30px; padding: 4px 9px;
  border: 2px solid var(--edge); border-radius: 999px;
  background: var(--panel2); color: var(--muted);
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
}
.teilleiste span.dran {
  border-color: var(--magenta); background: var(--magenta); color: #fff;
}
.teilleiste span.fertig {
  border-color: #2c9b6a; background: #dff6ec; color: #1c6a48;
}

.pruefen {
  max-width: 520px; margin: 8px auto 0; padding: 14px 14px 10px;
  border: 3px solid var(--edge); border-radius: var(--radius);
  background: var(--panel); box-shadow: var(--shadow);
}
.pruefen .row { margin-top: 10px; }
.teilvideo {
  display: block; width: 100%; max-width: 320px; margin: 0 auto 10px;
  border: 3px solid var(--edge2); border-radius: 10px;
  background: #000; transform: scaleX(-1);      /* wie im Spiegel */
}
.btn.warnfarbe { border-color: #c2179e; color: #8d1173; }

/* --------------------------------------------------- Modus-Auswahl */
/* Zwei grosse Kacheln zum Antippen: mit Kamera oder nur mit Ton. */

.moduswahl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 620px;
  margin: 22px auto 0;
}

.moduskarte {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 16px 20px;
  background: var(--panel);
  border: 2px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  text-align: center;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.moduskarte:hover,
.moduskarte:focus-visible {
  border-color: var(--cyan);
  background: var(--panel2);
  transform: translateY(-2px);
}
.moduskarte .zeichen { font-size: 46px; line-height: 1; }
/* Kopf und Beschreibung gehoeren untereinander, nicht in eine Zeile */
.moduskarte .text { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.moduskarte .kopf { font-size: 20px; font-weight: 700; line-height: 1.2; }
.moduskarte .unter { font-size: 13px; color: var(--muted); max-width: 24ch; line-height: 1.35; }
.moduskarte .fahne {
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--edge2);
  border: 1px solid var(--edge);
  border-radius: 999px;
  padding: 2px 9px;
}
.moduskarte.empfohlen { border-color: var(--cyan); }
.moduskarte.empfohlen .fahne { color: var(--cyan); border-color: var(--cyan2); }

/* Nur-Ton-Modus: statt des Kamerabilds ein ruhiges Feld mit Mikro */
.tonbox {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
  padding: 26px 18px;
  background: var(--dark);
  border-radius: var(--radius);
  color: #e8f1f5;
}
.tonbox .zeichen { font-size: 52px; line-height: 1; }

/* ------------------------------------------------------------- Mobil */

@media (max-width: 700px) {
  .moduswahl { grid-template-columns: 1fr; gap: 12px; max-width: 420px; }
  .moduskarte { flex-direction: row; text-align: left; padding: 14px 16px; gap: 14px; }
  .moduskarte .zeichen { font-size: 34px; }
  .moduskarte .kopf { font-size: 17px; }
  .moduskarte .unter { font-size: 12px; max-width: none; }
  .moduskarte .fahne { display: none; }
  .moduskarte .text { align-items: flex-start; gap: 2px; }
  header.top { padding: 10px 0; }
  .logo { font-size: 18px; }
  .navlinks .btn { padding: 7px 10px; font-size: 12px; }
  .stage { min-height: 0; padding: 15px 12px 20px; }
  .hud { padding: 10px; gap: 8px 12px; }
  .hud > div { flex: 1 1 44%; }
  .hud .val { font-size: 17px; }
  .price { font-size: 34px; }
  .pricebox > div { flex: 1 1 100%; }
  .btn { width: 100%; }
  .btn.small, .navlinks .btn, .dubpanel .btn { width: auto; }
  .dubpanel .btn { width: 100%; }
  .judges { grid-template-columns: 1fr 1fr; gap: 8px; }
  .judge { padding: 10px 7px; }
  .judge .pts { font-size: 24px; }
  .judge .say { font-size: 10.5px; min-height: 3.4em; }
  .viz { height: 86px; border-width: 3px; }
  .screen { border-width: 6px; }
  .screen.audioonly { height: 92px; }
  .host { padding: 12px 34px 12px 14px; font-size: 14.5px; }
  .chip { font-size: 11px; padding: 5px 9px; }
  /* fuenfte Spalte gibt es nur in der Solo-Tabelle */
  #finTable th:nth-child(5), #finTable td:nth-child(5) { display: none; }
  .paylayer { padding: 8px 5px; }
  .shout, .soundtitle { -webkit-text-stroke-width: 2px; }

  /* Duell auf dem Handy */
  .camframe { border-width: 4px; }
  /* Auf kleinen Schirmen darf das Kamerabild nicht den Knopf verdraengen */
  .camframe.big { max-width: min(100%, 44vh); margin: 10px auto 8px; }
  .stage .meter { margin: 8px auto; }
  .camrow { grid-template-columns: 1fr 1fr; gap: 8px; }
  .camcard { padding: 8px; }
  .vsgrid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .vscard { padding: 7px; }
  .vscard .vshead { font-size: 12px; }
  .notebig { font-size: 40px; }
  .teile { font-size: 10px; }
  .teile span { padding: 2px 6px; }
  .jurysatz { font-size: 11px; min-height: 3.4em; }
  /* Nebeneinander wird auf dem Handy zu eng - beide Knoepfe brechen sonst
     mitten im Wort um. Untereinander bleiben sie lesbar. */
  .gruppeknoepfe { grid-template-columns: 1fr; }
  .gruppe, .startprivat { padding: 12px; }
  .tonwahlknoepfe { grid-template-columns: 1fr 1fr; }
  .codezeile { flex-wrap: wrap; }
  .codezeile .codein { flex-basis: 100%; }
  .codezeile .btn { width: 100%; }
  .codein { font-size: 19px; letter-spacing: .22em; }
  .recline { font-size: 14px; padding: 7px 10px; }
  .roomcode { gap: 9px; padding: 10px 13px; width: 100%; }
  .roomcode .btn.small { width: auto; }
  .stars button { font-size: 31px; }
  #roundTable th:nth-child(6), #roundTable td:nth-child(6) { display: none; }
}

@media (max-width: 330px) {
  .judges { grid-template-columns: 1fr; }
}

/* ========================================================== Support

   Ein Fenster, zwei Eingaenge: auf der Startseite nur Fragen zur Bezahlung,
   im Spiel der volle Support (Fehler, Beschwerde, Frage). Der Kunde braucht
   dafuer weder Konto noch Mailadresse - der Browser merkt sich den Vorgang.
   ========================================================================= */

.supknopf { position: relative; }
.supknopf .neu {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px;
  padding: 0 4px; border-radius: 9px; background: var(--magenta); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 1px 0 rgba(0,0,0,.2);
}

.suplayer {
  position: fixed; inset: 0; z-index: 90; display: flex;
  align-items: center; justify-content: center; padding: 16px;
  background: rgba(24,40,48,.55); backdrop-filter: blur(2px);
}
.supsheet {
  width: min(560px, 100%); max-height: min(88vh, 760px);
  display: flex; flex-direction: column;
  background: var(--panel); border: 2px solid var(--edge2);
  border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.3); overflow: hidden;
}
.suphead {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 15px; border-bottom: 2px solid var(--cyan2); background: var(--panel2);
}
.suphead b { font-size: 16px; }
.suphead .weg { margin-left: auto; }
.supzurueck {
  background: none; border: none; font-size: 19px; line-height: 1;
  color: var(--edge2); cursor: pointer; padding: 2px 4px;
}
.supbody { padding: 15px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.supfoot {
  border-top: 1px solid var(--cyan2); background: var(--panel2);
  padding: 11px 15px; display: grid; gap: 8px;
}

.suparten { display: grid; gap: 9px; margin: 4px 0 2px; }
.supart {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 13px 14px; border: 2px solid var(--edge); border-radius: var(--radius);
  background: var(--panel2); cursor: pointer; font: inherit; color: var(--ink);
  box-shadow: var(--shadow);
}
.supart:hover, .supart:focus-visible { border-color: var(--cyan); }
.supart .zeichen { font-size: 27px; line-height: 1; flex: 0 0 auto; }
.supart .text { display: grid; gap: 2px; min-width: 0; }
.supart b { display: block; font-size: 15px; color: var(--ink); }
.supart span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }

.supfeld {
  width: 100%; box-sizing: border-box; font: inherit; color: var(--ink);
  background: #f7fcfe; border: 2px solid var(--edge); border-radius: var(--radius);
  padding: 11px 12px; outline: none; resize: vertical;
}
.supfeld:focus { border-color: var(--cyan); }
textarea.supfeld { min-height: 120px; line-height: 1.45; }
.supzaehler { font-size: 11.5px; color: var(--muted); text-align: right; }

.suphinweis {
  background: var(--panel2); border: 1px solid var(--cyan2);
  border-radius: var(--radius); padding: 11px 13px; margin-bottom: 13px;
  font-size: 13px; line-height: 1.5; color: var(--ink);
}
.suphinweis ol { margin: 7px 0 0; padding-left: 19px; }
.suphinweis li { margin-bottom: 4px; color: var(--muted); }

/* Der Gespraechsverlauf */
.supthread { display: grid; gap: 9px; }
.supmsg {
  max-width: 86%; padding: 9px 12px; border-radius: 13px;
  font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word;
}
.supmsg.ich   { justify-self: end;   background: #fdeafa; border: 1px solid #f3b8e6; }
.supmsg.team  { justify-self: start; background: var(--panel2); border: 1px solid var(--cyan2); }
.supmsg .wann { display: block; margin-top: 4px; font-size: 10.5px; color: var(--muted); }
.supmsg.team .wer { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #1a90ae; }

.supstand {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px;
  border-radius: 999px; border: 1px solid var(--edge); font-size: 11.5px;
  color: var(--muted); background: var(--panel);
}
.supstand.neu      { border-color: var(--magenta); color: #c2179e; }
.supstand.offen    { border-color: var(--cyan);    color: #14778f; }
.supstand.erledigt { border-color: #46a83c;        color: #2f7a28; }

.supliste { display: grid; gap: 8px; }
.supzeile {
  display: flex; align-items: center; gap: 10px; text-align: left; width: 100%;
  padding: 10px 12px; border: 2px solid var(--edge); border-radius: var(--radius);
  background: var(--panel2); cursor: pointer; font: inherit; color: var(--ink);
}
.supzeile:hover { border-color: var(--cyan); }
.supzeile .zeichen { font-size: 20px; }
.supzeile .wo { flex: 1 1 auto; min-width: 0; }
.supzeile b { display: block; font-size: 14px; }
.supzeile small { color: var(--muted); font-size: 12px; display: block;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.supnummer { font-family: Consolas, "Cascadia Mono", monospace; letter-spacing: .06em; }

@media (max-width: 520px) {
  .suplayer { padding: 0; align-items: stretch; }
  .supsheet { width: 100%; max-height: 100%; border-radius: 0; border-width: 0; }
  .supmsg { max-width: 94%; }
}

/* Der Hinweisstreifen, der zum Support fuehrt - auf der Startseite unter der
   Bezahlung, im Spiel unter der Modus-Auswahl. */
.supporthinweis {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 20px; padding: 13px 15px;
  background: var(--panel2); border: 2px dashed var(--cyan2);
  border-radius: var(--radius);
}
.supporthinweis > div { flex: 1 1 260px; min-width: 0; text-align: left; }
.supporthinweis b { font-size: 14.5px; }
.supporthinweis .btn { flex: 0 0 auto; }

@media (max-width: 520px) {
  .supporthinweis { text-align: left; }
  .supporthinweis .btn { width: 100%; }
}
