/* Thrall Me Daddy guild site. Palette comes from the guild crest: oxblood, crimson, gold, bone, steel. */

:root {
  --ink: #0d0406;
  --oxblood: #1a070b;
  --oxblood-2: #24090f;
  --panel: #1c0a0e;
  --crimson: #b3151c;
  --crimson-hi: #d8262b;
  --crimson-lo: #6d0a10;
  --gold: #e3b54a;
  --gold-hi: #f7dc8c;
  --gold-lo: #8f6216;
  --bone: #efe3c8;
  --text: #e9dcc3;
  --muted: #a8977b;
  --steel: #9aa3ad;
  --line: rgba(227, 181, 74, 0.28);
  --line-soft: rgba(227, 181, 74, 0.12);
  --good: #6fd36f;
  --bad: #ff6b5e;

  --warrior: #c69b6d; --paladin: #f48cba; --hunter: #aad372; --rogue: #fff468; --priest: #ffffff;
  --shaman: #2f8cff; --mage: #3fc7eb; --warlock: #8788ee; --druid: #ff7c0a;

  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --body: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --cut: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-hi); }
a:hover { color: #fff; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: 0.04em; margin: 0; text-wrap: balance; }

:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }

/* ---------- Backdrop: forge glow, vignette, grain, rising embers ---------- */

.backdrop {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1200px 520px at 50% -120px, rgba(216, 38, 43, 0.42), transparent 70%),
    radial-gradient(900px 600px at 50% 115%, rgba(227, 126, 30, 0.22), transparent 70%),
    radial-gradient(circle at 50% 40%, var(--oxblood-2), var(--ink) 75%);
}
.backdrop::after {
  content: ""; position: absolute; inset: 0; opacity: 0.22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.9'/%3E%3C/svg%3E");
}

.embers { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ember {
  position: absolute; bottom: -12px; width: 4px; height: 4px; border-radius: 50%;
  background: #ffb347; box-shadow: 0 0 8px 2px rgba(255, 120, 40, 0.75);
  animation: rise linear infinite;
}
@keyframes rise {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0; }
  10% { opacity: 0.9; }
  100% { transform: translate3d(var(--drift, 30px), -105vh, 0) scale(0.2); opacity: 0; }
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  padding: 10px clamp(14px, 3vw, 36px);
  background: linear-gradient(180deg, rgba(13, 4, 6, 0.97), rgba(26, 7, 11, 0.9));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8), 0 10px 30px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-lo) 15%, var(--gold-hi) 50%, var(--gold-lo) 85%, transparent);
  opacity: 0.7;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.brand img { filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8)); transition: transform 0.25s; }
.brand:hover img { transform: rotate(-6deg) scale(1.06); }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name {
  font-family: var(--display); font-weight: 900; font-size: 1.25rem; letter-spacing: 0.06em;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand__sub { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  position: relative; padding: 10px 14px; white-space: nowrap;
  font-family: var(--display); font-size: 0.86rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; transition: color 0.2s;
}
.nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-hi), transparent);
  transform: scaleX(0); transition: transform 0.25s;
}
.nav a:hover { color: var(--bone); }
.nav a.is-active { color: var(--gold-hi); text-shadow: 0 0 14px rgba(247, 220, 140, 0.45); }
.nav a.is-active::after, .nav a:hover::after { transform: scaleX(1); }

