/* Forever Roster. One ornate element per page (the level columns, or the character sheet);
   everything else is a quiet panel. Drawn entirely in CSS, no game textures. */
:root {
  --bg: #100d0a;
  --panel: #1b1611;
  --inset: #140f0a;
  --line: #3b2e1f;
  --line-soft: #2a2219;
  --bronze: #5a4527;
  --bronze-hi: #8a6a34;
  --text: #ecdfc2;
  --text-2: #cdbb93;
  --muted: #a8987a;
  --faint: #8f8166;
  --heading: #f4ead2;
  --gold: #e3c06b;
  --gold-hi: #f7dc95;
  --gold-lo: #a37a35;
  --warn: #f0a35c;
  --behind: #8cc4ff;
  --good: #8fd47a;
  --tip-bg: linear-gradient(180deg, #0b1430, #060a1a);
  --tip-line: #c7ccd8;
  --font-display: 'Cormorant SC', Georgia, serif;
  --font-body: 'Alegreya Sans', system-ui, sans-serif;
  /* Always dark, like the game's UI. */
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 17px/1.55 var(--font-body);
  background: radial-gradient(ellipse 1100px 560px at 50% -140px, rgba(196, 140, 60, .13), transparent 70%) var(--bg);
}
a { color: var(--gold); }
a:hover { color: var(--gold-hi); }
button { font: inherit; color: inherit; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 36px 16px 64px; display: flex; flex-direction: column; gap: 36px; }
@media (min-width: 720px) { .wrap { padding-inline: 24px; } }

.mono { font-variant-numeric: tabular-nums; font-weight: 700; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 15px; }
.stack { display: flex; flex-direction: column; }

/* Type: Cormorant SC for headings and buttons; the gold treatment only on page titles. */
h1, h2 { margin: 0; font-family: var(--font-display); font-weight: 700; color: var(--heading); line-height: 1.1; }
h2 { font-size: 29px; }
h3 { margin: 8px 0 0; font-size: 18px; font-weight: 700; color: var(--text-2); }
.title {
  font-weight: 700; font-size: clamp(48px, 6.5vw, 70px); line-height: 1.02;
  background: linear-gradient(180deg, #fff1c2 0%, var(--gold) 50%, var(--gold-lo) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .85));
}

/* Site name, top left, plus one link */
.site-nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.site-nav a { font-size: 16px; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 24px !important; color: var(--gold); text-decoration: none; }
.brand:hover { color: var(--gold-hi); }

.top { display: flex; flex-direction: column; gap: 6px; }
.top p { margin: 0; color: var(--text-2); }
.chip { display: inline-block; padding: 0 8px; border: 1px solid var(--bronze); border-radius: 999px; font-size: 13px; color: var(--text-2); vertical-align: 2px; }

.notice { background: var(--panel); border: 1px solid var(--bronze); border-radius: 6px; padding: 14px 18px; color: var(--text-2); margin: 0; }
.notice strong { color: var(--gold-hi); }

/* Quiet panels: the default */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 22px 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 720px) { .panel { padding: 22px 24px; } }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.row { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }

/* The one ornate element */
.ornate {
  position: relative; padding: 22px 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0;
  background: linear-gradient(180deg, #261e15, #18130e); border: 1px solid var(--bronze-hi); border-radius: 6px;
  box-shadow: inset 0 0 0 1px #2a2016, inset 0 0 0 3px #4d3b20, inset 0 1px 18px rgba(0, 0, 0, .6), 0 10px 40px rgba(0, 0, 0, .6);
}
@media (min-width: 720px) { .ornate { padding: 22px 24px; } }
.ornate::before, .ornate::after {
  content: ""; position: absolute; top: -6px; width: 12px; height: 12px; transform: rotate(45deg);
  background: linear-gradient(135deg, var(--gold-hi), var(--gold-lo)); border: 1px solid #3a2a12;
}
.ornate::before { left: -6px; }
.ornate::after { right: -6px; }

/* Medallion: group level, character level */
.medal {
  flex: none; width: 92px; height: 92px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 35%, #3a2c1a, #14100b 70%);
  box-shadow: 0 0 0 2px #14100b, 0 0 0 4px #c9a050, 0 0 0 5px var(--bronze), inset 0 2px 8px rgba(0, 0, 0, .8);
}
.medal span:first-child { font-size: 13px; color: #b9a479; }
.medal span:last-child { font-family: var(--font-display); font-weight: 700; font-size: 40px; line-height: 1; color: var(--gold-hi); }

/* Where the group stands, in a sentence */
.standing { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.standing p { margin: 0; flex: 1 1 420px; max-width: 46em; font-size: 20px; line-height: 1.5; }
.name { font-weight: 700; text-decoration: none; }

/* Level columns */
.scroll-x { overflow-x: auto; }
.levels { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(92px, 1fr); gap: 8px; }
.lvl-col { display: flex; flex-direction: column; gap: 8px; padding: 12px 8px; min-height: 200px; border-radius: 4px; background: rgba(0, 0, 0, .28); border: 1px solid #2e241a; }
.lvl-col.band { background: linear-gradient(180deg, rgba(227, 192, 107, .10), rgba(227, 192, 107, .02)); border-color: #6b5228; }
.lvl-col.group { border-color: var(--gold); box-shadow: 0 0 18px rgba(227, 192, 107, .28), inset 0 0 12px rgba(227, 192, 107, .12); }
.lvl-col .num { font-family: var(--font-display); font-weight: 700; font-size: 27px; line-height: 1.1; text-align: center; color: #8a7a5e; }
.lvl-col.band .num { color: #d8c08a; }
.lvl-col.group .num { color: var(--gold-hi); }
.pill { display: block; padding: 6px; border-radius: 3px; background: linear-gradient(180deg, #221a12, #15100b); border: 1px solid #4d3b20; font-weight: 700; font-size: 15px; text-decoration: none; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Buttons: the only small caps besides headings */
.btn {
  min-height: 44px; padding: 0 18px; border-radius: 4px; border: 1px solid var(--bronze); cursor: pointer;
  background: transparent; color: var(--text-2); font-family: var(--font-display); font-weight: 700; font-size: 19px; line-height: 1;
}
.btn:hover { border-color: var(--bronze-hi); color: var(--text); }
.btn[aria-pressed="true"] { border-color: var(--gold); color: var(--gold-hi); }
.btn.primary {
  border-color: #2a1c08; background: linear-gradient(180deg, #f0cf7a, #c18f35 55%, #8f6420); color: #1f1406;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 2px 0 #000;
}
.btn.primary:hover { color: #1f1406; filter: brightness(1.05); }
.btn.danger { border-color: #6b3a2e; color: #f0a08a; }
.linkbtn { display: inline-flex; align-items: center; text-decoration: none; }

/* Roster table */
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th { text-align: left; font-weight: 500; font-size: 15px; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.who { display: flex; align-items: center; gap: 10px; }
.class-icon { width: 32px; height: 32px; flex: none; border-radius: 50%; box-shadow: 0 0 0 2px #000, 0 0 0 3px var(--bronze-hi); }
.offset { font-size: 14px; margin-left: 8px; white-space: nowrap; }
.ahead { color: var(--warn); }
.behind { color: var(--behind); }

/* Character page */
.char-head { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.char-head p { margin: 0; color: var(--text-2); }
.char-name { font-size: clamp(40px, 5.5vw, 58px); text-shadow: 0 2px 0 #000; }

/* Icons from Blizzard's image server */
.ico { position: relative; width: 52px; height: 52px; flex: none; border-radius: 5px; background: #0a0806; box-shadow: inset 0 0 0 1px #000, inset 0 0 10px rgba(0, 0, 0, .9); }
.ico img { width: 46px; height: 46px; margin: 3px; border-radius: 3px; display: block; }
.ico::after { content: ""; position: absolute; inset: 0; border-radius: 5px; border: 2px solid var(--q, var(--line)); }
.ico.empty { background: repeating-linear-gradient(45deg, #14100b 0 6px, #110d09 6px 12px); }

/* Paperdoll */
.doll { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.doll-col { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.doll-figure {
  flex: 1 1 240px; min-width: 220px; min-height: 420px; border-radius: 6px; overflow: hidden; display: flex; align-items: flex-end; justify-content: center;
  background: radial-gradient(ellipse at 50% 60%, rgba(120, 90, 50, .35), transparent 65%), linear-gradient(180deg, #0f0c09, #060504);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 0 40px rgba(0, 0, 0, .9);
}
.doll-figure img { width: 100%; height: 100%; max-height: 520px; object-fit: cover; object-position: 50% 20%; }
.doll-figure img.no-render { width: 120px; height: 120px; margin: auto; border-radius: 50%; opacity: .35; object-fit: contain; box-shadow: 0 0 0 3px #000, 0 0 0 5px var(--bronze-hi); }
.doll-weapons { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; }
.slot { display: flex; align-items: center; gap: 10px; min-height: 56px; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: default; }
.slot.right { flex-direction: row-reverse; text-align: right; }
.slot.below { flex-direction: column; text-align: center; gap: 4px; width: 150px; }
.slot:hover .ico::after, .slot:focus-visible .ico::after { box-shadow: 0 0 10px var(--q, var(--gold)); }
.slot .label { display: flex; flex-direction: column; min-width: 0; }
.slot .label > span:first-child { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-name { font-size: 14px; color: var(--faint); }
.enchant { font-size: 14px; color: #3ddc4a; }

/* Talents: learned talents as game-style buttons */
.trees { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.tree { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 4px; background: linear-gradient(180deg, #17120d, #0f0b08); border: 1px solid var(--line-soft); }
.tree-head { display: flex; align-items: center; gap: 10px; }
.tree-head img { width: 32px; height: 32px; border-radius: 50%; box-shadow: 0 0 0 2px #000, 0 0 0 3px var(--bronze-hi); }
.tree-head .tname { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--heading); flex: 1; }
.tree-head .tpts { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--gold-hi); }
.tree.unused { opacity: .6; }
.talents { display: flex; flex-wrap: wrap; gap: 14px 12px; }
.talent { position: relative; width: 48px; height: 48px; padding: 0; border: 0; background: none; cursor: default; }
.talent img { width: 44px; height: 44px; margin: 2px; border-radius: 5px; display: block; }
.talent .noicon { display: flex; width: 44px; height: 44px; margin: 2px; border-radius: 5px; align-items: center; justify-content: center; background: #241a10; font-family: var(--font-display); font-weight: 700; color: var(--gold); }
.talent::after { content: ""; position: absolute; inset: 0; border-radius: 6px; border: 2px solid var(--gold); box-shadow: 0 0 8px rgba(227, 192, 107, .5); }
.rank { position: absolute; right: -8px; bottom: -8px; z-index: 2; min-width: 22px; padding: 0 4px; border-radius: 4px; background: #000; border: 1px solid var(--bronze-hi); font: 700 12px/16px var(--font-body); color: var(--gold-hi); text-align: center; }

/* Tooltips: hover on desktop, tap (focus) on touch; the in-game navy and silver */
.tipwrap { position: relative; }
.tip {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; width: 300px; max-width: calc(100vw - 32px);
  padding: 10px 14px; border-radius: 5px; background: var(--tip-bg); border: 1px solid var(--tip-line);
  box-shadow: inset 0 0 0 1px #3d4560, 0 10px 30px rgba(0, 0, 0, .75); font-size: 15px; line-height: 1.35; text-align: left; white-space: pre-line;
}
.tip.right { left: auto; right: 0; }
.tip.above { top: auto; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); }
.tipwrap:hover .tip, .tipwrap:focus-within .tip { display: flex; flex-direction: column; gap: 2px; }
.tip .t-name { font-weight: 700; font-size: 16px; }
.tip .t-line { display: flex; justify-content: space-between; gap: 12px; }
.tip .t-desc { color: #ffd100; }

/* Professions and chart */
.bar { height: 12px; border-radius: 3px; border: 1px solid #000; background: #0f1a0c; box-shadow: 0 0 0 1px var(--bronze); overflow: hidden; }
.bar > div { height: 100%; background: linear-gradient(180deg, #7ad06a, #2f8a2a 60%, #1f5f1c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.prof { display: grid; grid-template-columns: 120px minmax(0, 1fr) 80px; gap: 12px; align-items: center; }
.chart { width: 100%; height: auto; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }

/* Manage roster */
summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; min-height: 44px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: '▸'; color: var(--gold); }
details[open] summary::before { content: '▾'; }
.form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 12px; background: var(--inset); border: 1px solid var(--line); border-radius: 4px; }
.field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 140px; min-width: 0; }
.field.wide { flex: 2 1 240px; }
.field span { font-size: 14px; color: var(--muted); }
input, select { min-height: 44px; padding: 0 12px; border-radius: 4px; border: 1px solid var(--bronze); background: #0c0a07; color: var(--text); font: inherit; width: 100%; }
input:focus-visible, select:focus-visible, .btn:focus-visible, summary:focus-visible, .slot:focus-visible, .talent:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.modes legend { margin-bottom: 8px; }
.mode { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--inset); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.mode:has(input:checked) { border-color: var(--gold); }
.mode > span { display: flex; flex-direction: column; gap: 2px; }
.mode input, .check input, .days input { width: 18px; min-height: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--gold); }
.days { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; flex: 2 1 280px; }
.days legend { font-size: 14px; color: var(--muted); padding: 0; margin-bottom: 4px; }
.days label, .check { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 16px; cursor: pointer; }

/* Homepage */
.hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.hero-copy { flex: 1 1 380px; min-width: 0; max-width: 470px; display: flex; flex-direction: column; gap: 20px; }
.hero-copy .title { font-size: clamp(52px, 7.5vw, 82px); }
.hero-copy p { margin: 0; }
.lede { font-size: 18px; color: var(--text-2); max-width: 34em; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-figure { flex: 1.4 1 520px; min-width: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.hero-figure .lvl-col { min-height: 240px; }
.kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; border-top: 1px solid var(--line); padding-top: 28px; }
.kinds h2 { font-size: 27px; line-height: 1.15; margin-bottom: 6px; }
.kinds p { margin: 0; color: var(--text-2); }

/* Privacy, footer */
.prose p { max-width: 720px; margin: 0; color: var(--text-2); }
.foot { border-top: 1px solid var(--line); padding-top: 20px; font-size: 14px; }
.foot p { margin: 0 0 8px; max-width: 780px; color: var(--faint); }
.foot a + a { margin-left: 16px; }
.hero-figure .levels { grid-auto-columns: minmax(64px, 1fr); gap: 6px; }
.hero-figure .pill { font-size: 14px; padding: 5px 4px; }

/* Sortable column headers */
th:has(.th-sort) { padding: 0; }
.th-sort { display: inline-flex; align-items: center; gap: 6px; width: 100%; min-height: 44px; padding: 10px 12px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.th-sort:hover, .th-sort.on { color: var(--gold-hi); }
.th-sort:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.th-sort .arrow { font-size: 10px; }

/* Tooltips that follow the mouse pointer */
.tip.follow { position: fixed; right: auto; bottom: auto; transform: none; pointer-events: none; }

/* Your groups (homepage top right, this device only) */
.my-groups { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 14px; font-size: 16px; }
.my-group { display: inline-flex; align-items: center; gap: 4px; }
.my-group a { font-weight: 700; text-decoration: none; }
.my-group a:hover { text-decoration: underline; }
.pencil { color: var(--muted); flex: none; }
.forget { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 44px; margin-right: -8px; padding: 0; border: 0; background: none; color: var(--faint); font-size: 20px; line-height: 1; cursor: pointer; }
.forget:hover { color: var(--text); }
.forget:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
