/* Copyright (c) 2026 TJ Murphy / Vermillion Aurora Productions
   All rights reserved. No use, copying, modification, or distribution
   without a written license. Contact tj@tjm.art.
   License: neural-dance/LICENSE */

/* Home Screen WebClip and display-mode: standalone.
   Hide tjm.art chrome. The room-music stage fills the viewport.
   Controls stay inside the safe areas (Dynamic Island, home indicator). */

@media all and (display-mode: standalone) {
  html, body { background: #070a12; }
  .site-header, .site-footer, .skip-link { display: none !important; }
  body:not(.nd-live) { margin: 0; padding: 0 !important; overflow: hidden; height: 100dvh; }
  body:not(.nd-live) .app { width: 100%; max-width: none; margin: 0; min-height: 100dvh; }
  body:not(.nd-live) a.back,
  body:not(.nd-live) .project-story,
  body:not(.nd-live) .sub,
  body:not(.nd-live) .app > h1,
  body:not(.nd-live) #nd-mural-mapped,
  body:not(.nd-live) #original-simulation .prototype-note,
  body:not(.nd-live) #original-simulation .stage,
  body:not(.nd-live) #original-simulation .status,
  body:not(.nd-live) #original-simulation .performance-note,
  body:not(.nd-live) #nd-room-lab .mural-help,
  body:not(.nd-live) #nd-camera-mode .mural-help { display: none !important; }
  body:not(.nd-live) #nd-room-projector {
    position: fixed !important;
    inset: 0 !important;
    z-index: 0;
    width: 100%;
    height: 100dvh;
    margin: 0 !important;
    pointer-events: auto;
    background: #070a12;
  }
  body:not(.nd-live) #nd-room-lab [data-stage] {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    background: #070a12;
  }
  body:not(.nd-live) #nd-room-lab {
    position: fixed;
    z-index: 4;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
    height: 100dvh;
    margin: 0 !important;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    border: 0 !important;
    overflow: visible;
    pointer-events: none;
    background: transparent;
  }
  body:not(.nd-live) #nd-room-lab > .viz-row,
  body:not(.nd-live) #nd-room-lab > .viz-controls,
  body:not(.nd-live) #nd-room-lab > [data-spectrum],
  body:not(.nd-live) #nd-room-lab > .text-small {
    position: relative;
    z-index: 2;
    pointer-events: auto;
  }
  body:not(.nd-live) #nd-room-lab > .viz-controls {
    max-height: 30dvh;
    overflow: auto;
    margin-bottom: 8px;
  }
  body:not(.nd-live) #original-simulation {
    position: fixed;
    z-index: 7;
    left: env(safe-area-inset-left);
    bottom: env(safe-area-inset-bottom);
    width: min(440px, 54vw);
    max-height: 32dvh;
    margin: 0;
    padding: 6px 8px;
    border: 0;
    overflow: auto;
    box-sizing: border-box;
    background: rgba(7, 10, 18, .94);
  }
  body:not(.nd-live) #original-simulation .controls { margin: 0; }
  body:not(.nd-live) #nd-camera-mode {
    position: fixed;
    z-index: 7;
    right: env(safe-area-inset-right);
    bottom: env(safe-area-inset-bottom);
    left: auto;
    width: min(280px, 42vw);
    max-height: 42dvh;
    margin: 0;
    padding: 8px;
    border: 0;
    overflow: auto;
    box-sizing: border-box;
    background: rgba(7, 10, 18, .94);
  }
  body.nd-live .nd-live-chrome {
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    box-sizing: border-box;
  }
  body.nd-live #nd-camera-mode {
    right: calc(8px + env(safe-area-inset-right));
    bottom: calc(8px + env(safe-area-inset-bottom));
  }
  body.nd-live .nd-live-reveal {
    top: calc(8px + env(safe-area-inset-top));
    left: calc(8px + env(safe-area-inset-left));
  }
  body.nd-live,
  body.nd-live #nd-room-projector { background: #070a12; }
}

