@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=IM+Fell+English+SC&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,800&family=UnifrakturCook:wght@700&display=swap");

:root {
  --ink: #17110b;
  --paper: #e6c783;
  --paper-light: #f4dfab;
  --paper-dark: #8f5e2d;
  --forest: #10271d;
  --forest-mid: #244733;
  --moss: #667943;
  --wine: #6a1d16;
  --gold: #bd8943;
  --bone: #f6edd3;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
  --mouse-x: 50vw;
  --mouse-y: 45vh;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
  background: #080907;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  color: var(--bone);
  background:
    radial-gradient(circle at 12% 18%, rgba(183, 132, 62, 0.18), transparent 26rem),
    linear-gradient(180deg, rgba(11, 16, 13, 0.18), rgba(7, 9, 7, 0.98)),
    url("https://images.unsplash.com/photo-1448375240586-882707db888b?auto=format&fit=crop&w=1920&q=80") center / cover fixed,
    #090b08;
  font-family: "Source Serif 4", Georgia, serif;
  line-height: 1.55;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.64), rgba(16, 39, 29, 0.1), rgba(0, 0, 0, 0.7)),
    url("https://www.transparenttextures.com/patterns/wood-pattern.png");
  opacity: 0.72;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 68% 18%, rgba(246, 237, 211, 0.15), transparent 28rem),
    radial-gradient(circle at 20% 72%, rgba(102, 121, 67, 0.14), transparent 26rem),
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.52) 72%, rgba(0, 0, 0, 0.94) 100%);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

svg {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
}

.ambient-light,
.grain,
.leaf-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.ambient-light {
  z-index: -1;
  background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(201, 145, 74, 0.18), transparent 20rem);
  mix-blend-mode: screen;
  transition: background 180ms ease;
}

.grain {
  z-index: 50;
  background-image: url("https://www.transparenttextures.com/patterns/paper-fibers.png");
  opacity: 0.16;
}

.leaf-field {
  z-index: 4;
  overflow: hidden;
}

.leaf {
  position: absolute;
  top: -4rem;
  width: 0.42rem;
  height: 1.1rem;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(160deg, rgba(188, 139, 68, 0.9), rgba(79, 110, 54, 0.76));
  box-shadow: 0 0 18px rgba(188, 139, 68, 0.34);
  opacity: 0.75;
  transform: rotate(var(--twist));
  animation: leafFall var(--fall-duration) linear infinite;
  animation-delay: var(--fall-delay);
}

.site-header {
  position: fixed;
  top: 50%;
  left: 1rem;
  z-index: 45;
  width: 5.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.58rem;
  border: 1px solid rgba(246, 237, 211, 0.17);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(19, 17, 12, 0.88), rgba(32, 44, 31, 0.7)),
    url("https://www.transparenttextures.com/patterns/wood-pattern.png");
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(14px);
  transform: translateY(-50%);
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.brand-mark {
  width: 3.1rem;
  height: 3.1rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(246, 237, 211, 0.34);
  border-radius: 50%;
  color: var(--paper-light);
  background: radial-gradient(circle, rgba(111, 29, 22, 0.95), rgba(25, 17, 12, 0.92));
  font-family: "Cinzel", serif;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.22);
}

.brand-text {
  writing-mode: vertical-rl;
  color: rgba(244, 223, 171, 0.9);
  font-family: "Cinzel", serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.site-nav {
  display: grid;
  gap: 0.45rem;
}

.site-nav a,
.button,
.bounty-option,
.evidence-slip,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid rgba(246, 237, 211, 0.18);
  border-radius: 8px;
  color: var(--bone);
  background: rgba(10, 12, 8, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.site-nav a {
  position: relative;
  width: 3.4rem;
  height: 3.4rem;
  padding: 0;
}

.site-nav span {
  position: absolute;
  left: calc(100% + 0.55rem);
  min-width: max-content;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(246, 237, 211, 0.14);
  border-radius: 6px;
  color: var(--paper-light);
  background: rgba(13, 16, 11, 0.86);
  font-family: "Cinzel", serif;
  font-size: 0.7rem;
  font-weight: 800;
  opacity: 0;
  transform: translateX(-0.4rem);
  pointer-events: none;
  text-transform: uppercase;
  transition:
    opacity 170ms ease,
    transform 170ms ease;
}

.site-nav a:hover span {
  opacity: 1;
  transform: translateX(0);
}

.site-nav a:hover,
.button:hover,
.bounty-option:hover,
.evidence-slip:hover,
.icon-button:hover {
  border-color: rgba(244, 223, 171, 0.46);
  color: #fff6d7;
  background: rgba(102, 121, 67, 0.22);
  transform: translateY(-2px);
}

.icon-button {
  width: 2.85rem;
  height: 2.85rem;
  padding: 0;
}

.menu-toggle {
  display: none;
}

.caseboard {
  position: relative;
  isolation: isolate;
  width: min(1280px, calc(100% - 2rem));
  min-height: 100svh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: minmax(5rem, 0.45fr) auto auto auto minmax(5rem, 0.7fr);
  column-gap: 1.15rem;
  row-gap: 1.1rem;
  align-items: center;
  padding: 3.5rem 0 3rem 5.9rem;
  overflow: hidden;
}

.caseboard::before {
  position: absolute;
  inset: 7rem 4rem 5rem 8rem;
  z-index: -1;
  content: "";
  border: 1px solid rgba(246, 237, 211, 0.08);
  background:
    linear-gradient(90deg, rgba(244, 223, 171, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(244, 223, 171, 0.05) 1px, transparent 1px);
  background-size: 5rem 5rem;
  mask-image: radial-gradient(circle at 55% 48%, black 0 55%, transparent 82%);
}

.red-thread {
  position: absolute;
  inset: 9rem 1rem 5rem 6rem;
  z-index: 1;
  width: auto;
  height: auto;
  color: rgba(124, 28, 22, 0.78);
  opacity: 0.75;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.32));
}

.red-thread path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-dasharray: 10 9;
  animation: threadPulse 9s linear infinite;
}

