/* The field journal - the community site's one stylesheet.
   Built from site/design/Main.dc.html, MobileMain.dc.html and Brand.dc.html (Claude Design,
   2026-09-09). Tokens first; data-theme="night" on <html> swaps every token and nothing else.
   Everything here is CSS, one jpg, and three fonts. */

/* ---- tokens: the journal palette (day) ---- */
:root {
  --paper: #f2eadb; --paper-2: #fbf7ee; --card: #fbf3dc;
  --ink: #241f1a; --ink-2: #2b2721; --muted: #6b665c;
  --stamp: #a8382a; --moss: #3d5a3a; --brass: #b8862b;
  --desk: #2a1d12; --desk-2: #5a3f28;
  --rule: rgba(43, 39, 33, 0.3);
  --tape: rgba(240, 226, 180, 0.78); --tape-2: rgba(226, 208, 156, 0.7);
  --carnivore: var(--stamp); --herbivore: var(--moss); --omnivore: var(--brass);
  --map-filter: sepia(0.55) saturate(0.85) contrast(1.05) brightness(0.98);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.2 0 0 0 0 0.15 0 0 0 0 0.1 0 0 0 0.09 0'/></filter><rect width='300' height='300' filter='url(%23n)'/></svg>");
  --font-type: "Special Elite", "Courier Prime", "Courier New", monospace;
  --font-hand: Caveat, "Segoe Print", "Bradley Hand", cursive;
  --font-text: "IBM Plex Serif", Georgia, "Times New Roman", serif;
}
/* ---- night: dark paper, same ink logic ---- */
:root[data-theme="night"] {
  --paper: #2b251d; --paper-2: #342d24; --card: #3a3227;
  --ink: #efe6d3; --ink-2: #e2d8c4; --muted: #a89f8e;
  --stamp: #d9614f; --moss: #8fb08a; --brass: #d3a54a;
  --desk: #120e0a; --desk-2: #2a1f14;
  --rule: rgba(239, 230, 211, 0.26);
  --tape: rgba(120, 104, 70, 0.7); --tape-2: rgba(100, 86, 56, 0.7);
  --map-filter: sepia(0.5) saturate(0.7) contrast(1.05) brightness(0.72);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.9 0 0 0 0 0.85 0 0 0 0 0.7 0 0 0 0.07 0'/></filter><rect width='300' height='300' filter='url(%23n)'/></svg>");
}

/* ---- base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--desk);
  background-image: radial-gradient(1400px 900px at 50% 10%, var(--desk-2), var(--desk) 70%);
  color: var(--ink-2);
  font: 17px/1.55 var(--font-text);
}
a { color: var(--stamp); text-decoration: none; }
a:hover { color: var(--ink); }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }
.type { font-family: var(--font-type); letter-spacing: 0.04em; }
.hand { font-family: var(--font-hand); font-weight: 500; }
strong { font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---- paper ---- */
.sheet {
  position: relative; width: min(1080px, 100% - 32px); margin: 56px auto 72px;
  padding: 64px 80px 56px; display: flex; flex-direction: column; gap: 34px;
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 30px 60px rgba(0, 0, 0, 0.45), 0 8px 18px rgba(0, 0, 0, 0.3);
  transform: rotate(-0.35deg);
}
.sheet::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: var(--grain); }
.sheet::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(900px 600px at 50% 40%, transparent 60%, rgba(120, 90, 50, 0.16)); }
.sheet > :not(.tape) { position: relative; z-index: 1; }
.sheet--short { min-height: 60vh; gap: 28px; }

.card {
  position: relative; background: var(--paper-2);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28), 0 2px 4px rgba(0, 0, 0, 0.18);
}
.tape {
  position: absolute; z-index: 2; height: 34px;
  background: linear-gradient(180deg, var(--tape), var(--tape-2));
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  clip-path: polygon(2% 0, 98% 0, 100% 18%, 99% 50%, 100% 82%, 98% 100%, 2% 100%, 0 82%, 1% 50%, 0 18%);
}
.rule { border-bottom: 1px solid var(--rule); }

