/* traisor.share: /share und /s/<id>. Aufbau nach den Artboards in design/teilen/
   (TL-Teilen, TL-Teilen-Link, TL-Teilen-Mobil, TL-Paste, TL-Paste-Passwort,
   TL-Paste-Weg). Tokens aus assets/site.css (Richtung C) plus die zusätzlichen
   Kategorie-/Tönungsfarben aus design/tokens.json. Kein Inline-Style
   (CSP style-src 'self'), siehe web/nginx.conf. */

:root {
  --indigo: #3b2fe0;
  --toenung-akzent: rgba(255, 106, 61, 0.12);
  --toenung-indigo: rgba(59, 47, 224, 0.12);
  --toenung-minze: rgba(35, 186, 125, 0.12);
  --rand-gestrichelt: #b9bfd6;
  --zeilennummer: #8a93ad;
}

.teilen-wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.teilen-wrap-breit { max-width: 1220px; }

/* ---------- Kopf ---------- */

.tl-kopf { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 56px; flex-wrap: wrap; }
.tl-marke { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--nacht); }
.tl-marke:hover { color: var(--nacht); }
.tl-marke-schild { width: 30px; height: 30px; }
.tl-marke-wort { font-family: var(--f-display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.tl-pille {
  margin-left: 6px; height: 28px; padding: 0 12px; border-radius: 14px;
  background: var(--flaeche); display: flex; align-items: center;
  font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted);
}
.tl-nav { display: flex; align-items: center; gap: 24px; font-size: 15px; font-weight: 500; }
.tl-nav a { text-decoration: none; }
.tl-nav-kurz { display: none; }
.tl-knopf-outline,
.tl-knopf-outline-accent {
  display: flex; align-items: center; height: 44px; padding: 0 22px;
  border-radius: 22px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.tl-knopf-outline { border: 1.5px solid var(--nacht); color: var(--nacht); }
.tl-knopf-outline:hover { background: var(--nacht); color: var(--flaeche); }
.tl-knopf-outline-accent { border: 1.5px solid var(--akzent); color: var(--nacht); }
.tl-knopf-outline-accent:hover { background: var(--akzent); }

/* ---------- /share: Titel + Formulargitter ---------- */

.tl-titelzeile { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.tl-titel-block { display: flex; flex-direction: column; gap: 8px; }
.tl-titel-block h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1; font-weight: 800; letter-spacing: -0.035em; }
.tl-titel-block .hint { font-size: 16px; }

.share-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .share-grid { grid-template-columns: 1fr; }
}

.editor-card {
  min-height: 420px;
  border-radius: var(--radius);
  background: var(--flaeche);
  border: 1.5px solid var(--linie);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.editor-card:focus-within { border-color: var(--nacht); }
#editor-host { min-height: 380px; display: flex; flex-direction: column; flex-grow: 1; }
.dropzone-hint { font-size: 13px; color: var(--muted); padding: 10px 18px; border-top: 1px solid var(--linie); }

.settings-col { display: flex; flex-direction: column; gap: 14px; }

.settings-card,
.switches-card,
.accordion-card {
  border-radius: var(--radius);
  background: var(--flaeche);
}
.settings-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.settings-card h3 {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}

.segment-group {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px;
  padding: 4px; border-radius: 22px; background: var(--grund);
}
.segment {
  height: 36px; padding: 0; border: 0; border-radius: 18px; background: transparent;
  color: var(--nacht); font-size: 13px; font-weight: 600; cursor: pointer;
}
.segment:hover { background: var(--linie); }
.segment.active { background: var(--flaeche); }
.segment.active:hover { background: var(--flaeche); }

.switches-card { padding: 6px 20px; display: flex; flex-direction: column; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.switch-text { display: flex; flex-direction: column; gap: 2px; }
.switch-label { display: block; font-size: 15px; font-weight: 600; cursor: pointer; }
.switch-sub { font-size: 13px; color: var(--muted); }

.switch { position: relative; display: inline-flex; width: 48px; height: 28px; flex-shrink: 0; cursor: pointer; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch-track {
  position: absolute; inset: 0; box-sizing: border-box; padding: 3px;
  background: var(--linie); border-radius: 14px; display: flex; transition: background 0.15s;
}
.switch-track::before {
  content: ""; width: 22px; height: 22px; border-radius: 11px; background: #ffffff; transition: transform 0.15s;
}
.switch input:checked + .switch-track { background: var(--akzent); }
.switch input:checked + .switch-track::before { background: var(--nacht); transform: translateX(20px); }

.accordion-card { padding: 0 20px; display: flex; flex-direction: column; }
.tl-sr-toggle { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.accordion-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 60px; color: var(--nacht); font-size: 15px; font-weight: 600; cursor: pointer;
}
.accordion-head .muted-inline { font-weight: 400; color: var(--muted); }
.accordion-head .chevron { width: 18px; height: 18px; flex-shrink: 0; transition: transform 0.15s; }
.tl-sr-toggle:checked ~ .accordion-head .chevron { transform: rotate(180deg); }
.pw-warnung {
  display: flex; gap: 10px; align-items: flex-start; margin: 0;
  padding: 12px 14px; border-radius: 12px;
  background: var(--toenung-akzent); border: 1.5px solid var(--akzent);
  color: var(--nacht); font-size: 14px; line-height: 1.5;
}
.pw-warnung svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--akzent); margin-top: 1px; }
.pw-warnung strong { font-weight: 700; }

.field { display: flex; flex-direction: column; gap: 8px; padding-bottom: 18px; }
.field label { font-size: 13px; color: var(--muted); }
.field input[type="text"],
.field input[type="password"] {
  height: 48px; box-sizing: border-box; padding: 0 18px; border: 1.5px solid var(--nacht);
  border-radius: 24px; background: var(--flaeche); color: var(--nacht); font-size: 15px; font-family: var(--f-body);
}
.field textarea {
  border: 1px solid var(--linie); border-radius: 10px; padding: 10px 12px; font-family: var(--f-body);
  font-size: 14px; background: var(--grund); color: var(--nacht); resize: vertical; min-height: 72px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 20px;
  font-family: var(--f-body); font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn-accent { background: var(--akzent); color: var(--nacht); }
.btn-accent[disabled],
.btn-accent[aria-disabled="true"] { background: #e2e5f1; color: #4d5375; cursor: not-allowed; }
.btn-dark { background: var(--nacht); color: #ffffff; }
.btn-ghost { background: transparent; color: var(--muted); padding: 6px 4px; font-weight: 400; text-decoration: underline; }
.btn-outline { background: transparent; color: var(--nacht); border: 1.5px solid var(--nacht); }

.btn-cta {
  width: 100%; height: 60px; border: 0; border-radius: 30px; background: var(--akzent); color: var(--nacht);
  font-family: var(--f-body); font-size: 17px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-cta svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-cta[disabled],
.btn-cta[aria-disabled="true"] { background: #e2e5f1; color: #4d5375; cursor: not-allowed; }
.btn-cta-hint { font-size: 13px; line-height: 1.5; color: var(--muted); text-align: center; }
.btn-cta-hint a { font-weight: 600; }

.report-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--linie); }
.report-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }

#form-error,
.hint { font-size: 13px; color: var(--muted); }
.accent-text { color: var(--akzent-text); }

.tl-fuss { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.tl-fuss a { text-decoration: none; }

/* ---------- Ergebnis-Karte (/share nach dem Verschlüsseln) ---------- */

.result-card { display: flex; flex-direction: column; gap: 16px; }
.result-panel {
  padding: 36px 40px; border-radius: 36px; background: var(--flaeche);
  display: flex; flex-direction: column; gap: 22px;
}
.result-heading { display: flex; align-items: center; gap: 12px; }
.result-heading-check {
  width: 40px; height: 40px; border-radius: 20px; background: var(--gruen);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.result-heading h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1; font-weight: 800; letter-spacing: -0.035em; }

.link-row {
  display: flex; align-items: center; gap: 10px; height: 64px; box-sizing: border-box;
  padding: 0 8px 0 22px; border-radius: 32px; background: var(--grund); flex-wrap: nowrap;
}
.link-text {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--f-mono); font-size: 15px; background: none; padding: 0;
}
.link-row .btn { height: 48px; padding: 0 24px; flex-shrink: 0; }

.result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.result-actions .btn { height: 44px; padding: 0 20px; border: 1.5px solid var(--nacht); border-radius: 22px; background: transparent; color: var(--nacht); font-size: 15px; }
.result-actions .btn.qr-open { background: var(--linie); }
.result-share-hint { margin-left: 8px; font-size: 13px; color: var(--muted); }

.result-chips { display: flex; flex-wrap: wrap; gap: 8px; }
/* tl-chip statt chip: `.chip` ist in site.css (Landingpage) bereits mit
   position: absolute und Mono-Schrift für die dekorativen Bühnen-Chips
   belegt; als Klassenname geteilt, überlagerten sich beide Regelsätze. */
.tl-chip {
  height: 30px; padding: 0 12px; border-radius: 15px; background: var(--grund);
  display: flex; align-items: center; font-size: 13px; font-weight: 600; color: var(--nacht);
}
.tl-chip-akzent { background: var(--toenung-akzent); }
.tl-chip-indigo { background: var(--toenung-indigo); }

.result-hinweis {
  padding: 24px 28px; border-radius: var(--radius); background: var(--flaeche); color: var(--nacht);
  display: flex; gap: 16px; align-items: flex-start;
}
.result-hinweis.ohne-passwort { background: var(--toenung-akzent); }
.result-hinweis svg { width: 28px; height: 28px; flex-shrink: 0; }
.result-hinweis-titel { font-size: 17px; font-weight: 600; }
.result-hinweis-text { font-size: 15px; line-height: 1.5; max-width: 640px; }

.result-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; flex-wrap: wrap; }
.result-footer a { font-weight: 600; }
.result-footer span { color: var(--muted); }

.qr-panel { padding: 24px; border-radius: var(--radius); background: var(--flaeche); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.qr-host { background: #ffffff; }
.qr-host svg { display: block; width: 232px; height: 232px; }
.qr-closed {
  width: 232px; height: 232px; border-radius: var(--radius); border: 2px dashed var(--rand-gestrichelt);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  text-align: center; font-size: 14px; color: var(--muted);
}
.qr-closed strong { font-weight: 600; color: var(--nacht); }
.qr-caption { font-size: 13px; line-height: 1.5; color: var(--muted); text-align: center; }

.delete-card {
  padding: 20px 22px; border: 1.5px solid var(--nacht); border-radius: var(--radius); background: var(--flaeche);
  display: flex; flex-direction: column; gap: 10px;
}
.delete-title { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.delete-card .link-row { height: 44px; padding: 0 4px 0 14px; background: var(--grund); }
.delete-card .link-text { font-size: 12px; color: var(--muted); }
.delete-card .btn { height: 36px; width: 36px; padding: 0; border-radius: 18px; background: var(--flaeche); color: var(--nacht); }
.delete-hint { font-size: 13px; color: var(--akzent-text); font-weight: 600; }

/* ---------- /s/<id>: zentrierte Karten (vorOeffnen, Passwort, Weg) ---------- */

.tl-mitte { flex-grow: 1; min-height: 60vh; display: flex; align-items: center; justify-content: center; padding: 20px 0; }
.tl-eingangskarte {
  width: 100%; max-width: 620px; box-sizing: border-box; padding: 44px 48px; border-radius: 36px;
  background: var(--flaeche); display: flex; flex-direction: column; gap: 22px;
}
.tl-eingangskarte-icon { width: 56px; height: 56px; }
.tl-eingangskarte h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.02; font-weight: 800; letter-spacing: -0.035em; }
.tl-eingangskarte > .hint { font-size: 16px; line-height: 1.55; color: var(--muted); }
.tl-eingangskarte .btn-cta { width: auto; align-self: flex-start; height: 56px; padding: 0 30px; font-size: 17px; }
.tl-fussnote { font-size: 13px; color: var(--muted); }

.tl-passwortform { display: flex; flex-direction: column; gap: 10px; }
.tl-passwortform .feldzeile { display: flex; gap: 10px; }
.tl-passwortform input[type="password"] {
  flex-grow: 1; min-width: 0; height: 56px; box-sizing: border-box; padding: 0 20px;
  border: 1.5px solid var(--nacht); border-radius: 28px; background: var(--flaeche); color: var(--nacht); font-size: 16px;
}
.tl-passwortform input[aria-invalid="true"] { border-color: var(--akzent-text); }
.tl-passwortform .btn-cta { width: auto; flex-shrink: 0; padding: 0 28px; height: 56px; }
.tl-passwort-hinweis { font-size: 14px; line-height: 1.5; color: var(--muted); }
.tl-passwort-hinweis.accent-text { font-weight: 600; }

.tl-schluesselfeld { display: flex; flex-direction: column; gap: 8px; }
.tl-schluesselfeld label { font-size: 13px; color: var(--muted); }
.tl-schluesselfeld input {
  height: 48px; box-sizing: border-box; padding: 0 18px; border: 1.5px solid var(--linie);
  border-radius: 24px; background: var(--grund); color: var(--nacht); font-family: var(--f-mono); font-size: 14px;
}

.tl-weg-liste { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.tl-weg-liste li { display: flex; gap: 10px; align-items: center; }
.tl-weg-liste li::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: var(--muted); flex-shrink: 0; }
.tl-weg-hinweis { padding: 14px 18px; border-radius: var(--radius); background: var(--toenung-akzent); font-size: 14px; line-height: 1.5; }
.tl-weg-knoepfe { display: flex; gap: 10px; flex-wrap: wrap; }
.tl-weg-knoepfe .btn { height: 52px; padding: 0 26px; border-radius: 26px; font-size: 16px; }
.tl-weg-knoepfe .btn-accent { color: var(--nacht); }

/* ---------- /s/<id>: geöffneter Inhalt ---------- */

.tl-offen { flex-grow: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; padding: 20px 0; }
@media (max-width: 900px) {
  .tl-offen { grid-template-columns: 1fr; }
}
.tl-offen-inhalt { min-width: 0; display: flex; flex-direction: column; gap: 14px; }

.burn-banner {
  display: flex; align-items: center; gap: 12px; min-height: 48px; box-sizing: border-box;
  padding: 10px 18px; border-radius: var(--radius); background: var(--toenung-akzent); font-size: 14px; color: var(--nacht);
}
.burn-banner svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--akzent-text); }
.burn-banner b { font-weight: 700; }

.content-card { border-radius: var(--radius); background: var(--flaeche); display: flex; flex-direction: column; overflow: hidden; }
.content-head {
  min-height: 52px; box-sizing: border-box; padding: 10px 20px; border-bottom: 1px solid var(--linie);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.content-head-links { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.content-titel { font-size: 16px; font-weight: 600; }

.viewer-host { display: flex; flex-direction: column; }
.viewer-host .traisor-viewer-toolbar {
  order: 2; justify-content: flex-end; padding: 8px 20px; background: var(--flaeche); border-bottom: 0; border-top: 1px solid var(--linie);
}
.viewer-host .traisor-viewer-btn {
  height: 34px; padding: 0 14px; border: 0; border-radius: 17px; background: var(--grund); color: var(--nacht);
  font-size: 13px; font-weight: 600; font-family: var(--f-body);
}
.viewer-host .traisor-viewer-btn:hover { background: var(--linie); }
.viewer-host .traisor-viewer-btn.active { background: var(--nacht); color: #ffffff; }
.viewer-host .traisor-viewer-btn-copy { order: 3; background: var(--nacht); color: #ffffff; }
.viewer-host .traisor-viewer-btn-copy:hover { background: var(--panel, #1b1f45); }
.viewer-host .traisor-preview-host { padding: 28px 36px; max-width: 760px; font-size: 16px; line-height: 1.6; }
.viewer-host .traisor-cm-host { min-height: 220px; }

.tl-meta-aktionen { display: flex; flex-direction: column; gap: 12px; }
.tl-meta-aktionen .btn-cta { height: 52px; border-radius: 26px; font-size: 16px; }
.tl-meta-aktionen .btn-dark.btn-cta { background: var(--nacht); color: #ffffff; }
.tl-speicher-hinweis { font-size: 13px; line-height: 1.5; color: var(--muted); }
.tl-ohne-erweiterung {
  padding: 16px 18px; border-radius: var(--radius); background: var(--flaeche); border: 1.5px dashed var(--rand-gestrichelt);
  display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.5;
}
.tl-ohne-erweiterung strong { font-weight: 600; }

.tl-meta-box {
  padding: 16px 18px; border-radius: var(--radius); background: var(--flaeche);
  display: flex; flex-direction: column; gap: 8px; font-size: 14px;
}
.tl-meta-zeile { display: flex; justify-content: space-between; gap: 12px; }
.tl-meta-zeile span:first-child { color: var(--muted); }
.tl-meta-zeile span:last-child { font-weight: 600; }
.tl-meta-zeile .mono { font-family: var(--f-mono); font-weight: 400; }

.tl-melden-luecke { flex-grow: 1; }
.tl-melden-knopf {
  align-self: flex-start; height: 44px; padding: 0 4px; border: 0; background: transparent; color: var(--muted);
  font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; cursor: pointer;
}
.tl-melden-knopf svg { width: 16px; height: 16px; }
.tl-melden-formular {
  padding: 18px; border-radius: var(--radius); background: var(--flaeche); border: 1.5px solid var(--nacht);
  display: flex; flex-direction: column; gap: 10px; font-size: 14px;
}
.tl-melden-formular-titel { font-size: 16px; font-weight: 600; }
.tl-melden-formular select {
  height: 44px; padding: 0 12px; border: 1px solid var(--linie); border-radius: 22px; background: var(--grund);
  color: var(--nacht); font-size: 14px; font-family: var(--f-body);
}
.tl-melden-knoepfe { display: flex; gap: 8px; }
.tl-melden-knoepfe .btn { height: 44px; padding: 0 18px; border-radius: 22px; font-size: 14px; }
.tl-melden-gesendet {
  padding: 16px 18px; border-radius: var(--radius); background: var(--toenung-minze);
  display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.5;
}
.tl-melden-gesendet strong { font-weight: 600; }

/* ---------- Mobil ---------- */

@media (max-width: 640px) {
  .teilen-wrap { padding: 16px 16px 40px; gap: 14px; }
  .tl-kopf { height: 48px; }
  .tl-marke-schild { width: 26px; height: 26px; }
  .tl-marke-wort { font-size: 21px; }
  .tl-pille { display: none; }
  /* TL-Teilen-Mobil (design/teilen/): bei Telefonbreite ersetzt der Hilfe-Link "Zur
     Startseite" (die Marke links verlinkt ohnehin schon auf "/"), sonst passen Marke +
     Pille + zwei Knöpfe nicht in eine Zeile und die umgebrochene Nav ragt wegen der festen
     Kopfhöhe in die Überschrift darunter (siehe Finding teilen-kopf-mobil). */
  .tl-nav-lang, .tl-nav a.tl-knopf-outline { display: none; }
  .tl-nav-kurz {
    display: flex; align-items: center; height: 44px; padding: 0 16px;
    border: 1.5px solid var(--nacht); border-radius: 22px; font-size: 14px; font-weight: 600;
  }
  .tl-titel-block h1 { font-size: 34px; }
  .tl-eingangskarte { padding: 32px 24px; border-radius: 24px; }
  .result-panel { padding: 24px; border-radius: 24px; }
  .link-row { flex-wrap: wrap; height: auto; padding: 12px 12px 12px 18px; }
  .link-row .btn { width: 100%; }
}