.red-thread circle {
  fill: var(--gold);
  stroke: rgba(22, 14, 8, 0.72);
  stroke-width: 2;
}

.case-title {
  grid-column: 1 / 7;
  grid-row: 2 / 4;
  z-index: 6;
  max-width: 44rem;
  align-self: center;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--gold);
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.case-title h1 {
  margin: 0;
  color: var(--paper-light);
  font-family: "UnifrakturCook", "IM Fell English SC", serif;
  font-size: 6.8rem;
  font-weight: 700;
  line-height: 0.84;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.44),
    0 20px 54px rgba(0, 0, 0, 0.62);
}

.case-title h1 span {
  display: block;
}

.hero-lead {
  max-width: 34rem;
  margin: 1.25rem 0 0;
  color: rgba(246, 237, 211, 0.9);
  font-size: 1.14rem;
}

.wanted-poster {
  position: relative;
  isolation: isolate;
  grid-column: 6 / 11;
  grid-row: 1 / 6;
  z-index: 7;
  width: min(100%, 520px);
  justify-self: center;
  padding: 1.05rem 1.05rem 1.35rem;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(247, 224, 166, 0.92), rgba(191, 132, 68, 0.8)),
    url("https://www.transparenttextures.com/patterns/paper-fibers.png");
  border: 1px solid rgba(28, 17, 10, 0.72);
  border-radius: 4px;
  box-shadow:
    inset 0 0 0 8px rgba(71, 44, 20, 0.14),
    inset 0 0 46px rgba(68, 38, 16, 0.34),
    var(--shadow);
  clip-path: polygon(1.5% 0, 12% 1.2%, 20% 0.4%, 29% 1.4%, 40% 0.3%, 52% 1%, 64% 0, 74% 1.2%, 86% 0.4%, 98% 1.5%, 99% 12%, 98.4% 23%, 99.5% 34%, 98.5% 48%, 99.2% 61%, 98% 74%, 99.3% 88%, 97.5% 100%, 86% 98.8%, 73% 99.6%, 61% 98.7%, 49% 99.7%, 37% 98.8%, 24% 99.4%, 12% 98.5%, 2% 100%, 0.7% 87%, 1.5% 75%, 0.5% 61%, 1.2% 48%, 0.4% 35%, 1.4% 23%, 0.6% 11%);
  transform: rotate(-2.4deg);
  animation: posterHover 7s ease-in-out infinite;
}

.wanted-poster::before {
  position: absolute;
  inset: 0.55rem;
  z-index: -1;
  content: "";
  border: 2px solid rgba(27, 19, 10, 0.72);
  border-radius: 3px;
  box-shadow:
    inset 0 0 0 1px rgba(244, 223, 171, 0.22),
    0 0 0 1px rgba(61, 35, 14, 0.4);
}

.wanted-poster::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    radial-gradient(circle at 8% 8%, rgba(72, 38, 17, 0.45), transparent 7rem),
    radial-gradient(circle at 90% 12%, rgba(72, 38, 17, 0.4), transparent 7rem),
    radial-gradient(circle at 50% 100%, rgba(83, 42, 14, 0.4), transparent 11rem);
  mix-blend-mode: multiply;
}

.nail {
  position: absolute;
  z-index: 3;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #776350, #211810 68%),
    #211810;
  box-shadow:
    inset -2px -3px 5px rgba(0, 0, 0, 0.6),
    0 3px 7px rgba(0, 0, 0, 0.4);
}

.nail-one {
  top: 1rem;
  left: 1rem;
}

.nail-two {
  top: 1rem;
  right: 1rem;
}

.nail-three {
  bottom: 1rem;
  left: 1rem;
}

.nail-four {
  right: 1rem;
  bottom: 1rem;
}

.poster-topline {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem 0;
}

