/* © 2026 Martin Scherer · Fachwerte (https://www.fachwerte.de) · Alle Rechte vorbehalten.
   Trockenbauwand-Rechner — Original: https://www.fachwerte.de/tools/trockenbauwand/ · Kennung FWTB-2026-09-06 */

.tb-intro { max-width: 60rem; margin: 0 auto; padding: 1.5rem 1rem 0; }
@media (min-width: 40rem) { .tb-intro { padding-left: 1.5rem; padding-right: 1.5rem; } }
.tb-intro h1 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); line-height: 1.2; margin: 0 0 .6rem; font-weight: 400; }
.tb-intro h1 strong { font-weight: 700; }
.tb-intro p { max-width: 68ch; line-height: 1.65; color: var(--fw-text-2); margin: 0; }

.tb-app [hidden], .tb-seo [hidden], dialog.tb-dialog [hidden] { display: none !important; }
.tb-app { max-width: 92rem; margin: 1.25rem auto 0; padding: 0 1rem; font-family: var(--fw-font); }
@media (min-width: 40rem) { .tb-app { padding: 0 1.5rem; } }
.tb-kasten { border: 1px solid var(--fw-border); border-radius: var(--fw-radius-lg); background: var(--fw-bg); overflow: hidden; }

.tb-bar { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: .6rem .8rem; border-bottom: 1px solid var(--fw-border); background: var(--fw-surface); }
.tb-bar-spacer { flex: 1 1 auto; }
.tb-projekt { flex: 1 1 14rem; min-width: 10rem; }

.tb-btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 2.2rem; padding: .35rem .7rem;
          border: 1px solid var(--fw-border-str); border-radius: var(--fw-radius-lg); background: var(--fw-bg); color: var(--fw-text);
          font: inherit; font-size: .84rem; font-weight: 500; cursor: pointer; }
