/* Aurbis Billboards: the hold billboard surface (public_board_v0.md §3a).
   Real art, not painted: the board is vanilla Windhelm planks
   (whwoodboards01), the letter papers are the game's own note textures
   (largenote01/02/04, largenote01blood, largetornpage), and the chrome
   around them is the Aurbis Prisma panel treatment (prisma-primitives:
   frost hairlines, gold accents, dark glass, Futura Condensed caps).
   Asset provenance is documented in README.md next to this file.

   Two layouts from one stylesheet: hosted in game (`body.is-hosted`, set
   by board.js on the ?hosted=1 boot) the page is transparent and the board
   fills the iframe, which the CEF host (cef/ui/styles.css
   .board-surface__frame) hangs inset over the undimmed world; on the
   website mirror the board fills the page as before. */

@font-face {
  font-family: 'Futura Condensed';
  src: url('assets/fonts/futura-condensed-medium.ttf') format('truetype');
  font-weight: 500;
}
@font-face {
  font-family: 'Futura Condensed';
  src: url('assets/fonts/futura-condensed-bold.ttf') format('truetype');
  font-weight: 700;
}
@font-face {
  font-family: 'Caveat';
  src: url('assets/fonts/caveat-variable-latin.woff2') format('woff2');
  font-weight: 400 700;
}

:root {
  /* Aurbis Prisma chrome (prisma/assets/prisma-primitives.css tokens) */
  --ink-0:            #0b0d10;
  --scrim:            rgba(2, 4, 7, 0.55);
  --surface:          rgba(6, 8, 12, 0.82);
  --surface-strong:   rgba(8, 11, 16, 0.92);
  --row:              rgba(12, 16, 22, 0.62);
  --row-hover:        rgba(23, 32, 42, 0.82);
  --sunken:           rgba(0, 0, 0, 0.42);
  --line:             rgba(154, 183, 214, 0.24);
  --line-strong:      rgba(154, 183, 214, 0.58);
  --line-gold:        rgba(216, 185, 119, 0.42);
  --text:             #edf2f5;
  --text-warm:        #ead3a0;
  --muted:            rgba(237, 242, 245, 0.66);
  --faint:            rgba(237, 242, 245, 0.42);
  --gold:             #d8b977;
  --gold-strong:      #fbf1d7;
  --frost:            #9ab7d6;
  --green:            #9fca9a;
  --red:              #f06b5f;
  --outline:          0 1px 2px rgba(0, 0, 0, 0.94), 0 0 4px rgba(0, 0, 0, 0.62);
  --shadow:           rgba(0, 0, 0, 0.7);

  /* Ink on paper */
  --paper-ink:      #2f2418;
  --paper-ink-hi:   #1e1711;
  --paper-ink-soft: rgba(47, 36, 24, 0.72);
  --rust:           #7a3a20;

  --font-menu: 'Futura Condensed', 'Arial Narrow', Arial, sans-serif;
  --font-book: 'EB Garamond', Georgia, serif;
  --font-fell: 'IM Fell English', Georgia, serif;
  --font-hand: 'Caveat', 'Segoe Script', cursive;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  font-family: var(--font-book);
  color: var(--text);
  background: var(--ink-0);
  overflow: hidden;
}

/* In game the world shows through, undimmed (owner 2026-09-03: the
   0.55 scrim read as "just a grey background" over a bright hold). The
   page paints nothing outside the planks; the CEF host frame around the
   iframe is transparent and carries the window shadow. */
body.is-hosted { background: transparent; }
/* Mock only (`?windowed=1` off disk): a stand-in for the world behind the
   transparent hosted page, so the inset and the shadow can be judged in a
   browser. Never set in game. */