/* the one stamp per view: the server's status, nothing else */
.stamp {
  position: relative; display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  border: 3px double var(--stamp); color: var(--stamp); padding: 8px 16px; border-radius: 6px;
  font-family: var(--font-type); text-transform: uppercase; letter-spacing: 0.12em;
  mix-blend-mode: multiply; opacity: 0.9;
  transform: rotate(-6deg); font-size: 24px;
}
.stamp.is-offline, .stamp.is-loading { opacity: 0.6; }
:root[data-theme="night"] .stamp { mix-blend-mode: normal; }

/* buttons: one solid ink button per page, ghost for sign-in, every target 44px+ */
.btn, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-type); letter-spacing: 0.05em; white-space: nowrap; border-radius: 2px;
  cursor: pointer; border: 0;
}
.btn {
  min-height: 48px; padding: 0 24px; background: var(--ink); color: var(--paper); font-size: 16px;
  box-shadow: 2px 2px 0 rgba(36, 31, 26, 0.25);
}
.btn, .btn:hover { color: var(--paper); }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 rgba(36, 31, 26, 0.3); }
.btn--cta { font-size: 18px; min-height: 56px; padding: 0 30px; transform: rotate(-1deg); }
.btn--cta:hover { transform: rotate(-1deg) translate(-1px, -1px); }
.btn-ghost {
  min-height: 44px; padding: 0 18px; border: 1.5px solid var(--ink); background: transparent;
  color: var(--ink); font-size: 14px;
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-ghost--icon { width: 44px; padding: 0; }
/* a link whose destination does not exist yet ([BRACKETS] in the design) */
.is-placeholder { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.is-placeholder:hover { transform: none; box-shadow: none; background: var(--ink); }
.btn-ghost.is-placeholder:hover { background: transparent; color: var(--ink); }
.navlink { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-size: 14px; white-space: nowrap; color: var(--ink); }
.navlink:hover { color: var(--stamp); }
.navlink--red { color: var(--stamp); font-size: 12px; letter-spacing: 0.1em; }
.linkbtn { background: none; border: 0; padding: 0 4px; min-height: 44px; color: var(--muted); font-size: 21px; cursor: pointer; }
.linkbtn:hover { color: var(--stamp); }

/* diet dots, pins */
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted); }
.dot.carnivore { background: var(--carnivore); }
.dot.herbivore { background: var(--herbivore); }
.dot.omnivore { background: var(--omnivore); }
.dot.unknown { background: transparent; box-shadow: 0 0 0 2px var(--muted); }
.pin { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; display: flex; align-items: center; justify-content: center; }
.pin .dot { width: 14px; height: 14px; border: 2px solid #fbf7ee; box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5); }
.pin .label { position: absolute; left: 34px; top: 50%; transform: translateY(-50%); font-size: 20px; color: #fff; text-shadow: 0 1px 2px #000, 0 0 6px rgba(0, 0, 0, 0.6); white-space: nowrap; }

/* ---- masthead ---- */
.masthead { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; }
.wordmark { display: flex; flex-direction: column; gap: 4px; }
.eyebrow { font-size: 12px; color: var(--muted); letter-spacing: 0.22em; white-space: nowrap; }
.wordmark-text { font-size: 66px; line-height: 1.02; color: var(--ink); white-space: nowrap; }
.wordmark-text a { color: inherit; }
.tagline { font-size: 27px; color: var(--moss); transform: rotate(-1.5deg); display: inline-block; margin-top: 2px; line-height: 1.15; }
.status { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; padding-top: 8px; }
.stats { display: grid; grid-template-columns: auto auto; gap: 4px 14px; margin: 0; font-size: 12.5px; color: var(--muted); text-align: right; letter-spacing: 0.1em; }
.stats dt { margin: 0; }
.stats dd { margin: 0; color: var(--ink); white-space: nowrap; }

.nav { display: flex; gap: 22px; align-items: center; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 4px 0; }
.nav .btn-ghost { margin-left: auto; }

/* ---- spreads ---- */
.spread { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 44px; align-items: start; }
.spread--steps { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); padding-top: 6px; }
.col { display: flex; flex-direction: column; gap: 16px; }
.h2 { font-size: 24px; color: var(--ink); }
.lede { font-size: 18.5px; text-wrap: pretty; }
.margin-note { position: relative; margin: 6px 0 0 26px; }
.margin-note svg { position: absolute; left: -58px; top: -4px; }
.margin-note .hand { font-size: 25px; color: var(--moss); transform: rotate(-2deg); display: inline-block; line-height: 1.15; }

.sightings { display: flex; flex-direction: column; gap: 2px; padding-top: 12px; }
.sightings-head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 8px; }
.on-now { font-size: 12px; color: var(--muted); letter-spacing: 0.1em; }
.players { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.players li { display: flex; align-items: center; gap: 12px; min-height: 44px; border-bottom: 1px solid var(--rule); }
.players .name { font-weight: 600; font-size: 19px; }
.players .species { color: var(--muted); font-style: italic; }
.players .growth { margin-left: auto; font-size: 14px; white-space: nowrap; }
.players .empty { font-size: 23px; color: var(--muted); justify-content: center; min-height: 64px; text-align: center; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 18px; padding-top: 12px; font-size: 12px; color: var(--muted); letter-spacing: 0.08em; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.note { font-size: 21px; color: var(--muted); padding-top: 6px; }
:root.is-stale .note, :root.is-unreachable .note { color: var(--stamp); }

/* the chart card: the real map, never cropped - pins are percentages of the whole image */
.chart-col { display: flex; flex-direction: column; align-items: center; padding-top: 10px; }
.chart-card { display: block; width: 100%; max-width: 484px; padding: 14px 14px 40px; transform: rotate(1.6deg); color: inherit; }
.chart { position: relative; width: 100%; aspect-ratio: 1100 / 1102; overflow: hidden; background: var(--paper-2); }
.chart img { display: block; width: 100%; height: 100%; object-fit: contain; filter: var(--map-filter); }
.chart .vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(70% 70% at 50% 50%, transparent 55%, rgba(80, 60, 30, 0.28)); }
.chart-empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-3deg); font-size: 26px; color: #fff; text-shadow: 0 1px 2px #000, 0 0 8px rgba(0, 0, 0, 0.7); white-space: nowrap; }
.chart-caption { position: absolute; left: 16px; bottom: 12px; font-size: 12px; color: var(--muted); }
.chart-note { font-size: 22px; color: var(--muted); margin-top: 24px; transform: rotate(-1deg); }