.poster-topline span,
.poster-name span {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(23, 17, 11, 0.78), transparent);
}

.poster-topline p {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: 4.35rem;
  font-weight: 900;
  line-height: 0.9;
  text-transform: uppercase;
}

.poster-grid {
  display: grid;
  grid-template-columns: minmax(66px, 0.64fr) minmax(0, 2.2fr) minmax(66px, 0.64fr);
  gap: 0.72rem;
  align-items: center;
  margin-top: 0.85rem;
}

.poster-grid aside {
  min-width: 0;
  color: rgba(26, 17, 10, 0.88);
  font-family: "IM Fell English SC", Georgia, serif;
  font-size: 0.98rem;
  line-height: 1.15;
  text-align: center;
}

.poster-grid aside p,
.poster-grid aside strong {
  display: block;
  margin: 0.2rem 0;
}

.poster-grid aside strong {
  color: var(--forest);
  font-size: 1.12rem;
}

.portrait-frame {
  position: relative;
  height: 22rem;
  margin: 0;
  overflow: hidden;
  border: 2px solid rgba(28, 17, 10, 0.78);
  border-radius: 3px;
  background: rgba(71, 44, 20, 0.12);
  box-shadow:
    inset 0 0 0 5px rgba(244, 223, 171, 0.14),
    0 12px 22px rgba(40, 22, 10, 0.24);
}

.portrait-frame::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 50% 36%, transparent 28%, rgba(31, 20, 11, 0.18) 76%),
    linear-gradient(180deg, rgba(246, 237, 211, 0.03), rgba(27, 15, 7, 0.22));
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 44%;
  filter: saturate(0.88) contrast(1.05);
  transform: scale(1.1);
}

