/* Tapstempel-App — Ergänzungen fürs Dashboard (siehe app-modus.js) */
.ts-app-box h4 { margin-bottom: 8px; }
.ts-app-hint { font-size: 13px; color: var(--muted, #827d75); margin: 0 0 12px; line-height: 1.5; }
.ts-code { font: 800 26px/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.12em; margin: 4px 0 12px; color: var(--ink, #111114); }
.ts-dev { list-style: none; margin: 0; padding: 0; }
.ts-dev li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line, #e4ded5); font-size: 13.5px; }
.ts-dev li:first-child { border-top: 0; }
.ts-dev li small { display: block; color: var(--muted, #827d75); font-size: 12px; margin-top: 2px; }
.ts-dev li .btn { font-size: 12px; padding: 7px 12px; flex: none; }
.ts-cur { font-style: normal; font-size: 11px; font-weight: 700; color: #0f8a55; background: #e6f5ee; border-radius: 999px; padding: 2px 8px; margin-left: 4px; }

/* ── Nur in der App ── */
/* Kein Abo-Abschluss und keine Preise in der App: alles in „Abo & Karten“ außer dem Status ausblenden,
   ebenso alle Knöpfe, die dorthin führen („Abo wählen“, „Mit Premium freischalten“ …) */
.in-app #p-billing > :not(#tsAppBilling) { display: none !important; }
.in-app [onclick*="goTo('billing')"] { display: none !important; }
.in-app #accessBanner { display: none !important; }
.in-app #installMenuBtn { display: none !important; }

/* Anmeldemaske in der App: „‹ Zurück“ zum App-Start */
.ts-auth-back { display: inline-block; margin: 0 0 14px; color: var(--muted, #827d75); font: 600 14px "DM Sans", system-ui, sans-serif; text-decoration: none; padding: 6px 0; }

/* Untere Leiste */
#tsTabs { display: none; }
.in-app #tsTabs {
  /* z-index 240: über dem Inhalt, aber UNTER „Mehr“-Menü (299/300) und Kartenvorschau (410/420) */
  display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 240;
  background: #fff; border-top: 1px solid var(--line, #e4ded5);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 18px rgba(17, 17, 20, 0.06);
}
.in-app #tsTabs button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: 0; padding: 4px 2px; font: 600 11px/1.2 "DM Sans", system-ui, sans-serif; color: var(--muted, #827d75); cursor: pointer;
}
.in-app #tsTabs button span { font-size: 19px; line-height: 1.2; }
.in-app #tsTabs button.on { color: var(--coral, #e5543d); }
.in-app #tsTabs button.ts-scan span {
  display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; margin-top: -20px;
  border-radius: 50%; background: var(--coral, #e5543d); color: #fff; font-size: 21px; box-shadow: 0 6px 16px rgba(229, 84, 61, 0.35);
}
.in-app #tsTabs button.ts-scan { color: var(--ink, #111114); }
/* Leiste nur im eingeloggten Dashboard, nicht auf der Anmeldeseite (per JavaScript: [hidden]) */
.in-app #tsTabs[hidden] { display: none; }
.in-app .dash-content { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important; }
.in-app body { -webkit-tap-highlight-color: transparent; }
/* Kein Zoom und kein Nachwippen: regelt /tapstempel-app/app-shell.js für alle App-Seiten */

/* Dashboard in der App bildschirmfüllend — kein „Webseiten-Rahmen“ mit Rand, Schatten und runden Ecken.
   overflow: clip statt hidden, damit die Logo-Leiste bzw. Seitenleiste oben stehen bleiben kann (sticky). */
.in-app .dash-layout { max-width: none; margin: 0; padding: 0; }
.in-app .dash-panel { border: 0; border-radius: 0; box-shadow: none; overflow: clip; min-height: 100vh;
  /* Zeilen oben bündig — sonst verteilt das Raster auf kurzen Seiten den leeren Platz auf die Logo-Leiste (riesige Leiste) */
  align-content: start; }
@media (max-width: 900px) {
  /* Handy/iPad hochkant: Logo + „Menü“ bleiben beim Scrollen oben (unter Uhr/Akku) */
  .in-app .dash-mobile-bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 200; }
}
@media (min-width: 901px) {
  /* iPad quer: Seitenleiste mit Logo bleibt stehen, nur der Inhalt scrollt */
  .in-app .dash-panel aside { position: sticky; top: env(safe-area-inset-top, 0px); align-self: start;
    height: calc(100vh - env(safe-area-inset-top, 0px)); overflow-y: auto; }
}

/* Testansicht im Browser (?app-test=1): deutlicher Hinweis oben */
#tsTestBar { position: sticky; top: 0; z-index: 1000; background: #1b1f3b; color: #fff; font: 500 13px/1.4 "DM Sans", system-ui, sans-serif;
  padding: 9px 14px; text-align: center; }
#tsTestBar a { color: #ffd2c9; font-weight: 700; margin-left: 6px; }

/* Breite Bildschirme (iPad quer, große iPads): Das Dashboard zeigt die Seitenleiste fest an — dort ist alles
   erreichbar, auch „Karte scannen“. Die untere Leiste wäre doppelt, also aus. Beim Drehen wechselt es von selbst. */
#tsAsideScan { display: none; }
.in-app #tsAsideScan { display: block; color: var(--coral, #e5543d); font-weight: 700; }
@media (min-width: 901px) {
  .in-app #tsTabs { display: none !important; }
  .in-app .dash-content { padding-bottom: 36px !important; }
}

/* Vorschau-Knopf („👁 Vorschau“ beim Gestalten/Nachricht) sitzt über der Leiste statt dahinter */
.in-app .preview-fab.show { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }

/* ── iPhone-Ränder (Notch/Dynamic Island oben, Home-Balken unten). Im Browser sind die Werte 0. ── */
.in-app body { padding-top: env(safe-area-inset-top, 0px); }
/* Streifen in Seitenfarbe: Inhalt scrollt nicht sichtbar unter Uhr und Akku */
.in-app body::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top, 0px);
  background: var(--cream, #f5f1e8); z-index: 290; pointer-events: none; }
@media (max-width: 900px) {
  .in-app .dash-panel aside { padding-top: calc(28px + env(safe-area-inset-top, 0px)); padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
}

/* Dateien herunterladen geht im App-Fenster nicht (kein Zurück) — Knöpfe aus, Hinweis an (app-modus.js) */
.in-app #exportCard .exp-btns { display: none !important; }

/* Anmelden mit Face ID / Fingerabdruck (app-modus.js → bioLoginButton, bioOffer) */
.ts-bio-login { width: 100%; margin: 8px 0 4px; }
.ts-bio-offer { position: fixed; inset: 0; z-index: 1000; background: rgba(20, 18, 15, 0.45); display: flex; align-items: flex-end; justify-content: center;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
.ts-bio-card { background: #fff; border-radius: 18px; padding: 22px 20px; max-width: 440px; width: 100%; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2); }
.ts-bio-card h3 { margin: 0 0 8px; font-size: 19px; }
.ts-bio-card p { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: var(--muted, #827d75); }
.ts-bio-card .btn { width: 100%; margin-top: 8px; }