/* how to get here */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.steps li { display: flex; gap: 16px; align-items: baseline; font-size: 18px; }
.steps .num { font-size: 20px; color: var(--stamp); width: 30px; flex: none; }
.cta { display: flex; align-items: center; gap: 18px; padding-top: 14px; }
.cta .hand { font-size: 23px; color: var(--ink); }

/* the rules card: ruled --card, a paperclip */
.rules { position: relative; padding-top: 8px; }
.rules .clip { position: absolute; left: 26px; top: -44px; z-index: 2; transform: rotate(10deg); filter: drop-shadow(1px 2px 2px rgba(0, 0, 0, 0.35)); }
.rules-card {
  background: var(--card); padding: 26px 26px 22px; transform: rotate(1.2deg);
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22), 0 1px 3px rgba(0, 0, 0, 0.2);
  background-image: repeating-linear-gradient(0deg, transparent 0 27px, var(--rule) 27px 28px);
  background-position: 0 14px;
}
.rules-card .label { font-size: 15px; color: var(--ink); letter-spacing: 0.16em; }
.rules-card ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rules-card li { font-size: 17px; line-height: 28px; }
.rules-card .more { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding-top: 4px; }
.rules-card .more .hand { font-size: 19px; color: var(--muted); }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 11px; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 14px; letter-spacing: 0.1em; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--stamp); }

