/* Little Throne's front page (index.html; js/landing.js moves it). The game's own language, as css/style.css and css/online.css set
   it: deep soil and lamplight, parchment type, Cinzel for heads, Alegreya for reading, VT323 for numbers; dark wood, leather, moss and
   parchment for every frame, never metal. Two things stand behind the page, fixed: the forest (far and near, each sliding at its own
   pace) and your keep, live in 3D, in a pool of light. The sections are banks of earth that scroll over them. */
@font-face { font-family: CinzelLocal; src: url(../fonts/Cinzel.ttf); }
:root {
  --soil: #0d0c08; --parch: #f1e6c8; --parch-dim: #b9ad8f; --gold: #f2d488; --gold2: #f6dc8c; --ember: #ff8a3d; --moss: #8fb85a; --ink: #3b2a1c;
  --head: "Cinzel", CinzelLocal, Georgia, serif; --display: "Cinzel Decorative", "Cinzel", CinzelLocal, Georgia, serif; --body: "Alegreya", Georgia, serif; --mono: "VT323", ui-monospace, monospace;
  --gutter: clamp(16px, 7vw, 140px);
  /* a bank of earth is drawn 3840 x 600: its height is 23.4% of the page's width (never so short on a phone that its moss is specks) */
  --ledge: max(23.4vw, 150px);
  --gap: clamp(150px, 22vw, 400px);
  /* where the keep stands: keep3d.js's camera fills its box by the box's height (stood back a step, the keep is 0.83 of it tall and
     1.13 wide, its middle a little left of and above the box's), so the box is 1.6 times as wide as it is tall and set so the keep's
     own middle falls at (--kx, --ky) */
  --kh: min(88vh, 56vw); --kx: 66%; --ky: 53%;
  --carve: inset 0 0 0 1px rgba(0,0,0,.6), inset 0 2px 6px rgba(0,0,0,.75), 0 1px 0 rgba(255,220,150,.08);
  --wood: url(../art/ui/rs_wood.png);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--soil); color: var(--parch); scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); font-size: clamp(17px, 1.15vw, 20px); line-height: 1.55; background: transparent; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ============ behind the page: the far wood, the nearer trunks and ferns over it, the dark at the edges ============ */
