/* ==========================================================================
   Ben & Mike's Sci-Fi and Fantasy Writing Adventures — website V1.0
   Brand: BMSFFWA Brand Guidelines V1.0 (Nov 2026). Do not redesign; apply.
   Layout concept: the site is the map. Dread Sea is the water everything sits
   in, Map Paper is the land you read on, Hover Red is the X and the moment
   you need someone to look. Marginalia dividers stitch the sections together.
   Single-theme by design: the brand has one world (Map Paper on Dread Sea).
   ========================================================================== */

@font-face {
  font-family: "Gluten";
  src: url("../fonts/Gluten-Variable.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/Nunito-Variable.woff2") format("woff2");
  font-weight: 200 1000; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/Nunito-Italic-Variable.woff2") format("woff2");
  font-weight: 200 1000; font-style: italic; font-display: swap;
}

:root {
  /* Primary */
  --dread-sea: #2FBFAE;
  --map-paper: #FFF1D6;
  --hover-red: #F2542D;
  /* Secondary: attention-grabbing moments only */
  --butter: #FFD447;
  --bubblegum: #FF8FB1;
  --eric-green: #8CC63F;
  --lagoon: #3D8FD6;
  --tangerine: #FF9F1C;
  --deep-sea: #0F6B66;
  /* Ink neutrals (Ink over Map Paper) */
  --ink: #1E1A17;
  --ink-90: #34312E; --ink-80: #4B4744; --ink-70: #625E5A; --ink-60: #787571;
  --ink-50: #8E8C88; --ink-40: #A5A29E; --ink-30: #BCB9B4; --ink-20: #D2D0CB;
  --ink-10: #E8E6E2; --ink-5: #F4F2ED;
  /* Tints: backgrounds and quiet panels only, never text */
  --dread-sea-20: #D5F2EF; --dread-sea-40: #ACE5DF;
  --hover-red-20: #FCDDD5;
  --map-paper-40: #FFF9EF;

  /* Type (guidelines p.15) */
  --font-display: "Gluten", "Trebuchet MS", system-ui, sans-serif;
  --font-text: "Nunito", Verdana, Arial, system-ui, sans-serif;

  --step-display: clamp(2.6rem, 1.6rem + 4.4vw, 6rem);   /* Gluten Black 96 */
  --step-headline: clamp(2rem, 1.4rem + 2.4vw, 3.5rem);  /* Gluten ExtraBold 56 */
  --step-maplabel: clamp(1.4rem, 1.1rem + 1.1vw, 2rem);  /* Gluten Bold 32 */
  --step-subhead: clamp(1.25rem, 1.05rem + 0.8vw, 1.875rem); /* Nunito ExtraBold 30 */
  --step-body: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);  /* Nunito Regular (22 in print) */
  --step-label: 0.875rem;                                  /* Nunito Black caps 16 */

  --line: 3px;            /* ink outline, 1/30-ish of a character */
  --wobble: 255px 18px 225px 18px / 18px 225px 18px 255px; /* hand-drawn corners */
  --wobble-sm: 20px 6px 18px 8px / 8px 18px 6px 20px;
  --measure: 65ch;
  --wrap: 1200px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--map-paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-body);
  line-height: 1.55;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--deep-sea); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--ink); text-decoration-color: var(--hover-red); }
:focus-visible { outline: 4px solid var(--lagoon); outline-offset: 3px; border-radius: 6px; }
p { margin: 0; max-width: var(--measure); }
h1, h2, h3 { margin: 0; font-family: var(--font-display); text-wrap: balance; color: var(--ink); }
h1 { font-weight: 900; font-size: var(--step-display); line-height: 1.0; }
h2 { font-weight: 800; font-size: var(--step-headline); line-height: 1.1; }
h3 { font-weight: 700; font-size: var(--step-maplabel); line-height: 1.2; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: var(--map-paper); padding: 10px 16px; border-radius: 10px;
  font-weight: 900;
}
.skip-link:focus { top: calc(12px + env(safe-area-inset-top, 0px)); color: var(--map-paper); }

.wrap {
  width: 100%; max-width: calc(var(--wrap) + 32px); margin-inline: auto;
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
}
.label {
  font-family: var(--font-text); font-weight: 900; font-size: var(--step-label);
  text-transform: uppercase; letter-spacing: 0.12em; line-height: 1.3;
}
.tag {
  display: inline-flex; align-items: center; gap: 0.5em;
  background: var(--ink); color: var(--map-paper);
  padding: 0.35em 0.9em; border-radius: 999px;
}
.subhead { font-weight: 800; font-size: var(--step-subhead); line-height: 1.3; letter-spacing: 0.01em; }
.stack { display: grid; gap: 1rem; align-content: start; min-width: 0; }

