/* Studio neu (seit 30.11., Spec docs/superpowers/specs/2026-11-30-studio-neu-design.md). Wird als LETZTE Datei
   geladen: nimmt den Seiten-Stylesheets die Kästen (Rahmen, Flächen) und setzt Abstand, Überschrift und feine
   Linien an ihre Stelle. Neue Seiten brauchen diese Datei nicht – sie bauen von Anfang an ohne Kästen. */

/* ------------------------------------------------------------------ Heute */
main.today { padding-top: 30px; }
.shell main.today .today-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin: 0 0 26px; }
.shell main.today .today-top h1 { font-size: var(--fs-xl); white-space: normal; }
.today-date { margin: 0; font-size: inherit; font-weight: inherit; color: inherit; letter-spacing: inherit; }
.today-stand { font-size: var(--fs-xs); color: var(--text-3); }

.need { margin: 0 0 40px; }
.need-h { margin: 0 0 4px; font-size: var(--fs-l); }
.need-n { margin-left: 6px; font-size: var(--fs-s); font-weight: 600; color: var(--text-2); }
.need-list { list-style: none; margin: 0; padding: 0; }
.need-item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 2px 16px; align-items: center;
  padding: 13px 0; border-top: 1px solid var(--line); }
.need-item:first-child { border-top: 0; }
.need-item .chip { justify-self: start; }
.need-title { font-weight: 650; }
.need-why { grid-column: 2; color: var(--text-2); font-size: var(--fs-s); }
.need-none { margin: 0; color: var(--text-2); max-width: none; }
@media (max-width: 620px) { .need-item { grid-template-columns: minmax(0, 1fr) auto; } .need-item .chip { grid-column: 1 / -1; }
  .need-why { grid-column: 1 / -1; } }

