/* Editor im Design Variante B: nur Schrift, Kopf und Flaechen. Logik und Zeichenflaeche (Farben der Beziehungslinien) bleiben unveraendert. */
@font-face{font-family:'Fraunces';src:url(/fonts/fraunces-latin-wght-normal.woff2?v=7f9d191d9993) format('woff2');font-weight:100 900;font-style:normal;font-display:swap}
@font-face{font-family:'DM Sans';src:url(/fonts/dm-sans-latin-wght-normal.woff2?v=9fea608a947e) format('woff2');font-weight:100 1000;font-style:normal;font-display:swap}
:root{--km-font-serif:'Fraunces',Georgia,serif;--km-font-ui:'DM Sans',Arial,sans-serif;--km-color-line:var(--km-brand-line);--km-color-focus:var(--km-brand-petrol)}
.editor-page,.editor-page .editor-app,.editor-page button,.editor-page input,.editor-page select,.editor-page textarea{font-family:'DM Sans',Arial,sans-serif}
.editor-page h1,.editor-page h2,.editor-page h3,.editor-page .editor-dialog-head,.editor-page .auth-kicker+h2{font-family:'Fraunces',Georgia,serif}
.editor-page .editor-app{background:var(--km-brand-section)}
.editor-header{background:var(--km-brand-white);border-bottom:1px solid var(--km-brand-line);padding-top:14px;padding-bottom:14px}
.editor-header h1{font:600 clamp(18px,2.2vw,24px)/1.2 'Fraunces',Georgia,serif;color:var(--km-brand-navy);letter-spacing:-.01em}
.editor-header h1 em{color:var(--km-brand-burgundy);font-style:normal;font-weight:600}
.editor-header .geno-home{min-height:44px;padding:0 20px;border:2px solid var(--km-brand-navy);border-radius:999px;color:var(--km-brand-navy);font:600 15px 'DM Sans',Arial,sans-serif}
.editor-header .geno-home:hover{background:var(--km-brand-blush);color:var(--km-brand-navy)}
.editor-page :focus-visible{outline:3px solid var(--km-brand-petrol);outline-offset:3px}
.project-auth{border:1px solid var(--km-brand-line);border-radius:20px;background:var(--km-brand-white);box-shadow:0 14px 40px var(--km-ui-rgba-20-40-61-07)}
.project-auth .auth-kicker{color:var(--km-brand-burgundy);letter-spacing:.08em}
.editor-page .tool-rail .rail-btn{font-family:Arial,Helvetica,sans-serif}
.editor-header{justify-content:flex-start;gap:14px}
.editor-header .brandtext{display:flex;flex-direction:column;align-items:center;line-height:1;flex:none}
.editor-header .brandtext .t{font:700 20px/1 'DM Sans',Arial,sans-serif;letter-spacing:-.01em;color:var(--km-brand-navy);white-space:nowrap}
.editor-header .brandtext .n{margin-top:4px;font:500 15px/1 'Fraunces',Georgia,serif;color:var(--km-brand-burgundy);white-space:nowrap}
.editor-header h1{margin-left:6px;padding-left:20px;border-left:1px solid var(--km-brand-line)}
@media (max-width:640px){.editor-header .brandtext .t{font-size:16px}.editor-header .brandtext .n{font-size:13px}.editor-header h1{display:none}}
/* Der Editor nutzt den verbleibenden Platz; die gemeinsame Fusszeile bleibt unverkuerzt. */
.editor-page{display:flex;flex-direction:column;height:100vh;height:100dvh;min-height:0}
.editor-page .km-bar{flex-shrink:0}
.editor-page:not(.auth-screen) .editor-app{height:auto;min-height:0;flex:1 1 auto}
.editor-page.auth-screen .editor-app{height:auto;min-height:0;flex:1 0 auto}
.editor-header h1{flex:1 1 auto;margin:0;padding:0;border-left:0;text-align:center}
.editor-command-bar .workspace-session{font:500 13px/1.4 'DM Sans',Arial,sans-serif;color:var(--km-brand-muted)}
.editor-command-bar .workspace-session:empty{display:none}

