/* DRUCKMITTEL · Mastermind-Strecke
   Farben und Schrift wie in der Akademie (web/src/app/globals.css):
   Signalrot #D0111F, Geist, Neutraltöne.
   REGEL: Auf roten Flächen steht nie grauer Text – nur Weiß. */

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --signal: #D0111F;
  --signal-d: #A80D18;
  --signal-hell: #FDF2F2;
  --ink: #171717;
  --text: #404040;
  --muted: #737373;
  --line: #E5E5E5;
  --bg: #FAFAFA;
  --weiss: #fff;
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.55; }
[hidden] { display: none !important; }
a { color: var(--signal); }

.wrap { max-width: 840px; margin: 0 auto; padding: 32px 16px 0; }

.kopf { margin-bottom: 22px; text-align: center; }
.wortmarke { display: inline-block; background: var(--signal); color: #fff; font-size: 20px; font-weight: 900; line-height: 1; letter-spacing: -.02em; padding: 6px 10px; }
.unterzeile { font-size: 12px; color: #a3a3a3; margin-top: 8px; }

h1 { font-size: clamp(26px, 5vw, 36px); line-height: 1.15; margin: 0 0 20px; text-align: center; text-wrap: balance; letter-spacing: -.02em; font-weight: 800; }
.lead { color: var(--text); margin: 0 auto 28px; max-width: 640px; text-align: center; text-wrap: balance; }
.lead b { color: var(--ink); }


.card { background: #fff; border: 1px solid var(--line); padding: 24px; margin-bottom: 18px; }
@media (max-width: 600px) { .card { padding: 18px 16px; } }
h2 { font-size: 17px; margin: 0 0 14px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; letter-spacing: -.01em; }
.h2zusatz { font-weight: 400; color: var(--muted); font-size: 13px; }
.sub { font-size: 14px; color: var(--muted); margin: 6px 0 16px; }
.sub b { color: var(--ink); }

/* Paket-Karten (Basis + Ausbaustufen) */
.pack { display: flex; gap: 14px; border: 1px solid #CFCFCF; padding: 16px; margin-bottom: 12px; cursor: pointer; align-items: flex-start; background: #fff; }
.pack > input { margin-top: 4px; width: 19px; height: 19px; accent-color: var(--signal); flex: none; cursor: pointer; }
.pack:hover { border-color: #8A8A8A; }
.pack:has(> input:checked) { border: 2px solid var(--signal); background: var(--signal-hell); padding: 15px; }
.pack .badge { flex: none; width: 34px; height: 34px; background: var(--ink); color: #fff; font-weight: 900; font-size: 17px; display: flex; align-items: center; justify-content: center; }
.pack:has(> input:checked) .badge { background: var(--signal); }
.pack .body { flex: 1; min-width: 0; }
.pack .head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.pack .ttl { font-weight: 800; font-size: 16px; letter-spacing: .01em; }
.pack .pprice { font-weight: 900; font-size: 18px; white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
.pack .pprice small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.pack .sell { margin: 8px 0; color: var(--text); font-size: 14.5px; }
.pack .inc { font-size: 13px; color: var(--muted); line-height: 1.5; }
.pack .inc b { color: var(--text); }
.pack .jump { font-size: 13.5px; font-style: italic; margin-top: 8px; }
.pack .check { margin-top: 10px; }
.pack.static, .pack.static:hover { cursor: default; border-color: #CFCFCF; }
.pack.basis, .pack.basis:hover { border: 2px solid var(--ink); margin-bottom: 0; }
.pack.basis .badge { background: var(--signal); }
.pack.slim { padding: 10px 16px; color: var(--muted); font-size: 14px; border-style: dashed; align-items: center; }
.pack.slim > input { margin-top: 0; }
.pack.slim:has(> input:checked) { padding: 9px 15px; color: var(--ink); }
@media (max-width: 600px) {
  .pack { gap: 10px; padding: 14px 12px; }
  .pack:has(> input:checked) { padding: 13px 11px; }
  .pack .badge { width: 28px; height: 28px; font-size: 15px; }
  .pack .head { flex-direction: column; gap: 2px; }
  .pack .pprice { text-align: left; }
}

.base { display: flex; gap: 14px; align-items: flex-start; }
.base .tick { color: var(--signal); font-weight: 900; font-size: 20px; }
.base p { margin: 0; color: var(--text); font-size: 15px; }
.base .free { margin-left: auto; white-space: nowrap; font-weight: 800; text-align: right; }
.base .free small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
@media (max-width: 600px) { .base { flex-wrap: wrap; } .base .free { margin-left: 34px; text-align: left; } }

.opt { display: flex; gap: 12px; padding: 14px 10px; border-bottom: 1px solid var(--line); cursor: pointer; align-items: flex-start; }
.opt:last-child { border-bottom: 0; }
.opt:hover { background: #FAFAFA; }
.opt input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--signal); flex: none; cursor: pointer; }
.opt .txt { flex: 1; min-width: 0; }
.opt .name { font-weight: 700; }
.opt .desc { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.opt .desc b { color: var(--text); }
.opt .price { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.opt.hero { background: var(--signal-hell); border-left: 3px solid var(--signal); }
.opt.disabled { opacity: .5; pointer-events: none; }
.opt.disabled .desc::after { content: " — im gewählten Paket enthalten"; color: var(--signal); font-weight: 600; }
.opt.gewaehlt:not(.disabled) { background: var(--signal-hell); }
.opt-info { cursor: default; background: #FAFAFA; }
.opt-info:hover { background: #FAFAFA; }
@media (max-width: 600px) { .opt { flex-wrap: wrap; } .opt .price { margin-left: 30px; } }

.hint { font-size: 13px; color: var(--muted); margin-top: 10px; }
.hint b { color: var(--text); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.feld-titel { margin-bottom: 8px; }
.feld-titel label { font-size: 14px; }
.feld-titel .hint { margin-top: 0; }
.q { margin-bottom: 22px; }
.q:last-child { margin-bottom: 0; }
.q .t { display: block; font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.q .hint { margin: 0 0 8px; }

input[type=text], input[type=email], input[type=tel], input:not([type]), textarea {
  width: 100%; font: inherit; font-size: 16px; /* 16px verhindert Zoom auf iOS */
  padding: 10px 12px; border: 1px solid #CFCFCF; background: #fff; color: var(--ink); border-radius: 0;
}
textarea { resize: vertical; min-height: 64px; line-height: 1.5; }
input:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.ungueltig input[type=text], .ungueltig textarea, input.ungueltig, textarea.ungueltig { border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal); }
.fehlertext { color: var(--signal); font-size: 13px; font-weight: 600; margin-top: 6px; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .row2 { grid-template-columns: 1fr; } }

.check { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; color: var(--text); margin-top: 8px; cursor: pointer; }
.check input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--signal); flex: none; }
.check.agb { margin: 6px 0 12px; font-size: 14px; }

.radio { display: flex; gap: 10px; padding: 9px 8px; border-bottom: 1px solid var(--line); cursor: pointer; align-items: center; }
.radio:last-child { border-bottom: 0; }
.radio input { accent-color: var(--signal); width: 17px; height: 17px; margin: 0; }
.radio .d { font-size: 12.5px; color: var(--muted); }

.step { border: 1px solid var(--line); padding: 16px; margin-bottom: 12px; background: #FAFAFA; }
.step .nr { font-weight: 800; color: var(--signal); font-size: 12.5px; letter-spacing: .06em; margin-bottom: 8px; }
.step .q { margin-bottom: 10px; }
.step .q:last-child { margin-bottom: 0; }
.freigabe { margin-top: 10px; font-size: 13.5px; }
.freigabe .t { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.freigabe .radio { padding: 6px 4px; font-size: 13.5px; }

/* Diktieren */
.diktat { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
.diktat-btn { font: inherit; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; background: #fff; color: var(--ink); border: 1px solid #CFCFCF; padding: 6px 12px; cursor: pointer; }
.diktat-btn:hover { border-color: var(--ink); }
.diktat-btn .punkt { width: 9px; height: 9px; border-radius: 50%; background: var(--signal); }
.diktat-btn.aktiv { background: var(--signal); border-color: var(--signal); color: #fff; }
.diktat-btn.aktiv .punkt { background: #fff; animation: puls 1s infinite; }
@keyframes puls { 50% { opacity: .25; } }
.diktat-live { font-size: 13px; color: var(--muted); font-style: italic; flex: 1; min-width: 0; }
.zaehler { font-size: 12px; color: #a3a3a3; margin-left: auto; font-variant-numeric: tabular-nums; }
.zaehler.knapp { color: var(--signal); }

.beispiel { margin-top: 8px; font-size: 13.5px; }
.beispiel summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; }
.beispiel summary:hover { color: var(--ink); }
.beispiel div { margin-top: 6px; padding: 10px 12px; background: #FAFAFA; border-left: 3px solid var(--line); color: var(--text); white-space: pre-line; }

.dateiinfo { font-size: 13px; margin-top: 6px; color: var(--text); }
.dateiinfo.warnung { color: var(--signal); font-weight: 600; }
input[type=file] { font: inherit; font-size: 14px; max-width: 100%; }

.lockbox { border: 2px dashed #CFCFCF; padding: 20px; text-align: center; color: var(--muted); font-size: 14px; }
.lockbox b { color: var(--ink); }
.cta { display: inline-block; margin-top: 12px; background: var(--signal); color: #fff; font: inherit; font-weight: 700; padding: 11px 20px; cursor: pointer; border: 0; }
.cta:hover { background: var(--signal-d); }

/* Leiste unten: fest am Bildschirmrand, volle Breite, Inhalt so breit wie die Seite */
body { padding-bottom: calc(var(--bar-h, 150px) + 24px); }
.sumbar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--ink); color: #fff; z-index: 10; transition: transform .2s; padding-bottom: env(safe-area-inset-bottom); }
.sumbar-in { max-width: 840px; margin: 0 auto; padding: 10px 16px 14px; }
.sumbar-row { display: flex; align-items: center; gap: 20px; }
.sumbar .info { flex: 1; min-width: 0; }
.sumbar .lbl { font-size: 12px; color: #a3a3a3; }
.sumbar .val { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.sumbar .ust { font-size: 11.5px; color: #a3a3a3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sumbar .actions { display: flex; align-items: stretch; gap: 10px; flex: none; }
.sumbar button { font: inherit; font-weight: 700; background: var(--signal); color: #fff; border: 0; padding: 0 24px; height: 50px; cursor: pointer; font-size: 15px; white-space: nowrap; }
.sumbar button:hover { background: var(--signal-d); }
.sumbar button:disabled { opacity: .6; cursor: wait; }
.sumbar .ghost { background: transparent; border: 1px solid #666; color: #ddd; font-weight: 600; font-size: 13px; padding: 0 16px; }
.sumbar .ghost:hover { background: transparent; border-color: #fff; color: #fff; }

/* Schritt-Navigation in der Leiste */
.steps { display: flex; align-items: center; gap: 8px; font-size: 12px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid #333; color: #8a8a8a; }
.steps span[data-st] { display: inline-flex; align-items: center; gap: 7px; }
.steps i { font-style: normal; font-weight: 700; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #555; font-size: 11px; }
.steps b { font-weight: 600; }
.steps .on { color: #fff; }
.steps .on i { background: var(--signal); border-color: var(--signal); color: #fff; }
.steps .done { color: #d4d4d4; }
.steps .done i { border-color: #d4d4d4; }
.steps .pfeil { color: #555; }
#view3 .steps { border-bottom: 0; margin-bottom: 0; padding-bottom: 4px; }

.fortschritt { display: flex; align-items: center; gap: 10px; margin: 4px 0 2px; font-size: 13px; font-weight: 600; }
.balken { flex: 0 1 180px; height: 6px; background: #404040; }
.balken i { display: block; height: 100%; width: 0; background: var(--signal); transition: width .3s; }
@media (max-width: 640px) {
  .sumbar-in { padding: 8px 16px 12px; }
  .sumbar-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .sumbar .actions { flex-direction: column-reverse; gap: 8px; }
  .sumbar button { height: 44px; }
  .sumbar .val { font-size: 21px; }
  #view2 .sumbar .lbl { display: none; }
  .fortschritt { margin-top: 0; }
  .steps { padding-bottom: 8px; margin-bottom: 8px; }
  .steps span[data-st]:not(.on) b { display: none; }  /* am Handy nur den aktuellen Schritt ausschreiben */
  body.tippt .sumbar { transform: translateY(110%); }  /* beim Tippen Platz für Tastatur und Feld */
}

.fine { font-size: 12px; color: #8a8a8a; margin-top: 16px; line-height: 1.55; }
.banner { background: #fff; border: 2px solid var(--signal); padding: 16px 20px; margin-bottom: 18px; }
.banner b { color: var(--signal); }
.warn { background: var(--signal-hell); border: 1px solid var(--signal); padding: 12px 16px; font-size: 14px; margin-bottom: 18px; }
.infobox { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--ink); padding: 14px 18px; margin-bottom: 18px; font-size: 14px; color: var(--text); }
.infobox p { margin: 0 0 8px; }
.infobox p:last-child { margin: 0; }
.infobox b { color: var(--ink); }
.klein { font-size: 13px; }
.ok { background: #fff; border: 2px solid var(--signal); padding: 28px; text-align: center; margin-bottom: 40px; }
.ok h2 { border: 0; font-size: 22px; }
.ok p { color: var(--text); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

dialog { border: 0; padding: 0; max-width: 460px; width: calc(100% - 32px); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(0,0,0,.55); }
dialog form { padding: 24px; }
dialog h3 { margin: 0 0 10px; font-size: 19px; }
dialog p { color: var(--text); font-size: 14.5px; margin: 0 0 12px; }
.dlgpreis { background: var(--signal-hell); padding: 10px 12px; }
.dlgaktionen { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
.dlgaktionen button { font: inherit; font-weight: 700; padding: 11px 18px; cursor: pointer; border: 1px solid var(--ink); }
.ghost-hell { background: #fff; color: var(--ink); }
.rot { background: var(--signal); color: #fff; border-color: var(--signal) !important; }
.rot:hover { background: var(--signal-d); }

#toast { position: fixed; left: 50%; bottom: calc(var(--bar-h, 150px) + 16px); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 20; max-width: calc(100% - 32px); }
#toast.an { opacity: 1; }

/* ---------- Fragebogen in Etappen ---------- */
.etappe-kopf { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--signal); margin-bottom: 6px; }
.etappe > .sub:first-of-type { margin-top: -4px; }
.sumbar .zurueck { background: transparent; border: 0; color: #d4d4d4; font-weight: 600; font-size: 14px; padding: 0 8px; text-decoration: underline; text-underline-offset: 3px; }
.sumbar .zurueck:hover { background: transparent; color: #fff; }

details.optional { border: 1px dashed #CFCFCF; padding: 0 16px; margin: 6px 0 0; }
details.optional > summary { cursor: pointer; font-weight: 700; font-size: 14px; padding: 14px 0; color: var(--text); list-style: none; }
details.optional > summary::-webkit-details-marker { display: none; }
details.optional > summary::before { content: "+"; display: inline-block; width: 18px; color: var(--signal); font-weight: 800; }
details.optional[open] > summary::before { content: "–"; }
details.optional[open] { padding-bottom: 16px; }

.zusatz-btn { font: inherit; font-size: 14px; font-weight: 700; color: var(--signal); background: #fff; border: 1px dashed var(--signal); padding: 10px 14px; cursor: pointer; margin: 0 0 18px; width: 100%; text-align: left; }
.zusatz-btn:hover { background: var(--signal-hell); }

.ue-zeile { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.ue-zeile:last-child { border-bottom: 0; }
.ue-status { flex: none; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; background: var(--ink); }
.ue-zeile.fehlt .ue-status { background: var(--signal); }
.ue-titel { flex: 1; min-width: 0; font-weight: 700; }
.ue-titel small { display: block; font-weight: 500; font-size: 13px; color: var(--muted); }
.ue-zeile.fehlt .ue-titel small { color: var(--signal); font-weight: 600; }
.ue-zeile button { font: inherit; font-size: 13px; font-weight: 600; background: #fff; border: 1px solid #CFCFCF; padding: 6px 12px; cursor: pointer; }
.ue-zeile button:hover { border-color: var(--ink); }
@media (max-width: 640px) {
  .sumbar .actions { flex-direction: column-reverse; }
  .sumbar .zurueck { height: 32px; }
}