.poster-name {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.poster-name h2 {
  margin: 0;
  color: #19301d;
  font-family: "UnifrakturCook", "IM Fell English SC", serif;
  font-size: 3.55rem;
  line-height: 0.9;
  text-align: center;
  text-shadow: 0 1px 0 rgba(244, 223, 171, 0.5);
}

.reward-panel {
  position: relative;
  width: min(100%, 23rem);
  margin: 0.9rem auto 0;
  padding: 0.74rem 0.9rem 0.85rem;
  color: var(--wine);
  text-align: center;
}

.reward-panel::before,
.reward-panel::after {
  position: absolute;
  top: 50%;
  width: 3.1rem;
  height: 1px;
  content: "";
  background: rgba(106, 29, 22, 0.42);
}

.reward-panel::before {
  left: 0;
}

.reward-panel::after {
  right: 0;
}

.reward-panel p {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
}

.reward-panel strong {
  display: block;
  margin: 0.05rem 0;
  font-family: "Cinzel", serif;
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1;
}

.reward-panel small {
  display: block;
  color: rgba(26, 17, 10, 0.78);
  font-family: "IM Fell English SC", Georgia, serif;
  font-size: 0.96rem;
  line-height: 1.1;
}

.stamp-mark {
  position: absolute;
  top: 38%;
  left: 50%;
  z-index: 8;
  padding: 0.12rem 0.9rem;
  border: 0.28rem double rgba(106, 29, 22, 0.74);
  border-radius: 4px;
  color: rgba(106, 29, 22, 0.78);
  font-family: "Cinzel", serif;
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  text-transform: uppercase;
  transform: translate(-50%, -50%) rotate(-12deg) scale(1.35);
  pointer-events: none;
}

.wanted-poster.is-stamped .stamp-mark {
  animation: stampHit 700ms cubic-bezier(0.2, 1.35, 0.3, 1) both;
}

.bounty-seal {
  grid-column: 10 / 13;
  grid-row: 2 / 5;
  z-index: 9;
  width: min(100%, 18.5rem);
  justify-self: end;
  align-self: center;
  display: grid;
  gap: 0.85rem;
}

.seal-core {
  position: relative;
  width: 12.6rem;
  height: 12.6rem;
  display: grid;
  place-items: center;
  justify-self: center;
  padding: 1.2rem;
  border: 0.52rem double rgba(244, 223, 171, 0.56);
  border-radius: 50%;
  color: var(--paper-light);
  background:
    radial-gradient(circle at 45% 35%, rgba(146, 46, 32, 0.98), rgba(67, 18, 13, 0.96) 62%, rgba(20, 13, 9, 0.96)),
    url("https://www.transparenttextures.com/patterns/paper-fibers.png");
  box-shadow:
    inset 0 0 0 0.45rem rgba(0, 0, 0, 0.2),
    0 18px 48px rgba(0, 0, 0, 0.36);
  text-align: center;
  animation: sealGlow 4.4s ease-in-out infinite;
}

.seal-core::before,
.seal-core::after {
  position: absolute;
  inset: -1.05rem;
  border: 1px solid rgba(244, 223, 171, 0.24);
  border-radius: 50%;
  content: "";
}

.seal-core::after {
  inset: 0.8rem;
  border-style: dashed;
}

.seal-core p,
.seal-core span {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.seal-core strong {
  display: block;
  margin: 0.15rem 0;
  font-family: "Cinzel", serif;
  font-size: 2.45rem;
  line-height: 1;
}

.bounty-options {
  display: grid;
  gap: 0.55rem;
}

.bounty-option {
  width: 100%;
  min-height: 3.6rem;
  justify-content: flex-start;
  padding: 0 0.85rem;
  color: var(--paper-light);
  font-family: "Cinzel", serif;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.bounty-option svg {
  color: var(--gold);
}

.bounty-option.is-active {
  border-color: rgba(244, 223, 171, 0.58);
  color: #fff8dd;
  background:
    linear-gradient(90deg, rgba(106, 29, 22, 0.78), rgba(37, 62, 43, 0.72)),
    url("https://www.transparenttextures.com/patterns/paper-fibers.png");
}

.field-note {
  grid-column: 1 / 5;
  grid-row: 5 / 6;
  z-index: 6;
  align-self: start;
  max-width: 24.5rem;
  margin-top: -1.25rem;
  padding: 1rem 1.15rem;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(246, 222, 158, 0.92), rgba(183, 124, 62, 0.84)),
    url("https://www.transparenttextures.com/patterns/paper-fibers.png");
  border: 1px solid rgba(41, 24, 10, 0.5);
  border-radius: 4px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
  transform: rotate(1.4deg);
  clip-path: polygon(0 5%, 7% 2%, 17% 4%, 27% 1%, 43% 3%, 56% 0, 72% 3%, 84% 1%, 100% 4%, 98% 100%, 87% 97%, 74% 99%, 63% 97%, 51% 100%, 36% 98%, 23% 100%, 11% 97%, 1% 100%);
}

.field-note h2 {
  margin: 0;
  color: var(--forest);
  font-family: "Cinzel", serif;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}

.field-note p:last-child {
  margin: 0.75rem 0 0;
  color: rgba(23, 17, 11, 0.84);
}

.evidence-strip {
  grid-column: 6 / 12;
  grid-row: 5 / 6;
  z-index: 8;
  align-self: start;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 11rem;
}

.evidence-slip {
  min-height: 3.55rem;
  padding: 0 0.85rem;
  color: var(--paper-light);
  font-family: "Cinzel", serif;
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  transform: rotate(var(--slip-tilt, -1deg));
}

.evidence-slip:nth-child(2) {
  --slip-tilt: 1.3deg;
}

.evidence-slip:nth-child(3) {
  --slip-tilt: -2deg;
}

.evidence-slip:nth-child(4) {
  --slip-tilt: 1deg;
}

.evidence-slip.is-active {
  border-color: rgba(244, 223, 171, 0.58);
  color: #1b130c;
  background:
    linear-gradient(180deg, rgba(249, 222, 148, 0.95), rgba(177, 119, 52, 0.96)),
    url("https://www.transparenttextures.com/patterns/paper-fibers.png");
}

.novel-stage {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  padding: 6.5rem 1rem 7rem 6.2rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 18%, rgba(189, 137, 67, 0.16), transparent 28rem),
    radial-gradient(circle at 18% 80%, rgba(102, 121, 67, 0.18), transparent 26rem),
    linear-gradient(180deg, rgba(5, 7, 5, 0.9), rgba(8, 15, 10, 0.96));
}

.novel-stage::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(90deg, rgba(244, 223, 171, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(244, 223, 171, 0.035) 1px, transparent 1px),
    url("https://images.unsplash.com/photo-1448375240586-882707db888b?auto=format&fit=crop&w=1920&q=65") center / cover fixed;
  background-size: 5rem 5rem, 5rem 5rem, cover;
  opacity: 0.7;
}

.novel-stage::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.74), rgba(10, 24, 15, 0.3), rgba(0, 0, 0, 0.82)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.8));
}

.time-rift {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.time-rift span {
  position: absolute;
  width: min(78vmin, 42rem);
  aspect-ratio: 1;
  border: 1px solid rgba(244, 223, 171, 0.46);
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 42%, rgba(189, 137, 67, 0.12) 43% 52%, transparent 53%),
    conic-gradient(from 90deg, transparent, rgba(244, 223, 171, 0.68), transparent, rgba(106, 29, 22, 0.42), transparent);
  box-shadow:
    0 0 46px rgba(244, 223, 171, 0.32),
    inset 0 0 58px rgba(244, 223, 171, 0.2);
  animation: riftSpin 1.6s linear infinite;
}

.time-rift span:nth-child(2) {
  width: min(58vmin, 31rem);
  animation-direction: reverse;
  animation-duration: 1.2s;
}

.time-rift span:nth-child(3) {
  width: min(36vmin, 19rem);
  animation-duration: 0.9s;
}

.time-rift.is-open {
  animation: riftOpen 900ms ease both;
}

