:root {
  --ink: #e9f0f1;
  --muted: #7d8c91;
  --dim: #44545b;
  --line: rgba(157, 188, 194, .17);
  --cyan: #9fe4df;
  --amber: #d9aa71;
  --panel: rgba(8, 15, 20, .82);
  --mono: "IBM Plex Mono", monospace;
  --sans: "DM Sans", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #030609; color: var(--ink); font-family: var(--sans); }
button, input, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 1px solid var(--cyan); outline-offset: 4px; }
button { cursor: pointer; }
#experience, #viewport { position: absolute; inset: 0; }
#viewport canvas { display: block; width: 100%; height: 100%; cursor: grab; }
#viewport canvas:active { cursor: grabbing; }
.vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 46%, transparent 35%, rgba(0, 2, 5, .28) 72%, rgba(0, 2, 4, .75) 115%); }
.grain { position: absolute; inset: -50%; width: 200%; height: 200%; pointer-events: none; opacity: .045; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E"); animation: grain .25s steps(2) infinite; }
@keyframes grain { 0% { transform: translate(0,0) } 25% { transform: translate(2%,-3%) } 50% { transform: translate(-3%,2%) } 75% { transform: translate(3%,4%) } }
.topbar { position: absolute; z-index: 20; left: 0; top: 0; width: 100%; height: 88px; padding: 0 38px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(3,7,10,.64), transparent); }
.identity { display: flex; align-items: center; gap: 13px; text-decoration: none; color: var(--ink); }
.sigil { width: 31px; height: 34px; position: relative; display: flex; align-items: center; justify-content: center; gap: 3px; transform: skewY(-12deg); }
.sigil i { display: block; width: 5px; height: 26px; border: 1px solid #b4cccd; }
.sigil i:nth-child(2) { height: 34px; background: rgba(159,228,223,.18); }
.identity-copy { display: flex; flex-direction: column; }
.identity-copy strong { font-weight: 500; font-size: 18px; letter-spacing: .28em; line-height: 1.15; }
.identity-copy small { font: 8px/1.8 var(--mono); letter-spacing: .15em; color: var(--muted); }
.top-center { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; font: 9px var(--mono); letter-spacing: .16em; color: #89999e; }
.live-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.top-actions { display: flex; gap: 20px; align-items: center; }
.text-button, .sound-button { border: 0; background: none; padding: 10px 0; font: 9px var(--mono); letter-spacing: .12em; color: #a8b7ba; }
.text-button:hover, .sound-button:hover { color: #fff; }
.replay-icon { font-size: 15px; margin-right: 7px; }
.action-divider { height: 18px; width: 1px; background: var(--line); }
.sound-button { display: flex; align-items: center; gap: 10px; min-width: 112px; }
.sound-bars { display: flex; height: 13px; align-items: center; gap: 2px; }
.sound-bars i { width: 2px; height: 4px; background: var(--cyan); transition: height .3s; }
.sound-bars i:nth-child(2) { height: 10px; }.sound-bars i:nth-child(3) { height: 7px; }.sound-bars i:nth-child(4) { height: 12px; }
.sound-on .sound-bars i { animation: levels .9s ease-in-out infinite alternate; }
.sound-on .sound-bars i:nth-child(2) { animation-delay: -.3s; }.sound-on .sound-bars i:nth-child(3) { animation-delay: -.6s; }
@keyframes levels { to { height: 3px; } }
.hidden { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
.arrival-ui { position: absolute; inset: 0; z-index: 5; transition: opacity .8s, visibility .8s; }
.chapter-index { position: absolute; left: 40px; top: 121px; display: flex; align-items: center; gap: 10px; font: 9px var(--mono); color: var(--muted); }
.chapter-index span:first-child { color: var(--ink); }
.chapter-index i { width: 42px; height: 1px; background: var(--dim); }
.arrival-heading { position: absolute; left: 40px; top: 151px; }
.arrival-heading p { margin: 0 0 8px; font: 10px var(--mono); letter-spacing: .23em; color: #c4d2d4; }
.arrival-heading span { font: 8px var(--mono); letter-spacing: .12em; color: #53676e; }
.caption-wrap { position: absolute; left: 50%; bottom: 160px; transform: translateX(-50%); width: min(690px, 70vw); text-align: center; }
.caption-rule { margin: 0 auto 20px; width: 1px; height: 26px; background: linear-gradient(transparent, #82999c); }
#caption { margin: 0; min-height: 34px; font-size: clamp(18px, 2vw, 27px); font-weight: 300; letter-spacing: .02em; line-height: 1.4; color: #edf3f2; text-shadow: 0 2px 20px #000; transition: opacity .25s; }
.arrival-bottom { position: absolute; left: 40px; right: 40px; bottom: 39px; display: flex; align-items: flex-end; gap: 50px; }
.arrival-progress { flex: 1; max-width: 600px; }
.timecode { display: flex; justify-content: space-between; margin-bottom: 12px; font: 9px var(--mono); color: #65787e; }
.timecode span:first-child { color: #cad7d8; }
input[type="range"] { appearance: none; -webkit-appearance: none; height: 2px; background: linear-gradient(90deg, var(--cyan) var(--range, 0%), rgba(135,162,168,.25) var(--range, 0%)); width: 100%; display: block; cursor: pointer; margin: 0; }
input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 7px; height: 7px; border-radius: 50%; background: #d5edeb; box-shadow: 0 0 10px rgba(159,228,223,.7); }
.chapter-ticks { display: flex; justify-content: space-between; margin-top: 7px; }
.chapter-ticks i { width: 1px; height: 4px; background: #53646a; }
.skip-button { margin-left: auto; width: 206px; height: 58px; border: 1px solid rgba(169,200,202,.3); background: rgba(8,15,19,.42); backdrop-filter: blur(10px); display: grid; grid-template-columns: 1fr 24px; grid-template-rows: 1fr 1fr; text-align: left; padding: 12px 14px 10px 17px; transition: background .25s, border-color .25s; }
.skip-button:hover { background: rgba(111,160,160,.15); border-color: var(--cyan); }
.skip-button span { font: 10px var(--mono); letter-spacing: .13em; }
.skip-button small { font: 8px var(--mono); letter-spacing: .12em; color: var(--muted); }
.skip-button b { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 22px; font-weight: 300; color: var(--cyan); }
.cinema-bar { position: absolute; left: 0; right: 0; height: 10px; background: #020405; pointer-events: none; }
.cinema-top { top: 0; }.cinema-bottom { bottom: 0; }

.dissection-ui { position: absolute; inset: 0; z-index: 6; opacity: 1; visibility: visible; transition: opacity 1s, visibility 1s; pointer-events: none; }
.dissection-ui button, .dissection-ui input, .detail-panel, .left-rail, .systems-nav { pointer-events: auto; }
.left-rail { position: absolute; top: 122px; left: 38px; width: 245px; }
.section-kicker, .control-label { font: 8px var(--mono); letter-spacing: .18em; color: #71868c; }
.left-rail h1 { margin: 20px 0 14px; font-size: 47px; line-height: .96; letter-spacing: -.045em; font-weight: 300; }
.left-rail h1 em { font-style: normal; color: #92b7b7; }
.intro { color: #7e9197; font-size: 12px; font-weight: 300; line-height: 1.65; }
.ship-specs { margin-top: 28px; border-top: 1px solid var(--line); }
.ship-specs > div { min-height: 49px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.ship-specs span { font: 7px var(--mono); letter-spacing: .12em; color: #6c7f84; }
.ship-specs strong { font: 17px var(--mono); font-weight: 300; letter-spacing: -.05em; }
.ship-specs strong small { font-size: 9px; color: var(--muted); letter-spacing: 0; }
.ship-specs .small-value { font-size: 9px; letter-spacing: .08em; }
.view-control { margin-top: 25px; }
.control-label { display: block; margin-bottom: 10px; }
.segmented { display: flex; border: 1px solid var(--line); }
.segmented button { flex: 1; height: 30px; padding: 0 5px; border: 0; border-right: 1px solid var(--line); background: rgba(5,10,13,.35); font: 7px var(--mono); letter-spacing: .04em; color: #65777d; }
.segmented button:last-child { border: 0; }
.segmented button.active { color: #d8efeb; background: rgba(112,165,161,.14); box-shadow: inset 0 -1px var(--cyan); }
.separation-control { display: block; margin-top: 18px; }
.separation-control > span { display: flex; justify-content: space-between; margin-bottom: 13px; font: 7px var(--mono); letter-spacing: .1em; color: #6c8085; }
.separation-control output { color: #b7cccb; }
.separation-control input { height: 1px; }
.cutaway-button { display: flex; width: 100%; align-items: center; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 15px 0; font: 7px var(--mono); letter-spacing: .08em; color: #809399; }
.cutaway-button i { margin-left: auto; font-style: normal; color: #62757a; }
.cutaway-button.active i { color: var(--cyan); }
.cut-icon { font-size: 13px; margin-right: 8px; }
.detail-panel { position: absolute; top: 108px; right: 30px; width: 322px; max-height: calc(100vh - 226px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #33484c transparent; padding: 21px 23px 18px; background: linear-gradient(135deg, rgba(12,21,26,.91), rgba(6,12,16,.78)); border: 1px solid rgba(140,171,176,.18); backdrop-filter: blur(18px); box-shadow: 0 20px 80px rgba(0,0,0,.22); }
.detail-panel:before { content: ""; position: absolute; left: -1px; top: 24px; height: 43px; width: 1px; background: var(--cyan); }
.panel-topline { display: flex; justify-content: space-between; font: 7px var(--mono); letter-spacing: .14em; color: #778c91; }
.part-title-row { display: flex; align-items: center; gap: 12px; margin-top: 19px; }
.part-title-row > span { color: var(--cyan); font: 21px var(--mono); }
.part-title-row h2 { font-size: 27px; line-height: 1.1; font-weight: 300; letter-spacing: -.025em; margin: 0; }
.part-subtitle { margin: 16px 0 20px; font-size: 12px; line-height: 1.65; font-weight: 300; color: #9babad; }
.part-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 23px; }
.part-stats > div { background: rgba(8,15,19,.96); padding: 10px 11px; }
.part-stats span { display: block; font: 6px var(--mono); letter-spacing: .12em; color: #687c81; margin-bottom: 6px; }
.part-stats strong { font: 12px var(--mono); font-weight: 300; color: #d2dedd; }
.principle h3, .system-notes h3 { font: 7px var(--mono); letter-spacing: .16em; color: #829b9e; margin: 0 0 10px; }
.principle p { margin: 0; font-size: 11px; line-height: 1.72; color: #a8b6b8; font-weight: 300; }
.system-notes { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.system-notes ul { list-style: none; margin: 0; padding: 0; }
.system-notes li { position: relative; padding-left: 13px; margin: 8px 0; font: 8px/1.55 var(--mono); color: #7f9297; }
.system-notes li:before { content: ""; position: absolute; left: 0; top: 6px; width: 4px; height: 1px; background: var(--cyan); }
.next-part { margin-top: 19px; width: 100%; border: 0; border-top: 1px solid var(--line); background: transparent; padding: 15px 0 0; text-align: left; display: grid; grid-template-columns: 1fr 20px; }
.next-part span { grid-column: 1; font: 6px var(--mono); letter-spacing: .15em; color: #657c81; }
.next-part strong { grid-column: 1; margin-top: 4px; font-size: 11px; font-weight: 400; color: #b9c9ca; }
.next-part b { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--cyan); font-weight: 300; font-size: 19px; }
.systems-nav { position: absolute; height: 73px; left: 314px; right: 385px; bottom: 28px; display: flex; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(6,12,16,.3), rgba(6,12,16,.68)); backdrop-filter: blur(6px); }
.system-button { position: relative; flex: 1; min-width: 0; padding: 13px 5px 9px; border: 0; border-right: 1px solid var(--line); background: transparent; text-align: center; color: #73878b; }
.system-button:last-child { border: 0; }
.system-button:hover { background: rgba(136,185,184,.06); color: #bccdcd; }
.system-button.active { color: #d8eae7; background: rgba(136,185,184,.09); }
.system-button.active:before { content: ""; position: absolute; top: -1px; left: 20%; right: 20%; height: 1px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.system-button small { display: block; font: 7px var(--mono); color: #53696e; margin-bottom: 8px; }
.system-button span { display: block; font: 7px/1.3 var(--mono); letter-spacing: .03em; white-space: normal; }
.interaction-hint { position: absolute; left: calc(50% - 35px); transform: translateX(-50%); bottom: 115px; display: flex; align-items: center; gap: 9px; font: 7px var(--mono); letter-spacing: .09em; color: #546b70; white-space: nowrap; }
.interaction-hint i { font-style: normal; color: #405359; }
.mouse-icon { width: 9px; height: 13px; border: 1px solid #536a70; border-radius: 5px; position: relative; }
.mouse-icon:after { content: ""; position: absolute; left: 3px; top: 2px; width: 1px; height: 3px; background: #6d898e; }
.orientation-gizmo { position: absolute; left: 43px; bottom: 37px; }
.orbit-ring { width: 48px; height: 48px; border: 1px solid #2a3c41; border-radius: 50%; position: relative; transform: rotateX(55deg) rotateZ(-25deg); }
.orbit-ring:before, .orbit-ring:after { content: ""; position: absolute; background: #344a50; }
.orbit-ring:before { width: 62px; height: 1px; left: -8px; top: 23px; }.orbit-ring:after { width: 1px; height: 62px; left: 23px; top: -8px; }
.orbit-ring i { position: absolute; left: 21px; top: 21px; width: 5px; height: 5px; background: #90b4b4; border-radius: 50%; }
.orbit-ring b { position: absolute; top: -17px; left: 20px; font: 7px var(--mono); color: #779295; }
.orientation-gizmo > span { display: block; margin-top: 10px; font: 6px var(--mono); letter-spacing: .12em; color: #4e656a; }
.reset-view { position: absolute; right: 39px; bottom: 29px; border: 0; background: none; color: #647b80; font: 8px var(--mono); letter-spacing: .1em; }
.reset-view:hover { color: var(--cyan); }
.labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.part-label { position: absolute; display: flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px; color: #9bb1b3; pointer-events: auto; transform: translate(-50%, -50%); opacity: .75; transition: opacity .2s, color .2s; white-space: nowrap; }
.part-label:before { content: ""; width: 5px; height: 5px; border: 1px solid #91b8b7; transform: rotate(45deg); box-shadow: 0 0 8px rgba(145,209,203,.25); }
.part-label span { font: 7px var(--mono); letter-spacing: .08em; text-shadow: 0 1px 5px #000, 0 1px 8px #000; }
.part-label:hover, .part-label.active { opacity: 1; color: #e2f6f2; }
.part-label.active:before { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.part-label.behind { display: none; }
.toast { position: absolute; z-index: 40; left: 50%; top: 104px; transform: translate(-50%, -10px); padding: 9px 14px; border: 1px solid var(--line); background: rgba(8,17,21,.85); color: #9fb7b7; font: 8px var(--mono); letter-spacing: .12em; opacity: 0; transition: .35s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.loading { position: absolute; z-index: 100; inset: 0; background: #04080b; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: opacity 1.2s, visibility 1.2s; }
.loading.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-sigil { width: 35px; height: 35px; border: 1px solid #38565a; border-top-color: #b2d8d3; transform: rotate(45deg); animation: load 1.6s linear infinite; }
.loading p { margin: 28px 0 8px; font: 9px var(--mono); letter-spacing: .25em; color: #b8cccc; }
.loading small { font: 7px var(--mono); letter-spacing: .13em; color: #4c656a; }
@keyframes load { to { transform: rotate(405deg); } }

@media (max-width: 1100px) {
  .left-rail { left: 25px; width: 205px; }
  .left-rail h1 { font-size: 40px; }
  .detail-panel { right: 20px; width: 290px; }
  .systems-nav { left: 250px; right: 330px; }
  .system-button span { font-size: 6px; }
  .topbar { padding: 0 25px; }
  .top-center { display: none; }
}
@media (max-height: 780px) {
  .left-rail { top: 105px; }
  .left-rail h1 { font-size: 37px; margin-top: 14px; }
  .intro { display: none; }
  .ship-specs { margin-top: 18px; }
  .ship-specs > div { min-height: 39px; }
  .view-control { margin-top: 18px; }
  .detail-panel { top: 98px; max-height: calc(100vh - 198px); }
  .part-subtitle { margin: 12px 0 15px; }
  .part-stats { margin-bottom: 17px; }
  .system-notes { margin-top: 15px; padding-top: 13px; }
  .systems-nav { bottom: 22px; height: 62px; }
  .interaction-hint { bottom: 94px; }
}
@media (max-width: 760px) {
  .topbar { height: 68px; padding: 0 16px; }
  .identity-copy small, .text-button, .action-divider { display: none; }
  .sound-button { min-width: auto; }
  #soundLabel { font-size: 7px; }
  .left-rail { top: 85px; left: 17px; width: 150px; }
  .left-rail h1, .intro, .ship-specs, .section-kicker { display: none; }
  .view-control { margin: 0; }
  .segmented { flex-direction: column; width: 90px; }
  .segmented button { border-right: 0; border-bottom: 1px solid var(--line); }
  .separation-control { width: 125px; }
  .cutaway-button { width: 140px; line-height: 1.5; }
  .detail-panel { top: auto; bottom: 100px; left: 16px; right: 16px; width: auto; max-height: 39vh; padding: 15px 18px; }
  .part-title-row { margin-top: 10px; }.part-title-row h2 { font-size: 21px; }
  .part-subtitle { margin: 10px 0; }.part-stats { margin-bottom: 12px; }
  .system-notes { display: none; }
  .next-part { display: none; }
  .systems-nav { left: 16px; right: 16px; bottom: 21px; height: 60px; overflow-x: auto; }
  .system-button { min-width: 70px; }
  .interaction-hint, .orientation-gizmo, .reset-view { display: none; }
  .part-label span { display: none; }
  .arrival-heading, .chapter-index { left: 20px; }
  .arrival-bottom { left: 20px; right: 20px; gap: 18px; }
  .skip-button { width: 145px; }
  .skip-button span { font-size: 8px; }
  .caption-wrap { bottom: 150px; width: 85vw; }
}
