:root {
  color-scheme: dark;
  background: #070e19;
  color: #e8e0e2;
  font-family: Tahoma, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
* { box-sizing: border-box; }
html, body, #athar-world {
  width: 100%;
  min-width: 320px;
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #070e19;
}
body { overscroll-behavior: none; }
#athar-canvas {
  position: fixed;
  inset: 0;
  display: block;
  width: 100vw;
  height: 100svh;
  border: 0;
  outline: none;
  background: #070e19;
  touch-action: pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: grab;
}
#athar-canvas:active { cursor: grabbing; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
#athar-accessible-nav button:focus-visible {
  position: fixed !important;
  z-index: 1000;
  top: 12px;
  right: 12px;
  width: auto !important;
  height: auto !important;
  clip: auto !important;
  padding: 12px 16px !important;
  margin: 0 !important;
  color: #f3e7e9;
  background: #172435;
  border: 1px solid #bb8792;
  border-radius: 3px;
  font: 15px Tahoma, Arial, sans-serif;
}
/* Shown only when Canvas 2D is unavailable (see showStaticFallback in engine.js). */
.athar-static-mode, .athar-static-mode body { overflow: auto; height: auto; }
.athar-static-mode #athar-world { height: auto; overflow: visible; }
.athar-static-mode #athar-canvas { display: none; }
#athar-static { max-width: 46rem; margin: 0 auto; padding: 24px 20px 64px; line-height: 2; font: 18px/2 Amiri, serif; }
#athar-static h2 { color: #d9b3bc; font-size: 1.25em; margin: 2.2em 0 .6em; }
#athar-static h3 { color: #f0e5e7; margin: 1.4em 0 .3em; }
#athar-static p { margin: .3em 0; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* The same no-script fallback style, kept in the stylesheet so CSP needs no inline-style exception. */
.noscript-fallback {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 24px;
  color: #e8e0e2;
  background: #070e19;
  font: 18px/1.9 Tahoma, Arial, sans-serif;
  text-align: right;
  direction: rtl;
}
