/* Werko Office Web – Anpassungen für Telefon und Tablet (nur in der Web-Version eingebunden) */
html.werko-web, html.werko-web body { -webkit-text-size-adjust: 100%; }
html.werko-web body { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
@media (max-width: 760px) {
  /* Startseite: Seitenleiste oben als Leiste */
  html.werko-web body:has(nav.seite) { flex-direction: column; height: auto; min-height: 100vh; overflow: auto; }
  html.werko-web .seite { width: auto !important; flex-direction: row !important; flex-wrap: wrap; align-items: center; gap: 4px !important; padding: 10px 12px !important; }
  html.werko-web .seite .marke { margin: 0 auto 0 0 !important; font-size: 16px !important; }
  html.werko-web .seite > button[data-tat="start"], html.werko-web .seite .andere { display: none !important; }
  html.werko-web .seite .fuss { width: 100%; margin-top: 6px !important; display: flex; align-items: center; gap: 10px; }
  html.werko-web .seite .fuss #kontoFeld { flex: 1; margin: 0 !important; }
  html.werko-web main { padding: 16px 14px !important; overflow: visible !important; }
  html.werko-web .neu { grid-template-columns: 1fr 1fr !important; }
  html.werko-web .vorlagen { grid-template-columns: repeat(2, 1fr) !important; }
  html.werko-web .vorlage .bild { height: 110px !important; }
  html.werko-web .zuletzt .pfad, html.werko-web .zuletzt .zeit { display: none; }
  /* Editoren: Kopfzeile kompakt */
  html.werko-web .xl-titlebar .xl-text, html.werko-web .kopf .t, html.werko-web #woSpeichernUnter, html.werko-web .wo-datei small, html.werko-web .datei small, html.werko-web #xlPivotKnopf, html.werko-web .status, html.werko-web .xl-status { display: none !important; }
  html.werko-web .kk, html.werko-web .xl-titlebar .xl-knopf { padding: 0 9px !important; }
  html.werko-web .leiste { overflow-x: auto; }
  html.werko-web .layout { width: 100% !important; }
}
/* Größere Ziele für Finger */
@media (pointer: coarse) {
  html.werko-web .wk, html.werko-web .tb-k { min-width: 40px; min-height: 40px; }
  html.werko-web .mini { width: 96px; }
}
@media (max-width: 760px) {
  html.werko-web #xlDiagrammKnopf { display: none !important; }
  /* Text-Werkzeugleiste: eine Zeile, mit dem Finger seitlich wischen */
  html.werko-web #schToolbar { flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  html.werko-web #schToolbar .tb-gruppe { flex-wrap: nowrap !important; flex-shrink: 0; }
  html.werko-web #schToolbar .tb-trenner { flex-shrink: 0; }
}

/* Telefon: Tabellenmenü und Suche als eine waagrecht wischbare Zeile statt halber Bildschirm */
@media (max-width: 700px) {
  .tb-band .tb-tabellenmenue, .tb-band .tb-suche { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 4px 6px; gap: 6px; }
  .tb-band .tb-tabellenmenue::-webkit-scrollbar { display: none; }
  .tb-band .tb-tabellenmenue button { flex: 0 0 auto; white-space: nowrap; height: 30px; font-size: 12.5px; }
}

/* ───────── Telefon: Kopfzeile nur mit Symbolen, Menüband als eine wischbare Symbolzeile (wie Office-Apps) ───────── */
@media (max-width: 760px) {
  html.werko-web .kopf { height: 50px !important; gap: 4px !important; padding: 0 6px !important; }
  html.werko-web .kopf .kk { font-size: 0 !important; width: 38px; height: 36px; padding: 0 !important; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
  html.werko-web .kopf .kk svg { width: 20px !important; height: 20px !important; vertical-align: 0 !important; }
  html.werko-web .kopf .kk .ki-glanz { font-size: 17px; }
  html.werko-web .kopf .kk.vorf { font-size: 0 !important; } html.werko-web .kopf .kk.vorf::before { content: '▶'; font-size: 15px; }
  html.werko-web #woDrucken, html.werko-web #woPdf, html.werko-web #woLayoutKnopf, html.werko-web #woSpeichernUnter { display: none !important; }
  html.werko-web .kopf .datei, html.werko-web .kopf .wo-datei { font-size: 15px !important; margin-left: 2px; }
  html.werko-web .kopf .kopf-sym, html.werko-web .kopf [data-icon="dokument"] { display: none !important; }
  html.werko-web .xl-titlebar { height: 50px !important; gap: 4px !important; padding: 0 6px !important; }
  html.werko-web .xl-titlebar .xl-knopf { width: 38px; height: 36px; padding: 0 !important; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
  html.werko-web .xl-titlebar .xl-knopf svg { width: 20px; height: 20px; vertical-align: 0; }
  html.werko-web #woKi .xl-text { display: inline !important; font-size: 0; } html.werko-web #woKi .ki-glanz { font-size: 17px; }
  html.werko-web #xlDruckKnopf { display: none !important; }
  html.werko-web .xl-titlebar > [data-icon] { display: none !important; }
  /* Reiter */
  html.werko-web .tb-band .band-reiter, html.werko-web .reiter { overflow-x: auto; scrollbar-width: none; padding: 2px 6px 0 !important; flex-wrap: nowrap; }
  html.werko-web .tb-band .band-reiter::-webkit-scrollbar, html.werko-web .reiter::-webkit-scrollbar { display: none; }
  html.werko-web .tb-band .band-reiter-k, html.werko-web .reiter button { flex-shrink: 0; padding: 7px 11px 6px !important; font-size: 13.5px !important; }
  /* Werko Text: Menüband */
  html.werko-web .leiste { zoom: 1 !important; }
  html.werko-web .tb-band .band-seite { min-height: 0 !important; padding: 5px 4px !important; align-items: center; scrollbar-width: none; }
  html.werko-web .tb-band .band-seite::-webkit-scrollbar { display: none; }
  html.werko-web .tb-band .bg { padding: 0 5px !important; flex-direction: row; }
  html.werko-web .tb-band .bg-titel, html.werko-web .tb-band .tb-stile { display: none !important; }
  html.werko-web .tb-band .bg-inhalt { gap: 2px; }
  html.werko-web .tb-band .bg-spalte { flex-direction: row !important; gap: 2px; align-items: center; }
  html.werko-web .tb-band .tb-gross { height: 40px !important; min-width: 40px !important; padding: 4px !important; font-size: 0 !important; gap: 0 !important; }
  html.werko-web .tb-band .tb-gross .tb-sym { width: 24px !important; height: 24px !important; }
  html.werko-web .tb-band .tb-mittel { height: 40px !important; min-width: 40px; padding: 4px !important; font-size: 0 !important; justify-content: center !important; }
  html.werko-web .tb-band .tb-mittel .tb-sym { width: 22px !important; height: 22px !important; }
  html.werko-web .tb-band .tb-k { min-width: 38px; height: 40px; }
  html.werko-web .tb-band .tb-font { width: 112px; }
  /* Werko PDF und Werko Show: Menüband */
  html.werko-web .leiste:not(#toolbarRow) { padding: 5px 4px !important; min-height: 0 !important; align-items: center; flex-wrap: nowrap; scrollbar-width: none; }
  html.werko-web .leiste::-webkit-scrollbar { display: none; }
  html.werko-web .leiste .gruppe { padding: 0 5px !important; flex-shrink: 0; }
  html.werko-web .leiste .gruppe::after { display: none !important; }
  html.werko-web .leiste .spalte { flex-direction: row !important; align-items: center; gap: 2px; }
  html.werko-web .leiste .wk.gross { height: 40px !important; min-width: 40px !important; padding: 4px !important; }
  html.werko-web .leiste .wk.gross img { width: 24px !important; height: 24px !important; }
  html.werko-web .leiste .wk > span, html.werko-web .leiste .farbwahl > span, html.werko-web .leiste .zoomwert { display: none !important; }
  html.werko-web .leiste .wk { min-width: 38px; height: 40px; }
  html.werko-web .leiste .wk img { width: 22px; height: 22px; }
  html.werko-web .leiste .themen .thema { width: 64px; height: 38px; } html.werko-web .leiste .thema b { font-size: 12px; top: 4px; } html.werko-web .leiste .thema i { bottom: 4px; }
}