/* Anmeldeansicht: Schrift, Farben, Buttons und Fokus wie die Startseite (Variablen --km-* in global.css), kompakter */
.editor-page.auth-screen .project-auth{margin:20px auto 32px;padding:22px 24px 24px;border:1px solid var(--km-line);color:var(--km-navy);font-family:'DM Sans',system-ui,sans-serif}
.editor-page .project-auth #project-auth-title{margin:0 0 6px;color:var(--km-navy);font:500 clamp(24px,3vw,30px)/1.15 'Fraunces',Georgia,serif;letter-spacing:-.02em}
.editor-page .project-auth #project-auth-message{margin:0 0 10px;color:var(--km-muted);font:500 15px/1.5 'DM Sans',system-ui,sans-serif}
.editor-page .project-auth .project-login{gap:6px}
.editor-page .project-auth .project-login label{margin-top:4px;color:var(--km-navy);font:600 15px/1.4 'DM Sans',system-ui,sans-serif}
.editor-page .project-auth .project-login input{min-height:44px;padding:9px 14px;color:var(--km-navy);font:400 16px/1.3 'DM Sans',system-ui,sans-serif}
.editor-page .project-auth .project-login input:focus-visible,.editor-page .project-auth .auth-password-toggle:focus-visible,.editor-page .project-auth .auth-switch-button:focus-visible,.editor-page .project-auth .auth-provider-button:focus-visible{outline:3px solid var(--km-petrol);outline-offset:3px}
.editor-page .project-auth .project-login>.inspector-action,.editor-page .project-auth .project-login>.editor-outline-action,.editor-page .project-auth .auth-provider-button{min-height:44px;margin-top:10px;padding:0 22px;border:2px solid var(--km-burgundy);border-radius:999px;background:var(--km-burgundy);color:var(--km-brand-white);font:600 16px/1.3 'DM Sans',system-ui,sans-serif}
.editor-page .project-auth .project-login>.inspector-action:hover{background:var(--km-burgundy-dark);border-color:var(--km-burgundy-dark)}
.editor-page .project-auth .project-login>.editor-outline-action,.editor-page .project-auth .auth-provider-button{margin-top:2px;border-color:var(--km-navy);background:transparent;color:var(--km-navy)}
.editor-page .project-auth .project-login>.editor-outline-action:hover,.editor-page .project-auth .auth-provider-button:hover{background:var(--km-blush)}
.editor-page .project-auth .auth-password-toggle,.editor-page .project-auth .auth-switch-button{color:var(--km-burgundy);font-family:'DM Sans',system-ui,sans-serif;font-weight:600}
.editor-page .project-auth .auth-alternative{margin-top:6px;padding-top:8px;border-top:1px solid var(--km-line);color:var(--km-muted);font:15px/1.4 'DM Sans',system-ui,sans-serif}
.editor-page .project-auth .auth-hint,.editor-page .project-auth .auth-divider,.editor-page .project-auth .auth-providers-title{color:var(--km-muted);font-family:'DM Sans',system-ui,sans-serif}
.editor-page .project-auth .auth-notice{background:var(--km-blush);color:var(--km-navy);font:15px/1.5 'DM Sans',system-ui,sans-serif}
.editor-page .project-auth #register-error,.editor-page .project-auth #verify-error{font-family:'DM Sans',system-ui,sans-serif}
.editor-page .project-auth .auth-switch-button:disabled{color:var(--km-muted);cursor:not-allowed}
.editor-page .project-auth .project-login>.auth-path{margin:0;padding:0;border:0}
/* PDF poster dialog: scoped to the editor; no changes to the genogram model. */
.km-poster-dialog{max-width:min(96vw,760px);width:700px;max-height:92vh;overflow:auto;
  border:1px solid var(--km-ui-b9bec7);border-radius:14px;padding:0;color:var(--km-brand-navy);background:var(--km-brand-white);
  box-shadow:0 20px 60px var(--km-ui-14283d38)}
.km-poster-dialog::backdrop{background:var(--km-ui-14283da8)}
.km-poster-body{padding:22px;display:grid;gap:12px}
.km-poster-body h2{font-size:1.25rem;margin:0}
.km-poster-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:12px}
.km-poster-options label{display:flex;flex-direction:column;gap:5px;font-size:.9rem}
.km-poster-options select,.km-poster-options input[type=number]{border:1px solid var(--km-ui-8794a3);
  border-radius:6px;padding:8px;color:var(--km-brand-navy);background:var(--km-brand-white);min-height:40px}
.km-poster-options label:has(input[type=checkbox]){flex-direction:row;align-items:center;gap:8px}
.km-poster-options input[type=checkbox]{width:18px;height:18px}
.km-poster-profile{border:1px solid var(--km-ui-d4d8df);border-radius:9px;padding:10px 13px;display:grid;gap:8px;min-width:0}
.km-poster-profile legend{font-weight:700;padding:0 5px}
.km-poster-profile>label{display:flex;align-items:center;gap:8px;min-height:36px;cursor:pointer}
.km-poster-profile input[type=radio]{width:18px;height:18px;flex:none}
.km-poster-scale{display:grid;gap:7px;padding:0 0 5px 26px;font-size:.9rem}
.km-poster-scale[hidden]{display:none}
.km-poster-scale input[type=range]{width:100%;min-height:32px;accent-color:var(--km-brand-burgundy)}
.km-poster-scale span{font-size:.78rem;color:var(--km-ui-5a6673)}
.km-poster-manual{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;padding:10px 0 0}
.km-poster-manual[hidden]{display:none}
.km-poster-manual label{display:grid;gap:7px;font-size:.9rem}
.km-poster-manual input[type=range]{width:100%;min-height:28px;accent-color:var(--km-brand-burgundy)}
.km-poster-manual output{font-weight:700}
.km-poster-profile-hint{font-size:.84rem;line-height:1.4;color:var(--km-ui-4b5866);margin:4px 0 0}
.km-poster-preview{display:block;max-width:100%;margin:auto;border:1px solid var(--km-ui-d4d8df)}
.km-poster-hint,.km-poster-status{margin:0;font-size:.86rem;line-height:1.45}
.km-poster-status{min-height:2em}
.km-poster-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:12px}
.km-poster-actions button{border-radius:7px;padding:10px 15px;border:1px solid var(--km-brand-burgundy);
  background:var(--km-brand-white);color:var(--km-brand-burgundy);cursor:pointer;min-height:44px}