/* ---------- Header ---------- */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 60; background: var(--map-paper);
}
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: var(--map-paper);
  border-bottom: var(--line) solid var(--ink);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 10px;
}
.brand-link { display: block; flex: 0 0 auto; }
.brand-link img { width: 168px; }
.nav-toggle {
  display: none; align-items: center; gap: 0.5rem;
  font: 900 0.95rem/1 var(--font-text); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink); background: var(--map-paper);
  border: var(--line) solid var(--ink); border-radius: var(--wobble-sm);
  padding: 10px 14px; cursor: pointer;
}
.nav-toggle .bars { width: 18px; height: 12px; position: relative; }
.nav-toggle .bars::before, .nav-toggle .bars::after, .nav-toggle .bars span {
  content: ""; position: absolute; left: 0; right: 0; height: 3px; background: var(--ink); border-radius: 3px;
}
.nav-toggle .bars::before { top: 0; } .nav-toggle .bars span { top: 4.5px; } .nav-toggle .bars::after { bottom: 0; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; flex-wrap: wrap; }
.site-nav a {
  display: block; padding: 8px 14px; border-radius: 999px;
  font-weight: 800; font-size: 1.05rem; color: var(--ink); text-decoration: none;
  border: 2px solid transparent;
}
.site-nav a:hover { border-color: var(--ink); background: var(--butter); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--ink); color: var(--map-paper); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--map-paper);
    border-bottom: var(--line) solid var(--ink); }
  .site-nav[data-open="false"] { display: none; }
  .site-nav ul { flex-direction: column; padding: 8px var(--gutter-r) 16px var(--gutter-l); }
  .site-nav a { font-size: 1.2rem; padding: 12px 14px; }
  .brand-link img { width: 150px; }
}

/* ---------- Buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 52px; padding: 12px 22px;
  font: 900 1.05rem/1.1 var(--font-text); letter-spacing: 0.01em;
  color: var(--ink); background: var(--map-paper); text-decoration: none;
  border: var(--line) solid var(--ink); border-radius: var(--wobble-sm);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover { background: var(--butter); color: var(--ink); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn--red { background: var(--hover-red); }            /* Ink on Hover Red ≈ 5.1:1, AA */
.btn--red:hover { background: var(--butter); }
.btn svg { width: 1.2em; height: 1.2em; flex: none; }

/* ---------- Hero: the walkable map ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--dread-sea) url("../assets/graphics/map-bg.jpg") center 42% / cover no-repeat;
  border-bottom: var(--line) solid var(--ink);
}
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center; padding-block: clamp(2rem, 5vw, 5rem);
}
.hero-logo { justify-self: center; width: min(100%, 440px); }
.hero-logo img { width: 100%; }
.hero-card {
  background: var(--map-paper); border: var(--line) solid var(--ink); border-radius: var(--wobble);
  padding: clamp(1.4rem, 3vw, 2.6rem); display: grid; gap: 1.1rem; min-width: 0;
  box-shadow: 8px 8px 0 var(--ink);
}
.hero-card h1 { font-size: clamp(2.3rem, 1.4rem + 3.4vw, 4.6rem); }
.hero-card h1 .x { color: var(--hover-red); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; }
.hero-card .lede { font-size: var(--step-body); color: var(--ink-90); }
@media (max-width: 860px) {
  .hero { background-position: 38% 20%; background-size: auto 115%; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-logo { width: min(72vw, 300px); }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(2.5rem, 6vw, 5rem); }
.section-head { display: grid; gap: 0.6rem; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.section-head p { color: var(--ink-80); }
.section--sea { background: var(--dread-sea); border-block: var(--line) solid var(--ink); }
.section--deep { background: var(--deep-sea); color: var(--map-paper); border-block: var(--line) solid var(--ink); }

/* Marginalia dividers: from the margins of a working manuscript */
.divider { padding-block: clamp(0.5rem, 2vw, 1.25rem); }
.divider img { width: 100%; max-width: 960px; margin-inline: auto; }

