/* Planer (#/plan): geführter Ablauf mit visueller Auswahl. Nutzt die Tokens aus app.css. */

/* ---------- Schritte + Fortschritt ---------- */
.pl-steps { display: grid; gap: 10px; padding: 12px 14px; border-radius: 18px; background: var(--surface-1); border: 1px solid var(--line); }
.pl-steps-top { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.pl-steps-top .meter { flex: 1 1 160px; }
.pl-steps ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pl-step { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 12px 4px 5px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font-size: .82rem; font-weight: 600; }
.pl-step:hover { background: rgb(255 255 255 / .05); color: var(--text); }
.pl-step-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text); font-size: .78rem; font-weight: 800; flex: none; }
.pl-step-n .i { display: none; width: 15px; height: 15px; }
.pl-step[data-state="done"] .pl-step-n { background: var(--accent); color: var(--accent-ink); }
.pl-step[data-state="done"] .pl-step-n .n { display: none; }
.pl-step[data-state="done"] .pl-step-n .i { display: block; }
.pl-step[data-state="warn"] .pl-step-n { background: var(--warn); color: #241600; }
.pl-meter { height: 6px; }

/* ---------- Seitenaufbau: Schritte links, Zusammenfassung rechts (mobil darunter) ---------- */
.pl-layout { display: grid; gap: 18px; align-items: start; }
.pl-main { display: grid; gap: 18px; min-width: 0; }
@media (min-width: 1180px) { .pl-layout { grid-template-columns: minmax(0, 1fr) 320px; } .pl-summary { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; } }
.pl-sec { padding: clamp(14px, 2vw, 22px); gap: 16px; scroll-margin-top: 80px; }
.pl-sec > h2:focus { outline: none; }
.field > .label { font-size: .82rem; font-weight: 600; color: var(--text-2); }

/* ---------- Format-Karten mit Cover ---------- */
.fc-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 156px), 1fr)); }
@media (max-width: 520px) { .fc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.fc { display: grid; gap: 6px; align-content: start; min-width: 0; }
.fc-label { position: relative; display: grid; gap: 8px; align-content: start; padding: 6px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface-1); cursor: pointer; transition: border-color .18s, background .18s, transform .25s var(--ease); height: 100%; }
.fc-label:hover { border-color: rgb(255 255 255 / .28); }
.fc-radio { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fc-label:has(.fc-radio:checked) { border-color: var(--accent); background: rgb(var(--accent-rgb) / .07); box-shadow: 0 0 0 1px var(--accent); }
.fc-label:has(.fc-radio:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.fc.is-locked .fc-label { cursor: not-allowed; }
.fc.is-locked .fc-media img { filter: grayscale(.85) brightness(.55); }
.fc-media { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 11px; overflow: hidden; background: var(--surface-3); }
.fc-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s var(--ease); }
.fc-media img.is-on { opacity: 1; }
.fc-ph { position: absolute; inset: 0; display: grid; place-items: center; font: 800 1.4rem/1 var(--font-display); color: var(--text-3); }
.fc-id { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 999px; background: rgb(0 0 0 / .62); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .05em; }
.fc-check { position: absolute; right: 8px; top: 8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); opacity: 0; transform: scale(.6); transition: opacity .2s, transform .25s var(--ease); }
.fc-check .i { width: 15px; height: 15px; stroke-width: 3; }
.fc-label:has(.fc-radio:checked) .fc-check, .pf:has(input:checked) .fc-check { opacity: 1; transform: none; }
.fc-dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 4px; }
.fc-dots i { width: 5px; height: 5px; border-radius: 50%; background: rgb(255 255 255 / .45); transition: width .3s var(--ease), background .3s; }
.fc-dots i.is-on { width: 14px; border-radius: 3px; background: #fff; }
.fc-lock { position: absolute; left: 8px; right: 8px; bottom: 22px; display: flex; gap: 6px; align-items: center; justify-content: center; padding: 6px 8px; border-radius: 10px; background: rgb(0 0 0 / .72); color: #fff; font-size: .74rem; font-weight: 700; text-align: center; }
.fc-body { display: grid; gap: 3px; padding: 0 4px 4px; min-width: 0; }
.fc-name { font-size: .92rem; line-height: 1.25; overflow-wrap: anywhere; }
.fc-desc { font-size: .76rem; color: var(--text-2); line-height: 1.35; overflow-wrap: anywhere; }
.fc-meta { font-size: .72rem; color: var(--text-3); font-weight: 600; }
.fc-upgrade { display: inline-flex; gap: 6px; align-items: center; justify-content: center; min-height: 34px; padding: 4px 10px; border-radius: var(--r-pill); border: 1px solid rgb(255 194 102 / .4); color: var(--warn); font-size: .76rem; font-weight: 700; text-decoration: none; text-align: center; }
.fc-upgrade:hover { background: rgb(255 194 102 / .08); }
@media (prefers-reduced-motion: no-preference) { .fc-label:has(.fc-radio:checked) { transform: translateY(-2px); } }

/* ---------- Figuren-Porträts ---------- */
.pf-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 104px), 1fr)); }
@media (max-width: 520px) { .pf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .pf-body b { font-size: .78rem; } }
.pf { position: relative; display: grid; gap: 6px; padding: 6px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface-1); cursor: pointer; text-decoration: none; color: inherit; min-width: 0; }
.pf input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pf:has(input:checked) { border-color: var(--accent); background: rgb(var(--accent-rgb) / .07); box-shadow: 0 0 0 1px var(--accent); }
.pf:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.pf-media { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: var(--surface-3); }
.pf-img { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; }
.pf-img.is-ph { font: 800 1.5rem/1 var(--font-display); color: var(--text-2); background: radial-gradient(circle at 50% 35%, var(--surface-2), var(--surface-3)); }
.pf-img.is-ph .i { width: 30px; height: 30px; color: var(--text-3); }
.pf-body { display: grid; gap: 2px; padding: 0 2px 2px; min-width: 0; }
.pf-body b { font-size: .84rem; overflow-wrap: anywhere; line-height: 1.25; }
.pf-body small { font-size: .72rem; color: var(--text-3); overflow-wrap: anywhere; }
.pf-new { border-style: dashed; }
.pl-chips { gap: 6px; }

