:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #efe6dc;
  color: #2f2924;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
}

button {
  font: inherit;
}

.experience-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  background: #201c19;
}

#safe-space-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.entry-screen {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(rgba(239, 230, 220, 0.52), rgba(239, 230, 220, 0.24)),
    radial-gradient(circle at 50% 42%, rgba(255, 246, 232, 0.86), rgba(214, 192, 171, 0.38) 46%, rgba(92, 75, 63, 0.56) 100%);
  transition:
    opacity 520ms ease,
    visibility 520ms ease;
}

.entry-screen.is-hidden {
  visibility: hidden;
}

.entry-copy {
  width: min(620px, calc(100vw - 40px));
  text-align: center;
  color: #342c26;
}

.entry-copy h1 {
  font-size: clamp(2.4rem, 7vw, 5.8rem);
}

.entry-copy p:not(.kicker) {
  max-width: 540px;
  margin: 18px auto 0;
  color: #5d5148;
  font-size: clamp(1rem, 2.2vw, 1.28rem);
  line-height: 1.48;
}

.enter-button {
  min-width: 136px;
  min-height: 48px;
  margin-top: 26px;
  padding: 0 24px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 999px;
  color: #24342d;
  background: rgba(224, 240, 224, 0.86);
  box-shadow: 0 18px 42px rgba(47, 41, 36, 0.16);
  cursor: pointer;
  font-weight: 820;
  backdrop-filter: blur(16px);
}

.enter-button:hover,
.enter-button:focus-visible {
  background: rgba(236, 247, 233, 0.96);
  outline: none;
}

.panel {
  position: absolute;
  top: clamp(18px, 3vw, 34px);
  left: clamp(18px, 4vw, 52px);
  z-index: 3;
  width: min(390px, calc(100vw - 36px));
  padding: 18px 20px 20px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 8px;
  background: rgba(255, 250, 244, 0.72);
  box-shadow: 0 20px 60px rgba(47, 41, 36, 0.16);
  backdrop-filter: blur(18px);
  transition: opacity 260ms ease;
}

.kicker {
  margin: 0 0 8px;
  color: #786c61;
  font-size: 0.76rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: #342c26;
  font-size: clamp(1.65rem, 5vw, 3.1rem);
  line-height: 0.98;
  letter-spacing: 0;
}

#wall-copy {
  margin: 12px 0 0;
  color: #5d5148;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  line-height: 1.48;
}

.panel-action,
.submit-note {
  min-height: 42px;
  margin-top: 16px;
  padding: 0 16px;
  border: 1px solid rgba(79, 96, 84, 0.24);
  border-radius: 8px;
  color: #24342d;
  background: rgba(219, 237, 218, 0.82);
  box-shadow: 0 10px 26px rgba(55, 42, 34, 0.1);
  cursor: pointer;
  font-weight: 780;
}

.panel-action:hover,
.panel-action:focus-visible,
.submit-note:hover,
.submit-note:focus-visible {
  background: rgba(229, 244, 226, 0.96);
  outline: none;
}

.wall-arrows {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(12px, 2.4vw, 34px);
  pointer-events: none;
  transition: opacity 260ms ease;
}

.arrow-button {
  display: grid;
  width: clamp(46px, 5vw, 62px);
  height: clamp(46px, 5vw, 62px);
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  color: #3b312b;
  background: rgba(255, 250, 244, 0.68);
  box-shadow: 0 14px 36px rgba(55, 42, 34, 0.16);
  cursor: pointer;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  pointer-events: auto;
  backdrop-filter: blur(16px);
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.arrow-button:hover,
.arrow-button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 250, 0.86);
  outline: none;
}

.dim-button {
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 4vw, 34px);
  z-index: 3;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 999px;
  color: #2f2924;
  background: rgba(255, 250, 244, 0.72);
  box-shadow: 0 14px 36px rgba(55, 42, 34, 0.16);
  cursor: pointer;
  font-weight: 820;
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
  transition:
    opacity 260ms ease,
    background 160ms ease,
    color 160ms ease;
}

.dim-button.is-active {
  color: #eef7ed;
  background: rgba(36, 52, 45, 0.84);
}

.dim-button:hover,
.dim-button:focus-visible {
  outline: none;
  background: rgba(255, 255, 250, 0.9);
}

.dim-button.is-active:hover,
.dim-button.is-active:focus-visible {
  background: rgba(36, 52, 45, 0.92);
}