body.is-hosted.is-windowed-mock {
  background:
    radial-gradient(80% 60% at 50% 100%, rgba(120, 96, 60, 0.35), transparent 70%),
    linear-gradient(180deg, #2c3947 0%, #17202a 55%, #0e1218 100%);
}

[hidden] { display: none !important; }

button, input, textarea { font: inherit; color: inherit; }

/* ============================== The board ============================== */

.board {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: url('assets/wood-planks.png') repeat;
  background-size: 512px 512px;
  overflow: hidden;
}

/* Hosted: the board fills the iframe, which the host already hangs inset
   (6% / 6.5%) with the deep drop shadow painted outside this document.
   The Prisma window frame (iron line, inner gold hairline) stays here. */
body.is-hosted .board {
  inset: 0;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 0 1px rgba(216, 185, 119, 0.14);
}
body.is-hosted.is-windowed-mock .board {
  inset: 6% 6.5%;
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 0 1px rgba(216, 185, 119, 0.14);
}
body.is-hosted .board::after {
  content: '';
  position: absolute;
  inset: 4px;
  z-index: 6;
  pointer-events: none;
  border: 1px solid rgba(216, 185, 119, 0.14);
  border-radius: 1px;
}

/* Lantern light: frost glow above, deep vignette at the edges. */
.board::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(70% 42% at 50% 0%, rgba(154, 183, 214, 0.12), transparent 70%),
    radial-gradient(85% 60% at 50% 30%, transparent 40%, rgba(0, 0, 0, 0.38) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.12) 30%, rgba(0, 0, 0, 0.4));
}

/* Masthead: the Prisma header (eyebrow, title, sub-line, frost wash from
   the left, actions on the right). */
.rail {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-height: 104px;
  padding: 18px 24px 16px;
  background:
    linear-gradient(90deg, rgba(154, 183, 214, 0.13), transparent 42%),
    rgba(3, 5, 8, 0.74);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.55);
}
.rail-id { min-width: 0; }
.rail-eyebrow {
  margin: 0 0 5px;
  font-family: var(--font-menu);
  font-weight: 700;
  font-size: 17px;
  line-height: 22px;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: var(--outline);
}
.rail-name {
  margin: 0;
  font-family: var(--font-menu);
  font-weight: 700;
  font-size: 44px;
  line-height: 1.04;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: var(--outline);
  overflow-wrap: anywhere;
}
.rail-sub {
  margin: 6px 0 0;
  font-family: var(--font-book);
  font-size: 18px;
  line-height: 1.3;
  color: var(--muted);
  text-shadow: var(--outline);
}
.rail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ============================== Buttons ============================== */

/* The Prisma action button (.au-btn): frost glass, bold caps, no
   tracking. Primary takes the gold tint, danger the red. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 1px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(154, 183, 214, 0.18), rgba(154, 183, 214, 0.04)),
    rgba(0, 0, 0, 0.38);
  font-family: var(--font-menu);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: var(--outline);
  cursor: pointer;
  transition: border-color 120ms, background 120ms, color 120ms;
}
.btn:hover, .btn:focus-visible {
  background: rgba(33, 45, 58, 0.9);
  outline: none;
}
.btn:disabled { color: var(--faint); border-color: rgba(154, 183, 214, 0.14); background: rgba(7, 9, 12, 0.4); cursor: default; }
.btn-primary {
  border-color: rgba(216, 185, 119, 0.72);
  background:
    linear-gradient(180deg, rgba(216, 185, 119, 0.22), rgba(154, 183, 214, 0.06)),
    rgba(0, 0, 0, 0.42);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background:
    linear-gradient(180deg, rgba(216, 185, 119, 0.3), rgba(154, 183, 214, 0.08)),
    rgba(20, 26, 34, 0.9);
}
.btn-danger {
  border-color: rgba(240, 107, 95, 0.55);
  color: #fbe3df;
  background:
    linear-gradient(180deg, rgba(240, 107, 95, 0.16), rgba(240, 107, 95, 0.03)),
    rgba(0, 0, 0, 0.38);
}
.btn-close {
  width: 48px;
  height: 48px;
  min-height: 0;
  padding: 0;
  border-color: var(--line);
  color: var(--frost);
  background: rgba(0, 0, 0, 0.38);
  font-size: 20px;
}
.btn-close:hover, .btn-close:focus-visible {
  border-color: var(--line-strong);
  background: rgba(25, 36, 48, 0.78);
  color: var(--text);
}
/* Tabs: the Prisma tab strip (left rule, gold when active). */
.btn-tab {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-left: 2px solid var(--line);
  color: var(--muted);
  background: var(--row);
  text-align: left;
}
.btn-tab:hover, .btn-tab:focus-visible {
  border-left-color: var(--line-strong);
  background: var(--row-hover);
  color: var(--text);
}
.btn-tab.is-active {
  border-left-color: var(--gold);
  color: var(--text);
  background: linear-gradient(90deg, rgba(216, 185, 119, 0.16), transparent 70%), var(--row-hover);
}
.btn-chip {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 15px;
  color: var(--muted);
  background: rgba(4, 6, 8, 0.5);
}
.btn-chip.is-active {
  color: var(--text);
  border-color: rgba(216, 185, 119, 0.72);
  background:
    linear-gradient(180deg, rgba(216, 185, 119, 0.22), rgba(216, 185, 119, 0.04)),
    rgba(0, 0, 0, 0.42);
}