/* ---------- Latest episode ---------- */
.latest {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1rem, 3vw, 2.5rem);
  align-items: start;
}
.latest-icon {
  width: clamp(88px, 12vw, 150px); aspect-ratio: 1; max-width: 100%;
  background: var(--map-paper-40); border: var(--line) solid var(--ink); border-radius: var(--wobble);
  padding: 12px; display: grid; place-items: center;
}
.latest h2 { font-size: clamp(1.8rem, 1.3rem + 2vw, 3rem); }
.ep-num { color: var(--deep-sea); }
@media (max-width: 560px) {
  .latest { grid-template-columns: 1fr; }
}

/* Buzzsprout slot. Replace the placeholder div with Buzzsprout's embed code. */
.player { min-width: 0; }
.player iframe { max-width: 100%; }
.player-placeholder {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: center;
  background: var(--ink); color: var(--map-paper); border-radius: var(--wobble-sm);
  padding: 16px 18px; border: var(--line) solid var(--ink);
}
.player-placeholder .play {
  width: 56px; height: 56px; border-radius: 50%; background: var(--hover-red);
  border: var(--line) solid var(--map-paper); display: grid; place-items: center;
}
.player-placeholder .play svg { width: 22px; height: 22px; margin-left: 3px; }
.player-placeholder strong { display: block; font-weight: 900; }
.player-placeholder small { display: block; color: var(--ink-20); font-size: 0.9rem; line-height: 1.4; }
.player-placeholder .bar { height: 6px; border-radius: 6px; background: var(--ink-80); margin-top: 10px; position: relative; overflow: hidden; }
.player-placeholder .bar::before { content: ""; position: absolute; inset: 0 70% 0 0; background: var(--butter); }

/* Placeholder marking: remove the class "show-placeholders" from <body> to hide */
.show-placeholders [data-placeholder] { outline: 3px dashed var(--hover-red); outline-offset: 4px; position: relative; }
.show-placeholders [data-placeholder]::after {
  content: "TBC";
  position: absolute; right: -10px; top: -12px; z-index: 5;
  font: 900 0.62rem/1 var(--font-text); letter-spacing: 0.08em;
  background: var(--hover-red); color: var(--ink); padding: 3px 5px; border-radius: 4px;
  border: 1.5px solid var(--ink); white-space: nowrap; pointer-events: none;
}

/* ---------- Goofballs strip ---------- */
.cast {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(0.75rem, 2vw, 1.5rem);
  align-items: end;
}
.cast-hero {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(1rem, 4vw, 3rem);
  align-items: center; margin-bottom: clamp(2rem, 4vw, 3rem);
}
.cast-hero .car img { width: min(100%, 460px); margin-inline: auto; }
.hosts { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.host { display: grid; gap: 0.5rem; justify-items: start; min-width: 0; }
.host img { width: 100%; max-width: 200px; background: var(--dread-sea-20); border: var(--line) solid var(--ink); border-radius: var(--wobble); padding: 10px 10px 0; }
.host--michael img { background: var(--hover-red-20); }
.host h3 { font-size: 1.5rem; }
.host p { font-size: 1rem; color: var(--ink-80); }
.cast figure { margin: 0; display: grid; gap: 0.5rem; justify-items: center; text-align: center; min-width: 0; }
.cast figure img { height: clamp(70px, 9vw, 120px); width: auto; }
.cast figcaption { display: grid; gap: 0.15rem; }
.cast figcaption b { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; line-height: 1.15; }
.cast figcaption span { font-size: 0.92rem; line-height: 1.4; color: var(--ink-80); }
.cast figcaption em { display: block; font-style: normal; font-weight: 900; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--deep-sea); margin-top: 0.2rem; }
@media (max-width: 860px) {
  .cast-hero { grid-template-columns: 1fr; }
  .cast { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.75rem; }
  .cast figure:last-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: no-preference) {
  .bob { animation: bob 3.2s ease-in-out infinite; }
  @keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
}

/* ---------- Pull quote ---------- */
.pull { display: grid; gap: 1rem; max-width: 900px; margin-inline: auto; text-align: center; justify-items: center; }
.pull blockquote { margin: 0; }
.pull blockquote p {
  font-family: var(--font-display); font-weight: 800; max-width: none;
  font-size: clamp(1.7rem, 1.2rem + 2.2vw, 3rem); line-height: 1.15; color: var(--map-paper);
  text-wrap: balance;
}
.pull cite { font-style: normal; font-weight: 800; color: var(--map-paper); }
.pull .tag { background: var(--butter); color: var(--ink); }

