/* Editor-UI — nutzt die Engine-eigenen Tokens (paper/ink/green) als Werkzeug-
   Interpretation: hell, ruhig, funktional. Kein Framework, kein Font-Download. */

:root {
  --ink: #101312;
  --ink2: #2a2c24;
  --muted: #8a8c82;
  --line: #d9dad2;
  --green: #28b84a;
  --green-dark: #1e9c3c;
  --paper: #f7f8f3;
  --pale: #e5f4df;
  --card: #ffffff;
  --red: #d6453f;
  --red-pale: #fbeae9;
  --amber: #b8860b;
  --amber-pale: #faf3dd;
  --mono: ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }

/* [hidden] muss immer verstecken — sonst überschreibt ein display:flex/grid aus
   einer Klasse (z.B. .studio-status) das eingebaute [hidden]-Verhalten, und ein
   per element.hidden=true verstecktes Panel bleibt als leeres Kästchen sichtbar. */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
}

button {
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
}
button:hover:not(:disabled) { border-color: var(--muted); }
button:disabled { opacity: 0.45; cursor: default; }
button.primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  font-weight: 600;
}
button.primary:hover:not(:disabled) { background: var(--ink2); }
button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
button.ghost:hover:not(:disabled) { color: var(--ink); border-color: transparent; }
button.reject:hover:not(:disabled) { color: var(--red); }

input[type="text"], textarea, select {
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--green);
  outline-offset: -1px;
  border-color: transparent;
}
textarea { resize: vertical; min-height: 60px; }

/* ---------- Kopfzeile ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar .wordmark {
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.topbar .wordmark .grn { color: var(--green); }
.topbar input.title {
  font-weight: 600;
  max-width: 460px;
}
.topbar .spacer { flex: 1; }

.badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.badge.DRAFT     { color: var(--amber); border-color: var(--amber); background: var(--amber-pale); }
.badge.REVIEW    { color: var(--ink); border-color: var(--ink); background: var(--card); }
.badge.APPROVED,
.badge.RENDERED,
.badge.PUBLISHED { color: var(--green-dark); border-color: var(--green); background: var(--pale); }
.badge.REJECTED  { color: var(--red); border-color: var(--red); background: var(--red-pale); }

/* ---------- Post-Liste ---------- */

.list-wrap { max-width: 980px; margin: 32px auto; padding: 0 20px; }
.list-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.list-head h1 { font-size: 20px; margin: 0; flex: 1; }
.list-head select { width: auto; }

table.posts { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
table.posts th, table.posts td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
table.posts th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: var(--paper); }
table.posts tbody tr { cursor: pointer; }
table.posts tbody tr:hover { background: var(--pale); }
table.posts tr:last-child td { border-bottom: 0; }
table.posts .mono { font-family: var(--mono); font-size: 12px; color: var(--muted); }

.empty { color: var(--muted); padding: 40px; text-align: center; }

/* ---------- Editor-Layout ---------- */

.editor {
  display: grid;
  grid-template-columns: 240px minmax(380px, 520px) 1fr;
  gap: 0;
  height: calc(100vh - 53px);
}