html.nd-standalone,
html.nd-standalone body { background: #070a12; }
html.nd-standalone .site-header,
html.nd-standalone .site-footer,
html.nd-standalone .skip-link { display: none !important; }
html.nd-standalone body:not(.nd-live) { margin: 0; padding: 0 !important; overflow: hidden; height: 100dvh; }
html.nd-standalone body:not(.nd-live) .app { width: 100%; max-width: none; margin: 0; min-height: 100dvh; }
html.nd-standalone body:not(.nd-live) a.back,
html.nd-standalone body:not(.nd-live) .project-story,
html.nd-standalone body:not(.nd-live) .sub,
html.nd-standalone body:not(.nd-live) .app > h1,
html.nd-standalone body:not(.nd-live) #nd-mural-mapped,
html.nd-standalone body:not(.nd-live) #original-simulation .prototype-note,
html.nd-standalone body:not(.nd-live) #original-simulation .stage,
html.nd-standalone body:not(.nd-live) #original-simulation .status,
html.nd-standalone body:not(.nd-live) #original-simulation .performance-note,
html.nd-standalone body:not(.nd-live) #nd-room-lab .mural-help,
html.nd-standalone body:not(.nd-live) #nd-camera-mode .mural-help { display: none !important; }
html.nd-standalone body:not(.nd-live) #nd-room-projector {
  position: fixed !important;
  inset: 0 !important;
  z-index: 0;
  width: 100%;
  height: 100dvh;
  margin: 0 !important;
  pointer-events: auto;
  background: #070a12;
}
html.nd-standalone body:not(.nd-live) #nd-room-lab [data-stage] {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  background: #070a12;
}
html.nd-standalone body:not(.nd-live) #nd-room-lab {
  position: fixed;
  z-index: 4;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
  height: 100dvh;
  margin: 0 !important;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  border: 0 !important;
  overflow: visible;
  pointer-events: none;
  background: transparent;
}
html.nd-standalone body:not(.nd-live) #nd-room-lab > .viz-row,
html.nd-standalone body:not(.nd-live) #nd-room-lab > .viz-controls,
html.nd-standalone body:not(.nd-live) #nd-room-lab > [data-spectrum],
html.nd-standalone body:not(.nd-live) #nd-room-lab > .text-small {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}
html.nd-standalone body:not(.nd-live) #nd-room-lab > .viz-controls {
  max-height: 30dvh;
  overflow: auto;
  margin-bottom: 8px;
}
html.nd-standalone body:not(.nd-live) #original-simulation {
  position: fixed;
  z-index: 7;
  left: env(safe-area-inset-left);
  bottom: env(safe-area-inset-bottom);
  width: min(440px, 54vw);
  max-height: 32dvh;
  margin: 0;
  padding: 6px 8px;
  border: 0;
  overflow: auto;
  box-sizing: border-box;
  background: rgba(7, 10, 18, .94);
}
html.nd-standalone body:not(.nd-live) #original-simulation .controls { margin: 0; }
html.nd-standalone body:not(.nd-live) #nd-camera-mode {
  position: fixed;
  z-index: 7;
  right: env(safe-area-inset-right);
  bottom: env(safe-area-inset-bottom);
  left: auto;
  width: min(280px, 42vw);
  max-height: 42dvh;
  margin: 0;
  padding: 8px;
  border: 0;
  overflow: auto;
  box-sizing: border-box;
  background: rgba(7, 10, 18, .94);
}
html.nd-standalone body.nd-live .nd-live-chrome {
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  box-sizing: border-box;
}
html.nd-standalone body.nd-live #nd-camera-mode {
  right: calc(8px + env(safe-area-inset-right));
  bottom: calc(8px + env(safe-area-inset-bottom));
}
html.nd-standalone body.nd-live .nd-live-reveal {
  top: calc(8px + env(safe-area-inset-top));
  left: calc(8px + env(safe-area-inset-left));
}
html.nd-standalone body.nd-live,
html.nd-standalone body.nd-live #nd-room-projector { background: #070a12; }
