:root {
  --gelb: #ffed00;
  --schwarz: #000000;
  --tinte: #0d0d0d;
  --weiss: #ffffff;
  --violett: #8170ff;
  --violett-tief: #4a3bc4;
  --flaeche: #f4f4f2;
  --linie: #d9d9d9;
  --grau-text: #555555;
  --kante: 7px;
  --radius: 13px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--weiss);
  color: var(--tinte);
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 300;
  line-height: 1.5;
}
h1, h2, h3 { margin: 0; }
b { font-weight: 700; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 37px); }
.mt { margin-top: 16px; }

/* Die Klammer: Kante oben und rechts */
.klammer {
  border-top: var(--kante) solid var(--schwarz);
  border-right: var(--kante) solid var(--schwarz);
  border-radius: var(--radius);
}
.klammer-white { border-color: var(--weiss); }

/* Kopfleiste */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--schwarz); color: var(--weiss); }
.topbar-inner { display: flex; align-items: center; gap: 16px; min-height: 56px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.topbar-title { font-weight: 900; text-decoration: none; color: var(--gelb); letter-spacing: 0.02em; }
.topbar-nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1 1 auto; }
.topbar-nav a { text-decoration: none; font-size: 13px; font-weight: 600; padding: 8px 10px; border-radius: 999px; }
.topbar-nav a:hover { background: #222; }
.topbar-me { background: var(--gelb); color: var(--schwarz); border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 13px; min-height: 36px; }
.sync { font-size: 12px; min-width: 70px; color: #cfcfcf; }

/* Hero */
.hero { background: var(--gelb); padding: clamp(40px, 6vw, 72px) 0 clamp(48px, 7vw, 88px); }
.hero-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; }
.hero-head { position: relative; padding-top: 40px; }
.hero h1 { font-size: clamp(44px, 9vw, 108px); font-weight: 900; line-height: 0.98; }
.hero-sub { margin: 12px 0 0; font-size: clamp(20px, 3vw, 34px); font-weight: 800; }
.sticker {
  position: absolute; top: 0; right: 0;
  background: var(--weiss); padding: 8px 16px; font-weight: 600; font-size: 14px;
  transform: rotate(2deg);
  border-top: 4px solid var(--schwarz); border-right: 4px solid var(--schwarz); border-radius: 9px;
}
.lead { max-width: 740px; font-size: 17px; font-weight: 600; margin: 16px 0 0; }
.agenda { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 24px; }
.agenda li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,0.25); }
.agenda b { font-weight: 800; min-width: 50px; }
.agenda span { font-weight: 600; }

