/* myDyngy – The Autonomous Enterprise · Graphic-Novel-Look in der bettERProjects-CI
   Comic-Papier mit Rasterpunkten, schwarze Panelrahmen mit hartem Schatten, Gelb als Fläche, Blau als Schrift-Akzent. */
:root {
  --paper: #FDFCFC; --paper2: #f3f1ea; --ink: #121212; --yellow: #E6FF03; --blue: #0A2BFF; --orange: #FF6B2D; --petrol: #7CB4B8; --green: #13A66E; --red: #D84A43;
  --muted: rgba(18,18,18,.66); --line: rgba(18,18,18,.16); --line2: rgba(18,18,18,.32);
  --success: var(--green); --warning: var(--orange); --danger: var(--red); --neutral: #dfe8fe; --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Work Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  /* Alias-Namen aus der ersten Version, damit Inline-Stile weiter stimmen */
  --black: var(--paper); --white: var(--ink); --panel: #fff; --panel2: var(--paper2); --hi: var(--blue); --bad: var(--orange); --blue-l: var(--blue); --dim: rgba(18,18,18,.45);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body { background: var(--paper); background-image: radial-gradient(rgba(18,18,18,.07) 1px, transparent 1.2px); background-size: 7px 7px; }
a { color: var(--blue); }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.035em; line-height: 1.06; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(30px, 4.6vw, 54px); }
h2 { font-size: clamp(22px, 2.6vw, 32px); }
h3 { font-size: 18px; letter-spacing: -.02em; }
em { font-style: normal; color: var(--blue); }
.k { font-family: var(--display); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.wrap { max-width: 1260px; margin: 0 auto; padding-inline: 16px; padding-block: 16px 110px; }

/* Kopfzeile (Tusche) */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--ink); color: var(--paper); border-bottom: 4px solid var(--yellow); }
.top .wrap { padding-block: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.brand { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -.02em; white-space: nowrap; }
.brand b { color: var(--yellow); }
.top .k { color: var(--yellow); }
.top .sp { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 2px solid var(--line2); font-family: var(--display); font-weight: 500; font-size: 13px; white-space: nowrap; background: transparent; color: inherit; }
.top .pill { border-color: rgba(253,252,252,.3); }
.pill.y { border-color: var(--yellow); color: var(--ink); background: var(--yellow); }
.top .pill.y { color: var(--ink); }
.pill.r { border-color: var(--orange); background: var(--orange); color: var(--ink); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; border: 1.5px solid var(--ink); }
.timer { font-family: var(--display); font-size: 20px; font-weight: 700; color: var(--yellow); font-variant-numeric: tabular-nums; }
.timer.low { color: var(--orange); }

/* Buttons */
.btn { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--yellow); color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 16px; padding: 11px 20px; border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); transition: transform .1s, box-shadow .1s; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn.ghost { background: var(--paper); }
.btn.blue { background: var(--blue); color: var(--paper); }
.btn.sm { font-size: 13px; padding: 6px 12px; box-shadow: 3px 3px 0 var(--ink); }
.lnk { all: unset; cursor: pointer; color: var(--blue); font-family: var(--display); font-weight: 700; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.lnk:focus-visible { outline: 2px solid var(--blue); }

/* Kästen */
.panel { background: #fff; border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); padding: 18px; min-width: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1080px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.sec { margin-top: 26px; }
.sec > .head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }

/* ===== Comic-Bühne ===== */
.cpanel { position: relative; border: 4px solid var(--ink); background: var(--ink); overflow: hidden; box-shadow: 6px 6px 0 var(--ink); background-image: radial-gradient(rgba(230,255,3,.12) 1px, transparent 1.4px); background-size: 8px 8px; }
.cpanel > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-banner { border-color: var(--ink); }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.hero-pill { display: flex; flex-direction: column; min-width: 110px; padding: 8px 10px; border: 3px solid var(--ink); background: var(--paper); box-shadow: 3px 3px 0 var(--ink); }
.hero-pill.good { background: var(--yellow); }
.hero-pill.warn { background: var(--orange); }
.hero-pill.dense { background: var(--neutral); }
.hero-pill .k { display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.hero-pill strong { font-family: var(--display); font-size: 18px; line-height: 1.1; letter-spacing: -.03em; }
.hero-pill small { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.scoreboard { background: var(--paper); border: 4px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 12px 14px 10px; margin: 0 0 18px; }
.scoreboard-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.leader-row { display: grid; grid-template-columns: 44px minmax(110px, 1fr) 72px auto; gap: 10px; align-items: center; padding: 8px 10px; border: 2px solid var(--ink); background: #fff; margin-top: 8px; }
.leader-row:first-child { margin-top: 0; }
.leader-gold { background: linear-gradient(90deg, #fff7a8, var(--yellow)); }
.leader-silver { background: linear-gradient(90deg, #eef3ff, #dfe8fe); }
.leader-bronze { background: linear-gradient(90deg, #ffe0d0, #ffd2b5); }
.leader-rank { font-family: var(--display); font-size: 20px; font-weight: 800; display: inline-grid; place-items: center; width: 32px; height: 32px; background: var(--ink); color: var(--paper); border-radius: 50%; }
.leader-name { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 18px; }
.leader-grade { font-family: var(--display); font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.leader-score { font-family: var(--mono); font-size: 14px; font-variant-numeric: tabular-nums; justify-self: end; }
.hero { aspect-ratio: 1619 / 971; max-height: 70vh; width: 100%; }
#showbox { animation: reveal-board .26s ease-out; }
@keyframes reveal-board { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.bteam { transition: transform .18s ease, box-shadow .18s ease; }
.bteam:hover { transform: translate(-2px, -2px); }
@media (max-width: 760px) { .hero { aspect-ratio: 4 / 3; } .hero > img { object-position: 62% 50%; } }
.bubble { position: absolute; left: 3%; top: 5%; max-width: min(440px, 48%); background: var(--paper); border: 3px solid var(--ink); border-radius: 24px; padding: 14px 18px 16px; font-family: var(--display); font-weight: 500; font-size: clamp(14px, 1.4vw, 17.5px); line-height: 1.38; box-shadow: 4px 4px 0 var(--ink); z-index: 2; }
.bubble::after { content: ""; position: absolute; right: 22%; bottom: -26px; border: 14px solid transparent; border-top: 22px solid var(--ink); border-bottom: 0; transform: skewX(-24deg); }
.bubble::before { content: ""; position: absolute; right: calc(22% + 4px); bottom: -18px; border: 10px solid transparent; border-top: 16px solid var(--paper); border-bottom: 0; transform: skewX(-24deg); z-index: 1; }
.bubble .who { display: block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); margin-bottom: 4px; }
.caption { position: absolute; left: 0; bottom: 0; background: var(--yellow); color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; padding: 8px 14px; border-top: 3px solid var(--ink); border-right: 3px solid var(--ink); z-index: 2; }
@media (max-width: 760px) { .bubble { max-width: 74%; font-size: 13px; padding: 10px 12px 12px; border-radius: 16px; } .caption { font-size: 11px; } }

/* Status */
.status { display: grid; grid-template-columns: 2.5fr repeat(5, 1fr); gap: 14px; margin-top: 24px; }
@media (max-width: 1080px) { .status { grid-template-columns: repeat(3, 1fr); } .dyn { grid-column: 1 / -1; } }
@media (max-width: 520px) { .status { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--paper); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); padding: 10px 12px; min-width: 0; }
.stat .l { font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stat .v { font-family: var(--display); font-weight: 700; font-size: 28px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: 2px; white-space: nowrap; }
.stat .v small { font-size: 13px; color: var(--muted); letter-spacing: 0; }
.stat.warn { background: var(--orange); }
.stat.warn .l, .stat.warn .v small { color: rgba(18,18,18,.75); }
.dyn { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; background: var(--ink); color: var(--paper); }
.dyn > div { min-width: 0; }
.dyn .l { color: rgba(253,252,252,.6); }
.dyn .v { color: var(--yellow); }
.dyn .v small { color: rgba(253,252,252,.6); }
.dyn .stages { display: flex; gap: 4px; align-items: flex-end; }
.dyn .stages img { width: 44px; height: 78px; object-fit: cover; object-position: center top; border: 2px solid rgba(253,252,252,.25); background: #000; display: block; }
.dyn .stages img.now { border-color: var(--yellow); width: 60px; height: 106px; }
.dyn .stages img.next { filter: grayscale(1) brightness(.45); }
.dyn .stages img.past { filter: brightness(.7); }
.dyn p { margin: 4px 0 0; font-size: 13px; color: rgba(253,252,252,.75); }
.dyn .bar { height: 6px; background: rgba(253,252,252,.15); margin-top: 6px; } .dyn .bar i { display: block; height: 100%; background: var(--yellow); }

/* Orte als Comic-Seite */
.cpage { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 140px; gap: 14px; }
.place { all: unset; box-sizing: border-box; cursor: pointer; position: relative; border: 4px solid var(--ink); background: var(--ink); overflow: hidden; box-shadow: 5px 5px 0 var(--ink); transition: transform .12s, box-shadow .12s; background-image: radial-gradient(rgba(230,255,3,.14) 1px, transparent 1.4px); background-size: 8px 8px; }
.place:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.place:focus-visible { outline: 4px solid var(--blue); outline-offset: 3px; }
.place > img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.place:hover > img { transform: scale(1.04); }
.place .lab { position: absolute; left: 0; bottom: 0; background: var(--paper); border-top: 3px solid var(--ink); border-right: 3px solid var(--ink); padding: 6px 12px 7px; max-width: 92%; }
.place .lab b { display: block; font-family: var(--display); font-size: 17px; letter-spacing: -.02em; line-height: 1.1; }
.place .lab span { font-size: 12.5px; color: var(--muted); }
.place .badge { position: absolute; top: 10px; right: 10px; min-width: 34px; height: 34px; padding: 0 8px; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 16px; background: var(--blue); color: var(--paper); border: 3px solid var(--ink); }
.place .badge.w { background: var(--orange); color: var(--ink); clip-path: polygon(50% 0, 63% 30%, 100% 35%, 72% 58%, 80% 100%, 50% 78%, 20% 100%, 28% 58%, 0 35%, 37% 30%); width: 46px; height: 46px; border: 0; top: 6px; right: 6px; }
.p-buero, .p-halle { grid-column: span 3; grid-row: span 2; }
.p-server, .p-wache, .p-funkturm { grid-column: span 2; grid-row: span 2; }
.p-kantine, .p-kontor, .p-landeplatz { grid-column: span 2; grid-row: span 1; }
.p-hangar { grid-column: span 6; grid-row: span 1; background: var(--yellow); background-image: radial-gradient(rgba(18,18,18,.12) 1px, transparent 1.4px); background-size: 7px 7px; }
.p-hangar .txt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 24px; flex-wrap: wrap; }
.p-hangar h3 { font-size: clamp(22px, 2.6vw, 32px); }
.p-hangar p { margin: 0; max-width: 52ch; }
@media (max-width: 900px) { .cpage { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 130px; } .p-buero, .p-halle { grid-column: span 2; grid-row: span 2; } .p-server, .p-wache, .p-funkturm, .p-kantine, .p-kontor, .p-landeplatz { grid-column: span 1; grid-row: span 1; } .p-hangar { grid-column: span 2; grid-row: span 2; } .place .lab b { font-size: 15px; } }

/* Ereignis-Splash */
.splash { aspect-ratio: 1448 / 1086; max-height: 78vh; width: 100%; }
.splash.noimg { aspect-ratio: 16 / 7; }
.sfx { position: absolute; top: 4%; right: 4%; font-family: var(--display); font-weight: 700; font-size: clamp(40px, 8vw, 104px); letter-spacing: -.04em; color: var(--yellow); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; transform: rotate(-8deg); text-shadow: 6px 6px 0 var(--ink); z-index: 2; }
.sfx.bad { color: var(--orange); }
.evbox { position: absolute; left: 3%; bottom: 4%; max-width: min(540px, 72%); background: var(--paper); border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); padding: 14px 18px; z-index: 2; }
.evbox .tagk { font-family: var(--display); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--yellow); background: var(--ink); display: inline-block; padding: 2px 8px; margin-bottom: 8px; }
.evbox h3 { font-size: clamp(20px, 2.4vw, 28px); margin-bottom: 6px; }
.evbox p { margin: 0 0 6px; font-size: 15px; }
@media (max-width: 760px) { .splash { aspect-ratio: 3 / 4; } .splash > img { object-position: 60% 50%; } .evbox { max-width: 92%; padding: 10px 12px; } .evbox p { font-size: 13px; } }

/* Bisherige Bausteine im Comic-Look */
.instruments { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1180px) { .instruments { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .instruments { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.inst { background: var(--paper); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); padding: 10px 12px; min-width: 0; }
.inst .l { font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.inst .v { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: 2px; white-space: nowrap; }
.inst .v small { font-size: 13px; color: var(--muted); letter-spacing: 0; }
.inst .bar { height: 6px; background: var(--line); margin-top: 8px; overflow: hidden; }
.inst .bar i { display: block; height: 100%; background: var(--ink); }
.inst.warn { background: var(--orange); }
.inst.hero { background: var(--yellow); }

.tabs { display: flex; gap: 6px; margin: 22px 0 18px; overflow-x: auto; padding-bottom: 6px; }
.tab { all: unset; cursor: pointer; padding: 8px 14px; font-family: var(--display); font-weight: 700; font-size: 15px; border: 3px solid var(--ink); background: var(--paper); box-shadow: 3px 3px 0 var(--ink); white-space: nowrap; }
.tab[aria-selected="true"] { background: var(--ink); color: var(--yellow); }
.tab:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.tab .n { font-size: 11px; background: var(--blue); color: var(--paper); padding: 1px 6px; margin-left: 6px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.card { background: #fff; border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); padding: 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card.sel { background: var(--yellow); }
.card.prio { box-shadow: 4px 4px 0 var(--blue); border-color: var(--blue); }
.card.sel.prio { border-color: var(--ink); box-shadow: 4px 4px 0 var(--blue); }
.card.active { border-style: dashed; }
.card.done { opacity: .55; }
.card h4 { font-family: var(--display); font-size: 16px; letter-spacing: -.02em; margin: 0; line-height: 1.2; }
.card .desc { color: var(--muted); font-size: 13.5px; }
.card .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-family: var(--display); font-weight: 500; font-size: 11.5px; padding: 1px 7px; border: 1.5px solid var(--ink); background: var(--paper); white-space: nowrap; }
.tag.ok { background: var(--yellow); }
.tag.miss { background: var(--orange); }
.tag.eff { background: var(--blue); color: var(--paper); border-color: var(--blue); }
.mini-trend { display: flex; align-items: center; gap: 8px; background: var(--paper2); border: 2px solid var(--ink); padding: 6px 8px 4px; }
.mini-label { font-family: var(--display); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.mini-trend svg { width: 120px; height: 34px; display: block; }
.card .act { display: flex; gap: 6px; margin-top: auto; padding-top: 4px; flex-wrap: wrap; }
.tog { all: unset; cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 13px; padding: 5px 10px; border: 2px solid var(--ink); background: var(--paper); }
.tog:focus-visible { outline: 3px solid var(--blue); }
.tog.on { background: var(--ink); color: var(--yellow); }
.tog.p.on { background: var(--blue); color: var(--paper); border-color: var(--blue); }
.tog[disabled] { opacity: .35; pointer-events: none; }
.steph { font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; display: inline-block; background: var(--ink); color: var(--yellow); padding: 3px 10px; margin: 18px 0 10px; }

.hint { border: 2.5px solid var(--ink); padding: 10px 12px; background: #fff; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; }
.hint.crit { background: #ffe7dc; border-color: var(--orange); box-shadow: 3px 3px 0 var(--orange); }
.hint .who { font-family: var(--display); font-weight: 700; font-size: 11px; background: var(--ink); color: var(--paper); padding: 1px 6px; white-space: nowrap; }
.hint.shared { border-style: dashed; }
@media (max-width: 560px) { .hint { grid-template-columns: 1fr; } }

.story { display: grid; grid-template-columns: 160px 1fr; gap: 18px; align-items: start; }
.story .pic { aspect-ratio: 3 / 4; border: 3px solid var(--ink); background: var(--ink) center top/cover; max-width: 100%; }
.story blockquote { margin: 0; font-family: var(--display); font-size: 17px; line-height: 1.5; }
.story blockquote::before { content: "Sarah"; display: block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); margin-bottom: 6px; }
@media (max-width: 760px) { .story { grid-template-columns: 1fr; } .story .pic { max-width: 120px; } }
.eventcard { display: grid; grid-template-columns: 200px 1fr; border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); background: #fff; overflow: hidden; }
.eventcard .img { background: var(--ink) center/cover; min-height: 140px; }
.eventcard .txt { padding: 14px 16px; }
.eventcard.bad { box-shadow: 5px 5px 0 var(--orange); } .eventcard.good { box-shadow: 5px 5px 0 var(--blue); }
@media (max-width: 760px) { .eventcard { grid-template-columns: 1fr; } }

.entries { display: flex; flex-direction: column; gap: 6px; }
.entry { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 14px; }
.entry::before { font-family: var(--display); font-weight: 700; }
.entry.bad::before { content: "✕"; color: var(--orange); }
.entry.good::before { content: "✓"; color: var(--blue); }
.entry.neutral::before { content: "·"; color: var(--muted); }
.entry .c { font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: block; }

label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
input[type=text], input[type=number], select, textarea { background: #fff; color: var(--ink); border: 2.5px solid var(--ink); border-radius: 0; padding: 9px 12px; font: inherit; font-size: 15px; width: 100%; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; }
input[type=range] { width: 100%; accent-color: var(--blue); }
.check { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }
.chiprow { display: flex; gap: 6px; flex-wrap: wrap; }

.tbl { display: grid; font-size: 14px; overflow-x: auto; }
.tbl .tr { display: grid; border-bottom: 1.5px solid var(--line); padding: 8px 0; align-items: center; gap: 10px; min-width: 560px; }
.tbl .th { font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tbl .num { text-align: right; font-family: var(--display); font-variant-numeric: tabular-nums; }

/* Wissensraum */
.drawer { position: fixed; inset: 0 0 0 auto; width: min(560px, 100%); background: var(--paper); border-left: 4px solid var(--ink); box-shadow: -8px 0 0 var(--yellow); z-index: 50; display: flex; flex-direction: column; transform: translateX(110%); transition: transform .25s ease; padding-top: env(safe-area-inset-top, 0px); }
.drawer.open { transform: none; }
.drawer .dh { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--yellow); border-bottom: 3px solid var(--ink); }
.drawer .db { overflow-y: auto; padding: 18px; flex: 1; }
.drawer .art p { margin: 0 0 12px; }
.drawer .art p.f { font-family: var(--mono); font-size: 13px; background: #fff; border: 2px solid var(--ink); border-left: 6px solid var(--blue); padding: 10px 12px; overflow-x: auto; }
.drawer .art ul { padding-left: 18px; margin: 0 0 12px; }
.drawer .art li { margin-bottom: 6px; }
.klist button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; justify-content: space-between; width: 100%; padding: 9px 12px; gap: 10px; border-bottom: 1.5px solid var(--line); }
.klist button:hover, .klist button:focus-visible { background: var(--yellow); }
.klist .grp { font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin: 16px 0 4px; }
.drawer .brand b { color: var(--blue); }
.knowbtn { display: none !important; }

/* Retro-Fenster wird Comic-Fenster */
.win-back { position: fixed; inset: 0; background: rgba(18,18,18,.55); z-index: 45; display: grid; place-items: start center; padding: calc(70px + env(safe-area-inset-top, 0px)) 16px 40px; overflow-y: auto; }
.win { width: min(1180px, 100%); background: var(--paper); border: 4px solid var(--ink); box-shadow: 10px 10px 0 var(--yellow); animation: winin .16s ease-out both; }
.win-bar { display: flex; align-items: center; gap: 10px; background: var(--ink); color: var(--yellow); padding: 8px 12px; font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; position: sticky; top: 0; z-index: 2; }
.win-bar .x { all: unset; cursor: pointer; margin-left: auto; background: var(--yellow); color: var(--ink); padding: 3px 10px; letter-spacing: 0; text-transform: none; }
.win-bar .x:focus-visible { outline: 2px solid var(--paper); }
.win-head { height: 180px; border-bottom: 4px solid var(--ink); background: var(--ink); overflow: hidden; }
.win-head img { width: 100%; height: 100%; object-fit: cover; display: block; }
.win-body { padding: 18px; }
@keyframes winin { from { transform: translateY(12px) scale(.98); opacity: .3; } to { transform: none; opacity: 1; } }

/* Sarah-Dialog als Sprechblase */
.dlg { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: min(820px, calc(100% - 32px)); z-index: 70; cursor: pointer; }
.dlg-in { display: grid; grid-template-columns: 110px 1fr; background: var(--paper); border: 4px solid var(--ink); box-shadow: 8px 8px 0 var(--yellow); }
.dlg-pic { background: var(--ink) center top/cover; border-right: 4px solid var(--ink); min-height: 120px; }
.dlg-txt { padding: 12px 16px; }
.dlg-txt .k { color: var(--blue); }
.dlg-txt p { margin: 6px 0 4px; font-family: var(--display); font-size: 16.5px; line-height: 1.5; min-height: 3em; }
.dlg-more { font-family: var(--display); font-weight: 700; font-size: 12px; color: var(--blue); text-align: right; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 560px) { .dlg-in { grid-template-columns: 74px 1fr; } .dlg-pic { min-height: 90px; } .dlg-txt p { font-size: 14.5px; } }

/* Stufenaufstieg, Wackeln */
.levelup { position: fixed; inset: 0; display: grid; place-items: center; z-index: 80; background: rgba(18,18,18,.6); cursor: pointer; padding: 16px; }
.lu-in { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; background: var(--yellow); color: var(--ink); padding: 22px 32px; border: 4px solid var(--ink); box-shadow: 10px 10px 0 var(--blue); animation: lu .5s cubic-bezier(.2,1.6,.4,1) both; max-width: 640px; }
.lu-in img { width: 120px; height: 200px; object-fit: cover; object-position: center top; border: 3px solid var(--ink); background: var(--ink); }
.lu-in .k { color: var(--ink); }
.lu-n { font-family: var(--display); font-weight: 700; font-size: clamp(48px, 9vw, 96px); letter-spacing: -.05em; line-height: 1; }
.lu-t { font-family: var(--display); font-size: 18px; font-weight: 700; margin-top: 6px; }
.lu-s { margin-top: 8px; font-size: 14px; }
.levelup.out { opacity: 0; transition: opacity .6s; }
@keyframes lu { from { transform: scale(.3) rotate(-6deg); } to { transform: none; } }
.shake main { animation: shk .7s linear; }
@keyframes shk { 10%,90% { transform: translate(-2px,0); } 20%,80% { transform: translate(4px,1px); } 30%,50%,70% { transform: translate(-6px,-1px); } 40%,60% { transform: translate(6px,1px); } }

/* Beamer: Comic-Seite der Teams */
.bpage { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.bteam { position: relative; border: 4px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); background: var(--ink); color: var(--paper); display: grid; grid-template-columns: 110px 1fr; min-height: 220px; overflow: hidden; }
.bteam img { width: 110px; height: 100%; object-fit: cover; object-position: center top; border-right: 4px solid var(--ink); display: block; }
.bteam .bt { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bteam .nm { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; display: flex; gap: 8px; align-items: center; }
.bteam .gr { font-family: var(--display); font-weight: 700; font-size: 56px; letter-spacing: -.05em; line-height: .95; color: var(--yellow); }
.bteam .st { font-family: var(--display); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: rgba(253,252,252,.65); }
.bteam .meter { height: 8px; background: rgba(253,252,252,.15); } .bteam .meter i { display: block; height: 100%; background: var(--yellow); transition: width 1.6s cubic-bezier(.2,.8,.2,1); }
.bteam .sfxs { position: absolute; right: 10px; bottom: 10px; max-width: calc(100% - 130px); font-family: var(--display); font-weight: 700; font-size: 13px; padding: 3px 8px; border: 2px solid var(--ink); transform: rotate(4deg); }
.bteam .sfxs.bad { background: var(--orange); color: var(--ink); } .bteam .sfxs.good { background: var(--yellow); color: var(--ink); }
.bteam .rk { position: absolute; left: 6px; top: 6px; background: var(--yellow); color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 18px; width: 34px; height: 34px; display: grid; place-items: center; border: 3px solid var(--ink); }
.bteam .ready { font-family: var(--display); font-weight: 700; font-size: 13px; }
.bteam.done { box-shadow: 6px 6px 0 var(--yellow); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--orange); color: var(--ink); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); padding: 10px 16px; font-weight: 600; z-index: 90; max-width: calc(100% - 32px); }
.toast.ok { background: var(--yellow); }
.center { text-align: center; }
.big-code { font-family: var(--display); font-size: clamp(56px, 10vw, 120px); font-weight: 700; letter-spacing: .06em; line-height: 1; background: var(--yellow); border: 4px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); display: inline-block; padding: 6px 20px; }
.fade { animation: fade .3s ease both; }
@keyframes fade { from { opacity: .001; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#showbox:fullscreen { background: var(--paper); padding: 24px; overflow: auto; }
@media (prefers-reduced-motion: reduce) { .fade, .win, .lu-in, .shake main, .dlg-more { animation: none; } .drawer, .place, .place > img, .btn, .bteam .meter i { transition: none; } }
.hidden { display: none !important; }
@media (max-width: 560px) { .top .k { display: none; } .top .wrap { gap: 6px; } .pill { font-size: 12px; padding: 2px 8px; } }

/* ===== Bewegung ===== */
.cpanel > video.loop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.cpanel .bubble, .cpanel .caption, .cpanel .sfx, .cpanel .evbox { z-index: 3; }
.kb > img, .kb > video.loop { animation: kenburns 30s ease-in-out infinite alternate; transform-origin: 60% 40%; will-change: transform; }
@keyframes kenburns { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.09) translate(-1.5%, -1%); } }

.anim .hero .caption, .anim .splash .caption { animation: capin .35s ease-out .1s both; }
.anim .bubble { animation: pop .45s cubic-bezier(.2,1.6,.4,1) .35s both; transform-origin: 70% 110%; }
.anim .sfx { animation: slam .5s cubic-bezier(.2,1.4,.4,1) .3s both; }
.anim .evbox { animation: rise .45s ease-out .75s both; }
.anim .status > * { animation: rise .35s ease-out both; }
.anim .status > *:nth-child(2) { animation-delay: .05s; } .anim .status > *:nth-child(3) { animation-delay: .1s; } .anim .status > *:nth-child(4) { animation-delay: .15s; } .anim .status > *:nth-child(5) { animation-delay: .2s; } .anim .status > *:nth-child(6) { animation-delay: .25s; }
.anim .cpage > .place { animation: deal .4s cubic-bezier(.2,1.3,.4,1) both; }
.anim .cpage > .place:nth-child(1) { animation-delay: .5s; } .anim .cpage > .place:nth-child(2) { animation-delay: .58s; } .anim .cpage > .place:nth-child(3) { animation-delay: .66s; } .anim .cpage > .place:nth-child(4) { animation-delay: .74s; } .anim .cpage > .place:nth-child(5) { animation-delay: .82s; } .anim .cpage > .place:nth-child(6) { animation-delay: .9s; } .anim .cpage > .place:nth-child(7) { animation-delay: .98s; } .anim .cpage > .place:nth-child(8) { animation-delay: 1.06s; } .anim .cpage > .place:nth-child(9) { animation-delay: 1.14s; }
.anim .strip > .sp { animation: wipein .5s ease-out both; }
.anim .strip > .sp1 { animation-delay: 1.1s; } .anim .strip > .sp2 { animation-delay: 1.5s; } .anim .strip > .sp3 { animation-delay: 1.9s; }
.anim .strip .bubble { animation-delay: inherit; }
.anim .strip .sp1 .bubble { animation: pop .4s cubic-bezier(.2,1.6,.4,1) 1.45s both; }
.anim .strip .sp2 .bubble { animation: pop .4s cubic-bezier(.2,1.6,.4,1) 1.85s both; }
.anim .strip .sp3 .big { animation: slam .45s cubic-bezier(.2,1.4,.4,1) 2.2s both; }
@keyframes capin { from { transform: translateX(-105%); } to { transform: none; } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slam { 0% { transform: scale(3) rotate(-14deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: rotate(-8deg); opacity: 1; } }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes deal { from { transform: translateY(24px) rotate(-2deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes wipein { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.strip .sp3 .big { transform: rotate(0); }

/* Comic-Strip */
.strip { display: grid; grid-template-columns: 1fr 1fr 1.1fr; gap: 14px; margin-top: 18px; }
.strip .sp { aspect-ratio: 4 / 3; }
.strip .sp > img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.strip .sp2 > img { object-fit: contain; background: #0b0b0b; }
.strip .bubble.sm { top: auto; bottom: 8%; left: 6%; right: 6%; max-width: none; font-size: 14.5px; padding: 10px 14px 12px; border-radius: 18px; }
.strip .bubble.sm::after, .strip .bubble.sm::before { top: -22px; bottom: auto; right: auto; left: 22%; border-top: 0; border-bottom: 20px solid var(--ink); transform: skewX(18deg); }
.strip .bubble.sm::before { top: -14px; border-bottom: 14px solid var(--paper); left: calc(22% + 4px); border-top: 0; }
.strip .bubble.think { border-radius: 30px; border-style: dashed; }
.strip .bubble.think::after, .strip .bubble.think::before { display: none; }
.strip .sp3 { background: var(--yellow); background-image: radial-gradient(rgba(18,18,18,.12) 1px, transparent 1.4px); background-size: 7px 7px; color: var(--ink); }
.strip .nums { position: absolute; inset: 0; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.strip .nums .k { color: var(--ink); }
.strip .nums .big { font-family: var(--display); font-weight: 700; font-size: clamp(36px, 4.6vw, 60px); letter-spacing: -.05em; line-height: 1; margin-bottom: 6px; display: inline-block; }
.strip .nums .big.neg { color: var(--orange); -webkit-text-stroke: 1.5px var(--ink); }
.strip .nums .big small { font-size: .35em; letter-spacing: 0; }
.strip .row2 { display: flex; justify-content: space-between; gap: 10px; border-top: 2px solid var(--ink); padding-top: 5px; font-family: var(--display); font-size: 15px; }
.strip .row2 i { font-style: normal; color: var(--blue); }
@media (max-width: 900px) { .strip { grid-template-columns: 1fr 1fr; } .strip .sp3 { grid-column: 1 / -1; aspect-ratio: auto; min-height: 190px; } }
@media (max-width: 520px) { .strip { grid-template-columns: 1fr; } .strip .sp3 { grid-column: auto; } }

/* Rasterpunkt-Übergang zwischen den Phasen */
@property --r { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
.wipe { position: fixed; inset: 0; z-index: 85; pointer-events: none; background: var(--ink);
  -webkit-mask: radial-gradient(circle, #000 var(--r), transparent calc(var(--r) + 1%)) 0 0 / 26px 26px;
  mask: radial-gradient(circle, #000 var(--r), transparent calc(var(--r) + 1%)) 0 0 / 26px 26px;
  animation: wipe 1.1s ease-in-out forwards; }
@keyframes wipe { 0% { --r: 0%; } 42% { --r: 75%; } 58% { --r: 75%; } 100% { --r: 0%; } }

@media (prefers-reduced-motion: reduce) {
  .kb > img, .kb > video.loop, .anim *, .wipe { animation: none !important; }
}

/* ===== Dyngy als Begleiter ===== */
.dyngy { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 42; display: flex; align-items: flex-end; gap: 10px; max-width: min(460px, calc(100% - 32px)); pointer-events: none; }
.dyngy > * { pointer-events: auto; }
.dy-bot { all: unset; pointer-events: auto; cursor: pointer; width: 74px; height: 96px; flex: none; border: 3px solid var(--ink); background: var(--ink); box-shadow: 4px 4px 0 var(--yellow); overflow: hidden; position: relative; }
.dy-bot img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.dy-bot:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.dyngy[data-stage="5"] .dy-bot { box-shadow: 4px 4px 0 var(--blue), 0 0 22px rgba(10,43,255,.55); }
.dy-tip { all: unset; pointer-events: auto; box-sizing: border-box; cursor: pointer; position: relative; background: var(--paper); border: 3px solid var(--ink); border-radius: 20px; padding: 10px 14px 12px; font-family: var(--display); font-weight: 500; font-size: 14.5px; line-height: 1.38; box-shadow: 4px 4px 0 var(--ink); margin-bottom: 30px; }
.dy-tip::before { content: ""; position: absolute; left: -16px; bottom: 14px; border: 9px solid transparent; border-right: 14px solid var(--ink); border-left: 0; }
.dy-tip .who { display: block; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); margin-bottom: 2px; }
.dy-tip .go { display: block; margin-top: 6px; font-weight: 700; font-size: 13px; color: var(--blue); }
.dy-tip:hover { background: var(--yellow); }
.dy-tip:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.dyngy.closed .dy-tip { display: none; }
@media (max-width: 760px) { .dy-bot { width: 54px; height: 70px; } .dy-tip { font-size: 13px; margin-bottom: 18px; } .wrap { padding-block-end: 150px; } }
@media (prefers-reduced-motion: no-preference) {
  .dy-bot { animation: bob 3.2s ease-in-out infinite; }
  .dyngy[data-stage="5"] .dy-bot { animation: hover5 2.6s ease-in-out infinite; }
  .dy-tip.pop { animation: pop .4s cubic-bezier(.2,1.6,.4,1) both; transform-origin: 0 100%; }
  .dyngy.morph .dy-bot::after { content: ""; position: absolute; inset: 0; background: var(--paper); animation: flash .8s ease-out both; }
  .dyngy.morph .dy-bot { animation: morph .8s ease-in-out; }
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes hover5 { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(-9px); } }
@keyframes flash { 0% { opacity: 0; } 40% { opacity: 1; } 100% { opacity: 0; } }
@keyframes morph { 0% { transform: scale(1); } 45% { transform: scale(1.25) rotate(-4deg); } 100% { transform: scale(1); } }

/* Stufenaufstieg mit Verwandlung */
.lu-in .lu-pic { position: relative; width: 120px; height: 200px; border: 3px solid var(--ink); background: var(--ink); overflow: hidden; }
.lu-in .lu-pic img { width: 100%; height: 100%; object-fit: cover; object-position: center top; border: 0; position: absolute; inset: 0; }
.lu-in .lu-pic .new { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .lu-in .lu-pic.morph .old { animation: out .5s ease-in .7s both; }
  .lu-in .lu-pic.morph .new { animation: in .5s ease-out 1.05s both; }
  .lu-in .lu-pic.morph::after { content: ""; position: absolute; inset: 0; background: var(--paper); animation: flash 1s ease-out .6s both; }
}
@media (prefers-reduced-motion: reduce) { .lu-in .lu-pic .old { display: none; } .lu-in .lu-pic .new { opacity: 1; } }
@keyframes out { to { opacity: 0; transform: scale(1.3); } }
@keyframes in { from { opacity: 0; transform: scale(.6) rotate(6deg); } to { opacity: 1; transform: none; } }
.dyngy[hidden], .dy-tip[hidden] { display: none !important; }
a.btn{text-decoration:none;display:inline-flex;align-items:center}
.cta-real h2 em{font-style:normal;background:var(--ink);color:var(--yellow);padding:0 6px}
.cta-real a.btn:first-child{background:var(--ink);color:var(--yellow)}