/* ---------- Stil-Panel ---------- */
.sp { gap: 16px; }
.sp-source { color: var(--text-2); display: inline-flex; gap: 6px; align-items: center; }
.sp-presets-h { color: var(--text-2); margin-bottom: 8px; }
.sp-presets { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; }
.sp-card { position: relative; flex: 0 0 auto; width: 88px; display: grid; gap: 6px; justify-items: center; padding: 6px 6px 8px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface-1); color: var(--text-2); font-size: .74rem; font-weight: 600; text-align: center; scroll-snap-align: start; }
.sp-card:hover { border-color: rgb(255 255 255 / .28); color: var(--text); }
.sp-card[aria-pressed="true"] { border-color: var(--accent); background: rgb(var(--accent-rgb) / .08); color: var(--text); box-shadow: 0 0 0 1px var(--accent); }
.sp-mini { width: 54px; height: 96px; border-radius: 8px; background: var(--surface-3); }
.sp-card-label { line-height: 1.2; overflow-wrap: anywhere; }
.sp-badge { position: absolute; top: -6px; right: -4px; padding: 1px 7px; border-radius: 999px; background: var(--warn); color: #241600; font-size: .64rem; font-weight: 800; }
.sp-grid { display: grid; gap: 18px; align-items: start; }
@media (min-width: 620px) { .sp-grid { grid-template-columns: minmax(0, 200px) minmax(0, 1fr); } }
.sp-stage { position: sticky; top: 80px; width: min(200px, 60vw); margin-inline: auto; }
.sp-canvas { width: 100%; aspect-ratio: 9 / 16; height: auto; border-radius: 14px; background: var(--surface-3); box-shadow: 0 18px 40px -18px rgb(0 0 0 / .8); display: block; }
.sp-controls fieldset { padding: 10px 12px 12px; }
.sp-bar { display: grid; gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.sp-bar-row input { flex: 1 1 180px; min-width: 0; }
.sp-fine-btn { justify-self: start; }

/* Regler mit gefüllter Spur */
.pl-range { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; --fill: 50%; }
.pl-range::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(to right, var(--accent) var(--fill), rgb(255 255 255 / .14) var(--fill)); }
.pl-range::-moz-range-track { height: 6px; border-radius: 6px; background: rgb(255 255 255 / .14); }
.pl-range::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--accent); }
.pl-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 4px rgb(0 0 0 / .6); }
.pl-range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 4px rgb(0 0 0 / .6); }
.pl-range:focus-visible { outline: none; }
.pl-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
.pl-range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
.pl-slider output { color: var(--text-2); }