.side-tray {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  width: min(440px, calc(100vw - 36px));
  max-height: min(680px, calc(100vh - 72px));
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  background: rgba(255, 250, 244, 0.9);
  box-shadow: 0 24px 70px rgba(47, 41, 36, 0.2);
  backdrop-filter: blur(18px);
  transform: translate(-50%, calc(-50% + 10px));
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.side-tray.is-open {
  transform: translate(-50%, -50%);
  opacity: 1;
  pointer-events: auto;
}

.video-player {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 44px);
  background: rgba(45, 37, 31, 0.5);
  backdrop-filter: blur(14px);
  transition: opacity 220ms ease;
}

.player-shell {
  position: relative;
  width: min(980px, 94vw);
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  background: #17130f;
  box-shadow: 0 30px 90px rgba(28, 22, 17, 0.36);
  overflow: hidden;
}

.player-shell iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.player-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.player-fallback {
  position: absolute;
  right: 58px;
  top: 12px;
  z-index: 2;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  color: #24342d;
  background: rgba(255, 250, 244, 0.82);
  box-shadow: 0 10px 26px rgba(28, 22, 17, 0.16);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  backdrop-filter: blur(12px);
}

.tray-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.tray-header h2 {
  margin: 0;
  color: #342c26;
  font-size: 1.18rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.message-stat {
  margin: 7px 0 0;
  color: #53635a;
  font-size: 0.84rem;
  font-weight: 760;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(93, 81, 72, 0.16);
  border-radius: 999px;
  color: #4d423a;
  background: rgba(255, 255, 250, 0.7);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.prompt-card {
  margin-top: 14px;
}

.prompt-card p {
  margin: 0 0 10px;
  color: #5d5148;
  font-size: 0.94rem;
  font-weight: 720;
}

textarea {
  width: 100%;
  min-height: 94px;
  resize: vertical;
  padding: 12px;
  border: 1px solid rgba(93, 81, 72, 0.18);
  border-radius: 8px;
  color: #342c26;
  background: rgba(255, 255, 250, 0.78);
  font: inherit;
  line-height: 1.42;
}

textarea:focus {
  outline: 2px solid rgba(156, 183, 176, 0.44);
  outline-offset: 2px;
}

.community-feed {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.feed-note {
  padding: 11px 12px;
  border: 1px solid rgba(93, 81, 72, 0.12);
  border-radius: 8px;
  color: #4f453d;
  background: rgba(255, 255, 250, 0.58);
}

.feed-note strong {
  display: block;
  margin-bottom: 4px;
  color: #6b7766;
  font-size: 0.76rem;
}

.video-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.video-button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 64px;
  padding: 10px;
  border: 1px solid rgba(93, 81, 72, 0.14);
  border-radius: 8px;
  color: #342c26;
  background: rgba(255, 255, 250, 0.62);
  cursor: pointer;
  text-align: left;
}

.profile-button {
  grid-template-columns: 56px minmax(0, 1fr);
}

.profile-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(219, 237, 218, 0.9);
}

.video-button:hover,
.video-button:focus-visible {
  background: rgba(232, 243, 238, 0.88);
  outline: none;
}

.play-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  color: #24342d;
  background: rgba(219, 237, 218, 0.9);
  font-size: 0.9rem;
  font-weight: 900;
}

.video-button strong,
.video-button span {
  display: block;
}

.video-button strong {
  font-size: 0.9rem;
}

.video-button span {
  margin-top: 3px;
  color: #6a5d52;
  font-size: 0.78rem;
  line-height: 1.35;
}

.feed-note p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.xr-enter {
  z-index: 4 !important;
  position: absolute !important;
  right: clamp(18px, 3vw, 34px) !important;
  top: clamp(64px, 9vw, 88px) !important;
  bottom: auto !important;
  min-width: 132px !important;
  height: 42px !important;
  border: 1px solid rgba(255, 255, 255, 0.65) !important;
  border-radius: 999px !important;
  color: #2f2924 !important;
  background: rgba(255, 250, 244, 0.78) !important;
  box-shadow: 0 18px 42px rgba(47, 41, 36, 0.18) !important;
  font: 760 0.82rem/1 Inter, ui-sans-serif, system-ui, sans-serif !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  backdrop-filter: blur(16px);
}

.loading-note,
.error-note {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #473e37;
  background: #efe6dc;
  text-align: center;
  font-weight: 720;
}

@media (max-width: 760px) {
  .experience-shell {
    min-height: 620px;
  }

  .panel {
    padding: 15px 16px 17px;
  }

  .xr-enter {
    top: auto !important;
    right: 14px !important;
    bottom: 84px !important;
  }
}
