@font-face {
  font-family: Outfit;
  src: url("/fonts/outfit-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Outfit;
  src: url("/fonts/outfit-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Outfit;
  src: url("/fonts/outfit-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #07080c;
  --ink: #f3eee4;
  --muted: #b7b0a4;
  --dim: #7a746a;
  --line: rgba(243, 238, 228, 0.14);
  --accent: #e8a14a;
  --glass: rgba(10, 11, 16, 0.62);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  color-scheme: dark;
  font-family: Outfit, "Avenir Next", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  overflow: hidden;
}

body.is-text {
  overflow: auto;
}

body.is-text #stage,
body.is-text .grain,
body.is-text .vignette,
body.is-text .hud-top,
body.is-text .hud-foot,
body.is-text .panel,
body.is-text .hint,
body.is-text .look,
body.is-text .chapters,
body.is-text .loader,
body.is-text .intro {
  display: none !important;
}

#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#stage.is-hot {
  cursor: pointer;
}

#stage.is-drag {
  cursor: grabbing;
}

.grain,
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.grain {
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.55'/></svg>");
}

.vignette {
  background: radial-gradient(ellipse at center, transparent 48%, rgba(0, 0, 0, 0.55) 100%);
}

.skip {
  position: absolute;
  left: 0.8rem;
  top: -3rem;
  z-index: 20;
  padding: 0.45rem 0.7rem;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
}

.skip:focus {
  top: 0.8rem;
}

.hud-top,
.hud-foot,
.panel,
.hint,
.look,
.chapters,
.loader,
.intro {
  position: fixed;
  z-index: 4;
}

.hud-top {
  top: 0.7rem;
  left: 0.7rem;
  right: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.75rem 0.55rem 1rem;
  pointer-events: none;
  border-radius: 1.15rem;
  background: rgba(10, 12, 18, 0.48);
  border: 1px solid rgba(243, 238, 228, 0.16);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
}

.hud-top a,
.hud-top button {
  pointer-events: auto;
}

.mark {
  font-weight: 650;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: inherit;
}

.hud-nav {
  display: flex;
  gap: 0.2rem;
}

.hud-nav button,
.hud-mail,
.chapters button,
.enter,
.text-link {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.hud-nav button,
.hud-mail {
  padding: 0.42rem 0.72rem;
  color: rgba(243, 238, 228, 0.86);
  font-size: 0.84rem;
  text-decoration: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
  border-radius: 999px;
}

.hud-nav button:hover,
.hud-nav button.is-on,
.hud-mail:hover {
  color: var(--ink);
  background: rgba(243, 238, 228, 0.1);
}

.hud-foot {
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 0.9rem 1.35rem 1.1rem;
  color: var(--dim);
  font-size: 0.78rem;
  pointer-events: none;
}

.hud-foot a {
  pointer-events: auto;
  color: inherit;
  text-decoration: none;
}

.hud-foot a:hover {
  color: var(--ink);
}

.loader,
.intro {
  inset: 0;
  text-align: center;
  background: rgba(7, 8, 12, 0.72);
  backdrop-filter: blur(10px);
}

.loader {
  display: grid;
  place-items: center;
}

.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(7, 8, 12, 0.18) 0%, rgba(7, 8, 12, 0.55) 100%);
}

.intro-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.kicker,
.panel-index {
  margin: 0;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.loader-title,
.intro h1,
.fallback h1 {
  margin: 0.35rem 0 0.9rem;
  font-family: Outfit, "Avenir Next", sans-serif;
  font-weight: 700;
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.loader-bar {
  width: min(16rem, 70vw);
  height: 2px;
  margin: 1.4rem auto 0.7rem;
  background: var(--line);
}

.loader-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--ink);
  transition: width 0.2s ease;
}

.loader-pct {
  margin: 0;
  color: var(--dim);
  font-size: 0.78rem;
}

.intro-lead,
.lead {
  max-width: 28rem;
  margin: 0 auto 1.6rem;
  color: var(--muted);
  line-height: 1.55;
}

.enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  background: #c45a2d;
  color: #fffaf2;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.enter:hover {
  filter: brightness(1.08);
}

