@font-face { font-family: Cormorant; src: url('/assets/cormorant-garamond.woff2') format('woff2'); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: Liberation; src: url('/assets/liberation-sans.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Liberation; src: url('/assets/liberation-sans-bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --ink: #0d0a09;
  --ink-raised: #17110f;
  --paper: #f7e7c3;
  --red: #b12721;
  --red-bright: #cf382e;
  --muted: #b7aa90;
  --dim: #8f8370;
  --line: rgba(247, 231, 195, .16);
  --serif: Cormorant, Georgia, serif;
  --sans: Liberation, Arial, sans-serif;
  --gutter: clamp(24px, 5.5vw, 88px);
  --wrap: min(100vw - var(--gutter) * 2, 1280px);
  --folio-col: 400px;
  --section-gap: 120px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-gutter: stable; }
body { margin: 0; background: var(--ink); color: var(--paper); font-family: var(--sans); font-size: 18px; line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; text-underline-offset: 5px; }
button { font: inherit; color: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .3; }
:focus-visible { outline: 2px solid var(--paper); outline-offset: 6px; }
::selection { color: var(--paper); background: var(--red); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; }

.wrap { width: var(--wrap); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: 10px; left: 20px; padding: 12px 20px; background: var(--paper); color: var(--ink); transform: translateY(-160%); z-index: 100; }
.skip-link:focus { transform: translateY(0); }

/* Header */
.masthead { height: 90px; display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 10; }
.studio { display: block; flex-shrink: 0; }
.studio img { width: 94px; height: 46px; object-fit: contain; }
.masthead nav { display: flex; gap: 36px; align-items: center; }
.masthead nav a, .masthead nav button { font-size: 14px; line-height: 1.6; color: var(--muted); padding: 10px 0; transition: color .2s; }
.masthead nav button { border: 0; background: none; }
.masthead nav a:focus-visible, .masthead nav button:focus-visible { color: var(--paper); }
.masthead nav .nav-guide { color: var(--paper); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 7px; }
.menu-toggle { display: none; }

/* Hero */
.hero { position: relative; isolation: isolate; overflow-x: clip; }
.hero-art { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 78% 18%; }
.hero::after { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, var(--ink) 4%, rgba(13, 10, 9, .78) 34%, rgba(13, 10, 9, .18) 66%, rgba(13, 10, 9, .4)), linear-gradient(0deg, var(--ink), transparent 28%); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) var(--folio-col); gap: 40px; align-items: center; min-height: 640px; padding-block: 30px 90px; }
.hero h1 { font-size: clamp(52px, calc((var(--wrap) - var(--folio-col) - 40px) / 5.8), 150px); line-height: .9; letter-spacing: -.02em; white-space: nowrap; margin-bottom: 26px; }
.hero-description { color: var(--muted); font-size: 18px; line-height: 1.6; max-width: 520px; margin-bottom: 34px; }
.button { min-height: 52px; display: inline-flex; justify-content: center; align-items: center; padding: 14px 26px; font-size: 14px; font-weight: 700; letter-spacing: .02em; line-height: 1.4; background: var(--paper); color: var(--ink); border: 1px solid var(--paper); transition: background .2s, border-color .2s, color .2s; }
.button:focus-visible { background: var(--red); border-color: var(--red); color: var(--paper); }

