/* The site's look (SITE-PLAN.md): dark stone round windows of dark parchment, as the game's own
   windows are, gold headings, the same tokens as the browser game's gate (client web/index.html).
   Dark only; nothing is fetched from another site; the serif faces are the reader's own. */
:root {
  color-scheme: dark;
  --bg: #0c0a08; --stone: #1b1814; --stone-hi: #2c2721; --stone-lo: #0f0d0b;
  --panel: #1d1813; --raised: #29221a; --sunk: #110e0b; --line: #4a3d2b; --line-soft: #34291d;
  --text: #ecdfc2; --dim: #b4a384; --accent: #d9a441; --gold-hi: #f4d68a; --gold-lo: #8a6322;
  --bad: #ef8c75; --good: #a4d696; --wait: #e8c06a;
  --serif: "Cinzel", "Trajan Pro", "Cormorant SC", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --book: Georgia, "Palatino Linotype", "Book Antiqua", Palatino, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 6px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  color: var(--text); font: 16px/1.55 var(--sans);
  background-color: var(--bg);
  background:
    radial-gradient(ellipse 120% 60% at 50% -10%, #3a3128 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .5 0 0 0 0 .42 0 0 0 .2 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #1c1915 0%, #12100d 55%, #0a0907 100%) fixed;
}
a { color: var(--gold-hi); text-decoration-color: var(--gold-lo); text-underline-offset: 3px; }
a:hover { color: #fff1c4; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; padding: 8px 12px; background: var(--raised); border: 1px solid var(--accent); }
.skip:focus { left: 8px; }
.dim { color: var(--dim); }
.ok { color: var(--good); }
.wait { color: var(--wait); }
.bad-text { color: var(--bad); }

/* the top bar: a stone lintel */
.top {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(180deg, #2a241d, #17140f);
  border-bottom: 1px solid var(--gold-lo);
  box-shadow: 0 1px 0 #000, 0 6px 18px rgba(0, 0, 0, .55);
}
.bar { max-width: 1100px; margin: 0 auto; padding: 8px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--accent); font: 700 20px/1.1 var(--serif); letter-spacing: .06em; }
.brand span {
  background: linear-gradient(180deg, var(--gold-hi), var(--accent) 60%, #a8741f); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.top nav { display: flex; flex-wrap: wrap; gap: 2px 4px; flex: 1 1 auto; }
.top nav a, .who > a:not(.btn) {
  padding: 6px 10px; border-radius: 4px; color: var(--text); text-decoration: none;
  font: 600 14px var(--serif); letter-spacing: .08em; text-transform: uppercase;
}
.top nav a:hover, .who > a:not(.btn):hover { color: var(--gold-hi); background: rgba(217, 164, 65, .08); }
.top nav a[aria-current="page"], .who > a[aria-current="page"] { color: var(--gold-hi); box-shadow: inset 0 -2px 0 var(--accent); }
.who { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
form.inline { display: inline; margin: 0; }

main { flex: 1 0 auto; width: 100%; max-width: 1100px; margin: 0 auto; padding: 20px 16px 32px; }

/* a window: a stone frame, gold-edged, round dark parchment */
.card {
  position: relative; margin: 0 0 22px; padding: 20px 22px;
  background:
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(217, 164, 65, .08), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.04 .09' numOctaves='4'/%3E%3CfeColorMatrix values='0 0 0 0 .62 0 0 0 0 .5 0 0 0 0 .33 0 0 0 .10 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #2a2219 0%, #1e1913 45%, #17130f 100%);
  border: 1px solid var(--gold-lo); border-radius: var(--radius);
  box-shadow: 0 0 0 3px var(--stone), 0 0 0 4px #3d342a, 0 0 0 6px var(--stone-lo),
    inset 0 0 0 1px rgba(244, 214, 138, .08), inset 0 1px 18px rgba(0, 0, 0, .5), 0 14px 40px rgba(0, 0, 0, .6);
}
.card::before, .card::after { content: ""; position: absolute; width: 16px; height: 16px; pointer-events: none; border: 2px solid var(--accent); opacity: .8; }
.card::before { top: -3px; left: -3px; border-right: 0; border-bottom: 0; border-top-left-radius: var(--radius); }
.card::after { bottom: -3px; right: -3px; border-left: 0; border-top: 0; border-bottom-right-radius: var(--radius); }
.narrow { max-width: 620px; margin-left: auto; margin-right: auto; }
.narrow-left { max-width: 620px; }

h1, h2, h3 { font-family: var(--serif); color: var(--accent); letter-spacing: .04em; line-height: 1.2; overflow-wrap: anywhere; }
.page-title { margin: 0 0 12px; font-size: 28px; }
.card-title { margin: 0 0 12px; font-size: 20px; }
.section-title { margin: 6px 0 16px; font-size: 22px; text-transform: uppercase; letter-spacing: .14em; display: flex; align-items: center; gap: 12px; }
.section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); }
.section-title small { font-size: 13px; color: var(--dim); letter-spacing: .06em; }
.lede { color: var(--dim); font: 17px/1.55 var(--book); margin: 0 0 16px; }
.note { color: var(--dim); font-size: 14px; }
.big-note { font: 18px/1.5 var(--book); }
.rule { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--accent); font-size: 10px; }
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-lo) 30%, var(--accent)); }
.rule::after { background: linear-gradient(270deg, transparent, var(--gold-lo) 30%, var(--accent)); }

