/* Wide tables scroll inside their own container, never the whole page. */
*, *::before, *::after { box-sizing: border-box; }
img, video { max-width: 100%; }
.app-main, .app-content, .account-stack, .account-grid > *, .card, .shell, .wrap { min-width: 0; }
.table-wrap { min-width: 0 !important; max-width: 100%; overflow-x: auto; }
pre { max-width: 100%; overflow-x: auto; }
.dialog-card { max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 10000; padding: 12px 18px; background: #fff; color: #111; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
:focus-visible { outline: 2px solid #e1cba8; outline-offset: 3px; }
.export-feedback { min-height: 1.5em; margin-top: 10px; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  input, select, textarea { font-size: max(1rem, 16px); }
  .account-control-row { flex-wrap: wrap; }
  .account-control-row input { flex: 1 1 160px; min-width: 0; }
  .card p, .field-help { overflow-wrap: anywhere; }
  .dialog-actions { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