/* Hold navigation: WEB MIRROR ONLY. board.js renders it just under the
   masthead when ctx.mirror is true and leaves the element hidden
   otherwise, so the in-game surface is untouched by it. */
.hold-nav {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 18px;
  padding: 9px 26px 10px;
  background: rgba(3, 5, 8, 0.7);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.hold-nav-link {
  font-family: var(--font-menu);
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  text-shadow: var(--outline);
  transition: color 120ms ease;
}
.hold-nav-link:hover, .hold-nav-link:focus-visible { color: var(--text); }
.hold-nav-link.is-current { color: var(--gold); }
.hold-nav-all {
  padding-right: 18px;
  border-right: 1px solid var(--line);
  color: var(--text);
}
@media (max-width: 720px) {
  .hold-nav { gap: 4px 12px; padding: 8px 12px 9px; }
  .hold-nav-link { font-size: 13px; }
  .hold-nav-all { padding-right: 12px; }
}

/* The wall of bills: the scroller wraps the columns so the board grows
   downward and scrolls vertically. */
.wall-scroll {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(216, 185, 119, 0.34) rgba(0, 0, 0, 0.18);
}
.wall-scroll::-webkit-scrollbar { width: 9px; }
.wall-scroll::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.18); }
.wall-scroll::-webkit-scrollbar-thumb {
  border: 1px solid rgba(216, 185, 119, 0.34);
  border-radius: 1px;
  background: linear-gradient(180deg, rgba(216, 185, 119, 0.28), rgba(184, 214, 242, 0.28)), rgba(184, 214, 242, 0.42);
}
.wall {
  width: min(1408px, 100%);
  margin: 0 auto;
  padding: 42px 44px 55px;
  /* Masonry columns: papers keep their native shape and stack down the
     board like a real pinned wall; nothing can overlap. */
  columns: 260px;
  column-gap: 26px;
}

/* ============================== Posts ============================== */

/* A card IS its paper: the texture at native aspect, untouched. Percent
   padding scales with the card so ink always sits inside the drawn
   borders at any size. */
.post {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0 0 31px;
  break-inside: avoid;
  border: none;
  border-radius: 1px;
  font-family: var(--font-book);
  color: var(--paper-ink);
  text-align: left;
  cursor: pointer;
  /* Buttons default to a near-white ButtonFace: it must never show
     through a paper's transparent (torn) regions. */
  background-color: transparent;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-shadow: 2px 8px 18px rgba(0, 0, 0, 0.65);
  /* --tilt/--dx/--dy come from the deterministic post-id hash (board.js). */
  transform: rotate(var(--tilt, 0deg)) translate(var(--dx, 0px), var(--dy, 0px));
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
  overflow: hidden;
}
.post:hover, .post:focus-visible {
  transform: rotate(var(--tilt, 0deg)) translate(var(--dx, 0px), calc(var(--dy, 0px) - 3px)) scale(1.02);
  box-shadow: 3px 12px 26px rgba(0, 0, 0, 0.75), 0 0 24px rgba(216, 185, 119, 0.14);
  filter: brightness(1.04);
  z-index: 4;
}
.post:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* The iron pin every post hangs from. */
.post::before {
  content: '';
  position: absolute;
  top: 8px; left: 50%;
  width: 13px; height: 13px;
  margin-left: -7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #c9c5bc, #5a554e 58%, #2a2723);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.65);
  z-index: 1;
}

/* Letter content */
.post-title {
  margin: 0 0 4px;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--paper-ink-hi);
  line-height: 1.12;
}
.post-body {
  margin: 0;
  flex: 1 1 auto;
  font-size: 14px;
  line-height: 1.3;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 95%);
          mask-image: linear-gradient(180deg, #000 60%, transparent 95%);
  white-space: pre-line;
}
.fade-line {
  margin-top: 6px;
  font-family: var(--font-fell);
  font-size: 12px;
  font-style: italic;
  color: var(--paper-ink-soft);
}
.post-kicker {
  margin: 0 0 3px;
  font-family: var(--font-fell);
  font-style: italic;
  font-size: 12px;
  color: var(--rust);
}

