/* Crafted Realm: the website. Copyright (c) 2026 Crafted Motion LLC. All rights reserved.
   The owner's version A of 2026-10-23 (TEN6-SITE, "Dusk at the Grey Keep", OWNER_INBOX N222): the game's own look on the
   site, with the same old-school feel. Light grey pages in grey stone frames with a dark outline (as the game's bank and
   windows), red headings and blue links, plain light buttons like the game's Auto Retaliate button (the first choices red,
   as the game's Log in), the menu as plain buttons on a band of brick (the only brick), our pixel art drawn sharp, all set
   on our coursed keep wall (img/wall.png, a Blender render: tools/blender/build_site_gate_v1.py) under a dusk wash. Every
   word is Wick, our own pixel lettering (assets/fonts/, served at /assets/ in dev and in the built release). The icons in
   img/ are Blender renders (tools/blender/build_site_art_w1.py). The page template is server/site/shell.js; the forums and
   the Message Centre bring a small dark sheet of their own (server/community/frame.js), restyled at the end of this file.
   Text fit (the owner, 2026-10-23): every box is sized for Wick, which runs wider than Arial. */
@font-face { font-family: 'Wick'; src: url(/assets/fonts/wick.ttf) format('truetype'); font-weight: 400; font-display: block; }
@font-face { font-family: 'Wick'; src: url(/assets/fonts/wick_bold.ttf) format('truetype'); font-weight: 700; font-display: block; }
:root {
  --ink: #1e1c18;          /* words on the light pages */
  --muted: #5e584e;        /* small print, dates, hints */
  --red: #8a2216;          /* headings */
  --blue: #244a7a;         /* links */
  --page: #dedbd5;         /* the light page inside a frame */
  --pane: #c9c6bf;         /* the title box */
  --well: #e9e6e0;         /* a box inside a page (rule boxes, the hiscores' lists) */
  --field: #f5f0e2;        /* a text field */
  --rim: #8e8a82;          /* the grey stone frame */
  --rule: #b3aea5;         /* a thin line inside a page */
  --edge: #4a463f;         /* the line round a page */
  --line: #16140f;         /* the dark outline round frames and buttons */
  --yellow: #ffd36a;       /* the game's yellow: counts and links on the wall */
  --on-wall: #efe9dc;      /* words straight on the wall */
  --wall-edge: 1px 1px 0 #000, 0 0 6px #000;
  --btn-face: #ece9e3; --btn-hi: #fbfaf7; --btn-ink: #1c1a16; --btn-red: #9a2a1a; --btn-red-hi: #ad3220;
  --btn: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(0,0,0,.12), 0 0 0 1px var(--line), 0 2px 0 rgba(0,0,0,.35);
  --btn-r: inset 0 1px 0 rgba(255,255,255,.28), inset 0 -2px 0 rgba(0,0,0,.25), 0 0 0 1px var(--line), 0 2px 0 rgba(0,0,0,.35);
  --wick: 'Wick', Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(rgba(58,36,52,.62), rgba(20,18,22,.28) 900px, rgba(12,11,13,.42)), #2a282b url(img/wall.png) repeat;
  background-size: auto, 320px auto;
  font: 15px/1.5 var(--wick);
}
input, button, select, textarea { font-family: var(--wick); }
a { color: var(--blue); text-decoration: none; }
a:hover, a:focus-visible { color: var(--red); text-decoration: underline; }
img { border: 0; image-rendering: pixelated; }   /* our pixel art drawn sharp */
[hidden] { display: none !important; }   /* the account form's username for password managers, the Contact page's Copy until its script */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* for screen readers only */
.wrap { max-width: 840px; margin: 0 auto; padding: 14px 16px 20px; }
.wrap.wide { max-width: 980px; }

/* ---- the header (inner pages) and the players-online line: light words on the wall, the count in the game's yellow ---- */
header.top { text-align: center; padding: 4px 0 0; }
header.top .emblem img { width: 300px; height: auto; display: inline-block; }
.online { margin: 2px 0 10px; color: var(--on-wall); font-size: 16px; text-align: center; text-shadow: var(--wall-edge); }
.online b { color: var(--yellow); }

/* ---- the plain button: a light face, a crisp dark line, dark words; the first choice red, as the game's Log in ---- */
.plate { display: inline-block; min-width: 148px; padding: 5px 10px 6px; text-align: center; font: 700 15px/1.2 var(--wick);
  background: var(--btn-face); color: var(--btn-ink); border: 0; border-radius: 2px; text-shadow: none; box-shadow: var(--btn); cursor: pointer; }
