* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}

body {
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

/* Hide scrollbars on horizontal scrollers */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

/* Focus state — accessible without being ugly */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Offline banner */
.offline-banner {
  position: fixed;
  top: var(--safe-top);
  left: 0; right: 0;
  background: var(--amber);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  padding: 6px 12px;
  z-index: 1000;
}

/* Toast — used by router & auth for transient messages */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(80px + var(--safe-bottom));
  transform: translateX(-50%);
  background: var(--oak);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  z-index: 999;
  animation: toast-in 0.18s ease-out;
}
.toast.error { background: var(--red); }
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* Visually hidden (screen-reader only) */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