.tb-btn:hover { border-color: var(--fw-accent); }
.tb-btn--primary { background: var(--fw-accent); border-color: var(--fw-accent); color: #fff; }
.tb-btn--quiet { border-color: transparent; background: transparent; color: var(--fw-text-2); }
.tb-btn[aria-pressed="true"] { background: var(--fw-accent-sf); border-color: var(--fw-accent); color: var(--fw-accent); }
.tb-btn--3d[aria-pressed="true"] { background: #1f1f1d; border-color: #1f1f1d; color: #fff; }
.tb-btn:disabled { opacity: .5; cursor: default; }
.tb-btn--klein { min-height: 1.9rem; font-size: .78rem; padding: .25rem .55rem; }

.tb-input, .tb-select { font: inherit; font-size: .88rem; padding: .4rem .55rem; border: 1px solid var(--fw-border-str); border-radius: var(--fw-radius); background: var(--fw-bg); color: var(--fw-text); width: 100%; min-width: 0; }
.tb-input:focus, .tb-select:focus { outline: 2px solid var(--fw-accent); outline-offset: 1px; }

.tb-muster-hinweis { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; padding: .55rem .8rem; background: var(--fw-accent-sf); border-bottom: 1px solid var(--fw-border); font-size: .84rem; }

.tb-grid { display: grid; grid-template-columns: 21rem minmax(0, 1fr); height: clamp(30rem, 74vh, 48rem); }
@media (max-width: 60rem) {
    .tb-grid { grid-template-columns: minmax(0, 1fr); height: auto; }
    .tb-seite { max-height: none; border-top: 1px solid var(--fw-border); border-right: 0; }
    .tb-seite--links { order: 2; } .tb-mitte { order: 1; }
    .tb-app { padding: 0; }
    .tb-kasten { border-left: 0; border-right: 0; border-radius: 0; }
    .tb-bar .tb-projekt { flex-basis: 100%; }
}
.tb-seite { overflow: auto; min-height: 0; background: var(--fw-surface); }
.tb-seite--links { border-right: 1px solid var(--fw-border); }
.tb-seite-inhalt { padding: .7rem .8rem 1rem; }

.tb-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; margin: 0 0 .6rem; padding: .25rem; background: var(--fw-surface-2); border-radius: var(--fw-radius-lg); }
.tb-tabs--drei { grid-template-columns: 1fr 1fr 1fr; }
.tb-tab-kn { border: 1px solid transparent; border-radius: var(--fw-radius); padding: .45rem .3rem; background: transparent; font: inherit; font-size: .8rem; font-weight: 600; color: var(--fw-text-2); cursor: pointer; line-height: 1.25; }
.tb-tab-kn[aria-pressed="true"] { background: var(--fw-bg); border-color: var(--fw-border-str); color: var(--fw-text); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.tb-tab-kn small { display: block; font-weight: 400; font-size: .68rem; color: var(--fw-muted); }
.tb-block { margin: 0 0 .8rem; }
.tb-block > summary { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fw-muted); cursor: pointer; padding: .3rem 0; list-style: revert; }
.tb-block > h3 { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fw-muted); margin: .2rem 0 .5rem; }
.tb-feld { margin: 0 0 .5rem; }
.tb-feld label, .tb-lbl { display: block; font-size: .74rem; font-weight: 600; color: var(--fw-text-2); margin: 0 0 .2rem; }
.tb-lbl--check { display: flex; align-items: center; gap: .4rem; font-weight: 500; margin: .3rem 0 .5rem; cursor: pointer; }
.tb-lbl--check input { width: 1.05rem; height: 1.05rem; accent-color: var(--fw-accent); margin: 0; }
.tb-hinw { display: block; font-size: .72rem; color: var(--fw-muted); margin-top: .2rem; line-height: 1.4; }
.tb-zeile { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.tb-zeile > * { flex: 1 1 4rem; }
.tb-zeile > .tb-btn { flex: 0 0 auto; }
.tb-zwei { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.tb-drei { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .45rem; }
.tb-preise { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .45rem; }
/* Aussparungen der Decke: Zeilen mit Vorlage, Maß, Lage und Anzahl */
.tb-aus-zeile { border: 1px solid var(--fw-border); border-radius: var(--fw-radius); background: var(--fw-bg); padding: .4rem .45rem .1rem; margin: 0 0 .4rem; }
.tb-aus-zeile .tb-zeile > .tb-aus-nr { flex: 0 0 auto; font-size: .78rem; font-weight: 700; color: #c0392b; }
.tb-aus-felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(4.2rem, 1fr)); gap: 0 .45rem; margin-top: .4rem; }
.tb-aus-felder .tb-feld label { font-size: .68rem; }
.tb-aus-mark { color: #c0392b; white-space: nowrap; }
.tb-oeff-zeile .tb-zeile > .tb-oeff-nr { flex: 0 0 auto; font-size: .78rem; font-weight: 700; color: #1f5f9a; }
.tb-oeff-zeile .tb-aus-felder { grid-template-columns: repeat(auto-fit, minmax(5.4rem, 1fr)); }

.tb-mitte { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.tb-tools { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; padding: .45rem .6rem; border-bottom: 1px solid var(--fw-border); background: var(--fw-bg); font-size: .8rem; }
.tb-ansichten { display: flex; flex-wrap: wrap; gap: .3rem; }
.tb-tools .tb-lbl--check { margin: 0; font-size: .76rem; }
.tb-tools .tb-select { width: auto; font-size: .78rem; padding: .25rem .4rem; }
.tb-3d-hinweis { font-size: .72rem; color: var(--fw-muted); flex: 1 1 12rem; }
#tb-3d-optionen { flex: 1 1 auto; min-width: 0; }
#tb-3d-optionen > * { flex: 0 0 auto; }
@media (max-width: 60rem) { .tb-3d-hinweis { display: none; } .tb-tools { padding: .4rem .5rem; } }
.tb-leinwand-wrap { flex: 1 1 auto; min-height: 0; position: relative; background: #fff; touch-action: none; cursor: grab; }
.tb-leinwand-wrap.ist-ziel { cursor: pointer; }
.tb-leinwand-wrap.ist-schiebt { cursor: grabbing; }
@media (max-width: 60rem) { .tb-leinwand-wrap { min-height: 16rem; height: 46vh; } }
#tb-leinwand { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.tb-intro--unten { max-width: none; padding: 0 0 .5rem; margin: 0 0 1rem; }
.tb-intro--unten h1 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); }
@media (max-width: 60rem) { .tb-app { margin-top: .5rem; } }
.tb-status { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; padding: .45rem .7rem; border-top: 1px solid var(--fw-border); font-size: .8rem; color: var(--fw-text-2); background: var(--fw-surface); }
.tb-status strong { color: var(--fw-text); }
#tb-status { display: contents; }
.tb-status-link { margin-left: auto; color: var(--fw-accent); text-decoration: none; font-weight: 600; }
/* Infozeile zum angeklickten Bauteil (Treffertest in den 2D-Plänen) */
.tb-info { display: flex; align-items: center; gap: .45rem; padding: .4rem .7rem; border-top: 1px solid var(--fw-border); background: #fff5ec; font-size: .8rem; color: var(--fw-text); font-weight: 600; }
.tb-info::before { content: ''; flex: 0 0 auto; width: .6rem; height: .6rem; border-radius: 50%; background: #ff6a00; }
.tb-info[hidden] { display: none; }

.tb-tab { width: 100%; border-collapse: collapse; font-size: .84rem; }
.tb-tab th, .tb-tab td { text-align: left; padding: .35rem .5rem; border-bottom: 1px solid var(--fw-border); vertical-align: top; line-height: 1.45; }
.tb-tab thead th { font-weight: 600; color: var(--fw-muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; background: var(--fw-surface); }
.tb-tab .tb-r { text-align: right; white-space: nowrap; }
.tb-tab tr.tb-tab-gruppe td { font-weight: 700; background: var(--fw-surface); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--fw-text-2); }
.tb-tab tr.tb-tab-summe td { font-weight: 700; border-top: 2px solid var(--fw-text); }
.tb-tab tr.ist-optional td { color: var(--fw-muted); }
.tb-tab tr.ist-klick { cursor: pointer; }
.tb-tab tr.ist-klick:hover td { background: var(--fw-accent-sf); }
.tb-tab tr.ist-hervor td { background: #fdebd3; box-shadow: inset 3px 0 0 #e8842a; }
/* Die senkrechte Bauteil-Werkzeugleiste bringt ihr CSS selbst mit: assets/fw-vtools.js (.fw-vtools). */
@media print { .tb-tab tr.ist-hervor td { background: #fff; box-shadow: none; } }
.tb-tab-wrap { overflow-x: auto; }
.tb-muted { color: var(--fw-muted); font-size: .78rem; }
.tb-hinweis { font-size: .84rem; line-height: 1.55; padding: .55rem .75rem; border-radius: var(--fw-radius); background: var(--fw-accent-sf); margin: 0 0 .45rem; }
.tb-hinweis.ist-warn { background: #fff4e8; color: #7a3a0d; }

/* ─── Ergebnisblatt ─────────────────────────────────────────────────────── */
.tb-bericht { margin: 1.5rem auto 0; padding: 1.5rem clamp(1rem, 3vw, 2.25rem) 1.75rem; max-width: 60rem; background: var(--fw-bg); border: 1px solid var(--fw-border); border-radius: var(--fw-radius-lg); scroll-margin-top: 4.5rem; }
.tb-bericht h2 { font-size: 1.05rem; margin: 1.4rem 0 .5rem; }
.tb-bericht h3 { font-size: .9rem; margin: 1rem 0 .4rem; }
.tb-b-kopf { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; border-bottom: 2px solid var(--fw-text); padding-bottom: .6rem; }
.tb-b-kopf h2 { font-size: 1.3rem; margin: 0 0 .3rem; }
.tb-b-kopf p { margin: 0; font-size: .84rem; color: var(--fw-text-2); line-height: 1.5; }
.tb-b-meta { text-align: right; font-size: .78rem; color: var(--fw-muted); white-space: nowrap; line-height: 1.5; }
.tb-b-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .6rem; margin: 1rem 0 .5rem; }
@media (max-width: 40rem) { .tb-b-kacheln { grid-template-columns: 1fr 1fr; } }
.tb-kachel { padding: .7rem .85rem; border: 1px solid var(--fw-border); border-radius: var(--fw-radius-lg); background: var(--fw-surface); }
.tb-kachel.ist-warn { background: #fff4e8; border-color: #f0c9a0; }
.tb-kachel-l { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--fw-muted); }
.tb-kachel strong { display: block; font-size: 1.35rem; margin: .1rem 0; }
.tb-kachel-t { display: block; font-size: .76rem; color: var(--fw-text-2); }
.tb-b-plan { margin: 1rem 0 .5rem; }
.tb-b-plan canvas { display: block; width: 100%; height: auto; max-height: 60vh; object-fit: contain; border: 1px solid var(--fw-border); border-radius: var(--fw-radius); background: #fff; }
.tb-b-plan figcaption { font-size: .76rem; color: var(--fw-text-2); margin-top: .4rem; line-height: 1.5; }
.tb-b-lagen { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1rem; }
@media (max-width: 48rem) { .tb-b-lagen { grid-template-columns: 1fr; } .tb-b-kopf { flex-direction: column; } .tb-b-meta { text-align: left; } }
.tb-b-plan--klein { margin: .3rem 0; }
.tb-b-fuss { font-size: .76rem; color: var(--fw-muted); border-top: 1px solid var(--fw-border); padding-top: .6rem; margin: 1.5rem 0 0; line-height: 1.55; }

dialog.tb-dialog { border: 1px solid var(--fw-border); border-radius: var(--fw-radius-lg); padding: 1.1rem 1.3rem; max-width: 26rem; font-family: var(--fw-font); box-shadow: var(--fw-shadow); background: var(--fw-bg); color: var(--fw-text); }
dialog.tb-dialog::backdrop { background: rgba(0,0,0,.35); }
dialog.tb-dialog p { margin: 0 0 1rem; font-size: .9rem; line-height: 1.55; }
dialog.tb-dialog menu { display: flex; gap: .5rem; justify-content: flex-end; margin: 0; padding: 0; }

/* Touch */
.tb-app.ist-touch .tb-btn { min-height: 2.5rem; }
.tb-app.ist-touch .tb-btn--klein { min-height: 2.2rem; }
.tb-app.ist-touch .tb-input, .tb-app.ist-touch .tb-select { padding: .55rem .6rem; font-size: 1rem; }

/* Druck: nur das Ergebnisblatt */
@media print {
    body > *:not(main), main > *:not(.tb-app), .tb-app > *:not(.tb-bericht):not(.tb-druck-alle) { display: none !important; }
    .tb-app { max-width: none; margin: 0; padding: 0; }
    .tb-bericht { max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; color: #000; font-size: 10.5pt; }
    .tb-bericht h2 { font-size: 11.5pt; margin: .7rem 0 .3rem; }
    .tb-b-kopf h2 { font-size: 16pt; }
    .tb-b-kopf p, .tb-b-meta { font-size: 9pt; color: #333; }
    .tb-b-kacheln { grid-template-columns: repeat(4, 1fr); gap: .4rem; margin: .5rem 0; }
    .tb-b-kacheln:has(> :nth-child(5)) { grid-template-columns: repeat(5, 1fr); }
    .tb-kachel { padding: .4rem .6rem; border-color: #999; background: #fff; }
    .tb-kachel strong { font-size: 13pt; }
    .tb-kachel-t, .tb-kachel-l { font-size: 7.5pt; }
    .tb-b-plan { margin: .4rem 0; break-inside: avoid; }
    .tb-b-plan canvas { max-height: 110mm; border: 0; }
    .tb-b-lagen { grid-template-columns: 1fr 1fr; }
    .tb-b-lagen .tb-b-plan canvas { max-height: 70mm; }
    .tb-b-plan figcaption { font-size: 8pt; }
    .tb-tab { font-size: 9pt; }
    .tb-tab th, .tb-tab td { padding: .15rem .3rem; border-bottom: 1px solid #bbb; }
    .tb-tab thead th { background: #eee; color: #000; }
    .tb-tab tr.tb-tab-gruppe td { background: #eee; }
    .tb-tab tr { break-inside: avoid; }
    .tb-kachel.ist-warn, .tb-hinweis.ist-warn { background: #fff; }
    .tb-hinweis { background: #fff; border-left: 3px solid #999; border-radius: 0; padding: .2rem .5rem; font-size: 9pt; }
    .tb-b-fuss { font-size: 8pt; }
    @page { size: A4 portrait; margin: 12mm; }
}

/* ─── Aufklappbare Anleitung ───────────────────────────────────────────── */
.tb-anleitung { max-width: 60rem; margin: 1.5rem auto 0; background: var(--fw-bg); border: 1px solid var(--fw-border); border-radius: var(--fw-radius-lg); scroll-margin-top: 5.5rem; }
.tb-anleitung > summary { list-style: none; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "icon title chev" "icon sub chev"; column-gap: .75rem; align-items: center; padding: .85rem 1.1rem; cursor: pointer; border-radius: var(--fw-radius-lg); }
.tb-anleitung > summary::-webkit-details-marker { display: none; }
.tb-anleitung > summary:hover { background: var(--fw-surface); }
.tb-anleitung > summary:focus-visible { outline: 2px solid var(--fw-accent); outline-offset: 2px; }
.tb-anleitung .anl-icon { grid-area: icon; font-size: 1.35rem; }
.tb-anleitung .anl-title { grid-area: title; font-weight: 700; font-size: 1rem; color: var(--fw-accent); }
.tb-anleitung .anl-sub { grid-area: sub; font-size: .78rem; color: var(--fw-muted); line-height: 1.45; margin-top: .1rem; }
.tb-anleitung .anl-chevron { grid-area: chev; color: var(--fw-muted); font-size: 1.1rem; transition: transform .2s; }
.tb-anleitung[open] > summary { border-bottom: 1px solid var(--fw-border); border-radius: var(--fw-radius-lg) var(--fw-radius-lg) 0 0; }
.tb-anleitung[open] .anl-chevron { transform: rotate(180deg); }
.tb-anleitung .anl-body { padding: .4rem clamp(1rem, 3vw, 2.25rem) 1.75rem; }
.tb-anleitung .anl-lead { font-size: .95rem; line-height: 1.65; color: var(--fw-text-2); margin: .8rem 0 1rem; }
.tb-anleitung h3 { font-size: 1.08rem; margin: 1.9rem 0 .5rem; scroll-margin-top: 5.5rem; }
.tb-anleitung h4 { font-size: .95rem; margin: 1.2rem 0 .4rem; }
.tb-anleitung p, .tb-anleitung li { font-size: .9rem; line-height: 1.65; color: var(--fw-text-2); }
.tb-anleitung p { margin: 0 0 .7rem; }
.tb-anleitung ul, .tb-anleitung ol { margin: .3rem 0 .8rem; padding-left: 1.3rem; }
.tb-anleitung li { margin: 0 0 .35rem; }
.tb-anleitung li strong, .tb-anleitung p strong { color: var(--fw-text); }
.tb-anleitung a { color: var(--fw-accent); }
.tb-anleitung figure { margin: .9rem 0 1.1rem; }
.tb-anleitung figure img { width: 100%; height: auto; border: 1px solid var(--fw-border); border-radius: var(--fw-radius); background: #fff; }
.tb-anleitung figcaption { font-size: .78rem; color: var(--fw-muted); margin-top: .35rem; line-height: 1.5; }
.anl-kurz { display: grid; gap: .55rem; grid-template-columns: 1fr; margin: .5rem 0 .8rem; }
@media (min-width: 40rem) { .anl-kurz { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60rem) { .anl-kurz { grid-template-columns: repeat(4, 1fr); } }
.anl-kurz div { background: var(--fw-surface); border: 1px solid var(--fw-border); border-radius: var(--fw-radius-lg); padding: .7rem .85rem; font-size: .84rem; line-height: 1.5; color: var(--fw-text-2); }
.anl-kurz strong { display: block; color: var(--fw-accent); margin-bottom: .15rem; }
.anl-tabelle { overflow-x: auto; }
.anl-tabelle table { width: 100%; border-collapse: collapse; font-size: .85rem; margin: .4rem 0 1rem; }
.anl-tabelle th, .anl-tabelle td { text-align: left; padding: .4rem .55rem; border-bottom: 1px solid var(--fw-border); vertical-align: top; line-height: 1.5; }
.anl-tabelle th { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--fw-muted); background: var(--fw-surface); font-weight: 600; }
.anl-tabelle td:first-child { white-space: nowrap; font-weight: 600; color: var(--fw-text); }
@media (max-width: 48rem) { .anl-tabelle td:first-child { white-space: normal; } .tb-anleitung > summary { grid-template-columns: auto 1fr; grid-template-areas: "icon title" "icon sub"; } .tb-anleitung .anl-chevron { display: none; } }

/* SEO-Teil */
.tb-seo { max-width: 72ch; margin: 0 auto; padding: 2.5rem var(--fw-pad, 1.5rem) 4rem; }
.tb-seo h2 { font-size: 1.25rem; margin: 2.2rem 0 .7rem; }
.tb-seo h3 { font-size: 1rem; margin: 1.3rem 0 .4rem; }
.tb-seo p, .tb-seo li { line-height: 1.7; color: var(--fw-text-2); }
.tb-seo table { width: 100%; border-collapse: collapse; font-size: .86rem; margin: .6rem 0 1rem; }
.tb-seo th, .tb-seo td { padding: .5rem .65rem; border-bottom: 1px solid var(--fw-border); text-align: left; vertical-align: top; line-height: 1.5; }
.tb-seo th { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--fw-muted); font-weight: 500; background: var(--fw-surface); }
.tb-seo td { color: var(--fw-text-2); }
.tb-seo .tb-kurz { background: var(--fw-accent-sf); border-radius: var(--fw-radius-lg); padding: 1rem 1.25rem; margin: 1rem 0; }
.tb-seo .tb-kurz ul { margin: .3rem 0 0; padding-left: 1.2rem; }
.tb-seo .autor-box { margin: 2.5rem 0 0; background: var(--fw-surface); border: 1px solid var(--fw-border); border-radius: var(--fw-radius-lg); padding: 1.25rem 1.5rem; display: flex; gap: 1.2rem; align-items: flex-start; }
.tb-seo .autor-box img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.tb-seo .autor-box .ab-name { font-weight: 700; color: var(--fw-text); font-size: .95rem; }
.tb-seo .autor-box .ab-role { font-size: .78rem; color: var(--fw-accent); font-weight: 600; margin-bottom: .35rem; }
.tb-seo .autor-box p { font-size: .85rem; margin: 0; }
@media (max-width: 560px) { .tb-seo .autor-box { flex-direction: column; } }
.tb-seo .tb-weiter { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .7rem; padding: 0; margin: 1rem 0 0; list-style: none; }
.tb-seo .tb-weiter a { display: block; padding: .8rem 1rem; border: 1px solid var(--fw-border); border-radius: var(--fw-radius-lg); text-decoration: none; color: var(--fw-text); font-size: .88rem; font-weight: 600; }
.tb-seo .tb-weiter a:hover { border-color: var(--fw-accent); }
.tb-seo .tb-weiter span { display: block; font-size: .76rem; color: var(--fw-muted); margin-top: .2rem; font-weight: 400; }
.fw-prose details.fw-klapp { border-bottom: 1px solid var(--fw-border); }
.fw-prose details.fw-klapp:first-of-type { border-top: 1px solid var(--fw-border); }
.fw-klapp > summary { display: flex; align-items: center; gap: .6rem; padding: .7rem .1rem; cursor: pointer; list-style: none; }
.fw-klapp > summary::-webkit-details-marker { display: none; }
.fw-klapp > summary h3 { margin: 0; flex: 1 1 auto; font-size: .98rem; }
.fw-klapp-plus { width: 1.1rem; height: 1.1rem; position: relative; flex-shrink: 0; }
.fw-klapp-plus::before, .fw-klapp-plus::after { content: ''; position: absolute; background: var(--fw-accent); left: 50%; top: 50%; transform: translate(-50%, -50%); }
.fw-klapp-plus::before { width: 100%; height: 2px; } .fw-klapp-plus::after { width: 2px; height: 100%; transition: transform .15s; }
details[open] > summary .fw-klapp-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.fw-klapp-inhalt { padding: 0 .1rem .9rem; }

/* ─── Bauteil-Leiste (mehrere Bauteile je Projekt) ─────────────────────── */
.tb-bauteile { display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: center; padding: .45rem .8rem; border-bottom: 1px solid var(--fw-border); background: var(--fw-bg); }
.tb-bauteile .tb-projektname { flex: 0 1 14rem; min-width: 9rem; font-size: .84rem; padding: .3rem .5rem; }
.tb-chips { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; flex: 1 1 auto; }
.tb-chip { border: 1px solid var(--fw-border); background: var(--fw-surface); color: var(--fw-text); border-radius: 999px; padding: .28rem .75rem; font: inherit; font-size: .82rem; cursor: pointer; line-height: 1.2; }
.tb-chip:hover { border-color: var(--fw-accent); }
.tb-chip.ist-aktiv { background: var(--fw-accent); border-color: var(--fw-accent); color: #fff; font-weight: 600; }
.tb-chip--neu { border-style: dashed; color: var(--fw-accent); background: transparent; }
.tb-chip-spacer { flex: 1 1 auto; }
.tb-bericht .tb-tab tr.ist-aktiv td { font-weight: 600; }
.tb-b-projektzeile { margin: 0 0 .25rem !important; font-size: .78rem !important; color: var(--fw-muted) !important; text-transform: uppercase; letter-spacing: .05em; }
.tb-druck-alle { display: none; }
@media print {
  body.ist-druck-alle .tb-app > .tb-bericht#tb-bericht { display: none !important; }
  body.ist-druck-alle .tb-druck-alle { display: block; }
  .tb-app > .tb-druck-alle { display: block; }
  .tb-bericht--druck { break-before: page; page-break-before: always; max-width: none; margin: 0; padding: 0; border: 0; color: #000; font-size: 10.5pt; }
  .tb-bericht--druck:first-child { break-before: auto; page-break-before: auto; }
  #tb-b-projekt-sektion { break-before: page; page-break-before: always; }
}

/* Arbeitsfläche: klare Hierarchie, ruhige Flächen, gut erkennbare aktive Werkzeuge. */
@media screen {
  .tb-app { --fw-border: #dce3e9; --fw-border-str: #c8d2dc; --fw-surface: #f6f8fa; --fw-surface-2: #eaf0f5; --fw-text: #243342; --fw-text-2: #526273; --fw-muted: #667788; }
  .tb-kasten { border-radius: 16px; box-shadow: 0 12px 40px -18px #233b5650, 0 2px 6px #233b5608; }
  .tb-bar { padding: .8rem 1rem; gap: .45rem; background: #fff; }
  .tb-projekt { font-weight: 650; background: #f6f8fa; border-color: transparent; }
  .tb-btn { border-radius: 8px; min-height: 2.35rem; transition: background .15s, border-color .15s, box-shadow .15s; }
  .tb-btn:hover { background: #eef4f8; box-shadow: 0 2px 5px #233b5610; }
  .tb-btn--primary:hover { background: var(--fw-accent); filter: brightness(.94); }
  .tb-btn:focus-visible, .tb-tab-kn:focus-visible, .tb-block > summary:focus-visible { outline: 3px solid var(--fw-accent); outline-offset: 3px; }
  .tb-btn--3d[aria-pressed="true"] { background: #253e52; border-color: #253e52; box-shadow: 0 3px 7px #253e5230; }
  .tb-muster-hinweis { background: #f0f6fa; padding: .65rem 1rem; color: #486074; line-height: 1.5; }
  .tb-grid { grid-template-columns: 21.5rem minmax(0, 1fr); height: clamp(36rem, 77vh, 55rem); }
  .tb-seite { scrollbar-width: thin; scrollbar-color: #bdcad5 transparent; }
  .tb-seite-inhalt { padding: 1rem; }
  .tb-block { background: #fff; border: 1px solid #e1e7ed; border-radius: 10px; padding: .85rem; margin-bottom: .75rem; }
  .tb-block > h3 { color: #52687a; margin-bottom: .7rem; letter-spacing: .08em; }
  .tb-block > summary { color: #52687a; text-transform: none; letter-spacing: 0; font-size: .8rem; padding: .15rem 0; }
  .tb-block[open] > summary { margin-bottom: .7rem; }
  .tb-input, .tb-select { border-radius: 7px; min-height: 2.25rem; background: #fcfdfe; }
  .tb-feld { margin-bottom: .65rem; }
  .tb-feld label, .tb-lbl { line-height: 1.45; }
  .tb-tabs { border-radius: 9px; padding: .25rem; gap: .2rem; }
  .tb-tab-kn { border-radius: 6px; padding: .55rem .3rem; }
  .tb-tab-kn[aria-pressed="true"] { color: #244d6b; border-color: #d3dfe8; box-shadow: 0 2px 4px #20384c0d; }
  .tb-tools { padding: .75rem; gap: .65rem; background: #fff; }
  .tb-ansichten { gap: .25rem; padding: .25rem; border-radius: 10px; background: #f0f4f7; }
  .tb-ansichten .tb-btn { border-color: transparent; background: transparent; font-size: .76rem; }
  .tb-ansichten .tb-btn[aria-pressed="true"] { background: #fff; border-color: #d4dfe7; box-shadow: 0 2px 5px #24334212; }
  .tb-ansichten .tb-btn--3d[aria-pressed="true"] { background: #253e52; color: #fff; border-color: #253e52; }
  #tb-3d-optionen { gap: .65rem; }
  .tb-3d-hinweis { line-height: 1.5; font-size: .7rem; }
  .tb-status { background: #fff; padding: .7rem 1rem; font-size: .76rem; }
  .tb-status strong { font-variant-numeric: tabular-nums; }
  .tb-status-link { padding: .3rem .65rem; background: #eef4f8; border-radius: 6px; }
  .tb-bericht { border-radius: 14px; box-shadow: 0 6px 24px #233b5607; }
  .tb-kachel { background: #f7f9fb; border-radius: 10px; border-color: #e1e7ed; padding: .9rem; }
  .tb-kachel strong { color: #244d6b; font-variant-numeric: tabular-nums; }
}
@media screen and (max-width: 60rem) {
  .tb-grid { grid-template-columns: minmax(0, 1fr); height: auto; }
  .tb-kasten { border-radius: 0; }
  .tb-leinwand-wrap { min-height: 22rem; height: 50vh; }
  .tb-tools { padding: .5rem; }
  .tb-seite-inhalt { padding: .75rem; }
}
@media (prefers-reduced-motion: reduce) { .tb-btn { transition: none; } }
