/* Optional world shell. Scene modules and their assets are loaded by selection only. */
:root { --world-header-height: 82px; --world-red: #ff6f7d; --world-paper: #fff1ed; --world-muted: #c9b3bd; --world-line: #b57a8b55; }
#experience-shell [hidden] { display: none !important; }
.experience-controls { position: fixed; right: 22px; bottom: 20px; z-index: 65; display: flex; gap: 10px; padding: 6px; border: 1px solid #755062; border-radius: 7px; background: #211720f2; box-shadow: 0 8px 30px #0005; font-family: 'Manrope','Golos Text',sans-serif; }
.experience-mode-switch { display: flex; gap: 4px; }
.experience-controls button, .world-subtle-button { font: inherit; cursor: pointer; min-height: 40px; padding: 9px 13px; color: #e6cbd7; border: 1px solid transparent; border-radius: 3px; background: transparent; font-size: 11px; font-weight: 650; }
.experience-mode-switch > button[aria-pressed='true'] { background: #633444; color: #fff3f4; border-color: #bc687b; }
.experience-mode-switch > button > span { color: #ff9baa; font-size: 15px; margin-right: 6px; }
.experience-controls button:hover, .world-subtle-button:hover { color: #fff; background: #653143; }
.experience-game-tools { display: none; }
.experience-notice { position: fixed; z-index: 70; right: 22px; bottom: 92px; max-width: min(430px,calc(100vw - 44px)); padding: 16px 20px; background: #342331; border: 1px solid #9b637a; color: #fae8ef; font-size: 13px; line-height: 1.7; box-shadow: 0 12px 40px #0008; }
.world-mode { overflow: hidden; height: 100dvh; }
.world-mode .header { position: relative !important; z-index: 80; background: #170e16f7; }
.world-mode .header .shell { max-width: none; }
.world-mode > .footer { display: none; }
.world-mode .experience-controls { top: calc(var(--world-header-height) + 14px); bottom: auto; right: 22px; max-width: calc(100vw - 44px); background: #1e1721e8; box-shadow: 0 10px 30px #09030c66; }
.world-mode .experience-game-tools { display: flex; align-items: center; gap: 2px; border-left: 1px solid var(--world-line); padding-left: 8px; }
.world-mode .experience-game-tools > button:last-child { width: 36px; padding-inline: 8px; }
.world-mode .experience-mode-switch > button[aria-pressed='true'] { background: #fa6c79; border-color: #fa6c79; color: #1f101b; }
.world-mode .experience-mode-switch > button[aria-pressed='true'] > span { color: #25111c; }
.world-mode .experience-notice { top: calc(var(--world-header-height) + 84px); bottom: auto; }
.world-experience { position: fixed; top: var(--world-header-height); left: 0; right: 0; bottom: 0; z-index: 0; background: #15121b; overflow: hidden; color: var(--world-paper); font-family: 'Manrope','Golos Text',sans-serif; }
#world-canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; outline-offset: -5px; }
#world-canvas:active { cursor: grabbing; }
.world-hud { position: absolute; inset: 0; pointer-events: none; }
.world-hud button, .world-hud a, .world-hud [data-world-joystick] { pointer-events: auto; }
.world-location-card { position: absolute; top: 25px; left: 28px; display: flex; align-items: start; gap: 12px; max-width: 310px; text-shadow: 0 2px 7px #0a0914; }
.world-signal { width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; background: #ff8e9a; box-shadow: 0 0 12px #ff6f7d88; }
.world-eyebrow { display: block; font: 600 9px/1.8 'Golos Text',sans-serif; letter-spacing: .15em; text-transform: uppercase; color: #e3b6c8; margin: 0 0 6px; }
.world-location-card strong { font-size: 16px; font-weight: 600; letter-spacing: -.025em; }
.world-challenge { position: absolute; top: 100px; right: 28px; width: 235px; padding: 16px 18px; background: #201729dc; border: 1px solid var(--world-line); border-radius: 5px; box-shadow: 0 10px 30px #08031322; }
.world-challenge > div:first-child { display: flex; justify-content: space-between; align-items: center; }
.world-challenge .world-eyebrow { margin: 0; }
.world-challenge > strong { display: block; font-size: 14px; font-weight: 650; margin: 7px 0 14px; }
.world-challenge > div > button { padding: 2px 8px; min-width: 30px; min-height: 30px; color: #e6bdd0; background: none; border: 0; cursor: pointer; font: 21px/1 sans-serif; }
.world-challenge-stats { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; font-variant-numeric: tabular-nums; }
.world-challenge-stats > span:first-child { color: #ffafb8; font-weight: 700; }
.world-challenge > p { font-size: 9px; line-height: 1.6; color: var(--world-muted); margin: 12px 0 0; }
.world-guide-button { width: 100%; min-height: 33px; margin-top: 12px; padding: 7px 8px; color: #ffcad7; background: #70405766; border: 1px solid #ac6c8955; border-radius: 3px; cursor: pointer; font: 600 10px/1.5 'Manrope',sans-serif; }
.world-guide-button:hover { background: #704057aa; }
.world-guide-button:disabled { opacity: .5; cursor: default; }
.world-crosshair { position: absolute; top: 48%; left: 50%; transform: translate(-50%,-50%); font: 20px/1 Consolas,monospace; opacity: .6; text-shadow: 0 1px 6px #000; }
.world-interaction { position: absolute; left: 50%; bottom: 124px; transform: translateX(-50%); max-width: min(480px,calc(100vw - 48px)); width: max-content; text-align: center; }
.world-interaction > p:first-child { color: #fff1f4; font-size: 13px; margin: 0 0 12px; text-shadow: 0 2px 9px #000; }
.world-interaction > button { display: inline-flex; align-items: center; gap: 13px; min-height: 46px; padding: 9px 19px 9px 10px; border: 1px solid #ffadbf; border-radius: 4px; background: #311b2beb; color: #fff0f5; font: 650 12px/1.5 'Manrope',sans-serif; cursor: pointer; }
.world-interaction > button:disabled { opacity: .65; border-color: #927888; cursor: default; }
.world-interaction > button:not(:disabled):hover { background: #653144; }
.world-interaction > .world-route-stop { margin-left: 9px; padding: 8px 12px; font-size: 10px; background: #2d2333d9; border-color: #ac8093; }
.world-interaction kbd, .world-controls-list kbd, .world-motion-readout kbd { background: #5f3449; border: 1px solid #93677e; border-radius: 3px; color: #ffe5ef; padding: 4px 7px; font: 11px/1.4 Consolas,monospace; }
#world-status { color: #f1cedd; font-size: 11px; line-height: 1.6; margin: 12px 0 0; text-shadow: 0 2px 8px #000; min-height: 18px; }
.world-motion-readout { position: absolute; bottom: 137px; left: 29px; width: 130px; padding-left: 12px; border-left: 1px solid #d2a5ba55; }
.world-motion-readout .world-eyebrow { font-size: 8px; margin-bottom: 4px; }
.world-motion-readout meter { display: block; width: 110px; height: 5px; margin-bottom: 14px; border: 0; background: #2f253d; accent-color: #ffa2b5; }
.world-motion-readout meter::-webkit-meter-bar { height: 5px; background: #493046; border: 0; border-radius: 0; }
.world-motion-readout meter::-webkit-meter-optimum-value { background: #fba6b8; }
.world-motion-readout small { display: block; color: #dac1d1; font-size: 9px; margin-top: 7px; }
.world-motion-readout kbd { padding: 2px 3px; font-size: 9px; }
.world-dock { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; align-items: stretch; gap: 3px; padding: 6px; max-width: calc(100vw - 48px); border: 1px solid #ad7f925c; border-radius: 7px; background: #211726ed; box-shadow: 0 12px 34px #04020666; }
.world-dock-label { writing-mode: vertical-rl; transform: rotate(180deg); align-self: center; font: 600 8px/1 'Golos Text',sans-serif; letter-spacing: .12em; color: #c697af; padding: 0 10px; }
.world-dock > button { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; min-width: 78px; min-height: 64px; padding: 7px 9px; border: 1px solid transparent; background: transparent; color: #e2c5d5; font: 550 10px/1.5 'Manrope',sans-serif; border-radius: 4px; cursor: pointer; }
.world-dock > button > span:first-child { font-size: 23px; font-weight: 400; line-height: 1.15; color: #f6a4b7; }
.world-dock > button:hover, .world-dock > button[aria-pressed='true'] { background: #513046; border-color: #9e667f; color: #fff3f6; }
.world-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: radial-gradient(ellipse at 50% 40%,#432131,#17111c 65%); padding: 30px; text-align: center; z-index: 3; }
.world-loader-mark { font: italic 900 clamp(100px,20vw,200px)/.9 'Roboto Condensed',sans-serif; letter-spacing: -.09em; color: #ff7784; margin: 0 15px 24px 0; }
.world-loading > h2 { font: 750 30px/1.2 'Manrope',sans-serif; letter-spacing: -.045em; margin: 0; }
.world-loading > p:not(.world-eyebrow) { color: #ceb0c0; font-size: 13px; }
.world-loader-line { display: block; width: 110px; height: 2px; background: linear-gradient(90deg,#673242,#ff8c9b,#673242); background-size: 200%; animation: world-loading-flow 1.5s linear infinite; }
.world-loading .world-subtle-button { margin-top: 16px; }
.world-performance { position: absolute; z-index: 5; top: 104px; left: 28px; max-width: 310px; background: #35202fef; border: 1px solid #cc879a; border-radius: 5px; padding: 18px; }
.world-performance > p { color: #f5dce5; font-size: 12px; line-height: 1.7; margin: 0 0 12px; }
.world-performance > button { cursor: pointer; color: #ffb5c7; background: transparent; border: 0; font-size: 12px; min-height: 38px; }
.world-performance > button:last-child { position: absolute; top: 4px; right: 6px; font-size: 19px; }
.world-terminal-chrome { position: fixed; z-index: 43; top: calc(var(--world-header-height) + 85px); left: 50%; transform: translateX(-50%); width: min(1170px,calc(100vw - 80px)); display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 63px; padding: 12px 25px; border: 1px solid #bc778b77; border-radius: 9px 9px 0 0; background: #271923f7; color: #fae8ef; }
.world-terminal-chrome .world-eyebrow { font-size: 8px; margin: 0 0 3px; }
.world-terminal-chrome strong { display: block; font: 650 12px/1.4 'Manrope',sans-serif; max-width: 650px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.world-terminal-chrome > button { display: flex; gap: 16px; align-items: center; flex-shrink: 0; min-height: 38px; cursor: pointer; padding: 6px 12px; border: 1px solid #926276; color: #f1ccdc; background: #3d2735; border-radius: 3px; font: 600 11px/1.4 'Manrope',sans-serif; }
.world-terminal-chrome > button > span { font-size: 21px; }
.world-mode #content { position: fixed; z-index: 42; top: calc(var(--world-header-height) + 147px); bottom: 24px; left: 50%; transform: translateX(-50%); width: min(1170px,calc(100vw - 80px)); max-width: none; margin: 0; padding: 0 34px 30px; overflow-y: auto; overscroll-behavior: contain; background: #17101bf7; border: 1px solid #bc778b77; border-top: 0; border-radius: 0 0 9px 9px; box-shadow: 0 30px 80px #060009aa; scrollbar-color: #875567 #241723; }
.world-mode #content.world-terminal-closed { display: none; }
.world-mode #content > .hub-page { padding-top: 32px; }
.world-mode #content > #redline-home { background: transparent; }
.world-mode #content [id] { scroll-margin-top: 25px; }
.world-mode.world-terminal-open .world-hud { visibility: hidden; }
.world-dialog { position: fixed; z-index: 100; margin: auto; width: min(520px,calc(100vw - 40px)); max-height: calc(100dvh - 50px); padding: 30px; border: 1px solid #b27690; border-radius: 9px; color: #f8e7ef; background: #261b2b; box-shadow: 0 25px 95px #08010ebf; font: 13px/1.8 'Manrope',sans-serif; }
.world-dialog::backdrop { background: #0a0712ba; }
.world-dialog-heading { display: flex; justify-content: space-between; align-items: start; gap: 24px; margin-bottom: 18px; }
.world-dialog-heading h2 { font-size: 28px; margin: 0; letter-spacing: -.04em; }
.world-dialog-heading > button { flex-shrink: 0; width: 40px; height: 40px; cursor: pointer; border: 1px solid #79566f; border-radius: 3px; background: #412e43; color: #ffe1ed; font-size: 22px; }
.world-dialog > p { color: #d9c1d2; }
.world-dialog .world-dialog-note { font-size: 11px; color: #bfa6ba; margin: 18px 0; }
.world-dialog .world-diagnostic { font: 10px/1.6 Consolas,monospace; color: #cbaaaf; }
.world-controls-list { display: grid; grid-template-columns: 1.05fr 1fr; gap: 13px 20px; font-size: 12px; padding-block: 20px; border-block: 1px solid #76516c55; }
.world-controls-list dt { color: #fce3ee; }
.world-controls-list dd { color: #cbb1c4; margin: 0; }
.world-primary-button { display: inline-flex; align-items: center; justify-content: center; padding: 12px 20px; min-height: 46px; background: #fa8698; border: 1px solid #fa8698; border-radius: 3px; color: #241321; cursor: pointer; font: 750 12px/1.5 'Manrope',sans-serif; }
.world-dialog > label { margin-top: 22px; }
.world-dialog input[type='range'] { accent-color: #ff9cb0; padding: 0; border: 0; }
.world-touch-controls, .world-touch-tip { display: none; }
@keyframes world-loading-flow { to { background-position: 200%; } }
@media (max-width: 1050px) {
  .world-location-card { top: 100px; }
  .world-mode .experience-controls { left: 22px; right: 22px; justify-content: space-between; }
  .experience-controls button { padding-inline: 10px; }
  .world-dock > button { min-width: 69px; }
  .world-motion-readout { left: 22px; width: 96px; }
  .world-motion-readout meter { width: 82px; }
}
@media (pointer: coarse), (max-width: 700px) {
  .world-touch-controls { display: flex; align-items: end; justify-content: space-between; pointer-events: none; position: absolute; left: 22px; right: 22px; bottom: 116px; }
  .world-joystick { position: relative; width: 108px; height: 108px; border: 1px solid #b08b9e77; border-radius: 50%; background: #3c284244; touch-action: none; cursor: grab; pointer-events: auto; }
  .world-joystick-ring { position: absolute; inset: 12px; border: 1px dashed #dfadc352; border-radius: 50%; }
  .world-joystick-handle { position: absolute; width: 38px; height: 38px; top: 34px; left: 34px; border: 1px solid #df9ab7; border-radius: 50%; background: #8c5a7777; }
  .world-touch-actions { display: flex; flex-direction: column; align-items: end; gap: 12px; }
  .world-touch-actions > button { min-height: 48px; padding: 12px 17px; border: 1px solid #d493af; border-radius: 5px; background: #3e2541c9; color: #ffe1ef; font: 650 12px/1 'Manrope',sans-serif; cursor: pointer; pointer-events: auto; touch-action: none; }
  .world-touch-actions > button:first-child { width: 48px; padding: 10px; }
  .world-touch-actions > button:active { background: #9c5275; }
  .world-motion-readout { display: none; }
  .world-interaction { bottom: 246px; }
  .world-interaction > button { display: none; }
  .world-interaction > .world-route-stop { display: inline-flex; margin-left: 0; min-height: 36px; }
  .world-touch-tip { display: block; position: absolute; bottom: 91px; left: 50%; transform: translateX(-50%); color: #dec5d6; font-size: 9px; white-space: nowrap; text-shadow: 0 2px 6px #000; }
}
@media (max-width: 700px) {
  .experience-controls { left: 12px; right: 12px; bottom: 12px; justify-content: center; padding: 5px; }
  .experience-controls button { min-height: 38px; font-size: 10px; padding: 8px 10px; }
  .world-mode .experience-controls { top: calc(var(--world-header-height) + 10px); left: 12px; right: 12px; flex-wrap: wrap; gap: 4px; justify-content: space-between; padding: 5px; max-width: none; }
  .world-mode .experience-game-tools { flex: 1; justify-content: end; padding-left: 0; border: 0; }
  .world-mode .experience-game-tools > button { font-size: 9px; padding-inline: 7px; }
  .world-mode .experience-game-tools > button:first-child { flex: 1; text-align: left; }
  .world-location-card { top: 118px; left: 18px; max-width: 195px; gap: 8px; }
  .world-location-card .world-eyebrow { font-size: 7px; letter-spacing: .08em; }
  .world-location-card strong { font-size: 12px; }
  .world-challenge { top: 118px; right: 14px; width: 136px; padding: 10px 11px; }
  .world-challenge .world-eyebrow { font-size: 7px; letter-spacing: .08em; }
  .world-challenge > strong { font-size: 10px; margin: 4px 0 9px; }
  .world-challenge-stats { gap: 6px; font-size: 10px; }
  .world-challenge > p { font-size: 8px; margin-top: 7px; }
  .world-guide-button { margin-top: 9px; min-height: 31px; font-size: 8px; padding-inline: 3px; }
  #world-challenge-score { display: none; }
  .world-challenge > div > button { padding: 0 1px; min-width: 20px; min-height: 24px; font-size: 18px; }
  .world-crosshair { top: 50%; }
  .world-dock { bottom: 14px; left: 12px; right: 12px; transform: none; max-width: none; padding: 4px; gap: 1px; }
  .world-dock-label { display: none; }
  .world-dock > button { min-width: 0; flex: 1; min-height: 61px; padding: 5px 2px; gap: 5px; font-size: 7px; letter-spacing: -.02em; }
  .world-dock > button > span:first-child { font-size: 22px; }
  .world-interaction { bottom: 253px; width: calc(100% - 40px); }
  .world-interaction > p:first-child { font-size: 11px; }
  #world-status { font-size: 10px; }
  .world-touch-controls { left: 19px; right: 19px; bottom: 119px; }
  .world-terminal-chrome { top: calc(var(--world-header-height) + 107px); width: calc(100vw - 24px); min-height: 58px; padding: 10px 14px; gap: 12px; }
  .world-terminal-chrome strong { max-width: 160px; font-size: 10px; }
  .world-terminal-chrome > button { font-size: 9px; gap: 8px; padding-inline: 8px; }
  .world-mode #content { top: calc(var(--world-header-height) + 164px); bottom: 12px; width: calc(100vw - 24px); padding: 0 17px 25px; }
  .world-mode #content .hub-page-header h1 { font-size: 30px; }
  .world-mode .experience-notice { top: calc(var(--world-header-height) + 110px); right: 12px; max-width: calc(100vw - 24px); }
  .world-performance { top: 228px; left: 18px; right: 18px; max-width: none; }
  .world-dialog { padding: 24px; }
  .world-dialog-heading h2 { font-size: 25px; }
  .world-controls-list { grid-template-columns: 1fr; gap: 7px; }
  .world-controls-list dd { margin-bottom: 10px; }
  .world-controls-list kbd { font-size: 10px; }
}
@media (max-width: 360px) {
  .world-location-card { max-width: 145px; }
  .world-location-card strong { font-size: 10px; }
  .world-challenge { width: 124px; }
  .world-dock > button { font-size: 6.5px; }
}
@media (max-height: 570px) and (min-width: 701px) {
  .world-challenge { top: 83px; }
  .world-location-card { display: none; }
  .world-touch-controls { bottom: 90px; }
  .world-interaction { bottom: 130px; }
  .world-dock { bottom: 12px; }
  .world-dock > button { min-height: 50px; }
  .world-motion-readout { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #experience-shell *, #experience-shell *::before, #experience-shell *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