.km-poster-actions .km-poster-download{background:var(--km-brand-burgundy);color:var(--km-brand-white)}
.km-poster-actions button:disabled{opacity:.5;cursor:not-allowed}
.km-poster-dialog :focus-visible{outline:3px solid var(--km-ui-2476b3);outline-offset:3px}
@media(max-width:560px){.km-poster-body{padding:14px}.km-poster-options{grid-template-columns:1fr 1fr}}
/* KM-281: Demo-Status (Hinweis + Reset-Timer) im Header */
.editor-header .demo-status{display:flex;align-items:center;gap:8px;margin-left:auto;flex:none}
@media (max-width:640px){.editor-header .demo-status{gap:5px}.editor-header .demo-label{padding:6px 9px}.editor-header .demo-dot,.editor-header .demo-label-long{display:none}}

/* KM-301: Bedienoberflaeche im Windows-11-Stil (Fluent-Anmutung): flache Flaechen, 4/8-px-Radien, Befehlsleiste, Werkzeugleiste links, Detailbereich rechts, Statusleiste, Kontextmenue. Schriften, Marken- und Genogramm-Fachfarben bleiben unveraendert. */
:root{--km-detail-w:clamp(330px,27vw,420px)}
.editor-page:not(.auth-screen) .workspace{background:var(--km-brand-section)}
.editor-page:not(.auth-screen) .editor-header{min-height:48px;padding-block:0;background:var(--km-brand-section)}
.editor-page:not(.auth-screen) .editor-header .logo{width:32px}
.editor-page:not(.auth-screen) .editor-header .brandtext .t{font-size:15px}
.editor-page:not(.auth-screen) .editor-header .brandtext .n{margin-top:2px;font-size:12px}
.editor-page:not(.auth-screen) .editor-header h1{font-size:clamp(14px,1.5vw,17px)}
.editor-page:not(.auth-screen) .graph-panel-header.editor-command-bar{min-height:48px;padding:4px 12px;gap:4px 6px;justify-content:flex-start;background:var(--km-brand-white);border-bottom:1px solid var(--km-brand-line)}
.editor-page .editor-command-bar .command-group{gap:2px;margin-right:4px;padding-right:8px;border-right:var(--os-group-line) solid var(--km-brand-line)}
.editor-page .editor-command-bar .command-group:last-child{margin-right:0;padding-right:0;border-right:0}
.editor-page .editor-command-bar .command-panels{margin-left:auto}
.editor-page .editor-command-bar .command-btn,.editor-page:not(.auth-screen) .mode-summary{padding:6px 10px;border:1px solid transparent;border-radius:var(--os-r-ctl);background:transparent;color:var(--km-brand-navy);font-weight:500}
.editor-page .editor-command-bar .command-btn:hover:not(:disabled),.editor-page:not(.auth-screen) .mode-summary:hover,.editor-page:not(.auth-screen) .display-mode-menu[open] .mode-summary{border-color:transparent;background:var(--km-brand-mist);color:var(--km-brand-navy)}
.editor-page .editor-command-bar .command-btn:active:not(:disabled){background:var(--km-brand-line)}
.editor-page .editor-command-bar .command-btn[aria-expanded="true"]{border-color:transparent;background:var(--km-brand-blush);color:var(--km-brand-burgundy);box-shadow:var(--os-sel-shadow)}
.editor-page:not(.auth-screen) .mode-summary strong{font-weight:500}
.editor-page:not(.auth-screen) .mode-summary .display-mode-current{border-left-color:var(--km-brand-line)}
@media (pointer:fine){.editor-page .editor-command-bar .command-btn,.editor-page:not(.auth-screen) .mode-summary{min-height:var(--os-h-ctl)}}
.editor-page:not(.auth-screen) .display-mode-options{border-color:var(--km-brand-line);border-radius:var(--os-r-menu);box-shadow:0 8px 24px var(--km-ui-rgba-20-40-61-12)}
.editor-page:not(.auth-screen) .view-picker{border-radius:var(--os-r-ctl);border-color:var(--km-brand-line);background:var(--km-brand-section)}
.editor-page:not(.auth-screen) .view-button{border-radius:var(--os-r-ctl)}
.editor-page:not(.auth-screen) .inspector-action,.editor-page:not(.auth-screen) .editor-outline-action,.editor-page:not(.auth-screen) .editor-danger-action,.editor-page:not(.auth-screen) .quick-action,.editor-page:not(.auth-screen) .sheet-close{border-radius:var(--os-r-ctl)}
.editor-page:not(.auth-screen) .selection-bar{border-color:var(--km-brand-line);border-radius:var(--os-r-menu);box-shadow:0 8px 24px var(--km-ui-rgba-20-40-61-12)}
.editor-page:not(.auth-screen) dialog.editor-dialog{border-color:var(--km-brand-line);border-radius:var(--os-r-menu);box-shadow:0 24px 64px var(--km-ui-rgba-20-40-61-22)}
.editor-page .detail-window[data-corner="bl"],.editor-page .detail-window[data-corner="br"]{bottom:12px}
.editor-page .selection-bar{bottom:16px}
.editor-page:not(.auth-screen) .workspace-body{position:relative}

