/* Guild portal prototype, style "Oldschool": 2006 guild portal, WoW interface cues, modern build. */

@font-face { font-family: "Metamorphous"; src: url(fonts/metamorphous-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Marcellus"; src: url(fonts/marcellus-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Alegreya"; src: url(fonts/alegreya-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url(fonts/alegreya-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url(fonts/alegreya-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url(fonts/alegreya-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url(fonts/alegreya-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url(fonts/alegreya-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url(fonts/alegreya-sans-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  /* interface colours */
  --gold: #ffd100;
  --gold-hi: #fff2b0;
  --gold-mid: #e8b33a;
  --gold-deep: #8a5a12;
  --brass: #c9a24a;
  --ink: #e9e2d0;
  --ink-dim: #b3a88f;
  --night: #07070b;
  --panel: rgba(10, 9, 12, 0.9);
  --panel-solid: #0f0d10;
  --red-hi: #c8261c;
  --red: #8a120c;
  --red-lo: #3e0503;
  /* item quality */
  --q-poor: #9d9d9d;
  --q-common: #ffffff;
  --q-uncommon: #1eff00;
  --q-rare: #0070dd;
  --q-rare-text: #3d9cff;
  --q-epic: #a335ee;
  --q-epic-text: #c069ff;
  --q-legendary: #ff8000;
  /* chat */
  --chat-guild: #40ff40;
  --chat-officer: #40c040;
  --chat-system: #ffff00;
  --chat-say: #ffffff;
  /* classes */
  --c-krieger: #c69b6d; --c-paladin: #f48cba; --c-jaeger: #aad372; --c-schurke: #fff468;
  --c-priester: #ffffff; --c-magier: #3fc7eb; --c-hexer: #8788ee; --c-druide: #ff7c0a;

  --f-display: "Metamorphous", "Marcellus", Georgia, serif;
  --f-ui: "Marcellus", Georgia, serif;
  --f-body: "Alegreya", Georgia, serif;
  --f-chat: "Alegreya Sans", "Arial Narrow", Arial, sans-serif;

  --noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  /* parchment: large soft stains plus a faint grain, both in warm brown */
  --paper-stain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='600' height='600'><filter id='s'><feTurbulence type='fractalNoise' baseFrequency='.006' numOctaves='4' seed='7' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .29  0 0 0 0 .10  0 0 0 .55 -.12'/></filter><rect width='100%' height='100%' filter='url(%23s)'/></svg>");
  --paper-grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35  0 0 0 0 .22  0 0 0 0 .08  0 0 0 .16 0'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>");
  --paper: var(--paper-grain), var(--paper-stain), radial-gradient(ellipse 90% 80% at 50% 35%, #f8ecca 0%, #f0dfb3 50%, #e2c88f 80%, #c9a462 100%);

  --wrap: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 400 17px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hi); }
button { font: inherit; }

/* ---------------------------------------------------------- page background */
.world {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(0,0,0,0) 0%, rgba(7,7,11,.6) 55%, var(--night) 85%),
    url(img/hero-blur.jpg) center top / cover no-repeat;
  opacity: .55;
}
.world::after {
  content: ""; position: absolute; inset: 0;
  background: var(--noise), linear-gradient(180deg, rgba(7,7,11,.2), var(--night) 70%);
  mix-blend-mode: normal;
}

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }

/* ---------------------------------------------------------- top bar */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: linear-gradient(180deg, rgba(4,4,6,.96), rgba(10,8,8,.92));
  border-bottom: 1px solid #000;
  box-shadow: 0 1px 0 rgba(201,162,74,.35), 0 8px 24px rgba(0,0,0,.6);
  font: 14px/1 var(--f-ui);
  letter-spacing: .02em;
}
.topbar .wrap { display: flex; align-items: center; gap: 18px; height: 46px; }
.realm { display: flex; align-items: center; gap: 8px; color: var(--ink-dim); white-space: nowrap; }
.realm b { color: var(--gold); font-weight: 400; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold-mid); box-shadow: 0 0 8px var(--gold-mid); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.countdown { margin-inline: auto; display: flex; align-items: center; gap: 10px; color: var(--ink-dim); white-space: nowrap; }
.countdown .cd { display: flex; gap: 4px; }
.countdown .cd span {
  min-width: 34px; padding: 5px 6px 4px; text-align: center;
  background: linear-gradient(#1b1714, #0b0908); border: 1px solid #3a2c16;
  color: var(--gold); font-family: var(--f-ui); font-size: 15px;
  box-shadow: inset 0 1px 0 rgba(255,220,140,.15);
}
.countdown .cd i { font-style: normal; color: var(--ink-dim); font-size: 11px; align-self: end; margin-right: 4px; }
.discord-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  background: linear-gradient(#6672f5, #4752c4); color: #fff; border-radius: 4px;
  border: 1px solid #2c3390; box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
  font: 14px/1 var(--f-ui); white-space: nowrap;
}
.discord-btn:hover { color: #fff; filter: brightness(1.12); }
.discord-btn svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------- masthead */
.masthead { margin-top: 26px; position: relative; }
.banner {
  position: relative; height: 470px; overflow: hidden;
  border: 3px solid #000;
  box-shadow: 0 0 0 2px #6e5222, 0 0 0 3px #000, 0 0 0 5px #b38b3a, 0 0 0 6px #000, 0 30px 60px rgba(0,0,0,.7);
  background: #000;
}
.banner-img {
  position: absolute; inset: -40px 0 -40px 0;
  background: var(--banner, url(img/scenes/lagerfeuer.jpg)) var(--banner-pos, center 40%) / cover no-repeat;
  will-change: transform;
}
/* the start page shows the campfire next to the buttons */
.banner:not(.banner-compact) .banner-img { background-position: center 88%; }
.banner::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(ellipse 55% 60% at 50% 48%, rgba(0,0,0,.55), rgba(0,0,0,0) 75%),
    linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,0) 30%, rgba(0,0,0,0) 60%, rgba(0,0,0,.85));
}
.banner canvas { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }
.banner-content {
  position: relative; z-index: 3; height: 100%;
  display: grid; justify-items: center; align-content: center; text-align: center; gap: 6px;
  padding: 20px 20px 64px;
}
.crest {
  width: 150px; height: 150px;
  background: url(img/crest.png) center / contain no-repeat;
  filter: drop-shadow(0 0 22px rgba(255,190,60,.55));
  animation: crestGlow 5s ease-in-out infinite;
}
@keyframes crestGlow { 50% { filter: drop-shadow(0 0 36px rgba(255,200,80,.8)); } }
.guild-name {
  margin: 0; font: 400 clamp(40px, 6.2vw, 82px)/1 var(--f-display); letter-spacing: .01em;
  background: linear-gradient(180deg, #fff6c8 0%, #ffd34a 38%, #e09a14 62%, #8a4f05 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #2a1400) drop-shadow(0 0 1px #000) drop-shadow(0 8px 18px rgba(0,0,0,.9));
}
.guild-tag {
  font: 15px/1 var(--f-ui); letter-spacing: .38em; text-transform: uppercase; color: var(--gold-hi);
  text-shadow: 0 2px 4px #000;
  display: flex; align-items: center; gap: 14px;
}
.guild-tag::before, .guild-tag::after {
  content: ""; width: 70px; height: 1px; background: linear-gradient(90deg, transparent, var(--brass), transparent);
}
.banner-lead { max-width: 640px; margin: 12px 0 18px; color: #f3ead6; text-shadow: 0 2px 6px #000, 0 0 2px #000; font-size: 19px; }
.banner-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ---------------------------------------------------------- buttons */
.btn {
  --h: 44px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 26px; cursor: pointer;
  font: 16px/1 var(--f-ui); letter-spacing: .04em; color: var(--gold);
  text-shadow: 0 1px 1px #000, 0 0 6px rgba(0,0,0,.6);
  background: linear-gradient(180deg, var(--red-hi) 0%, var(--red) 48%, var(--red-lo) 100%);
  border: 1px solid #1a0100; border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255,170,130,.55), inset 0 -3px 6px rgba(0,0,0,.45), 0 0 0 1px #6b4a17, 0 0 0 2px #000, 0 6px 14px rgba(0,0,0,.55);
  transition: filter .15s, transform .08s, box-shadow .2s;
}
.btn:hover { color: var(--gold-hi); filter: brightness(1.18); box-shadow: inset 0 1px 0 rgba(255,170,130,.6), inset 0 -3px 6px rgba(0,0,0,.45), 0 0 0 1px #c9a24a, 0 0 0 2px #000, 0 0 18px rgba(255,190,60,.45); }
.btn:active { transform: translateY(1px); filter: brightness(.95); }
.btn-dark {
  background: linear-gradient(180deg, #2b2620, #15110d 55%, #0a0806);
  box-shadow: inset 0 1px 0 rgba(255,220,150,.2), 0 0 0 1px #6b4a17, 0 0 0 2px #000, 0 6px 14px rgba(0,0,0,.55);
}
.btn-sm { --h: 34px; padding: 0 16px; font-size: 14px; }
.btn-wide { width: 100%; }

/* ---------------------------------------------------------- action bar navigation */
.actionbar {
  position: relative; z-index: 5; margin: -34px auto 0; width: fit-content; max-width: 100%;
  display: flex; gap: 6px; padding: 10px 14px 12px;
  background: linear-gradient(180deg, #2a241d, #120f0b);
  border: 1px solid #000;
  box-shadow: 0 0 0 1px #8a6a2c, 0 0 0 2px #000, inset 0 1px 0 rgba(255,220,150,.18), 0 14px 30px rgba(0,0,0,.7);
  border-radius: 6px;
  overflow-x: auto; scrollbar-width: none;
}
.actionbar::-webkit-scrollbar { display: none; }
.slot {
  position: relative; display: grid; justify-items: center; gap: 6px; width: 92px; flex: none;
  font: 12.5px/1.1 var(--f-ui); color: var(--ink-dim); text-align: center;
}
.slot .ico {
  position: relative; width: 56px; height: 56px; border-radius: 4px; overflow: hidden;
  border: 1px solid #000; background: #000 center / cover no-repeat;
  box-shadow: 0 0 0 2px #3d3424, 0 0 0 3px #000, inset 0 0 12px rgba(0,0,0,.7);
  transition: box-shadow .2s, filter .2s, transform .1s;
}
.slot .ico::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,.28), rgba(255,255,255,0) 40%), radial-gradient(circle at 50% 50%, transparent 55%, rgba(0,0,0,.55));
}
.slot .key {
  position: absolute; top: 2px; right: 22px; z-index: 2;
  font: 12px/1 var(--f-chat); font-weight: 700; color: #f0f0f0; text-shadow: 0 0 2px #000, 0 1px 1px #000;
}
.slot:hover { color: var(--gold); }
.slot:hover .ico { box-shadow: 0 0 0 2px #f6d36a, 0 0 0 3px #000, 0 0 16px rgba(255,210,90,.7), inset 0 0 12px rgba(0,0,0,.4); filter: brightness(1.2); }
.slot:active .ico { transform: scale(.95); }
.slot[aria-current="page"] { color: var(--gold); }
.slot[aria-current="page"] .ico { box-shadow: 0 0 0 2px #ffd100, 0 0 0 3px #000, 0 0 12px rgba(255,209,0,.6); }
.slot[aria-current="page"] .ico::before {
  content: ""; position: absolute; inset: 0; z-index: 1; border: 2px solid rgba(255,240,170,.7); border-radius: 3px;
}

/* ---------------------------------------------------------- portal grid */
.portal {
  display: grid; gap: 22px; margin-top: 30px;
  grid-template-columns: 290px minmax(0, 1fr) 300px;
  align-items: start;
}
.col { display: grid; gap: 22px; }

/* ---------------------------------------------------------- panels */
.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(22,18,15,.94), rgba(9,8,8,.96));
  border: 1px solid #000;
  box-shadow:
    0 0 0 1px #5d4520,
    0 0 0 2px #0a0806,
    0 0 0 3px #a7823a,
    0 0 0 4px #000,
    inset 0 0 0 1px rgba(255,220,150,.08),
    0 16px 34px rgba(0,0,0,.6);
  margin: 4px;
}
.panel::after {
  /* four rivets */
  content: ""; position: absolute; inset: -4px; pointer-events: none;
  background:
    radial-gradient(circle at 5px 5px, #ffe9a6 0 1.5px, #b88a2c 2.5px, #3a2708 4px, transparent 4.6px),
    radial-gradient(circle at calc(100% - 5px) 5px, #ffe9a6 0 1.5px, #b88a2c 2.5px, #3a2708 4px, transparent 4.6px),
    radial-gradient(circle at 5px calc(100% - 5px), #ffe9a6 0 1.5px, #b88a2c 2.5px, #3a2708 4px, transparent 4.6px),
    radial-gradient(circle at calc(100% - 5px) calc(100% - 5px), #ffe9a6 0 1.5px, #b88a2c 2.5px, #3a2708 4px, transparent 4.6px);
}
.panel-h {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 14px 8px;
  background: linear-gradient(180deg, #6a1712 0%, #3c0907 55%, #210403 100%);
  border-bottom: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255,170,120,.35), 0 1px 0 rgba(201,162,74,.4);
}
.panel-h h2, .panel-h h3 {
  margin: 0; font: 400 16px/1.2 var(--f-ui); letter-spacing: .06em; color: var(--gold);
  text-shadow: 0 1px 1px #000, 0 0 8px rgba(0,0,0,.8);
}
.panel-h .more { font: 13px/1 var(--f-ui); color: var(--gold-hi); opacity: .8; }
.panel-h .more:hover { opacity: 1; }
.panel-b { padding: 14px; }
.panel-note { font: 13.5px/1.45 var(--f-chat); color: var(--ink-dim); margin: 0 0 10px; }

/* ---------------------------------------------------------- recruitment */
.recruit { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.recruit li {
  display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 8px;
  padding: 6px 4px; border-bottom: 1px solid rgba(201,162,74,.12);
  font: 16px/1.1 var(--f-ui);
}
.recruit li:last-child { border-bottom: 0; }
.cls-ico {
  width: 24px; height: 24px; border-radius: 3px; display: grid; place-items: center;
  border: 1px solid #000; box-shadow: 0 0 0 1px rgba(201,162,74,.5);
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 70%, white), var(--c) 45%, color-mix(in srgb, var(--c) 35%, black));
  font: 13px/1 var(--f-display); color: rgba(0,0,0,.75);
}
.need { font: 12px/1 var(--f-chat); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 7px; border-radius: 3px; }
.need-hoch { color: #102b00; background: linear-gradient(#58ff36, #1eb400); box-shadow: 0 0 10px rgba(30,255,0,.35); }
.need-mittel { color: #2b2100; background: linear-gradient(#ffe46a, #d7a400); }
.need-offen { color: #ddd; background: linear-gradient(#5a5a5a, #353535); }
.need-geschlossen { color: #9a8f86; background: linear-gradient(#2c2622, #1c1815); box-shadow: inset 0 0 0 1px #3a322b; }
.recruit li:has(.need-geschlossen) > span:nth-child(2) { opacity: .55; }

/* ---------------------------------------------------------- next event on the member home page */
.next-event { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 12px; }
.next-txt h3 { margin: 0 0 4px; font: 400 26px/1.1 var(--f-display); }
.next-txt h3 a { color: var(--gold-hi); }
.next-txt .meta { font: 14.5px/1.4 var(--f-chat); color: var(--ink-dim); margin-bottom: 8px; }
.next-txt p { margin: 0 0 10px; font-size: 16px; }
.col-center .rsvp-state { margin: 0 0 10px; }
.col-center .btn-row { margin-bottom: 14px; }

/* ---------------------------------------------------------- chat frame */
.chat { background: rgba(0,0,0,.62); border: 1px solid rgba(255,255,255,.08); border-radius: 3px; }
.chat-log .ct { color: #7d7566; font-size: 12px; margin-right: 2px; }
.chat-log .cb { color: #d8d0bd; }
.chat-log .cr { color: var(--ink-dim); }
.chat-log .cf { color: var(--gold); }
.chat-log a { color: #8fd3ff; }
.chat-log a:hover { color: #c5e8ff; }
.chat-log strong { color: #fff; font-weight: 700; }
.chat-error { margin: 0 0 6px; padding: 6px 10px; font: 14px/1.3 var(--f-chat); color: #ffd8d2; background: rgba(160,30,20,.3); border-left: 3px solid #ff5a4a; }
.chat-input { display: flex; gap: 8px; padding: 8px; border-top: 1px solid rgba(255,255,255,.08); }
.chat-input input { flex: 1; min-width: 0; padding: 8px 10px; font: 15px/1.3 var(--f-chat); color: var(--ink); background: #0a0806; border: 1px solid #5d4520; border-radius: 3px; }
.chat-input input:focus { outline: 2px solid var(--gold-mid); outline-offset: 1px; }
.chat-tabs { display: flex; gap: 2px; padding: 0 6px; transform: translateY(-1px); }
.chat-tabs button {
  border: 1px solid rgba(255,255,255,.12); border-top: 0; background: rgba(30,30,30,.7); color: var(--ink-dim);
  font: 13px/1 var(--f-chat); padding: 5px 9px 6px; border-radius: 0 0 4px 4px; cursor: pointer;
}
.chat-tabs button[aria-selected="true"] { color: var(--gold); background: rgba(60,50,30,.85); }
.chat-log { -webkit-mask-image: linear-gradient(180deg, transparent, #000 34px); mask-image: linear-gradient(180deg, transparent, #000 34px); height: 236px; overflow: hidden; padding: 8px 10px; font: 15px/1.38 var(--f-chat); display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; }
.chat-log p { margin: 0; text-shadow: 0 1px 1px #000; animation: chatIn .35s ease-out; }
@keyframes chatIn { from { opacity: 0; transform: translateY(6px); } }
/* The live guild chat scrolls; the activity feed for guests does not. */
#chat-log[data-chat-url] { height: 300px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #5d4520 transparent; }
#chat-log[data-chat-url] p { flex: none; animation: none; }
.cg { color: var(--chat-guild); }
.co { color: var(--chat-officer); }
.cs { color: var(--chat-system); }
.chat-log .n { cursor: pointer; }
.chat-log .ach { color: var(--chat-system); }
.chat-input { display: flex; gap: 6px; align-items: center; border-top: 1px solid rgba(255,255,255,.08); padding: 6px 10px; font: 14px/1 var(--f-chat); color: var(--chat-guild); }
.chat-input span { opacity: .9; }
.chat-input em { color: var(--ink-dim); font-style: normal; opacity: .7; }
.chat-src { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font: 12.5px/1.2 var(--f-chat); color: var(--ink-dim); }
.live { display: inline-flex; align-items: center; gap: 6px; color: #9fe39f; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3cff3c; box-shadow: 0 0 6px #3cff3c; animation: pulse 1.6s infinite; }

/* ---------------------------------------------------------- online list */
.online { list-style: none; margin: 0; padding: 0; font: 15px/1.2 var(--f-chat); display: grid; gap: 7px; }
.online li { display: flex; align-items: center; gap: 8px; }
.online .vc { margin-left: auto; font-size: 12px; color: var(--ink-dim); display: inline-flex; gap: 4px; align-items: center; }
.online .vc svg { width: 13px; height: 13px; fill: currentColor; }
.voice-head { font: 13px/1 var(--f-ui); color: var(--gold); letter-spacing: .05em; margin: 2px 0 8px; display: flex; gap: 6px; align-items: center; }

/* ---------------------------------------------------------- quest dialog (parchment) */
.quest {
  position: relative; color: #2a1708;
  background: var(--paper);
  background-size: auto, cover, auto;
  border: 1px solid #000;
  box-shadow: 0 0 0 1px #5d4520, 0 0 0 2px #0a0806, 0 0 0 3px #a7823a, 0 0 0 4px #000, inset 0 0 70px rgba(110,64,16,.38), inset 0 0 14px rgba(80,45,10,.35), 0 16px 34px rgba(0,0,0,.6);
  margin: 4px;
}
.quest-top {
  display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center;
  padding: 18px 22px 10px;
}
.quest-giver {
  width: 96px; height: 96px; border-radius: 50%;
  background: url(img/crest.png) center / 76% no-repeat #1b120a;
  box-shadow: 0 0 0 3px #3b2408, 0 0 0 5px #c9a24a, 0 0 0 6px #2b1a05, 0 6px 14px rgba(0,0,0,.45);
}
.quest-kicker { display: flex; align-items: center; gap: 8px; font: 13px/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: #7a4a10; }
.quest-kicker .excl {
  display: grid; place-items: center; width: 22px; height: 22px;
  font: 22px/1 var(--f-display); color: #ffd100; text-shadow: 0 0 2px #000, 0 1px 0 #000, 0 0 10px rgba(255,200,0,.9);
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-4px); } }
.quest h2 { margin: 6px 0 0; font: 400 34px/1.05 var(--f-display); color: #2b1300; }
.quest-body { padding: 4px 22px 18px; display: grid; gap: 14px; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.quest-body p { margin: 0 0 10px; font-size: 17.5px; }
.quest h3 { margin: 0 0 8px; font: 400 21px/1 var(--f-display); color: #3b1d00; }
.objectives { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 16.5px; }
.objectives li { display: flex; gap: 9px; align-items: baseline; }
.objectives li::before { content: "◆"; color: #8a5a12; font-size: 11px; transform: translateY(-2px); }
.objectives .done { color: #5c4a2c; text-decoration: line-through; text-decoration-color: rgba(60,30,0,.4); }
.rewards { display: grid; grid-template-columns: 1fr; gap: 7px; }
.reward {
  display: flex; align-items: center; gap: 8px; padding: 5px; cursor: help;
  background: linear-gradient(90deg, rgba(60,30,5,.16), rgba(60,30,5,.05)); border-radius: 3px;
  font: 14.5px/1.15 var(--f-ui);
}
.reward .ico { flex: none; width: 40px; height: 40px; border-radius: 3px; background: #000 center / cover; border: 1px solid #000; box-shadow: 0 0 0 1px var(--qc, #c9a24a); }
.reward b { font-weight: 400; color: var(--qtext, #2a1708); text-shadow: 0 0 1px rgba(0,0,0,.3); }
.q-epic { --qc: var(--q-epic); --qtext: #6a1aa8; }
.q-rare { --qc: var(--q-rare); --qtext: #0a4fa3; }
.q-uncommon { --qc: #1aa800; --qtext: #156b00; }
.quest-extra { margin-top: 12px; font-size: 15.5px; color: #5b3c18; }
.quest-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 22px; background: linear-gradient(180deg, rgba(60,30,5,.0), rgba(60,30,5,.18)); border-top: 1px solid rgba(90,50,10,.35);
}
.quest-foot small { font: 14px/1.3 var(--f-chat); color: #5b3c18; }
.quest-foot .btns { display: flex; gap: 10px; }

/* ---------------------------------------------------------- chronicle */
.feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.feature-img { position: relative; min-height: 300px; background: url(img/scenes/taverne.jpg) 30% center / cover; border-right: 1px solid #000; box-shadow: inset 0 0 40px rgba(0,0,0,.7); }
.feature-img .chip { position: absolute; left: 10px; top: 10px; }
.chip { font: 12px/1 var(--f-chat); color: #e7dfca; background: rgba(0,0,0,.65); border: 1px dashed rgba(255,255,255,.3); padding: 5px 8px; }
.feature-txt { padding: 18px 20px 20px; display: grid; gap: 10px; align-content: start; }
.eyebrow { font: 13px/1 var(--f-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-mid); }
.feature-txt h3 { margin: 0; font: 400 30px/1.08 var(--f-display); color: var(--gold); text-shadow: 0 2px 0 #000; }
.byline { font: 14px/1.3 var(--f-chat); color: var(--ink-dim); }
.byline .n { font-weight: 700; }
.feature-txt p { margin: 0; color: var(--ink); }
.readmore { font: 15px/1 var(--f-ui); letter-spacing: .06em; }
.entries { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #000; box-shadow: 0 -1px 0 rgba(201,162,74,.25); }
.entry { display: grid; grid-template-columns: 74px 1fr; gap: 12px; padding: 14px; align-items: center; }
.entry + .entry { border-left: 1px solid rgba(201,162,74,.18); }
.entry .thumb { width: 74px; height: 74px; border-radius: 3px; background: #000 center / cover; box-shadow: 0 0 0 1px #000, 0 0 0 2px #5d4520; }
.entry h4 { margin: 0 0 4px; font: 400 18px/1.15 var(--f-display); color: var(--gold-hi); }
.entry p { margin: 0; font: 14px/1.35 var(--f-chat); color: var(--ink-dim); }

/* ---------------------------------------------------------- minimap */
.minimap-panel { padding: 14px 14px 16px; display: grid; justify-items: center; gap: 10px; }
.zone { font: 16px/1 var(--f-ui); color: var(--gold); text-shadow: 0 1px 2px #000; letter-spacing: .04em; }
.minimap {
  position: relative; width: 196px; height: 196px; border-radius: 50%;
  background: url(img/scenes/minimap.jpg) center / cover no-repeat;
  box-shadow: 0 0 0 4px #1a1510, 0 0 0 7px #8f8576, 0 0 0 9px #3b352d, 0 0 0 11px #000, inset 0 0 30px rgba(0,0,0,.8), 0 10px 22px rgba(0,0,0,.7);
}
.minimap::before { /* glass */
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, rgba(255,255,255,.22), rgba(255,255,255,0) 40%);
}
.minimap .player {
  position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: translate(-50%, -60%) rotate(20deg);
  border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 18px solid #ffd100;
  filter: drop-shadow(0 0 3px #000) drop-shadow(0 0 6px rgba(255,209,0,.8));
}
.minimap .ping { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #ffd100; box-shadow: 0 0 0 2px #000, 0 0 8px #ffd100; z-index: 2; }
a.ping { display: block; }
a.ping:hover, a.ping:focus-visible { transform: scale(1.3); outline: none; }
.minimap .ping.p1 { left: 64%; top: 30%; }
.minimap .ping.p2 { left: 26%; top: 62%; background: #40ff40; box-shadow: 0 0 0 2px #000, 0 0 8px #40ff40; }
.minimap .ping.p1::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid #ffd100; animation: ping 1.8s ease-out infinite;
}
@keyframes ping { from { transform: scale(.4); opacity: 1; } to { transform: scale(2.4); opacity: 0; } }
.minimap .north { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); font: 13px/1 var(--f-ui); color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000; }
.mm-btn {
  position: absolute; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 40% 35%, #4b4237, #15110d); border: 2px solid #8f8576; box-shadow: 0 0 0 1px #000, 0 3px 6px rgba(0,0,0,.6);
  color: var(--gold); font: 15px/1 var(--f-ui); cursor: pointer;
}
.mm-btn.b1 { right: -12px; top: 22px; }
.mm-btn.b2 { left: -12px; top: 22px; }
.mm-btn.b3 { right: -6px; bottom: 6px; }
.clock {
  display: flex; gap: 8px; align-items: center; padding: 5px 12px; border-radius: 12px;
  background: linear-gradient(#1f1a14, #0b0907); border: 1px solid #5d4520; font: 14px/1 var(--f-ui); color: var(--ink);
}
.launch { text-align: center; font: 14px/1.4 var(--f-chat); color: var(--ink-dim); }
.launch b { color: var(--gold); font: 400 20px/1.2 var(--f-ui); display: block; }

/* ---------------------------------------------------------- calendar invite */
.invite { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: start; }
.cal { width: 64px; text-align: center; border: 1px solid #000; box-shadow: 0 0 0 1px #8a6a2c; background: linear-gradient(#efe0bb, #d5bb84); color: #2a1708; }
.cal b { display: block; background: linear-gradient(#a3170f, #5a0907); color: var(--gold); font: 12px/1 var(--f-ui); letter-spacing: .1em; padding: 5px 0 4px; }
.cal strong { display: block; font: 400 30px/1 var(--f-display); padding: 6px 0 0; }
.cal span { display: block; font: 12px/1 var(--f-ui); padding: 2px 0 6px; letter-spacing: .1em; }
.invite h4 { margin: 0 0 4px; font: 400 21px/1.1 var(--f-display); color: var(--gold-hi); }
.invite .meta { font: 14px/1.4 var(--f-chat); color: var(--ink-dim); }
.rsvp { display: flex; gap: 12px; margin: 10px 0 12px; font: 13.5px/1 var(--f-chat); }
.rsvp span { display: inline-flex; align-items: center; gap: 5px; }
.rsvp i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.streamed { display: inline-flex; align-items: center; gap: 6px; font: 12px/1 var(--f-chat); font-weight: 700; letter-spacing: .08em; color: #ff6b6b; text-transform: uppercase; }
.streamed::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #ff3b3b; box-shadow: 0 0 8px #ff3b3b; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------------------------------------------------------- achievements */
.ach-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ach {
  position: relative; aspect-ratio: 1; border-radius: 4px; cursor: pointer;
  background: #000 center / cover; border: 1px solid #000;
  box-shadow: 0 0 0 2px var(--qc, #6b5a3a), 0 0 0 3px #000, inset 0 0 10px rgba(0,0,0,.6);
  transition: transform .12s, box-shadow .2s, filter .2s;
}
.ach::after { content: ""; position: absolute; inset: 0; border-radius: 3px; background: linear-gradient(160deg, rgba(255,255,255,.25), transparent 45%); }
.ach:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--qc, #c9a24a), 0 0 0 3px #000, 0 0 16px var(--qc, rgba(255,210,90,.6)); }
.ach.locked { filter: grayscale(1) brightness(.45); }
.ach.secret { background: radial-gradient(circle, #2a2520, #0b0908); }
.ach.secret::before { content: "?"; position: absolute; inset: 0; display: grid; place-items: center; font: 30px/1 var(--f-display); color: #6f6556; }
.ach .pts {
  position: absolute; right: -6px; bottom: -6px; z-index: 2; min-width: 22px; height: 22px; padding: 0 4px;
  display: grid; place-items: center; font: 12px/1 var(--f-ui); color: #2a1a00;
  background: linear-gradient(#ffe68a, #d39b1e); border: 1px solid #000; border-radius: 50%;
}
.recent { list-style: none; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid rgba(201,162,74,.15); display: grid; gap: 6px; font: 14px/1.35 var(--f-chat); color: var(--ink-dim); }
.recent .ach-link { color: var(--chat-system); cursor: pointer; }

/* XP-style guild goal */
.goal { margin-top: 14px; }
.goal .eyebrow { font-size: 12px; }
.xp { position: relative; height: 22px; margin: 8px 0 6px; background: #0b0710; border: 1px solid #000; box-shadow: 0 0 0 1px #6b5a3a, inset 0 2px 6px rgba(0,0,0,.8); }
.xp-fill { position: absolute; inset: 1px auto 1px 1px; width: 40%; background: linear-gradient(180deg, #c48af0 0%, #8a3fd0 45%, #4b1680 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.xp-rest { position: absolute; inset: 1px auto 1px 40%; width: 12%; background: linear-gradient(180deg, #6aa8ff, #1f5fd0 50%, #0c2c70); opacity: .55; }
.xp-ticks { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(0,0,0,.85) calc(10% - 1px) 10%); }
.xp-label { position: absolute; inset: 0; display: grid; place-items: center; font: 13px/1 var(--f-ui); color: #fff; text-shadow: 0 1px 2px #000, 0 0 3px #000; letter-spacing: .04em; }
.xp-meta { display: flex; justify-content: space-between; font: 13px/1.3 var(--f-chat); color: var(--ink-dim); }

/* ---------------------------------------------------------- expedition band */
.band {
  position: relative; margin-top: 46px; min-height: 420px; display: grid; align-items: center;
  border-block: 1px solid #000; box-shadow: 0 -1px 0 rgba(201,162,74,.35), 0 1px 0 rgba(201,162,74,.35);
  overflow: hidden;
}
.band-img { position: absolute; inset: -60px 0; background: url(img/scenes/dunkelkueste.jpg) center 55% / cover no-repeat; will-change: transform; }
.band::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(4,6,14,.92) 0%, rgba(4,6,14,.65) 40%, rgba(4,6,14,.05) 75%); }
.band .wrap { position: relative; z-index: 2; }
.band-txt { max-width: 560px; display: grid; gap: 12px; }
.band h2 { margin: 0; font: 400 clamp(36px, 4.6vw, 56px)/1.02 var(--f-display); color: var(--gold); text-shadow: 0 3px 0 #000, 0 0 30px rgba(0,0,0,.8); }
.band p { margin: 0; font-size: 19px; color: #e9eef9; text-shadow: 0 2px 4px #000; }
.band .eyebrow { color: #8fd3ff; }
.band .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }

/* ---------------------------------------------------------- footer + loading tip */
footer { margin-top: 0; padding: 40px 0 0; background: linear-gradient(180deg, rgba(0,0,0,0), #050407 30%); }
.foot { display: grid; justify-items: center; gap: 14px; text-align: center; }
.foot .mini-crest { width: 56px; height: 56px; background: url(img/crest.png) center / contain no-repeat; }
.foot nav { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; font: 15px/1 var(--f-ui); letter-spacing: .06em; }
.foot p { margin: 0; max-width: 760px; font: 13.5px/1.5 var(--f-chat); color: #8a8172; }
.loading {
  margin-top: 30px; padding: 16px 0 22px; background: #000; border-top: 1px solid #241c10;
}
.loading .wrap { display: grid; gap: 10px; }
.tip { text-align: center; font: 16px/1.4 var(--f-body); color: var(--ink); min-height: 1.4em; transition: opacity .4s; }
.tip b { color: var(--gold); font-weight: 400; font-family: var(--f-ui); }
.loadbar { position: relative; height: 16px; border: 1px solid #000; box-shadow: 0 0 0 1px #6b5a3a, 0 0 0 2px #000; background: #0a0806; overflow: hidden; }
.loadbar span { position: absolute; inset: 1px auto 1px 1px; width: 0; background: linear-gradient(180deg, #e33b2b, #9d1a10 50%, #520703); box-shadow: inset 0 1px 0 rgba(255,180,150,.45); animation: load 8s cubic-bezier(.2,.7,.3,1) forwards; }
/* Loads once to 86 percent and stays there, like a loading screen that never quite finishes. */
@keyframes load { from { width: 0; } to { width: calc(86% - 2px); } }

/* ---------------------------------------------------------- tooltip */
.tt {
  position: fixed; z-index: 200; max-width: 320px; pointer-events: none;
  padding: 9px 11px 10px; border-radius: 5px;
  background: linear-gradient(180deg, rgba(10,12,32,.96), rgba(4,5,16,.96));
  border: 1px solid #000; box-shadow: 0 0 0 1px #9da3b8, 0 0 0 2px #2d3142, 0 10px 24px rgba(0,0,0,.7);
  font: 14.5px/1.35 var(--f-chat); color: #fff;
  opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s;
}
.tt.on { opacity: 1; transform: none; }
.tt .t-name { font: 16px/1.2 var(--f-ui); margin-bottom: 2px; }
.tt .t-sub { color: #fff; }
.tt .t-flavor { color: var(--gold); margin-top: 6px; }
.tt .t-green { color: var(--q-uncommon); margin-top: 6px; }
.tt .t-white { color: #fff; margin-top: 6px; }
.tt .t-grey { color: #9d9d9d; margin-top: 6px; font-size: 13px; }
.tt .t-row { display: flex; justify-content: space-between; gap: 18px; }

/* ---------------------------------------------------------- achievement toast */
.toast-zone { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 150; display: grid; gap: 10px; pointer-events: none; }
.toast {
  position: relative; width: min(470px, calc(100vw - 24px)); height: 92px; overflow: hidden;
  display: grid; grid-template-columns: 76px 1fr 64px; align-items: center; gap: 12px; padding: 0 14px 0 10px;
  background: radial-gradient(ellipse at 50% 0%, #3a3125, #14100b 70%);
  border: 1px solid #000; border-radius: 8px;
  box-shadow: 0 0 0 2px #d1a64a, 0 0 0 3px #000, 0 0 30px rgba(255,190,60,.45), 0 14px 30px rgba(0,0,0,.8);
  animation: toastIn .55s cubic-bezier(.2,.9,.2,1.2) both;
}
.toast.out { animation: toastOut .5s ease-in both; }
@keyframes toastIn { from { transform: translateY(40px) scale(.9); opacity: 0; } }
@keyframes toastOut { to { transform: translateY(30px); opacity: 0; } }
.toast::after { /* shine sweep */
  content: ""; position: absolute; top: 0; bottom: 0; width: 80px; left: -120px;
  background: linear-gradient(100deg, transparent, rgba(255,240,190,.35), transparent);
  animation: sweep 1.4s .4s ease-out;
}
@keyframes sweep { to { left: 120%; } }
.toast .ticon { width: 64px; height: 64px; border-radius: 4px; background: #000 center / cover; border: 1px solid #000; box-shadow: 0 0 0 2px #d1a64a, 0 0 0 3px #000; }
.toast small { display: block; font: 13px/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.toast strong { display: block; font: 400 22px/1.05 var(--f-display); color: #fff; text-shadow: 0 2px 2px #000; }
.toast .shield {
  width: 52px; height: 60px; display: grid; place-items: center; padding-bottom: 6px;
  clip-path: polygon(50% 0, 100% 14%, 92% 62%, 50% 100%, 8% 62%, 0 14%);
  background: linear-gradient(180deg, #fff1b0, #e3a72b 45%, #8a5208);
  font: 22px/1 var(--f-ui); color: #2a1600;
}

/* center screen quest text */
.quest-accepted {
  position: fixed; left: 0; right: 0; top: 9vh; z-index: 180; text-align: center; pointer-events: none;
  font: 400 clamp(22px, 3vw, 34px)/1.2 var(--f-ui); color: var(--gold); text-shadow: 0 2px 0 #000, 0 0 3px #000, 0 0 14px rgba(0,0,0,.9);
  opacity: 0;
}
.quest-accepted.show { animation: qa 3.2s ease both; }
@keyframes qa { 0% { opacity: 0; transform: scale(.96); } 10% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; } }

/* ---------------------------------------------------------- dialog (application) */
.dlg-back { position: fixed; inset: 0; z-index: 170; background: rgba(0,0,0,.65); backdrop-filter: blur(3px); display: none; place-items: center; padding: 16px; }
.dlg-back.open { display: grid; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } }
.dlg { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; }
.dlg .quest-top { grid-template-columns: 64px 1fr; }
.dlg .quest-giver { width: 64px; height: 64px; }
.dlg form { padding: 0 22px 20px; display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label, .field legend { font: 15px/1.2 var(--f-ui); color: #3b1d00; }
.field input[type=text], .field textarea {
  width: 100%; padding: 9px 10px; font: 16px/1.4 var(--f-body); color: #2a1708;
  background: rgba(255,248,225,.55); border: 1px solid #8a6a2c; border-radius: 3px; box-shadow: inset 0 1px 3px rgba(60,30,0,.25);
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid #a3170f; outline-offset: 1px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; margin: 0; }
.checks legend { margin-bottom: 6px; }
.checks label { display: inline-flex; gap: 6px; align-items: center; padding: 5px 9px; border: 1px solid #a98243; border-radius: 3px; font: 15px/1 var(--f-ui); color: #3b1d00; background: rgba(255,248,225,.35); cursor: pointer; }
.checks input { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin: 0; border: 1px solid #6b4a17; border-radius: 2px; background: rgba(255,248,225,.8); box-shadow: inset 0 1px 2px rgba(60,30,0,.3); display: grid; place-items: center; cursor: pointer; }
.checks input:checked { background: linear-gradient(#c8261c, #6e0d08); border-color: #2b0402; }
.checks input:checked::after { content: "\2713"; color: #ffd100; font: 700 12px/1 var(--f-chat); text-shadow: 0 1px 0 #000; }
.checks input:focus-visible { outline: 2px solid #a3170f; outline-offset: 2px; }
.checks label:has(input:checked) { background: rgba(255,240,200,.75); border-color: #8a120c; }
.dlg-note { margin: 0; font: 13.5px/1.4 var(--f-chat); color: #6b4a22; }
.dlg .close { position: absolute; right: 10px; top: 8px; width: 30px; height: 30px; border: 0; border-radius: 50%; cursor: pointer; background: radial-gradient(circle at 40% 35%, #c8261c, #5a0907); color: #ffd100; font: 16px/1 var(--f-ui); box-shadow: 0 0 0 2px #2b1a05, 0 0 0 3px #c9a24a; }

/* ---------------------------------------------------------- reveal */
/* Only blocks that start below the fold get the rise-in; everything is visible at rest. */
.rv { transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.rv.pre { opacity: 0; transform: translateY(18px); }

/* ---------------------------------------------------------- shell: signed-in user, compact banner */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.whoami { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.whoami a:not(.linklike) { display: grid; line-height: 1.15; color: var(--gold); text-align: right; }
.whoami b { font-weight: 400; }
.whoami small { font: 12px/1.2 var(--f-chat); color: var(--ink-dim); }
.linklike { background: none; border: 0; padding: 0; color: var(--ink-dim); font: 13px/1 var(--f-ui); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linklike:hover { color: var(--gold); }
.title-ribbon { font: 13px/1 var(--f-ui); color: #d6b4ff; letter-spacing: .02em; }

.banner-compact { height: 250px; }
.banner-compact .banner-content { grid-template-columns: auto minmax(0, 1fr); justify-items: start; text-align: left; gap: 22px; padding: 20px 36px 54px; }
.crest-sm { width: 104px; height: 104px; display: block; }
.banner-kicker { font: 13px/1 var(--f-ui); letter-spacing: .3em; text-transform: uppercase; color: var(--gold-hi); text-shadow: 0 2px 4px #000; }
.page-title {
  margin: 8px 0 0; font: 400 clamp(32px, 4.4vw, 54px)/1.05 var(--f-display); text-wrap: balance;
  background: linear-gradient(180deg, #fff6c8 0%, #ffd34a 40%, #e09a14 65%, #8a4f05 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #2a1400) drop-shadow(0 6px 14px rgba(0,0,0,.9));
}
.page-lead { margin: 10px 0 0; max-width: 700px; color: #f3ead6; text-shadow: 0 2px 6px #000, 0 0 2px #000; font-size: 18px; }

/* ---------------------------------------------------------- characters, members */
.char-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.char-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid rgba(201,162,74,.12); }
.char-list li:last-child { border-bottom: 0; }
.char-main { display: grid; gap: 3px; min-width: 0; }
.char-name { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; }
.char-main b { font: 400 18px/1.15 var(--f-ui); }
.char-main small { font: 13.5px/1.35 var(--f-chat); color: var(--ink-dim); }
.char-actions { display: flex; gap: 10px; align-items: center; font: 13px/1 var(--f-ui); white-space: nowrap; }
.char-actions form { margin: 0; }
.pill-main { display: inline-block; margin-left: 6px; padding: 2px 7px; border: 1px solid var(--gold-deep); border-radius: 9px; font: 11px/1.2 var(--f-chat); letter-spacing: .04em; color: var(--gold-hi); vertical-align: 2px; }
.cls-ico.big { width: 44px; height: 44px; font-size: 22px; border-radius: 5px; }
.member-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.member-card { display: grid; gap: 10px; padding: 14px 16px; color: var(--ink); transition: box-shadow .2s, transform .12s; }
.member-card:hover { color: var(--ink); transform: translateY(-2px); box-shadow: 0 0 0 1px #5d4520, 0 0 0 2px #0a0806, 0 0 0 3px var(--c), 0 0 0 4px #000, 0 0 22px color-mix(in srgb, var(--c) 45%, transparent); }
.member-head { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; }
.member-head b { display: block; font: 400 21px/1.1 var(--f-display); color: var(--gold-hi); }
.member-head .title-ribbon { display: block; margin-top: 2px; }
.member-head small { display: block; margin-top: 3px; font: 13px/1.2 var(--f-chat); color: var(--ink-dim); }
.member-char { font: 15px/1.35 var(--f-chat); }
.member-char b { font: 400 17px/1.2 var(--f-ui); }
.member-char small { color: var(--ink-dim); }
.member-prof { font: 13px/1.3 var(--f-chat); color: var(--ink-dim); }
.filters .cls-dot { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; background: var(--c, var(--brass)); box-shadow: 0 0 6px var(--c, transparent); vertical-align: 1px; }
.form-page .row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field select option[hidden] { display: none; }

/* ---------------------------------------------------------- page layouts */
.page-grid { display: grid; gap: 22px; margin-top: 30px; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.narrow { width: min(880px, 100% - 32px); margin-top: 30px; }
main.wrap:not(.portal):not(.page-grid):not(.narrow) { margin-top: 30px; }
.toolbar { display: flex; justify-content: flex-end; margin-bottom: 14px; }

/* parchment: long texts, forms, the chronicle book */
.parchment {
  position: relative; color: #2a1708; padding: 26px 30px 28px; margin: 4px;
  background: var(--paper);
  background-size: auto, cover, auto;
  border: 1px solid #000;
  box-shadow: 0 0 0 1px #5d4520, 0 0 0 2px #0a0806, 0 0 0 3px #a7823a, 0 0 0 4px #000, inset 0 0 90px rgba(110,64,16,.36), inset 0 0 16px rgba(80,45,10,.35), 0 16px 34px rgba(0,0,0,.6);
}
.parchment a { color: #8a120c; text-decoration: underline; text-underline-offset: 3px; }
.parchment a.btn { color: var(--gold); text-decoration: none; }
.prose { font-size: 17.5px; max-width: 68ch; }
.prose h2 { margin: 1.3em 0 .4em; font: 400 26px/1.15 var(--f-display); color: #3b1d00; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.1em 0 .3em; font: 400 21px/1.2 var(--f-display); color: #3b1d00; }
.prose p { margin: 0 0 .8em; }
.prose ul, .prose ol { margin: 0 0 .9em; padding-left: 1.3em; }
.prose li { margin: .25em 0; }
.prose li::marker { color: #8a5a12; }
.prose blockquote { margin: 0 0 .9em; padding: 4px 0 4px 16px; border-left: 3px solid #a98243; font-style: italic; color: #4a2c0a; }
.prose blockquote p:last-child { margin-bottom: 0; }
.editor-grid { display: grid; gap: 22px; margin-top: 30px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.preview-card { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.muted-paper { margin: 0 0 12px; font: 13px/1 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: #7a4a10; }
.parchment-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(90,50,10,.3); }
.parchment-foot small { font: 14px/1.4 var(--f-chat); color: #5b3c18; }
.updated, .back { font: 14px/1.4 var(--f-chat); color: #6b4a22; margin: 14px 0 0; }
.back a { color: var(--gold); }
.notice { margin: 0 0 14px; padding: 10px 12px; background: rgba(138,18,12,.12); border-left: 3px solid #8a120c; font: 15px/1.4 var(--f-chat); color: #4a0a05; }

/* filter chips */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; }
.filters a:not(.btn) { padding: 7px 12px; border: 1px solid #5d4520; border-radius: 3px; background: rgba(15,12,10,.85); font: 14px/1 var(--f-ui); color: var(--ink-dim); }
.filters a:not(.btn):hover { color: var(--gold); border-color: var(--brass); }
.filters a[aria-current="true"] { color: var(--gold); border-color: var(--gold-mid); box-shadow: inset 0 0 12px rgba(255,200,60,.18); }
.spacer { flex: 1; }
.month-h { margin: 26px 0 12px; font: 400 26px/1.1 var(--f-display); color: var(--gold); text-shadow: 0 2px 0 #000; display: flex; align-items: center; gap: 14px; }
.month-h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(201,162,74,.5), transparent); }

/* events */
.event-list { display: grid; gap: 14px; }
.event-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 14px; color: var(--ink); transition: box-shadow .2s, transform .12s; }
.event-row:hover { color: var(--ink); transform: translateY(-1px); box-shadow: 0 0 0 1px #5d4520, 0 0 0 2px #0a0806, 0 0 0 3px #e2b85a, 0 0 0 4px #000, 0 0 22px rgba(255,200,80,.25); }
.event-row .cal { display: block; }
.event-main { display: grid; gap: 4px; min-width: 0; }
.event-title { font: 400 22px/1.15 var(--f-display); color: var(--gold-hi); }
.event-side { display: grid; justify-items: end; gap: 6px; text-align: right; }
.event-row .meta, .content-card .meta, .chron-card .meta { font: 14px/1.4 var(--f-chat); color: var(--ink-dim); }
.is-cancelled { opacity: .55; }
.is-cancelled .event-title { text-decoration: line-through; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 18px; font-size: 17px; }
.facts dt { font: 15px/1.5 var(--f-ui); color: #7a4a10; }
.facts dd { margin: 0; }
.rsvp-state { margin: 0 0 12px; padding: 8px 10px; border-radius: 3px; font: 15px/1.2 var(--f-ui); text-align: center; background: rgba(255,255,255,.04); border: 1px solid #3a2c16; }
.state-zugesagt { color: #6dff5a; border-color: #2c6b1f; }
.state-vielleicht { color: var(--gold); }
.state-warteliste { color: #8fd3ff; border-color: #24577a; }
.state-abgesagt { color: #ff8a7a; }
.dot-yes { background: #3cff3c; }
.dot-maybe { background: #ffd100; }
.mini-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.mini-list li { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid rgba(201,162,74,.12); }
.mini-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.mini-list a { color: var(--ink); font: 16px/1.3 var(--f-body); }
.mini-list a b { color: var(--gold); font: 14px/1 var(--f-ui); margin-right: 6px; }
.mini-list li > b { color: var(--gold); font: 400 16px/1.2 var(--f-ui); }
.mini-list li > span { color: var(--ink-dim); font: 14px/1.3 var(--f-chat); }
.game-cal { margin-top: 28px; }
.recruit .races { display: block; margin-top: 2px; font: 12px/1.2 var(--f-chat); color: var(--ink-dim); }
.mini-list small { font: 13px/1.3 var(--f-chat); color: var(--ink-dim); }

/* forms inside dark panels and on parchment */
.stack-form { display: grid; gap: 12px; }
.inline-form { grid-template-columns: minmax(0, 1fr) 120px auto; align-items: end; margin-top: 14px; }
.panel .field label, .panel .field legend { font: 14px/1.2 var(--f-ui); color: var(--gold-hi); }
.panel input[type=text], .panel input[type=date], .panel select, .panel textarea {
  width: 100%; padding: 8px 10px; font: 15px/1.3 var(--f-chat); color: var(--ink);
  background: #0a0806; border: 1px solid #5d4520; border-radius: 3px; box-shadow: inset 0 1px 3px rgba(0,0,0,.6);
}
.panel input:focus, .panel select:focus, .panel textarea:focus { outline: 2px solid var(--gold-mid); outline-offset: 1px; }
.panel fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.check { display: flex; gap: 8px; align-items: flex-start; font: 15px/1.35 var(--f-chat); cursor: pointer; }
.check input { margin-top: 3px; accent-color: #b8261c; }
.panel .check { color: var(--ink); }
.btn-row.three { grid-template-columns: 1fr 1fr 1fr; }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: grayscale(.6); }
.form-page { display: grid; gap: 16px; }
.form-page .field input[type=text], .form-page .field input[type=date], .form-page .field input[type=number], .form-page .field input[type=file], .form-page .field select, .form-page .field textarea {
  width: 100%; padding: 9px 10px; font: 16px/1.4 var(--f-body); color: #2a1708;
  background: rgba(255,248,225,.6); border: 1px solid #8a6a2c; border-radius: 3px; box-shadow: inset 0 1px 3px rgba(60,30,0,.25);
}
.form-page ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.form-page ul label { display: inline-flex; gap: 6px; align-items: center; padding: 5px 9px; border: 1px solid #a98243; border-radius: 3px; font: 15px/1 var(--f-ui); color: #3b1d00; background: rgba(255,248,225,.35); cursor: pointer; }
.form-page .check { color: #2a1708; }
.help { font: 13.5px/1.4 var(--f-chat); color: #6b4a22; }
.panel .help { color: var(--ink-dim); }
.error { font: 14px/1.3 var(--f-chat); color: #a3170f; font-weight: 700; }
.panel .error { color: #ff8a7a; }
.has-error input, .has-error textarea, .has-error select { border-color: #a3170f !important; }
.quest-form { padding: 0 22px 20px; display: grid; gap: 14px; }
.quest-form textarea, .quest-form input[type=text] {
  width: 100%; padding: 9px 10px; font: 16px/1.4 var(--f-body); color: #2a1708;
  background: rgba(255,248,225,.55); border: 1px solid #8a6a2c; border-radius: 3px;
}
.quest-form .checks label a { color: #8a120c; }
.quest-body.single { grid-template-columns: minmax(0, 1fr); }
.question { padding: 10px 12px; background: rgba(0,80,160,.08); border-left: 3px solid #0a4fa3; }
.excl.done { color: #ffd100; }

/* empty states */
.empty, .empty-panel .panel-b { padding: 22px 20px; display: grid; gap: 12px; justify-items: start; color: var(--ink-dim); }
.empty p, .empty-panel p { margin: 0; }
.empty-book { text-align: center; }
.empty-book h2 { margin: 0 0 8px; font: 400 28px/1.1 var(--f-display); color: #3b1d00; }
.stat b { color: var(--gold); font: 400 20px/1 var(--f-ui); }

/* achievement hall */
.ach-list { display: grid; gap: 12px; }
.ach-card { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 16px; }
.ach-card.is-got { background: linear-gradient(90deg, rgba(60,45,15,.95), rgba(14,12,10,.96) 60%); }
.ach-card.is-locked .ach { filter: grayscale(1) brightness(.5); }
.ach-lg { width: 64px; height: 64px; aspect-ratio: auto; }
.ach-body h3 { margin: 0 0 4px; font: 400 22px/1.15 var(--f-display); }
.ach-body p { margin: 0 0 4px; font: 15px/1.4 var(--f-chat); }
.ach-body .flavor { color: var(--gold); }
.ach-body .cond { color: var(--ink-dim); }
.ach-body .cond b { color: var(--q-uncommon); font-weight: 400; }
.ach-body .reward-line { color: var(--ink-dim); }
.ach-body .reward-line b { color: #fff; font-weight: 400; }
.ach-side { display: grid; justify-items: end; gap: 4px; text-align: right; min-width: 110px; }
.ach-side .got { font: 15px/1 var(--f-ui); color: var(--gold); }
.ach-side .todo { font: 15px/1 var(--f-ui); color: var(--ink-dim); }
.ach-side small { font: 12.5px/1.2 var(--f-chat); color: var(--ink-dim); }
.ach-grid.wide { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); }
.recent.flush { margin: 0; padding: 0; border: 0; }

/* chronicle */
.chronicle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.chron-card { display: grid; color: var(--ink); overflow: hidden; transition: transform .12s, box-shadow .2s; }
.chron-card:hover { color: var(--ink); transform: translateY(-2px); }
.chron-img { display: block; aspect-ratio: 16 / 9; max-width: 100%; background: url(img/scenes/waldweg.jpg) center / cover; border-bottom: 1px solid #000; box-shadow: inset 0 0 30px rgba(0,0,0,.6); }
.chron-txt { display: grid; gap: 6px; padding: 14px 16px 16px; }
.chron-title { font: 400 22px/1.15 var(--f-display); color: var(--gold-hi); }
.feature-img { display: block; }
.feature-txt h3 a { color: inherit; }
a.entry { color: var(--ink); }
.book .book-img { margin: 0 0 20px; }
.book .book-img img { width: 100%; border: 1px solid #000; box-shadow: 0 0 0 1px #8a6a2c, 0 8px 20px rgba(60,30,0,.35); }
.book figcaption { font: 14px/1.4 var(--f-chat); color: #6b4a22; margin-top: 6px; }
.book .prose > p:first-child::first-letter { float: left; font: 400 64px/.8 var(--f-display); color: #8a120c; margin: 6px 8px 0 0; }

/* board */
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; margin-bottom: 26px; }
.note {
  position: relative; padding: 24px 18px 16px; color: #2a1708; transform: rotate(var(--tilt, -.6deg));
  background: var(--paper-grain), var(--paper-stain), linear-gradient(170deg, #f6e9c6, #e8d39f 70%, #d6b77c);
  background-size: auto, cover, auto;
  box-shadow: 0 1px 0 rgba(255,255,255,.3) inset, 0 12px 22px rgba(0,0,0,.55);
}
.note:nth-child(3n+2) { --tilt: .8deg; }
.note:nth-child(3n) { --tilt: -1.2deg; }
.note .pin { position: absolute; top: 8px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff8a7a, #a3170f 60%, #4a0605); box-shadow: 0 2px 3px rgba(0,0,0,.6); }
.note .eyebrow { color: #7a4a10; }
.note h3 { margin: 6px 0 6px; font: 400 22px/1.15 var(--f-display); color: #3b1d00; }
.note p { margin: 0 0 8px; font-size: 16px; }
.note .note-meta { font: 13.5px/1.4 var(--f-chat); color: #6b4a22; }
.note-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.cat-handwerk .pin { background: radial-gradient(circle at 35% 30%, #9fd0ff, #0a4fa3 60%, #04223f); }
.cat-mitspieler .pin { background: radial-gradient(circle at 35% 30%, #b8ff9a, #1e8a00 60%, #0a3300); }
.done-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; color: var(--ink-dim); font: 15px/1.4 var(--f-chat); }
.done-list b { color: var(--ink); font-weight: 400; text-decoration: line-through; text-decoration-color: rgba(255,255,255,.3); }

/* contents */
.content-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.content-card { display: grid; gap: 8px; padding: 18px; color: var(--ink); }
.content-card:hover { color: var(--ink); }

/* ---------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .portal { grid-template-columns: minmax(0, 1fr) 300px; }
  .col-left { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); order: 3; }
}
@media (max-width: 900px) {
  .portal { grid-template-columns: minmax(0, 1fr); }
  .col-left { grid-template-columns: minmax(0, 1fr); }
  .quest-body, .feature, .entries { grid-template-columns: minmax(0, 1fr); }
  .entry + .entry { border-left: 0; border-top: 1px solid rgba(201,162,74,.18); }
  .feature-img { min-height: 220px; border-right: 0; border-bottom: 1px solid #000; }
  .countdown .lbl { display: none; }
  .page-grid { grid-template-columns: minmax(0, 1fr); }
  .event-row { grid-template-columns: 56px minmax(0, 1fr); }
  .event-side { grid-column: 2; justify-items: start; text-align: left; }
  .ach-card { grid-template-columns: 64px minmax(0, 1fr); }
  .ach-side { grid-column: 2; justify-items: start; text-align: left; }
  .whoami small { display: none; }
  .realm .r-txt { display: none; }
}
@media (max-width: 1080px) {
  .editor-grid { grid-template-columns: minmax(0, 1fr); }
  .preview-card { position: static; max-height: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .banner { height: 520px; }
  .crest { width: 110px; height: 110px; }
  .guild-tag { letter-spacing: .2em; font-size: 12px; }
  .guild-tag::before, .guild-tag::after { width: 26px; }
  .banner-lead { font-size: 16.5px; }
  .actionbar { width: 100%; margin-top: -26px; mask-image: linear-gradient(90deg, #000 82%, transparent); }
  .actionbar.at-end { mask-image: none; }
  .slot { width: 74px; }
  .slot .ico { width: 50px; height: 50px; }
  .slot .key { right: 14px; }
  .quest-top { grid-template-columns: 64px 1fr; padding: 16px 16px 8px; }
  .quest-giver { width: 64px; height: 64px; }
  .quest h2 { font-size: 27px; }
  .quest-body, .quest-foot { padding-inline: 16px; }
  .rewards { grid-template-columns: 1fr; }
  .countdown .cd span { min-width: 28px; font-size: 13px; }
  .discord-btn span { display: none; }
  .banner-compact { height: auto; min-height: 220px; }
  .banner-compact .banner-content { grid-template-columns: minmax(0, 1fr); padding: 22px 18px 48px; gap: 10px; }
  .crest-sm { width: 72px; height: 72px; }
  .parchment { padding: 20px 18px 22px; }
  .inline-form { grid-template-columns: minmax(0, 1fr); }
  .form-page .row2 { grid-template-columns: minmax(0, 1fr); }
  .char-list li { grid-template-columns: 28px minmax(0, 1fr); }
  .char-actions { grid-column: 2; }
  .btn-row.three { grid-template-columns: 1fr; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .facts dd { margin-bottom: 8px; }
  .whoami a:not(.linklike) { display: none; }
  .whoami { gap: 8px; }
  .whoami .linklike { font-size: 12.5px; }
  .topbar .wrap { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .rv.pre { opacity: 1; transform: none; }
}
