/* Same header and footer as the Next.js pages, for writing and app documents
   that are served as their own HTML so audio is not inside an iframe. */
.home-button { display: none !important; }

body.site-has-chrome {
  padding-top: 3.5rem !important;
  box-sizing: border-box;
  flex-wrap: wrap;
}

/* A flex app (the composer) otherwise places the footer beside the app. */
body.site-has-chrome > .site-footer {
  flex: 1 0 100%;
  width: 100%;
}

/* Imaginary Landscape sizes its panes to the viewport. Keep them under the header. */
body.site-has-chrome .left-pane,
body.site-has-chrome .right-pane {
  height: calc(100dvh - 3.5rem) !important;
}

/* Shader controls only. Equation Engine also uses #controls for its play bar. */
body.site-has-chrome:has(#canvas) #controls,
body.site-has-chrome:has(#canvas) #controls-right {
  top: calc(3.5rem + 10px) !important;
  z-index: 30;
  max-height: calc(100dvh - 4.5rem);
  overflow: auto;
}

.site-chrome-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  height: 3.5rem;
  margin: 0;
  padding: 0 0.75rem;
  border: 2px solid #000;
  background: #e0e0db;
  color: #000;
  font-family: Poppins, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
}

.site-chrome a {
  color: inherit;
  text-decoration: none;
}

.site-chrome a:hover,
.site-chrome a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

.site-chrome-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex: none;
  min-width: 2.75rem;
  min-height: 2.75rem;
}

.site-chrome-logo img {
  display: block;
  width: 2.75rem;
  height: 2.75rem;
  object-fit: contain;
}

.site-chrome-nav {
  display: none;
  align-items: center;
  min-width: 0;
  gap: 0.75rem;
}

.site-chrome-nav > a { white-space: nowrap; }

.site-chrome-social {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-chrome-social a {
  display: block;
  width: 1rem;
  height: 1rem;
}

.site-chrome-social svg {
  display: block;
  width: 100%;
  height: 100%;
}

.site-chrome-toggle {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #000;
}

.site-chrome-toggle-mark {
  position: relative;
  display: block;
  width: 1.75rem;
  height: 0.75rem;
}

.site-chrome-toggle-mark span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #000;
}

.site-chrome-toggle-mark span:first-child { top: 0; }
.site-chrome-toggle-mark span:last-child { bottom: 0; }

.site-chrome-panel {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  right: 0;
  top: 3.5rem;
  bottom: 0;
  overflow-y: auto;
  background: #e0e0db;
  -webkit-overflow-scrolling: touch;
}

.site-chrome-panel.is-open { display: block; }

.site-chrome-panel nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  min-height: 100%;
  padding: 3rem 1rem;
  font-size: 1.875rem;
}

.site-chrome-panel .site-chrome-social {
  gap: 2rem;
  padding-top: 1rem;
}

.site-chrome-panel .site-chrome-social a {
  width: 1.75rem;
  height: 1.75rem;
}

@media (min-width: 640px) {
  .site-chrome { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
  .site-chrome {
    padding: 0 2rem;
    font-size: 1rem;
  }
  .site-chrome-nav {
    display: flex;
    gap: 0.85rem;
  }
  .site-chrome-toggle,
  .site-chrome-panel { display: none !important; }
}

@media (min-width: 1280px) {
  .site-chrome { font-size: 1.125rem; }
  .site-chrome-nav { gap: 1.25rem; }
}

.site-footer {
  position: relative;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  box-sizing: border-box;
  margin: 0;
  padding: 2rem 1.5rem;
  border-top: 2px solid #000;
  background: #e0e0db !important;
  color: #000 !important;
  font-family: Poppins, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  text-align: center;
}

.site-footer a { color: #000 !important; text-decoration: none; }
.site-footer a:hover,
.site-footer a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.site-footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 2rem;
  width: 100%;
  max-width: 120rem;
}
.site-footer-name { font-size: 1.5rem; font-weight: 500; letter-spacing: -0.02em; }
.site-footer-side { display: flex; align-items: center; gap: 1.25rem; }
.site-footer .site-chrome-social a { width: 1.25rem; height: 1.25rem; }
.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  font-size: 0.875rem;
}
.site-footer-logo { display: block; width: 3.5rem; height: 3.5rem; flex: none; }
.site-footer-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }

@media (min-width: 768px) {
  .site-footer-top { justify-content: space-between; text-align: left; }
  .site-footer-name { font-size: 1.875rem; }
  .site-footer-logo { width: 4rem; height: 4rem; }
}