/* Statusleiste: Hinweise, Zaehler und Zoom */
.editor-statusbar{flex:none;box-sizing:border-box;display:flex;flex-wrap:wrap;align-items:center;gap:2px 16px;min-height:32px;padding:2px 12px;border-top:1px solid var(--km-brand-line);background:var(--km-brand-white);color:var(--km-brand-muted);font:400 12px/1.4 'DM Sans',Arial,sans-serif}
.editor-statusbar .graph-bottom{position:static;flex:1 1 280px;min-width:0;display:flex;flex-wrap:wrap;gap:2px 14px;padding:0;border:0;background:transparent;color:inherit;font:inherit;pointer-events:auto}
.editor-statusbar .status-metrics{display:flex;gap:14px;margin:0}
.editor-statusbar .status-metrics b{color:var(--km-brand-navy);font-weight:600}
.editor-statusbar .command-zoom{margin:0}
.editor-statusbar .zoom-controls{margin:0;border:0;border-radius:var(--os-r-ctl);background:transparent;box-shadow:none}
.editor-statusbar .zoom-controls button{min-width:32px;height:28px;border-radius:var(--os-r-ctl);background:transparent;color:var(--km-brand-navy);font-size:18px}
.editor-statusbar .zoom-controls button:hover{background:var(--km-brand-mist)}
.editor-statusbar .zoom-controls button:last-child{border-left:0}
.editor-statusbar .zoom-controls output{min-width:48px;color:var(--km-brand-muted);font-size:12px}
@media (pointer:coarse){.editor-statusbar .zoom-controls button{min-width:44px;height:44px}}
@media (max-width:650px){.editor-statusbar .status-metrics{display:none}}

/* Kontextmenue */
.ctx-menu{position:fixed;z-index:60;box-sizing:border-box;min-width:210px;max-width:calc(100vw - 8px);padding:var(--os-menu-pad);border:1px solid var(--km-brand-line);border-radius:var(--os-r-menu);background:var(--km-brand-white);box-shadow:0 8px 24px var(--km-ui-rgba-20-40-61-22);color:var(--km-brand-navy);font:400 13px/1.3 'DM Sans',Arial,sans-serif}
.ctx-menu[hidden]{display:none}
.ctx-item{display:flex;align-items:center;justify-content:space-between;gap:24px;box-sizing:border-box;width:100%;min-height:32px;padding:5px 10px;border:0;border-radius:var(--os-r-ctl);background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}
.ctx-item:hover{background:var(--km-brand-mist)}
.ctx-item:focus-visible{background:var(--km-brand-mist);outline:2px solid var(--km-brand-petrol);outline-offset:-2px}
.ctx-item[data-action="delete-person"]{color:var(--km-geno-a53347)}
.ctx-key{color:var(--km-brand-muted);font-size:12px}
.ctx-sep{height:1px;margin:4px 6px;background:var(--km-brand-line)}

/* Mobil und schmal: Platzhalter des Detailbereichs entfaellt, Fenster bleiben schwebend */
.detail-placeholder{display:none}

