/*
 * novel.css -- the Novel read of a Night (show.php).
 *
 * Ported from the design in icon-novel/src/styles.css. That file was written
 * for a standalone React page; this one is the same look scoped under .novel
 * so nothing here can touch the rest of the site, and Tailwind is gone.
 *
 * The Traditional read is not styled here and is not changed by this file.
 *
 * Changes from the original, all deliberate:
 *   - everything is prefixed with .novel
 *   - the colours and fonts are variables on .novel, not on :root
 *   - the three-cell ("trio") layout is removed: a run of dialogue is only
 *     ever one cell or two cells side by side
 *   - the slant of a pair (.slant-a, .slant-b) is set by the renderer from
 *     where the pair falls in a run of dialogue, not from the page number
 *   - the speaker's name colour (wrestlers.name_color) shows as an underline
 *     on the name, because a bright name colour on cream paper is unreadable
 */
.novel {
  --color-void: #0b0908;
  --color-ink: #1c140f;
  --color-paper: #dfcba4;
  --color-cream: #efe2c7;
  --color-blood: #d84a35;
  --color-blood-deep: #84251b;
  --color-amber: #e8b66e;
  --color-mute: #6d5644;
  --font-body: "Roboto Condensed", Arial, sans-serif;
  --font-display: "Barlow Condensed", Impact, sans-serif;
  --font-mono: "Special Elite", ui-monospace, monospace;
  --font-marker: "Permanent Marker", cursive;
  color: var(--color-cream);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.45;
  text-align: left;
}
.novel[hidden] { display: none; }
.novel button:not(:disabled) { cursor: pointer; }
.novel h1,
.novel h2 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 0.86;
  text-transform: uppercase;
}
.novel p { max-width: none; }

.novel .book {
  width: min(980px, calc(100% - 1.25rem));
  margin: 0 auto;
  padding: 1.25rem 0 4.5rem;
}
.novel .mast {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding: 0.25rem 0 1.1rem;
  text-align: center;
}
.novel .mast-logo {
  width: min(260px, 72%);
  height: auto;
}
.novel .mast-kicker,
.novel .issue,
.novel .running,
.novel .folio,
.novel .sfx-label,
.novel .who {
  font-family: var(--font-mono);
}
.novel .mast-kicker {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-amber);
}
.novel .mast-nav,
.novel .switcher {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.novel .mast-nav button,
.novel .switcher button {
  appearance: none;
  border: 1px solid #93664d;
  background: #231611;
  color: var(--color-cream);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  min-height: 44px;
  padding: 0.55rem 0.9rem;
}
.novel .mast-nav button.on,
.novel .switcher button.on {
  background: var(--color-cream);
  color: var(--color-ink);
  border-color: var(--color-cream);
}
.novel .switcher {
  margin-bottom: 1rem;
}
.novel .switcher button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 9.5rem;
  text-align: left;
}
.novel .switcher span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--color-amber);
}
.novel .switcher button.on span {
  color: var(--color-blood-deep);
}
.novel .switcher strong {
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}
.novel .gpage {
  position: relative;
  margin: 0 0 1.35rem;
  padding: 0.85rem 0.85rem 1.7rem;
  color: var(--color-ink);
  background-color: #e7d4b0;
  background-image: url("/assets/novel/paper.jpg");
  background-size: 540px;
  background-clip: padding-box;
  border: 18px solid #1a120e;
  border-image: url("/assets/novel/weather-border.webp") 52 / 18px / 0 stretch;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.novel .running {
  display: flex;
  justify-content: space-between;
  padding: 0 0.25rem 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-mute);
}
.novel .folio {
  position: absolute;
  right: 0.85rem;
  bottom: 0.35rem;
  font-size: 0.78rem;
  color: var(--color-mute);
}
.novel .panels {
  display: grid;
  gap: 0.7rem;
}
.novel .layout-duo.slant-a {
  grid-template-columns: 0.76fr 1.24fr;
}
.novel .layout-duo.slant-b {
  grid-template-columns: 1.26fr 0.74fr;
}
.novel .slant-a,
.novel .slant-b {
  --cut: 46px;
  gap: 0;
  align-items: stretch;
}
.novel .slant-a > .panel-talk,
.novel .slant-b > .panel-talk {
  padding: 0;
  overflow: hidden;
}
.novel .slant-a > .panel-talk + .panel-talk,
.novel .slant-b > .panel-talk + .panel-talk {
  margin-left: calc(12px - var(--cut));
}
.novel .slant-a > .panel-talk:first-child {
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%);
}
.novel .slant-a > .panel-talk:last-child {
  clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%);
}
.novel .slant-b > .panel-talk:first-child {
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% 100%, 0 100%);
}
.novel .slant-b > .panel-talk:last-child {
  clip-path: polygon(0 0, 100% 0, 100% 100%, var(--cut) 100%);
}
.novel .slant-inner {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  min-height: 320px;
}
/* A speaker who has a page to themselves gets a taller picture area above the
   balloon, so the face is not sitting behind the text. Scales with the width of
   the page, capped by the screen height so the whole cell still fits. */
