:root {
  color-scheme: dark;
  --bg: #07090f;
  --bg-elev: #0c1018;
  --panel: rgba(18, 22, 34, 0.92);
  --panel-solid: #12162a;
  --border: #2a3350;
  --border-glow: rgba(124, 92, 255, 0.35);
  --input: #0a0d16;
  --text: #eef1f8;
  --muted: #9aa3b8;
  --label: #c5cce0;
  --accent: #7c5cff;
  --accent-2: #38bdf8;
  --ember: #f59e0b;
  --ok: #86efac;
  --err: #fca5a5;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  position: relative;
}

.site-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(124, 92, 255, 0.22), transparent 60%),
    radial-gradient(700px 420px at 92% 8%, rgba(56, 189, 248, 0.12), transparent 55%),
    radial-gradient(600px 400px at 50% 100%, rgba(245, 158, 11, 0.08), transparent 50%),
    linear-gradient(180deg, #080b14 0%, #07090f 40%, #05070c 100%);
}

.gearsmasher-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 2.5rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.site-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.25), 0 8px 24px rgba(0, 0, 0, 0.4);
  background: #0b0f1a;
  object-fit: cover;
  flex: 0 0 auto;
}

.site-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ember);
  font-weight: 600;
}

.site-title {
  margin: 0.1rem 0 0;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #f8fafc 0%, #c4b5fd 55%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.site-title--assistive {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.site-brand-text { position: relative; }
.site-tag {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--text);
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.site-nav a:hover {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.hero-banner {
  position: relative;
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow), 0 0 0 1px rgba(245, 158, 11, 0.18);
  margin-bottom: 1rem;
  background:
    radial-gradient(ellipse at center, rgba(245, 158, 11, 0.08), transparent 60%),
    #07090f;
}

.hero-banner--wordmark {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
  height: clamp(170px, 24vw, 300px);
}

.hero-banner-bg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  z-index: 0;
  pointer-events: none;
}

.hero-banner-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 65% at 50% 50%, rgba(7, 9, 15, 0.35), rgba(7, 9, 15, 0.08) 65%, transparent),
    linear-gradient(90deg, rgba(7, 9, 15, 0.2), transparent 15%, transparent 85%, rgba(7, 9, 15, 0.2));
}

.hero-banner-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: cover;
  object-position: center 30%;
}

.hero-banner-img--wordmark {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  min-height: 0;
  object-fit: contain;
  object-position: center center;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.65));
}

.hero-banner-fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(7, 9, 15, 0.85));
  pointer-events: none;
}

.tagline {
  color: var(--muted);
  margin: 0 0 1.25rem;
  font-size: 0.98rem;
  line-height: 1.5;
  max-width: 52rem;
}

.sub {
  color: var(--muted);
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
}

.banner {
  border: 1px solid #5b3a1a;
  background: linear-gradient(135deg, #2a1c0e, #1a1208);
  color: #fbbf24;
  border-radius: 10px;
  padding: 0.7rem 0.95rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.banner.ok {
  border-color: #14532d;
  background: linear-gradient(135deg, #052e16, #041f10);
  color: var(--ok);
}

.banner a { color: inherit; }

section.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem 1.25rem;
  margin-bottom: 1.05rem;
  background:
    linear-gradient(165deg, rgba(124, 92, 255, 0.07), transparent 42%),
    var(--panel);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}

section.card h2 {
  font-size: 1.05rem;
  margin: 0 0 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #0b0f1a;
  background: linear-gradient(135deg, #c4b5fd, #38bdf8);
  box-shadow: 0 0 12px rgba(124, 92, 255, 0.35);
  flex: 0 0 auto;
}

.site-footer {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.footer-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  opacity: 0.9;
}

.footer {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0;
}

.footer a {
  color: #a5b4fc;
  text-decoration: none;
}
.footer a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .site-icon { width: 48px; height: 48px; }
  .site-title { font-size: 1.3rem; }
  .hero-banner-img { max-height: 180px; }
  .hero-banner--wordmark { height: 150px; }
  .hero-banner-img--wordmark { height: 100%; object-fit: contain; }
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--label);
  margin: 0.5rem 0 0.25rem;
}

input[type="text"],
input[type="number"],
textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid #3a4560;
  background: var(--input);
  color: var(--text);
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.8rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #7c5cff;
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.22);
}

