/* Zentek Offsite Web-Raum · eigenmind
   Design: ruhig, viel Weißraum, Rost als sparsamer Akzent. DM Sans selbst gehostet.
   Mobile first; Beamer-Modus (html.beamer); Druckansicht am Ende. */

/* ------------------------------------------------------------------ Schriften */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/dm-sans-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/dm-sans-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/dm-sans-latin-ext-500-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/dm-sans-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/dm-sans-latin-ext-700-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/dm-sans-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ------------------------------------------------------------------ Design-Tokens */
:root {
  /* eigenmind-Folienfarben */
  --bg: #faf6f7;
  --ink: #0f2334;
  --slate: #455461;
  --grey: #bcc1ca; /* nur Trennlinien */
  --rust: #ad5247;
  --salmon: #d3847b; /* nur Flächen */
  --light: #f4eff0;

  /* abgeleitet */
  --surface: #ffffff;
  --line: #e7e1e3;
  --line-strong: #d5cfd2;
  --input-border: #8c95a1;
  --rust-dark: #8e4038;
  --rust-soft: #f7ebe9;
  --rust-tint: #fbf3f2;
  --success: #24654a;
  --success-soft: #e8f3ed;
  --error: #a32a1f;
  --error-soft: #fbebe9;
  --warn-soft: #fff5e0;
  --warn-line: #d9a640;

  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --gutter: 16px;
  --sidebar: 16rem;
  --content: 70rem;
  --shadow: 0 1px 2px rgba(15, 35, 52, 0.04), 0 4px 16px rgba(15, 35, 52, 0.05);
  --shadow-lg: 0 8px 32px rgba(15, 35, 52, 0.16);
  --focus: 0 0 0 3px var(--bg), 0 0 0 5px var(--rust);
  color-scheme: light;
}

/* ------------------------------------------------------------------ Basis */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  line-height: 1.25;
  margin: 0;
  font-weight: 700;
}

p {
  margin: 0 0 0.75em;
}
p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--rust-dark);
  text-underline-offset: 0.18em;
}
a:hover {
  color: var(--ink);
}

strong {
  font-weight: 700;
}

img,
svg {
  max-width: 100%;
}

svg.icon {
  flex-shrink: 0;
  max-width: none;
  vertical-align: middle;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus {
  outline: none;
}
:focus-visible {
  outline: 3px solid var(--rust);
  outline-offset: 2px;
  border-radius: 4px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -64px;
  z-index: 200;
  padding: 12px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 500;
}
.skip-link:focus {
  top: 8px;
  color: #fff;
}

.muted {
  color: var(--slate);
}
.pre-line {
  white-space: pre-line;
}
.empty {
  color: var(--slate);
  font-size: 0.95rem;
}
.lead {
  font-size: 1.0625rem;
  color: var(--slate);
  max-width: 68ch;
}
.eyebrow {
  margin: 0 0 6px;
  font-size: 0.875rem;
  color: var(--slate);
  letter-spacing: 0.01em;
}
.page-title {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  hyphens: auto;
}
.page-title strong {
  font-weight: 700;
}
.page-title:focus {
  outline: none;
}
.page-title__label {
  color: var(--slate);
}
.section-title {
  font-size: 1.25rem;
  margin: 8px 0 6px;
}
.section-sub {
  color: var(--slate);
  margin: 0 0 16px;
  max-width: 70ch;
}
.subsection-title {
  font-size: 0.95rem;
  color: var(--slate);
  margin: 22px 0 10px;
}
.mini-title {
  font-size: 0.875rem;
  margin: 14px 0 4px;
}
.plain-list {
  margin: 0 0 8px;
  padding-left: 1.2em;
}
.plain-list li {
  margin-bottom: 4px;
}
.page-head {
  margin-bottom: 24px;
}
.page-head .btn {
  margin-top: 8px;
}
.page-head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 24px;
}
.noscript {
  padding: 24px;
  text-align: center;
}

/* Demo-Banner (nur im Demo-Build, scripts/build-demo.js füllt #demo-slot) */
.demo-banner {
  background: var(--warn-soft);
  border-bottom: 2px solid var(--warn-line);
  color: var(--ink);
}
.demo-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  max-width: calc(var(--content) + var(--sidebar) + 4rem);
  margin: 0 auto;
  padding: 10px var(--gutter);
}
.demo-banner__title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}
.demo-banner__text {
  margin: 0;
  flex: 1 1 22rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--slate);
}
.demo-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.demo-banner__confirm:empty {
  display: none;
}
.demo-banner__confirm {
  max-width: calc(var(--content) + var(--sidebar) + 4rem);
  margin: 0 auto;
  padding: 0 var(--gutter) 10px;
}
.demo-banner__confirm .confirm {
  margin-top: 0;
  background: var(--surface);
}
body.beamer .demo-banner {
  display: none;
}
@media (max-width: 639px) {
  .demo-banner__inner {
    padding-block: 8px;
  }
  .demo-banner__title {
    font-size: 0.95rem;
  }
  .demo-banner__text {
    display: none;
  }
  .demo-banner__actions {
    gap: 4px;
    margin-inline-start: -10px;
  }
  .demo-banner__actions .btn {
    padding-inline: 10px;
  }
}

/* ------------------------------------------------------------------ Kopf */
.app-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 30;
}
.app-header__inner {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  min-height: 60px;
  padding: 8px var(--gutter);
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
  color: var(--ink);
  text-decoration: none;
  padding: 4px 0;
}
.brand:hover {
  color: var(--ink);
}
/* Zentek-Logo (Datei aus dem Agenda-Deck). Telefon: klein über dem Titel; ab 640px links neben dem Titel. */
.brand__logo {
  display: block;
  height: 18px;
  width: auto;
  flex-shrink: 0;
}
.brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.brand__title {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
}
.brand__by {
  font-size: 0.75rem;
  color: var(--slate);
  letter-spacing: 0.06em;
}
.app-header__user {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.user-chip {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.875rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  max-width: 18rem;
}
.user-chip__name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-chip__area {
  color: var(--slate);
  white-space: nowrap;
}
.user-chip__area::before {
  content: '·';
  margin-right: 6px;
}
.user-chip--admin {
  display: inline-flex;
}

@media (max-width: 639px) {
  .app-header__logout {
    width: 44px;
    padding: 0;
  }
  .app-header__logout .btn__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .brand__title {
    font-size: 0.9rem;
    text-wrap: balance;
  }
  .brand__by {
    display: none;
  }
}
@media (min-width: 640px) {
  .brand {
    flex-direction: row;
    align-items: center;
    gap: 14px;
  }
  .brand__logo {
    height: 28px;
    padding-inline-end: 14px;
    border-inline-end: 1px solid var(--line);
    box-sizing: content-box;
  }
  .brand__title {
    font-size: 1rem;
  }
  .user-chip {
    display: inline-flex;
  }
}

/* Phasenband "Jetzt: … bis …" */
.phase-band {
  background: var(--ink);
  color: #fff;
}
.phase-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 12px;
  min-height: 44px;
  padding: 6px var(--gutter);
  font-size: 0.875rem;
}
.phase-band__now {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.phase-band__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--salmon);
  box-shadow: 0 0 0 0 rgba(211, 132, 123, 0.6);
  animation: pulse 2.4s ease-out infinite;
}
.phase-band__label {
  font-weight: 700;
}
.phase-band__label--muted {
  color: #c9d0d8;
  font-weight: 500;
}
.phase-band__title {
  font-weight: 500;
}
.phase-band__time {
  color: #d5dbe2;
  font-variant-numeric: tabular-nums;
}
.phase-band__rest {
  color: #f3cbc5;
  font-weight: 700;
}
.phase-band__link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 4px;
  color: #fff;
  font-weight: 500;
}
.phase-band__link:hover {
  color: #f3cbc5;
}
.phase-band__link:focus-visible {
  outline-color: var(--salmon);
}
/* Zusätzlicher Link des Programmpunkts (z. B. „Zu den Prototypen“) direkt neben dem ersten */
.phase-band__link + .phase-band__link {
  margin-left: 0;
}
.phase-band__hint {
  flex-basis: 100%;
  color: #e6eaee;
  font-style: italic;
  padding-bottom: 2px;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(211, 132, 123, 0.6);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(211, 132, 123, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(211, 132, 123, 0);
  }
}

/* ------------------------------------------------------------------ Layout und Navigation */
.app-shell {
  display: block;
}
.app-main {
  min-width: 0;
  padding: 20px var(--gutter) 72px;
}
.app-main:focus {
  outline: none;
}
.app-view,
.governance {
  max-width: var(--content);
  margin-left: auto;
  margin-right: auto;
}
/* Container je Routenwechsel (main.js): ohne eigenes Layout, die Ansicht verhält sich wie ein direktes Kind von #app */
.route-view {
  display: contents;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--slate);
  cursor: pointer;
  flex-shrink: 0;
}
.icon-btn:hover:not(:disabled) {
  background: var(--light);
  color: var(--ink);
}
.icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.app-header__menu {
  color: var(--ink);
  margin-left: -8px;
}

