* {
  box-sizing: border-box;
}
html,
body,
main {
  width: 100%;
  height: 100%;
  overflow: hidden;
  margin: 0;
  background: #202a26;
  font-family: Bahnschrift, "Segoe UI", sans-serif;
}
#view {
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
}
#cabUi {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #211f1b;
  z-index: 2;
}
[hidden] {
  display: none !important;
}
#notice {
  position: absolute;
  left: 50%;
  bottom: 6%;
  transform: translateX(-50%);
  color: #ece1ca;
  text-shadow: 0 1px 3px #100e0c, 0 2px 7px #100e0c;
  font-size: 14px;
  pointer-events: none;
}
#notice:empty {
  display: none;
}
#use-hint {
  position: absolute;
  left: 50%;
  bottom: 12.5%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: .55em;
  color: #f0e4c9;
  font-size: 14px;
  text-shadow: 0 1px 3px #0e0e0b, 0 1px 6px #16110d;
  pointer-events: none;
}
#use-hint kbd {
  border: 1px solid rgba(241,232,214,.67);
  border-radius: 2px;
  padding: 1px 4px;
  color: #f2eadb;
  background: transparent;
  font: 12px Bahnschrift, sans-serif;
}
#error {
  position: absolute;
  z-index: 5;
  inset: 24%;
  background: #252c25;
  color: #f1dfb9;
  padding: 24px;
}

#cabUi.departing { opacity:0; transition:opacity 1.32s cubic-bezier(.34,.02,.44,.98); pointer-events:none; }
#skip-arrival {
 position:absolute; bottom:4.5%; right:3.2%; z-index:3; color:#e2d4bc; background:rgba(24,19,16,.67);
 border:0; border-bottom:1px solid #938471; padding:7px 9px 6px; cursor:pointer;
 font:13px Bahnschrift,"Segoe UI",sans-serif; letter-spacing:.025em;
}
#skip-arrival kbd { margin-left:5px; font:10px ui-monospace,monospace; opacity:.78; }
#skip-arrival:focus-visible { outline:2px solid #dfc498; outline-offset:3px; }
@media(prefers-reduced-motion: reduce){#cabUi.departing{transition:none}}

#cure-response {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: url("./tex/cure-periphery.png") center / 100% 100% no-repeat;
  opacity: 0;
}
#cure-response.active { animation: cure-periphery 4.3s ease-in-out both; }
#cure-response.active.reduced { animation-name: cure-periphery-soft; }
#view.recovering-focus { animation: cure-focus 4.3s ease-in-out both; }
@keyframes cure-periphery {
  0%, 100% { opacity: 0; }
  14% { opacity: .94; }
  34% { opacity: .62; }
  50% { opacity: .78; }
  75% { opacity: .32; }
}
@keyframes cure-periphery-soft {
  0%, 100% { opacity: 0; }
  24% { opacity: .55; }
}
@keyframes cure-focus {
  0%, 100% { filter: none; }
  16% { filter: blur(1.45px) saturate(.63); }
  42% { filter: blur(.45px) saturate(.78); }
  70% { filter: saturate(.90); }
}
@media (prefers-reduced-motion: reduce) {
  #cure-response.active { animation-name: cure-periphery-soft; }
  #view.recovering-focus { animation: none; }
}

#viewport::after{content:"";position:absolute;inset:0;background:#060908;opacity:0;pointer-events:none;transition:opacity .22s;z-index:4}
#viewport.cave-transition::after{opacity:1}


