/* Quiet controls belong to the world, never to a faceplate. */
#quiet-root {
  --q-ink: #fff9e9;
  --q-gold: #ffe1a0;
  --q-soft: #eee7d7;
  --q-shadow: 0 3px 10px rgba(0,0,0,1), 0 1px 3px rgba(0,0,0,1), 0 0 18px rgba(0,0,0,.92);
  position: fixed;
  inset: 0;
  z-index: 150000;
  pointer-events: none;
  color: var(--q-ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.45;
  text-shadow: var(--q-shadow);
  -webkit-text-stroke: 0;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
#quiet-root[hidden], #quiet-root [hidden] { display: none !important; }
#quiet-root *, #quiet-root *::before, #quiet-root *::after { box-sizing: border-box; }
#quiet-root, #quiet-root * { text-transform: none !important; }
#quiet-root :is(button,input,summary,a) { font: inherit; color: inherit; }
#quiet-root :is(button,summary,a) { -webkit-tap-highlight-color: transparent; }
#quiet-root button,
#quiet-root summary,
#quiet-root a {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
  text-shadow: var(--q-shadow);
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  touch-action: manipulation;
}
#quiet-root button:disabled { opacity: .28; cursor: default; }
#quiet-root :is(button,a,summary):focus-visible {
  outline: none;
  color: var(--q-gold);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}
#quiet-root :is(button,a,summary):hover:not(:disabled) { color: var(--q-gold); }
#quiet-root svg { display: block; width: 23px; height: 23px; flex: 0 0 auto; }
#q-trigger {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 12px !important;
  pointer-events: auto;
  opacity: .64;
  transition: opacity .2s ease, color .2s ease;
}
#q-trigger svg { width: 22px; height: 22px; }
#q-trigger:is(:hover,:focus-visible) { opacity: 1; }
#q-trigger .q-trigger-label {
  position: absolute;
  bottom: 49px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .16s ease;
}
#q-trigger:is(:hover,:focus-visible) .q-trigger-label { opacity: 1; }
#q-dock {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 18px;
  max-width: calc(100vw - 16px);
  padding: 6px 14px;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}
