/* Werkzeug (Bastelbogen-Editor). Alles unter .pc-editor, damit es sich nicht mit dem Seiten-Stil beißt. */
.pc-editor {
  --pc-panel: #fff;
  --pc-ink: #1f1f1f;
  --pc-muted: #5f5f5f; /* Kontrast ≥ 4.5:1 auf Weiß */
  --pc-line: #ddd8cf;
  --pc-accent: #a34a22;
  color: var(--pc-ink);
  padding: 0 clamp(12px, 3vw, 32px);
}
.pc-editor * { box-sizing: border-box; }
.pc-editor .pc-top { padding: 8px 0 4px; }
.pc-editor .pc-top h1 { margin: 0 0 4px; font-size: 1.5rem; }
.pc-editor .pc-top p { margin: 0; color: var(--pc-muted); font-size: 0.95rem; }
/* Kurzanleitung in drei Schritten unter der Überschrift */
.pc-editor .pc-steps { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 8px 0 0; padding: 0; list-style: none; counter-reset: pcstep; font-size: 0.9rem; }
.pc-editor .pc-steps li { counter-increment: pcstep; display: flex; gap: 6px; align-items: baseline; }
.pc-editor .pc-steps li::before { content: counter(pcstep); flex: none; width: 1.4em; height: 1.4em; border-radius: 50%; background: var(--pc-accent); color: #fff; font-weight: 700; font-size: 0.8rem; display: inline-grid; place-items: center; }
.pc-editor .import-help { font-size: 0.82rem; }
.pc-editor .import-help ol { margin: 4px 0; padding-left: 1.2rem; }
.pc-editor .import-help li { margin: 3px 0; }
.pc-editor .import-help p { margin: 4px 0 8px; }
.pc-editor .import-help a { color: var(--pc-accent); font-weight: 600; }
.pc-editor .layout { display: grid; grid-template-columns: 320px 1fr; gap: 16px; padding: 16px 0 40px; align-items: start; }
.pc-editor .panel { background: var(--pc-panel); border: 1px solid var(--pc-line); border-radius: 10px; padding: 4px 16px 16px; position: sticky; top: 89px; max-height: calc(100vh - 101px); overflow: auto; }
.pc-editor .panel h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--pc-muted); margin: 16px 0 8px; }
.pc-editor .panel label[hidden], .pc-editor [hidden] { display: none !important; }
.pc-editor .panel label { display: block; font-size: 0.85rem; margin: 8px 0; }
.pc-editor .panel label.check { display: flex; gap: 8px; align-items: center; }
.pc-editor .panel input[type=number], .pc-editor .panel select, .pc-editor .panel textarea { display: block; width: 100%; margin-top: 4px; padding: 6px 8px; border: 1px solid #b9b2a6; border-radius: 6px; font: inherit; background: #fff; }
.pc-editor .panel textarea { font-family: ui-monospace, monospace; font-size: 0.75rem; }
.pc-editor .drop { border: 2px dashed #b9b2a6; border-radius: 8px; padding: 14px; text-align: center; cursor: pointer; }
.pc-editor .drop.over { border-color: var(--pc-accent); background: #fbf1ea; }
.pc-editor .drop:focus-within { outline: 2px solid var(--pc-accent); outline-offset: 2px; }
.pc-editor .drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pc-editor .drop small { color: var(--pc-muted); }
.pc-editor button, .pc-editor .button-like { font: inherit; font-size: 0.9rem; padding: 8px 12px; border-radius: 6px; border: 1px solid #b9b2a6; background: #fff; color: var(--pc-ink); cursor: pointer; text-align: center; }
.pc-editor button:focus-visible, .pc-editor .button-like:focus-within, .pc-editor a:focus-visible { outline: 2px solid var(--pc-accent); outline-offset: 2px; }
.pc-editor button:disabled { opacity: .5; cursor: default; }
.pc-editor button.primary { background: var(--pc-accent); border-color: var(--pc-accent); color: #fff; width: 100%; margin-top: 8px; font-weight: 600; }
.pc-editor .buttons { display: grid; gap: 8px; }
.pc-editor .buttons.project { grid-template-columns: 1fr 1fr; margin-top: 10px; }
.pc-editor .meta { color: var(--pc-muted); font-size: 0.78rem; margin: 6px 0; }
.pc-editor .export-msg { color: #8a4b00; font-size: 0.85rem; margin: 6px 0; }
.pc-editor .export-msg:empty { display: none; }
.pc-editor .pro-link { font-weight: 600; color: var(--pc-accent); }
.pc-editor details summary { cursor: pointer; font-size: 0.85rem; margin: 6px 0; }
.pc-editor .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pc-editor .stats table { width: 100%; font-size: 0.82rem; border-collapse: collapse; }
.pc-editor .stats td { padding: 3px 0; border-bottom: 1px solid #f0ece6; }
.pc-editor .stats td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.pc-editor .stats .ok { color: #1b6b20; font-weight: 600; }
.pc-editor .stats .bad { color: #b0201f; font-weight: 600; }
.pc-editor .stats .warn { color: #8a4b00; font-size: 0.78rem; margin: 6px 0; }
.pc-editor .view { min-width: 0; }
.pc-editor .view3d { background: var(--pc-panel); border: 1px solid var(--pc-line); border-radius: 10px; padding: 8px; }
.pc-editor #c3d { width: 100%; height: 420px; display: block; cursor: grab; touch-action: none; }
.pc-editor .hint { font-size: 0.78rem; color: var(--pc-muted); margin: 6px 4px 2px; }
.pc-editor .legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.85rem; margin: 14px 2px; align-items: center; }
.pc-editor .ln { display: inline-block; width: 28px; height: 0; vertical-align: middle; margin-right: 6px; border-top: 2px solid #000; }
.pc-editor .ln.mountain { border-top: 2px dashed #c0392b; }
.pc-editor .ln.valley { border-top: 2px dashed #1f5fbf; }
.pc-editor .sw { display: inline-block; width: 16px; height: 12px; vertical-align: middle; margin-right: 6px; background: #eee; border: 1px solid #000; }
.pc-editor .pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 16px; }
.pc-editor .page { background: var(--pc-panel); border: 1px solid var(--pc-line); border-radius: 6px; padding: 8px; }
.pc-editor .page .sheet svg { width: 100%; height: auto; display: block; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.pc-editor .page .bar { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; margin-bottom: 6px; }
.pc-editor .sheet g[data-part] { cursor: pointer; touch-action: none; }
/* anklickbare Kanten */
.pc-editor .sheet line.hit { stroke: transparent; stroke-width: 2.4; stroke-linecap: round; pointer-events: stroke; cursor: pointer; }
.pc-editor .sheet line.hit.fold:hover { stroke: rgba(230, 120, 0, .55); }
.pc-editor .sheet line.hit.cut:hover { stroke: rgba(0, 150, 90, .55); }
.pc-editor .edge-hint { position: sticky; top: 85px; z-index: 2; margin: 0 0 8px; padding: 6px 10px; background: #fffbe6; border: 1px solid #f0d77a; border-radius: 6px; font-size: 0.85rem; }
.pc-editor .edit-info { font-size: 0.85rem; margin: 6px 0; }
.pc-editor .edit-info.bad { color: #a12; }
.pc-editor .part-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.85rem; margin: 8px 0; padding: 6px; background: #f3f6fb; border-radius: 6px; }
.pc-editor .part-tools label { display: inline-flex; gap: 4px; align-items: center; margin: 0; }
.pc-editor .part-tools select { width: auto; margin: 0; }
.pc-editor .sheet g[data-part].sel > path:first-child, .pc-editor .sheet g[data-part].sel > g.look { filter: drop-shadow(0 0 1.2px #1f5fbf) drop-shadow(0 0 1.2px #1f5fbf); }
.pc-editor .sheet g.dragging { opacity: .75; cursor: grabbing; }
.pc-editor .sheet g[data-part].clash > path:first-child, .pc-editor .sheet g[data-part].clash > g.look { filter: drop-shadow(0 0 1px #d01) drop-shadow(0 0 1px #d01); }
.pc-editor .sheet g[data-part].hl > path:first-child, .pc-editor .sheet g[data-part].hl > g.look { filter: brightness(.9) saturate(2); }
.pc-editor .busy { position: fixed; inset: 0; background: rgba(255,255,255,.6); display: grid; place-items: center; font-size: 1.1rem; font-weight: 600; z-index: 50; }
@media (max-width: 860px) { .pc-editor .layout { grid-template-columns: 1fr; } .pc-editor .panel { position: static; max-height: none; } }
/* Phone: the 3D preview first (what you get), then model and settings, then the sheets */
@media (max-width: 860px) {
  .pc-editor .layout { display: flex; flex-direction: column; }
  .pc-editor .view { display: contents; }
  .pc-editor .view3d { order: 0; }
  .pc-editor .panel { order: 1; }
  .pc-editor .legend, .pc-editor .edge-hint, .pc-editor .pages { order: 2; }
}
