/* style.css – Aussehen aller Seiten der Kingsfollow-Website.
   Stil: Pixel-Spiel bei Nacht. Dunkler Schiefer, Gold wie die Münzen im Video, Rahmen mit
   abgestuften Ecken (img/ui/frame-*.svg, erzeugt von tools/make-website.js), eigene Pixel-Schrift
   für Überschriften und Zahlen (site.js). Pixel werden nur in ganzen Vielfachen vergrößert. */

:root {
  --bg: #0b0d14;
  --text: #f6eed6;
  --dim: #a9aec0;
  --gold: #ffd970;
  --gold2: #f0b443;
  --outline: #07080c;
  --ig: #e0609f; --ig2: #7a1f5c;
  --yt: #ee5a4f; --yt2: #7f1515;
  --tt: #30d5d0; --tt2: #161616;
  --wrap: 1160px;
}
.instagram { --c: var(--ig); --c2: var(--ig2); }
.youtube { --c: var(--yt); --c2: var(--yt2); }
.tiktok { --c: var(--tt); --c2: var(--tt2); }

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  overflow-x: clip;
}
a { color: var(--gold); }
img.spr, .px, .ico { image-rendering: pixelated; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dim { color: var(--dim); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ===== Pixel-Schrift (SVG aus site.js): --u = Bildschirm-Pixel je Schrift-Pixel ===== */
.px { display: inline-block; vertical-align: middle; width: calc(var(--u, 3px) * var(--w)); height: calc(var(--u, 3px) * var(--h)); flex: none; }
.pxw { display: inline-flex; flex-wrap: wrap; align-items: flex-end; column-gap: calc(var(--u, 3px) * 4); row-gap: calc(var(--u, 3px) * 3); }
.is-px { line-height: 0; }
.px-head { --u: 4px; }
.px-cream { --u: 3px; }
.px-white, .px-label, .px-dark { --u: 2px; }

/* ===== Rahmen: Steintafel, Goldrand, eingelassenes Feld ===== */
.frame, .panel {
  border: 9px solid transparent;
  border-image: url(img/ui/frame-stone.svg) 3 fill / 9px stretch;
  padding: 14px 18px;
}
.frame-gold {
  border: 9px solid transparent;
  border-image: url(img/ui/frame-gold.svg) 3 fill / 9px stretch;
}
.slot {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 72px;
  height: 72px;
  border: 9px solid transparent;
  border-image: url(img/ui/frame-slot.svg) 3 fill / 9px stretch;
}
.slot.sm { width: 56px; height: 56px; }
.slot .qty { position: absolute; right: -2px; bottom: -2px; --u: 2px; }

/* ===== Knöpfe ===== */
.follow { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 2px 14px;
  color: #fff;
  text-decoration: none;
  border: 9px solid transparent;
  border-image: url(img/ui/frame-goldbtn.svg) 3 fill / 9px stretch;
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .65));
  transition: transform .08s steps(2), filter .08s steps(2);
}
.btn.instagram { border-image-source: url(img/ui/frame-instagram.svg); }
.btn.youtube { border-image-source: url(img/ui/frame-youtube.svg); }
.btn.tiktok { border-image-source: url(img/ui/frame-tiktok.svg); }
.btn:hover { transform: translateY(-3px); filter: drop-shadow(0 7px 0 rgba(0, 0, 0, .65)) brightness(1.12); }
.btn:active { transform: translateY(3px); filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .65)); }