.forest { position: fixed; inset: 0; z-index: -3; overflow: hidden; background: #10140c; pointer-events: none; }
.forest .layer { position: absolute; left: -4%; right: -4%; top: 0; background: center top / cover no-repeat; will-change: transform; }
.forest .far { height: 122%; background-image: url(../art/site/forest_far.webp); filter: brightness(.78) saturate(.85); }
.forest .mid { height: 170%; background-image: url(../art/site/forest_mid.webp); filter: brightness(.72); }
.forest .dark { position: absolute; inset: 0; background: radial-gradient(130% 90% at 50% 40%, transparent 42%, rgba(5,6,4,.7)); }

/* ---- your keep, live: the game's own scene, set in a pool of light (its box fades out at its edges into the forest) */
.stage { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.stage.gone { visibility: hidden; }
.rig { position: absolute; inset: 0; will-change: transform; }
/* (the dark the keep floats in, the scene's own black, falling away into the forest round it) */
.pool { opacity: min(1, calc(var(--f, 1) * 4)); position: absolute; width: calc(var(--kh) * 2.7); height: calc(var(--kh) * 1.75); left: calc(var(--kx) - var(--kh) * 1.35); top: calc(var(--ky) - var(--kh) * .875);
  background: radial-gradient(closest-side, rgb(5,3,2) 60%, rgba(5,3,2,.88) 76%, rgba(5,3,2,0)); }
.keep { opacity: var(--f, 1); position: absolute; height: var(--kh); width: calc(var(--kh) * 1.6); left: calc(var(--kx) - var(--kh) * .766); top: calc(var(--ky) - var(--kh) * .43); will-change: transform;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent), linear-gradient(transparent, #000 1.5%, #000 88%, transparent); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent), linear-gradient(transparent, #000 1.5%, #000 88%, transparent); mask-composite: intersect; }
.keep .k3wrap { position: absolute; inset: 0; } .keep canvas.k3cv { display: block; width: 100%; height: 100%; }
.keep .k3title, .keep .k3hint, .keep .k3tip, .keep .k3labels { display: none; }
.keep .k3load { position: absolute; inset: 0; display: grid; place-items: center; font: italic 18px var(--body); color: #c9b48a; }
/* (until the live keep has its models, and wherever there's no 3D, a picture of it from the game stands in) */
.keep .poster { position: absolute; inset: 0; z-index: 2; background: url(../art/site/keep_day.jpg) center / auto 100% no-repeat; transition: opacity 1.2s ease, filter .5s; }
.night .keep .poster { background-image: url(../art/site/keep_night.jpg); }
.keep.live .poster { opacity: 0; }
.keep.raising .poster { filter: brightness(.3) blur(3px); }
.keep::after { content: "Raising your keep…"; position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; font: italic 20px var(--body); color: #d8c49a; text-shadow: 0 1px 8px #000; opacity: 0; transition: opacity .5s; pointer-events: none; }
.keep.raising::after { opacity: 1; }
/* soft fog over the foot of the keep and the forest floor, drifting */
.fog { position: absolute; left: 0; right: 0; overflow: hidden; opacity: calc(.55 * var(--f, 1)); -webkit-mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent); mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent); }
.fog i { position: absolute; top: 0; bottom: 0; left: 0; width: 200%; background-repeat: repeat-x; background-size: 50% 100%; will-change: transform; animation: drift 90s linear infinite; }
.fog.f1 { top: 50%; height: 44%; } .fog.f2 { top: 66%; height: 40%; opacity: calc(.7 * var(--f, 1)); } .fog.f2 i { animation-duration: 54s; animation-direction: reverse; }
@keyframes drift { to { transform: translateX(-50%); } }

/* ============ the header: the page's sections and the way in ============ */
header.top { position: fixed; top: 0; left: 0; right: 0; z-index: 80; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px var(--gutter); transition: background .5s, padding .5s, box-shadow .5s; }
header.top.solid { padding-top: 9px; padding-bottom: 9px; background: linear-gradient(rgba(14,9,5,.9), rgba(10,7,4,.94)), var(--wood) 0 0 / 96px; image-rendering: pixelated; box-shadow: 0 1px 0 #2a1a0c, 0 2px 0 rgba(138,98,56,.3), 0 10px 24px rgba(0,0,0,.6); }
.mark { display: block; line-height: 0; opacity: 0; pointer-events: none; transition: opacity .5s; } .mark img { height: 30px; width: auto; image-rendering: auto; filter: drop-shadow(0 2px 2px #000); }
header.top.solid .mark { opacity: 1; pointer-events: auto; }
nav.links { display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); margin-left: auto; font: 700 12px var(--head); letter-spacing: .22em; text-transform: uppercase; }
nav.links a:not(.btn) { text-decoration: none; opacity: .82; white-space: nowrap; text-shadow: 0 1px 8px #000, 0 0 2px #000; transition: opacity .25s; } nav.links a:not(.btn):hover { opacity: 1; color: var(--gold2); }
@media (max-width: 1100px) { nav.links a:not(.btn) { display: none; } }

/* ============ buttons: planks stained ruby for the way in, plain wood for the rest ============ */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 11px; padding: 12px 20px 11px; font: 700 12px/1 var(--head); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; white-space: nowrap; cursor: pointer;
  color: #f4e6c6; border: 1px solid #1a110a; border-radius: 3px; image-rendering: pixelated; text-shadow: 0 1px 0 #000;
  background: linear-gradient(rgba(115,80,46,.9), rgba(76,51,29,.92) 60%, rgba(60,40,22,.95)), var(--wood) 0 0 / 64px;
  box-shadow: inset 0 1px 0 rgba(255,222,170,.28), inset 0 -2px 0 rgba(0,0,0,.35), 0 2px 0 #0a0603, 0 6px 16px rgba(0,0,0,.5); transition: filter .2s, transform .12s; }
.btn:hover { filter: brightness(1.14); } .btn:active { transform: translateY(1px); }
.btn.play { color: #fff2d8; border-color: #1c0605; background: linear-gradient(rgba(176,52,42,.9), rgba(112,24,18,.92) 55%, rgba(80,15,11,.95)), var(--wood) 0 0 / 64px;
  box-shadow: inset 0 1px 0 rgba(255,200,170,.38), inset 0 0 0 1px rgba(242,212,136,.22), inset 0 -2px 0 rgba(0,0,0,.35), 0 2px 0 #120302, 0 8px 22px rgba(120,20,10,.45); }
.btn.play::before { content: ""; width: 9px; height: 11px; flex: none; background: #f6dc8c; clip-path: polygon(0 0, 100% 50%, 0 100%); filter: drop-shadow(0 1px 0 #000); }
.btn.big { padding: 18px 30px 17px; font-size: clamp(13px, 1vw, 16px); }
nav.links .btn { padding: 11px 18px 10px; font-size: 11px; }

/* ---- a section's label: a little board of dark wood with the word cut in it and a moss seal (the game's own plaque) */
.kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 8px 15px 7px 10px; font: 700 12px/1 var(--head); letter-spacing: .3em; text-transform: uppercase; color: var(--gold2);
  background: linear-gradient(rgba(34,21,10,.55), rgba(14,9,5,.86)), var(--wood) 0 0 / 64px; image-rendering: pixelated; border: 1px solid #120a04; border-radius: 3px; text-shadow: 0 1px 0 #000;
  box-shadow: inset 0 1px 0 rgba(255,220,160,.18), inset 0 -2px 0 rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.6); }
.kicker i { width: 12px; height: 12px; flex: none; border-radius: 50%; background: radial-gradient(circle at 35% 32%, #a6cc6e, #557a2e 60%, #34501a); box-shadow: 0 0 0 1px #1a0f07, inset 0 -1px 2px rgba(0,0,0,.5); }
h2 { margin: 0 0 18px; font: 700 clamp(32px, 3.4vw, 58px)/1.06 var(--head); letter-spacing: .01em; color: #f8eed4; text-wrap: balance; text-shadow: 0 2px 0 #000, 0 3px 18px rgba(0,0,0,.9); }
p { text-wrap: pretty; }

/* ============ the hero: the keep, the name, one line, and the way in ============ */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; padding: 96px var(--gutter) calc(var(--ledge) * .5); isolation: isolate; }
/* (the dark that the words stand in, on the keep's left) */
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgba(5,6,4,.86), rgba(5,6,4,.55) 30%, transparent 54%), linear-gradient(rgba(5,6,4,.6), transparent 22%); }
.hero-in { width: min(36vw, 640px); will-change: transform, opacity; }
.title { margin: 0 0 0 -1.4vw; line-height: 0; }
.title img { display: block; width: min(34vw, 72vh, 600px); height: auto; filter: drop-shadow(0 8px 18px rgba(0,0,0,.75)); }
.hero .room { display: none; }
.tag { margin: 18px 0 10px; font: italic 500 clamp(22px, 1.9vw, 32px)/1.26 var(--body); color: #fff; max-width: 24ch; text-shadow: 0 1px 12px rgba(0,0,0,.9), 0 0 2px #000; }
.sub { margin: 0 0 28px; max-width: 40ch; color: var(--parch); text-shadow: 0 1px 10px rgba(0,0,0,.95), 0 0 2px #000; }
.ctas { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; } .ctas.centre { justify-content: center; }
.note { margin: 14px 0 0; font: 19px var(--mono); letter-spacing: .06em; color: var(--parch-dim); text-shadow: 0 1px 0 #000, 0 0 10px #000; }
.js .title img, .js .tag, .js .sub, .js .hero .ctas, .js .note { opacity: 0; transform: translateY(10px); transition: opacity 1.1s cubic-bezier(.2,.7,.2,1), transform 1.1s cubic-bezier(.2,.7,.2,1); }
.js .tag { transition-delay: .5s; } .js .sub { transition-delay: .65s; } .js .hero .ctas { transition-delay: .8s; } .js .note { transition-delay: 1s; }
.hero.ready .title img, .hero.ready .tag, .hero.ready .sub, .hero.ready .ctas, .hero.ready .note { opacity: 1; transform: none; }

/* ============ the banks of earth (playstarforest.com's, art/site): moss, leaves and ferns along a section's top, roots and clods
   hanging from its underside, the forest (or the keep) between one section and the next ============ */
.slab { position: relative; isolation: isolate; overflow-x: clip; padding: calc(var(--ledge) * .42 + 7vh) var(--gutter) calc(var(--ledge) * .42 + 6vh);
  background: linear-gradient(transparent calc(var(--ledge) * .28), var(--soil) calc(var(--ledge) * .28), var(--soil) calc(100% - var(--ledge) * .28), transparent calc(100% - var(--ledge) * .28)); }
.slab::before, .slab::after { content: ""; position: absolute; left: 0; right: 0; height: var(--ledge); z-index: 2; pointer-events: none; background-repeat: no-repeat; background-size: auto 100%; }
.slab::before { top: calc(var(--ledge) * -.6); background-image: var(--ts), var(--tb); background-position: var(--tx, 50%) bottom; }
.slab::after { bottom: calc(var(--ledge) * -.6); background-image: var(--bs), var(--bb); background-position: var(--bx, 50%) top; }
/* light falls on the soil in patches from the canopy */
.slab > .slab-in::before { content: ""; position: absolute; inset: -12vh max(calc(-1 * var(--gutter)), calc((100% - 100vw) / 2)); z-index: -1; pointer-events: none; background: radial-gradient(40% 36% at var(--lx, 22%) var(--ly, 30%), rgba(255,214,140,.06), transparent 70%), radial-gradient(34% 30% at var(--lx2, 78%) var(--ly2, 72%), rgba(170,210,120,.045), transparent 70%); }
.slab-in { position: relative; z-index: 3; width: min(1440px, 100%); margin: 0 auto; }
.slab-in.narrow { width: min(900px, 100%); text-align: center; } .slab-in.narrow > p { margin-left: auto; margin-right: auto; max-width: 54ch; }
.slab-in > p, .copy > p { color: #efe4c6; text-shadow: 0 1px 2px #000, 0 1px 14px rgba(0,0,0,.85); }
.slab-in.two { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(28px, 4vw, 72px); align-items: center; }
.copy > p { max-width: 46ch; } .away .copy h2 { font-size: clamp(30px, 2.8vw, 50px); }
.intro { --tb: url(../art/site/bank_top_a.webp); --ts: url(../art/site/bank_top_a_sway.webp); --bb: url(../art/site/bank_bottom_b.webp); --bs: url(../art/site/bank_bottom_b_sway.webp); --tx: 12%; --bx: 70%;
  min-height: calc(100vh + var(--ledge) * .7); display: grid; align-items: center; }
.away { --tb: url(../art/site/bank_top_c.webp); --ts: url(../art/site/bank_top_c_sway.webp); --bb: url(../art/site/bank_bottom_a.webp); --bs: url(../art/site/bank_bottom_a_sway.webp); --tx: 84%; --bx: 20%; min-height: calc(100vh + var(--ledge) * .7); display: grid; align-items: center; --lx: 70%; --ly: 40%; }
.realm { --tb: url(../art/site/bank_top_b.webp); --ts: url(../art/site/bank_top_b_sway.webp); --bb: url(../art/site/bank_bottom_c.webp); --bs: url(../art/site/bank_bottom_c_sway.webp); --tx: 36%; --bx: 92%; margin-top: var(--gap); --lx: 50%; --ly: 20%; }
.traveller { --tb: url(../art/site/bank_top_a.webp); --ts: url(../art/site/bank_top_a_sway.webp); --bb: url(../art/site/bank_bottom_b.webp); --bs: url(../art/site/bank_bottom_b_sway.webp); --tx: 64%; --bx: 6%; margin-top: var(--gap); --lx: 30%; --ly: 60%; }
.get { --tb: url(../art/site/bank_top_c.webp); --ts: url(../art/site/bank_top_c_sway.webp); --bb: url(../art/site/bank_bottom_a.webp); --bs: url(../art/site/bank_bottom_a_sway.webp); --tx: 2%; --bx: 52%; margin-top: var(--gap); --lx: 50%; --ly: 40%; }
/* (every other bank turned round, so no two gaps look alike) */
.intro::before, .realm::before, .get::before, .away::after, .traveller::after { transform: scaleX(-1); }
.intro .cue { margin-top: 34px; font: 19px var(--mono); letter-spacing: .08em; color: var(--parch-dim); }
.intro .cue::after { content: ""; display: block; width: 12px; height: 12px; margin: 12px auto 0; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg); opacity: .8; animation: nod 2.4s ease-in-out infinite; }
@keyframes nod { 50% { transform: translateY(6px) rotate(45deg); } }

/* ============ the keep growing: pinned while the scroll climbs its six steps ============ */
.grow { position: relative; height: calc(100vh + 6 * 72vh); }
.pin { position: sticky; top: 0; height: 100vh; display: grid; align-items: center; padding: 84px var(--gutter) 48px; overflow: hidden; }
.pin::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(5,6,4,.84), rgba(5,6,4,.5) 30%, transparent 52%); }
.grow-copy { position: relative; width: min(36vw, 600px); }
.ladder { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin: 0 0 24px; padding: 0; list-style: none; }
.ladder button { all: unset; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 5px; width: 100%; padding: 9px 4px 8px; cursor: pointer; text-align: center;
  font: 700 9.5px/1.1 var(--head); letter-spacing: .1em; text-transform: uppercase; color: #8a7a5c; border-radius: 2px; background: linear-gradient(rgba(18,12,7,.88), rgba(10,7,4,.92)); box-shadow: var(--carve); transition: color .4s, box-shadow .4s, background .4s; }
.ladder button i { font: 700 17px/1 var(--head); font-style: normal; letter-spacing: 0; }
.ladder button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.ladder .done button { color: #c9b07a; }
.ladder .on button { color: var(--gold2); background: linear-gradient(rgba(52,34,18,.75), rgba(22,14,8,.9)), var(--wood) 0 0 / 64px; box-shadow: inset 0 1px 0 rgba(255,220,160,.2), inset 0 -3px 0 #6f9a3e, 0 0 0 1px #000, 0 4px 12px rgba(0,0,0,.6); }
.caps { position: relative; min-height: 290px; }
.cap { position: absolute; inset: 0 0 auto 0; opacity: 0; transform: translateY(10px); transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.2,1); pointer-events: none; }
.cap.on { opacity: 1; transform: none; pointer-events: auto; }
.cap h3 { margin: 0 0 12px; font: 700 clamp(28px, 2.6vw, 44px)/1.08 var(--head); color: #f8eed4; text-shadow: 0 2px 0 #000, 0 3px 16px rgba(0,0,0,.9); text-wrap: balance; }
.cap p { margin: 0; color: #efe4c6; text-shadow: 0 1px 2px #000, 0 1px 12px rgba(0,0,0,.9); max-width: 42ch; }
.cost { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.cost > .lbl { font: 700 10px var(--head); letter-spacing: .2em; text-transform: uppercase; color: var(--parch-dim); margin-right: 4px; text-shadow: 0 1px 0 #000; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 3px; background: linear-gradient(rgba(16,12,8,.9), rgba(26,20,14,.88)); box-shadow: inset 0 0 0 1px #0a0705, inset 0 1px 0 rgba(255,220,150,.1), 0 2px 6px rgba(0,0,0,.5); }
.chip img { width: 34px; height: 34px; padding: 3px; image-rendering: pixelated; border-radius: 2px; background: linear-gradient(#2a2118, #17110b); box-shadow: inset 0 0 0 1px #0a0604, inset 0 -2px 4px rgba(0,0,0,.6); }
.chip b { font: 22px/1 var(--mono); color: #fff2d0; } .chip small { font-size: 14px; color: var(--parch-dim); font-style: italic; }

/* ============ the action windows: black, framed in dark wood pegged at its corners, a line and the job's green bar under ============ */
/* (each window wide enough that a whole tree stands in it at twice its pixels, as in the game) */
.wins { display: grid; grid-template-columns: repeat(2, minmax(0, 432px)); gap: clamp(12px, 1.4vw, 22px); }
.win { position: relative; margin: 0; padding: 11px 11px 10px; border-radius: 4px; image-rendering: pixelated;
  background: linear-gradient(rgba(34,20,9,.5), rgba(12,7,3,.78)), var(--wood) 0 0 / 96px; border: 1px solid #0c0703;
  box-shadow: inset 0 1px 0 rgba(255,220,160,.2), inset 0 -2px 0 rgba(0,0,0,.4), 0 0 0 1px #050302, 0 18px 36px rgba(0,0,0,.6); }
/* (four wooden pegs, and moss caught along the top) */
.win::before { content: ""; position: absolute; inset: 3px; pointer-events: none; border-radius: 2px;
  background: radial-gradient(circle at 4px 4px, #7a5532 0 2.2px, #1a0f07 2.7px 3.6px, transparent 4px), radial-gradient(circle at calc(100% - 4px) 4px, #7a5532 0 2.2px, #1a0f07 2.7px 3.6px, transparent 4px),
    radial-gradient(circle at 4px calc(100% - 4px), #7a5532 0 2.2px, #1a0f07 2.7px 3.6px, transparent 4px), radial-gradient(circle at calc(100% - 4px) calc(100% - 4px), #7a5532 0 2.2px, #1a0f07 2.7px 3.6px, transparent 4px); }
.win::after { content: ""; position: absolute; left: 5%; top: -6px; width: 32%; height: 15px; pointer-events: none;
  background: radial-gradient(13px 7px at 10% 62%, #6f8f3a 55%, transparent 64%), radial-gradient(20px 8px at 28% 58%, #4f6e28 58%, transparent 66%), radial-gradient(16px 7px at 48% 64%, #5f7f32 56%, transparent 64%),
    radial-gradient(10px 6px at 63% 56%, #86a648 52%, transparent 62%), radial-gradient(18px 7px at 80% 64%, #46622a 56%, transparent 64%), radial-gradient(4px 3px at 36% 38%, #a8c46a 60%, transparent 72%), radial-gradient(4px 3px at 70% 42%, #9ab85e 60%, transparent 72%);
  filter: drop-shadow(0 2px 1px rgba(0,0,0,.55)); }
.win:nth-child(2)::after { left: 62%; width: 20%; } .win:nth-child(3)::after { left: 38%; width: 30%; } .win:nth-child(4)::after { left: 12%; width: 18%; }
.win canvas { display: block; width: 100%; aspect-ratio: 10 / 7; background: #000; border-radius: 2px; image-rendering: pixelated; box-shadow: 0 0 0 2px #0a0604, 0 0 0 3px rgba(138,98,56,.35); }
.win figcaption { margin: 9px 2px 1px; font: 15px/1.25 var(--body); color: #cdbf9f; text-shadow: 0 1px 0 #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win figcaption b { font: 700 12px var(--head); letter-spacing: .08em; text-transform: uppercase; color: #f2e2be; }
.win .bar { height: 7px; margin: 7px 2px 2px; border-radius: 3px; background: #050302; box-shadow: var(--carve); overflow: hidden; }
.win .bar i { display: block; height: 100%; transform-origin: 0 50%; background: linear-gradient(#8fe07c, #3e8a3a); box-shadow: 0 0 6px rgba(120,220,100,.35); }

/* ---- the note the game leaves you when you come back: parchment in a rim of dark wood, written on in ink */
.slip { position: relative; display: inline-block; margin: 22px 0 0; padding: 18px 24px 16px; max-width: 420px; color: var(--ink); transform: rotate(-1.2deg); image-rendering: pixelated;
  background: radial-gradient(ellipse at 50% 40%, rgba(255,250,232,.32), rgba(150,110,60,.18) 85%), url(../art/ui/rs_parchment.png) 0 0 / 128px #d9c79c;
  border: 9px solid #3a2313; border-radius: 3px; box-shadow: 0 0 0 1px #120a04, inset 0 0 0 1px rgba(90,60,30,.55), inset 0 0 26px rgba(110,70,30,.35), 0 18px 40px rgba(0,0,0,.7); }
.slip h4 { margin: 0 0 2px; font: 900 21px var(--display); color: var(--ink); text-shadow: 0 1px 0 rgba(255,250,230,.5); }
.slip .when { margin: 0 0 10px; font: italic 15px var(--body); color: #6a5838; }
.slip ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.slip li { display: flex; align-items: center; gap: 9px; font: 17px/1.2 var(--body); color: #4a3624; }
.slip li img { width: 26px; height: 26px; image-rendering: pixelated; filter: drop-shadow(0 1px 0 rgba(255,250,230,.4)); }
.slip li b { font: 22px/1 var(--mono); color: #2f6a20; min-width: 6ch; }
/* (a pin of moss-green wax at its head) */
.slip::before { content: ""; position: absolute; top: -15px; left: 50%; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: radial-gradient(circle at 35% 32%, #a6cc6e, #557a2e 60%, #34501a); box-shadow: 0 0 0 1px #1a0f07, 0 2px 4px rgba(0,0,0,.6); }

/* ============ boards: dark wood round a carved well (the realm's chat, the creator) ============ */
.board { position: relative; margin: 34px auto 0; padding: 16px; text-align: left; border-radius: 4px; image-rendering: pixelated; border: 1px solid #0c0703;
  background: linear-gradient(rgba(34,20,9,.45), rgba(12,7,3,.8)), var(--wood) 0 0 / 96px; box-shadow: inset 0 1px 0 rgba(255,220,160,.2), inset 0 -2px 0 rgba(0,0,0,.4), 0 0 0 1px #050302, 0 22px 50px rgba(0,0,0,.65); }
.talk { width: min(760px, 100%); }
.talk-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 2px 4px 10px; } .about { white-space: nowrap; }
.talk-top b { font: 700 13px var(--head); letter-spacing: .24em; text-transform: uppercase; color: var(--gold2); text-shadow: 0 1px 0 #000; }
.about { display: inline-flex; align-items: center; gap: 8px; font: 700 10px var(--head); letter-spacing: .16em; text-transform: uppercase; color: #b8a682; text-shadow: 0 1px 0 #000; }
.about i { width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(#d4f0a0, #6f9a3e 70%); box-shadow: 0 0 8px #8fbf5a99, 0 0 0 1px #000; }
.about.quiet i { background: radial-gradient(#e8b880, #8a5a2a 70%); box-shadow: 0 0 6px #ff8a3d66, 0 0 0 1px #000; }
.well { min-height: 230px; padding: 10px 14px; border-radius: 3px; background: radial-gradient(ellipse at 50% 0, rgba(255,190,110,.05), transparent 70%), rgba(6,4,2,.86); box-shadow: var(--carve), inset 0 0 30px rgba(0,0,0,.6); }
.well .cl { padding: 5px 0 6px; font: 16px/1.4 var(--body); color: #d6c8a8; overflow-wrap: anywhere; }
.well .cl + .cl { border-top: 1px solid rgba(138,106,58,.14); }
.well .tm { margin-right: 8px; font: 17px var(--mono); color: #6f6655; }
.well .cn { margin-right: 6px; font: 700 13px var(--head); letter-spacing: .03em; } .well .cn::after { content: ":"; color: #6f6655; }
.well .cl.realm { margin: 2px -6px; padding: 5px 6px 6px; border-left: 2px solid rgba(217,176,92,.7); background: linear-gradient(90deg, rgba(217,176,92,.12), transparent 80%); }
.well .cl.realm .cn { color: var(--gold2); } .well .cl.realm .cm { color: #ecd394; font-style: italic; }
.well .hush { display: grid; place-items: center; min-height: 210px; text-align: center; font: italic 17px/1.45 var(--body); color: #a8997a; }
.well .hush b { display: block; margin-bottom: 4px; font: 700 13px var(--head); font-style: normal; letter-spacing: .2em; text-transform: uppercase; color: #c9b07a; }
.talk-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 4px 0; }
.talk-foot span { font: italic 15px/1.35 var(--body); color: #b8a682; text-shadow: 0 1px 0 #000; }
.maker { width: min(1100px, 100%); min-height: 380px; padding: 18px; }
#creatorHost:empty { display: none; }
.maker-wait { display: flex; align-items: center; justify-content: center; gap: 30px; min-height: 340px; border-radius: 3px; background: radial-gradient(ellipse at 50% 60%, rgba(255,170,80,.08), transparent 60%), rgba(6,4,2,.86); box-shadow: var(--carve), inset 0 0 30px rgba(0,0,0,.6); }
.has-creator .maker-wait { display: none; }
.maker-wait canvas { width: 256px; height: 256px; image-rendering: pixelated; }
.maker-wait p { margin: 0 0 18px; font: italic 20px/1.35 var(--body); color: #e8dcc0; text-shadow: 0 1px 0 #000; max-width: 22ch; }
.get .seal-logo { display: block; width: min(420px, 70vw); height: auto; margin: 0 auto 20px; filter: drop-shadow(0 8px 16px rgba(0,0,0,.7)); }
.get h2 { font-family: var(--display); font-weight: 900; color: var(--gold2); text-shadow: 0 3px 0 #2a1a06, 0 4px 22px rgba(0,0,0,.9); }
.get .ctas { margin-top: 30px; }

/* ============ the footer: columns set in the game's planks ============ */
footer.site { position: relative; margin-top: calc(var(--gap) * .8); background: #06080b; }
footer.site .wood { background: var(--wood) 0 0 / 108px; image-rendering: pixelated; box-shadow: inset 0 3px 0 #1a120a, inset 0 5px 0 rgba(255,220,150,.14), inset 0 40px 60px rgba(0,0,0,.55), inset 0 -30px 50px rgba(0,0,0,.6); }
footer.site .cols { display: grid; grid-template-columns: 1.1fr 1fr 1.6fr; gap: clamp(16px, 2.4vw, 36px); width: min(1240px, 100%); margin: 0 auto; padding: 46px var(--gutter) 40px; }
footer.site .brand img { height: 40px; width: auto; image-rendering: auto; filter: drop-shadow(0 2px 2px #000); }
footer.site .brand p { display: inline-block; margin: 12px 0 0; padding: 5px 12px; font-size: 17px; font-style: italic; color: var(--parch); background: rgba(10,8,5,.72); box-shadow: inset 0 1px 3px rgba(0,0,0,.7), 0 1px 0 rgba(255,220,150,.1); border-radius: 2px; }
footer.site .bed { padding: 16px 18px 18px; background: linear-gradient(rgba(14,11,8,.88), rgba(24,19,13,.84)); box-shadow: inset 0 0 0 2px #120d08, inset 0 2px 5px rgba(0,0,0,.75), 0 1px 0 rgba(255,220,150,.12); border-radius: 2px; }
footer.site h4 { margin: 0 0 12px; padding: 0 0 9px; font: 700 13px/1 var(--head); letter-spacing: .26em; text-transform: uppercase; color: #e8d9b4; border-bottom: 1px solid rgba(0,0,0,.8); box-shadow: 0 1px 0 rgba(255,220,150,.12); }
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
footer.site li a { display: inline-flex; align-items: center; gap: 10px; font: 20px var(--mono); letter-spacing: .04em; color: var(--parch); text-decoration: none; transition: color .2s; } footer.site li a:hover { color: var(--gold); }
footer.site li img { width: 24px; height: 24px; image-rendering: pixelated; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
footer.site .credits li { font: 15px/1.4 var(--body); color: #d8ccae; } footer.site .credits b { font: 700 11px var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-right: 4px; }
footer.site .credits a { display: inline; font: inherit; color: var(--gold2); border-bottom: 1px solid rgba(242,212,136,.35); }
footer.site .legal { padding: 14px var(--gutter) 18px; text-align: center; font: 18px var(--mono); letter-spacing: .06em; color: var(--parch-dim); background: #06080b; box-shadow: inset 0 1px 0 rgba(255,220,150,.08); }
footer.site .legal a { color: var(--gold); text-decoration: none; }

/* ============ narrower screens ============ */
@media (max-width: 1400px) { .slab-in.two { grid-template-columns: minmax(0, 1fr); } .away .copy { text-align: center; } .away .copy > p { margin-left: auto; margin-right: auto; } .wins { justify-content: center; } }
/* tall or narrow: the keep stands at the top, the words under it */
@media (max-width: 900px), (max-aspect-ratio: 1/1) {
  :root { --kh: min(40svh, 82vw); --kx: 50%; --ky: calc(64px + min(31vw, 17svh) + var(--kh) * .42); }
  .fog.f1 { top: 30%; height: 30%; } .fog.f2 { top: 44%; height: 26%; }
  .hero { align-items: start; padding-top: 64px; text-align: center; }
  .hero::before { background: linear-gradient(transparent 48%, rgba(5,6,4,.85) 64%), linear-gradient(rgba(5,6,4,.6), transparent 16%); }
  .hero-in { width: 100%; }
  .title { margin: 0 auto; } .title img { width: min(76vw, 31svh); margin: 0 auto; }
  .hero .room { display: block; height: calc(var(--kh) * .92); }
  .tag, .sub { margin-left: auto; margin-right: auto; } .ctas { justify-content: center; }
  .pin { align-items: end; padding-bottom: 28px; }
  .pin::before { background: linear-gradient(transparent 44%, rgba(5,6,4,.9) 60%); }
  .grow-copy { width: 100%; } .grow-copy .kicker { display: none; }
  .caps { min-height: 250px; }
  .ladder { margin-bottom: 16px; }
}
@media (max-width: 760px) {
  .wins { grid-template-columns: minmax(0, 432px); }
  footer.site .cols { grid-template-columns: 1fr; }
  .talk-foot { flex-direction: column; align-items: stretch; text-align: center; }
  .maker-wait { flex-direction: column; gap: 6px; padding: 18px; text-align: center; } .maker-wait canvas { width: 192px; height: 192px; }
  .maker-wait p { margin-left: auto; margin-right: auto; }
}
@media (max-width: 520px) {
  .ladder { gap: 4px; } .ladder button { padding: 8px 2px 7px; } .ladder button span { display: none; }
  .ctas .btn.big { width: 100%; }
  .cap h3 { font-size: 26px; } .cap p { font-size: 17px; }
  .chip b { font-size: 20px; } .chip img { width: 30px; height: 30px; }
  .slip { padding: 14px 16px 12px; }
  .win figcaption { white-space: normal; }
  .talk-top b { letter-spacing: .16em; } .note { font-size: 17px; }
}

/* ============ for making the keep's stand-in picture (index.html?poster): the keep alone, filling the window ============ */
.poster-mode body > :not(.stage) { display: none !important; }
.poster-mode .fog, .poster-mode .keep .poster { display: none; }
.poster-mode .keep { left: 0; top: 0; width: 100vw; height: 100vh; -webkit-mask-image: none; mask-image: none; }   /* (shot at 1600 x 1000, the box's own shape) */