/* buttons: stone, and the gold one */
.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 4px; cursor: pointer; text-decoration: none;
  color: var(--text); font: 600 15px var(--sans);
  border: 1px solid var(--line); background: linear-gradient(180deg, var(--stone-hi), var(--stone) 60%, var(--stone-lo));
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, .08), 0 1px 2px rgba(0, 0, 0, .5);
}
.btn:hover { border-color: var(--gold-lo); color: var(--gold-hi); }
.btn.gold {
  color: #1d1405; border-color: #6b4a14; font: 700 15px var(--serif); letter-spacing: .08em;
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--accent) 50%, #a5711e 100%);
  box-shadow: inset 0 1px 0 rgba(255, 250, 220, .6), inset 0 -2px 0 rgba(0, 0, 0, .2), 0 2px 8px rgba(0, 0, 0, .6);
  text-shadow: 0 1px 0 rgba(255, 240, 200, .45);
}
.btn.gold:hover { filter: brightness(1.08); color: #1d1405; }
.btn.big { padding: 12px 22px; font-size: 17px; }
.btn.small { padding: 5px 11px; font-size: 13px; }
.btn.wide { width: 100%; margin-top: 18px; padding: 12px; font-size: 17px; }
button.link { background: none; border: 0; padding: 6px 4px; color: var(--dim); font: 500 14px var(--sans); text-decoration: underline; text-decoration-color: var(--gold-lo); text-underline-offset: 3px; cursor: pointer; }
button.link:hover { color: var(--gold-hi); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 6px; }

/* the home page's banner */
.hero { position: relative; margin: 4px 0 30px; padding: 44px 22px 36px; text-align: center; border-radius: var(--radius); overflow: hidden;
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(217, 164, 65, .18), transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 110%, rgba(0, 0, 0, .9), transparent 70%),
    linear-gradient(180deg, #241d16, #120f0b);
  border: 1px solid var(--gold-lo);
  box-shadow: 0 0 0 3px var(--stone), 0 0 0 4px #3d342a, 0 0 0 6px var(--stone-lo), 0 18px 50px rgba(0, 0, 0, .7);
}
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: url("/favicon.svg") center 30% / 260px no-repeat; filter: grayscale(.3) brightness(.35); }
.hero-inner { position: relative; max-width: 720px; margin: 0 auto; }
.kicker { margin: 0 0 8px; color: var(--dim); font: 600 13px var(--serif); letter-spacing: .3em; text-transform: uppercase; }
.title { margin: 0; font-size: clamp(36px, 8vw, 64px); letter-spacing: .08em;
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--accent) 55%, #a8741f 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .55)); }
.hero .lede { margin: 16px auto 0; max-width: 600px; }
.hero .actions { justify-content: center; margin-top: 24px; }
.hero .note { margin: 18px auto 0; max-width: 560px; }

/* news */
.post-card h3 { margin: 0 0 4px; font-size: 22px; }
.post-card h3 a { color: var(--accent); text-decoration: none; }
.post-card h3 a:hover { color: var(--gold-hi); }
.post-card p { margin: 8px 0; }
.meta { color: var(--dim); font-size: 13px; margin: 0 0 10px; }
.pin { margin: 0 0 6px; display: inline-block; padding: 1px 8px; font: 700 11px var(--serif); letter-spacing: .14em; text-transform: uppercase; color: #1d1405; background: var(--accent); border-radius: 3px; }
.thumb { display: block; float: right; width: min(220px, 38%); margin: 4px 0 8px 16px; }
.thumb img { display: block; border: 1px solid var(--line); border-radius: 4px; }
.post-card::after { clear: both; }
.post-card { overflow: hidden; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; }
.crumbs { margin: 0 0 8px; font-size: 14px; }
.prose { font: 17px/1.65 var(--book); }
.prose h2 { font-size: 21px; margin: 26px 0 8px; }
.prose h3 { font-size: 18px; margin: 20px 0 6px; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 14px; }
.prose img { display: block; margin: 12px auto; border: 1px solid var(--line); border-radius: 4px; }
.prose figure { margin: 16px 0; }
.prose figcaption { color: var(--dim); font-size: 14px; text-align: center; }
.prose blockquote { padding: 4px 14px; border-left: 3px solid var(--gold-lo); color: var(--dim); }
.prose code { font: 14px ui-monospace, Consolas, monospace; background: var(--sunk); padding: 1px 5px; border-radius: 3px; }
.prose pre { overflow-x: auto; background: var(--sunk); padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 4px; }
.prose hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); margin: 22px 0; }
.list { padding-left: 20px; }
.list li { margin: 6px 0; }