/* ===== Leiste oben ===== */
.topnav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  overflow-x: auto;
  background: rgba(10, 11, 16, .94);
  border-bottom: 3px solid var(--outline);
  box-shadow: inset 0 -3px 0 #232838;
  backdrop-filter: blur(6px);
}
.topnav a { display: flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; padding: 4px 10px; }
.topnav .brand { padding-left: 0; margin-right: 12px; }
.topnav .brand img { image-rendering: pixelated; }
.topnav .brand .px-cream { --u: 2px; }
.nav-villages { display: flex; gap: 4px; margin-left: auto; }
.topnav a.nav-support { color: #2a1a05; background: var(--gold); margin-left: 8px; padding: 4px 12px; box-shadow: inset 0 3px 0 #fff3bd, inset 0 -3px 0 #c9832a, 0 0 0 3px var(--outline); }
.topnav a.nav-support:hover { background: #fff3bd; }
.topnav a.legal-link { color: var(--dim); font-weight: 400; font-size: 14px; padding: 4px 6px; }
.topnav a.legal-link:hover { color: var(--gold); }
.topnav a.nav-support + .legal-link { margin-left: 10px; }
.nav-villages a { border-bottom: 3px solid transparent; }
.nav-villages a:hover, .nav-villages a.on { border-bottom-color: var(--c); color: #fff; }
.nav-villages .flag { height: 28px; width: auto; }

/* ===== Seitenbreite und Abschnitte ===== */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
main.wrap > section, .wrap > section { margin-top: 88px; }
.kicker { display: block; color: var(--gold2); font-size: 12.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.kicker::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 10px 2px 0; background: currentColor; box-shadow: 0 0 0 2px #3d2a08; }
h2.is-px { margin: 10px 0 12px; }
.lead { color: var(--dim); max-width: 640px; margin: 0 0 28px; }

/* ===== Kopf der Startseite: drei Dörfer nebeneinander ===== */
.hero { position: relative; min-height: min(88vh, 780px); display: grid; place-items: center; overflow: hidden; border-bottom: 3px solid var(--outline); }
.realms { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--outline); }
.realm {
  position: relative;
  display: block;
  background-color: #3c6630;
  background-size: 1440px 960px;          /* Bild 720 x 480 doppelt groß: scharfe Pixel */
  background-position: 50% 50%;
  image-rendering: pixelated;
  animation: drift 50s ease-in-out infinite alternate;
}
.realm:nth-child(2) { animation-delay: -17s; }
.realm:nth-child(3) { animation-delay: -34s; }
@keyframes drift { from { background-position: 40% 42%; } to { background-position: 60% 58%; } }
.realm::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: var(--c); z-index: 1; }
.realm::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16, 18, 26, .1) 0%, rgba(16, 18, 26, .25) 50%, var(--bg) 100%); transition: background .2s; }
.realm:hover::after { background: linear-gradient(180deg, rgba(16, 18, 26, 0) 0%, rgba(16, 18, 26, .15) 50%, var(--bg) 100%); }
.realm-tag {
  position: absolute;
  z-index: 2;
  top: 22px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 8px;
  background: rgba(7, 8, 12, .82);
  border: 3px solid var(--outline);
  box-shadow: inset 0 3px 0 var(--c);
}
.realm-tag .flag { height: 33px; }
.realm-n { display: flex; align-items: center; gap: 6px; padding-left: 10px; border-left: 3px solid #2a3042; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 46% 44% at 50% 52%, rgba(9, 10, 15, .82) 0%, rgba(9, 10, 15, .55) 55%, transparent 100%); }
.hero-in { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 96px 16px 120px; pointer-events: none; }
.hero-in a { pointer-events: auto; }
.hero-title { margin: 0 0 22px; --u: 12px; filter: drop-shadow(0 0 28px rgba(255, 196, 80, .28)); }
.hero-tag { margin: 0 0 10px; --u: 3px; }
.hero-tag .px-cream, .hero-tag.px-cream { --u: 3px; }
.hero-sub { margin: 0 0 28px; color: #d9d4c4; max-width: 520px; text-shadow: 0 2px 0 #000; }

/* ===== Zahlen (Anzeige wie im Video) ===== */
.hud { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 14px 20px; }
.hud-wrap > .hud { margin-top: -60px; }
.stat { display: flex; align-items: center; gap: 12px; padding: 4px 6px; }
.stat + .stat { border-left: 3px solid #12141c; box-shadow: -3px 0 0 #2a3042; padding-left: 16px; }
.stat b { display: block; --u: 4px; }
.stat > div > span { display: block; color: var(--dim); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; margin-top: 6px; }
.stat .hud-farm { width: 32px; height: auto; }

/* ===== Regeln als Rezepte ===== */
.recipes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.recipe { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 22px; padding: 16px 20px; }
.craft { display: flex; align-items: center; gap: 8px; }
.op { display: inline-grid; place-items: center; }
.op.plus { --u: 3px; }
.recipe h3 { margin: 0 0 8px; }
.recipe p { margin: 0; color: var(--dim); font-size: 15.5px; }

/* ===== Rangliste: drei Türme, die sich beim Scrollen Stockwerk für Stockwerk aufbauen ===== */
.towers { --ts: 3; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 22px; }
.tower-col { display: flex; flex-direction: column; align-items: center; color: var(--text); text-decoration: none; }
.tower { position: relative; display: flex; flex-direction: column; align-items: center; width: calc(48px * var(--ts)); }
.tower-flag { line-height: 0; margin-bottom: -6px; filter: drop-shadow(3px 0 0 rgba(0, 0, 0, .35)); }
.tower-flag img { width: calc(16px * var(--ts)); height: auto; }
.tower-top { width: 100%; height: calc(9px * var(--ts)); background: url(img/ui/tower-top.svg) 0 0 / 100% 100%; image-rendering: pixelated; }
.tower-body {
  width: 100%;
  height: calc(12px * var(--ts) * var(--floors));
  background: url(img/ui/tower.svg) 0 100% / calc(48px * var(--ts)) calc(12px * var(--ts)) repeat-y;
  image-rendering: pixelated;
  box-shadow: inset 0 -4px 0 var(--c);
}
.tower-col:hover .tower-body, .tower-col:hover .tower-top { filter: brightness(1.18); }
/* Aufbau: erst nur das Fundament, dann wächst der Turm in ganzen Stockwerken */
.js .towers:not(.in) .tower-body { height: calc(12px * var(--ts)); }
.js .towers:not(.in) .tower-flag, .js .towers:not(.in) .tower-top { opacity: 0; }
.js .towers.in .tower-body { transition: height calc(var(--floors) * 120ms + 120ms) steps(var(--floors)); transition-delay: calc(var(--i) * 250ms); }
.js .towers.in .tower-flag, .js .towers.in .tower-top { transition: opacity .2s steps(2); transition-delay: calc(var(--i) * 250ms + var(--floors) * 120ms); }
.tower-plate { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; width: 100%; margin-top: -3px; padding: 10px 14px; box-shadow: inset 0 5px 0 var(--c); }
.rank { --u: 6px; min-width: 34px; text-align: center; }
.plate-txt { display: grid; gap: 4px; min-width: 0; }
.plate-txt small { color: var(--dim); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.plate-n { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.plate-n b + .ico { margin-left: 10px; }
.plate-txt .plain { display: none; }

/* Nachbarn auf den Dorf-Seiten */
a.lane { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 18px; color: var(--text); text-decoration: none; box-shadow: inset 5px 0 0 var(--c); padding-left: 24px; transition: transform .1s steps(2); }
a.lane:hover { transform: translateX(4px); }
.lane-flag .flag { display: block; }
.lane-main { display: grid; gap: 8px; min-width: 0; }
.lane-name { display: flex; align-items: center; gap: 12px; }
.lane-name small { color: var(--dim); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.lane-go { padding-right: 6px; }

/* ===== Die drei Dörfer als Karten ===== */
.vcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.realm-card { position: relative; display: flex; flex-direction: column; padding: 0; margin-top: 21px; color: var(--text); text-decoration: none; transition: transform .1s steps(2); }
.realm-card::before { content: ""; position: absolute; left: -9px; right: -9px; top: -30px; height: 21px; background: url(img/ui/battlement.svg) 0 0 / 30px 21px repeat-x; image-rendering: pixelated; }
.realm-card:hover { transform: translateY(-4px); }
.rc-img {
  position: relative;
  display: block;
  height: 210px;
  background-size: 1440px 960px;
  background-position: 50% 50%;
  image-rendering: pixelated;
  border-bottom: 3px solid var(--outline);
  box-shadow: inset 0 5px 0 var(--c);
}
.realm-card:hover .rc-img { filter: brightness(1.1); }
.rc-flag { position: absolute; left: 14px; top: 14px; filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, .6)); }
.rc-body { display: flex; flex-direction: column; gap: 12px; flex: 1; padding: 16px 18px 16px; }
.rc-body h3 { margin: 0; }
.rc-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--dim); font-size: 14.5px; }
.rc-stats > span { display: inline-flex; align-items: center; gap: 6px; }
.rc-stats b { color: var(--text); font-variant-numeric: tabular-nums; }
.court { display: grid; gap: 8px; padding-top: 4px; border-top: 3px solid #12141c; box-shadow: 0 -3px 0 #2a3042; padding-top: 14px; margin-top: 4px; }
.courtier { display: flex; align-items: center; gap: 12px; font-size: 15px; line-height: 1.3; }
.courtier .spr { width: auto; flex: none; }
.courtier > span:first-child, .courtier > img { min-width: 33px; }
.courtier small, .court-list small { display: block; color: var(--gold); font-size: 13px; }
.rc-go { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; color: var(--c); }

/* ===== Burgmauer mit Zinnen: dort hängt der Aushang ===== */
.wall {
  position: relative;
  margin-top: 0;
  padding: 120px 0 110px;
  background: url(img/ui/wall.svg) 0 0 / 96px 48px;
  image-rendering: pixelated;
  border-bottom: 3px solid var(--outline);
}
.wall::before { content: ""; position: absolute; left: 0; right: 0; top: -36px; height: 36px; background: url(img/ui/battlement.svg) 0 100% / 50px 35px repeat-x; filter: brightness(1.05); }
.wall::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(11, 13, 20, 0) 0, rgba(11, 13, 20, 0) 60%, rgba(11, 13, 20, .9) 100%), radial-gradient(ellipse 70% 80% at 50% 45%, transparent 40%, rgba(5, 6, 10, .65) 100%); }
.wall > * { position: relative; z-index: 1; }
.wrap > .wall, main > .wall { margin-top: 88px; }
#page > .wall { margin-top: 124px; }

/* ===== Quest: Aushang am Holzbrett, Fackeln links und rechts ===== */
.board-wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0 28px; }
.board {
  grid-column: 2;
  width: min(760px, 100%);
  padding: 26px 30px 28px;
  border: 9px solid transparent;
  border-image: url(img/ui/frame-wood.svg) 3 / 9px stretch;
  background: url(img/ui/wood.svg) 0 0 / 144px 72px;
  background-clip: padding-box;
  image-rendering: pixelated;
  filter: drop-shadow(0 10px 0 rgba(0, 0, 0, .5));
}
.notice {
  position: relative;
  padding: 22px 28px 20px;
  color: #3a2a20;
  border: 9px solid transparent;
  border-image: url(img/ui/frame-parchment.svg) 3 fill / 9px stretch;
  transform: rotate(-.6deg);
}
/* Nägel in den Ecken */
.notice::before, .notice::after { content: ""; position: absolute; top: -2px; width: 9px; height: 9px; background: #9c958d; box-shadow: 0 0 0 3px #07080c, inset -3px -3px 0 #4a4547; }
.notice::before { left: -2px; }
.notice::after { right: -2px; }
.notice .kicker { color: #9b4a22; }
.notice .kicker::before { box-shadow: 0 0 0 2px #e9cb6c; }
.notice h2.is-px { --u: 4px; margin: 10px 0 16px; }
.board .follow { margin-top: 22px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: step; }
.steps li { counter-increment: step; display: flex; align-items: center; gap: 14px; font-weight: 500; }
.steps li::before { content: counter(step); flex: none; display: grid; place-items: center; width: 30px; height: 30px; font-weight: 800; color: #2a1a05; background: var(--gold); box-shadow: inset 0 3px 0 #fff3bd, inset 0 -3px 0 #c9832a, 0 0 0 3px var(--outline); }
.reward { margin: 18px 0 0; padding-top: 14px; border-top: 3px dashed #b9a37f; font-size: 15.5px; }
/* Fackel: Stab, flackernde Flamme und warmer Schein */
.torch { position: relative; justify-self: end; width: 30px; height: 120px; }
.board-wrap .torch:last-child { justify-self: start; }
.torch::before { content: ""; position: absolute; left: -105px; top: -120px; width: 240px; height: 240px; background: radial-gradient(circle, rgba(255, 180, 70, .32) 0, rgba(255, 140, 40, .12) 35%, transparent 70%); animation: glow 1.6s steps(3) infinite alternate; pointer-events: none; }
.torch::after { content: ""; position: absolute; left: 0; top: 0; width: 30px; height: 66px; background: url(img/px/torch_0.png) 0 0 / 30px 66px; image-rendering: pixelated; animation: torch .5s steps(1) infinite; }
@keyframes torch { 0% { background-image: url(img/px/torch_0.png); } 50% { background-image: url(img/px/torch_1.png); } }
@keyframes glow { from { opacity: .75; transform: scale(.95); } to { opacity: 1; transform: scale(1.05); } }

/* ===== Kleingedrucktes ===== */
.small-print { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }
.small-print p { color: var(--dim); font-size: 15.5px; }
.small-print h2 { margin: 8px 0 4px; }
.legal { display: grid; gap: 12px; }
.legal a { display: flex; flex-direction: column; gap: 2px; color: var(--text); text-decoration: none; }
.legal a:hover { border-image-source: url(img/ui/frame-gold.svg); }
.legal b { font-size: 17px; }
.legal .dim { font-size: 14px; }

/* ===== „Like it? Support us“ – auf jeder Seite über dem Erdboden ===== */
.support { margin-top: 96px; }
.support-box { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 36px; padding: 28px 34px; }
.support-art { display: flex; align-items: flex-end; gap: 4px; filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, .5)); }
.support-txt h2.is-px { margin: 8px 0 10px; }
.support-txt > p { margin: 0 0 14px; max-width: 640px; color: #d9d4c4; }
.ways { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.ways li { display: flex; align-items: center; gap: 12px; }
.ways .ico { flex: none; }
.support-btns { justify-content: flex-start; }
button.btn { font: inherit; cursor: pointer; background: none; }
.btn.share-site { border-image-source: url(img/ui/frame-goldbtn.svg); }
.btn.share-site .px { color: #2a1a05; }
.share-note { margin: 10px 0 0; min-height: 1.4em; font-size: 14.5px; }
body:not(.site) .support { margin-top: 64px; }

/* ===== Fuß: Erdboden mit Gras, Erde, Stein und Goldadern ===== */
.ground {
  margin-top: 110px;
  padding-top: 150px;
  background: url(img/ui/ground.svg) repeat-x 0 0 / 192px 160px, #1d1b1c;
  image-rendering: pixelated;
}
.ground { position: relative; }
.ground > .life { position: absolute; left: 0; right: 0; top: -36px; height: 42px; overflow: hidden; pointer-events: none; }
.foot-in { max-width: var(--wrap); margin: 0 auto; padding: 18px 16px 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.foot-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.foot-brand img { image-rendering: pixelated; }
.foot-in p { margin: 0; font-size: 14.5px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-left: auto; }
.foot-links a { color: var(--dim); font-size: 14.5px; }
.foot-links a:hover { color: var(--gold); }

/* ===== Seite eines Dorfes ===== */
.vhero {
  position: relative;
  min-height: min(64vh, 560px);
  display: flex;
  align-items: flex-end;
  background-color: #3c6630;
  background-size: 1440px 960px;
  background-position: 50% 50%;
  image-rendering: pixelated;
  border-bottom: 3px solid var(--outline);
}
.vhero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16, 18, 26, 0) 30%, rgba(16, 18, 26, .7) 70%, var(--bg) 100%); }
.vhero::after { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: var(--c); }
.vhero-in { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 22px; width: 100%; padding-bottom: 92px; }
.vhero h1 { margin: 10px 0 4px; --u: 9px; line-height: 0; }
.vhero .dim { margin: 8px 0 0; text-shadow: 0 2px 0 #000; }
.vhero .kicker { text-shadow: 0 2px 0 #000; }
.vflag { filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, .55)); }
.hud.four { grid-template-columns: repeat(4, 1fr); }
.two { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: stretch; }
.two .panel { padding: 18px 22px 22px; }
.two h2.is-px { --u: 3px; margin-bottom: 18px; }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding-bottom: 22px; }
.col { position: relative; flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.col i { display: block; min-height: 6px; background: var(--c); box-shadow: inset 0 4px 0 rgba(255, 255, 255, .4), inset -4px 0 0 rgba(0, 0, 0, .25); }
.col:hover i { filter: brightness(1.2); }
.col small { position: absolute; left: 0; right: 0; bottom: -22px; text-align: center; color: var(--dim); font-size: 11.5px; }
.court-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.court-list li { display: flex; align-items: center; gap: 14px; line-height: 1.3; }
.inventory { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px 10px; }
.item { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.item .slot { width: 116px; height: 116px; padding: 3px; }
/* Jedes Gebäude bleibt in seinem Feld: was zu groß ist, wird verkleinert */
.item .slot .spr { max-width: 100%; max-height: 100%; object-fit: contain; }
.item .slot .qty { right: 0; bottom: 0; }
.item small { color: var(--dim); font-size: 12.5px; line-height: 1.3; }
.item:hover .slot { border-image-source: url(img/ui/frame-gold.svg); }
.search { display: block; }
.search input {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: transparent;
  border: 9px solid transparent;
  border-image: url(img/ui/frame-slot.svg) 3 fill / 9px stretch;
  padding: 8px 12px;
}
.search input:focus { outline: none; border-image-source: url(img/ui/frame-gold.svg); }
.search input::placeholder { color: #6f7588; }
.count { margin: 14px 0 10px; font-size: 14.5px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; }
.person { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 6px 12px 6px 6px; border: 9px solid transparent; border-image: url(img/ui/frame-stone.svg) 3 fill / 9px stretch; }
.person .who { min-width: 0; line-height: 1.35; }
.person b { display: block; font-size: 16px; }
.person .handle { display: block; color: var(--dim); font-size: 13.5px; word-break: break-all; }
.person .role { display: block; color: var(--gold); font-size: 14px; font-weight: 600; }
.person .ep { align-self: start; margin-top: 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--dim); background: #0b0d13; border: 2px solid #2a3042; padding: 1px 6px; white-space: nowrap; }
.neighbours { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.neighbours a.lane { grid-template-columns: auto 1fr auto; }

/* ===== Szenen der Startseite: Himmel, Sterne, Landschaft in drei Ebenen ===== */
.hud-wrap { position: relative; z-index: 5; }
.scene { position: relative; overflow: hidden; isolation: isolate; background: var(--sky); }
.scene-in { position: relative; padding-top: 88px; padding-bottom: 300px; }
.scene-in > section:first-child { margin-top: 0; }
.scene-in > section + section { margin-top: 72px; }
.scene::before, .scene::after { content: ""; position: absolute; inset: 0; z-index: -4; pointer-events: none; image-rendering: pixelated; -webkit-mask-image: linear-gradient(#000 0, #000 45%, transparent 85%); mask-image: linear-gradient(#000 0, #000 45%, transparent 85%); }
.scene::before { background: url(img/ui/stars.svg) 0 0 / 240px 240px; opacity: .5; }
.scene::after { background: url(img/ui/stars-twinkle.svg) 37px 11px / 320px 280px; animation: twinkle 2.4s steps(2) infinite alternate; }
@keyframes twinkle { from { opacity: .25; } to { opacity: 1; } }
.scene.dusk { --sky: linear-gradient(to top, #2a1724 0, #8a4a4a 150px, #4a2848 330px, #1c1630 560px, #0b0d14 820px); }
.scene.night { --sky: linear-gradient(to top, #0b0d14 0, #24406a 170px, #142640 340px, #0e1426 580px, #0b0d14 860px); }
.scene.castles { --sky: linear-gradient(to top, #0b0d14 0, #1f4f55 170px, #12303a 340px, #0d1a26 580px, #0b0d14 860px); }
.layer { position: absolute; left: 0; width: calc(100% + 1440px); background-repeat: repeat-x; background-position: 0 100%; image-rendering: pixelated; pointer-events: none; will-change: transform; }
.layer.far { bottom: 60px; height: 210px; z-index: -3; background-size: 720px 210px; }
.layer.mid { bottom: 30px; height: 180px; z-index: -2; background-size: 720px 180px; }
.layer.near { bottom: 0; height: 78px; z-index: 0; background-image: url(img/ui/scene-near.svg); background-size: 720px 78px; }
.dusk .far { background-image: url(img/ui/scene-dusk-far.svg); }
.dusk .mid { background-image: url(img/ui/scene-dusk-mid.svg); }
.night .far { background-image: url(img/ui/scene-night-far.svg); }
.night .mid { background-image: url(img/ui/scene-night-mid.svg); }
.castles .far { background-image: url(img/ui/scene-realms-far.svg); }
.castles .mid { background-image: url(img/ui/scene-realms-mid.svg); background-size: 1440px 180px; }
.moon { position: absolute; z-index: -3; top: 70px; right: 9%; width: 96px; height: 96px; background: url(img/ui/moon.svg) 0 0 / 96px 96px; image-rendering: pixelated; filter: drop-shadow(0 0 28px rgba(246, 238, 214, .35)); }

/* Figuren, die durchs Bild laufen oder fliegen (site.js: walker) */
.life { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.walker { position: absolute; left: 0; display: flex; align-items: flex-end; gap: 6px; animation: var(--dur) linear var(--delay) infinite; filter: brightness(.82); }
.walker.to-right { animation-name: walk-r; }
.walker.to-left { animation-name: walk-l; }
@keyframes walk-r { from { transform: translateX(-20vw); } to { transform: translateX(115vw); } }
@keyframes walk-l { from { transform: translateX(115vw); } to { transform: translateX(-20vw); } }
.walker.fly { filter: none; }
.walker.dragon.to-left { animation-name: fly-l; }
.walker.dragon.to-right { animation-name: fly-r; }
.walker.dragon.far { filter: brightness(.6) saturate(.8); }
@keyframes fly-l { 0% { transform: translateX(115vw); } 55%, 100% { transform: translateX(-30vw); } }
@keyframes fly-r { 0% { transform: translateX(-30vw); } 55%, 100% { transform: translateX(115vw); } }
.dragon .fig { animation: bob 1.2s ease-in-out infinite alternate; }
@keyframes bob { from { transform: translateY(-6px); } to { transform: translateY(6px); } }
.torchlight::before { content: ""; position: absolute; left: 50%; bottom: 0; width: 220px; height: 220px; margin-left: -110px; margin-bottom: -80px; background: radial-gradient(circle, rgba(255, 180, 70, .3) 0, rgba(255, 140, 40, .1) 40%, transparent 70%); animation: glow 1.4s steps(3) infinite alternate; }
.fig { position: relative; display: block; flex: none; }
.fig img { position: absolute; image-rendering: pixelated; }
.fig img:first-child { animation: frame-a .5s steps(1) infinite; }
.fig img + img { visibility: hidden; animation: frame-b .5s steps(1) infinite; }
.fly .fig img:first-child, .fly .fig img + img { animation-duration: .36s; }
@keyframes frame-a { 0% { visibility: visible; } 50% { visibility: hidden; } 100% { visibility: visible; } }
@keyframes frame-b { 0% { visibility: hidden; } 50% { visibility: visible; } 100% { visibility: hidden; } }

/* Tafeln bauen sich beim Scrollen auf (wie die Bauplätze im Video) */
.js .reveal:not(.in) { opacity: 0; }
.js .reveal.in:not(.now) { animation: build .6s steps(6) both; animation-delay: calc(var(--i, 0) * 110ms); }
@keyframes build {
  0% { opacity: 0; transform: translateY(26px); filter: grayscale(1) brightness(1.6); }
  50% { opacity: .55; filter: grayscale(1) brightness(1.4); }
  100% { opacity: 1; transform: none; filter: none; }
}

/* ===== Rechtstexte (terms, privacy, impressum): schlichte Lese-Seiten ===== */
body:not(.site) main { max-width: 760px; margin: 0 auto; padding: 40px 16px 64px; }
body:not(.site) main > header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
body:not(.site) main > header img { width: 72px; height: 72px; image-rendering: pixelated; }
body:not(.site) h1 { margin: 0; color: var(--gold); font-size: 28px; line-height: 1.2; }
body:not(.site) h2 { color: var(--gold); font-size: 20px; margin-top: 36px; }
body:not(.site) main > nav { margin-top: 40px; padding-top: 16px; border-top: 3px solid #232838; font-size: 15px; }
body:not(.site) main > nav a { margin-right: 16px; }
body:not(.site) .dim { font-size: 15px; }
ul { padding-left: 22px; }
code { background: #0b0d13; padding: 1px 6px; font-size: .92em; }

/* ===== Kleinere Bildschirme ===== */
@media (max-width: 1000px) {
  .wares { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-title { --u: 9px; }
  .vcards { grid-template-columns: 1fr 1fr; }
  .hud { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
  .stat:nth-child(4) { border-left: 0; box-shadow: none; padding-left: 6px; }
  .recipes { grid-template-columns: 1fr; }
  .realm-tag .realm-n { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { min-height: 0; }
  .hero-in { padding: 72px 16px 104px; }
  .hero-title { --u: 5px; }
  .hero-tag.px-cream { --u: 2px; }
  .hero-tag { --u: 2px; }
  .realm-tag { top: 12px; left: 8px; padding: 4px 6px; }
  .realm-tag > span:not(.realm-n) { display: none; }
  .px-head { --u: 3px; }
  main.wrap > section, .wrap > section { margin-top: 64px; }
  .hud, .wrap > .hud { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(n) { border-left: 0; box-shadow: none; padding-left: 6px; }
  .stat b { --u: 3px; }
  .recipe { grid-template-columns: 1fr; gap: 14px; }
  .slot { width: 60px; height: 60px; }
  .slot .ico { width: 28px; height: auto; }
  a.lane { grid-template-columns: auto 1fr; gap: 12px; padding-left: 18px; }
  .lane-flag { display: none; }
  .towers { --ts: 2; gap: 8px; }
  .tower-plate { flex-direction: column; align-items: flex-start; gap: 6px; padding: 8px; }
  .rank { --u: 4px; min-width: 0; }
  .plate-txt .is-px { display: none; }
  .plate-txt .plain { display: block; font-size: 14px; line-height: 1.25; }
  .plate-txt small { font-size: 10.5px; letter-spacing: .08em; }
  .plate-n { font-size: 13px; }
  .plate-n b + .ico { margin-left: 0; }
  .scene-in { padding-top: 64px; padding-bottom: 250px; }
  .board-wrap { grid-template-columns: 1fr; }
  .board { grid-column: 1; padding: 16px 14px 18px; }
  .notice { padding: 16px 14px; }
  .notice h2.is-px { --u: 3px; }
  .board-wrap .torch { display: none; }
  .support-hero h1 { --u: 4px; }
  .order-preview { position: static; justify-self: center; }
  .order .field { max-width: none; }
  .wares { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .ware { scroll-snap-align: start; }
  .support-box { grid-template-columns: 1fr; gap: 16px; padding: 20px 16px; }
  .support-art { justify-content: center; }
  .moon { right: 6%; top: 40px; width: 72px; height: 72px; background-size: 72px 72px; }
  .vcards, .neighbours, .two, .small-print { grid-template-columns: 1fr; }
  .vhero { min-height: 380px; }
  .vhero h1 { --u: 6px; }
  .vflag { display: none; }
  .vhero-in { padding-bottom: 80px; }
  .inventory { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .item .slot { width: 100%; max-width: 116px; height: auto; aspect-ratio: 1; }
  .foot-links { margin-left: 0; }
  .nav-villages a { font-size: 14px; padding: 4px 6px; }
}
@media (max-width: 480px) {
  .hero-title { --u: 4px; }
}
@media (max-width: 370px) {
  .hero-title { --u: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  .realm, .walker, .scene::after, .fig img, .torch::before, .torch::after, .torchlight::before, .dragon .fig { animation: none !important; }
  .walker { display: none; }
  .tower-body { transition: none !important; }
  .btn, a.lane, .realm-card { transition: none; }
}

/* ===== Rechtstexte: zwei große Felder auf der Startseite, Links rechts in der Leiste oben ===== */
.legal { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.legal a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; transition: border-color .1s; }
.legal a:hover { border-color: var(--gold); }
.legal b { font-size: 19px; }
.topnav a.legal-link { color: var(--dim); font-weight: 400; }
.topnav a.legal-link.push { margin-left: auto; }

/* ===== Patrons (support.html und Dorf-Seiten, seit 23.11.2026) ===== */
.btn.gold-btn, .tier .btn { border-image-source: url(img/ui/frame-goldbtn.svg); color: #2a1a05; }
.btn.ghost { border-image-source: url(img/ui/frame-stone.svg); color: var(--text); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: none; }
button.btn { font: inherit; font-weight: 700; cursor: pointer; background: none; }
.star { color: var(--gold); }
.person.patron { border-image-source: url(img/ui/frame-gold.svg); }
.small { font-size: 13px; }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; align-items: stretch; }
.tier { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; border: 9px solid transparent; border-image: url(img/ui/frame-stone.svg) 3 fill / 9px stretch; }
.tier.top { border-image-source: url(img/ui/frame-gold.svg); }
.tier-art { display: grid; place-items: end center; height: 112px; margin-bottom: 4px; filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, .45)); }
.tier h3 { margin: 4px 0 0; }
.tier .price { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 8px; margin: 4px 0 8px; --u: 4px; }
.tier .px-cream { --u: 2px; }
.tier .price small { font-size: 14px; color: var(--dim); line-height: 1; }
.tier ul { margin: 0 0 12px; padding-left: 18px; font-size: 15px; flex: 1; color: #d9d4c4; }
.tier li { margin: 4px 0; }
.tier .limit { font-size: 13px; color: var(--dim); margin: 0 0 10px; }
.order { display: grid; gap: 16px; }
.order .field { display: grid; gap: 6px; }
.order label { font-weight: 700; }
.order input:not([type="checkbox"]), .order select {
  font: inherit; color: var(--text); background: transparent; padding: 8px 12px;
  border: 9px solid transparent; border-image: url(img/ui/frame-slot.svg) 3 fill / 9px stretch;
}
.order select option { background: #151822; }
.order input:focus, .order select:focus { outline: none; border-image-source: url(img/ui/frame-gold.svg); }
.order .check { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.order .check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--gold); }
.note { display: grid; gap: 6px; }
.note code { display: block; background: #0b0d13; border: 3px dashed #363e52; padding: 10px 12px; font-size: 14px; word-break: break-word; }
.order-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.sw { width: 36px; height: 36px; border: 0; cursor: pointer; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), inset 0 -3px 0 rgba(0, 0, 0, .3), 0 0 0 3px var(--outline); }
.sw.on { box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), inset 0 -3px 0 rgba(0, 0, 0, .3), 0 0 0 3px var(--outline), 0 0 0 6px var(--gold); }
.how-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; counter-reset: s; }
.how-step { display: grid; gap: 6px; }
.how-step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; font-weight: 800; color: #2a1a05; background: var(--gold); box-shadow: inset 0 3px 0 #fff3bd, inset 0 -3px 0 #c9832a, 0 0 0 3px var(--outline); }
.how-step span { color: var(--dim); font-size: 15px; }
.fair { border-image-source: url(img/ui/frame-gold.svg); }
.patron-wall { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.patron-chip { display: inline-flex; align-items: center; gap: 10px; padding: 4px 12px 4px 8px; border: 9px solid transparent; border-image: url(img/ui/frame-stone.svg) 3 fill / 9px stretch; }
.patron-chip b { display: block; font-size: 15px; }
.patron-chip small { display: block; color: var(--gold); font-size: 12.5px; }
.patron-chip.empty { color: var(--dim); border-image-source: url(img/ui/frame-slot.svg); padding: 8px 14px; }
.faq { display: grid; gap: 10px; }
.faq details { border: 9px solid transparent; border-image: url(img/ui/frame-stone.svg) 3 fill / 9px stretch; padding: 6px 14px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { color: #d9d4c4; margin: 8px 0 4px; }
.order [hidden], .tiers [hidden], [hidden] { display: none !important; }
/* Marktstand auf der Startseite: was man kaufen kann */
.wares { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.ware { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--text); text-decoration: none; padding: 14px 12px 16px; transition: transform .1s steps(2); }
.ware.top { border-image-source: url(img/ui/frame-gold.svg); }
.ware:hover { transform: translateY(-4px); }
.ware .tier-art { height: 104px; }
.ware .px-cream { --u: 2px; }
.ware-price { --u: 4px; }
.ware small { color: var(--dim); font-size: 13.5px; line-height: 1.35; }
.ware small.limit { color: var(--gold2); font-weight: 700; font-size: 12px; }
.ware .btn { margin-top: auto; min-height: 44px; }
/* Support-Seite: Kopf und Vorschau im Bestellfeld */
.support-hero { --c: var(--gold); min-height: 400px; }
.support-hero .vhero-in { padding-bottom: 48px; }
.support-hero h1 { --u: 7px; }
.hero-copy { max-width: 640px; margin: 14px 0 0; color: #e8e2d0; text-shadow: 0 2px 0 #000; }
.order { position: relative; }
.order-preview { position: absolute; right: 22px; top: 18px; filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, .45)); }
.order .field { max-width: calc(100% - 170px); }
.free-head { margin: 22px 0 10px; font-weight: 700; color: var(--text); }
#order-title { color: var(--gold); font-size: 24px; margin: 8px 0 16px; }
