/* Knight Cat — feudal cult landing
   Palette: steel charcoal, fog silver, brass gold, mist white */

:root {
  --bg: #121416;
  --fog: #c8cdd2;
  --ink: #e8eaec;
  --ink-muted: rgba(232, 234, 236, 0.72);
  --steel: rgba(28, 30, 34, 0.72);
  --steel-border: rgba(180, 170, 140, 0.28);
  --brass: #c4a35a;
  --brass-hot: #e0c078;
  --brass-dim: rgba(196, 163, 90, 0.35);
  --shadow: rgba(0, 0, 0, 0.55);
  --font-display: "Cinzel Decorative", "Cinzel", "Times New Roman", serif;
  --font-body: "Cinzel", "Palatino Linotype", "Book Antiqua", Palatino, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

/* —— Stage / full-viewport —— */
.stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #1a1c1e;
}

/* Full-bleed muted looping hero video */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.stage.is-playing .hero-bg {
  opacity: 1;
  visibility: visible;
}

/* Poster still — visible until video plays / reduced-motion */
.hero-poster {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  margin: 0;
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.stage.is-playing .hero-poster {
  opacity: 0;
  visibility: hidden;
}

/* Living hero canvas (WebGL) — fades in over the still once the first frame is drawn */
.hero-gl {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-gl.is-ready {
  opacity: 1;
}

/* Gentle fog drift — soft shapes, low opacity */
.fog {
  position: absolute;
  inset: -10% -14%;
  z-index: 2;
  pointer-events: none;
  will-change: transform;
}

.fog--far {
  background:
    radial-gradient(ellipse 42% 18% at 16% 55%, rgba(207, 218, 224, 0.18), transparent 72%),
    radial-gradient(ellipse 36% 16% at 48% 68%, rgba(191, 204, 212, 0.13), transparent 74%);
  opacity: 0.22;
  animation: fog-drift-far 22s ease-in-out infinite alternate;
}

.fog--near {
  background:
    radial-gradient(ellipse 30% 13% at 12% 72%, rgba(225, 232, 235, 0.15), transparent 72%),
    radial-gradient(ellipse 34% 14% at 58% 48%, rgba(211, 222, 228, 0.1), transparent 75%);
  opacity: 0.16;
  animation: fog-drift-near 16s ease-in-out infinite alternate;
}

/* Small wind gusts — soft blurred streaks sweeping left to right */
.wind {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}

.wind::before,
.wind::after {
  content: "";
  position: absolute;
  left: -35%;
  width: 55%;
  height: 18%;
  background: linear-gradient(90deg,
    transparent,
    rgba(235, 240, 243, 0.2) 40%,
    rgba(235, 240, 243, 0.32) 50%,
    rgba(235, 240, 243, 0.2) 60%,
    transparent);
  filter: blur(10px);
  transform: skewX(-10deg);
  will-change: transform, opacity;
  animation: wind-sweep 7s linear infinite;
}

.wind::before {
  top: 24%;
}

.wind::after {
  top: 60%;
  height: 14%;
  animation-duration: 9.5s;
  animation-delay: -3s;
  opacity: 0.85;
}

.wind-gust3 {
  position: absolute;
  top: 82%;
  left: -35%;
  width: 45%;
  height: 10%;
  background: linear-gradient(90deg,
    transparent,
    rgba(235, 240, 243, 0.16) 45%,
    rgba(235, 240, 243, 0.26) 50%,
    rgba(235, 240, 243, 0.16) 55%,
    transparent);
  filter: blur(9px);
  transform: skewX(-10deg);
  animation: wind-sweep 12s linear infinite;
  animation-delay: -8s;
}

@keyframes wind-sweep {
  0%   { transform: translateX(0) skewX(-10deg); opacity: 0; }
  10%  { opacity: 1; }
  82%  { opacity: 1; }
  100% { transform: translateX(230%) skewX(-10deg); opacity: 0; }
}

/* Rain on glass — droplets that sit on the screen itself (3D bulge, real refraction of
   what's behind via backdrop-filter) and slowly trickle down, like rain on a window/lens. */
.rain {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
}

.glass-drop {
  position: absolute;
  border-radius: 50%;
  backdrop-filter: blur(2px) brightness(1.16) contrast(1.05) saturate(1.08);
  -webkit-backdrop-filter: blur(2px) brightness(1.16) contrast(1.05) saturate(1.08);
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.25) 5%, transparent 11%),
    radial-gradient(circle at 66% 76%, rgba(0, 0, 0, 0.22), transparent 45%);
  box-shadow:
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.28),
    inset 0 -1.5px 2px rgba(0, 0, 0, 0.3),
    0 0.5px 2px rgba(0, 0, 0, 0.2);
  opacity: 0;
  animation-name: drop-trickle;
  animation-timing-function: cubic-bezier(0.3, 0, 0.7, 1);
  animation-iteration-count: infinite;
}