.novel .layout-one > .panel-talk > .slant-inner {
  min-height: clamp(320px, min(58vw, 62vh), 600px);
}
.novel .panel-talk > .balloon {
  position: relative;
  z-index: 2;
  width: auto;
  margin: 0.55rem 0.75rem 0.8rem;
}
.novel .slant-a > .panel-talk:not(:last-child) > .balloon {
  margin-right: calc(var(--cut) + 0.55rem);
}
.novel .slant-b > .panel-talk:not(:first-child) > .balloon {
  margin-left: calc(var(--cut) + 0.55rem);
}
.novel .layout-stack,
.novel .layout-one {
  grid-template-columns: 1fr;
}
.novel .showdown {
  display: grid;
  grid-template-columns: var(--cols, 1fr auto 1fr);
  gap: 0.7rem;
  align-items: stretch;
  margin-top: 0.7rem;
}
.novel .panel {
  position: relative;
  border: 5px solid #120e0c;
  background: #f3e6cf;
  min-height: 0;
  overflow: hidden;
}
.novel .panel-cover {
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  background:
    radial-gradient(circle at 80% 20%, rgba(216, 74, 53, 0.28), transparent 28%),
    radial-gradient(#1a120e 0.7px, transparent 0.85px),
    #1a120e;
  background-size: auto, 5px 5px, auto;
  color: var(--color-cream);
}
.novel .gpage-cover {
  width: min(700px, 100%);
  aspect-ratio: 8.5 / 11;
  margin-left: auto;
  margin-right: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  border: 0;
  border-image: none;
}
.novel .gpage-cover .panels {
  flex: 1;
  min-height: 0;
  grid-template-rows: 1fr;
}
.novel .comic-cover {
  position: relative;
  height: 100%;
  overflow: hidden;
  border: 4px solid #120e0c;
  background: #120e0c;
}
.novel .comic-cover-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 68%;
}
.novel .comic-mast {
  position: absolute;
  z-index: 4;
  top: 0.55rem;
  left: 0.55rem;
  right: 0.55rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.35rem;
  align-items: start;
}
.novel .comic-logo {
  width: 100%;
  height: auto;
  margin-top: 0.15rem;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.72));
}
.novel .comic-issuebox {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 4.6rem;
  padding: 0.35rem 0.45rem 0.4rem;
  background: var(--color-cream);
  color: #1a120e;
  border: 3px solid #120e0c;
  transform: rotate(-2deg);
}
.novel .comic-issuebox.end {
  align-items: flex-end;
  transform: rotate(2deg);
}
.novel .comic-issuebox span,
.novel .comic-card-label,
.novel .comic-card li span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.novel .comic-issuebox strong {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  line-height: 0.9;
  text-transform: uppercase;
}
.novel .comic-card {
  position: absolute;
  z-index: 5;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.7rem;
  padding: 0.55rem 0.7rem 0.45rem;
  background: #f3e6cf;
  color: #1a120e;
  border: 3px solid #120e0c;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
}
.novel .comic-cast {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.novel .cast {
  position: absolute;
  margin: 0;
  filter: drop-shadow(0 16px 12px rgba(0, 0, 0, 0.55));
}
.novel .cast img {
  display: block;
  width: 100%;
  height: auto;
}
.novel .cast figcaption {
  position: absolute;
  left: 50%;
  bottom: 46%;
  font-size: 0.68rem;
  transform: translateX(-50%) rotate(-2deg);
  margin: 0;
  padding: 0.12rem 0.38rem;
  background: var(--color-cream);
  color: #1a120e;
  border: 2px solid #120e0c;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
.novel .cast.cody {
  width: 46%;
  left: -8%;
  bottom: 2%;
  transform: rotate(-7deg);
  z-index: 1;
}
.novel .cast.wolf {
  width: 44%;
  right: -7%;
  bottom: 1%;
  transform: rotate(6deg);
  z-index: 1;
}
.novel .cast.nate {
  width: 52%;
  left: 8%;
  bottom: -2%;
  z-index: 2;
}
.novel .cast.kaz {
  width: 50%;
  right: 6%;
  bottom: -1%;
  z-index: 2;
}
.novel .cast.cody figcaption {
  bottom: 50%;
  left: 64%;
}
.novel .cast.wolf figcaption {
  bottom: 52%;
  left: 34%;
  transform: translateX(-50%) rotate(2deg);
}
.novel .comic-card-title {
  margin: 0;
  font-family: var(--font-marker);
  color: var(--color-blood-deep);
  font-size: 1.35rem;
  line-height: 1;
  transform: rotate(-1.5deg);
}
.novel .comic-card-label {
  margin: 0.15rem 0 0.2rem;
}
.novel .comic-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.novel .comic-card li {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  column-gap: 0.4rem;
  align-items: baseline;
  border-top: 2px solid rgba(18, 14, 12, 0.28);
  padding: 0.28rem 0 0.32rem;
}
.novel .comic-card li span {
  grid-column: 1 / -1;
}
.novel .comic-card strong {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.15rem, 3.4vw, 1.55rem);
  line-height: 0.88;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.novel .comic-card strong:last-child {
  text-align: right;
}
.novel .comic-card li:last-child strong {
  font-size: clamp(1.35rem, 4vw, 1.9rem);
}
.novel .comic-card em {
  font-family: var(--font-marker);
  font-style: normal;
  color: var(--color-blood);
  font-size: 1.05rem;
  line-height: 1;
}
.novel .panel-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.novel .cover-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 1.3rem 1.1rem 1.4rem;
  background: linear-gradient(to top, rgba(8, 6, 5, 0.88), rgba(8, 6, 5, 0.15));
  width: 100%;
}
.novel .issue {
  margin: 0;
  display: inline-block;
  background: var(--color-cream);
  color: #23150e;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.55rem;
  transform: rotate(-1.5deg);
}
.novel .cover-copy h1,
.novel .panel-chapter h2,
.novel .verdict-name {
  margin: 0;
  color: var(--color-cream);
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
}
.novel .cover-copy h1 {
  font-size: clamp(4.4rem, 16vw, 8.5rem);
  letter-spacing: -0.055em;
}
.novel .panel-chapter {
  background:
    radial-gradient(#1a120e 0.65px, transparent 0.8px),
    #24170f;
  background-size: 5px 5px, auto;
  padding: 1.4rem 1.1rem 1.5rem;
}
.novel .panel-chapter h2 {
  font-size: clamp(2.8rem, 8vw, 5rem);
  max-width: 16ch;
}
.novel .vs-inline {
  font-family: var(--font-marker);
  font-weight: 400;
  color: var(--color-blood);
  letter-spacing: 0;
  text-transform: none;
}
.novel .panel-index {
  padding: 1.1rem 1rem 1.2rem;
}
.novel .panel-index h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
}
.novel .contents {
  list-style: none;
  margin: 0;
  padding: 0;
}
.novel .contents a,
.novel .contents button {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: baseline;
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0;
  border: 0;
  border-top: 2px solid rgba(18, 14, 12, 0.2);
  background: transparent;
  color: inherit;
  text-align: left;
  text-decoration: none;
  font: inherit;
}
.novel .contents li:last-child a,
.novel .contents li:last-child button {
  border-bottom: 2px solid rgba(18, 14, 12, 0.2);
}
.novel .contents span {
  font-family: var(--font-mono);
  color: var(--color-blood-deep);
  font-size: 0.85rem;
}
.novel .contents strong {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 1.35rem;
  line-height: 1;
}
.novel .capbox {
  margin: 0;
  background: rgba(247, 241, 228, 0.94);
  border: 3px solid #120e0c;
  padding: 0.7rem 0.8rem;
  color: var(--color-ink);
  font-size: 1.12rem;
  line-height: 1.4;
}
.novel .cover-copy .capbox {
  max-width: 46rem;
}
.novel .cap-lede {
  font-size: 1.2rem;
}
.novel .capbox strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.novel .panel-narration {
  padding: 0.85rem;
  background:
    radial-gradient(#1a120e 0.55px, transparent 0.7px),
    #ead9bc;
  background-size: 4px 4px, auto;
}
.novel .panel-talk {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 1rem 0.85rem 1.35rem;
  background-color: #e7d3b4;
  background-image: radial-gradient(rgba(18, 14, 12, 0.45) 0.7px, transparent 0.85px);
  background-size: 5px 5px;
}
.novel .capbox p {
  margin: 0;
}
.novel .capbox p + p {
  margin-top: 0.8rem;
}
.novel .panel-talk.has-face {
  min-height: 0;
  padding: 0;
  background: #120e0c;
  background-image: none;
}
.novel .talk-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 16%;
  filter: brightness(0.52) saturate(0.82) contrast(1.08);
}
.novel .panel-talk.has-face::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 6, 5, 0.8) 0%, rgba(8, 6, 5, 0.08) 46%, rgba(8, 6, 5, 0.22) 100%);
  pointer-events: none;
}
.novel .balloon {
  position: relative;
  z-index: 1;
  margin: 0;
  width: 100%;
  background: #f7f1e4;
  border: 3px solid #120e0c;
  border-radius: 18px;
  padding: 0.65rem 0.8rem 0.75rem;
}
.novel .balloon::after {
  content: "";
  position: absolute;
  left: 1.4rem;
  bottom: -14px;
  border-width: 14px 10px 0 0;
  border-style: solid;
  border-color: #120e0c transparent transparent transparent;
}
.novel .balloon.from-right::after {
  left: auto;
  right: 1.6rem;
  border-width: 14px 0 0 10px;
}
.novel .who {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--color-blood-deep);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.novel .said {
  font-size: 1.15rem;
  line-height: 1.35;
}
.novel .panel-impact,
.novel .panel-verdict {
  background: #140f0c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 240px;
  padding: 1.4rem 1rem;
  text-align: center;
}
.novel .sfx {
  margin: 0;
  font-family: var(--font-marker);
  font-weight: 400;
  font-size: clamp(2.2rem, 7vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-cream);
  transform: rotate(-2deg);
}
.novel .sfx-long {
  font-size: clamp(1.5rem, 4.5vw, 2.6rem);
}
.novel .sfx { overflow-wrap: anywhere; }
.novel .on-dark {
  background: var(--color-cream);
  max-width: 40rem;
}
.novel .panel-art,
.novel .panel-fighter {
  padding: 0;
  background: #120e0c;
}
.novel .panel-art img,
.novel .panel-fighter img,
.novel .slate {
  display: block;
  width: 100%;
  height: auto;
}
.novel .panel-fighter {
  display: flex;
  align-items: center;
  justify-content: center;
}
/* The whole picture, never cropped at the sides: it is fitted inside the panel and the dark panel shows around it. Shorter than
   it used to be, so a pair of them fits a screen. */
