/* ==========================================================================
   PhotoTo — Base: Reset, App-Hülle, Kopfleiste, Fuß (Familienmuster SpellTo)
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
a { color: var(--color-primary); overflow-wrap: anywhere; }
h1, h2, h3 { font-family: var(--font-headline); font-weight: var(--font-bold); line-height: var(--leading-tight); color: var(--color-text); overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; }
h1 { font-size: var(--text-2xl); } h2 { font-size: var(--text-xl); } h3 { font-size: var(--text-lg); }
p { color: var(--color-text-secondary); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 50%; transform: translateX(-50%) translateY(-150%);
  top: 6px; z-index: 1000; background: var(--color-primary); color: #fff;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-md);
}
.skip-link:focus { transform: translateX(-50%) translateY(0); }

:focus-visible {
  outline: var(--focus-width) solid var(--focus-ring);
  outline-offset: var(--focus-offset);
  box-shadow: 0 0 0 calc(var(--focus-offset) + var(--focus-width)) var(--focus-halo);
}

/* ── App-Hülle: auf die Bildschirmhöhe gedeckelt. Nichts scrollt, denn
   Verweilen und Taster können nicht scrollen — lange Listen blättern. ── */
#app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
#app-content { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }

.statusbar {
  position: relative; z-index: 50; flex: 0 0 auto;
  display: flex; align-items: center; gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  flex-wrap: nowrap;
}
.statusbar__brand {
  display: flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-headline); font-weight: var(--font-bold);
  font-size: var(--text-lg); color: var(--color-primary); padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md); min-height: 44px; position: relative; overflow: hidden;
}
.statusbar__brand-logo {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: var(--color-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.statusbar__brand-logo svg { width: 20px; height: 20px; }
.statusbar__btn {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: var(--space-2); border-radius: var(--radius-md);
  color: var(--color-text-secondary); font-size: var(--text-xs); font-weight: var(--font-medium);
  min-width: 44px; min-height: 44px; justify-content: center;
  position: relative; overflow: hidden;
}
.statusbar__btn:hover { background: var(--color-surface-alt); color: var(--color-text); }
.statusbar__btn svg { width: 22px; height: 22px; }
.statusbar__btn-label { display: none; }
.statusbar__btn--font { font-weight: var(--font-bold); font-size: var(--text-sm); }
.statusbar__spacer { flex: 1 1 0; min-width: 0; }
/* Knöpfe schrumpfen nie unter 44 px — was nicht passt, legt
   kopfleiste-mehr.js hinter „Mehr". Der Mehr-Knopf erbt die Klassen des
   ersten Knopfs (hier die Wortmarke), daher eigene Maße. */
.statusbar > :not(.statusbar__spacer) { flex-shrink: 0; }
#sb-mehr { min-width: 44px; min-height: 44px; justify-content: center; padding: var(--space-2); color: var(--color-text-secondary); }
@media (min-width: 900px) { .statusbar__btn-label { display: inline; } }
@media (max-width: 480px) {
  .statusbar { gap: 2px; padding: var(--space-2); }
  .statusbar__brand > span:not(.statusbar__brand-logo) { display: none; }
}

/* ── Fuß: nur auf der Fotokiste, Hilfe und Einstellungen. Beim Bearbeiten
   zählt jede Zeile Höhe für das Foto. ── */
.app-footer {
  flex: 0 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: var(--space-1) var(--space-4);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs); color: var(--color-text-muted);
  border-top: 1px solid var(--color-border); background: var(--color-surface);
}
.app-footer__powered { display: inline-flex; align-items: center; gap: var(--space-2); }
.app-footer__logo { height: 20px; width: auto; }
/* AssistUK-Wortmarke neben „PhotoTo" (blau auf durchsichtig, aus BookTo).
   Unter 1200 px fällt sie weg: Dort brauchen die beschrifteten Knöpfe der
   Kopfleiste den Platz; der Fuß trägt die Marke weiter. */
.statusbar__assistuk { display: block; height: 26px; width: auto; flex: 0 0 auto; margin-left: var(--space-2); padding-left: var(--space-3); border-left: 2px solid var(--color-border); }
@media (max-width: 1199px) { .statusbar__assistuk { display: none; } }
:root[data-theme="kontrast"] .app-footer__logo,
:root[data-theme="kontrast"] .statusbar__assistuk { filter: brightness(0) invert(1); }
.app-footer__privacy { font-weight: var(--font-bold); color: var(--color-success); }
:root[data-theme="kontrast"] .app-footer__privacy { color: var(--color-primary); }
.app-footer__links { display: inline-flex; gap: var(--space-3); flex-wrap: wrap; }
.app-footer.is-hidden { display: none; }

/* ── Verweil-Punkt der geteilten Engine (_shared_input/dwell-dom.js) ── */
.dwell-dot {
  position: absolute; z-index: 10; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%; pointer-events: none; width: 0; height: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