.app-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 60;
  width: min(19rem, 86vw);
  padding: 20px 12px 32px;
  background: var(--surface);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(-105%);
  visibility: hidden;
  transition:
    transform 0.2s ease,
    visibility 0s linear 0.2s;
  box-shadow: var(--shadow-lg);
}
.nav-open .app-nav {
  transform: none;
  visibility: visible;
  transition: transform 0.2s ease;
}
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15, 35, 52, 0.35);
}
.nav__group {
  margin-bottom: 18px;
}
.nav__title {
  margin: 0 10px 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--slate);
}
.nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
}
.nav__link .icon {
  color: var(--slate);
}
.nav__link:hover {
  background: var(--light);
  color: var(--ink);
}
.nav__link.is-active {
  background: var(--light);
  box-shadow: inset 3px 0 0 var(--rust);
}
.nav__link.is-active .nav__label {
  font-weight: 700;
}
.nav__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.nav__sub {
  font-size: 0.75rem;
  color: var(--slate);
  line-height: 1.3;
}
.nav__label {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.3;
}
.nav__now {
  margin-left: auto;
  flex-shrink: 0;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--rust);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

@media (min-width: 768px) {
  :root {
    --gutter: 28px;
  }
  .app-main {
    padding-top: 28px;
  }
}

@media (min-width: 1100px) {
  body.has-nav .app-shell {
    display: grid;
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
    align-items: start;
  }
  body.has-nav .app-nav {
    position: sticky;
    top: 0;
    z-index: 1;
    width: auto;
    height: 100vh;
    transform: none;
    visibility: visible;
    transition: none;
    box-shadow: none;
    background: transparent;
    border-right: 1px solid var(--line);
    padding-top: 24px;
  }
  .app-header__menu {
    display: none !important;
  }
  .nav-backdrop {
    display: none !important;
  }
  :root {
    --gutter: 40px;
  }
}

/* Governance-Hinweis (dauerhaft sichtbar, ausklappbar) */
.governance {
  margin-bottom: 24px;
}
.governance__details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}
.governance__summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 14px;
  cursor: pointer;
  list-style: none;
}
.governance__summary::-webkit-details-marker {
  display: none;
}
.governance__summary .icon {
  color: var(--rust);
}
.governance__short {
  flex: 1 1 auto;
}
.governance__more {
  flex-shrink: 0;
  color: var(--rust-dark);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.governance__details[open] .governance__more {
  font-size: 0;
}
.governance__details[open] .governance__more::after {
  content: 'Weniger';
  font-size: 0.875rem;
}
.governance__body {
  padding: 0 14px 12px 42px;
  color: var(--slate);
}
.governance__body p {
  margin-bottom: 6px;
}

/* ------------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover {
  color: var(--ink);
}
.btn--primary {
  background: var(--rust);
  border-color: var(--rust);
  color: #fff;
}
.btn--primary:hover:not(:disabled) {
  background: var(--rust-dark);
  border-color: var(--rust-dark);
  color: #fff;
}
.btn--secondary {
  background: var(--surface);
  border-color: var(--input-border);
}
.btn--secondary:hover:not(:disabled) {
  border-color: var(--ink);
  background: var(--rust-tint);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover:not(:disabled) {
  background: var(--light);
}
.btn--ghost[aria-pressed='true'] {
  background: var(--ink);
  color: #fff;
}
.btn--danger {
  background: var(--error);
  border-color: var(--error);
  color: #fff;
}
.btn--danger:hover:not(:disabled) {
  background: #861f16;
  color: #fff;
}
.btn--sm {
  padding: 6px 12px;
  font-size: 0.875rem;
}
.btn--lg {
  min-height: 52px;
  padding: 10px 24px;
  font-size: 1.05rem;
}
.btn--icon {
  width: 44px;
  padding: 0;
}
.btn:disabled,
.btn--disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn[aria-busy='true'] {
  opacity: 0.85;
  cursor: progress;
}

/* ------------------------------------------------------------------ Formulare */
.field {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}
.field__label {
  font-weight: 500;
  font-size: 0.95rem;
}
.field__hint {
  font-size: 0.85rem;
  color: var(--slate);
}
.form-error {
  color: var(--error);
  font-weight: 500;
  margin: 4px 0 8px;
}
.form-error:empty {
  display: none;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}
.field-error {
  display: block;
  color: var(--error);
  font-size: 0.8rem;
  margin-top: 4px;
}

.input {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  color: var(--ink);
  line-height: 1.45;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.input:hover:not(:read-only):not(:disabled) {
  border-color: var(--slate);
}
.input:focus-visible,
.input:focus {
  outline: none;
  border-color: var(--rust);
  box-shadow: 0 0 0 3px rgba(173, 82, 71, 0.28);
}
.input::placeholder {
  color: #6b7681;
}
.input--line {
  resize: none;
}
.input--area {
  resize: vertical;
  overflow-y: hidden;
  min-height: 44px;
}
textarea.input[rows='3'] {
  min-height: 5.6rem;
}
.input:read-only:not(select),
.input:disabled {
  background: var(--light);
  border-color: var(--line-strong);
  color: var(--ink);
}
.input[aria-invalid='true'] {
  border-color: var(--error);
  box-shadow: 0 0 0 1px var(--error);
}
.input--num {
  font-variant-numeric: tabular-nums;
}
.input--select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23455461' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
}
.input--select:disabled {
  cursor: not-allowed;
}

.control {
  position: relative;
  min-width: 0;
}
.counter {
  display: block;
  text-align: right;
  font-size: 0.75rem;
  color: var(--slate);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.control--copy {
  display: grid;
}
.copy-btn {
  justify-self: end;
  margin-top: 6px;
}

/* Pills (Auswahl als Chips) */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}
.pill__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.pill__text {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 16px;
  border: 1px solid var(--input-border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.925rem;
  line-height: 1.25;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
  user-select: none;
}
.pill:hover .pill__text {
  border-color: var(--ink);
}
.pill__input:checked + .pill__text {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.pill__input:checked + .pill__text::before {
  content: '';
  width: 0.45em;
  height: 0.8em;
  margin: -0.15em 0.55em 0 -0.1em;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.pills--single .pill__input:checked + .pill__text::before {
  display: none;
}
.pill__input:focus-visible + .pill__text {
  outline: 3px solid var(--rust);
  outline-offset: 2px;
}
.pill__input:disabled + .pill__text {
  cursor: not-allowed;
  opacity: 0.6;
}
.pill__input:disabled:checked + .pill__text {
  opacity: 0.85;
}
.pills--small .pill__text {
  padding: 4px 12px;
  font-size: 0.85rem;
}

/* Checkboxen */
.check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  padding: 10px 0;
  cursor: pointer;
}
.check__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.check__box {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 1.5px solid var(--input-border);
  border-radius: 6px;
  background: var(--surface);
  color: #fff;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}
.check__box .icon {
  opacity: 0;
}
.check:hover .check__box {
  border-color: var(--ink);
}
.check__input:checked + .check__box {
  background: var(--ink);
  border-color: var(--ink);
}
.check__input:checked + .check__box .icon {
  opacity: 1;
}
.check__input:focus-visible + .check__box {
  outline: 3px solid var(--rust);
  outline-offset: 2px;
}
.check__input:disabled + .check__box {
  opacity: 0.6;
}
.check:has(.check__input:disabled) {
  cursor: not-allowed;
}
.check__text {
  line-height: 1.45;
}
.checklist {
  display: grid;
  gap: 2px;
}
.checklist .check {
  padding: 10px 10px;
  margin: 0 -10px;
  border-radius: 8px;
}
.checklist .check:hover {
  background: var(--light);
}

/* ------------------------------------------------------------------ Karten, Hinweise, Tags */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.card__title {
  font-size: 1.05rem;
  margin: 0 0 12px;
}
.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--light);
  color: var(--ink);
  font-size: 0.925rem;
  margin: 12px 0;
}
.notice .icon {
  margin-top: 2px;
}
.notice p {
  margin: 0;
}
.notice .btn {
  margin-left: auto;
}
.notice--info .icon {
  color: var(--slate);
}
.notice--error {
  background: var(--error-soft);
  color: #7c1f16;
  flex-wrap: wrap;
}
.notice--error .icon {
  color: var(--error);
}
.notice--lock {
  background: #eef0f3;
  color: var(--ink);
}
.notice--warn {
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  flex-wrap: wrap;
}
.notice--warn .icon {
  color: #8a5a00;
}
.phase-ctl__stale {
  margin: 0;
}
.phase-ctl__stale > span {
  flex: 1 1 14rem;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--light);
  border: 1px solid var(--line);
  color: var(--slate);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}
.tag--accent {
  background: var(--rust);
  border-color: var(--rust);
  color: #fff;
}
.tag--muted {
  background: transparent;
  border-color: var(--grey);
  color: var(--slate);
}
.details > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  cursor: pointer;
  color: var(--rust-dark);
  font-weight: 500;
  list-style: none;
}
.details > summary::-webkit-details-marker {
  display: none;
}
.details > summary::before {
  content: '';
  width: 0.5em;
  height: 0.5em;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.details[open] > summary::before {
  transform: rotate(45deg);
}

/* Lade- und Fehlerzustände */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
.spinner--sm {
  width: 14px;
  height: 14px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.loading,
.boot {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--slate);
  padding: 24px 0;
}
.boot {
  justify-content: center;
  padding: 64px 0;
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 24px;
  text-align: center;
  color: var(--slate);
  background: var(--surface);
  border: 1px dashed var(--grey);
  border-radius: var(--radius);
}
.empty-state p {
  max-width: 52ch;
}

/* Druckspiegel der Textfelder (nur im Druck sichtbar, siehe @media print) */
.print-mirror {
  display: none;
}

/* Toasts */
.toasts {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 120;
  transform: translateX(-50%);
  width: min(92vw, 30rem);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-lg);
  font-size: 0.925rem;
  /* Toasts liegen über Matrix-Ablage, Pager und KI-Knöpfen: Taps gehen durch, nur Aktionsknöpfe sind bedienbar */
  pointer-events: none;
  animation: toast-in 0.2s ease;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}