/* Ab 960 px: feste Bereiche wie in Windows-11-Apps */
@media (min-width:960px){
  .editor-page:not(.auth-screen) .workspace-body{grid-template-columns:auto minmax(0,1fr) var(--km-detail-w);background:var(--km-brand-section)}
  .editor-page:not(.auth-screen) .tool-window{grid-column:1;grid-row:1}
  .editor-page:not(.auth-screen) .graph-panel{grid-column:2;grid-row:1}
  .editor-page:not(.auth-screen) .detail-window:not(.tool-window),.editor-page:not(.auth-screen) .detail-placeholder{grid-column:3;grid-row:1}

  .editor-page:not(.auth-screen) #toggle-details{display:none}
  .editor-page:not(.auth-screen) .tool-window,.editor-page:not(.auth-screen) .tool-window.is-open{position:relative;inset:auto;z-index:1;box-sizing:border-box;width:52px;max-width:none;height:100%;overflow-x:hidden;overflow-y:auto;border:0;border-right:1px solid var(--km-brand-line);border-radius:0;box-shadow:none;background:var(--km-brand-white)}
  .editor-page:not(.auth-screen) .tool-window .detail-head{display:none}
  .editor-page:not(.auth-screen) .tool-window .detail-body,.editor-page:not(.auth-screen) .tool-window .detail-body[hidden]{display:block;max-height:none;padding:4px 0;border-top:0}
  .editor-page:not(.auth-screen) .tool-window .rail-btn{width:36px;min-width:36px;min-height:36px;border-radius:var(--os-r-ctl)}
  .editor-page:not(.auth-screen) .tool-window .rail-btn:hover:not(:disabled){background:var(--km-brand-mist);color:var(--km-brand-navy)}
  .editor-page:not(.auth-screen) .tool-window .rail-btn[aria-pressed="true"],.editor-page:not(.auth-screen) .tool-window .rail-btn[aria-expanded="true"]{border-color:transparent;background:var(--km-brand-blush);color:var(--km-brand-burgundy)}
  .editor-page:not(.auth-screen) .tool-window .rail-btn[aria-pressed="true"]::before{content:"";position:absolute;left:-8px;top:9px;width:var(--os-ind-w);height:18px;border-radius:2px;background:var(--km-brand-burgundy)}
  .editor-page:not(.auth-screen) .detail-window:not(.tool-window),.editor-page:not(.auth-screen) .detail-window.is-open:not(.tool-window){position:relative;inset:auto;z-index:1;box-sizing:border-box;display:flex;flex-direction:column;width:auto;max-width:none;height:100%;overflow:hidden;border:0;border-left:1px solid var(--km-brand-line);border-radius:0;box-shadow:none;background:var(--km-brand-white)}
  .editor-page:not(.auth-screen) .detail-window:not(.tool-window)[hidden]{display:none}
  .editor-page:not(.auth-screen) .detail-window:not(.tool-window) .detail-head{flex:none;padding:6px 12px;border-bottom:1px solid var(--km-brand-line);cursor:default}
  .editor-page:not(.auth-screen) .detail-window:not(.tool-window) .detail-grip,.editor-page:not(.auth-screen) .detail-window:not(.tool-window) .detail-corner,.editor-page:not(.auth-screen) .detail-window:not(.tool-window) .detail-chevron{display:none}
  .editor-page:not(.auth-screen) .detail-window:not(.tool-window) .detail-toggle{pointer-events:none;font-size:15px}
  .editor-page:not(.auth-screen) .detail-window:not(.tool-window) .detail-body,.editor-page:not(.auth-screen) .detail-window:not(.tool-window) .detail-body[hidden]{display:block;flex:1 1 auto;min-height:0;max-height:none;border-top:0}
  .editor-page:not(.auth-screen) .detail-window:not(.tool-window)[hidden]+.detail-placeholder{display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:24px;border-left:1px solid var(--km-brand-line);background:var(--km-brand-white);color:var(--km-brand-muted);font:400 14px/1.5 'DM Sans',Arial,sans-serif;text-align:center}
  .editor-page:not(.auth-screen) .detail-window:not(.tool-window)[hidden]+.detail-placeholder p{margin:0;max-width:22ch}
}

/* KM-301: Oberflaechenstil je Betriebssystem. Umschaltung per html[data-os]; alle Werte stehen hier (Standard: Windows 11). Gilt fuer Editor, Anmeldung, Konto, Zahlung, Admin und PDF-Dialog. */
:root,html[data-os="windows"]{--os-bar-bg:var(--km-brand-white);--os-fs:13px;--os-r-ctl:4px;--os-r-menu:8px;--os-h-ctl:36px;--os-sel-shadow:inset 0 -2px var(--km-brand-burgundy);--os-ind-w:3px;--os-group-line:1px;--os-menu-pad:4px}
html[data-os="mac"]{--os-bar-bg:var(--km-brand-section);--os-fs:13px;--os-r-ctl:6px;--os-r-menu:10px;--os-h-ctl:30px;--os-sel-shadow:none;--os-ind-w:0px;--os-group-line:0px;--os-menu-pad:5px}
html[data-os="linux"]{--os-bar-bg:var(--km-brand-mist);--os-fs:14px;--os-r-ctl:8px;--os-r-menu:12px;--os-h-ctl:38px;--os-sel-shadow:none;--os-ind-w:0px;--os-group-line:0px;--os-menu-pad:6px}