#q-dock button {
  position: relative;
  display: grid;
  place-items: center;
  gap: 6px;
  width: auto;
  min-width: 72px;
  min-height: 68px;
  padding: 8px 10px !important;
  pointer-events: auto;
  color: var(--q-ink);
  opacity: 1;
  transition: transform .14s ease, color .14s ease;
}
#q-dock button svg { width: 30px; height: 30px; filter: drop-shadow(0 2px 5px rgba(0,0,0,.92)); }
#q-dock .q-label { font-size: 16px; font-weight: 800; letter-spacing: .03em; line-height: 1.1; white-space: nowrap; opacity: 1; text-shadow: 0 2px 6px rgba(0,0,0,.96); transition: opacity .15s ease; }
#q-dock button:is(:hover,:focus-visible,[aria-pressed="true"]) { transform: translateY(-2px); color: var(--q-gold); }
#q-dock button[aria-expanded="true"],
#q-dock button[aria-pressed="true"] { color: var(--q-gold); opacity: 1; }
#quiet-root #q-trigger { display: none !important; }
#quiet-root[data-open="false"] #q-panel { display: none !important; }
@media (max-width: 640px) {
  #q-dock { gap: 8px; padding: 4px 6px; }
  #q-dock button { min-width: 52px; min-height: 58px; padding: 6px 4px !important; }
  #q-dock button svg { width: 25px; height: 25px; }
  #q-dock .q-label { font-size: 13px; }
}
#q-panel {
  position: fixed;
  left: 50%;
  bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(680px, calc(100vw - 36px));
  max-height: min(74dvh, 700px);
  padding: 6px 8px 12px;
  margin: 0;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  outline: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  pointer-events: auto;
}
#q-panel::-webkit-scrollbar { display: none; }
.q-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 18px;
}
#quiet-root .q-panel-head h2 { margin: 0; padding: 0; color: var(--q-gold); font: 800 36px/1.2 Inter,"Segoe UI",Arial,sans-serif; text-align: left; text-transform: none; letter-spacing: -.02em; text-shadow: var(--q-shadow); }
#quiet-root .q-close { flex: 0 0 auto; min-height: 48px; min-width: 48px; padding: 4px 0 4px 12px; color: var(--q-ink); font-size: 24px; font-weight: 800; }
#quiet-root .q-close svg { width: 32px; height: 32px; filter: drop-shadow(0 3px 8px rgba(0,0,0,1)); }
#quiet-root .q-page { background: transparent; border: 0; padding: 0; margin: 0; }
#quiet-root .q-page > :first-child { margin-top: 0; }
#quiet-root .q-place { font-size: 26px; font-weight: 800; line-height: 1.25; margin: 0 0 14px; color: var(--q-ink); text-shadow: var(--q-shadow); }
#quiet-root .q-page h3 { margin: 20px 0 10px; font-size: 18px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--q-soft); text-shadow: var(--q-shadow); }
#quiet-root .q-page p { font-size: 20px; font-weight: 700; line-height: 1.45; margin: 10px 0 16px; text-shadow: var(--q-shadow); }
#quiet-root .q-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  min-height: 56px;
  padding: 10px 0 !important;
  text-align: left;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.22;
  text-shadow: var(--q-shadow);
}
#quiet-root .q-row span { min-width: 0; }
#quiet-root .q-row svg { width: 24px; height: 24px; opacity: .9; filter: drop-shadow(0 2px 6px rgba(0,0,0,1)); }
#quiet-root .q-sub { display: block; color: var(--q-soft); opacity: .95; font-size: 18px; line-height: 1.35; margin-top: 5px; font-weight: 700; text-shadow: var(--q-shadow); }
#q-exits, #q-rooms { margin: 0; padding: 0; list-style: none; }
#quiet-root .q-visually-hidden,
#quiet-root .q-transport .q-label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.q-explore-tabs, #q-explore-tabs { display: flex; gap: 28px; align-items: baseline; margin: 0 0 18px; }
#quiet-root .q-explore-tabs button, #quiet-root #q-explore-tabs button { padding: 6px 0 !important; min-height: 46px; font-size: 24px; font-weight: 800; color: var(--q-soft); text-shadow: var(--q-shadow); }
#quiet-root .q-explore-tabs button[aria-pressed="true"], #quiet-root #q-explore-tabs button[aria-pressed="true"] { color: var(--q-gold); text-decoration: underline; text-underline-offset: 7px; text-decoration-thickness: 3px; }
#quiet-root .q-search-label { display: block; font-size: 18px; font-weight: 800; color: var(--q-soft); margin: 10px 0 4px; text-transform: none; text-shadow: var(--q-shadow); }
#q-track-title { font-size: 26px; font-weight: 800; line-height: 1.3; margin: 0 0 6px; letter-spacing: -.015em; }
#q-clock { font-size: 16px; font-weight: 700; color: var(--q-soft); font-variant-numeric: tabular-nums; }
#quiet-root #q-room-search {
  display: block;
  width: 100%;
  min-height: 52px;
  margin: 10px 0 14px;
  padding: 10px 0;
  border: 0;
  border-bottom: 2px solid rgba(255,249,233,.7);
  border-radius: 0;
  background: transparent !important;
  color: var(--q-ink);
  box-shadow: none;
  outline: 0;
  font-size: 24px;
  font-weight: 800;
  text-shadow: var(--q-shadow);
  text-transform: none;
}
#q-room-search::placeholder { color: var(--q-soft); opacity: .7; }
#q-room-search:focus-visible { border-bottom-color: var(--q-gold); }
#q-track-title { display: block; margin: 0 0 7px; font-size: 22px; font-weight: 600; line-height: 1.3; letter-spacing: -.02em; overflow-wrap: anywhere; }
#q-clock { display: flex; align-items: center; justify-content: space-between; color: var(--q-soft); font-size: 12px; font-variant-numeric: tabular-nums; margin: 8px 0; }
#quiet-root .q-transport { display: flex; justify-content: center; align-items: center; gap: 25px; margin: 8px 0 14px; }
#quiet-root .q-transport button { width: 46px; height: 46px; padding: 10px; display: grid; place-items: center; }
#quiet-root .q-transport button svg { width: 26px; height: 26px; }
#quiet-root .q-transport button:nth-child(2) svg { width: 31px; height: 31px; }
#quiet-root input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 26px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  accent-color: var(--q-gold);
  touch-action: pan-y;
}
#quiet-root input[type="range"]::-webkit-slider-runnable-track { height: 2px; border: 0; border-radius: 0; background: rgba(255,249,233,.55); }
#quiet-root input[type="range"]::-moz-range-track { height: 2px; border: 0; border-radius: 0; background: rgba(255,249,233,.55); }
#quiet-root input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 9px; height: 9px; margin-top: -3.5px; border: 0; border-radius: 50%; background: var(--q-gold); box-shadow: 0 1px 1px #000; }
#quiet-root input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border: 0; border-radius: 50%; background: var(--q-gold); box-shadow: 0 1px 1px #000; }
#quiet-root input[type="range"]:focus-visible { outline: 0; }
#quiet-root input[type="range"]:focus-visible::-webkit-slider-thumb { width: 13px; height: 13px; margin-top: -5.5px; }
#quiet-root .q-switch { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px; min-height: 54px; padding: 8px 0; font-size: 24px; font-weight: 800; text-shadow: var(--q-shadow); }
#quiet-root .q-switch span:last-child { color: var(--q-gold); font-size: 18px; font-weight: 800; }
#quiet-root .q-tone { border: 0; background: transparent; margin-top: 15px; padding: 0; }
#quiet-root .q-tone summary { list-style: none; min-height: 48px; padding: 10px 0; font-size: 22px; font-weight: 800; text-shadow: var(--q-shadow); }
#quiet-root .q-tone summary::-webkit-details-marker { display: none; }
#quiet-root .q-tone summary::after { content: "+"; float: right; color: var(--q-soft); }
#quiet-root .q-tone[open] summary::after { content: "−"; }
#quiet-root .q-tone label { display: grid; grid-template-columns: 96px 1fr 44px; align-items: center; gap: 16px; min-height: 44px; margin: 0; font-size: 18px; font-weight: 700; text-transform: none; text-shadow: var(--q-shadow); }
#quiet-root .q-tone output { font-size: 16px; font-weight: 700; color: var(--q-soft); text-align: right; font-variant-numeric: tabular-nums; }
#quiet-root .q-tool-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; row-gap: 10px; }
#quiet-root .q-tool-grid .q-row { display: block; min-height: 68px; font-size: 26px; font-weight: 800; padding: 10px 0 !important; text-shadow: var(--q-shadow); }
#quiet-root .q-tool-grid .q-sub { font-size: 17px; font-weight: 700; text-shadow: var(--q-shadow); }
#q-toast, #q-room-hint {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 40px);
  margin: 0;
  padding: 0;
  color: var(--q-ink);
  pointer-events: none;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  text-align: center;
  text-shadow: var(--q-shadow);
}
#q-toast { bottom: calc(90px + env(safe-area-inset-bottom,0px)); }
#q-room-hint { top: max(24px, env(safe-area-inset-top,0px)); color: var(--q-soft); opacity: .85; }
#q-panel:not([hidden]) ~ #q-toast { bottom: calc(78px + env(safe-area-inset-bottom,0px)); }