.toast .icon {
  margin-top: 1px;
}
.toast > span {
  flex: 1 1 auto;
}
.toast .toast__action {
  pointer-events: auto;
  flex: 0 0 auto;
  margin: -4px -6px -4px 0;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}
.toast--success {
  background: #1d5741;
}
.toast--error {
  background: #8a2419;
}
.toast--out {
  opacity: 0;
  transform: translateY(8px);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Inline-Bestätigung */
.confirm {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--rust-tint);
  border: 1px solid var(--rust);
  border-radius: var(--radius-sm);
  font-size: 0.925rem;
}
.confirm__text {
  font-weight: 500;
  flex: 1 1 14rem;
}
.confirm__actions {
  display: flex;
  gap: 8px;
}

/* Konflikt: fremde Änderung am fokussierten Feld */
.conflict {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}
.conflict__text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  margin: 0 0 6px;
}
.conflict__preview {
  white-space: pre-line;
  color: var(--slate);
  max-height: 7.5em;
  overflow: auto;
  margin: 0 0 8px;
}
.conflict__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Kurzes Aufleuchten */
.flash {
  animation: flash 1.6s ease-out;
}
@keyframes flash {
  0% {
    box-shadow: 0 0 0 0 rgba(173, 82, 71, 0.55);
    background-color: var(--rust-soft);
  }
  100% {
    box-shadow: 0 0 0 14px rgba(173, 82, 71, 0);
  }
}

/* ------------------------------------------------------------------ Login */
.login {
  display: grid;
  gap: 24px;
  padding-top: 8px;
}
.login__intro .lead {
  margin-bottom: 0;
}
.login__facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  color: var(--slate);
  font-size: 0.95rem;
}
.login__facts li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.login__facts .icon {
  color: var(--rust);
  margin-top: 2px;
}
.login__card {
  padding: 24px 20px;
  box-shadow: var(--shadow);
}
.login__card .card__title {
  font-size: 1.2rem;
  margin-bottom: 18px;
}
.login__card .btn--lg {
  width: 100%;
}
.login__mod {
  font-size: 0.9rem;
  margin: 0;
}
.login__mod a {
  color: var(--slate);
}
.area-choices {
  display: grid;
  gap: 8px;
}
.area-choice {
  position: relative;
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 12px 14px 12px 44px;
  min-height: 44px;
  background: var(--surface);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}
.area-choice::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 15px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--input-border);
  background: var(--surface);
}
.area-choice:hover {
  border-color: var(--ink);
}
.area-choice:has(.area-choice__input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
  background: var(--rust-tint);
}
.area-choice:has(.area-choice__input:checked)::before {
  border: 5px solid var(--ink);
}
.area-choice:has(.area-choice__input:focus-visible) {
  outline: 3px solid var(--rust);
  outline-offset: 2px;
}
.area-choice__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.area-choice__name {
  font-weight: 700;
}
.area-choice__text {
  font-size: 0.8rem;
  color: var(--slate);
  line-height: 1.4;
}

/* Login mit Teilnehmendenliste: Namen als große Auswahlflächen (Radio), nach Gruppe gegliedert */
.roster {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.roster:focus,
.roster:focus-visible {
  /* Programmatischer Fokus nach Schritt 1 (Handy): kein Rahmen um die ganze Liste, wie bei .page-title */
  outline: none;
}
/* Fokussierte Namen nicht hinter der festen „Anmelden“-Leiste verstecken (Pfeiltasten, Screenreader) */
html:has(.login-form[data-step='liste']) {
  scroll-padding-bottom: 150px;
}
.roster__legend {
  padding: 0;
  margin-bottom: 4px;
}
.roster > .field__hint {
  margin: 0 0 14px;
}
.roster__search {
  margin-bottom: 8px;
}
.roster__group {
  margin-top: 14px;
}
.roster__group[hidden] {
  display: none;
}
.roster__area {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--slate);
}
.roster__names {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr));
  gap: 8px;
}
.roster-name {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
  max-width: 100%;
  padding: 10px 14px 10px 42px;
  background: var(--surface);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}
.roster-name[hidden] {
  display: none;
}
.roster-name::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border-radius: 50%;
  border: 1.5px solid var(--input-border);
  background: var(--surface);
}
.roster-name:hover {
  border-color: var(--ink);
}
.roster-name:has(.roster-name__input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
  background: var(--rust-tint);
}
.roster-name:has(.roster-name__input:checked)::before {
  border: 5px solid var(--ink);
}
.roster-name:has(.roster-name__input:focus-visible) {
  outline: 3px solid var(--rust);
  outline-offset: 2px;
}
.roster-name__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.roster-name__text {
  overflow-wrap: anywhere;
}
.roster__empty {
  margin: 14px 0 0;
  color: var(--slate);
}
.roster__empty[hidden] {
  display: none;
}
/* Auswahl und „Anmelden“ bleiben beim Scrollen durch die Liste unten im Blick (vor allem am Handy) */
.login-form__bar {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 16px -20px 0;
  padding: 12px 20px 16px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.login-form__bar .form-actions {
  margin-top: 8px;
}
.roster__chosen {
  margin: 0;
  font-weight: 500;
}
.roster__chosen--leer {
  font-weight: 400;
  color: var(--slate);
}
.login__step-title {
  margin: 0 0 12px;
  font-size: 1rem;
}
.login__switch {
  width: 100%;
  margin-top: 8px;
}

@media (min-width: 520px) {
  .area-choices {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 960px) {
  .login {
    grid-template-columns: minmax(0, 1fr) 28rem;
    /* Zeile 2 nimmt die Resthöhe der Login-Karte auf, damit die Hinweise direkt unter der Einleitung stehen */
    grid-template-rows: auto 1fr auto;
    gap: 24px 48px;
    align-items: start;
    padding-top: 4vh;
  }
  .login__intro {
    grid-column: 1;
    grid-row: 1;
  }
  .login__facts {
    grid-column: 1;
    grid-row: 2;
  }
  .login__card {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
  .login__mod {
    grid-column: 2;
    grid-row: 3;
  }
}

/* ------------------------------------------------------------------ Start */
.hero {
  margin-bottom: 28px;
}
.start-grid {
  display: grid;
  gap: 32px;
}
@media (min-width: 1000px) {
  .start-grid {
    grid-template-columns: minmax(0, 1fr) 19rem;
    gap: 40px;
  }
}
.start-side {
  display: grid;
  gap: 16px;
  align-content: start;
}
.side-card {
  padding: 18px;
}
.side-card .card__title {
  font-size: 1rem;
}
.side-card p {
  font-size: 0.925rem;
}
.tile-section {
  margin-bottom: 36px;
}
.tile-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-bottom: 4px;
}
.tile-section__time {
  color: var(--rust);
  font-weight: 500;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}
.section-sub--small {
  font-size: 0.875rem;
  margin-bottom: 4px;
}
.part-frame {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  margin: 0 0 4px;
}
.part-frame__box {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.part-frame__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 0.95rem;
}
.part-frame__title .icon {
  color: var(--rust);
  flex: none;
}
.part-frame__list {
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.9rem;
}
.part-frame__list li {
  margin-bottom: 4px;
}
.part-frame__list li:last-child {
  margin-bottom: 0;
}
.tiles {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  margin-top: 12px;
}
.tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}
.tile:hover {
  border-color: var(--grey);
  box-shadow: var(--shadow);
  color: var(--ink);
  transform: translateY(-1px);
}
.tile--now {
  border-color: var(--rust);
  box-shadow: inset 0 0 0 1px var(--rust);
}
.tile__top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}
.tile__top .tag,
.tile__top > .icon {
  margin-left: auto;
}
.tile__top > .icon {
  color: var(--rust);
}
.tile__badge + .tag {
  margin-left: 0;
}
.tile__label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--slate);
}
.tile__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--slate);
  margin-left: auto;
}
.tile__title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}
.tile__meta {
  font-size: 0.85rem;
  color: var(--slate);
}
.tile__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
}
.tile__progress {
  flex: 1 1 auto;
}
.tile__pct {
  font-size: 0.8rem;
  color: var(--slate);
  font-variant-numeric: tabular-nums;
  min-width: 3.2em;
  text-align: right;
}
.tile--done .tile__pct {
  color: var(--success);
  font-weight: 700;
}
.tiles--small .tile {
  min-height: 0;
  padding: 12px 14px;
}
.tiles--small .tile__title {
  font-size: 0.95rem;
}
/* Prototypen zum Vergleich (Startseite Teil 2, Moderation) */
.proto-card {
  margin-top: 16px;
  scroll-margin-top: 16px;
}
.proto-card__note {
  font-size: 0.925rem;
  margin-bottom: 0;
}
.proto-tiles {
  margin-top: 10px;
}
.proto-hint {
  margin-top: 12px;
  scroll-margin-top: 16px;
}
.side-card .ctx-source {
  font-size: 0.8rem;
}
@media (min-width: 640px) {
  .tile {
    min-height: 9.5rem;
  }
  .tile--link {
    min-height: 7.5rem;
  }
  .tiles--small .tile {
    min-height: 0;
  }
}