.today .channel-head h2 { font-size: var(--fs-l); }
.today .rows { gap: 0; }
.today .card { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 8px 0; }
.today .rows > .card:first-of-type, .today .q-rows > .card:first-child { border-top: 0; }
.today .card:hover, .today .card:has(> details.more[open]) { background: none; }
.today .card.is-error { border-color: var(--line); }
.today .card .thumb { border-radius: 6px; }
.today .slot-free { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding-left: 0; }
.today .q-divider { margin-top: 14px; padding-top: 0; border-top: 0; font-size: var(--fs-s); color: var(--text-2); }
.today .q-divider-h { color: var(--text); font-weight: 700; font-size: var(--fs-m); }
.today .sens { border-left: 0; padding-left: 0; color: var(--attention-text); font-weight: 600; }
.today .card .answer, .today .answer { border: 0; background: var(--surface); }
.today .early { border: 0; background: var(--surface); }
.today .section { margin-top: 28px; }
.today .section:first-of-type { margin-top: 8px; }
.today .section-head h3 { font-size: var(--fs-m); font-weight: 700; color: var(--text); }
.today .discard summary { border: 0; background: var(--surface); }
.round { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.round-live { border: 0; background: var(--surface); }
.trial-live { border: 0; background: var(--attention); color: var(--attention-ink); }
.today .dnd-ghost { background: var(--surface) !important; }
.today .order-rail .order-btn:hover:not([disabled]) { background: var(--surface); }
.hpop, .today .hpop { box-shadow: 0 12px 32px var(--shade); }
.today .card .sens { grid-column: 3 / -1; margin: 2px 0 4px; font-size: var(--fs-s); overflow-wrap: anywhere; }
.today .card .sens-auto { color: var(--text-3); font-weight: 500; }
.today .card.q-row .q-lock { color: var(--text-2); font-weight: 500; }
.btn, a.btn { text-decoration: none; }

/* ------------------------------------------------------------------ Kommentare */
.k-reiter, .k-filter nav { background: var(--surface); border: 0; }
.k-reiter .reiter.aktiv, .k-chip.aktiv { background: var(--bg); box-shadow: none; font-weight: 700; }
.k-reiter .reiter:hover, .k-chip:hover { background: transparent; }
.k-seiten .k-chip { border: 0; background: var(--surface); }

.k-abschnitt-kauf { border-left: 0; padding-left: 0; }
.k-faden > .kommentar.ist-antwort, .kommentar.ist-antwort { border-left: 0; }
.kommentar button.zweit, .kommentar button.neben, .kommentar button.vorschlag-knopf,
.sammeln button.neben { border: 0; background: var(--surface); }
.sammeln { margin: 0 0 34px; }
.sammel-gruppe, .sammel-weitere { border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.sammel-gruppe > summary:hover, .sammel-weitere > summary:hover { background: transparent; }
.k-live { border: 0; background: var(--surface); }

/* ------------------------------------------------------------------ Vorrat */
.stock-list { border: 0; border-radius: 0; background: none; }
.stock-menu-pop { box-shadow: 0 8px 24px var(--shade); }
.stock-item .discard summary { border: 0; background: color-mix(in srgb, var(--down) 10%, transparent); }

/* ------------------------------------------------------------------ Fabrik: Läufe, Strategie */
.st-answer { padding: 0; background: none; border: 0; }
.st-more { padding: 14px 0; background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.st-acts-body, .st-mix { border: 0; background: var(--surface); }
.lf-story { padding: 0; background: none; }
.lf-top { margin-bottom: 34px; }

/* ------------------------------------------------------------------ System, Einstellungen, Archivieren */
.job-error { border: 0; }
.job-error.is-note { background: var(--surface); }
pre.joblog, .buildlog { background: var(--surface); border: 0; color: var(--text); }
.settings fieldset { border: 0; padding: 0; margin: 0 0 34px; }
.settings legend { padding: 0; font-size: var(--fs-l); font-weight: 700; }
.settings input, .settings select, .settings textarea { background: var(--bg); color-scheme: inherit; }
.ar-anleitung { padding: 0 0 0 20px; background: none; border: 0; }
.ar-erledigt-box { border: 0; }

/* ------------------------------------------------------------------ Zahlen: Reels, Konkurrenz, Musik */
.seg { border: 0; background: var(--surface); padding: 2px; border-radius: 9px; }
.seg a { border-radius: 7px; }
.seg a:hover { background: transparent; }
.seg a.is-active { background: var(--bg); box-shadow: none; }

.pop { box-shadow: 0 8px 24px var(--shade); }

/* ------------------------------------------------------------------ Allgemeine Hinweise, Chat, Werkbank */
.error, .htmx-error, .answer { border: 0; background: var(--surface); }
.error, .htmx-error { background: color-mix(in srgb, var(--down) 10%, transparent); }
.discard summary { border: 0; background: var(--surface); }
.chat-list a[aria-current="page"] { border-left: 0; background: var(--surface); font-weight: 700; }
.msg-error, .msg-limit, .wb-job, .wb-warnings, .storyboard .scene.warn { border: 0; }
.login h1 { font-size: var(--fs-xl); }
.st .st-answer, .st-answers .st-answer { padding: 0; background: none; border: 0; border-radius: 0; }
.st-answers { gap: 12px 40px; }
.kommentar, .kommentar.kauf, .kommentar.k-wichtig-frage, .kommentar.k-wichtig-korrektur, .kommentar.k-wichtig-familie { box-shadow: none; }

/* Lesbarkeit (30.11.): Status-Chips der Terminzeilen umbrechen statt abschneiden. */
.today .card:not(.q-row) .status { flex-wrap: wrap; row-gap: 3px; overflow: visible; }

/* ------------------------------------------------------------------ Raster und Trennlinien (30.11. abends)
   Evgeny: volle Breite auf großen Bildschirmen, Trennlinien zurück, Elemente sauber eingeordnet. Weiter keine
   Kästen: Linien trennen Leiste | Inhalt, Seitenkopf, Abschnitte und Spalten. */

.zn > h1 { margin-bottom: 16px; }

main h2:not(.alarms-h) { padding-bottom: 8px; border-bottom: 1px solid var(--line-strong); }
.today .channel-head h2, .need-h { padding-bottom: 0; border-bottom: 0; }
.today .channel-head, .need-h { padding-bottom: 8px; border-bottom: 1px solid var(--line-strong); }
.need-h { margin-bottom: 0; }

.today .section-head, .today .q-divider { padding-bottom: 6px; border-bottom: 1px solid var(--line); }
/* Spalten DE | COM: senkrechte Linie in der Mitte der Lücke */

/* Tabellen: Kopfzeile kräftig abgesetzt, Zeilen fein, volle Breite */
.tbl, .zn-tbl { width: 100%; max-width: none; }
.tbl th, .zn-tbl th { border-bottom: 1px solid var(--line-strong); }
.tbl td, .zn-tbl td { border-bottom: 1px solid var(--line); }
/* Einstellungen: volle Breite, Formular | Seitenspalte mit Linie, Aktionen nebeneinander, Feldgruppen durch Linie getrennt */
.set-layout { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }

.settings fieldset { padding-top: 14px; margin-bottom: 20px; }
.offers { grid-template-columns: repeat(auto-fill, minmax(min(100%, 560px), 1fr)); gap: 0 clamp(16px, 2vw, 36px); }
main > .error, main > .answer, .set-main > .error { margin-bottom: 22px; }

@media (max-width: 899px) { .set-layout { grid-template-columns: minmax(0, 1fr); }
   }
/* Lesbarkeit dunkel: Markenwort und Links in Senf-Chips */

.chip-attn a { color: inherit; }
.cx-foot a { color: var(--link); }
/* Zeitleiste (30.11. abends wieder da): ohne Kasten, nur Linie darunter */
.tl { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; margin: 10px 0 6px; padding-bottom: 6px; }
.tl-mark .m-dot { stroke: var(--bg); }

/* ================================================================== Layout wie der Shop-Admin (30.11. abends)
   Evgeny (Screenshot Shop-Admin): dunkle Leiste mit Siegel und Wortmarke, Inhalt über die volle Breite,
   Abschnitte als weiße Karten mit feinem Rand auf Creme. Ersetzt „keine Kästen“ vom Vormittag. */

/* ---- Navigation (seit 01.12., Evgeny: Menü wieder nach links): ab 900 px dunkle Seitenleiste mit Siegel und Wortmarke,
   darunter dieselbe Leiste als Kopfzeile. Raster und Grundmaße stehen in ui.css (.shell, .rail), hier nur das Aussehen. */
.rail { background: var(--bar); color: var(--bar-ink); border: 0; }
.rail-brand { color: var(--bar-ink); white-space: nowrap; }
.rail-seal { display: block; border-radius: 50%; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); }
.rail-word { font-family: var(--font-mark, inherit); font-weight: 700; letter-spacing: 0; }
.rail-brand b, html[data-theme="dark"] .rail-brand b { color: var(--attention); }
.rail-sub { font-size: 13px; font-weight: 600; color: color-mix(in srgb, var(--bar-ink) 70%, transparent); }
.rail-link { color: color-mix(in srgb, var(--bar-ink) 78%, transparent); }
.rail-link:hover { color: var(--bar-ink); }
.rail-link.is-active, .rail-chat[aria-expanded="true"] { background: color-mix(in srgb, var(--bar-ink) 14%, transparent); color: var(--bar-ink); }
.rail-search { background: color-mix(in srgb, var(--bar-ink) 9%, transparent); color: color-mix(in srgb, var(--bar-ink) 78%, transparent); }
.rail-search:hover { color: var(--bar-ink); }
.rail-kbd { color: inherit; border-color: color-mix(in srgb, var(--bar-ink) 30%, transparent); background: none; }
.rail-sys { color: color-mix(in srgb, var(--bar-ink) 62%, transparent); }
.rail .icon-btn { color: color-mix(in srgb, var(--bar-ink) 78%, transparent); }
.rail .icon-btn:hover { background: color-mix(in srgb, var(--bar-ink) 14%, transparent); color: var(--bar-ink); }
.rail .push-toggle[aria-pressed="true"] { color: var(--attention); }
.chat-panel { background: var(--card); border-left: 1px solid var(--card-line); }
.shell > main { padding: 28px clamp(16px, 2vw, 40px) 64px; }
@media (min-width: 900px) {
  .rail { padding: 18px 12px 14px; overflow-y: auto; }
  .rail-brand { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; padding: 0 6px 18px; }
  .rail-seal { grid-row: 1 / 3; width: 42px; height: 42px; }
  .rail-word { align-self: end; font-size: 20px; line-height: 1.15; }
  .rail-sub { align-self: start; }
  .rail-link { padding: 9px 10px; }
}
@media (max-width: 899px) {
  .shell, .shell.chat-open { grid-template-rows: auto 1fr; }
  .rail { z-index: 30; padding: 6px 10px; gap: 6px; }
  .rail-brand { display: flex; align-items: center; gap: 8px; padding: 0; margin-right: 6px; }
  .rail-seal { width: 34px; height: 34px; } .rail-word { font-size: 18px; } .rail-sub { display: none; }
  .rail-search { order: 5; background: none; } .rail-search .rail-label { display: none; }
  .rail-foot { order: 6; }
  .rail-link { padding: 7px 9px; }
  .chat-panel { top: 0; height: 100vh; }
}
@media (max-width: 620px) { .rail-word { display: none; } }
/* Handy: zwei Zeilen statt unsichtbarem seitlichem Scrollen – oben Siegel, Suche, Chat, Thema, Abmelden; darunter die
   Bereiche. Trefferflächen mindestens 44 px. */
@media (max-width: 520px) {
  .rail { flex-wrap: wrap; overflow-x: visible; row-gap: 2px; }
  .rail-search { order: 2; margin-left: auto; }
  .rail-foot { order: 3; margin-left: 0; }
  .rail-nav { order: 10; flex: 1 0 100%; flex-wrap: wrap; justify-content: space-between; }
  .rail-link { min-width: 44px; min-height: 44px; justify-content: center; }
  .rail .icon-btn { width: 44px; height: 44px; }
  /* seit 02.12.: beim Scrollen bleibt nur die Zeile mit den Bereichen stehen (die obere, 52 px, wandert aus dem Bild);
     der Zähler sitzt als kleine Marke an der Ecke des Symbols, damit die Zeile nicht in eine dritte umbricht */
  .rail { top: -52px; padding-inline: 6px; }
  .rail-nav { gap: 0; }
  .rail-link { position: relative; }
  #diff, .today .section-trial, #inhalt, #alarme { scroll-margin-top: 66px; }  /* unter der klebenden Zeile (~54 px) */
  /* jeder Bereich trägt seinen Namen unter dem Symbol (vorher nur der aktive – Sonne und Zahnrad sahen gleich aus);
     der Zähler sitzt an der oberen Ecke des Symbols und überdeckt den Namen nicht mehr */
  .rail-nav .rail-link { flex-direction: column; gap: 2px; padding: 5px 4px 4px; min-height: 48px; }
  .rail-nav .rail-label, .rail-nav .rail-link.is-active .rail-label { display: block; flex: none; font-size: 10.5px; line-height: 1.15; font-weight: 600; }
  .rail-link .badge { position: absolute; top: 2px; left: calc(50% + 5px); min-width: 18px; padding: 0 4px; font-size: 11px; line-height: 16px; }
}

/* sehr schmal (< 360 px): sechs Namen passen nicht in eine Zeile – dann wieder nur der aktive Bereich mit Namen */
@media (max-width: 359px) {
  .rail-nav .rail-label { display: none; }
  .rail-nav .rail-link.is-active .rail-label { display: block; }
}

/* ---- Seitenkopf: keine Linie mehr, die Karten gliedern */
.page-head, .shell main > h1, .zn > h1 { padding-bottom: 0; border-bottom: 0; }
.subtabs { margin: -8px 0 18px -10px; padding-bottom: 0; border-bottom: 0; }
.subtabs a.is-active { background: var(--card); box-shadow: inset 0 0 0 1px var(--card-line); }

/* ---- Karten */
.need, .today .channels > *, .stock-col, .panel, .cx-group, .st-top, details.st-more, .zn-mixes, .kommentar, main > .tbl-wrap, .rr-wrap, .sammeln, #jobs, .settings > .set-section,
.today-extra > details {
  background: var(--card); border: 1px solid var(--card-line); border-radius: 12px; padding: 18px 20px; min-width: 0; }
.lf-card.panel, .kk-card, .kk-chain { padding: 18px 20px; background: var(--card); border: 1px solid var(--card-line); }
details.st-more { margin: 0 0 12px; padding: 14px 20px; border-top: 1px solid var(--card-line); }
.need { margin-bottom: 20px; }
.need-list { border-bottom: 0; }
.need-item:last-child { padding-bottom: 2px; }
main h2:not(.alarms-h), .today .channel-head, .need-h { border-bottom-color: var(--line); }
/* Spalten: Karten nebeneinander statt Linie dazwischen */
.today .channels, .stock-cols { gap: 20px; }
.today .channels > *, .today .channels > * + *, .stock-cols > *, .stock-cols > * + * { padding: 18px 20px; border-left: 1px solid var(--card-line); }
.today .section:last-child { margin-bottom: 0; }
.today-extra { margin-top: 20px; }
/* Verbindungen, Strategie, Läufe, Einstellungen */
.cx-group { margin-bottom: 20px; }
.cx-group > h2:first-child, .st-top > h2:first-child, .panel > h2:first-child { margin-top: 0; }
.st-top { margin-bottom: 20px; }
.lf-top { gap: 20px; }
.set-layout { gap: 20px; }
.set-main, .set-side { padding: 0; border: 0; }
.settings fieldset { border-top: 1px solid var(--line); }
/* Kommentare: Karten statt Linien */
.kommentar, .kommentar.kauf, .kommentar.verbergen { border: 1px solid var(--card-line); border-radius: 12px; padding: 14px 16px; }
.k-faden > .kommentar.ist-antwort, .kommentar.ist-antwort { margin-left: 0; }
.sammeln { margin-bottom: 20px; padding: 18px 20px; }
/* Eingaben und leise Flächen auf Weiß */
.card-more, .today .card .answer { background: none; }
.hpop, .today .hpop, .pop, .stock-menu-pop { background: var(--card); border: 1px solid var(--card-line); }
.today-extra { grid-template-columns: minmax(0, 1fr); }
.zn-mix, .zn-h2 + .zn-mix { background: var(--card); border: 1px solid var(--card-line); border-radius: 12px; padding: 14px 20px; margin-bottom: 12px; }
.settings fieldset { background: none; }
.set-submit { background: var(--card); }
.panel .panel, .st-top .panel, .cx-group .panel { background: none; border: 0; border-radius: 0; padding: 0; }
.k-raster { align-items: stretch; }
/* Karten einer Reihe gleich hoch: der freie Platz liegt unter dem Kommentartext, Antwortfeld und Knöpfe stehen unten */
/* (Raster der offenen Karte samt Fußzeile steht seit 01.12. vollständig in comments.css) */
.today .card:not(.q-row) .status .when { white-space: normal; overflow-wrap: anywhere; min-width: 0; }

/* ---- Vorrat auf „Heute“ + Entfernen (30.11.) */
.row-remove { width: 30px; height: 30px; color: var(--text-3); }
@media (max-width: 899px), (pointer: coarse) { .row-remove { width: 44px; height: 44px; } }
.row-remove:hover { background: color-mix(in srgb, var(--down) 12%, transparent); color: var(--down); }
.today .card.q-row .q-remove { grid-column: 4; grid-row: 1 / 3; justify-self: end; align-self: center; position: relative; z-index: 2; }
.q-remove > summary { list-style: none; cursor: pointer; }
.q-remove > summary::-webkit-details-marker { display: none; }
.q-remove .confirm { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; display: grid; gap: 8px; width: max-content;
  max-width: min(300px, 80vw); padding: 12px 14px; background: var(--card); border: 1px solid var(--card-line); border-radius: 10px;
  box-shadow: 0 12px 32px var(--shade); font-size: var(--fs-s); }
.q-remove .confirm form { margin: 0; }
.q-trial { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.q-trial-list { margin: 8px 0 0; padding-left: 18px; columns: 2; column-gap: 28px; font-size: var(--fs-s); }
.q-trial-list li { break-inside: avoid; padding: 2px 0; }
.today .card:not(.q-row) { grid-template-rows: minmax(28px, auto) minmax(28px, auto); }