html[data-os="mac"] .editor-page:not(.auth-screen) .tool-window .rail-btn[aria-pressed="true"]::before,html[data-os="linux"] .editor-page:not(.auth-screen) .tool-window .rail-btn[aria-pressed="true"]::before{display:none}
html[data-os="mac"] .editor-page .editor-command-bar .command-btn[aria-expanded="true"]{background:var(--km-brand-mist);color:var(--km-brand-navy)}
html[data-os="mac"] .ctx-item:hover,html[data-os="mac"] .ctx-item:focus-visible{background:var(--km-brand-burgundy);color:var(--km-brand-white)}
html[data-os="mac"] .ctx-item:hover .ctx-key,html[data-os="mac"] .ctx-item:focus-visible .ctx-key{color:var(--km-brand-white)}
/* Anmeldung und Konto */
html .project-auth{border-radius:var(--os-r-menu)}
.editor-page .project-auth .project-login input,.editor-page .project-auth .auth-notice,.editor-page .project-auth .auth-password-toggle{border-radius:var(--os-r-ctl)}
.editor-page .project-auth .project-login>.inspector-action,.editor-page .project-auth .project-login>.editor-outline-action,.editor-page .project-auth .auth-provider-button,html .editor-header .geno-home,html .account-nav .editor-outline-action,html .commerce-register button{border-radius:var(--os-r-ctl)}
/* Dialoge: Konto, Zahlung, Ablauf, PDF-Ausgabe */
.editor-page .editor-dialog,html .commerce-expired,html .km-poster-dialog{border-radius:var(--os-r-menu)}
@media(min-width:651px){html .commerce-dialog{border-radius:var(--os-r-menu)}}
html .commerce-panel,html .commerce-offer,html .commerce-more,html .commerce-register,html .commerce-status,html .commerce-timer,html .commerce-bank-text{border-radius:var(--os-r-ctl)}
html .commerce-dialog button,html .commerce-expired button,html .km-poster-dialog button,html .km-poster-dialog select,html .km-poster-dialog input{border-radius:var(--os-r-ctl)}
/* Adminseite */
html .commerce-admin-shell section,html .commerce-admin-form{border-radius:var(--os-r-menu)}
html .commerce-admin-shell button,html .commerce-admin-form input{border-radius:var(--os-r-ctl)}

/* Befehlsleiste: Menues, flachere Werkzeugleiste und Titel */
.command-btn .cmd-chevron{margin-left:2px;font-size:14px;line-height:1}
.ctx-item[aria-disabled="true"]{color:var(--km-brand-muted);opacity:.55;cursor:default}
.ctx-item[aria-disabled="true"]:hover{background:transparent}
.editor-page:not(.auth-screen) .editor-header h1{font-size:15px;font-weight:500}
.editor-page:not(.auth-screen) .demo-label{border-radius:var(--os-r-ctl)}
.editor-page:not(.auth-screen) .selection-bar{box-shadow:0 4px 14px var(--km-ui-rgba-20-40-61-12)}
@media (min-width:960px){
  .editor-page:not(.auth-screen) .tool-window .rail-primary{border-color:transparent;background:transparent;color:var(--km-brand-burgundy)}
  .editor-page:not(.auth-screen) .tool-window .rail-primary:hover:not(:disabled){background:var(--km-brand-blush);color:var(--km-brand-burgundy)}
}

