/* The website of Valdris (decision 150). It is drawn with the game's own interface kit, served by
   the site under /game/ (client/public/assets/ui): the stone wall behind everything, the windows of
   wood with their iron rim, the plank across the top of each window, the stone buttons, the sunken
   fields and the parchment of the book window. Every frame is a border-image at twice the size of
   the client's, so the pixels stay sharp. No font is fetched from elsewhere (U02, privacy). */

:root {
  --serif: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, 'DejaVu Serif', serif;
  --bone: #efe3c8;
  --bone-soft: #c2b498;
  --bone-dim: #8f846f;
  --ink: #2a2118;
  --ink-soft: #5e4f3c;
  --gold: #f0c060;
  --flame: #ffcc5a;
  --ember: #ff8a3a;
  --wax: #9b2420;
  --green: #8fc36a;
  --wall: #1c1719;
  --hollow: #231c1a;
  --panel-under: #5c5654;
  --title-under: #59412e;
  --button-under: #514844;
  --line: rgba(239, 227, 200, 0.12);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--bone);
  font: 17px/1.6 var(--serif);
  background: var(--wall) url(/game/ui/tex-wall@2x.png) repeat;
  background-size: 64px 64px;
  image-rendering: auto;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 140, 50, 0.1), transparent 70%),
    radial-gradient(ellipse 120% 90% at 50% 40%, transparent 40%, rgba(0, 0, 0, 0.7) 100%);
}
img.px, canvas.px, .px { image-rendering: pixelated; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--flame); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0 0 0.4em; letter-spacing: 0.02em; }
h2 { font-size: 26px; }
h3 { font-size: 20px; }
h4 { font-size: 17px; }
p { margin: 0 0 0.8em; }
ul, ol { margin: 0 0 0.9em; padding-left: 1.3em; }
li { margin: 0.2em 0; }
.hidden { display: none !important; }
.sc { font-variant: small-caps; letter-spacing: 0.06em; }
.muted { color: var(--bone-soft); }
.dim { color: var(--bone-dim); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
:focus-visible { outline: 2px solid var(--flame); outline-offset: 2px; }

/* ------------------------------------------------------------------ the bar at the top */

.bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #2a1e18 url(/game/ui/tex-wood@2x.png) repeat;
  background-size: 256px 64px;
  border-bottom: 4px solid #120c0a;
  box-shadow: 0 2px 0 #4a3a2c, 0 8px 24px rgba(0, 0, 0, 0.6);
}
.bar-in { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 18px; padding: 0 18px; height: 64px; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 40px; width: auto; display: block; image-rendering: pixelated; filter: drop-shadow(0 2px 0 #000); }
.menu { display: flex; align-items: stretch; gap: 2px; flex: 1; height: 100%; }
.group { position: relative; display: flex; align-items: center; }
.group > button, .group > a.top-link {
  display: flex; align-items: center; gap: 7px; height: 100%; padding: 0 14px;
  background: none; border: 0; cursor: pointer;
  color: var(--bone); font: 700 15px var(--serif); font-variant: small-caps; letter-spacing: 0.08em; text-decoration: none;
  text-shadow: 1px 1px 0 #000;
}
.group > button img { width: 16px; height: 16px; opacity: 0.85; image-rendering: pixelated; }
.group:hover > button, .group.open > button, .group > button:focus-visible, .group > a.top-link:hover, .group.here > button, .group.here > a.top-link { color: var(--flame); }
.group.here > button::after, .group.here > a.top-link::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 8px; height: 2px; background: var(--flame); box-shadow: 0 0 8px var(--flame); }
.drop {
  position: absolute; top: calc(100% - 6px); left: -6px; min-width: 300px; display: none; z-index: 60;
  padding: 6px;
}
.group:hover .drop, .group.open .drop, .group:focus-within .drop { display: block; }
.drop a {
  display: grid; grid-template-columns: 32px 1fr; gap: 2px 12px; align-items: center;
  padding: 8px 10px; color: var(--bone); text-decoration: none;
}
.drop a img { grid-row: span 2; width: 32px; height: 32px; image-rendering: pixelated; }
.drop a b { font-size: 16px; font-weight: 700; }
.drop a span { font-size: 13px; color: var(--bone-soft); line-height: 1.3; }
.drop a:hover, .drop a:focus-visible { background: rgba(255, 204, 90, 0.08); color: var(--flame); }
.drop a.here b { color: var(--flame); }
.actions { display: flex; align-items: center; gap: 10px; flex: none; }
.bar .burger { display: none; }

/* ------------------------------------------------------------------ windows: the kit's frames */

.window, .drop-box {
  position: relative;
  color: var(--bone);
  background:
    url(/game/ui/tex-wood@2x.png) 0 0 / 256px 64px repeat padding-box,
    linear-gradient(var(--panel-under) 0 0) 2px 2px / calc(100% - 4px) calc(100% - 4px) no-repeat border-box;
  border: 6px solid transparent;
  border-image: url(/game/ui/frame-panel@2x.png) 16 / 16px stretch;
  box-shadow: var(--shadow);
}
.window { margin: 0 0 22px; }
.window > .plank {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  height: 32px; margin: -2px -2px 0; padding: 0 6px;
  background: var(--title-under) padding-box;
  border-style: solid; border-color: transparent; border-width: 4px 12px 4px 12px;
  border-image: url(/game/ui/frame-title@2x.png) 16 16 8 16 fill / 16px 16px 8px 16px stretch;
  color: #f6e7c4; font: 700 14px var(--serif); font-variant: small-caps; letter-spacing: 0.14em;
  text-shadow: 1px 1px 0 #1a100a; white-space: nowrap; overflow: hidden;
}
.window > .plank a, .window.paper > .plank a { color: var(--flame); font-size: 13px; letter-spacing: 0.06em; text-decoration: none; }
.window > .plank .muted, .window.paper > .plank .muted { color: #d8c49c; font-size: 13px; letter-spacing: 0.06em; }
.window > .plank a:hover { text-decoration: underline; }
.window > .body { padding: 18px 22px 20px; }
.window > .body > :last-child { margin-bottom: 0; }
.window h2, .window h3 { color: var(--gold); text-shadow: 1px 1px 0 #000; }

/* The page of a book: parchment inside the same window, ink on it. */
.window.paper > .body {
  margin: 4px; padding: 26px 34px 28px;
  color: var(--ink);
  background: #e7d6ae url(/game/ui/tex-parchment@2x.png) 0 0 / 128px 128px repeat;
  box-shadow: inset 0 0 0 2px #b59c6c, inset 0 0 40px rgba(110, 70, 20, 0.25);
}
.window.paper h2, .window.paper h3, .window.paper h4 { color: #3a2410; text-shadow: none; }
.window.paper a { color: #7a2a10; }
.window.paper a:hover { color: #b8461a; }
.window.paper .muted { color: var(--ink-soft); }
.window.paper .hollow a { color: var(--bone); }
.window.paper hr { border: 0; border-top: 1px solid rgba(90, 60, 30, 0.3); margin: 18px 0; }

/* A dark hollow inside a window: tables, lists, the chart. */
.hollow {
  color: var(--bone);
  background: var(--hollow) padding-box;
  border: 4px solid transparent;
  border-image: url(/game/ui/frame-sunken@2x.png) 8 / 8px stretch;
}

/* ------------------------------------------------------------------ buttons and fields */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 4px 18px;
  color: var(--bone); font: 700 15px var(--serif); font-variant: small-caps; letter-spacing: 0.08em;
  text-decoration: none; text-shadow: 1px 1px 0 #000; cursor: pointer; white-space: nowrap;
  background: var(--button-under) padding-box;
  border: 6px solid transparent;
  border-image: url(/game/ui/frame-button@2x.png) 8 fill / 8px stretch;
}
.btn:hover { color: var(--flame); border-image: url(/game/ui/frame-button-hover@2x.png) 8 fill / 8px stretch; }
.btn:active { border-image: url(/game/ui/frame-button-pressed@2x.png) 8 fill / 8px stretch; }
.btn:disabled { opacity: 0.55; cursor: wait; }
.btn.small { min-height: 32px; padding: 0 12px; font-size: 13px; }
/* The call of the Flame: ember and gold, the one bright button of a page. */
.btn.cta {
  border: 0; border-image: none; min-height: 44px; padding: 0 22px;
  color: #1c0d04; text-shadow: 0 1px 0 rgba(255, 230, 170, 0.6);
  background: linear-gradient(#ffd98a, #e8962e 55%, #c86a1c);
  box-shadow: 0 0 0 2px #1c0d04, 0 0 0 4px #a8742a, 0 0 22px rgba(255, 150, 50, 0.45);
}
.btn.cta:hover { color: #000; background: linear-gradient(#ffe4a6, #f2a43c 55%, #d4762a); box-shadow: 0 0 0 2px #1c0d04, 0 0 0 4px #e0a850, 0 0 30px rgba(255, 170, 70, 0.7); }
.btn.cta.big { min-height: 52px; padding: 0 30px; font-size: 18px; }

.field { display: block; margin: 0 0 14px; }
.field > b { display: block; font: 700 13px var(--serif); font-variant: small-caps; letter-spacing: 0.1em; color: var(--bone-soft); margin-bottom: 4px; }
.window.paper .field > b { color: var(--ink-soft); }
.field input, .field select, .input {
  width: 100%; min-height: 40px; padding: 4px 10px;
  color: var(--bone); font: 17px var(--serif);
  background: var(--hollow) padding-box;
  border: 4px solid transparent;
  border-image: url(/game/ui/frame-sunken@2x.png) 8 / 8px stretch;
}
.field input:focus, .field select:focus, .input:focus { outline: none; box-shadow: 0 0 0 2px var(--flame); }
.field .hint { display: block; font-size: 13px; color: var(--bone-dim); margin-top: 4px; }
.window.paper .field .hint { color: var(--ink-soft); }
.error { color: #ff9a7a; min-height: 1.4em; margin: 8px 0 0; font-style: italic; }
.window.paper .error { color: #9b2420; }
.okay { color: var(--green); font-style: italic; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.45; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: #e8962e; flex: none; }

/* ------------------------------------------------------------------ the scene at the top */

.hero, .banner { position: relative; overflow: hidden; background: #1a1016 url(/assets/siege.png) 70% 30% / cover no-repeat; border-bottom: 4px solid #120c0a; z-index: 1; }
.hero canvas, .banner canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.hero::after, .banner::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(10, 6, 10, 0.75) 0%, rgba(10, 6, 10, 0.35) 45%, transparent 70%), linear-gradient(transparent 70%, rgba(10, 6, 10, 0.85)); }
.hero { height: clamp(460px, 68vh, 680px); }
.hero-in, .banner-in { position: relative; z-index: 2; max-width: 1240px; height: 100%; margin: 0 auto; padding: 0 28px; display: flex; flex-direction: column; justify-content: center; }
.hero-in .logo { width: min(520px, 80vw); image-rendering: pixelated; filter: drop-shadow(0 4px 0 #000) drop-shadow(0 0 30px rgba(0, 0, 0, 0.6)); margin-bottom: 14px; }
.hero-in .tag { font-size: clamp(19px, 2.2vw, 25px); color: #fbe7bd; text-shadow: 0 2px 0 #000, 0 0 18px #000; max-width: 560px; margin: 0 0 26px; font-style: italic; }
.hero-in .row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-in .status { margin-top: 22px; display: inline-flex; align-items: center; gap: 10px; color: var(--bone-soft); font-size: 15px; text-shadow: 1px 1px 0 #000; }
.banner { height: 240px; }
.banner-in { justify-content: flex-end; padding-bottom: 30px; }
.banner-in .kicker { color: var(--flame); font: 700 13px var(--serif); font-variant: small-caps; letter-spacing: 0.2em; margin: 0 0 4px; text-shadow: 1px 1px 0 #000; }
.banner-in h1 { font-size: clamp(32px, 4.4vw, 50px); color: #fff1d0; text-shadow: 0 3px 0 #000, 0 0 24px rgba(0, 0, 0, 0.8); margin: 0; letter-spacing: 0.04em; }
.banner-in .sub { color: #e8d9b8; font-style: italic; margin: 6px 0 0; text-shadow: 1px 1px 0 #000; max-width: 640px; }
.lamp { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #6a6054; box-shadow: inset 0 0 0 1px #000; flex: none; }
.lamp.lit { background: var(--flame); box-shadow: 0 0 10px var(--flame); }
.lamp.out { background: #b33; box-shadow: 0 0 8px #b33; }
.lamp.white { background: #fff; box-shadow: 0 0 10px #fff; }

/* ------------------------------------------------------------------ the page */

.page { position: relative; z-index: 2; max-width: 1240px; margin: 28px auto 0; padding: 0 18px; display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.page.wide { grid-template-columns: minmax(0, 1fr); }
.main { min-width: 0; }
.side { position: sticky; top: 84px; }
.side .window > .body { padding: 14px 16px 16px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

/* The world tonight: three numbers. */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; }
.stats > div { padding: 10px 6px; }
.stats b { display: block; font-size: 28px; color: var(--flame); text-shadow: 0 0 12px rgba(255, 180, 60, 0.35); line-height: 1.1; }
.stats span { font-size: 12px; color: var(--bone-soft); font-variant: small-caps; letter-spacing: 0.08em; }
.side .stats b { font-size: 24px; }

/* Lists of names, with a number and a value. */
.names { list-style: none; margin: 0; padding: 0; }
.names li { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: baseline; padding: 6px 4px; border-bottom: 1px solid var(--line); margin: 0; }
.names li:last-child { border-bottom: 0; }
.names .n { color: var(--gold); font-variant: small-caps; font-size: 14px; }
.names a { color: var(--bone); text-decoration: none; font-weight: 700; }
.names a:hover { color: var(--flame); }
.names .v { color: var(--flame); font-weight: 700; }
.names .s { grid-column: 2 / -1; font-size: 13px; color: var(--bone-dim); margin-top: -2px; }
.empty { color: var(--bone-dim); font-style: italic; padding: 8px 4px; }
.names li.empty { display: block; border: 0; }

table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font: 700 12px var(--serif); font-variant: small-caps; letter-spacing: 0.12em; color: var(--bone-soft); padding: 10px 12px; border-bottom: 2px solid rgba(0, 0, 0, 0.5); }
.table td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.table tbody tr:hover td { background: rgba(255, 204, 90, 0.05); }
.table td.n { color: var(--gold); width: 52px; }
.table td.v, .table th.v { text-align: right; }
.table td.v { color: var(--flame); font-weight: 700; }
.table a { color: var(--bone); font-weight: 700; text-decoration: none; }
.table a:hover { color: var(--flame); }
.table tr.me td { background: rgba(255, 204, 90, 0.08); }
.table td.pk { color: #ff8a7a; font-weight: 700; }

/* Choices (tabs of the Hall, the floors of the chart). */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.tabs button { cursor: pointer; padding: 3px 12px; min-height: 34px; color: var(--bone-soft); font: 700 14px var(--serif); font-variant: small-caps; letter-spacing: 0.06em; background: var(--button-under) padding-box; border: 6px solid transparent; border-image: url(/game/ui/frame-button@2x.png) 8 fill / 8px stretch; }
.tabs button:hover { color: var(--flame); }
.tabs button.on { color: #1c0d04; text-shadow: none; background: #e8a33a padding-box; border-image: url(/game/ui/frame-button-pressed@2x.png) 8 / 8px stretch; }

/* ------------------------------------------------------------------ the home */

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step { position: relative; padding: 16px 16px 14px 60px; min-height: 120px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 12px; top: 14px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: #1c0d04; font-weight: 700; font-size: 18px; background: radial-gradient(circle at 40% 35%, #ffe0a0, #e8962e 60%, #a8551a); box-shadow: 0 0 0 2px #1c0d04, 0 0 14px rgba(255, 150, 50, 0.4); }
.step h3 { font-size: 18px; margin-bottom: 4px; }
.step p { font-size: 15px; color: var(--bone-soft); margin: 0 0 8px; }
.news article { padding: 0 0 16px; margin: 0 0 16px; border-bottom: 1px dashed rgba(90, 60, 30, 0.35); }
.news article:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.news .when { font: 700 12px var(--serif); font-variant: small-caps; letter-spacing: 0.12em; color: #8a5a2a; }
.news h3 { margin: 2px 0 6px; }
.paths { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.path { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 14px 10px 16px; text-decoration: none; color: var(--bone); background: rgba(0, 0, 0, 0.22); box-shadow: inset 0 0 0 1px rgba(255, 220, 160, 0.08); transition: background 0.15s; }
.path:hover { background: rgba(255, 204, 90, 0.08); color: var(--bone); }
.path .arch { width: 120px; height: 150px; border-radius: 60px 60px 0 0; background: radial-gradient(circle at 50% 80%, rgba(255, 170, 70, 0.22), transparent 60%), #0f1218; box-shadow: inset 0 0 0 3px #6a5e48, 0 0 0 3px #2a2018; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; margin-bottom: 10px; }
.path .arch canvas { width: 110px; height: 110px; margin-bottom: 4px; }
.path b { font-size: 19px; color: var(--gold); }
.path i { font-size: 13px; color: var(--bone-soft); margin: 2px 0 6px; }
.path span { font-size: 14px; line-height: 1.4; color: var(--bone-soft); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 14px; text-decoration: none; color: var(--bone); background: rgba(0, 0, 0, 0.22); box-shadow: inset 0 0 0 1px rgba(255, 220, 160, 0.08); }
.tile img { width: 32px; height: 32px; image-rendering: pixelated; }
.tile b { color: var(--gold); font-size: 16px; }
.tile span { font-size: 13px; color: var(--bone-soft); line-height: 1.35; }
.tile:hover { background: rgba(255, 204, 90, 0.08); }

/* ------------------------------------------------------------------ reading pages */

.lede { font-size: 19px; font-style: italic; color: var(--ink-soft); margin-bottom: 1em; }
.toc { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 6px; padding: 0; list-style: none; font-size: 15px; }
.toc a { text-decoration: none; }
.rule { display: grid; grid-template-columns: 54px 1fr; gap: 0 16px; padding: 14px 0; border-bottom: 1px solid rgba(90, 60, 30, 0.25); }
.rule:last-of-type { border-bottom: 0; }
.rule .num { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; font: 700 20px var(--serif); color: #fff1d0; background: radial-gradient(circle at 40% 35%, #c0392b, #7a1712 70%); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); }
.rule h3 { margin: 6px 0 4px; }
.rule p { margin: 0 0 6px; }
.yesno { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 6px 0 2px; font-size: 15px; }
.yesno div { padding: 8px 12px; background: rgba(255, 255, 255, 0.25); box-shadow: inset 0 0 0 1px rgba(90, 60, 30, 0.25); }
.yesno b { display: block; font-variant: small-caps; letter-spacing: 0.08em; font-size: 13px; }
.yesno .ok b { color: #2f5a2a; }
.yesno .no b { color: #9b2420; }
.yesno ul { margin: 2px 0 0; padding-left: 1.1em; }
.callout { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; padding: 12px 14px; margin: 10px 0 16px; background: rgba(155, 36, 32, 0.08); box-shadow: inset 3px 0 0 #9b2420; }
.callout.calm { background: rgba(60, 100, 50, 0.08); box-shadow: inset 3px 0 0 #3f6a33; }
.callout img { width: 32px; height: 32px; image-rendering: pixelated; }
.callout p { margin: 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 6px 0 12px; }
.facts dt { font: 700 13px var(--serif); font-variant: small-caps; letter-spacing: 0.08em; color: var(--ink-soft); padding-top: 3px; }
.window:not(.paper) .facts dt { color: var(--bone-soft); }
.facts dd { margin: 0; }
.marks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 8px 0 14px; }
.marks div { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; padding: 8px 10px; background: rgba(255, 255, 255, 0.25); box-shadow: inset 0 0 0 1px rgba(90, 60, 30, 0.25); font-size: 15px; line-height: 1.35; }
.marks img { width: 32px; height: 32px; image-rendering: pixelated; }
.keys { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 6px 0 14px; font-size: 15px; }
kbd { display: inline-block; min-width: 26px; padding: 1px 7px; font: 700 13px var(--serif); text-align: center; color: var(--bone); background: #3a302a; border-radius: 3px; box-shadow: inset 0 -2px 0 #1a1410, 0 0 0 1px #000; }

/* ------------------------------------------------------------------ the library */

.creature { display: grid; grid-template-columns: 228px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.creature:last-child { border-bottom: 0; }
.creature .portrait { width: 228px; height: 228px; padding: 6px; box-sizing: border-box; display: flex; align-items: flex-end; justify-content: center; background: radial-gradient(circle at 50% 75%, rgba(255, 170, 70, 0.16), transparent 62%), #0f1218; box-shadow: inset 0 0 0 3px #4a3e30, 0 0 0 3px #1a1410; overflow: hidden; }
.creature .portrait img { max-width: 216px; max-height: 216px; image-rendering: pixelated; }
.creature h3 { margin: 0; color: var(--gold); }
.creature .boss { display: inline-block; margin-left: 8px; padding: 0 8px; font: 700 12px var(--serif); font-variant: small-caps; letter-spacing: 0.1em; color: #1c0d04; background: #e8a33a; vertical-align: 4px; }
.creature .kind { color: var(--bone-soft); font-style: italic; margin: 2px 0 8px; }
.creature .nums { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 8px; font-size: 15px; }
.creature .nums b { color: var(--flame); }
.creature .say { color: var(--bone-soft); font-style: italic; font-size: 15px; }
.loot { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; padding: 0; list-style: none; }
.loot li { margin: 0; padding: 2px 10px; font-size: 14px; background: rgba(0, 0, 0, 0.3); box-shadow: inset 0 0 0 1px rgba(255, 220, 160, 0.1); }
.loot li i { font-style: normal; font-size: 12px; color: var(--bone-dim); margin-left: 6px; font-variant: small-caps; }
.loot li.always i { color: var(--green); }
.loot li.rare i, .loot li.very-rare i { color: #e0a0ff; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 6px; }
.filters .input { max-width: 260px; }

/* The Words of Power. */
.roots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 14px; margin: 6px 0 4px; }
.roots div { display: flex; gap: 8px; align-items: baseline; padding: 4px 8px; background: rgba(255, 255, 255, 0.25); box-shadow: inset 0 0 0 1px rgba(90, 60, 30, 0.2); font-size: 15px; }
.roots b { font-style: italic; color: #7a2a10; min-width: 38px; }
.words { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.word { padding: 12px 14px 10px; background: rgba(0, 0, 0, 0.25); box-shadow: inset 0 0 0 1px rgba(255, 220, 160, 0.1); }
.word.open { box-shadow: inset 0 0 0 1px rgba(255, 204, 90, 0.45); }
.word-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.word h3 { margin: 0; font-size: 19px; color: var(--gold); }
.word p { margin: 4px 0; font-size: 15px; }
.word .say { font-style: italic; font-size: 18px; color: var(--flame); letter-spacing: 0.04em; text-shadow: 0 0 10px rgba(255, 180, 60, 0.25); }
.word .who { color: var(--bone-soft); font-size: 14px; }
.word .taught { color: var(--bone-dim); font-size: 13px; font-style: italic; }
.word .taught.now { color: var(--green); font-style: normal; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.chip { padding: 1px 8px; font-size: 13px; color: var(--bone-soft); background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 1px rgba(255, 220, 160, 0.12); white-space: nowrap; }
.chip b { color: var(--bone); }
.chip.el-fire { color: #ffb070; }
.chip.el-lightning { color: #c9b8ff; }
.chip.el-ice { color: #a8dcff; }
.chip.el-earth { color: #b6d68a; }
.chip.el-death { color: #d0a0c8; }
.chip.el-holy-light { color: #ffe9a8; }

/* The People of Brumaval. */
.person { display: grid; grid-template-columns: 170px 1fr; gap: 22px; margin-bottom: 10px; }
.person .arch { width: 160px; height: 200px; border-radius: 80px 80px 0 0; background: radial-gradient(circle at 50% 80%, rgba(255, 170, 70, 0.22), transparent 62%), #0f1218; box-shadow: inset 0 0 0 3px #6a5e48, 0 0 0 3px #2a2018; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.person .arch canvas { width: 150px; height: 150px; margin-bottom: 4px; image-rendering: pixelated; }
.person h2 { margin: 0; }
.quote { font-style: italic; color: var(--ink-soft); margin: 4px 0; }
.window.paper .chip { color: #4a3420; background: rgba(255, 255, 255, 0.35); box-shadow: inset 0 0 0 1px rgba(90, 60, 30, 0.25); }
.window.paper .chip.topic { font-style: italic; color: #7a2a10; }

/* The Armoury. */
.shelf { margin: 0 0 22px; }
.shelf h3 { margin: 6px 0 8px; }
.scroll { overflow-x: auto; }
.table.items td { vertical-align: top; }
.table.items td.sprite { width: 60px; padding: 6px 4px 6px 10px; }
.table.items td.sprite img { width: 48px; height: 48px; image-rendering: pixelated; display: block; }
.table.items .item-name { color: var(--gold); font-size: 16px; }
.table.items .desc { font-size: 14px; color: var(--bone-soft); font-style: italic; margin: 2px 0 2px; }
.table.items td.where { font-size: 14px; white-space: nowrap; }
.table.items td.where b { color: var(--flame); }
.table.items td.where a { font-weight: 700; }
.table.items .badge { margin-left: 6px; }

.vocation { display: grid; grid-template-columns: 210px 1fr; gap: 26px; }
.vocation .arch { width: 200px; height: 250px; border-radius: 100px 100px 0 0; background: radial-gradient(circle at 50% 80%, rgba(255, 170, 70, 0.24), transparent 62%), #0f1218; box-shadow: inset 0 0 0 4px #6a5e48, 0 0 0 4px #2a2018; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.vocation .arch canvas { width: 180px; height: 180px; margin-bottom: 6px; }
.vocation .motto { font-style: italic; color: var(--ink-soft); margin: -2px 0 10px; }
.gains { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.gains span { padding: 3px 12px; font-size: 14px; background: rgba(255, 255, 255, 0.3); box-shadow: inset 0 0 0 1px rgba(90, 60, 30, 0.25); }
.gains b { color: #7a2a10; }
.spells { columns: 2; column-gap: 26px; margin: 4px 0 10px; padding: 0; list-style: none; font-size: 15px; }
.spells li { break-inside: avoid; margin: 0 0 4px; }
.spells i { font-style: normal; color: var(--ink-soft); font-size: 13px; }

.chart-frame { position: relative; overflow: hidden; background: #0c1017; }
.chart-canvas { display: block; width: 100%; height: auto; cursor: grab; touch-action: none; }
.chart-canvas:active { cursor: grabbing; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; color: var(--bone-soft); margin-top: 10px; }

.outfit { display: grid; grid-template-columns: 170px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid rgba(90, 60, 30, 0.25); }
.outfit:last-child { border-bottom: 0; }
.outfit .arch { width: 160px; height: 190px; border-radius: 80px 80px 0 0; background: #0f1218; box-shadow: inset 0 0 0 3px #6a5e48, 0 0 0 3px #2a2018; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.outfit .arch canvas { width: 150px; height: 150px; margin-bottom: 4px; }
.outfit .addon { margin: 8px 0 0; padding: 8px 12px; background: rgba(255, 255, 255, 0.25); box-shadow: inset 0 0 0 1px rgba(90, 60, 30, 0.25); }
.outfit .addon b { color: #3a2410; }
.badge { display: inline-block; padding: 0 8px; font: 700 12px var(--serif); font-variant: small-caps; letter-spacing: 0.08em; vertical-align: 2px; }
.badge.open { color: #fff; background: #3f6a33; }
.badge.later { color: #fff1d0; background: #6a5236; }
.badge.spell { color: #e8eef8; background: #3c4a5e; }
.badge.rune { color: #f4e8fa; background: #5c3a6a; }

/* ------------------------------------------------------------------ the account */

.keepers { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.keeper { position: relative; text-align: center; padding: 14px 12px 14px; background: rgba(0, 0, 0, 0.25); box-shadow: inset 0 0 0 1px rgba(255, 220, 160, 0.1); }
.keeper .arch { margin: 0 auto 10px; width: 130px; height: 160px; border-radius: 65px 65px 0 0; background: radial-gradient(circle at 50% 80%, rgba(255, 170, 70, 0.2), transparent 62%), #0f1218; box-shadow: inset 0 0 0 3px #6a5e48, 0 0 0 3px #2a2018; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.keeper .arch canvas { width: 116px; height: 116px; margin-bottom: 4px; }
.keeper h3 { margin: 0; font-size: 19px; color: var(--gold); }
.keeper .what { color: var(--bone-soft); font-size: 15px; }
.keeper .where { font-size: 14px; color: var(--bone-dim); margin: 4px 0 10px; display: flex; gap: 6px; align-items: center; justify-content: center; }
.keeper.leaving .arch canvas { filter: grayscale(1) brightness(0.55); }
.keeper .ribbon { position: absolute; left: 0; right: 0; top: 132px; padding: 4px 0; font: 700 13px var(--serif); font-variant: small-caps; letter-spacing: 0.08em; color: #f0dcb0; background: rgba(42, 24, 14, 0.92); }
.keeper .confirm { margin-top: 10px; text-align: left; }
.keeper .buttons { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.narrow { max-width: 560px; }
#new-picker { margin: 6px 0 16px; }
.settings .line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.settings .line em { color: var(--bone-dim); font-size: 14px; margin-left: 6px; }
.settings form { padding: 12px 0 4px; }
.log { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.log li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); margin: 0; }
.log .bad { color: #ff9a7a; }
/* The guilds: the Ledger's floor (one box per Keeper) and the ranks of a guild's page. */
.guildbox { padding: 14px 16px 6px; margin: 0 0 16px; background: rgba(0, 0, 0, 0.25); box-shadow: inset 0 0 0 1px rgba(255, 220, 160, 0.1); }
.guildbox h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; color: var(--gold); border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.guildbox h3 .dim { font-size: 15px; font-weight: 400; }
.guildbox h4 { margin: 16px 0 6px; color: var(--bone-soft); font-variant: small-caps; letter-spacing: 0.08em; }
.guildbox .error:empty { display: none; }
.gfold { margin: 8px 0; border-top: 1px solid var(--line); }
.gfold > summary { cursor: pointer; padding: 8px 0; font: 700 16px var(--serif); font-variant: small-caps; letter-spacing: 0.08em; color: var(--bone-soft); list-style: none; }
.gfold > summary::-webkit-details-marker { display: none; }
.gfold > summary::before { content: '+ '; display: inline-block; width: 1.1em; color: var(--gold); }
.gfold[open] > summary::before { content: '- '; }
.gfold > summary:hover { color: var(--flame); }
.gfold[open] { padding-bottom: 6px; }
.gform { max-width: 560px; margin: 0 0 10px; }
.gform .field { margin-bottom: 8px; }
.gform.inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.gform.inline .field { flex: 1 1 200px; margin: 0; }
.gform.inline .btn { margin-bottom: 4px; }
.gform.inline .error { flex-basis: 100%; margin: 0; }
.gform textarea.input { width: 100%; resize: vertical; }
.gbuttons { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gbuttons select.input { width: auto; min-height: 32px; font-size: 15px; }
.gmembers li { align-items: center; }
.rank { margin: 0 0 14px; }
.rank h3 { color: var(--gold); margin-bottom: 4px; }
.rank h3 .dim { font-size: 14px; font-weight: 400; }
.roster li { grid-template-columns: 18px 1fr auto; align-items: center; }
.keybox { font: 700 24px 'Courier New', monospace; letter-spacing: 0.12em; color: var(--flame); background: var(--hollow); padding: 14px; margin: 12px 0; text-align: center; user-select: all; box-shadow: inset 0 0 0 2px #6a5a40; }

/* The outfit picker of the oath and of a new Keeper. */
.picker { display: grid; grid-template-columns: 180px 1fr; gap: 18px; align-items: start; }
.picker .arch { width: 170px; height: 210px; border-radius: 85px 85px 0 0; background: radial-gradient(circle at 50% 80%, rgba(255, 170, 70, 0.24), transparent 62%), #0f1218; box-shadow: inset 0 0 0 3px #6a5e48, 0 0 0 3px #2a2018; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.picker .arch canvas { width: 156px; height: 156px; margin-bottom: 4px; }
.picker b.label { display: block; font: 700 13px var(--serif); font-variant: small-caps; letter-spacing: 0.1em; color: var(--bone-soft); margin: 2px 0 5px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, 26px); max-width: 296px; gap: 4px; margin-bottom: 8px; }
.swatches button { width: 26px; height: 26px; border: 2px solid #120c0a; cursor: pointer; padding: 0; }
.swatches button.on { outline: 3px solid var(--flame); outline-offset: 0; }

/* The roll: one Keeper's page. */
.sheet { display: grid; grid-template-columns: 210px 1fr; gap: 26px; }
.sheet .arch { width: 200px; height: 250px; border-radius: 100px 100px 0 0; background: radial-gradient(circle at 50% 80%, rgba(255, 170, 70, 0.24), transparent 62%), #0f1218; box-shadow: inset 0 0 0 4px #6a5e48, 0 0 0 4px #2a2018; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.sheet .arch canvas, .sheet .arch img { width: 180px; height: 180px; margin-bottom: 6px; image-rendering: pixelated; }
.sheet h2 { font-size: 32px; margin: 0; }
.sheet .title { color: var(--bone-soft); font-style: italic; margin: 2px 0 12px; }
.deaths p { margin: 6px 0; font-size: 15px; }
.deaths .pk { color: #ff8a7a; }
.search { display: flex; gap: 10px; align-items: flex-end; }
.search .field { flex: 1; margin: 0; }

/* ------------------------------------------------------------------ the oath */

body.oath { background: #070506; }
body.oath::before { background: radial-gradient(circle at 50% 18%, rgba(255, 150, 60, 0.18), transparent 40%), radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.8)); }
.embers { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.embers i { position: absolute; bottom: -10px; width: 3px; height: 3px; background: var(--ember); box-shadow: 0 0 6px var(--ember); animation: rise linear infinite; opacity: 0.8; }
.embers i.pale { background: #ffd27a; }
@keyframes rise { to { transform: translate(var(--dx, 20px), -110vh); opacity: 0; } }
.altar { position: relative; z-index: 2; max-width: 900px; margin: 0 auto; padding: 36px 18px 10px; text-align: center; }
.altar .stand { height: 170px; display: flex; align-items: flex-end; justify-content: center; }
.flame { width: 24px; height: 24px; background: url(/game/login/flame.png) 0 0 / 144px 24px; image-rendering: pixelated; transform: scale(8); transform-origin: 50% 100%; animation: burn 0.66s steps(6) infinite; filter: drop-shadow(0 0 3px #ffb040); }
@keyframes burn { to { background-position: -144px 0; } }
.brazier { width: 110px; height: 16px; background: linear-gradient(#5a4a3a, #2a2018); border: 2px solid #000; margin: 0 auto 22px; box-shadow: 0 0 30px rgba(255, 140, 40, 0.35); }
.altar h1 { font-size: clamp(26px, 4vw, 42px); letter-spacing: 0.12em; color: #fff1d0; text-shadow: 0 0 22px rgba(255, 150, 60, 0.45); margin: 0; }
.altar .sub { color: var(--bone-dim); font-style: italic; margin: 6px 0 22px; }
.vow { text-align: left; font-size: 21px; line-height: 2.1; margin: 0 0 6px; }
.vow input { font: italic 700 20px var(--serif); color: var(--gold); background: transparent; border: 0; border-bottom: 1px solid #7a6a48; width: 210px; padding: 0 4px; text-align: center; }
.vow input.mail { width: 290px; }
.vow input:focus { outline: none; border-color: var(--flame); box-shadow: 0 6px 10px -8px var(--flame); }
.window.paper .vow input { color: #7a2a10; border-bottom-color: #8a6a3a; }
.window.paper .vow input::placeholder { color: rgba(90, 60, 30, 0.45); font-weight: 400; }
.window.paper .vow input:focus { border-color: #b8461a; box-shadow: 0 6px 10px -8px #b8461a; }
.oath .window { text-align: left; margin-top: 18px; }
.oath .swear { margin: 18px auto 0; display: flex; }
.paths-mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.paths-mini div { padding: 10px 10px 12px; background: rgba(0, 0, 0, 0.25); box-shadow: inset 0 0 0 1px rgba(255, 220, 160, 0.08); font-size: 14px; line-height: 1.4; color: var(--bone-soft); }
.paths-mini b { display: block; color: var(--gold); font-size: 16px; }
.paths-mini i { display: block; font-size: 13px; color: var(--bone-dim); margin-bottom: 4px; }

/* ------------------------------------------------------------------ the foot */

.foot { position: relative; z-index: 2; margin-top: 40px; background: rgba(10, 7, 8, 0.85); border-top: 4px solid #120c0a; box-shadow: 0 -2px 0 #3a2e24; }
.foot-in { max-width: 1240px; margin: 0 auto; padding: 28px 18px 34px; display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 24px; font-size: 14px; color: var(--bone-dim); }
.foot-in b { display: block; color: var(--bone-soft); font-variant: small-caps; letter-spacing: 0.1em; margin-bottom: 6px; }
.foot-in a { display: block; color: var(--bone-soft); text-decoration: none; padding: 2px 0; }
.foot-in a:hover { color: var(--flame); }
.foot-in img { height: 30px; image-rendering: pixelated; margin-bottom: 8px; }

/* ------------------------------------------------------------------ portal v2 (WEB-04..WEB-07, M39) */

.pad-box { padding: 14px 16px; }
.top-gap { margin-top: 12px; }
.no-margin { margin: 0; }
.mono-small { font-size: 14px; letter-spacing: 0.05em; word-break: break-all; }
.pair-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.feud-card { padding: 14px 18px; margin: 0 0 12px; }
.feud-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; margin-bottom: 6px; }
.feud-side { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.feud-side.right { justify-content: flex-end; }
.feud-score { text-align: center; font: 700 24px var(--serif); color: var(--flame); line-height: 1.1; }
.feud-score span { display: block; font-size: 12px; font-variant: small-caps; letter-spacing: 0.08em; }
.emblem-badge { width: 48px; height: 48px; background: #141012; box-shadow: inset 0 0 0 1px rgba(255, 220, 160, 0.2); vertical-align: middle; }
.emblem-canvas { width: 240px; height: 240px; cursor: crosshair; touch-action: none; background: #141012; box-shadow: 0 0 0 2px #6a5a40; }
.emblem-workbench { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }
.emblem-swatches { max-width: 340px; margin-top: 6px; }
.swatch-0 { background: #f2ede1; }
.swatch-1 { background: #c9c2b2; }
.swatch-2 { background: #8c867b; }
.swatch-3 { background: #4b4845; }
.swatch-4 { background: #2a292b; }
.swatch-5 { background: #e9c9a1; }
.swatch-6 { background: #c28a58; }
.swatch-7 { background: #8c5a34; }
.swatch-8 { background: #5b3a22; }
.swatch-9 { background: #d8b24a; }
.swatch-10 { background: #b0782a; }
.swatch-11 { background: #c4533b; }
.swatch-12 { background: #8c2e29; }
.swatch-13 { background: #5c8a3b; }
.swatch-14 { background: #386a48; }
.swatch-15 { background: #4b7c9c; }
.swatch-16 { background: #2f4c7c; }
.swatch-17 { background: #6a4c8c; }
.swatch-18 { background: #a35a8a; }
.swatch-19 { background: #2b5c5c; }
.swatch-clear { background: #181312; color: var(--bone-soft); font: 700 12px var(--serif); }

/* ------------------------------------------------------------------ smaller screens */

@media (max-width: 1080px) {
  .page { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
  .paths, .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .bar-in { gap: 10px; }
  .bar .burger { display: inline-flex; margin-left: auto; }
  .menu { display: none; position: absolute; top: 64px; left: 0; right: 0; height: auto; max-height: calc(100vh - 64px); overflow-y: auto; flex-direction: column; padding: 8px; background: #1a1210; box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6); }
  .bar.open .menu { display: flex; }
  .group { flex-direction: column; align-items: stretch; }
  .group > button, .group > a.top-link { height: 44px; justify-content: space-between; }
  .drop { position: static; display: block; min-width: 0; padding: 0 0 6px 10px; }
  .drop-box { border: 0; border-image: none; background: none; box-shadow: none; }
  .group.here > button::after, .group.here > a.top-link::after { display: none; }
  .actions .btn:not(.cta) { display: none; }
  .side { grid-template-columns: minmax(0, 1fr); }
  .grid2, .grid3, .steps, .vocation, .sheet, .picker, .creature, .outfit, .yesno, .words, .person, .emblem-workbench, .feud-row { grid-template-columns: minmax(0, 1fr); }
  .grid4, .paths-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .window.paper > .body { padding: 20px 18px; }
  .spells { columns: 1; }
  .hero { height: 520px; }
  .banner { height: 200px; }
}
@media (max-width: 520px) {
  .paths, .tiles, .grid4, .paths-mini { grid-template-columns: minmax(0, 1fr); }
  .actions .btn.cta { padding: 0 12px; font-size: 13px; min-height: 36px; }
  .brand img { height: 30px; }
  .stats b { font-size: 22px; }
  .vow input, .vow input.mail { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .embers, .flame { animation: none !important; }
  html { scroll-behavior: auto; }
}