.glass-drop::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 80%;
  width: 16%;
  height: 180%;
  transform: translateX(-50%);
  background: linear-gradient(to top, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04) 55%, transparent 85%);
  filter: blur(0.6px);
  border-radius: 3px;
}

.vignette {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: radial-gradient(ellipse 88% 78% at 55% 45%, transparent 44%, rgba(0, 0, 0, 0.3) 100%);
}

@keyframes fog-drift-far {
  from { transform: translateX(-4%); }
  to { transform: translateX(5%); }
}

@keyframes fog-drift-near {
  from { transform: translateX(-6%) translateY(1px); }
  to { transform: translateX(7%) translateY(-2px); }
}

@keyframes drop-trickle {
  0%   { transform: translateY(0) rotate(var(--drop-rot, 0deg)); opacity: 0; }
  10%  { opacity: var(--drop-op, 0.85); }
  88%  { opacity: var(--drop-op, 0.85); }
  100% { transform: translateY(var(--drop-dy, 55vh)) rotate(var(--drop-rot, 0deg)); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .fog,
  .rain,
  .wind::before,
  .wind::after,
  .wind-gust3 {
    animation: none !important;
  }

  .rain,
  .wind {
    display: none;
  }

  .hero-bg {
    display: none !important;
  }

  .stage.is-playing .hero-poster {
    opacity: 1;
    visibility: visible;
  }
}

/* —— Left panel content —— */
.panel {
  position: absolute;
  z-index: 10;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(520px, 92vw);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1.25rem, 4vw, 3.25rem);
  pointer-events: none;
}

.panel > * {
  pointer-events: auto;
}

.sigil {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brass);
  opacity: 0.9;
  font-weight: 500;
}

.title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 7.5vw, 4.75rem);
  line-height: 1.05;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-shadow:
    0 2px 24px rgba(0, 0, 0, 0.65),
    0 0 40px rgba(196, 163, 90, 0.12);
}

.cult-line {
  margin: 0.85rem 0 0;
  font-size: clamp(0.85rem, 1.6vw, 1.05rem);
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  font-weight: 400;
  max-width: 22em;
}

/* CA block */
.ca-block {
  margin-top: clamp(1.75rem, 4vh, 2.75rem);
  padding: 0.85rem 1rem;
  background: var(--steel);
  border: 1px solid var(--steel-border);
  border-radius: 4px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px var(--shadow);
  max-width: 420px;
}

.ca-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.45rem;
}

.ca-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.ca-value {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  font-size: clamp(0.72rem, 1.5vw, 0.88rem);
  color: var(--ink);
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: transparent;
  border: none;
  padding: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--brass-dim);
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
  color: var(--ink);
  background: rgba(20, 22, 26, 0.55);
  padding: 0.55rem 0.9rem;
  white-space: nowrap;
}