/* --- The Skyrim papers (public_board_v0.md §1) --- */

/* Plain: the folded page (largenote01). Handwritten. */
.paper-note {
  aspect-ratio: 0.95;
  background-image: url('assets/paper-note.png');
  padding: 8.5% 9% 6%;
}
.paper-note .post-title, .paper-torn .post-title, .paper-blood .post-title {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 21px;
}
.paper-note .post-body, .paper-torn .post-body, .paper-blood .post-body {
  font-family: var(--font-hand);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.15;
}

/* Edict: the carved knotwork page (largenote02), reserved for jarldom
   leadership and staff. It hangs first, with a gold pin and a gold halo
   so it reads as the hold's word from across the board. `.paper-decree`
   is the pre-rename id and renders the same. */
.paper-edict, .paper-decree {
  aspect-ratio: 0.945;
  background-image: url('assets/paper-decree.png');
  padding: 9% 9.5% 7%;
  box-shadow:
    0 0 0 2px rgba(216, 185, 119, 0.55),
    2px 8px 18px rgba(0, 0, 0, 0.65),
    0 0 30px rgba(216, 185, 119, 0.32);
}
.paper-edict:hover, .paper-decree:hover, .paper-edict:focus-visible, .paper-decree:focus-visible {
  box-shadow:
    0 0 0 2px rgba(216, 185, 119, 0.75),
    3px 12px 26px rgba(0, 0, 0, 0.75),
    0 0 36px rgba(216, 185, 119, 0.45);
}
.paper-edict::before, .paper-decree::before {
  background: radial-gradient(circle at 35% 30%, #f6e6bf, #b08a3a 58%, #4d3a12);
}
.paper-edict .post-title, .paper-decree .post-title {
  font-family: var(--font-book);
  font-variant: small-caps;
  letter-spacing: 0.04em;
  font-size: 16.5px;
}

/* Fine letter: the red filigree page (largenote04); ink sits inside the
   thin ruled frame. */
.paper-fine {
  aspect-ratio: 0.95;
  background-image: url('assets/paper-fine.png');
  padding: 8.5% 8.5% 8.5%;
}
.paper-fine .post-title {
  font-family: var(--font-book);
  font-size: 16.5px;
  font-weight: 600;
}

/* Bloodied: the full-size vanilla bloody letter (largenote01blood).
   Ink gets a parchment halo so the words survive the splatter. */
.paper-blood {
  aspect-ratio: 0.95;
  background-image: url('assets/paper-blood.png');
  padding: 8.5% 9% 6%;
}
/* The wash is reader-only: at card scale the halo alone reads better. */
.reader-sheet.paper-blood .sheet-title, .reader-sheet.paper-blood .sheet-body {
  background: rgba(240, 229, 206, 0.62);
  box-shadow: 0 0 26px 20px rgba(240, 229, 206, 0.62);
  align-self: flex-start;
}
.reader-sheet.paper-blood .sheet-body { flex: 0 1 auto; max-width: 100%; }
.paper-blood .post-title, .paper-blood .post-body, .paper-blood .fade-line,
.reader-sheet.paper-blood .sheet-title, .reader-sheet.paper-blood .sheet-body {
  text-shadow:
    0 0 3px rgba(238, 227, 205, 0.95),
    0 0 8px rgba(238, 227, 205, 0.85),
    0 0 14px rgba(238, 227, 205, 0.7);
}

/* Torn: the vanilla torn page (largetornpage), ripped down its left
   edge. Rect shadows never paint on it (they would outline the
   transparent rip); the silhouette gets a drop-shadow filter instead,
   and the ink starts past the tear. */
.paper-torn {
  aspect-ratio: 0.892;
  background-image: url('assets/paper-torn.png');
  padding: 9% 8% 7% 17%;
  box-shadow: none;
  filter: drop-shadow(2px 7px 10px rgba(0, 0, 0, 0.6));
}
.paper-torn::before { left: 56%; }
.paper-torn:hover, .paper-torn:focus-visible,
.post-torn:hover, .post-torn:focus-visible {
  box-shadow: none;
  filter: drop-shadow(3px 11px 15px rgba(0, 0, 0, 0.7)) brightness(1.04);
}

/* --- Posters: the pinned image IS the card, edge to edge. Size classes
   set the pinned shape; the full plate opens in the reader. --- */

.post-poster { padding: 0; }
.post-poster.poster-flier { aspect-ratio: 1; }
.post-poster.poster-bill  { aspect-ratio: 0.54; }
.post-poster.poster-plate { aspect-ratio: 1.107; }
.poster-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* A hairline over the image edge so it reads as a pressed bill. */
.post-poster::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(15, 11, 8, 0.5);
}