.progress {
  display: block;
  width: 100%;
  height: 6px;
  background: #ebe5e7;
  border-radius: 999px;
  overflow: hidden;
}
.progress__bar {
  display: block;
  height: 100%;
  width: calc(var(--p, 0) * 100%);
  background: var(--slate);
  border-radius: inherit;
  transition: width 0.3s ease;
}
.tile--done .progress__bar {
  background: var(--success);
}

.agenda {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
}
.agenda__item {
  display: grid;
  grid-template-columns: 6.2rem minmax(0, 1fr);
  gap: 8px;
  padding: 7px 8px;
  margin: 0 -8px;
  border-bottom: 1px solid #efe9eb;
}
.agenda__item:last-child {
  border-bottom: 0;
}
.agenda__time {
  color: var(--rust);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.agenda__title a {
  color: var(--ink);
  text-decoration: none;
}
.agenda__title a:hover {
  text-decoration: underline;
}
.agenda__title .tag {
  margin-left: 6px;
}
.agenda__hint {
  display: block;
  margin-top: 2px;
  color: var(--slate);
  font-size: 0.8rem;
}
.agenda__item--past .agenda__title,
.agenda__item--past .agenda__title a,
.agenda__item--past .agenda__time {
  color: var(--slate);
}
.agenda__item--break .agenda__title {
  color: var(--slate);
}
.agenda__item--now {
  background: var(--rust-soft);
  border-radius: 8px;
  border-bottom-color: transparent;
}
.agenda__item--now .agenda__title {
  font-weight: 700;
}

/* ------------------------------------------------------------------ Canvas */
.canvas-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px 12px;
  min-height: 52px;
  margin: -20px calc(var(--gutter) * -1) 20px;
  padding: 4px var(--gutter);
  background: rgba(250, 246, 247, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 768px) {
  .canvas-toolbar {
    margin-top: -28px;
  }
}
.canvas-toolbar__name {
  /* Basis 0: der Name nimmt nur den freien Platz und kürzt sich zuerst, bevor der Speicherstatus enger wird */
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate);
}
.canvas-toolbar__actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.save-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--slate);
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
}
.save-status > .icon,
.save-status > .spinner {
  flex-shrink: 0;
}
.save-status__text,
.save-status__long {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.save-status__short {
  display: none;
}
/* Schmale Bildschirme: Kurzform des Status (Langform im title und für Screenreader), notfalls umbrechend statt die
   Werkzeugleiste über den Rand zu schieben */
@media (max-width: 639px) {
  .save-status {
    white-space: normal;
    line-height: 1.25;
  }
  .save-status__short {
    display: inline;
  }
  .save-status__long {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
}
.save-status[data-status='saved'] {
  color: var(--success);
}
.save-status[data-status='offline'],
.save-status[data-status='offlineIdle'],
.save-status[data-status='error'],
.save-status[data-status='conflict'] {
  color: var(--error);
  font-weight: 500;
}
.save-status[data-status='locked'] {
  color: var(--slate);
}
.hide-sm {
  display: none;
}
@media (min-width: 640px) {
  .hide-sm {
    display: inline-flex;
  }
}
@media (max-width: 479px) {
  .canvas-toolbar__name {
    display: none;
  }
  .save-status {
    margin-right: auto;
  }
}

.canvas-head {
  margin-bottom: 24px;
}
.canvas-head__subtitle {
  font-size: 1.05rem;
  color: var(--slate);
  margin: -4px 0 12px;
}
.canvas-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  font-size: 0.9rem;
  color: var(--slate);
}
.canvas-meta li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.canvas-meta__time {
  color: var(--rust);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.canvas-head__intro {
  max-width: 72ch;
  margin-bottom: 14px;
}
.tips {
  margin: 12px 0;
  padding: 0 16px;
  background: var(--light);
  border-radius: var(--radius-sm);
}
.tips > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  cursor: pointer;
  font-weight: 500;
  list-style: none;
}
.tips > summary::-webkit-details-marker {
  display: none;
}
.tips > summary::after {
  content: '';
  width: 0.5em;
  height: 0.5em;
  margin-left: 4px;
  border: solid var(--slate);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-2px);
}
.tips[open] > summary::after {
  transform: rotate(-135deg) translateY(-2px);
}
.tips__hash {
  color: var(--rust);
  font-weight: 700;
}
.tips__list {
  list-style: none;
  margin: 0;
  padding: 0 0 14px;
}
.tips__list li {
  position: relative;
  padding-left: 1.3em;
  margin-bottom: 6px;
}
.tips__list li::before {
  content: '#';
  position: absolute;
  left: 0;
  color: var(--rust);
  font-weight: 700;
}

/* Blöcke */
.canvas-blocks {
  display: grid;
  gap: 16px;
}
.canvas-blocks > .block,
.se > .block,
.block--all-areas {
  margin: 0;
}
.block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  min-width: 0;
}
@media (min-width: 640px) {
  .block {
    padding: 22px 24px;
  }
}
.block__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-bottom: 10px;
}
.block__label {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}
label.block__label {
  cursor: pointer;
}
.block__meta {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--slate);
}
.block__hint {
  color: var(--slate);
  font-size: 0.9rem;
  margin: -4px 0 12px;
  max-width: 75ch;
}
.block__hint--mark {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.block__hint--mark .icon {
  color: var(--rust);
  margin-top: 2px;
}
.block--heading {
  background: transparent;
  border: 0;
  padding: 16px 0 0;
}
.block--heading .section-title {
  margin: 0 0 4px;
}
.block--heading .section-sub {
  margin: 0;
}
.block--info {
  background: transparent;
  border: 0;
  border-left: 3px solid var(--salmon);
  border-radius: 0;
  padding: 2px 0 2px 16px;
}
.info__title {
  font-size: 1rem;
  margin: 0 0 6px;
}
.info__text {
  white-space: pre-line;
  max-width: 75ch;
}
.info__list {
  margin: 0;
  padding-left: 1.2em;
  max-width: 75ch;
}
.info__list li {
  margin-bottom: 4px;
}
.block--readonly {
  background: var(--light);
  border-color: transparent;
}
.block--optional {
  border-style: dashed;
  border-color: var(--grey);
}

.share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 20px 0;
  padding: 18px 20px;
  background: var(--rust-tint);
  border: 1px solid #ecd2ce;
  border-radius: var(--radius);
}
.share-bar__text {
  flex: 1 1 22rem;
}
.share-bar__title {
  font-size: 1rem;
  margin-bottom: 4px;
}
.share-bar__text p {
  font-size: 0.925rem;
  color: var(--slate);
  margin-bottom: 4px;
}
.share-bar__status {
  font-weight: 500;
  color: var(--ink) !important;
}
.share-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.source {
  margin-top: 24px;
  font-size: 0.8rem;
  color: var(--slate);
}
.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
}
.pager__link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 48%;
  overflow-wrap: anywhere;
  min-height: 44px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.3;
}
.pager__link:hover {
  border-color: var(--grey);
  color: var(--ink);
}
.pager__link small {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--slate);
}
.pager__link--next {
  text-align: right;
  margin-left: auto;
}
.pager__link > span {
  min-width: 0;
}
.pager__link > svg {
  flex: none;
}
/* Schmale Bildschirme: Zurück/Weiter dürfen untereinander stehen statt mitten im Wort umzubrechen */
@media (max-width: 639px) {
  .pager {
    flex-wrap: wrap;
  }
  .pager__link {
    max-width: 100%;
  }
}
.is-locked .block {
  background: #fcfbfb;
}

