/* WFSync: dark, gold-trimmed frames in the spirit of the WoW interface. No JS, no inline styles. */
:root {
  --bg: #0b0906;
  --panel-top: #1f170e;
  --panel-bottom: #130e09;
  --border: #4e3a1d;
  --border-hi: #a3803e;
  --gold: #ffd100;
  --gold-soft: #e7c77a;
  --text: #e9dfc9;
  --muted: #a3967d;
  --error: #ff6b5b;
  --xp-a: #a54ee8;
  --xp-b: #6a1fb0;
  --rest-a: #4f9bff;
  --rest-b: #1f56c4;
  --serif: "Palatino Linotype", "Book Antiqua", Palatino, "URW Palladio L", Georgia, serif;
  color-scheme: dark;
}

/* Class colors from the game */
.cls-warrior { --c: #c69b6d; }
.cls-paladin { --c: #f48cba; }
.cls-hunter  { --c: #aad372; }
.cls-rogue   { --c: #fff468; }
.cls-priest  { --c: #ffffff; }
.cls-shaman  { --c: #0070dd; }
.cls-mage    { --c: #3fc7eb; }
.cls-warlock { --c: #8788ee; }
.cls-druid   { --c: #ff7c0a; }
.cls-none    { --c: var(--gold-soft); }

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 500px at 50% -120px, #3a2a14 0%, transparent 70%),
    radial-gradient(800px 600px at 100% 100%, #1a0f08 0%, transparent 60%),
    var(--bg);
}
a { color: var(--gold-soft); }
a:hover { color: var(--gold); }
small { color: var(--muted); }
strong { color: #fff3d6; }

/* ---------- header and menu ---------- */
header.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(#20170d, #0f0b07);
  border-bottom: 1px solid var(--border-hi);
  box-shadow: 0 1px 0 #000, 0 4px 18px #000a;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand > span:last-child {
  display: flex; flex-direction: column; line-height: 1.1;
  font: 700 1.35rem var(--serif); color: var(--gold); letter-spacing: .04em;
  text-shadow: 0 0 8px #ffb30055, 0 2px 0 #000;
}
.brand small { font: .7rem system-ui, sans-serif; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); text-shadow: none; }
.crest {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff1a8, #e0a92a 45%, #7a4f0c 100%);
  border: 2px solid #3b2a10;
  box-shadow: 0 0 0 1px var(--border-hi), 0 2px 6px #000;
}
.crest::after { content: "W"; font: 700 1rem var(--serif); color: #3b2508; }
.who { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--muted); }
.who span { color: var(--gold-soft); font-weight: 600; }

nav.menu {
  display: flex;
  gap: 4px;
  padding: 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
  background: linear-gradient(#17110a, #100c07);
  border-bottom: 1px solid var(--border);
}
nav.menu a {
  flex: none;
  padding: 10px 14px;
  font: 600 .95rem var(--serif);
  letter-spacing: .03em;
  text-decoration: none;
  color: var(--gold-soft);
  border-bottom: 2px solid transparent;
}
nav.menu a:hover { color: var(--gold); background: #ffd1000d; }
nav.menu a.active { color: var(--gold); border-bottom-color: var(--gold); text-shadow: 0 0 10px #ffd10066; }

main { max-width: 1120px; margin: 0 auto; padding: 20px 16px 40px; }
footer { text-align: center; color: #6f6553; font-size: .8rem; padding: 24px 16px 32px; }

/* ---------- type ---------- */
h1, h2, h3, summary { font-family: var(--serif); }
h1 { color: var(--gold); font-size: 1.9rem; margin: 0 0 12px; letter-spacing: .02em; text-shadow: 0 2px 0 #000, 0 0 14px #ffb30033; }
h2 { color: var(--gold); font-size: 1.25rem; margin: 0 0 10px; text-shadow: 0 1px 0 #000; }
.panel h2:not(:first-child) { margin-top: 20px; }
h1 small, h2 small { color: var(--muted); font: 400 .8rem system-ui, sans-serif; margin-left: 6px; }
.back { margin: 0 0 8px; font-size: .9rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 8px; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; }
.stats span {
  padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px;
  background: #1a130b; color: var(--muted); font-size: .85rem;
}
.stats strong { color: var(--gold); }
.stats strong[class^="cls-"] { color: var(--c); }
.hint { color: var(--muted); font-size: .9rem; }
.error { color: var(--error); }

/* ---------- frames ---------- */
.panel, .char-card {
  position: relative;
  background: linear-gradient(var(--panel-top), var(--panel-bottom));
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px #000, inset 0 1px 0 #ffffff0a, 0 6px 20px #0009;
}
.panel { padding: 18px 20px; margin: 16px 0; }
.panel.narrow { max-width: 540px; margin: 32px auto; }
.notice { border: 1px solid var(--border-hi); background: #2a1f0c; border-radius: 6px; padding: 4px 14px; margin: 12px 0; }
.grid.two { display: grid; gap: 0 16px; align-items: start; }
@media (min-width: 860px) { .grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .grid.two > .panel { margin: 0; } .grid.two { margin: 16px 0; } }

/* ---------- character cards ---------- */
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); margin-top: 12px; }
.char-card {
  display: block; padding: 14px 16px; text-decoration: none; color: var(--text);
  border-left: 3px solid var(--c);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.char-card:hover { color: var(--text); border-color: var(--border-hi); border-left-color: var(--c); transform: translateY(-2px); box-shadow: inset 0 0 0 1px #000, 0 10px 26px #000c, 0 0 0 1px #ffd10022; }
.char-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.char-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.char-title small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.name { font: 700 1.2rem var(--serif); color: var(--c); text-shadow: 0 1px 0 #000; }
h1.name { font-size: 1.9rem; margin: 0; color: var(--c); }
h1.name small { font-family: var(--serif); }
.lvl {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 1.05rem var(--serif); color: var(--gold);
  background: radial-gradient(circle at 40% 35%, #3a2b16, #120d07 70%);
  border: 2px solid var(--border-hi);
  box-shadow: 0 0 0 1px #000, inset 0 0 8px #000, 0 2px 6px #000;
  text-shadow: 0 1px 0 #000;
}
.lvl.big { width: 62px; height: 62px; font-size: 1.5rem; }
.faction {
  flex: none; padding: 2px 8px; border-radius: 3px;
  font: 700 .7rem system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid #000; box-shadow: inset 0 1px 0 #ffffff26;
}
.faction.horde { background: linear-gradient(#a01b1b, #5e0d0d); color: #ffd7c2; }
.faction.alliance { background: linear-gradient(#2a59c2, #14306e); color: #d8e6ff; }

/* ---------- XP bar ---------- */
.xp { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; }
.xp progress {
  -webkit-appearance: none; appearance: none;
  flex: 1; min-width: 80px; height: 11px;
  border: 1px solid #000; border-radius: 2px;
  background: #1b1022;
  box-shadow: 0 0 0 1px #4a3a22, inset 0 1px 3px #000;
}
.xp.big progress { height: 16px; }
.xp progress::-webkit-progress-bar { background: #1b1022; }
.xp progress::-webkit-progress-value { background: linear-gradient(var(--xp-a), var(--xp-b)); box-shadow: inset 0 1px 0 #ffffff40; }
.xp progress::-moz-progress-bar { background: linear-gradient(var(--xp-a), var(--xp-b)); }
.xp.rested progress::-webkit-progress-value { background: linear-gradient(var(--rest-a), var(--rest-b)); }
.xp.rested progress::-moz-progress-bar { background: linear-gradient(var(--rest-a), var(--rest-b)); }
.xp-text { flex: none; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.rest { color: var(--rest-a); }

/* ---------- money ---------- */
.money { display: inline-flex; gap: 8px; font-variant-numeric: tabular-nums; font-weight: 600; color: #fff; }
.coin { display: inline-flex; align-items: center; gap: 4px; }
.coin::after {
  content: ""; width: .8em; height: .8em; border-radius: 50%;
  box-shadow: inset -1px -1px 1px #0007, 0 0 0 1px #000a;
}
.coin.gold::after { background: radial-gradient(circle at 35% 30%, #fff3a0, #f0b323 50%, #8a5a08); }
.coin.silver::after { background: radial-gradient(circle at 35% 30%, #ffffff, #c0c6cc 50%, #6c737a); }
.coin.copper::after { background: radial-gradient(circle at 35% 30%, #ffd1a6, #c9732e 50%, #6b3412); }

/* ---------- facts ---------- */
dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 10px 0 0; }
dt { color: var(--muted); }
dd { margin: 0; }
dl.mini { font-size: .9rem; gap: 2px 12px; }

/* ---------- quests and events ---------- */
.questlog, .quests, .events { list-style: none; margin: 0; padding: 0; }
.questlog li { padding: 4px 0; border-bottom: 1px solid #ffffff0d; }
.questlog li:last-child, .events li:last-child { border-bottom: 0; }
.qlvl { display: inline-block; min-width: 3.2em; font-variant-numeric: tabular-nums; }
.q-red { color: #ff2020; }
.q-orange { color: #ff8040; }
.q-yellow { color: #ffff00; }
.q-green { color: #40c040; }
.q-gray { color: #808080; }
.q-normal { color: var(--text); }
.ready {
  margin-left: 6px; padding: 0 6px; border-radius: 3px; font-size: .75rem; font-weight: 700;
  color: #1a1206; background: linear-gradient(#ffe36b, #e0a92a); vertical-align: 1px;
}
.quests li { padding: 2px 0; }
.events li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid #ffffff0d; }
.events small { white-space: nowrap; }
.ev-icon { text-align: center; font-weight: 700; color: var(--muted); }
.ev-turnin .ev-icon { color: var(--gold); }
.ev-accept .ev-icon { color: #ffff00; text-shadow: 0 0 6px #ffff0066; }
.ev-level .ev-icon { color: var(--xp-a); }
.ev-dungeon .ev-icon { color: #ff5a3c; }
.ev-zone .ev-icon, .ev-login .ev-icon { color: #7fb2ff; }

details { border: 1px solid var(--border); border-radius: 5px; background: #00000033; padding: 6px 12px; margin: 8px 0; }
summary { cursor: pointer; color: var(--gold-soft); font-weight: 600; }
summary small { font-family: system-ui, sans-serif; }
details[open] summary { margin-bottom: 6px; }

/* ---------- forms and buttons ---------- */
.login { display: grid; gap: 12px; max-width: 380px; }
label { display: grid; gap: 4px; color: var(--muted); font-size: .9rem; }
input {
  font: inherit; color: var(--text); width: 100%;
  padding: 8px 10px; border-radius: 4px;
  background: #0c0905; border: 1px solid var(--border);
  box-shadow: inset 0 1px 3px #000;
}
input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px #ffd10033, inset 0 1px 3px #000; }
button, a.button {
  display: inline-block; font: 600 .95rem var(--serif); letter-spacing: .02em;
  padding: 7px 14px; border-radius: 4px; cursor: pointer; text-decoration: none;
  color: var(--gold-soft); background: linear-gradient(#2c2112, #18110a);
  border: 1px solid var(--border-hi); box-shadow: inset 0 1px 0 #ffffff14, 0 1px 3px #000;
}
button:hover, a.button:hover { color: var(--gold); border-color: var(--gold); }
button.primary, a.button.primary {
  color: var(--gold); text-shadow: 0 1px 0 #000;
  background: linear-gradient(#a3161a, #5c0709);
  border-color: #d4a84a;
  box-shadow: inset 0 1px 0 #ffffff33, 0 0 0 1px #000, 0 2px 6px #000a;
}
button.primary:hover, a.button.primary:hover { background: linear-gradient(#c11d22, #6e0a0d); }
button.link { background: none; border: 0; box-shadow: none; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; }
button.link:hover { color: var(--gold); }
form.inline { display: inline; margin-left: 8px; }
form.inline button { padding: 2px 8px; font-size: .8rem; }

/* ---------- code and steps ---------- */
code { font: .88em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #f3e3b5; }
pre { background: #080604; border: 1px solid var(--border); border-radius: 5px; padding: 10px 12px; overflow-x: auto; box-shadow: inset 0 1px 4px #000; }
ol { padding-left: 1.3em; }
ol li { margin: 5px 0; }
.step {
  display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; margin-right: 6px;
  border-radius: 50%; border: 1px solid var(--border-hi); background: #2a1f0c;
  font-size: .85em; color: var(--gold); vertical-align: 2px;
}

/* ---------- small screens ---------- */
@media (max-width: 560px) {
  h1 { font-size: 1.55rem; }
  h1.name { font-size: 1.5rem; }
  .panel { padding: 14px; }
  .who span { display: none; }
  .lvl.big { width: 52px; height: 52px; font-size: 1.25rem; }
  .xp.big { flex-wrap: wrap; gap: 4px; }
  .xp.big progress { flex-basis: 100%; }
}
.os-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px; }
a.button.os small { color: #f3d9a4; font: 400 .75rem system-ui, sans-serif; margin-left: 4px; }

/* OS tabs on /download: radio buttons + labels, no JS */
.tabs { position: relative; margin: 12px 0 8px; }
.tabs > input { position: absolute; opacity: 0; pointer-events: none; }
.tabs > label {
  display: inline-block; margin: 0 4px -1px 0; padding: 8px 16px; cursor: pointer;
  font: 600 .95rem var(--serif); color: var(--gold-soft);
  background: #140f09; border: 1px solid var(--border); border-bottom: 0; border-radius: 6px 6px 0 0;
}
.tabs > label:hover { color: var(--gold); }
.tabs > input:checked + label { color: var(--gold); background: linear-gradient(#2a1f10, #120d08); border-color: var(--border-hi); position: relative; z-index: 1; }
.tabs > input:focus-visible + label { outline: 2px solid var(--gold); outline-offset: 2px; }
.tab { display: none; padding: 14px 16px; background: #120d08; border: 1px solid var(--border-hi); border-radius: 0 6px 6px 6px; }
.tab .os-buttons { margin-top: 0; }
.tab .guide { margin: 4px 0 0; color: var(--text); }
#os-windows:checked ~ .tab-windows, #os-macos:checked ~ .tab-macos, #os-linux:checked ~ .tab-linux { display: block; }

/* ---------- inventory ---------- */
.item { text-decoration: none; font-weight: 600; }
a.item:hover { text-decoration: underline; }
.q0 { color: #9d9d9d; } .q1 { color: #ffffff; } .q2 { color: #1eff00; } .q3 { color: #3a8cff; }
.q4 { color: #b45cff; } .q5 { color: #ff8000; } .q6 { color: #e6cc80; } .q7 { color: #00ccff; }
.paperdoll { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.slots { list-style: none; margin: 0; padding: 0; }
.slots li { display: flex; flex-direction: column; padding: 5px 0; border-bottom: 1px solid #ffffff0d; min-width: 0; }
.slots li small { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.slots li .item, .bag li .item { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bag li { display: flex; align-items: baseline; gap: 4px; }
.bag li .item { flex: 0 1 auto; min-width: 0; }
.bag li .count { flex: none; }
.slots li.empty .item { font-weight: 400; font-style: italic; }
.slots.weapons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; margin-top: 8px; border-top: 1px solid var(--border); padding-top: 4px; }
.bag { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; }
.bag li { padding: 3px 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.count { color: var(--gold-soft); }
.panel h3 { font: 600 .95rem var(--serif); color: var(--gold-soft); margin: 12px 0 4px; }
@media (max-width: 560px) { .paperdoll, .slots.weapons { grid-template-columns: 1fr; } }

/* ---------- item requests ---------- */
.badge { display: inline-grid; place-items: center; min-width: 1.3em; height: 1.3em; padding: 0 4px; margin-left: 2px; border-radius: 999px;
  background: #b3121a; color: #fff; font: 700 .7rem system-ui, sans-serif; box-shadow: 0 0 0 1px #000; vertical-align: 1px; }
.bag li { flex-wrap: wrap; }
.bound { color: #7d725d; font-size: .72rem; }
details.ask { border: 0; padding: 0; margin: 0 0 0 auto; background: none; flex: none; }
details.ask > summary { font: 600 .72rem system-ui, sans-serif; color: var(--muted); list-style: none; cursor: pointer; padding: 1px 6px; border: 1px solid var(--border); border-radius: 3px; }
details.ask > summary::-webkit-details-marker { display: none; }
details.ask > summary:hover { color: var(--gold); border-color: var(--border-hi); }
details.ask[open] { flex-basis: 100%; margin: 4px 0 6px; }
.bag li:has(details.ask[open]) { grid-column: 1 / -1; }
details.ask[open] > summary { display: none; }
details.ask form { display: grid; grid-template-columns: auto minmax(120px, 1fr) auto; gap: 6px; align-items: end; padding: 8px; border: 1px solid var(--border-hi); border-radius: 5px; background: #0f0b07; }
details.ask label { grid-template-columns: auto 64px; display: grid; align-items: center; gap: 6px; font-size: .8rem; }
details.ask input { padding: 4px 6px; }
details.ask button { padding: 4px 10px; font-size: .85rem; }
.requests { list-style: none; margin: 0; padding: 0; }
.request { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #ffffff0d; }
.request:last-child { border-bottom: 0; }
.request.done, .request.declined, .request.cancelled { opacity: .55; }
.req-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.req-main .item { display: inline; }
.req-main q { color: var(--muted); font-style: italic; font-size: .9rem; }
.req-who { font-size: .9rem; color: var(--muted); }
.req-side { text-align: right; flex: none; }
.req-actions { margin-top: 4px; }
.req-actions form.inline { margin-left: 4px; }
.status { font: 700 .72rem system-ui, sans-serif; text-transform: uppercase; letter-spacing: .06em; padding: 1px 6px; border-radius: 3px; border: 1px solid var(--border); }
.s-open { color: var(--gold); border-color: var(--border-hi); }
.s-accepted { color: #40c040; border-color: #2f6f2f; }
.s-done { color: #7fb2ff; }
.s-declined, .s-cancelled { color: var(--muted); }