.account { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.account__name { font-weight: 700; color: var(--gold-hi); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.chip { text-decoration: none; display: inline-block; }
button.btn { font-family: var(--display); }

/* ---------- Buttons: gold-rimmed, cut corners, crimson face ---------- */

.btn {
  --face-hi: var(--crimson-hi); --face: var(--crimson); --face-lo: var(--crimson-lo);
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: 2px; border: 0; cursor: pointer; text-decoration: none; flex-shrink: 0;
  font-family: var(--display); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold-hi);
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 45%, var(--gold-lo));
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
  transition: transform 0.15s, filter 0.2s;
}
.btn > span {
  display: inline-flex; align-items: center; gap: 10px; width: 100%; justify-content: center;
  padding: 12px 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 42%),
    linear-gradient(180deg, var(--face-hi), var(--face) 45%, var(--face-lo));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.55), inset 0 -8px 14px rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.85);
  clip-path: polygon(calc(var(--cut) - 1px) 0, calc(100% - var(--cut) + 1px) 0, 100% calc(var(--cut) - 1px), 100% calc(100% - var(--cut) + 1px), calc(100% - var(--cut) + 1px) 100%, calc(var(--cut) - 1px) 100%, 0 calc(100% - var(--cut) + 1px), 0 calc(var(--cut) - 1px));
  transition: filter 0.2s;
}
.btn:hover { color: #fff; transform: translateY(-2px); filter: drop-shadow(0 6px 16px rgba(216, 38, 43, 0.55)); }
.btn:hover > span { filter: brightness(1.18); }
.btn:active { transform: translateY(1px); }
.btn:active > span { filter: brightness(0.85); }
.btn--small { --cut: 7px; font-size: 0.78rem; }
.btn--small > span { padding: 8px 16px; }
.btn--ghost { --face-hi: #3a1218; --face: #260b10; --face-lo: #170609; color: var(--bone); }
.btn--ghost:hover { filter: drop-shadow(0 6px 16px rgba(227, 181, 74, 0.35)); }

/* Filter chips: the small version of the same shape */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  --cut: 6px;
  padding: 6px 14px; border: 1px solid var(--line); cursor: pointer;
  font-family: var(--body); font-weight: 700; font-size: 0.86rem; letter-spacing: 0.04em;
  color: var(--muted); background: rgba(0, 0, 0, 0.35);
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
  transition: color 0.15s, background 0.15s;
}
.chip:hover { color: var(--bone); background: rgba(179, 21, 28, 0.3); }
.chip.is-on { color: #1a0a05; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); border-color: transparent; }

/* ---------- Layout ---------- */

.view { max-width: 1180px; margin: 0 auto; padding: clamp(20px, 4vw, 44px) clamp(14px, 3vw, 28px) 60px; outline: none; }
.loading { text-align: center; color: var(--muted); font-style: italic; padding: 80px 0; }

.page-head { text-align: center; margin-bottom: 28px; }
.page-head h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.8rem); font-weight: 900;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.8));
}
.page-head p { color: var(--muted); max-width: 62ch; margin: 8px auto 0; }

/* Ornament: line, diamond, line */
.rule { display: flex; align-items: center; gap: 12px; margin: 14px auto 0; max-width: 340px; color: var(--gold); }
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.rule::after { transform: scaleX(-1); }
.rule i { width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 10px var(--gold); }

.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stack > * + * { margin-top: 20px; }

/* ---------- Panels: dark plate with gold corner brackets ---------- */

.panel {
  position: relative; padding: 22px 22px 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 30%),
    linear-gradient(160deg, #230b11, var(--panel) 55%, #120508);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.7), inset 0 0 40px rgba(0, 0, 0, 0.5), 0 12px 30px rgba(0, 0, 0, 0.45);
}
.panel::before, .panel::after {
  content: ""; position: absolute; width: 22px; height: 22px; pointer-events: none;
  border: 2px solid var(--gold); filter: drop-shadow(0 0 4px rgba(227, 181, 74, 0.5));
}
.panel::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.panel::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }
.panel > h2 {
  font-size: 1.05rem; color: var(--gold-hi); text-transform: uppercase; letter-spacing: 0.14em;
  padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.panel > h2 small { font-family: var(--body); font-weight: 400; font-size: 0.82rem; letter-spacing: 0.02em; text-transform: none; color: var(--muted); }
.panel p { margin: 0 0 10px; }
.panel p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }
.note { font-size: 0.9rem; color: var(--muted); font-style: italic; }