.plate.red { background: var(--btn-red); color: #fff; box-shadow: var(--btn-r); }
a.plate:hover { color: var(--btn-ink); background: var(--btn-hi); text-decoration: none; }
a.plate.red:hover { color: #fff; background: var(--btn-red-hi); }
a.plate:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.stonebox button, .account button, .contact button.copy {
  font: 700 15px/1.2 var(--wick); padding: 5px 14px 6px; background: var(--btn-face); color: var(--btn-ink); border: 0; border-radius: 2px; text-shadow: none;
  box-shadow: var(--btn); cursor: pointer; white-space: nowrap; }
.stonebox button:hover, .account button:hover, .account button:focus-visible, .contact button.copy:hover, .contact button.copy:focus-visible { color: var(--btn-ink); background: var(--btn-hi); }

/* ---- the menu: plain buttons on a band of brick, in even rows so no button is left alone on a row: on a computer two
   (the first six, then the rest), on a phone three (four, three, four). The breaks are the menu's ::before and ::after
   (a full-width item between the rows); each button's top and bottom margin makes the gap between rows. ---- */
nav.menu { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 5px; row-gap: 0; margin: 0 0 14px; padding: 5px 8px;
  background: #6f6a62 url(/assets/ui/look/bricks.png) repeat; background-size: 128px auto; image-rendering: pixelated;
  box-shadow: 0 0 0 1px var(--line), inset 0 0 0 1px rgba(255,255,255,.18), 0 3px 10px rgba(0,0,0,.45); }
nav.menu a { margin: 2px 0; padding: 3px 9px 4px; color: var(--btn-ink); font-weight: 700; font-size: 14px; line-height: 1.5; white-space: nowrap; text-shadow: none;
  background: var(--btn-face); border-radius: 2px; box-shadow: var(--btn); }
nav.menu a:hover { color: var(--btn-ink); background: var(--btn-hi); text-decoration: none; }
nav.menu a.on { background: var(--btn-red); color: #fff; box-shadow: var(--btn-r); }
nav.menu a:focus-visible { outline: 2px solid var(--yellow); outline-offset: 1px; }
nav.menu::before, nav.menu::after { content: ''; display: none; flex-basis: 100%; height: 0; }
@media (min-width: 721px) {
  nav.menu::after { display: block; order: 1; }
  nav.menu a:nth-child(n+7) { order: 2; }
}
@media (max-width: 720px) {
  nav.menu::before { display: block; order: 1; }
  nav.menu a:nth-child(n+5) { order: 2; }
  nav.menu::after { display: block; order: 3; }
  nav.menu a:nth-child(n+8) { order: 4; }
}

/* ---- framed panels: a grey stone rim round a light page, a dark line outside (the game's window case) ---- */
.panel, main.frame { background: var(--rim); padding: 5px; border-radius: 3px;
  box-shadow: 0 0 0 1px var(--line), inset 1px 1px 0 rgba(255,255,255,.35), inset -1px -1px 0 rgba(0,0,0,.35), 0 4px 14px rgba(0,0,0,.55); }
.panel { margin: 0 0 16px; }
.panel > .in, main.frame > .in { background: var(--page); color: var(--ink); border-radius: 2px; box-shadow: 0 0 0 1px var(--edge); }
.panel > .in { height: 100%; padding: 9px 14px 14px; }
.panel h2 { margin: 0 0 10px; text-align: center; color: var(--red); font: 700 17px/1.3 var(--wick); letter-spacing: 0; text-shadow: none; }

/* ---- the title page ---- */
.home .wrap { position: relative; padding-top: 18px; max-width: 1200px; }
/* TEN6-SITE-ART (the owner, 2026-10-23: "Is this the optimized best flow? Also, the site just feels kind of plain. Should we add
   more old school art?"; the mock-up of our recommendations): a wide banner of the Grey Keep (the game's loading picture at the
   visitor's time of day, its torches burning: /js/hero.js; dusk without the script) holding the emblem, one line on what the
   game is, the two big buttons and the players online; then rows of two: the newest update (a picture beside each line) |
   the news (a scroll on wooden rods) and the Discord; the trailer | what the game is; help | the rest of the realm. */
.hero { position: relative; height: 470px; margin: 0 0 18px; overflow: hidden; border-radius: 2px; image-rendering: pixelated;
  background: #2a2228 url(/assets/icons/ui/v3/loading/dusk_land_lit.png) center 50% / cover no-repeat;
  box-shadow: 0 0 0 1px #16140f, 0 0 0 6px #8e8a82, 0 0 0 7px #16140f, 0 6px 18px rgba(0,0,0,.6); }
.hero-scene { position: absolute; inset: 0; overflow: hidden; }
.hero-stage { position: absolute; }
.hero-stage img { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.hero-fire, .hero-glow { position: absolute; background-repeat: no-repeat; image-rendering: pixelated; }
.hero-glow { background-size: 100% 100%; mix-blend-mode: screen; opacity: .7; }
.hero-scene::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(12,10,14,.30), rgba(12,10,14,0) 34%, rgba(12,10,14,0) 52%, rgba(12,10,14,.62)); }
.hero-in { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; padding: 10px 16px 14px; text-align: center; }
.hero-in .emblem { margin-bottom: auto; }
.hero-in .emblem img { width: 300px; max-width: 80vw; height: auto; display: block; }
.pitch { margin: 0 0 12px; font: 700 21px/1.25 'Wick', Georgia, serif; color: #fff; text-shadow: 2px 2px 0 #000, 0 0 8px #000; }
.calls { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.plate.big { display: inline-block; min-width: 250px; padding: 11px 22px 9px; font-size: 24px; line-height: 1.15; }
.plate.big small { display: block; margin-top: 4px; font: 400 14px/1.2 'Wick', Georgia, serif; }
.hero .online { margin: 10px 0 0; font-size: 15px; color: #fff; text-shadow: 1px 1px 0 #000, 0 0 6px #000; }
.row { display: grid; gap: 16px; margin: 0 0 16px; align-items: start; }
.row .panel { margin: 0; }
.row.upd { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.row.upd .col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.row.pitchrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.row.pitchrow:not(:has(.panel.trailer)) { grid-template-columns: 1fr; }
.row .discordbox { flex-direction: column; text-align: center; gap: 8px; }
/* the newest update: a picture from the game beside each line (img/updates/, tools/process_update_thumbs.py) */
.latest ul { list-style: none; margin: 4px 0 6px; padding: 0; }
.latest li { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 4px 14px; align-items: start; margin: 0 0 12px; }
.latest li .thumb { grid-column: 1; grid-row: 1; width: 160px; height: 90px; display: block; image-rendering: pixelated;
  box-shadow: 0 0 0 1px #16140f, 0 0 0 3px #8e8a82, 0 0 0 4px #16140f; margin: 4px; }
.latest li:not(:has(.thumb)) { display: list-item; list-style: disc; margin-left: 18px; }
/* the news on a scroll: our parchment between two wooden rods (the game's scroll windows), drawn as the game's fixed frame (the
   owner's walk E3, assets/ui/kw_look.css): the paper inside the rolls and meeting them. The game lays the rods 19 / 43 px outside its
   6 px side border (an outset); here the same geometry stays inside the panel's own box so the knobs never reach the next panel or
   the page's edge: border 42 / 49 px (23 + 19, 6 + 43), the rods 46 / 50 px, the paper the padding box only. The roll's body (53 px
   into the picture) then stands 1.7 px outside the paper's edge, and each rod's edge 2.2 px over the paper, as in the game. */
.panel.news { padding: 0; background: #e9dcbc url(/assets/ui/look/parch_warm.png) 0 0 / 256px auto repeat; background-clip: padding-box; background-origin: padding-box;
  border-radius: 0; border-style: solid; border-color: transparent; border-width: 42px 49px;
  border-image: url(/assets/ui/look/scroll_rods.png) 51 56 / 46px 50px stretch; image-rendering: pixelated;
  box-shadow: inset 7px 0 8px -5px rgba(70,50,20,.45), inset -7px 0 8px -5px rgba(70,50,20,.45); }
.panel.news > .in { background: transparent; box-shadow: none; padding: 6px 8px 8px; }
/* the tip jar, one line at the foot of Around the Realm */
.tipline { display: flex; gap: 10px; align-items: center; margin: 14px 0 0; padding: 10px 0 0; border-top: 1px solid #b8b4ac; }
.tipline .ico img { width: 32px; height: 32px; display: block; image-rendering: pixelated; }
.tipline p { margin: 0; font-size: 13px; color: var(--ink); }
/* the side margins of a wide screen: our banners and iron wall torches with sprite fire (img/art/, Blender; the fire is the
   loading screen's own sheet). Nothing here loads below 1560 px (display: none). */
.margin-art { display: none; }
@keyframes burn12 { to { background-position: -1008px 0; } }
@media (min-width: 1560px) {
  .margin-art { display: block; position: absolute; top: 0; left: 0; right: 0; height: 0; pointer-events: none; }
  .marg { position: absolute; top: 30px; width: 150px; display: flex; flex-direction: column; align-items: center; }
  .marg.l { left: -178px; } .marg.r { right: -178px; }
  .marg .banner { display: block; width: 146px; height: 422px; background: url(/img/art/banner.png) 0 0 / 100% 100% no-repeat; image-rendering: pixelated; }
  /* the torch (Blender, 32 x 71 art px at 2x); the fire is the loading screen's sheet, its 42 x 74 frame standing on the rag */
  .marg .torch { display: block; position: relative; margin-top: 190px; width: 64px; height: 142px; background: url(/img/art/torch.png) 0 0 / 100% 100% no-repeat; image-rendering: pixelated; }
  .marg.r .torch { background-image: url(/img/art/torch_r.png); }
  .marg .fire { position: absolute; left: 2px; top: -138px; width: 84px; height: 148px;
    background: url(/assets/icons/ui/v3/loading/flame_land_0.png) 0 0 / 1008px 148px no-repeat; image-rendering: pixelated; animation: burn12 1s steps(12) infinite; }
  .marg.r .fire { left: -24px; animation-delay: -.4s; }
}
/* the home page's panels as the game's frames: each heading on a carved stone plate (img/art/header.png, a 9-slice), an iron
   bracket on each corner (img/art/bracket_*.png); the news keeps its scroll */
.home .panel:not(.news), .home .hero { position: relative; }
.home .panel:not(.news)::before, .home .panel:not(.news)::after, .home .hero::before, .home .hero::after { content: ''; position: absolute; left: -5px; right: -5px; height: 44px; z-index: 3;
  pointer-events: none; image-rendering: pixelated; }
.home .panel:not(.news)::before, .home .hero::before { top: -5px; background: url(/img/art/bracket_tl.png) left top / 44px 44px no-repeat, url(/img/art/bracket_tr.png) right top / 44px 44px no-repeat; }
.home .panel:not(.news)::after, .home .hero::after { bottom: -5px; background: url(/img/art/bracket_bl.png) left bottom / 44px 44px no-repeat, url(/img/art/bracket_br.png) right bottom / 44px 44px no-repeat; }
.home .hero::before { top: 0; left: 0; right: 0; } .home .hero::after { bottom: 0; left: 0; right: 0; }
.home .panel:not(.news) h2 { margin: 0 0 12px; padding: 1px 0 0; line-height: 30px; border-style: solid; border-width: 20px 52px;
  border-image: url(/img/art/header.png) 10 26 10 26 fill / 20px 52px stretch; image-rendering: pixelated; color: #ffd36a; text-shadow: 2px 2px 0 #000; }
.newsbox { display: flex; gap: 12px; align-items: flex-start; }
.latest .lt { margin: 0 0 4px; font-size: 17px; }
.latest .lt a { font-weight: bold; }
.latest .lt .d { color: var(--ink); font-size: 13px; margin-left: 8px; white-space: nowrap; }
.latest ul { margin: 0 0 4px 18px; padding: 0; font-size: 15px; line-height: 1.4; }
.latest li { margin: 2px 0; }
.latest .more { margin: 0; }
.newsbox .ico img { width: 80px; height: 80px; }
.newslist { flex: 1; border-collapse: collapse; font-size: 15px; }
.newslist td { padding: 1px 0; vertical-align: top; }
.newslist td.d { text-align: right; color: var(--ink); padding-left: 12px; white-space: nowrap; }
.more { margin: 10px 0 0; text-align: center; color: var(--ink); }
.none { color: var(--muted); font-style: italic; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two .panel { margin: 0 0 16px; }
/* Help and Community, Around the Realm: one row each, the icon beside its plate and its words (the words get the panel's
   width, not a sliver between the icon and the frame) */
.grid2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
.svc { display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto 1fr; column-gap: 10px; }
.svc .row { display: contents; }
.svc .ico { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
.svc .ico img { width: 64px; height: 64px; display: block; }
.svc .plate { grid-column: 2; grid-row: 1; justify-self: start; }
.svc p { grid-column: 2; grid-row: 2; margin: 5px 0 0; color: var(--ink); }
/* the tip jar (owner 2026-10-12, while in beta; server/site/links.js): a small optional box under the panels (the menu's
   last link on the other pages). The coffee cup is the game's own Blender item icon. */
.panel.tip { max-width: 470px; margin: 0 auto 16px; }
.panel.tip > .in { padding: 7px 12px 10px; }
.panel.tip h2 { margin-bottom: 6px; }
.tipjar { display: flex; gap: 10px; align-items: center; }
.tipjar .ico img { width: 56px; height: 56px; display: block; }
.tipjar p { margin: 0; color: var(--ink); }

/* ---- inner pages: the framed content box and its title box ---- */
main.frame > .in { padding: 14px 20px 20px; min-height: 300px; }
.titlebox { max-width: 420px; margin: 0 auto 16px; padding: 5px 14px 6px; text-align: center; background: var(--pane); border: 0;
  box-shadow: 0 0 0 1px var(--line), inset 0 1px 0 rgba(255,255,255,.5); }
.titlebox h1 { margin: 0; color: var(--red); font: 700 19px/1.3 var(--wick); }
.titlebox .sub { margin: 2px 0 0; color: var(--muted); }
.pad { padding: 0 2px; }
main.frame h2 { color: var(--red); font-size: 17px; margin: 22px 0 6px; text-shadow: none; }
main.frame h3 { color: var(--ink); font-size: 15px; margin: 0 0 8px; text-align: center; }
main.frame p, main.frame li { font-size: 15px; line-height: 1.55; }
ul { padding-left: 22px; }
li { margin: 5px 0; }
ol { padding-left: 26px; }
.back { margin-top: 18px; }
.dateline { color: var(--red); font-weight: bold; margin-top: 0; }
.article p:first-of-type { margin-top: 0; }
/* a box inside a page (rule boxes, the legal summaries, the hiscores' lists): a lighter well with a grey line */
.rulebox, .legal .summary, .hs-tables, .hs-main { background: var(--well); border: 1px solid var(--rim); box-shadow: inset 1px 1px 0 rgba(0,0,0,.06); }

/* ---- tables (news archive, hiscores) ---- */
.table { width: 100%; border-collapse: collapse; }
.table th { color: var(--ink); text-align: left; padding: 3px 8px; border-bottom: 1px solid var(--rim); white-space: nowrap; }
.table td { padding: 3px 8px; vertical-align: top; }
.table tr:nth-child(even) td { background: rgba(0,0,0,.04); }
.table .n { text-align: right; font-variant-numeric: tabular-nums; }
.table .d { white-space: nowrap; color: var(--ink); width: 1%; }
.table tr.hl td { background: #efe0ae; color: var(--ink); }
.teaser { color: var(--muted); font-size: 13px; }
.pager { text-align: center; margin: 14px 0 0; word-spacing: 4px; }
.pager span { color: var(--muted); }
.pager b { color: var(--red); }

/* ---- hiscores ---- */
.hs-wrap { display: grid; grid-template-columns: 210px 1fr; gap: 18px; align-items: start; }
.hs-side h3, .hs-main h3 { margin: 0 0 6px; }
.hs-tables { list-style: none; margin: 0; padding: 6px 10px; }
.hs-tables li { margin: 0; }
.hs-tables a { display: flex; align-items: center; gap: 7px; padding: 2px 4px; }
.hs-tables img { width: 18px; height: 18px; image-rendering: pixelated; }
.hs-tables li.on a { color: var(--red); font-weight: bold; }
.hs-main { padding: 10px 10px 12px; min-height: 200px; min-width: 0; overflow-x: auto; }
.hs .sk img { width: 18px; height: 18px; vertical-align: -4px; image-rendering: pixelated; }
.crown { image-rendering: pixelated; vertical-align: -1px; }
/* the two search boxes: the label on top, then the field and its button side by side (the field gives way, never the button) */
.hs-search { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin: 18px 0 0; }
.stonebox { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; width: 300px; max-width: 100%; padding: 8px 14px 12px;
  background: var(--pane); box-shadow: 0 0 0 1px var(--line), inset 0 1px 0 rgba(255,255,255,.5); }
.stonebox label { flex: 0 0 100%; text-align: center; color: var(--ink); font-weight: bold; text-shadow: none; }
.stonebox input[type=text], .stonebox input:not([type]), .stonebox input[type=number] { flex: 1 1 120px; min-width: 0; width: 120px; font: 15px var(--wick);
  padding: 4px 7px; border: 1px solid var(--edge); background: var(--field); color: #000; }
.stonebox button { flex: none; margin: 0; }
.asof, .note { color: var(--muted); font-size: 12px; text-align: center; margin: 12px 0 0; }

/* ---- the world map (zoom: four radio buttons before the map; /js/worldmap.js adds dragging) ---- */
.zoomr { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.map-tools { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: center; margin: 0 0 10px; }
.map-tools .zoom { display: inline-flex; gap: 5px; }
.map-tools .zoom label { display: inline-block; padding: 3px 11px 4px; cursor: pointer; background: var(--btn-face); color: var(--btn-ink); font-weight: bold; border-radius: 2px;
  box-shadow: var(--btn); user-select: none; }
.map-tools .zoom label:hover { background: var(--btn-hi); }
#z1:checked ~ .map-tools label[for=z1], #z2:checked ~ .map-tools label[for=z2], #z3:checked ~ .map-tools label[for=z3], #z4:checked ~ .map-tools label[for=z4] {
  background: var(--btn-red); color: #fff; box-shadow: var(--btn-r); }
#z1:focus-visible ~ .map-tools label[for=z1], #z2:focus-visible ~ .map-tools label[for=z2], #z3:focus-visible ~ .map-tools label[for=z3], #z4:focus-visible ~ .map-tools label[for=z4] { outline: 2px solid var(--blue); outline-offset: 1px; }
.map-hint { color: var(--muted); font-size: 12px; }
.mapview { position: relative; overflow: auto; height: 72vh; min-height: 320px; max-height: 780px; background: #3e5c8a; border: 1px solid var(--edge); box-shadow: 0 0 0 1px var(--line);
  cursor: grab; overscroll-behavior: contain; }
.mapview:focus-visible { outline: 2px solid var(--blue); }
.mapview.drag { cursor: grabbing; }
.mapview .sheet { position: relative; width: 100%; }
.mapview .sheet > img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; image-rendering: auto; }   /* the whole island: smooth */
#z1:checked ~ .mapview .sheet { width: min(100%, calc(72vh - 4px)); margin: 0 auto; }   /* the whole island fits the box */
#z2:checked ~ .mapview .sheet { width: 160%; }
#z3:checked ~ .mapview .sheet { width: 250%; }
#z4:checked ~ .mapview .sheet { width: 400%; }
#z2:checked ~ .mapview .sheet > img, #z3:checked ~ .mapview .sheet > img, #z4:checked ~ .mapview .sheet > img { image-rendering: pixelated; }
#z1:checked ~ .mapview .maplabel.minor { display: none; }
.maplabel { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; pointer-events: none; color: #ffe9b0; font: bold 12px var(--wick);
  text-shadow: 1px 1px 0 #1a1208, -1px -1px 0 #1a1208, 1px -1px 0 #1a1208, -1px 1px 0 #1a1208; }
#z3:checked ~ .mapview .maplabel, #z4:checked ~ .mapview .maplabel { font-size: 13px; }
.maplabel.small { font-size: 11px; color: #fff4d0; }
/* round 3 (TR-ICONS): the game's own map icons over the picture, at their real size and pixel-sharp at every zoom (twice
   the size from x2.5 on a wide screen), nudged by --dx / --dy px where two would overlap; the key shows the same files */
.mapview .sheet > img.mapicon, .below .cave img.mapicon { position: absolute; display: block; width: auto; height: auto; image-rendering: pixelated;
  transform: translate(calc(-50% + var(--dx, 0) * 1px), calc(-50% + var(--dy, 0) * 1px)); user-select: none; -webkit-user-drag: none; }
#z3:checked ~ .mapview .sheet > img.mapicon, #z4:checked ~ .mapview .sheet > img.mapicon { transform: translate(calc(-50% + var(--dx, 0) * 2px), calc(-50% + var(--dy, 0) * 2px)) scale(2); }
.mapkey { display: flex; flex-wrap: wrap; gap: 8px 26px; justify-content: center; margin: 12px 0 0; }
.mapkey .keygroup h3 { margin: 0 0 4px; padding: 0; font: bold 12px var(--wick); color: var(--red); text-align: left; }
.mapkey ul { display: flex; flex-direction: column; gap: 3px; margin: 0; padding: 0; list-style: none; }
.mapkey li { display: flex; align-items: center; gap: 6px; font-size: 12px; margin: 0; }
.mapkey img { flex: none; width: auto; height: auto; image-rendering: pixelated; }
.below { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 10px; }
.below figure { margin: 0; text-align: center; }
.below .cave { position: relative; background: #000; border: 1px solid var(--edge); box-shadow: 0 0 0 1px var(--line); }
.below .cave img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.below figcaption { color: var(--ink); font-weight: bold; margin-top: 4px; }
.below figcaption span { display: block; color: var(--muted); font-weight: normal; font-size: 12px; }

/* ---- rules and roadmap ---- */
.rules .lead, .roadmap .lead { font-size: 14px; }
.rulebox { padding: 4px 14px 8px; margin: 12px 0; }
.rulebox h2 { margin-top: 10px; }
.toc { color: var(--muted); }
.penalties td, .penalties th { font-size: 13px; }
.road { list-style: none; padding: 0; margin: 0; }
.road > li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); margin: 0; }
/* the tags as small plain buttons: Now grey, Next red, Later green */
.road .tag { align-self: start; text-align: center; font-weight: bold; font-size: 14px; padding: 2px 0 3px; color: var(--btn-ink); background: var(--btn-face); border-radius: 2px; box-shadow: var(--btn); }
.road .tag.next { background: var(--btn-red); color: #fff; box-shadow: var(--btn-r); }
.road .tag.later { background: #3f5a2a; color: #fff; box-shadow: var(--btn-r); }
.road h3 { text-align: left !important; margin: 0 0 3px !important; color: var(--red) !important; }
.road p { margin: 0; }

/* ---- the legal pages (terms, privacy) ---- */
.legal .meta { color: var(--muted); font-size: 13px; }
.legal .summary { padding: 10px 14px; }
.legal .toc { font-size: 13px; line-height: 1.9; margin: 16px 0 6px; }
.legal .notice { border-left: 4px solid var(--red); padding-left: 12px; }
.legal .caps { font-size: 13px; }
.placeholder { background: #6b1d1d; color: #fff2c4; border: 1px dashed #ffcf3f; padding: 0 4px; }

/* ---- the contact page (two plain boxes: the Message Centre, the support address + /js/contact.js's Copy button) ---- */
.contact .lead { font-size: 14px; }
.contact .act { text-align: center; margin: 12px 0; }
.contact .addr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.contact .mail { color: var(--ink); font: bold 16px var(--wick); background: var(--field); border: 1px solid var(--edge); padding: 3px 9px; overflow-wrap: anywhere; user-select: all; }
.contact .copied { color: #2e6a1e; font-size: 13px; font-weight: bold; }
.contact .copied.hint { color: var(--muted); font-weight: normal; }

/* ---- the footer: light words on the wall, links in the game's yellow ---- */
.foot { text-align: center; color: var(--on-wall); font-size: 12px; margin: 16px 0 4px; text-shadow: var(--wall-edge); }
.foot p { margin: 3px 0; }
.foot a { color: var(--yellow); }
.foot a:hover, .foot a:focus-visible { color: #fff2c4; }
.foot .fine { color: #c9bfa6; }


/* ---- tablets and narrow windows: the update's pictures step down ---- */
@media (max-width: 960px) {
  .row.upd, .row.pitchrow { grid-template-columns: 1fr; }   /* the news scroll needs more than a third of a narrow page */
}
/* ---- phones and narrow windows: the banner framed tall (the keep's phone picture), the buttons full width, every row one
   column: the emblem, Play and New, the update, the news, the Discord, the trailer ---- */
@media (max-width: 720px) {
  .wrap { padding: 10px 16px 16px; }
  .two, .grid2, .hs-wrap, .row.upd, .row.pitchrow { grid-template-columns: 1fr; }
  .hero { height: 600px; background-image: url(/assets/icons/ui/v3/loading/dusk_port_lit.png); }
  .hero-in .emblem img { width: 260px; }
  .pitch { font-size: 17px; }
  .calls { flex-direction: column; align-items: stretch; width: 100%; gap: 10px; }
  .plate.big { min-width: 0; width: 100%; font-size: 21px; }
  /* (a phone: the game's phone rods, two thirds as big, 33 / 36 px; 6 / 30 px out of its 23 / 6 px border: here 29 / 36 px) */
  .panel.news { border-width: 29px 36px; border-image-width: 33px 36px; }
  header.top .emblem img { width: 240px; }
  .newsbox .ico { display: none; }
  main.frame > .in { padding: 12px 12px 16px; }
  nav.menu { column-gap: 4px; padding: 4px 6px; }
  nav.menu a { padding: 3px 7px 4px; font-size: 13px; }
  .hs-tables { columns: 2; column-gap: 10px; }
  .hs-tables li { break-inside: avoid; }
  .table th, .table td { padding: 3px 5px; }
  .mapview { height: 62vh; }
  #z1:checked ~ .mapview .maplabel:not(.major), #z2:checked ~ .mapview .maplabel.minor { display: none; }   /* a phone's small map: the big places only */
  #z1:checked ~ .mapview .maplabel { font-size: 11px; }
  #z1:checked ~ .mapview .sheet { width: 100%; }
  #z3:checked ~ .mapview .sheet > img.mapicon, #z4:checked ~ .mapview .sheet > img.mapicon { transform: translate(calc(-50% + var(--dx, 0) * 1px), calc(-50% + var(--dy, 0) * 1px)); }   /* a phone: the real size */
  .road > li { grid-template-columns: 1fr; gap: 4px; }
  .road .tag { justify-self: start; padding: 2px 10px 3px; }
  .stonebox { width: 100%; }
}
/* the Updates page (deploy/realm-site/updates.html + js/updates.js, 2026-10-13) */
.updates .update{margin:0 0 18px}
.updates .update h3{margin:0 0 4px}
.updates .update h3 .date{font-size:12px;font-weight:normal;color:var(--muted);margin-left:8px}
.updates .update ul{margin:4px 0 0 20px;padding:0}
.updates .update li{margin:3px 0}

/* ---- SITE-SIGNUP (OWNER_INBOX N32-N34, 2026-10-16): the Discord, the phone note, the trailer, Account settings ---- */
.discordbox { display: flex; gap: 14px; align-items: center; justify-content: center; }
.discordbox .plate { flex: none; }
.discordbox p { margin: 0; color: var(--ink); max-width: 440px; }
.foot a.discord { color: var(--yellow); font-weight: bold; }
/* phone and tablet visitors only (a touch screen without a mouse, or a narrow window): the game plays best on a computer */
.phone-note { display: none; margin: 0 0 14px; padding: 9px 12px; text-align: center; color: #fff; background: rgba(138,34,22,.86);
  box-shadow: 0 0 0 1px var(--line); text-shadow: 1px 1px 0 #000; }
.phone-note b { color: var(--yellow); }
.phone-note a { color: #ffe9b0; text-decoration: underline; }
@media (hover: none) and (pointer: coarse), (max-width: 600px) { .phone-note { display: block; } }
/* (the box is .trailerbox: the panel around it is section.panel.trailer and keeps every panel's width and margins) */
.trailerbox { max-width: 640px; margin: 0 auto 14px; background: #000; box-shadow: 0 0 0 1px var(--line); }
.panel.trailer .more { margin: 0 0 4px; }
.trailerbox video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }
main.frame .account h3 { margin: 18px 0 6px; color: var(--red); font-size: 15px; text-align: left; }
main.frame .account h3:first-of-type { margin-top: 4px; }
.account p { margin: 6px 0; }
.account .muted, .account .hint { color: var(--muted); font-size: 12px; }
/* the forms: fields a little taller than the text, inside the page with room on the right */
.acct-form { max-width: 360px; margin: 6px 0 4px; }
.acct-form label { display: block; margin: 10px 0 4px; font-weight: bold; color: var(--ink); }
.acct-form input { display: block; width: 100%; font: 15px var(--wick); padding: 5px 8px; border: 1px solid var(--edge); background: var(--field); color: #000; }
.account button { margin-top: 12px; max-width: 100%; }
.secure-note { margin: 6px 0 8px; padding: 8px 10px; color: var(--ink); background: #efe0d4; box-shadow: inset 3px 0 0 var(--red), inset 0 0 0 1px #b8a99a; }
.secure-note b { color: var(--red); }
.flash { padding: 7px 10px; margin: 0 0 10px; color: var(--ink); box-shadow: inset 0 0 0 1px var(--rim); }
.flash.ok { background: #d6e6c8; }
.flash.err { background: #efd2c8; }
@media (max-width: 720px) { .discordbox { flex-direction: column; text-align: center; } }

/* ---- the forums and the Message Centre (server/community/frame.js renders them with a small dark sheet of its own, scoped
   to .fm and printed after this file): the same light pages, wells, buttons and fields as the rest of the site. Every rule
   here starts with body.site so it outweighs that sheet. ---- */
body.site .fm { --fm-edge: var(--rim); --fm-row: var(--well); --fm-row2: #e2dfd9; --fm-head: var(--pane); --fm-muted: var(--muted); --fm-gold: var(--red); }
body.site .fm .bar { font-size: 12px; border: 1px solid var(--rim); }
body.site .fm .bar b { color: var(--ink); }
body.site .fm h2.fm-title { font-size: 19px; }
body.site .fm h2 { font-size: 17px; }
body.site .fm .box, body.site .fm table.list, body.site .fm .post { border: 1px solid var(--rim); }
body.site .fm .flash { border: 1px solid #8fae76; background: #d6e6c8; color: var(--ink); }
body.site .fm .flash.err { border-color: #c09080; background: #efd2c8; color: var(--ink); }
body.site .fm table.list th { color: var(--ink); font-size: 14px; border-bottom: 1px solid var(--rim); }
body.site .fm table.list td { border-top: 1px solid #cdc8bf; }
body.site .fm td.last, body.site .fm .about { font-size: 12px; }
body.site .fm .tag { font-size: 12px; padding: 0 5px 1px; background: #5b564d; color: #fff; }
body.site .fm .tag.red { background: var(--btn-red); color: #fff; }
body.site .fm .tag.new { background: var(--yellow); color: #000; }
body.site .fm .post .who { border-right: 1px solid var(--rim); font-size: 12px; }
body.site .fm .post .who b { color: var(--ink); font-size: 15px; }
body.site .fm .post.staff .who { background: #e6d9b4; }
body.site .fm .post .msg { font-size: 15px; }
body.site .fm .post .head { font-size: 12px; border-bottom: 1px solid #cdc8bf; }
body.site .fm .tools { font-size: 12px; }
body.site .fm input, body.site .fm select, body.site .fm textarea { font: 15px var(--wick); color: #000; background: var(--field); border: 1px solid var(--edge); padding: 4px 7px; }
body.site .fm button { font: 700 15px/1.2 var(--wick); padding: 5px 12px 6px; color: var(--btn-ink); background: var(--btn-face); border: 0; border-radius: 2px; box-shadow: var(--btn); }
body.site .fm button:hover { color: var(--btn-ink); background: var(--btn-hi); }
body.site .fm button.danger { color: var(--btn-red); }
body.site .fm button.small { padding: 2px 8px 3px; font-size: 13px; }
body.site .fm .pager { font-size: 14px; }
body.site .fm .field label { font-size: 15px; color: var(--ink); margin-bottom: 4px; }
body.site .fm .hint { font-size: 12px; }
@media (max-width: 620px) { body.site .fm .post .who { border-right: 0; border-bottom: 1px solid var(--rim); } }