/* KM-301 r4: Anzeige als Flyout, Windows-Schaltflaechen, Karten und kompakte Abstaende */
.editor-statusbar .status-metrics{order:-1}
.editor-page:not(.auth-screen) .quick-action,.editor-page:not(.auth-screen) .editor-outline-action,.editor-page:not(.auth-screen) .editor-danger-action,.editor-page:not(.auth-screen) .sheet-close,.editor-page:not(.auth-screen) .inspector-action{padding:5px 12px;border:1px solid var(--km-brand-line);border-bottom-color:var(--km-ui-d4d8df);background:var(--km-brand-white);color:var(--km-brand-navy);font:400 14px/1.3 'DM Sans',Arial,sans-serif;box-shadow:none}
.editor-page:not(.auth-screen) .quick-action:hover:not(:disabled),.editor-page:not(.auth-screen) .editor-outline-action:hover:not(:disabled),.editor-page:not(.auth-screen) .editor-danger-action:hover:not(:disabled),.editor-page:not(.auth-screen) .sheet-close:hover{background:var(--km-brand-mist)}
.editor-page:not(.auth-screen) .quick-action-primary,.editor-page:not(.auth-screen) .inspector-action{border-color:var(--km-brand-burgundy);background:var(--km-brand-burgundy);color:var(--km-brand-white)}
.editor-page:not(.auth-screen) .quick-action-primary:hover:not(:disabled),.editor-page:not(.auth-screen) .inspector-action:hover:not(:disabled){border-color:var(--km-brand-burgundy-dark);background:var(--km-brand-burgundy-dark)}
.editor-page:not(.auth-screen) .editor-danger-action{color:var(--km-geno-a53347)}
@media (pointer:fine){.editor-page:not(.auth-screen) .quick-action,.editor-page:not(.auth-screen) .editor-outline-action,.editor-page:not(.auth-screen) .editor-danger-action,.editor-page:not(.auth-screen) .sheet-close,.editor-page:not(.auth-screen) .inspector-action{min-height:var(--os-h-ctl)}}
@media (min-width:960px){
  .editor-page:not(.auth-screen) .editor-sidebar{position:absolute;inset:8px 8px auto auto;z-index:45;box-sizing:border-box;width:min(360px,calc(100% - 16px));height:auto;max-height:calc(100% - 16px);overflow-y:auto;border:1px solid var(--km-brand-line);border-radius:var(--os-r-menu);background:var(--km-brand-section);box-shadow:0 8px 24px var(--km-ui-rgba-20-40-61-22)}
  .editor-page:not(.auth-screen) .editor-sidebar .sheet-head{display:flex;padding:8px 8px 8px 14px;background:var(--km-brand-section)}
  .editor-page:not(.auth-screen) .editor-sidebar .sheet-head .sheet-title{font-size:15px}
  .editor-page:not(.auth-screen) .editor-sidebar .side-section{margin:8px;padding:10px 12px;border:1px solid var(--km-brand-line);border-radius:var(--os-r-menu);background:var(--km-brand-white)}
  .editor-page:not(.auth-screen) .editor-sidebar .side-title{font-size:16px}
  .editor-page:not(.auth-screen) .editor-sidebar .stat-grid strong{font-size:20px}
  .editor-page:not(.auth-screen) .editor-sidebar .stat-grid>div{padding:8px 10px}
  .editor-page:not(.auth-screen) .detail-window:not(.tool-window) .detail-body{padding:6px 0;background:var(--km-brand-section)}
  .editor-page:not(.auth-screen) .detail-window:not(.tool-window) .detail-section{margin:6px 8px;border:1px solid var(--km-brand-line);border-radius:var(--os-r-menu);background:var(--km-brand-white);overflow:hidden}
  .editor-page:not(.auth-screen) .detail-window:not(.tool-window) .detail-section>summary{min-height:36px;font:500 14px/1.3 'DM Sans',Arial,sans-serif}
  .editor-page:not(.auth-screen) .detail-window:not(.tool-window) .detail-section[open]>summary{background:var(--km-brand-section);color:var(--km-brand-navy)}
}
@media (min-width:960px) and (pointer:fine){
  .editor-page:not(.auth-screen) .editor-sidebar .layer-switch{min-height:30px;gap:8px;font-size:14px}
  .editor-page:not(.auth-screen) .editor-sidebar .layer-switch input{width:16px;height:16px;accent-color:var(--km-brand-burgundy)}
  .editor-page:not(.auth-screen) .editor-sidebar .fact-kinds .layer-sub{font-size:13px}
}

/* KM-301 r5: Darstellung und Anzeige als Pulldown-Menues der Befehlsleiste */
.editor-page .command-panels .display-mode-menu,.editor-page .editor-command-bar #toggle-display{display:none}
.ctx-label{padding:6px 10px 2px;color:var(--km-brand-muted);font-size:12px}
.ctx-left{display:flex;align-items:center;gap:8px}
.ctx-check{flex:none;width:14px;text-align:center}
.ctx-item[aria-checked="true"] .ctx-check::before{content:"\2713"}
.ctx-item[role="menuitemradio"][aria-checked="true"] .ctx-check::before{content:"\25CF";font-size:8px;vertical-align:middle}
@media (pointer:coarse){.ctx-item{min-height:44px}}

/* KM-301 r6: Auswahlrechteck (rechte Maustaste ziehen) */
.marquee-box{position:absolute;z-index:4;box-sizing:border-box;border:1px solid var(--km-brand-burgundy);background:var(--km-ui-rgba-207-165-173-18);pointer-events:none}
.marquee-box[hidden]{display:none}

/* KM-301 r9: Anzeige-Optionen im Pulldown-Menue, Symbollegende als Dialog; das alte Seitenfenster bleibt nur als Datenhalter im DOM */
.editor-page #editor-sidebar,.editor-page .sheet-scrim{display:none!important}
.ctx-menu{max-height:calc(100vh - 16px);overflow-y:auto}
.ctx-item.ctx-sub .ctx-left{padding-left:18px}
.ctx-item[aria-checked="mixed"] .ctx-check::before{content:"\2212"}
.legend-dialog{width:min(460px,calc(100vw - 24px))}

