:root {
  color-scheme: dark;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  color: #f7f6f1;
  background: #232328;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; width: 100%; min-height: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
#experience {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%; height: 100dvh;
  isolation: isolate;
  overflow: hidden;
  background: #808080;
  --side: clamp(1.35rem, 5vw, 5.5rem);
  --gain: .62;
  --light: 1;
  --grain-share: .60;
}
#experience:fullscreen { width: 100%; height: 100%; }
#field, .shade, #grain, #field video, .portrait, #end { position: absolute; inset: 0; width: 100%; height: 100%; }
#field { overflow: hidden; background: #808080; }
#grain { background: #808080 url('noise-still.jpg') center / cover no-repeat; }
#field video, .portrait { object-fit: cover; object-position: center; }
#grain { pointer-events: none; }
#grain video { filter: grayscale(1) contrast(1.35); }
.portrait { filter: grayscale(1) brightness(var(--light)) contrast(var(--gain)); }
#mirror { transform: scaleX(-1) scale(var(--camera-zoom, 1)); }
body[data-source] #grain { opacity: var(--grain-share); }
.shade {
  pointer-events: none;
  background: linear-gradient(180deg,rgba(16,16,19,.49),transparent 25%),
              linear-gradient(0deg,rgba(13,13,16,.91) 0%,rgba(16,16,20,.75) 25%,rgba(17,17,21,.14) 68%,transparent);
}
body[data-screen="look"] .shade { display: none; }
header { position: absolute; top: max(1rem,env(safe-area-inset-top)); left: max(var(--side),env(safe-area-inset-left)); right: max(var(--side),env(safe-area-inset-right)); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.signature { font-size: 1rem; font-weight: 500; letter-spacing: -.025em; }
.quiet, .text-button { padding: .6rem 0; min-height: 44px; border: 0; background: none; }
.quiet { min-width: 44px; text-align: right; font-size: .88rem; }
.panel { position: absolute; bottom: 0; left: 0; right: 0; padding: 1rem max(var(--side),env(safe-area-inset-right)) max(1.1rem,env(safe-area-inset-bottom)) max(var(--side),env(safe-area-inset-left)); max-height: calc(100% - 5rem); overflow-y: auto; }
.copy { max-width: 44rem; }
h1, .setup-title { font-family: "Instrument Serif", "Baskerville", "Times New Roman", serif; font-weight: 400; }
h1 { margin: 0 0 .25em; font-size: clamp(3.35rem,8vw,7.5rem); line-height: .98; letter-spacing: -.061em; }
h1 em { font-weight: 400; }
p { margin: 0; }
.lead { font-size: clamp(1rem,1.9vw,1.28rem); line-height: 1.4; max-width: 31rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.35rem; margin: 1.4rem 0 .63rem; }
.primary { min-height: 46px; padding: .75rem 1.28rem; border: 1px solid #f4f3ee; border-radius: 3px; background: #f4f3ee; color: #202024; font-weight: 600; }
.primary:disabled { opacity: .7; }
.text-button, .project { text-decoration: underline; text-decoration-color: #b6b5b4; text-underline-offset: .26em; text-decoration-thickness: 1px; }
.text-button { font-size: .98rem; }
.fine, .project { font-size: .875rem; line-height: 1.45; color: #e0dfdc; }
.project { display: inline-flex; min-height: 44px; align-items: center; margin-top: clamp(.55rem,4vh,2.4rem); }
.setup-title { margin: 0 0 .48rem; font-size: clamp(1.95rem,4vw,3rem); line-height: 1.05; letter-spacing: -.035em; }
.hint, .notice { font-size: 1rem; line-height: 1.42; }
.hint { max-width: 34rem; }
#light-hint:not(:empty) { font-weight: 600; margin-bottom: .28rem; }
.notice:not(:empty) { margin-top: .5rem; max-width: 36rem; }
#end { z-index: 3; border: 0; padding: 0; background: transparent; color: transparent; touch-action: manipulation; cursor: default; }
#end:focus-visible { outline: 1px solid rgba(255,255,255,.6); outline-offset: -2px; }
.stop-label {
  position: absolute;
  right: calc(env(safe-area-inset-right, 0px) + 1rem);
  bottom: calc(env(safe-area-inset-bottom, 0px) + .8rem);
  font-size: .8125rem;
  line-height: 1.2;
  color: #f4f3ee;
  text-shadow: 0 1px 3px #222, 0 0 2px #333;
}
#motion-warning {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(3.5rem, 19vh, 10rem) var(--side) 0;
  background: rgba(149, 16, 29, .38);
  pointer-events: none;
}
#motion-warning p {
  max-width: 25rem;
  padding: .5rem .85rem;
  background: rgba(63, 12, 19, .72);
  color: #fff;
  font-size: 1rem;
  line-height: 1.4;
  text-align: center;
}
.noscript { position: absolute; right: 1rem; top: 4.5rem; left: 1rem; background: #252525; padding: 1rem; }
@media (min-width: 760px) and (min-height: 550px) {
  .panel { padding-bottom: max(2rem,env(safe-area-inset-bottom)); }
  #prepare, #waiting { padding-bottom: max(3.25rem,env(safe-area-inset-bottom)); }
}
@media (max-height: 480px) {
  header { top: max(.24rem,env(safe-area-inset-top)); }
  h1 { font-size: 2.8rem; }
  .setup-title { font-size: 1.8rem; }
  .actions { margin: .55rem 0 .2rem; }
  .project { margin-top: 0; }
  .panel { padding-bottom: max(.3rem,env(safe-area-inset-bottom)); max-height: calc(100% - 3.2rem); }
}
