/* Das 20-Minuten-Magazin — Voting/Build console.
   Stage-first (dark), on the "…wirkt!" brand: Playfair headlines, Inter body,
   emerald accent, warm-stone neutrals. Big type for a beamer. */

:root {
  --bg: #14130f;          /* warm near-black stage ground */
  --bg-2: #1c1a15;
  --panel: #201e18;
  --line: #34302733;
  --line-solid: #3a352b;
  --ink: #f4f1ea;         /* warm off-white */
  --muted: #b7b0a2;
  --faint: #8a8477;
  --accent: #34d399;      /* emerald-400 */
  --accent-deep: #059669; /* emerald-600 */
  --accent-soft: #34d39918;
  --serious: #7dd3fc;     /* sky — serious themes */
  --media: #34d399;       /* emerald — media themes */
  --humor: #fbbf24;       /* amber — humorous themes */
  --radius: 16px;
  --shadow: 0 18px 50px -20px #000000cc;
  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient backdrop: soft emerald glow + faint vignette */
.backdrop {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 78% 12%, #34d39912, transparent 70%),
    radial-gradient(70% 60% at 8% 92%, #05966912, transparent 70%),
    radial-gradient(120% 90% at 50% 0%, #000 78%, #00000000 100%);
}

.app { position: relative; z-index: 1; min-height: 100vh; }
.screen { min-height: 100vh; display: flex; flex-direction: column; }
[hidden] { display: none !important; }

/* ---------- shared bits ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .55em;
  font-size: clamp(.72rem, 1.1vw, .95rem);
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin: 0;
}
.live-dot {
  width: .62em; height: .62em; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent); animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 #34d39966; } 70% { box-shadow: 0 0 0 .7em #34d39900; }
  100% { box-shadow: 0 0 0 0 #34d39900; }
}
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ================= STAGE · VOTING ================= */
.screen--stage-voting { padding: clamp(1.5rem, 4vw, 3.5rem); }
.stage-head { text-align: center; margin-bottom: clamp(.7rem, 2vh, 1.5rem); }
.stage-title {
  font-family: var(--font-serif); font-weight: 800;
  font-size: clamp(2rem, 4.6vw, 3.8rem); line-height: 1.02;
  margin: .2em 0 .12em; letter-spacing: -.01em; text-wrap: balance;
}
.stage-sub { color: var(--muted); font-size: clamp(.95rem, 1.5vw, 1.25rem); margin: 0; }

.stage-grid {
  flex: 1; display: grid; grid-template-columns: 1fr minmax(250px, 26%);
  gap: clamp(1rem, 2.2vw, 2.2rem); align-items: stretch; min-height: 0;
}
@media (max-width: 900px) { .stage-grid { grid-template-columns: 1fr; } }

.stage-left { display: flex; flex-direction: column; gap: clamp(.6rem, 1.2vw, 1rem); min-height: 0; }

.themes { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(.55rem, 1.1vw, .9rem); align-content: start; }
@media (max-width: 640px) { .themes { grid-template-columns: 1fr; } }

.theme-row {
  position: relative; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line-solid);
  border-radius: 13px; padding: clamp(.6rem, 1.1vw, .95rem) clamp(.8rem, 1.4vw, 1.15rem);
  display: flex; flex-direction: column; gap: .3rem;
  transition: border-color .3s, transform .3s;
}
.theme-row .fill {
  position: absolute; inset: 0 auto 0 0; width: 0%;
  background: linear-gradient(90deg, var(--kind-soft), transparent);
  transition: width .8s cubic-bezier(.2,.8,.2,1); z-index: 0;
}
.theme-row.leading { border-color: var(--kind); transform: translateY(-2px); }
.theme-row > * { position: relative; z-index: 1; }
.theme-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.theme-name {
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(1.05rem, 1.8vw, 1.5rem); line-height: 1.1; margin: 0;
}
.theme-kind {
  font-size: .66rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--kind); font-weight: 700; padding: .18em .55em;
  border: 1px solid var(--kind); border-radius: 999px; white-space: nowrap;
}
.theme-desc { color: var(--muted); font-size: clamp(.78rem, 1vw, .92rem); margin: 0; }
.theme-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .05rem; }
.theme-cats { color: var(--faint); font-size: .72rem; }
.theme-count {
  font-variant-numeric: tabular-nums; font-weight: 700;
  font-size: clamp(1rem, 1.7vw, 1.4rem); color: var(--ink);
}
.theme-count .pct { color: var(--kind); font-size: .7em; margin-left: .35em; }

