.raytracer-body {
  --ray-header-offset: 84px;
  background: #04060b;
  overflow: hidden;
}

.ray-page {
  position: relative;
  min-height: calc(100dvh - var(--ray-header-offset));
  touch-action: none;
  background: #04060b;
}

.ray-page::before,
.ray-page::after {
  content: "";
  position: fixed;
  inset: var(--ray-header-offset) 0 0;
  pointer-events: none;
}

.ray-page::before {
  background:
    radial-gradient(circle at 50% 62%, rgba(255, 245, 205, 0.08), transparent 14%),
    linear-gradient(to bottom, rgba(6, 8, 12, 0.08), rgba(6, 8, 12, 0.48));
  mix-blend-mode: screen;
}

.ray-page::after {
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
  background-size: 3px 3px, 4px 4px;
  mix-blend-mode: soft-light;
}

#canvas-shell,
#canvas-shell canvas {
  position: fixed !important;
  inset: var(--ray-header-offset) 0 0;
  width: 100% !important;
  height: auto !important;
}

.ray-panel {
  position: fixed;
  left: 1rem;
  top: 5.5rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: min(12rem, calc(100vw - 2rem));
  padding: 0.85rem;
  border: 1px solid rgba(255, 246, 224, 0.16);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 244, 214, 0.08), rgba(255, 244, 214, 0.02)),
    rgba(7, 10, 14, 0.42);
  backdrop-filter: blur(10px);
  box-shadow: 0 1.1rem 2.4rem rgba(0, 0, 0, 0.28);
  touch-action: manipulation;
}

.ray-panel-desktop {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ray-panel-mobile {
  display: none;
}

.ray-title {
  color: rgba(255, 246, 224, 0.72);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.62rem;
}

.ray-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem;
}

.ray-button,
.ray-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  padding: 0.82rem 0.85rem;
  border: 1px solid rgba(255, 246, 224, 0.22);
  border-radius: 0.85rem;
  background:
    linear-gradient(135deg, rgba(255, 244, 214, 0.16), rgba(255, 244, 214, 0.05)),
    rgba(7, 10, 14, 0.44);
  color: rgba(255, 246, 224, 0.92);
  font-family: inherit;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.68rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 0.7rem 1.6rem rgba(0, 0, 0, 0.24);
}

.ray-button:hover,
.ray-button:focus-visible,
.ray-next:hover,
.ray-next:focus-visible {
  border-color: rgba(255, 246, 224, 0.55);
  background:
    linear-gradient(135deg, rgba(255, 244, 214, 0.24), rgba(255, 244, 214, 0.08)),
    rgba(7, 10, 14, 0.56);
}

@media (max-width: 700px) {
  .ray-panel {
    left: 0.75rem;
    top: calc(var(--ray-header-offset) + 0.6rem);
    width: auto;
    max-width: calc(100vw - 1.5rem);
    gap: 0.45rem;
    padding: 0.55rem 0.65rem;
    border-radius: 999px;
    flex-direction: row;
    align-items: center;
  }

  .ray-panel-desktop {
    display: none;
  }

  .ray-panel-mobile {
    display: block;
  }

  .ray-panel-mobile p {
    margin: 0;
    color: rgba(255, 246, 224, 0.88);
    font-size: 0.66rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
  }

  .ray-next {
    width: auto;
    padding: 0.62rem 0.85rem;
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    border-radius: 999px;
  }
}