/* Tabelle: Karten (schmal) bzw. Raster (breit) */
.tbl {
  container-type: inline-size;
  container-name: tbl;
}
.tbl__head {
  display: none;
}
.tbl__rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.tbl__row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px 12px;
  padding: 12px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  align-items: start;
  transition: background-color 0.2s ease;
}
.tbl__row--marked {
  border-color: var(--salmon);
  background: var(--rust-tint);
}
.tbl__num {
  grid-row: 1;
  grid-column: 1 / span 5;
  align-self: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--slate);
}
.tbl--has-mark .tbl__num {
  grid-column: 1 / span 3;
}
.tbl__numtext::before {
  content: 'Zeile ';
}
.tbl__cell {
  grid-column: 1 / -1;
  min-width: 0;
}
.tbl__cell--number,
.tbl__cell--choice,
.tbl__cell--scale,
.tbl__cell--check,
.tbl__cell--computed {
  grid-column: span 3;
}
.tbl__cell--mark {
  grid-row: 1;
  grid-column: 4 / span 2;
  justify-self: end;
}
.tbl__cell--del {
  grid-row: 1;
  grid-column: 6;
  justify-self: end;
}
.tbl__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--slate);
  margin-bottom: 4px;
}
.tbl__computed {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.tbl__markbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--input-border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--slate);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
}
.tbl__markbtn:hover:not(:disabled) {
  border-color: var(--ink);
  color: var(--ink);
}
.tbl__markbtn[aria-pressed='true'] {
  background: var(--rust);
  border-color: var(--rust);
  color: #fff;
}
.tbl__markbtn[aria-pressed='true'] .icon {
  fill: currentColor;
}
.tbl__markbtn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
.tbl__foot,
.items__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 12px;
}
.tbl__markinfo,
.items__count {
  font-size: 0.85rem;
  color: var(--slate);
}
.tbl__cell--wide .pills {
  gap: 6px;
}
.tbl__cell--wide .pill__text {
  padding: 6px 12px;
  font-size: 0.875rem;
}

/* Breites Raster: kleine Tabellen ab 36rem, große (viele Spalten) ab 60rem Containerbreite */
@container tbl (min-width: 36rem) {
  .tbl:not(.tbl--large) .tbl__head,
  .tbl:not(.tbl--large) .tbl__row {
    display: grid;
    grid-template-columns: var(--tbl-cols);
    gap: 8px;
  }
  .tbl:not(.tbl--large) .tbl__head {
    padding: 0 8px 8px;
    border-bottom: 1px solid var(--grey);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--slate);
    align-items: end;
  }
  .tbl:not(.tbl--large) .tbl__rows {
    gap: 0;
  }
  .tbl:not(.tbl--large) .tbl__row {
    padding: 8px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .tbl:not(.tbl--large) .tbl__num,
  .tbl:not(.tbl--large) .tbl__cell {
    grid-row: auto;
    grid-column: auto;
    justify-self: stretch;
  }
  .tbl:not(.tbl--large) .tbl__num {
    padding-top: 11px;
    font-weight: 500;
    text-align: center;
  }
  .tbl:not(.tbl--large) .tbl__numtext::before {
    content: none;
  }
  .tbl:not(.tbl--large) .tbl__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .tbl:not(.tbl--large) .tbl__cell--del {
    grid-column: -2 / -1;
    grid-row: 1;
  }
}
@container tbl (min-width: 60rem) {
  .tbl__head,
  .tbl__row {
    display: grid;
    grid-template-columns: var(--tbl-cols);
    gap: 8px;
  }
  .tbl__head {
    padding: 0 8px 8px;
    border-bottom: 1px solid var(--grey);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--slate);
    align-items: end;
  }
  .tbl__hcell small {
    display: block;
    font-weight: 400;
  }
  .tbl__hcell--num,
  .tbl__hcell--mark {
    text-align: center;
  }
  .tbl__rows {
    gap: 0;
  }
  .tbl__row {
    padding: 8px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
  }
  .tbl__row--marked {
    background: var(--rust-tint);
  }
  .tbl .tbl__num,
  .tbl .tbl__cell {
    grid-row: auto;
    grid-column: auto;
    justify-self: stretch;
  }
  .tbl .tbl__num {
    padding-top: 11px;
    font-weight: 500;
    text-align: center;
  }
  .tbl__numtext::before {
    content: none;
  }
  .tbl__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .tbl .tbl__cell--mark {
    grid-row: 1;
    grid-column: -3 / -2;
    justify-self: center;
  }
  .tbl .tbl__cell--del {
    grid-row: 1;
    grid-column: -2 / -1;
    justify-self: center;
  }
  .tbl__markbtn {
    width: 44px;
    padding: 0;
    justify-content: center;
    border-color: transparent;
    background: transparent;
  }
  .tbl__markbtn[aria-pressed='true'] {
    background: var(--rust);
  }
  .tbl__marktext {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .tbl .tbl__cell--wide {
    grid-row: 2;
    grid-column: 2 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    padding-bottom: 4px;
  }
  .tbl__cell--wide .tbl__label {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    margin: 0;
  }
  .tbl__cell--wide .pill__text {
    padding: 4px 12px;
  }
  .tbl__computed {
    justify-content: flex-end;
    padding-right: 4px;
  }
  .tbl__hcell--computed {
    text-align: right;
  }
}

/* Liste (wiederholbare Einträge) */
.items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  container-type: inline-size;
}
.item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px 16px;
  background: var(--surface);
  min-width: 0;
}
.item__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-bottom: 6px;
}
.item__title {
  font-size: 1rem;
  flex: 1 1 auto;
}
.item--optional .item__title::after {
  content: ' · optional';
  font-weight: 400;
  color: var(--slate);
  font-size: 0.85rem;
}
.item__actions {
  display: flex;
  gap: 2px;
  margin-right: -8px;
}
.item__fields {
  display: grid;
  gap: 14px 16px;
}
.item__field {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
}
.item__field .field__label {
  font-size: 0.9rem;
}
.item .confirm {
  flex-basis: 100%;
}
@container (min-width: 36rem) {
  .item__fields {
    grid-template-columns: 1fr 1fr;
  }
  .item__field--full {
    grid-column: 1 / -1;
  }
}

/* Matrix (2×2) */
.matrix {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 6px;
  margin-top: 4px;
}
.matrix__axis {
  font-size: 0.75rem;
  color: var(--slate);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.matrix__axis-label {
  font-weight: 700;
  color: var(--ink);
}
.matrix__axis--y {
  grid-column: 1;
  grid-row: 1;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  flex-direction: row-reverse;
  align-items: center;
  text-align: center;
}
.matrix__axis--x {
  grid-column: 2;
  grid-row: 2;
  align-items: center;
}
.matrix__board {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--grey);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  touch-action: none;
}
@media (min-width: 720px) {
  .matrix__board {
    aspect-ratio: 16 / 10;
  }
}
.matrix__q {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 0 solid var(--line);
  min-width: 0;
}
.matrix__q--x-low.matrix__q--y-high {
  grid-column: 1;
  grid-row: 1;
  border-right-width: 1px;
  border-bottom-width: 1px;
}
.matrix__q--x-high.matrix__q--y-high {
  grid-column: 2;
  grid-row: 1;
  border-bottom-width: 1px;
  text-align: right;
}
.matrix__q--x-low.matrix__q--y-low {
  grid-column: 1;
  grid-row: 2;
  border-right-width: 1px;
  justify-content: flex-end;
}
.matrix__q--x-high.matrix__q--y-low {
  grid-column: 2;
  grid-row: 2;
  justify-content: flex-end;
  text-align: right;
}
.matrix__q--best {
  background: var(--rust-tint);
}
.matrix__qlabel {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink);
}
.matrix__q--best .matrix__qlabel {
  color: var(--rust-dark);
}
.matrix__qhint {
  font-size: 0.75rem;
  color: var(--slate);
  line-height: 1.35;
}
.matrix__layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.matrix__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 46%;
  min-height: 44px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  box-shadow: 0 2px 6px rgba(15, 35, 52, 0.12);
}
.matrix__chip--placed {
  position: absolute;
  transform: translate(calc(var(--ax, 0.5) * -100%), calc(var(--ay, 0.5) * -100%));
  z-index: 1;
}
.matrix__chip--dragging {
  cursor: grabbing;
  z-index: 5;
  box-shadow: var(--shadow-lg);
}
.matrix__chip:focus-visible {
  z-index: 6;
}
.matrix__chip:disabled {
  cursor: default;
  opacity: 0.9;
}
.matrix__chipnum {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}
.matrix__chiptext {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.matrix__tray {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px dashed var(--grey);
  border-radius: 12px;
}
.matrix__tray .matrix__chip {
  max-width: 100%;
}
.matrix__traylabel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--slate);
  margin-right: 4px;
}
.matrix__legend {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.matrix__legendrow {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 6px 10px;
  align-items: center;
}
.matrix__legendrow .input--select {
  grid-column: 2;
}
.matrix__legendname {
  font-size: 0.925rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}
@media (min-width: 640px) {
  .matrix__legendrow {
    grid-template-columns: 30px minmax(0, 1fr) minmax(11rem, 16rem);
  }
  .matrix__legendrow .input--select {
    grid-column: 3;
  }
}
.matrix--empty {
  opacity: 0.6;
}
.matrix__empty {
  margin-bottom: 8px;
}

/* Reifegrad */
.stages {
  display: grid;
  gap: 8px;
}
.stages--pills {
  display: flex;
  flex-wrap: wrap;
}
.stages--pills .pill__input:checked + .pill__text::before {
  display: none;
}
.stage {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}
.stage:hover {
  border-color: var(--ink);
}
.stage:has(.stage__input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
  background: var(--rust-tint);
}
.stage:has(.stage__input:focus-visible) {
  outline: 3px solid var(--rust);
  outline-offset: 2px;
}
.stage__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.stage__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--input-border);
  font-weight: 700;
  background: var(--surface);
}
.stage__input:checked + .stage__n {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.stage__body {
  display: grid;
  gap: 2px;
}
.stage__name {
  font-weight: 700;
}
.stage__summary {
  font-size: 0.875rem;
  color: var(--slate);
}
.maturity-path {
  display: grid;
  gap: 14px;
}
.maturity-path__row {
  display: grid;
  gap: 6px;
}
.maturity-path__label {
  font-weight: 700;
}
@media (min-width: 720px) {
  .maturity-path__row {
    grid-template-columns: 4.5rem minmax(0, 1fr);
    align-items: center;
  }
}
.suggest-stage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: var(--light);
  border-radius: var(--radius-sm);
}
.suggest-stage__text {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
}
.suggest-stage__text .icon {
  color: var(--rust);
  margin-top: 2px;
}
.suggest-stage__ok {
  color: var(--success);
  font-weight: 500;
  margin: 0;
}
.maturity-path__source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}
.maturity-path__source:empty {
  display: none;
}
.maturity-path__note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-size: 0.9rem;
}
.maturity-path__note .icon {
  color: var(--rust);
  margin-top: 2px;
  flex: none;
}
.stages__note {
  margin: 8px 0 0;
  font-size: 0.8rem;
}

