/* Benjamin Campagnuolo, option C: the site is a screenplay.
   Pages are script pages on a desk. Revision colors per industry convention:
   title page white, films blue rev, about pink rev, contact goldenrod. */

:root {
  --desk: #2d241d;
  --paper: #fbfaf3;
  --paper-edge: #e9e4d4;
  --ink: #22201b;
  --ink-soft: #6b655c;
  --pen: #b02e2a;
  --brass-hi: #d9c284;
  --brass-mid: #96742f;
  --brass-lo: #5e4717;
  --rule: rgba(34, 32, 27, 0.3);
  --tape: rgba(228, 216, 172, 0.72);
}

body.page-films   { --paper: #e8eef7; --paper-edge: #d4dce9; }
body.page-about   { --paper: #f9e8ee; --paper-edge: #e8d2db; }
body.page-contact { --paper: #f5e7ba; --paper-edge: #e3d29c; }

* { box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Courier Prime", "Courier New", Courier, monospace;
  color: var(--ink);
  line-height: 1.55;
  background-color: var(--desk);
  background-image: radial-gradient(1100px 620px at 50% -8%, #483a2e, #291f18 72%);
  -webkit-font-smoothing: antialiased;
}

/* Desk surface: a parallax layer behind the sheet on the script pages.
   Transform-only, never background-attachment: fixed. */

.desk-surface {
  position: fixed;
  left: 0;
  right: 0;
  top: -14vh;
  height: 130vh;
  z-index: -2;
  pointer-events: none;
  background-color: var(--desk);
  background-image: radial-gradient(1100px 620px at 50% -8%, #483a2e, #291f18 72%);
}

@media (max-width: 767px), (prefers-reduced-motion: reduce) {
  .desk-surface { display: none; }
}

/* ------------------------------------------------------------
   Page flip: the script pages turn as you scroll (index, films).
   Default and fallback is a plain stacked read; body.flip-on
   (set by JS on wide, tall, motion-permitting viewports) pins a
   stage and turns each sheet from the brad edge with scroll.
   ------------------------------------------------------------ */

.flipdeck { position: relative; }

.leaf {
  position: relative;
  margin: 0 0 1.8rem;
}

.leaf:last-child { margin-bottom: 0; }

/* Shade sweep removed: paper keeps the exact same color through the whole turn */
.leaf::after {
  content: none;
}

.turn-hint {
  display: none;
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin: 1.6rem 0 0;
}

body.flip-on .turn-hint { display: block; }

body.flip-on {
  overscroll-behavior-y: contain;
}

body.flip-on .stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
}

body.flip-on .leaf {
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  margin: 0;
  transform-origin: 0 0;
  backface-visibility: hidden;
}

body.flip-on .leaf > .sheet,
body.flip-on .leaf > .corkboard {
  min-height: calc(100vh - 30px);
  min-height: calc(100svh - 30px);
  transform-origin: top center;
  display: flex;
  flex-direction: column;
}

body.flip-on .leaf > .sheet {
  padding: 30px 46px 28px 74px;
}

body.flip-on .titlepage {
  flex: 1 0 auto;
  justify-content: center;
}

body.flip-on .sheet-foot,
body.flip-on .board-foot,
body.flip-on .turn-hint {
  margin-top: auto;
  padding-top: 1.2rem;
}

::selection { background: var(--pen); color: #fff; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--pen);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover { color: var(--pen); }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--pen);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--pen);
  color: #fff;
  padding: 0.6em 1em;
  z-index: 50;
  text-decoration: none;
}

.skip:focus {
  left: 12px;
  top: 12px;
}

.desk {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px 2rem;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

/* Binder tabs above the page edge */

.tabs {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  padding: 18px 10px 0;
}

.tab {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding: 0.55em 1em 0.75em;
  border-radius: 7px 7px 0 0;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.18);
}

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

.tab-title   { background: #e8e3d2; }
.tab-films   { background: #c7d6e8; }
.tab-about   { background: #ecccd8; }
.tab-contact { background: #e5d193; }

.tab[aria-current="page"] {
  padding-bottom: 1.05em;
  margin-bottom: -4px;
}

/* Per-sheet revision colors (the whole site is one deck) */
.sheet.rev-blue { --paper: #e8eef7; --paper-edge: #d4dce9; }
.sheet.rev-gold { --paper: #f5e7ba; --paper-edge: #e3d29c; }

/* The script page */

.sheet {
  position: relative;
  background: var(--paper);
  padding: 36px 48px 34px 78px;
  border-radius: 2px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.5);
}

.sheet::before {
  content: "";
  position: absolute;
  inset: 7px -7px -7px 7px;
  background: var(--paper-edge);
  border-radius: 2px;
  z-index: -1;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.brad {
  position: absolute;
  left: 26px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--brass-hi), var(--brass-mid) 58%, var(--brass-lo));
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.brad-top { top: 9%; }
.brad-bottom { bottom: 9%; }

.sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.3rem;
}

.continued {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin: 0 0 1.1rem;
}

/* Screenplay elements */

.fadein {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.9rem;
}

.slug {
  display: flex;
  gap: 1.25rem;
  align-items: baseline;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 1.4rem 0 0.7rem;
}

h1.slug { margin-top: 0.2rem; }

.slug .scn {
  color: var(--ink-soft);
  font-weight: 400;
  flex: none;
}

.slug .slug-text { flex: 1; }

.action {
  max-width: 64ch;
  margin: 0 0 0.8rem;
}

.dialogue {
  width: min(36ch, 100%);
  margin: 0.9rem 0;
}

.cue {
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0;
}

.paren {
  text-align: left;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0;
  font-size: 0.92rem;
}

.line {
  margin: 0.15rem 0 0;
}

.transition {
  text-align: right;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1.4rem 0 0;
}

.sheet-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  margin-top: 1.8rem;
  clear: both;
}

.cont-note {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Title page */

.titlepage {
  text-align: left;
  display: flex;
  flex-direction: column;
  padding: 1rem 0 0;
}

.tp-title {
  font-size: clamp(1.4rem, 4.5vw, 2.05rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  margin: 0 0 0.4rem;
}

.tp-sub {
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
}

.tp-by {
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
}

.tp-name { margin: 0; font-weight: 700; }

.tp-aside {
  margin: 0.4rem 0 0;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.tp-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1.8rem;
  font-size: 0.86rem;
}

.tp-contact {
  text-align: left;
  margin: 0;
  font-style: normal;
}

.tp-contact span { display: block; }

.tp-draft {
  text-align: right;
  margin: 0;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.74rem;
  line-height: 2;
}

.tp-rule {
  border: 0;
  border-top: 2px solid var(--rule);
  margin: 1.6rem 0 1.4rem;
}

/* Two-column blocks: script text left, companion material right */

.cols {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  column-gap: 2.6rem;
  align-items: start;
}

.cols .slug { margin-top: 0.4rem; }

/* Film scenes: action copy left, taped insert right */

.scene {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  column-gap: 2.4rem;
  row-gap: 0.1rem;
  align-items: start;
  margin: 0 0 0.7rem;
}

.scene > .slug { grid-column: 1 / -1; }
.scene > .action,
.scene > .specs,
.scene > .memo { grid-column: 1; }

.scene > .insert {
  grid-column: 2;
  grid-row: 2 / span 3;
  margin: 0.3rem 0 0.2rem;
  max-width: none;
}

/* Typed spec rows under each film's action line */

.specs {
  list-style: none;
  margin: 0.1rem 0 0.7rem;
  padding: 0;
  max-width: 46ch;
}

.specs li {
  display: flex;
  gap: 0.9ch;
  align-items: baseline;
  margin: 0.25rem 0;
  font-size: 0.92rem;
}

.specs .label {
  flex: none;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.76rem;
}

/* Scene list with dot leaders */

.scenelist {
  list-style: none;
  margin: 0.4rem 0 1.4rem;
  padding: 0;
  max-width: 56ch;
}

.scenelist li {
  display: flex;
  gap: 0.9ch;
  align-items: baseline;
  margin: 0.35rem 0;
}

.scenelist .num {
  flex: none;
  width: 2ch;
  color: var(--ink-soft);
}

.scenelist .num.feat {
  width: auto;
  font-size: 0.82em;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.leader {
  flex: 1;
  min-width: 2ch;
  border-bottom: 2px dotted var(--rule);
  transform: translateY(-4px);
}

.scenelist .rt {
  flex: none;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* Taped-in inserts */

.insert {
  margin: 1rem auto 1.5rem;
  max-width: 560px;
  background: #fff;
  padding: 10px 10px 12px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
  transform: rotate(-1.1deg);
  position: relative;
}

.insert.tilt-r { transform: rotate(0.9deg); }

.insert::before,
.insert::after {
  content: "";
  position: absolute;
  width: 88px;
  height: 26px;
  background: var(--tape);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  top: -12px;
}

.insert::before {
  left: -30px;
  transform: rotate(-40deg);
}

.insert::after {
  right: -30px;
  transform: rotate(40deg);
}

.frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #141210;
  overflow: hidden;
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Crops baked-in letterbox bars on a still */
.frame img.zoom { transform: scale(1.14); }

.frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.alo-mark {
  position: fixed;
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  font-family: "Courier Prime", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: rgba(226, 215, 196, 0.5);
  text-decoration: none;
}
.alo-mark:hover,
.alo-mark:focus-visible { color: rgba(226, 215, 196, 0.95); text-decoration: underline; }

.contact-form {
  margin-top: 1.2rem;
  display: grid;
  gap: 0.65rem;
  max-width: 34rem;
}
.contact-form label {
  display: grid;
  gap: 0.2rem;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}
.contact-form input,
.contact-form textarea {
  font: inherit;
  font-family: inherit;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid #22201b;
  padding: 0.3rem 0.1rem;
  color: inherit;
  border-radius: 0;
}
.contact-form textarea { border: 1.5px solid #22201b; padding: 0.45rem; resize: vertical; }
.contact-form input:focus-visible,
.contact-form textarea:focus-visible { outline: 2px solid #b02e2a; outline-offset: 2px; }
.contact-form .hp { position: absolute; left: -9999px; height: 0; width: 0; opacity: 0; }
.contact-form .btn { justify-self: start; cursor: pointer; }
.form-status { min-height: 1.2em; font-style: italic; margin: 0; }

.frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #141210;
}

.play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(18, 15, 12, 0.22);
  cursor: pointer;
  display: grid;
  place-items: center;
  font: inherit;
  color: #fff;
}

.play .pbtn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(20, 18, 15, 0.8);
  border: 2px solid #fff;
  display: grid;
  place-items: center;
  transition: background-color 0.15s ease;
}

.play:hover .pbtn,
.play:focus-visible .pbtn { background: var(--pen); }

.play:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -6px;
}

.insert figcaption {
  font-size: 0.78rem;
  font-style: italic;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 0.45rem;
}

/* Portrait headshot insert */

.insert.portrait {
  max-width: 300px;
  float: right;
  width: 235px;
  margin: 0.3rem 0 1rem 2.2rem;
}

.insert.portrait .frame { aspect-ratio: 4 / 5; background: #efece1; }

.hs-ph {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  text-align: center;
  padding: 1.2rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 2;
}

.portrait.missing img { visibility: hidden; }
.portrait.missing .hs-ph { display: grid; }

/* Withheld frame (Apple Juice) */

.withheld {
  aspect-ratio: 16 / 9;
  border: 2px dashed var(--ink-soft);
  display: grid;
  place-items: center;
  gap: 0;
  text-align: center;
  padding: 1rem;
  background: repeating-linear-gradient(45deg, transparent 0 16px, rgba(34, 32, 27, 0.045) 16px 32px);
}

.stamp {
  display: inline-block;
  border: 3px solid var(--pen);
  color: var(--pen);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 0.35em 0.7em 0.3em;
  transform: rotate(-4deg);
  opacity: 0.85;
}

.withheld small {
  display: block;
  margin-top: 0.9rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

/* Production memo (Apple Juice) */

.memo {
  background: #f3e2a7;
  color: #2a2419;
  max-width: 52ch;
  margin: 0.6rem 0 0.8rem;
  padding: 1rem 1.2rem 1.1rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  transform: rotate(0.6deg);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.memo-head {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.82rem;
  border-bottom: 2px solid #2a2419;
  padding-bottom: 0.45rem;
  margin: 0 0 0.9rem;
}

.memo p {
  margin: 0.3rem 0;
  font-size: 0.92rem;
}

.memo .memo-note {
  margin-top: 0.9rem;
  font-style: italic;
}

.btn {
  display: inline-block;
  margin-top: 1rem;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.82rem;
  padding: 0.65em 1.1em;
  text-decoration: none;
}

.btn:hover {
  background: var(--ink);
  color: #f3e2a7;
}

/* Credits (about) */

.credits {
  list-style: none;
  margin: 0.4rem 0 1rem;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem 2.4rem;
}

.credits li { margin: 0; }

.credits .org {
  display: block;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.credits .role { display: block; }

/* Contact channels */

.channels {
  list-style: none;
  margin: 0.6rem 0 1rem;
  padding: 0;
  max-width: 52ch;
}

.channels li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9ch;
  align-items: baseline;
  margin: 0.45rem 0;
}

.channels a,
.tp-contact a {
  overflow-wrap: anywhere;
}

.channels .label {
  flex: none;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
}

.theend {
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.34em;
  padding-left: 0.34em;
  margin: 1.8rem 0 0.2rem;
}

.theend-sub {
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.86rem;
  margin: 0;
}

/* ------------------------------------------------------------
   Corkboard (about): the writer's pinboard behind the desk.
   Typed index cards, red pushpins, polaroid headshot, red thread.
   ------------------------------------------------------------ */

.corkboard {
  position: relative;
  border: 14px solid #3e2d20;
  border-radius: 6px;
  background-color: #a97b4e;
  background-image:
    radial-gradient(3px 3px at 14% 32%, rgba(58, 30, 6, 0.35) 40%, transparent 60%),
    radial-gradient(3px 3px at 62% 71%, rgba(58, 30, 6, 0.3) 40%, transparent 60%),
    radial-gradient(3px 3px at 83% 22%, rgba(58, 30, 6, 0.3) 40%, transparent 60%),
    radial-gradient(3px 3px at 38% 85%, rgba(58, 30, 6, 0.3) 40%, transparent 60%),
    radial-gradient(3px 3px at 8% 78%, rgba(58, 30, 6, 0.3) 40%, transparent 60%),
    linear-gradient(160deg, #b08055, #8d6036);
  box-shadow: inset 0 0 40px rgba(35, 16, 0, 0.5), 0 26px 60px rgba(0, 0, 0, 0.5);
  padding: 1.6rem 1.5rem 1.6rem;
}

.board-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.slip {
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: #f9e8ee;
  padding: 0.55rem 0.9rem;
  box-shadow: 0 8px 16px rgba(20, 8, 0, 0.4);
  margin: 0;
}

.corkboard h1.slug {
  margin: 0;
  background: #fdfaf0;
  padding: 0.5rem 1rem 0.45rem;
  box-shadow: 0 8px 16px rgba(20, 8, 0, 0.4);
}

/* Packed like a real pinboard: three hand-balanced columns, no voids */

.board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.3rem;
  align-items: start;
}

.bcol {
  display: grid;
  gap: 1.3rem;
  align-content: start;
}

.pinned { position: relative; }

.pinned::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #ff9d8e, var(--pen) 55%, #5e0f0a);
  box-shadow: 0 4px 6px rgba(15, 5, 0, 0.45);
  z-index: 2;
}

.tilt-a { transform: rotate(-1.3deg); }
.tilt-b { transform: rotate(1deg); }
.tilt-c { transform: rotate(-0.7deg); }
.tilt-d { transform: rotate(1.6deg); }

/* Typed index card: ruled lines and a red head rule */

.card {
  background-color: #fdfaf0;
  background-image:
    linear-gradient(transparent 0 2.05rem, rgba(176, 46, 42, 0.4) 2.05rem calc(2.05rem + 1px), transparent calc(2.05rem + 1px)),
    repeating-linear-gradient(transparent 0 calc(1.55em - 1px), rgba(47, 90, 146, 0.14) calc(1.55em - 1px) 1.55em);
  padding: 1rem 1.1rem 0.9rem;
  box-shadow: 0 12px 24px rgba(20, 8, 0, 0.45);
  position: relative;
  font-size: 0.92rem;
}

.card h2 {
  margin: 0 0 1.05rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.card p { margin: 0 0 0.7rem; }
.card p:last-child { margin-bottom: 0; }
.card ul { margin: 0; padding-left: 1.15rem; }
.card li { margin: 0 0 0.45rem; }
.card li:last-child { margin-bottom: 0; }
.card .aside-line { font-style: italic; color: var(--ink-soft); }

/* Goldenrod note card */

.card.note {
  background-color: #f3e2a7;
  background-image: none;
  font-style: italic;
  font-size: 0.9rem;
}

.note .t {
  display: block;
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  margin-bottom: 0.3rem;
}

/* Polaroid headshot */

.pol {
  background: #fff;
  max-width: 290px;
  margin: 0 auto;
  padding: 10px 10px 12px;
  box-shadow: 0 14px 28px rgba(20, 8, 0, 0.5);
  position: relative;
}

.pol .frame {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #efece1;
  overflow: hidden;
}

.pol .frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pol figcaption {
  font-size: 0.78rem;
  font-style: italic;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 0.5rem;
}

/* Cities card: three pins joined by red thread */

.cities svg {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 0.2rem;
}

.cities .cap-line {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0.5rem 0 0;
}

/* Paper scraps along the board's bottom rail */

.board-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}

.scrap {
  display: inline-block;
  background: #fdfaf0;
  padding: 0.5rem 0.9rem;
  box-shadow: 0 8px 16px rgba(20, 8, 0, 0.4);
}

.scrap.muted {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

a.scrap {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Mid screens: collapse the two-column layouts */

@media (max-width: 860px) {
  .cols { display: block; }

  .scene { display: block; }

  .scene > .insert {
    margin: 1.2rem auto 1.3rem;
    max-width: 440px;
  }

  .credits { grid-template-columns: 1fr; }

  .insert.portrait {
    float: none;
    width: auto;
    max-width: 250px;
    margin: 0.4rem auto 1.2rem;
  }

  .board-grid { grid-template-columns: 1fr; }
}

/* Small screens */

@media (max-width: 680px) {
  html { font-size: 15px; }

  .sheet { padding: 40px 22px 38px 30px; }

  .brad { left: 8px; width: 11px; height: 11px; }

  .slug { gap: 0.8rem; }
  .slug .scn:last-child { display: none; }

  .tabs { justify-content: center; padding-top: 22px; }

  .tp-foot { flex-direction: column; align-items: flex-start; }
  .tp-draft { text-align: left; }

  .insert::before, .insert::after { width: 64px; height: 20px; top: -9px; }

  .sheet-foot { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
  .transition { margin-top: 1.2rem; align-self: flex-end; text-align: right; }

  .corkboard { padding: 1.1rem 0.9rem 1.2rem; border-width: 10px; }
  .board-head { margin-bottom: 1.1rem; }

  /* Phone polish: comfortable touch targets, tighter flip sheets */
  .tabs { gap: 5px; }

  .tab {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 1em;
  }

  .tab[aria-current="page"] { padding-bottom: 4px; }

  .channels li { margin: 0.7rem 0; }

  .channels a,
  .scenelist a {
    display: inline-block;
    padding: 0.3em 0;
  }

  body.flip-on .leaf > .sheet { padding: 20px 18px 18px 28px; }
  body.flip-on .leaf { top: 10px; }
  body.flip-on .leaf > .sheet,
  body.flip-on .leaf > .corkboard {
    min-height: calc(100vh - 24px);
    min-height: calc(100svh - 24px);
    height: calc(100vh - 24px);
    height: calc(100svh - 24px);
    overflow: hidden;
  }
}

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