/* Abschnitte */
.sec { padding: clamp(56px, 8vw, 96px) 0; }
.sec > .wrap { display: flex; flex-direction: column; gap: 24px; }
.sec .lead { margin-top: -8px; }
.sec-grey { background: var(--flaeche); }
.sec-dark { background: var(--schwarz); color: var(--weiss); }
.sec-violet { background: var(--violett); }
.eyebrow { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; color: var(--violett-tief); }
.eyebrow-yellow { color: var(--gelb); }
.sec h2 { font-size: clamp(30px, 4.4vw, 52px); font-weight: 900; line-height: 1.05; margin-top: -12px; }
.sec h2 span { font-weight: 600; }
.sec h2.white { color: var(--weiss); margin-top: 0; }
.lead-dark { color: var(--schwarz); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.card { background: var(--weiss); padding: 22px; border-radius: var(--radius); }
.sec:not(.sec-grey) .card { background: var(--flaeche); }
.card h3 { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.card p { margin: 0; font-size: 14px; }

.box { background: var(--weiss); color: var(--tinte); padding: clamp(18px, 3vw, 32px); display: flex; flex-direction: column; gap: 16px; }
.box-yellow { background: var(--gelb); }
.box-light { background: var(--weiss); }
.box-label { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; }
.hint { margin: 0; font-size: 14px; }
.sec-dark .hint { color: #e6e6e6; }
.box .hint { color: var(--tinte); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

/* Eingabefelder */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13px; font-weight: 700; }
.field input, .field textarea, .wall-form input, .wall-form textarea, .login input, .vergleich-form input, .todo-form input, .upload-form input[type=text] {
  width: 100%; min-height: 46px; padding: 10px 12px;
  border: 2px solid var(--schwarz); border-radius: 10px; background: var(--weiss);
  font-size: 15px; font-weight: 400;
}
.field textarea, .wall-form textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .wall-form input:focus, .wall-form textarea:focus { outline: 3px solid var(--violett); outline-offset: 1px; }
.field .by { font-size: 11px; color: var(--grau-text); min-height: 14px; }

.btn { min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 2px solid var(--schwarz); font-weight: 700; font-size: 14px; background: var(--weiss); }
.btn-dark { background: var(--schwarz); color: var(--weiss); }
.btn-yellow { background: var(--gelb); color: var(--schwarz); }
.btn:disabled { opacity: 0.5; cursor: default; }

/* Ideen-Wände */
.wall { display: flex; flex-direction: column; gap: 12px; }
.wall-form, .todo-form, .vergleich-form, .upload-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.wall-form > input, .wall-form > textarea { flex: 1 1 280px; width: auto; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.items.long { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.item { background: var(--weiss); color: var(--tinte); border: 2px solid var(--schwarz); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.sec-grey .item, .box .item { background: var(--weiss); }
.item-text { margin: 0; font-size: 15px; font-weight: 600; white-space: pre-line; word-break: break-word; }
.item-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--grau-text); }
.item-actions { display: flex; gap: 6px; align-items: center; }
.vote { min-height: 36px; padding: 4px 12px; border-radius: 999px; border: 2px solid var(--schwarz); background: var(--weiss); font-weight: 700; font-size: 13px; color: var(--schwarz); }
.vote.on { background: var(--gelb); }
.del { min-height: 36px; min-width: 36px; border-radius: 999px; border: 0; background: transparent; font-size: 13px; color: var(--grau-text); text-decoration: underline; }
.item.mine { border-color: var(--violett); }
.empty { margin: 0; font-size: 14px; color: var(--grau-text); }
.sec-dark .empty { color: #cfcfcf; }

/* Prompts */
.prompt { background: var(--gelb); color: var(--schwarz); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.prompt-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }
.prompt-title { margin: 0; font-weight: 800; font-size: 14px; letter-spacing: 0.04em; }
.prompt-tool { font-size: 12px; font-weight: 700; background: var(--schwarz); color: var(--weiss); padding: 4px 10px; border-radius: 999px; }
.prompt-text { margin: 0; font-size: 14px; font-weight: 400; white-space: pre-line; background: var(--weiss); border-radius: 10px; padding: 12px 14px; max-height: 240px; overflow: auto; }
.prompt-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; font-weight: 600; }

.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.rules > div { border: 2px solid var(--weiss); border-radius: var(--radius); padding: 18px 20px; }
.rules h3 { font-size: 15px; font-weight: 800; color: var(--gelb); margin-bottom: 4px; }
.rules p { margin: 0; font-size: 14px; }

.rollen { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.rolle { text-align: left; border: 2px solid var(--schwarz); border-radius: var(--radius); padding: 14px 16px; background: var(--weiss); display: flex; flex-direction: column; gap: 2px; min-height: 88px; }
.rolle.taken { background: var(--gelb); }
.rolle.mine { background: var(--schwarz); color: var(--weiss); }
.rolle b { font-size: 15px; font-weight: 800; }
.rolle span { font-size: 13px; }
.rolle em { font-style: normal; font-size: 13px; font-weight: 700; margin-top: 4px; }

.task { display: flex; flex-direction: column; gap: 14px; padding-top: 24px; border-top: 2px solid #333; }
.task h3 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 900; color: var(--gelb); }

/* Upload */
.upload { display: flex; flex-direction: column; gap: 14px; }
.upload-form { background: var(--weiss); color: var(--tinte); padding: 14px; border-radius: var(--radius); }
.upload-form input[type=text] { flex: 1 1 220px; width: auto; }
.upload-form input[type=file] { flex: 1 1 220px; font-size: 14px; align-self: center; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.gallery .item img { width: 100%; height: 200px; object-fit: contain; background: var(--flaeche); border-radius: 8px; }

/* Pflichtangaben */
.pflicht { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 24px; }
.pflicht ul { margin: 0; padding-left: 18px; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }

/* Kalkulation */
.calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; align-items: start; }
.calc-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.calc-result { background: var(--weiss); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.calc-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 4px 0; border-bottom: 1px solid var(--linie); }
.calc-row.sum { font-weight: 700; border-bottom: 2px solid var(--schwarz); }
.calc-big { font-size: clamp(40px, 6vw, 64px); font-weight: 800; line-height: 1; margin: 10px 0 0; }
.calc-note { margin: 0; font-size: 13px; }

.vergleich { display: flex; flex-direction: column; gap: 10px; }
.vergleich-form input { flex: 1 1 140px; width: auto; }
.vergleich-form input.wide { flex: 3 1 240px; }
.vtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.vtable-wrap { overflow-x: auto; }
.vtable th, .vtable td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--linie); }
.vtable th { font-size: 12px; letter-spacing: 0.06em; }
.vtable tr.own td { font-weight: 700; background: var(--gelb); }

/* Do / Don't */
.dos { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.dos > div { padding: 22px; border-radius: var(--radius); }
.do { background: var(--gelb); }
.dont { background: var(--schwarz); color: var(--weiss); }
.dos h3 { font-size: 18px; font-weight: 900; margin-bottom: 8px; }
.dos ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }

/* Abschluss */
.top { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.top-card { background: var(--weiss); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.top-card h3 { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; }
.top-card ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.top-card li b { font-weight: 700; }
.top-card img { width: 100%; height: 140px; object-fit: contain; background: var(--flaeche); border-radius: 8px; }
.todos { display: flex; flex-direction: column; gap: 10px; }
.todo-form input { flex: 2 1 220px; width: auto; }
.todo-form input.short { flex: 1 1 140px; }
.todo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.todo-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--linie); font-size: 15px; }
.cta { margin: 0; color: var(--weiss); font-size: clamp(24px, 3vw, 32px); font-weight: 900; line-height: 1.2; max-width: 860px; }

.foot { background: var(--schwarz); color: #cfcfcf; font-size: 13px; padding: 24px 0; }

/* Bio-Regal-Spiel */
.swipe { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.swipe-card {
  width: min(400px, 100%); background: var(--weiss); border: 2px solid var(--schwarz);
  border-top-width: var(--kante); border-right-width: var(--kante); border-radius: 18px;
  overflow: hidden; touch-action: pan-y; user-select: none; cursor: grab;
  transition: transform 0.25s ease, opacity 0.25s ease; position: relative;
}
.swipe-card.dragging { transition: none; cursor: grabbing; }
.swipe-card.fly-right { transform: translateX(140%) rotate(18deg); opacity: 0; }
.swipe-card.fly-left { transform: translateX(-140%) rotate(-18deg); opacity: 0; }
.swipe-photo { width: 100%; aspect-ratio: 4 / 5; background: var(--weiss); display: flex; align-items: center; justify-content: center; }
.swipe-photo img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.swipe-photo span { font-weight: 800; font-size: 20px; text-align: center; padding: 24px; }
.swipe-stamp { position: absolute; top: 24px; padding: 6px 14px; border: 4px solid; border-radius: 10px; font-weight: 900; font-size: 28px; opacity: 0; background: var(--weiss); }
.swipe-stamp.ja { left: 20px; transform: rotate(-12deg); border-color: var(--schwarz); }
.swipe-stamp.nein { right: 20px; transform: rotate(12deg); border-color: var(--schwarz); }
.swipe-info { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.swipe-count { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--grau-text); }
.swipe-name { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.2; }
.swipe-price { margin: 0; font-size: 14px; font-weight: 600; }
.swipe-info input { width: 100%; min-height: 44px; padding: 8px 12px; border: 2px solid var(--schwarz); border-radius: 10px; font-size: 14px; margin-top: 6px; }
.swipe-buttons { display: flex; gap: 16px; width: min(400px, 100%); }
.swipe-buttons .btn { flex: 1 1 0; min-height: 60px; font-size: 18px; font-weight: 900; }
.swipe-done { text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; padding: 24px; }
.swipe-done p { margin: 0; font-weight: 600; }
.swipe-results-title { font-size: 22px; font-weight: 900; margin-top: 16px; }
.swipe-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.sr-card { background: var(--flaeche); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.sr-photo { height: 180px; background: var(--weiss); display: flex; align-items: center; justify-content: center; }
.sr-photo img { width: 100%; height: 100%; object-fit: contain; }
.sr-photo span { font-weight: 700; padding: 12px; text-align: center; }
.sr-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.sr-name { margin: 0; font-weight: 800; font-size: 15px; }
.sr-bar { height: 14px; background: var(--weiss); border-radius: 999px; overflow: hidden; border: 1px solid var(--schwarz); }
.sr-bar div { height: 100%; background: var(--gelb); }
.sr-stats { margin: 0; font-size: 13px; font-weight: 600; }
.sr-note { margin: 0; font-size: 13px; }
.sr-pro, .sr-con { margin: 0; font-size: 13px; padding: 6px 10px; border-radius: 8px; }
.sr-pro { background: var(--gelb); }
.sr-con { background: var(--weiss); border: 1px solid var(--schwarz); }
.sr-comments { margin: 0; padding-left: 16px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.sr-mine { display: flex; gap: 6px; align-items: center; font-size: 12px; }
.sr-mine .vote { min-height: 32px; padding: 2px 10px; font-size: 12px; }
.swipe-reveal { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

/* Euer Stand: die Versuche der Klasse */
.versuche { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.vs-card { border: 2px solid var(--schwarz); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; background: var(--weiss); }
.vs-main { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; background: var(--flaeche); }
.vs-thumbs { display: flex; gap: 6px; padding: 8px 10px 0; }
.vs-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 6px; background: none; width: 52px; height: 52px; overflow: hidden; }
.vs-thumbs button.on { border-color: var(--schwarz); }
.vs-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vs-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.vs-name { margin: 0; font-weight: 800; font-size: 17px; }
.vs-body textarea { width: 100%; min-height: 70px; padding: 8px 10px; border: 2px solid var(--schwarz); border-radius: 10px; font-size: 14px; resize: vertical; }
.vs-body label { font-size: 12px; font-weight: 700; }
.vs-vote { display: flex; gap: 8px; }
.vs-vote .vote { flex: 1 1 0; min-height: 44px; }
.vs-stats { margin: 0; font-size: 13px; font-weight: 600; }

/* Wertelandkarte: vier Felder */
.werte { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.werte .wstatus { grid-column: 1 / -1; }
@media (max-width: 640px) { .werte { grid-template-columns: minmax(0, 1fr); } }
.wfeld { background: var(--weiss); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.wfeld h3 { font-size: 18px; font-weight: 900; }
.wfeld p { margin: 0; font-size: 13px; }
.wchips { display: flex; flex-wrap: wrap; gap: 8px; }
.wchip { min-height: 40px; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--schwarz); background: var(--weiss); font-weight: 700; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; }
.wchip.on { background: var(--schwarz); color: var(--gelb); }
.wchip .n { font-size: 12px; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--flaeche); color: var(--schwarz); }
.wchip.on .n { background: var(--gelb); }
.wchip:disabled { opacity: 0.4; cursor: default; }
.wstatus { margin: 0; font-size: 14px; font-weight: 700; }

/* Abschicken und Hinweis auf die laufende Aufgabe */
.done-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 0 0; }
.done-btn { min-height: 52px; font-size: 15px; }
.done-note { font-size: 14px; font-weight: 600; }
.sec-dark .done-btn.btn-dark { background: var(--gelb); color: var(--schwarz); border-color: var(--gelb); }
.sec-dark .done-btn.btn-yellow { background: var(--weiss); }
.sec-violet .done-note { color: var(--schwarz); }
.stage-banner {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 30;
  background: var(--gelb); color: var(--schwarz); text-decoration: none; font-weight: 800; font-size: 15px;
  padding: 14px 22px; border-top: var(--kante) solid var(--schwarz); border-right: var(--kante) solid var(--schwarz); border-radius: var(--radius);
  max-width: calc(100% - 32px); box-sizing: border-box; text-align: center;
}
.stage-banner[hidden] { display: none; }

/* Anmeldung */
.login { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; padding: 16px; }
.login[hidden] { display: none; }
.login-box { background: var(--gelb); padding: 32px; width: min(440px, 100%); display: flex; flex-direction: column; gap: 10px; }
.login-box h2 { font-size: 32px; font-weight: 900; margin-bottom: 8px; }
.login-box label { font-size: 13px; font-weight: 700; }
.login-box .eyebrow { color: var(--schwarz); }
.login-error { margin: 0; min-height: 20px; font-size: 14px; font-weight: 700; }
.login-box .btn { margin-top: 8px; }

@media (max-width: 640px) {
  .topbar-nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .sticker { position: static; display: inline-block; margin-bottom: 16px; }
  .hero-head { padding-top: 24px; }
}