/* Consolidate old control layers without changing their code or optional tools. */
html body[data-quiet-active="true"] :is(
  #ks-go-bar, #transport, #ride-controls, #blue-day-night,
  #ks-wayfinder-toggle, #knockspace-start-over,
  #social-toggle, #music-toggle, #brian-deck, #deck-reveal,
  #skyler-birthday-panel, #ksi-main-prev, #ksi-main-next, #ksi-main-exit,
  iframe#ks-jbrl-float
) { display: none !important; }
html body[data-skyler-reading="true"] #quiet-root { display: none !important; }
html body[data-quiet-surface="true"] #quiet-root { opacity: 0; pointer-events: none; }

/* Preserve the authored door target bounds; only their visible treatment changes. */
html body[data-quiet-active="true"] #ride #physical-portals button.physical-portal,
html body[data-quiet-active="true"] #ride #entry-exits button.entry-hotspot {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  text-shadow: 0 1px 1px #000 !important;
  filter: none !important;
}
html body[data-quiet-active="true"] #ride #physical-portals button.physical-portal::after,
html body[data-quiet-active="true"] #ride #entry-exits button.entry-hotspot::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  border-radius: 50%;
  background: #fff5d7;
  opacity: .72;
  pointer-events: none;
}
html body[data-quiet-active="true"] #ride #physical-portals button.physical-portal .portal-label,
html body[data-quiet-active="true"] #ride #entry-exits button.entry-hotspot :is(span,.portal-label) {
  color: #fff9e9 !important;
  font-family: Inter,"Segoe UI",Arial,sans-serif !important;
  font-size: 18px !important;
  font-style: normal !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  -webkit-text-stroke: 0 !important;
  text-shadow: 0 1px 1px #000 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  filter: none !important;
  opacity: 0 !important;
  transition: opacity .16s ease;
  pointer-events: none;
}
html body[data-quiet-active="true"] #ride #physical-portals button.physical-portal:is(:hover,:focus-visible,.q-near) .portal-label,
html body[data-quiet-active="true"] #ride #entry-exits button.entry-hotspot:is(:hover,:focus-visible,.q-near) :is(span,.portal-label),
html body[data-quiet-active="true"][data-q-doors="all"] #ride #physical-portals button.physical-portal .portal-label,
html body[data-quiet-active="true"][data-q-doors="all"] #ride #entry-exits button.entry-hotspot :is(span,.portal-label) { opacity: 1 !important; }
html body[data-quiet-active="true"] #ride #physical-portals button.physical-portal:is(:hover,:focus-visible,.q-near)::after,
html body[data-quiet-active="true"] #ride #entry-exits button.entry-hotspot:is(:hover,:focus-visible,.q-near)::after { opacity: 0; }

