/* Einstufungstest Deutsch (app/Views/pt.php, js/pt.js) */
.pt-sec { padding-top: var(--space-4); }
.pt-wrap { max-width: 820px; }
.pt-ad .lg-ad { margin-block: 0 var(--space-8); }   /* 32 px bis zur Karte und damit zu jedem Knopf (Werberegel) */
.pt-card { min-height: 420px; align-content: start; }
.pt-intro { display: grid; gap: var(--space-4); justify-items: start; }
.pt-intro > p { margin: 0; }
.pt-form { justify-items: stretch; max-width: 520px; }
.pt-form .lg-btn { justify-self: start; }
.pt-note { margin: 0; font-size: 14px; color: var(--text-muted); }
.pt-loading { margin: 0; padding: var(--space-8) 0; text-align: center; color: var(--text-muted); }
.pt-err { margin: 0; color: var(--danger-text); font-weight: 600; }
.pt-instr { margin: 0; font: 700 19px/1.35 var(--font-display); }
.pt-text { padding: var(--space-4); border-radius: var(--radius-sm); background: var(--surface-sunken); font-size: 17px; line-height: 1.6; overflow-wrap: anywhere; }
.pt-gaps { line-height: 2.2; }
/* Auswahlfelder im Fließtext: eigener Abstand nach oben und unten, sonst stoßen die Felder zweier Zeilen aneinander. */
.pt-gapw { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; margin: 6px 2px; line-height: 1.3; }
.pt-gapw b { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 50%; background: var(--surface); font: 700 12px/1 var(--font-text); }
.pt-gap { width: auto; min-width: 9em; max-width: 100%; min-height: 40px; display: inline-block; }
.pt-body { display: grid; gap: var(--space-5); }
.pt-item { display: grid; gap: var(--space-2); }
.pt-q { margin: 0; font-weight: 600; }
.pt-tfbtns { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.pt-match .lg-select { width: 100%; }
.pt-audio { display: flex; align-items: center; gap: var(--space-3); color: var(--text-muted); }
.pt-audio .lg-audio[disabled] { opacity: .4; cursor: not-allowed; }
.pt-hint { margin: 0; font-size: 15px; color: var(--text-muted); }
.pt-sub { margin: var(--space-2) 0 0; font: 700 14px/1.2 var(--font-text); text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.pt-nav { display: flex; justify-content: flex-end; padding-top: var(--space-2); }
.pt-result { display: grid; gap: var(--space-4); }
.pt-big { display: grid; gap: 4px; }
.pt-big span { color: var(--text-muted); }
.pt-big b { font: 800 72px/1 var(--font-display); letter-spacing: -.03em; }
.pt-big small { font-size: 18px; color: var(--text-muted); }
.pt-subs { display: grid; gap: var(--space-3); margin: 0; }
.pt-subs > div { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: var(--space-3); align-items: center; }
.pt-subs dd { margin: 0; display: grid; grid-template-columns: 1fr 52px; gap: var(--space-3); align-items: center; }
.pt-lv { display: inline-grid; place-items: center; min-width: 40px; height: 28px; padding: 0 8px; border-radius: var(--radius-xs); background: var(--surface-sunken); font: 800 14px/1 var(--font-display); }
/* Firmenbereich */
.pt-firmform { display: grid; gap: var(--space-4); max-width: 620px; }
.pt-firmform .lg-btn { justify-self: start; }
.pt-check { display: flex; gap: var(--space-2); align-items: flex-start; font-size: 15px; }
.pt-check input { margin-top: 4px; }
.pt-linkbox { display: grid; gap: var(--space-5); grid-template-columns: minmax(0, 1fr); padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
@media (min-width: 720px) { .pt-linkbox { grid-template-columns: minmax(0, 1fr) 200px; align-items: start; } }
.pt-link { margin: var(--space-2) 0 var(--space-3); font-weight: 600; overflow-wrap: anywhere; }
.pt-qr { margin: 0; display: grid; gap: var(--space-2); justify-items: center; text-align: center; font-size: 13px; color: var(--text-muted); }
.pt-qr svg { width: 180px; height: 180px; background: #fff; padding: 8px; border-radius: var(--radius-xs); }
.pt-open { color: var(--warning-text, var(--text-muted)); }
.pt-lvb { font: 800 16px/1 var(--font-display); }
.pt-del { margin: 0; }
.pt-delg { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
@media print {
  body:not(.pt-printqr) .pt-ad, body:not(.pt-printqr) .pt-result .pl-actions { display: none !important; }
  body.pt-printqr * { visibility: hidden; }
  body.pt-printqr .pt-qr, body.pt-printqr .pt-qr * { visibility: visible; }
  body.pt-printqr .pt-qr { position: fixed; inset: 0; align-content: center; font-size: 20px; }
  body.pt-printqr .pt-qr svg { width: 9cm; height: 9cm; }
}
/* Bilder und Textsorten (Schild, Aushang, Nachricht, E-Mail, Brief, Zeitung, Anzeige) */
.pt-fig { margin: 0; }
.pt-fig img { display: block; width: 100%; max-height: 340px; height: auto; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-sunken); }
.pt-item--img { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); align-items: start; }
@media (min-width: 560px) { .pt-item--img { grid-template-columns: 180px minmax(0, 1fr); } }
.pt-pic { margin: 0; }
.pt-pic img { display: block; width: 100%; max-width: 220px; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); }
.pt-q--s { font-size: 14px; color: var(--text-muted); }
.pt-doc__title { display: block; margin-bottom: 4px; font-size: 1.1em; }
.pt-doc--sign { justify-self: center; width: min(100%, 460px); padding: var(--space-6) var(--space-6) var(--space-5); text-align: center; background: linear-gradient(160deg, #fdfdfb, #eceae4); color: #1d2b2a; border: 1px solid #c9c6bd; border-radius: 6px; box-shadow: 0 2px 0 #b9b5aa, 0 10px 24px rgba(0,0,0,.14); position: relative; font-family: var(--font-display); }
.pt-doc--sign::before, .pt-doc--sign::after { content: ""; position: absolute; top: 10px; width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #8d8a82); }
.pt-doc--sign::before { left: 10px; } .pt-doc--sign::after { right: 10px; }
.pt-doc--sign .pt-doc__title { font-size: 1.25em; padding-bottom: var(--space-2); margin-bottom: var(--space-2); border-bottom: 2px solid #1d6b63; color: #1d6b63; }
.pt-doc--notice { background: #fffdf3; color: #222; border: 1px solid #e3dcc0; border-radius: 2px; box-shadow: 0 6px 16px rgba(0,0,0,.1); transform: rotate(-.4deg); position: relative; padding-top: var(--space-6); }
.pt-doc--notice::before { content: ""; position: absolute; top: 8px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff8a7a, #c0392b); box-shadow: 0 2px 3px rgba(0,0,0,.3); }
.pt-doc--sms { width: min(100%, 520px); background: #dcf3e8; color: #10241c; border-radius: 18px 18px 18px 4px; border: 0; }
.pt-doc--mail, .pt-doc--letter { background: var(--surface); border: 1px solid var(--line-strong); }
.pt-doc__bar { display: flex; gap: 6px; margin: calc(-1 * var(--space-4)) calc(-1 * var(--space-4)) var(--space-3); padding: 8px 12px; background: var(--surface-sunken); border-bottom: 1px solid var(--line); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.pt-doc__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.pt-doc--letter { box-shadow: 0 6px 16px rgba(0,0,0,.08); padding: var(--space-6); }
.pt-doc--news { background: #faf8f3; color: #1c1c1c; border: 0; border-top: 3px double #1c1c1c; font-family: Georgia, "Times New Roman", serif; line-height: 1.55; }
.pt-doc--news .pt-doc__title { font-size: 1.3em; line-height: 1.25; margin-bottom: var(--space-2); }
.pt-doc--ad { background: var(--surface); border: 1.5px dashed var(--line-strong); }
.pt-ads { display: grid; gap: var(--space-2); grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
.pt-ads .pt-doc--ad { padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); font-size: 15px; line-height: 1.45; }
.pt-ad__k { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-inline-end: 8px; border-radius: 50%; background: var(--text); color: var(--surface); font: 800 13px/1 var(--font-display); }
[data-theme="dark"] .pt-doc--sign, [data-theme="dark"] .pt-doc--notice, [data-theme="dark"] .pt-doc--news, [data-theme="dark"] .pt-doc--sms { filter: brightness(.92); }
/* Reihenfolge: verschiebbare Liste */
.pt-order { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.pt-order > li { display: grid; grid-template-columns: 20px 28px minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; min-height: 52px; padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3); border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
.pt-order > li.is-fixed { grid-template-columns: 28px minmax(0, 1fr); padding-inline-start: calc(var(--space-3) + 32px); background: var(--surface-sunken); border-style: dashed; color: var(--text-muted); }
.pt-ord { cursor: grab; }
.pt-ord { transition: transform .15s ease; user-select: none; -webkit-user-select: none; }
.pt-ord.is-drag { transition: none; position: relative; z-index: 2; box-shadow: 0 10px 24px rgba(0,0,0,.18); border-color: var(--text); }
.pt-ord.is-over { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pt-ord__n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-xs); background: var(--surface-sunken); font: 800 13px/1 var(--font-display); }
.pt-ord__t { overflow-wrap: anywhere; }
.pt-ord__mv { display: flex; gap: 4px; }
.pt-ord__mv button { display: grid; place-items: center; width: 40px; height: 40px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); cursor: pointer; }
.pt-ord__mv button:hover:not([disabled]) { border-color: var(--text); background: var(--surface-hover); }
.pt-ord__mv button[disabled] { opacity: .3; cursor: default; }
/* Druckblatt „Ergebnis drucken“ (js/pt.js printSheet) */
#ptPrint { display: none; }
@media print {
  @page { size: A4; margin: 18mm 16mm; }
  body.pt-printing > :not(#ptPrint) { display: none !important; }
  body.pt-printing { background: #fff !important; }
  body.pt-printing #ptPrint { display: block; color: #1a1a1a; font: 11pt/1.45 var(--font-text), Arial, sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ptp-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 5mm; border-bottom: 2px solid #1d6b63; }
  .ptp-logo { display: inline-flex; align-items: center; gap: 8px; font: 800 18pt/1 var(--font-display), Arial, sans-serif; letter-spacing: -.02em; }
  .ptp-head h1 { margin: 0; font: 700 13pt/1.2 var(--font-display), Arial, sans-serif; color: #1d6b63; }
  .ptp-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 2mm 8mm; margin: 6mm 0; }
  .ptp-meta div { display: flex; gap: 3mm; border-bottom: 1px solid #ddd; padding-bottom: 1.5mm; }
  .ptp-meta dt { width: 32mm; color: #666; } .ptp-meta dd { margin: 0; font-weight: 600; }
  .ptp-level { display: grid; grid-template-columns: 52mm 1fr; gap: 7mm; align-items: center; padding: 6mm; border: 1.5px solid #1d6b63; border-radius: 3mm; background: #eef6f4; }
  .ptp-badge { display: grid; gap: 1mm; text-align: center; }
  .ptp-badge span { font-size: 9pt; color: #555; } .ptp-badge b { font: 800 44pt/1 var(--font-display), Arial, sans-serif; color: #1d6b63; } .ptp-badge small { font-size: 9.5pt; color: #444; }
  .ptp-level p { margin: 0; font-size: 11.5pt; }
  .ptp-h { margin: 8mm 0 2.5mm; font-weight: 700; font-size: 10pt; text-transform: uppercase; letter-spacing: .05em; color: #555; }
  .ptp-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2mm; list-style: none; margin: 0; padding: 0; }
  .ptp-scale li { padding: 2.5mm 0; text-align: center; border: 1px solid #bbb; border-radius: 2mm; font-weight: 700; color: #888; }
  .ptp-scale li.is-on { background: #1d6b63; border-color: #1d6b63; color: #fff; }
  .ptp-skills { width: 100%; border-collapse: collapse; }
  .ptp-skills th { width: 52mm; text-align: start; font-weight: 600; padding: 2mm 0; }
  .ptp-skills td:last-child { width: 16mm; text-align: end; font-weight: 700; }
  .ptp-bar { display: block; height: 3.5mm; border: 1px solid #bbb; border-radius: 2mm; overflow: hidden; }
  .ptp-bar i { display: block; height: 100%; background: #1d6b63; }
  .ptp-foot { margin-top: 12mm; padding-top: 4mm; border-top: 1px solid #ccc; font-size: 9pt; color: #666; }
  .ptp-foot p { margin: 0 0 1.5mm; }
}
/* Szene: Foto als Hintergrund, Schild bzw. Aushang darauf */
.pt-scene { display: grid; place-items: center; padding: clamp(20px, 7%, 56px) clamp(12px, 6%, 48px); border-radius: var(--radius-sm); background-size: cover; background-position: 52% 35%; }
.pt-scene--sign { background-position: 53% 20%; }
.pt-scene .pt-doc--sign { width: min(100%, 400px); margin: 0; padding: 0 0 var(--space-4); text-align: start; font-family: var(--font-text); font-size: 15px; line-height: 1.5;
  background: linear-gradient(135deg, rgba(255,255,255,.97) 0%, rgba(244,247,246,.95) 55%, rgba(232,238,236,.95) 100%); color: #1c2b29; border: 1px solid rgba(255,255,255,.95); border-radius: 4px;
  box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, 8px 14px 22px rgba(0,0,0,.28), 2px 3px 4px rgba(0,0,0,.18); position: relative; overflow: hidden; }
.pt-scene .pt-doc--sign::before, .pt-scene .pt-doc--sign::after { display: none; }
.pt-scene .pt-doc--sign .pt-doc__title { margin: 0 0 var(--space-3); padding: 14px 28px 12px; border: 0; background: #1d6b63; color: #fff; font: 700 17px/1.25 var(--font-display); }
.pt-scene .pt-doc--sign { counter-reset: none; }
.pt-scene .pt-doc--sign > br:first-of-type { display: none; }
.pt-scene .pt-doc--sign { padding-inline: 28px; }
.pt-scene .pt-doc--sign .pt-doc__title { margin-inline: -28px; }
.pt-bolt { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0, #d9dcdc 35%, #8f9595 100%); box-shadow: 0 1px 2px rgba(0,0,0,.35); z-index: 1; }
.pt-bolt:nth-child(1) { top: 7px; left: 7px; } .pt-bolt:nth-child(2) { top: 7px; right: 7px; } .pt-bolt:nth-child(3) { bottom: 7px; left: 7px; } .pt-bolt:nth-child(4) { bottom: 7px; right: 7px; }
.pt-scene .pt-doc--notice { width: min(100%, 520px); transform: rotate(-1deg); box-shadow: 3px 8px 14px rgba(0,0,0,.3); }
.pt-scene .pt-doc--notice.pt-gaps { width: min(100%, 640px); transform: none; }
.pt-ord__grip { display: grid; place-items: center; width: 20px; height: 40px; color: var(--text-muted); cursor: grab; touch-action: none; }
.pt-ord.is-drag, .pt-ord.is-drag .pt-ord__grip { cursor: grabbing; }
/* Breite Ansicht: ganzes Foto im Seitenverhältnis 3:2, Schild genau auf der freien Wandfläche (31–75 % der Breite). */
@media (min-width: 720px) {
  .pt-scene--sign { aspect-ratio: 3 / 2; padding: 0; position: relative; background-position: center; display: block; }
  .pt-scene--sign .pt-doc--sign { position: absolute; left: 31%; top: 7%; width: 43%; font-size: 13.5px; line-height: 1.45; padding-bottom: var(--space-3); }
  .pt-scene--sign .pt-doc--sign .pt-doc__title { font-size: 15px; padding: 11px 24px 9px; margin-bottom: var(--space-2); }
}
@media (max-width: 719.98px) { .pt-scene--sign { background-position: 45% 0; padding: 28px 14px; } }
/* Kennzeichnung KI-erzeugter Bilder */
.pt-fig, .pt-pic, .pt-scene { position: relative; }
.pt-pic { justify-self: start; width: 100%; max-width: 220px; }
.pt-ai { position: absolute; right: 6px; bottom: 6px; padding: 2px 6px; border-radius: 3px; background: rgba(0,0,0,.55); color: #fff; font: 600 10.5px/1.3 var(--font-text); letter-spacing: .02em; pointer-events: none; }
