/* =====================================================================
   Floorwardens — gold on plain dark
   Layout after aotc.gg: a slim top strip, a navigation bar with search,
   one centered column of rounded cards, and a link footer.
   A plain very dark page, flat near-black cards, gold for anything active or important.
   Flat on purpose: no glows, gradients, blur or drop shadows on the page (popovers keep a plain shadow).
   ===================================================================== */

/* ---------- design tokens ---------- */
:root {
  --font-sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-ui: var(--font-sans);

  /* surfaces: a plain, very dark page with slightly lighter cards on it */
  --page: #0a0a0b;
  --strip: #070708;
  --nav: #0f0f11;
  --card: #111113;
  --card-dark: #09090a; /* card headers and side menus, like aotc's */
  --raise: #0b0b0c;     /* rows and wells inside a card: darker than the card */
  --raise-2: #19191c;   /* controls */
  --popover: #0e0e10;
  --border: rgba(255, 255, 255, .06);
  --border-2: rgba(255, 255, 255, .09);
  --input: rgba(255, 255, 255, .08);

  /* gold */
  --gold: #e5b84c;
  --gold-hi: #f7d57a;
  --gold-dim: #a3843c;
  --gold-soft: rgba(229, 184, 76, .12);
  --gold-line: rgba(229, 184, 76, .4);

  --text: #ecebe7;
  --muted: #8f8f96;
  --dim: var(--muted);
  --label: #d4d2cc;
  --green: #3ee06a;
  --red: #ff5050;
  --blue: #5ea6ff;

  --radius: 12px;
  --radius-sm: 8px;
  --pop-shadow: 0 10px 30px rgba(0, 0, 0, .5);

  /* names older rules still use */
  --panel-bg: var(--card);
  --inset-bg: var(--raise);
  --sticky-bg: var(--card);
  --edge: var(--border-2);
  --edge-soft: var(--border);
  --edge-ctrl: rgba(255, 255, 255, .15);
  --row-hover: rgba(229, 184, 76, .06);

  /* availability. Unavailable is deliberately darker so open/tentative time stands out,
     which also keeps the states apart by brightness for red-green colorblind players. */
  --c-open: #34b94e;
  --c-tent: #e2a72a;
  --c-unav: #8f2b31;
  --c-unav-heat: #5a2126; /* in the guild-wide bars, "can't" is background: let open/tentative carry the chart */
  --c-none: rgba(255, 255, 255, .045);
  --hatch: linear-gradient(135deg, rgba(0, 0, 0, .17) 25%, transparent 25% 50%, rgba(0, 0, 0, .17) 50% 75%, transparent 75%);
  --cell-line: rgba(0, 0, 0, .65);
  --hour-line: rgba(255, 255, 255, .1);

  --ico-check: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 12.5l5 5L20 6.5' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  --ico-x: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 6l12 12M18 6L6 18' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round'/></svg>");
  --ico-q: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M8.5 8.6a3.6 3.6 0 1 1 5.4 3.1c-1.2.7-1.9 1.4-1.9 2.8' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'/><circle cx='12' cy='19' r='1.9' fill='white'/></svg>");
  --ico-erase: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 16l8-8 7 7-4 4H7z' fill='white'/><path d='M14 19h7' stroke='white' stroke-width='2.4' stroke-linecap='round'/></svg>");
  --ico-dark-check: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 12.5l5.2 5.2L20 6.5' fill='none' stroke='%23120e04' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  --ico-download: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M8 1.5v8M4.5 6.5 8 10l3.5-3.5' fill='none' stroke='%23e5b84c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/><path d='M2 11v3h12v-3' fill='none' stroke='%23e5b84c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  --dd-arrow: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M6 8l4 4 4-4' fill='none' stroke='%238f8f96' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>");

  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
b { color: #fff; font-weight: 500; }
a { color: var(--gold); }
.dim { color: var(--muted); }
kbd { font-family: inherit; }
:focus-visible { outline: 2px solid var(--gold-line); outline-offset: 2px; }
.mono, .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
th.num { font-family: var(--font-sans); }

* { scrollbar-width: thin; scrollbar-color: #2b2b31 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2b2b31; border: 2px solid var(--card); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }
::-webkit-scrollbar-corner { background: transparent; }

.wrap { width: 100%; max-width: 1550px; margin: 0 auto; padding: 0 24px; }

/* ---------- header: top strip ---------- */
.site-head { position: relative; z-index: 50; }
.topbar { background: var(--strip); border-bottom: 1px solid var(--border); }
.topbar-in { display: flex; align-items: center; gap: 14px; height: 40px; }
.brand { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; text-decoration: none; }
.brand-mark { display: block; width: 18px; height: 18px; }
.brand span {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
  color: #fff;
}
.brand:hover span { color: var(--gold); }
.topbar-sep { flex: 0 0 auto; width: 1px; height: 16px; background: var(--border-2); }
.realm-strip { display: flex; flex: 1 1 auto; align-items: center; gap: 18px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.realm-strip::-webkit-scrollbar { display: none; }
.realm-item { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; cursor: default; }
.realm-item.sel { color: #fff; }
.realm-item .rs { font-size: 11.5px; font-weight: 400; color: var(--muted); }
.dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: #55555c; }
.dot.on { background: var(--green); }
.dot.off { background: var(--red); }

/* clock (top right) */
.clock-pop { flex: 0 0 auto; margin-left: auto; }
.clock-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 10px;
  color: #fff;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}
.clock-btn:hover, .pop.open .clock-btn { background: rgba(255, 255, 255, .05); border-color: var(--border); }
.clock-now { font-family: var(--font-mono); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.clock-tag { font-size: 11.5px; color: var(--muted); }
.daynight { position: relative; flex: 0 0 auto; width: 14px; height: 14px; border-radius: 50%; }
.daynight.day { background: #ffcf33; }
.daynight.night { background: transparent; box-shadow: inset -4px -2px 0 0 #e9edf7; }
.clock-menu { width: 260px; }
.clock-day { margin: -4px 0 8px; font-size: 12.5px; color: var(--muted); }
.clock-list { display: grid; gap: 2px; }
.clock-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 5px 8px; border-radius: 6px; white-space: nowrap; }
.clock-row:first-child { background: var(--gold-soft); }
.clock-row .k { font-size: 13px; color: var(--label); }
.clock-row .v { font-family: var(--font-mono); font-size: 13px; color: #fff; font-variant-numeric: tabular-nums; }
.clock-row .z { margin-left: 5px; font-size: 11px; color: var(--muted); }
.clock-24 { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 13px; color: var(--label); }

/* ---------- header: navigation bar ---------- */
.navbar { background: var(--nav); border-bottom: 1px solid var(--border); }
.navbar-in { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.mainnav { display: flex; flex: 1 1 auto; align-items: center; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.mainnav::-webkit-scrollbar { display: none; }
.nav-link {
  flex: 0 0 auto;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 500;
  color: #c6c4bf;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 8px;
}
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, .045); }
.nav-link.active { color: var(--gold); background: var(--gold-soft); }

/* search (nav bar and hero) */
.search { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; }
.search-field { position: relative; flex: 1 1 auto; min-width: 0; }
.nav-search { flex: 0 1 280px; }
/* "All" left of the box (guild leader only): search every player on our realm, not just the guild */
.search-any { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--muted); cursor: pointer; user-select: none; }
.search-any[hidden] { display: none; }
.search-any:has(input:checked) { color: var(--gold); }
@media (min-width: 1240px) { .nav-search:has(.search-any:not([hidden])) { flex-basis: 330px; } } /* room for "All" without shrinking the box */
.search-ico { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search-input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 36px;
  font-size: 13.5px;
  color: #fff;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--input);
  border-radius: 10px;
}
.search-input::placeholder { color: #75757c; }
.search-input:focus { outline: none; border-color: var(--gold-line); }
.search-input::-webkit-search-cancel-button { filter: grayscale(1) brightness(1.6); }
.search-drop {
  position: absolute;
  z-index: 70;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 240px;
  max-height: 380px;
  overflow-y: auto;
  padding: 6px;
  text-align: left;
  background: var(--popover);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  box-shadow: var(--pop-shadow);
}
.sugg { display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: inherit; text-decoration: none; border-radius: 8px; }
.sugg:hover, .sugg.on { background: var(--gold-soft); }
.sugg .cname { font-weight: 500; }
.sugg-sub { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.sugg-note { padding: 8px 10px; font-size: 13px; color: var(--muted); }
.sugg-note .btn { margin-top: 8px; }
.sugg-all { display: block; margin-top: 4px; padding: 8px 10px; font-size: 12.5px; color: var(--gold); text-decoration: none; border-top: 1px solid var(--border); }
.sugg-all:hover { color: var(--gold-hi); }
.sugg-head { padding: 8px 10px 3px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sugg-head:not(:first-child) { margin-top: 4px; border-top: 1px solid var(--border); padding-top: 10px; }
.sugg-guild { color: #9d9b96; }

/* account (logged-in chip with a menu, or the login button) */
.account { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.acct-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 230px;
  height: 40px;
  padding: 0 10px 0 4px;
  background: var(--raise);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  cursor: pointer;
}
.acct-btn:hover, .pop.open .acct-btn { border-color: var(--gold-line); }
.acct-avatar { flex: 0 0 auto; width: 30px; height: 30px; object-fit: cover; border-radius: 50%; background: #1d1d22; }
.acct-name { min-width: 0; overflow: hidden; font-size: 13.5px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.acct-caret { flex: 0 0 auto; width: 12px; height: 12px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.badge { flex: 0 0 auto; padding: 0 6px; font-size: 11px; font-weight: 600; line-height: 18px; border-radius: 9px; }
.badge.gold { color: #1a1406; background: var(--gold); }
.badge.warn { color: var(--gold); background: var(--gold-soft); }
.badge.bad { color: #ff8a8a; background: rgba(255, 80, 80, .12); }
.acct-menu { width: 300px; }
.acct-who { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.acct-who .acct-avatar { width: 44px; height: 44px; }
.acct-who-name { font-size: 16px; font-weight: 600; line-height: 1.2; }
.acct-who-sub { font-size: 12.5px; color: var(--muted); }
.acct-status { margin: 0 0 10px; padding: 6px 10px; font-size: 13px; text-align: center; border-radius: 8px; }
.acct-status.pending { color: var(--gold); background: var(--gold-soft); }
.acct-status.denied { color: #ff8a8a; background: rgba(255, 80, 80, .08); }
.acct-hint { margin: 0 0 8px; font-size: 13px; color: var(--gold); }
.acct-bars { display: grid; gap: 6px; margin-bottom: 10px; }
.menu-list { display: grid; gap: 2px; margin: 0 -4px; padding-top: 8px; border-top: 1px solid var(--border); }
.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  font-size: 13.5px;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.menu-item:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.menu-item .badge { margin-left: auto; }
.menu-item.danger { color: #ff7a7a; }
.menu-item.danger:hover { background: rgba(255, 80, 80, .08); }
.menu-item.discord { color: #aab2ff; }
.acct-initial { display: grid; place-items: center; font-size: 14px; font-weight: 600; color: var(--gold); }
.acct-who .acct-initial { font-size: 18px; }
.lg-short { display: none; }
@media (max-width: 640px) { .lg-long { display: none; } .lg-short { display: inline; } }

/* popovers (clock, account) */
.pop { position: relative; }
.pop-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 8px);
  right: 0;
  display: none;
  padding: 14px;
  background: var(--popover);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  box-shadow: var(--pop-shadow);
}
.pop.open .pop-menu { display: block; }
.pop-title { margin-bottom: 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }

/* ---------- page ---------- */
.page { flex: 1 0 auto; padding-top: 24px; padding-bottom: 56px; }
.panel { position: relative; z-index: 1; }
.panel > * + * { margin-top: 16px; }

/* hero (Guild Week only) */
.hero {
  position: relative;
  z-index: 2;
  margin-bottom: 20px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.hero-in { padding: 40px 24px 30px; }
.eyebrow { margin: 0 0 4px; font-size: 14px; font-weight: 500; color: var(--gold); }
.hero-title {
  margin: 0;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.01em;
  color: #fff;
}
.hero-sub { max-width: 640px; margin: 10px auto 0; font-size: 15.5px; color: #d6d3cc; }
.hero-search { max-width: 560px; margin: 22px auto 0; }
.hero-search .search-input { height: 46px; font-size: 14.5px; background: rgba(0, 0, 0, .5); }
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 0;
  padding: 10px 16px;
  font-size: 12.5px;
  color: var(--muted);
  background: #040405;
  border-top: 1px solid var(--border);
  border-radius: 0 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px);
}
.hero-stats:empty { display: none; }
.hero-stats > span { white-space: nowrap; }
.hero-stats > span + span::before { content: "·"; margin: 0 12px; color: #4a4a50; }
.hero-stats b { margin-left: 6px; font-family: var(--font-mono); font-weight: 500; color: var(--gold); }

.page-head { margin: 4px 0 20px; }
.page-title { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; color: #fff; }
.page-sub { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.page-head .page-sub:empty { display: none; }

/* ---------- cards ---------- */
.card, .subframe, .frame, .locked {
  position: relative;
  min-width: 0;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.card { padding: 20px; }
.subframe { padding: 16px 18px; }
.subframe + .subframe { margin-top: 14px; }
.card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; margin-bottom: 16px; }
.card-head > div:first-child { flex: 1 1 260px; min-width: 0; }
.card-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; color: #fff; }
.card-sub { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.card-count { font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--gold); }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.subframe-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
}
.subframe-title .dim { font-size: 13px; font-weight: 400; }
.inset { min-width: 0; padding: 12px; background: var(--raise); border: 1px solid var(--border); border-radius: 10px; }
.hint { margin: 10px 2px 0; font-size: 12.5px; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 90px;
  height: 36px;
  padding: 0 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  background: var(--raise-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .15s, color .15s, background-color .15s;
}
.btn:hover { color: var(--gold-hi); border-color: var(--gold-line); background: #1e1e22; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-small { min-width: 0; height: 30px; padding: 0 11px; font-size: 12.5px; }
.btn-primary { color: #161106; font-weight: 600; background: var(--gold); border-color: var(--gold); }
.btn-primary:hover { color: #000; background: var(--gold-hi); border-color: var(--gold-hi); }
.btn-discord { color: #fff; background: #5865f2; border-color: #6d78ff; }
.btn-discord:hover { color: #fff; background: #6874ff; border-color: #a9b0ff; }
.btn-join { color: #fff; background: #4e5bd6; border-color: #7c86f3; }
.btn-join:hover { color: #fff; background: #5d6af0; border-color: #a9b0ff; }
/* local-testing placeholder where the Join button will go */
.btn-join-missing, .btn-join-missing:hover { height: auto; padding: 6px 10px; font-size: 12px; white-space: normal; color: var(--muted); background: transparent; border: 1px dashed #5865f2; cursor: help; }
.btn-join-missing:active { transform: none; }
.arrow-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  font-size: 10px;
  line-height: 1;
  color: var(--gold);
  background: var(--raise-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.arrow-btn:hover { border-color: var(--gold-line); }
.link-btn { padding: 0; font-size: 12.5px; color: #ff7a7a; text-decoration: underline; text-underline-offset: 2px; background: none; border: 0; cursor: pointer; }
.link-btn:hover { color: #ff4d4d; }

/* ---------- form controls ---------- */
.wow-select, .wow-input {
  height: 36px;
  max-width: 100%;
  padding: 0 11px;
  font-size: 13.5px;
  color: #fff;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--input);
  border-radius: var(--radius-sm);
}
.wow-select { appearance: none; -webkit-appearance: none; padding-right: 30px; background: var(--dd-arrow) right 9px center / 15px no-repeat, rgba(255, 255, 255, .03); cursor: pointer; }
.wow-select option, .wow-select optgroup { background: #121215; color: #fff; }
.wow-input::placeholder { color: #6b6b72; }
.wow-input:focus, .wow-select:focus { outline: none; border-color: var(--gold-line); }
textarea.wow-input { height: auto; padding: 8px 11px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.field.inline { flex-direction: row; align-items: center; gap: 8px; }
.field.grow { flex: 1 1 200px; }
.wow-check, .radio input, .check input {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  display: inline-grid;
  place-content: center;
  width: 16px;
  height: 16px;
  margin: 0;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 4px;
  cursor: pointer;
}
.radio input { border-radius: 50%; }
.wow-check:checked, .check input:checked { background: var(--gold) var(--ico-dark-check) center / 12px no-repeat; border-color: var(--gold); }
.radio input:checked { background: radial-gradient(circle, #141008 0 3px, var(--gold) 3.5px); border-color: var(--gold); }
.radio, .check { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 13.5px; cursor: pointer; }

/* ---------- toolbar / legend ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; margin-bottom: 16px; }
.toolbar .wow-select { max-width: 300px; }
.week-nav { display: flex; align-items: center; gap: 8px; }
.week-label { min-width: 230px; font-size: 14px; font-weight: 500; text-align: center; color: #fff; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-left: auto; padding-bottom: 7px; font-size: 12.5px; color: var(--label); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 12px; height: 12px; border: 1px solid #000; border-radius: 3px; }
.sw-o { background: var(--c-open); }
.sw-t { background: var(--hatch) 0 0 / 6px 6px, var(--c-tent); }
.sw-u { background: var(--c-unav-heat); }
.sw-n { background: var(--c-none); border-color: #55555c; }

/* ---------- time grids ---------- */
.grid-scroll { overflow-x: auto; overflow-y: hidden; padding-bottom: 2px; }
.tgrid {
  --label-w: 112px;
  --cell-w: 15px;
  --cell-h: 26px;
  display: grid;
  grid-template-columns: var(--label-w) repeat(48, minmax(var(--cell-w), 1fr));
  row-gap: 3px;
  min-width: calc(var(--label-w) + 48 * var(--cell-w));
  container-type: inline-size; /* lets blocks know the row width, to line up tentative stripes */
  user-select: none;
  -webkit-user-select: none;
}
.tgrid.heat { --cell-h: 42px; }
.tgrid.editor { --cell-h: 34px; }
/* An empty or locked grid holds just a message: it must fit the card, not the 48-column width. */
.tgrid.is-empty { display: block; min-width: 0; }
.tg-corner { position: sticky; left: 0; z-index: 2; background: var(--sticky-bg); }
.tg-hour {
  grid-column: span 2;
  padding: 0 0 3px 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  border-left: 1px solid var(--hour-line);
  white-space: nowrap;
  overflow: hidden;
}
.tg-label {
  position: sticky;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding-right: 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--label);
  white-space: nowrap;
  background: var(--sticky-bg);
}
.tg-label .lbl-main { overflow: hidden; text-overflow: ellipsis; }
.tg-label .lbl-sub { flex: 0 0 auto; margin-left: auto; font-size: 11px; font-weight: 400; color: var(--muted); }
.tg-label.today .lbl-main { color: var(--gold); }
.tg-label.today::before { content: ""; width: 0; height: 0; margin-right: -4px; border: 5px solid transparent; border-left-color: var(--gold); }
.tg-sep { grid-column: 1 / -1; height: 1px; margin: 4px 0; background: var(--border); }
.cell {
  position: relative;
  height: var(--cell-h);
  background-color: var(--c-none);
  border-top: 1px solid var(--cell-line);
  border-bottom: 1px solid var(--cell-line);
  border-right: 1px solid var(--cell-line);
}
.cell.hr { box-shadow: inset 1px 0 0 rgba(255, 255, 255, .1); }
.cell:hover { z-index: 3; outline: 1px solid #fff; }
.cell:hover::before { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, .22); pointer-events: none; }
.cell.s-o, .cell.s-t, .cell.s-u { box-shadow: none; }
.cell.s-o { background-color: var(--c-open); }
.cell.s-u { background-color: var(--c-unav); }
.cell.s-t {
  background-color: var(--c-tent);
  background-image: var(--hatch);
  background-size: 10px 10px;
  /* shift each block's stripes by its place in the row so they run unbroken across a painted stretch */
  background-position: calc((100cqw - var(--label-w)) / -48 * var(--s, 0)) 0;
}
/* blocks that run on into the same state read as one bar: just faint hour / half-hour ticks inside */
.cell.jr { border-right-color: rgba(0, 0, 0, .34); }
.cell.jr.hr { border-right-color: rgba(0, 0, 0, .12); }
.heat .cell, .cell.heat-cell {
  cursor: pointer;
  background: linear-gradient(to top,
    var(--c-open) 0 calc(var(--o, 0) * 100%),
    var(--c-tent) 0 calc((var(--o, 0) + var(--t, 0)) * 100%),
    var(--c-unav-heat) 0 calc((var(--o, 0) + var(--t, 0) + var(--u, 0)) * 100%),
    var(--c-none) 0);
}
.cell.best { z-index: 2; outline: 2px solid var(--gold); outline-offset: -1px; }
.cell.now::after {
  content: "";
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: var(--now-x, 50%);
  width: 2px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .55);
  pointer-events: none;
}
.editor .cell { cursor: crosshair; touch-action: none; }
.editor .tg-label, .editor .tg-hour { cursor: pointer; }
.editor .tg-label:hover, .editor .tg-hour:hover { color: #fff; }
.empty-state { padding: 32px 10px; text-align: center; color: var(--muted); }
.empty-state .btn { margin: 12px 4px 0; }
.role { flex: 0 0 auto; display: inline-block; width: 15px; height: 15px; vertical-align: -3px; }

/* ---------- best raid times (ranked like a leaderboard) ---------- */
.best-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.best-list li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
  padding: 10px 12px;
  background: var(--raise);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s;
}
.best-list li:hover { border-color: var(--gold-line); }
.best-list li.active { background: var(--gold-soft); border-color: var(--gold-line); }
.rank, .lb-list li::before {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border-2);
  border-radius: 7px;
}
.best-list li:nth-child(1) .rank, .lb-list li:nth-child(1)::before { color: #f6d06c; background: rgba(229, 184, 76, .14); border-color: rgba(229, 184, 76, .5); }
.best-list li:nth-child(2) .rank, .lb-list li:nth-child(2)::before { color: #dfe3ea; background: rgba(205, 210, 220, .1); border-color: rgba(205, 210, 220, .38); }
.best-list li:nth-child(3) .rank, .lb-list li:nth-child(3)::before { color: #e8a065; background: rgba(205, 127, 50, .13); border-color: rgba(205, 127, 50, .5); }
.best-list .when { font-size: 14px; font-weight: 500; color: #fff; }
.best-list .counts { font-size: 12.5px; text-align: right; white-space: nowrap; }
.best-list .counts .o { color: var(--green); }
.best-list .counts .t { color: var(--gold); }
.best-list .none { display: block; padding: 14px; font-size: 13px; color: var(--muted); text-align: center; background: none; border-style: dashed; cursor: default; }

/* ---------- members ---------- */
.member-tools { display: flex; gap: 6px; }
.member-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 2px 10px; margin: 0; padding: 0; list-style: none; }
.member-list li { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 5px 8px; font-size: 13.5px; border-radius: 7px; }
.member-list li:hover { background: var(--row-hover); }
.member-list label { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; cursor: pointer; }
.member-list .cname { overflow: hidden; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.member-list .tz { flex: 0 0 auto; margin-left: auto; font-size: 11px; color: var(--muted); }
.member-list .rm, .member-list .rk { flex: 0 0 auto; display: grid; place-items: center; width: 20px; height: 20px; padding: 0; line-height: 1; border-radius: 5px; cursor: pointer; }
.member-list .rm { font-size: 13px; color: #ff7a7a; background: rgba(255, 80, 80, .08); border: 1px solid rgba(255, 80, 80, .35); }
.member-list .rm:hover { color: #fff; background: #8a1d1d; }
/* Guild ranks: a small tag after the name; the leader's promote/demote button sits by the × */
.rank-tag { flex: 0 0 auto; padding: 0 5px; font-size: 10px; font-weight: 600; line-height: 15px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; border: 1px solid; border-radius: 4px; }
/* The leader sees two buttons on every row, so their list gets wider columns to keep names readable. */
.member-list.lead { grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); }
.rank-leader { color: var(--gold); background: rgba(229, 184, 76, .1); border-color: rgba(229, 184, 76, .45); }
.rank-officer { color: #c9d3e6; background: rgba(150, 170, 210, .08); border-color: rgba(150, 170, 210, .35); }
.member-list .rk { font-size: 9px; color: var(--gold); background: var(--gold-soft); border: 1px solid rgba(229, 184, 76, .4); }
.member-list .rk:hover { color: #000; background: var(--gold); }

/* ---------- my schedule editor ---------- */
.profile-row { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 16px; }
.profile-row .field:not(.grow) { flex: 0 1 180px; }
.profile-row .field.roles-field { flex: 0 0 auto; }
.field > span .dim { font-size: 11.5px; font-weight: 400; }
.role-checks { display: flex; gap: 6px; }
.role-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px 0 10px;
  font-size: 13.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--input);
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
}
.role-check:hover { color: #fff; border-color: var(--gold-line); }
.role-check:has(input:checked) { color: #fff; background: var(--gold-soft); border-color: var(--gold); }
.role-check .role { width: 16px; height: 16px; }
.role-icons { display: inline-flex; flex: 0 0 auto; gap: 2px; }
/* fixed slot for up to three icons so names line up in lists */
.tg-label .role-icons, .member-list .role-icons { width: 49px; }
.tz-caption { flex: 1 1 auto; margin: 0; font-size: 13.5px; color: var(--muted); text-align: center; }
.tz-notice .wow-select { width: auto; max-width: 340px; }
.tz-notice, .approval-notice { margin: 0 0 16px; padding: 9px 12px; font-size: 13.5px; border: 1px solid; border-radius: 10px; }
.tz-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--gold); background: var(--gold-soft); border-color: rgba(229, 184, 76, .35); }
.approval-notice.pending { color: var(--gold); background: var(--gold-soft); border-color: rgba(229, 184, 76, .35); }
.approval-notice.denied { color: #ff8a8a; background: rgba(255, 80, 80, .06); border-color: rgba(255, 80, 80, .35); }
.approval-notice b { color: inherit; font-weight: 600; }
.approval-notice p { margin: 0; }
.approval-notice.optional { color: var(--label); background: var(--raise); border-color: var(--border-2); }
/* Guild check: prove in game that your character is yours and in the guild (src/guildCheck.js) */
.gc { margin-top: 10px; padding: 10px 12px; color: var(--text); background: var(--raise); border: 1px solid var(--border-2); border-radius: 8px; }
.approval-notice.optional .gc { margin-top: 0; padding: 0; background: none; border: 0; }
.gc-head { margin-bottom: 4px; }
.gc-head b { color: var(--gold); }
.gc-sub { color: var(--muted); font-size: 12.5px; }
.gc-steps { margin: 6px 0 8px; padding-left: 20px; display: grid; gap: 5px; }
.gc-steps .gc-sub { display: block; }
.gc-item { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; vertical-align: middle; }
.gc-icon { width: 22px; height: 22px; border: 1px solid #000; border-radius: 4px; }
.gc-actions, .gc-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gc-form { margin-top: 8px; }
.gc-form .wow-input { flex: 1 1 220px; min-width: 0; max-width: 340px; }
.gc-msg { margin: 8px 0 0 !important; font-size: 13px; }
.gc-msg.ok { color: var(--green); }
.gc-msg.warn { color: var(--gold); }
.gc-msg.bad { color: #ff8a8a; }
.appr-ok { font-size: 12.5px; color: var(--green); overflow-wrap: anywhere; }
#pf-character.verified { color: var(--green); }
.editor-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.editor-actions { display: flex; gap: 8px; }
.action-bar { display: flex; gap: 6px; padding: 5px; background: rgba(255, 255, 255, .025); border: 1px solid var(--border); border-radius: 12px; }
.action-btn {
  position: relative;
  width: 50px;
  height: 50px;
  padding: 0;
  overflow: hidden;
  background: #000;
  border: 1px solid #000;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--edge-ctrl);
  cursor: pointer;
}
.action-btn .ico { position: absolute; inset: 1px; border-radius: 7px; }
/* brushes look exactly like the blocks they paint */
.ico-o { background: var(--ico-check) center 40% / 26px no-repeat, var(--c-open); }
.ico-t { background: var(--ico-q) center 40% / 26px no-repeat, var(--hatch) 0 0 / 10px 10px, var(--c-tent); }
.ico-u { background: var(--ico-x) center 40% / 24px no-repeat, var(--c-unav); }
.ico-e { background: var(--ico-erase) center 40% / 24px no-repeat, #45454a; }
.action-btn kbd { position: absolute; top: 1px; right: 5px; font-size: 11px; color: #e6e6e6; text-shadow: 1px 1px 0 #000; }
.action-btn .ab-label { position: absolute; left: 0; right: 0; bottom: 2px; font-size: 10px; font-weight: 500; color: #fff; text-align: center; text-shadow: 1px 1px 0 #000; }
.action-btn:hover::after { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, .15); }
.action-btn[aria-checked="true"] { box-shadow: 0 0 0 2px var(--gold); }
.save-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.mine-summary { margin-right: auto; font-size: 13.5px; }
.mine-summary .o { color: var(--green); }
.mine-summary .t { color: var(--gold); }
.mine-summary .u { color: var(--red); }
.dirty { color: var(--gold); animation: pulse 1.6s ease-in-out infinite; }
.danger-row { margin-top: 10px; text-align: right; }
@keyframes pulse { 50% { opacity: .45; } }

.locked { max-width: 560px; margin: 24px auto; padding: 30px 26px; text-align: center; }
.locked h3 { margin: 0 0 8px; font-size: 20px; font-weight: 600; color: #fff; }
.locked p { margin: 0 0 18px; color: #c9c7c2; }
.dev-login { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--border-2); }
.dev-login .dim { width: 100%; font-size: 12.5px; }

/* ---------- availability bars (account menu) ---------- */
.bar { position: relative; height: 20px; overflow: hidden; background: rgba(255, 255, 255, .04); border: 1px solid var(--border); border-radius: 6px; }
.bar .fill { position: absolute; inset: 0 auto 0 0; width: var(--pct, 0%); transition: width .5s ease; }
.bar.open .fill { background: var(--c-open); }
.bar.tent .fill { background: var(--hatch) 0 0 / 10px 10px, var(--c-tent); }
.bar-text { position: relative; z-index: 1; display: block; font-size: 12px; font-weight: 500; line-height: 18px; text-align: center; color: #fff; text-shadow: 0 1px 2px #000, 0 0 3px #000; white-space: nowrap; }

/* ---------- footer ---------- */
.site-foot { margin-top: auto; background: var(--card); border-top: 1px solid var(--border); }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 24px 32px; padding-top: 30px; padding-bottom: 26px; }
.foot-col { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.foot-col a { font-size: 13px; color: #c6c4bf; text-decoration: none; }
.foot-col a:hover { color: var(--gold); }
.foot-h { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 13px; font-weight: 600; color: #fff; }
.foot-line { border-top: 1px solid var(--border); }
.foot-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; padding-top: 16px; padding-bottom: 22px; font-size: 12px; color: #6f6f76; }
.foot-bottom p { margin: 0; }
.foot-brand { font-weight: 600; color: var(--gold); }
.dev-links { width: 100%; font-size: 12px; color: var(--muted); }
.dev-links .link-btn { font-size: 12px; color: var(--gold-dim); }
.dev-links .link-btn:hover { color: var(--gold); }

/* Download Links window (officers) */
.dlx-note-wrap { display: flex; flex-direction: column; gap: 5px; margin: 14px 0 0; }
.dlx-label { font-size: 13px; color: var(--label); }
.dlx-label .dim { font-size: 12px; }
.dlx-note-wrap .wow-input { width: 100%; max-width: 280px; height: 34px; }
.dlx-opts { display: flex; flex-direction: column; gap: 0; margin: 12px 0 0; padding: 8px 10px; background: var(--raise); border: 1px solid var(--border); border-radius: 8px; }
.dlx-opts .check { font-size: 13.5px; }
.dlx-opt-hint { margin: 4px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.dlx-files { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.dlx-file { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--border); }
.dlx-ico, .dlp-ico { flex: 0 0 auto; width: 16px; height: 16px; background: var(--ico-download) center / contain no-repeat; }
.dlx-name { flex: 1 1 auto; min-width: 0; overflow: hidden; font-size: 14.5px; font-weight: 500; color: #fff; text-overflow: ellipsis; white-space: nowrap; }
.dlx-size { flex: 0 0 auto; font-size: 12.5px; color: var(--muted); }
.dlx-new { margin: 14px 0 0; padding: 12px; background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: 10px; }
.dlx-new-h { margin: 0 0 8px; font-size: 13.5px; font-weight: 600; color: var(--gold); }
.dlx-copy { display: flex; gap: 6px; }
.dlx-copy .wow-input { flex: 1 1 auto; min-width: 0; height: 32px; font-family: 'Geist Mono', ui-monospace, monospace; font-size: 12.5px; }
.dlx-tip { margin: 8px 0 0; font-size: 12.5px; color: var(--label); }
.dlx-for { font-weight: 400; color: var(--muted); }
.dlx-used { color: var(--green); }
.dlx .appr-name { white-space: normal; overflow-wrap: anywhere; }

.dlx-tabs { margin: 14px 0 2px; }
.dlx-msg { display: block; width: 100%; min-height: 76px; overflow: hidden; margin: 0 0 10px; font-size: 13px; line-height: 1.5; color: #fff; resize: none; }
.dlx-new-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.dlx-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0 0; }
.dlx-upload .dim { font-size: 12.5px; }
.dlx-progress { margin: 12px 0 0; padding: 10px 12px; background: var(--raise); border: 1px solid var(--border); border-radius: 10px; }
.dlx-progress-t { margin: 0 0 7px; overflow: hidden; font-size: 13px; color: var(--label); text-overflow: ellipsis; white-space: nowrap; }
.dlx-progress-t b { color: var(--gold); }
.dlx-bar { height: 6px; overflow: hidden; background: var(--raise-2); border-radius: 3px; }
.dlx-bar i { display: block; height: 100%; background: var(--gold); transition: width .2s; }
.dlx-mfiles { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.dlx-mfile { display: flex; flex-direction: column; gap: 9px; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.dlx-mtop { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dlx-access { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; padding: 8px 10px; background: var(--raise); border: 1px solid var(--border); border-radius: 8px; }
.dlx-access .dlx-label { flex: 1 1 100%; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.dlx-access .check { font-size: 13px; }
.dlx-picks { display: flex; flex: 1 1 100%; flex-wrap: wrap; gap: 0 14px; padding: 2px 0 0 0; border-top: 1px solid var(--border); }
.dlx-picks .dim { padding: 4px 0; font-size: 12.5px; }
.dlx-only { flex: 1 1 100%; font-size: 12.5px; color: var(--gold); }
.dlx-mbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.dlx-del:hover { color: #ff8a8a; border-color: rgba(255, 80, 80, .45); }
.ask-input { width: 100%; height: 38px; margin: -6px 0 16px; text-align: left; }

/* Share download (top right, officers and the guild leader) */
.nav-share {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px 0 12px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  border-radius: 10px;
  cursor: pointer;
}
.nav-share:hover { color: var(--gold-hi); background: rgba(229, 184, 76, .18); }
.dl-svg { flex: 0 0 auto; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 640px) { .nav-share { gap: 6px; padding: 0 11px; } }
/* Phones: a file's name and size on one line, its Download and Share buttons side by side under it */
@media (max-width: 640px) {
  .dlx-file { flex-wrap: wrap; row-gap: 8px; }
  .dlx-file .dlx-name { flex: 1 1 calc(100% - 100px); }
  .dlx-file .btn { flex: 1 1 0; height: 36px; }
}

/* One-use download page (/dl/...), rendered by the server */
.dlp-body { min-height: 100vh; }
.dlp { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; max-width: 520px; margin: 0 auto; padding: 48px 16px 32px; }
.dlp-brand { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 600; color: #fff; text-decoration: none; }
.dlp-brand:hover { color: var(--gold); }
.dlp-card { width: 100%; padding: 24px 22px; background: var(--card); border: 1px solid var(--border-2); border-radius: var(--radius); }
.dlp-card > :last-child { margin-bottom: 0; }
.dlp-eyebrow { margin: 0 0 4px; font-size: 13px; font-weight: 500; color: var(--gold); }
.dlp-h { margin: 0 0 14px; font-size: 21px; font-weight: 600; line-height: 1.25; color: #fff; }
.dlp-p { margin: 0 0 16px; font-size: 14.5px; line-height: 1.55; color: var(--label); }
.dlp-file { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 12px 14px; background: var(--raise); border: 1px solid var(--border); border-radius: 10px; }
.dlp-name { flex: 1 1 auto; min-width: 0; overflow: hidden; font-size: 15px; font-weight: 500; color: #fff; text-overflow: ellipsis; white-space: nowrap; }
.dlp-size { flex: 0 0 auto; font-size: 13px; color: var(--muted); }
.dlp-terms { margin: 0 0 20px; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.dlp-terms li { padding: 10px 2px; font-size: 14px; line-height: 1.5; color: var(--label); border-bottom: 1px solid var(--border); }
.dlp-terms b { display: block; margin: 0 0 2px; font-weight: 600; color: #fff; }
.dlp-terms code { padding: 0 4px; font-family: 'Geist Mono', ui-monospace, monospace; font-size: 12.5px; color: #fff; background: var(--raise-2); border-radius: 4px; }
.dlp-go { width: 100%; height: 44px; font-size: 15px; }
a.dlp-go { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.dlp-small { margin: 12px 0 0; font-size: 12.5px; text-align: center; color: var(--muted); }
.dlp-foot { margin: 0; font-size: 12px; text-align: center; color: #6f6f76; }

/* Join our Discord, bottom right */
.discord-fab {
  position: fixed;
  z-index: 40;
  right: 22px;
  bottom: 22px;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #fff;
  background: #5865f2;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .45);
  transition: background-color .15s;
}
.discord-fab:hover { background: #6874ff; }
.discord-fab svg { width: 28px; height: 28px; fill: currentColor; }

/* ---------- tooltip ---------- */
.game-tooltip {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  max-width: 330px;
  padding: 9px 12px 10px;
  pointer-events: none;
  font-size: 13px;
  line-height: 1.42;
  color: var(--gold);
  background: rgba(12, 12, 14, .97);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  box-shadow: var(--pop-shadow);
  will-change: transform;
  contain: layout paint style;
}
.tt-title { margin-bottom: 1px; font-size: 15px; font-weight: 500; color: #fff; }
.tt-white { color: #fff; }
.tt-dim { color: var(--muted); }
.tt-green { color: var(--green); }
.tt-red { color: var(--red); }
.tt-yellow { color: var(--gold); }
.tt-sec { margin-top: 6px; }
.tt-names { display: flex; flex-wrap: wrap; gap: 0 9px; }
.tt-row { display: flex; justify-content: space-between; gap: 16px; }
.tt-row > :last-child { color: #fff; }
/* A status line with its icon (the Guild Tree's player tooltip). */
.tt-ic { display: flex; align-items: center; gap: 7px; color: #fff; }
.tt-ic svg { flex: none; width: 14px; height: 14px; }

/* ---------- center-screen messages ---------- */
.ui-errors { position: fixed; top: 15vh; left: 0; right: 0; z-index: 2000; text-align: center; pointer-events: none; }
.ui-errors div {
  padding: 0 16px;
  font-size: 19px;
  font-weight: 600;
  color: #ff3b3b;
  text-shadow: 0 1px 2px #000, 0 0 6px #000;
  animation: uierr 4.5s forwards;
}
.ui-errors div.info { color: var(--gold); }
@keyframes uierr { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- dialogs ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 1500; display: grid; place-items: center; padding: 30px 16px; overflow-y: auto; background: rgba(0, 0, 0, .7); }
.frame { background: var(--popover); box-shadow: var(--pop-shadow); border-color: var(--border-2); }
.dialog { width: min(420px, 100%); padding: 20px; }
.frame-header { margin: 0 0 14px; padding: 0 0 12px; border-bottom: 1px solid var(--border); }
.frame-header h2 { margin: 0; font-size: 17px; font-weight: 600; color: #fff; }
.panel-corner { position: absolute; z-index: 4; top: 22px; right: 20px; }
.panel-corner.link-btn { font-size: 13px; color: var(--muted); text-decoration: none; }
.panel-corner.link-btn:hover { color: var(--gold); }
.popup { width: min(380px, 100%); padding: 24px 22px 20px; text-align: center; }
.popup-text { margin: 0 0 18px; font-size: 15px; color: #fff; }
.popup-btns { display: flex; justify-content: center; gap: 10px; }
/* Roster Approvals window (guild leader) */
.approvals { width: min(560px, 100%); }
.appr-intro { margin: 0 0 4px; font-size: 13.5px; color: var(--muted); }
.appr-h { margin: 16px 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.appr-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.appr-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--border); }
.appr-avatar { flex: 0 0 auto; width: 34px; height: 34px; object-fit: cover; background: #1d1d22; border-radius: 50%; }
.appr-who { flex: 1 1 auto; min-width: 0; }
.appr-name, .appr-sub { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.appr-name { font-size: 14.5px; font-weight: 500; color: #fff; }
.appr-sub { font-size: 12.5px; }
.appr-ident { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.appr-warn { margin-top: 2px; font-size: 12.5px; color: #ff7a7a; }
.appr-btns { display: flex; flex: 0 0 auto; gap: 6px; }
.appr-empty { margin: 0; padding: 4px; font-size: 13.5px; color: var(--muted); }

/* ---------- class colors ---------- */
.c-warrior { color: #c69b6d; } .c-paladin { color: #f48cba; } .c-hunter { color: #aad372; }
.c-rogue { color: #fff468; } .c-priest { color: #ffffff; } .c-shaman { color: #0070dd; }
.c-mage { color: #3fc7eb; } .c-warlock { color: #8788ee; } .c-druid { color: #ff7c0a; }
.c-none { color: #e6e4df; }

/* =====================================================================
   Layout by screen size
   ===================================================================== */
/* Desktop: the navigation bar stays on screen while you scroll (the top strip scrolls away). */
@media (min-width: 1001px) {
  .site-head { position: sticky; top: -41px; }
}
@media (min-width: 1001px) and (min-height: 820px) {
  .tgrid.heat { --cell-h: clamp(40px, calc((100vh - 620px) / 7), 56px); }
}
/* Wide desktop, everything on one row: the page links never shrink (none get cut off); the search box gives up
   the room instead, and the officers' Share button says just "Share" (its icon is the download arrow). */
@media (min-width: 1240px) {
  .mainnav { flex: 1 0 auto; }
  .acct-btn { max-width: 200px; }
}
@media (min-width: 1240px), (max-width: 760px) {
  .nav-share .lg-long { display: none; }
  .nav-share .lg-short { display: inline; }
}
/* Smaller desktop and tablet: the navigation links get their own row under search and account. */
@media (max-width: 1239px) {
  .navbar-in { flex-wrap: wrap; gap: 10px 10px; min-height: 0; padding-top: 10px; padding-bottom: 6px; }
  .nav-search { order: 1; flex: 1 1 200px; }
  .account { order: 2; margin-left: auto; }
  .mainnav { order: 3; flex: 1 1 100%; margin: 0 -24px; padding: 0 20px 2px; }
}
/* Seven links: compact from 860px down, and short labels ("Roster", "Schedule", "Leaders", "Blue") from 750px. */
.nl-s { display: none; }
@media (max-width: 860px) { .nav-link { padding: 7px 10px; font-size: 13.5px; } }
@media (max-width: 750px) { .nl-l { display: none; } .nl-s { display: inline; } }
@media (max-width: 760px) {
  .nav-link { padding: 7px 10px; font-size: 13.5px; }
}
@media (max-width: 1000px) {
  .card-grid { grid-template-columns: minmax(0, 1fr); }
  .legend { margin-left: 0; padding-bottom: 0; }
}
/* Phone */
@media (max-width: 640px) {
  .wrap { padding-left: 14px; padding-right: 14px; }
  .topbar-in { gap: 10px; }
  .brand span { font-size: 14px; }
  .realm-strip { gap: 14px; }
  .clock-tag { display: none; }
  .realm-item .rw { display: none; } /* "PvP Online": room for the clock */
  .clock-btn { padding: 0 6px; }
  .mainnav { margin: 0 -14px; padding: 0 10px 2px; }
  .acct-btn { max-width: 150px; }
  .acct-menu { width: min(300px, calc(100vw - 28px)); }
  .page { padding-top: 16px; padding-bottom: 40px; }
  .hero-in { padding: 28px 16px 22px; }
  .hero-title { font-size: 28px; }
  .hero-sub { font-size: 14px; }
  .hero-search { margin-top: 18px; }
  .hero-stats { font-size: 12px; }
  .hero-stats { gap: 2px 16px; }
  .hero-stats > span + span::before { display: none; }
  .page-title { font-size: 22px; }
  .card { padding: 14px; }
  .subframe { padding: 14px; }
  .card-title { font-size: 15px; }
  .tgrid { --label-w: 96px; --cell-w: 13px; }
  .tg-label { font-size: 11.5px; }
  .tg-label .lbl-sub { display: none; }
  .week-label { min-width: 0; font-size: 13.5px; }
  .profile-row .field:not(.grow) { flex: 1 1 140px; }
  .toolbar .wow-select { max-width: 100%; }
  .best-list li { grid-template-columns: 30px minmax(0, 1fr); }
  .best-list .counts { grid-column: 2; text-align: left; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; }
  .discord-fab { right: 14px; bottom: 14px; width: 46px; height: 46px; }
  .discord-fab svg { width: 24px; height: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =====================================================================
   Guild Armory and character pages (client/sim)
   ===================================================================== */
.sim-loading { padding: 22px; color: var(--muted); text-align: center; }
.btn-bnet { color: #fff; background: #0e1a2b; border-color: #148eff; }
.btn-bnet:hover { color: #fff; background: #13243b; border-color: #5cb2ff; }
.sim-link .hint { margin-top: 14px; }
.sim-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.sim-bar-btns { display: flex; gap: 6px; margin-left: auto; }
.sim-updated { font-size: 12.5px; }
.sim-charlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.sim-charlist li { display: flex; flex-direction: column; padding: 8px 10px; background: var(--raise); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.sim-charlist li:hover { border-color: var(--gold-line); }
.sim-charlist li.active { background: var(--gold-soft); border-color: var(--gold); }
.sim-charlist .cname { font-size: 15px; }
.sim-cl-sub { font-size: 13px; }
.sim-cl-realm { font-size: 12px; }

/* armory page head (roster, leaderboards, compare) */
.arm-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 20px; }
.arm-head .page-head { margin-bottom: 0; }

/* ---- character page: header card and body with a side menu, after aotc.gg's character pages ---- */
.sim-char > * + * { margin-top: 16px; }
.char-card { padding: 0; overflow: hidden; background: var(--card-dark); }
.char-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 8px 18px;
  font-size: 12px;
  color: var(--muted);
  background: var(--page);
  border-bottom: 1px solid var(--border-2);
}
.char-strip b { color: #fff; font-weight: 500; }
.char-strip-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: #c6c4bf; text-decoration: none; }
.back-link:hover { color: var(--gold); }
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 500;
  color: #e6e4df;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border-2);
  border-radius: 6px;
  cursor: pointer;
}
.chip-btn:hover { color: var(--gold-hi); border-color: var(--gold-line); }
.chip-btn:disabled { opacity: .55; cursor: default; }
.sim-char-head { display: flex; align-items: center; gap: 16px; padding: 18px 20px; }
.sim-avatar { flex: 0 0 auto; width: 58px; height: 58px; object-fit: cover; border: 1px solid var(--border-2); border-radius: 50%; }
.sim-char-who { min-width: 0; }
.sim-char-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 25px; font-weight: 600; line-height: 1.15; }
.sim-char-guild { font-size: 14px; font-weight: 400; color: #c6c4bf; }
.sim-char-guild .dim { font-size: 12.5px; }
/* A player from outside the guild, looked up by the guild leader */
.char-outsider { padding: 1px 7px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--gold-line); border-radius: 4px; }
.sim-char-sub { margin-top: 3px; font-size: 13.5px; color: #c9c7c2; }
.arm-badges { display: flex; flex-wrap: wrap; gap: 14px 26px; margin-left: auto; }
.arm-badge { display: flex; flex-direction: column; min-width: 0; }
.arm-badge-l { font-size: 12px; color: var(--muted); white-space: nowrap; }
.arm-badge-v { font-family: var(--font-mono); font-size: 22px; font-weight: 500; line-height: 1.2; color: var(--gold); white-space: nowrap; font-variant-numeric: tabular-nums; }
.arm-badge-r { margin-left: 7px; font-size: 12px; font-weight: 500; color: var(--blue); }
.char-body { display: grid; grid-template-columns: 216px minmax(0, 1fr); padding: 0; overflow: hidden; }
.char-nav { display: flex; flex-direction: column; gap: 3px; padding: 14px 10px; background: var(--card-dark); border-right: 1px solid var(--border-2); }
.char-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 8px 12px;
  text-align: left;
  color: #e6e4df;
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.char-nav-btn b { font-size: 14px; font-weight: 500; color: inherit; }
.char-nav-btn small { font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.char-nav-btn:hover { background: rgba(255, 255, 255, .04); }
.char-nav-btn.active { background: rgba(255, 255, 255, .05); }
.char-nav-btn.active b { color: var(--gold); }
.char-nav-sep { margin: 12px 12px 4px; padding-top: 12px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-dim); border-top: 1px solid var(--border); }
.char-main { min-width: 0; padding: 20px; }
.char-main > .subframe, .char-main .sim-cols > .subframe, .char-main .arm-life > .subframe, .char-main .arm-trees > .subframe { background: var(--raise); }
.char-main > * + * { margin-top: 14px; }

/* paper doll, laid out like the in-game Character window */
.doll {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 250px) minmax(0, 1fr);
  grid-template-areas: "l c r" "b b b";
  gap: 6px 12px;
}
.doll-col { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.doll > .doll-col:first-child { grid-area: l; }
.doll > .doll-col:nth-child(3) { grid-area: r; }
.doll-center { grid-area: c; display: grid; place-items: center; min-height: 200px; overflow: hidden; border-radius: 10px; }
.doll-render { width: 100%; height: 100%; max-height: 470px; object-fit: cover; object-position: center top; }
.doll-noimg { font-size: 20px; letter-spacing: .12em; text-transform: uppercase; opacity: .6; }
.doll-bottom { grid-area: b; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px 12px; margin-top: 4px; }
.slot { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 4px; border-radius: 8px; }
.slot[data-slot]:hover { background: rgba(255, 255, 255, .035); }
.slot.empty { color: var(--muted); }
.slot.empty .slot-ico { border-color: var(--border); }
@media (min-width: 641px) {
  .doll > .doll-col:nth-child(3) .slot { flex-direction: row-reverse; text-align: right; }
  .doll > .doll-col:nth-child(3) .slot-txt { align-items: flex-end; }
}
.slot-ico { flex: 0 0 auto; width: 38px; height: 38px; overflow: hidden; background: #050505; border: 1px solid var(--q, #2a2a2f); border-radius: 7px; }
.slot-ico img { display: block; width: 100%; height: 100%; }
.slot-txt { display: flex; flex-direction: column; min-width: 0; }
.slot-name { overflow: hidden; font-size: 13.5px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.slot-sub { font-size: 11.5px; }
.sim-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.sim-cols .subframe + .subframe { margin-top: 0; }
.sim-stats .tt-row, .sim-talent { padding: 4px 2px; font-size: 13.5px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.sim-stats .tt-row > :first-child { color: var(--label); }
.sim-stats .tt-row > :last-child { font-family: var(--font-mono); font-size: 13px; color: var(--gold); }
.sim-tree + .sim-tree { margin-top: 8px; }
.sim-tree-h { margin-bottom: 3px; }
.sim-talent { display: flex; justify-content: space-between; gap: 10px; }
@media (max-width: 900px) {
  .doll { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "l r" "b b"; }
  .doll-center { display: none; }
  .sim-cols { grid-template-columns: minmax(0, 1fr); }
  .char-body { grid-template-columns: minmax(0, 1fr); }
  .char-nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 4px; padding: 10px; border-right: 0; border-bottom: 1px solid var(--border-2); }
  .char-nav-btn { align-items: center; padding: 8px 6px; text-align: center; }
  .char-nav-btn small, .char-nav-sep { display: none; }
  .sim-char-head { flex-wrap: wrap; }
  .arm-badges { width: 100%; margin-left: 0; }
}
@media (max-width: 640px) {
  .doll { grid-template-columns: minmax(0, 1fr); grid-template-areas: "l" "r" "b"; }
  .doll-bottom { grid-template-columns: minmax(0, 1fr); }
  .sim-bar-btns { margin-left: 0; }
  .char-main { padding: 14px; }
  .char-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .char-nav-btn b { font-size: 13px; }
  .sim-char-head { padding: 16px 14px; gap: 12px; }
  .sim-avatar { width: 48px; height: 48px; }
  .sim-char-name { font-size: 21px; }
  .char-strip { padding: 8px 14px; }
  .arm-badges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
  .arm-badge-v { font-size: 19px; }
}

/* ---------- sub-tabs, DPS sim, rotation, weights, upgrades ---------- */
.sim-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; max-width: 100%; margin: 0 0 14px; padding: 4px; background: rgba(255, 255, 255, .025); border: 1px solid var(--border); border-radius: 10px; }
.sim-tab { padding: 6px 14px; font-size: 13px; font-weight: 500; color: #c6c4bf; background: none; border: 0; border-radius: 7px; cursor: pointer; }
.sim-tab:hover { color: #fff; background: rgba(255, 255, 255, .045); }
.sim-tab.active { color: var(--gold); background: var(--gold-soft); }
.sim-opts { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin-bottom: 14px; }
.sim-run { min-width: 120px; margin-left: auto; }
.sim-result { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.sim-dps { display: flex; align-items: baseline; gap: 8px; }
.sim-dps-num { font-family: var(--font-mono); font-size: 42px; font-weight: 600; line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums; }
.sim-dps-unit { font-size: 15px; font-weight: 600; letter-spacing: .12em; color: #fff; }
.sim-dps-sub { font-size: 12.5px; }
/* Tanks: damage taken, health and the boss's swings under the threat number */
.tank-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 4px 0 10px; }
.tank-stats > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--card-dark); border: 1px solid var(--border-2); border-radius: 8px; }
.tank-stats b { font-family: var(--font-mono); font-size: 18px; font-weight: 600; color: var(--gold); }
.tank-stats small { font-size: 12px; color: var(--muted); line-height: 1.3; }
.tank-bar { display: flex; height: 10px; overflow: hidden; border-radius: 5px; background: rgba(255, 255, 255, .05); }
.tank-bar i { display: block; height: 100%; }
.tank-legend { margin: 6px 0 10px; font-size: 12.5px; line-height: 1.6; }
.tb-key { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 2px; vertical-align: -1px; }
.tb-avoid { background: #4f9a6a; }
.tb-block { background: #5f86c4; }
.tb-hit { background: #8b8f98; }
.tb-crit { background: #c9903f; }
.tb-crush { background: #c0524f; }
@media (max-width: 560px) { .tank-stats { grid-template-columns: minmax(0, 1fr); } }
.sim-empty { margin: 4px 2px; }
.sim-table-wrap { overflow-x: auto; }
.sim-table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.sim-table th { padding: 8px 10px; font-size: 12px; font-weight: 500; text-align: right; white-space: nowrap; color: var(--muted); border-bottom: 1px solid var(--border-2); }
.sim-table td { padding: 7px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid rgba(255, 255, 255, .045); }
.sim-table th:first-child, .sim-table td:first-child { text-align: left; }
.sim-table tbody tr:hover { background: rgba(255, 255, 255, .025); }
.sim-table td.num { font-size: 13px; color: #fff; }
.w-table td { padding: 4px 10px; }
.w-in { width: 84px; height: 30px; padding: 0 8px; text-align: right; font-family: var(--font-mono); }
.w-src { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 13.5px; }
.upg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 10px; }
.upg-slot { min-width: 0; padding: 10px 12px; background: var(--raise); border: 1px solid var(--border); border-radius: 10px; }
.upg-head { margin-bottom: 4px; overflow: hidden; font-size: 13.5px; white-space: nowrap; text-overflow: ellipsis; }
.upg-list { margin: 0; padding: 0; list-style: none; }
.upg-main { display: flex; flex-direction: column; min-width: 0; }
.upg-name { overflow: hidden; font-size: 13.5px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.upg-where { overflow: hidden; font-size: 12px; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.upg-gain { display: flex; flex-direction: column; align-items: flex-end; font-family: var(--font-mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.upg-req { font-size: 11.5px; }
.upg-wh { font-size: 12px; }
.upg-none { padding: 3px 0; font-size: 12.5px; }
.rot-reset { float: right; margin: -4px 0 0 10px; }
.caps-table th { text-align: left; }
.caps-table tbody th { padding: 7px 10px; font-size: 13.5px; font-weight: 400; color: var(--text); border-bottom: 1px solid rgba(255, 255, 255, .045); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.sim-caps { margin-top: 14px; }
.sim-import { margin-top: 12px; }
.sim-import summary { cursor: pointer; padding: 2px 0; }
.sim-import summary:hover b { color: var(--gold); }
.sim-import-steps { margin: 8px 0 6px; padding-left: 22px; font-size: 13.5px; }
.sim-import-steps code { font-size: 12.5px; color: #fff; }
.sim-import-text { display: block; width: 100%; min-height: 64px; resize: vertical; font-family: var(--font-mono); font-size: 12px; }
.sim-import-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; }

/* ---------- Guild Armory: roster, leaderboards, compare ---------- */
.arm-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 14px; }
.arm-search { width: min(320px, 100%); }
.arm-count { font-size: 12.5px; }
.arm-late { margin: -4px 2px 12px; }
.arm-late b { color: var(--text); font-weight: 600; }
.arm-table tbody tr { cursor: pointer; }
.arm-table th[data-sort] { cursor: pointer; user-select: none; }
.arm-table th[data-sort]:hover { color: #fff; }
.arm-table td.num, .arm-table th.num { text-align: right; }
.arm-table td.num { font-family: var(--font-mono); color: #fff; }
.arm-table .cname { font-size: 14px; font-weight: 500; }
.arm-rank { font-size: 12px; }
.arm-pop { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 16px; }
.arm-pop .subframe + .subframe { margin-top: 0; }
.pop-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 44px; align-items: center; gap: 10px; padding: 3px 0; font-size: 13.5px; }
.pop-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pop-bar { height: 8px; overflow: hidden; background: rgba(255, 255, 255, .05); border-radius: 4px; }
.pop-bar i { display: block; height: 100%; background: var(--gold); border-radius: 4px; }
.pop-row .num { text-align: right; color: var(--gold); }
.lb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.lb-grid .subframe + .subframe { margin-top: 0; }
.subframe.lb { padding: 0; overflow: hidden; }
.subframe.lb > .subframe-title { margin: 0; padding: 15px 18px; background: var(--card-dark); border-bottom: 1px solid var(--border-2); }
.lb-list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 10px; list-style: none; counter-reset: lb; }
.lb-list li {
  counter-increment: lb;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 8px 10px 8px 8px;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
}
.lb-list li::before { content: counter(lb); flex: 0 0 28px; }
.lb-list li:hover { background: rgba(255, 255, 255, .035); }
.lb-list li .cname { overflow: hidden; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.lb-list li span.lb-val { margin-left: auto; font-family: var(--font-mono); font-size: 13.5px; color: var(--gold); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lb-list li.dim { padding: 10px 12px; cursor: default; background: none; }
.lb-list li.dim::before { display: none; }
.lb-list li .lb-gone { color: var(--muted); }
.lb-list li.dim .lb-val, .lb-list .lb-val .dim { color: var(--muted); }
/* Rankings (sim boards) above the guild records */
.lb-section { margin: 22px 0 12px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.lb-section:first-child { margin-top: 4px; }
.lb-list li .lb-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.lb-list li .lb-spec { overflow: hidden; font-size: 12px; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
/* The drawn Guild Tree (client/sim/tree.js): avatars, names under, icons over, gold lines that light up */
.arm-mode { margin: 0; }
.gtv-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 10px; }
.gtv-zoom { display: inline-flex; gap: 6px; }
.gtv-zoom .chip-btn { min-width: 34px; justify-content: center; }
.gtv-scroll { max-height: 78vh; overflow: auto; background: var(--raise); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: grab; }
.gtv-scroll.dragging { cursor: grabbing; user-select: none; }
/* Compact (phones): the tree is as wide as the screen, so it scrolls with the page instead of in its own box. */
.gtv[data-mode="compact"] .gtv-scroll { max-height: none; overflow: visible; cursor: default; }
.gtv-sizer { position: relative; }
.gtv-canvas { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.gtv-links { position: absolute; top: 0; left: 0; pointer-events: none; }
.gtv-links path { fill: none; stroke: rgba(229, 184, 76, .32); stroke-width: 1.6; stroke-linejoin: round; transition: stroke .15s, stroke-width .15s, opacity .15s; }
.gtv-links path.gone { stroke: rgba(255, 255, 255, .2); stroke-dasharray: 4 5; }
.gtv-lit .gtv-links path { opacity: .22; }
.gtv-lit .gtv-links path.lit { opacity: 1; stroke: var(--gold-hi); stroke-width: 3; stroke-dasharray: none; }
.gtv-node { position: absolute; width: 112px; height: 112px; cursor: pointer; outline: none; transition: opacity .15s; }
.gtv-lit .gtv-node { opacity: .38; }
.gtv-lit .gtv-node.lit { opacity: 1; }
.gtv-av { position: relative; display: grid; place-items: center; width: 100%; height: 100%; overflow: hidden; background: var(--card); border: 2px solid var(--border-2); border-radius: 6px; transition: border-color .15s; }
.gtv-av img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gtv-letter { padding-bottom: 18px; font-size: 30px; font-weight: 600; color: var(--label); }
.gtv-name { position: absolute; right: 0; bottom: 0; left: 0; padding: 3px 4px 4px; overflow: hidden; font-size: 11px; font-weight: 600; line-height: 1.2; text-align: center; white-space: nowrap; text-overflow: ellipsis; background: rgba(0, 0, 0, .78); }
.gtv-icons { position: absolute; top: -10px; right: 0; left: 0; display: flex; justify-content: center; gap: 4px; pointer-events: none; }
.gtv-ic { display: inline-flex; padding: 2px; background: var(--raise); border: 1px solid var(--border-2); border-radius: 5px; pointer-events: auto; }
.gtv-ic svg, .gtv-legend svg { display: block; width: 14px; height: 14px; }
.gtv-founder .gtv-av { border-color: var(--gold); }
.gtv-node.lit .gtv-av, .gtv-node:focus-visible .gtv-av { border-color: var(--gold-hi); }
.gtv-match .gtv-av { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.gtv-gone .gtv-av { border-style: dashed; }
.gtv-gone .gtv-av img, .gtv-gone .gtv-letter { opacity: .55; filter: grayscale(1); }
.gtv-gone .gtv-name { color: var(--muted); }
.gtv-legend { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.gtv-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.gtv-key-gone { display: inline-block; width: 13px; height: 13px; border: 1.5px dashed var(--muted); border-radius: 3px; }
.gtv-signers { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.gtv-signers b { font-weight: 500; color: var(--label); }
/* Guild Tree (#sim/tree): who brought who into the guild */
.title-link { float: right; font-size: 12.5px; font-weight: 500; color: var(--gold); text-decoration: none; }
.title-link:hover { text-decoration: underline; }
.gt-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.gt-stat { padding: 14px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.gt-stat b { display: block; font-size: 20px; font-weight: 600; line-height: 1.25; color: var(--gold); overflow-wrap: anywhere; }
.gt-stat span { font-size: 12.5px; color: var(--muted); }
.gt-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.gt, .gt ul { margin: 0; padding: 0; list-style: none; }
.gt > li + li { margin-top: 10px; }
.gt ul { margin-left: 14px; }
.gt ul > li { position: relative; padding: 5px 0 5px 22px; border-left: 1px solid rgba(229, 184, 76, .28); }
.gt ul > li:last-child { border-left-color: transparent; }
.gt ul > li::before { content: ''; position: absolute; top: 0; left: -1px; width: 18px; height: 23px; border-bottom: 1px solid rgba(229, 184, 76, .28); border-left: 1px solid rgba(229, 184, 76, .28); border-bottom-left-radius: 8px; }
.gt-node { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; max-width: 100%; padding: 7px 12px; font-size: 14px; background: var(--raise); border: 1px solid var(--border-2); border-radius: var(--radius-sm); }
.gt-node .cname { font-weight: 500; }
.gt-node [data-open] { cursor: pointer; }
.gt-node [data-open]:hover { text-decoration: underline; }
.gt-name { font-weight: 500; }
.gt-meta { font-size: 12.5px; color: var(--muted); }
.gt-count { font-family: var(--font-mono); font-size: 12.5px; color: var(--gold); white-space: nowrap; }
.gt-tag { align-self: center; padding: 1px 8px; font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--gold-line); border-radius: 999px; }
.gt-tag-dim { color: var(--muted); border-color: var(--border-2); }
.gt-gone { background: transparent; border-style: dashed; }
.gt-gone .gt-name { color: var(--muted); }
.gt-signers { display: flex; flex-wrap: wrap; gap: 8px; }
.gt-tabs { margin: 0 0 14px; }
.gt-tabs .sim-tab .dim { margin-left: 2px; font-weight: 400; }
.gi-table tbody tr { cursor: pointer; }
.gi-table th, .gi-table td { padding-right: 8px; padding-left: 8px; }
.gi-table td:first-child { white-space: normal; overflow-wrap: anywhere; }
.gi-table tbody tr:hover, .gi-table tbody tr.gi-on { background: var(--gold-soft); }
.gi-gone { color: var(--muted); }
.gi-list { margin: 0; padding: 0; list-style: none; }
.gi-list li { padding: 8px 2px; font-size: 13.5px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.gi-list li:last-child { border-bottom: 0; }
.gi-list [data-open] { cursor: pointer; }
.gi-list [data-open]:hover { text-decoration: underline; }
.gi-main { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.gi-when { flex: none; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.gi-out { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 4px; font-size: 12.5px; }
.gi-res { padding: 1px 8px; font-size: 11.5px; font-weight: 600; border: 1px solid; border-radius: 999px; }
.gi-yes { color: var(--green); border-color: rgba(62, 224, 106, .45); }
.gi-mid { color: var(--gold); border-color: var(--gold-line); }
.gi-no { color: var(--muted); border-color: var(--border-2); }
.gi-note { color: var(--muted); }
/* Roster: joins and leaves (the server's src/guildHistory.js) */
.gh-list { margin: 0; padding: 0; list-style: none; }
.gh-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 6px 2px; font-size: 13.5px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.gh-list li:last-child { border-bottom: 0; }
.gh-list [data-open] { cursor: pointer; }
.gh-list [data-open]:hover { text-decoration: underline; }
.gh-when { flex: none; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.cmp-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.cmp-table th { text-align: left; }
.cmp-table tbody th { padding: 7px 10px; font-size: 13.5px; font-weight: 400; color: var(--label); border-bottom: 1px solid rgba(255, 255, 255, .045); }
.cmp-table td { text-align: left; white-space: normal; }
.cmp-table thead th { font-size: 14px; font-weight: 600; }
.arm-noench { color: #8a7a5a; }
.arm-trees { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.arm-trees .subframe + .subframe { margin-top: 0; }
.arm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.arm-stat { display: flex; flex-direction: column; padding: 10px 12px; background: var(--raise); border: 1px solid var(--border); border-radius: 9px; }
.arm-stat-v { font-family: var(--font-mono); font-size: 20px; font-weight: 500; color: var(--gold); font-variant-numeric: tabular-nums; }
.arm-stat-l { font-size: 12.5px; color: var(--muted); }
.arm-progress { height: 12px; margin-top: 10px; }
@media (max-width: 640px) { .pop-row { grid-template-columns: 96px minmax(0, 1fr) 36px; } }

.arm-table tr.arm-pending td { opacity: .55; }
.arm-recent { margin: 0; padding: 0; list-style: none; columns: 2 260px; column-gap: 24px; }
.arm-recent li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 13.5px; border-bottom: 1px solid rgba(255, 255, 255, .05); break-inside: avoid; }
.arm-life { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.arm-life .subframe + .subframe { margin-top: 0; }
.arm-life .tt-row { padding: 2px 0; }
.arm-life .tt-row span:last-child { font-family: var(--font-mono); font-size: 13px; color: var(--gold); font-variant-numeric: tabular-nums; }
/* Dungeon clears (Lifetime tab): every dungeon's last-boss kills, in as many columns as fit, top to bottom. */
.arm-life .arm-dng { grid-column: 1 / -1; }
.dng-list { columns: 280px; column-gap: 32px; }
.dng-list .tt-row { break-inside: avoid; }
.dng-boss { margin-left: 4px; font-size: 12px; color: var(--muted); }
.arm-life .tt-row.dng-none > span { color: var(--muted); }
.dng-sub { margin: 12px 0 3px; font-size: 12px; font-weight: 600; color: var(--label); }
.arm-badge[data-simtab] { cursor: pointer; }
.arm-talent-set { margin: 14px 0 8px; }
.arm-trees-off { opacity: .7; }
.sim-soon-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.sim-busy { align-self: center; min-width: 70px; }
/* Execute phase checkbox: a box the height of the selects next to it */
.sim-exec-box { height: 36px; padding: 0 12px; font-size: 13.5px; color: #fff; background: rgba(255, 255, 255, .03); border: 1px solid var(--input); border-radius: var(--radius-sm); }
.sim-exec-box:hover { border-color: var(--gold-line); }
.sim-exec > span:first-child { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Old numbers stay on screen (dimmed) while a change is simmed; the progress bar above them isn't dimmed */
.sim-stale > :not(.sim-progress) { opacity: .6; transition: opacity .15s; }

/* Progress bars: DPS sim, stat weights, upgrades. Flat track, gold fill. */
.sim-progress { margin: 10px 0 4px; }
.sim-progress-t { margin: 0 0 6px; font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--label); }
.sim-progress-bar { position: relative; height: 6px; overflow: hidden; background: var(--raise-2); border-radius: 3px; }
.sim-progress-bar i { display: block; width: 0; height: 100%; background: var(--gold); border-radius: 3px; transition: width .2s linear; }
.sim-progress.is-busy .sim-progress-bar i { width: 30%; animation: simbusy 1.1s ease-in-out infinite; }
@keyframes simbusy { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
@media (prefers-reduced-motion: reduce) { .sim-progress.is-busy .sim-progress-bar i { width: 100%; opacity: .5; animation: none; } }
.sim-wait { padding: 18px 20px; }
.sim-wait-t { margin: 0 0 4px; font-size: 13.5px; color: var(--muted); }
.sim-wait-bar { max-width: 520px; margin: -6px 0 14px; }
/* Phones: the roster keeps Name, Level, Class and Gear Score (everything else is one tap away on the
   character page). */
@media (max-width: 640px) {
  .arm-table .arm-wide, .arm-table .arm-race { display: none; }
  .arm-table td, .arm-table th { padding-left: 6px; padding-right: 6px; }
  .arm-table .arm-rank { display: block; font-size: 12px; }
  .arm-count { display: block; margin-top: 6px; }
  .lb-grid { grid-template-columns: minmax(0, 1fr); }
}
/* Upgrades with icons, the overall best list, how-to guide and the rotation timeline */
.upg-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, .05); }
.upg-ico { width: 28px; height: 28px; overflow: hidden; background: #000; border: 1px solid var(--q, #555); border-radius: 6px; }
.upg-ico img { display: block; width: 100%; height: 100%; }
.upg-top .upg-list { padding-left: 0; }
.upg-top { margin-bottom: 12px; }
/* ability icons (DPS tab): a framed tile, or the ability's first letter when the game has no icon for it */
.ab-ico { position: relative; flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px; overflow: hidden; font-size: 15px; font-weight: 600; color: var(--muted); background: #050505; border: 1px solid rgba(255, 255, 255, .14); border-radius: 7px; }
.ab-ico img { display: block; width: 100%; height: 100%; }
.ab-ico.sm { width: 24px; height: 24px; font-size: 11px; border-radius: 5px; }
.ab-ico.lg { width: 42px; height: 42px; font-size: 17px; border-radius: 8px; }
/* where the damage comes from: one card per ability */
.sim-sec { margin: 20px 0 10px; font-size: 13px; font-weight: 600; color: #fff; }
.dmg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.dmg-card { min-width: 0; padding: 12px 14px; background: var(--raise); border: 1px solid var(--border); border-radius: 10px; }
.dmg-top { display: flex; align-items: center; gap: 11px; }
.dmg-who { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.dmg-name { overflow: hidden; font-size: 14px; font-weight: 600; color: #fff; white-space: nowrap; text-overflow: ellipsis; }
.dmg-val { font-size: 12px; color: var(--muted); }
.dmg-val .num { font-size: 13px; color: var(--gold); }
.dmg-pct { flex: 0 0 auto; font-size: 18px; font-weight: 500; color: #fff; }
.dmg-bar { height: 4px; margin: 11px 0 10px; overflow: hidden; background: rgba(255, 255, 255, .07); border-radius: 2px; }
.dmg-bar i { display: block; height: 100%; background: var(--gold); border-radius: 2px; }
.dmg-stats { display: flex; margin: 0; }
.dmg-stats > div { flex: 1 1 0; min-width: 0; padding: 0 10px; border-left: 1px solid rgba(255, 255, 255, .1); }
.dmg-stats > div:first-child { padding-left: 0; border-left: 0; }
.dmg-stats dt { overflow: hidden; font-size: 10.5px; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.dmg-stats dd { margin: 1px 0 0; font-size: 13.5px; color: #fff; }
/* how to play, with the icons of the abilities it names */
.sim-guide ul { margin: 0; padding-left: 18px; }
.sim-guide li { margin: 6px 0; line-height: 1.65; }
.sim-guide li::marker { color: var(--gold); }
.ab-inline { font-weight: 500; color: #fff; white-space: nowrap; }
.ab-inline img { width: 20px; height: 20px; margin: 0 5px 0 1px; vertical-align: -5px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 4px; }
/* rotation in action: the casts as a row of icons, and why each was pressed */
.sim-timeline summary { cursor: pointer; list-style: none; }
.sim-timeline summary::-webkit-details-marker { display: none; }
.seq { display: flex; flex-wrap: wrap; gap: 12px 6px; margin: 0 0 14px; padding: 14px; list-style: none; background: var(--raise); border: 1px solid var(--border); border-radius: 10px; }
.seq-step { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 44px; padding: 0; color: inherit; background: none; border: 0; cursor: pointer; }
.seq-step:hover .ab-ico, .seq-step:focus-visible .ab-ico { border-color: var(--gold); }
.seq-t { font-size: 10.5px; color: var(--muted); }
details.tl-more > summary { padding: 4px 0; font-size: 13px; font-weight: 500; color: var(--gold); }
.tl-list { margin: 6px 0 0; padding: 0; list-style: none; }
.tl-row { display: grid; grid-template-columns: 50px 24px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 6px; font-size: 13px; border-top: 1px solid var(--border); border-radius: 6px; }
.tl-row:first-child { border-top: 0; }
.tl-row.on { background: var(--gold-soft); }
.tl-t { font-size: 12.5px; color: var(--gold); }
.tl-what { min-width: 0; }
.tl-what b { font-weight: 500; color: #fff; }
.tl-why { display: block; font-size: 12px; color: var(--muted); }
.tl-res { display: flex; align-items: center; font-size: 12px; color: var(--muted); white-space: nowrap; }
.tl-sep { width: 1px; height: 11px; margin: 0 8px; background: rgba(255, 255, 255, .14); }
.sim-oom { margin: 6px 0 0; }
@media (max-width: 640px) {
  .tl-row { grid-template-columns: 44px 24px minmax(0, 1fr); }
  .tl-res { grid-column: 3; }
  .seq { padding: 10px; }
}
@media (max-width: 640px) {
  .upg-row { grid-template-columns: 28px minmax(0, 1fr) auto; }
  .upg-row .upg-wh { display: none; }
}
.upg-chain { color: #e6cc80; }
.upg-next { cursor: help; text-decoration: underline dotted; }
.upg-tip-how { max-width: 320px; margin-top: 6px; white-space: normal; }
.upg-tip-how b { color: #fff; }

/* Rotation editor: a priority strip, then one row per ability, with a live comparison against the default */
.rot-compare { margin-top: 14px; padding: 12px 14px; background: rgba(229, 184, 76, .05); border: 1px solid rgba(229, 184, 76, .25); border-radius: 10px; }
.rot-compare.is-default { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.rot-cmp-nums { display: flex; flex-wrap: wrap; gap: 24px; }
.rot-cmp-nums > div { display: flex; flex-direction: column; }
.rot-cmp-v { font-family: var(--font-mono); font-size: 24px; font-weight: 500; color: var(--gold); font-variant-numeric: tabular-nums; }
.rot-cmp-l { font-size: 12px; color: var(--muted); }
.rot-cmp-say { margin: 8px 0 0; }
.rot-how { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.rot-how b { color: var(--text); }

/* the priority at a glance: icons in order, numbered */
.prio-wrap { display: flex; flex-direction: column; gap: 12px; margin: 0 0 14px; padding: 14px 16px; background: var(--raise); border: 1px solid var(--border); border-radius: 10px; }
.prio { display: flex; align-items: center; gap: 14px; min-width: 0; }
.prio + .prio { padding-top: 12px; border-top: 1px solid var(--border); }
.prio-l { flex: 0 0 92px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.prio.is-def .prio-l { color: var(--muted); }
.prio-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 0; min-width: 0; margin: 0; padding: 0; list-style: none; }
.prio-step { position: relative; display: flex; align-items: center; }
.prio-step + .prio-step::before { content: "›"; width: 16px; font-size: 17px; line-height: 1; text-align: center; color: #4f4f56; }
.prio-n { position: absolute; right: -4px; bottom: -4px; min-width: 16px; height: 16px; padding: 0 3px; font-family: var(--font-mono); font-size: 10px; font-weight: 600; line-height: 16px; text-align: center; color: #161106; background: var(--gold); border: 1px solid var(--raise); border-radius: 8px; }
.prio.is-def .prio-n { color: #e6e4df; background: #34343a; }
.prio-step.off .ab-ico { opacity: .3; filter: grayscale(1); }
.prio-step.off .prio-n { color: #a5a5ab; background: #34343a; }
.prio-same { margin: 0; font-size: 12.5px; color: var(--muted); }

/* one row per ability: number, icon, name with its facts and conditions, how much it did, controls */
.rot-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rot-row { display: grid; grid-template-columns: 12px 22px 42px minmax(0, 1fr) auto auto; align-items: start; gap: 12px; padding: 12px 14px; background: var(--raise); border: 1px solid var(--border); border-radius: 10px; }
.rot-row.off { opacity: .5; }
.rot-row.unlearned { opacity: .45; }
.rot-row.dragging { opacity: .35; }
.rot-row.drop-above { box-shadow: 0 -3px 0 var(--gold); }
.rot-row.drop-below { box-shadow: 0 3px 0 var(--gold); }
.rot-grip { line-height: 42px; color: #55555c; cursor: grab; user-select: none; }
.rot-row .rot-n { font-family: var(--font-mono); font-size: 15px; font-weight: 600; line-height: 42px; color: var(--gold); text-align: right; }
.rot-n { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.rot-body { min-width: 0; }
.rot-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rot-name { font-size: 14.5px; font-weight: 600; color: #fff; }
.rot-badge { padding: 1px 7px; font-size: 11px; font-weight: 500; white-space: nowrap; color: var(--gold-hi); background: var(--gold-soft); border-radius: 9px; }
/* facts split by thin dividers; the one starting each line is clipped off, so a wrapped line never starts with one */
.rot-facts { display: flex; flex-wrap: wrap; align-items: center; row-gap: 2px; margin: 3px 0 0 -10px; font-size: 12px; line-height: 1.35; color: var(--muted); clip-path: inset(0 0 0 10px); }
.rot-fact { padding: 0 9px; white-space: nowrap; border-left: 1px solid rgba(255, 255, 255, .14); }
.rot-conds { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 12.5px; }
.rot-cond { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; max-width: 100%; padding: 2px 6px; background: var(--raise-2); border: 1px solid var(--border-2); border-radius: 7px; }
.rot-op { height: 26px; padding: 0 22px 0 6px; font-size: 12px; background-position: right 4px center; }
.rot-num { width: 62px; height: 26px; padding: 0 6px; }
.rot-x { padding: 0 3px; font-size: 15px; color: var(--muted); }
.rot-add { height: 26px; padding: 0 22px 0 6px; font-size: 12px; background-position: right 4px center; }
/* how much it did: small numbers split by a divider */
.rot-use { display: flex; align-self: stretch; align-items: flex-start; min-height: 42px; padding-top: 3px; margin: 0; padding-left: 4px; border-left: 1px solid var(--border-2); }
.rot-use > div { min-width: 82px; padding: 0 12px; }
.rot-use > div + div { border-left: 1px solid var(--border); }
.rot-use dt { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.rot-use dd { margin: 0; font-size: 15px; font-weight: 500; color: #fff; }
.rot-use-note { padding: 0 12px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.rot-ctl { display: flex; align-items: center; gap: 4px; min-height: 42px; }
.rot-switch { position: relative; display: inline-block; width: 34px; height: 18px; margin-left: 4px; cursor: pointer; }
.rot-switch input { position: absolute; width: 0; height: 0; opacity: 0; }
.rot-switch span { position: absolute; inset: 0; background: #2c2c31; border-radius: 9px; transition: background .15s; }
.rot-switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; background: #bbb; border-radius: 50%; transition: transform .15s; }
.rot-switch input:checked + span { background: var(--gold); }
.rot-switch input:checked + span::after { background: #141008; transform: translateX(16px); }
.rot-switch input:focus-visible + span { outline: 2px solid var(--gold-line); }
details.rot-default { margin-top: 12px; }
details.rot-default > summary { padding: 4px 0; font-size: 13px; font-weight: 500; color: var(--gold); cursor: pointer; list-style: none; }
details.rot-default > summary::-webkit-details-marker { display: none; }
.rot-def-list { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 13px; }
.rot-def-row { display: grid; grid-template-columns: 20px 24px minmax(0, 1fr); align-items: start; gap: 8px; padding: 5px 6px; border-radius: 7px; }
.rot-def-row.moved { background: rgba(229, 184, 76, .06); }
.rot-def-row.off { opacity: .55; }
.rot-def-row .rot-n { line-height: 24px; color: var(--muted); text-align: right; }
.rot-def-when { display: block; font-size: 12px; }
.rot-tl-toggle { display: inline-flex; gap: 4px; margin: 0 0 12px; padding: 4px; background: rgba(255, 255, 255, .025); border: 1px solid var(--border); border-radius: 10px; }
@media (max-width: 1100px) {
  /* narrower: the numbers move under the name */
  .rot-row { grid-template-columns: 12px 22px 42px minmax(0, 1fr) auto; }
  .rot-use { grid-column: 4; grid-row: 2; align-self: start; min-height: 0; padding-left: 0; border-left: 0; }
  .rot-use > div:first-child, .rot-use-note { padding-left: 0; }
  .rot-ctl { grid-column: 5; grid-row: 1; }
}
@media (max-width: 640px) {
  .rot-row { grid-template-columns: 22px 36px minmax(0, 1fr); gap: 10px; padding: 10px; }
  .rot-grip { display: none; }
  .rot-row .ab-ico.lg { width: 36px; height: 36px; }
  .rot-row .rot-n { line-height: 36px; }
  .rot-ctl { min-height: 0; }
  .rot-use { grid-column: 3; grid-row: auto; }
  .rot-ctl { grid-column: 1 / -1; grid-row: auto; justify-content: flex-end; }
  .prio { flex-direction: column; align-items: flex-start; gap: 8px; }
  .prio-l { flex: none; }
  .rot-cmp-nums { gap: 14px; }
  .rot-cmp-v { font-size: 20px; }
  .sim-run { margin-left: 0; }
  .upg-grid { grid-template-columns: minmax(0, 1fr); }
}
.sim-group { margin: 8px 0 0; }
.sim-reports summary { cursor: pointer; list-style: none; }
.sim-reports summary::-webkit-details-marker { display: none; }
.sim-report-form .rep-note { flex: 1 1 220px; }
.sim-report-form .rep-note input { width: 100%; }
.sim-report-list { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; }
.sim-report-list li { margin: 3px 0; }

/* ---- Talents (client/sim/talents.js): the game's talent art — class picture, square buttons and their borders,
   rank numbers, arrows — on a board drawn in game pixels and scaled with --s to fit. Everything around it (panel,
   title, tabs, tree headers, dividers, type) is the site's own style. Phones show one tree at a time. ---- */
.tt-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.tt-unspent { font-size: 12px; font-weight: 400; color: var(--muted); }
.tt-unspent b { margin-left: 5px; font-family: var(--font-mono); font-size: 14px; color: #fff; }
.tt-unspent.has b { color: var(--green); }
.tt-sets { display: inline-flex; gap: 4px; margin: 0 0 12px; padding: 4px; background: rgba(255, 255, 255, .025); border: 1px solid var(--border); border-radius: 10px; }
.tt-act { margin-left: 6px; font-size: 11px; color: var(--green); }
.tt-box { --s: 1; max-width: 1214px; margin: 0 auto; }
.tt-treetabs { display: none; }
.tt-phone .tt-treetabs { display: flex; margin: 0 0 8px; }
.tt-treetabs .sim-tab { flex: 1 1 0; min-width: 0; padding: 6px 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tt-treetabs .sim-tab b { color: #fff; }
.tt-view { position: relative; overflow: hidden; background: #000; border: 1px solid #000; border-radius: 10px; }
.tt-view::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--border); }
.tt-wrap { position: relative; overflow: hidden; user-select: none; -webkit-user-select: none; }
.tt-phone .tt-wrap { overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.tt-phone .tt-wrap::-webkit-scrollbar { display: none; }
.tt-sizer { display: flex; width: calc(1212px * var(--s)); height: calc(540px * var(--s)); }
.tt-sizer i { flex: 0 0 calc(404px * var(--s)); scroll-snap-align: start; }
.tt-frame { position: absolute; left: 0; top: 0; width: 1212px; height: 540px; overflow: hidden; transform: scale(var(--s)); transform-origin: 0 0; }
.tt-classbg, .tt-col, .tt-th, .tt-thline, .tt-line, .tt-head, .tt-node, .tt-node > * { position: absolute; display: block; }
/* the game's frame shows its art from y 70 to 665; the board starts 112 px down that frame */
.tt-classbg { left: 0; top: -42px; width: 1212px; height: 595px; background: var(--bg) 0 0 / 100% 100% no-repeat; }
/* site-style divider between the trees: a black line with the panels' soft edge beside it */
.tt-col { top: 0; bottom: 0; width: 2px; margin-left: -1px; background: linear-gradient(90deg, rgba(0, 0, 0, .9) 0 1px, rgba(255, 255, 255, .08) 1px 2px); }
.tt-th { width: 404px; height: 32px; display: flex; align-items: center; justify-content: center; }
.tt-thin { display: flex; align-items: center; gap: 9px; max-width: 360px; }
.tt-thicon { flex: 0 0 auto; width: 28px; height: 28px; background: #050505; border: 1px solid #2a2a2f; border-radius: 6px; box-shadow: 0 0 0 1px #000; }
.tt-thname { overflow: hidden; font-size: 18px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; text-overflow: ellipsis; color: var(--gold); text-shadow: 0 1px 2px #000, 0 0 8px #000; }
.tt-thpts { flex: 0 0 auto; min-width: 28px; padding: 0 6px; font-family: var(--font-mono); font-size: 15px; line-height: 22px; text-align: center; color: #fff; background: rgba(10, 10, 12, .92); border: 1px solid var(--border-2); border-radius: 6px; }
.tt-thline { left: 62px; right: 62px; bottom: -8px; height: 1px; background: rgba(229, 184, 76, .35); }
/* the game's buttons */
.tt-line { height: 6px; transform-origin: 0 50%; background-size: 100% 100%; background-repeat: no-repeat; }
.tt-head { width: 14px; height: 12px; background-size: 100% 100%; background-repeat: no-repeat; }
.tt-node { width: 40px; height: 40px; cursor: pointer; }
.tt-shadow { left: -19px; top: -19px; width: 78px; height: 78px; background: url(/img/talent-node-square-shadow.png) 0 0 / 100% 100% no-repeat; pointer-events: none; }
.tt-icon { left: 2px; top: 2px; width: 36px; height: 36px; background: #111; }
.tt-border { inset: 0; background-size: 100% 100%; background-repeat: no-repeat; }
.tt-node:hover .tt-border { filter: brightness(1.5); }
.tt-disabled .tt-icon, .tt-locked .tt-icon { filter: grayscale(1) brightness(.75); }
.tt-gated .tt-icon { filter: grayscale(1) brightness(.3); }
.tt-node .tt-rank { left: 31px; bottom: 4px; transform: translateX(-50%); font-family: var(--font-sans); font-size: 15px; font-weight: 700; line-height: 16px; color: #1aff1a;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, -2px 0 0 #000, 2px 0 0 #000, 0 -2px 0 #000, 0 2px 0 #000; }
.tt-maxed .tt-rank { color: #ffff00; }

/* ---- Upgrades: two panels. Left = the paperdoll like the game's character window (icons down both sides of the
   character, weapons along the bottom), each slot showing its best gain; right = the upgrades. ---- */
.upg2 { display: grid; grid-template-columns: minmax(320px, 5fr) minmax(0, 7fr); gap: 14px; align-items: start; }
.upg2 > .subframe + .subframe { margin-top: 0; }
.pd-panel { position: sticky; top: 80px; }
.pd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, .9fr) minmax(0, 1fr); grid-template-areas: "l c r" "b b b"; gap: 8px 6px; }
.pd > .pd-col:first-child { grid-area: l; }
.pd > .pd-col:nth-child(3) { grid-area: r; }
.pd-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pd-center { grid-area: c; display: grid; place-items: center; min-width: 0; overflow: hidden; }
.pd-render { width: 100%; height: 100%; max-height: 420px; object-fit: cover; object-position: center top; }
.pd-bottom { grid-area: b; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 6px; }
.pd-slot { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 3px; font: inherit; color: inherit; text-align: left; background: var(--raise); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.pd-slot.r { flex-direction: row-reverse; text-align: right; }
.pd-slot:hover { border-color: var(--gold-line); }
.pd-slot.sel { background: var(--gold-soft); border-color: var(--gold); }
.pd-slot.fixed { cursor: default; opacity: .55; }
.pd-slot.fixed:hover { border-color: var(--border); }
.pd-ico { position: relative; flex: 0 0 auto; width: 36px; height: 36px; background: #050505; border: 1px solid var(--q, #2a2a2f); border-radius: 6px; }
.pd-ico img { display: block; width: 100%; height: 100%; border-radius: 5px; }
.pd-up { position: absolute; right: 1px; bottom: -1px; font-size: 11px; font-style: normal; line-height: 1; color: var(--green); text-shadow: 0 0 2px #000, 0 0 2px #000, 0 0 3px #000; }
.pd-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.pd-name { overflow: hidden; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.pd-gain { font-family: var(--font-mono); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pd-cur { cursor: help; }
.upg-side-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.upg-side-title .link-btn { flex: 0 0 auto; font-size: 12px; }
.upg-cur { margin: -2px 0 8px; font-size: 13.5px; }
.upg-slotlink { padding: 0; font-size: 12px; color: var(--gold-dim); }
.upg-slotlink:hover { color: var(--gold); }
@media (max-width: 860px) {
  .upg2 { grid-template-columns: minmax(0, 1fr); }
  .pd-panel { position: static; }
}
.rot-avail { margin: 0 0 10px; padding: 8px 11px; font-size: 13px; background: rgba(255, 255, 255, .02); border-left: 2px solid var(--gold-dim); border-radius: 0 8px 8px 0; }
.rot-avail p { margin: 0; }
.rot-avail p + p { margin-top: 3px; color: var(--muted); }
.rot-avail b { color: var(--gold); font-weight: 400; }

/* =====================================================================
   Logged out: one Discord splash page instead of the members' pages
   ===================================================================== */
body.logged-out .navbar, body.logged-out .panel, body.logged-out #hero, body.logged-out #page-head,
body.logged-out .discord-fab, body.logged-out .foot-nav { display: none !important; }
body.logged-out .page { display: flex; flex-direction: column; justify-content: center; }
.splash { display: flex; flex-direction: column; gap: 16px; }
.splash-hero {
  padding: 56px 24px 44px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.splash-crest { display: block; width: 72px; height: 72px; margin: 0 auto 16px; }
.splash-title { margin: 0; font-size: 50px; font-weight: 700; line-height: 1.1; letter-spacing: -.015em; color: #fff; }
.splash-sub { max-width: 600px; margin: 14px auto 0; font-size: 16px; line-height: 1.6; color: #d6d3cc; }
.splash-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }
.splash-actions:empty { display: none; }
.btn-splash { gap: 12px; height: 52px; padding: 0 28px; font-size: 16px; font-weight: 600; border-radius: 10px; }
.btn-splash svg { width: 26px; height: 26px; fill: currentColor; }
/* our Discord server, like Discord's own invite card */
.dc-wrap { max-width: 440px; margin: 30px auto 0; text-align: left; }
.dc-label { margin: 0 0 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dc-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: inherit; text-decoration: none; background: #111214; border: 1px solid var(--border-2); border-radius: 10px; transition: border-color .15s; }
.dc-card:hover { border-color: rgba(88, 101, 242, .7); }
.dc-icon { flex: 0 0 auto; display: grid; place-items: center; width: 52px; height: 52px; overflow: hidden; background: #1e1f22; border-radius: 15px; }
.dc-icon img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dc-icon img[src$="favicon.svg"] { width: 64%; height: 64%; }
.dc-body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
.dc-name { overflow: hidden; font-size: 16px; font-weight: 600; color: #fff; white-space: nowrap; text-overflow: ellipsis; }
.dc-counts { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 12.5px; color: #b5bac1; }
.dc-counts:empty { display: none; }
.dc-counts span { display: inline-flex; align-items: center; white-space: nowrap; }
.dc-counts i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; background: #80848e; border-radius: 50%; }
.dc-counts i.on { background: #23a55a; }
.dc-join { flex: 0 0 auto; padding: 9px 18px; font-size: 14px; font-weight: 600; color: #fff; background: #248046; border-radius: 6px; transition: background-color .15s; }
.dc-card:hover .dc-join { background: #1a6334; }
.splash-note { max-width: 470px; margin: 26px auto 0; font-size: 12.5px; color: var(--muted); }
#splash-dev .dev-login { justify-content: center; margin-top: 20px; }
/* what members get */
.splash-feats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.splash-feat { padding: 18px 18px 20px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.splash-feat svg { display: block; width: 26px; height: 26px; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.splash-feat b { display: block; margin: 12px 0 4px; font-size: 15px; font-weight: 600; color: #fff; }
.splash-feat span { font-size: 13px; line-height: 1.55; color: var(--muted); }
@media (max-width: 1000px) {
  .splash-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .splash-hero { padding: 36px 16px 30px; }
  .splash-crest { width: 60px; height: 60px; }
  .splash-title { font-size: 36px; }
  .splash-sub { font-size: 14.5px; }
  .btn-splash { width: 100%; }
  .dc-card { gap: 12px; padding: 12px; }
  .dc-icon { width: 46px; height: 46px; border-radius: 13px; }
  .dc-join { padding: 8px 14px; }
  .splash-feats { gap: 10px; }
  .splash-feat { padding: 14px 14px 16px; }
  .splash-feat b { margin-top: 10px; font-size: 14px; }
  .splash-feat span { font-size: 12.5px; }
}

/* =====================================================================
   Logged in but not on the roster yet: the gate, where you claim your spot with the in-game check
   (client/app.js renderGate). Nobody approves anyone; passing opens everything.
   ===================================================================== */
body.gated .panel, body.gated #hero, body.gated #page-head, body.gated .mainnav, body.gated .nav-search,
body.gated .foot-nav { display: none !important; }
body.gated .navbar-in { justify-content: flex-end; }
body.gated .acct-btn { max-width: none; } /* the account is all the bar holds: show the whole name next to "Not verified" */
body.gated .page { display: flex; flex-direction: column; justify-content: center; }
.gate { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.gate[hidden] { display: none; }
.gate-card { width: 100%; max-width: 660px; padding: 32px 36px 30px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.gate-steps { display: flex; gap: 6px; margin: 0 0 26px; padding: 0; list-style: none; }
.gate-steps li { display: flex; flex: 1 1 0; align-items: center; gap: 8px; min-width: 0; padding: 8px 10px; font-size: 12.5px; font-weight: 500; color: var(--muted); background: var(--raise); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.gate-steps .gs-n { display: grid; flex: 0 0 auto; place-items: center; width: 20px; height: 20px; font-size: 11px; font-weight: 600; border: 1px solid var(--border-2); border-radius: 50%; }
.gate-steps .gs-t { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gate-steps li.on { color: var(--gold); background: var(--gold-soft); border-color: var(--gold-line); }
.gate-steps li.on .gs-n { color: #161106; background: var(--gold); border-color: var(--gold); }
.gate-steps li.done { color: var(--label); }
.gate-steps li.done .gs-n { color: var(--green); border-color: rgba(62, 224, 106, .45); }
.gate-title { margin: 0; font-size: 30px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; color: #fff; }
.gate-sub { margin: 10px 0 0; font-size: 15px; line-height: 1.6; color: #d6d3cc; }
.gate-lead { margin: 20px 0 8px; font-size: 14px; color: var(--label); }
.gate-form { margin-top: 22px; }
.gate-form .wow-input { flex: 1 1 260px; max-width: none; height: 44px; font-size: 15px; }
.gate-form .btn { height: 44px; padding: 0 26px; font-size: 14.5px; }
.gate-hint { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.gate-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.gate-item { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 12px; background: var(--raise); border: 1px solid var(--border-2); border-radius: 10px; }
.gate-item .gc-icon { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 6px; }
.gi-text { display: flex; flex-direction: column; min-width: 0; }
.gi-text b { overflow: hidden; font-size: 14.5px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.gi-slot { font-size: 12.5px; color: var(--muted); }
.gate-do { margin: 16px 0 16px; font-size: 14px; line-height: 1.5; }
.gate-card .gc-actions .btn { height: 38px; padding: 0 16px; font-size: 13.5px; }
.gate-card .gc-actions .btn-primary { padding: 0 26px; }
.gate-note { max-width: 600px; margin: 0; padding: 0 8px; font-size: 13px; line-height: 1.6; text-align: center; color: var(--muted); }
.gate-note[hidden] { display: none; }
.gate-note a { color: var(--gold); }
@media (max-width: 640px) {
  .gate-card { padding: 20px 16px 20px; }
  .gate-title { font-size: 24px; }
  .gate-sub { font-size: 14px; }
  .gate-steps { gap: 4px; margin-bottom: 20px; }
  .gate-steps li { flex-direction: column; gap: 4px; padding: 7px 4px; font-size: 11px; line-height: 1.3; text-align: center; }
  .gate-steps .gs-t { white-space: normal; }
  .gate-form .btn { flex: 1 1 100%; }
  .gate-card .gc-actions .btn-primary { flex: 1 1 100%; }
}

/* ---------- Blue Tracker (#blue): WoW Forever patch notes from Blizzard's forums (client/blue.js) ---------- */
.bt-card { padding-bottom: 8px; }
.bt-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 10px; }
.bt-tools .bt-kinds { margin: 0; }
.bt-q {
  flex: 1 1 220px; min-width: 0; height: 38px; padding: 0 12px; font: inherit; font-size: 13.5px; color: #fff;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--input); border-radius: var(--radius-sm); outline: none;
}
.bt-q:focus { border-color: var(--gold-line); }
.bt-q::placeholder { color: #77767d; }
.bt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.bt-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; font: inherit; font-size: 12.5px; font-weight: 500;
  color: #c6c4bf; background: rgba(255, 255, 255, .025); border: 1px solid var(--border); border-radius: 999px; cursor: pointer;
}
.bt-chip:hover { border-color: var(--border-2); background: rgba(255, 255, 255, .045); }
.bt-chip.active { border-color: var(--gold-line); background: var(--gold-soft); color: var(--gold); }
.bt-chip-n { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.bt-note { margin: 0 0 14px; font-size: 12.5px; color: var(--muted); }
.bt-note a, .bt-src { color: var(--gold); text-decoration: none; }
.bt-note a:hover, .bt-src:hover { color: var(--gold-hi); text-decoration: underline; }
.bt-empty { margin: 18px 0; color: var(--muted); font-size: 13.5px; }
.bt-entry { padding: 14px 0 16px; border-top: 1px solid var(--border); }
.bt-head { margin-bottom: 8px; }
.bt-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.bt-title { margin: 0; font-size: 15.5px; font-weight: 600; color: #fff; line-height: 1.35; }
.bt-kind, .bt-new {
  display: inline-block; padding: 2px 8px; font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
  border-radius: 999px; border: 1px solid var(--border-2); color: #c6c4bf; background: rgba(255, 255, 255, .03);
}
.bt-kind-hotfix { color: var(--blue); border-color: rgba(94, 166, 255, .35); background: rgba(94, 166, 255, .08); }
.bt-kind-notes { color: var(--gold); border-color: var(--gold-line); background: var(--gold-soft); }
.bt-new { color: #0a0a0b; background: var(--gold); border-color: var(--gold); }
.bt-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.bt-src { margin-left: auto; font-weight: 500; }
.bt-tags { display: inline-flex; flex-wrap: wrap; gap: 4px 8px; }
.bt-tag { font-size: 12px; font-weight: 500; }
.bt-body { font-size: 13.5px; line-height: 1.55; color: var(--text); overflow-wrap: anywhere; }
.bt-body.bt-clamp { max-height: 380px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.bt-more { margin-top: 8px; }
.bt-h { margin: 12px 0 6px; font-size: 14px; color: #fff; }
.bt-sec { margin: 14px 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.bt-sec:first-child { margin-top: 2px; }
.bt-p { margin: 6px 0; }
.bt-hr { border: 0; border-top: 1px solid var(--border); margin: 12px 0; }
.bt-ul { margin: 2px 0 4px; padding-left: 18px; }
.bt-ul .bt-ul { padding-left: 16px; }
.bt-ul li { margin: 3px 0; }
.bt-ul li::marker { color: #55545a; }
.bt-group { list-style: none; margin-left: -14px !important; }
.bt-label { display: block; margin-top: 6px; font-weight: 600; color: #fff; }
.bt-dev, .bt-dev em { color: var(--muted); font-style: italic; }
@media (max-width: 640px) {
  .bt-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px 10px; padding: 0 14px 2px; scrollbar-width: none; }
  .bt-chips::-webkit-scrollbar { display: none; }
  .bt-chip { flex: 0 0 auto; }
  .bt-kinds { width: 100%; }
  .bt-kinds .sim-tab { flex: 1 1 auto; padding: 6px 8px; }
  .bt-src { margin-left: 0; }
  .bt-body { font-size: 13.5px; }
}

/* ---- Market Holes (#market) ---- */
/* Gold-making from the guild leader's AH scans (client/market). Flat like the rest of the site: tinted fills and
   hairlines only. Chart and material colours are the validated categorical slots (CVD-safe on near-black). */
.mh { display: flex; flex-direction: column; gap: 14px; }
.mh code, .mh-help code { padding: 1px 6px; font-family: var(--font-mono); font-size: 12.5px; color: #fff; background: var(--raise-2); border: 1px solid var(--border); border-radius: 5px; }
.mh-muted { color: var(--muted); }
.mh-l2 { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.mh-good-t { color: var(--green); }
.mh-warn-t { color: #f0a64b; }
.mh-linkish { padding: 0 2px; font-size: 12.5px; color: var(--gold); background: none; border: 0; cursor: pointer; }
.mh-linkish:hover { color: var(--gold-hi); text-decoration: underline; text-underline-offset: 3px; }
a.mh-wh { font-weight: 500; color: var(--blue); text-decoration: none; white-space: nowrap; }
a.mh-wh:hover { text-decoration: underline; text-underline-offset: 3px; }

/* toolbar: search | auction house + scan age + help, then the data line */
.mh-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 16px; }
.mh-search { flex: 1 1 340px; max-width: 520px; }
.mh-search .sugg { justify-content: space-between; }
.mh-bar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-left: auto; font-size: 13px; }
.mh-ah .field > span { white-space: nowrap; }
.mh-subline { flex: 1 1 100%; font-size: 12.5px; color: var(--muted); }
.mh-relay { display: block; margin-top: 2px; }
.mh-relay.quiet { color: #f0a64b; }
.mh-badge { padding: 4px 10px; font-size: 12.5px; font-weight: 500; white-space: nowrap; color: var(--muted); background: rgba(255, 255, 255, .03); border: 1px solid var(--border-2); border-radius: 999px; }
.mh-badge.fresh { color: var(--green); background: rgba(62, 224, 106, .08); border-color: rgba(62, 224, 106, .3); }
.mh-badge.ok { color: var(--gold); background: var(--gold-soft); border-color: var(--gold-line); }
.mh-badge.stale { color: #ff8a8a; background: rgba(255, 80, 80, .08); border-color: rgba(255, 80, 80, .3); }

/* your professions */
.mh-profs-card { padding: 16px 18px; }
.mh-profs-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; margin-bottom: 12px; }
.mh-profs-title { flex: 1 1 320px; min-width: 0; }
.mh-char .wow-select { min-width: 230px; }
.mh-prof-list { display: flex; flex-wrap: wrap; gap: 8px; }
.mh-prof { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 6px 0 0; background: var(--raise); border: 1px solid var(--border-2); border-radius: var(--radius-sm); }
.mh-prof:hover { border-color: rgba(255, 255, 255, .18); }
.mh-prof.on { background: var(--gold-soft); border-color: var(--gold-line); }
.mh-prof-btn { align-self: stretch; padding: 0 4px 0 12px; font-size: 13.5px; font-weight: 500; color: #c6c4bf; background: none; border: 0; cursor: pointer; }
.mh-prof.on .mh-prof-btn { color: var(--gold); }
.mh-prof:not(.on) .mh-prof-btn { padding-right: 2px; }
.mh-kind { padding-right: 6px; font-size: 11px; color: var(--muted); }
.mh-skill { width: 58px; height: 26px; padding: 0 6px; font-family: var(--font-mono); font-size: 13px; text-align: right; color: #fff; background: rgba(0, 0, 0, .35); border: 1px solid var(--input); border-radius: 6px; }
.mh-skill:focus, .mh-num:focus { outline: none; border-color: var(--gold-line); }
.mh-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.mh-opts .field > span { white-space: nowrap; }
.mh-num { width: 76px; font-family: var(--font-mono); }

/* list tabs + the list */
.mh-tabs { margin: 0; }
.mh-tabs .sim-tab { padding: 6px 11px; }
.mh-n { margin-left: 7px; padding: 0 6px; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); background: rgba(255, 255, 255, .06); border-radius: 5px; }
.sim-tab.active .mh-n { color: var(--gold); background: var(--gold-soft); }
.mh-intro { margin: -4px 2px 0; font-size: 13px; color: var(--muted); }
.mh-list { padding: 0; overflow: hidden; }
.mh-loading, .mh-empty { padding: 44px 16px; text-align: center; color: var(--muted); }
.mh-empty b { color: #fff; }
.mh-empty .btn { margin-top: 12px; }
.mh-sort { display: none; }
.mh-table-wrap { overflow-x: auto; }
.mh-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.mh-table th { position: sticky; top: 0; padding: 10px 12px; font-size: 12px; font-weight: 500; text-align: left; white-space: nowrap; color: var(--muted); background: var(--card-dark); border-bottom: 1px solid var(--border-2); cursor: pointer; user-select: none; }
.mh-table th:hover, .mh-table th.sorted { color: #fff; }
.mh-table th.sorted::after { content: " ▾"; color: var(--gold); }
.mh-table th.sorted.asc::after { content: " ▴"; }
.mh-table th.make { cursor: default; }
.mh-table td { padding: 9px 12px; vertical-align: top; border-bottom: 1px solid rgba(255, 255, 255, .045); }
.mh-table th.num, .mh-table td.num { text-align: right; }
.mh-table td.num { white-space: nowrap; }
.mh-table tbody tr { cursor: pointer; }
.mh-table tbody tr:hover { background: var(--row-hover); }
.mh-table tbody tr:focus-visible { outline: 2px solid var(--gold-line); outline-offset: -2px; }
.mh-table tbody tr:last-child td { border-bottom: 0; }
.mh-table td.mh-main { min-width: 260px; }
.mh-table td.num .mh-l2 { font-family: var(--font-sans); }
.mh-table td.make { width: 1%; white-space: nowrap; }

/* item names, money, badges */
.mh-it { font-weight: 500; }
a.mh-it { text-decoration: none; }
a.mh-it:hover { text-decoration: underline; text-underline-offset: 3px; }
.mh-q0 { color: #9d9d9d; } .mh-q1 { color: #fff; } .mh-q2 { color: #1eff00; } .mh-q3 { color: #0070dd; }
.mh-q4 { color: #a335ee; } .mh-q5 { color: #ff8000; } .mh-q6 { color: #e6cc80; }
.tt-title.mh-q0 { color: #9d9d9d; } .tt-title.mh-q2 { color: #1eff00; } .tt-title.mh-q3 { color: #0070dd; } .tt-title.mh-q4 { color: #a335ee; } .tt-title.mh-q5 { color: #ff8000; }
.mh-money { font-family: var(--font-mono); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; color: #fff; }
.mh-money b { font-weight: 500; }
.mh-coin { display: inline-block; width: .72em; height: .72em; margin: 0 5px 0 2px; vertical-align: -.02em; border-radius: 50%; }
.mh-money .mh-coin:last-child { margin-right: 0; }
.mh-coin.g { background: #e9b949; }
.mh-coin.s { background: #c3c8d0; }
.mh-coin.c { background: #c27a42; }
.mh-profit b { font-weight: 600; color: var(--green); }
.mh-neg, .mh-neg b { color: var(--red) !important; }
.mh-type { display: inline-block; padding: 1px 7px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; vertical-align: 1px; border: 1px solid transparent; border-radius: 5px; }
.mh-type.t-hole { color: var(--gold); background: var(--gold-soft); border-color: var(--gold-line); }
.mh-type.t-craft, .mh-type.t-uncharted { color: #8fc3ff; background: rgba(94, 166, 255, .1); border-color: rgba(94, 166, 255, .3); }
.mh-type.t-flip { color: var(--green); background: rgba(62, 224, 106, .08); border-color: rgba(62, 224, 106, .28); }
.mh-type.t-deal, .mh-type.t-disenchant { color: #c79bff; background: rgba(163, 53, 238, .12); border-color: rgba(163, 53, 238, .35); }
.mh-type.t-conversion, .mh-type.t-gather, .mh-type.t-quest { color: #d4d2cc; background: rgba(255, 255, 255, .05); border-color: var(--border-2); }
.mh-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.mh-chip { padding: 0 7px; font-size: 12px; line-height: 20px; white-space: nowrap; color: var(--muted); border: 1px solid var(--border-2); border-radius: 5px; }
.mh-chip.f-forever, .mh-chip.ev-new { color: #ffa040; border-color: rgba(255, 128, 0, .35); }
.mh-chip.f-cooldown { color: #8fc3ff; border-color: rgba(94, 166, 255, .32); }
.mh-chip.f-thin-price, .mh-chip.f-hist-price, .mh-chip.f-spike, .mh-chip.f-not-learned, .mh-chip.f-needs-skill { color: #f0a64b; border-color: rgba(240, 166, 75, .35); }
.mh-chip.f-suspect, .mh-chip.f-short, .mh-chip.f-farm { color: #ff8a8a; border-color: rgba(255, 80, 80, .35); }
.mh-chip.f-skillup, .mh-chip.ev-demand, .mh-chip.ev-quest { color: var(--green); border-color: rgba(62, 224, 106, .3); }
.mh-liq { display: inline-block; width: 46px; height: 6px; overflow: hidden; vertical-align: middle; background: rgba(255, 255, 255, .12); border-radius: 3px; }
.mh-liq b { display: block; height: 100%; background: var(--gold); }
.mh-sold { font-family: var(--font-mono); font-size: 13px; color: #fff; }
.mh-sold.conf0 { color: var(--muted); }

/* buy -> craft -> sell (rows) */
.mh-flow { display: grid; gap: 3px; margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.mh-flow-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: start; }
.mh-flow .step { padding-top: 1px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.mh-mat-list { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; }
.mh-mat-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.mh-mat-list .mq { min-width: 30px; font-family: var(--font-mono); text-align: right; color: #fff; }
.mh-mat-list .nm { color: var(--label); }
.mh-mat-list .ea { margin-left: auto; padding-left: 8px; }
.mh-flow .src { padding: 0 5px; font-size: 11.5px; color: var(--green); background: rgba(62, 224, 106, .08); border-radius: 4px; }
.mh-flow .src.warn { color: #ff8a8a; background: rgba(255, 80, 80, .08); }

/* Make ×N */
.mh-stepper { display: inline-flex; align-items: stretch; height: 30px; overflow: hidden; background: rgba(0, 0, 0, .3); border: 1px solid var(--border-2); border-radius: 7px; }
.mh-stepper button { min-width: 28px; padding: 0 8px; font-size: 15px; color: var(--muted); background: none; border: 0; cursor: pointer; }
.mh-stepper button:hover { color: var(--gold); background: var(--gold-soft); }
.mh-stepper input { width: 44px; padding: 0 2px; font-family: var(--font-mono); font-size: 13px; text-align: center; color: #fff; background: none; border: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); -moz-appearance: textfield; appearance: textfield; }
.mh-stepper input:focus { outline: none; background: rgba(255, 255, 255, .04); }
.mh-stepper input::-webkit-outer-spin-button, .mh-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* the item window */
html.mh-modal-open { overflow: hidden; }
.mh-scrim { position: fixed; inset: 0; z-index: 1400; visibility: hidden; opacity: 0; background: rgba(0, 0, 0, .72); transition: opacity .18s, visibility 0s linear .18s; }
.mh-scrim.open { visibility: visible; opacity: 1; transition: opacity .18s; }
.mh-modal {
  position: fixed;
  z-index: 1450;
  top: 24px;
  left: 50%;
  width: min(1640px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  visibility: hidden;
  opacity: 0;
  color: var(--text);
  background: var(--popover);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  box-shadow: var(--pop-shadow);
  transform: translate(-50%, -10px);
  transition: opacity .16s, transform .16s, visibility 0s linear .16s;
}
.mh-modal.open { visibility: visible; opacity: 1; transform: translate(-50%, 0); transition: opacity .18s, transform .2s; }
.mh-modal:focus { outline: none; }
.mh-mhead {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "title close" "facts facts";
  align-items: start;
  gap: 10px 18px;
  padding: 14px 16px 14px 20px;
  background: var(--card-dark);
  border-bottom: 1px solid var(--border);
}
.mh-mtitle { grid-area: title; min-width: 0; }
.mh-mtitle h2 { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.25; color: #fff; }
.mh-msub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.mh-msub:empty { display: none; }
.mh-back { margin: 0 0 8px; }
.mh-facts { grid-area: facts; display: flex; flex-wrap: wrap; gap: 8px; }
.mh-facts:empty { display: none; }
.mh-fact { padding: 6px 12px; background: var(--raise); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.mh-fact .k { font-size: 11px; color: var(--muted); white-space: nowrap; }
.mh-fact .v { margin-top: 1px; font-weight: 500; color: #fff; white-space: nowrap; }
.mh-close { grid-area: close; display: grid; place-items: center; width: 34px; height: 34px; padding: 0 0 3px; font-size: 24px; line-height: 1; color: var(--muted); background: var(--raise-2); border: 1px solid var(--border-2); border-radius: var(--radius-sm); cursor: pointer; }
.mh-close:hover { color: var(--gold-hi); border-color: var(--gold-line); }
/* Share + × together, top right of the item window */
.mh-hacts { grid-area: close; display: flex; align-items: center; gap: 8px; }
.mh-share { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px 0 11px; font: inherit; font-size: 13px; font-weight: 600; color: var(--text); background: var(--raise-2); border: 1px solid var(--border-2); border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap; }
.mh-share:hover:not(:disabled) { color: var(--gold-hi); border-color: var(--gold-line); }
.mh-share:disabled { opacity: .45; cursor: default; }
.mh-share-i { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 1100px) {
  .mh-mhead { grid-template-columns: minmax(260px, 1fr) auto auto; grid-template-areas: "title facts close"; }
  .mh-facts { justify-content: flex-end; }
}
.mh-mmain { padding: 16px 20px 20px; }
.mh-mgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px 30px; align-items: start; }
.mh-mcol { min-width: 0; }
.mh-more { display: contents; }
.mh-mc:not(:has(.mh-block)) { display: none; }
.mh-block { min-width: 0; margin-bottom: 16px; }
@media (min-width: 940px) {
  .mh-mgrid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
  .mh-mc { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 30px; padding-top: 16px; border-top: 1px solid var(--border); }
  .mh-mc > .mh-steps-block { grid-column: 1 / -1; }
}
@media (min-width: 1260px) {
  .mh-mgrid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .85fr); }
  .mh-mc { grid-column: auto; display: block; padding-top: 0; border-top: 0; }
}
.mh-modal h3 { margin: 18px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.mh-mcol > :first-child, .mh-mcol > :first-child > h3:first-child, .mh-block > h3:first-child { margin-top: 0; }
.mh-h3n { margin-left: 6px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); }
.mh-modal ul { margin: 0; padding-left: 18px; }
.mh-modal li { margin: 3px 0; }
.mh-modal li::marker { color: var(--gold-dim); }
.mh-block:not(.all) .x { display: none; }
/* Sold by: each vendor's price at the right of its row */
.mh-vp { float: right; margin-left: 12px; white-space: nowrap; }
.mh-vp.mh-muted { font-size: 12px; }
.mh-seen { margin-left: 4px; font-size: 11px; color: var(--gold-dim); }
.mh-vnote { margin-top: 6px; font-size: 12px; }
.mh-modal .mh-link { cursor: pointer; text-decoration: underline dotted rgba(255, 255, 255, .25); text-underline-offset: 3px; }
.mh-modal .mh-link:hover, .mh-modal .mh-link:focus-visible { text-decoration-color: currentColor; outline: none; }
.mh-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.mh-modal .mh-steps li { position: relative; margin: 8px 0; padding-left: 30px; counter-increment: s; }
.mh-steps li::before { content: counter(s); position: absolute; top: 1px; left: 0; display: grid; place-items: center; width: 20px; height: 20px; font-size: 12px; font-weight: 600; color: var(--gold); background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: 5px; }
.mh-mini { width: 100%; border-collapse: collapse; font-size: 13px; }
.mh-mini td, .mh-mini th { padding: 5px 6px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.mh-mini th { font-size: 12px; font-weight: 500; text-align: left; color: var(--muted); }
.mh-mini th.num, .mh-mini td.num { text-align: right; }
.mh-book td { padding-top: 3px; padding-bottom: 3px; }
.mh-book td.barc { width: 55%; }
.mh-book:not(.all) tr.extra { display: none; }

.mh-depth { min-width: 2px; height: 8px; background: var(--gold-dim); border-radius: 0 3px 3px 0; }
.mh-more-btn { margin-top: 8px; }
.mh-scroll-x { overflow-x: auto; }
.mh-quote-warn { margin: 10px 0 0; padding: 7px 10px 7px 26px; font-size: 12.5px; color: #f0a64b; background: rgba(240, 166, 75, .07); border: 1px solid rgba(240, 166, 75, .3); border-radius: var(--radius-sm); }

/* cost to make: Make (gold) vs Buy vs Sell (grey) on one scale, then the materials split */
.mh-cost-card {
  --cat-1: #3987e5; --cat-2: #d95926; --cat-3: #199e70; --cat-4: #c98500;
  --cat-5: #d55181; --cat-6: #0ca30c; --cat-7: #9085e9; --cat-8: #e66767;
  --cat-other: #8b8780; --bar-neutral: #5d5d64;
  padding: 14px 16px;
  background: var(--raise);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.mh-cc-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.mh-modal .mh-cc-head h3 { margin: 0; }
.mh-cc-make { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.mh-cc-req { margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.mh-cc-loading { padding: 18px 0 8px; }
.mh-cc-bars { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; align-items: center; gap: 8px 14px; margin: 14px 0 2px; }
.mh-cc-lab { font-size: 13px; font-weight: 500; line-height: 1.2; color: #fff; }
.mh-cc-lab small, .mh-cc-val small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.mh-cc-track { display: flex; align-items: center; min-height: 16px; }
.mh-cc-bar { min-width: 3px; height: 16px; background: var(--bar-neutral); border-radius: 0 4px 4px 0; }
.mh-cc-bar.k-make { background: var(--gold); }
.mh-cc-none { font-size: 12.5px; color: var(--muted); }
.mh-cc-val { line-height: 1.2; text-align: right; }
.mh-cc-val small .mh-money { font-size: 12px; color: var(--muted); }
.mh-cc-verdict { margin: 12px 0 0; font-size: 13px; }
.mh-cc-strip { display: flex; gap: 2px; height: 8px; margin: 12px 0 2px; overflow: hidden; border-radius: 4px; }
.mh-cc-strip .seg { flex: 1 1 0; min-width: 0; height: 100%; transition: opacity .12s; }
.mh-cost-card.hovering .seg:not(.hl) { opacity: .3; }
.mh-cc-mats { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 13px; }
.mh-cc-mats th { padding: 2px 6px 5px; font-size: 11.5px; font-weight: 500; text-align: left; color: var(--muted); }
.mh-cc-mats th.num { text-align: right; }
.mh-cc-mats td { padding: 5px 6px; vertical-align: top; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.mh-cc-mats td.num { text-align: right; white-space: nowrap; }
.mh-cc-mats tr:last-child td { border-bottom: 0; }
.mh-cc-mats tr.hl td { background: rgba(255, 255, 255, .05); }
.mh-cc-mats .swc { width: 1%; padding-right: 0; }
.mh-cc-mats .sw { display: block; width: 10px; height: 10px; margin-top: 5px; border-radius: 2px; }
.mh-cc-mats tr.has-alt td { padding-bottom: 1px; border-bottom: 0; }
.mh-cc-mats tr.alt-row td { padding-top: 0; }
.mh-cc-mats .qty { margin-right: 2px; font-family: var(--font-mono); color: var(--muted); }
.mh-cc-mats td.mat { width: 100%; max-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mh-cc-mats .from { margin-left: 3px; font-size: 12px; color: var(--muted); }
.mh-alt { font-size: 12.5px; color: var(--label); }
.mh-cc-own { margin-top: 10px; padding: 7px 10px; font-size: 12.5px; background: rgba(62, 224, 106, .07); border: 1px solid rgba(62, 224, 106, .28); border-radius: var(--radius-sm); }
.mh-cc-tip { position: fixed; z-index: 1600; max-width: 320px; padding: 6px 10px; font-size: 12.5px; pointer-events: none; color: #fff; background: rgba(12, 12, 14, .97); border: 1px solid var(--border-2); border-radius: var(--radius-sm); box-shadow: var(--pop-shadow); }
details.mh-more-recipe { margin-top: 10px; background: var(--raise); border: 1px solid var(--border); border-radius: 10px; }
details.mh-more-recipe > summary { padding: 9px 12px; font-size: 13px; color: var(--muted); cursor: pointer; }
details.mh-more-recipe > summary:hover { color: #fff; }
details.mh-more-recipe[open] > summary { border-bottom: 1px solid var(--border); }
details.mh-more-recipe .mh-cost-card { background: transparent; border: 0; }

/* price history chart */
.mh-viz {
  --series-1: #3987e5; /* lowest price */
  --series-2: #d95926; /* median price */
  --series-3: #199e70; /* units listed */
  --grid: #222226;
  --baseline: #3c3c42;
  --surface: var(--popover);
  position: relative;
  margin-top: 14px;
}
.mh-mcol > .mh-viz:first-child { margin-top: 0; }
.mh-viz-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 10px; }
.mh-modal .mh-viz-head h3 { margin: 0; }
.mh-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.mh-key { display: inline-block; width: 14px; height: 2px; margin-right: 6px; vertical-align: middle; border-radius: 1px; }
.mh-key.bar { width: 9px; height: 9px; border-radius: 2px; }
.mh-viz svg { display: block; width: 100%; height: auto; margin-top: 8px; overflow: visible; touch-action: pan-y; }
.mh-viz svg:focus { outline: none; }
.mh-viz svg:focus-visible { outline: 2px solid var(--gold-line); outline-offset: 2px; }
.mh-tick { font-family: var(--font-mono); font-size: 11px; fill: var(--muted); }
.mh-end-label { font-size: 11.5px; fill: var(--label); }
.mh-viz-tip { position: absolute; z-index: 3; min-width: 150px; padding: 7px 10px; font-size: 12.5px; pointer-events: none; color: #fff; background: rgba(12, 12, 14, .97); border: 1px solid var(--border-2); border-radius: var(--radius-sm); box-shadow: var(--pop-shadow); }
.mh-viz-tip .when { margin-bottom: 3px; font-size: 12px; color: var(--muted); }
.mh-viz-tip .row { display: flex; align-items: center; gap: 6px; }
.mh-viz-tip .row b { font-family: var(--font-mono); font-weight: 500; }
.mh-viz-tip .row span { color: var(--muted); }
.mh-viz-note { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.mh-viz-table { margin-top: 6px; font-size: 12.5px; }
.mh-viz-table summary { color: var(--muted); cursor: pointer; }
.mh-viz-table summary:hover { color: #fff; }

/* tooltip, toast, help */
.mh-tip { max-width: 300px; }
.mh-tip .tt-row { gap: 18px; }
.mh-tt-hint { font-size: 11.5px; }
.mh-toast { position: fixed; z-index: 2100; bottom: 22px; left: 50%; padding: 9px 16px; font-size: 13.5px; font-weight: 500; pointer-events: none; color: var(--gold); background: var(--popover); border: 1px solid var(--gold-line); border-radius: var(--radius-sm); box-shadow: var(--pop-shadow); opacity: 0; transform: translate(-50%, 12px); transition: opacity .2s, transform .2s; }
.mh-toast.show { opacity: 1; transform: translate(-50%, 0); }
.mh-help { width: min(580px, 100%); font-size: 14px; }
.mh-help p { margin: 0 0 12px; color: #d6d3cc; }
.mh-help .popup-btns { margin-top: 18px; }

/* tablet and phone */
@media (max-width: 760px) {
  .mh-search { max-width: none; }
  .mh-bar-right { margin-left: 0; }
  .mh-char, .mh-char .wow-select { width: 100%; min-width: 0; }
  .mh-tabs { display: flex; flex-wrap: nowrap; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .mh-tabs::-webkit-scrollbar { display: none; }
  .mh-tabs .sim-tab { flex: 0 0 auto; }
  .mh-sort { display: flex; margin: 12px 14px 4px; }
  .mh-sort .wow-select { flex: 1 1 auto; }
  /* the lists become one card per row: the title on top, every other column as a labelled cell */
  .mh-table thead { display: none; }
  .mh-table, .mh-table tbody { display: block; width: 100%; }
  .mh-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .mh-table tbody tr:last-child { border-bottom: 0; }
  .mh-table td { display: block; min-width: 0; padding: 0; border: 0; }
  .mh-table td.mh-main { grid-column: 1 / -1; min-width: 0; }
  .mh-table td.num { text-align: left; white-space: normal; }
  .mh-table td:not(.mh-main)::before { content: attr(data-h); display: block; margin-bottom: 1px; font-family: var(--font-sans); font-size: 11.5px; color: var(--muted); }
  .mh-table td:empty { display: none; }
  .mh-table td.make { width: auto; }
  /* the item window fills the screen */
  .mh-modal { top: 0; left: 0; width: 100vw; height: 100dvh; max-height: none; border: 0; border-radius: 0; transform: translateY(8px); }
  .mh-modal.open { transform: none; }
  /* the title bar scrolls away (it's tall here); the close button stays put */
  .mh-mhead { position: relative; padding: 12px 100px 12px 14px; }
  .mh-hacts { position: fixed; z-index: 6; top: 10px; right: 10px; }
  .mh-hacts > button { background: var(--card-dark); }
  .mh-share { width: 34px; padding: 0; justify-content: center; }
  .mh-share-t { display: none; }
  .mh-mtitle h2 { font-size: 17px; }
  .mh-mmain { padding: 12px 14px 28px; }
  .mh-facts { gap: 6px; }
  .mh-fact { padding: 5px 9px; }
  .mh-cost-card { padding: 12px; }
  .mh-cc-bars { gap: 6px 10px; }
  .mh-cc-mats .mh-share { display: none; }
}
@media (max-width: 640px) {
  .mh-bar, .mh-profs-card { padding: 14px; }
  .mh-opts { gap: 10px 16px; }
  .mh-opts .check { flex: 1 1 100%; }
}
/* Eight page links since Market: go compact a little sooner (880px, was 860) and use the short labels from 820px
   (was 750), so the links still fit on one row down to phone width. */
@media (max-width: 880px) { .nav-link { padding: 7px 10px; font-size: 13.5px; } }
@media (max-width: 820px) { .nl-l { display: none; } .nl-s { display: inline; } }

/* Market: Leveling kit (#market/level) and the leader's API keys panel (client/market/level.js, keys.js) */
.mh-list.mh-list-level { padding: 16px 18px 18px; overflow: visible; }
.mh-lv-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 18px; }
.mh-lv-controls .wow-select { min-width: 170px; }
.mh-seg { display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--border-2); border-radius: var(--radius-sm); overflow: hidden; }
.mh-seg button { height: 34px; padding: 0 12px; font-size: 13px; font-weight: 500; color: #c6c4bf; background: var(--raise); border: 0; border-right: 1px solid var(--border-2); cursor: pointer; }
.mh-seg button:last-child { border-right: 0; }
.mh-seg button:hover { color: #fff; }
.mh-seg button.on { color: var(--gold); background: var(--gold-soft); }
.mh-lv-src { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.mh-lv-src b { color: #fff; font-weight: 500; }
.mh-lv-body { margin-top: 14px; transition: opacity .15s; }
.mh-lv-body.mh-lv-busy { opacity: .55; }
.mh-lv-body .mh-loading, .mh-lv-body .mh-empty { padding: 28px 12px; }
.mh-lv-tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.mh-lv-warn { margin: 12px 0 0; padding: 10px 14px 10px 30px; font-size: 13px; color: #f0a64b; background: rgba(240, 166, 75, .06); border: 1px solid rgba(240, 166, 75, .25); border-radius: var(--radius-sm); }
.mh-lv-warn li + li { margin-top: 4px; }
.mh-lv-sec { margin-top: 18px; }
.mh-lv-sec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 8px; }
.mh-lv-sec-head h3 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.mh-lv .mh-table-wrap, .mh-api .mh-table-wrap { border: 1px solid var(--border); border-radius: var(--radius-sm); }
.mh-lv-table th, .mh-key-table th { cursor: default; }
.mh-lv-table tbody tr, .mh-key-table tbody tr { cursor: default; }
.mh-lv-table td.mh-main { min-width: 240px; }
.mh-lv-qty { font-family: var(--font-mono); color: #fff; }
.mh-lv-learn { margin: 0; padding-left: 20px; font-size: 13.5px; }
.mh-lv-learn li + li { margin-top: 5px; }
.mh-lv-foot { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }
.mh-fact.mh-fact-main { border-color: var(--gold-line); background: var(--gold-soft); }
.mh-fact.mh-fact-main .k { color: var(--gold); }
.mh-fact.mh-fact-main .v { font-size: 17px; }
.mh-lv-table tr.mh-lv-rank td { padding: 9px 12px; font-size: 13px; background: rgba(255, 255, 255, .025); border-top: 1px solid var(--gold-line); }
.mh-lv-rank-k { display: inline-block; margin-right: 6px; padding: 0 7px; font-size: 11.5px; font-weight: 600; line-height: 20px; color: var(--gold); border: 1px solid var(--gold-line); border-radius: 5px; }
.mh-lv-head-tools { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mh-api { padding: 14px 18px; }
.mh-api-d > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; cursor: pointer; list-style: none; }
.mh-api-d > summary::-webkit-details-marker { display: none; }
.mh-api-d > summary::before { content: "▸"; color: var(--gold); }
.mh-api-d[open] > summary::before { content: "▾"; }
.mh-api-d > summary .card-title { display: inline; font-size: 15px; }
.mh-api-body { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; font-size: 13.5px; }
.mh-api-body p { margin: 0; }
.mh-key-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.mh-key-form .wow-input { width: 240px; max-width: 100%; }
.mh-key-new { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: var(--radius-sm); }
.mh-key-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mh-key-new .mh-linkish { align-self: flex-start; padding: 0; }
.mh-key-val { flex: 1 1 260px; min-width: 0; padding: 6px 10px; font-family: var(--font-mono); font-size: 13px; color: #fff; word-break: break-all; background: rgba(0, 0, 0, .35); border: 1px solid var(--border-2); border-radius: 6px; user-select: all; }
.mh-api-docs summary { color: var(--muted); cursor: pointer; }
.mh-api-docs summary:hover { color: #fff; }
.mh-api-docs > * + * { margin-top: 8px; }
.mh-pre { margin: 0; padding: 8px 10px; font-family: var(--font-mono); font-size: 12.5px; color: #fff; white-space: pre-wrap; word-break: break-all; background: rgba(0, 0, 0, .35); border: 1px solid var(--border); border-radius: 6px; }
.mh-api-eps { margin: 0; padding-left: 18px; }
.mh-api-eps li + li { margin-top: 4px; }
.mh-api-eps code { word-break: break-all; }
@media (max-width: 760px) {
  .mh-list.mh-list-level { padding: 14px; }
  .mh-lv-controls { display: grid; grid-template-columns: 1fr 1fr; }
  .mh-lv-controls > .field:first-child, .mh-lv-controls > div.field { grid-column: 1 / -1; }
  .mh-lv-controls .wow-select, .mh-lv-controls .mh-num { width: 100%; min-width: 0; }
  .mh-seg { display: flex; }
  .mh-seg button { flex: 1 1 0; padding: 0 8px; }
  .mh-lv .mh-table-wrap, .mh-api .mh-table-wrap { border: 0; }
  .mh-lv-table td.mh-main { min-width: 0; }
  .mh-lv-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mh-lv .mh-table tr, .mh-api .mh-table tr { padding: 12px 0; }
  .mh-lv-tiles .mh-fact-main { grid-column: 1 / -1; }
  .mh-lv-table tr.mh-lv-rank td { display: block; }
  .mh-lv-head-tools { width: 100%; }
  .mh-api { padding: 14px; }
  .mh-key-form > .field { flex: 1 1 100%; }
  .mh-key-form .wow-input, .mh-key-form .wow-select { width: 100%; }
}

/* ---- Market Holes: full item tooltips (Blizzard's data) ---- */
.mh-tip .mh-tt-ico { float: right; width: 36px; height: 36px; margin: 0 0 6px 10px; border-radius: 4px; border: 1px solid rgba(255,255,255,.14); }
.mh-tip .mh-tt-reagent { color: #66bbff; }
.mh-tip .mh-tt-made { opacity: .92; }
.mh-tip .mh-tt-made .tt-title { font-size: 13px; }

/* ---- Armory: Professions tab (skills and every known recipe, with the game's difficulty colours) ---- */
.prof-tab { display: grid; gap: 14px; }
.prof-tab .subframe + .subframe { margin-top: 0; }
.prof-tools { margin: 0; }
.prof-find { width: min(360px, 100%); }
.prof-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.prof-ico { flex: 0 0 auto; width: 30px; height: 30px; overflow: hidden; background: #050505; border: 1px solid var(--q, #2a2a2f); border-radius: 6px; }
.prof-ico img { display: block; width: 100%; height: 100%; }
.prof-ico.sm { width: 26px; height: 26px; border-radius: 5px; }
.prof-title { flex: 1 1 200px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; min-width: 0; font-size: 15px; }
.prof-title small { flex-basis: 100%; font-size: 12.5px; }
.prof-skill { display: flex; align-items: center; gap: 10px; flex: 0 1 260px; min-width: 170px; }
.prof-skill .pop-bar { flex: 1; }
.prof-skill .num { color: var(--gold); font-family: var(--font-mono); font-size: 13px; white-space: nowrap; }
/* Each profession's recipes scroll inside their own box, so a long list doesn't push the other professions down. */
.prof-list {
  list-style: none; margin: 12px 0 0; padding: 6px; display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); align-content: start; gap: 2px 16px;
  max-height: 372px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable;
  background: var(--raise); border: 1px solid var(--border); border-radius: 8px;
}
.prof-list::-webkit-scrollbar-thumb { border-color: var(--raise); }
.prof-rec { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 5px 7px; border-radius: 6px; cursor: pointer; }
.prof-rec:hover, .prof-rec:focus-visible { background: var(--raise-2); outline: none; }
.prof-main { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 5px; font-size: 13.5px; }
.prof-name { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.prof-mats { flex-basis: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11.5px; }
.prof-nums { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.prof-levels { font-family: var(--font-mono); font-size: 11.5px; white-space: nowrap; }
.prof-cost .mh-money { font-size: 12px; }
.prof-none { margin: 10px 0 0; }
/* Primary professions two across (one recipe column each); secondary skills smaller, below. */
.prof-grid { display: grid; gap: 14px; }
.prof-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prof-primary.one { grid-template-columns: minmax(0, 1fr); }
.prof-secondary { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.prof-primary:not(.one) .prof-list, .prof-secondary .prof-list { grid-template-columns: minmax(0, 1fr); }
.prof-primary:not(.one) .prof-list { max-height: 480px; }
.prof-secondary .prof-list { max-height: 300px; }
.prof-secondary .prof-title { font-size: 14px; }
.prof-sec-title { margin: 4px 2px -4px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-dim); }
@media (max-width: 900px) { .prof-primary { grid-template-columns: minmax(0, 1fr); } }
.prof-more { margin-top: 10px; }
/* The game's trade-skill colours */
.prof-c-orange { color: #ff8040; } .prof-c-yellow { color: #ffff00; } .prof-c-green { color: #40bf40; } .prof-c-grey { color: #808080; } .prof-c-none { color: var(--text); }
.prof-tt-skill .prof-c-yellow, .prof-tt-skill .prof-c-green, .prof-tt-skill .prof-c-grey { font-family: var(--font-mono); }
@media (max-width: 640px) {
  .prof-list { grid-template-columns: minmax(0, 1fr); max-height: min(372px, 60vh); }
  .prof-skill { flex-basis: 100%; }
}

/* ---- DPS sim: Single target / AoE switch and the enemy count ---- */
.sim-targets-row { display: flex; align-items: center; gap: 8px; }
.sim-seg { display: inline-flex; gap: 2px; height: 36px; padding: 2px; background: rgba(255, 255, 255, .03); border: 1px solid var(--input); border-radius: var(--radius-sm); }
.sim-seg .sim-tab { padding: 0 12px; white-space: nowrap; }
.sim-aoe-n { width: auto; }
.sim-dps-aoe { margin-top: 2px; font-size: 14px; color: var(--gold); }
.sim-dps-aoe .num { font-weight: 600; }

/* ---------- toasts: readable cards for longer messages (the guild check's results) ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 2100; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 10px 12px 14px;
  color: var(--text);
  background: var(--popover);
  border: 1px solid var(--border-2);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  pointer-events: auto;
  animation: toast-in .18s ease-out;
}
.toast.ok { border-left-color: var(--green); }
.toast.bad { border-left-color: var(--red); }
.toast-text { flex: 1; margin: 0; font-size: 14px; line-height: 1.45; }
.toast-x { flex: none; width: 26px; height: 26px; padding: 0; font-size: 18px; line-height: 1; color: var(--muted); background: none; border: 0; border-radius: 6px; cursor: pointer; }
.toast-x:hover { color: #fff; background: var(--raise-2); }
.gc-msg.dim { color: var(--muted); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* Phones: messages drop in at the top, so they never sit over the buttons at the bottom (like the guild check's Check). */
@media (max-width: 600px) {
  .toasts { top: 10px; bottom: auto; right: 12px; left: 12px; width: auto; }
  .toast { animation-name: toast-down; }
}
@keyframes toast-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.upg-rating { display: inline-block; margin-left: 6px; font-size: 12px; color: var(--gold); white-space: nowrap; }
/* Letter grades next to ratings (client/sim/sim.js gradeChip, views.js ratingHtml): plain text in WoW's item-quality
   colors, A+ legendary, A epic, B rare, C uncommon, D common, F poor. */
.grade { margin-left: 7px; font-family: var(--font-mono); font-weight: 700; }
.grade-ap { color: #ff8000; }
.grade-a { color: #a335ee; }
.grade-b { color: #0070dd; }
.grade-c { color: #1eff00; }
.grade-d { color: #ffffff; }
.grade-f { color: #9d9d9d; }
.sim-dps .grade { font-size: 26px; line-height: 1; }
.sim-rating { margin-top: -2px; }
.sim-rating .sim-dps-num { font-size: 30px; }
/* Upgrades: Longer goals (gear that takes a PvP rank, reputation or a raid first) under the list, and AH prices */
.upg-goals { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); }
.upg-goals summary { padding: 2px 0 6px; font-size: 13.5px; cursor: pointer; }
.upg-goals summary:hover b { color: var(--gold); }
.upg-goals .hint { margin-top: 8px; }
.upg-goal .upg-name { opacity: .85; }
.upg-goal .upg-where { white-space: normal; }
.upg-ah { color: var(--text); }
.upg-t05 { color: var(--text); text-decoration: underline dotted; cursor: help; }
.upg-where .mh-money { font-size: 12px; }

/* =====================================================================
   About us (client/about.js): a button in the top strip, on the splash and in the footer opens one window with
   the guild's story, how joining works, loot rules and guild rules. The story across the top, then three columns
   (two on tablets, one on phones).
   ===================================================================== */
.about-btn {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px 0 8px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--label);
  white-space: nowrap;
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  cursor: pointer;
  transition: color .15s, border-color .15s, background-color .15s;
}
.about-btn:hover, .about-btn:focus-visible { color: var(--gold); background: var(--gold-soft); border-color: var(--gold-line); }
.about-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.btn-about { color: var(--text); }

html.about-open { overflow: hidden; } /* the page behind stays still */
.about-wrap { padding: 24px 16px; }
.about {
  display: flex;
  flex-direction: column;
  width: min(1280px, 100%);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  padding: 0;
  overflow: hidden;
}
.about-top { position: relative; display: flex; align-items: center; gap: 18px; padding: 24px 64px 22px 28px; border-bottom: 1px solid var(--border); }
.about-crest { flex: 0 0 auto; width: 56px; height: 56px; }
.about-top-text { min-width: 0; }
.about-eyebrow { margin: 0 0 2px; font-size: 13px; font-weight: 500; color: var(--gold); }
.about-title { margin: 0; font-size: 28px; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; color: #fff; }
.about-sub { max-width: 640px; margin: 6px 0 0; font-size: 14px; line-height: 1.55; color: #d6d3cc; }
.about-x {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.about-x:hover { color: var(--gold); border-color: var(--gold-line); }
.about-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* Four quick facts under the title */
.about-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; background: var(--card-dark); border-bottom: 1px solid var(--border); }
.about-fact { min-width: 0; padding: 12px 28px 13px; }
.about-fact + .about-fact { border-left: 1px solid var(--border); }
.about-fact dt { margin: 0 0 3px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.about-fact dd { margin: 0; font-size: 14px; font-weight: 500; color: #fff; }

/* The body: "Where we came from" and "What we're about" across the top, then three columns (How it works | Loot rules | Guild rules).
   On a short screen it scrolls between the fixed top and footer. */
.about-body {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas: "story story story" "vibe vibe vibe" "how loot rules";
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.about-sec { min-width: 0; padding: 24px 28px 28px; }
.about-story { grid-area: story; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 0 44px; align-items: center; padding-bottom: 26px; border-bottom: 1px solid var(--border); }
.about-story .about-p { margin-bottom: 0; }
/* What we're about: the heading on the left, the statement lined up with the timeline above it */
.about-vibe { grid-area: vibe; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 0 44px; align-items: center; padding-bottom: 26px; border-bottom: 1px solid var(--border); }
.about-vibe .about-h { margin: 0; }
.about-vibe .about-p { color: #d6d3cc; }
.about-vibe .about-p:last-child { margin-bottom: 0; }
.about-how { grid-area: how; }
.about-loot { grid-area: loot; border-left: 1px solid var(--border); }
.about-rules-sec { grid-area: rules; border-left: 1px solid var(--border); }
.about-h { display: flex; align-items: center; gap: 11px; margin: 0 0 14px; font-size: 17px; font-weight: 600; color: #fff; }
.about-ico { display: grid; flex: 0 0 auto; place-items: center; width: 32px; height: 32px; background: var(--gold-soft); border: 1px solid rgba(229, 184, 76, .25); border-radius: var(--radius-sm); }
.about-ico svg { width: 18px; height: 18px; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.about-p { margin: 0 0 10px; font-size: 14px; line-height: 1.6; color: var(--label); }

/* Where we came from: a timeline along a gold line, sideways (down the page on phones) */
.about-time { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; margin: 0; padding: 0; list-style: none; }
.about-time::before { content: ""; position: absolute; top: 5px; left: 5px; right: 0; height: 1px; background: var(--gold-line); }
.about-time li { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 24px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.about-time li::before { content: ""; position: absolute; top: 0; left: 0; width: 11px; height: 11px; background: var(--popover); border: 2px solid var(--gold); border-radius: 50%; box-sizing: border-box; }
.about-time li:last-child::before { background: var(--gold); }
.about-when { font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; color: var(--gold); }

/* Numbered steps (joining, loot) */
.about-steps { margin: 0; padding: 0; list-style: none; counter-reset: about-step; }
.about-steps li { position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 26px; padding: 0 0 14px 40px; counter-increment: about-step; }
.about-steps li:last-child { padding-bottom: 0; }
.about-steps li::before {
  content: counter(about-step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gold);
  background: var(--raise);
  border: 1px solid var(--gold-line);
  border-radius: 50%;
  box-sizing: border-box;
}
.about-steps b { padding-top: 3px; font-size: 14px; font-weight: 600; color: #fff; }
.about-steps span { font-size: 13.5px; line-height: 1.55; color: var(--muted); }

/* Our ranks, highest first: live from the game (client/about.js rankLadder) */
.about-ranks { margin: 20px 0 0; }
.about-ranks-k { margin: 0 0 8px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.about-rank-list { margin: 0; padding: 0; list-style: none; background: var(--raise); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.about-rank-list li { display: flex; align-items: baseline; gap: 10px; min-width: 0; padding: 7px 12px; }
.about-rank-list li + li { border-top: 1px solid var(--border); }
.about-rank-list b { min-width: 0; overflow: hidden; font-size: 13.5px; font-weight: 600; color: #fff; text-overflow: ellipsis; white-space: nowrap; }
.about-rank-list li.top b { color: var(--gold); }
.about-rank-tag { flex: 0 0 auto; margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }



.about-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 28px; background: var(--card-dark); border-top: 1px solid var(--border); }
.about-foot-text { font-size: 13px; color: var(--muted); }
.about-foot-btns { display: flex; gap: 8px; margin-left: auto; }

/* Tablets and small laptops: How it works | Loot rules side by side, Guild rules across the bottom in two columns */
@media (max-width: 1100px) {
  .about-body { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "story story" "vibe vibe" "how loot" "rules rules"; }
  .about-rules-sec { border-top: 1px solid var(--border); border-left: 0; }
  .about-rules-sec .about-steps { column-count: 2; column-gap: 36px; }
  .about-rules-sec .about-steps li { break-inside: avoid; }
}
/* One column: everything in order, the timeline down a gold line */
@media (max-width: 820px) {
  .about-body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "story" "vibe" "how" "loot" "rules"; }
  .about-story { grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
  .about-vibe { grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
  .about-loot { border-top: 1px solid var(--border); border-left: 0; }
  .about-rules-sec .about-steps { column-count: auto; }
  .about-time { display: block; }
  .about-time::before { top: 8px; right: auto; bottom: 8px; width: 1px; height: auto; }
  .about-time li { gap: 1px; padding: 0 0 14px 26px; }
  .about-time li:last-child { padding-bottom: 0; }
  .about-time li::before { top: 5px; }
  .about-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-fact:nth-child(3) { border-left: 0; }
  .about-fact:nth-child(n+3) { border-top: 1px solid var(--border); }
}
/* Phones: the whole window scrolls (more room than a scrolling middle), close buttons at both ends */
@media (max-width: 640px) {
  .about-btn { padding: 0 9px; }
  .about-btn svg { display: none; }
  .about-wrap { place-items: start center; padding: 10px; }
  .about { max-height: none; overflow: visible; }
  .about-body { overflow: visible; }
  .about-top { gap: 12px; padding: 18px 54px 16px 16px; }
  .about-crest { width: 40px; height: 40px; }
  .about-title { font-size: 22px; }
  .about-sub { font-size: 13.5px; }
  .about-x { top: 14px; right: 12px; }
  .about-fact { padding: 10px 16px 11px; }
  .about-fact dd { font-size: 13px; }
  .about-sec { padding: 20px 16px 24px; }
  .about-foot { padding: 12px 16px; }
  .about-foot-text { flex: 1 1 100%; }
  .about-foot-btns { flex: 1 1 100%; margin-left: 0; }
  .about-foot-btns .btn { flex: 1 1 0; }
}
/* Small phones: room for the realm and clock next to it. "About", then just the (i) below 384px (the clock can read 10:00 AM). */
@media (max-width: 400px) {
  .topbar-in { gap: 8px; }
  .topbar-sep { display: none; }
  .realm-item .rs { display: none; } /* the green/red dot already says online or not; no half-cut word */
  .about-btn { padding: 0 8px; }
  .ab-us { display: none; }
}
@media (max-width: 383px) {
  .about-btn { justify-content: center; width: 26px; padding: 0; }
  .about-btn svg { display: block; }
  .about-btn > span { display: none; }
}
/* Simulations tab: "Try an item" (before and after) */
.try-find { display: flex; flex-wrap: wrap; gap: 8px; }
.try-find .try-q { flex: 1 1 260px; min-width: 0; height: 38px; }
.try-find .try-slot { flex: 0 0 auto; max-width: 170px; height: 38px; }
.try-msg { margin: 8px 2px 0; }
.try-results { max-height: 360px; margin: 8px 0 0; padding: 0; overflow-y: auto; list-style: none; background: var(--raise); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.try-results li + li { border-top: 1px solid rgba(255, 255, 255, .05); }
.try-pick { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; color: inherit; text-align: left; background: none; border: 0; cursor: pointer; }
.try-pick:hover, .try-pick:focus-visible { background: var(--row-hover); outline: none; }
.try-add { font-size: 12.5px; font-weight: 500; color: var(--gold); white-space: nowrap; }
.try-chgs { margin: 12px 0 0; padding: 0; list-style: none; }
.try-chg { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, .05); }
.try-chg:first-child { border-top: 0; }
.try-chg-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.try-seg { flex-wrap: wrap; height: auto; min-height: 32px; margin-top: 2px; }
.try-seg .sim-tab { max-width: 100%; padding: 4px 10px; overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; }
.try-ench { padding: 0; font-size: 12.5px; }
.try-del { margin-top: 6px; }
.try-out { margin-top: 12px; }
.try-table { margin-top: 10px; }
.try-table td:last-child { font-family: var(--font-mono); }
.try-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.try-stat { padding: 2px 8px; font-family: var(--font-mono); font-size: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--border-2); border-radius: 6px; }
.try-moves { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 6px 16px; margin: 0; padding: 0; list-style: none; }
.try-moves li { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.try-move-n { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.try-moves .num { font-family: var(--font-mono); font-size: 12.5px; white-space: nowrap; }
.try-notes { margin: 10px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.try-notes li { margin: 3px 0; }
.upg-acts { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.upg-sim { font-size: 12px; color: var(--gold); text-decoration: none; }
.upg-sim:hover { color: var(--gold-hi); }
@media (max-width: 560px) {
  .try-find .try-slot { flex: 1 1 100%; max-width: none; }
  .try-chg { grid-template-columns: 30px minmax(0, 1fr); }
  .try-del { grid-column: 2; justify-self: start; margin-top: 0; }
}