/* Field guide object */
.folio-stage { height: 520px; position: relative; display: flex; align-items: center; justify-content: center; perspective: 1500px; }
.folio-trigger { display: block; position: relative; width: 300px; height: 425px; flex-shrink: 0; perspective: 1500px; margin: -20px 40px 0 0; padding: 0; border: 0; background: none; text-align: inherit; }
.folio-trigger:focus-visible { outline-offset: 23px; }
.folio-object { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--tilt-x, 6deg)) rotateY(var(--tilt-y, -13deg)) rotateZ(6deg); transition: transform .6s cubic-bezier(.22, .68, .21, 1); filter: drop-shadow(19px 25px 22px rgba(0, 0, 0, .6)); }
.folio-cover { position: absolute; inset: 0; background: var(--ink); border-radius: 1px 3px 3px 1px; overflow: hidden; box-shadow: 0 0 0 1px #3d2c26, 2px 2px 0 #140e0c, 4px 4px 0 #1d1411; transform: translateZ(4px); backface-visibility: hidden; }
.folio-cover > img { width: 100%; height: 100%; object-fit: cover; }
.folio-spine { position: absolute; inset: 0 auto 0 0; width: 15px; background: linear-gradient(90deg, rgba(0, 0, 0, .7), rgba(255, 239, 197, .04) 30%, rgba(0, 0, 0, .5) 50%, transparent); border-left: 1px solid rgba(247, 231, 195, .13); }
.folio-paper { position: absolute; inset: 6px -6px -6px 8px; transform: translateZ(-4px); background: repeating-linear-gradient(0deg, #8f8061 0 1px, #c3b28e 1px 3px); border-right: 2px solid #e2d0a7; box-shadow: 3px 3px 0 #1a1210; }
.folio-leaf { position: absolute; top: 23px; left: 70px; width: 92%; height: 90%; background: var(--paper); transform: translateZ(-18px) rotate(8deg); transform-origin: bottom left; box-shadow: 3px 5px 14px #0006; transition: transform .55s cubic-bezier(.25, .7, .23, 1), left .55s cubic-bezier(.25, .7, .23, 1); overflow: hidden; }
.folio-leaf img { width: 100%; height: 100%; object-fit: cover; }
.folio-trigger:focus-visible .folio-leaf { left: 104px; transform: translateZ(-18px) rotate(11deg); }
.folio-caption { position: absolute; top: calc(100% + 42px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; border-bottom: 1px solid var(--line); padding-bottom: 6px; line-height: 1.3; }
.folio-caption span { color: var(--red-bright); padding-left: 8px; font-size: 15px; }

/* Pre-alpha label */
.pre-alpha { position: absolute; top: 0; left: 0; z-index: 2; background: var(--red); color: var(--paper); font-size: 10px; font-weight: 700; letter-spacing: .18em; line-height: 1; text-transform: uppercase; padding: 6px 8px 6px 9px; pointer-events: none; }
.dialog-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.dialog-title .pre-alpha { position: static; }

/* Screenshots */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.gallery-shot { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink-raised); }
.gallery-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-shot:focus-visible img { transform: scale(1.03); }

/* About */
.about { display: grid; grid-template-columns: 1.1fr .9fr; gap: 90px; align-items: start; padding-top: var(--section-gap); }
.about-lede { font-family: var(--serif); font-size: clamp(34px, 3.2vw, 46px); line-height: 1.15; letter-spacing: -.01em; }
.about-points { list-style: none; margin: 0; padding: 0; }
.about-points li { padding: 18px 0; border-top: 1px solid var(--line); color: rgba(247, 231, 195, .84); font-size: 17px; line-height: 1.6; }
.about-points li:first-child { padding-top: 4px; border-top: 0; }
.about-points li:last-child { padding-bottom: 0; }

/* Bestiary */
.bestiary { padding-block: var(--section-gap); }
.creatures { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.creature { display: flex; flex-direction: column; }
.creature-art { position: relative; aspect-ratio: 4 / 5; background: radial-gradient(circle at 50% 55%, rgba(177, 39, 33, .18), transparent 66%), var(--ink-raised); }
.creature-art img { position: absolute; inset: 30px 24px; width: calc(100% - 48px); height: calc(100% - 60px); object-fit: contain; filter: drop-shadow(0 14px 18px #0006); }
.creature-info { background: var(--paper); color: var(--ink); padding: 20px 20px 18px; flex: 1; }
.creature-info h2 { font-size: 30px; line-height: 1; letter-spacing: -.01em; margin-bottom: 14px; }
.creature-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(91, 24, 23, .28); padding-top: 12px; }
.creature-stats > div { display: flex; flex-direction: column-reverse; }
.creature-stats dt { font-size: 10px; letter-spacing: .12em; color: #766047; line-height: 1.3; }
.creature-stats dd { font-family: var(--serif); font-size: 28px; line-height: 1; color: var(--red); margin-bottom: 5px; }

/* Footer */
.footer { display: flex; align-items: center; gap: 30px; border-top: 1px solid var(--line); padding-block: 35px 45px; }
.footer > p { font-size: 12px; color: var(--dim); margin-right: auto; }
.footer-links { display: flex; align-items: center; gap: 25px; font-size: 13px; color: var(--muted); }
.footer-links a, .footer-links button { display: inline-flex; align-items: center; min-height: 44px; }
.footer-links button { border: 0; background: none; padding: 0; font: inherit; }
.footer .studio img { width: 72px; height: 36px; }

/* Dialogs */
dialog { padding: 0; border: 1px solid var(--line); background: var(--ink); color: var(--paper); max-width: calc(100vw - 48px); max-height: calc(100dvh - 48px); box-shadow: 0 25px 100px #0009; overscroll-behavior: contain; }
dialog:focus, dialog:focus-visible { outline: none; }
dialog::backdrop { background: rgba(6, 4, 3, .92); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); }
dialog[open] { animation: dialog-in .2s ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.dialog-bar { display: flex; justify-content: space-between; align-items: center; gap: 25px; padding: 20px 26px; border-bottom: 1px solid var(--line); }
.dialog-bar h2 { font-family: var(--sans); font-weight: 400; font-size: 16px; line-height: 1.4; }
.dialog-close { display: flex; align-items: center; gap: 15px; padding: 8px 0 8px 14px; border: 0; background: transparent; font-size: 14px; line-height: 1; min-height: 44px; white-space: nowrap; }
.dialog-close span { font-size: 28px; line-height: .7; }
.media-dialog { width: min(1170px, calc(100vw - 48px)); }
.gallery-view { margin: 20px 24px 0; }
.gallery-view > img { width: 100%; max-height: 61dvh; object-fit: contain; }
.gallery-controls, .guide-controls { display: flex; justify-content: center; align-items: center; gap: 34px; margin: 17px 0; }
.gallery-controls button, .guide-controls button { background: none; border: 1px solid var(--line); font-size: 14px; padding: 9px 17px; min-height: 44px; min-width: 95px; }
.gallery-controls p, .guide-controls p { font-size: 13px; color: var(--muted); min-width: 48px; text-align: center; }
.gallery-thumbnails { display: flex; gap: 8px; justify-content: center; padding: 0 24px 20px; }
.gallery-thumbnails button { width: 95px; aspect-ratio: 16 / 9; border: 1px solid transparent; background: none; padding: 0; opacity: .5; }
.gallery-thumbnails button img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbnails button[aria-pressed=true] { border-color: var(--paper); opacity: 1; }
.credits-dialog { width: 650px; }
.credits-list { padding: 7px 30px 18px; }
.credits-list > div { padding: 18px 0; border-bottom: 1px solid var(--line); }
.credits-list > div:last-child { border: 0; }
.credits-list dt { font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.credits-list dd { font-family: var(--serif); font-size: 23px; line-height: 1.4; }
.credits-list a { text-decoration: underline; text-decoration-color: var(--line); }

/* Field guide book: no window, just the book over the blurred page */
.guide-dialog { --avail-h: calc(100vh - 150px); --avail-w: calc(100vw - 64px); width: 100%; height: 100vh; max-width: none; max-height: none; margin: 0; border: 0; background: transparent; box-shadow: none; overflow: hidden; }
@supports (height: 100dvh) { .guide-dialog { --avail-h: calc(100dvh - 150px); height: 100dvh; } }
.guide-dialog[open] { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; animation: fade-in .25s ease-out; }
@keyframes fade-in { from { opacity: 0; } }
.guide-top { display: flex; justify-content: flex-end; padding: 12px max(24px, env(safe-area-inset-right)) 0 24px; }
.book-stage { display: grid; place-items: center; min-height: 0; perspective: 1800px; }
.book-intro { animation: book-in .65s cubic-bezier(.2, .75, .25, 1) both; }
@keyframes book-in { from { opacity: 0; transform: translateY(30px) rotateX(16deg) scale(.92); } }
.book { --page-h: min(var(--avail-h), 1000px, calc(var(--avail-w) / 2 * 1241 / 875)); --page-w: calc(var(--page-h) * 875 / 1241); position: relative; width: calc(var(--page-w) * 2); height: var(--page-h); perspective: calc(var(--page-w) * 7); transform: translateX(calc(var(--page-w) * var(--shift, 0) * var(--zoom, 1))) scale(var(--zoom, 1)); touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.book-page { position: absolute; top: 0; width: 50%; height: 100%; background: #0c0a08; cursor: pointer; }
.book-page img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.book-page::after { content: ''; position: absolute; inset: 0; pointer-events: none; }
.book-shade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
.book-left { left: 0; box-shadow: -2px 1px 0 -1px #352a23, -4px 2px 0 -2px #1b1411, -6px 3px 0 -3px #2e241f, -8px 4px 0 -4px #1b1411, 0 34px 60px -18px #000, 0 14px 26px -14px #000; }
.book-right { left: 50%; box-shadow: 2px 1px 0 -1px #352a23, 4px 2px 0 -2px #1b1411, 6px 3px 0 -3px #2e241f, 8px 4px 0 -4px #1b1411, 0 34px 60px -18px #000, 0 14px 26px -14px #000; }
.book[data-state=open] .book-left::after { background: linear-gradient(270deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .2) 4%, transparent 13%); }
.book[data-state=open] .book-right::after { background: linear-gradient(90deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .2) 4%, transparent 13%); }
.book[data-state=front] .book-right::after { background: linear-gradient(90deg, rgba(0, 0, 0, .55), rgba(247, 231, 195, .07) 1.4%, rgba(0, 0, 0, .3) 2.8%, transparent 6%); }
.book[data-state=back] .book-left::after { background: linear-gradient(270deg, rgba(0, 0, 0, .55), rgba(247, 231, 195, .07) 1.4%, rgba(0, 0, 0, .3) 2.8%, transparent 6%); }
.book-leaf { position: absolute; top: 0; left: 50%; width: 50%; height: 100%; transform-style: preserve-3d; pointer-events: none; }
.book-leaf.is-reverse { left: 0; }
.leaf-strip { position: absolute; top: 0; left: 0; height: 100%; transform-style: preserve-3d; transform-origin: 0 50%; will-change: transform; }
.is-reverse .leaf-strip { left: auto; right: 0; transform-origin: 100% 50%; }
.leaf-face { --gutter-dir: 90deg; position: absolute; inset: 0; background-color: #0c0a08; background-repeat: no-repeat; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.leaf-back { --gutter-dir: 270deg; transform: rotateY(180deg); }
.is-reverse .leaf-front { --gutter-dir: 270deg; }
.is-reverse .leaf-back { --gutter-dir: 90deg; }
.leaf-face.is-blank { background: linear-gradient(90deg, #1a1310, #0c0a08 60%); }
.leaf-face::after { content: ''; position: absolute; inset: 0; background: linear-gradient(var(--gutter-dir), rgba(0, 0, 0, var(--s0, 0)), rgba(0, 0, 0, var(--s1, 0))); }
.leaf-face.is-hinge::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(var(--gutter-dir), rgba(0, 0, 0, .5), rgba(0, 0, 0, .12) 55%, transparent); }
.guide-controls { margin: 0; gap: 28px; padding: 16px 20px max(20px, env(safe-area-inset-bottom)); }
.guide-controls p { min-width: 190px; white-space: nowrap; }
.guide-dialog .dialog-close { text-shadow: 0 1px 8px #000; }

@media (hover: hover) {
  .masthead nav a:hover, .masthead nav button:hover { color: var(--paper); }
  .button:hover { background: var(--red); border-color: var(--red); color: var(--paper); }
  .folio-trigger:hover .folio-leaf { left: 104px; transform: translateZ(-18px) rotate(11deg); }
  .gallery-shot:hover img { transform: scale(1.03); }
  .footer-links a:hover, .footer-links button:hover { color: var(--paper); }
  .gallery-controls button:hover:not(:disabled), .guide-controls button:hover:not(:disabled) { background: #f7e7c30c; border-color: var(--paper); }
  .credits-list a:hover { text-decoration-color: currentColor; }
}

@media (max-width: 1100px) {
  :root { --folio-col: 320px; --section-gap: 100px; }
  .hero-inner { min-height: 560px; }
  .folio-stage { height: 440px; }
  .folio-trigger { width: 250px; height: 354px; }
  .folio-leaf { left: 58px; }
  .folio-trigger:focus-visible .folio-leaf { left: 86px; }
  .hero-description { font-size: 17px; }
  .about { gap: 60px; }
  .creatures { grid-template-columns: repeat(2, 1fr); }
  .creature-art { aspect-ratio: 5 / 4; }
}
@media (max-width: 1100px) and (hover: hover) {
  .folio-trigger:hover .folio-leaf { left: 86px; }
}

@media (max-width: 800px) {
  :root { --section-gap: 80px; }
  .masthead nav { gap: 23px; }
  .hero-inner { grid-template-columns: 1fr; gap: 0; min-height: 0; padding-block: 36px 60px; }
  .hero h1 { font-size: calc(var(--wrap) / 5.75); margin-bottom: 18px; }
  .hero-art { object-position: 70% 0; opacity: .8; }
  .hero::after { background: linear-gradient(0deg, var(--ink) 4%, rgba(13, 10, 9, .55) 45%, rgba(13, 10, 9, .35)); }
  .folio-stage { height: 410px; margin-top: 30px; }
  .folio-trigger { width: 230px; height: 326px; margin-right: 30px; }
  .folio-caption { top: calc(100% + 34px); }
  .about { grid-template-columns: 1fr; gap: 36px; }
  .about-lede { font-size: 32px; }
  .about-points li { font-size: 16px; }
  .footer { flex-wrap: wrap; }
  .footer-links { width: 100%; justify-content: flex-end; margin-top: -5px; }
}

@media (max-width: 650px) {
  :root { --gutter: 22px; --section-gap: 64px; }
  body { font-size: 17px; }
  .masthead { height: 76px; }
  .studio img { width: 80px; height: 40px; }
  .menu-toggle { display: flex; align-items: center; gap: 12px; border: 0; background: none; font-size: 14px; min-height: 44px; padding: 8px 0 8px 15px; }
  .menu-toggle span { display: block; width: 17px; height: 8px; border-block: 1px solid var(--paper); transition: transform .2s; }
  .menu-toggle[aria-expanded=true] span { height: 1px; transform: rotate(45deg); position: relative; }
  .menu-toggle[aria-expanded=true] span::after { content: ''; position: absolute; width: 17px; height: 1px; background: var(--paper); transform: rotate(90deg); top: -1px; left: 0; }
  .masthead nav { display: none; position: absolute; top: 75px; left: calc(var(--gutter) * -1); right: calc(var(--gutter) * -1); padding: 14px var(--gutter) 22px; background: var(--ink); border-bottom: 1px solid var(--line); box-shadow: 0 20px 24px #0006; align-items: stretch; gap: 0; }
  .masthead nav.is-open { display: flex; flex-direction: column; }
  .masthead nav a, .masthead nav button { padding: 12px 0; font-size: 16px; text-align: left; }
  .masthead nav .nav-guide { text-decoration: none; }
  .hero-inner { padding-block: 26px 48px; }
  .hero-description { font-size: 16px; margin-bottom: 26px; }
  .button { width: 100%; }
  .folio-stage { height: 372px; margin-top: 24px; }
  .folio-trigger { width: 210px; height: 298px; margin-right: 34px; }
  .folio-leaf { left: 48px; }
  .folio-trigger:focus-visible .folio-leaf { left: 62px; }
  .gallery { gap: 8px; }
  .pre-alpha { padding: 5px 6px 5px 7px; letter-spacing: .14em; }
  .about-lede { font-size: 28px; }
  .creatures { gap: 8px; }
  .creature-art { aspect-ratio: 4 / 5; }
  .creature-art img { inset: 22px 12px; width: calc(100% - 24px); height: calc(100% - 44px); }
  .creature-info { padding: 14px 12px 12px; }
  .creature-info h2 { font-size: 22px; margin-bottom: 10px; }
  .creature-stats { padding-top: 9px; }
  .creature-stats dt { letter-spacing: .06em; }
  .creature-stats dd { font-size: 21px; }
  .footer { padding-block: 27px 32px; gap: 20px; }
  .footer > p { font-size: 11px; margin-left: auto; margin-right: 0; }
  .footer-links { justify-content: flex-start; gap: 28px; margin-top: 0; }
  .footer .studio img { width: 70px; height: 35px; }

  dialog { max-width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .dialog-bar { padding: 12px 15px; gap: 12px; }
  .dialog-bar h2 { font-size: 14px; }
  .dialog-close { font-size: 13px; gap: 8px; padding-left: 8px; }
  .dialog-close span { font-size: 25px; }
  .media-dialog { width: calc(100vw - 20px); }
  .gallery-view { margin: 16px 10px 0; }
  .gallery-view > img { max-height: 58dvh; }
  .gallery-controls { gap: 22px; margin: 16px 0; }
  .gallery-controls button, .guide-controls button { min-width: 80px; padding: 10px 13px; }
  .gallery-thumbnails { padding: 0 12px 18px; gap: 6px; }
  .gallery-thumbnails button { width: 24%; max-width: 100px; }
  .guide-dialog { --avail-w: calc(100vw - 24px); }
  .guide-top { padding-inline: 16px; }
  .guide-controls { gap: 12px; padding-inline: 16px; }
  .guide-controls p { min-width: 0; font-size: 12px; white-space: normal; text-wrap: balance; }
  .credits-list { padding: 4px 20px 13px; }
  .credits-list dd { font-size: 21px; }
}
@media (max-width: 650px) and (hover: hover) {
  .folio-trigger:hover .folio-leaf { left: 62px; }
}

@media (max-width: 520px) {
  .gallery { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  :root { --gutter: 18px; }
  .folio-stage { height: 344px; }
  .folio-trigger { width: 190px; height: 269px; }
  .creature-info h2 { font-size: 19px; }
  .creature-stats dd { font-size: 18px; }
  .creature-stats dt { letter-spacing: .04em; }
}

/* Phones held sideways: keep the hero short enough to see the button */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-inner { min-height: 0; }
  .guide-dialog { --avail-h: calc(100vh - 78px); }
  @supports (height: 100dvh) { .guide-dialog { --avail-h: calc(100dvh - 78px); } }
  .guide-dialog[open] { grid-template-rows: minmax(0, 1fr) auto; }
  .guide-top { position: absolute; top: 0; right: 0; z-index: 1; padding-top: 8px; }
  .guide-controls { padding-top: 8px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .folio-trigger:hover .folio-leaf, .folio-trigger:focus-visible .folio-leaf { left: 70px; transform: translateZ(-18px) rotate(8deg); }
}

/* 404 */
.not-found { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.not-found-main { flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 34px; padding-bottom: 90px; }
.not-found-main h1 { font-size: clamp(44px, 8vw, 96px); line-height: .95; letter-spacing: -.02em; }
