/* FoxHunt3D v8.0.1 — Mystery Forest reality vertical slice */
#mysteryForestAtmosphere {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 650ms ease;
  overflow: hidden;
  contain: strict;
}
body.mystery-forest-reality #mysteryForestAtmosphere { opacity: 1; }
#mysteryForestAtmosphere::before,
#mysteryForestAtmosphere::after {
  content: "";
  position: absolute;
  inset: -8%;
  pointer-events: none;
}
#mysteryForestAtmosphere::before {
  background:
    radial-gradient(circle at 76% 14%, rgba(227,246,226,.18), transparent 20%),
    radial-gradient(ellipse at 50% 100%, rgba(45,91,70,.24), transparent 55%),
    linear-gradient(180deg, rgba(5,13,18,.08), rgba(8,28,23,.14));
  mix-blend-mode: screen;
}
#mysteryForestAtmosphere::after {
  background:
    repeating-linear-gradient(105deg, transparent 0 42px, rgba(194,232,226,.07) 43px 45px, transparent 46px 90px),
    radial-gradient(ellipse at center, transparent 45%, rgba(0,8,9,.28) 100%);
  opacity: var(--mf-rain, 0);
  transform: translate3d(calc(var(--mf-wind, 0) * 2vw), -4%, 0);
  animation: mystery-forest-rain 680ms linear infinite;
}
body.mystery-forest-night #mysteryForestAtmosphere::before {
  background:
    radial-gradient(circle at 72% 14%, rgba(128,166,205,.16), transparent 18%),
    radial-gradient(ellipse at 50% 100%, rgba(15,62,52,.30), transparent 58%),
    linear-gradient(180deg, rgba(1,5,13,.30), rgba(4,17,18,.22));
}
@keyframes mystery-forest-rain {
  from { background-position: 0 -90px, 0 0; }
  to { background-position: 32px 90px, 0 0; }
}

#mysteryForestStatus {
  position: absolute;
  left: 50%;
  top: max(78px, calc(env(safe-area-inset-top) + 64px));
  z-index: 11;
  display: none;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 7px 11px;
  min-width: 252px;
  max-width: min(460px, calc(100vw - 28px));
  padding: 9px 12px;
  border: 1px solid rgba(157,228,201,.27);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(5,20,20,.82), rgba(7,31,25,.54));
  box-shadow: 0 12px 40px rgba(0,0,0,.24), inset 0 1px rgba(255,255,255,.04);
  color: #e9fff5;
  backdrop-filter: blur(10px) saturate(1.15);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  text-shadow: 0 2px 8px rgba(0,0,0,.8);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity 280ms ease, transform 280ms ease;
}
#mysteryForestStatus.visible {
  display: grid;
  opacity: .92;
  transform: translate(-50%, 0);
}
#mysteryForestStatus strong {
  grid-column: 1 / -1;
  color: #84efbd;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
#mysteryForestStatus span {
  color: #f5fff9;
  font: 800 12px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
}
#mysteryForestStatus span + span::before {
  content: "•";
  margin-right: 10px;
  color: rgba(132,239,189,.62);
}
#mysteryForestStatus small {
  grid-column: 1 / -1;
  color: rgba(221,246,233,.72);
  font-size: 10px;
  letter-spacing: .025em;
}

.mystery-forest-quick-launch {
  width: 100%;
  display: grid;
  grid-template-columns: 104px minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 10px 0 0;
  padding: 8px;
  border: 1px solid rgba(132,239,189,.22);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(8,31,25,.92), rgba(11,43,34,.66));
  color: #f2fff7;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  box-shadow: inset 0 1px rgba(255,255,255,.035);
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}
.mystery-forest-quick-launch:hover,
.mystery-forest-quick-launch:focus-visible,
.mystery-forest-quick-launch.selected {
  border-color: rgba(132,239,189,.68);
  background: linear-gradient(135deg, rgba(10,47,35,.98), rgba(14,61,44,.76));
  outline: none;
}
.mystery-forest-quick-launch:active { transform: translateY(1px); }
.mystery-forest-quick-launch img {
  width: 104px;
  height: 62px;
  display: block;
  object-fit: cover;
  border-radius: 9px;
  filter: saturate(.78) contrast(1.08) brightness(.88);
}
.mystery-forest-quick-launch span { min-width: 0; display: grid; gap: 3px; }
.mystery-forest-quick-launch strong {
  color: #a7f5cc;
  font-size: 13px;
  letter-spacing: .04em;
}
.mystery-forest-quick-launch small {
  color: rgba(226,247,236,.70);
  font-size: 10px;
  line-height: 1.35;
}
.mystery-forest-quick-launch b {
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(132,239,189,.12);
  color: #9cf2c4;
  font-size: 9px;
  letter-spacing: .12em;
}

.mystery-forest-settings {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(132,239,189,.22);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(8,31,25,.55), rgba(4,17,16,.42));
}
.mystery-forest-settings h3 {
  margin: 0 0 5px;
  color: #9cf2c4;
  font-size: 13px;
  letter-spacing: .10em;
  text-transform: uppercase;
}
.mystery-forest-settings p {
  margin: 0 0 12px;
  color: rgba(227,247,237,.66);
  font-size: 11px;
  line-height: 1.45;
}
.mystery-forest-settings label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  color: rgba(240,255,247,.82);
  font-size: 11px;
}
.mystery-forest-settings label:has(select) {
  display: grid;
  grid-template-columns: minmax(120px,1fr) minmax(145px,.8fr);
}
.mystery-forest-settings select {
  min-height: 34px;
  border: 1px solid rgba(132,239,189,.22);
  border-radius: 9px;
  background: rgba(3,17,15,.72);
  color: #effff5;
  padding: 6px 9px;
}
.mystery-forest-settings input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #68dca6;
}

@media (max-width: 720px) {
  #mysteryForestStatus {
    top: max(72px, calc(env(safe-area-inset-top) + 58px));
    left: 50%;
    min-width: 0;
    width: min(280px, calc(100vw - 104px));
    padding: 7px 9px;
    gap: 4px 8px;
    opacity: .78;
  }
  #mysteryForestStatus strong { font-size: 8px; }
  #mysteryForestStatus span { font-size: 10px; }
  #mysteryForestStatus small { font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mystery-forest-quick-launch { grid-template-columns: 76px minmax(0,1fr); }
  .mystery-forest-quick-launch img { width: 76px; height: 54px; }
  .mystery-forest-quick-launch b { display: none; }
  .mystery-forest-settings label:has(select) { grid-template-columns: 1fr; gap: 5px; }
}

@media (orientation: landscape) and (max-height: 500px) {
  #mysteryForestStatus {
    top: max(58px, calc(env(safe-area-inset-top) + 48px));
    width: auto;
    min-width: 220px;
    grid-template-columns: auto auto auto auto;
  }
  #mysteryForestStatus strong { grid-column: auto; }
  #mysteryForestStatus small { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  #mysteryForestAtmosphere::after { animation: none; }
}

body.mystery-forest-reality #gameRoot {
  background:
    radial-gradient(circle at 72% 13%, rgba(230,244,222,.22), transparent 18%),
    linear-gradient(180deg, var(--mystery-forest-sky, rgb(32 70 69)) 0%, rgb(20 57 46) 52%, rgb(10 29 24) 100%);
}