/* Selbsteinordnung */
.se {
  display: grid;
  gap: 16px;
}
.se > .section-title {
  margin-top: 16px;
}
.stage-cards {
  display: grid;
  gap: 16px;
}
@media (min-width: 1180px) {
  .stage-cards {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}
.stage-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px 8px;
  min-width: 0;
}
@media (min-width: 640px) {
  .stage-card {
    padding: 20px 22px 10px;
  }
}
.stage-card--met {
  border-color: #b9d5c6;
  box-shadow: inset 4px 0 0 var(--success);
}
.stage-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.stage-card__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}
.stage-card__title {
  font-size: 1.1rem;
  flex: 1 1 auto;
}
.stage-card__count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--slate);
  white-space: nowrap;
}
.stage-card--met .stage-card__count {
  color: var(--success);
  font-weight: 700;
}
.stage-card__summary {
  color: var(--slate);
  font-size: 0.95rem;
}
.stage-card__examples {
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.stage-card__examples p {
  margin: 0 0 8px;
}
.stage-card .block {
  border: 0;
  padding: 0;
  background: transparent;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding-top: 8px;
}
.stage-card .block__head {
  display: none;
}

/* Klebepunkte-Verteilung */
.dist {
  min-width: 0;
}
.dist__scale {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
}
.dist__stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  min-width: 0;
}
.dist__dots {
  display: flex;
  flex-wrap: wrap-reverse;
  justify-content: center;
  align-content: flex-start;
  gap: 4px;
  width: 100%;
  min-height: 4.5rem;
  padding: 6px 2px;
  border-bottom: 2px solid var(--grey);
}
.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--salmon);
}
.dist__stage--median .dot {
  background: var(--rust);
}
.dist__n {
  font-weight: 700;
  font-size: 0.9rem;
}
.dist__label {
  font-size: 0.72rem;
  color: var(--slate);
  line-height: 1.25;
  hyphens: auto;
  overflow-wrap: anywhere;
}
.dist__stage--median .dist__n {
  color: var(--rust-dark);
}
.dist__stage--mine .dist__n {
  text-decoration: underline;
}
.dist__summary {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--slate);
}
.dist__wait {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--slate);
  margin: 0;
}
.dist__wait .icon {
  margin-top: 2px;
}
.dist--large .dot {
  width: 22px;
  height: 22px;
}
.dist--large .dist__dots {
  min-height: 7rem;
  gap: 5px;
}
.dist--large .dist__label {
  font-size: 0.85rem;
}
.dist-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
.dist-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.dist-card--mine {
  border-color: var(--salmon);
}
.dist-card__title {
  font-size: 1rem;
  margin: 0 0 10px;
}
.dist-grid--large {
  gap: 20px;
}
.dist-grid .dist__label {
  display: none;
}
.dist-grid--large .dist-card__title {
  font-size: 1.3rem;
}
.block--all-areas {
  background: transparent;
  border: 0;
  padding: 16px 0 0;
}
.stage-legend {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 0.875rem;
  color: var(--slate);
}
.stage-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.stage-legend__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Pools und Verweise */
.pool-count {
  font-size: 0.85rem;
  color: var(--slate);
  margin-bottom: 8px;
}
.pool {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
}
.pool-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 0;
}
.pool-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--slate);
  margin-bottom: 8px;
}
.pool-card__author {
  font-weight: 700;
  color: var(--ink);
}
.pool-card__time {
  margin-left: auto;
}
.pool-card__lead {
  font-weight: 700;
}
.pool-card__dl {
  margin: 0;
  font-size: 0.9rem;
}
.pool-card__dl dt {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--slate);
  margin-top: 6px;
}
.pool-card__dl dd {
  margin: 0;
  white-space: pre-line;
}
.pool-card__sub {
  font-size: 0.8rem;
  font-weight: 700;
  margin: 10px 0 4px;
}
.pool-card__learn {
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.9rem;
}
.pool-routines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.pool-routine {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  background: var(--light);
  border-radius: 8px;
  font-size: 0.9rem;
}
.pool-routine__title {
  font-weight: 700;
}
.pool-routine__facts {
  font-size: 0.8rem;
  color: var(--slate);
}
.pool-routine__ki {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--rust-dark);
}
.ref-body {
  min-width: 0;
}
.ref-rows {
  margin: 0;
  padding-left: 1.3em;
  display: grid;
  gap: 8px;
}
.ref-row {
  padding-left: 4px;
}
.ref-row__title {
  font-weight: 500;
  white-space: pre-line;
}
.ref-row__rest {
  display: block;
  font-size: 0.85rem;
  color: var(--slate);
}
.ref-row .tag {
  margin-left: 6px;
}
.ref-text {
  white-space: pre-line;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 8px;
}
.ref-stage {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ref-stage .stage__n {
  flex: none;
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.ref-stage__sum {
  color: var(--slate);
}
.ref-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  min-height: 44px;
  font-size: 0.875rem;
  font-weight: 500;
}

/* ------------------------------------------------------------------ KI-Panel */
.ai-panel {
  margin: 0 0 20px;
  padding: 18px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 3px 0 var(--rust);
  scroll-margin-top: 64px;
}
@media (min-width: 640px) {
  .ai-panel {
    padding: 22px 24px;
  }
}
.ai-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin-bottom: 14px;
}
.ai-panel__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
}
.ai-panel__title .icon {
  color: var(--rust);
}
.ai-panel__note {
  flex: 1 1 20rem;
  font-size: 0.875rem;
  color: var(--slate);
  margin: 0;
}
.ai-panel__mode {
  white-space: normal;
}
.ai-panel__actions {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
}
.ai-action {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  padding: 12px 14px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}
.ai-action:hover:not(:disabled) {
  border-color: var(--rust);
  background: var(--rust-tint);
}
.ai-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.ai-action[aria-busy='true'] {
  opacity: 1;
  border-color: var(--rust);
  background: var(--rust-tint);
  cursor: progress;
}
.ai-action__icon {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--rust);
  margin-top: 1px;
}
.ai-action[aria-busy='true'] .ai-action__icon {
  display: none;
}
.ai-action .spinner {
  color: var(--rust);
  margin-top: 2px;
}
.ai-action__body {
  display: grid;
  gap: 2px;
}
.ai-action__label {
  font-weight: 700;
  line-height: 1.3;
}
.ai-action__hint {
  font-size: 0.825rem;
  color: var(--slate);
  line-height: 1.4;
}
.ai-panel__photo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.ai-panel__photohint {
  flex: 1 1 16rem;
  margin: 0;
  font-size: 0.85rem;
  color: var(--slate);
}
.photo input:focus-visible + .photo-btn {
  outline: 3px solid var(--rust);
  outline-offset: 2px;
}
.photo-btn {
  cursor: pointer;
}
.ai-panel__status {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--slate);
}
.ai-panel__status:empty {
  display: none;
}
.ai-panel__status--busy {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ai-panel__status--busy::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid var(--rust);
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
.ai-panel__status--error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: var(--error-soft);
  border-radius: var(--radius-sm);
  color: #7c1f16;
}
.ai-result {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.ai-result:focus {
  outline: none;
}
.ai-result__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 8px;
}
.ai-result__title {
  font-size: 1rem;
}
.ai-result__bulk {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ai-result__summary {
  color: var(--slate);
  max-width: 75ch;
}
.ai-result__dropped {
  font-size: 0.825rem;
  color: var(--slate);
  margin-top: 10px;
}
.sugs {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.sug {
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fffdfd;
  min-width: 0;
}
.sug__target {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--slate);
  margin: 0 0 4px;
}
.sug__text {
  white-space: pre-line;
  margin: 0;
}
.sug__fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  margin: 0;
  font-size: 0.925rem;
}
.sug__fields dt {
  font-size: 0.78rem;
  color: var(--slate);
  font-weight: 500;
  margin-top: 4px;
}
.sug__fields dd {
  margin: 0;
  white-space: pre-line;
}
@media (min-width: 640px) {
  .sug__fields {
    grid-template-columns: 10rem minmax(0, 1fr);
    gap: 4px 12px;
  }
  .sug__fields dt {
    margin-top: 0;
  }
}
.sug__note {
  font-size: 0.85rem;
  color: var(--slate);
  margin: 6px 0 0;
}
.sug__note::before {
  content: 'Hinweis: ';
  font-weight: 500;
}
.sug__current {
  margin: 8px 0 0;
  padding: 6px 10px;
  background: var(--light);
  border-radius: 8px;
  font-size: 0.85rem;
  white-space: pre-line;
}
.sug__current-label {
  font-weight: 500;
  color: var(--slate);
}
.sug__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.sug__state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 8px 0 0;
  color: var(--success);
  font-weight: 500;
  font-size: 0.9rem;
}
.sug__state .btn {
  color: var(--ink);
}
.sug--done {
  background: var(--success-soft);
  border-color: #b9d5c6;
}
.ai-questions {
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--light);
  border-radius: 12px;
}
.ai-questions__title {
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.ai-questions__list {
  margin: 0;
  padding-left: 1.2em;
}
.ai-questions__list li {
  margin-bottom: 4px;
}

/* ------------------------------------------------------------------ Plenum */
.plenum__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 20px;
}
.plenum__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.plenum__grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
.plenum-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 3px 0 var(--rust);
  min-width: 0;
}
.plenum-card__area {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0;
}
.plenum-card__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.plenum-card__label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--slate);
  margin-bottom: 2px;
}
.plenum-card__value {
  white-space: pre-line;
  margin: 0;
}
.plenum-card__empty {
  color: var(--slate);
  font-style: italic;
  margin: 0;
}
.plenum__single .plenum-card {
  max-width: 52rem;
  margin: 0 auto;
  padding: 28px 32px;
  font-size: 1.15rem;
}
.plenum__single .plenum-card__area {
  font-size: 1.4rem;
}
.plenum__pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}
.plenum__pos {
  font-variant-numeric: tabular-nums;
  color: var(--slate);
}