/* ---- phone header (the desktop masthead and nav are hidden under 700px) ---- */
.phone-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--rule); padding-bottom: 4px; }
.phone-head .home { display: flex; flex-direction: column; gap: 1px; min-height: 44px; justify-content: center; color: inherit; }
.phone-head .eyebrow { font-size: 10px; letter-spacing: 0.2em; }
.phone-head .wordmark-text { font-size: 24px; line-height: 1.05; }
.phone-head nav { display: flex; align-items: center; gap: 2px; flex: none; }
.phone-head .navlink { padding: 0 7px; font-size: 13px; }
.phone-head .btn-ghost--icon { margin-left: 6px; }
.phone-top { display: flex; flex-direction: column; gap: 14px; padding-top: 6px; }
.phone-top .tagline { font-size: 26px; transform: rotate(-1deg); line-height: 1.1; }
.phone-top .stamp-row { display: flex; align-items: center; gap: 18px; }
.phone-top .stamp { font-size: 18px; transform: rotate(-4deg); flex: none; }
.phone-top .stats { text-align: left; font-size: 11.5px; gap: 3px 12px; letter-spacing: 0.08em; }
.phone-top .btn { width: 100%; min-height: 54px; font-size: 17px; transform: none; }
.phone-top .note { font-size: 20px; text-align: center; padding: 0; }
/* after the phone rules so it wins on the desktop; the phone media query turns it back on */
.only-phone { display: none; }

/* ---- responsive ---- */
@media (max-width: 960px) {
  .sheet { padding: 44px 40px 40px; }
  .spread, .spread--steps { grid-template-columns: 1fr; gap: 34px; }
  .masthead { flex-direction: column; }
  .status { align-items: flex-start; }
  .stats { text-align: left; }
  .wordmark-text { font-size: 52px; }
  .nav { flex-wrap: wrap; gap: 6px 18px; }
}
@media (max-width: 700px) {
  body { background-image: none; }
  .sheet { width: 100%; min-height: 100vh; margin: 0; padding: 18px 22px 28px; gap: 26px; transform: none; box-shadow: none; }
  .only-desk { display: none !important; }
  .only-phone { display: flex; }
  span.only-phone { display: inline; }
  .h2 { font-size: 22px; }
  .players .name { font-size: 17px; }
  .players .species { font-size: 15px; }
  .players .growth { font-size: 13px; }
  .pin .label { display: none; }
  .chart-col { padding-top: 0; }
  .chart-card { max-width: none; margin: 6px 2px 0; padding: 10px 10px 34px; transform: rotate(0.8deg); }
  .chart-caption { left: 12px; bottom: 10px; font-size: 11px; }
  .chart-note { display: none; }
  .steps li { font-size: 16.5px; gap: 14px; }
  .steps .num { width: 26px; }
  .rules { padding-top: 10px; }
  .rules .clip { left: 18px; top: -30px; width: 44px; height: 100px; }
  .rules-card { padding: 24px 22px 20px; transform: rotate(-0.8deg); background-position: 0 12px; }
  .rules-card li { font-size: 16px; }
  .foot { flex-direction: column; text-align: center; gap: 4px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn:hover, .btn--cta:hover { transform: none; }
}

/* ---- hot zones on the small chart (landing): activity, never a player ---- */
.hot { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, var(--stamp) 0%, rgba(168, 56, 42, 0.55) 40%, rgba(168, 56, 42, 0) 70%); }

