/* kalasource.com: one stylesheet, no build step.
   Built on the umbramancy engine's layout; the look is the old Kala portal's:
   a notice board of parchment by day, and by candlelight at night.
   Type (all SIL Open Font Licence, served from this site):
     Pirata One      the site title and page titles
     Grenze Gotisch  headings
     Alegreya        body text
     Caveat          handwriting: notes, captions, quotes, rumours */

@font-face {
  font-family: 'Alegreya';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/Alegreya-400-italic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Alegreya';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/Alegreya-400-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/Alegreya-400-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/Alegreya-400-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/Alegreya-500-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/Alegreya-500-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/Alegreya-700-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/Alegreya-700-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/Caveat-600-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/Caveat-600-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/Caveat-700-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/Caveat-700-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Grenze Gotisch';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/GrenzeGotisch-400-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Grenze Gotisch';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/GrenzeGotisch-400-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Grenze Gotisch';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/GrenzeGotisch-600-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Grenze Gotisch';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/GrenzeGotisch-600-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Grenze Gotisch';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../fonts/GrenzeGotisch-800-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Grenze Gotisch';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../fonts/GrenzeGotisch-800-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Pirata One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/PirataOne-400-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Pirata One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/PirataOne-400-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Colours: day (parchment) and candlelight ---------- */
:root {
  --paper: #f6ecd4;
  --paper-2: #efe2c3;
  --paper-3: #e7d5ab;
  --line: #cdb88c;
  --text: #3a2d1a;
  --heading: #2b2016;
  --muted: #5c4a2e;
  --accent: #7a3b1e;
  --accent-hi: #96491f;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --on-accent: #fbf3df;
  --hand: #7a3b1e;
  --wood: #4a3221;
  --wood-2: #33220f;
  --gm: #5e3a86;
  --bad: #a3341f;
  --sea: #e6dcc8;
  --shadow: rgb(60 40 15 / 0.18);
  --img-filter: none;
  --pin-red: #a3341f; --pin-blue: #2d4a86; --pin-green: #3f6d33; --pin-gold: #96700f;
  --pin-violet: #5e3a86; --pin-rust: #7a3b1e; --pin-iron: #5d5140;
  --title: "Pirata One", "Grenze Gotisch", Georgia, serif;
  --display: "Grenze Gotisch", Georgia, serif;
  --body: "Alegreya", Georgia, "Times New Roman", serif;
  --handwriting: "Caveat", "Segoe Print", cursive;
  --wrap: 72.5rem;
  --gutter: 2rem;
}
html[data-theme="candle"], html[data-page-theme="candle"] {
  color-scheme: dark;
  --paper: #2a1d0f;
  --paper-2: #33240f;
  --paper-3: #3f2d16;
  --line: #5a4428;
  --text: #e4d3ac;
  --heading: #f2ddae;
  --muted: #a98f66;
  --accent: #c96f2e;
  --accent-hi: #e08a45;
  --on-accent: #1f1408;
  --hand: #c98d4b;
  --wood: #1c130a;
  --wood-2: #140d06;
  --gm: #b48fd6;
  --bad: #e06248;
  --sea: #3a2e1e;
  --shadow: rgb(0 0 0 / 0.4);
  --img-filter: brightness(0.84) saturate(0.92);
  --pin-red: #e06248; --pin-blue: #7f9fd6; --pin-green: #8fbf74; --pin-gold: #e0b148;
  --pin-violet: #b48fd6; --pin-rust: #d98a5a; --pin-iron: #c8c2b2;
}
/* A page that is meant to be read by day stays by day. */
html[data-page-theme="day"] {
  color-scheme: light;
  --paper: #f6ecd4; --paper-2: #efe2c3; --paper-3: #e7d5ab; --line: #cdb88c; --text: #3a2d1a; --heading: #2b2016;
  --muted: #5c4a2e; --accent: #7a3b1e; --accent-hi: #96491f; --on-accent: #fbf3df; --hand: #7a3b1e; --wood: #4a3221;
  --wood-2: #33220f; --gm: #5e3a86; --bad: #a3341f; --sea: #e6dcc8; --shadow: rgb(60 40 15 / 0.18); --img-filter: none;
  --pin-red: #a3341f; --pin-blue: #2d4a86; --pin-green: #3f6d33; --pin-gold: #96700f; --pin-violet: #5e3a86; --pin-rust: #7a3b1e; --pin-iron: #5d5140;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--gm); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
body.wide { --wrap: 82.5rem; }
@media (max-width: 46rem) { :root { --gutter: 1.25rem; } }
/* Page head for inner pages */
.page-head { padding: clamp(2.5rem, 7vw, 4.5rem) 0 1.5rem; border-bottom: 1px solid var(--line); }
.page-head p { color: var(--muted); font-size: 1.1rem; }

section.block { padding: 2.75rem 0; border-bottom: 1px solid var(--line); }
section.block:last-of-type { border-bottom: 0; }

.panel { background: var(--paper-2); border: 1px solid var(--line); border-radius: 4px; padding: 1.4rem; }
.field { display: block; margin-bottom: 1.1rem; }
.field span { display: block; font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.35rem; }
.field input { width: 100%; background: var(--paper); color: var(--text); border: 1px solid var(--line); border-radius: 4px; padding: 0.6rem 0.75rem; font: 600 1.4rem var(--body); }
.field input:focus { border-color: var(--accent); outline: none; }
.btn { width: 100%; background: var(--accent); color: var(--on-accent); border: 0; border-radius: 4px; padding: 0.85rem 1rem; font: 700 1.15rem var(--display); letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; }
.btn:hover { background: var(--accent-hi); }
.plain-list { padding-left: 1.2rem; max-width: 65ch; }
.plain-list li { margin-bottom: 0.5rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
/* ---------- Rendered page text ---------- */
.prose > :last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.2rem; max-width: 65ch; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4rem; }
.prose h3 { margin-top: 1.6em; color: var(--accent); }
.prose h4 { font: 700 0.85rem var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin: 1.4em 0 0.5em; }
.prose blockquote { margin: 0 0 1em; border: 1px dashed var(--line); border-radius: 4px; padding: 1rem 1.2rem; color: var(--muted); max-width: 65ch; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
.prose code, .admin code { background: var(--paper-3); padding: 0.1em 0.35em; border-radius: 3px; font-family: ui-monospace, Menlo, monospace; font-size: 0.9em; }
.prose img { border-radius: 4px; display: block; margin: 0 0 1em; }
.table-scroll { overflow-x: auto; margin: 0 0 1em; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.55rem 0.9rem 0.55rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 600; white-space: nowrap; }
.crumb { font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; margin: 0 0 1rem; }
.crumb a { color: var(--muted); }

/* ---------- GM-only markers ---------- */
.gm-only { border: 1px solid var(--gm); border-radius: 4px; background: color-mix(in srgb, var(--gm) 8%, transparent); padding: 1rem 1.2rem; margin: 0 0 1em; max-width: 65ch; }
.gm-only > :last-child { margin-bottom: 0; }
.gm-flag { color: var(--gm) !important; font-size: 0.75rem !important; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700; margin: 0 0 0.6rem; }
.page-head .gm-flag { margin-top: 1rem; }
.gm-dot { font: 700 0.65rem var(--body); letter-spacing: 0.12em; color: var(--gm); border: 1px solid var(--gm); border-radius: 3px; padding: 0.05rem 0.3rem; vertical-align: middle; text-transform: uppercase; white-space: nowrap; }
.gm-bar { background: color-mix(in srgb, var(--gm) 13%, transparent); border-bottom: 1px solid var(--gm); font-size: 0.8rem; }
.gm-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.5rem; padding-top: 0.45rem; padding-bottom: 0.45rem; }
.gm-bar span { color: var(--gm); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-right: auto; }
.gm-bar a { color: var(--text); }
.gm-bar form { margin: 0; }
.gm-bar button { background: none; border: 0; padding: 0; color: var(--text); font: inherit; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }

/* ---------- Admin ---------- */
.admin { padding: 2.5rem 0 4rem; }
.admin h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.admin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.admin-head h1, .admin-head p { margin: 0; }
.admin-links { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; margin-top: 1.75rem; font-size: 0.95rem; }
.form-narrow { max-width: 26rem; }
.notice { border: 1px solid var(--accent); background: var(--accent-soft); border-radius: 4px; padding: 0.75rem 1rem; max-width: none; }
.notice.bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.notice ul { margin: 0; padding-left: 1.2rem; }
.btn-inline { display: inline-block; width: auto; padding: 0.6rem 1.1rem; font-size: 0.95rem; text-decoration: none; color: var(--on-accent); }
.btn-inline:hover { color: var(--on-accent); }
.btn-ghost { background: none; border: 1px solid var(--line); color: var(--text); margin-top: 0.6rem; }
.btn-ghost:hover { background: var(--paper-3); }
.btn:disabled { opacity: 0.5; cursor: default; }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 2rem; align-items: start; }
@media (max-width: 56rem) { .editor { grid-template-columns: 1fr; } }
.editor .field input:not([type]), .editor .field input[type="text"] { font: 400 1.05rem var(--body); }
.field textarea { width: 100%; background: var(--paper); color: var(--text); border: 1px solid var(--line); border-radius: 4px; padding: 0.8rem 0.9rem; font: 400 0.95rem/1.6 ui-monospace, "SF Mono", Menlo, monospace; resize: vertical; min-height: 20rem; }
.field textarea:focus { border-color: var(--accent); outline: none; }
fieldset.field { border: 0; padding: 0; margin: 0 0 1.1rem; }
.check { display: block; margin: 0.35rem 0; font-size: 0.95rem; }
.check input { accent-color: var(--accent); margin-right: 0.4rem; }
.field input.small { display: inline-block; width: 4.5rem; font: 400 1rem var(--body); padding: 0.3rem 0.5rem; }
.help { margin-top: 1.5rem; font-size: 0.85rem; color: var(--muted); }
.help summary, .version summary { cursor: pointer; color: var(--text); }
.help pre, .version pre { white-space: pre-wrap; background: var(--paper-2); border: 1px solid var(--line); border-radius: 4px; padding: 0.9rem; font: 400 0.8rem/1.55 ui-monospace, Menlo, monospace; overflow-x: auto; }
.version { border-top: 1px solid var(--line); padding: 0.8rem 0; }
.preview { margin-top: 2.5rem; border: 1px dashed var(--line); border-radius: 4px; padding-top: 1.25rem; }
.preview > .kicker { padding: 0 1.25rem; }
.danger { margin-top: 2.5rem; }
.link-danger { background: none; border: 0; padding: 0; color: var(--bad); font: inherit; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }

.page-head p.kicker { color: var(--accent); font-size: 0.8rem; }

.cat-filters { display: flex; flex-wrap: wrap; gap: 0 1.5rem; align-items: flex-end; }
.cat-filter { flex: 1 1 16rem; max-width: 24rem; margin-bottom: 2rem; }
.cat-filter select { font: 400 1.05rem var(--body); min-height: 2.75rem; width: 100%; background: var(--paper); color: var(--text); border: 1px solid var(--line); border-radius: 4px; padding: 0.6rem 0.75rem; }
.cat-filter select:focus { border-color: var(--accent); outline: none; }
.cat-filter input { font: 400 1.05rem var(--body); }
.new-dot { font: 700 0.65rem var(--body); letter-spacing: 0.1em; color: var(--accent); border: 1px solid var(--accent); border-radius: 3px; padding: 0.05rem 0.3rem; vertical-align: middle; }
.edit-link { font-size: 0.75rem; font-weight: 400; color: var(--gm); margin-left: 0.4rem; }
[hidden] { display: none !important; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 0 1rem; }
.stat-grid .field input { font: 400 1.05rem var(--body); }
.field textarea.short { min-height: 0; font: 400 1rem/1.5 var(--body); }
pre.headings { white-space: pre-wrap; background: var(--paper-2); border: 1px solid var(--line); border-radius: 4px; padding: 0.9rem; font: 400 0.8rem/1.55 ui-monospace, Menlo, monospace; }
.field input[type="file"] { font: 400 0.95rem var(--body); padding: 0.5rem; }
.copy-box { width: 100%; background: var(--paper); color: var(--text); border: 1px solid var(--line); border-radius: 4px; padding: 0.55rem 0.7rem; font: 400 0.85rem ui-monospace, Menlo, monospace; }
.row-actions { display: flex; gap: 1.25rem; white-space: nowrap; }
.row-actions form { margin: 0; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.add-player { margin-top: 2rem; }
.cg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0 1.25rem; }
.cg-small { font-size: 0.82rem; }
.art-credit { margin-top: 2.5rem; font-size: 0.8rem; color: var(--muted); max-width: 80ch; }
.files-folder { color: var(--accent); margin-top: 2rem; }
.file-edit summary { cursor: pointer; }
.files-share { margin: 0 0 0.6rem; }
.file-edit .check { display: block; margin: 0 0 0.8rem; }
.file-edit form { margin-top: 0.6rem; max-width: 20rem; }
.file-edit .field input { font: 400 0.95rem var(--body); padding: 0.4rem 0.6rem; }
/* ---------- Map ---------- */
.map-canvas { width: 100%; height: min(70vh, 40rem); min-height: 22rem; border: 1px solid var(--line); border-radius: 4px; background: var(--paper-2); }
.pin { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 2px solid var(--on-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 33%, transparent), 0 0 12px 2px color-mix(in srgb, var(--accent) 53%, transparent); cursor: pointer; }
.pin-players { background: #5fd3c0; box-shadow: 0 0 0 2px #5fd3c055, 0 0 12px 2px #5fd3c088; }
.pin-gm { background: var(--gm); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gm) 33%, transparent), 0 0 12px 2px color-mix(in srgb, var(--gm) 53%, transparent); opacity: 0.85; }
.pin-draft { background: transparent; border: 2px dashed var(--text); box-shadow: none; width: 20px; height: 20px; cursor: grab; }
.maplibregl-popup-content { background: var(--paper-2) !important; color: var(--text); border: 1px solid var(--line); border-radius: 4px !important; font: 400 0.9rem/1.45 var(--body); padding: 0.8rem 0.9rem !important; }
.maplibregl-popup-tip { border-top-color: var(--paper-2) !important; border-bottom-color: var(--paper-2) !important; }
.maplibregl-popup-close-button { color: var(--muted); font-size: 1.1rem; }
.place-pop strong { font-family: var(--display); letter-spacing: 0.05em; text-transform: uppercase; display: block; }
.place-pop p { margin: 0.35rem 0; }
.place-pop-kind { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.place-list { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.place-search { margin-top: 1.75rem; max-width: 30rem; }
.place-search .field { margin-bottom: 0.4rem; }
.place-search .field input { font: 400 1.05rem var(--body); }
.place-search p { margin: 0; min-height: 1.4em; }
.place-list li { margin-bottom: 0.45rem; break-inside: avoid; }
.place-list .link-btn { font-weight: 600; }
.inline-form { display: inline; margin-left: 0.5rem; }
.place-form { max-width: 46rem; }
.place-form .field input:not([type="radio"]) { font: 400 1rem var(--body); }

/* Regions on the map */
.region-swatch { display: inline-block; width: 0.75em; height: 0.75em; border-radius: 2px; margin-right: 0.45em; vertical-align: baseline; }
.region-label { font: 700 0.72rem var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: #f3ead8; text-shadow: 0 0 3px #000, 0 0 6px #000, 0 1px 1px #000; pointer-events: none; white-space: nowrap; text-align: center; opacity: 0.9; }
.region-label-gm { opacity: 0.55; font-style: italic; }
.map-canvas.labels-off .region-label { display: none; }
.region-row { border-top: 1px solid var(--line); padding: 0.55rem 0; }
.region-row summary { cursor: pointer; font-weight: 600; }
.region-row .panel { margin-top: 0.6rem; }
.map-canvas:fullscreen { border: 0; border-radius: 0; }
.map-canvas:fullscreen .region-label { font-size: 0.85rem; }

/* Outline editor on the map (GM) */
.map-edit-bar { position: absolute; top: 10px; left: 10px; right: 56px; z-index: 3; display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; padding: 0.4rem 0.5rem; background: #0e1018e6; border: 1px solid var(--line); border-radius: 4px; font: 0.8rem var(--body); color: var(--text); }
.map-edit-bar select, .map-edit-bar button { font: inherit; color: var(--text); background: #1b1f2c; border: 1px solid var(--line); border-radius: 3px; padding: 0.25rem 0.5rem; cursor: pointer; max-width: 15rem; }
.map-edit-bar button:disabled { opacity: 0.4; cursor: default; }
.map-edit-bar .map-edit-save:not(:disabled) { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 700; }
.map-edit-bar:not(.is-editing) .map-edit-check, .map-edit-bar:not(.is-editing) button:not(:first-of-type) { display: none; }
.map-edit-check { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
.map-edit-status { flex: 1 1 12rem; color: var(--muted); }
.map-canvas.is-editing .region-label, .map-canvas.is-editing .pin { opacity: 0.35; pointer-events: none; }

/* Sign in and player email */
.email-form { display: flex; gap: 0.5rem; align-items: center; }
.email-form input { background: var(--paper); color: var(--text); border: 1px solid var(--line); border-radius: 3px; padding: 0.3rem 0.5rem; font: inherit; min-width: 12rem; }
.signin-out { margin-top: 1rem; }

/* ---------- Header: one row, two dropdowns, a menu button on phones ---------- */
.site-head { position: relative; z-index: 20; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 90%, transparent); }
.site-head .wrap { display: flex; align-items: center; gap: clamp(1rem, 2.3vw, 2rem); min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: 0.625rem; color: var(--text); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.12em; text-transform: uppercase; min-height: 2.75rem; }
.brand:hover { color: var(--text); }
.brand-mark { width: 1.125rem; height: 1.125rem; border-radius: 50%; background: var(--wood); box-shadow: 0 0 0 2px var(--accent), 0 0 10px var(--accent); flex: none; }
.nav-search { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; min-height: 2.75rem; color: var(--muted); font-size: 0.85rem; text-decoration: none; }
.nav-search:hover, .nav-search[aria-current] { color: var(--accent); }
.site-nav { display: flex; flex: 1; flex-wrap: wrap; min-width: 0; align-items: center; gap: 0 1.75rem; }
.nav-top { display: inline-flex; align-items: center; gap: 0.375rem; min-height: 2.75rem; padding: 0; background: none; border: 0; border-radius: 0; cursor: pointer; color: var(--muted); text-decoration: none; font: 400 0.75rem var(--body); letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; box-shadow: inset 0 -2px 0 transparent; }
.nav-top:hover, .nav-top[aria-expanded="true"] { color: var(--text); }
.nav-top.is-current, .nav-top[aria-current] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.nav-group { position: relative; }
.nav-menu { display: none; position: absolute; top: calc(100% + 0.625rem); left: -0.75rem; width: 21rem; padding: 0.5rem; background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 0.75rem 2rem rgb(0 0 0 / 0.35); }
.nav-group.open .nav-menu, html:not(.js) .nav-group:hover .nav-menu, html:not(.js) .nav-group:focus-within .nav-menu { display: block; }
.nav-menu a, .in-group a { display: flex; flex-direction: column; gap: 0.125rem; padding: 0.625rem 0.75rem; border-radius: 6px; color: var(--text); text-decoration: none; font-size: 0.9375rem; line-height: 1.4; }
.nav-menu a strong, .in-group a strong { font-weight: 400; }
.nav-menu a span:not(.gm-dot), .in-group a span:not(.gm-dot) { font-size: 0.8125rem; color: var(--muted); }
.nav-menu a:hover, .in-group a:hover, .nav-menu a[aria-current], .in-group a[aria-current] { background: var(--paper-3); }
.nav-menu a[aria-current] strong, .in-group a[aria-current] strong { color: var(--accent); }
.nav-signin { margin-left: auto; display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 1rem; border: 1px solid var(--line); border-radius: 6px; color: var(--text); text-decoration: none; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; }
.nav-signin:hover, .nav-signin[aria-current] { border-color: var(--accent); color: var(--text); }
.nav-toggle { display: none; margin-left: auto; width: 2.75rem; height: 2.75rem; align-items: center; justify-content: center; padding: 0; background: none; border: 1px solid var(--line); border-radius: 6px; color: var(--text); cursor: pointer; }
@media (max-width: 60rem) {
  .site-head .wrap { flex-wrap: wrap; gap: 0; min-height: 3.75rem; }
  .brand { font-size: 1.125rem; }
  .nav-search { margin-left: auto; min-width: 2.75rem; }
  .nav-search span { display: none; }
  .nav-toggle { display: inline-flex; margin-left: 0.25rem; }
  html:not(.js) .nav-toggle { display: none; }
  .site-nav { display: none; flex: 1 1 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 0.25rem 0 1.25rem; border-top: 1px solid var(--line); }
  .site-nav.open, html:not(.js) .site-nav { display: flex; }
  .nav-top { min-height: 2.75rem; box-shadow: none; font-size: 0.8125rem; }
  .nav-top.is-current, .nav-top[aria-current] { box-shadow: none; color: var(--accent); }
  .nav-group > .nav-top { pointer-events: none; min-height: 2.25rem; margin-top: 0.75rem; font-size: 0.6875rem; letter-spacing: 0.18em; color: var(--muted); }
  .nav-group > .nav-top svg { display: none; }
  .nav-group .nav-menu { display: block; position: static; width: auto; padding: 0; background: none; border: 0; box-shadow: none; }
  .nav-menu a { padding: 0.625rem 0; min-height: 2.75rem; justify-content: center; }
  .nav-group + .nav-top { margin-top: 0.75rem; border-top: 1px solid var(--line); padding-top: 0.5rem; }
  .nav-signin { margin: 0.75rem 0 0; justify-content: center; min-height: 2.75rem; }
}

/* ---------- Site search ---------- */
.search-head { padding-block: clamp(1.3rem, 4vw, 2.5rem) 1rem; }
.search-head p { margin-bottom: 0; }
.site-search { max-width: 48rem; }
.site-search-form { display: flex; align-items: flex-end; gap: 0.65rem; margin-bottom: 1.4rem; }
.site-search-form .field { flex: 1; min-width: 0; margin: 0; }
.site-search-form input, .site-search-form .btn { min-height: 2.75rem; }
.site-search-form input { font: 400 1rem var(--body); }
.site-search-form input:focus-visible { outline: 2px solid var(--gm); outline-offset: 2px; }
.site-search-form .btn { flex: none; width: auto; padding: 0.6rem 0.9rem; font-size: 0.95rem; }
.search-scopes, .search-pages { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.25rem; }
.search-scopes { border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.search-scopes a, .search-pages a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.search-scopes a { color: var(--muted); text-decoration: none; }
.search-scopes a:hover, .search-scopes [aria-current] { color: var(--text); }
.search-scopes [aria-current] { box-shadow: inset 0 -2px var(--accent); }
.search-count, .search-kind, .search-snippet, .search-pages span { color: var(--muted); }
.search-count, .search-kind, .search-pages span { font-size: 0.85rem; }
.search-results { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.search-results li { border-top: 1px solid var(--line); padding: 0.85rem 0; overflow-wrap: anywhere; }
.search-kind { margin-bottom: 0.3rem; }
.search-results h2 { font-size: 1.25rem; text-transform: none; letter-spacing: 0; margin-bottom: 0.35rem; text-wrap: wrap; }
.search-snippet { margin: 0; }

/* ---------- Home: hero, campaign strip, section index ---------- */
.hero { position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: url("../img/bg-hero.jpg") center / cover no-repeat; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.hero-in { position: relative; display: flex; align-items: center; gap: 3rem; padding-top: 4.5rem; padding-bottom: 3.5rem; }
.hero-text { flex: 1; min-width: 0; position: relative; z-index: 1; }
.hero .kicker { font-size: 0.75rem; letter-spacing: 0.18em; margin: 0 0 1.25rem; }
.hero h1 { font-size: clamp(2.375rem, 1.45rem + 3.6vw, 3.75rem); margin: 0 0 1.25rem; }
.hero .lede { font-size: 1.125rem; line-height: 1.6; max-width: 35rem; margin: 0 0 1.25rem; }
.hero .dim { font-size: 0.875rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 0; max-width: none; }
.cta { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0 1.25rem; border: 1px solid var(--accent); border-radius: 6px; background: var(--accent); color: var(--on-accent); font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.cta:hover { background: var(--accent-hi); border-color: var(--accent-hi); color: var(--on-accent); }
.cta-ghost { background: none; border-color: var(--line); color: var(--text); font-weight: 400; }
.cta-ghost:hover { background: var(--paper-2); border-color: var(--muted); color: var(--text); }
@media (max-width: 46rem) {
  .hero-in { display: block; padding-top: 2.25rem; padding-bottom: 1.75rem; }
  .hero h1 { max-width: 18.75rem; }
  .hero .lede { font-size: 1rem; }
  .cta { flex: 1 1 100%; min-height: 3rem; font-size: 0.9375rem; }
}
.eyebrow { margin: 0 0 0.375rem; max-width: none; font-size: 0.6875rem; line-height: 1.5; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gm); }
.strip { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; padding: 1.5rem 1.75rem; background: color-mix(in srgb, var(--paper-2) 90%, transparent); border: 1px solid var(--line); border-radius: 10px; }
.strip-last { flex: 999 1 26rem; min-width: 0; }
.strip p { max-width: none; }
.strip-title { margin: 0 0 0.375rem; font-family: var(--display); font-size: 1.375rem; line-height: 1.2; }
.strip-title a { color: var(--text); text-decoration: none; }
.strip-title a:hover { color: var(--accent-hi); }
.strip-line { margin: 0; font-size: 0.875rem; line-height: 1.5; color: var(--muted); }
.strip-all { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: 0.875rem; text-decoration: none; }
.index { display: grid; grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr)); gap: 2.5rem; padding-top: 4rem; padding-bottom: 4.5rem; }
.index-col { display: flex; flex-direction: column; min-width: 0; }
.index-col h2 { margin: 0 0 0.75rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--accent); font-size: 1.5rem; font-weight: 400; letter-spacing: 0.06em; }
.index-row { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.875rem 0.625rem; border-bottom: 1px solid var(--line); text-decoration: none; }
.index-row:hover { background: var(--paper-2); }
.index-t { font-family: var(--display); font-size: 1.0625rem; line-height: 1.3; color: var(--accent); }
.index-row:hover .index-t { color: var(--accent-hi); }
.index-d { font-size: 0.875rem; line-height: 1.45; color: var(--muted); }
@media (max-width: 46rem) {
  .index { gap: 2rem; padding-top: 2.25rem; padding-bottom: 2.5rem; }
  .index-col h2 { font-size: 1.25rem; padding-bottom: 0.625rem; margin-bottom: 0.25rem; }
  .index-row { padding: 0.75rem 0; }
  .strip { padding: 1.125rem; }
}

/* ---------- Footer: legal line left, colours right ---------- */
.site-foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.8125rem; line-height: 1.6; }
.site-foot .wrap { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1.5rem; padding-top: 1.75rem; padding-bottom: 2.25rem; }
.site-foot p { order: 1; flex: 999 1 30rem; min-width: 0; max-width: 54rem; margin: 0; }
.theme-pick { order: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.theme-pick span { margin-right: 0.25rem; font-size: 0.6875rem; letter-spacing: 0.18em; text-transform: uppercase; }
.theme-pick button { min-height: 2rem; padding: 0 0.75rem; background: none; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font: inherit; cursor: pointer; }
.theme-pick button:hover { color: var(--text); border-color: var(--muted); }
.theme-pick button[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
@media (max-width: 46rem), (pointer: coarse) { .theme-pick button { min-height: 2.75rem; } }
@media (max-width: 46rem) {
  .site-foot .wrap { flex-direction: column; gap: 1rem; padding-top: 1.5rem; padding-bottom: 1.5rem; }
  .site-foot p { order: 2; flex: none; font-size: 0.75rem; }
  .theme-pick { order: 1; }
  .theme-pick span { width: 100%; }
}

/* ---------- Inner pages: title block, list of sections, sections as cards ---------- */
.page-top { border-bottom: 1px solid var(--line); }
.page-top .wrap { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 2rem 3rem; padding-top: 3rem; padding-bottom: 2.5rem; }
.page-top-text { flex: 999 1 35rem; min-width: 0; }
.page-top h1 { margin: 0 0 0.875rem; line-height: 1.05; }
.page-top .kicker { margin: 0 0 0.875rem; font-size: 0.75rem; letter-spacing: 0.18em; }
.crumbs { margin: 0 0 0.875rem; max-width: none; font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { color: var(--accent); }
.lead { margin: 0; max-width: 45rem; font-size: 1.125rem; line-height: 1.6; }
.in-group { flex: 1 1 20rem; max-width: 23.75rem; padding: 1rem; background: color-mix(in srgb, var(--paper-2) 90%, transparent); border: 1px solid var(--line); border-radius: 10px; }
.in-group .eyebrow { margin: 0 0 0.5rem 0.75rem; color: var(--muted); }
.page-body { display: flex; align-items: flex-start; gap: 2.5rem; padding-top: 2.5rem; padding-bottom: 3.5rem; }
.toc { flex: 0 0 12.5rem; position: sticky; top: 1.5rem; max-height: calc(100vh - 3rem); overflow-y: auto; }
.toc summary { list-style: none; margin: 0 0 0.75rem; font-size: 0.6875rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.toc summary::-webkit-details-marker { display: none; }
.toc a { display: block; padding: 0.5rem 0.75rem; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; font-size: 0.875rem; line-height: 1.4; }
.toc a:hover { color: var(--text); border-left-color: var(--muted); }
.toc a[aria-current] { color: var(--text); border-left-color: var(--accent); }
.page-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1.5rem; }
.sec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr)); gap: 1.5rem; }
.sec { min-width: 0; padding: 1.5rem; background: color-mix(in srgb, var(--paper-2) 90%, transparent); border: 1px solid var(--line); border-radius: 10px; scroll-margin-top: 1rem; }
.sec h2, .sec-pending h2 { margin: 0 0 0.875rem; font-size: 1.375rem; font-weight: 400; letter-spacing: 0.04em; line-height: 1.15; }
.sec .prose, .sec-intro .prose { font-size: 0.9375rem; line-height: 1.7; }
.sec .prose p, .sec-intro .prose p { margin-bottom: 0.75rem; }
.sec .prose table { font-size: 0.875rem; }
.sec-cols .prose { columns: 2 24rem; column-gap: 2.5rem; }
.sec-cols .prose > * { break-inside: avoid; }
.sec-cols .prose > ul, .sec-cols .prose > ol { break-inside: auto; max-width: none; }
.sec-cols .prose li { break-inside: avoid; }
.sec-cols .prose h3:first-child { margin-top: 0; }
.sec-group { background: none; }
.sec-group > h2 { margin-bottom: 1.125rem; }
.sec-sub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16.25rem, 1fr)); gap: 1rem; }
.sec-sub { min-width: 0; padding: 1.25rem; background: color-mix(in srgb, var(--paper-2) 90%, transparent); border: 1px solid var(--line); border-radius: 8px; scroll-margin-top: 1rem; }
.sec-sub h3 { margin: 0 0 0.5rem; font-size: 1.125rem; font-weight: 400; letter-spacing: 0.04em; color: var(--accent); }
.sec-pending { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.5rem; padding: 1.25rem 1.5rem; border: 1px dashed var(--line); border-radius: 10px; scroll-margin-top: 1rem; }
.sec-pending .eyebrow, .sec-pending h2 { margin: 0; }
.sec-pending .note { margin: 0; font-size: 0.875rem; color: var(--muted); }
.kids { margin-top: 0.5rem; }
.page-next { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.page-next a { display: flex; flex-direction: column; gap: 0.25rem; min-height: 2.75rem; color: var(--text); text-decoration: none; }
.page-next a > span:first-child { font-size: 0.6875rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.page-next a > span:last-child { font-family: var(--display); font-size: 1.0625rem; }
.page-next a:hover > span:last-child { color: var(--accent-hi); }
.page-next .next { align-items: flex-end; margin-left: auto; text-align: right; }
.page-next .next > span:last-child { color: var(--accent); }
@media (max-width: 62rem) {
  .in-group { flex-basis: 100%; max-width: none; }
  .in-group nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
}
@media (max-width: 56rem) {
  .page-top .wrap { padding-top: 2rem; padding-bottom: 1.75rem; }
  .page-body { display: block; padding-top: 1.5rem; padding-bottom: 2.5rem; }
  .toc { position: static; max-height: none; margin: 0 0 1.5rem; padding: 0 1rem; border: 1px solid var(--line); border-radius: 10px; }
  .toc summary { display: flex; align-items: center; justify-content: space-between; min-height: 2.75rem; margin: 0; cursor: pointer; }
  html.js .toc summary::after { content: ""; width: 0.45rem; height: 0.45rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin-right: 0.25rem; }
  html.js .toc[open] summary::after { transform: rotate(-135deg); }
  .toc nav { padding-bottom: 0.75rem; }
  .toc a { padding: 0.75rem; }
  .sec { padding: 1.125rem; }
  .sec-pending { padding: 1rem 1.125rem; }
}

/* ---------- Links that leave the site ---------- */
a.ext { color: var(--muted); font-size: 0.875em; text-decoration-color: var(--line); white-space: nowrap; }
a.ext:hover { color: var(--text); text-decoration-color: currentColor; }
a.ext::after { content: ""; display: inline-block; width: 0.7em; height: 0.7em; margin-left: 0.3em; background: currentColor; -webkit-mask: url("../img/ext.svg") center / contain no-repeat; mask: url("../img/ext.svg") center / contain no-repeat; }

/* ---------- Map: flat view and printed sheet ---------- */
.map-tools { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; align-items: center; margin-top: 0.8rem; font-size: 0.9rem; }
.map-tools[hidden] { display: none; }
.map-tools-print { display: inline-flex; flex-wrap: wrap; gap: 0.5rem 0.7rem; align-items: center; }
.map-tools select { font: inherit; color: var(--text); background: var(--paper-2); border: 1px solid var(--line); border-radius: 4px; padding: 0.4rem 0.5rem; }
.map-tools input { accent-color: var(--accent); }
html.map-printing { overflow: hidden; }
#map-out { display: none; }
.map-canvas:fullscreen { width: 100% !important; height: 100% !important; }
@media print {
  html.has-sheet body > *:not(#map-out) { display: none !important; }
  html.has-sheet #map-out { display: block; }
  html.has-sheet, html.has-sheet body { margin: 0; padding: 0; min-height: 0; }
  .map-page { break-inside: avoid; break-after: page; }
  .map-page:last-child { break-after: auto; }
  .map-page img { display: block; width: 100%; height: auto; }
}
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.6rem; }
.chip { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.25rem; padding: 0.2rem 0.75rem; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--paper-2) 80%, transparent); color: var(--text); font: 500 0.9rem var(--body); text-decoration: none; cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip[aria-current], .chip[aria-pressed="true"] { border-color: var(--accent); }
.chip[aria-pressed="false"] { opacity: 0.45; }
.chip-dot { width: 0.75rem; height: 0.75rem; border-radius: 50%; border: 1px solid var(--paper); }
.chip-select select { min-height: 2.25rem; padding: 0.2rem 0.75rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper-2); color: var(--text); font: 500 0.9rem var(--body); }
/* ====================================================================
   Kala: the notice board look, laid over the engine's layout above.
   ==================================================================== */

/* ---------- Paper, type and links ---------- */
body {
  background: var(--paper);
  color: var(--text);
  font: 400 1.125rem/1.65 var(--body);
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 0%, transparent 55%, color-mix(in srgb, var(--wood) 14%, transparent) 100%),
    radial-gradient(circle at 20% 30%, color-mix(in srgb, var(--paper-3) 40%, transparent), transparent 40%),
    radial-gradient(circle at 80% 70%, color-mix(in srgb, var(--paper-3) 35%, transparent), transparent 45%);
}
a { color: var(--accent); }
a:hover { color: var(--heading); }
:focus-visible { outline-color: var(--accent); }
img { filter: var(--img-filter); }