@media (max-width: 600px) {
  #q-trigger { bottom: calc(13px + env(safe-area-inset-bottom,0px)); }
  #q-dock { bottom: calc(12px + env(safe-area-inset-bottom,0px)); gap: 4px; }
  #q-dock button { width: 46px; min-width: 42px; min-height: 57px; }
  #q-dock .q-label { opacity: .9; font-size: 12px; }
  #q-panel { width: calc(100vw - 38px); bottom: calc(101px + env(safe-area-inset-bottom,0px)); max-height: min(65dvh, 520px); padding-bottom: 4px; }
  #quiet-root .q-panel-head h2 { font-size: 22px; }
  .q-panel-head { margin-bottom: 14px; }
  #quiet-root .q-row { min-height: 46px; font-size: 17px; }
  #quiet-root .q-tool-grid { column-gap: 20px; }
  #quiet-root .q-tool-grid .q-row { font-size: 16px; }
  #q-track-title { font-size: 21px; }
  #quiet-root .q-tone label { grid-template-columns: 67px 1fr 30px; gap: 11px; }
  #q-room-hint { top: max(18px,env(safe-area-inset-top,0px)); font-size: 13px; }
}
@media (max-height: 500px) {
  #q-panel { max-height: 62dvh; bottom: calc(82px + env(safe-area-inset-bottom,0px)); }
  #q-dock { bottom: calc(5px + env(safe-area-inset-bottom,0px)); }
  #q-dock button { min-height: 45px; gap: 2px; }
  .q-panel-head { margin-bottom: 6px; }
  #quiet-root .q-row { min-height: 37px; padding: 5px 0 !important; }
  #quiet-root .q-transport { margin: 0 0 5px; }
}
@media (prefers-reduced-motion: reduce) {
  #quiet-root *,
  html body[data-quiet-active="true"] #ride #physical-portals .portal-label,
  html body[data-quiet-active="true"] #ride #entry-exits .portal-label { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

html body[data-quiet-active="true"] #ks-great-entry-hint{display:none!important}

html body[data-quiet-active="true"] #controls-toggle{display:none!important}
html body[data-quiet-surface="true"] #quiet-root{display:none!important}

html body[data-quiet-active="true"] #controls-toggle{display:none!important}
html body[data-quiet-active="true"][data-q-panel]:not([data-q-panel="closed"]) #physical-portals{opacity:0!important;pointer-events:none!important}
html body[data-quiet-surface="true"] #quiet-root{display:none!important}
#quiet-root .q-volume-row{display:grid;grid-template-columns:32px 56px 1fr 40px;gap:10px;align-items:center;margin:8px 0}
#quiet-root .q-volume-row button{min-width:32px;min-height:40px;padding:4px}
#quiet-root .q-volume-row label{font-size:13px;margin:0}
#quiet-root .q-volume-row output{font-size:12px;text-align:right}
#quiet-root .q-tone label{grid-template-columns:78px 1fr}
@media(min-width:601px){#q-dock .q-label{position:static;transform:none;font-size:16px;font-weight:800;opacity:1}}

/* Universal heavy drop shadow & enlarged font sizes for every menu opened from the dock */
:is(#quiet-root, #q-panel, #ks-go-hub, #ks-go-elepod-pop, #ks-go-composer, #jbrl-overlay, #social-panel) :is(h1, h2, h3, h4, p, a, button, label, span, strong, output, summary, input, select, textarea) {
  text-shadow: 0 3px 10px rgba(0,0,0,1), 0 1px 4px rgba(0,0,0,1), 0 0 18px rgba(0,0,0,.95) !important;
}
#quiet-root #q-panel h2 { font-size: 36px !important; font-weight: 800 !important; }
#quiet-root #q-panel :is(.q-row, .q-switch) { font-size: 28px !important; font-weight: 800 !important; min-height: 58px !important; }
#quiet-root #q-panel .q-sub { font-size: 18px !important; font-weight: 700 !important; }
#quiet-root #q-panel .q-page p { font-size: 22px !important; font-weight: 700 !important; line-height: 1.45 !important; }
#quiet-root #q-toast, #quiet-root #q-room-hint { font-size: 20px !important; font-weight: 800 !important; }
:is(#ks-go-hub, #ks-go-elepod-pop, #ks-go-composer, #social-panel) :is(h1, h2, h3) { font-size: clamp(24px, 2.6vw, 34px) !important; font-weight: 800 !important; }
:is(#ks-go-hub, #ks-go-elepod-pop, #ks-go-composer, #social-panel) :is(button, a, p, label, li, input, textarea, select) { font-size: max(18px, 1.15em) !important; font-weight: 700 !important; }
#jbrl-overlay .jb-topbar strong { font-size: 20px !important; font-weight: 800 !important; }
#jbrl-overlay :is(button, label, output, select, .jb-track-choice) { font-size: max(16px, 1.08em) !important; font-weight: 700 !important; }
#jbrl-overlay #jb-title { font-size: 22px !important; font-weight: 800 !important; }

html[data-quiet-shell] body :is(#brian-deck,#deck-reveal,#brian-deck-reveal,#ks-go-bar,#controls-toggle,#skyler-birthday-panel,iframe#ks-jbrl-float){display:none!important}

/* Off-camera authored portals must remain hidden above legacy !important skin rules. */
html body[data-quiet-active="true"] #ride #physical-portals button.physical-portal[hidden],
html body[data-quiet-active="true"] #ride #entry-exits button.entry-hotspot[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}