.novel .panel-fighter img {
  height: auto;
  max-height: min(58vh, 540px);
  object-fit: contain;
  object-position: center;
}
.novel .slate {
  height: min(52vh, 480px);
}
.novel .slate {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 18% 80%, rgba(216, 74, 53, 0.35), transparent 26%),
    radial-gradient(#efe2c7 0.8px, transparent 0.95px),
    #1a120e;
  background-size: auto, 6px 6px, auto;
  color: var(--color-cream);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(4rem, 10vw, 7rem);
  letter-spacing: -0.04em;
}
.novel .nameplate,
.novel .cap-overlay {
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.7rem;
}
.novel .vs-badge {
  align-self: center;
  margin: 0;
  z-index: 2;
  background: var(--color-blood);
  color: #fff6ea;
  border: 4px solid #120e0c;
  font-family: var(--font-marker);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1;
  padding: 0.35rem 0.55rem 0.45rem;
  transform: rotate(-8deg);
}
.novel .sfx-label {
  margin: 0;
  color: var(--color-amber);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.novel .verdict-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3rem, 8vw, 5.5rem);
  text-shadow: none;
  color: var(--color-cream);
}
.novel .verdict-method {
  margin: 0;
  font-family: var(--font-marker);
  color: var(--color-blood);
  font-size: clamp(1.8rem, 5vw, 3rem);
  transform: rotate(-2deg);
}
.novel .panel-bout {
  min-height: 0;
}
.novel .reader {
  padding-bottom: 5.5rem;
}
.novel .turner {
  position: fixed;
  z-index: 25;
  left: 50%;
  bottom: 0.7rem;
  transform: translateX(-50%);
  width: min(980px, calc(100% - 1.25rem));
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 0.45rem 0.4rem 0.55rem;
  background: #120e0c;
  border: 3px solid #efe2c7;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
}
.novel .turn-back,
.novel .turn-next {
  appearance: none;
  min-height: 48px;
  border: 3px solid #1a120e;
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.novel .turn-back {
  background: transparent;
  color: var(--color-cream);
  border-color: #78513e;
  padding: 0 0.85rem;
}
.novel .turn-next {
  margin-left: auto;
  background: var(--color-cream);
  color: #1a120e;
  padding: 0 1.15rem;
  font-size: 1.15rem;
}
.novel .turn-jump,
.novel .turn-mark {
  appearance: none;
  min-height: 48px;
  min-width: 0;
  border: 3px solid #78513e;
  background: transparent;
  color: var(--color-cream);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
  cursor: pointer;
}
.novel .turn-jump {
  max-width: 13rem;
  padding: 0 0.5rem;
  background: #120e0c;
  text-overflow: ellipsis;
}
.novel .turn-jump option { background: #120e0c; color: var(--color-cream); text-transform: none; }
.novel .turn-mark { padding: 0 0.7rem; white-space: nowrap; }
.novel .turn-mark[aria-pressed="true"] { background: var(--color-amber); border-color: var(--color-amber); color: #1a120e; }
.novel .turn-jump:disabled { opacity: 0.45; }
.novel .turn-back:disabled,
.novel .turn-next:disabled {
  opacity: 0.45;
}
.novel .turn-meta {
  margin: 0;
  min-width: 0;
}
.novel .turn-meta span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--color-amber);
}
.novel .turn-meta strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 1rem;
  line-height: 1.1;
}
.novel .turn.over {
  position: relative;
  z-index: 6;
  background: var(--color-void);
}
.novel .curl-under {
  position: fixed;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
  background: #e7d4b0;
}
.novel .curl-shift {
  width: 100%;
}
.novel .curl-svg {
  position: fixed;
  z-index: 7;
  overflow: hidden;
  pointer-events: none;
}
.novel .curl-shade {
  fill: rgba(0, 0, 0, 0.38);
  filter: url("#curlBlur");
}
.novel .curl-flap {
  fill: url("#curlPaper");
  stroke: rgba(255, 250, 242, 0.85);
  stroke-width: 2;
}
@media (prefers-reduced-motion: reduce) {
.novel .curl-svg,
.novel .curl-under {
    display: none;
  }


}
.novel .colophon {
  text-align: center;
  color: #c7ad91;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.novel .colophon p {
  margin: 0.4rem 0 0;
}
@media (max-width: 760px) {
.novel .layout-duo,
.novel .showdown {
    grid-template-columns: 1fr;
  }
.novel .slant-a > .panel-talk,
.novel .slant-b > .panel-talk,
.novel .slant-a .slant-inner,
.novel .slant-b .slant-inner {
    transform: none;
    clip-path: none;
    width: 100%;
    margin-left: 0;
  }
.novel .vs-badge {
    justify-self: center;
    transform: rotate(-4deg);
  }
.novel .panel-fighter img {
    max-height: 56vh;
  }
.novel .slate {
    height: 40vh;
  }
.novel .turn-meta {
    flex: 1;
    min-width: 0;
  }
.novel .turner { gap: 0.4rem; flex-wrap: wrap; padding: 0.35rem; }
.novel .turn-meta strong { display: none; }
.novel .turn-meta span { font-size: 0.62rem; }
.novel .turn-jump { order: 5; flex: 1 1 40%; max-width: none; }
.novel .turn-mark { order: 6; flex: 1 1 40%; font-size: 0.72rem; padding: 0 0.4rem; }
.novel .turn-back, .novel .turn-next { min-height: 44px; }
.novel .turn-jump, .novel .turn-mark { min-height: 40px; }
.novel .reader { padding-bottom: 8.5rem; }
.novel .turn-next {
    font-size: 1rem;
    padding: 0 0.7rem;
  }
.novel .cover-copy h1 {
    font-size: 4.2rem;
  }


}
@media (prefers-reduced-motion: reduce) {


}