/* Auswahlleiste auf allen Bildschirmgroessen entfaellt; Bearbeiten bleibt in den Werkzeugen erreichbar. */
.editor-page:not(.auth-screen) .selection-bar{display:none!important}
.editor-page .editor-command-bar #toggle-details{display:none}
.editor-page .editor-command-bar .account-nav{margin-left:auto;gap:2px}
.editor-page .editor-command-bar .account-nav[hidden]{display:none}
.editor-page .editor-command-bar a.command-btn{text-decoration:none}
/* Darstellung und Anzeige schliessen links direkt an PDF an, das Konto steht rechts */
.editor-page .editor-command-bar .command-group:has(#tool-undo),.editor-page .editor-command-bar .command-panels{margin-right:0;padding-right:0;border-right:0}
.editor-page .editor-command-bar .command-panels{margin-left:0}

/* KM-301 r11: sichtbare Unterschiede je Oberflaechenstil. Windows: flache Leiste mit Trennstrichen und Markierungsstrich; macOS: Gruppen als helle Kapseln, Menues mit Unschaerfe und Akzent-Auswahl; Linux: dunklere Kopfleiste, groessere Steuerelemente und Rundungen. */
.editor-page:not(.auth-screen) .graph-panel-header.editor-command-bar{background:var(--os-bar-bg)}
.editor-page .editor-command-bar .command-btn,.editor-page:not(.auth-screen) .mode-summary{font-size:var(--os-fs)}
html[data-os="mac"] .editor-page .editor-command-bar :is(.command-group,.command-group:has(#tool-undo),.command-panels,.account-nav),
html[data-os="linux"] .editor-page .editor-command-bar :is(.command-group,.command-group:has(#tool-undo),.command-panels,.account-nav){margin-right:0;padding:2px;border:1px solid var(--km-brand-line);border-radius:var(--os-r-menu);background:var(--km-brand-white)}
html[data-os="linux"] .editor-page .editor-command-bar :is(.command-group,.command-group:has(#tool-undo),.command-panels,.account-nav){border-color:var(--km-ui-d4d8df)}
html[data-os="mac"] .editor-page .editor-command-bar .command-btn{font-weight:400}
html[data-os="mac"] .ctx-menu{background:var(--km-ui-rgba-250-249-247-94);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}
html[data-os="linux"] .ctx-menu{box-shadow:0 10px 30px var(--km-ui-rgba-20-40-61-30)}
html[data-os="linux"] .ctx-item{min-height:36px}
html[data-os="mac"] .editor-page:not(.auth-screen) .tool-window .rail-btn[aria-pressed="true"],html[data-os="linux"] .editor-page:not(.auth-screen) .tool-window .rail-btn[aria-pressed="true"]{background:var(--km-brand-mist);color:var(--km-brand-navy)}
.editor-page .editor-command-bar .command-btn.cmd-primary{border-color:var(--km-brand-burgundy);background:var(--km-brand-burgundy);color:var(--km-brand-white);text-decoration:none}
.editor-page .editor-command-bar .command-btn.cmd-primary:hover:not(:disabled){border-color:var(--km-brand-burgundy-dark);background:var(--km-brand-burgundy-dark);color:var(--km-brand-white)}

/* KM-301 r15: Kinder in den Basisdaten: Namensfeld auf 75 %, Spalte "Personenobjekt" nach Inhalt */
.editor-page .detail-window .children-table input[type=text]{width:75%}
.detail-window .children-table th:last-child,.detail-window .children-table td:last-child{width:auto}
.detail-window .children-table th:last-child{white-space:nowrap}

/* KM-301 r17: "gespeichert" und "Dauerhaft freigeschaltet" stehen nicht mehr in der Leiste; Restzeit, "wird gespeichert", "nicht gespeichert" und Konflikte bleiben sichtbar, "gespeichert" wird weiter angesagt */
/* Speicherstatus schwebt unter der Leiste statt die Knoepfe zu verschieben */
.editor-page .editor-command-bar .save-bar{position:absolute;top:calc(100% + 6px);right:12px;z-index:7;box-sizing:border-box;max-width:min(560px,calc(100% - 24px));margin:0;padding:4px 6px;border-radius:var(--os-r-menu);background:var(--km-brand-white);box-shadow:0 4px 14px var(--km-ui-rgba-20-40-61-12)}
.editor-page .editor-command-bar .save-bar:has(#save-status[data-state="saved"]):not(:has(#conflict-banner:not([hidden]))){padding:0;gap:0;background:none;box-shadow:none}
#save-status[data-state="saved"]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* KM-313: collapsed mobile windows share space without overlapping. */
@media (max-width:600px){
  .editor-page:not(.auth-screen) .tool-window:not(.is-open),
  .editor-page:not(.auth-screen) .detail-window:not(.is-open){width:calc(50% - 12px);max-width:calc(50% - 12px)}
  .editor-page:not(.auth-screen) .tool-window:not(.is-open) .detail-grip,
  .editor-page:not(.auth-screen) .detail-window:not(.is-open) .detail-grip{width:22px}
  .editor-page:not(.auth-screen) .tool-window:not(.is-open) .detail-corner,
  .editor-page:not(.auth-screen) .detail-window:not(.is-open) .detail-corner{display:none}
  .editor-page:not(.auth-screen) .tool-window:not(.is-open) .detail-toggle,
  .editor-page:not(.auth-screen) .detail-window:not(.is-open) .detail-toggle{min-width:0;gap:4px;padding:4px 2px;font-size:12px}
  .editor-page .touch-selection-status{top:auto;bottom:12px;left:12px;max-width:calc(100% - 24px)}
}
/* Graph text is never text-editable, including landscape touch and desktop. */
#family-graph,#family-graph *{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
