@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700&family=EB+Garamond:ital,wght@0,400;0,500;1,400&family=Inter:wght@300;400;500;600&display=swap');

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

html,
body {
  width: 100%;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: var(--color-bg-base);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
}

/* App Shell: Strict 100vh/100dvh layout preventing any horizontal or vertical scroll */
.app-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(ellipse 90% 50% at 50% -20%, rgba(166, 38, 53, 0.12), transparent 70%),
    radial-gradient(ellipse 70% 40% at 50% 120%, rgba(20, 20, 28, 0.6), transparent 80%),
    radial-gradient(circle at 50% 50%, rgba(13, 13, 17, 0.95), var(--color-bg-base) 100%);
}

/* Atmospheric subtle vignette overlay */
.app-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
  z-index: 1;
}

.app-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-lg);
  overflow: hidden;
  position: relative;
  z-index: 2;
}

/* Utility Focus Styles */
:focus-visible {
  outline: 2px solid var(--color-crimson);
  outline-offset: 2px;
}

/* Custom internal scrollbar if poem text overflows on small screens */
.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-medium) transparent;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background-color: var(--color-border-medium);
  border-radius: var(--radius-full);
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-crimson);
}