/* Übertragung */
.uebertragung__meta {
  margin: 0;
}
.themes {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
}
.theme {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
}
.theme__title {
  font-size: 1.15rem;
  margin-bottom: 4px;
}
.theme__q {
  font-size: 0.875rem;
  color: var(--slate);
}
.theme__points {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.theme__point {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.theme__point:last-child {
  border-bottom: 0;
}
.theme__areas {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.theme__sub {
  margin-top: 12px;
}
.theme__subtitle {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate);
  margin-bottom: 4px;
}
.theme__sub--conflict .theme__subtitle {
  color: var(--rust-dark);
}
.theme__list {
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.925rem;
}
.theme__note {
  margin-top: 12px;
  padding: 8px 12px;
  background: var(--light);
  border-radius: 8px;
  font-size: 0.9rem;
}
.notes {
  margin-top: 16px;
}
.area-chip {
  display: inline-flex;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  background: var(--light);
  color: var(--slate);
}
.area-chip--clozed-loop {
  background: #e6eef6;
  color: #1c3956;
}
.area-chip--containerdienst {
  background: #f8e8e5;
  color: #7a2f26;
}
.area-chip--epr {
  background: #eceff2;
  color: #33414d;
}
.area-chip--textil {
  background: #f2ebf5;
  color: #4d2e5c;
}
.themes--large .theme__title {
  font-size: 1.35rem;
}
.themes--large .theme__point {
  font-size: 1.05rem;
}

/* ------------------------------------------------------------------ Export */
.export-actions {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}
.export-actions__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.export-canvas {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.export-canvas__title {
  font-size: 1.1rem;
  font-weight: 400;
}
.export-canvas__scope {
  font-size: 0.8rem;
  color: var(--slate);
  margin: 2px 0 8px;
}
.export-field {
  margin-top: 14px;
}
.export-field__label {
  font-size: 0.875rem;
  color: var(--slate);
  margin-bottom: 4px;
}
.export-rows {
  margin: 0;
  padding-left: 1.3em;
}
.export-rows li {
  margin-bottom: 10px;
}
.export-rows .tag {
  margin-left: 8px;
}
.export-dl {
  margin: 4px 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  font-size: 0.9rem;
}
.export-dl dt {
  font-size: 0.78rem;
  color: var(--slate);
  margin-top: 4px;
}
.export-dl dd {
  margin: 0;
}
.print-only {
  display: none;
}

/* ------------------------------------------------------------------ Moderation */
.moderation > .card {
  margin-top: 16px;
}
.mod-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  align-items: start;
}
.mod-card > .muted {
  font-size: 0.9rem;
}
.mod-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}
.phase-ctl {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.phase-ctl__current {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 0;
}
.phase-ctl__time {
  white-space: nowrap;
}
.phase-ctl__row {
  display: grid;
  gap: 6px;
}
.phase-ctl__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lock-list {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}
.lock-group {
  margin: 0;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  min-width: 0;
}
.lock-group legend {
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0 4px;
}
.lock-group .check {
  padding: 6px 0;
  font-size: 0.9rem;
}
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 0 4px;
}
.progress-table {
  width: 100%;
  min-width: 46rem;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.progress-table th,
.progress-table td {
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.progress-table thead th {
  border-bottom-color: var(--grey);
  vertical-align: bottom;
}
.progress-table__area {
  display: block;
  font-weight: 700;
}
.progress-table__sub {
  display: block;
  font-size: 0.75rem;
  color: var(--slate);
  font-weight: 400;
}
.progress-table tbody th {
  font-weight: 400;
  min-width: 12rem;
}
.progress-table__label {
  display: block;
  font-size: 0.75rem;
  color: var(--slate);
}
.progress-table__title {
  display: block;
  font-weight: 500;
}
.progress-table__scope {
  display: block;
  font-size: 0.72rem;
  color: var(--slate);
}
.progress-table tr.is-group .progress-table__title {
  font-weight: 700;
}
.progress-table td .progress {
  margin-top: 6px;
  max-width: 9rem;
}
.progress-table__pct {
  display: inline-block;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.progress-table__open {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  margin-left: 6px;
  font-size: 0.8rem;
  font-weight: 500;
}
.ue-editor {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}
.ue-editor:empty {
  display: none;
}
.ue-theme {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.ue-points {
  list-style: none;
  margin: 6px 0 8px;
  padding: 0;
  display: grid;
  gap: 12px;
}
.ue-point {
  display: grid;
  gap: 6px;
}
.ue-point__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}
.ue-point__move {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ue-point__move .input--select {
  width: auto;
  max-width: min(18rem, 100%);
}
.ue-editor__bar {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.ue-editor__dirty {
  font-size: 0.85rem;
  color: var(--rust-dark);
  font-weight: 500;
}

/* ------------------------------------------------------------------ Beamer-Modus */
html.beamer {
  font-size: 125%;
}
@media (min-width: 1700px) {
  html.beamer {
    font-size: 140%;
  }
}
body.beamer .app-header,
body.beamer .app-nav,
body.beamer .nav-backdrop,
body.beamer .governance {
  display: none !important;
}
body.beamer .app-shell {
  display: block !important;
}
body.beamer .app-main {
  padding: 28px 40px 48px;
}
/* Im Beamer-Modus ist der App-Kopf ausgeblendet: Zentek-Logo rechts unten im Seitenkopf, also unter dem
   Schalter zum Beenden und nie über dem Inhalt */
body.beamer .plenum__head,
body.beamer .page-head {
  min-height: 84px;
  padding-right: 210px;
  background: url('../img/zentek-logo.png') no-repeat right bottom / auto clamp(26px, 3vh, 36px);
}
body.beamer .app-view {
  max-width: none;
}
.beamer-exit {
  position: fixed;
  top: 10px;
  right: 12px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--slate);
  font-size: 0.75rem;
  text-decoration: none;
  opacity: 0.55;
}
.beamer-exit:hover,
.beamer-exit:focus-visible {
  opacity: 1;
  color: var(--ink);
}
.beamer-hint {
  margin-top: 20px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--slate);
}
.plenum--beamer .plenum__controls {
  display: none;
}
.plenum--beamer .plenum-card__value {
  font-size: 1.1rem;
  line-height: 1.45;
}
.plenum--beamer .plenum__single .plenum-card__value {
  font-size: 1.35rem;
}
/* Beamer-Feldlabels: aus den hinteren Reihen lesbar (mind. 22 px, dunkel) */
.plenum--beamer .plenum-card__label {
  font-size: max(22px, 1.1rem);
  font-weight: 600;
  color: var(--ink);
}

/* Übertragung im Beamer: Übersicht (kompakt) und Einzelthema */
.theme__more {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--slate);
}
.themes--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 64rem;
  margin: 0 auto;
}
.themes--single .theme {
  padding: 28px 32px;
}
.themes--single .theme__title {
  font-size: 1.6rem;
}
.themes--single .theme__point {
  font-size: 1.2rem;
}
.notes--large {
  max-width: 64rem;
  margin: 0 auto;
  font-size: 1.2rem;
}

/* Verteilung im Beamer: große Klebepunkte, Karten füllen den Schirm */
body.beamer .dist--large .dot {
  width: 40px;
  height: 40px;
}
body.beamer .dist--large .dist__dots {
  min-height: 10rem;
  gap: 6px;
}
body.beamer .dist--large .dist__n {
  font-size: 1.5rem;
}
body.beamer .dist--large .dist__summary {
  font-size: 1.15rem;
  color: var(--ink);
}
body.beamer .dist-grid--large .dist-card__title {
  font-size: 1.6rem;
}
body.beamer .dist-grid--large .dist__wait {
  font-size: 1.1rem;
}

/* Desktop-Beamer (1920×1080): Plenum „Alle Karten“, Übertragung „Übersicht“ und Verteilung passen auf einen Schirm */
@media (min-width: 900px) {
  body.beamer .app-main {
    padding: 16px 32px 12px;
  }
  .plenum--beamer,
  .uebertragung--beamer,
  .verteilung--beamer {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 28px);
    min-height: 0;
  }
  .plenum--beamer .plenum__head,
  .uebertragung--beamer .page-head,
  .verteilung--beamer .page-head {
    margin-bottom: 10px;
  }
  .plenum--beamer .page-title,
  .uebertragung--beamer .page-title,
  .verteilung--beamer .page-title {
    font-size: clamp(1.4rem, 3vh, 2.1rem);
    margin: 0;
  }
  .plenum--beamer .plenum__stage,
  .uebertragung--beamer .uebertragung__body,
  .verteilung--beamer .verteilung__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }
  .plenum--beamer .beamer-hint,
  .uebertragung--beamer .beamer-hint {
    margin-top: 8px;
  }
  .plenum--beamer .plenum__grid {
    height: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
    gap: 1.4vh 1.2vw;
  }
  .plenum--beamer .plenum__grid .plenum-card {
    overflow: hidden;
    gap: 0.9vh;
    padding: 1.6vh 1.4vw;
  }
  .plenum--beamer .plenum__grid .plenum-card__value,
  .plenum--beamer .plenum__grid .plenum-card__empty {
    font-size: clamp(18px, 2.2vh, 28px);
    line-height: 1.3;
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
  }
  .plenum--beamer .plenum__grid .plenum-card__label {
    margin-bottom: 0;
  }
  .uebertragung--beamer .themes--overview {
    height: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
    gap: 1.4vh 1.2vw;
  }
  .uebertragung--beamer .theme--compact {
    overflow: hidden;
    padding: 1.6vh 1.2vw;
  }
  .uebertragung--beamer .theme--compact .theme__title {
    font-size: clamp(1.1rem, 2.6vh, 1.6rem);
  }
  .uebertragung--beamer .theme--compact .theme__point {
    font-size: clamp(16px, 1.9vh, 24px);
    padding: 0.6vh 0;
  }
  .uebertragung--beamer .theme--compact .theme__pointtext {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
  }
  .uebertragung--beamer .ue-single {
    height: 100%;
    overflow: auto;
  }
  .verteilung--beamer .dist-grid--large {
    height: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
    gap: 1.6vh 1.4vw;
  }
  .verteilung--beamer .dist-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
  }
}