.btn:hover,
.btn:focus-visible {
  border-color: var(--brass);
  color: var(--brass-hot);
  outline: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-copy {
  flex-shrink: 0;
  padding: 0.4rem 0.7rem;
  font-size: 0.68rem;
}

.btn-copy.is-copied {
  border-color: var(--brass);
  color: var(--brass-hot);
}

.actions {
  margin-top: 1.1rem;
}

.btn-twitter {
  background: linear-gradient(180deg, rgba(40, 36, 28, 0.75), rgba(20, 18, 14, 0.85));
  border-color: rgba(196, 163, 90, 0.45);
  padding: 0.7rem 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.btn-twitter:hover,
.btn-twitter:focus-visible {
  background: linear-gradient(180deg, rgba(55, 48, 32, 0.85), rgba(28, 24, 18, 0.9));
  border-color: var(--brass-hot);
  color: var(--brass-hot);
}

.icon {
  flex-shrink: 0;
  opacity: 0.9;
}

/* Toast */
.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 1.75rem;
  transform: translateX(-50%) translateY(12px);
  padding: 0.65rem 1.15rem;
  background: rgba(18, 20, 24, 0.92);
  border: 1px solid var(--steel-border);
  border-radius: 4px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* —— Responsive —— */
@media (max-width: 720px) {
  body {
    overflow: auto;
  }

  .stage {
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
  }

  .hero-poster img,
  .hero-bg {
    object-position: 70% center;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .panel {
    width: 100%;
    justify-content: flex-end;
    padding: 1.5rem 1.25rem 2.25rem;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 11, 13, 0.55) 30%, rgba(10, 11, 13, 0.82) 100%);
  }

  .title {
    font-size: clamp(2.4rem, 12vw, 3.4rem);
  }

  .ca-block {
    max-width: none;
  }

  .rain {
    opacity: 0.1;
  }
}

@media (min-width: 1400px) {
  .hero-poster img,
  .hero-bg {
    object-position: right center;
  }

  .panel {
    width: min(560px, 38vw);
    padding-left: clamp(2.5rem, 5vw, 5rem);
  }
}

@media (max-aspect-ratio: 3/4) {
  .hero-poster img,
  .hero-bg {
    object-position: 70% center;
  }
}

/* —— Hero → Forge links —— */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn-forge {
  padding: 0.7rem 1.25rem;
}

.scroll-cue {
  position: absolute;
  z-index: 10;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  color: var(--ink-muted);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
  animation: cue-bob 2.4s ease-in-out infinite;
}

.scroll-cue:hover {
  color: var(--brass-hot);
}

@keyframes cue-bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 5px); }
}

/* —— The Forge (pfp generator) —— */
.forge {
  position: relative;
  padding: clamp(3rem, 8vh, 5.5rem) clamp(1rem, 4vw, 3.5rem) 2rem;
  background:
    radial-gradient(ellipse 70% 40% at 50% 0%, rgba(196, 163, 90, 0.08), transparent 70%),
    linear-gradient(180deg, #16181b 0%, #101113 100%);
  border-top: 1px solid var(--steel-border);
}

.forge-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto clamp(2rem, 5vh, 3rem);
}

.forge-head .cult-line {
  margin-left: auto;
  margin-right: auto;
}

.forge-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-shadow: 0 0 40px rgba(196, 163, 90, 0.15);
}

.forge-body {
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(0, 420px);
  justify-content: center;
  gap: clamp(1.5rem, 3vw, 2.75rem);
  align-items: start;
}

.forge-canvas-wrap {
  position: relative;
  border: 1px solid var(--steel-border);
  border-radius: 4px;
  padding: 10px;
  background:
    linear-gradient(45deg, #1b1d20 25%, transparent 25%, transparent 75%, #1b1d20 75%),
    linear-gradient(45deg, #1b1d20 25%, transparent 25%, transparent 75%, #1b1d20 75%),
    #141518;
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

#forge-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  touch-action: none;
  cursor: grab;
  outline: none;
  border-radius: 2px;
}

#forge-canvas:focus-visible {
  box-shadow: 0 0 0 2px var(--brass);
}

.forge-hint {
  margin: 0.7rem 0 0;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: rgba(232, 234, 236, 0.5);
  text-align: center;
}

.forge-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.forge-panel {
  background: var(--steel);
  border: 1px solid var(--steel-border);
  border-radius: 4px;
  padding: 1rem 1.1rem 1.25rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

.forge-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.3rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--steel-border);
}

.forge-tab {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--ink-muted);
  padding: 0.6rem 0.2rem 0.65rem;
  cursor: pointer;
  margin-bottom: -1px;
}

.forge-tab:hover {
  color: var(--ink);
}

.forge-tab.is-on {
  color: var(--brass-hot);
  border-bottom-color: var(--brass);
}

.forge-label {
  margin: 1rem 0 0.55rem;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
}

.forge-pane > .forge-label:first-child {
  margin-top: 0.2rem;
}