h1, h2, h3 { font-family: var(--display); text-transform: none; letter-spacing: 0.01em; line-height: 1.1; color: var(--heading); font-weight: 600; }
h1 { font-family: var(--title); font-weight: 400; font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4rem); letter-spacing: 0.01em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.3rem; letter-spacing: 0.02em; }
.kicker, .eyebrow, .crumbs, .crumb, .field span, th, .toc summary, .page-next a > span:first-child, .theme-pick span, .gm-bar span, .gm-flag {
  font-family: var(--body); font-variant: small-caps; text-transform: lowercase; letter-spacing: 0.08em;
}
.kicker { color: var(--accent); font-size: 1rem; }
.eyebrow { color: var(--muted); font-size: 0.95rem; }
.crumbs, .crumb { font-size: 0.95rem; }
.field span { font-size: 0.95rem; letter-spacing: 0.06em; }
th { font-size: 0.95rem; }
.dim { color: var(--muted); }

/* the handwriting: notes pinned beside things */
.hand, .note-hand, .card-note, .prose figcaption, .prose blockquote, .rumour-list li { font-family: var(--handwriting); color: var(--hand); }
.note-hand { font-size: 1.6rem; line-height: 1.2; margin: -0.25rem 0 0.9rem; transform: rotate(-1deg); transform-origin: left; }
.hero .lede.hand { font-size: 1.75rem; line-height: 1.25; }