/* the speaker's own colour, as an underline under the name */
.novel .who { width: fit-content; border-bottom: 3px solid transparent; }
.novel .who[style] { padding-bottom: 1px; }
/* commentary and other indented lines: a caption box with the name on top */
.novel .panel-com .capbox strong { margin-bottom: 0.2rem; color: var(--color-blood-deep); }
.novel .capbox .rich-image img,
.novel .capbox .rich-video video { display: block; max-width: 100%; height: auto; }
.novel .panel-art .rich-image,
.novel .panel-art .rich-video { margin: 0; }
.novel .panel-art video { display: block; width: 100%; height: auto; }

/* the Traditional / Novel switch, and what it hides */
.read-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.2rem;
}
.read-switch-label {
  margin: 0 0.35rem 0 0;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}
.read-switch button {
  appearance: none;
  min-height: 40px;
  padding: 0.4rem 0.95rem;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.read-switch button[aria-pressed="true"] {
  background: var(--accent, #e11d2e);
  border-color: var(--accent, #e11d2e);
  color: #fff;
}
.docket[data-read="novel"] .nf-traditional { display: none; }
.docket[data-read="novel"] .nf-hero { display: none; }
.docket:not([data-read="novel"]) .novel { display: none; }

/* the page-turn layers are appended to <body>, so they carry .novel themselves */
.novel.curl-under {
  position: fixed;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
  background: #e7d4b0;
}
.novel.curl-svg {
  position: fixed;
  z-index: 7;
  overflow: hidden;
  pointer-events: none;
}

/*
 * The slanted edge of a pair cuts into whichever cell sits behind it. The
 * original only made room for the balloon on one of the four cut corners, so
 * the name on the second cell of the first slant ("Camera Boy") lost its first
 * letters. Room is made on every cut edge here.
 */
.novel .slant-a > .panel-talk:not(:first-child) > .balloon,
.novel .slant-b > .panel-talk:not(:last-child) > .balloon {
  margin-left: 0.75rem;
  margin-right: 0.75rem;
}
.novel .slant-a > .panel-talk:not(:first-child) > .balloon { margin-left: calc(var(--cut) + 0.55rem); }
.novel .slant-b > .panel-talk:not(:last-child) > .balloon { margin-right: calc(var(--cut) + 0.55rem); }

/*
 * PHONES. A pair stacks into two full-width cells with no slant. The original
 * set this inside the media query with selectors that were less specific than
 * the desktop ones, so the slant and the two columns survived on a phone. These
 * match the desktop selectors on purpose.
 */
@media (max-width: 760px) {
  .novel .layout-duo.slant-a,
  .novel .layout-duo.slant-b {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }
  .novel .slant-a > .panel-talk,
  .novel .slant-b > .panel-talk,
  .novel .slant-a > .panel-talk:first-child,
  .novel .slant-a > .panel-talk:last-child,
  .novel .slant-b > .panel-talk:first-child,
  .novel .slant-b > .panel-talk:last-child,
  .novel .slant-a > .panel-talk + .panel-talk,
  .novel .slant-b > .panel-talk + .panel-talk {
    clip-path: none;
    margin-left: 0;
  }
  .novel .slant-a > .panel-talk:not(:last-child) > .balloon,
  .novel .slant-a > .panel-talk:not(:first-child) > .balloon,
  .novel .slant-b > .panel-talk:not(:first-child) > .balloon,
  .novel .slant-b > .panel-talk:not(:last-child) > .balloon {
    margin-left: 0.75rem;
    margin-right: 0.75rem;
  }
  .novel .slant-inner { min-height: 240px; }
}

/*
 * SPEAKERS. Everybody who speaks is set on the same warehouse background
 * (assets/novel/speaker-bg.webp, the "Upper Body" background), whether or not
 * they have a picture of their own. A picture goes on top of it; a speaker
 * with none gets the background alone.
 */
.novel .panel-talk,
.novel .panel-talk.has-face {
  background-color: #120e0c;
  background-image: url("/assets/novel/speaker-bg.webp");
  background-size: cover;
  background-position: center top;
}
.novel .talk-face {
  filter: none;
  object-fit: cover;
  object-position: center top;
}
.novel .panel-talk.has-face::after {
  background: linear-gradient(to top, rgba(8, 6, 5, 0.55) 0%, rgba(8, 6, 5, 0) 38%);
}

/*
 * SPEAKER TINT. One warm look over every speaking cell, made in CSS: it does not touch the picture files, so any art (cut-outs on
 * the warehouse background, or the framed Upper Body pictures) is pulled into the same colour. Four layers: a grade on the
 * picture itself, a warm wash with a lamp-light glow from the upper right and a little film grain (::before), and burnt edges
 * with a darker foot for the balloon to sit on (::after).
 *
 * Turn it up or down with these, here or on any one cell. Setting --novel-tint-on to 0 switches the whole look off.
 */
.novel {
  --novel-tint-on: 1;          /* 1 = tint on, 0 = off                                    */
  --novel-sepia: 0.5;          /* 0 to 1   how brown the picture is pulled                  */
  --novel-sat: 1.3;            /* 1 = as drawn, higher = richer colour                      */
  --novel-contrast: 1.08;
  --novel-bright: 0.98;
  --novel-wash: 0.42;          /* 0 to 1   how amber the whole cell is turned (the main dial) */
  --novel-lamp: 1;             /* 0 to 1   the pools of lamp light from the upper corners   */
  --novel-grain: 0.45;         /* 0 to 1   film grain                                       */
  --novel-edge: 0.82;          /* 0 to 1   darkness at the edges                            */
  --novel-gray: 0;             /* 0 to 1   1 = black and white                              */
  --novel-wash-rgb: 222, 124, 38;    /* the colour laid over the cell                        */
  --novel-lamp-rgb: 255, 176, 84;    /* the colour of the lamp pools                         */
  --novel-grain-img: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.3 0 0 0 0 0.18 0 0 0 1.6 -0.55'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/></svg>");
}
.novel .panel-talk {
  isolation: isolate;
}
.novel .panel-talk .talk-face {
  filter: grayscale(calc(var(--novel-gray) * var(--novel-tint-on)))
          sepia(calc(var(--novel-sepia) * var(--novel-tint-on)))
          saturate(calc(1 + (var(--novel-sat) - 1) * var(--novel-tint-on)))
          contrast(calc(1 + (var(--novel-contrast) - 1) * var(--novel-tint-on)))
          brightness(calc(1 - (1 - var(--novel-bright)) * var(--novel-tint-on)));
}
.novel .panel-talk::before {
  /* The amber: a flat amber laid over the cell in "colour" blend mode. It takes the hue and strength of colour from the amber and
     keeps the light and dark of what is underneath, so a grey room and a grey suit both turn amber without going flat. */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgb(var(--novel-wash-rgb));
  mix-blend-mode: color;
  opacity: calc(var(--novel-wash) * var(--novel-tint-on));
}
.novel .panel-talk::after,
.novel .panel-talk.has-face::after {
  /* light pools from the upper left and right (the hanging lamps), film grain, a darker foot for the balloon, burnt edges */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--novel-tint-on);
  background:
    radial-gradient(ellipse 34% 40% at 84% 6%, rgba(var(--novel-lamp-rgb), calc(var(--novel-lamp) * 0.55)), rgba(var(--novel-lamp-rgb), 0) 100%),
    radial-gradient(ellipse 30% 36% at 14% 10%, rgba(var(--novel-lamp-rgb), calc(var(--novel-lamp) * 0.34)), rgba(var(--novel-lamp-rgb), 0) 100%),
    var(--novel-grain-img),
    linear-gradient(to top, rgba(10, 6, 4, 0.55) 0%, rgba(10, 6, 4, 0) 34%),
    radial-gradient(ellipse 78% 74% at 50% 42%, rgba(10, 6, 4, 0) 52%, rgba(10, 6, 4, var(--novel-edge)) 100%);
  background-size: auto, auto, 180px 180px, auto, auto;
}

/*
 * COLOUR PROFILES. Each speaking cell is given one of four looks (novel_tone() in includes/novel_render.php picks them, a different one
 * each time in a row). "sepia" is the look above. The others change the same dials on the one cell:
 *
 *   tone-colour  full colour, lit by the lamps, a very light warm wash
 *   tone-mono    black and white, with a cool silver light
 *   tone-cold    steel-blue night: a blue wash and cold light
 *
 * To drop a look, delete its block (a cell that is given it then shows plain). To change how strong one is, change its numbers.
 */
.novel .panel-talk.tone-colour {
  --novel-sepia: 0;
  --novel-sat: 1.18;
  --novel-contrast: 1.06;
  --novel-bright: 1;
  --novel-wash: 0.1;
  --novel-lamp: 0.7;
  --novel-edge: 0.7;
  --novel-grain-img: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 1.4 -0.55'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/></svg>");
}
.novel .panel-talk.tone-mono {
  --novel-gray: 1;
  --novel-sepia: 0;
  --novel-sat: 1;
  --novel-contrast: 1.2;
  --novel-bright: 0.96;
  --novel-wash: 0;
  --novel-lamp: 0.45;
  --novel-lamp-rgb: 236, 238, 242;
  --novel-edge: 0.88;
  --novel-grain-img: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 1.6 -0.55'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/></svg>");
}
.novel .panel-talk.tone-cold {
  --novel-sepia: 0;
  --novel-sat: 1.05;
  --novel-contrast: 1.12;
  --novel-bright: 0.94;
  --novel-wash: 0.4;
  --novel-wash-rgb: 56, 108, 176;
  --novel-lamp: 0.85;
  --novel-lamp-rgb: 132, 190, 255;
  --novel-edge: 0.9;
  --novel-grain-img: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.45 0 0 0 0 0.6 0 0 0 1.6 -0.55'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/></svg>");
}

/*
 * PICTURE FIT. A speaker's picture is scaled to the full WIDTH of its cell and never cropped at the sides or stretched. A tall picture
 * is anchored to the top (so the face stays in view) and its lower part is cut off by the cell. A wide or short picture, such as a
 * title graphic, is shown whole and sits in the middle of the space above the balloon, with the cell's dark colour around it (assets/js/novel.js
 * adds is-short to such a picture; without the script it simply sits at the top).
 */
.novel .panel-talk .talk-face {
  top: 0;
  bottom: 7.5rem;       /* roughly the height of the balloon: a short picture is centred in the room above it */
  left: 0;
  right: auto;
  width: 100%;
  height: auto;
  margin: 0;
  object-fit: contain;
  object-position: center top;
}
.novel .panel-talk .talk-face.is-short {
  margin: auto 0;
}


/* Bouts with more than two sides: names stay together on the cover, the pictures get the room, and the name tag only shows on hover. */
.novel .panel-bout .nm { white-space: nowrap; }
.novel .comic-card li.multi {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: baseline;
  gap: 0.1rem 0.45rem;
}
.novel .comic-card li.multi span { flex: 0 0 100%; }
.novel .comic-card li.multi strong,
.novel .comic-card li.multi strong:last-child {
  text-align: left;
  font-size: clamp(1.05rem, 2.8vw, 1.4rem);
}
.novel .showdown-many { gap: 0.3rem; }
.novel .showdown-many .vs-badge {
  margin: 0;
  justify-self: center;
  width: max-content;
  position: relative;
  z-index: 3;
  font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  border-width: 3px;
  padding: 0.2rem 0.35rem 0.28rem;
}
.novel .showdown-many .panel-fighter img { max-height: min(66vh, 640px); }
.novel .showdown-many .slate { height: min(56vh, 520px); font-size: clamp(2rem, 5vw, 3.5rem); }
.novel .panel-fighter .nameplate {
  left: 0;
  right: 0;
  bottom: 0;
  border-width: 3px 0 0;
  padding: 0.45rem 0.7rem;
  text-align: center;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.novel .panel-fighter { overflow: hidden; }
.novel .panel-fighter:hover .nameplate,
.novel .panel-fighter:focus-within .nameplate {
  opacity: 1;
  transform: none;
}
@media (hover: none) {
  .novel .panel-fighter .nameplate { opacity: 1; transform: none; }
}
@media (max-width: 760px) {
  .novel .showdown-many { grid-template-columns: 1fr 1fr; }
  .novel .showdown-many .vs-badge { display: none; }
}
.novel .showdown-many .panel-fighter { justify-self: stretch; width: 100%; min-width: 0; }
.novel .showdown-many .panel-fighter img { width: 100%; }
/* A figure carries the browser's default 40px side margins, which pushed the row off the page and squeezed the pictures. */
.novel .panel-fighter { margin: 0; box-sizing: border-box; }