/* Dead image link: the torn page, with a line on it. */
.post-torn {
  align-items: center;
  justify-content: center;
  aspect-ratio: 0.892;
  padding: 9% 8% 7% 17%;
  background-image: url('assets/paper-torn.png');
  box-shadow: none;
  filter: drop-shadow(2px 7px 10px rgba(0, 0, 0, 0.6));
}
.post-torn::before { left: 56%; }
.post-torn .torn-note {
  margin: 0;
  font-family: var(--font-hand);
  font-weight: 500;
  font-size: 16.5px;
  color: var(--paper-ink-soft);
  text-align: center;
}

/* Empty board */
.bare {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
}
.bare-line {
  margin: 0;
  font-family: var(--font-menu);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #dfe3e6;
  text-shadow: var(--outline);
}
.bare-hint {
  margin: 0;
  font-family: var(--font-book);
  font-size: 18px;
  color: var(--muted);
  text-shadow: var(--outline);
}

/* ============================== Overlays ============================== */

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.overlay-scrim {
  position: absolute;
  inset: 0;
  background: rgba(7, 9, 12, 0.78);
}

.sheet {
  position: relative;
  width: min(682px, calc(100vw - 48px));
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  padding: 55px 59px 33px;
  color: var(--paper-ink);
  border-radius: 1px;
  animation: sheet-up 160ms ease-out;
}
@keyframes sheet-up {
  from { transform: scale(0.72); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet { animation: none; }
  .post, .post:hover { transition: none; }
}

/* The zoomed letter is the same game paper at its TRUE aspect: the
   sheet's height is fixed, aspect-ratio derives the width, and long ink
   scrolls inside the paper instead of stretching it.

   PADDING IS PX, NEVER PERCENT, on the reader sheets: the sheet is a
   flex item of the fullscreen .overlay, so percent padding resolves
   against the OVERLAY's width (the whole viewport), not the sheet. The
   px values are the drawn-border insets of each texture at the sheet's
   working size (748px tall). The WALL CARDS keep percent padding: a
   card's containing block is its own masonry column, where percent
   means what it says. */
.reader-sheet {
  height: min(86vh, 748px);
  width: auto;
  max-height: none;
  overflow: visible;
  display: flex;
  flex-direction: column;
  aspect-ratio: 0.95;
  padding: 60px 64px 43px;
  background: url('assets/paper-note.png') no-repeat center / 100% 100%;
  filter: drop-shadow(0 22px 60px rgba(0, 0, 0, 0.85));
}
#readerLetter {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.reader-sheet .sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(47, 36, 24, 0.4) transparent;
}
.reader-sheet .sheet-body::-webkit-scrollbar { width: 7px; }
.reader-sheet .sheet-body::-webkit-scrollbar-thumb { background: rgba(47, 36, 24, 0.3); border-radius: 4px; }
.reader-sheet.paper-note   { padding: 60px 64px 43px; }
.reader-sheet.paper-edict, .reader-sheet.paper-decree {
  aspect-ratio: 0.945;
  background-image: url('assets/paper-decree.png');
  padding: 60px 67px 46px;
  box-shadow: none;
  filter: drop-shadow(0 0 2px rgba(216, 185, 119, 0.7)) drop-shadow(0 0 28px rgba(216, 185, 119, 0.35)) drop-shadow(0 22px 60px rgba(0, 0, 0, 0.85));
}
.reader-sheet.paper-fine   { aspect-ratio: 0.95; background-image: url('assets/paper-fine.png'); padding: 60px 60px 52px; }
.reader-sheet.paper-blood  { aspect-ratio: 0.95; background-image: url('assets/paper-blood.png'); padding: 60px 64px 43px; }
.reader-sheet.paper-torn   { aspect-ratio: 0.892; background-image: url('assets/paper-torn.png'); padding: 64px 58px 48px 116px; }

/* The close square floats OFF the paper, on the scrim: it never collides
   with the art. Inside the ink panels it sits in the corner. */
.sheet-close {
  position: absolute;
  top: -20px; right: -20px;
  z-index: 2;
}
.reader-sheet.is-poster .sheet-close, .compose-sheet .sheet-close {
  top: 14px; right: 14px;
}