.text-link {
  display: block;
  margin: 0;
  color: var(--dim);
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.panel {
  left: 1.35rem;
  top: auto;
  bottom: 4.6rem;
  transform: none;
  width: min(22rem, calc(100vw - 2.6rem));
  max-height: min(42vh, 22rem);
  overflow: auto;
  padding: 1.1rem 1.2rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: var(--glass);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  scrollbar-width: thin;
  scrollbar-color: rgba(243, 238, 228, 0.28) transparent;
}

.panel h2,
.fallback h2 {
  margin: 0.25rem 0 0.85rem;
  font-family: Outfit, "Avenir Next", sans-serif;
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -0.03em;
}

.panel p,
.panel li,
.fallback p,
.fallback li {
  color: var(--muted);
  line-height: 1.55;
}

.panel p {
  margin: 0 0 0.75rem;
}

.panel p:last-child {
  margin-bottom: 0;
}

.panel ul {
  margin: 0 0 0.85rem;
  padding: 0 0 0 1.1rem;
}

.panel a,
.fallback a {
  color: var(--ink);
}

.hint,
.look {
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-align: center;
  pointer-events: none;
  text-shadow: 0 8px 24px #000;
}

.hint {
  bottom: 4.4rem;
  opacity: 1;
  transition: opacity 0.65s ease;
}

.hint.is-gone {
  opacity: 0;
}

.look {
  bottom: 6.1rem;
  color: var(--ink);
  font-weight: 600;
}

.chapters {
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 0.35rem;
}

.chapters button {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  padding: 0.25rem 0.4rem;
  color: var(--dim);
  font-size: 0.78rem;
  text-align: left;
}

.chapters-icon {
  display: none;
}

.chapters-index {
  font-family: Outfit, sans-serif;
  font-weight: 500;
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

.chapters button.is-on,
.chapters button:hover {
  color: var(--ink);
}

.fallback {
  min-height: 100vh;
  padding: 4rem 1.4rem 3rem;
  overflow: auto;
}

.fallback-wrap {
  width: min(40rem, 100%);
  margin: 0 auto;
}

.fallback article {
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
}

.fallback-legal {
  margin-top: 2rem;
  color: var(--dim);
}

[hidden] {
  display: none !important;
}

@media (min-width: 861px) {
  .panel {
    left: 1.35rem;
    bottom: 5.2rem;
    width: 21rem;
    max-height: 38vh;
  }
}

@media (max-width: 860px) {
  .hud-top {
    display: none;
  }

  body.is-tour .hud-foot {
    display: none;
  }

  .panel {
    left: 0.8rem;
    right: 0.8rem;
    top: auto;
    bottom: calc(6.1rem + env(safe-area-inset-bottom, 0px));
    transform: none;
    width: auto;
    max-height: 22vh;
    padding: 0.75rem 0.9rem 0.8rem;
  }

  .panel h2 {
    font-size: 1.45rem;
    margin-bottom: 0.45rem;
  }

  .panel p,
  .panel li {
    font-size: 0.9rem;
  }

  .chapters {
    left: 0.7rem;
    right: 0.7rem;
    top: auto;
    bottom: max(0.7rem, env(safe-area-inset-bottom, 0px));
    transform: none;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0.2rem;
    padding: 0.38rem;
    border-radius: 1.85rem;
    background: rgba(22, 22, 26, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
      0 18px 50px rgba(0, 0, 0, 0.38),
      inset 0 1px 0 rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(32px) saturate(1.9);
    -webkit-backdrop-filter: blur(32px) saturate(1.9);
  }

  .chapters button {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.18rem;
    padding: 0.38rem 0.15rem 0.28rem;
    border-radius: 1.45rem;
    color: rgba(243, 238, 228, 0.5);
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.1;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
  }

  .chapters-icon {
    display: block;
    width: 1.42rem;
    height: 1.42rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .chapters-index {
    display: none;
  }

  .chapters-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .chapters button.is-on {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  }

  .chapters button.is-on .chapters-icon {
    color: var(--accent);
    filter: drop-shadow(0 0 10px rgba(232, 161, 74, 0.4));
  }

  .hint,
  .look {
    display: none;
  }

  .intro h1 {
    font-size: clamp(5.2rem, 26vw, 6rem);
    margin: 0.15rem 0 0.5rem;
  }

  .intro-lead {
    max-width: 16.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.78rem;
    line-height: 1.4;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loader-bar span {
    transition: none;
  }
}