/* Beamer-Ansicht auf dem Telefon: normale Schriftgröße, Platz für den Beenden-Knopf */
@media (max-width: 639px) {
  html.beamer {
    font-size: 100%;
  }
  body.beamer .app-main {
    padding: 68px 16px 32px;
  }
}

/* ------------------------------------------------------------------ Bewegung reduzieren */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------------------------------------------ Druck */
@media print {
  @page {
    margin: 14mm 14mm 16mm;
  }
  html,
  body {
    background: #fff !important;
    font-size: 10.5pt;
    color: #000;
  }
  .app-header,
  .app-nav,
  .nav-backdrop,
  .governance,
  .demo-banner,
  .skip-link,
  .toasts,
  .canvas-toolbar,
  .ai-panel,
  .share-bar,
  .pager,
  .no-print,
  .tbl__foot,
  .items__foot,
  .item__actions,
  .tbl__cell--del,
  .copy-btn,
  .counter,
  .conflict,
  .confirm,
  .matrix__tray,
  .matrix__legend .input--select,
  .suggest-stage .btn,
  .beamer-exit,
  .beamer-hint,
  .plenum__controls,
  .plenum__pager,
  .tips > summary::after,
  .ref-link,
  .btn {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
  .print-head {
    font-size: 9pt;
    color: #444;
    border-bottom: 1px solid #999;
    padding-bottom: 4pt;
    margin-bottom: 10pt;
  }
  .app-shell,
  body.has-nav .app-shell {
    display: block !important;
  }
  .app-main {
    padding: 0 !important;
  }
  .app-view {
    max-width: none;
  }
  .page-title {
    font-size: 18pt;
  }
  .tips {
    background: none;
    padding: 0;
  }
  .tips:not([open]) > .tips__list {
    display: block;
  }
  .block,
  .stage-card,
  .item,
  .tbl__row,
  .export-canvas,
  .plenum-card,
  .theme,
  .pool-card {
    box-shadow: none !important;
    border: 1px solid #bbb !important;
    background: #fff !important;
  }
  /* Nur kleine Elemente zusammenhalten; große Blöcke dürfen umbrechen (sonst leere Restseiten) */
  .stage-card,
  .item,
  .tbl__row,
  .plenum-card,
  .pool-card,
  .theme__point {
    break-inside: avoid;
  }
  .block__head,
  .block__label {
    break-after: avoid;
  }
  /* Textfelder: statt der Bildschirmhöhe den vollständigen Text drucken */
  .control--text .input {
    display: none !important;
  }
  .print-mirror {
    display: block !important;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    min-height: 1.4em;
    padding: 3pt 6pt;
    border: 1px solid #999;
    border-radius: 4pt;
  }
  .block--heading,
  .block--info {
    border: 0 !important;
  }
  .block--info {
    border-left: 2px solid #999 !important;
  }
  .input {
    border: 1px solid #999;
    background: #fff !important;
    box-shadow: none !important;
    overflow: visible !important;
    resize: none;
  }
  .input--select {
    background-image: none;
    padding-right: 12px;
  }
  .pill__input:checked + .pill__text,
  .check__input:checked + .check__box,
  .stage__input:checked + .stage__n,
  .matrix__chipnum,
  .stage-card__n,
  .plenum-card__num {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .matrix__board {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    aspect-ratio: 16 / 10;
  }
  a {
    color: #000;
    text-decoration: none;
  }
  .tile,
  .tiles {
    display: none;
  }
}

/* Navigation: Nutzerzeile (nur im Drawer) und einklappbarer Anhang */
.nav__user {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 10px 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.nav__user .icon {
  color: var(--slate);
}
.nav__username {
  font-weight: 700;
}
.nav__userarea {
  color: var(--slate);
}
.nav__userarea::before {
  content: '· ';
}
.nav__summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin: 0;
  padding: 0 10px;
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius-sm);
}
.nav__summary::-webkit-details-marker {
  display: none;
}
.nav__summary::after {
  content: '';
  width: 0.45em;
  height: 0.45em;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-2px);
  margin-left: 2px;
}
.nav__group--more[open] .nav__summary::after {
  transform: rotate(-135deg) translateY(-1px);
}
.nav__summary:hover {
  background: var(--light);
}
@media (min-width: 1100px) {
  body.has-nav .nav__user {
    display: none;
  }
  .nav__link {
    padding-top: 4px;
    padding-bottom: 4px;
  }
  .nav__group {
    margin-bottom: 14px;
  }
}

/* Matrix auf kleinen Bildschirmen: eingeordnete Einträge nur als Nummer (Namen stehen in der Liste darunter) */
@media (max-width: 639px) {
  .matrix__qhint {
    display: none;
  }
  .matrix__chip--placed {
    padding: 5px;
    gap: 0;
  }
  .matrix__chip--placed .matrix__chiptext {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .matrix__axis--x {
    font-size: 0.7rem;
  }
}
