/* quik Sites: Visuelle Sitemap (docs/BAUPLAN.md Abschnitt 31). Planer des Teams (public/js/sitemap.js), Gast-Seite des Kunden
   (public/js/gast-sitemap.js), gemeinsame Fläche (public/js/sitemap-flaeche.js). Farben nur über die Variablen aus app.css:
   weiße Karten mit feiner Linie, Blöcke farblos mit Symbol, je Karte ein Statussignal (Haken = abgestimmt). */

/* ---------------- Reiter „Sitemap“: Kacheln mit kleinem Bild des Baums ---------------- */
.sm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.sm-kachel { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg, 16px); overflow: hidden; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.sm-kachel:hover { border-color: var(--line-strong); box-shadow: var(--shadow-card, 0 6px 20px rgba(0, 0, 0, .06)); transform: translateY(-1px); }
.sm-kachel:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sm-kachel-b { position: relative; display: grid; place-items: center; height: 148px; padding: 18px 16px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line-soft); }
.sm-kachel-b .pill { position: absolute; left: 12px; top: 12px; }
.sm-kachel.is-wartet .sm-kachel-b { background: var(--accent-soft); }
.sm-kachel-t { display: flex; flex-direction: column; gap: 3px; padding: 12px 8px 12px 16px; min-width: 0; }
.sm-kachel-h { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sm-kachel-h b { flex: 1; min-width: 0; font-weight: 600; }
/* „⋯“ der Kachel erst beim Überfahren oder mit der Tastatur (Abschnitt 17); am Touch-Gerät immer */
@media (hover: hover) {
  .sm-kachel-h .row-more { opacity: 0; transition: opacity .12s; }
  .sm-kachel:hover .sm-kachel-h .row-more, .sm-kachel:focus-within .sm-kachel-h .row-more, .sm-kachel-h .row-more[aria-expanded="true"] { opacity: 1; }
}
.sm-kachel-m { font-size: var(--fs-sm); color: var(--ink-soft); padding-right: 8px; }
.sm-kachel-z { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; font-size: var(--fs-sm); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.sm-kachel-z span { display: inline-flex; align-items: center; gap: 5px; }
.sm-kachel-z .is-offen { color: var(--fg); font-weight: 600; }
.sm-mini { display: block; width: 100%; max-width: 100%; overflow: visible; }
.sm-mini-l { fill: none; stroke: var(--line-strong); stroke-width: 5; }
.sm-mini-k { fill: var(--surface); stroke: var(--line-strong); stroke-width: 4; }
.sm-mini-k.is-ok { fill: var(--surface-3); }
.sm-mini-t { fill: var(--line-strong); }

/* ---------------- Vorlagen (Dialog „Neue Sitemap“, „Vorlage anwenden“) ---------------- */
.sm-vl { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.sm-vl-o { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 10px 9px; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: center; transition: border-color .15s, background .15s; }
.sm-vl-o:hover { border-color: var(--line-strong); }
.sm-vl-o.on { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.sm-vl-o b { font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-vl-b { display: grid; place-items: center; height: 68px; border-radius: 8px; background: var(--surface-2); color: var(--ink-soft); padding: 6px; }

/* ---------------- Planer: Seite ---------------- */
.main:has(> .sm-page) { overflow: hidden; }
.sm-page { display: flex; flex-direction: column; height: 100%; min-height: 0; background: var(--bg); }
.sm-lade { flex: 1; display: grid; place-items: center; }
.sm-bar { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 16px 8px 10px; background: var(--surface); border-bottom: 1px solid var(--line-soft); flex: none; }
.sm-bar-t { display: flex; flex-direction: column; min-width: 60px; flex: 0 1 auto; line-height: 1.25; }
.sm-bar-t h1 { margin: 0; font-size: var(--fs-md); font-weight: 650; letter-spacing: -.01em; }
.sm-bar-t span { font-size: var(--fs-xs); color: var(--ink-faint); }
.sm-merker { flex: 1; min-width: 0; font-size: var(--fs-xs); color: var(--ink-faint); white-space: nowrap; overflow: hidden; }
.sm-bar-w { display: flex; align-items: center; gap: 2px; flex: none; }
.sm-bar-w .icon-btn:disabled { opacity: .35; pointer-events: none; }
.sm-trenn { width: 1px; height: 18px; margin: 0 6px; background: var(--line); }
.sm-zoom { min-width: 52px; height: var(--h-sm); padding: 0 6px; border-radius: 8px; font-size: var(--fs-xs); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.sm-zoom:hover { background: var(--hover); color: var(--fg); }
.sm-hin { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line-soft); font-size: var(--fs-sm); flex: none; }
.sm-hin[hidden] { display: none; }
.sm-hin > span:first-of-type { font-weight: 550; }
.sm-hin .btn { margin-left: auto; flex: none; }
.sm-hin.is-ok { background: var(--green-tint); color: var(--green-ink); }
.sm-hin-x { flex: 1; min-width: 0; color: var(--ink-soft); }
.sm-main { flex: 1; min-height: 0; display: flex; }

/* Auswahl der Blöcke: schwebende Leiste mit Symbolen links auf der Fläche (Name im Tooltip) */
.sm-main.is-schwebend { position: relative; }
.sm-pal { position: absolute; left: 12px; top: 12px; max-height: calc(100% - 24px); width: 88px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-card, 0 6px 20px rgba(0, 0, 0, .06)); z-index: 3; }
.sm-pal-h { display: flex; align-items: center; justify-content: space-between; padding: 9px 8px 5px 11px; font-size: var(--fs-xs); color: var(--ink-soft); flex: none; }
.sm-pal-l { overflow: auto; padding: 0 7px 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; scrollbar-width: none; }
.sm-pal-b { display: grid; place-items: center; height: 34px; border-radius: 9px; color: var(--ink-soft); cursor: grab; touch-action: none; user-select: none; }
.sm-pal-b:hover { background: var(--hover); color: var(--fg); }

/* Einzelheiten rechts */
.sm-insp { position: relative; flex: none; width: 304px; background: var(--surface); border-left: 1px solid var(--line-soft); overflow: auto; min-height: 0; }
.sm-insp[hidden] { display: none; }
.is-schwebend > .sm-insp { position: absolute; right: 12px; top: 12px; max-height: calc(100% - 24px); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-float, 0 12px 32px rgba(0, 0, 0, .1)); z-index: 3; }
.sm-insp-x { position: absolute; right: 10px; top: 14px; z-index: 1; }
.is-schwebend .sm-insp-h { padding-right: 30px; }
.sm-ub { position: relative; }
.sm-ub .smf-n { position: absolute; right: 0; top: 0; min-width: 16px; height: 16px; font-size: 10px; }
.sm-insp-in, .sm-insp-leer { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.modal .sm-insp-in { padding: 0; }
.sm-insp-h { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sm-insp-h .grow { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.sm-insp-h .grow span { font-size: var(--fs-xs); color: var(--ink-faint); }
.sm-insp-h > .smf-bi { width: 30px; height: 30px; border-radius: 9px; background: var(--surface-2); }
.sm-insp-a { display: flex; align-items: center; gap: 2px; margin: -6px -6px; padding: 0; }
.sm-insp-a .icon-btn { border: 0; }
.modal .sm-insp-a { margin: 0; }
.sm-insp .fld, .sm-insp-in .fld { margin: 0; }
/* Status füllt die Breite: beide Hälften gleich breit, auch im Dialog am Handy */
.sm-insp-in .fld > .seg { display: flex; }
.sm-insp-in .fld > .seg > button { flex: 1 1 0; justify-content: center; }
.sm-insp textarea { resize: vertical; min-height: 64px; }
.sm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: var(--fs-sm); min-height: 32px; }
.sm-seg { width: 100%; }
.sm-seg button { flex: 1; min-width: 0; }
.sm-vorschlag { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: 12px; font-size: var(--fs-sm); }
.sm-vorschlag > span { display: flex; align-items: center; gap: 8px; }
.sm-kz { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sm-kz div { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 12px 4px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.sm-kz b { font-size: var(--fs-xl, 20px); font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sm-kz span { font-size: var(--fs-xs); color: var(--ink-soft); white-space: nowrap; }
.sm-leer { margin: 0; padding: 18px 0; text-align: center; font-size: var(--fs-sm); color: var(--ink-faint); }

/* Kommentare */
.sm-k { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.sm-k-h { display: flex; align-items: center; gap: 7px; font-size: var(--fs-sm); color: var(--ink-soft); }
.sm-k-h b { font-weight: 600; color: var(--fg); }
.sm-k-l { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sm-k-i { display: block; width: 100%; padding: 9px 11px; border-radius: 12px; background: var(--surface-2); font-size: var(--fs-sm); text-align: left; }
.sm-k-i.is-team { background: var(--accent-soft); }
.sm-k-i.is-done { opacity: .6; }
.sm-k-i.is-link:hover { background: var(--hover); }
.sm-k-i p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sm-k-m { display: flex; align-items: center; gap: 6px; min-height: 22px; min-width: 0; }
.sm-k-m b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-k-m .icon-btn { flex: none; }
.sm-k-m > span { flex: 1 1 0; min-width: 0; font-size: var(--fs-xs); color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-k-ok { flex: none !important; color: var(--green-ink) !important; display: inline-flex; }
.sm-k-f { display: flex; align-items: flex-end; gap: 6px; }
.sm-k-f textarea { flex: 1; min-width: 0; min-height: 40px; resize: none; }
.sm-k-send { background: var(--fg); color: var(--on-fg); border-radius: 99px; }
.sm-k-send:hover { background: var(--fg-hover, var(--fg)); color: var(--on-fg); }

/* Abgleich, Kürzel, Abschluss */
.sm-ab ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; }
.sm-ab li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-sm); min-width: 0; }
.sm-ab li:last-child { border-bottom: 0; }
.sm-ab li b { font-weight: 550; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-ab li span { color: var(--ink-faint); flex: none; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-links { margin-right: auto; }
.sm-kuerzel { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; align-items: center; font-size: var(--fs-sm); }
.sm-kuerzel dd { margin: 0; color: var(--ink-soft); }
.sm-kuerzel kbd { display: inline-block; padding: 2px 8px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 7px; background: var(--surface-2); font: inherit; font-size: var(--fs-xs); white-space: nowrap; }
.sm-fertig { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 6px 0; }
.sm-fertig p { margin: 0; color: var(--ink-soft); }
.sm-fertig .sm-mini { max-width: 320px; }

/* ---------------- Fläche ---------------- */
.smf { position: relative; flex: 1; min-width: 0; min-height: 0; overflow: hidden; touch-action: none; cursor: default; outline: none; user-select: none; -webkit-user-select: none;
  background-color: var(--canvas-bg, var(--bg)); background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 22px 22px; }
/* Tastatur: die Fläche zeigt, dass sie den Fokus hat (Pfeiltasten, Entf) */
.smf:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.smf.is-greifen { cursor: grabbing; }
.smf-welt { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.smf-linien { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.smf-linien path { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }
.smf-karte { position: absolute; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, .04)); transition: border-color .12s, box-shadow .12s; }
.smf-karte:hover { border-color: var(--line-strong); }
.smf-karte.is-sel { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg), var(--shadow-card, 0 6px 20px rgba(0, 0, 0, .08)); }
.smf-karte.is-sel-in { border-color: var(--line-strong); }
.smf-karte.is-vorschlag { border-style: dashed; border-color: var(--line-strong); background: var(--surface-2); }
.smf-karte.is-zug { opacity: .35; }
.smf-kopf { display: flex; align-items: center; gap: 9px; height: 48px; padding: 0 10px 0 10px; min-width: 0; flex: none; }
.is-edit .smf-karte:not(.is-start) .smf-kopf { cursor: grab; }
.smf-st { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); color: var(--ink-soft); }
.is-ok > .smf-kopf .smf-st, .is-ok > .sml-kopf .smf-st { background: var(--green-tint); color: var(--green-ink); }
.is-start > .smf-kopf .smf-st { background: var(--fg); color: var(--on-fg); }
.smf-tt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.smf-titel { font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.smf-pfad { font-size: var(--fs-2xs, 11px); color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.smf-notiz { flex: none; display: inline-flex; color: var(--ink-faint); }
.smf-n { flex: none; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--fg); color: var(--on-fg); font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; }
.smf-bloecke { list-style: none; margin: 0; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line-soft); padding-top: 8px; }
.smf-block { display: flex; align-items: center; gap: 7px; height: 28px; padding: 0 7px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--surface-2); font-size: var(--fs-xs); min-width: 0; flex: none; position: relative; }
.is-edit .smf-block { cursor: grab; }
.smf-block:hover { border-color: var(--line-strong); }
.smf-block.is-sel { border-color: var(--fg); background: var(--surface); box-shadow: 0 0 0 1px var(--fg); }
.smf-block.is-zug { opacity: .35; }
.smf-bi { flex: none; display: inline-grid; place-items: center; color: var(--ink-soft); }
.smf-bn { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.smf-bdot { flex: none; width: 5px; height: 5px; border-radius: 99px; background: var(--ink-faint); }
.smf-plus { height: 26px; flex: none; }
.smf-plus button { display: flex; align-items: center; justify-content: center; gap: 5px; width: 100%; height: 26px; border: 1px dashed var(--line); border-radius: 8px; font-size: var(--fs-xs); color: var(--ink-faint); }
.smf-plus button:hover { border-color: var(--line-strong); color: var(--fg); background: var(--hover); }
.smf-inp { width: 100%; height: 22px; padding: 0 4px; margin: -1px -4px; border: 1px solid var(--fg); border-radius: 5px; background: var(--surface); font: inherit; color: inherit; outline: none; user-select: text; -webkit-user-select: text; }
/* Seite hinzufügen: Knöpfe erscheinen an der gewählten bzw. überfahrenen Karte */
.smf-add { position: absolute; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 99px; background: var(--fg); color: var(--on-fg); opacity: 0; transform: scale(.7); transition: opacity .12s, transform .12s; z-index: 2; }
.smf-add.u { left: 50%; bottom: -11px; margin-left: -11px; }
.smf-add.r { right: -11px; top: 13px; }
.smf-karte:hover .smf-add, .smf-karte.is-sel .smf-add, .smf-add:focus-visible { opacity: 1; transform: none; }
.is-ziehen .smf-add { display: none; }
/* Ziele beim Ziehen */
.smf-karte.is-ziel { border-color: var(--fg); box-shadow: 0 0 0 2px var(--fg); }
.smf-karte.is-ziel-vor::before, .smf-karte.is-ziel-nach::before { content: ""; position: absolute; background: var(--fg); border-radius: 99px; z-index: 3; }
.smf-karte[data-ebene="1"].is-ziel-vor::before { left: -15px; top: 0; bottom: 0; width: 3px; }
.smf-karte[data-ebene="1"].is-ziel-nach::before { right: -15px; top: 0; bottom: 0; width: 3px; }
.smf-karte:not([data-ebene="1"]).is-ziel-vor::before { left: 0; right: 0; top: -9px; height: 3px; }
.smf-karte:not([data-ebene="1"]).is-ziel-nach::before { left: 0; right: 0; bottom: -9px; height: 3px; }
.smf-block.is-ziel-vor::before, .smf-block.is-ziel-nach::before { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--fg); border-radius: 99px; }
.smf-block.is-ziel-vor::before { top: -4px; }
.smf-block.is-ziel-nach::before { bottom: -4px; }
.smf-geist { position: fixed; z-index: 4000; pointer-events: none; transform-origin: 0 0; opacity: .92; filter: drop-shadow(0 10px 24px rgba(var(--shadow-rgb), .18)); }
.smf-geist .smf-karte { position: static; }
.smf-geist .smf-block { width: 190px; background: var(--surface); border-color: var(--fg); }
.smf-geist.is-weg { opacity: .45; }
.smf-geist.is-weg .smf-block { border-style: dashed; text-decoration: line-through; }

/* ---------------- Liste (Handy, Druck) ---------------- */
.sm-liste { display: none; flex: 1; min-height: 0; overflow: auto; padding: 12px 12px 28px; }
.sml { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sml-z { margin-left: calc(var(--sml-e, 0) * 16px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.sml-z[data-e="1"] { --sml-e: 1; } .sml-z[data-e="2"] { --sml-e: 2; } .sml-z[data-e="3"] { --sml-e: 3; } .sml-z[data-e="4"] { --sml-e: 4; } .sml-z[data-e="5"] { --sml-e: 5; }
.sml-z.is-vorschlag { border-style: dashed; background: var(--surface-2); }
.sml-z.is-sel { border-color: var(--fg); }
.sml-kopf { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 50px; padding: 6px 12px 6px 10px; text-align: left; min-width: 0; }
.sml-notiz { margin: 0; padding: 0 12px 8px 45px; font-size: var(--fs-xs); color: var(--ink-soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.sml-bl { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 10px 10px; }
.sm-insp-in > .sml-bl { padding: 0; }
.sml-b { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; max-width: 100%; padding: 2px 9px 2px 7px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--surface-2); font-size: var(--fs-xs); font-weight: 500; }
.sml-b > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sml-b.is-sel { border-color: var(--fg); background: var(--surface); }
.sm-liste-neu { width: 100%; margin-top: 12px; }
.sm-druck { display: none; }

/* ---------------- Gast-Seite ---------------- */
.smg { height: 100vh; height: 100dvh; min-height: 0; }
.smg .sm-main { flex: 1; min-height: 0; }
.smg-f { position: relative; flex: 1; min-width: 0; min-height: 0; display: flex; }
.smg-zoom { position: absolute; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, .05)); }
.smg-acts { display: flex; align-items: center; gap: 8px; }
.smg-kurz { display: none; }
.smg-notiz { padding: 11px 12px; border-radius: 12px; background: var(--surface-2); font-size: var(--fs-sm); }
.smg-notiz span { display: block; font-size: var(--fs-xs); color: var(--ink-faint); margin-bottom: 2px; }
.smg-notiz p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.smg-s { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; counter-reset: smg; }
.smg-s li { display: flex; align-items: center; gap: 12px; padding: 8px 4px; font-size: var(--fs-sm); font-weight: 500; }
.smg-s-ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink, var(--fg)); }
/* Gast ohne Auswahl: Stand in einer Zeile, „So geht’s“ als Popover (gast-sitemap.js start) */
.smg-zahlen { margin: 0; font-size: var(--fs-sm); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.smg-zahlen b { color: var(--fg); font-weight: 650; }
.smg-so { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); }
.smg-s-pop { padding: 4px; }
.smg-s-pop .smg-s-ic { width: 30px; height: 30px; border-radius: 10px; }
.smg-ct { padding-top: 14px; border-top: 1px solid var(--line-soft); }
.smg-ct:empty { display: none; }
.smg-ok { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 99px; background: var(--green-tint); color: var(--green-ink); }
.smg .gast-foot { padding: 2px 20px 4px; }

/* ---------------- Schmal ---------------- */
@media (max-width: 980px) { .sm-insp { width: 272px; } .sm-merker { display: none; } .sm-bar-t { flex: 1; } }
@media (max-width: 760px) {
  .sm-main { display: none !important; }
  .sm-liste { display: block; }
  .sm-bar { gap: 6px; padding: 8px 10px 8px 6px; flex-wrap: nowrap; }
  .sm-bar .pill, .sm-bar-w .sm-zoom, .sm-bar-w .sm-trenn, .sm-bar-w .icon-btn:nth-last-child(-n+3) { display: none; }
  .sm-hin { padding: 8px 12px; align-items: flex-start; }
  .sm-hin > .ic, .sm-hin > svg { flex: none; margin-top: 2px; }
  .sm-hin > span:first-of-type { flex: 1; min-width: 0; }
  .sm-bar > .btn-primary { padding: 0; width: var(--h-md); justify-content: center; flex: none; }
  .sm-bar > .btn-primary span { display: none; }
  .sm-bar-t { flex: 1; }
  .sm-hin-x { display: none; }
  .smg-lang { display: none; }
  .smg-kurz { display: inline; }
  /* Seite des Kunden am Handy: Marke und Titel oben, die Aktionen beschriftet in einer eigenen Zeile */
  .smg .gast-top { flex-wrap: wrap; height: auto; min-height: 56px; padding-top: 10px; padding-bottom: 10px; row-gap: 10px; }
  .smg .gast-top-r { flex: 1 1 100%; }
  .smg .gast-top-r:has(.smg-acts:empty) { display: none; }
  .smg-acts { flex: 1; gap: 6px; justify-content: flex-end; }
  .smg-acts .btn { padding-left: 12px; padding-right: 12px; min-height: 40px; }
  .smg-acts .btn:first-child:not(.btn-primary) { margin-right: auto; }
  .sm-grid { grid-template-columns: 1fr; }
  /* Inhaltsblöcke sind am Handy Tippflächen */
  .sml-b { min-height: 36px; padding: 4px 11px 4px 9px; }
  .sml-bl { gap: 6px; }
}

/* ---------------- Druck: Titel und eingerückte Liste ---------------- */
@media print {
  .rail, .sb, .sidebar, .topbar, .sm-bar, .sm-hin, .sm-main, .sm-liste-neu, .gast-top, .gast-foot, #toasts, #layer { display: none !important; }
  html, body, #app, .app, .main, .sm-page, .smg { height: auto !important; overflow: visible !important; background: #fff !important; display: block !important; }
  .sm-druck { display: block; margin: 0 0 14px; }
  .sm-druck h1 { margin: 0; font-size: 20px; }
  .sm-druck p { margin: 2px 0 0; font-size: 12px; color: #555; }
  .sm-liste { display: block !important; overflow: visible; padding: 0; }
  .sml-z { break-inside: avoid; }
}

.smf-karte:focus { outline: none; }
