/* MurlocsRUs PvP. Modeled on the Warcraft III-era Battle.net lobby: rough stone
   ground, forged iron frames with corner bosses, dark blue stone buttons, gold
   lettering with hard black shadows, a plank board with parchment notices.
   Textures are generated by tools/textures/make_textures.py. No game UI art is
   used; the map images come from the game's map files (see tools/maps). */

:root {
  --ink: #050506;
  --stone-0: #0b0b0c;
  --stone-1: #141415;
  --stone-2: #1d1d1f;
  --line: #2b2925;
  --line-hi: #4a463e;
  --gold: #c9a54e;
  --gold-hi: #ecd38c;
  --gold-lo: #7a5a22;
  --text: #ddd5c1;
  --muted: #a0977f;
  --faint: #716a5b;
  --alliance: #5a82c4;
  --alliance-text: #92b3ea;
  --alliance-soft: rgba(70, 104, 170, 0.16);
  --horde: #b13a2b;
  --horde-text: #e28877;
  --horde-soft: rgba(170, 50, 36, 0.16);
  --kill: #d8653d;
  --good: #79b886;
  --shadow: 1px 1px 0 #000, -1px 0 0 rgba(0, 0, 0, 0.6), 0 -1px 0 rgba(0, 0, 0, 0.6);
  --font-display: "Marcellus SC", "Friz Quadrata", Georgia, serif;
  --font-body: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --font-num: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(0.25, 0.6, 0.3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  font: 17px/1.55 var(--font-body);
  background: var(--stone-0) url("img/stone.jpg") repeat;
  min-height: 100vh;
}
/* Darkened edges, the way the old lobby screens sat in a black surround. */
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; box-shadow: inset 0 0 180px 40px rgba(0, 0, 0, 0.85); }
a { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.muted { color: var(--muted); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* Forged frame: a 9-slice iron border with square corner bosses around a slate panel. */
.frame {
  position: relative;
  border: 20px solid #2a2826;
  border-image: url("img/frame.png") 40 / 20px stretch;
  background: #101012 url("img/slate.jpg") repeat;
  background-clip: padding-box;
  box-shadow: 0 10px 0 -4px rgba(0, 0, 0, 0.55), 0 14px 26px rgba(0, 0, 0, 0.7);
}

.plate-title {
  font: 400 16px/1.2 var(--font-display);
  letter-spacing: 0.08em;
  margin: 0;
  color: var(--gold);
  text-shadow: var(--shadow);
}

/* Lobby button: rough blue stone in a thin iron bevel with gold lettering. */
.lobby-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px;
  padding: 4px 16px;
  font: 400 15px/1 var(--font-display);
  letter-spacing: 0.06em;
  color: var(--gold-hi);
  text-decoration: none;
  cursor: pointer;
  background: #141c33 url("img/navy.jpg") repeat;
  border: 6px solid #3a3836;
  border-image: url("img/frame-thin.png") 12 / 6px stretch;
  background-clip: padding-box;
  text-shadow: var(--shadow);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.6);
}
.lobby-btn:hover { filter: brightness(1.3); color: #fff2c8; }
.lobby-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.6); filter: brightness(0.9); }
.lobby-btn[aria-current="page"] { background-image: linear-gradient(rgba(236, 211, 140, 0.16), rgba(236, 211, 140, 0.16)), url("img/navy.jpg"); color: #fff2c8; }
.lobby-btn[aria-current="page"]::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: -6px; height: 2px; background: var(--gold-hi); }
.lobby-btn[disabled] { filter: grayscale(0.8) brightness(0.7); cursor: not-allowed; transform: none; }
.lobby-btn.gold {
  background: #6e5320 url("img/stone.jpg") repeat;
  background-image: linear-gradient(rgba(150, 112, 42, 0.86), rgba(110, 78, 26, 0.9)), url("img/stone.jpg");
  color: #f6e7bd;
}

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; }
.topbar-inner {
  display: flex; align-items: center; gap: 22px;
  padding: 10px max(18px, env(safe-area-inset-right)) 10px max(18px, env(safe-area-inset-left));
  background: #141415 url("img/slate.jpg") repeat;
  border-bottom: 3px solid var(--ink);
  box-shadow: inset 0 -1px 0 var(--gold-lo), inset 0 1px 0 #34312c, 0 4px 0 rgba(0, 0, 0, 0.5);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand-emblem { width: 42px; height: 42px; filter: drop-shadow(2px 2px 0 #000); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font: 400 24px/1 var(--font-display); letter-spacing: 0.03em; color: var(--gold); text-shadow: 2px 2px 0 #000; }
.brand-sub { font: 400 11px/1.4 var(--font-display); letter-spacing: 0.5em; color: var(--muted); margin-top: 3px; text-shadow: 1px 1px 0 #000; }
.mainnav { display: flex; gap: 10px; flex: 1; justify-content: center; flex-wrap: wrap; }
.account { flex-shrink: 0; }

.warfront {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 6px max(18px, env(safe-area-inset-right)) 6px max(18px, env(safe-area-inset-left));
  background: rgba(6, 6, 7, 0.94);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.wf-side { display: flex; align-items: baseline; gap: 10px; }
.wf-label { font: 400 13px var(--font-display); letter-spacing: 0.1em; text-shadow: 1px 1px 0 #000; }
.wf-alliance .wf-label, .wf-alliance .odo { color: var(--alliance-text); }
.wf-horde .wf-label, .wf-horde .odo { color: var(--horde-text); }
.wf-bar { position: relative; height: 10px; background: #5b1a12; border: 1px solid #000; box-shadow: 0 0 0 1px var(--line-hi); }
.wf-fill { position: absolute; inset: 0 auto 0 0; width: 50%; background: #2d4f8c; border-right: 2px solid var(--gold-hi); transition: width 900ms var(--ease); }
.wf-mark { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: rgba(236, 211, 140, 0.5); }

/* Odometer numbers: each digit is a column that rolls into place. */
.odo { display: inline-flex; font-family: var(--font-num); font-weight: 700; font-variant-numeric: tabular-nums; overflow: hidden; height: 1.25em; line-height: 1.25em; }
.odo .col { display: flex; flex-direction: column; transition: transform 900ms var(--ease); }
.odo .col span { height: 1.25em; }
.odo .sep { display: inline-block; }

.preview-note {
  position: relative; z-index: 1;
  max-width: 1320px; margin: 14px auto 0;
  padding: 7px 14px;
  font-size: 14px; color: #3a2a12;
  background: #cbb588 url("img/parchment.jpg");
  border: 1px solid #000;
  box-shadow: inset 0 0 18px rgba(90, 60, 20, 0.45), 2px 2px 0 rgba(0, 0, 0, 0.6);
  width: calc(100% - 2 * max(18px, env(safe-area-inset-left)));
}

main { position: relative; z-index: 1; max-width: 1320px; margin: 0 auto; padding: 18px max(18px, env(safe-area-inset-right)) 40px max(18px, env(safe-area-inset-left)); outline: none; }
.page-title { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin: 10px 0 18px; }
.page-title h1 { margin: 0; font: 400 clamp(30px, 4vw, 44px)/1.05 var(--font-display); letter-spacing: 0.03em; color: var(--gold); text-shadow: 2px 2px 0 #000, 0 0 1px #000; }
.page-title p { margin: 4px 0 0; color: var(--muted); max-width: 64ch; text-shadow: 1px 1px 0 #000; }

/* Grid */
.bento { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.card { padding: 10px 10px 8px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 10px; padding: 2px 6px 8px; border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.6); }
.card-head .hint { font-size: 13px; color: var(--faint); }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
@media (max-width: 1100px) { .span-3, .span-4, .span-5 { grid-column: span 6; } .span-7, .span-8 { grid-column: span 12; } }
@media (max-width: 720px) {
  .bento > * { grid-column: span 12 !important; }
  .topbar { position: static; }
  .topbar-inner { flex-wrap: wrap; gap: 12px; }
  .brand { flex: 1; }
  .mainnav { order: 3; flex: 1 1 100%; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding: 4px 3px 8px; scrollbar-width: thin; }
  .frame, .board { border-width: 14px; border-image-width: 14px; }
  .board { padding: 14px; }
  .mainnav .lobby-btn, .account .lobby-btn { flex-shrink: 0; min-height: 36px; padding: 4px 10px; font-size: 13px; }
}

/* Entrance: a short fade and drop. */
.enter { opacity: 0; transform: translateY(6px); }
.enter.in { opacity: 1; transform: none; transition: opacity 320ms var(--ease), transform 320ms var(--ease); transition-delay: var(--delay, 0ms); }

/* Stat tiles */
.stat .big { font: 700 clamp(30px, 3.4vw, 44px)/1 var(--font-num); color: var(--gold-hi); text-shadow: 2px 2px 0 #000; padding: 0 6px; }
.stat .label { font: 400 12px var(--font-display); letter-spacing: 0.12em; color: var(--muted); margin-top: 6px; }
.stat .sub { font-size: 14px; color: var(--faint); margin-top: 6px; padding: 0 6px; }

/* Ladders */
.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.ladder li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 8px; }
.ladder li:nth-child(odd) { background: rgba(0, 0, 0, 0.32); }
.ladder li:hover { background: rgba(201, 165, 78, 0.09); }
.rank { font: 700 15px var(--font-num); color: var(--faint); text-align: center; }
.rank.r1 { color: var(--gold-hi); } .rank.r2 { color: #c5c9cc; } .rank.r3 { color: #c48a52; }
.who { min-width: 0; display: flex; flex-direction: column; }
.who .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 1px 1px 0 #000; }
.who .meta { font-size: 13px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score { font: 700 15px var(--font-num); text-align: right; }
.score small { display: block; font-size: 11px; font-weight: 500; color: var(--faint); }
.faction-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; transform: rotate(45deg); vertical-align: 1px; border: 1px solid #000; }
.faction-dot.Alliance { background: var(--alliance); }
.faction-dot.Horde { background: var(--horde); }

/* Feeds */
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 420px; overflow: hidden; }
.feed li { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; padding: 7px 8px; border-left: 3px solid transparent; background: rgba(0, 0, 0, 0.28); }
.feed li.Alliance { border-left-color: var(--alliance); background: var(--alliance-soft); }
.feed li.Horde { border-left-color: var(--horde); background: var(--horde-soft); }
.feed li.fresh { animation: drop-in 400ms var(--ease); }
@keyframes drop-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.feed .time { font: 500 12px var(--font-num); color: var(--faint); padding-top: 3px; }
.feed .line { min-width: 0; }
.feed .line .verb { color: var(--kill); font-weight: 700; }
.feed .line .where { display: block; font-size: 13px; color: var(--faint); }
.trust { display: inline-flex; gap: 3px; vertical-align: middle; margin-left: 6px; }
.trust i { width: 6px; height: 6px; background: #2a2a2a; border: 1px solid #000; transform: rotate(45deg); }
.trust i.on { background: var(--gold); }

/* Events: a plank board with parchment notices nailed to it. */
.board {
  position: relative; padding: 26px;
  border: 20px solid #2a2826;
  border-image: url("img/frame.png") 40 / 20px stretch;
  background: #2b190d url("img/wood.jpg") repeat;
  background-clip: padding-box;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.8), 0 14px 26px rgba(0, 0, 0, 0.7);
}
.notices { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.notice {
  position: relative; padding: 24px 22px 18px;
  color: #2a1e10;
  background: #d8c49b url("img/parchment.jpg");
  box-shadow: inset 0 0 34px rgba(110, 70, 20, 0.5);
  filter: drop-shadow(3px 5px 0 rgba(0, 0, 0, 0.55));
  /* Torn edges. */
  clip-path: polygon(0 2%, 6% 0, 14% 1.5%, 23% 0.2%, 31% 1.8%, 42% 0, 50% 1.2%, 61% 0.3%, 70% 1.7%, 79% 0, 88% 1.4%, 96% 0.2%, 100% 2%,
    99.2% 12%, 100% 25%, 99% 38%, 100% 52%, 99.3% 66%, 100% 80%, 99.1% 92%, 100% 98%,
    93% 100%, 84% 98.6%, 75% 100%, 66% 98.8%, 57% 99.8%, 47% 98.5%, 37% 100%, 28% 98.7%, 18% 99.9%, 9% 98.6%, 0 100%,
    0.8% 88%, 0 76%, 0.9% 62%, 0 49%, 0.7% 35%, 0 22%, 0.8% 10%);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 200ms var(--ease);
}
.notice:hover { transform: rotate(0deg); }
.notice::before { content: ""; position: absolute; top: 9px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%;
  background: #3a3836; border: 2px solid #111; box-shadow: inset 1px 1px 0 #8a857c; }
.notice h3 { margin: 4px 0 6px; font: 400 21px/1.15 var(--font-display); letter-spacing: 0.02em; color: #3a2207; }
.notice .tag { display: inline-block; font: 400 12px var(--font-display); letter-spacing: 0.1em; padding: 2px 8px; color: #f3e6c6; border: 1px solid #000; }
.notice .tag.Alliance { background: #263f73; } .notice .tag.Horde { background: #7a2216; } .notice .tag.Both { background: #4d3d1c; }
.notice p { margin: 8px 0; font-size: 15.5px; line-height: 1.45; }
.notice .facts { display: grid; grid-template-columns: max-content 1fr; gap: 2px 10px; font-size: 14px; margin-top: 10px; border-top: 1px solid rgba(58, 34, 7, 0.4); padding-top: 8px; }
.notice .facts dt { font-weight: 700; color: #5a3b14; }
.notice .facts dd { margin: 0; }
.notice .going { font: 700 13px var(--font-num); color: #6a4718; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-btn { font: 400 14px var(--font-display); letter-spacing: 0.04em; padding: 5px 12px; cursor: pointer; color: var(--muted);
  background: #101012 url("img/slate.jpg"); border: 1px solid #000; box-shadow: inset 0 0 0 1px var(--line-hi); text-shadow: 1px 1px 0 #000; }
.chip-btn:hover { color: var(--text); }
.chip-btn[aria-pressed="true"] { color: var(--gold-hi); box-shadow: inset 0 0 0 1px var(--gold); background-image: linear-gradient(rgba(201, 165, 78, 0.14), rgba(201, 165, 78, 0.14)), url("img/slate.jpg"); }

/* World map */
.atlas-page { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .atlas-page { grid-template-columns: 1fr; } }
.atlas { padding: 0; }
.atlas-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 8px; background: rgba(0, 0, 0, 0.55); border-bottom: 1px solid #000; }
.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font: 400 15px var(--font-display); }
.crumbs button { font: inherit; color: var(--muted); background: none; border: 0; padding: 2px 4px; cursor: pointer; text-shadow: 1px 1px 0 #000; }
.crumbs button:hover { color: var(--gold-hi); }
.crumbs button[aria-current="page"] { color: var(--gold); cursor: default; }
.crumbs .sep { color: var(--faint); }
.zoom-btns { display: flex; gap: 4px; }
.zoom-btns .lobby-btn { min-height: 30px; min-width: 34px; padding: 0 8px; font-size: 16px; }
.atlas-view { position: relative; overflow: hidden; aspect-ratio: 1002 / 668; background: #000; cursor: grab; touch-action: none; user-select: none; }
.atlas-view.dragging { cursor: grabbing; }
.atlas-view.over-zone { cursor: pointer; }
.atlas-stage { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform-origin: 0 0; }
.atlas-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: auto; transition: opacity 160ms linear; }
.atlas-art.fading { opacity: 0; }
.atlas-hl { position: absolute; pointer-events: none; opacity: 0; mix-blend-mode: screen; transition: opacity 120ms linear; }
.atlas-hl.on { opacity: 0.55; }
.atlas-box { position: absolute; pointer-events: none; border: 2px solid var(--gold-hi); opacity: 0; transition: opacity 120ms linear; }
.atlas-box.on { opacity: 0.7; }
.atlas-pins { position: absolute; inset: 0; pointer-events: none; }
.pin { position: absolute; width: 0; height: 0; pointer-events: auto; }
.pin > span {
  position: absolute; left: 0; top: 0;
  transform: translate(-50%, -50%) scale(var(--inv, 1));
  display: grid; place-items: center;
  min-width: 14px; height: 14px; padding: 0 3px;
  font: 700 10px/1 var(--font-num); color: #fff;
  background: #6b6457; border: 1px solid #000; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25), 1px 2px 0 rgba(0, 0, 0, 0.6);
  cursor: pointer;
}
.pin.single > span { width: 10px; min-width: 0; height: 10px; padding: 0; transform: translate(-50%, -50%) scale(var(--inv, 1)) rotate(45deg); }
.pin.Alliance > span { background: var(--alliance); }
.pin.Horde > span { background: var(--horde); }
.pin.duel > span { background: var(--gold); }
.pin.zone > span { min-width: 26px; height: 20px; font-size: 11px; background: rgba(20, 18, 15, 0.92); color: var(--gold-hi); border-color: #000; box-shadow: 0 0 0 1px var(--gold-lo), 2px 2px 0 rgba(0, 0, 0, 0.7); }
.pin:hover > span, .pin.picked > span { box-shadow: 0 0 0 2px var(--gold-hi), 2px 2px 0 rgba(0, 0, 0, 0.7); }
.atlas-tip { position: absolute; z-index: 3; pointer-events: none; padding: 5px 9px; max-width: 260px;
  background: rgba(8, 8, 9, 0.94); border: 1px solid #000; box-shadow: inset 0 0 0 1px var(--gold-lo); font-size: 14px; }
.atlas-tip b { display: block; font: 400 16px var(--font-display); color: var(--gold-hi); text-shadow: 1px 1px 0 #000; }
.atlas-tip span { color: var(--muted); }
.atlas-help { margin: 0; padding: 6px 10px; font-size: 13px; color: var(--faint); background: rgba(0, 0, 0, 0.55); border-top: 1px solid #000; }
.atlas-side .facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 8px 14px; }
.atlas-side .facts dd { margin: 0; }
.zone-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; margin: 0 6px 12px; padding: 0; list-style: none; }
.zone-list button { width: 100%; display: flex; justify-content: space-between; gap: 6px; text-align: left; font: 15px var(--font-body); color: var(--text); background: none; border: 0; padding: 3px 4px; cursor: pointer; }
.zone-list button:hover { background: rgba(201, 165, 78, 0.1); color: var(--gold-hi); }
.zone-list .n { font: 12px var(--font-num); color: var(--kill); }
.side-h { margin: 6px 8px 8px; font-size: 14px; }
.split { height: 8px; margin: 2px 8px 14px; background: var(--horde); border: 1px solid #000; }
.split span { display: block; height: 100%; background: var(--alliance); border-right: 1px solid var(--gold-hi); }

/* Leaderboards */
.tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.ladder-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.ladder-table th { text-align: left; font: 400 13px var(--font-display); letter-spacing: 0.08em; color: var(--muted); padding: 9px 10px; border-bottom: 1px solid #000; box-shadow: 0 1px 0 var(--line); position: sticky; top: 0; background: #121213; text-shadow: 1px 1px 0 #000; }
.ladder-table td { padding: 8px 10px; border-bottom: 1px solid rgba(0, 0, 0, 0.7); vertical-align: middle; }
.ladder-table tbody tr:nth-child(odd) { background: rgba(0, 0, 0, 0.25); }
.ladder-table tbody tr:hover { background: rgba(201, 165, 78, 0.08); }
.ladder-table .r { text-align: right; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; max-height: 640px; overflow-y: auto; }
.spark { width: 90px; height: 24px; display: block; }
.bars { display: grid; gap: 8px; }
.bars .bar { display: grid; grid-template-columns: 74px minmax(0, 1fr) 46px; gap: 10px; align-items: center; font-size: 14px; }
.bars .track { height: 9px; background: #0a0a0a; border: 1px solid #000; box-shadow: 0 0 0 1px var(--line); }
.bars .track span { display: block; height: 100%; }
.heat { display: grid; grid-template-columns: 32px repeat(24, minmax(0, 1fr)); gap: 2px; font: 11px var(--font-num); color: var(--faint); }
.heat .cell { aspect-ratio: 1; }

/* Download */
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.dl { padding: 16px 16px 14px; display: grid; gap: 14px; align-content: start; }
.dl h2 { margin: 0; font: 400 25px/1.15 var(--font-display); letter-spacing: 0.02em; color: var(--gold); text-shadow: 2px 2px 0 #000; }
.dl .version { font: 600 13px var(--font-num); color: var(--muted); }
.dl ol, .dl ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.dl code { font: 13px var(--font-num); background: #000; border: 1px solid var(--line); padding: 1px 6px; word-break: break-all; }

/* Page swap */
main.leaving { opacity: 0; transition: opacity 140ms linear; }

/* Gate: two plank doors swing open on the first visit of a session. */
.gate { position: fixed; inset: 0; z-index: 100; display: flex; pointer-events: none; perspective: 1600px; }
.door {
  flex: 1; position: relative;
  background: #2b190d url("img/wood.jpg") repeat;
  box-shadow: inset 0 0 0 14px #1a1918, inset 0 0 0 16px #48443e, inset 0 0 90px rgba(0, 0, 0, 0.85);
  transition: transform 1100ms cubic-bezier(0.7, 0, 0.3, 1);
}
.door::before { content: ""; position: absolute; left: 16px; right: 16px; height: 34px; top: 22%; background: #1f1e1c url("img/slate.jpg"); border-top: 2px solid #5a564f; border-bottom: 2px solid #000; }
.door::after { content: ""; position: absolute; left: 16px; right: 16px; height: 34px; bottom: 22%; background: #1f1e1c url("img/slate.jpg"); border-top: 2px solid #5a564f; border-bottom: 2px solid #000; }
.door-left { transform-origin: left center; }
.door-right { transform-origin: right center; }
.gate.open .door-left { transform: rotateY(-100deg); }
.gate.open .door-right { transform: rotateY(100deg); }
.gate.done { display: none; }
.knocker { position: absolute; right: -40px; top: 50%; width: 80px; height: 80px; margin-top: -40px; z-index: 2; border-radius: 50%;
  border: 8px solid #2b2a28; box-shadow: inset 0 0 0 2px #6d6a63, 0 0 0 2px #000, 3px 4px 0 rgba(0, 0, 0, 0.7); background: #151413; }

/* Dialog */
.dialog { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, 0.72); }
.dialog[hidden] { display: none; }
.dialog-card { max-width: 480px; padding: 14px 16px; display: grid; gap: 6px; }
.dialog-card p { margin: 6px 0; }

.footer { position: relative; z-index: 1; text-align: center; color: var(--faint); font-size: 13px; padding: 10px 18px 30px; text-shadow: 1px 1px 0 #000; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .enter { opacity: 1; transform: none; }
  .gate { display: none; }
}

/* Fight links and the fight page */
.fight-link { margin-left: 10px; font-size: 12.5px; color: var(--gold-hi); text-decoration: none; border-bottom: 1px dotted rgba(236, 211, 140, 0.5); }
.fight-link:hover { color: #fff2c8; border-bottom-style: solid; }
.hp-chart { width: 100%; height: auto; display: block; }
.playbyplay td { padding: 6px 10px; font-size: 14px; }
.playbyplay tr.heal td:nth-child(3) { color: var(--good); }
.playbyplay tr.death td { color: var(--kill); font-weight: 700; }