/* ---------- Map teaser ---------- */
.teaser {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
}
.teaser-map {
  display: block; border: var(--line) solid var(--ink); border-radius: var(--wobble); overflow: hidden;
  box-shadow: 8px 8px 0 var(--ink); transition: transform .2s ease;
}
.teaser-map:hover { transform: rotate(-0.6deg); }
.teaser-map img { width: 100%; }
@media (max-width: 860px) { .teaser { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--map-paper); padding-block: clamp(2.5rem, 5vw, 4rem) calc(1.5rem + env(safe-area-inset-bottom, 0px)); }
.site-footer a { color: var(--map-paper); }
.site-footer a:hover { color: var(--butter); text-decoration-color: var(--butter); }
.footer-grid {
  display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 2rem;
  padding-bottom: 2rem; border-bottom: 2px solid var(--ink-70);
}
.endline { font-family: var(--font-display); font-weight: 900; color: var(--butter); font-size: clamp(2rem, 1.4rem + 2.6vw, 3.6rem); line-height: 1.05; }
.footer-icon { width: 72px; border-radius: 18px; }
.site-footer h2 { font-size: 1.3rem; color: var(--map-paper); margin-bottom: 0.6rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.site-footer .small { font-size: 0.95rem; color: var(--ink-20); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; padding-top: 1.5rem; }
.copyable { user-select: all; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 420px) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   Inner pages
   ========================================================================== */
.page-head { background: var(--dread-sea); border-bottom: var(--line) solid var(--ink); }
.page-head .wrap { padding-block: clamp(2rem, 5vw, 4rem); display: grid; gap: 1rem; justify-items: start; }
.page-head .panel {
  background: var(--map-paper); border: var(--line) solid var(--ink); border-radius: var(--wobble);
  box-shadow: 8px 8px 0 var(--ink); padding: clamp(1.25rem, 3vw, 2.25rem); display: grid; gap: .9rem; max-width: 820px;
}
.page-head h1 { font-size: clamp(2.4rem, 1.6rem + 3.2vw, 4.6rem); }
.page-head .panel > p:not(.label) { color: var(--ink-90); }

/* ---------- Episodes ---------- */
.ep-list { display: grid; gap: clamp(1.25rem, 3vw, 2rem); }
.ep-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1rem, 3vw, 2rem);
  background: var(--map-paper-40); border: var(--line) solid var(--ink); border-radius: var(--wobble-sm);
  padding: clamp(1.1rem, 3vw, 2rem); scroll-margin-top: 96px;
}
.ep-card:target { box-shadow: 0 0 0 6px var(--butter), 8px 8px 0 6px var(--ink); }
.ep-card .ep-icon {
  width: clamp(72px, 10vw, 128px); aspect-ratio: 1; max-width: 100%;
  background: var(--map-paper); border: var(--line) solid var(--ink); border-radius: var(--wobble);
  padding: 10px; display: grid; place-items: center;
}
.ep-card h2 { font-size: clamp(1.7rem, 1.25rem + 1.8vw, 2.75rem); overflow-wrap: break-word; hyphens: manual; }
.ep-card .ep-body { display: grid; gap: .85rem; min-width: 0; }
.ep-quote { margin: 0; padding: .9rem 1.1rem; border-left: 6px solid var(--hover-red); background: var(--map-paper); border-radius: 0 14px 14px 0; display: grid; gap: .3rem; }
.ep-quote p { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); line-height: 1.25; }
.ep-quote footer { font-weight: 800; font-size: .95rem; color: var(--ink-80); }
.ep-meta { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-block; font: 900 .75rem/1 var(--font-text); letter-spacing: .1em; text-transform: uppercase; padding: .45em .8em; border-radius: 999px; border: 2px solid var(--ink); background: var(--map-paper); color: var(--ink); text-decoration: none; }
a.chip:hover { background: var(--butter); color: var(--ink); }
@media (max-width: 560px) {
  .ep-card { grid-template-columns: 1fr; }
}