/* Slide-Rail */
.rail {
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rail-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  position: relative;
}
.rail-card.active { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.rail-card .rc-head { display: flex; align-items: baseline; gap: 8px; }
.rail-card .rc-num { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.rail-card .rc-tmpl { font-weight: 600; font-size: 12px; }
.rail-card .rc-warn { color: var(--red); font-size: 12px; margin-left: auto; }
.rail-card .rc-text {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.rail-card .rc-actions { display: none; gap: 2px; margin-top: 6px; }
.rail-card.active .rc-actions, .rail-card:hover .rc-actions { display: flex; }
.rail-card .rc-actions button { padding: 1px 8px; font-size: 12px; border-radius: 6px; }

.rail-add { margin-top: 4px; }
.rail-add select { font-size: 13px; }

/* Formular */
.form-pane { overflow-y: auto; padding: 20px 24px; border-right: 1px solid var(--line); }
.form-head { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
.form-head select { width: auto; font-weight: 600; }
.form-head .variants { display: flex; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.form-head .variants button { border: 0; border-radius: 0; padding: 6px 12px; font-size: 12px; background: var(--card); }
.form-head .variants button.on { background: var(--ink); color: #fff; }
.tmpl-desc { font-size: 12px; color: var(--muted); margin: 0 0 16px; }

.field { margin-bottom: 14px; }
.field > label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}
.field > label .req { color: var(--red); }
.field > label .count { margin-left: auto; font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--muted); }
.field > label .count.over { color: var(--red); font-weight: 700; }
.field .hint { font-size: 11px; color: var(--muted); margin-top: 3px; }

.icon-row { display: flex; gap: 8px; align-items: center; }
.icon-row select { flex: 1; }
.icon-row img { width: 28px; height: 28px; flex: none; }
.img-preview { margin-top: 6px; max-width: 180px; max-height: 120px; border-radius: 8px; border: 1px solid var(--line); }

/* Listen-Felder */
.list-field { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--card); }
.list-item { display: flex; gap: 6px; align-items: flex-start; margin-bottom: 8px; }
.list-item:last-of-type { margin-bottom: 0; }
.list-item .li-fields { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.list-item .li-fields .field { margin-bottom: 0; }
.list-item .li-actions { display: flex; flex-direction: column; gap: 2px; }
.list-item .li-actions button { padding: 0 7px; font-size: 12px; line-height: 20px; border-radius: 6px; }
.list-item.card { border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: var(--paper); }
.list-add { margin-top: 8px; font-size: 12px; }
.list-bounds { font-size: 11px; color: var(--muted); margin-left: 8px; }

.finish-sec { margin: 0 0 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.finish-sec summary { padding: 8px 12px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--muted); }
.finish-sec[open] summary { border-bottom: 1px solid var(--line); color: var(--ink); }
.finish-box { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.finish-row { display: flex; align-items: center; gap: 10px; }
.finish-row .finish-label { font-size: 12px; font-weight: 600; width: 130px; flex: none; }
.finish-row select { flex: 1; font-size: 13px; padding: 5px 8px; }

.gen-btn { margin-top: 6px; font-size: 12px; padding: 5px 12px; }
.gen-btn:disabled { color: var(--muted); }

.caption-sec { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.caption-sec h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 8px; }

/* Validation-Panel */
.val-panel { margin-top: 20px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); padding: 12px 14px; font-size: 13px; }
.val-panel.ok { border-color: var(--green); background: var(--pale); }
.val-panel .v-line { font-family: var(--mono); font-size: 12px; margin: 3px 0; }
.val-panel .v-err { color: var(--red); }
.val-panel .v-story { color: var(--amber); }
.val-panel .v-warn { color: var(--muted); }

/* Preview */
.preview-pane { overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.preview-box { position: relative; width: 100%; }
.preview-box iframe {
  width: 1080px;
  height: 1350px;
  border: 0;
  transform-origin: top left;
  box-shadow: 0 20px 50px -30px rgba(20, 20, 15, 0.4);
  border-radius: 12px;
}
.preview-error {
  background: var(--red-pale);
  border: 1px solid var(--red);
  color: var(--red);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 12px;
}
.render-panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 13px; }
.render-panel .rp-head { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.render-panel .rp-out { font-family: var(--mono); font-size: 12px; color: var(--muted); word-break: break-all; }
.render-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.render-thumbs a { display: block; }
.render-thumbs img { width: 84px; border-radius: 6px; border: 1px solid var(--line); display: block; }

/* Studio */
.studio-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.studio-head h1 { font-size: 20px; margin: 0; flex: 1; }
.studio-head select { width: auto; }
.studio-sec { margin-top: 28px; }
.studio-sec h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 10px; }
.studio-sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.studio-sec-head h2 { margin: 0; }
.studio-form { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.studio-form button { align-self: flex-start; }
.studio-status { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; align-items: center; gap: 8px; font-size: 13px; }
table.posts td a { color: var(--ink); }

/* Grundwissen (Evergreen) */
.field-row { display: flex; gap: 8px; }
.field-row input { flex: 1; }
.field-row button { flex: none; }
.evergreen-item { border: 1px solid var(--line); border-radius: 10px; background: var(--card); margin-bottom: 8px; }
.evergreen-item summary { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; font-size: 13px; }
.evergreen-item .eg-title { flex: 1; font-weight: 600; }
.evergreen-item .eg-check { flex: none; }
.evergreen-item .eg-body { padding: 4px 12px 12px; }
.evergreen-item .eg-angle { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.evergreen-item textarea.dossier-text { font-size: 12px; line-height: 1.5; font-family: var(--mono); }

/* Voiceover-Panel */
.vo-panel textarea.vo-script { font-size: 13px; line-height: 1.5; margin-top: 8px; }
.vo-actions { display: flex; gap: 8px; margin-top: 8px; }

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 9px 18px;
  border-radius: 99px;
  font-size: 13px;
  z-index: 50;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; }

.spin {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.badge.cost { border-color: var(--green); color: var(--green-dark); background: var(--pale); font-family: var(--mono); white-space: pre; }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { display: flex; flex-direction: column; gap: 12px; width: 320px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 32px 28px; box-shadow: 0 20px 60px -40px rgba(20, 20, 15, 0.5); }
.login-mark { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.login-mark .grn { color: var(--green); }
.login-card h1 { font-size: 20px; margin: 0 0 6px; }
.login-card input { font-size: 14px; padding: 10px 12px; }
.login-card button { margin-top: 4px; padding: 10px; }
.login-err { color: var(--red); font-size: 13px; min-height: 18px; }

/* Modal (Passwort ändern) */
.modal-overlay { position: fixed; inset: 0; background: rgba(20, 20, 15, 0.4); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }

/* Kosten-Kärtchen (Studio) */
.cost-card { border: 1px solid var(--green); background: linear-gradient(180deg, var(--pale), var(--card)); border-radius: 14px; padding: 16px 20px; margin-bottom: 24px; }
.cost-card .cc-load { color: var(--muted); font-size: 13px; }
.cost-card .cc-title { display: flex; align-items: baseline; gap: 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--green-dark); margin-bottom: 10px; }
.cost-card .cc-hint { font-size: 11px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); }
.cost-card .cc-cols { display: flex; align-items: flex-end; gap: 40px; flex-wrap: wrap; }
.cost-card .cc-label { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.cost-card .cc-total { font-size: 34px; font-weight: 800; line-height: 1.05; color: var(--ink); font-variant-numeric: tabular-nums; }
.cost-card .cc-total-sm { font-size: 20px; font-weight: 700; color: var(--ink2); font-variant-numeric: tabular-nums; }
.cost-card .cc-meta { font-size: 12px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.cost-card .cc-prev { padding-left: 40px; border-left: 1px solid var(--line); }

/* Marken-Tag (Liste + Dispo) */
.brand-tag { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 99px; color: #fff; background: var(--bc, #666); white-space: nowrap; letter-spacing: 0.01em; }

/* Dispo */
.schedule-input { width: auto; font-size: 12px; padding: 4px 8px; font-family: var(--mono); }
.dispo-row { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--bc, var(--line)); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; }
.dispo-row.overdue { border-color: var(--red); border-left-color: var(--bc, var(--red)); }
.dispo-row .dispo-title { flex: 1; font-weight: 600; font-size: 13px; }
.dispo-overdue { color: var(--red); }

/* Ansicht-Umschalter */
.seg-group { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg-group .seg { border: 0; border-radius: 0; padding: 6px 16px; font-size: 12px; background: var(--card); color: var(--muted); }
.seg-group .seg.on { background: var(--ink); color: #fff; }

/* Kalender */
.cal-head { display: flex; align-items: center; gap: 8px; margin: 20px 0 12px; }
.cal-head h2 { font-size: 16px; margin: 0; min-width: 190px; text-transform: capitalize; }
.cal-head .cal-today-btn { margin-left: auto; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-cell { min-width: 0; }
.cal-dow { margin-bottom: 6px; }
.cal-dow-cell { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; padding: 0 4px; }
.cal-cell { min-height: 96px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 5px; display: flex; flex-direction: column; gap: 4px; }
.cal-cell.empty { background: transparent; border-color: transparent; }
.cal-cell.is-today { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cal-cell.drop { border-color: var(--green); background: var(--pale); }
.cal-day { font-size: 12px; font-weight: 600; color: var(--muted); }
.cal-cell.is-today .cal-day { color: var(--ink); }
.cal-chip { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--bc, #666); border-radius: 5px; background: color-mix(in srgb, var(--bc, #666) 14%, #fff); color: var(--ink); padding: 3px 7px; font-size: 11px; font-weight: 600; cursor: grab; overflow: hidden; }
.cal-chip .chip-label { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-chip.overdue { outline: 1px solid var(--red); }
.cal-chip.dragging { opacity: 0.4; }
.cal-hint { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.ready-tray { display: flex; flex-wrap: wrap; gap: 8px; }
.ready-tray .cal-chip { width: auto; max-width: 220px; }

/* ============================ Mobile (≤700px) ============================ */
@media (max-width: 700px) {
  /* iOS zoomt bei Fokus, wenn Felder <16px sind */
  input, select, textarea { font-size: 16px; }

  /* Topbar: umbrechen statt überlaufen, nicht mehr sticky (spart Höhe) */
  .topbar { position: static; flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .topbar .spacer { display: none; }
  .topbar input.title { flex: 1 1 140px; max-width: none; }
  .topbar button { min-height: 38px; }

  .list-wrap { margin: 16px auto; padding: 0 12px; }
  .list-head { flex-wrap: wrap; }

  /* Post-Liste → Karten */
  .list-posts thead { display: none; }
  .list-posts, .list-posts tbody { display: block; border: 0; background: transparent; }
  .list-posts tr { display: block; border: 1px solid var(--line); border-left: 4px solid var(--bc, var(--line));
    border-radius: 12px; margin-bottom: 10px; padding: 10px 14px; background: var(--card); }
  .list-posts td { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 0; padding: 3px 0; }
  .list-posts td::before { content: attr(data-label); color: var(--muted); font-size: 11px;
    text-transform: uppercase; letter-spacing: 0.04em; }
  .list-posts td.titel { display: block; font-size: 15px; font-weight: 700; padding: 0 0 6px; }
  .list-posts td.titel::before { display: none; }
  .list-posts td[data-label="ID"], .list-posts td[data-label="Format"], .list-posts td[data-label="Version"] { display: none; }
  .list-posts tbody tr:hover { background: var(--card); }  /* kein klebender Hover auf Touch */
  .list-posts tbody tr:active { background: var(--pale); } /* Tap-Feedback */

  /* Sonstige Tabellen (Studio-Topics) horizontal scrollbar statt Kartenumbau */
  .posts:not(.list-posts) { display: block; overflow-x: auto; white-space: nowrap; }

  /* Editor mobil: blätterbare Slides + Bearbeiten/Menü als Bottom-Sheet.
     Die Kopfzeile + Pager-Bar + Bottombar sind fix, die Bühne füllt den Rest. */
  /* Vollhöhe-App-Shell: kein Seiten-Scroll → position:fixed-Sheets sitzen korrekt */
  .m-editor { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
  .m-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; flex: none;
    background: var(--card); border-bottom: 1px solid var(--line); }
  .m-head .m-title { flex: 1; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .pg-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
    padding: 14px 12px 6px; overflow: hidden; }
  .pg-stage .preview-host { width: 100%; }
  .pg-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
    width: 40px; height: 56px; border-radius: 12px; font-size: 26px; line-height: 1;
    background: rgba(255,255,255,0.82); border: 1px solid var(--line); color: var(--ink); }
  .pg-nav.prev { left: 4px; } .pg-nav.next { right: 4px; }
  .pg-nav:disabled { opacity: 0.25; }

  .pg-bar { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 2px 0 10px; }
  .pg-counter { font-family: var(--mono); font-size: 12px; color: var(--muted); }
  .pg-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 92%; }
  .pg-dot { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 0; background: var(--line); }
  .pg-dot.on { background: var(--ink); }

  .m-bottombar { flex: none; display: flex; gap: 10px; padding: 10px 12px;
    background: var(--card); border-top: 1px solid var(--line); }
  .pg-bar { flex: none; }
  .m-bottombar button { flex: 1; min-height: 46px; font-size: 15px; }

  /* Bottom-Sheet */
  .m-sheet-overlay { position: fixed; inset: 0; background: rgba(20,20,15,0.4); z-index: 120;
    display: flex; align-items: flex-end; opacity: 0; pointer-events: none; transition: opacity 0.18s; }
  .m-sheet-overlay.open { opacity: 1; pointer-events: auto; }
  .m-sheet { width: 100%; max-height: 88vh; background: var(--paper); border-radius: 18px 18px 0 0;
    display: flex; flex-direction: column; transform: translateY(100%); transition: transform 0.22s; }
  .m-sheet-overlay.open .m-sheet { transform: translateY(0); }
  .m-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px;
    border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--paper); border-radius: 18px 18px 0 0; }
  .m-sheet-head strong { font-size: 15px; }
  .m-sheet-body { overflow-y: auto; padding: 14px 16px 28px; -webkit-overflow-scrolling: touch; }
  .m-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
  .m-actions button { flex: 1 1 40%; min-height: 44px; }
  .m-badges { display: flex; gap: 8px; margin-bottom: 12px; }
  .m-field { margin-bottom: 12px; }
  .m-field > label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
  .m-field input { width: 100%; }

  /* Studio */
  .studio-head { flex-wrap: wrap; }
  .studio-head select { flex: 1 1 40%; }
  .cost-card .cc-cols { flex-direction: column; gap: 14px; }
  .cost-card .cc-prev { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 12px; }
  .studio-form { max-width: none; }

  /* Dispo-Liste: Zeile → Karte (Titel oben voll, Rest darunter) */
  .dispo-row { flex-wrap: wrap; }
  .dispo-row .dispo-title { flex: 1 1 100%; order: -1; font-size: 14px; }

  /* Dispo-Kalender: behält 7 Spalten, scrollt horizontal */
  .cal-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cal-grid { min-width: 620px; }
  .cal-head { flex-wrap: wrap; }

  /* Feinschliff-/Bild-Vorschau nicht breiter als der Screen */
  .img-preview { max-width: 100%; }
}