/* ---- the chart page (Leaflet over local tiles) ---- */
/* no rotation anywhere around the map: a tilted ancestor makes every pan re-rasterise the tiles */
.sheet--chart { gap: 22px; transform: none; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.chart-sub { display: block; font-size: 22px; color: var(--moss); margin-top: 2px; }
.chart-stamp { font-size: 18px; transform: rotate(-4deg); }
.chart-frame { padding: 14px 14px 16px; transform: none; }
.bigmap { width: 100%; height: min(72vh, 900px); min-height: 360px; background: var(--desk); position: relative; }
.leaflet-container { background: var(--desk); font-family: inherit; }
/* the sepia tone is baked into the tiles (tools/maketiles.py); night is a cheap shade on top,
   not a filter - CSS filters over a tile pane are what made Firefox crawl */
.bigmap::after { content: ""; position: absolute; inset: 0; z-index: 450; pointer-events: none; background: rgba(18, 12, 8, 0); }
:root[data-theme="night"] .bigmap::after { background: rgba(18, 12, 8, 0.38); }
.bigmap.is-overzoom .leaflet-tile { image-rendering: pixelated; image-rendering: crisp-edges; }
.map-label { font-family: var(--font-type); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: #fff;
  text-shadow: 0 1px 2px #000, 0 0 6px rgba(0, 0, 0, 0.7); white-space: nowrap; transform: translate(-50%, -50%); pointer-events: none; }
.map-label.size-large { font-size: 16px; }
.map-label.size-small { font-size: 11px; }
.map-label.is-water { font-family: var(--font-hand); font-size: 18px; letter-spacing: 0; text-transform: none; font-style: italic; }
.bigmap.is-far .map-label.size-small, .bigmap.is-far .map-label.is-water { display: none; }
.hot-zone { fill: var(--stamp); }
/* your own pin and a party member's pin: a wax-red dot with a paper ring, and a paper tag
   for the name - readable on jungle, water and sand alike */
.you-pin, .mate-pin { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.you-pin .dot, .mate-pin .dot { width: 20px; height: 20px; background: #a8382a; border: 3px solid #fbf7ee;
  box-shadow: 0 0 0 2px rgba(36, 31, 26, 0.55), 0 3px 6px rgba(0, 0, 0, 0.6); }
.mate-pin .dot { background: #3d5a3a; }
.you-pin .label, .mate-pin .label { position: absolute; left: 34px; top: 50%; transform: translateY(-50%) rotate(-2deg);
  font-size: 18px; line-height: 1; padding: 3px 9px 4px; background: #fbf7ee; color: #241f1a; border-radius: 2px;
  box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.45); white-space: nowrap; }
.you-pin .label { background: #a8382a; color: #fbf7ee; }
.leaflet-bar { border: 1.5px solid var(--ink); border-radius: 2px; box-shadow: 2px 2px 0 rgba(36, 31, 26, 0.25); }
.leaflet-bar a, .leaflet-bar a:hover { width: 44px; height: 44px; line-height: 44px; background: var(--paper-2); color: var(--ink);
  border-bottom: 1px solid var(--rule); font-family: var(--font-type); font-size: 20px; }
.leaflet-bar a:hover { background: var(--ink); color: var(--paper); }
.chart-tools { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding-top: 12px; }
.locate { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex: 1 1 420px; }
.locate label { font-size: 12px; letter-spacing: 0.16em; color: var(--muted); }
.locate-input { min-height: 44px; flex: 1 1 220px; padding: 0 12px; border: 1.5px solid var(--rule); border-radius: 2px;
  background: var(--paper-2); color: var(--ink); font: 16px var(--font-text); }
.locate-input:focus { outline: 2px solid var(--brass); outline-offset: 1px; }
.chart-tools .note { flex-basis: 100%; padding: 0; font-size: 19px; }
.chart-legend { flex-basis: 100%; padding-top: 4px; align-items: center; }
.chart-legend label { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; cursor: pointer; }
.chart-legend input { width: 18px; height: 18px; margin: 0; accent-color: var(--stamp); }
.hot-dot { background: var(--stamp); opacity: 0.7; }
.chart-updated { margin-left: auto; }
.chart-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.chart-notes .lede { font-size: 17px; }
.chart-empty { color: var(--paper); }
@media (max-width: 700px) {
  .chart-frame { margin: 8px 0 0; padding: 10px 10px 12px; transform: none; }
  .bigmap { height: 64vh; }
  .chart-notes { grid-template-columns: 1fr; }
  .chart-updated { margin-left: 0; flex-basis: 100%; }
}