body.is-time-traveling .ambient-light {
  background: radial-gradient(circle at 50% 46%, rgba(244, 223, 171, 0.38), transparent 28rem);
}

.novel-invite,
.novel-reader {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.novel-invite {
  position: relative;
  z-index: 4;
  min-height: 36svh;
  display: grid;
  align-content: center;
  max-width: 56rem;
  padding: 1rem 0 2rem;
}

.novel-invite h2 {
  margin: 0;
  color: var(--paper-light);
  font-family: "UnifrakturCook", "IM Fell English SC", serif;
  font-size: 5.8rem;
  line-height: 0.88;
  text-shadow: 0 20px 54px rgba(0, 0, 0, 0.62);
}

.novel-invite p:not(.eyebrow) {
  max-width: 39rem;
  margin: 1.15rem 0 0;
  color: rgba(246, 237, 211, 0.88);
  font-size: 1.14rem;
}

.time-button {
  width: max-content;
  margin-top: 1.45rem;
  box-shadow:
    0 0 0 1px rgba(244, 223, 171, 0.18),
    0 0 38px rgba(189, 137, 67, 0.22);
}

.novel-stage.is-awake .novel-invite {
  min-height: auto;
}

/* Cinematic story mode */
.novel-reader {
  position: relative;
  z-index: 5;
  width: min(1320px, 100%);
  height: 0;
  min-height: 0;
  max-height: none;
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
  opacity: 0;
  overflow: hidden;
  transform: translateY(2rem) scale(0.98);
  pointer-events: none;
  box-shadow: none;
  scroll-margin-top: 5.75rem;
  transition:
    height 700ms ease,
    opacity 520ms ease,
    transform 520ms ease;
}

.novel-reader.is-open {
  height: min(82svh, 820px);
  min-height: 43rem;
  max-height: none;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.novel-reader::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
  border: 1px solid rgba(244, 223, 171, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(244, 223, 171, 0.14), transparent 7%, transparent 92%, rgba(244, 223, 171, 0.1)),
    linear-gradient(180deg, rgba(244, 223, 171, 0.08), transparent 18%, transparent 82%, rgba(244, 223, 171, 0.06));
  pointer-events: none;
}

.novel-reader::after {
  position: absolute;
  inset: 1rem;
  z-index: 3;
  content: "";
  border: 1px solid rgba(244, 223, 171, 0.14);
  border-radius: 8px;
  pointer-events: none;
}

.novel-art {
  position: absolute;
  inset: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #050604;
}

.novel-art img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.06) contrast(1.08);
  transform: scale(1.04);
  transition:
    filter 520ms ease,
    transform 900ms ease;
}

.novel-reader.is-open .novel-art img {
  animation: sceneBreath 14s ease-in-out infinite alternate;
}

.novel-art::after,
.scene-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background:
    radial-gradient(circle at 70% 42%, transparent 0 24%, rgba(0, 0, 0, 0.12) 42%, rgba(0, 0, 0, 0.72) 100%),
    linear-gradient(90deg, rgba(3, 4, 3, 0.88), rgba(3, 4, 3, 0.28) 36%, rgba(3, 4, 3, 0.14) 58%, rgba(3, 4, 3, 0.72)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 32%, rgba(0, 0, 0, 0.72));
}

.scene-glow {
  position: absolute;
  inset: auto 8% 8% auto;
  z-index: 2;
  width: 32rem;
  max-width: 46vw;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 223, 171, 0.2), transparent 62%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.chapter-mark {
  position: absolute;
  top: 3rem;
  right: clamp(1rem, 4vw, 4rem);
  z-index: 5;
  color: rgba(244, 223, 171, 0.22);
  font-family: "Cinzel", serif;
  font-size: 14rem;
  font-weight: 900;
  line-height: 0.75;
  text-shadow: 0 20px 80px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.novel-copy {
  position: absolute;
  left: clamp(1rem, 5vw, 4.8rem);
  bottom: clamp(7.5rem, 12vh, 9rem);
  z-index: 6;
  width: min(38rem, calc(100% - 2rem));
  display: block;
  padding: 1.25rem 1.35rem 1.35rem;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(249, 226, 166, 0.92), rgba(189, 126, 57, 0.82)),
    url("https://www.transparenttextures.com/patterns/paper-fibers.png");
  border: 1px solid rgba(41, 24, 10, 0.44);
  border-radius: 4px;
  clip-path: polygon(0 5%, 9% 2%, 18% 4%, 28% 1%, 40% 4%, 52% 2%, 64% 4%, 78% 1%, 91% 3%, 100% 0, 98% 100%, 88% 97%, 75% 99%, 63% 97%, 51% 100%, 39% 98%, 25% 100%, 12% 97%, 0 100%);
  box-shadow:
    0 20px 54px rgba(0, 0, 0, 0.34),
    inset 0 0 46px rgba(91, 45, 17, 0.16);
}