/* forms */
.form label { display: block; margin: 16px 0 5px; font: 600 15px var(--serif); letter-spacing: .04em; color: var(--text); }
.form input, .form textarea, select {
  width: 100%; padding: 10px 11px; font: 16px var(--sans); color: var(--text);
  background: var(--sunk); border: 1px solid var(--line); border-radius: 4px; box-shadow: inset 0 1px 4px rgba(0, 0, 0, .6);
}
.form textarea { resize: vertical; min-height: 110px; }
.form input:focus, .form textarea:focus, select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 2px rgba(217, 164, 65, .35), inset 0 1px 4px rgba(0, 0, 0, .6); }
.form [aria-invalid="true"] { border-color: var(--bad); }
.hint { margin: 5px 0 0; color: var(--dim); font-size: 13px; }
.field-error { margin: 8px 0 0; color: var(--bad); font-size: 14px; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* My Account */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.facts dt { color: var(--dim); font: 600 14px var(--serif); letter-spacing: .04em; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.gm-note { white-space: pre-line; padding: 8px 10px; background: rgba(0, 0, 0, .25); border-left: 3px solid var(--accent); border-radius: 3px; }
.badge { display: inline-block; padding: 1px 9px; border-radius: 10px; font: 700 12px var(--sans); letter-spacing: .04em; border: 1px solid var(--line); }
.badge.good { color: var(--good); border-color: #4c6b3f; background: rgba(120, 180, 100, .08); }
.badge.wait { color: var(--wait); border-color: #7a6022; background: rgba(217, 164, 65, .08); }
.badge.bad { color: var(--bad); border-color: #7a3c2e; background: rgba(230, 120, 100, .08); }
.about-you { margin-top: 16px; }
.about-you summary { cursor: pointer; color: var(--dim); }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
table.chars { width: 100%; border-collapse: collapse; font-size: 15px; }
.chars th { text-align: left; color: var(--dim); font: 600 13px var(--serif); letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid var(--line); padding: 6px 8px; }
.chars td { padding: 7px 8px; border-bottom: 1px solid var(--line-soft); }

/* Play */
.play-col p { margin: 10px 0; }

/* the map */
.map-page .map-tools { padding: 12px 14px; margin-bottom: 14px; }
.tool-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.tool-row select { width: auto; min-width: 170px; }
.zoom { display: flex; gap: 6px; }
.layers { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 10px 0 0; padding: 0; border: 0; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.follow-row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); font-size: 14px; }
.switch { font: 700 15px var(--serif); letter-spacing: .04em; color: var(--gold-hi); }
.map-frame { position: relative; height: min(78vh, 900px); min-height: 360px; border: 1px solid var(--gold-lo); border-radius: var(--radius); overflow: hidden; background: rgb(23, 28, 38);
  box-shadow: 0 0 0 3px var(--stone), 0 0 0 4px #3d342a, 0 0 0 6px var(--stone-lo), 0 14px 40px rgba(0, 0, 0, .6); }
#map-canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#map-canvas.dragging { cursor: grabbing; }
.map-tip { position: absolute; z-index: 5; max-width: min(320px, calc(100% - 24px)); padding: 8px 11px; font-size: 14px; pointer-events: none;
  background: linear-gradient(180deg, #2a2219, #1b1611); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 4px; box-shadow: 0 6px 20px #000a; }
.map-tip b { color: var(--gold-hi); font-family: var(--serif); }
.map-tip .q { margin-top: 4px; color: var(--dim); }
.map-msg { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); margin: 0; padding: 12px 16px; max-width: 90%; text-align: center; background: rgba(12, 10, 8, .88); border: 1px solid var(--line); border-radius: 4px; }
.map-coords { position: absolute; right: 8px; bottom: 4px; margin: 0; font: 12px ui-monospace, Consolas, monospace; text-shadow: 0 1px 2px #000; pointer-events: none; }

.foot { padding: 0 16px 24px; text-align: center; color: var(--dim); font-size: 13px; }
.foot p { max-width: 760px; margin: 0 auto; }

@media (max-width: 640px) {
  body { font-size: 15px; }
  .bar { padding: 6px 12px; gap: 4px 10px; }
  .brand { font-size: 18px; }
  .top nav { order: 3; flex-basis: 100%; justify-content: space-between; }
  .top nav a { padding: 6px 6px; font-size: 13px; letter-spacing: .05em; }
  .who { margin-left: auto; }
  .card { padding: 16px 14px; }
  .hero { padding: 30px 14px 26px; }
  .page-title { font-size: 24px; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
  .thumb { float: none; width: 100%; margin: 6px 0; }
  .map-frame { height: 70vh; }
}
