/* Fairhaven After Dark website (landing page, plus the field guide for later). After hours: the mall's night ambient, its neon sign colours and Hazel's
   cream cards (palette from product/dead-mall/style-guide.html). System fonts only: nothing loads from anyone else. */

:root {
  color-scheme: dark;
  --night: #0b0d12;
  --ambient: #21212f;
  --panel: #161722;
  --line: #2f3044;
  --ink: #ece4d2;
  --muted: #a8a2b6;
  --pink: #ff5ca0;
  --cyan: #50dcff;
  --yellow: #ffd246;
  --paper: #efe6d2;
  --card-ink: #2c243c;
  --card-red: #aa1e28;
  --ok: #7be38e;
  --bad: #ff6b6b;
  --sign: "Bahnschrift", "DIN Alternate", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --hand: "Segoe Print", "Bradley Hand", "Comic Neue", "Chalkboard SE", cursive;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 17px/1.6 var(--body);
}
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--yellow); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--sign); line-height: 1.15; text-wrap: balance; letter-spacing: 0.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.1rem); margin: 1.2em 0 0.3em; }
h2 { font-size: 1.5rem; margin: 1.8em 0 0.5em; color: var(--yellow); }
h3 { font-size: 1.25rem; margin: 0.2em 0 0.4em; }
p, li { max-width: 68ch; }
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--yellow); color: var(--night); padding: 8px 12px; z-index: 9; }
.lede { font-size: 1.15rem; color: var(--ink); }
.small { font-size: 0.9rem; color: var(--muted); }
.mock { border-left: 3px solid var(--yellow); padding-left: 10px; }

/* Header: the neon sign and the mall directory */
.top { background: linear-gradient(180deg, var(--ambient), var(--night)); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px 10px; flex-wrap: wrap; }
.sign { text-decoration: none; display: flex; flex-direction: column; line-height: 1; }
.sign-small { font-family: var(--sign); text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.78rem; color: var(--cyan);
  text-shadow: 0 0 8px rgba(80, 220, 255, 0.6); }
.sign-big { font-family: var(--sign); font-weight: 700; text-transform: uppercase; font-size: clamp(1.9rem, 6vw, 2.6rem);
  color: #ffe6f1; text-shadow: 0 0 4px var(--pink), 0 0 14px var(--pink), 0 0 30px rgba(255, 92, 160, 0.55); letter-spacing: 0.04em; }
.play, .btn {
  display: inline-block; font-family: var(--sign); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  background: var(--yellow); color: var(--night); text-decoration: none; padding: 10px 18px; border-radius: 8px;
  box-shadow: 0 0 18px rgba(255, 210, 70, 0.35);
}
.play:hover, .btn:hover { color: var(--night); background: #ffe07a; }
.btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.directory { padding-block: 4px 14px; }
.dir-head { margin: 0 0 6px; font: 600 0.72rem var(--sign); letter-spacing: 0.25em; text-transform: uppercase; color: var(--muted); }
.directory ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.directory a {
  display: flex; align-items: center; gap: 7px; padding: 5px 10px 5px 6px; border-radius: 6px; text-decoration: none;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink); font-size: 0.92rem;
}
.directory a b { font: 700 0.75rem var(--sign); background: var(--ambient); color: var(--muted); border-radius: 4px; padding: 2px 5px; }
.directory a:hover { border-color: var(--cyan); }
.directory a.here { border-color: var(--pink); }
.directory a.here b { background: var(--pink); color: var(--night); }
.directory a.here::after { content: "You are here"; font: 700 0.62rem var(--sign); text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--pink); }