.novel-copy::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 16% 12%, rgba(91, 45, 17, 0.25), transparent 9rem),
    radial-gradient(circle at 96% 100%, rgba(91, 45, 17, 0.28), transparent 10rem);
  mix-blend-mode: multiply;
  opacity: 0.85;
  pointer-events: none;
}

.novel-copy > * {
  position: relative;
  z-index: 1;
}

.novel-copy h3 {
  margin: 0;
  color: var(--forest);
  font-family: "Cinzel", serif;
  font-size: 2.85rem;
  font-weight: 900;
  line-height: 1.02;
  text-transform: uppercase;
}

.novel-copy p:not(.eyebrow) {
  margin: 1rem 0 0;
  max-width: 31rem;
  color: rgba(23, 17, 11, 0.86);
  font-size: 1.13rem;
}

.novel-chrome {
  position: absolute;
  right: clamp(1rem, 4vw, 3rem);
  bottom: clamp(1rem, 4vh, 2rem);
  left: clamp(1rem, 4vw, 3rem);
  z-index: 7;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.novel-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
}

.novel-dots button {
  position: relative;
  width: 4.9rem;
  height: 3.45rem;
  overflow: hidden;
  border: 1px solid rgba(244, 223, 171, 0.3);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.64)),
    var(--thumb) center / cover;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
  cursor: pointer;
}

.novel-dots button span {
  position: absolute;
  right: 0.32rem;
  bottom: 0.2rem;
  z-index: 2;
  color: var(--paper-light);
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.78);
}

.novel-dots button.is-active {
  border-color: rgba(244, 223, 171, 0.82);
  box-shadow:
    0 0 0 2px rgba(106, 29, 22, 0.74),
    0 14px 30px rgba(0, 0, 0, 0.36);
  transform: translateY(-0.24rem);
}

.novel-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
  margin: 0;
}

.novel-controls .button.ghost {
  color: var(--paper-light);
  border-color: rgba(244, 223, 171, 0.2);
  background: rgba(8, 9, 6, 0.5);
  backdrop-filter: blur(10px);
}

.novel-controls .button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.novel-reader.is-turning .novel-art img {
  animation: sceneTurn 520ms ease both;
}

.novel-reader.is-turning .novel-copy {
  animation: manuscriptIn 520ms ease both;
}

.case-actions {
  grid-column: 1 / 6;
  grid-row: 4 / 5;
  z-index: 7;
  align-self: start;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.button {
  min-height: 3.25rem;
  padding: 0 1.05rem;
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.button.primary {
  border-color: rgba(244, 223, 171, 0.44);
  color: #1a120b;
  background:
    linear-gradient(180deg, rgba(250, 222, 143, 0.95), rgba(180, 123, 55, 0.96)),
    url("https://www.transparenttextures.com/patterns/paper-fibers.png");
}

.button.ghost {
  color: var(--paper-light);
}

.site-footer {
  position: relative;
  display: grid;
  gap: 1rem;
  justify-items: center;
  padding: 2rem 1rem 2.4rem;
  color: rgba(246, 237, 211, 0.62);
  background:
    linear-gradient(180deg, rgba(5, 6, 4, 0.82), #050604 46%),
    url("https://www.transparenttextures.com/patterns/wood-pattern.png");
  text-align: center;
  border-top: 1px solid rgba(244, 223, 171, 0.12);
}

.site-footer p {
  margin: 0;
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: min(720px, 100%);
}

.social-x-button {
  text-decoration: none;
}

.x-mark {
  display: grid;
  width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  border: 1px solid rgba(26, 18, 11, 0.36);
  border-radius: 50%;
  font-family: "Cinzel", serif;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1;
}

.contract-address {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  min-width: min(100%, 29rem);
  padding: 0.42rem 0.48rem 0.42rem 1rem;
  border: 1px solid rgba(244, 223, 171, 0.2);
  border-radius: 8px;
  color: rgba(246, 237, 211, 0.82);
  background:
    linear-gradient(180deg, rgba(8, 9, 6, 0.68), rgba(8, 9, 6, 0.42)),
    url("https://www.transparenttextures.com/patterns/dark-mosaic.png");
  box-shadow: inset 0 0 28px rgba(244, 223, 171, 0.05);
}

.contract-label {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border: 1px solid rgba(244, 223, 171, 0.25);
  border-radius: 50%;
  color: var(--gold);
  font-family: "Cinzel", serif;
  font-size: 0.74rem;
  font-weight: 900;
}

.contract-address code {
  flex: 1;
  min-width: 8rem;
  min-height: 1.25rem;
  color: var(--paper-light);
  font-family: "IM Fell English", serif;
  text-align: left;
}

.contract-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-height: 2.35rem;
  padding: 0 0.72rem;
  border: 1px solid rgba(244, 223, 171, 0.24);
  border-radius: 6px;
  color: var(--paper-light);
  background: rgba(244, 223, 171, 0.08);
  font-family: "Cinzel", serif;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.contract-copy svg {
  width: 1rem;
  height: 1rem;
}

.contract-copy:hover:not(:disabled) {
  border-color: rgba(244, 223, 171, 0.46);
  background: rgba(244, 223, 171, 0.14);
}

.contract-copy:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

[data-reveal] {
  opacity: 0;
  translate: 0 1.25rem;
  transition:
    opacity 700ms ease,
    translate 700ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  translate: 0 0;
}

@keyframes posterHover {
  0%,
  100% {
    transform: translateY(0) rotate(-2.4deg);
  }
  50% {
    transform: translateY(-0.65rem) rotate(-1.35deg);
  }
}

@keyframes stampHit {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-12deg) scale(1.5);
  }
  55% {
    opacity: 0.92;
    transform: translate(-50%, -50%) rotate(-12deg) scale(0.92);
  }
  100% {
    opacity: 0.78;
    transform: translate(-50%, -50%) rotate(-12deg) scale(1);
  }
}

@keyframes leafFall {
  0% {
    transform: translate3d(0, -6rem, 0) rotate(var(--twist));
  }
  100% {
    transform: translate3d(var(--drift), 110vh, 0) rotate(calc(var(--twist) + 420deg));
  }
}

@keyframes threadPulse {
  0% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -120;
  }
}