/* Farb-Swatches */
.pl-swatches { padding: 10px 12px 12px; }
.pl-sw-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-sw { position: relative; display: inline-grid; justify-items: center; gap: 4px; cursor: pointer; font-size: .7rem; color: var(--text-2); font-weight: 600; min-width: 48px; }
.pl-sw input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pl-sw-face { display: grid; justify-items: center; gap: 4px; }
.pl-dot { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .25); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .25); display: block; transition: transform .2s var(--ease); }
.pl-sw:has(input:checked) .pl-dot, .pl-sw-custom.is-on input[type=color] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.pl-sw:has(input:checked) .pl-sw-label, .pl-sw-custom.is-on .pl-sw-label { color: var(--text); }
.pl-sw:has(input:focus-visible) .pl-dot { outline: 2px solid var(--accent); outline-offset: 4px; }
.pl-sw-custom input[type=color] { width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 1px solid rgb(255 255 255 / .25); background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red); cursor: pointer; overflow: hidden; }
.pl-sw-custom input[type=color]::-webkit-color-swatch-wrapper { padding: 3px; }
.pl-sw-custom input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }

/* Palette-Hintergrund: Swatch-Karten mit Kreisen */
.pb-set { padding: 10px 12px 12px; }
.pb-row { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.pb { position: relative; display: grid; cursor: pointer; }
.pb input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pb-face { display: grid; gap: 6px; justify-items: center; padding: 6px 6px 8px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-1); font-size: .74rem; font-weight: 600; color: var(--text-2); text-align: center; }
.pb:has(input:checked) .pb-face, .pb-custom.is-on .pb-face { border-color: var(--accent); background: rgb(var(--accent-rgb) / .08); color: var(--text); box-shadow: 0 0 0 1px var(--accent); }
.pb:has(input:focus-visible) .pb-face, .pb-custom:has(input:focus-visible) .pb-face { outline: 2px solid var(--accent); outline-offset: 2px; }
.pb-mini { width: 100%; height: 46px; border-radius: 8px; display: flex; align-items: center; justify-content: center; border: 1px solid rgb(255 255 255 / .12); }
.pb-mini i { width: 15px; height: 15px; border-radius: 50%; margin-left: -4px; box-shadow: 1px 2px 3px rgb(0 0 0 / .35); }
.pb-mini.is-auto { background: linear-gradient(120deg, #efe3cf, #d6d9de 55%, #e9cfb8); }
.pb-custom input[type=color] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* ---------- Hook-Stile mit Schrift-Vorschau ---------- */
.hs-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 128px), 1fr)); }
.hs { position: relative; display: grid; gap: 6px; padding: 6px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface-1); cursor: pointer; }
.hs input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hs:has(input:checked) { border-color: var(--accent); background: rgb(var(--accent-rgb) / .07); box-shadow: 0 0 0 1px var(--accent); }
.hs:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.hs-face { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: #2a2a33; }
.hs-bg { position: absolute; inset: 0; background-size: cover; background-position: center 30%; filter: brightness(.62) saturate(.9); }
.hs-text { position: relative; display: grid; gap: 1px; padding: 6px; color: #fff; text-align: center; font-size: .95rem; line-height: 1.08; text-shadow: 0 2px 6px rgb(0 0 0 / .65); overflow-wrap: anywhere; }
.hs-text.f-bebas { font-size: 1.15rem; letter-spacing: .02em; }
.hs-text.f-heavy, .hs-text.f-cinzel { font-size: .82rem; }
.hs-name { font-size: .78rem; font-weight: 600; color: var(--text-2); text-align: center; }
.hs:has(input:checked) .hs-name { color: var(--text); }

/* ---------- Teile-Kacheln ---------- */
.pp-tools { display: grid; gap: 10px; }
.pp-counter { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.pp-counter.is-ok, .pp-counter.is-full { border-color: rgb(var(--accent-rgb) / .35); }
.pp-counter.is-few, .pp-counter.is-over { border-color: rgb(255 194 102 / .45); }
.pp-st.is-few, .pp-st.is-over { color: var(--warn); }
.pp-st.is-ok, .pp-st.is-full { color: var(--accent); }
.pp-grid { list-style: none; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); }
@media (max-width: 520px) { .pp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.prod.pp { position: relative; display: block; padding: 6px; border-radius: 14px; }
.pp .pp-cb { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; z-index: 2; cursor: pointer; }
.pp:has(.pp-cb:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pp > label { display: grid; gap: 6px; }
.pp-media { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-3); }
.pp-media img { width: 100%; height: 100%; object-fit: cover; }
.pp-ph { width: 100%; height: 100%; display: grid; place-items: center; color: rgb(255 255 255 / .7); }
.pp-ph .i { width: 28px; height: 28px; filter: drop-shadow(0 1px 2px rgb(0 0 0 / .5)); }
.pp-check { position: absolute; right: 6px; top: 6px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 2px solid rgb(255 255 255 / .85); background: rgb(0 0 0 / .35); color: transparent; transition: background .15s, color .15s; }
.pp-check .i { width: 14px; height: 14px; stroke-width: 3; }
.prod.pp.is-selected .pp-check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.prod.pp.is-blocked { opacity: .5; }
.pp-body { display: grid; gap: 2px; min-width: 0; font-size: .82rem; line-height: 1.25; padding: 0 2px 2px; }
.pp-body b { overflow-wrap: anywhere; }
.pp-meta { display: flex; justify-content: space-between; gap: 6px; font-size: .72rem; color: var(--text-3); }
.pp-meta .price { font: 700 .82rem/1.2 var(--font-display); color: var(--text); }

/* ---------- Zeitleiste ---------- */
.tl-date { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.tl-date .field { flex: 0 1 200px; }
.tl-wrap { position: relative; padding-top: 4px; }
.tl-track { position: absolute; left: 10px; right: 10px; top: 17px; height: 6px; pointer-events: none; z-index: 1; }
.tl-window { position: absolute; top: -5px; height: 16px; border-radius: 6px; background: rgb(var(--accent-rgb) / .16); border: 1px solid rgb(var(--accent-rgb) / .35); }
.tl-slot, .tl-taken, .tl-pick { position: absolute; top: -8px; width: 2px; height: 22px; margin-left: -1px; border-radius: 2px; }
.tl-slot { background: var(--accent); opacity: .8; }
.tl-taken { background: var(--warn); width: 8px; height: 8px; top: -1px; margin-left: -4px; border-radius: 50%; }
.tl-pick { background: #fff; width: 3px; }
.tl-range { position: relative; z-index: 2; }
.tl-range::-webkit-slider-runnable-track { background: rgb(255 255 255 / .1); }
.tl-range.is-unset::-webkit-slider-thumb { background: var(--surface-3); border: 2px dashed var(--text-3); }
.tl-ticks { display: flex; justify-content: space-between; padding: 0 2px; font-size: .68rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tl-slots button[aria-pressed="true"] { background: var(--text); color: #0b0b0f; }
.tl output { font-weight: 700; color: var(--text); }

/* ---------- Erweiterte Optionen ---------- */
.adv { padding: 0; overflow: hidden; }
.adv-h { font-size: 1rem; }
.adv-toggle { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 16px clamp(14px, 2vw, 22px); background: transparent; border: 0; text-align: left; color: var(--text); font: inherit; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.adv-toggle:hover { background: rgb(255 255 255 / .03); }
.adv-t { display: inline-flex; gap: 8px; align-items: center; }
.adv-sum { font-family: var(--font-body); font-weight: 500; flex: 1 1 auto; }
.adv-chev { font-size: 1.4rem; line-height: 1; color: var(--text-3); transition: transform .3s var(--ease); }
.adv-toggle[aria-expanded="true"] .adv-chev { transform: rotate(90deg); }
.adv .pl-collapse-in > .stack { padding: 0 clamp(14px, 2vw, 22px) clamp(14px, 2vw, 22px); }
.pl-collapse { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .34s var(--ease), visibility 0s linear .34s; }
.pl-collapse.is-open { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .34s var(--ease), visibility 0s; }
.pl-collapse-in { overflow: hidden; min-height: 0; }
.ao-list { display: grid; gap: 10px; }
.ao { border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface-2); }
.ao-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px; }
.ao-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.ao-text { display: grid; gap: 2px; min-width: 0; }
.ao-title { font-size: .98rem; }
.ao-status { color: var(--text-2); }
.ao-lock { padding: 0 14px 12px; color: var(--warn); }
.ao-details { display: grid; gap: 14px; padding: 4px 14px 14px; border-top: 1px solid var(--line); margin-top: 0; padding-top: 14px; }
.ao-vars { padding: 10px 12px 12px; }
.ao-var-row { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ao-var { position: relative; cursor: pointer; }
.ao-var input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ao-var-face { display: grid; gap: 4px; justify-items: center; padding: 8px 6px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-1); text-align: center; }
.ao-var-face b { font-size: .8rem; }
.ao-var-face small { font-size: .68rem; color: var(--text-3); }
.ao-var:has(input:checked) .ao-var-face { border-color: var(--accent); background: rgb(var(--accent-rgb) / .08); box-shadow: 0 0 0 1px var(--accent); }
.ao-var:has(input:focus-visible) .ao-var-face { outline: 2px solid var(--accent); outline-offset: 2px; }
.ao-mini { width: 64px; height: 64px; border-radius: 50%; }
.ao-grid { display: grid; gap: 16px; align-items: start; }
@media (min-width: 620px) { .ao-grid { grid-template-columns: minmax(0, 170px) minmax(0, 1fr); } }
.ao-stage-wrap { width: min(170px, 60vw); margin-inline: auto; }
.ao-stage { position: relative; border-radius: 14px; overflow: hidden; cursor: crosshair; touch-action: none; }
.ao-stage:focus-visible { outline: 3px solid var(--info); outline-offset: 3px; }
.ao-canvas { width: 100%; aspect-ratio: 9 / 16; height: auto; display: block; background: var(--surface-3); }
.ao-note { display: flex; gap: 6px; align-items: flex-start; }

/* Apple-artiger Schalter */
.pl-switch { position: relative; flex: none; width: 52px; height: 32px; border-radius: 999px; border: 0; padding: 0; background: rgb(255 255 255 / .2); transition: background .25s var(--ease); margin-top: 2px; }
.pl-switch .pl-knob { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgb(0 0 0 / .45); transition: transform .28s var(--ease); }
.pl-switch[aria-checked="true"] { background: #34c759; }
.pl-switch[aria-checked="true"] .pl-knob { transform: translateX(20px); }
.pl-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.pl-switch[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- Zusammenfassung ---------- */
.pl-summary { display: grid; gap: 14px; }
.sum-format { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; }
.sum-format > div { display: grid; gap: 1px; min-width: 0; }
.sum-cover { width: 64px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 9px; }
.sum-list { display: grid; gap: 0; margin: 0; }
.sum-row { display: grid; grid-template-columns: minmax(0, 92px) minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .84rem; }
.sum-row dt { color: var(--text-3); font-weight: 600; font-size: .76rem; padding-top: 1px; }
.sum-row dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.sum-fig { display: inline-flex; gap: 8px; align-items: center; }
.sum-av { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--surface-3); font-size: .64rem; font-weight: 800; }
.sum-av .i { width: 14px; height: 14px; }
.sum-thumbs { display: flex; gap: 4px; margin-top: 6px; }
.sum-thumbs img, .sum-thumbs i { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; background: var(--surface-3); display: block; }
.sum-hook { font-size: .92rem; }
.sum-quota { display: grid; gap: 6px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.sum-warn { color: var(--warn); }
.sum-actions { display: grid; gap: 8px; }
.sum-actions .btn { width: 100%; }
@media (max-width: 1179px) { .pl-summary { position: static; } }
@media (max-width: 420px) { .pl-step { padding-right: 10px; } .pl-step-l { font-size: .78rem; } .ao-row { grid-template-columns: minmax(0, 1fr) auto; } .ao-ic { display: none; } }
.pl-sec .grid-2 { align-items: start; }
.pl-sec > *, .sp > *, .sp-grid > *, .pl-main > * { min-width: 0; }
.sp-bar .row .btn { white-space: normal; }
.fc-radio, .pf input, .hs input, .ao-var input, .pb input[type=radio], .pl-sw input[type=radio] { left: 50%; top: 45%; }
/* Unsichtbare Radios über die ganze Karte legen: Klick überall wählt, Scroll-Ziel liegt nicht unter der Kopfzeile */
.fc-radio, .pf input, .hs input, .ao-var input, .pb input[type=radio] { inset: 0; left: 0; top: 0; width: 100%; height: 100%; margin: 0; z-index: 3; cursor: pointer; scroll-margin: 110px 0 40px; }
.fc.is-locked .fc-radio { cursor: not-allowed; }

/* Format-Karten: Premium-Kennzeichen (UI-Update 10.10.2026; „Beispiel ansehen“-Dialog entfällt seit 11.10.2026) */
.fc-premium { position: absolute; left: 8px; top: 34px; padding: 2px 8px; border-radius: 999px; background: rgb(var(--accent-rgb) / .9); color: var(--accent-ink); font-size: .64rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }

/* D1 Palette „Automatisch“: Beispiel-Töne (Strand/Regen/Abend/Stadt) im Planer, Ton des Posts im Layout-Editor */
.pb-vibes { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.pb-vibe { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; }
.pb-vibe .swatch, .palette-tone .swatch { width: 18px; height: 18px; border-radius: 5px; vertical-align: -4px; }

/* ---------- Planer-Update 11.10.2026 ---------- */
/* A: Account wählt Figur + Sprache – Kennzeichen an der Figur des Accounts, Hinweiszeile */
.pf-acc { position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 12px); padding: 2px 7px; border-radius: 999px; background: rgb(0 0 0 / .68); color: #fff; font-size: .62rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-acc-note { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.pl-acc-note p { margin: 0; color: var(--text-2); }
.pl-acc-note[data-state="custom"] p { color: var(--warn); }
/* C: Frage am Ende – Schalter mit Vorschaubild daneben */
.pl-eq:empty { display: none; }
.eq { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 14px; align-items: start; padding: 12px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface-2); }
.eq-pv { margin: 0; display: grid; gap: 4px; justify-items: center; }
.eq-canvas { width: 90px; aspect-ratio: 9 / 16; height: auto; border-radius: 10px; display: block; background: var(--surface-3); box-shadow: 0 0 0 1px var(--line-2); }
.eq[data-endq="on"] .eq-canvas { box-shadow: 0 0 0 2px var(--accent); }
.eq-pv figcaption { text-align: center; font-size: .7rem; }
.eq-body { display: grid; gap: 6px; min-width: 0; }
.eq-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.eq-title { margin: 0; font-size: 1rem; }
.eq-body p { margin: 0; }
.eq-status { font-weight: 600; }
.sum-endq { color: var(--text-2); }
/* D: Entwürfe – Chip im Planer-Kopf, Karte im Job-Verlauf */
.pl-drafts-chip { display: inline-flex; gap: 6px; align-items: center; min-height: 32px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font-size: .8rem; font-weight: 700; text-decoration: none; }
.pl-drafts-chip:hover, .pl-drafts-chip:focus-visible { border-color: var(--accent); }
.pl-drafts-chip .i { width: 15px; height: 15px; }
.jd { display: grid; gap: 8px; margin-bottom: 14px; }
.jd-head h2 { margin: 0; font-size: 1.05rem; display: inline-flex; gap: 8px; align-items: center; }
.jd > p { margin: 0; }
.jd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-height: 360px; overflow-y: auto; }
.jd-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.jd-body { min-width: 0; display: grid; gap: 2px; }
.jd-title { overflow-wrap: anywhere; }
.jd-pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.jd-err { color: var(--danger); }
.jd-actions { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .jd-item { grid-template-columns: auto minmax(0, 1fr); } .jd-actions { grid-column: 1 / -1; justify-content: flex-start; } }
