/* ── Stendarr GPT — ported from the design "Component" to a plain static site.
   Colors, type, spacing and shapes match the design tokens in the handoff. ── */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: #14110c;
  color: #e6d9bd;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}
::placeholder { color: #6e6555; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: #3a3122; border-radius: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
.sg-nav::-webkit-scrollbar { height: 0; }
@keyframes sgpulse { 0%,100% { opacity: 0.35; } 50% { opacity: 1; } }

.sg-root {
  height: 100vh; display: flex; flex-direction: column; overflow: hidden;
  background: radial-gradient(130% 70% at 50% -5%, #221c12 0%, #14110c 58%);
}

/* ── Header ── */
.sg-header {
  flex-shrink: 0; display: flex; align-items: center; gap: 14px;
  padding: 16px 26px; border-bottom: 1px solid rgba(201,162,39,0.2);
}
.sg-home-btn {
  display: flex; align-items: center; gap: 14px; min-width: 0; cursor: pointer;
  background: transparent; border: none; padding: 4px 8px 4px 4px;
  margin: -4px -8px -4px -4px; border-radius: 12px; text-align: left;
  transition: background 0.15s;
}
.sg-home-btn:hover { background: rgba(201,162,39,0.08); }
.sg-medallion {
  position: relative; width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%;
  border: 1.5px solid rgba(201,162,39,0.55); display: flex; align-items: center;
  justify-content: center; background: radial-gradient(circle at 50% 35%, #2c2414, #181308);
  color: #d9b740; font-size: 22px; font-family: Georgia, serif;
}
.sg-badge {
  position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px;
  border-radius: 50%; background: #d9b740; color: #181308;
  font-family: 'Segoe UI', sans-serif; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; border: 2px solid #14110c;
}
.sg-title { font-family: Georgia, 'Times New Roman', serif; font-size: 22px; font-weight: 700; color: #f0e4c6; letter-spacing: 0.5px; line-height: 1.1; white-space: nowrap; }
.sg-subtitle { font-size: 12px; letter-spacing: 1.5px; color: #9c9075; text-transform: uppercase; }
.sg-spacer { flex: 1; }
.sg-header-right { text-align: right; }
.sg-motto { font-family: Georgia, serif; font-style: italic; font-size: 13px; color: #8a7e5f; max-width: 260px; }
.sg-credit { font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: #6e6450; margin-top: 4px; }

/* ── Tab bar ── */
.sg-nav {
  flex-shrink: 0; display: flex; gap: 4px; padding: 0 18px;
  border-bottom: 1px solid rgba(201,162,39,0.16); overflow-x: auto; background: rgba(20,16,10,0.6);
}
.sg-tab {
  cursor: pointer; font-family: Georgia, serif; font-size: 15px; font-weight: 600;
  letter-spacing: 0.4px; white-space: nowrap; background: transparent; border: none;
  border-bottom: 2px solid transparent; color: #8a7e5f; padding: 14px 16px 12px; transition: color 0.15s;
}
.sg-tab:hover { color: #cabd9d; }
.sg-tab.active { color: #f0e4c6; border-bottom-color: #c9a227; }

.sg-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ── Generic section scaffolding for reference tabs ── */
.view-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 30px 24px 60px; }
.view-col { margin: 0 auto; }
.view-h2 { font-family: Georgia, serif; font-size: 32px; color: #f0e4c6; margin: 0 0 6px; }
.view-h2.sm { font-size: 28px; }
.view-lead { font-size: 15px; color: #9c9075; margin: 0 0 28px; line-height: 1.6; }
.view-lead em { color: #b8923a; }
.view-h3 {
  font-family: Georgia, serif; font-size: 20px; color: #d9b740; margin: 0 0 14px;
  padding-bottom: 8px; border-bottom: 1px solid rgba(201,162,39,0.2);
}
.view-h3.sub { font-size: 19px; }
.view-h3.mourning { color: #b89b8e; border-bottom-color: rgba(194,86,63,0.25); }
.mt34 { margin-top: 34px; }
.grid { display: grid; gap: 16px; }
.g240 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.g280 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g290 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.g300 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g320 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.mb22 { margin-bottom: 22px; }
.mb30 { margin-bottom: 30px; }
.mb32 { margin-bottom: 32px; }
.mb34 { margin-bottom: 34px; }
.mb36 { margin-bottom: 36px; }

/* Cards & rows */
.card { background: #19150d; border: 1px solid rgba(201,162,39,0.16); border-radius: 12px; padding: 18px 20px; }
.card-grad { background: linear-gradient(180deg, #211b11, #19150d); border: 1px solid rgba(201,162,39,0.2); border-radius: 12px; padding: 20px; }
.flexrow { display: flex; gap: 12px; align-items: flex-start; }

/* Codex */
.mission-row { display: flex; gap: 12px; align-items: flex-start; background: #19150d; border: 1px solid rgba(201,162,39,0.14); border-radius: 10px; padding: 14px 16px; }
.mark-gold { color: #c9a227; font-family: Georgia, serif; font-size: 16px; flex-shrink: 0; }
.mission-row span:last-child { font-size: 15px; color: #d6c9aa; line-height: 1.55; }
.pillar-name { font-family: Georgia, serif; font-size: 22px; color: #f0e4c6; margin-bottom: 6px; }
.pillar-line { font-size: 13px; color: #b8923a; font-style: italic; margin-bottom: 12px; }
.pillar-body, .body-muted { font-size: 14px; color: #a89d82; line-height: 1.6; }
.law-row { display: flex; gap: 14px; align-items: flex-start; background: #19150d; border: 1px solid rgba(201,162,39,0.12); border-radius: 10px; padding: 13px 16px; }
.law-num { font-family: Georgia, serif; font-size: 19px; color: #c9a227; line-height: 1.3; flex-shrink: 0; width: 26px; }
.law-text { font-size: 14.5px; color: #d2c5a6; line-height: 1.55; }
.rank-card { background: #19150d; border: 1px solid rgba(201,162,39,0.14); border-left: 3px solid #c9a227; border-radius: 8px; padding: 15px 18px; }
.rank-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.rank-name { font-family: Georgia, serif; font-size: 18px; color: #f0e4c6; }
.tag-up { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: #b8923a; }
.adv-meta { font-size: 12.5px; color: #8a7e5f; margin: 0 0 8px; letter-spacing: 0.4px; }
.adv-pre { font-size: 14.5px; color: #cabd9d; margin: 0 0 22px; line-height: 1.65; }
.adv-card { background: linear-gradient(180deg, #211b11, #19150d); border: 1px solid rgba(201,162,39,0.18); border-radius: 12px; padding: 18px 20px; }
.adv-card-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.adv-numeral { font-family: Georgia, serif; font-size: 17px; color: #d9b740; }
.adv-name { font-family: Georgia, serif; font-size: 18px; color: #f0e4c6; }
.adv-line { font-size: 13px; color: #b8923a; font-style: italic; margin-bottom: 14px; line-height: 1.5; }
.pts { display: flex; flex-direction: column; gap: 9px; }
.pt { display: flex; gap: 10px; align-items: flex-start; }
.pt .mk { color: #c9a227; flex-shrink: 0; transform: translateY(1px); }
.pt span:last-child { font-size: 13.5px; color: #cabd9d; line-height: 1.55; }
.doctrine { background: #17130c; border: 1px solid rgba(194,86,63,0.28); border-left: 3px solid rgba(194,86,63,0.6); border-radius: 10px; padding: 16px 20px; }
.doctrine-title { font-family: Georgia, serif; font-size: 16px; color: #e0d4b6; margin-bottom: 4px; }
.doctrine-sub { font-size: 12.5px; color: #9a7d70; font-style: italic; margin-bottom: 12px; }
.doctrine .pt .mk { color: #b06a55; }
.doctrine .pt span:last-child { color: #d2c0b6; font-size: 13.5px; }

/* Disciplines */
.disc-disclaimer { display: flex; gap: 12px; align-items: flex-start; background: rgba(201,162,39,0.07); border: 1px solid rgba(201,162,39,0.25); border-radius: 10px; padding: 13px 17px; margin-bottom: 30px; }
.disc-disclaimer p { margin: 0; font-size: 13.5px; color: #b6ab8f; line-height: 1.6; }
.disc-disclaimer .lead-gold { color: #d9b740; font-weight: 600; }
.disc-name { font-family: Georgia, serif; font-size: 19px; color: #f0e4c6; margin-bottom: 4px; }
.disc-motto { font-size: 13px; color: #b8923a; font-style: italic; margin-bottom: 12px; }
.disc-role { font-size: 13.5px; color: #a89d82; line-height: 1.58; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 11.5px; color: #cdbf9d; background: rgba(201,162,39,0.1); border: 1px solid rgba(201,162,39,0.22); border-radius: 999px; padding: 3px 10px; }
.syn-pair { font-size: 12px; color: #6f9456; letter-spacing: 0.3px; margin-bottom: 4px; }

/* The Hunt */
.hunt-silver { background: linear-gradient(180deg, #1f2226, #181a1d); border: 1px solid rgba(180,200,220,0.22); border-radius: 12px; padding: 20px 22px; }
.hunt-silver h4 { font-family: Georgia, serif; font-size: 21px; color: #cfdbe6; margin: 0 0 8px; }
.hunt-silver .line { font-size: 14px; color: #b6c2cc; line-height: 1.55; margin-bottom: 12px; }
.hunt-silver .pt .mk { color: #9fb4c4; }
.hunt-silver .pt span:last-child { font-size: 13px; color: #a6b3bd; }
.silver-verdict { text-align: center; font-family: Georgia, serif; font-size: 17px; font-weight: 700; color: #e8f0f6; letter-spacing: 0.5px; padding: 10px; background: rgba(180,200,220,0.1); border-radius: 8px; margin-top: 14px; }
.hunt-weak { background: linear-gradient(180deg, #251510, #1a100c); border: 1px solid rgba(194,86,63,0.3); border-radius: 12px; padding: 20px 22px; }
.hunt-weak h4 { font-family: Georgia, serif; font-size: 21px; color: #e0a892; margin: 0 0 14px; }
.hunt-weak .pt .mk { color: #c2563f; }
.hunt-weak .pt span:last-child { font-size: 13.5px; color: #d6bdb3; }
.stage-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.stage-name { font-family: Georgia, serif; font-size: 20px; color: #f0e4c6; }
.stage-blurb { font-size: 13px; color: #a89d82; line-height: 1.58; margin-bottom: 14px; font-style: italic; }
.stage .pt .mk { color: #9374b8; }
.stage .pt span:last-child { font-size: 13px; color: #cabd9d; }
.charm-intro, .pk-intro { font-size: 14px; color: #a89d82; margin: 0 0 16px; line-height: 1.6; }
.pk-intro { font-style: italic; }
.h3-tight { margin-bottom: 6px; }
.roll-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.roll-table thead tr { background: #221c12; }
.roll-table th { padding: 11px 16px; font-family: Georgia, serif; color: #c9a227; font-weight: 600; border-bottom: 1px solid rgba(201,162,39,0.22); }
.roll-table th.l, .roll-table td.l { text-align: left; }
.roll-table th.r, .roll-table td.r { text-align: right; }
.roll-table tr { border-bottom: 1px solid rgba(201,162,39,0.07); }
.roll-table td { padding: 11px 16px; color: #ece1c6; }
.roll-table td.roll { font-family: 'Courier New', monospace; color: #6f9456; font-weight: 600; }
.crit-title { font-family: Georgia, serif; font-size: 15px; color: #c9a227; margin-bottom: 12px; }
.crit .pt .mk { color: #d9b740; }
.crit .pt span:last-child { font-size: 13px; color: #cabd9d; }
.callout-ok { background: rgba(111,148,86,0.08); border: 1px solid rgba(111,148,86,0.3); border-radius: 10px; padding: 14px 18px; }
.callout-ok h4 { font-family: Georgia, serif; font-size: 15px; color: #8fb56f; margin: 0 0 6px; }
.callout-ok p { font-size: 13.5px; color: #c2cbb6; line-height: 1.55; margin: 0; }
.callout-bad { background: rgba(194,86,63,0.08); border: 1px solid rgba(194,86,63,0.3); border-radius: 10px; padding: 14px 18px; }
.callout-bad h4 { font-family: Georgia, serif; font-size: 15px; color: #d6856f; margin: 0 0 6px; }
.callout-bad p { font-size: 13.5px; color: #d6bdb3; line-height: 1.55; margin: 0; }
.pk-card { background: #17130c; border-radius: 12px; padding: 16px 18px; }
.pk-card.vamp { border: 1px solid rgba(147,116,184,0.28); }
.pk-card.hunt { border: 1px solid rgba(201,162,39,0.22); }
.pk-card h4 { font-family: Georgia, serif; font-size: 16px; margin: 0 0 12px; }
.pk-card.vamp h4 { color: #b79fd0; }
.pk-card.hunt h4 { color: #d9b740; }
.pk-card.vamp .pt .mk { color: #9374b8; }
.pk-card.hunt .pt .mk { color: #c9a227; }
.pk-card .pt span:last-child { font-size: 13px; color: #cabd9d; }
.craft-note { font-size: 13.5px; color: #9c9075; margin: 0 0 16px; line-height: 1.6; }
.craft-card { background: linear-gradient(180deg, #211b11, #19150d); border: 1px solid rgba(201,162,39,0.2); border-radius: 12px; padding: 16px 18px; }
.craft-item { font-family: Georgia, serif; font-size: 18px; color: #f0e4c6; margin-bottom: 8px; }
.craft-mats { display: flex; gap: 8px; align-items: baseline; margin-bottom: 8px; }
.craft-mats .lbl { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #b8923a; flex-shrink: 0; }
.craft-mats .val { font-size: 14px; color: #d2c5a6; line-height: 1.5; }
.craft-card .note { font-size: 12.5px; color: #8a7e5f; font-style: italic; line-height: 1.5; }

/* Prayers */
.sig-banner { background: rgba(201,162,39,0.08); border: 1px solid rgba(201,162,39,0.3); border-radius: 10px; padding: 14px 18px; margin-bottom: 30px; text-align: center; }
.sig-banner span { font-family: Georgia, serif; font-style: italic; font-size: 16px; color: #e6d9bd; }
.bless-card { background: #19150d; border: 1px solid rgba(201,162,39,0.14); border-radius: 10px; padding: 16px 18px; }
.bless-group { font-family: Georgia, serif; font-size: 15px; color: #c9a227; letter-spacing: 0.4px; margin-bottom: 10px; }
.bless-line { font-size: 14px; color: #cabd9d; line-height: 1.55; font-style: italic; padding-left: 12px; border-left: 2px solid rgba(201,162,39,0.3); }
.bless-lines { display: flex; flex-direction: column; gap: 9px; }
.sermon { background: #19150d; border: 1px solid rgba(201,162,39,0.16); border-radius: 10px; overflow: hidden; }
.sermon-btn { cursor: pointer; width: 100%; text-align: left; background: transparent; border: none; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sermon-title { display: block; font-family: Georgia, serif; font-size: 17px; color: #f0e4c6; }
.sermon-meta { display: block; font-size: 12px; color: #8a7e5f; margin-top: 2px; }
.sermon-icon { color: #c9a227; font-size: 18px; flex-shrink: 0; }
.sermon-body { padding: 4px 20px 20px; font-size: 14.5px; color: #cabd9d; line-height: 1.7; white-space: pre-wrap; border-top: 1px solid rgba(201,162,39,0.12); }
.col-gap10 { display: flex; flex-direction: column; gap: 10px; }
.col-gap8 { display: flex; flex-direction: column; gap: 8px; }
.col-gap9 { display: flex; flex-direction: column; gap: 9px; }

/* Roster */
.lead-card { display: flex; align-items: center; gap: 14px; background: linear-gradient(180deg, #221b11, #19150d); border: 1px solid rgba(201,162,39,0.28); border-radius: 12px; padding: 16px 18px; }
.lead-av { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid rgba(201,162,39,0.5); display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 35%, #2c2414, #181308); color: #d9b740; font-size: 20px; font-family: Georgia, serif; }
.lead-name { font-family: Georgia, serif; font-size: 19px; color: #f0e4c6; }
.lead-rank { font-size: 13px; color: #d9b740; margin-top: 2px; }
.lead-meta { font-size: 12px; color: #8a7e5f; margin-top: 1px; }
.hold-name { font-family: Georgia, serif; font-size: 17px; color: #f0e4c6; }
.hold-sub { font-size: 12px; color: #b8923a; font-style: italic; margin-top: 2px; }
.hold-members { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.hm { display: flex; align-items: baseline; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; transform: translateY(-1px); }
.dot.sm { width: 6px; height: 6px; transform: none; }
.hm-name { display: block; font-size: 14px; color: #ece1c6; }
.hm-meta { display: block; font-size: 12px; color: #8a7e5f; }
.card-title { font-family: Georgia, serif; font-size: 17px; color: #f0e4c6; margin-bottom: 12px; }
.card-title .muted { font-size: 13px; color: #8a7e5f; font-family: 'Segoe UI', sans-serif; }
.unassigned-wrap { display: flex; flex-wrap: wrap; gap: 7px; }
.uchip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #d2c5a6; background: rgba(201,162,39,0.07); border: 1px solid rgba(201,162,39,0.18); border-radius: 999px; padding: 4px 12px; }
.hon-name { font-size: 14px; color: #ece1c6; }
.hon-meta { font-size: 12px; color: #b8923a; font-style: italic; margin-top: 2px; }
.fallen-note { font-size: 13.5px; color: #8a7e5f; font-style: italic; margin: 0 0 16px; }
.fallen-row { display: flex; gap: 14px; align-items: flex-start; background: #17130c; border: 1px solid rgba(194,86,63,0.18); border-left: 3px solid rgba(194,86,63,0.5); border-radius: 8px; padding: 13px 16px; }
.fallen-mark { color: #b06a55; font-size: 16px; flex-shrink: 0; transform: translateY(1px); }
.fallen-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fallen-name { font-family: Georgia, serif; font-size: 16px; color: #e0d4b6; }
.fallen-rank { font-size: 11.5px; letter-spacing: 1px; text-transform: uppercase; color: #9a7d70; }
.fallen-how { font-size: 13.5px; color: #a49880; margin-top: 3px; line-height: 1.5; }
.moth-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.moth-table thead tr { background: #221c12; }
.moth-table th { text-align: left; padding: 12px 14px; font-family: Georgia, serif; color: #c9a227; font-weight: 600; white-space: nowrap; border-bottom: 1px solid rgba(201,162,39,0.22); }
.moth-table th.c { text-align: center; }
.moth-table tr { border-bottom: 1px solid rgba(201,162,39,0.07); }
.moth-table td { padding: 11px 14px; color: #a89d82; white-space: nowrap; vertical-align: top; }
.moth-name { color: #ece1c6; font-weight: 500; }
.moth-notes { color: #8a7e5f; font-size: 12px; margin-top: 2px; white-space: normal; }
.verdict { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 11px; border-radius: 999px; white-space: nowrap; }
.prospect { background: #19150d; border: 1px solid rgba(201,162,39,0.14); border-radius: 10px; padding: 14px 16px; }
.prospect-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.prospect-name { color: #ece1c6; font-weight: 500; }
.prospect-prof { color: #8a7e5f; font-size: 12.5px; }
.prospect-sponsor { font-size: 12.5px; color: #9c9075; margin-top: 4px; }
.prospect-sponsor b { color: #b8923a; font-weight: 400; }
.prospect-notes { font-size: 12.5px; color: #a89d82; margin-top: 6px; line-height: 1.5; }
.donation { display: flex; align-items: center; gap: 14px; background: #19150d; border: 1px solid rgba(201,162,39,0.14); border-radius: 10px; padding: 14px 16px; }
.donation-amt { font-family: Georgia, serif; font-size: 22px; font-weight: 700; color: #d9b740; min-width: 42px; text-align: center; }
.donation-item { color: #ece1c6; }
.donation-meta { font-size: 12px; color: #8a7e5f; margin-top: 2px; }
.recruit-note { font-size: 15px; color: #9c9075; margin: 0 0 22px; line-height: 1.6; }

/* Inventory */
.inv-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { background: linear-gradient(180deg, #211b11, #1a160e); border: 1px solid rgba(201,162,39,0.2); border-radius: 10px; padding: 16px 18px; }
.stat-label { font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: #9c9075; margin-bottom: 8px; }
.stat-val { font-family: Georgia, serif; font-size: 28px; font-weight: 700; color: #f0e4c6; }
.stat-val.gold { color: #d9b740; display: flex; align-items: baseline; gap: 6px; }
.stat-val .unit { font-size: 13px; font-weight: 600; color: #9c8336; }
.inv-search-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.inv-search-wrap { position: relative; flex: 1; min-width: 220px; }
.inv-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #6e6555; font-size: 15px; }
.inv-search { width: 100%; background: #1a160e; border: 1px solid rgba(201,162,39,0.25); border-radius: 8px; padding: 11px 14px 11px 38px; color: #e6d9bd; font-size: 14px; font-family: inherit; outline: none; }
.inv-shown { font-size: 12.5px; color: #9c9075; white-space: nowrap; }
.inv-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.inv-pill { cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 14px; border-radius: 999px; background: #1a160e; border: 1px solid rgba(201,162,39,0.18); color: #b8ad92; }
.inv-pill .cnt { opacity: 0.65; margin-left: 6px; font-weight: 400; }
.inv-results { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.inv-table-card { flex: 1; min-width: 300px; background: #19150d; border: 1px solid rgba(201,162,39,0.18); border-radius: 12px; overflow: hidden; }
.inv-table-scroll { overflow-x: auto; }
.inv-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.inv-table thead tr { background: #221c12; cursor: pointer; }
.inv-table th { font-family: Georgia, serif; font-weight: 600; color: #c9a227; white-space: nowrap; border-bottom: 1px solid rgba(201,162,39,0.25); padding: 13px 14px; }
.inv-table th.l, .inv-table td.l { text-align: left; }
.inv-table th.r, .inv-table td.r { text-align: right; }
.inv-table th:first-child, .inv-table td:first-child { padding-left: 15px; }
.inv-table th:last-child, .inv-table td:last-child { padding-right: 15px; }
.inv-table tbody tr { border-bottom: 1px solid rgba(201,162,39,0.07); }
.inv-table td { padding: 10px 14px; }
.inv-table td.item { color: #ece1c6; font-weight: 500; }
.inv-table td.type { color: #a89d82; }
.inv-table td.qty { color: #cfc3a4; font-variant-numeric: tabular-nums; }
.inv-table td.wte { color: #a89d82; font-variant-numeric: tabular-nums; }
.inv-table td.tw { color: #d9b740; font-weight: 600; font-variant-numeric: tabular-nums; }
.cat-pill { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.inv-empty { padding: 40px; text-align: center; color: #6e6555; font-style: italic; font-family: Georgia, serif; }
.chart-card { width: 320px; flex-shrink: 0; background: #19150d; border: 1px solid rgba(201,162,39,0.18); border-radius: 12px; padding: 18px; }
.chart-title { font-family: Georgia, serif; font-size: 17px; font-weight: 600; color: #f0e4c6; margin-bottom: 4px; }
.chart-caption { font-size: 12px; color: #9c9075; margin-bottom: 14px; }
.chart-box { position: relative; height: 300px; }

/* ── Chat ── */
.chat-section { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-resetbar { flex-shrink: 0; display: flex; justify-content: flex-end; padding: 8px 20px; border-bottom: 1px solid rgba(201,162,39,0.1); }
.chat-resetbar > div { width: 100%; max-width: 760px; display: flex; justify-content: flex-end; }
.chat-reset-btn { cursor: pointer; font-family: inherit; font-size: 12.5px; color: #9c9075; background: transparent; border: 1px solid rgba(201,162,39,0.22); border-radius: 999px; padding: 6px 14px; transition: all 0.15s; }
.chat-reset-btn:hover { color: #cdbf9d; border-color: rgba(201,162,39,0.45); }
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 26px 20px; }
.chat-col { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.chat-empty { text-align: center; padding: 30px 10px 8px; }
.chat-empty-medallion { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; border: 1.5px solid rgba(201,162,39,0.5); display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 35%, #2c2414, #181308); color: #d9b740; font-size: 32px; font-family: Georgia, serif; }
.chat-empty h2 { font-family: Georgia, serif; font-size: 27px; color: #f0e4c6; margin: 0 0 10px; }
.chat-empty p { font-size: 15px; color: #9c9075; max-width: 480px; margin: 0 auto 26px; line-height: 1.6; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chat-chip { cursor: pointer; font-family: inherit; font-size: 13.5px; color: #cdbf9d; background: #1c1810; border: 1px solid rgba(201,162,39,0.28); border-radius: 999px; padding: 9px 16px; transition: all 0.15s; }
.chat-chip:hover { background: #261f12; border-color: rgba(201,162,39,0.5); }
.msg-row { display: flex; gap: 12px; justify-content: flex-start; }
.msg-row.user { justify-content: flex-end; }
.msg-avatar { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; border: 1px solid rgba(201,162,39,0.45); display: flex; align-items: center; justify-content: center; background: #181308; color: #d9b740; font-size: 16px; font-family: Georgia, serif; margin-top: 2px; }
.msg-bubble { max-width: 78%; border-radius: 14px; padding: 13px 17px; font-size: 15px; line-height: 1.62; white-space: pre-wrap; word-wrap: break-word; }
.msg-bubble.bot { background: #1d1810; border: 1px solid rgba(201,162,39,0.18); color: #e0d4b6; }
.msg-bubble.user { background: rgba(201,162,39,0.14); border: 1px solid rgba(201,162,39,0.4); color: #f0e4c6; }
.chat-loading { display: flex; gap: 12px; align-items: center; }
.chat-loading-av { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; border: 1px solid rgba(201,162,39,0.45); display: flex; align-items: center; justify-content: center; background: #181308; color: #d9b740; font-size: 16px; font-family: Georgia, serif; animation: sgpulse 1.4s ease-in-out infinite; }
.chat-loading-text { font-family: Georgia, serif; font-style: italic; color: #8a7e5f; font-size: 14px; }
.chat-error { text-align: center; color: #c2563f; font-size: 13.5px; font-style: italic; }
.chat-inputbar { flex-shrink: 0; border-top: 1px solid rgba(201,162,39,0.18); padding: 14px 20px; background: rgba(20,16,10,0.8); }
.chat-input-col { max-width: 760px; margin: 0 auto; display: flex; gap: 10px; align-items: flex-end; }
.chat-textarea { flex: 1; resize: none; min-height: 48px; max-height: 160px; background: #1a160e; border: 1px solid rgba(201,162,39,0.28); border-radius: 12px; padding: 13px 16px; color: #e6d9bd; font-size: 15px; font-family: inherit; line-height: 1.5; outline: none; }
.chat-send { cursor: pointer; flex-shrink: 0; height: 48px; padding: 0 22px; border-radius: 12px; font-family: Georgia, serif; font-size: 15px; font-weight: 600; letter-spacing: 0.3px; transition: all 0.15s; border: 1px solid rgba(201,162,39,0.55); background: rgba(201,162,39,0.2); color: #f0e4c6; }
.chat-send:disabled { cursor: default; border-color: rgba(201,162,39,0.18); background: #1a160e; color: #6e6555; }
.chat-disclaimer { max-width: 760px; margin: 7px auto 0; font-size: 11px; color: #5f5746; text-align: center; }

/* Responsive — match the design's column collapses */
@media (max-width: 760px) { .inv-table th.wte, .inv-table td.wte, .moth-table th.race, .moth-table td.race { display: none; } }
@media (max-width: 600px) { .inv-table th.type, .inv-table td.type, .moth-table th.prof, .moth-table td.prof { display: none; } }

/* Mobile header: keep medallion + title + credit; drop decorative subtitle/motto so the title doesn't wrap and the bar stays compact */
@media (max-width: 600px) {
  .sg-header { padding: 12px 16px; gap: 10px; }
  .sg-title { font-size: 18px; }
  .sg-subtitle { display: none; }
  .sg-motto { display: none; }
  .sg-credit { font-size: 9.5px; letter-spacing: 0.5px; margin-top: 0; }
  .view-scroll { padding: 24px 16px 48px; }
  .view-h2 { font-size: 26px; }
}