@keyframes sealGlow {
  0%,
  100% {
    box-shadow:
      inset 0 0 0 0.45rem rgba(0, 0, 0, 0.2),
      0 18px 48px rgba(0, 0, 0, 0.36);
  }
  50% {
    box-shadow:
      inset 0 0 0 0.45rem rgba(0, 0, 0, 0.2),
      0 18px 54px rgba(189, 137, 67, 0.24);
  }
}

@keyframes targetHit {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.18);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes riftSpin {
  0% {
    transform: rotate(0deg) scale(0.86);
  }
  100% {
    transform: rotate(360deg) scale(1.04);
  }
}

@keyframes riftOpen {
  0% {
    opacity: 0;
    filter: blur(10px);
    transform: scale(0.72);
  }
  38% {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }
  100% {
    opacity: 0;
    filter: blur(16px);
    transform: scale(1.55);
  }
}

@keyframes sceneBreath {
  0% {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  100% {
    transform: scale(1.1) translate3d(-1.2rem, -0.7rem, 0);
  }
}

@keyframes sceneTurn {
  0% {
    opacity: 0.45;
    filter: saturate(0.7) blur(8px);
    transform: scale(1.16) translateX(1.8rem);
  }
  100% {
    opacity: 1;
    filter: saturate(1.06) blur(0);
    transform: scale(1.04) translateX(0);
  }
}

@keyframes manuscriptIn {
  0% {
    opacity: 0;
    transform: translateY(1rem) rotate(-1deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

@media (max-width: 1180px) {
  .caseboard {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    padding-left: 5.8rem;
  }

  .case-title {
    grid-column: 1 / 6;
  }

  .case-title h1 {
    font-size: 5.45rem;
  }

  .wanted-poster {
    grid-column: 5 / 10;
    width: min(100%, 480px);
  }

  .bounty-seal {
    grid-column: 8 / 11;
    width: min(100%, 16.5rem);
  }

  .field-note {
    grid-column: 1 / 5;
  }

  .evidence-strip {
    grid-column: 1 / 9;
  }
}

@media (max-width: 920px) {
  html {
    scroll-padding-top: 5.6rem;
  }

  .site-header {
    top: 0.65rem;
    left: 0.5rem;
    right: 0.5rem;
    width: auto;
    min-height: 4.3rem;
    flex-direction: row;
    justify-content: space-between;
    padding: 0.55rem 0.65rem;
    transform: none;
  }

  .brand {
    flex-direction: row;
  }

  .brand-text {
    writing-mode: horizontal-tb;
    max-width: 11rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .menu-toggle {
    display: inline-flex;
    flex: 0 0 2.85rem;
    margin-left: auto;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    padding: 0.55rem;
    border: 1px solid rgba(246, 237, 211, 0.16);
    border-radius: 8px;
    background:
      linear-gradient(135deg, rgba(18, 15, 11, 0.95), rgba(32, 44, 31, 0.92)),
      url("https://www.transparenttextures.com/patterns/wood-pattern.png");
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
    opacity: 0;
    transform: translateY(-0.6rem);
    pointer-events: none;
    transition:
      opacity 180ms ease,
      transform 180ms ease;
  }

  .site-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .site-nav a {
    width: 100%;
    height: 2.9rem;
  }

  .site-nav span {
    position: static;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .caseboard {
    width: min(720px, calc(100% - 1rem));
    min-height: auto;
    display: block;
    padding: 7.7rem 0 3rem;
  }

  .caseboard::before {
    inset: 7rem 0 2rem;
  }

  .red-thread {
    inset: 8rem -4rem 30%;
    opacity: 0.45;
  }

  .case-title,
  .wanted-poster,
  .bounty-seal,
  .field-note,
  .evidence-strip,
  .case-actions {
    position: relative;
    z-index: 6;
  }

  .case-title {
    max-width: 100%;
    padding: 0 0.75rem;
  }

  .case-title h1 {
    font-size: 4.5rem;
  }

  .wanted-poster {
    width: min(100%, 520px);
    margin: 2rem auto 0;
    transform: rotate(-1.2deg);
  }

  .bounty-seal {
    width: 100%;
    margin: 1.5rem auto 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .seal-core {
    width: 11rem;
    height: 11rem;
  }

  .field-note {
    max-width: none;
    margin: 1.4rem 0.5rem 0;
  }

  .evidence-strip {
    margin: 1rem 0.5rem 0;
  }

  .case-actions {
    margin: 1rem 0.5rem 0;
  }

  .novel-stage {
    padding: 5.6rem 0.5rem 5rem;
  }

  .novel-invite {
    width: min(720px, 100%);
  }

  .novel-invite {
    min-height: 42svh;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }

  .novel-invite h2 {
    font-size: 4.45rem;
  }

}

@media (max-width: 620px) {
  .site-header {
    align-items: center;
  }

  .brand-mark {
    width: 2.45rem;
    height: 2.45rem;
  }

  .brand-text {
    display: none;
  }

  .site-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .caseboard {
    width: min(100% - 0.75rem, 430px);
    padding-top: 7.1rem;
  }

  .case-title h1 {
    font-size: 3.45rem;
  }

  .hero-lead {
    font-size: 1.04rem;
  }

  .wanted-poster {
    width: calc(100% - 0.6rem);
    padding: 0.78rem 0.78rem 1.05rem;
    animation: none;
    transform: none;
  }

  .poster-topline {
    gap: 0.5rem;
    padding-top: 0.45rem;
  }

  .poster-topline p {
    font-size: 2.65rem;
  }

  .poster-grid {
    grid-template-columns: 1fr;
  }

  .poster-grid aside {
    display: grid;
    grid-template-columns: auto auto auto;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.86rem;
  }

  .poster-grid aside p,
  .poster-grid aside strong {
    margin: 0;
  }

  .poster-grid aside strong {
    font-size: 1rem;
  }

  .portrait-frame {
    height: 18.2rem;
  }

  .poster-name h2 {
    font-size: 2.25rem;
  }

  .reward-panel {
    padding-right: 0;
    padding-left: 0;
  }

  .reward-panel::before,
  .reward-panel::after {
    display: none;
  }

  .reward-panel strong {
    font-size: 2.32rem;
  }

  .stamp-mark {
    font-size: 2rem;
  }

  .bounty-seal {
    grid-template-columns: 1fr;
  }

  .bounty-options {
    grid-template-columns: 1fr;
  }

  .bounty-option {
    justify-content: center;
  }

  .field-note h2 {
    font-size: 1.18rem;
  }

  .evidence-strip,
  .case-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .evidence-slip,
  .button {
    width: 100%;
  }

  .novel-stage {
    padding-top: 5.4rem;
  }

  .novel-invite h2 {
    font-size: 3.4rem;
  }

  .novel-invite p:not(.eyebrow),
  .novel-copy p:not(.eyebrow) {
    font-size: 1rem;
  }

  .time-button,
  .novel-controls .button {
    width: 100%;
  }

}

@media (max-width: 920px) {
  .novel-reader.is-open {
    height: calc(100svh - 6rem);
    min-height: 43rem;
  }

  .novel-art,
  .novel-art img {
    min-height: 0;
  }

  .chapter-mark {
    top: 5.2rem;
    right: 1rem;
    font-size: 8.5rem;
  }

  .novel-copy {
    left: 1rem;
    bottom: 7rem;
    width: min(34rem, calc(100% - 2rem));
  }

  .novel-copy h3 {
    font-size: 2.15rem;
  }

  .novel-chrome {
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
  }

  .novel-dots button {
    width: 4.15rem;
    height: 3rem;
  }
}

@media (max-width: 620px) {
  .novel-reader.is-open {
    height: calc(100svh - 5.8rem);
    min-height: 44rem;
  }

  .chapter-mark {
    top: 4.75rem;
    font-size: 6.25rem;
  }

  .novel-copy {
    bottom: 13.5rem;
    padding: 1rem;
  }

  .novel-copy h3 {
    font-size: 1.5rem;
  }

  .novel-copy p:not(.eyebrow) {
    font-size: 0.98rem;
  }

  .novel-chrome {
    align-items: stretch;
    flex-direction: column;
    gap: 0.7rem;
  }

  .novel-dots {
    justify-content: center;
  }

  .novel-dots button {
    width: 3.55rem;
    height: 2.65rem;
  }

  .novel-controls {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .leaf-field,
  .ambient-light {
    display: none;
  }
}