/* ---------- The Map ---------- */
.map-intro { display: grid; gap: .75rem; }
.map-hint { display: none; font-weight: 800; color: var(--deep-sea); }
.map-frame { background: var(--dread-sea); border-block: var(--line) solid var(--ink); }
.map-scroller { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scrollbar-color: var(--ink) var(--dread-sea-40); }
.map-canvas { position: relative; width: 100%; min-width: 1200px; max-width: 1920px; margin-inline: auto; aspect-ratio: 16 / 9; }
.map-canvas > img { width: 100%; height: 100%; }
@media (min-width: 1201px) { .map-canvas { min-width: 0; } }
@media (max-width: 1200px) { .map-hint { display: block; } }
.spot {
  position: absolute; display: block; padding: 0; margin: 0; cursor: pointer;
  background: transparent; border: 3px dashed transparent; border-radius: 22px;
  font: inherit; color: inherit;
}
.spot::before {
  content: ""; position: absolute; right: -6px; top: -6px; width: 22px; height: 22px;
  background: var(--butter); border: 3px solid var(--ink); border-radius: 50%;
}
.spot:hover, .spot:focus-visible, .spot[aria-expanded="true"] { border-color: var(--ink); background: rgba(255, 212, 71, .18); outline: none; }
.spot:focus-visible { box-shadow: 0 0 0 4px var(--lagoon); }
.spot[aria-expanded="true"]::before { background: var(--hover-red); }
@media (prefers-reduced-motion: no-preference) {
  .spot::before { animation: pip 2.4s ease-in-out infinite; }
  .spot:nth-of-type(3n+1)::before { animation-delay: .8s; }
  .spot:nth-of-type(3n+2)::before { animation-delay: 1.6s; }
  @keyframes pip { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
}
/* Final Draft Point: the X that won't stay put */
.fdp-patch { position: absolute; left: 36.6%; top: 64.4%; width: 5%; height: 8.3%; border-radius: 50%; background: var(--map-paper); opacity: 0; pointer-events: none; }
.fdp-x { position: absolute; left: 37.29%; top: 65.37%; width: 3.54%; height: 6.3%; pointer-events: none; opacity: 0; }
.fdp-x svg { width: 100%; height: 100%; }
.map-canvas.fdp-moved .fdp-patch, .map-canvas.fdp-moved .fdp-x { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .fdp-x { transition: left .9s cubic-bezier(.5, -0.4, .3, 1.5), top .9s cubic-bezier(.5, -0.4, .3, 1.5), transform .9s ease; }
}

/* Margin-note card */
.note-card {
  position: fixed; z-index: 70;
  right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: min(420px, calc(100vw - 40px)); max-height: calc(100vh - 140px); overflow-y: auto;
  background: var(--map-paper); border: var(--line) solid var(--ink); border-radius: var(--wobble-sm);
  box-shadow: 8px 8px 0 var(--ink); padding: 1.25rem 1.25rem 1.4rem; transform: rotate(-0.8deg);
}
.note-card.note-left { right: auto; left: calc(20px + env(safe-area-inset-left, 0px)); transform: rotate(0.8deg); }
.note-card .note-close {
  position: absolute; right: 10px; top: 10px; width: 40px; height: 40px; border-radius: 50%;
  border: var(--line) solid var(--ink); background: var(--map-paper); cursor: pointer;
  font: 900 1.1rem/1 var(--font-text); color: var(--ink);
}
.note-card .note-close:hover { background: var(--butter); }
.note-body { display: grid; gap: .7rem; }
.note-body h3 { font-size: 1.75rem; padding-right: 44px; }
.note-body h3:focus { outline: none; }
.note-body .ep-quote p { font-size: 1.2rem; }
.note-body p { font-size: 1rem; }
.struck { text-decoration: line-through; text-decoration-color: var(--hover-red); text-decoration-thickness: 4px; color: var(--ink-60); }
.next { display: block; color: var(--ink); }
@media (max-width: 560px) {
  .note-card, .note-card.note-left { left: calc(12px + env(safe-area-inset-left, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: auto; max-height: 62vh; transform: none; }
}

/* Gazetteer: every place, readable without the map */
.gazetteer { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.place { background: var(--map-paper-40); border: var(--line) solid var(--ink); border-radius: var(--wobble-sm); padding: 1.1rem 1.2rem 1.3rem; display: grid; gap: .6rem; align-content: start; min-width: 0; scroll-margin-top: 96px; }
.place h3 { font-size: 1.45rem; }
.place p { font-size: 1rem; }
.place .ep-quote p { font-size: 1.1rem; }
@media (max-width: 1000px) { .gazetteer { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .gazetteer { grid-template-columns: 1fr; } }

/* ---------- About ---------- */
.story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.story .stack p { font-size: var(--step-body); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 1.6rem 3.25rem; display: grid; gap: .2rem; }
.timeline li::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: 0; border-left: 4px dotted var(--ink); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: 2px; width: 30px; height: 30px; border-radius: 50%; background: var(--dread-sea); border: var(--line) solid var(--ink); }
.timeline li:last-child .dot { background: transparent; border: 0; }
.timeline li:last-child .dot::before, .timeline li:last-child .dot::after { content: ""; position: absolute; left: 1px; top: 12px; width: 30px; height: 7px; background: var(--hover-red); border-radius: 4px; transform: rotate(45deg); }
.timeline li:last-child .dot::after { transform: rotate(-45deg); }
.timeline .year { font-family: var(--font-display); font-weight: 900; font-size: 1.9rem; line-height: 1; }
.timeline b { font-weight: 900; font-size: 1.1rem; }
.timeline span { color: var(--ink-80); font-size: 1rem; }
.pmv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.pmv > div { background: var(--map-paper); border: var(--line) solid var(--ink); border-radius: var(--wobble-sm); padding: 1.2rem; display: grid; gap: .5rem; align-content: start; }
.pmv p:not(.label) { font-weight: 800; font-size: 1.15rem; line-height: 1.35; }
.values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.value { background: var(--map-paper-40); border: var(--line) solid var(--ink); border-radius: var(--wobble-sm); padding: 1.2rem 1.25rem 1.4rem; display: grid; gap: .65rem; align-content: start; min-width: 0; }
.value img { width: 64px; height: 64px; }
.value h3 { font-size: 1.6rem; }
.value .ep-quote p { font-size: 1.1rem; }
.value > p:last-child { font-size: 1rem; color: var(--ink-80); }
@media (max-width: 980px) { .values, .pmv { grid-template-columns: repeat(2, minmax(0, 1fr)); } .story { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .values, .pmv { grid-template-columns: 1fr; } }
.characters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.5rem); }
.character { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1.25rem; align-items: start; background: var(--map-paper-40); border: var(--line) solid var(--ink); border-radius: var(--wobble-sm); padding: 1.25rem; }
.character img { width: 100%; background: var(--dread-sea-20); border: var(--line) solid var(--ink); border-radius: var(--wobble); padding: 10px 10px 0; }
.character--michael img { background: var(--hover-red-20); }
.character .stack p { font-size: 1rem; }
.character h3 { font-size: 2rem; }
@media (max-width: 980px) { .characters { grid-template-columns: 1fr; } }
@media (max-width: 460px) { .character { grid-template-columns: 1fr; } .character img { max-width: 220px; } }
.photo { margin: 0; display: grid; gap: .6rem; }
.photo .frame { position: relative; max-width: 100%; }
.photo .frame img { width: 100%; }
.photo .frame .frame-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.photo figcaption { font-size: .95rem; color: var(--ink-80); }
/* Duotone for any future <img class="duotone">: shadows Deep Sea, highlights Map Paper */
.duotone { filter: url("#bmsffwa-duotone"); }

/* ---------- Press ---------- */
.press-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; }
.dl-group { background: var(--map-paper-40); border: var(--line) solid var(--ink); border-radius: var(--wobble-sm); padding: 1.25rem; display: grid; gap: .9rem; min-width: 0; }
.dl-group h3 { font-size: 1.6rem; }
.dl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.dl-list li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: .9rem; align-items: center; }
.dl-list .thumb { width: 64px; height: 64px; border: 2px solid var(--ink); border-radius: 12px; background: var(--map-paper); padding: 4px; object-fit: contain; }
.dl-list .thumb--dark { background: var(--dread-sea-20); }
.dl-links { display: flex; flex-wrap: wrap; gap: .4rem .5rem; align-items: center; }
.dl-links b { font-weight: 900; margin-right: .25rem; }
.dl-links .size { font-size: .85rem; color: var(--ink-70); }
.bio { display: grid; gap: .6rem; }
.bio h3 { font-size: 1.6rem; }
.copybox { position: relative; background: var(--map-paper); border: 2px solid var(--ink); border-radius: 12px; padding: .9rem 1rem; font-size: 1rem; }
.copy-btn { font: 900 .8rem/1 var(--font-text); letter-spacing: .08em; text-transform: uppercase; padding: .55em .9em; border-radius: 999px; border: 2px solid var(--ink); background: var(--butter); color: var(--ink); cursor: pointer; justify-self: start; }
.copy-btn:hover { background: var(--map-paper); }
@media (max-width: 860px) { .press-grid { grid-template-columns: 1fr; } }

/* ---------- 404 ---------- */
.lost { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
@media (max-width: 760px) { .lost { grid-template-columns: 1fr; } }
/* Text on Dread Sea is always Ink (7.6:1); greys and Deep Sea fail there */
.section--sea .section-head p, .section--sea .cast figcaption span, .section--sea .cast figcaption em, .section--sea .subhead { color: var(--ink); }
