/* Static guide shell. Palette, brand and hardware match the active haunted wood hub.
   The homepage styles remain independent; all assets below are existing public art. */
:root {
  color-scheme: dark;
  --paper: #0b1025;
  --ink: #f7efdc;
  --muted: #c0c8d5;
  --line: #76554e;
  --trim: #ba854f;
  --edge: #38242b;
  --panel: #231c25;
  --focus: #ffd092;
  --gold: #e8ba83;
  font: 16px/1.65 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { position: relative; isolation: isolate; margin: 0; background: var(--paper); }
body::before, body::after { content: ""; position: absolute; inset-inline: 0; z-index: -1; pointer-events: none; image-rendering: pixelated; }
body::before {
  top: 0; height: 660px;
  background: linear-gradient(90deg, #090d22f2, #090d22cf 48%, #090d2299),
    linear-gradient(0deg, var(--paper), #0b102500 48%),
    url('/scene/halloween-8bit-hero-desktop.webp') center 44% / cover no-repeat;
}
body::after {
  top: 660px; bottom: 0; z-index: -2;
  background: linear-gradient(#0b102599, #0b1025b8),
    url('/scene/halloween-8bit-ground-desktop.webp') center top / 100% auto repeat-y;
}
a { color: inherit; text-decoration: none; text-underline-offset: .2em; }
a:hover { text-decoration: underline; }
a:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, p, figure { margin: 0; }
h1 { margin: 14px 0 18px; font: 700 clamp(2.5rem, 5vw, 4rem)/1.08 Georgia, "Times New Roman", serif; letter-spacing: -.035em; color: #fff3d6; text-shadow: 0 2px 1px #060b20; overflow-wrap: anywhere; }
h2 { font: 700 1.75rem/1.2 Georgia, "Times New Roman", serif; color: #fff0d8; }
.site-header, main, footer { width: min(100%, 1200px); margin-inline: auto; padding-inline: 32px; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 98px; border-bottom: 1px solid #ccafe340; }
.site-brand { display: flex; align-items: center; gap: 14px; min-height: 44px; font-size: 20px; font-weight: 760; letter-spacing: -.6px; }
.site-brand:hover { text-decoration: none; }
.brand-mark { display: block; flex: 0 0 46px; position: relative; width: 46px; height: 46px; padding-right: 3px; border-radius: 12px; background: #efe6cf; color: #173f39; text-align: center; font: 700 28px/42px Georgia, serif; letter-spacing: -4px; }
.brand-mark span { color: #a84426; }
.brand-mark i { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: #a84426; }
.brand-subtitle { display: block; margin-top: 4px; color: #c0cdbf; font: 650 8px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 1.7px; }
.site-header nav a { display: flex; align-items: center; gap: 14px; min-height: 44px; font-size: 14px; font-weight: 600; }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin: 20px 0 26px; font-size: 13px; color: var(--muted); }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; }
.breadcrumb > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.game-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.13fr); align-items: center; gap: 48px; padding: 0 0 48px; }
.intro-copy { min-width: 0; }
.eyebrow { color: #ffc480; font: 700 11px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; }
.subtitle { color: #edd3b3; font-size: 18px; line-height: 1.5; margin-bottom: 18px; }
.description { color: #d9dce1; max-width: 48ch; font-size: 16px; }
.intro-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; margin-top: 26px; }
.play-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 52px; max-width: 100%; padding: 12px 20px; border: 1px solid #ffcd91; color: #301e25; background: var(--gold); box-shadow: inset 0 -3px 0 #a56846, 3px 3px 0 #070b20; font-size: 15px; line-height: 1.5; font-weight: 750; overflow-wrap: anywhere; }
.play-button > span { flex-shrink: 0; }
.play-button:hover { background: #ffe0b5; text-decoration: none; }
.controls-link { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-size: 14px; text-decoration: underline; }
.play-note { margin-top: 12px; color: var(--muted); font-size: 12px; }
.screenshot { position: relative; min-width: 0; padding: 5px; border: 1px solid var(--trim); background: #100e1d; box-shadow: 5px 5px 0 #070915; }
.screenshot > img { width: 100%; height: auto; object-fit: contain; }
.screenshot figcaption { padding: 12px 13px 9px; border-top: 1px solid var(--edge); color: var(--muted); background: var(--panel); font-size: 12px; line-height: 1.6; }
.guide-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; gap: 24px; }
.guide-panel { position: relative; min-width: 0; padding: 30px; border: 1px solid #b18058; background: var(--panel); box-shadow: inset 4px 0 0 #50323b, inset -4px 0 0 #50323b, inset 0 -4px 0 #50323b, 5px 5px 0 #100e1d; }
.guide-panel h2 { margin: 6px 0 22px; padding-right: 24px; }
.guide-panel > p:not(.eyebrow) { color: #d9dce1; font-size: 15px; }
.guide-panel .small-note { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px !important; color: var(--muted) !important; }
#controls { scroll-margin-top: 24px; }
.controls { margin: 0; }
.controls > div { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid #76554e99; }
.controls > div:first-child { padding-top: 0; }
.controls > div:last-child { padding-bottom: 0; border-bottom: 0; }
dt, dd { min-width: 0; margin: 0; font-size: 14px; }
kbd { display: inline-block; max-width: 100%; padding: 3px 7px; border: 1px solid #94715e; background: #322733; box-shadow: 0 2px 0 #100e1d; color: #f5d5aa; font: 13px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.controls dd { color: #d9dce1; overflow-wrap: anywhere; }
.more-games { padding: 44px 0 48px; }
.more-heading { position: relative; margin-bottom: 22px; padding: 20px 24px; padding-right: 112px; border: 1px solid #bb885d; background-color: #32212b; background-image: repeating-linear-gradient(0deg, transparent 0 22px, #170f1770 22px 24px, #ab705127 24px 26px, transparent 26px 48px); box-shadow: inset 0 0 0 3px #493039, 5px 5px 0 #0a0919; }
.more-heading h2 { margin-top: 4px; }
.related-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.related-card { display: flex; flex-direction: column; min-width: 0; min-height: 44px; border: 1px solid #b18058; background: var(--panel); box-shadow: 4px 4px 0 #100e1d; }
.related-card:hover { border-color: #ffcd91; text-decoration: none; background: #322733; }
.related-card:hover .related-name { text-decoration: underline; text-underline-offset: .2em; }
.related-art { position: relative; display: block; aspect-ratio: 16 / 10; border-bottom: 1px solid #76554e; background: #100e1d; }
.related-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.related-copy { display: flex; flex: 1; flex-direction: column; gap: 5px; min-width: 0; padding: 16px; box-shadow: inset 3px 0 0 #50323b, inset -3px 0 0 #50323b, inset 0 -3px 0 #50323b; }
.related-mode { color: var(--muted); font: 11px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; }
.related-name { color: #fff0d8; font: 700 20px/1.2 Georgia, serif; overflow-wrap: anywhere; }
.related-action { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; color: #edc798; font-size: 12px; }
footer { display: flex; align-items: center; gap: 24px; padding-top: 20px; padding-bottom: 24px; border-top: 1px solid #6a5379; background: #0c142bef; color: var(--muted); font-size: 12px; }
footer a { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; }
.footer-brand { color: #ffead0; font-size: 18px; font-weight: 760; letter-spacing: -.6px; }
footer > span { font: 10px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; }
footer > a:last-child { margin-left: auto; }
.panel-decoration { position: absolute; inset: 0; pointer-events: none; user-select: none; }
.panel-decoration i { position: absolute; display: block; pointer-events: none; image-rendering: pixelated; }
.corner { width: 20px; height: 20px; background: #654333; border: 2px solid #c18b59; box-shadow: 2px 2px 0 #160f1b, inset -2px -2px 0 #352331; clip-path: polygon(0 0, 75% 0, 75% 25%, 100% 25%, 100% 100%, 25% 100%, 25% 75%, 0 75%); }
.corner::after { content: ""; position: absolute; left: 5px; top: 5px; width: 4px; height: 4px; background: #f4c98b; box-shadow: 2px 2px 0 #201624; }
.corner-a { top: -3px; left: -3px; }
.corner-b { top: -3px; right: -3px; }
.corner-c { bottom: -3px; left: -3px; }
.corner-d { bottom: -3px; right: -3px; }
.web { top: 0; right: 0; width: 44px; height: 44px; background: url('/assets/panel-web.svg') center / contain no-repeat; opacity: .55; }
.spider { display: none !important; }
.more-heading .spider { display: block !important; top: 0; right: 65px; width: 28px; height: 59px; background: url('/assets/panel-spider.svg') center / contain no-repeat; }
.screenshot .web { display: none; }
.screenshot .corner { width: 13px; height: 13px; }
.screenshot .corner::after { left: 3px; top: 3px; width: 3px; height: 3px; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 10; max-width: calc(100% - 24px); transform: translateY(-180%); padding: 12px 16px; border: 2px solid var(--focus); background: var(--paper); color: var(--ink); }
.skip-link:focus { transform: none; }
@media (max-width: 1000px) {
  .game-intro { gap: 28px; }
  .guide-panel { padding: 26px; }
  .related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .game-intro, .guide-grid { grid-template-columns: minmax(0, 1fr); }
  .game-intro { gap: 30px; padding-bottom: 32px; }
  .description { max-width: 64ch; }
  .screenshot { width: 100%; }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  footer { flex-wrap: wrap; gap: 8px 20px; }
  footer > span { width: 100%; order: 3; }
}
@media (max-width: 650px) {
  body::before { height: 660px; background-image: linear-gradient(90deg, #090d22ec, #090d22cf), linear-gradient(0deg, var(--paper), #0b102500 48%), url('/scene/halloween-8bit-hero-mobile.webp'); }
  body::after { background-image: linear-gradient(#0b102599, #0b1025b8), url('/scene/halloween-8bit-ground-mobile.webp'); }
  .site-header, main, footer { padding-inline: 20px; }
  .site-header { min-height: 86px; gap: 16px; }
  .site-brand { gap: 10px; font-size: 18px; }
  .brand-mark { flex-basis: 39px; width: 39px; height: 39px; font-size: 25px; line-height: 35px; border-radius: 10px; }
  .brand-subtitle { font-size: 7px; letter-spacing: 1px; }
  .site-header nav a { gap: 8px; font-size: 13px; }
  .breadcrumb { margin: 14px 0 20px; }
  .guide-grid { gap: 22px; }
  .guide-panel { padding: 25px 22px; }
  .more-games { padding-block: 32px; }
  .more-heading { padding: 20px; padding-right: 70px; }
  .more-heading h2 { font-size: 1.5rem; }
  .more-heading .spider { display: none !important; }
}
@media (max-width: 520px) {
  .related-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .related-card { display: grid; grid-template-columns: 104px minmax(0, 1fr); }
  .related-art { aspect-ratio: auto; border-bottom: 0; border-right: 1px solid #76554e; }
  .related-copy { padding: 14px; }
  .related-name { font-size: 19px; }
  .related-action { padding-top: 7px; }
}
@media (max-width: 430px) {
  .controls > div { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .play-button { padding-inline: 16px; }
}
@media (max-width: 390px) {
  .site-header, main, footer { padding-inline: 16px; }
  .brand-subtitle { display: none; }
  .guide-panel { padding: 24px 20px; }
  .related-card { grid-template-columns: 92px minmax(0, 1fr); }
  footer > a:last-child { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media (forced-colors: active) {
  body::before, body::after, .panel-decoration { display: none; }
  body, .guide-panel, .screenshot, .screenshot figcaption, .more-heading, .related-card, .related-art, .related-copy, footer, .skip-link, kbd { background: Canvas; color: CanvasText; box-shadow: none; }
  h1, h2, .eyebrow, .subtitle, .description, .play-note, .guide-panel > p:not(.eyebrow), .guide-panel .small-note, .controls dd, .related-name, .related-mode, .related-action { color: CanvasText !important; text-shadow: none; }
  a, .footer-brand { color: LinkText; }
  .play-button, .play-button:hover { color: ButtonText; background: ButtonFace; border-color: ButtonText; box-shadow: none; }
  .guide-panel, .screenshot, .more-heading, .related-card, kbd { border-color: CanvasText; }
  a:focus-visible, [tabindex]:focus-visible { outline-color: Highlight; }
}