.sheet-kicker {
  margin: 0 0 4px;
  font-family: var(--font-fell);
  font-style: italic;
  font-size: 16.5px;
  color: var(--rust);
}
.sheet-title {
  margin: 0 0 16px;
  font-family: var(--font-book);
  font-variant: small-caps;
  font-weight: 600;
  font-size: 28.5px;
  color: var(--paper-ink-hi);
}
.reader-sheet.paper-note .sheet-title,
.reader-sheet.paper-torn .sheet-title,
.reader-sheet.paper-blood .sheet-title {
  font-family: var(--font-hand);
  font-variant: normal;
  font-weight: 700;
  font-size: 35px;
}
.sheet-body {
  font-size: 21.5px;
  line-height: 1.55;
  white-space: pre-line;
}
.reader-sheet.paper-note .sheet-body,
.reader-sheet.paper-torn .sheet-body,
.reader-sheet.paper-blood .sheet-body {
  font-family: var(--font-hand);
  font-weight: 500;
  font-size: 26.5px;
  line-height: 1.32;
}
.sheet-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 26px;
  padding-top: 13px;
  border-top: 1px solid rgba(47, 36, 24, 0.3);
}
.sheet-foot .fade-line { margin-top: 0; font-size: 14.5px; }

/* A dead poster link reads as the torn page, in the reader too. */
.reader-torn {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 0.892;
  height: min(60vh, 520px);
  margin: 0 auto;
  background: url('assets/paper-torn.png') no-repeat center / 100% 100%;
}
.reader-torn p {
  margin: 0;
  padding-left: 12%;
  font-family: var(--font-hand);
  font-weight: 500;
  font-size: 26.5px;
  color: var(--paper-ink-soft);
}

/* Poster reader and the writing desk: the Prisma panel shell (dark
   glass, iron line, inner gold hairline). */
.reader-sheet.is-poster, .compose-sheet {
  width: min(858px, calc(100vw - 48px));
  height: auto;
  aspect-ratio: auto;
  min-height: 0;
  padding: 33px;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(26, 34, 43, 0.52), rgba(5, 7, 10, 0.94)),
    var(--surface);
  box-shadow:
    0 24px 72px var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 0 1px rgba(216, 185, 119, 0.1);
  filter: none;
}
.reader-sheet.is-poster .sheet-foot { border-top-color: var(--line); }
.reader-sheet.is-poster .fade-line {
  font-family: var(--font-book);
  font-style: normal;
  color: var(--muted);
}
.reader-image {
  display: block;
  width: 100%;
  max-height: 66vh;
  object-fit: contain;
  border: 1px solid rgba(154, 183, 214, 0.2);
  background: rgba(0, 0, 0, 0.3);
}
.reader-caption {
  margin: 12px 4px 0;
  font-family: var(--font-book);
  font-size: 17px;
  font-style: italic;
  color: var(--muted);
}

/* ============================== Compose ============================== */

.compose-sheet {
  width: min(700px, calc(100vw - 48px));
  padding: 30px 40px 26px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.compose-eyebrow {
  margin: 0 0 4px;
  font-family: var(--font-menu);
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: var(--outline);
}
.compose-heading {
  margin: 0 0 18px;
  padding-right: 60px;
  font-family: var(--font-menu);
  font-variant: normal;
  font-weight: 700;
  font-size: 30px;
  line-height: 1.04;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: var(--outline);
}

.kind-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.field { display: block; margin-bottom: 15px; }
.field-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  font-family: var(--font-menu);
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  color: var(--frost);
  text-shadow: var(--outline);
}
.count { font-style: normal; font-size: 14px; color: var(--muted); }
.count.is-over { color: var(--red); }

.text-input, .text-area {
  width: 100%;
  min-height: 44px;
  font-family: var(--font-book);
  font-size: 19px;
  color: var(--text);
  padding: 8px 10px;
  background: var(--sunken);
  border: 1px solid rgba(154, 183, 214, 0.28);
  border-radius: 1px;
  text-shadow: none;
}
.text-input::placeholder { color: var(--faint); }
.text-input:focus, .text-area:focus {
  outline: none;
  border-color: var(--line-strong);
}
.text-area { resize: vertical; min-height: 140px; line-height: 1.45; }

.budget {
  display: block;
  height: 3px;
  margin-top: 6px;
  background: rgba(154, 183, 214, 0.16);
  border-radius: 2px;
  overflow: hidden;
}
.budget-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--gold);
  transition: width 120ms ease;
}
.budget-fill.is-over { background: var(--red); }