/* ---------- Header and footer: a wooden rail ---------- */
.site-head { background: linear-gradient(var(--wood), var(--wood-2)); border-bottom: 3px solid color-mix(in srgb, var(--wood-2) 80%, #000); color: #f2ddae; }
.brand { font-family: var(--title); font-weight: 400; font-size: 1.7rem; letter-spacing: 0.02em; text-transform: none; color: #f6e7c4; }
.brand:hover { color: #fff3d6; }
.brand-mark { width: 1rem; height: 1rem; border-radius: 0; background: #c98d4b; box-shadow: 0 0 0 2px #f6e7c4; transform: rotate(45deg); }
.nav-top, .nav-search { color: #d9c49a; font: 400 1.05rem var(--body); letter-spacing: 0.02em; text-transform: none; }
.nav-top:hover, .nav-top[aria-expanded="true"], .nav-search:hover, .nav-search[aria-current] { color: #fff3d6; }
.nav-top.is-current, .nav-top[aria-current] { color: #fff3d6; box-shadow: inset 0 -2px 0 #c98d4b; }
.nav-signin, .nav-toggle { color: #f2ddae; border-color: #8a6a44; font: 400 1rem var(--body); letter-spacing: 0.02em; text-transform: none; }
.nav-signin:hover, .nav-signin[aria-current] { color: #fff3d6; border-color: #c98d4b; }
.nav-menu { background: var(--paper); border-color: var(--line); border-radius: 4px; box-shadow: 0 0.75rem 2rem var(--shadow); }
.nav-menu a, .in-group a { color: var(--text); }
.nav-menu a strong, .in-group a strong { font-family: var(--display); font-weight: 600; font-size: 1.1rem; color: var(--heading); }
.nav-menu a span:not(.gm-dot), .in-group a span:not(.gm-dot) { font-size: 0.95rem; color: var(--muted); }
.nav-menu a:hover, .in-group a:hover, .nav-menu a[aria-current], .in-group a[aria-current] { background: var(--paper-2); }
.nav-menu a[aria-current] strong, .in-group a[aria-current] strong { color: var(--accent); }
@media (max-width: 60rem) {
  .site-nav { border-top-color: #6b4f30; }
  .nav-group > .nav-top { color: #b89c70; font-size: 0.95rem; }
  .nav-group .nav-menu a, .nav-group .nav-menu a strong { color: #f2ddae; }
  .nav-group .nav-menu a span:not(.gm-dot) { color: #c8b08a; }
  .nav-group .nav-menu a:hover, .nav-group .nav-menu a[aria-current] { background: rgb(255 255 255 / 0.06); }
  .nav-group + .nav-top { border-top-color: #6b4f30; }
}
.gm-bar { background: color-mix(in srgb, var(--gm) 14%, var(--paper)); }
.gm-bar a, .gm-bar button { color: var(--heading); }
.site-foot { background: linear-gradient(var(--wood), var(--wood-2)); border-top: 3px solid color-mix(in srgb, var(--wood-2) 80%, #000); color: #c8b08a; font-size: 0.95rem; }
.theme-pick button { color: #d9c49a; border-color: #6b4f30; }
.theme-pick button:hover { color: #fff3d6; border-color: #c98d4b; }
.theme-pick button[aria-pressed="true"] { color: #fff3d6; border-color: #c98d4b; background: rgb(255 255 255 / 0.06); }
.theme-pick span { font-size: 0.95rem; }

/* ---------- Buttons and fields ---------- */
.btn, .cta { font: 600 1.05rem var(--body); letter-spacing: 0.02em; text-transform: none; border-radius: 3px; }
.btn-inline { font-size: 1rem; }
.cta { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-size: 1.05rem; }
.cta:hover { background: var(--accent-hi); border-color: var(--accent-hi); color: var(--on-accent); }
.cta-ghost, .cta-ghost:hover { background: color-mix(in srgb, var(--paper) 70%, transparent); color: var(--heading); border-color: var(--line); }
.field input, .field select, .field textarea, .cat-filter select, .copy-box, .map-tools select, .chip-select select { background: color-mix(in srgb, var(--paper) 60%, #fff 10%); color: var(--text); }
.field input { font: 400 1.1rem var(--body); }
.panel, .card, .strip, .in-group, .sec, .sec-sub { background: color-mix(in srgb, var(--paper-2) 85%, transparent); }
.panel { border-radius: 3px; }
.gm-only { border-style: dashed; }

/* ---------- Home: the board ---------- */
.hero::before {
  background: url("../../content/map/kala-tir-thumb.webp") 60% 40% / cover no-repeat;
  opacity: 0.22; filter: sepia(0.4) var(--img-filter);
  -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent);
}
.hero h1 { font-size: clamp(2.75rem, 1.6rem + 4.4vw, 4.75rem); margin-bottom: 0.75rem; }
.hero-in { align-items: flex-start; }
.rumours {
  flex: 0 1 22rem; position: relative; margin-top: 0.5rem; padding: 1.6rem 1.5rem 1.25rem;
  background: color-mix(in srgb, var(--paper) 92%, #fff 8%); border: 1px solid var(--line);
  box-shadow: 0 0.6rem 1.4rem var(--shadow); transform: rotate(1.2deg);
}
.rumours::before { /* the nail */
  content: ""; position: absolute; top: 0.6rem; left: 50%; width: 0.7rem; height: 0.7rem; margin-left: -0.35rem; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #c9b79a, #5d5140 70%); box-shadow: 0 1px 2px rgb(0 0 0 / 0.4);
}
.rumours .eyebrow { text-align: center; margin-bottom: 0.6rem; }
.rumour-list { list-style: none; margin: 0; padding: 0; }
.rumour-list li { font-size: 1.45rem; line-height: 1.3; margin: 0 0 0.9rem; text-align: center; }
.rumour-list li a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
html.js .rumours.is-live .rumour-list li { display: none; }
html.js .rumours.is-live .rumour-list li.is-on { display: block; }
.rumour-next { display: block; margin: 0 auto; font-size: 1rem; }
@media (max-width: 46rem) { .rumours { transform: none; margin-top: 1.5rem; } }
.index-col h2 { font-weight: 600; letter-spacing: 0.01em; border-bottom: 2px solid var(--accent); }
.index-t { font-family: var(--display); font-size: 1.25rem; font-weight: 600; color: var(--heading); }
.index-row:hover { background: color-mix(in srgb, var(--paper-2) 70%, transparent); }
.index-row:hover .index-t { color: var(--accent); }
.index-d { font-size: 1rem; }
.strip-title { font-family: var(--display); font-weight: 600; font-size: 1.6rem; }
.strip-title a { color: var(--heading); }
.strip-line { font-size: 1.05rem; }

/* ---------- Pages ---------- */
.page-top h1 { margin-bottom: 0.5rem; }
.teaser { margin: 0 0 0.9rem; font-style: italic; font-size: 1.2rem; color: var(--muted); }
.lead { font-size: 1.2rem; }
.on-map { margin: 1rem 0 0; }
.page-hero { margin-top: 2rem; }
.page-hero img { display: block; width: 100%; max-height: 28rem; border: 1px solid var(--line); box-shadow: 0 0.5rem 1.5rem var(--shadow); }
/* a settlement's small map, in place of its picture: the map room's world, centred on the settlement's pin */
.map-mini-frame { position: relative; }
.map-canvas.map-mini { height: clamp(15rem, 36vw, 26rem); min-height: 0; box-shadow: 0 0.5rem 1.5rem var(--shadow); }
.map-mini noscript img { height: 100%; max-height: none; border: 0; box-shadow: none; }
.chip.map-mini-open { position: absolute; z-index: 2; top: 0.6rem; left: 0.6rem; background: var(--paper); box-shadow: 0 1px 4px rgb(0 0 0 / 0.3); }
.place-label.is-here { font-size: 1.2rem; }
img.fit { object-fit: cover; object-position: center; }
img.focus-top { object-position: center top; }
img.focus-25 { object-position: center 25%; }
img.focus-75 { object-position: center 75%; }
img.focus-bottom { object-position: center bottom; }
.sec { border-radius: 3px; }
.sec h2, .sec-pending h2 { font-weight: 600; letter-spacing: 0.01em; }
.sec-sub h3 { color: var(--accent); font-weight: 600; }
.prose h3 { color: var(--accent); }
.prose h4 { font: 600 1.05rem var(--body); font-variant: small-caps; text-transform: lowercase; letter-spacing: 0.06em; color: var(--muted); }
/* the first letter of a page, as on the old board */
.page-main > .sec-intro:first-child .prose > p:first-child::first-letter {
  float: left; font-family: var(--title); font-size: 3.6em; line-height: 0.85; padding: 0.06em 0.12em 0 0; color: var(--accent);
}
.prose blockquote { border: 0; padding: 0.25rem 1rem; margin: 1.5rem auto; text-align: center; font-size: 1.55rem; line-height: 1.3; max-width: 38rem; }
.prose blockquote p { max-width: none; }
.prose figure { margin: 1.75rem auto; max-width: 44rem; text-align: center; }
.prose figure img { display: block; margin: 0 auto; border: 1px solid var(--line); box-shadow: 0 0.4rem 1.2rem var(--shadow); border-radius: 2px; }
.prose figcaption { font-size: 1.35rem; line-height: 1.25; margin-top: 0.6rem; }
.prose img { border-radius: 2px; }
.prose pre.code { white-space: pre-wrap; background: var(--paper-3); border: 1px solid var(--line); border-radius: 3px; padding: 0.9rem 1rem; font: 400 0.9rem/1.55 ui-monospace, Menlo, monospace; overflow-x: auto; }
.prose table { font-size: 1rem; }
.toc a { font-size: 1rem; }
.page-next a > span:last-child { font-family: var(--display); font-weight: 600; font-size: 1.25rem; }

/* ---------- Cards: notices pinned to the board ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 1.75rem 1.5rem; padding: 0.5rem 0 1rem; margin: 0; list-style: none; }
.card {
  --pin: var(--pin-rust);
  position: relative; display: flex; flex-direction: column; gap: 0.35rem;
  padding: 1.5rem 1.1rem 1.1rem; border: 1px solid var(--line); border-radius: 2px;
  background: color-mix(in srgb, var(--paper) 88%, #fff 12%); color: var(--text);
  box-shadow: 0 0.35rem 0.9rem var(--shadow); transform: rotate(-0.6deg);
}
.card:nth-child(2n) { transform: rotate(0.7deg); }
.card:nth-child(3n) { transform: rotate(-0.2deg); }
a.card:hover { transform: rotate(0) translateY(-3px); border-color: var(--line); color: var(--text); box-shadow: 0 0.7rem 1.4rem var(--shadow); }
.card-pin { position: absolute; top: 0.45rem; left: 50%; width: 0.8rem; height: 0.8rem; margin-left: -0.4rem; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--pin) 50%, #fff), var(--pin) 65%); box-shadow: 0 1px 2px rgb(0 0 0 / 0.45); }
.card-img { display: block; margin: 0.25rem 0 0.4rem; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--line); }
.card-img img { display: block; width: 100%; height: 100%; }
.card-t { font-family: var(--display); font-weight: 600; font-size: 1.3rem; line-height: 1.15; color: var(--heading); }
a.card:hover .card-t { color: var(--accent); }
.card-d { font-size: 1rem; line-height: 1.45; color: var(--muted); }
.card-note { font-size: 1.25rem; line-height: 1.2; margin-top: auto; padding-top: 0.25rem; }
.pin-red { --pin: var(--pin-red); } .pin-blue { --pin: var(--pin-blue); } .pin-green { --pin: var(--pin-green); } .pin-gold { --pin: var(--pin-gold); }
.pin-violet { --pin: var(--pin-violet); } .pin-rust { --pin: var(--pin-rust); } .pin-iron { --pin: var(--pin-iron); }
@media (prefers-reduced-motion: reduce) { .card, .card:nth-child(2n), .card:nth-child(3n), .rumours, .note-hand { transform: none; } }

/* ---------- Gazetteer: regions and settlements as entries (page_gazetteer), read down each column ---------- */
.gz-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin: 0 0 2rem; }
.gz-find { margin: 0; flex: 0 1 17rem; }
.gz-find input { width: 100%; min-height: 2.25rem; padding: 0.3rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--text); font: 400 1rem var(--body); }
.gz-find input:focus { border-color: var(--accent); outline: none; }
.gz-jump { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.gz-over { margin: 0 0 0.4rem; }
.gz-none { margin: 0 0 2rem; color: var(--muted); }
.gz-count { color: var(--muted); font-size: 0.8rem; }
.gz-land + .gz-land { margin-top: 2.75rem; }
.gz-land h2 { margin: 0; padding-bottom: 0.5rem; border-bottom: 1px solid var(--accent); font-size: clamp(1.45rem, 3vw, 1.9rem); }
.gz-land-link { margin: 0.5rem 0 0.25rem; font-size: 0.95rem; }
.gz-list { columns: 3 17rem; column-gap: 2.5rem; margin: 0; padding: 0; list-style: none; }
.gz-entry { break-inside: avoid; padding: 0.75rem 0 0.8rem; border-bottom: 1px solid var(--line); }
.gz-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.6rem; margin: 0; }
.gz-name { font-family: var(--display); font-weight: 600; font-size: 1.25rem; line-height: 1.15; color: var(--heading); text-decoration: none; }
.gz-name:hover { color: var(--accent); }
.gz-kind { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.gz-d { margin: 0.2rem 0 0; font-size: 1rem; line-height: 1.4; color: var(--text); }
.gz-where { margin: 0.3rem 0 0; font-size: 0.85rem; line-height: 1.4; color: var(--muted); font-variant-numeric: tabular-nums; }
.gz-where a { white-space: nowrap; }
.gz-sub { margin: 0.45rem 0 0; padding: 0.35rem 0 0 0.75rem; border-left: 2px solid var(--line); list-style: none; font-size: 0.92rem; line-height: 1.4; }
.gz-sub li { margin: 0 0 0.3rem; }
.gz-sub li > a:first-child { font-weight: 600; }
.gz-sub-d { color: var(--muted); }
.gz-sub-map { white-space: nowrap; font-size: 0.85rem; }
@media print { .gz-tools, .gz-where a { display: none; } .gz-list { columns: 2; } }

/* ---------- The map ---------- */
.map-block { padding-top: 1.25rem; }
.page-top-compact .wrap { padding-top: 1.5rem; padding-bottom: 1.25rem; }
.page-top-compact h1 { font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3rem); }
.map-canvas { position: relative; height: min(76vh, 46rem); background: var(--sea); border-color: var(--line); border-radius: 3px; }
.map-tools { font-size: 1rem; }
.map-overlays { display: inline-flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.map-readout { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 0.95rem; }
.map-grid-labels { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.map-grid-labels[hidden] { display: none; }
/* a place's box sits over the heights and the grid's numbers, not under them */
.map-canvas .maplibregl-popup { z-index: 2; }
.map-grid-label { position: absolute; font-size: 0.72rem; letter-spacing: 0.04em; white-space: nowrap; font-variant-numeric: tabular-nums;
  color: #f6ecd4; text-shadow: 0 0 3px #1b140c, 0 0 2px #1b140c; }
.map-grid-label.is-lat { transform: translateY(-50%); }
.map-grid-label.is-lng { transform: translate(-50%, -100%); }
.map-canvas:not(.is-space) .map-grid-label { color: #3a2d1a; text-shadow: 0 0 3px #f6ecd4, 0 0 2px #f6ecd4; }
.map-contour-label { position: absolute; font-size: 0.64rem; letter-spacing: 0.03em; white-space: nowrap; font-variant-numeric: tabular-nums;
  color: #4a3520; text-shadow: 0 0 3px #f6ecd4, 0 0 2px #f6ecd4; opacity: 0.85; }
.map-contour-label.is-index { font-weight: 600; opacity: 1; }
.on-map .elevation { margin-left: 0.5rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.place-label {
  font: 600 0.95rem/1.1 var(--display); color: #2b2016; white-space: nowrap; pointer-events: none;
  text-shadow: 0 0 2px #f6ecd4, 0 0 4px #f6ecd4, 0 0 6px #f6ecd4; transform: translateY(-0.55rem);
}
.is-close-city-plan .city-plan-place {
  padding: .15rem .3rem; border-radius: 2px; background: #30251bea;
  color: #fff3d7; font: 600 .78rem/1.15 var(--body); text-shadow: none;
}
.place-label.is-crowded { visibility: hidden; }
.polar-place {
  pointer-events: auto;
  cursor: pointer;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  padding: 0.2rem 0.35rem;
}
.polar-place[hidden] { display: none; }

.place-label.is-gm { font-style: italic; color: #5e3a86; }
.place-label.is-players { color: #1f4d6b; }
/* below the waves: names under the sea sit on dark water; the surface's names fade back */
.map-canvas.is-below { background: #13293a; }
.place-label.is-below { color: #e9f2ea; font-style: italic; text-shadow: 0 0 2px #0c1b26, 0 0 4px #0c1b26, 0 0 6px #0c1b26; }
.place-label.is-below.is-gm { color: #dccbf2; }
.place-label.is-below.is-players { color: #c3e4f4; }
.place-label.is-surface { filter: opacity(0.5); }   /* MapLibre sets opacity on markers itself */
/* the world on its own: night round the globe, a scatter of stars */
.map-canvas.is-space, .map-canvas.is-space.is-below {
  background-color: #070c14;
  background-image:
    radial-gradient(1px 1px at 23px 41px, rgb(255 255 255 / 0.7), transparent 1.5px),
    radial-gradient(1px 1px at 137px 89px, rgb(255 255 255 / 0.5), transparent 1.5px),
    radial-gradient(1.5px 1.5px at 211px 167px, rgb(255 244 220 / 0.6), transparent 2px),
    radial-gradient(1px 1px at 71px 203px, rgb(255 255 255 / 0.45), transparent 1.5px),
    radial-gradient(1px 1px at 263px 23px, rgb(220 235 255 / 0.55), transparent 1.5px),
    radial-gradient(1px 1px at 181px 251px, rgb(255 255 255 / 0.35), transparent 1.5px),
    radial-gradient(ellipse at 50% 50%, #0e1a2a 0%, #070c14 72%);
  background-size: 290px 290px, 290px 290px, 290px 290px, 290px 290px, 290px 290px, 290px 290px, 100% 100%;
}
.map-canvas.is-space .maplibregl-ctrl-scale { background: rgb(255 255 255 / 0.75); }
/* names written on the world: lands in spaced capitals, seas and the lie of the land in italics */
.place-name {
  font: 700 0.78rem/1.1 var(--body); letter-spacing: 0.18em; text-transform: uppercase; color: #2b2016;
  white-space: nowrap; pointer-events: none; text-align: center;
  text-shadow: 0 0 2px #f6ecd4, 0 0 4px #f6ecd4, 0 0 7px rgb(246 236 212 / 0.8);
}
.place-name.is-crowded { visibility: hidden; }
.place-name.name-mountains, .place-name.name-hills, .place-name.name-forest, .place-name.name-marsh {
  text-transform: none; font-style: italic; letter-spacing: 0.05em; font-size: 0.9rem; color: #3b2a17;
}
.place-name.name-desert { letter-spacing: 0.3em; color: #5a3d17; }
.place-name.on-water {
  text-transform: none; font-style: italic; letter-spacing: 0.12em; font-size: 0.95rem; color: #d8e9ef;
  text-shadow: 0 0 2px #0c1b26, 0 0 4px #0c1b26, 0 0 7px rgb(12 27 38 / 0.8);
}
.place-name.name-islands { font-size: 0.85rem; letter-spacing: 0.08em; color: #eef3e6; }
.place-name.name-lake, .place-name.name-river { font-size: 0.8rem; letter-spacing: 0.04em; }
.place-name.is-great { font-size: 1.35rem; letter-spacing: 0.32em; font-weight: 500; }
.place-name.is-gm { opacity: 0.7; }
.map-legend { margin-top: 0.8rem; font-size: 0.95rem; }
.map-legend[hidden] { display: none; }
.map-legend-h { font-family: var(--display); font-weight: 600; font-size: 1.1rem; margin: 0 0 0.3rem; }
.map-legend ul { list-style: none; margin: 0 0 0.35rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 1.3rem; }
.map-legend li { display: inline-flex; align-items: center; gap: 0.45rem; }
.map-legend .sw { flex: none; width: 1.5rem; height: 0.95rem; border-radius: 2px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.25); }
.sw-shallows { background: #3a7273; } .sw-shelf { background: #24505c; } .sw-slope { background: #1b3a4b; } .sw-deep { background: #13293a; }
.sw-sea-1 { background: #68a29c; } .sw-sea-2 { background: #4c8a90; } .sw-sea-3 { background: #30647c; } .sw-sea-4 { background: #2e5670; }
.sw-sea-5 { background: #1c3858; } .sw-sea-6 { background: #13162e; }
.sw-edge { background: repeating-linear-gradient(90deg, #a6cfc3 0 5px, transparent 5px 9px) center / 100% 2px no-repeat, #24505c; }
.maplibregl-popup-content { background: var(--paper) !important; color: var(--text); border: 1px solid var(--line); border-radius: 3px !important; font: 400 1rem/1.45 var(--body); padding: 0.8rem 0.9rem !important; box-shadow: 0 0.4rem 1rem var(--shadow) !important; }
.maplibregl-popup-tip { border-top-color: var(--paper) !important; border-bottom-color: var(--paper) !important; }
.maplibregl-popup-close-button { color: var(--muted); font-size: 1.2rem; padding: 0 0.35rem; }
.place-pop strong { font-family: var(--display); font-weight: 600; font-size: 1.2rem; letter-spacing: 0.01em; text-transform: none; color: var(--heading); }
.place-pop-kind { font-family: var(--body); font-variant: small-caps; text-transform: lowercase; font-size: 0.95rem; letter-spacing: 0.06em; }
.region-label { font: 600 0.95rem var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: #3a2d1a; text-shadow: 0 0 3px #f6ecd4, 0 0 6px #f6ecd4; opacity: 0.75; }
/* the names of lands on an overlay (Political boundaries): in their own colour, lettered as on the old picture */
.region-label.is-layer { text-transform: none; font-style: italic; letter-spacing: 0.03em; font-size: 1.15rem; opacity: 0.95;
  color: color-mix(in srgb, var(--c, #3a2d1a) 55%, #1d140b); text-shadow: 0 0 3px #f6ecd4, 0 0 6px #f6ecd4, 0 0 9px #f6ecd4; }
.pin { background: var(--accent); border-color: var(--paper); box-shadow: 0 1px 3px rgb(0 0 0 / 0.4); }
.pin-draft { background: transparent; border: 2px dashed var(--heading); }
.map-edit-bar { background: color-mix(in srgb, var(--paper) 94%, transparent); color: var(--text); font: 0.95rem var(--body); }
.map-edit-bar select, .map-edit-bar button { color: var(--text); background: var(--paper-2); }
.map-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 0 2.5rem; margin-top: 1rem; }
.map-lists h2 { font-size: 1.5rem; margin-top: 1.75rem; }
.map-lists .place-search { grid-column: 1 / -1; }
.place-note { display: block; font-size: 0.95rem; color: var(--muted); }
.route-list li { margin-bottom: 0.7rem; }

/* the route plotter */
.plotter { margin-top: 1rem; padding: 1.1rem 1.25rem 1.25rem; border: 1px solid var(--line); border-radius: 3px; background: color-mix(in srgb, var(--paper-2) 85%, transparent); }
.plotter-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; }
.plotter-h { font-size: 1.5rem; margin: 0; }
.plotter-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.1rem; margin: 0; }
.plotter-btns .btn { margin: 0; }
#plot-start[aria-pressed="true"] { background: var(--heading); color: var(--paper); }
.link-btn:disabled { opacity: 0.45; cursor: default; text-decoration: none; }
.plot-total { font-family: var(--display); font-weight: 600; font-size: 1.4rem; margin: 0.6rem 0 0.2rem; min-height: 1.4em; color: var(--heading); }
.plot-modes { max-width: 34rem; margin: 0.25rem 0 0; }
.plot-modes th { white-space: nowrap; font-family: var(--body); font-variant: normal; text-transform: none; letter-spacing: 0; font-size: 1.05rem; color: var(--heading); font-weight: 600; }
.plot-modes th .dim { font-weight: 400; font-size: 0.9rem; margin-left: 0.4rem; }
.plot-modes td { font-variant-numeric: tabular-nums; }
.plot-modes tr.is-route-mode th, .plot-modes tr.is-route-mode td { color: var(--accent); }
.plot-save { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.plot-save-h { font-family: var(--display); font-weight: 600; font-size: 1.2rem; margin: 0 0 0.6rem; }
.map-canvas.is-plotting { cursor: crosshair; }
.map-canvas.is-plotting .maplibregl-canvas { cursor: crosshair; }
.mode-table td { padding-right: 1rem; }
.mode-table input { width: 100%; background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 3px; padding: 0.35rem 0.5rem; font: 400 1rem var(--body); }
.mode-table input[type=checkbox] { width: auto; accent-color: var(--accent); }

/* ---------- Links that leave the site ---------- */
a.ext { color: var(--accent); font-size: 1em; }

/* ---------- Print: the page, not the board ---------- */
@media print {
  .site-head, .site-foot, .gm-bar, .toc, .page-next, .in-group, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  body::before { display: none; }
  .card, .rumours { transform: none; box-shadow: none; }
}

/* The map room. Keep the chart and its active tool together. */
.block.atlas { padding-block: clamp(1.1rem, 2.7vw, 2.1rem) 2.25rem; }
.wide .atlas .atlas-wrap { width: min(100% - 2.5rem, 95rem); max-width: none; padding: 0; }
.atlas-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.atlas-map-links { display: flex; flex-wrap: wrap; gap: .35rem 1rem; justify-content: end; }
.atlas-tunnel-entrance {
  display: grid; place-items: center; width: 30px; height: 30px; text-decoration: none;
}
.atlas-tunnel-entrance::before {
  content: ""; width: .65rem; height: .65rem; transform: rotate(45deg);
  background: #a96f40; border: 2px solid #ffe4bf; box-shadow: 0 0 0 1px #432918;
}
.is-below .atlas-tunnel-entrance { display: none; }
/* The Ways and the underground drawn on the atlas (map-ways.js) */
.sw-fathom { background: linear-gradient(#9fd3e6, #9fd3e6) center / 100% 1px no-repeat, #13293a; } .sw-fathom-k { background-size: 100% 3px; }
.sw-warm { background: linear-gradient(#ff8f66, #ff8f66) center / 100% 4px no-repeat, #13293a; }
.sw-cold { background: linear-gradient(#7fd3ff, #7fd3ff) center / 100% 4px no-repeat, #13293a; }
.sw-drift { background: linear-gradient(#efe8cf, #efe8cf) center / 100% 3px no-repeat, #13293a; }
.sw-reef { background: repeating-linear-gradient(90deg, #ff9d8a 0 3px, transparent 3px 7px) center / 100% 4px no-repeat, #24505c; }
.sw-atoll { background: radial-gradient(circle, transparent 0 3px, #ff9d8a 3px 5px, transparent 5px) center / 100% 100% no-repeat, #13293a; }
.sw-kelp { background: #3f7f55; } .sw-bank { background: #6d7f72; } .sw-fog { background: #5d7480; }
.sw-bar { background: repeating-linear-gradient(0deg, #e9c46a 0 2px, transparent 2px 5px) center / 70% 80% no-repeat, #24505c; }
.sw-race { background: repeating-linear-gradient(135deg, #ff6b5e 0 2px, transparent 2px 6px) center / 80% 80% no-repeat, #13293a; }
.sw-ice { background: linear-gradient(#fff, #fff) center / 100% 3px no-repeat, #13293a; }
.sw-ice-w { background: repeating-linear-gradient(90deg, #fff 0 5px, transparent 5px 9px) center / 100% 2px no-repeat, #13293a; }
.sw-calms { background: repeating-linear-gradient(90deg, #f3e7a0 0 2px, transparent 2px 8px) center / 100% 2px no-repeat, #13293a; }
.sw-way { background: linear-gradient(#83e7dd, #83e7dd) center / 100% 3px no-repeat, #10243a; }
.sw-tunnel { background: repeating-linear-gradient(90deg, #e2a66f 0 6px, transparent 6px 10px) center / 100% 3px no-repeat, #2e1b0e; }
.map-legend .sw-locale, .map-legend .sw-mouth { width: .95rem; margin: 0 .275rem; border-radius: 50%; }
.sw-locale { background: #c59dfa; box-shadow: inset 0 0 0 2px #241640 !important; }
.sw-mouth { background: #83e7dd; box-shadow: inset 0 0 0 2px #10243a !important; }
.ways-map-label {
  max-width: 14rem; padding: .1rem .45rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
  border: 0; border-bottom: 1px solid #a983de; border-radius: .2rem; background: #17172ee0; color: #f2d6ff;
  font: 600 .85rem var(--body);
}
.ways-map-label:focus-visible { outline: 2px solid #f2d6ff; outline-offset: 1px; }
.map-printing .ways-map-label { display: none; }
.ways-pop hr { border: 0; border-top: 1px solid var(--line); margin: .6rem 0; }
.ways-pop-list { list-style: none; margin: .35rem 0; padding: 0; }
.ways-pop-list .link-btn { text-align: left; }
.atlas-heading h1 { margin: 0; line-height: 1; font-size: clamp(2rem, 4vw, 3rem); }
.atlas-heading a { font-size: .95rem; }
.atlas [hidden] { display: none !important; }
.atlas-toolbar { display: flex; align-items: stretch; gap: .85rem; margin-bottom: .7rem; }
.atlas-search { position: relative; display: block; flex: 1 1 17rem; min-width: 0; max-width: 31rem; }
.atlas-search input {
  width: 100%; min-height: 2.75rem; border: 1px solid var(--line); border-radius: 3px;
  background: var(--paper-2); color: var(--heading); padding: .45rem .7rem .45rem 2.25rem; font: inherit;
  font-size: 1rem;
}
.atlas-search::before {
  content: ""; position: absolute; top: 50%; left: .85rem; margin-top: -.45rem; width: .65rem; height: .65rem;
  border: 1.5px solid var(--muted); border-radius: 50%; pointer-events: none;
}
.atlas-search::after {
  content: ""; position: absolute; top: 50%; left: 1.49rem; width: .39rem; height: 1.5px;
  background: var(--muted); transform: translateY(.33rem) rotate(45deg); pointer-events: none;
}
.atlas-actions { display: flex; align-items: stretch; gap: .25rem; }
.atlas-action, .atlas-close {
  border: 1px solid transparent; border-radius: 3px; background: transparent; color: var(--heading);
  padding: .35rem .8rem; font: 600 1rem var(--body); cursor: pointer;
}
.atlas-action:hover, .atlas-close:hover { background: var(--paper-2); border-color: var(--line); }
.atlas-action[aria-expanded="true"] { border-color: var(--line); background: var(--paper-2); color: var(--accent); }
.atlas :is(button, input, select, summary, a):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.atlas-workspace { --atlas-height: clamp(25rem, 72svh, 52rem); position: relative; min-width: 0; }
.atlas-workspace:has(.atlas-drawer:not([hidden])) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem); gap: .6rem; }
.atlas-map-frame { min-width: 0; }
.atlas .map-canvas { height: var(--atlas-height); min-height: 0; }
.atlas-continent { letter-spacing: .18em; font-size: clamp(.9rem, 1.5vw, 1.2rem); opacity: .95; }
.atlas-drawer { min-width: 0; height: var(--atlas-height); border: 1px solid var(--line); border-radius: 3px; background: var(--paper); }
.atlas-panel { display: flex; flex-direction: column; height: 100%; }
.atlas-panel-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem .85rem .6rem 1rem; border-bottom: 1px solid var(--line); }
.atlas-panel-head h2 { font-size: 1.35rem; line-height: 1.15; margin: 0; }
.atlas-close { width: 2.75rem; height: 2.75rem; padding: 0; font: 1.5rem/1 var(--body); flex: none; }
.atlas-panel-body { padding: .65rem 1rem 1rem; overflow: auto; overscroll-behavior: contain; min-height: 0; height: 100%; }
.atlas-place-group + .atlas-place-group { border-top: 1px solid var(--line); }
.atlas-place-group summary { padding: .7rem .12rem; cursor: pointer; font-weight: 600; color: var(--heading); }
.atlas-place-group .place-list { padding-inline-start: .45rem; margin-bottom: .7rem; }
.atlas-place-group li { padding: .25rem 0; margin: 0; }
.atlas-place-group .link-btn { padding-block: .22rem; text-align: left; }
.atlas-search-status { margin: .3rem 0 .55rem; color: var(--muted); font-size: .95rem; }
.atlas-gazetteer { display: inline-block; margin-top: .9rem; }
.atlas-layer-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.atlas-layer-fields .field, .atlas-layer-fields select { min-width: 0; }
.atlas-layer-fields .field select, .atlas #plot-mode { width: 100%; min-height: 2.65rem; }
.atlas-layer-fields .field { margin: .15rem 0 .55rem; }
.wind-chart-note { margin: .1rem 0 .7rem; }
.wind-chart-key {
  display: flex; flex-wrap: wrap; gap: .25rem .8rem; margin: 0 0 .9rem; padding: 0; list-style: none;
}
.wind-chart-key li { display: inline-flex; align-items: center; gap: .35rem; margin: 0; }
.wind-chart-key li::before {
  content: ""; width: 1.1rem; border-top: 3px solid #228278;
}
.wind-chart-key .wind-return::before { border-color: #af7625; }
.wind-chart-key .wind-current::before { border-color: #7962b7; }
#wind-route { width: 100%; }
.wind-route-details { margin-top: .7rem; border-top: 1px solid var(--line); padding-top: .75rem; }
.wind-route-details h3 { margin: 0 0 .35rem; font-size: 1.18rem; }
.wind-route-details dl { margin: .8rem 0; }
.wind-route-details dt { font-weight: 650; color: var(--heading); }
.wind-route-details dd { margin: .1rem 0 .55rem; }
.wind-stops { margin: 0; }
.wind-transfers { margin-bottom: .85rem; }
.wind-transfers h4 { margin: .7rem 0 .25rem; }
.wind-transfers ul { margin: 0; padding-inline-start: 1.2rem; }
.wind-transfers li { margin: 0 0 .4rem; }
.atlas-layer-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1rem; }
.atlas-layer-actions .btn { margin: 0; }
.atlas-overlays { border: 0; border-top: 1px solid var(--line); margin: .85rem 0 0; padding: .3rem 0 0; min-width: 0; }
.atlas-overlays legend { color: var(--heading); padding-right: .5rem; font-weight: 600; }
.atlas-overlays label { display: flex; gap: .5rem; align-items: center; min-height: 2.2rem; cursor: pointer; }
.route-swatch { flex: none; width: 1.6rem; height: 0; border-top: 3px dashed var(--c, var(--accent)); }
.atlas-routes .gm-dot { margin-left: auto; }
.plot-grant { display: flex; gap: .5rem; align-items: center; margin: .2rem 0 .4rem; font-size: .95rem; cursor: pointer; }
.check-row { display: flex; flex-wrap: wrap; gap: .2rem 1rem; }
.route-only .check { display: inline-flex; gap: .4rem; align-items: center; }
.atlas input[type="checkbox"] { accent-color: var(--accent); }
.atlas .map-legend { border-top: 1px solid var(--line); padding-top: .75rem; }
.atlas .map-legend ul { display: grid; gap: .3rem; }
.atlas-ink { display: block; margin-block: .5rem; }
.atlas-caption { display: flex; justify-content: space-between; gap: .75rem; color: var(--muted); margin-top: .38rem; font-size: .9rem; min-height: 1.5em; }
.atlas-credit { margin: .35rem 0 0; }
.atlas .plotter { background: transparent; padding: .15rem 0 0; margin: 0; border: 0; }
.atlas .plotter-btns { gap: .45rem .7rem; }
.atlas .plotter-btns .link-btn { min-height: 2.2rem; }
.atlas #plot-help { margin: .7rem 0 0; }
.atlas .plot-total { min-height: 0; }
.atlas .plot-total:empty { margin: 0; }
.atlas #plot-estimates .field { margin: .5rem 0 .15rem; }
.atlas .plot-estimate { font-weight: 600; color: var(--accent); margin: .25rem 0 .75rem; }
.atlas .plot-compare summary { cursor: pointer; }
.atlas .plot-modes th { white-space: normal; }
.atlas .plot-save .cg-grid { grid-template-columns: 1fr; }
@media (max-width: 52rem) {
  .wide .atlas .atlas-wrap { width: min(100% - 1.5rem, 95rem); }
  .atlas-toolbar { display: grid; gap: .32rem; }
  .atlas-search { max-width: none; }
  .atlas-actions { flex-wrap: wrap; justify-content: space-between; gap: .05rem; }
  .atlas-action { min-height: 2.75rem; padding-inline: .55rem; font-size: .94rem; }
  .atlas-workspace { --atlas-height: clamp(23rem, 65svh, 38rem); }
  .atlas-workspace:has(.atlas-drawer:not([hidden])) { display: block; }
  .atlas-drawer {
    position: absolute; inset: auto 0 0; z-index: 4; height: auto; max-height: 54%; display: flex;
    border-radius: 6px 6px 3px 3px; box-shadow: 0 -.45rem 1.35rem var(--shadow);
  }
  .atlas-panel { min-height: 0; height: auto; width: 100%; }
  .atlas-panel-head { padding-block: .25rem; }
  .atlas-panel-body { height: auto; }
  .atlas-caption { min-height: 2em; }
}

/* Pictures in a page open large when selected (zoom.js): a dark viewer over the page, the picture zoomed and dragged in it. */
.zoomable { cursor: zoom-in; }
html.zoom-open { overflow: hidden; }
.zoom-view { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; background: #17100a; color: #f6ecd4; }
.zoom-view[hidden] { display: none; }
.zoom-bar { flex: none; display: flex; gap: 0.5rem; align-items: center; padding: 0.5rem 0.75rem; }
.zoom-caption { flex: 1; min-width: 0; margin: 0; font: 400 1.05rem/1.3 var(--body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zoom-bar button { flex: none; min-width: 2.75rem; min-height: 2.75rem; padding: 0 0.8rem; font: 600 1.25rem/1 var(--body); color: #f6ecd4; background: rgb(246 236 212 / 0.12); border: 1px solid rgb(246 236 212 / 0.45); border-radius: 4px; cursor: pointer; }
.zoom-bar button:hover { background: rgb(246 236 212 / 0.24); }
.zoom-view :focus-visible { outline: 3px solid #f6ecd4; outline-offset: 2px; }
.zoom-stage { flex: 1; min-height: 0; display: flex; overflow: auto; touch-action: none; overscroll-behavior: contain; cursor: zoom-in; }
.zoom-stage:focus-visible { outline-offset: -3px; }
.zoom-view.zoomed .zoom-stage { cursor: grab; }
.zoom-view.dragging .zoom-stage { cursor: grabbing; }
.zoom-pic { flex: none; display: block; margin: auto; max-width: none; background: #f6ecd4; filter: none; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
@media (max-width: 30rem) { .zoom-caption { font-size: 0.95rem; } .zoom-bar { gap: 0.35rem; padding: 0.4rem 0.5rem; } }
@media print { .zoom-view { display: none !important; } }
