*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
button {
  color: inherit;
}
button, [role="button"] {
  cursor: pointer;
}
code {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 1em;
}
img,
svg {
  display: block;
}
img,
video {
  max-width: 100%;
  height: auto;
}

:root{
  --brown:#5e4b3a;
  --card:#efe7d9;
  --card-border:#d9cfbf;
}

a, .link-brown { color: var(--brown); text-decoration: underline; }

/* Footer links spacing (in addition to gap-4 for older browsers) */
.footer-nav a { margin: 0 0.25rem; }

/* -------- Modal overlay (cover the whole page) -------- */
.modal-backdrop{
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.06);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fadeIn 160ms ease-out;
}
.modal-card{
  width: min(92vw, 720px);
  max-height: 82vh; overflow: auto;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  box-shadow: 0 10px 35px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.08);
  transform: translateY(6px) scale(.995);
  animation: popIn 180ms cubic-bezier(.22,.9,.26,1) forwards;
}
.modal-header{
  position: sticky; top: 0;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--card-border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title{ font-size: 1.125rem; font-weight: 700; color: var(--brown); }
.modal-close{
  appearance:none; border:none; background:transparent; cursor:pointer;
  font-size:1rem; line-height:1; padding:6px 10px; border-radius:999px; color:var(--brown);
}
.modal-close:hover{ background: rgba(0,0,0,.06); }
.modal-body{ padding: 18px 20px 22px; }
.modal-body p { margin: .5rem 0; }
.modal-body ul{ margin: .5rem 0 .5rem 1.25rem; }

@keyframes fadeIn { from{opacity:0} to{opacity:1} }
@keyframes popIn  { from{opacity:0; transform:translateY(12px) scale(.98)}
                    to  {opacity:1; transform:translateY(0)    scale(1)} }
@media (prefers-reduced-motion: reduce){
  .modal-backdrop,.modal-card{ animation:none; }
  .modal-card{ transform:none; }
}

/* Remove default blue focus ring, but keep accessibility */
a:focus, button:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Optional: subtle prose styling inside modals */
.prose-brown p { margin: 0.5rem 0; }
.prose-brown ul { margin: 0.5rem 0 0.5rem 1.25rem; }

html, body { height: 100%; }
body { background: var(--card, #efe7d9); } /* same color as .gryai-background */

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
    "Noto Color Emoji";
}
.transition-colors {
  transition-property: background-color, border-color, color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.my-6 {
  margin-bottom: 1.5rem;
  margin-top: 1.5rem;
}
.text-4xl {
  font-size: 4.5rem;
  line-height: 5.0rem;
}
.mx-2 {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}
.my-4 {
  margin-bottom: 1rem;
  margin-top: 1rem;
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}
.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}
.py-8 {
  padding-bottom: 2rem;
  padding-top: 2rem;
}
.bg-\[\#86efac\] {
  background-color: #86efac;
}
.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}
.py-6 {
  padding-bottom: 1.5rem;
  padding-top: 1.5rem;
}
.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.py-1 {
  padding-bottom: 0.25rem;
  padding-top: 0.25rem;
}
.border-gray-500 {
  border-color: #6b7280;
}
.bg-white {
  background-color: #fff;
}
.flex {
  display: flex;
}
.gap-8 {
  grid-gap: 2rem;
  gap: 2rem;
}
.font-bold {
  font-weight: 700;
}
.max-w-screen-md {
  max-width: 768px;
}
.flex-col {
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.justify-center {
  justify-content: center;
}
.border-2 {
  border-width: 2px;
}
.rounded-sm {
  border-radius: 0.25rem;
}
.hover\:bg-gray-200:hover {
  background-color: #e5e7eb;
}
.tabular-nums {
  font-variant-numeric: tabular-nums;
}
.min-h-screen {
  min-height: 100vh;
}

.text-brown {
  color: #6B5B3E;
}

.gryai-background {
  background-color: rgb(242, 232, 197);
}