.theme-row[data-kind="seriös"]   { --kind: var(--serious); --kind-soft: #7dd3fc22; }
.theme-row[data-kind="medien"]   { --kind: var(--media);   --kind-soft: #34d39922; }
.theme-row[data-kind="humor"]    { --kind: var(--humor);   --kind-soft: #fbbf2422; }

/* join / QR panel */
.join {
  background: linear-gradient(180deg, var(--bg-2), var(--panel));
  border: 1px solid var(--line-solid); border-radius: var(--radius);
  padding: clamp(1rem, 1.5vw, 1.4rem); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .8rem; box-shadow: var(--shadow);
}
.qr {
  width: clamp(120px, 13vw, 180px); aspect-ratio: 1; background: #fff;
  border-radius: 12px; padding: 10px; display: grid; place-items: center;
}
.qr svg, .qr canvas { width: 100%; height: 100%; display: block; }
.join-url {
  font-weight: 600; font-size: clamp(.85rem, 1.2vw, 1.05rem); text-align: center;
  color: var(--ink); word-break: break-word; margin: 0;
}
.join-url b { color: var(--accent); }
.join-meta { width: 100%; display: flex; flex-direction: column; gap: 1rem; margin-top: .3rem; }
.votes { text-align: center; }
.votes span:first-child { font-family: var(--font-serif); font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.4rem); color: var(--accent); font-variant-numeric: tabular-nums; }
.votes-label { display: block; color: var(--faint); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.suggests-label, .field-label { color: var(--faint); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.suggests-list { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.suggests-list li { background: var(--accent-soft); border: 1px solid var(--line-solid); color: var(--ink); font-size: .9rem; padding: .28em .7em; border-radius: 999px; }
.suggests-list li.muted { color: var(--faint); background: transparent; }

/* ================= STAGE · BUILDING ================= */
.screen--stage-building { padding: clamp(1.5rem, 4vw, 3.5rem); }
.build-status { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem); margin: 0 auto clamp(1.2rem, 3vh, 2.4rem); width: 100%; max-width: 1100px; }
.counter { font-family: var(--font-serif); font-weight: 800; font-size: clamp(2rem, 5vw, 4rem); line-height: 1; display: flex; align-items: baseline; gap: .4rem; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.counter-of { font-family: var(--font-sans); font-weight: 500; font-size: clamp(.9rem, 1.5vw, 1.2rem); color: var(--muted); }
.progress { flex: 1; height: 12px; background: var(--panel); border: 1px solid var(--line-solid); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--accent-deep), var(--accent)); border-radius: 999px; transition: width .7s cubic-bezier(.2,.8,.2,1); }

.article-grid { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: clamp(.8rem, 1.6vw, 1.3rem); align-content: start; }
.article-card {
  background: var(--panel); border: 1px solid var(--line-solid); border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column; animation: pop .5s cubic-bezier(.2,.9,.2,1);
}
@keyframes pop { from { opacity: 0; transform: scale(.9) translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .article-card { animation: none; } }
.article-thumb { aspect-ratio: 3/2; background: linear-gradient(135deg, #2a271f, #201e18); background-size: cover; background-position: center; }
.article-body { padding: .7rem .85rem .9rem; display: flex; flex-direction: column; gap: .3rem; }
.article-cat { font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.article-title { font-family: var(--font-serif); font-weight: 600; font-size: 1rem; line-height: 1.2; margin: 0; color: var(--ink); }

/* ================= PHONE ================= */
.screen--phone { padding: clamp(1.2rem, 6vw, 2rem); align-items: center; }
.phone-inner { width: 100%; max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.1rem; padding: 1.5rem 0; }
.phone-head { text-align: left; }
.phone-title { font-family: var(--font-serif); font-weight: 800; font-size: clamp(1.9rem, 9vw, 2.6rem); line-height: 1.05; margin: .3em 0 .15em; }
.phone-sub { color: var(--muted); font-size: 1.02rem; margin: 0; }
.phone-themes { display: flex; flex-direction: column; gap: .6rem; }
.choice {
  text-align: left; width: 100%; cursor: pointer; color: var(--ink);
  background: var(--panel); border: 1.5px solid var(--line-solid); border-radius: 14px;
  padding: .9rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  transition: border-color .2s, background .2s, transform .1s;
}
.choice:active { transform: scale(.99); }
.choice[aria-pressed="true"] { border-color: var(--kind); background: linear-gradient(90deg, var(--kind-soft), var(--panel)); }
.choice[data-kind="seriös"] { --kind: var(--serious); --kind-soft: #7dd3fc22; }
.choice[data-kind="medien"] { --kind: var(--media); --kind-soft: #34d39922; }
.choice[data-kind="humor"]  { --kind: var(--humor); --kind-soft: #fbbf2422; }
.choice > span:first-child { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.choice-name { display: block; font-family: var(--font-serif); font-weight: 700; font-size: 1.2rem; margin: 0; line-height: 1.1; }
.choice-desc { display: block; color: var(--faint); font-size: .82rem; margin: 0; }
.choice-check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-solid); display: grid; place-items: center; flex: none; color: var(--bg); font-weight: 800; }
.choice[aria-pressed="true"] .choice-check { background: var(--kind); border-color: var(--kind); }

.phone-fields { display: flex; flex-direction: column; gap: .8rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field-label em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--faint); }
.field input {
  background: var(--bg-2); border: 1.5px solid var(--line-solid); border-radius: 12px;
  color: var(--ink); font-family: var(--font-sans); font-size: 1.05rem; padding: .8rem .9rem;
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field input::placeholder { color: var(--faint); }

.submit {
  border: none; border-radius: 999px; cursor: pointer;
  background: var(--accent); color: #06281d; font-weight: 700; font-size: 1.1rem;
  font-family: var(--font-sans); padding: 1rem 1.2rem; transition: filter .2s, opacity .2s, transform .1s;
}
.submit:active { transform: scale(.99); }
.submit:disabled { background: var(--line-solid); color: var(--faint); cursor: not-allowed; }
.submit--ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.phone-foot { color: var(--faint); font-size: .82rem; text-align: center; margin: .2rem 0 0; }

/* tone scale — vertical selector (phone) */
.tone { display: flex; flex-direction: column; gap: .6rem; padding: .2rem 0; }
.tone-scale { display: flex; flex-direction: column; gap: .5rem; }
.tone-opt {
  display: grid; grid-template-columns: 22px 1fr; align-items: center; gap: .85rem;
  text-align: left; width: 100%; cursor: pointer; color: var(--ink);
  background: var(--panel); border: 1.5px solid var(--line-solid); border-radius: 14px;
  padding: .8rem 1rem; transition: border-color .2s, background .2s, transform .1s;
}
.tone-opt:active { transform: scale(.99); }
.tone-opt[data-tone="serioes"]     { --tk: var(--serious); --tk-soft: #7dd3fc22; }
.tone-opt[data-tone="herzlich"]    { --tk: #f87171;        --tk-soft: #f8717122; }
.tone-opt[data-tone="lustig"]      { --tk: var(--media);   --tk-soft: #34d39922; }
.tone-opt[data-tone="sarkastisch"] { --tk: var(--humor);   --tk-soft: #fbbf2422; }
.tone-dot {
  width: 20px; height: 20px; border-radius: 50%; justify-self: center;
  border: 2px solid var(--line-solid); background: transparent; transition: background .2s, border-color .2s, box-shadow .2s;
}
.tone-opt[aria-pressed="true"] { border-color: var(--tk); background: linear-gradient(90deg, var(--tk-soft), var(--panel)); }
.tone-opt[aria-pressed="true"] .tone-dot { background: var(--tk); border-color: var(--tk); box-shadow: 0 0 0 4px var(--tk-soft); }
.tone-opt-text { display: flex; flex-direction: column; gap: .12rem; min-width: 0; }
.tone-opt-name { font-family: var(--font-serif); font-weight: 700; font-size: 1.15rem; line-height: 1.1; }
.tone-opt-desc { color: var(--faint); font-size: .84rem; }
.tone-opt[aria-pressed="true"] .tone-opt-name { color: var(--tk); }

/* tone distribution box (stage) — sits under the theme boxes, four across */
.tone-box { width: 100%; border: 1px solid var(--line-solid); border-radius: 13px; background: #ffffff05; padding: clamp(.7rem, 1.2vw, 1rem) clamp(.85rem, 1.4vw, 1.15rem); }
.tone-box-title { color: var(--faint); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 .7rem; }
.tone-dist-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(.7rem, 1.6vw, 1.4rem); }
@media (max-width: 640px) { .tone-dist-bars { grid-template-columns: repeat(2, 1fr); } }
.tone-dist-row { display: flex; flex-direction: column; gap: .28rem; }
.tone-dist-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.tone-dist-name { font-weight: 600; font-size: .92rem; color: var(--ink); }
.tone-dist-desc { color: var(--faint); font-size: .74rem; }
.tone-dist-n { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .92rem; color: var(--ink); }
.tone-dist-track { height: 7px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.tone-dist-fill { height: 100%; border-radius: 999px; background: var(--accent); width: 0%; transition: width .7s cubic-bezier(.2,.8,.2,1); }
.tone-dist-row[data-tone="serioes"]     .tone-dist-fill { background: var(--serious); }
.tone-dist-row[data-tone="herzlich"]    .tone-dist-fill { background: #f87171; }
.tone-dist-row[data-tone="lustig"]      .tone-dist-fill { background: var(--media); }
.tone-dist-row[data-tone="sarkastisch"] .tone-dist-fill { background: var(--humor); }

.phone-thanks { text-align: center; align-items: center; min-height: 60vh; justify-content: center; }
.thanks-check { width: 84px; height: 84px; border-radius: 50%; background: var(--accent-soft); border: 2px solid var(--accent); color: var(--accent); font-size: 2.6rem; display: grid; place-items: center; }
.phone-building { text-align: center; align-items: center; min-height: 60vh; justify-content: center; }
.counter--phone { flex-direction: column; align-items: center; gap: .2rem; }
.counter--phone .counter-of { font-size: .9rem; }

/* mock badge */
.mock-badge {
  position: fixed; right: 12px; bottom: 12px; z-index: 20;
  background: var(--humor); color: #3a2c05; font-weight: 800; font-size: .72rem;
  letter-spacing: .14em; padding: .4em .8em; border-radius: 999px; box-shadow: var(--shadow);
}