/* ---------- Home ---------- */

.hero { text-align: center; padding: clamp(10px, 3vw, 30px) 0 34px; }
.hero__crest {
  width: clamp(170px, 30vw, 260px); height: auto;
  filter: drop-shadow(0 0 40px rgba(216, 38, 43, 0.55)) drop-shadow(0 16px 26px rgba(0, 0, 0, 0.8));
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-8px); } }
.hero h1 {
  font-size: clamp(2.3rem, 8vw, 4.6rem); font-weight: 900; line-height: 1.05; margin-top: 10px;
  background: linear-gradient(180deg, #fff3c4, var(--gold) 50%, var(--gold-lo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #2a0a05) drop-shadow(0 0 30px rgba(216, 38, 43, 0.5));
}
.hero__tag { font-size: clamp(1.02rem, 2.2vw, 1.25rem); color: var(--bone); max-width: 56ch; margin: 14px auto 0; }
.hero__motto {
  margin: 10px auto 0; font-family: var(--display); font-weight: 900; font-style: italic;
  font-size: clamp(1.05rem, 2.6vw, 1.5rem); letter-spacing: 0.3em; text-transform: uppercase;
  background: linear-gradient(180deg, #ff8a6a, var(--crimson-hi) 55%, var(--crimson-lo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #1a0505) drop-shadow(0 0 22px rgba(216, 38, 43, 0.75));
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 26px; }

.stat { text-align: center; padding: 18px 10px 14px; }
.stat b {
  display: block; font-family: var(--display); font-weight: 900; font-size: 2.1rem; line-height: 1.1;
  color: var(--gold-hi); text-shadow: 0 0 18px rgba(227, 181, 74, 0.35);
  font-variant-numeric: tabular-nums;
}
/* Long values (a zone name) shrink and wrap instead of spilling out of the tile on a phone. */
.stat b { font-size: clamp(1.25rem, 5.6vw, 2.1rem); overflow-wrap: anywhere; }
.stat span { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

.bars { display: grid; gap: 9px; }
:root { --rep1: #a02c22; --rep2: #b8452a; --rep3: #c2742e; --rep4: #b9a14a; --rep5: #5fa341; --rep6: #3f9c6e; --rep7: #3c8fb0; --rep8: #8f62c9; }
.bars--rep .bar { grid-template-columns: 1fr 90px 84px; font-size: 0.9rem; }
.bars--rep .bar__num { font-weight: 400; font-size: 0.85rem; }
.spark { display: block; width: 100%; height: 70px; }
.spark polyline { fill: none; stroke: var(--gold); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spark__ends { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
.bar { display: grid; grid-template-columns: 150px 1fr 34px; align-items: center; gap: 12px; font-size: 0.95rem; }
.bar__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.bar__track { height: 14px; background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(0, 0, 0, 0.9); box-shadow: inset 0 1px 4px #000, 0 0 0 1px var(--line-soft); }
.bar__fill {
  display: block; height: 100%; width: var(--w); background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 50%), var(--c, var(--gold));
  box-shadow: 0 0 10px color-mix(in srgb, var(--c, var(--gold)) 60%, transparent);
  transform-origin: left; animation: grow 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes grow { from { transform: scaleX(0); } }
.bar__num { text-align: right; font-variant-numeric: tabular-nums; color: var(--bone); font-weight: 700; }

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: start; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 34px; height: 34px;
  font-family: var(--display); font-weight: 900; color: #1a0a05;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo));
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

/* ---------- Tables ---------- */

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.search {
  flex: 1 1 220px; min-width: 0; padding: 10px 14px;
  font: inherit; color: var(--bone); background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--line); box-shadow: inset 0 2px 6px #000;
}
.search::placeholder { color: var(--muted); }
.search:focus { outline: none; border-color: var(--gold-hi); box-shadow: inset 0 2px 6px #000, 0 0 0 3px rgba(227, 181, 74, 0.18); }

.field { display: inline-flex; align-items: center; gap: 8px; font-size: 0.86rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.field select, .field input {
  font: inherit; letter-spacing: 0; text-transform: none; color: var(--bone); background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--line); padding: 9px 10px; box-shadow: inset 0 2px 6px #000;
}
.field input { width: 76px; }
.field select:focus, .field input:focus { outline: none; border-color: var(--gold-hi); box-shadow: inset 0 2px 6px #000, 0 0 0 3px rgba(227, 181, 74, 0.18); }
.field option { background: #1a070b; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
th {
  text-align: left; padding: 10px 12px; white-space: nowrap;
  font-family: var(--display); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, 0.35);
}
th button { all: unset; cursor: pointer; }
th button:hover { color: var(--gold-hi); }
th button:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
th[aria-sort="ascending"] button::after { content: " \25B2"; font-size: 0.7em; }
th[aria-sort="descending"] button::after { content: " \25BC"; font-size: 0.7em; }
td { padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); vertical-align: middle; }
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: linear-gradient(90deg, rgba(179, 21, 28, 0.22), transparent 80%); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
th.num { text-align: right; }
.empty { text-align: center; color: var(--muted); padding: 30px 0; font-style: italic; }

.who { font-weight: 700; white-space: nowrap; }
.c-warrior { color: var(--warrior); } .c-paladin { color: var(--paladin); } .c-hunter { color: var(--hunter); }
.c-rogue { color: var(--rogue); } .c-priest { color: var(--priest); } .c-shaman { color: var(--shaman); }
.c-mage { color: var(--mage); } .c-warlock { color: var(--warlock); } .c-druid { color: var(--druid); }

.lvl {
  display: inline-grid; place-items: center; width: 34px; height: 30px;
  font-family: var(--display); font-weight: 700; font-size: 0.9rem; color: var(--gold-hi);
  background: linear-gradient(180deg, #3a1218, #170609);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: #5b5148; }
.dot--on { background: var(--good); box-shadow: 0 0 8px var(--good); }
.tag {
  display: inline-block; padding: 1px 9px; margin: 2px 4px 2px 0; font-size: 0.86rem; white-space: nowrap;
  color: var(--bone); background: rgba(227, 181, 74, 0.1); border: 1px solid var(--line-soft);
}
.tag b { color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.rank { font-size: 0.86rem; color: var(--muted); letter-spacing: 0.04em; }
.rank--lead { color: var(--gold-hi); }

.icon { width: 20px; height: 20px; margin-right: 7px; vertical-align: -4px; border: 1px solid rgba(0, 0, 0, 0.8); box-shadow: 0 0 0 1px var(--line-soft); }

/* Item quality, as in game */
.q0 { color: #9d9d9d; } .q1 { color: #ffffff; } .q2 { color: #1eff00; } .q3 { color: #4a9eff; } .q4 { color: #c56bff; } .q5 { color: #ff8000; }

a.who { text-decoration: none; }
a.who:hover { text-decoration: underline; filter: brightness(1.25); }
a.panel.stat { display: block; text-decoration: none; transition: transform 0.2s, border-color 0.2s; }
a.panel.stat:hover { transform: translateY(-3px); border-color: var(--gold); }
.stat b .coin { font-size: 1.5rem; color: var(--gold-hi); }

/* A member's name as the page title, in their class colour instead of gold */
.page-head h1.plain { background: none; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.8)); }
.page-head h1.plain.c-warrior { color: var(--warrior); } .page-head h1.plain.c-paladin { color: var(--paladin); }
.page-head h1.plain.c-hunter { color: var(--hunter); } .page-head h1.plain.c-rogue { color: var(--rogue); }
.page-head h1.plain.c-priest { color: var(--priest); } .page-head h1.plain.c-shaman { color: var(--shaman); }
.page-head h1.plain.c-mage { color: var(--mage); } .page-head h1.plain.c-warlock { color: var(--warlock); }
.page-head h1.plain.c-druid { color: var(--druid); }

/* Money */
.coin { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.coin i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 5px 0 2px; box-shadow: inset 0 -2px 2px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.6); }
.coin .g { background: #f2c230; } .coin .s { background: #c9ced6; } .coin .c { background: #c97a3d; }
.up { color: var(--bad); } .down { color: var(--good); } .flat { color: var(--muted); }
.profit { color: var(--good); } .loss { color: var(--bad); }

/* ---------- Crafters ---------- */

.craft-card h2 { margin-bottom: 10px; }
.craft-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.craft-list li { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.craft-card--empty { border-style: dashed; opacity: 0.8; }
.craft-card--empty h2 { color: var(--muted); }

/* ---------- Dungeons ---------- */

.dungeon {
  display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
a.dungeon:hover { transform: translateY(-4px); border-color: var(--gold); color: inherit; box-shadow: inset 0 0 40px rgba(179, 21, 28, 0.25), 0 18px 34px rgba(0, 0, 0, 0.6); }
.dungeon h2 { border: 0; padding: 0; margin: 0; font-size: 1.15rem; text-transform: none; letter-spacing: 0.04em; }
.dungeon__lvl {
  align-self: flex-start; padding: 2px 12px; font-family: var(--display); font-weight: 700; font-size: 0.84rem; letter-spacing: 0.08em;
  color: #1a0a05; background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 6px 100%, 0 50%);
}
.dungeon__zone { color: var(--muted); font-size: 0.92rem; }
.bosses { list-style: none; margin: 0; padding: 0; counter-reset: boss; display: grid; gap: 6px; }
.bosses li { counter-increment: boss; padding-left: 34px; position: relative; }
.bosses li::before {
  content: counter(boss); position: absolute; left: 0; top: 2px; width: 24px; height: 22px; display: grid; place-items: center;
  font-family: var(--display); font-size: 0.74rem; font-weight: 700; color: var(--gold-hi);
  background: var(--crimson-lo); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.bosses .final { color: var(--gold-hi); font-weight: 700; }
.tips { margin: 0; padding-left: 20px; }
.tips li { margin-bottom: 6px; }
.tips li::marker { color: var(--gold); }
.back { display: inline-block; margin-bottom: 16px; font-family: var(--display); font-size: 0.84rem; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; }

/* Guild goals */
.goal__track { position: relative; height: 26px; background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(0, 0, 0, 0.9); box-shadow: inset 0 1px 5px #000, 0 0 0 1px var(--line); }
.goal__fill {
  height: 100%; width: var(--w); transform-origin: left; animation: grow 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 50%), linear-gradient(90deg, var(--gold-lo), var(--gold) 60%, var(--gold-hi));
  box-shadow: 0 0 14px rgba(227, 181, 74, 0.55);
}
.goal__pct { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 0.9rem; color: #fff; text-shadow: 0 1px 2px #000, 0 0 6px #000; }
.donors { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.donor { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; text-decoration: none; color: var(--bone); background: rgba(227, 181, 74, 0.08); border: 1px solid var(--line-soft); }
.donor:hover { border-color: var(--gold); color: var(--bone); }
summary { cursor: pointer; }

/* Craft request picker */
.step { margin: 18px 0 10px; font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.pick {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; text-align: left;
  font: inherit; color: var(--bone); background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line-soft); transition: background 0.15s, border-color 0.15s;
}
.pick:hover { background: rgba(179, 21, 28, 0.25); border-color: var(--line); }
.pick.is-on { border-color: var(--gold-hi); background: rgba(227, 181, 74, 0.14); }
.pick__name { font-weight: 700; }
.pick__who { font-size: 0.82rem; white-space: nowrap; }
.pickinfo { margin: 0 0 12px; padding: 12px 14px; background: rgba(0, 0, 0, 0.3); border-left: 3px solid var(--gold); }
.pickinfo p { margin: 0 0 6px; }

/* Tips on a member's page: label on the left, suggestions on the right */
.tiplist { display: grid; grid-template-columns: minmax(150px, max-content) 1fr; gap: 10px 22px; margin: 0; }
.tiplist dt { font-family: var(--display); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); padding-top: 3px; }
.tiplist dd { margin: 0; }
@media (max-width: 640px) { .tiplist { grid-template-columns: 1fr; gap: 2px; } .tiplist dd { margin-bottom: 10px; } }

/* Dungeon quests: one row per quest, a chip per member */
.quests { display: grid; gap: 12px; }
.quest { padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.quest:last-child { border-bottom: 0; padding-bottom: 0; }
.quest__name { font-weight: 700; }
.quest__text { margin: 4px 0 0; font-size: 0.9rem; color: var(--muted); }
.quest__who { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.qs {
  display: inline-block; padding: 1px 9px; font-family: var(--body); font-size: 0.84rem; font-weight: 700;
  letter-spacing: 0; text-transform: none; text-decoration: none; border: 1px solid transparent; white-space: nowrap;
}
.qs--done { color: #0f2a0f; background: var(--good); }
.qs--ready { color: #1a0a05; background: var(--gold); }
.qs--has { color: var(--bone); background: rgba(255, 255, 255, 0.1); border-color: var(--line); }
.qs--missing { color: var(--bad); border-color: rgba(255, 107, 94, 0.55); }
a.qs:hover { filter: brightness(1.2); }

/* ---------- Addons ---------- */

.addon { display: flex; flex-direction: column; gap: 10px; }
.addon h2 { margin-bottom: 0; }
.addon .btn { align-self: flex-start; margin-top: auto; }
.badge { font-family: var(--body); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 9px; }
.badge--must { color: #1a0a05; background: var(--gold); }
.badge--nice { color: var(--bone); background: var(--crimson-lo); }
.badge--opt { color: var(--muted); border: 1px solid var(--line); }
code { font-family: Consolas, "Courier New", monospace; font-size: 0.9em; padding: 1px 6px; color: var(--gold-hi); background: rgba(0, 0, 0, 0.5); border: 1px solid var(--line-soft); overflow-wrap: anywhere; }

/* ---------- Footer ---------- */

.footer { text-align: center; padding: 30px 16px 40px; color: var(--muted); border-top: 1px solid var(--line-soft); background: rgba(0, 0, 0, 0.35); }
.footer p { margin: 0; font-family: var(--display); letter-spacing: 0.08em; }
.footer .footer__fine { margin-top: 8px; font-family: var(--body); font-size: 0.8rem; letter-spacing: 0; opacity: 0.75; }

/* ---------- Small screens ---------- */

/* ---------- 3D view on the member page ---------- */
.model3d-stage {
  position: relative; height: min(520px, 62vh); min-height: 300px;
  background: radial-gradient(ellipse at 50% 85%, rgba(227, 181, 74, 0.10), transparent 60%), #0d0406;
  border: 1px solid var(--line-soft);
}
.model3d-stage canvas { position: absolute; inset: 0; }
.model3d-note { position: absolute; left: 0; right: 0; bottom: 8px; margin: 0; text-align: center; font-size: 0.85rem; pointer-events: none; }
.model3d-stage:not(.is-ready) .model3d-note { bottom: auto; top: 46%; }
@media (max-width: 560px) { .model3d-stage { height: min(420px, 58vh); } }

/* ---------- Character window: worn items around the model, stats beside it ---------- */
.charwin__body { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 22px; align-items: start; }
.charwin__doll { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; }
.charwin__col { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; height: min(520px, 62vh); min-height: 300px; }
.charwin__weapons { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.slot {
  --rim: rgba(227, 181, 74, 0.2);
  width: 50px; height: 50px; padding: 0; flex-shrink: 0; display: grid; place-items: center; overflow: hidden;
  background: rgba(0, 0, 0, 0.55); border: 2px solid var(--rim); box-shadow: inset 0 0 10px #000, 0 2px 6px rgba(0, 0, 0, 0.6);
  color: var(--muted); font-family: var(--display); font-weight: 700; font-size: 1.05rem; cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s;
}
.slot img { width: 100%; height: 100%; display: block; }
.slot--empty { cursor: default; opacity: 0.55; }
button.slot:hover, button.slot:focus-visible { transform: scale(1.08); outline: 0; box-shadow: 0 0 0 1px #000, 0 0 12px var(--rim); }
.sq0 { --rim: #9d9d9d; } .sq1 { --rim: #e8e8e8; } .sq2 { --rim: #1eff00; } .sq3 { --rim: #4a9eff; } .sq4 { --rim: #c56bff; } .sq5 { --rim: #ff8000; }
.charwin__stats h3 { margin: 0 0 6px; font-size: 0.86rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-hi); }
.statlist { list-style: none; margin: 0 0 16px; padding: 0; }
.statlist li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.statlist b { color: var(--bone); font-variant-numeric: tabular-nums; }
.itemtip {
  position: fixed; z-index: 60; min-width: 190px; max-width: min(320px, calc(100vw - 16px)); padding: 10px 12px;
  background: rgba(8, 3, 5, 0.97); border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.75);
  font-size: 0.9rem; line-height: 1.4; pointer-events: none;
}
.itemtip[hidden] { display: none; }
.itemtip > b { display: block; font-size: 1rem; margin-bottom: 2px; }
.tip-line { display: flex; justify-content: space-between; gap: 16px; color: #fff; }
.tip-line.muted { color: var(--muted); margin-top: 4px; }
.tip-green { color: #1eff00; }
.tip-gold { color: #ffd100; }
@media (max-width: 900px) {
  .charwin__body { grid-template-columns: 1fr; }
  .charwin__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 22px; }
  .charwin__stats h3 { grid-column: 1 / -1; }
  .charwin__stats .statlist { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 22px; }
}
@media (max-width: 560px) {
  .charwin__doll { gap: 8px; }
  .charwin__col { height: min(420px, 58vh); }
  .slot { width: 40px; height: 40px; }
}

/* A stat tile holding words, not a number: smaller, so a long zone name doesn't break mid-word */
.stat--words b { font-size: 1.15rem; line-height: 1.25; overflow-wrap: normal; }

/* The application form */
.applyform { display: grid; gap: 14px; }
.applyform .field { display: grid; gap: 6px; }
.applyform input, .applyform select, .applyform textarea { width: 100%; font: inherit; color: var(--text); background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line); padding: 9px 11px; }
.applyform textarea { resize: vertical; }
.applyform__row { display: grid; grid-template-columns: 1fr 120px; gap: 14px; }
.applyform .btn { justify-self: start; }

/* Quest review on the member page */
.questreview .quest { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 7px 0; }
.quest__xp { margin-left: auto; white-space: nowrap; font-weight: 700; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.step__sub { margin-left: 8px; letter-spacing: 0; text-transform: none; font-family: var(--body); font-weight: 400; font-size: 0.9rem; color: var(--bone); }
.questarea { margin-bottom: 12px; padding: 10px 12px; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--line-soft); }
.questarea__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0 0 4px; }
.questarea .quest:last-child { padding-bottom: 0; }

/* A small text button inside a line ("Change", "Never mind") */
.linkbtn { padding: 0; margin-left: 6px; border: 0; background: none; cursor: pointer; font: inherit; letter-spacing: 0; text-transform: none; color: var(--gold-hi); text-decoration: underline; }
.linkbtn:hover { color: #fff; }
.quest--done { opacity: 0.6; }
.quest__who .muted { align-self: center; font-size: 0.85rem; }

/* The signed-in links in the header: bright enough to find */
.account .chip { color: var(--bone); border-color: var(--line); background: rgba(227, 181, 74, 0.08); }
.account a.chip { color: #1a0a05; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); border-color: transparent; }
.account .chip:hover { filter: brightness(1.15); }

@media (max-width: 1320px) {
  .topbar { flex-wrap: wrap; gap: 8px 14px; padding-bottom: 4px; }
  .topbar .account { margin-left: auto; }
  .nav { order: 3; width: 100%; margin: 0 -6px; justify-content: center; }
}

@media (max-width: 860px) {
  .nav { justify-content: flex-start; }
  .nav a { padding: 9px 10px; font-size: 0.78rem; }
  .brand__sub { display: none; }
  .bar { grid-template-columns: 104px 1fr 30px; }
  .hide-sm { display: none; }
}

/* Dungeon route: numbered stops in kill order */
.route { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 0; }
.route li { display: flex; align-items: center; gap: 8px; padding-right: 34px; position: relative; font-weight: 700; }
.route li:not(:last-child)::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 18px; height: 2px;
  background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi));
}
.route b, .boss h3 b {
  flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  font-family: var(--display); font-size: 0.86rem; color: #1a0a05;
  background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold) 60%, var(--gold-lo)); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.6), 0 0 10px rgba(227, 181, 74, 0.35);
}
.route__start b { background: none; color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold-lo); font-size: 0.7rem; }
.route__start span { color: var(--muted); font-weight: 400; }
.route .final span, .boss--final h3 { color: var(--gold-hi); }
.route .final b, .boss--final h3 b { background: radial-gradient(circle at 35% 30%, #ff9a8a, #b3151c 60%, #5a0a0e); color: #fff; }

/* Boss cards with their loot */
.bossgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); gap: 14px; }
.boss { padding: 12px 14px; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--line-soft); }
.boss h3, .bestloot h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-family: var(--display); font-size: 0.98rem; letter-spacing: 0.06em; }
.boss h3 small { font-family: var(--body); font-weight: 400; font-size: 0.8rem; letter-spacing: 0; color: var(--muted); }
.boss__none { margin: 0; font-size: 0.9rem; }
.bestloot { margin-bottom: 16px; padding: 12px 14px; border: 1px solid var(--line); background: rgba(227, 181, 74, 0.06); }
.bestloot h3 { color: var(--gold-hi); text-transform: uppercase; font-size: 0.86rem; letter-spacing: 0.12em; }
table.loot { font-size: 0.93rem; }
table.loot td { padding: 5px 8px 5px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); vertical-align: middle; }
table.loot tr:last-child td { border-bottom: 0; }
table.loot td:last-child { padding-right: 0; width: 92px; font-weight: 700; color: var(--bone); }
.chance { display: inline-block; width: 40px; height: 5px; margin-right: 7px; vertical-align: middle; background: rgba(255, 255, 255, 0.1); }
.chance i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); }
details.more { margin-top: 14px; }
details.more > summary, .quest__more > summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; }
details.more > summary:hover, .quest__more > summary:hover { color: var(--gold-hi); }
details.more[open] > summary { margin-bottom: 12px; }
.quest__more { margin-top: 6px; }
.chain { margin: 8px 0 0; padding-left: 22px; display: grid; gap: 8px; font-size: 0.93rem; }
.chain li::marker { color: var(--gold); font-weight: 700; }
.chain .quest__who { margin-top: 4px; }
.chain .qs { font-size: 0.76rem; padding: 0 7px; }
@media (max-width: 560px) {
  table.loot td:nth-child(3) { display: none; }
  table.loot td:last-child { width: 44px; }
  .chance { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .embers { display: none; }
  html { scroll-behavior: auto; }
}
