/* Scene utilities never participate in the shared navigation geometry. */
html[data-website-experience] .website-tools {
  display: flex; align-items: center; gap: 6px; padding: 0;
  top: calc(var(--world-nav-height) - 8px);
  max-width: calc(100vw - var(--navigation-gutter) * 2);
  background: transparent; border: 0; border-radius: 999px;
  backdrop-filter: none; color: #354239;
  font: 400 12px/1.3 var(--font-body);
}
html[data-website-experience] .website-tools .scene-actions {
  display: contents; position: static; inset: auto; margin: 0; padding: 0;
}
html[data-website-experience] .website-tools :is(#rainy-lane-language,#website-user,#soundBtn) {
  box-sizing: border-box; position: relative; inset: auto; transform: none; margin: 0;
  display: flex; align-items: center; justify-content: center; gap: 0;
  width: 44px; height: 44px; min-height: 44px; min-width: 44px; padding: 0;
  background: #f8f8f7ed; border: 1px solid #69765c66; border-radius: 50%;
  box-shadow: 0 2px 5px #24312018, inset 0 1px 0 #ffffffb3; backdrop-filter: blur(8px);
  color: inherit; font: inherit; letter-spacing: normal;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
html[data-website-experience] .website-tools .toolbar-language-icon {
  width: 20px; height: 20px; pointer-events: none;
}
html[data-website-experience] .website-tools :is(#website-user-name,#soundBtn > span) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
html[data-website-experience] .website-tools #website-user > span:last-child,
html[data-website-experience] .website-tools .sound-bars { display: none; }
html[data-website-experience] .website-tools #website-user-icon { width: 24px; height: 24px; flex-shrink: 0; background: transparent; }
html[data-website-experience] .website-tools :is(#rainy-lane-language,#website-user,#soundBtn):hover { background: #fcfcfb; border-color: #354239; box-shadow: 0 3px 8px #24312030; }
html[data-website-experience] .website-tools :is(#rainy-lane-language,#website-user,#soundBtn):focus-visible { outline: 2px solid #5776bd; outline-offset: 2px; }
html[data-website-experience] .website-tools #soundBtn svg { width: 20px; height: 20px; }
html[data-website-experience] .website-tools #soundBtn[aria-pressed=true] { background: #64765330; color: #263b29; }
html[data-website-experience] body.at-gate .website-tools .scene-actions { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .street-revealing .website-tools .scene-actions > button { animation: street-emerge 650ms ease 700ms backwards; }
}
@media (max-width: 1100px) {
  html[data-website-experience] #stage .scene-intro { margin-top: calc(var(--world-nav-height) + 72px); }
}
@media (prefers-reduced-motion: reduce) {
  html[data-website-experience] .website-tools button { transition: none; }
}

html[data-website-experience] #website-user-menu {
  top: calc(100% + 6px); right: 0; min-width: 168px;
  padding: 4px; border-radius: 16px;
  box-shadow: 0 6px 20px #09181318;
}
html[data-website-experience] #website-user-menu :is(a,button) {
  min-height: 40px; padding: 10px 12px; border-radius: 12px;
}

html[data-website-experience] .website-tools :is(#rainy-lane-language,#website-user,#soundBtn):active,
html[data-website-experience] .website-tools :is(#rainy-lane-language,#website-user)[aria-expanded=true] {
  background: #ededec; border-color: #354239;
  box-shadow: inset 0 2px 3px #24312022;
}

/* Back replaces the home mark without changing the navigation's layout. */
html[data-website-experience] body:has(#backBtn:not([hidden])) .navigation-logo {
  visibility: hidden;
  pointer-events: none;
}
html[data-website-experience] body:has(#backBtn:not([hidden])) .topbar.philo-header {
  pointer-events: none;
}
html[data-website-experience] body:has(#backBtn:not([hidden])) .navigation-links {
  pointer-events: auto;
}

/* Preserve the original Back styling; only lift it above the header scrim. */
html[data-website-experience] .topbar #backBtn {
  pointer-events: auto;
}

html[data-website-experience] #stage:not([data-scene="street"]) > .scene-intro {
  top: 46px;
}
@media (max-width:760px) {
  html[data-website-experience] #stage > .scene-interactions { bottom: 72px; }
}
/* Reserve a separate row above the map on short landscape screens. */
@media (max-height:520px) and (orientation:landscape) {
  html[data-website-experience] #stage > .scene-interactions {
    bottom: calc(28px + var(--scene-toolbar-height, 32px));
  }
}
@media (max-width: 760px) and (max-height: 520px) and (orientation: landscape) {
  html[data-website-experience] .website-tools { top: 12px; }
  html[data-website-experience] .topbar.philo-header { pointer-events: none; }
  html[data-website-experience] .topbar.philo-header a { pointer-events: auto; }
}
@media (max-width: 620px) and (max-height: 360px) and (orientation: landscape) {
  html[data-website-experience] #stage > .scene-toolbar { bottom: max(4px, env(safe-area-inset-bottom)); }
}

html[data-website-experience] #website-user-menu{background:#f8f8f7}
html[data-website-experience] .topbar #backBtn{background:#f8f8f7ed}

/* Account controls stay interactive when the scene header is transparent. */
html[data-website-experience] .nav-account { pointer-events: auto; }
