/* Click-Dummy Dialekt-App – bewusst nur Schwarz/Weiß/Grau */

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #e6e6e6;
    color: #000;
}
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------- Bühne: Handy + Erklär-Panel ---------- */
.buehne {
    min-height: 100vh;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 24px;
}

.phone {
    --h: min(844px, calc(100vh - 48px));
    position: relative;
    flex: none;
    height: var(--h);
    width: calc(var(--h) * 0.4621);
    border: 12px solid #111;
    border-radius: 52px;
    background: #111;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.phone.quer {
    --h: min(844px, calc(100vw - 48px));
    width: var(--h);
    height: calc(var(--h) * 0.4621);
}
.phone.bereit { transition: width .5s ease, height .5s ease; }

/* Seitentasten */
.phone::before, .phone::after {
    content: "";
    position: absolute;
    background: #111;
    border-radius: 2px;
}
.phone::before { left: -16px; top: 120px; width: 4px; height: 60px; }
.phone::after { right: -16px; top: 160px; width: 4px; height: 90px; }
.phone.quer::before { top: -16px; left: 120px; width: 60px; height: 4px; }
.phone.quer::after { top: auto; bottom: -16px; right: 160px; width: 90px; height: 4px; }

.display {
    position: relative;
    height: 100%;
    width: 100%;
    background: #fff;
    border-radius: 40px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.phone.quer .display { padding: 0 48px; }

.insel {
    position: absolute;
    z-index: 5;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 32%;
    max-width: 120px;
    height: 30px;
    background: #000;
    border-radius: 20px;
}
.phone.quer .insel {
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    width: 30px;
    height: 32%;
    max-height: 120px;
}

.statusbar {
    flex: none;
    height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    font-weight: 600;
    font-size: 15px;
}
.phone.quer .statusbar { display: none; }
.status-icons { display: flex; align-items: center; gap: 6px; }
.signal { display: flex; align-items: flex-end; gap: 2px; height: 11px; }
.signal i { display: block; width: 3px; background: #000; border-radius: 1px; }
.signal i:nth-child(1) { height: 4px; }
.signal i:nth-child(2) { height: 6px; }
.signal i:nth-child(3) { height: 8px; }
.signal i:nth-child(4) { height: 11px; }
.akku {
    position: relative;
    width: 24px;
    height: 12px;
    border: 1.5px solid #000;
    border-radius: 3px;
}
.akku::before { content: ""; position: absolute; inset: 1.5px; right: 5px; background: #000; border-radius: 1px; }
.akku::after { content: ""; position: absolute; right: -4px; top: 3px; width: 2px; height: 4px; background: #000; border-radius: 1px; }

.appbar {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 14px 10px;
    border-bottom: 1px solid #000;
}
.phone.quer .appbar { padding: 8px 14px; }
.appbar h1 { flex: 1; margin: 0; font-size: 17px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zurueck { width: 44px; font-size: 32px; line-height: 1; text-decoration: none; }
.punkte {
    width: 44px;
    text-align: center;
    border: 1.5px solid #000;
    border-radius: 20px;
    padding: 2px 0;
    font-size: 12px;
    font-weight: 700;
}

.screen {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    scrollbar-width: thin;
}

.tabbar {
    flex: none;
    display: flex;
    border-top: 1px solid #000;
    padding: 6px 4px 2px;
}
.tabbar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 10.5px;
    text-decoration: none;
    color: #8a8a8a;
}
.tabbar a.aktiv { color: #000; font-weight: 700; }
.tabbar .icon { width: 24px; height: 24px; }
.phone.quer .tabbar { padding: 4px; }
.phone.quer .tabbar a { flex-direction: row; justify-content: center; gap: 6px; font-size: 12px; }
.phone.quer .tabbar .icon { width: 20px; height: 20px; }

.homebar { flex: none; height: 22px; display: flex; align-items: center; justify-content: center; }
.homebar::after { content: ""; width: 130px; height: 5px; background: #000; border-radius: 3px; }
.phone.quer .homebar { height: 14px; }

/* ---------- Erklär-Panel ---------- */
.panel {
    width: 340px;
    max-width: 100%;
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: #fff;
    border: 2px solid #000;
    border-radius: 16px;
    padding: 20px;
    font-size: 14px;
    line-height: 1.45;
}
.panel h2 { font-size: 18px; margin: 0 0 4px; }
.panel h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin: 20px 0 6px; border-top: 1px solid #000; padding-top: 14px; }
.panel ul { margin: 0 0 6px; padding-left: 18px; }
.panel li { margin: 2px 0; }
.panel .kapitel { font-weight: 700; margin: 10px 0 2px; }
.panel .folie { font-weight: 700; margin: 0 0 4px; }
.btn.drehen-fix {
    position: fixed;
    z-index: 10;
    right: 20px;
    bottom: 20px;
    width: auto;
    margin: 0;
    padding: 12px 20px;
    border-radius: 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}

/* ---------- Grundelemente im Screen ---------- */
.screen h2 { font-size: 22px; margin: 4px 0 8px; }
.screen h3 { font-size: 17px; margin: 6px 0; }
.screen p { line-height: 1.45; margin: 8px 0; }
.hinweis { font-size: 12.5px; color: #666; }
.icon { width: 20px; height: 20px; }

.btn {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 14px 16px;
    border: 2px solid #000;
    border-radius: 14px;
    background: #000;
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}
.btn.zweit { background: #fff; color: #000; }
.btn:disabled { background: #c8c8c8; border-color: #c8c8c8; cursor: not-allowed; }
.btn-reihe { display: flex; gap: 10px; }
.btn-reihe .btn { flex: 1; }
.link { display: block; text-align: center; margin-top: 14px; font-size: 14px; }

.box { display: block; border: 2px solid #000; border-radius: 16px; padding: 14px; margin: 12px 0; }
.box.gestrichelt { border-style: dashed; }
.box.kompakt { padding: 10px 14px; margin-top: 0; font-size: 14px; }
.box.links { text-align: left; }
.box.mitte { text-align: center; }
.box > strong:first-child { display: block; }

.chip {
    display: inline-block;
    border: 1.5px solid #000;
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 600;
}

.intro {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}
.intro h2 { font-size: 28px; }
.screen .intro p { font-size: 18px; }
.screen .intro .hinweis { font-size: 13px; }
.logo { width: 120px; margin-bottom: 8px; }

.split > * + * { margin-top: 12px; }
.phone.quer .split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.phone.quer .split > * + * { margin-top: 0; }
.medien > * + * { margin-top: 12px; }

.frage { font-weight: 700; font-size: 18px; margin: 14px 0 4px; }
.vorlage { font-size: 21px; font-weight: 700; text-align: center; }
.dialog { border-left: 3px solid #000; padding-left: 12px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.phone.quer .grid2.breit { grid-template-columns: repeat(4, 1fr); }
.phone.quer .kacheln { grid-template-columns: repeat(3, 1fr); }

/* ---------- Antwort-Optionen ---------- */
.opt {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
    padding: 12px 14px;
    border: 2px solid #000;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
    --bg: #fff;
}
.grid2 .opt { margin: 0; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt::before {
    content: "";
    flex: none;
    width: 20px;
    height: 20px;
    border: 2px solid #000;
    border-radius: 50%;
}
.opt.sel { background: #000; color: #fff; --bg: #000; }
.opt.sel::before { border-color: #fff; background: radial-gradient(circle, #fff 0 4px, transparent 5px); }
.opt:focus-within { outline: 3px dashed #000; outline-offset: 2px; }
.opt.gesperrt { border-style: dashed; color: #888; cursor: default; }
.opt.gesperrt::before { display: none; }
.opt .icon { width: 14px; height: 14px; vertical-align: -2px; }

.bild-opt { flex-direction: column; padding: 6px; }
.bild-opt::before { display: none; }
.bild-opt .bild { border: 0; }
.kachel::before { position: absolute; top: 8px; left: 8px; width: 16px; height: 16px; }
.kachel { flex-direction: column; text-align: center; gap: 2px; padding: 14px 8px 10px; }
.kachel small { font-size: 11px; }
.wappen { width: 36px; height: 42px; }
.wappen path { stroke: currentColor; }
.wappen text { font-size: 12px; font-weight: 800; fill: currentColor; }

/* ---------- Platzhalter-Bild ---------- */
.bild {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 2px solid currentColor;
    border-radius: 10px;
    display: grid;
    place-items: center;
    overflow: hidden;
}
.bild svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bild line { stroke: currentColor; stroke-width: 1; opacity: .35; vector-effect: non-scaling-stroke; }
.bild span { position: relative; padding: 2px 8px; border-radius: 6px; background: var(--bg, #fff); font-size: 13px; font-weight: 600; }
.bild-gross { max-width: 260px; margin: 0 auto; }

/* ---------- Simuliertes Audio ---------- */
.audio { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.a-titel { width: 100%; font-size: 13px; font-weight: 600; }
.play {
    flex: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #000;
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
}
.play svg { width: 18px; height: 18px; fill: currentColor; }
.spur { flex: 1; height: 6px; background: #ddd; border-radius: 3px; overflow: hidden; }
.spur.gross { height: 10px; margin: 6px 0 4px; }
.fortschritt { height: 100%; width: 0; background: #000; }
.zeit { font-size: 13px; font-variant-numeric: tabular-nums; }
.transkript { display: none; width: 100%; font-size: 13px; font-style: italic; }
.transkript::before { content: "Im Audio: "; font-style: normal; font-weight: 600; }
.audio.laeuft .transkript, .audio.gehoert .transkript { display: block; }
.opt.sel .play { background: #fff; color: #000; }
.opt.sel .spur { background: #555; }
.opt.sel .fortschritt { background: #fff; }

/* ---------- Simuliertes Mikrofon ---------- */
.mikro { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 18px 0; }
.mic-btn {
    width: 88px;
    height: 88px;
    border: 3px solid #000;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
}
.mic-btn .icon { width: 38px; height: 38px; }
.nimmt-auf .mic-btn { background: #000; color: #fff; animation: puls 1s infinite; }
.fertig .mic-btn { border-width: 6px; border-style: double; }
.mic-status { font-size: 14px; text-align: center; }
@keyframes puls {
    0% { box-shadow: 0 0 0 0 rgba(0, 0, 0, .45); }
    100% { box-shadow: 0 0 0 22px rgba(0, 0, 0, 0); }
}

/* ---------- Feedback / Reward Loop ---------- */
.feedback { text-align: center; }
.daumen .icon { width: 72px; height: 72px; stroke-width: 1.6; }
.banner {
    margin: 10px 0;
    padding: 14px;
    border-radius: 14px;
    background: #000;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    text-align: center;
}
.fakt { text-align: left; }
.knapp { border: 2px dashed #000; border-radius: 16px; padding: 12px 14px; margin-bottom: 12px; }
.knapp .audio { margin: 8px 0; }
.ruetteln { animation: ruetteln .45s ease 2; }
@keyframes ruetteln {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

/* ---------- Karte ---------- */
.karte {
    display: block;
    width: 100%;
    height: auto;
    border: 2px solid #000;
    border-radius: 14px;
    background: #fff;
    touch-action: manipulation;
}
.region { fill: #fff; stroke: #000; stroke-width: 1.5; cursor: pointer; }
.region:hover { fill: #eee; }
.region.aktiv { fill: url(#schraffur); }
.karte[data-modus="pin"] .region { cursor: crosshair; }
.karte[data-modus="anzeige"] .region { cursor: default; }
.karte[data-modus="anzeige"] .region:hover { fill: #fff; }
.karte[data-modus="anzeige"] .region.aktiv { fill: url(#schraffur); }
.lbl {
    font-size: 11px;
    font-weight: 700;
    text-anchor: middle;
    pointer-events: none;
    paint-order: stroke;
    stroke: #fff;
    stroke-width: 3px;
}
.lbl.klein { font-size: 7px; }
.pin { pointer-events: none; }
.ziel { fill: #fff; stroke: #000; stroke-width: 2; }
.abstand { stroke: #000; stroke-width: 1.5; stroke-dasharray: 4 3; }

/* ---------- Lernreise ---------- */
.stufe { margin-bottom: 18px; }
.stufe h3 { margin-top: 6px; }
.reise { list-style: none; margin: 8px 0 0; padding: 0; position: relative; }
.reise::before { content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; border-left: 2px dashed #000; }
.reise a { position: relative; display: flex; align-items: center; gap: 12px; padding: 6px 0; text-decoration: none; }
.knoten {
    flex: none;
    width: 44px;
    height: 44px;
    border: 2px solid #000;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
}
.erledigt .knoten { background: #000; color: #fff; }
.gesperrt .knoten { border-style: dashed; color: #888; }
.gesperrt .t-name { color: #888; }
.phone.quer .reise-wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.liste { padding-left: 20px; }
.liste li { margin: 10px 0; }

.formate .format, .format {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin: 10px 0;
}
.format small { color: #555; }
.format .chip { margin-top: 4px; }
.format .pfeil { margin-left: auto; font-size: 26px; }
.format .knoten .icon { width: 20px; height: 20px; }
.phone.quer .formate { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

.punkte-reihe { display: flex; gap: 6px; }
.punkte-reihe span { flex: 1; height: 6px; border: 1.5px solid #000; border-radius: 3px; }
.punkte-reihe span.an { background: #000; }
.punkte-reihe span.jetzt { background: repeating-linear-gradient(45deg, #000 0 2px, #fff 2px 5px); }

/* ---------- Ränge ---------- */
.rang { border: 2px solid #000; border-radius: 16px; overflow: hidden; margin: 12px 0; }
.rang-kopf { padding: 12px 14px; border-bottom: 2px solid #000; }
.rang.hervor .rang-kopf { background: #000; color: #fff; }
.rang-kopf small { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.rang-kopf strong { font-size: 18px; }
.rang dl { margin: 0; padding: 4px 14px 12px; }
.rang dt { margin-top: 8px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #666; }
.rang dd { margin: 2px 0 0; font-size: 14px; }
.phone.quer .raenge { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.phone.quer .raenge .rang { margin: 0; }

/* ---------- Sprechen ---------- */
.transkription { font-size: 20px; line-height: 1.9; }
.w-ok { font-weight: 700; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.w-nah { font-style: italic; color: #555; text-decoration: underline dashed; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.legende { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; line-height: 1.8; text-align: left; }
.legende .w-ok, .legende .w-nah { margin-right: 6px; }

/* ---------- Satzbausteine ---------- */
.satz-ziel { min-height: 58px; display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; padding: 8px 0; border-bottom: 2px solid #000; }
.satz-ziel.leer::before { content: "Tippe die Wörter in der richtigen Reihenfolge an"; color: #888; font-size: 13px; padding-top: 10px; }
.satz-pool { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0 4px; }
.wort { padding: 8px 12px; border: 2px solid #000; border-radius: 10px; background: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.satz-ziel .wort { background: #000; color: #fff; }

/* ---------- Fortschritt / Meta-Game ---------- */
.segment { display: flex; border: 2px solid #000; border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.segment a { flex: 1; padding: 8px; text-align: center; text-decoration: none; font-weight: 600; font-size: 14px; }
.segment a.aktiv { background: #000; color: #fff; }
.phone.quer .spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; align-items: start; }

.streak { display: flex; gap: 6px; margin-top: 8px; }
.streak span { flex: 1; aspect-ratio: 1; display: grid; place-items: center; border: 2px solid #000; border-radius: 8px; font-size: 11px; font-weight: 700; }
.streak span.an { background: #000; color: #fff; }

.stempel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stempel {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    padding: 6px;
    border: 2px dashed #aaa;
    border-radius: 50%;
    color: #999;
    font-size: 11px;
    text-align: center;
}
.stempel.an { border: 4px double #000; color: #000; font-weight: 700; transform: rotate(-8deg); }

.zeile { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #ddd; }
.zeile > span:first-child { width: 90px; }
.zeile > span:last-child { margin-left: auto; }
.zeile.du { font-weight: 800; }
.balken-wrap { flex: 1; height: 8px; background: #eee; border-radius: 4px; overflow: hidden; }
.balken { display: block; height: 100%; background: #000; }

.abzeichen {
    width: 84px;
    height: 84px;
    margin: 4px auto;
    display: grid;
    place-items: center;
    border: 5px double #000;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}
.sterne { font-size: 26px; letter-spacing: 4px; margin: 4px 0 0 !important; }

.avatar { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 8px 0 12px; }
.avatar svg { width: 60px; height: 80px; fill: none; stroke: #000; stroke-width: 2.5; stroke-linecap: round; }

.code { font-size: 44px !important; font-weight: 800; letter-spacing: 8px; margin: 0 !important; }
.countdown {
    width: 70px;
    height: 70px;
    margin: 0 auto;
    display: grid;
    place-items: center;
    border: 3px solid #000;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 800;
}

.eingabe {
    width: 100%;
    padding: 14px;
    border: 2px solid #000;
    border-radius: 14px;
    font: inherit;
    font-size: 16px;
}

/* ---------- Echtes Smartphone: Vollbild ohne Rahmen ---------- */
@media (max-width: 600px), (pointer: coarse) and (max-height: 500px) {
    .buehne { display: block; padding: 0; }
    .phone, .phone.quer {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
    .phone::before, .phone::after, .insel, .statusbar, .homebar, .panel, .drehen-fix { display: none; }
    .display, .phone.quer .display {
        border-radius: 0;
        padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
    }
    .tabbar { padding-bottom: max(4px, env(safe-area-inset-bottom)); }
}