.forge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 0.5rem;
}

.forge-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.3rem 0.5rem;
  background: rgba(12, 13, 15, 0.55);
  border: 1px solid rgba(180, 170, 140, 0.18);
  border-radius: 3px;
  color: var(--ink);
  font-family: var(--font-body);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.forge-tile:hover {
  border-color: var(--brass);
  background: rgba(40, 36, 28, 0.6);
}

.forge-tile:active {
  transform: translateY(1px);
}

.forge-tile.is-on {
  border-color: var(--brass-hot);
  box-shadow: inset 0 0 0 1px var(--brass-dim);
}

.forge-thumb {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brass);
  overflow: hidden;
  border-radius: 2px;
}

.forge-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

#forge-backdrops .forge-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.forge-swatch {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.forge-tile-label {
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: center;
  line-height: 1.25;
}

.forge-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.forge-chip {
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.45rem 0.75rem;
  background: rgba(12, 13, 15, 0.55);
  border: 1px solid rgba(180, 170, 140, 0.2);
  border-radius: 3px;
  color: var(--ink-muted);
  cursor: pointer;
}

.forge-chip:hover {
  border-color: var(--brass);
  color: var(--ink);
}

.forge-chip.is-on {
  border-color: var(--brass-hot);
  color: var(--brass-hot);
}

.forge-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.forge-row input[type="range"] {
  flex: 1;
  accent-color: var(--brass);
}

.btn-small {
  padding: 0.4rem 0.7rem;
  font-size: 0.64rem;
}

.forge-selbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(180, 170, 140, 0.15);
}

.forge-selbar[hidden] {
  display: none;
}

.forge-input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: rgba(12, 13, 15, 0.6);
  border: 1px solid rgba(180, 170, 140, 0.25);
  border-radius: 3px;
  padding: 0.55rem 0.7rem;
  outline: none;
}

.forge-input:focus {
  border-color: var(--brass);
}

.forge-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.8rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  cursor: pointer;
}

.forge-check input {
  accent-color: var(--brass);
}

.forge-color {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.forge-foot {
  margin-top: clamp(2.5rem, 6vh, 4rem);
  text-align: center;
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(232, 234, 236, 0.35);
}

@media (max-width: 900px) {
  .forge-body {
    grid-template-columns: minmax(0, 560px);
  }
}

@media (max-width: 720px) {
  .scroll-cue {
    display: none;
  }
}

/* Forge v11: wardrobe swatches, long backdrop list */
.forge-chip-sw { display: inline-flex; align-items: center; gap: 8px; }
.forge-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.35); flex: none; }
#forge-backdrops { max-height: 440px; overflow-y: auto; padding-right: 4px; }
#forge-backdrops img { width: 100%; height: 100%; object-fit: cover; }
.forge-tabs { flex-wrap: wrap; }