textarea { resize: vertical; min-height: 10rem; }

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.row:has(> :nth-child(3)) {
  grid-template-columns: 1fr 1fr 1fr;
}

select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid #3a4560;
  background: var(--input);
  color: var(--text);
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .row,
  .row:has(> :nth-child(3)) { grid-template-columns: 1fr; }
}

.char-header {
  font-size: 1.05rem;
  margin-bottom: 0.85rem;
}
.char-header .ilvl { color: var(--ok); margin-left: 0.5rem; }

.paperdoll {
  display: block;
}

.paperdoll-stage {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.char-render-ph[hidden] { display: none !important; }

/* FIXED pane = 50% of Blizzard main-raw (1600×1200 → 800×600). */
.char-render-wrap {
  position: relative;
  background: #0b0d12;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  width: 800px;
  height: 600px;
  max-width: 100%;
  flex: 0 0 auto;
  box-sizing: border-box;
}

.char-render {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  /* Same aspect as source → contain == full toon, no side-crop surprise. */
  object-fit: contain;
  object-position: center center;
  z-index: 1;
  pointer-events: none;
}

.char-render-ph {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
  line-height: 1.4;
}

.paperdoll-slots {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.pd-slot {
  position: absolute;
  width: 36px;
  height: 36px;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  border-radius: 6px;
  border: 2px solid #2a3140;
  background: rgba(11, 13, 18, 0.78);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  cursor: pointer;
}
.pd-slot.empty { opacity: 0.45; }
.pd-slot.q-epic { border-color: #a335ee; }
.pd-slot.q-rare { border-color: #0070dd; }
.pd-slot.q-legendary { border-color: #ff8000; }
.pd-slot.q-uncommon { border-color: #1eff00; }
.pd-slot.q-common { border-color: #9aa0a6; }
.pd-slot.is-swap {
  box-shadow: 0 0 0 2px #22c55e, 0 2px 8px rgba(0, 0, 0, 0.45);
}
.pd-slot.is-optimal::after {
  content: '✓';
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  z-index: 4;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.pd-slot img,
.pd-slot .gicn-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pd-slot .gicn-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}
.pd-slot .pd-tip {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  min-width: 10rem;
  max-width: 14rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  background: #111827;
  border: 1px solid var(--border);
  color: #e5e7eb;
  font-size: 0.72rem;
  line-height: 1.3;
  z-index: 5;
  pointer-events: none;
  white-space: normal;
}
.pd-slot:hover .pd-tip,
.pd-slot:focus-within .pd-tip { display: block; }

/* Baked from percentage.txt (Tracy place-pass, 800×600 pane). */
.pd-slot[data-slot="head"] { left: 50%; top: 25.1%; }
.pd-slot[data-slot="neck"] { left: 50%; top: 35%; }
.pd-slot[data-slot="shoulder"] { left: 35%; top: 37%; }
.pd-slot[data-slot="back"] { left: 65%; top: 37%; }
.pd-slot[data-slot="chest"] { left: 50%; top: 44%; }
.pd-slot[data-slot="wrist"] { left: 40%; top: 47%; }
.pd-slot[data-slot="hands"] { left: 60%; top: 47%; }
.pd-slot[data-slot="waist"] { left: 50%; top: 54.7%; }
.pd-slot[data-slot="legs"] { left: 50%; top: 63.3%; }
.pd-slot[data-slot="feet"] { left: 50%; top: 78.9%; }
.pd-slot[data-slot="finger1"] { left: 35%; top: 57%; }
.pd-slot[data-slot="finger2"] { left: 65%; top: 57%; }
.pd-slot[data-slot="trinket1"] { left: 40%; top: 79.9%; }
.pd-slot[data-slot="trinket2"] { left: 60%; top: 79.9%; }
.pd-slot[data-slot="mainhand"] { left: 40%; top: 66.9%; }
.pd-slot[data-slot="offhand"] { left: 60%; top: 66.9%; }

@media (max-width: 840px) {
  .char-render-wrap {
    width: 100%;
    max-width: 800px;
    height: auto;
    aspect-ratio: 4 / 3;
  }
  .pd-slot { width: 32px; height: 32px; }
}

.gear-item {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  background: var(--input);
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  font-size: 0.8rem;
}
.gear-item.empty { opacity: 0.55; }
.gear-item.q-poor { border-left-color: #9d9d9d; }
.gear-item.q-common { border-left-color: #ffffff; }
.gear-item.q-uncommon { border-left-color: #1eff00; }
.gear-item.q-rare { border-left-color: #0070dd; }
.gear-item.q-epic { border-left-color: #a335ee; }
.gear-item.q-legendary { border-left-color: #ff8000; }
.gear-item.q-artifact { border-left-color: #e6cc80; }
.gear-item.q-heirloom { border-left-color: #00ccff; }

.gicn {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  background: #0b0d12;
  border: 1px solid #2a3140;
}
.gicn-img { display: block; width: 40px; height: 40px; object-fit: cover; }
.gicn-ph {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}
.gmeta { min-width: 0; flex: 1; }
.gear-item .slot {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.1rem;
}
.gear-item .iname {
  color: #c4b5fd;
  font-weight: 600;
  line-height: 1.25;
  word-break: break-word;
  text-decoration: none;
}
.gear-item.q-epic .iname { color: #c866f5; }
.gear-item.q-rare .iname { color: #4aa3ff; }
.gear-item.q-legendary .iname { color: #ff9a3c; }
.gear-item a.iname:hover { text-decoration: underline; }
.gear-item .il { color: var(--muted); float: right; font-variant-numeric: tabular-nums; }
.gear-item .gsub {
  color: #8b93a7;
  font-size: 0.68rem;
  margin-top: 0.15rem;
  line-height: 1.3;
}

.gear-stats {
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font-size: 0.8rem;
}
.gear-stats div {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.15rem 0;
  border-bottom: 1px solid #222833;
}
.gear-stats div:last-child { border-bottom: 0; }
.gear-stats span { color: var(--muted); }

.report .report-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.bib-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  margin-top: 0.5rem;
}
@media (max-width: 720px) {
  .bib-layout { grid-template-columns: 1fr; }
}
.bib-main { min-width: 0; }
.bib-score-block {
  text-align: right;
  padding: 0.5rem 0.25rem 0.5rem 0.75rem;
  min-width: 7.5rem;
}
.bib-score {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.05;
  color: #e5e7eb;
  font-variant-numeric: tabular-nums;
}
.bib-score-sub {
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 0.15rem;
}
.bib-dps {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.45rem;
}
.bib-upgrade-pct {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.15;
  margin-top: 0.55rem;
  font-variant-numeric: tabular-nums;
}
.bib-upgrade-delta {
  font-size: 0.85rem;
  margin-top: 0.15rem;
  line-height: 1.25;
}
.fu-up-deltas {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  margin-top: 0.25rem;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text);
}
.bib-ilvl {
  color: var(--ok);
  font-size: 0.9rem;
  margin-top: 0.35rem;
}
.fu-overall-box {
  margin: 0 0 0.85rem;
}
.bib-equipped h3 {
  margin: 0.75rem 0 0.45rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.bib-equipped-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.bib-equipped-list .gear-item.is-swap {
  border-color: #14532d;
  background: #052e16;
}
.bib-fu-table {
  margin-top: 0.25rem;
}
.bib-fu-table tr.bib-row-swap td {
  background: rgba(5, 46, 22, 0.55);
}
.bib-fu-table tr.bib-empty {
  opacity: 0.55;
}
.pd-slot .pd-fu-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
}
.pd-slot .pd-fu-item .fu-item-name {
  display: none;
}
.pd-slot .gicn-img,
.pd-slot .gicn-ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bib-swap-line {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
button.btn.btn-equip-all {
  margin-top: 0;
  margin-right: 0;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  background: #16a34a;
}
button.btn.btn-equip-all:hover {
  background: #15803d;
}

.bib-advanced {
  margin-top: 0.85rem;
}
.bib-advanced summary {
  cursor: pointer;
  color: var(--muted);
}
.bib-level-locked {
  margin: 0.75rem 0 0.35rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #854d0e;
  background: rgba(113, 63, 18, 0.35);
  border-radius: 6px;
  color: #fde68a;
  font-size: 0.85rem;
}
.bib-level-locked ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}
.bib-level-locked li {
  margin: 0.15rem 0;
}
.pill.ok {
  background: #14532d;
  color: #86efac;
}
.report .ability-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin-top: 0.75rem;
}
.report .ability-table th,
.report .ability-table td {
  text-align: left;
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid var(--border);
}
.report .ability-table th { color: var(--muted); font-weight: 600; }
.report .ability-table th.num,
.report .ability-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.report .bib-cand-table { table-layout: auto; }
.report .bib-cand-table th.num,
.report .bib-cand-table td.num { white-space: nowrap; }

button.btn {
  margin-top: 0.75rem;
  margin-right: 0.5rem;
  padding: 0.58rem 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #7c5cff, #5b8def);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(91, 100, 240, 0.28);
  transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
}
button.btn:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
button.btn:active:not(:disabled) {
  transform: translateY(0);
}

button.btn.secondary {
  background: linear-gradient(135deg, #2a3348, #1f2636);
  border-color: #3a4560;
  box-shadow: none;
  font-weight: 600;
}
button.btn.btn-primary {
  background: linear-gradient(135deg, #8b6bff 0%, #3b82f6 55%, #22d3ee 100%);
  font-size: 1.05rem;
  padding: 0.78rem 1.35rem;
  box-shadow: 0 10px 28px rgba(124, 92, 255, 0.35);
}
button.btn:disabled { opacity: 0.5; cursor: wait; filter: none; transform: none; }

.path-steps { line-height: 1.45; }
.path-steps code {
  background: var(--input);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
}

details.adv {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}
details.adv summary {
  cursor: pointer;
  color: var(--label);
}
details.adv[open] summary { margin-bottom: 0.5rem; }

.armory-block {
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}
.armory-heading {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.inv-badge {
  margin: 0.65rem 0 0;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
}
.inv-badge.ok {
  border-color: #14532d;
  background: #052e16;
  color: var(--ok);
}
.inv-badge.warn {
  border-color: #5b3a1a;
  background: #2a1c0e;
  color: #fbbf24;
}

.pill {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  font-size: 0.65rem;
  background: #374151;
  color: var(--muted);
  vertical-align: middle;
}

.upgrade-table td .pill { font-weight: 600; }

pre.out {
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem;
  overflow: auto;
  max-height: 420px;
  font-size: 0.8rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.metric {
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  min-width: 7rem;
}

.metric b { display: block; font-size: 1.15rem; }
.metric span { color: var(--muted); font-size: 0.75rem; }

.ok { color: var(--ok); }
.err { color: var(--err); }

#intentTicks {
  display: flex;
  justify-content: space-between;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-top: 0.2rem;
}

#intentTicks button.tick {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 0.7rem;
  padding: 0.15rem 0.2rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#intentTicks button.tick:hover,
#intentTicks button.tick.active { color: var(--text); }

#intentFormula {
  font-family: ui-monospace, monospace;
  margin-top: 0.6rem;
}

.fu-inst-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.fu-inst-group-h {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.fu-inst-group-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.35rem 0.75rem;
}
.fu-inst-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.fu-inst-item input {
  width: auto;
  margin: 0;
}
.fu-inst-cat {
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.fu-group {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: visible;
}
.fu-group-h {
  background: #1c2230;
  padding: 0.55rem 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px 8px 0 0;
}
.fu-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
  overflow: visible;
}
.fu-table th,
.fu-table td {
  padding: 0.4rem 0.55rem;
  border-top: 1px solid var(--border);
  text-align: left;
  overflow: visible;
}
.fu-table th {
  color: var(--muted);
  font-weight: 500;
}
.fu-up { color: var(--ok); font-weight: 600; }
.fu-down { color: var(--err); }

.fu-item-td {
  position: relative;
  vertical-align: middle;
  overflow: visible;
  z-index: 1;
  min-width: 16rem;
  width: 42%;
}
.fu-table th:nth-child(1),
.fu-table td:nth-child(1) {
  width: 42%;
}
.fu-table th:nth-child(5),
.fu-table td:nth-child(5) {
  min-width: 9rem;
}
.fu-item-td:hover,
.fu-item-td:focus-within {
  z-index: 40;
}
.fu-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: inherit;
  text-decoration: none;
  max-width: 100%;
}
.fu-item:hover,
.fu-item:focus {
  color: var(--accent, #7dd3fc);
  outline: none;
}
.fu-icn {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 2px solid var(--border);
  flex-shrink: 0;
  object-fit: cover;
  background: #0b1220;
  box-sizing: border-box;
}
.fu-icn-ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
}
.fu-item-name {
  line-height: 1.2;
}
.fu-item-name.q-poor { color: #9d9d9d; }
.fu-item-name.q-common { color: #ffffff; }
.fu-item-name.q-uncommon { color: #1eff00; }
.fu-item-name.q-rare { color: #0070dd; }
.fu-item-name.q-epic { color: #a335ee; }
.fu-item-name.q-legendary { color: #ff8000; }
.fu-item-name.q-artifact { color: #e6cc80; }
.fu-item-name.q-heirloom { color: #00ccff; }
.fu-tip {
  display: none;
  position: fixed;
  z-index: 10000;
  min-width: 12rem;
  max-width: 22rem;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  background: #0b1220;
  border: 2px solid var(--border);
  color: #ffffff;
  font-size: 0.78rem;
  line-height: 1.4;
  white-space: normal;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.fu-tip.is-open {
  display: block;
}
/* WoW-style tip: rarity name, yellow ilvl, green secondaries */
.fu-tip-name {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.25;
  margin-bottom: 0.2rem;
  color: #ffffff;
}
.fu-tip.q-poor .fu-tip-name { color: #9d9d9d; }
.fu-tip.q-common .fu-tip-name { color: #ffffff; }
.fu-tip.q-uncommon .fu-tip-name { color: #1eff00; }
.fu-tip.q-rare .fu-tip-name { color: #0070dd; }
.fu-tip.q-epic .fu-tip-name { color: #a335ee; }
.fu-tip.q-legendary .fu-tip-name { color: #ff8000; }
.fu-tip.q-artifact .fu-tip-name { color: #e6cc80; }
.fu-tip.q-heirloom .fu-tip-name { color: #00ccff; }
.fu-tip-ilvl {
  color: #ffd100;
  font-weight: 600;
  margin-bottom: 0.15rem;
}
.fu-tip-upgrade-pct {
  color: #86efac;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.fu-tip-upgrade-pct-down {
  color: #f87171;
}
.fu-tip-meta {
  color: #e5e7eb;
  margin-bottom: 0.1rem;
}
.fu-tip-weapon-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: #ffffff;
  margin: 0.15rem 0 0.05rem;
}
.fu-tip-stat {
  color: #ffffff;
}
.fu-tip-stat-sec {
  color: #1eff00;
}
.fu-tip-socket {
  color: #1eff00;
  margin-top: 0.15rem;
}
.fu-tip-socket-empty {
  color: #9d9d9d;
}
.fu-tip-use,
.fu-tip-equip {
  color: #1eff00;
  margin-top: 0.25rem;
  line-height: 1.35;
}
.fu-tip-note {
  color: #ffffff;
  margin-top: 0.2rem;
}
.fu-tip-sell {
  margin-top: 0.35rem;
  color: #ffffff;
}
.fu-money-gold {
  color: #ffd100;
  font-weight: 600;
}
.fu-money-gold::after {
  content: 'g';
  margin-left: 1px;
  color: #ffd100;
}
.fu-money-silver {
  color: #e5e7eb;
  font-weight: 600;
}
.fu-money-silver::after {
  content: 's';
  margin-left: 1px;
  color: #c0c0c0;
}
.fu-money-copper {
  color: #cd7f32;
  font-weight: 600;
}
.fu-money-copper::after {
  content: 'c';
  margin-left: 1px;
}
.fu-tip-source {
  margin-top: 0.35rem;
  color: #9ca3af;
  font-size: 0.72rem;
}
/* Rarity borders — icon always; tip when highlighted (open). */
.fu-icn.q-poor,
.fu-tip.q-poor { border-color: #9d9d9d; }
.fu-icn.q-common,
.fu-tip.q-common { border-color: #ffffff; }
.fu-icn.q-uncommon,
.fu-tip.q-uncommon { border-color: #1eff00; }
.fu-icn.q-rare,
.fu-tip.q-rare { border-color: #0070dd; }
.fu-icn.q-epic,
.fu-tip.q-epic { border-color: #a335ee; }
.fu-icn.q-legendary,
.fu-tip.q-legendary { border-color: #ff8000; }
.fu-icn.q-artifact,
.fu-tip.q-artifact { border-color: #e6cc80; }
.fu-icn.q-heirloom,
.fu-tip.q-heirloom { border-color: #00ccff; }
.fu-tip.is-open.q-epic {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(163, 53, 238, 0.2);
}
.fu-tip.is-open.q-legendary {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 128, 0, 0.2);
}
.fu-tip.is-open.q-rare {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 112, 221, 0.2);
}
.fu-tip.is-open.q-uncommon {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(30, 255, 0, 0.15);
}
.fu-tip.is-open.q-artifact {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(230, 204, 128, 0.2);
}
.fu-tip.is-open.q-heirloom {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 204, 255, 0.2);
}

/* —— Help / tutorial page —— */
.help-page .site-brand-link { display: flex; text-decoration: none; color: inherit; }
.help-lead {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 1rem;
  max-width: 52rem;
}
.help-lead a { color: #a5b4fc; font-weight: 650; }
.help-lead code,
.help-section code,
.help-callout code,
.help-ol code {
  font-size: 0.85em;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.05rem 0.4rem;
  color: #86efac;
  word-break: break-word;
}
.help-callout {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin: 0 0 0.85rem;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.1), rgba(18, 22, 34, 0.9));
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text);
}
.help-callout.warn {
  border-color: #854d0e;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(42, 28, 14, 0.9));
  color: #fde68a;
}
.help-callout a { color: #c4b5fd; font-weight: 650; }
.help-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.35rem;
  padding: 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
}
.help-toc a {
  font-size: 0.78rem;
  font-weight: 700;
  color: #c5d0ff;
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.help-toc a:hover {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.help-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem 1.3rem;
  margin-bottom: 1.05rem;
  background:
    linear-gradient(165deg, rgba(124, 92, 255, 0.07), transparent 42%),
    var(--panel);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  scroll-margin-top: 1rem;
}
.help-section h2 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 750;
}
.help-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #0b0f1a;
  background: linear-gradient(135deg, #c4b5fd, #38bdf8);
  box-shadow: 0 0 12px rgba(124, 92, 255, 0.35);
  flex: 0 0 auto;
}
.help-h3 {
  scroll-margin-top: 1rem;
  margin: 1.35rem 0 0.55rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(42, 53, 77, 0.65);
  font-size: 1rem;
  font-weight: 700;
}
.help-full-path .help-h3:first-of-type,
.help-sample-walk .help-h3:first-of-type {
  border-top: none;
  margin-top: 0.65rem;
  padding-top: 0;
}
.help-path-map {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.25rem 0 1.1rem;
}
.help-path-map a {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(10, 13, 22, 0.75);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  text-decoration: none;
}
.help-path-map a:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(124, 92, 255, 0.12);
}
.help-ol, .help-ul {
  margin: 0.35rem 0 0.75rem;
  padding-left: 1.25rem;
  color: var(--text);
  line-height: 1.55;
  font-size: 0.92rem;
}
.help-ol li, .help-ul li { margin: 0.35rem 0; }
.help-ol .help-ul { margin-top: 0.35rem; }
.help-section p {
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.92rem;
  margin: 0 0 0.75rem;
}
.help-section p.hint {
  font-size: 0.85rem;
  color: #8b93a7;
}
.help-btn-row { margin-top: 1rem; }
button.btn.btn-sm,
a.btn.btn-sm {
  display: inline-block;
  margin-top: 0;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  text-decoration: none;
}
a.btn.btn-primary {
  display: inline-block;
  text-decoration: none;
  margin-top: 0.75rem;
  padding: 0.58rem 1rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #8b6bff 0%, #3b82f6 55%, #22d3ee 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(124, 92, 255, 0.3);
}
a.btn.btn-primary:hover { filter: brightness(1.08); }
.help-cheat {
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  overflow: auto;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #e5e7eb;
  white-space: pre-wrap;
}

/* —— In-app tutorial coach —— */
body.tour-active { overflow: hidden; }
.btn-tour-cta.is-flash {
  animation: tour-cta-pulse 1.4s ease-in-out infinite;
}
.btn-tour-cta.is-done {
  opacity: 0.92;
}
@keyframes tour-cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: rgba(4, 6, 12, 0.72);
  pointer-events: auto;
}
.tour-overlay.hidden { display: none; }
.tour-overlay.tour-dim-full { background: rgba(4, 6, 12, 0.8); }
.tour-overlay:not(.tour-dim-full) { background: transparent; }
.tour-hole {
  position: fixed;
  border-radius: 14px;
  box-shadow:
    0 0 0 9999px rgba(4, 6, 12, 0.74),
    0 0 0 2px rgba(245, 158, 11, 0.95),
    0 0 28px 4px rgba(245, 158, 11, 0.35);
  pointer-events: none;
  z-index: 20001;
  transition: top 0.18s ease, left 0.18s ease, width 0.18s ease, height 0.18s ease;
  animation: tour-hole-pulse 2.2s ease-in-out infinite;
}
@keyframes tour-hole-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 9999px rgba(4, 6, 12, 0.74),
      0 0 0 2px rgba(245, 158, 11, 0.95),
      0 0 22px 2px rgba(245, 158, 11, 0.28);
  }
  50% {
    box-shadow:
      0 0 0 9999px rgba(4, 6, 12, 0.74),
      0 0 0 3px rgba(251, 191, 36, 1),
      0 0 36px 6px rgba(245, 158, 11, 0.42);
  }
}
.tour-card {
  position: fixed;
  z-index: 20002;
  display: flex;
  flex-direction: column;
  max-width: 420px;
  width: min(420px, calc(100vw - 24px));
  max-height: min(82vh, 560px);
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(32, 28, 20, 0.98), rgba(12, 14, 22, 0.99));
  border: 1px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.55);
  color: var(--text, #eef2fa);
  outline: none;
}
.tour-card-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 16px 8px;
}
.tour-card-footer {
  flex: 0 0 auto;
  padding: 10px 16px 12px;
  border-top: 1px solid rgba(60, 50, 30, 0.85);
}
.tour-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.tour-progress { margin: 0; font-size: 0.75rem; color: var(--muted, #9aa3b5); }
.tour-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ember, #f59e0b);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}
.tour-progress-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.35rem 0 0.55rem;
  overflow: hidden;
}
.tour-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--ember, #f59e0b), #fbbf24);
  transition: width 0.2s ease;
}
.tour-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}
.tour-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
}
.tour-dot.done { background: rgba(245, 158, 11, 0.55); }
.tour-dot.active { background: var(--ember, #f59e0b); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25); }
.tour-title {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  line-height: 1.25;
}
.tour-body {
  margin: 0;
  white-space: pre-wrap;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #d7dde8;
}
.tour-bullets {
  margin: 0.65rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  color: #c5cddc;
}
.tour-bullets.hidden,
.tour-note.hidden { display: none; }
.tour-bullets li { margin: 0.25rem 0; }
.tour-note {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  color: var(--ember, #f59e0b);
}
.tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.tour-actions-right { display: flex; gap: 0.4rem; }
.tour-kbd-hint {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  color: var(--muted, #9aa3b5);
  text-align: right;
}
/* No z-index boost — elevating page cards above the overlay hid the tip (BiB box 3). */
.tour-highlight {
  outline: 2px solid rgba(245, 158, 11, 0.9);
  outline-offset: 3px;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.35);
  border-radius: 8px;
}

/* Gems & enchants shopping (SimC MID2 defaults) */
.gem-enchant-shop {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.gem-enchant-shop h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}
.gem-enchant-shop ul {
  margin: 0.35rem 0 0.75rem;
  padding-left: 1.2rem;
}
.gem-enchant-shop li {
  margin: 0.2rem 0;
  line-height: 1.4;
}
.gem-enchant-shop .muted {
  color: var(--muted);
}
.gem-rank-report,
.crest-report {
  margin-top: 0.75rem;
  overflow-x: auto;
}
.gem-rank-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem 1.25rem;
}
.gem-rank-main {
  flex: 1 1 28rem;
  min-width: 0;
  overflow-x: auto;
}
.gem-rank-upgrade {
  flex: 0 0 11.5rem;
  margin-left: auto;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(124, 92, 255, 0.35);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(124, 92, 255, 0.14), rgba(15, 23, 42, 0.55));
  text-align: center;
  position: sticky;
  top: 0.75rem;
}
.gem-rank-upgrade-label {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.gem-rank-upgrade-pct {
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.gem-rank-upgrade-delta {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
}
.gem-rank-upgrade-detail {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--muted);
  text-align: left;
}
@media (max-width: 720px) {
  .gem-rank-upgrade {
    flex: 1 1 100%;
    margin-left: 0;
    position: static;
  }
}
.gem-rank-report table,
.crest-report table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  table-layout: auto;
}
.gem-rank-report th,
.gem-rank-report td,
.crest-report th,
.crest-report td {
  text-align: left;
  padding: 0.35rem 0.55rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  vertical-align: middle;
  white-space: nowrap;
}
.crest-report th:nth-child(2),
.crest-report td:nth-child(2) {
  white-space: normal;
  min-width: 12rem;
}
.crest-goal-opt {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 1rem;
  margin-bottom: 0.35rem;
  cursor: pointer;
}
.crest-report .fu-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.gem-rank-report tr.is-best td,
.crest-report tr.is-best td {
  color: #1eff00;
  font-weight: 600;
}
.gem-rank-report tr.is-skip td,
.crest-report tr.is-skip td {
  opacity: 0.45;
}
.gem-rank-report .delta-pos,
.crest-report .delta-pos {
  color: #1eff00;
}
.gem-rank-report .delta-neg,
.crest-report .delta-neg {
  color: #f87171;
}
.gem-rank-report .gem-rank-gem .fu-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.gem-buy-list {
  margin: 0.6rem 0 0.85rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.35);
}
.gem-buy-list--with-upgrade {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem 1rem;
}
.gem-buy-list-body {
  flex: 1 1 16rem;
  min-width: 0;
}
.gem-buy-upgrade {
  flex: 0 0 auto;
  margin-left: auto;
  min-width: 8.25rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(124, 92, 255, 0.35);
  border-radius: 8px;
  background: rgba(124, 92, 255, 0.12);
  text-align: center;
}
.gem-buy-upgrade-label {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.gem-buy-upgrade-pct {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.gem-buy-upgrade-delta {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  line-height: 1.2;
}
@media (max-width: 720px) {
  .gem-buy-upgrade {
    margin-left: 0;
    width: 100%;
  }
}
.gem-buy-list ul {
  margin: 0.35rem 0 0;
  padding-left: 0;
  list-style: none;
}
.gem-buy-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0.35rem 0;
}
.gem-slot-plan {
  margin: 0.25rem 0 0.55rem;
  padding: 0.35rem 0.55rem;
  border-left: 3px solid rgba(251, 191, 36, 0.55);
  background: rgba(251, 191, 36, 0.06);
  border-radius: 0 6px 6px 0;
}
.gem-slot-plan-slot {
  font-weight: 700;
  color: #fde68a;
  min-width: 9rem;
}
.gem-slot-plan-arrow {
  color: var(--muted);
  font-weight: 700;
}
.gem-buy-list .gem-buy-qty {
  font-weight: 700;
  min-width: 1.6rem;
  color: #fbbf24;
}
.gem-buy-list .fu-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.gem-enchant-shop .fu-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  vertical-align: middle;
}
.gem-buy-addon {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}
.gem-shop-payload {
  width: 100%;
  margin-top: 0.35rem;
  min-height: 2.4rem;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
}