/* Paper picker: the real papers at a size you can actually read
   (owner request 2026-09-02: the old 57px minis were unreadable). */
.swatches { display: flex; gap: 14px; flex-wrap: wrap; padding-bottom: 26px; }
.swatch {
  position: relative;
  width: 104px; height: 122px;
  border: 1px solid var(--line);
  border-radius: 1px;
  cursor: pointer;
  padding: 0;
  background: rgba(0, 0, 0, 0.3);
  transition: border-color 120ms, box-shadow 120ms;
}
.swatch:hover, .swatch:focus-visible { border-color: var(--line-strong); outline: none; }
.swatch.is-active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(216, 185, 119, 0.4), 0 0 18px rgba(216, 185, 119, 0.25);
}
.swatch-paper {
  position: absolute;
  inset: 3px;
  display: block;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  /* Minis show the flat texture only: no glow, no pin, no pseudo. */
  border: none !important;
  box-shadow: none !important;
  filter: none !important;
  padding: 0 !important;
}
.swatch-paper::before, .swatch-paper::after { content: none !important; }
.swatch-paper.paper-note   { background-image: url('assets/paper-note.png'); }
.swatch-paper.paper-edict  { background-image: url('assets/paper-decree.png'); }
.swatch-paper.paper-fine   { background-image: url('assets/paper-fine.png'); }
.swatch-paper.paper-blood  { background-image: url('assets/paper-blood.png'); }
/* The torn page sits INSIDE its square so the ripped edge shows. */
.swatch-paper.paper-torn {
  background-image: url('assets/paper-torn.png');
  background-size: contain;
  background-position: center;
}
.swatch-label {
  position: absolute;
  left: -8px; right: -8px; bottom: -20px;
  font-family: var(--font-menu);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  text-align: center;
  color: var(--muted);
  text-shadow: var(--outline);
}
.swatch.is-active .swatch-label { color: var(--text); }

/* Edict: jarldom leadership and staff only. board.js hides the row for
   everyone else (ctx.compose.canEdict). */
.edict-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 2px 0 16px;
  padding: 10px 12px;
  border: 1px solid var(--line-gold);
  border-left: 3px solid var(--gold);
  border-radius: 1px;
  background: linear-gradient(90deg, rgba(216, 185, 119, 0.12), transparent 70%), var(--row);
  cursor: pointer;
}
.edict-row input {
  width: 22px; height: 22px;
  margin: 2px 0 0;
  accent-color: var(--gold);
  cursor: pointer;
  flex: 0 0 auto;
}
.edict-row .edict-label {
  display: block;
  font-family: var(--font-menu);
  font-weight: 700;
  font-size: 17px;
  text-transform: uppercase;
  color: var(--text-warm);
  text-shadow: var(--outline);
}
.edict-row .edict-hint {
  display: block;
  margin-top: 2px;
  font-family: var(--font-book);
  font-size: 15px;
  line-height: 1.3;
  color: var(--muted);
}

.fee-line {
  margin: 4px 0 0;
  font-family: var(--font-book);
  font-size: 16px;
  color: var(--muted);
}

.compose-sheet .sheet-foot { border-top-color: var(--line); }

.status-line {
  font-family: var(--font-book);
  font-size: 16px;
  color: var(--muted);
  min-height: 1em;
}
.status-line.is-ok { color: var(--green); }
.status-line.is-err { color: var(--red); }

/* ============================== Mock bar ============================== */

.mock-bar {
  position: fixed;
  left: 12px; bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 30;
  opacity: 0.85;
}
.mock-tag {
  font-family: monospace;
  font-size: 12px;
  color: var(--muted);
  margin-right: 2px;
}
.mock-bar button {
  font-family: monospace;
  font-size: 12px;
  padding: 3px 8px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--line);
  border-radius: 1px;
  cursor: pointer;
}
.mock-bar button:hover { border-color: var(--line-strong); }

/* Narrow windows: the masthead stacks, the wall tightens. */
@media (max-width: 760px) {
  .rail { flex-wrap: wrap; min-height: 0; }
  .rail-name { font-size: 32px; }
  .rail-actions { width: 100%; justify-content: flex-end; }
  .wall { padding: 22px 18px 36px; }
  body.is-hosted .board { inset: 3% 2.5%; }
}