/* —— The Thesis: parchment scroll —— */
.thesis {
  position: relative;
  padding: clamp(3rem, 9vh, 6rem) clamp(0.75rem, 4vw, 3rem) clamp(2.5rem, 7vh, 4.5rem);
  background:
    radial-gradient(ellipse 60% 45% at 50% 30%, rgba(224, 160, 80, 0.10), transparent 70%),
    linear-gradient(180deg, #0f1012 0%, #16181b 100%);
  border-top: 1px solid var(--steel-border);
  text-align: center;
}
.scroll { max-width: 860px; margin: 0 auto; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.6)); }
.scroll-rod {
  position: relative; z-index: 2;
  height: 26px; margin: 0 -18px; border-radius: 13px;
  background: linear-gradient(180deg, #7a5a2a 0%, #c9a25c 22%, #f0d79a 38%, #a37a36 62%, #5b3f1a 100%);
  box-shadow: inset 0 -3px 5px rgba(0, 0, 0, 0.35), 0 4px 10px rgba(0, 0, 0, 0.5);
}
.scroll-rod::before, .scroll-rod::after {
  content: ""; position: absolute; top: -5px; width: 22px; height: 36px; border-radius: 9px;
  background: linear-gradient(180deg, #5b3f1a, #d8b46c 35%, #f3deaa 48%, #8a6529 70%, #3f2a10);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}
.scroll-rod::before { left: -10px; }
.scroll-rod::after { right: -10px; }
.parchment {
  position: relative;
  margin: -6px 0;
  padding: clamp(2.2rem, 6vw, 4.2rem) clamp(1.4rem, 7vw, 5rem) clamp(2rem, 5vw, 3.4rem);
  color: #3a2410;
  text-align: left;
  font-family: "IM Fell English", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(1.05rem, 1.55vw, 1.24rem);
  line-height: 1.72;
  background-color: #e3cf9f;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='320'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' seed='7'/><feColorMatrix values='0 0 0 0 0.35  0 0 0 0 0.22  0 0 0 0 0.08  0 0 0 0.16 0'/></filter><rect width='320' height='320' filter='url(%23n)'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='900' height='900'><filter id='s'><feTurbulence type='fractalNoise' baseFrequency='0.006' numOctaves='3' seed='11'/><feColorMatrix values='0 0 0 0 0.42  0 0 0 0 0.26  0 0 0 0 0.08  0 0 0 0.75 -0.22'/></filter><rect width='900' height='900' filter='url(%23s)'/></svg>"),
    radial-gradient(ellipse at 50% 40%, #f1e2b8 0%, #e6d2a2 55%, #cfae72 100%);
  box-shadow:
    inset 0 0 70px rgba(110, 66, 20, 0.55),
    inset 0 0 14px rgba(70, 38, 8, 0.5),
    inset 0 22px 26px -14px rgba(40, 20, 4, 0.55),
    inset 0 -22px 26px -14px rgba(40, 20, 4, 0.55);
}
.parchment-kicker {
  margin: 0 0 0.6rem; text-align: center;
  font-family: var(--font-body); font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; color: #7a4a1c;
}
.parchment-title {
  margin: 0; text-align: center;
  font-family: "UnifrakturCook", var(--font-display); font-weight: 700;
  font-size: clamp(3rem, 9vw, 5.4rem); line-height: 1; color: #4a1210;
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.5);
}
.parchment-sub { margin: 0.5rem 0 0; text-align: center; font-style: italic; color: #5c3a18; }
.parchment-rule {
  display: flex; align-items: center; gap: 0.9rem; margin: 1.6rem auto; max-width: 420px; color: #7a2a1a;
}
.parchment-rule::before, .parchment-rule::after {
  content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(90, 45, 15, 0.7), transparent);
}
.parchment h3 {
  margin: 1.9rem 0 0.35rem;
  font-family: var(--font-body); font-weight: 600; font-size: 0.98em; letter-spacing: 0.14em; text-transform: uppercase; color: #5a1a12;
}
.parchment .numeral { display: inline-block; min-width: 2.2em; color: #8a2a1a; }
.parchment p { margin: 0 0 0.4rem; }
.parchment-lead { font-size: 1.1em; }
.dropcap {
  float: left; margin: 0.06em 0.12em -0.1em 0;
  font-family: "UnifrakturCook", var(--font-display); font-size: 4.3em; line-height: 0.82; color: #8a1c14;
  text-shadow: 1px 1px 0 rgba(255, 235, 190, 0.6);
}
.parchment-oath {
  text-align: center; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.15rem, 2.6vw, 1.6rem); letter-spacing: 0.05em; color: #4a1210;
}
.parchment-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-top: 1.8rem; }
.parchment-sign { display: flex; flex-direction: column; }
.sign-label { font-style: italic; color: #6b4520; font-size: 0.92em; }
.sign-name { font-family: "UnifrakturCook", var(--font-display); font-size: 1.9em; line-height: 1.1; color: #3a1a0c; transform: rotate(-2deg); transform-origin: left; }
.wax-seal { flex: none; filter: drop-shadow(0 5px 6px rgba(40, 10, 5, 0.55)); transform: rotate(8deg); }
.thesis-cta { margin-top: clamp(1.8rem, 5vh, 3rem); }
@media (max-width: 560px) {
  .scroll-rod { margin: 0 -6px; }
  .parchment-foot { flex-direction: column; align-items: center; text-align: center; }
  .sign-name { transform: none; }
}
@media (max-width: 560px) { .dropcap { font-size: 3.5em; line-height: 0.95; margin-bottom: 0; padding-right: 0.04em; } }

/* —— Thesis v14: illustrated, paced layout —— */
.parchment-fig {
  float: right; width: min(38%, 250px); margin: 0 0 0.6rem 1.6rem; text-align: center;
  shape-outside: inset(0 0 0 0);
}
.parchment-fig img {
  display: block; width: 100%; height: auto;
  filter: sepia(0.9) saturate(0.75) contrast(1.08) brightness(0.96);
  mix-blend-mode: multiply;
}
.parchment-fig figcaption { margin-top: 0.35rem; font-style: italic; font-size: 0.8em; line-height: 1.3; color: #6b4520; }
.parchment-lead { font-size: 1.22em; line-height: 1.6; }
.tenet {
  clear: none; display: grid; grid-template-columns: 3.6rem 1fr; gap: 0 1.1rem; align-items: start;
  margin-top: 2.1rem;
}
.tenet-num {
  display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 50%;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: #7a1c14;
  border: 2px solid rgba(122, 28, 20, 0.65);
  box-shadow: inset 0 0 0 4px #e3cf9f, inset 0 0 0 5px rgba(122, 28, 20, 0.4);
  background: radial-gradient(circle at 40% 35%, rgba(255, 240, 200, 0.6), rgba(170, 120, 50, 0.18));
}
.parchment .tenet h3 { margin: 0.15rem 0 0.4rem; font-size: 1.02em; }
.tenet p { margin: 0 0 0.55rem; }
.ink {
  font-style: italic; color: #8a1c14;
  background: linear-gradient(transparent 62%, rgba(138, 28, 20, 0.16) 62%, rgba(138, 28, 20, 0.16) 92%, transparent 92%);
}
.parchment-quote {
  clear: both; margin: 2.4rem auto 0.6rem; padding: 1.2rem 1rem; max-width: 34rem; text-align: center;
  font-family: "UnifrakturCook", var(--font-display); font-size: clamp(1.7rem, 4.6vw, 2.7rem); line-height: 1.15; color: #4a1210;
  border-top: 1px solid rgba(90, 45, 15, 0.45); border-bottom: 1px solid rgba(90, 45, 15, 0.45);
}
.stamps { display: flex; flex-wrap: wrap; gap: 0.5rem 0.55rem; margin: 0.2rem 0 0.9rem; padding: 0; list-style: none; }
.stamps li {
  padding: 0.18rem 0.7rem; font-family: var(--font-body); font-size: 0.72em; letter-spacing: 0.14em; text-transform: uppercase;
  color: #6a1a12; border: 1.5px solid rgba(106, 26, 18, 0.6); border-radius: 3px; background: rgba(255, 240, 200, 0.28);
}
.stamps li:nth-child(odd) { transform: rotate(-1.6deg); }
.stamps li:nth-child(even) { transform: rotate(1.2deg); }
.vows { margin: 0.5rem 0 0; padding: 0; list-style: none; counter-reset: vow; }
.vows li {
  position: relative; padding: 0.3rem 0 0.3rem 2.1rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.12em; color: #4a1210;
}
.vows li::before { content: "\2694"; position: absolute; left: 0; top: 0.28rem; color: #8a1c14; font-family: serif; font-weight: 400; }
.js-reveal .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js-reveal .reveal.is-in { opacity: 1; transform: none; }
.js-reveal .parchment-quote.reveal { transform: scale(0.94); }
.js-reveal .parchment-quote.reveal.is-in { transform: none; }
@media (prefers-reduced-motion: reduce) { .js-reveal .reveal { opacity: 1; transform: none; transition: none; } }
@media (max-width: 560px) {
  .parchment-fig { float: none; width: 62%; margin: 0 auto 1.2rem; }
  .tenet { grid-template-columns: 2.7rem 1fr; gap: 0 0.8rem; }
  .tenet-num { width: 2.7rem; height: 2.7rem; font-size: 0.9rem; }
}
.tenet-num { font-family: var(--font-body); font-weight: 600; letter-spacing: 0.04em; }
.vows li, .parchment-oath { font-family: var(--font-body); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }

/* Imperial Guard Kitty: longer name, set on two lines */
.title { font-size: clamp(2.3rem, 6vw, 3.9rem); }
@media (max-width: 720px) { .title { font-size: clamp(2rem, 10.5vw, 3.2rem); } }

/* Chinese name 禁卫咪 */
.cn, .title-cn, .chop { font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", "Microsoft YaHei", serif; }
.title-cn {
  margin: 0.45rem 0 0; font-weight: 900; font-size: clamp(1.7rem, 4vw, 2.6rem); letter-spacing: 0.32em; line-height: 1.1;
  color: var(--brass-hot); text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
}
.parchment .cn { font-weight: 700; color: #8a1c14; letter-spacing: 0.08em; }
.chop {
  position: absolute; top: clamp(1.6rem, 5vw, 3.2rem); right: clamp(1.2rem, 6vw, 4.2rem);
  writing-mode: vertical-rl; text-orientation: upright;
  padding: 0.5rem 0.3rem; font-weight: 900; font-size: clamp(1.15rem, 2.4vw, 1.6rem); line-height: 1.12; letter-spacing: 0.12em;
  color: #a3211a; border: 3px solid #a3211a; border-radius: 4px;
  transform: rotate(5deg); opacity: 0.82; mix-blend-mode: multiply;
  box-shadow: inset 0 0 0 2px rgba(227, 207, 159, 0.9), inset 0 0 0 3px rgba(163, 33, 26, 0.55);
}
@media (max-width: 560px) { .chop { top: 5.6rem; right: 0.7rem; font-size: 0.95rem; padding: 0.35rem 0.2rem; border-width: 2px; } }
@media (max-width: 560px) { .chop { top: 5.1rem; right: 0.55rem; font-size: 0.8rem; } }
.forge-who { margin: 0 0 0.6rem; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass-hot); }

/* —— The Sightings: where she came from —— */
.sightings {
  position: relative;
  padding: clamp(3rem, 8vh, 5.5rem) clamp(1rem, 4vw, 3.5rem) clamp(2.5rem, 6vh, 4rem);
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(196, 163, 90, 0.10), transparent 70%),
    linear-gradient(180deg, #16181b 0%, #0f1012 100%);
  border-top: 1px solid var(--steel-border);
}
.sightings .forge-head { max-width: 720px; }
.sight-grid {
  display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: clamp(0.9rem, 2vw, 1.4rem);
  max-width: 1120px; margin: 0 auto;
}
.sight-card {
  display: flex; flex-direction: column; gap: 0.35rem;
  padding: clamp(1.3rem, 2.6vw, 2rem);
  color: var(--ink); text-decoration: none;
  background: linear-gradient(160deg, rgba(40, 43, 48, 0.9), rgba(20, 22, 25, 0.92));
  border: 1px solid var(--steel-border); border-radius: 4px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
a.sight-card:hover, a.sight-card:focus-visible {
  transform: translateY(-5px); border-color: var(--brass);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55), 0 0 40px rgba(196, 163, 90, 0.12);
}
.sight-card--big { background: linear-gradient(160deg, rgba(74, 58, 26, 0.55), rgba(20, 22, 25, 0.94)); border-color: var(--brass-dim); }
.sight-where {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brass-hot);
}
.sight-stat {
  margin-top: 0.6rem; font-family: var(--font-body); font-weight: 600; line-height: 0.95;
  font-size: clamp(3.4rem, 8vw, 5.6rem); letter-spacing: 0.01em; color: #fff;
  text-shadow: 0 0 44px rgba(224, 192, 120, 0.35);
}
.sight-stat--word { font-size: clamp(2.5rem, 5.4vw, 3.8rem); }
.sight-unit { font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); }
.sight-text { margin-top: 0.8rem; font-family: "IM Fell English", Georgia, serif; font-size: 1.08rem; line-height: 1.5; color: var(--ink-muted); }
.sight-go { margin-top: auto; padding-top: 1.1rem; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass-hot); text-decoration: none; }
.sight-go:hover { color: #fff; }
.sight-note { max-width: 1120px; margin: 1.3rem auto 0; text-align: center; font-size: 0.72rem; letter-spacing: 0.06em; color: rgba(232, 234, 236, 0.45); }
.sightings .cn { color: var(--brass-hot); font-weight: 700; }
@media (max-width: 900px) { .sight-grid { grid-template-columns: 1fr; max-width: 520px; } }