/* Home */
.hero { display: grid; grid-template-columns: 1fr 1.25fr; gap: 28px; align-items: center; padding-block: 28px 8px; }
.hero-text { min-width: 0; }
.hero h1 { margin-top: 0.2em; font-size: clamp(2.2rem, 6vw, 3.6rem); text-transform: uppercase; }
.hero h1 span { color: var(--cyan); text-shadow: 0 0 18px rgba(80, 220, 255, 0.45); }
.kicker { font: 600 0.8rem var(--sign); letter-spacing: 0.2em; text-transform: uppercase; color: var(--pink); margin: 0; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-shot { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); transform: rotate(1.2deg);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6); }
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 32px; }
.tile { display: block; text-decoration: none; color: var(--ink); background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 18px; min-width: 0; }
.tile:hover { border-color: var(--yellow); color: var(--ink); }
.tile h2 { margin: 0.2em 0; font-size: 1.25rem; color: var(--ink); }
.tile p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.num { font: 700 2.2rem var(--sign); color: var(--yellow); text-shadow: 0 0 12px rgba(255, 210, 70, 0.4); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.split > div { min-width: 0; }

/* Lists, steps, tables */
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.list li { padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; max-width: none; }
.list li span { display: block; color: var(--muted); font-size: 0.92rem; }
.list.big li a { font-family: var(--sign); font-size: 1.2rem; font-weight: 700; }
.steps { padding-left: 1.4em; display: grid; gap: 8px; }
.steps li::marker { font-family: var(--sign); font-weight: 700; color: var(--yellow); }
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; margin: 10px 0; }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 0.95rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 700 0.75rem var(--sign); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); background: var(--panel); }
tr:last-child td { border-bottom: 0; }
.ok { color: var(--ok); }
.bad { color: var(--bad); }
.chip { display: inline-block; font-size: 0.8rem; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--yellow); color: var(--yellow); white-space: nowrap; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; border: 1px solid var(--line); }
/* Colours from Records.TAGS and Records.FRAMES (no inline styles: the CSP allows none) */
.sw-classic { background: #f0f0f0; } .sw-gold { background: #ffc828; } .sw-ghost { background: #96e6ff; }
.sw-arcade, .sw-neon { background: #ff3cc8; } .sw-rainbow { background: linear-gradient(90deg, #ff5c5c, #ffd246, #78ff78, #50dcff, #c77dff); }
.sw-busted { background: #e62828; }
.tip { background: var(--panel); border-left: 4px solid var(--cyan); padding: 12px 14px; border-radius: 6px; }
.bang { color: var(--bad); font-weight: 900; }

.ends { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ends > div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; min-width: 0; }
.ends b { font-family: var(--sign); font-size: 1.05rem; }
.ends p { margin: 6px 0 0; color: var(--muted); }
.ranks { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; counter-reset: r; }
.ranks li { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; }
.ranks li b { font-family: var(--sign); }
.ranks li span { font-size: 0.85rem; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.facts > div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.facts b { display: block; font: 700 1.6rem var(--sign); color: var(--yellow); }
.facts span { color: var(--muted); font-size: 0.92rem; }
.roles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.roles > div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 4px 16px 12px; min-width: 0; }
.roles h2 { font-size: 1.2rem; }

/* Pictures */
.shot { margin: 22px 0; }
.shot img { border-radius: 10px; border: 1px solid var(--line); }
.shot figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 6px; }

/* Hazel's cards: cream paper, red border, her handwriting */
.card {
  background: var(--paper); color: var(--card-ink); border: 3px solid var(--card-red); border-radius: 4px;
  padding: 18px 20px 12px; margin: 14px 0; font: 1.12rem/1.5 var(--hand); transform: rotate(-1.4deg);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5); max-width: 460px;
}
.card p { margin: 0; }
.card cite { display: block; text-align: right; font-style: normal; margin-top: 8px; }
.quote { border-left: 3px solid var(--pink); margin: 10px 0; padding: 4px 14px; font-style: italic; }
.spoiler { background: var(--ambient); border: 1px dashed var(--line); border-radius: 8px; margin: 8px 0; }
.spoiler summary { cursor: pointer; padding: 8px 12px; color: var(--yellow); font-weight: 600; }
.spoiler div { padding: 0 12px 4px; }
.chapters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.chapters article { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; min-width: 0; }
.chapters .locked { opacity: 0.6; border-style: dashed; }
.chap { margin: 0; font: 700 0.75rem var(--sign); text-transform: uppercase; letter-spacing: 0.18em; color: var(--pink); }
.guard { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 2px 18px 10px; }
.update { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 4px 18px 16px; }
.date { margin: 12px 0 0; font: 700 0.75rem var(--sign); text-transform: uppercase; letter-spacing: 0.18em; color: var(--pink); }

/* Lost & Found */
.lf { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.lf li { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: flex; align-items: center; gap: 10px; }
.ico { font-size: 1.6rem; line-height: 1; }

/* Map */
.mapbox { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.map { width: 100%; height: auto; display: block; }
.map .hall { fill: #3a3a44; }
.map .void { fill: var(--panel); }
.map .wing { fill: #6b6458; }
.map .atrium { fill: #c4bcae; }
.map .fountain { fill: #28788c; stroke: #d6cebe; stroke-width: 3; }
.map .office { fill: #2a3a66; }
.map .door { fill: #e53935; }
.map .emp rect { fill: var(--pink); }
.map .pins circle { fill: var(--yellow); stroke: var(--night); stroke-width: 2; }
.map .lbl text { fill: #f4efe4; font: 700 14px var(--sign); text-anchor: middle; letter-spacing: 0.08em; paint-order: stroke; stroke: rgba(0,0,0,0.55); stroke-width: 3px; }
.map .lbl .on-light { fill: #17151c; stroke: none; }
.map .lbl .sub { font: 400 11px var(--body); letter-spacing: 0; }
.legend { list-style: none; padding: 0; display: grid; gap: 6px; margin-top: 12px; }
.k { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: 8px; vertical-align: -2px; }
.k-wing { background: #6b6458; } .k-hall { background: #3a3a44; border: 1px solid var(--line); } .k-emp { background: var(--pink); }
.k-door { background: #e53935; } .k-pin { background: var(--yellow); border-radius: 50%; }

/* Landing page: laid out like a game's store page. Icon, name, four facts, one big Play button, swipeable shots. */
.app-page h1.sign { margin: 0; }
/* The band behind it: the guard in the dark north wing, fading into the night on the left */
.band { background: linear-gradient(90deg, var(--night) 38%, rgba(11, 13, 18, 0.55) 70%, rgba(11, 13, 18, 0.2)),
  linear-gradient(0deg, var(--night), rgba(11, 13, 18, 0) 30%), url("img/guard-north-wing.jpg") right center / cover no-repeat;
  border-bottom: 1px solid var(--line); }
.store { padding-block: 44px 36px; display: grid; gap: 14px; justify-items: start; }
.store-head { display: flex; align-items: center; gap: 18px; min-width: 0; }
.store-icon { width: 112px; height: 112px; border-radius: 24px; border: 1px solid var(--line);
  box-shadow: 0 0 0 4px var(--panel), 0 0 28px rgba(255, 210, 70, 0.25); flex: none; }
.store-id { min-width: 0; }
.store-by { margin: 6px 0 0; color: var(--muted); font-size: 0.95rem; }
.store-meta { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; border: 1px solid var(--line);
  border-radius: 12px; background: var(--panel); }
.store-meta li { display: flex; flex-direction: column; align-items: center; padding: 8px 18px; min-width: 82px; }
.store-meta li + li { border-left: 1px solid var(--line); }
.store-meta b { font: 700 1.2rem var(--sign); color: var(--yellow); }
.store-meta span { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.store-pitch { font: 700 clamp(1.35rem, 4vw, 1.9rem)/1.25 var(--sign); margin: 6px 0 0; max-width: 30ch; text-wrap: balance; }
.store-cta { margin: 4px 0 0; }
.store .small { margin: 0; }
.btn.big { font-size: 1.2rem; padding: 16px 28px; border-radius: 12px; }

.strip { margin-top: 28px; }
.strip-row { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-block: 6px 14px;
  padding-left: max(16px, env(safe-area-inset-left, 0px), calc((100vw - 1080px) / 2 + 16px));
  padding-right: max(16px, env(safe-area-inset-right, 0px)); scroll-padding-left: max(16px, calc((100vw - 1080px) / 2 + 16px)); }
.strip figure { margin: 0; flex: 0 0 min(78vw, 460px); scroll-snap-align: start; }
.strip img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.strip figcaption { font: 600 1rem var(--sign); margin-top: 8px; color: var(--ink); }

.feat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.feat-grid > div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px 14px; min-width: 0; }
.feat-grid h3 { color: var(--cyan); margin-top: 0.6em; }
.feat-grid p { margin: 0; color: var(--muted); }
.story { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; }
.story > * { min-width: 0; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; max-width: 760px; }
.faq summary { cursor: pointer; padding: 12px 14px; font-weight: 600; }
.faq details p { margin: 0; padding: 0 14px 14px; color: var(--muted); }
.faq details ul { margin: 0; padding: 0 14px 12px 34px; color: var(--muted); display: grid; gap: 6px; }
.faq details li b { color: var(--ink); }
.last { text-align: center; padding-block: 28px 8px; }
.last-line { font: 700 clamp(1.4rem, 4vw, 2rem) var(--sign); margin: 0 auto 14px; text-transform: uppercase; }
.last-line b { color: var(--bad); }
.plain { padding-block: 20px; }

/* Phones: a Play bar stays on screen at the bottom, like an app store's Get button */
.dock { display: none; }
@media (max-width: 700px) {
  .dock { display: flex; align-items: center; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
    background: var(--panel); border-top: 1px solid var(--line);
    padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
  .dock img { border-radius: 9px; flex: none; }
  .dock span { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 0.8rem; color: var(--muted); line-height: 1.3; }
  .dock span b { color: var(--ink); font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dock .btn { padding: 8px 20px; }
  .app-page { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  .band { background: linear-gradient(0deg, var(--night) 45%, rgba(11, 13, 18, 0.6)),
    url("img/guard-north-wing.jpg") center top / cover no-repeat; }
  .store-icon { width: 88px; height: 88px; border-radius: 20px; }
  .store-meta { width: 100%; }
  .store-meta li { flex: 1; min-width: 0; padding: 8px 6px; }
  .feat-grid, .story { grid-template-columns: 1fr; }
}

/* Footer */
.foot { border-top: 1px solid var(--line); margin-top: 56px; background: var(--panel); color: var(--muted); font-size: 0.88rem; }
.foot .wrap { padding-block: 22px 30px; }
.foot .warn { font: 700 1rem var(--sign); color: var(--yellow); letter-spacing: 0.03em; }

@media (max-width: 820px) {
  .hero, .split { grid-template-columns: 1fr; }
  .hero-shot { transform: none; }
  .cards3, .ends, .chapters { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .roles { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-shot, .card { transform: none; }
}

/* The mall's story (Nov 14): era cards and Lantern clippings */
.history { margin-top: 48px; }
.eras { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.eras li { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; min-width: 0; }
.eras img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.eras .yr { display: block; font: 700 1.6rem var(--sign); color: var(--yellow); padding: 12px 16px 0; }
.eras h3 { margin: 2px 16px 4px; font-size: 1.1rem; }
.eras p { margin: 0 16px 16px; color: var(--muted); font-size: 0.95rem; }
.lantern-h { margin-top: 34px; font-family: var(--sign); }
.lantern figure { margin: 0; flex: 0 0 min(84vw, 520px); scroll-snap-align: start; }
.lantern img { width: 100%; height: auto; display: block; }
@media (max-width: 820px) { .eras { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .eras { grid-template-columns: 1fr; } }

/* Teaser mode (game still private): an honest "coming soon" line where the Play buttons will go. */
.soon { display: inline-block; font: 700 1.05rem var(--sign); text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--yellow); border: 2px dashed var(--yellow); border-radius: 12px; padding: 12px 22px; }
.play + .soon, .top-row .soon { padding: 6px 12px; font-size: 0.85rem; }
