/* ====== Konsole: Kommandozentrale ======
   Owner-Rueckmeldung: die Konsole folgt dem Seitenschema (vorher fest dunkel per
   data-theme="dark"); Farben kommen aus den Tokens, das Handy selbst bleibt dunkel. */
  :root[data-theme='dark'] .console { box-shadow: 0 44px 96px rgba(0,0,0,0.5); }
  .konsole-sec { padding-top: clamp(40px,6vw,72px); }
  /* UI-Review: der allgemeine .section-Abstand (132px) ueberstimmte die Regel oben; mit dem
     Hero-Abstand klaffte zwischen Hero und Konsole fast 200px Leerraum. */
  main > .subhero + section.section.konsole-sec { padding-top: clamp(16px, 3vw, 40px); }
  .ksec-head { max-width: 720px; margin: 0 auto clamp(28px,4vw,44px); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
  .ksec-head h2 { font-weight: 900; letter-spacing: -0.03em; line-height: 1.06; font-size: clamp(1.9rem, 3.2vw + 1rem, 2.9rem); }
  .ksec-head h2 .a { color: var(--primary); }

  .console {
    position: relative; overflow: hidden; border-radius: 30px;
    border: 1px solid var(--glass-border);
    background: var(--surface);
    box-shadow: 0 30px 70px rgba(15,23,42,0.12);
    display: grid; grid-template-columns: 296px minmax(0, 1fr);
  }
  
  
  

  /* --- Nav-Leiste --- */
  .cnav { position: relative; z-index: 2; border-right: 1px solid var(--glass-border-soft); padding: 20px 15px; display: flex; flex-direction: column; gap: 14px; background: var(--surface-2); }
  .cnav-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 7px 0; }
  .cnav-h .lab { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
  .cnav-h .r { display: flex; align-items: center; gap: 10px; }
  .cnav-h .pos { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; font-weight: 800; letter-spacing: 0.03em; color: var(--faint); white-space: nowrap; }
  .cnav-h .pos b { color: var(--primary-400); }
  .cplay { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 13px 0 11px; border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass); color: var(--gray); font-family: inherit; font-size: 11px; font-weight: 700; cursor: pointer; transition: color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease); }
  .cplay:hover { color: var(--text); border-color: rgba(64,130,234,0.4); }
  .cplay svg { width: 12px; height: 12px; }
  .cplay .px { display: none; } .cplay.paused .pp { display: none; } .cplay.paused .px { display: inline; }
  /* Owner-Rueckmeldung 2026-10-01: der Knopf ist waehrend jedes Modulwechsels
     kurz verborgen. Mit display:none schrumpfte die Kopfzeile, die Konsole
     wurde niedriger und das mittig ausgerichtete Handy sprang. Der Platz
     bleibt deshalb reserviert; visibility:hidden nimmt ihn trotzdem aus
     Fokusreihenfolge und Barrierefreiheitsbaum. */
  .cplay[hidden] { display: inline-flex; visibility: hidden; }

  .cnav-list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
  .cnav-entry { min-width: 0; }
  .cnav-item:focus-visible { outline: 2px solid #4082ea; outline-offset: -3px; }
  .cnav-item { cursor: pointer; position: relative; display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; padding: 13px 14px 13px 13px; border-radius: 15px; border: 1px solid transparent; background: none; color: inherit; font-family: inherit; transition: background .35s var(--ease), border-color .35s var(--ease); overflow: hidden; }
  .cnav-item.on { background: rgba(64,130,234,0.12); border-color: rgba(64,130,234,0.32); }
  .cnav-item .ci { flex-shrink: 0; width: 22px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-weight: 800; color: var(--faint); transition: color .35s var(--ease); }
  .cnav-item.on .ci { color: var(--primary-400); }
  /* Hell: #2563eb auf der aktiven Kachel erreichte nur 4,09:1; die dunklere Stufe haelt AA. */
  :root:not([data-theme='dark']) .cnav-item.on .ci { color: var(--interactive-hover); }
  .cnav-item .cic { flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--glass-border-soft); color: var(--gray); transition: all .35s var(--ease); }
  .cnav-item.on .cic { background: rgba(64,130,234,0.16); border-color: rgba(64,130,234,0.3); color: var(--primary-400); }
  .cnav-item .cic svg { width: 19px; height: 19px; }
  .cnav-item .ctx { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .cnav-item .cl { font-size: 0.92rem; font-weight: 700; letter-spacing: -0.01em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .35s var(--ease); }
  .cnav-item.on .cl { color: var(--text); }
  .cnav-item .cbar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--primary); border-radius: 0 3px 3px 0; transform: scaleY(0); transform-origin: center; transition: transform .4s var(--ease); box-shadow: none; }
  .cnav-item.on .cbar { transform: scaleY(0.62); }

  /* --- Stage --- */
  .cstage { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 308px; gap: clamp(24px,3vw,46px); padding: clamp(28px,3.4vw,46px); align-items: center; min-height: 664px; }
  .cinfo { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
  .cinfo.swap > * { animation: cinfoIn .5s var(--ease) both; }
  .cinfo.swap > *:nth-child(2){ animation-delay: .05s; }
  .cinfo.swap > *:nth-child(3){ animation-delay: .1s; }
  .cinfo.swap > *:nth-child(4){ animation-delay: .15s; }
  .cinfo.swap > *:nth-child(5){ animation-delay: .2s; }
  @keyframes cinfoIn { from { transform: translateY(10px); } to { transform: none; } }
  /* Label-Stil aus design-system/readme.md: 12px, 600, 0.08em, Grossbuchstaben. */
  .ctag { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
  .chl { font-weight: 800; letter-spacing: -0.025em; line-height: 1.12; font-size: clamp(1.5rem, 2vw + 1rem, 2.05rem); }
  .clead { color: var(--muted); font-size: 1.05rem; line-height: 1.6; }
  .cpills { display: flex; flex-wrap: wrap; gap: 9px; }
  .cpill { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid var(--glass-border); border-radius: 11px; padding: 8px 13px; }
  .cfacts { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; font-size: 0.92rem; color: var(--muted); }
  .cfacts li + li::before { content: "·"; padding: 0 0.6em; color: var(--faint); }
  /* P5-03: der Rueckfall-Zustand braucht einen echten <button> in Pillenform.
     Ohne font/color-Erbe uebernimmt der Browser sein Default-Formular-Styling
     und die Pille sieht aus wie ein Fremdkoerper. */
  .cpill-btn { font-family: inherit; color: var(--muted); cursor: pointer; transition: color .3s var(--ease), border-color .3s var(--ease); }
  .cpill-btn:hover:not(:disabled) { color: var(--text); border-color: rgba(64,130,234,0.4); }
  .cpill-btn:focus-visible { outline: 2px solid var(--primary-400); outline-offset: 2px; }
  .cpill-btn:disabled { opacity: .6; cursor: default; }
  .cquote { position: relative; margin-top: 4px; border-left: 2px solid var(--primary); padding: 4px 0 4px 18px; }
  .cquote p { font-style: italic; color: var(--gray); font-size: 0.9rem; line-height: 1.65; }

  .cphone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; }
  .cphone-host { position: relative; }
  /* .cphint (the static "Automatische Vorschau" line) is gone: live-demo-engine.js
     now renders preview chrome under the phone that reports the real state
     (loading / running / paused / failed) and offers the way out of the embed. */

  /* responsive */
  @media (max-width: 1080px){
    .console { grid-template-columns: minmax(0, 1fr); }
    .cnav { border-right: 0; border-bottom: 1px solid var(--glass-border-soft); padding: 14px; gap: 12px; }
    .cnav-list { flex-direction: row; overflow-x: auto; gap: 8px; scrollbar-width: none; padding-bottom: 2px; }
    .cnav-list::-webkit-scrollbar { display: none; }
    .cnav-entry { flex: 0 0 172px; }
    .cnav-item { height: 100%; flex-direction: column; align-items: flex-start; min-width: 172px; gap: 9px; padding: 13px; }
    .cnav-item .cbar { top: auto; bottom: 0; left: 0; right: 0; width: auto; height: 3px; border-radius: 3px 3px 0 0; transform: scaleX(0); }
    .cnav-item.on .cbar { transform: scaleX(1); }
  }
  @media (max-width: 820px){
    .cstage { grid-template-columns: 1fr; gap: 30px; min-height: 0; }
    .cphone { order: -1; }
    .cinfo { align-items: center; text-align: center; }
    .cquote { text-align: left; }
    .cpills, .cfacts { justify-content: center; }
  }
  @media (prefers-reduced-motion: reduce){
    .cinfo.swap > * { animation: none; }
  }
