/* ═══════════════════════════════════════════════════════════════════
   MAGNIFICENT BASTAGES — REVAMP STYLESHEET  (Phase 47)

   Loaded AFTER main.css, so it wins the cascade. All new/revamped UI
   lives here to keep it isolated from the legacy 5.6k-line main.css
   (which keeps every dashboard/admin/RPG style working untouched).

   PHASE 0 — Foundation: one set of semantic + scale tokens on top of the
            existing --fire/--gold palette, plus a gradient-text safety net.
   PHASE 1 — The shell: modern sticky header, grouped nav with dropdowns,
            a persistent "Join the Guild" CTA, a real slide-in mobile
            drawer, and an expanded footer.

   Everything degrades gracefully: the page works with no JS, and all
   motion is disabled under prefers-reduced-motion.
   ═══════════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────────────────────────
   PHASE 0 — FOUNDATION TOKENS
   The existing palette (--fire #e87b1e, --gold #c9a84c, --bg #080809,
   Cinzel fonts) stays the source of truth. We ADD the missing pieces:
   semantic state colors, a real type + spacing scale, and motion easing.
   ─────────────────────────────────────────────────────────────────── */
:root {
  /* Semantic state colors (previously hardcoded in dozens of rules) */
  --success:      #6fae7f;
  --success-soft: rgba(111, 174, 127, 0.16);
  --danger:       #c95a5a;
  --danger-soft:  rgba(201, 90, 90, 0.16);
  --warn:         #e0a33a;
  --info:         #4aa8d8;
  --live:         var(--fire);   /* the "happening now" accent */

  /* Cross-system aliases — guarantees BOTH naming sets resolve the same,
     so old (--text/--bg-card/--cool) and new (--ink/--card/--cool-blue)
     code stay perfectly in sync from one place. */
  --cool:      #4aa8d8;
  --cool-blue: #4aa8d8;

  /* Type scale (rem rungs) — replaces ~38 ad-hoc sizes going forward */
  --fs-xs: 0.76rem; --fs-sm: 0.88rem; --fs-base: 1rem; --fs-lg: 1.15rem;
  --fs-xl: 1.35rem; --fs-2xl: 1.75rem; --fs-3xl: 2.25rem;

  /* Spacing scale (0.25rem step) */
  --sp-1: 0.25rem; --sp-2: 0.5rem; --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-5: 1.5rem;  --sp-6: 2rem;   --sp-7: 3rem;     --sp-8: 4rem;

  /* Radii + motion */
  --radius-sm:   4px;
  --radius-pill: 999px;
  --t-fast:  150ms ease-out;
  --t-med:   260ms cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);

  --header-h: 68px;
}

/* Gradient-text SAFETY NET: if a browser can't clip background to text,
   show solid gold instead of invisible (transparent) headings. */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .display-title, .hero__title, .pillar__title, .brand-text, .mb-brand__text,
  .hp-hero__title, .hp-joinband__title {
    -webkit-text-fill-color: var(--gold-bright) !important;
    color: var(--gold-bright) !important;
  }
}

/* ───────────────────────────────────────────────────────────────────
   PHASE 1 — THE SHELL
   New `.mb-*` namespace (no collision with the two legacy shells, which
   become dead CSS and get removed in Phase 4).
   ─────────────────────────────────────────────────────────────────── */

/* Skip link */
.mb-skip {
  position: fixed; top: -120px; left: var(--sp-4); z-index: 200;
  background: var(--bg-2); color: var(--gold-bright);
  border: 1px solid var(--gold); border-radius: var(--radius);
  padding: var(--sp-3) var(--sp-4); transition: top var(--t-fast);
}
.mb-skip:focus { top: var(--sp-3); }

/* ── Header ── */
.mb-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8, 8, 9, 0.72);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
/* Firms up once the visitor scrolls past the hero (toggled by main.js) */
.mb-header.is-scrolled {
  background: rgba(8, 8, 9, 0.92);
  border-bottom-color: var(--border-strong);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}
.mb-header__inner {
  max-width: 1240px; margin: 0 auto;
  min-height: var(--header-h);
  padding: 0 var(--pad-page);
  display: flex; align-items: center; gap: var(--sp-5);
}

/* Brand */
.mb-brand {
  display: inline-flex; align-items: center; gap: 0.5ch;
  font-family: var(--font-display, 'Cinzel Decorative', serif);
  font-weight: 700; font-size: 1.18rem; letter-spacing: 0.04em;
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
}
.mb-brand__mark { color: var(--fire); }
.mb-brand__text {
  background: linear-gradient(120deg, var(--gold-bright), var(--gold) 55%, var(--fire));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--gold-bright);
}
@media (max-width: 480px) { .mb-brand__text { display: none; } }

/* ── Desktop nav ── */
.mb-nav { display: none; }
@media (min-width: 900px) {
  .mb-nav { display: flex; align-items: center; gap: var(--sp-2); margin-inline: auto; }
}
.mb-nav__link, .mb-nav__btn {
  display: inline-flex; align-items: center; gap: 0.35ch;
  font-family: var(--font-head, 'Cinzel', serif);
  font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-dim); text-decoration: none;
  padding: 0.5rem 0.7rem; border-radius: var(--radius);
  background: none; border: 0; cursor: pointer;
  transition: color var(--t-fast), background var(--t-fast);
  position: relative;
}
.mb-nav__link::after {
  content: ''; position: absolute; left: 0.7rem; right: 0.7rem; bottom: 0.28rem;
  height: 2px; background: var(--gold); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform var(--t-fast);
}
.mb-nav__link:hover, .mb-nav__btn:hover,
.mb-nav__link:focus-visible, .mb-nav__btn:focus-visible { color: var(--text-bright); }
.mb-nav__link:hover::after { transform: scaleX(1); }
.mb-nav__link.is-active { color: var(--gold-bright); }
.mb-nav__link.is-active::after { transform: scaleX(1); background: var(--gold-bright); }
.mb-nav__btn.is-active { color: var(--gold-bright); }
.mb-nav__caret { font-size: 0.7em; opacity: 0.7; transition: transform var(--t-fast); }
.mb-nav__group[data-open="true"] .mb-nav__caret { transform: rotate(180deg); }

/* Dropdown menu */
.mb-nav__group { position: relative; }
.mb-nav__menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 190px;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--bg-2); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); padding: 0.4rem;
  box-shadow: var(--shadow-card);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity var(--t-fast), transform var(--t-fast), visibility var(--t-fast);
  z-index: 101;
}
.mb-nav__group[data-open="true"] .mb-nav__menu,
.mb-nav__group:hover .mb-nav__menu,
.mb-nav__group:focus-within .mb-nav__menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.mb-nav__menu a {
  font-family: var(--font-head, 'Cinzel', serif);
  font-size: 0.8rem; letter-spacing: 0.08em;
  color: var(--text); text-decoration: none;
  padding: 0.6rem 0.7rem; border-radius: var(--radius);
  transition: background var(--t-fast), color var(--t-fast);
}
.mb-nav__menu a:hover, .mb-nav__menu a:focus-visible {
  background: var(--gold-soft, rgba(201,168,76,0.12)); color: var(--gold-bright);
}

/* ── Actions (Join + auth) ── */
.mb-actions { display: flex; align-items: center; gap: var(--sp-3); margin-left: auto; flex-shrink: 0; }
@media (min-width: 900px) { .mb-actions { margin-left: 0; } }

.mb-join {
  display: inline-flex; align-items: center; gap: 0.4ch;
  font-family: var(--font-head, 'Cinzel', serif);
  font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600;
  color: #1a1206; text-decoration: none; white-space: nowrap;
  padding: 0.6rem 1.1rem; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--fire), var(--fire-deep));
  border: 1px solid rgba(255, 200, 120, 0.4);
  box-shadow: var(--shadow-fire, 0 4px 16px rgba(232,123,30,0.32));
  transition: transform var(--t-fast), box-shadow var(--t-fast), filter var(--t-fast);
}
.mb-join:hover { transform: translateY(-1px); filter: brightness(1.08); }
.mb-join:active { transform: translateY(0); }

.mb-login {
  font-family: var(--font-head, 'Cinzel', serif);
  font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim); text-decoration: none; white-space: nowrap;
  padding: 0.5rem 0.4rem; transition: color var(--t-fast);
}
.mb-login:hover { color: var(--gold-bright); }
@media (max-width: 560px) { .mb-login { display: none; } }

.mb-userchip {
  display: inline-flex; align-items: center; gap: 0.5ch;
  color: var(--text-bright); text-decoration: none; font-family: var(--font-head, 'Cinzel', serif);
  font-size: 0.82rem; padding: 0.3rem 0.5rem; border-radius: var(--radius-pill);
  border: 1px solid var(--border); transition: border-color var(--t-fast);
}
.mb-userchip:hover { border-color: var(--gold); }
.mb-userchip__pfp { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.mb-userchip__mark { color: var(--gold); }
.mb-userchip__name { max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) { .mb-userchip__name { display: none; } }
.mb-dash {
  font-family: var(--font-head, 'Cinzel', serif); font-size: 0.78rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--gold); text-decoration: none; white-space: nowrap;
}
.mb-dash:hover { color: var(--gold-bright); }
@media (max-width: 820px) { .mb-dash { display: none; } }
.mb-logout { background: none; border: 0; cursor: pointer; color: var(--text-dim);
  font-family: var(--font-head,'Cinzel',serif); font-size: 0.76rem; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 0.4rem; transition: color var(--t-fast); }
.mb-logout:hover { color: var(--danger); }
@media (max-width: 700px) { .mb-logout { display: none; } }

/* ── Burger (mobile) ── */
.mb-burger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; background: none; border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer; color: var(--text-bright);
}
.mb-burger svg { width: 22px; height: 22px; }
@media (min-width: 900px) { .mb-burger { display: none; } }

/* ── Mobile drawer ── */
.mb-scrim {
  position: fixed; inset: 0; z-index: 150; background: rgba(0, 0, 0, 0.6);
  opacity: 0; transition: opacity var(--t-med); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.mb-scrim.is-open { opacity: 1; }
.mb-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 151;
  width: min(86vw, 360px); display: flex; flex-direction: column;
  background: var(--bg-2); border-left: 1px solid var(--border-strong);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.6);
  transform: translateX(100%); transition: transform var(--t-med);
  overflow-y: auto; overscroll-behavior: contain;
}
.mb-drawer.is-open { transform: translateX(0); }
.mb-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--border);
}
.mb-drawer__close { width: 40px; height: 40px; background: none; border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-bright); cursor: pointer; font-size: 1.2rem; }
.mb-drawer__nav { display: flex; flex-direction: column; padding: var(--sp-4) var(--sp-4) var(--sp-6); gap: 0.15rem; }
.mb-drawer__heading {
  font-family: var(--font-head, 'Cinzel', serif); font-size: 0.7rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--text-dim); padding: var(--sp-4) var(--sp-3) var(--sp-2);
}
.mb-drawer__nav a {
  font-family: var(--font-head, 'Cinzel', serif); font-size: 0.98rem; letter-spacing: 0.04em;
  color: var(--text); text-decoration: none; padding: 0.85rem var(--sp-3); border-radius: var(--radius);
  transition: background var(--t-fast), color var(--t-fast);
}
.mb-drawer__nav a:hover, .mb-drawer__nav a.is-active {
  background: var(--gold-soft, rgba(201,168,76,0.12)); color: var(--gold-bright);
}
.mb-drawer__cta { margin-top: auto; padding: var(--sp-5); border-top: 1px solid var(--border); }
.mb-drawer__cta .mb-join { width: 100%; justify-content: center; padding: 0.85rem; font-size: 0.9rem; }

/* ── Footer ── */
.mb-footer { border-top: 1px solid var(--border); background: var(--bg-2); margin-top: var(--sp-8); }
.mb-footer__inner {
  max-width: 1240px; margin: 0 auto; padding: var(--sp-7) var(--pad-page) var(--sp-5);
  display: grid; gap: var(--sp-6);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .mb-footer__inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.mb-footer__brand .mb-footer__mark {
  font-family: var(--font-display, 'Cinzel Decorative', serif); color: var(--gold-bright);
  font-size: 1.05rem; display: block; margin-bottom: var(--sp-2);
}
.mb-footer__tag { color: var(--text-dim); font-size: 0.92rem; max-width: 32ch; }
.mb-footer__social { display: flex; gap: var(--sp-3); margin-top: var(--sp-4); }
.mb-footer__social a {
  display: inline-flex; align-items: center; gap: 0.4ch; color: var(--text-bright);
  text-decoration: none; font-size: 0.85rem; padding: 0.45rem 0.8rem;
  border: 1px solid var(--border); border-radius: var(--radius-pill); transition: border-color var(--t-fast), color var(--t-fast);
}
.mb-footer__social a:hover { border-color: var(--fire); color: var(--fire); }
.mb-footer__col h4 {
  font-family: var(--font-head, 'Cinzel', serif); font-size: 0.72rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold); margin-bottom: var(--sp-3);
}
.mb-footer__col a {
  display: block; color: var(--text-dim); text-decoration: none; font-size: 0.92rem;
  padding: 0.3rem 0; transition: color var(--t-fast);
}
.mb-footer__col a:hover { color: var(--gold-bright); }
.mb-footer__bar {
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3);
  max-width: 1240px; margin: 0 auto; padding: var(--sp-4) var(--pad-page);
}
.mb-footer__bar p { color: var(--text-dim); font-size: 0.82rem; }
.mb-footer__bar .mb-join { font-size: 0.74rem; padding: 0.5rem 0.9rem; }

/* ── Reduced motion: kill shell motion entirely ── */
@media (prefers-reduced-motion: reduce) {
  .mb-header, .mb-skip, .mb-nav__link, .mb-nav__btn, .mb-nav__menu, .mb-join,
  .mb-scrim, .mb-drawer, .mb-nav__caret, .mb-nav__link::after {
    transition: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   PHASE 2 — THE HOMEPAGE  (`.hp-*` namespace)
   Sections live inside .site-main (centered, max-width 1200px). Wired to
   real data via src/utils/home-data.js; every block degrades gracefully.
   Plain language + one obvious primary action, per the beginner-friendly
   brief.
   ─────────────────────────────────────────────────────────────────── */

/* A small "happening now" dot, used by the live pill + live cards. */
.hp-dot {
  display: inline-block; width: 0.55em; height: 0.55em; border-radius: 50%;
  background: var(--fire); box-shadow: 0 0 0 0 rgba(232, 123, 30, 0.55);
  animation: hp-pulse 1.8s ease-out infinite;
}
@keyframes hp-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(232, 123, 30, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(232, 123, 30, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 123, 30, 0); }
}

/* ── HERO ── */
.hp-hero { text-align: center; padding: var(--sp-6) 0 var(--sp-7); }
.hp-hero__inner { max-width: 760px; margin: 0 auto; }
.hp-hero__livepill {
  display: inline-flex; align-items: center; gap: 0.5ch;
  font-family: var(--font-head, 'Cinzel', serif);
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fire); text-decoration: none;
  padding: 0.4rem 0.9rem; border-radius: var(--radius-pill);
  border: 1px solid rgba(232, 123, 30, 0.4); background: rgba(232, 123, 30, 0.08);
  margin-bottom: var(--sp-5); transition: border-color var(--t-fast), background var(--t-fast);
}
.hp-hero__livepill:hover { border-color: var(--fire); background: rgba(232, 123, 30, 0.16); }
.hp-hero__eyebrow {
  font-family: var(--font-head, 'Cinzel', serif);
  font-size: 0.72rem; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--gold); margin-bottom: var(--sp-3);
}
.hp-hero__title {
  font-family: var(--font-display, 'Cinzel Decorative', serif); font-weight: 900;
  font-size: clamp(2.6rem, 7vw, 4.5rem); line-height: 1.02; margin: 0 0 var(--sp-4);
  background: linear-gradient(120deg, var(--gold-bright), var(--gold) 50%, var(--fire));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--gold-bright);
}
.hp-hero__lede {
  font-family: var(--font-body, 'Crimson Pro', serif);
  font-size: clamp(1.1rem, 2.2vw, 1.4rem); line-height: 1.6;
  color: var(--text-bright); max-width: 36ch; margin: 0 auto var(--sp-5);
}
.hp-hero__cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center; }
.hp-hero__join { padding: 0.85rem 1.8rem; font-size: 0.9rem; }
.hp-hero__watch {
  display: inline-flex; align-items: center; gap: 0.4ch;
  font-family: var(--font-head, 'Cinzel', serif);
  font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600;
  color: var(--gold-bright); text-decoration: none;
  padding: 0.85rem 1.6rem; border-radius: var(--radius);
  border: 1px solid var(--gold); background: rgba(201, 168, 76, 0.06);
  transition: background var(--t-fast), transform var(--t-fast);
}
.hp-hero__watch:hover { background: rgba(201, 168, 76, 0.16); transform: translateY(-1px); }
.hp-hero__hint { color: var(--text-dim); font-size: 0.92rem; margin-top: var(--sp-4); }

/* ── STATS STRIP ── */
.hp-stats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-4);
  padding: var(--sp-5); margin: 0 auto var(--sp-7);
  background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.hp-stat { flex: 1 1 120px; min-width: 110px; text-align: center; padding: var(--sp-2); }
.hp-stat + .hp-stat { border-left: 1px solid var(--border); }
@media (max-width: 560px) { .hp-stat + .hp-stat { border-left: 0; } }
.hp-stat__num {
  display: block; font-family: var(--font-display, 'Cinzel Decorative', serif); font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1; color: var(--gold-bright);
}
.hp-stat__label {
  display: block; margin-top: var(--sp-2); font-family: var(--font-head, 'Cinzel', serif);
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-dim);
}

/* ── SECTION SCAFFOLD ── */
.hp-section { margin-top: var(--sp-8); }
.hp-section__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-5);
}
.hp-section__title {
  font-family: var(--font-head, 'Cinzel', serif); font-weight: 600;
  font-size: clamp(1.5rem, 3.5vw, 2rem); color: var(--text-bright); margin: 0.1rem 0 0;
}
.hp-section__sub { color: var(--text-dim); font-size: 0.98rem; margin: var(--sp-2) 0 0; max-width: 52ch; }
.hp-seeall {
  font-family: var(--font-head, 'Cinzel', serif); font-size: 0.78rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gold); text-decoration: none; white-space: nowrap;
  transition: color var(--t-fast);
}
.hp-seeall:hover { color: var(--gold-bright); }
.hp-empty {
  color: var(--text-dim); font-size: 1rem; padding: var(--sp-5);
  background: var(--bg-3); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg);
}
.hp-empty a { color: var(--gold-bright); }

/* ── THE HEARTH (live cards) ── */
.hp-live-grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
@media (min-width: 620px) { .hp-live-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.hp-live {
  display: flex; flex-direction: column; gap: var(--sp-2);
  padding: var(--sp-5); background: var(--bg-3);
  border: 1px solid rgba(232, 123, 30, 0.35); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); transition: transform var(--t-fast), border-color var(--t-fast);
}
.hp-live:hover { transform: translateY(-2px); border-color: var(--fire); }
.hp-live__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.hp-live__badge {
  display: inline-flex; align-items: center; gap: 0.5ch;
  font-family: var(--font-head, 'Cinzel', serif); font-size: 0.7rem; letter-spacing: 0.16em;
  text-transform: uppercase; font-weight: 600; color: var(--fire);
}
.hp-live__viewers { font-size: 0.82rem; color: var(--text-dim); }
.hp-live__name { font-family: var(--font-head, 'Cinzel', serif); font-size: 1.15rem; color: var(--text-bright); margin: 0; }
.hp-live__game { font-size: 0.9rem; color: var(--gold); margin: 0; }
.hp-live__title { font-size: 0.88rem; color: var(--text-dim); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hp-live__watch {
  margin-top: var(--sp-2); align-self: flex-start;
  font-family: var(--font-head, 'Cinzel', serif); font-size: 0.78rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--gold-bright); text-decoration: none;
  padding: 0.5rem 0.9rem; border: 1px solid var(--gold); border-radius: var(--radius);
  transition: background var(--t-fast);
}
.hp-live__watch:hover { background: rgba(201, 168, 76, 0.16); }

/* ── MEET THE CREW (creator banner-cards) ── */
.hp-creator-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .hp-creator-grid { grid-template-columns: repeat(4, 1fr); } }
.hp-creator {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 0 var(--sp-4) var(--sp-5); background: var(--bg-3);
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  text-decoration: none; transition: transform var(--t-fast), border-color var(--t-fast);
}
.hp-creator:hover { transform: translateY(-3px); border-color: var(--accent, var(--gold)); }
.hp-creator__banner {
  width: calc(100% + 2px); height: 54px; margin: -1px -1px 0;
  background: linear-gradient(120deg, var(--accent, var(--gold)), transparent 80%),
              linear-gradient(180deg, rgba(255,255,255,0.06), transparent);
  border-bottom: 1px solid var(--border);
}
.hp-creator__avatar {
  width: 64px; height: 64px; margin-top: -32px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-display, 'Cinzel Decorative', serif);
  font-size: 1.5rem; color: #1a1206; background: linear-gradient(135deg, var(--gold-bright), var(--accent, var(--gold)));
  border: 3px solid var(--bg-3); box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
.hp-creator__name { font-family: var(--font-head, 'Cinzel', serif); font-size: 1.02rem; color: var(--text-bright); margin-top: var(--sp-3); }
.hp-creator__tag { font-size: 0.85rem; color: var(--text-dim); margin-top: var(--sp-1); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hp-creator__pills { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: center; margin-top: var(--sp-3); }
.hp-creator__pill {
  font-family: var(--font-head, 'Cinzel', serif); font-size: 0.66rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--gold); padding: 0.2rem 0.55rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
}

/* ── WHAT'S COMING UP (event cards) ── */
.hp-event-grid { display: grid; gap: var(--sp-3); grid-template-columns: 1fr; }
@media (min-width: 720px) { .hp-event-grid { grid-template-columns: repeat(3, 1fr); } }
.hp-event {
  display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4);
  background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius-lg);
  text-decoration: none; transition: transform var(--t-fast), border-color var(--t-fast);
}
.hp-event:hover { transform: translateY(-2px); border-color: var(--gold); }
.hp-event.is-live { border-color: rgba(232, 123, 30, 0.5); }
.hp-event__date {
  flex-shrink: 0; width: 56px; text-align: center; padding: var(--sp-2) 0;
  background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: var(--radius);
}
.hp-event__day { display: block; font-family: var(--font-display, 'Cinzel Decorative', serif); font-size: 1.5rem; line-height: 1; color: var(--gold-bright); }
.hp-event__mon { display: block; font-size: 0.62rem; letter-spacing: 0.12em; color: var(--text-dim); margin-top: 2px; }
.hp-event__body { min-width: 0; }
.hp-event__title { display: block; font-family: var(--font-head, 'Cinzel', serif); font-size: 1rem; color: var(--text-bright); }
.hp-event__live { color: var(--fire); font-size: 0.72rem; letter-spacing: 0.08em; }
.hp-event__meta { display: block; font-size: 0.82rem; color: var(--text-dim); margin-top: 0.2rem; }

/* ── FROM THE BANNER HALL (announcements) ── */
.hp-card-grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
@media (min-width: 720px) { .hp-card-grid { grid-template-columns: repeat(3, 1fr); } }
.hp-ann {
  display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-5);
  background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius-lg);
  text-decoration: none; transition: transform var(--t-fast), border-color var(--t-fast);
}
.hp-ann:hover { transform: translateY(-2px); border-color: var(--gold); }
.hp-ann__label { font-family: var(--font-head, 'Cinzel', serif); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.hp-ann__title { font-family: var(--font-head, 'Cinzel', serif); font-size: 1.1rem; color: var(--text-bright); }
.hp-ann__body { font-size: 0.92rem; color: var(--text-dim); line-height: 1.5; }

/* ── JOIN BAND ── */
.hp-joinband {
  text-align: center; margin: var(--sp-8) auto 0; padding: var(--sp-7) var(--sp-5);
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(232, 123, 30, 0.14), transparent 60%),
    var(--bg-3);
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
}
.hp-joinband__title {
  font-family: var(--font-display, 'Cinzel Decorative', serif); font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 var(--sp-3);
  background: linear-gradient(120deg, var(--gold-bright), var(--fire));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--gold-bright);
}
.hp-joinband__sub { color: var(--text); font-size: 1.05rem; max-width: 44ch; margin: 0 auto var(--sp-5); }
.hp-joinband__btn { padding: 0.9rem 2rem; font-size: 0.95rem; }

/* ── Reduced motion: kill homepage motion ── */
@media (prefers-reduced-motion: reduce) {
  .hp-dot { animation: none !important; }
  .hp-live, .hp-creator, .hp-event, .hp-ann, .hp-hero__watch, .hp-hero__livepill { transition: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════
   PHASE 3 — /join welcome funnel + shared page bits
   (/creators + /events reuse .hp-creator-grid / .hp-event-grid above)
   ─────────────────────────────────────────────────────────────────── */

/* Numbered steps */
.hp-join-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-4); }
.hp-join-step {
  display: flex; gap: var(--sp-4); align-items: flex-start; padding: var(--sp-5);
  background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.hp-join-step__num {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display, 'Cinzel Decorative', serif); font-weight: 700; font-size: 1.4rem; color: #1a1206;
  background: linear-gradient(135deg, var(--gold-bright), var(--fire));
  box-shadow: var(--shadow-fire, 0 4px 16px rgba(232,123,30,0.32));
}
.hp-join-step__body { min-width: 0; }
.hp-join-step__title { font-family: var(--font-head, 'Cinzel', serif); font-size: 1.2rem; color: var(--text-bright); margin: 0.25rem 0 var(--sp-2); }
.hp-join-step__text { color: var(--text-dim); font-size: 1rem; line-height: 1.6; margin: 0; }
.hp-join-step__cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-4); }

/* Perks ("what you can do here") */
.hp-perk-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .hp-perk-grid { grid-template-columns: repeat(4, 1fr); } }
.hp-perk {
  text-align: center; padding: var(--sp-5) var(--sp-4); background: var(--bg-3);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.hp-perk__icon { font-size: 1.9rem; display: block; }
.hp-perk__title { font-family: var(--font-head, 'Cinzel', serif); font-size: 1.05rem; color: var(--gold-bright); margin: var(--sp-3) 0 var(--sp-2); }
.hp-perk__body { color: var(--text-dim); font-size: 0.9rem; line-height: 1.5; margin: 0; }

/* Quick FAQ */
.hp-faq-grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
@media (min-width: 760px) { .hp-faq-grid { grid-template-columns: repeat(3, 1fr); } }
.hp-faq { padding: var(--sp-5); background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.hp-faq__q { font-family: var(--font-head, 'Cinzel', serif); font-size: 1.02rem; color: var(--text-bright); margin: 0 0 var(--sp-2); }
.hp-faq__a { color: var(--text-dim); font-size: 0.95rem; line-height: 1.55; margin: 0; }

/* ═══════════════════════════════════════════════════════════════════
   PHASE 4 — MOTION (scroll-reveal)
   Only hides-then-reveals when JS added `.js-motion` AND the visitor has
   no reduced-motion preference. Count-up is handled in public/js/main.js.
   ─────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .js-motion .hp-reveal {
    opacity: 0; transform: translateY(18px);
    transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .js-motion .hp-reveal.is-revealed { opacity: 1; transform: none; }
}

/* ═══════════════════════════════════════════════════════════════════
   PHASE 47 — REMAINING PAGES (/media, /merch, /c/:handle, /live, /contact)
   Restyled to the design system, fully CSP-safe (no inline styles).
   ─────────────────────────────────────────────────────────────────── */

/* ── /media + /clips gallery ── */
.hp-media-submit {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--sp-3); margin-top: var(--sp-5); padding: var(--sp-4) var(--sp-5);
  background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.hp-media-submit__copy { margin: 0; color: var(--text-dim); font-size: 0.98rem; }
.hp-media-tags { margin-top: var(--sp-3); }
.hp-media-grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
@media (min-width: 560px) { .hp-media-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .hp-media-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1140px) { .hp-media-grid { grid-template-columns: repeat(4, 1fr); } }
.hp-media {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); transition: transform var(--t-fast), border-color var(--t-fast);
}
.hp-media:hover { transform: translateY(-3px); border-color: var(--gold); }
.hp-media__link { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.hp-media__thumb {
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  background: #000; overflow: hidden; border-bottom: 1px solid var(--border);
}
.hp-media__img, .hp-media__player { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; }
.hp-media__placeholder {
  display: grid; place-items: center; width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  color: var(--text-dim); font-family: var(--font-head, 'Cinzel', serif);
  font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase;
}
.hp-media__play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.35));
  pointer-events: none; transition: background var(--t-fast);
}
.hp-media:hover .hp-media__play { background: linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.5)); }
.hp-media__play-btn {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: rgba(0,0,0,0.55); border: 2px solid var(--gold); color: var(--gold-bright);
  font-size: 1.1rem; padding-left: 3px;
}
.hp-media__body { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-4); flex: 1; }
.hp-media__title {
  font-family: var(--font-head, 'Cinzel', serif); font-size: 1.02rem; line-height: 1.25;
  color: var(--text-bright); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hp-media__caption {
  margin: 0; font-size: 0.88rem; color: var(--text-dim); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hp-media__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4ch;
  margin: auto 0 0; font-size: 0.8rem; color: var(--text-dim);
}
.hp-media__by { color: var(--text); }
.hp-media__game { color: var(--gold); }
.hp-media__cat { color: var(--text-dim); }
.hp-media__dot { color: var(--border-strong); }
.hp-media__tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.1rem; }
.hp-media__tag {
  font-family: var(--font-head, 'Cinzel', serif); font-size: 0.64rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--gold); padding: 0.18rem 0.5rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
}
.hp-media__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); padding: 0 var(--sp-4) var(--sp-4); }

/* ── /merch (The Tavern) shop empty states ── */
.hp-shop-empty { display: flex; flex-direction: column; gap: var(--sp-2); text-align: center; }
.hp-shop-empty__title { font-family: var(--font-head, 'Cinzel', serif); font-weight: 600; color: var(--text-bright); font-size: 1.15rem; margin: 0; }
.hp-shop-empty p { margin: 0; }

/* ── /c/:handle creator profile ── */
.hp-profile-crumbs { margin: 0 0 var(--sp-4); font-size: 0.92rem; }
.hp-profile-crumbs a { color: var(--text-dim); text-decoration: none; }
.hp-profile-crumbs a:hover { color: var(--gold-bright); }
.hp-profile-hero {
  position: relative; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg-2); overflow: hidden; margin-bottom: var(--sp-6);
}
.hp-profile__banner, .hp-profile__banner-img { display: block; width: 100%; height: 200px; object-fit: cover; }
.hp-profile__banner { background: linear-gradient(135deg, var(--accent, var(--gold)), var(--bg-3) 85%); }
.hp-profile-hero__inner {
  display: flex; align-items: flex-end; gap: var(--sp-4);
  padding: 0 var(--sp-5) var(--sp-5); margin-top: -56px; flex-wrap: wrap;
}
.hp-profile__avatar {
  display: flex; align-items: center; justify-content: center;
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--bg-2); background: var(--bg-3); flex-shrink: 0;
}
.hp-profile__avatar--initial {
  font-family: var(--font-head, 'Cinzel', serif); font-size: 3rem; font-weight: 700;
  color: #1a1206; background: linear-gradient(135deg, var(--gold-bright), var(--accent, var(--gold)));
}
.hp-profile-hero__id { padding-bottom: var(--sp-2); }
.hp-profile-hero__name { font-family: var(--font-display, var(--font-head, 'Cinzel', serif)); font-size: 1.8rem; color: var(--text-bright); margin: 0; }
.hp-profile-hero__handle { color: var(--accent, var(--gold-bright)); margin: var(--sp-1) 0 0; font-size: 0.95rem; }
.hp-profile-hero__tag { color: var(--text-dim); margin: var(--sp-2) 0 0; max-width: 60ch; }
.hp-profile-bio { color: var(--text); line-height: 1.7; max-width: 70ch; white-space: pre-wrap; }
.hp-profile-embed { border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--border); }
.hp-profile-embed .embed-iframe { display: block; border: 0; }
.hp-profile-watch__out { margin: var(--sp-3) 0 0; }
.hp-profile-offline {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-2); text-align: center; min-height: 240px; padding: var(--sp-5);
  border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--accent, var(--gold)), var(--bg-3) 85%);
}
.hp-profile-offline__tag {
  margin: 0; font-family: var(--font-head, 'Cinzel', serif); letter-spacing: 0.12em;
  text-transform: uppercase; font-size: 0.8rem; color: var(--text-bright);
}
.hp-profile-offline__msg { margin: 0; color: var(--text-bright); background: rgba(0, 0, 0, 0.55); padding: 0.6em 1em; border-radius: var(--radius); }
.hp-profile-links { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.hp-profile-link {
  display: flex; align-items: center; gap: var(--sp-3); padding: 0.85rem 1rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2);
  text-decoration: none; color: var(--text); transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.hp-profile-link:hover { border-color: var(--gold); background: var(--bg-3); transform: translateY(-2px); }
.hp-profile-link__icon { font-size: 1.4rem; line-height: 1; color: var(--gold-bright); }
.hp-profile-link__body { display: flex; flex-direction: column; min-width: 0; }
.hp-profile-link__label { font-weight: 600; color: var(--text-bright); }
.hp-profile-link__handle { font-size: 0.85rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-profile-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--sp-3); }
.hp-profile-foot__link { margin: 0; }
.hp-profile-foot__link a { color: var(--gold-bright); text-decoration: none; }
.hp-profile-foot__link a:hover { text-decoration: underline; }
.hp-profile-foot__report { margin: 0; font-size: 0.85rem; }
.hp-profile-foot__report a { color: var(--text-dim); }

/* ── /live offline creator cards ── */
.hp-live-off-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.hp-live-off {
  display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3);
  background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius-lg);
  text-decoration: none; box-shadow: var(--shadow-card); transition: transform var(--t-fast), border-color var(--t-fast);
}
.hp-live-off:hover { transform: translateY(-2px); border-color: var(--gold); }
.hp-live-off__avatar { position: relative; flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; border: 1px solid var(--border-strong); }
.hp-live-off__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hp-live-off__avatar-empty { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--bg-2), var(--bg-3)); }
.hp-live-off__badge {
  position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-head, 'Cinzel', serif); font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 1px 6px; border-radius: var(--radius-pill); background: var(--bg-2); border: 1px solid var(--border-strong); color: var(--text-dim);
}
.hp-live-off__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hp-live-off__name { font-family: var(--font-head, 'Cinzel', serif); font-size: 1rem; color: var(--text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-live-off:hover .hp-live-off__name { color: var(--gold-bright); }
.hp-live-off__lastseen { font-size: 0.78rem; color: var(--text-dim); }
.hp-live-refresh { margin-top: var(--sp-5); font-size: 0.82rem; font-style: italic; color: var(--text-dim); }

/* ── /contact ── */
.hp-contact { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--sp-6); align-items: start; margin: 0 0 var(--sp-6); }
.hp-contact__form {
  max-width: none; margin: 0; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--sp-5); box-shadow: var(--shadow-card);
}
.hp-contact__field { display: flex; flex-direction: column; gap: 0.45rem; }
.hp-contact__field label { font-family: var(--font-head); font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.hp-contact__input {
  width: 100%; padding: 0.8rem 0.95rem; background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-bright, var(--text)); font-family: var(--font-body); font-size: 1rem; line-height: 1.5;
}
.hp-contact__input::placeholder { color: var(--text-dim); opacity: 0.8; }
.hp-contact__input:focus { border-color: var(--fire); outline: none; box-shadow: 0 0 0 3px rgba(232, 92, 30, 0.18); }
.hp-contact__textarea { resize: vertical; min-height: 140px; line-height: 1.6; }
.hp-contact__hint { font-size: 0.85rem; color: var(--text-dim); margin: 0; }
.hp-contact__actions { margin-top: var(--sp-2); }
.hp-contact__aside { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-5); }
.hp-contact__aside-title { font-family: var(--font-head); font-size: 1.05rem; letter-spacing: 0.04em; color: var(--gold-bright, var(--gold)); margin: 0 0 var(--sp-3); }
.hp-contact__list { list-style: none; margin: 0 0 var(--sp-4); padding: 0; display: flex; flex-direction: column; gap: 0.8rem; }
.hp-contact__list li { position: relative; padding-left: 1.4rem; color: var(--text); font-size: 0.95rem; line-height: 1.5; }
.hp-contact__list li::before { content: "\2726"; position: absolute; left: 0; top: 0; color: var(--fire); }
.hp-contact__aside-note { margin: 0; font-size: 0.9rem; color: var(--text-dim); font-style: italic; }
@media (max-width: 760px) { .hp-contact { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .hp-media, .hp-profile-link, .hp-live-off { transition: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════
   SHARED FORM SYSTEM (.hp-form*) — CSP-safe, reusable across dashboard
   + public forms. Replaces the old inline-styled (CSP-blocked) forms.
   ─────────────────────────────────────────────────────────────────── */
.hp-form { max-width: 720px; display: flex; flex-direction: column; gap: var(--sp-5); }
.hp-form__field { display: flex; flex-direction: column; gap: 0.4rem; }
.hp-form__label { font-family: var(--font-head, 'Cinzel', serif); font-size: 0.76rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.hp-form__req { color: var(--fire); }
.hp-form__hint { font-size: 0.82rem; color: var(--text-dim); margin: 0.1rem 0 0; }
.hp-form__input, .hp-form__select, .hp-form__textarea {
  width: 100%; padding: 0.7rem 0.85rem; background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-bright); font-family: var(--font-body, 'Crimson Pro', serif);
  font-size: 1rem; line-height: 1.5;
}
.hp-form__input::placeholder, .hp-form__textarea::placeholder { color: var(--text-dim); opacity: 0.75; }
.hp-form__input:focus, .hp-form__select:focus, .hp-form__textarea:focus {
  border-color: var(--fire); outline: none; box-shadow: 0 0 0 3px rgba(232, 123, 30, 0.18);
}
.hp-form__textarea { resize: vertical; min-height: 90px; }
.hp-form__row { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.hp-form__actions { margin-top: var(--sp-2); }
.hp-form__tip { font-size: 0.85rem; color: var(--text-dim); margin: var(--sp-3) 0 0; max-width: 720px; }

/* Upload dropzone (chunked clip/video uploader; JS sets bar width via CSSOM) */
.hp-upload {
  display: flex; flex-direction: column; gap: var(--sp-2);
  border: 1.5px dashed rgba(201, 168, 76, 0.45); border-radius: var(--radius-lg);
  padding: var(--sp-5); background: rgba(201, 168, 76, 0.04);
}
.hp-upload__title { font-family: var(--font-head, 'Cinzel', serif); font-weight: 600; color: var(--text-bright); }
.hp-upload__hint { font-size: 0.85rem; color: var(--text-dim); margin: 0; }
.hp-upload__file { margin-top: var(--sp-2); color: var(--text); font-size: 0.95rem; }
.hp-upload__progress { height: 9px; background: rgba(255, 255, 255, 0.08); border-radius: 5px; overflow: hidden; margin-top: var(--sp-2); }
.hp-upload__bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--fire)); transition: width 0.2s; }
.hp-upload__status { font-size: 0.85rem; margin-top: 0.3rem; color: var(--text-dim); }

/* Small CSP-safe utilities (replace inline style="" left in dashboard views) */
.hp-mt-3 { margin-top: var(--sp-3); }
.hp-mt-5 { margin-top: var(--sp-5); }
.hp-mt-6 { margin-top: var(--sp-6); }
.hp-cell-sub { font-size: 0.82em; }

/* ═══════════════════════════════════════════════════════════════════
   DASHBOARD KIT (.hp-dash-* / .hp-panel) — the member dashboard hub +
   the content panels every dashboard sub-page can sit in. CSP-safe.
   ─────────────────────────────────────────────────────────────────── */
.hp-crumbs { font-family: var(--font-head, 'Cinzel', serif); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-dim); margin: 0 0 var(--sp-4); }
.hp-crumbs a { color: var(--text-dim); text-decoration: none; }
.hp-crumbs a:hover { color: var(--gold-bright); }

/* Welcome hero */
.hp-dash-hero {
  display: flex; align-items: center; gap: var(--sp-5); flex-wrap: wrap;
  padding: var(--sp-6); border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(232,123,30,0.10), transparent 55%), var(--bg-3);
  border: 1px solid var(--border-strong); border-left: 3px solid var(--fire);
}
.hp-dash-hero__avatar {
  width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  font-family: var(--font-display, 'Cinzel Decorative', serif); font-size: 2.3rem; color: #1a1206;
  background: linear-gradient(135deg, var(--gold-bright), var(--fire)); border: 2px solid var(--border-strong);
  overflow: hidden;
}
.hp-dash-hero__avatar img { width: 100%; height: 100%; object-fit: cover; }
.hp-dash-hero__body { flex: 1 1 220px; min-width: 0; }
.hp-dash-hero__welcome { font-family: var(--font-display, 'Cinzel Decorative', serif); font-size: clamp(1.5rem, 4vw, 2.1rem); color: var(--text-bright); margin: 0; }
.hp-dash-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin-top: var(--sp-3); color: var(--text-dim); font-size: 0.95rem; }
.hp-dash-hero__cta { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

/* Pills */
.hp-pill { display: inline-flex; align-items: center; padding: 0.28rem 0.75rem; border-radius: var(--radius-pill); font-family: var(--font-head, 'Cinzel', serif); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; }
.hp-pill--role  { background: linear-gradient(135deg, var(--fire), var(--fire-deep)); color: #1a1206; }
.hp-pill--title { background: rgba(123,45,139,0.22); color: #d9a8e6; border: 1px solid rgba(123,45,139,0.5); }
.hp-pill--good  { background: var(--success-soft); color: var(--success); border: 1px solid rgba(111,174,127,0.4); }
.hp-pill--muted { background: var(--bg-2); color: var(--text-dim); border: 1px solid var(--border-strong); }

/* Ghost button (CSP-safe dashboard action) */
.hp-btn {
  display: inline-flex; align-items: center; gap: 0.4ch; cursor: pointer;
  font-family: var(--font-head, 'Cinzel', serif); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.55rem 1rem; border-radius: var(--radius); text-decoration: none;
  border: 1px solid var(--border-strong); background: var(--bg-2); color: var(--text-bright);
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.hp-btn:hover { border-color: var(--gold); color: var(--gold-bright); }
.hp-btn--primary { background: linear-gradient(135deg, var(--fire), var(--fire-deep)); border-color: rgba(255,200,120,0.4); color: #1a1206; }
.hp-btn--primary:hover { filter: brightness(1.08); color: #1a1206; }

/* Mode bar */
.hp-dash-mode {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap;
  padding: var(--sp-4) var(--sp-5); margin-top: var(--sp-5);
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.hp-dash-mode__label { font-family: var(--font-head, 'Cinzel', serif); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); }
.hp-dash-mode__label strong { color: var(--gold-bright); }
.hp-dash-mode form { margin: 0; }

/* Content panel (used by the First-Banner card + every sub-page section) */
.hp-panel { background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-5); }
.hp-panel--mt { margin-top: var(--sp-5); }
.hp-panel__head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.hp-panel__title { font-family: var(--font-head, 'Cinzel', serif); font-size: 1.15rem; color: var(--text-bright); margin: 0; }
.hp-panel__sub { color: var(--text-dim); font-size: 0.92rem; margin: 0 0 var(--sp-3); }

/* Checklist (First Banner / starter loop) */
.hp-checklist { list-style: none; padding: 0; margin: var(--sp-3) 0 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.hp-checklist__item { display: flex; align-items: center; gap: var(--sp-3); }
.hp-checklist__check { width: 1.3em; height: 1.3em; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border-strong); color: var(--text-dim); font-size: 0.8em; }
.hp-checklist__check.is-done { background: var(--success-soft); border-color: var(--success); color: var(--success); }
.hp-checklist a { color: var(--text); text-decoration: none; }
.hp-checklist a:hover { color: var(--gold-bright); }
.hp-checklist a.is-done { color: var(--text-dim); text-decoration: line-through; }

/* Module grid + cards */
.hp-dash-section { margin-top: var(--sp-7); }
.hp-dash-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); border-bottom: 1px solid var(--border); padding-bottom: var(--sp-3); margin-bottom: var(--sp-4); }
.hp-dash-section__title { font-family: var(--font-head, 'Cinzel', serif); font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin: 0; }
.hp-dash-section--fire .hp-dash-section__title { color: var(--fire); }
.hp-dash-section--purple .hp-dash-section__title { color: #c98fd6; }
.hp-dash-section__count { font-size: 0.78rem; color: var(--text-dim); }
.hp-dash-grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
@media (min-width: 600px) { .hp-dash-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .hp-dash-grid { grid-template-columns: repeat(3, 1fr); } }
.hp-dash-card {
  display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-5);
  background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius-lg);
  text-decoration: none; transition: transform var(--t-fast), border-color var(--t-fast);
}
.hp-dash-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.hp-dash-card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.hp-dash-card__title { font-family: var(--font-head, 'Cinzel', serif); font-size: 1.05rem; color: var(--text-bright); }
.hp-dash-card__tag { font-family: var(--font-head, 'Cinzel', serif); font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); border: 1px solid var(--border-strong); border-radius: var(--radius-pill); padding: 0.1rem 0.5rem; }
.hp-dash-card__desc { font-size: 0.88rem; color: var(--text-dim); line-height: 1.5; flex: 1; margin: 0; }
.hp-dash-card__arrow { color: var(--gold); align-self: flex-end; font-size: 1.1rem; }
.hp-dash-foot { text-align: center; color: var(--text-dim); font-size: 0.85rem; font-style: italic; margin-top: var(--sp-6); }

/* Simple definition list / stat rows for sub-pages */
.hp-deflist { display: grid; grid-template-columns: max-content 1fr; gap: var(--sp-2) var(--sp-5); margin: 0; }
.hp-deflist dt { color: var(--text-dim); font-size: 0.85rem; }
.hp-deflist dd { margin: 0; color: var(--text-bright); }

@media (prefers-reduced-motion: reduce) {
  .hp-dash-card { transition: none !important; }
}

/* ── /dashboard/points — ledger amount coloring (money in vs out) ── */
.dpts-earn  { color: var(--success); font-weight: 600; }
.dpts-spend { color: var(--danger); font-weight: 600; }

/* ── /dashboard/my-requests — request rows + "start new" picker (Phase 47) ── */
.hp-mr-pill--bad { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(201, 90, 90, 0.4); }
.hp-mr-list { display: flex; flex-direction: column; gap: var(--sp-4); }
.hp-mr-item { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-4) var(--sp-5); background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.hp-mr-item__head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-3); }
.hp-mr-item__title { font-family: var(--font-head, 'Cinzel', serif); font-size: 1.1rem; color: var(--text-bright); margin: 0; }
.hp-mr-item__when { margin: 0; font-size: 0.82rem; color: var(--text-dim); }
.hp-mr-item__summary { margin: var(--sp-1) 0 0; color: var(--text); line-height: 1.5; }
.hp-mr-item__reason { margin: var(--sp-1) 0 0; padding: var(--sp-3) var(--sp-4); background: var(--danger-soft); border: 1px solid rgba(201, 90, 90, 0.35); border-radius: var(--radius); color: var(--text-bright); font-size: 0.92rem; line-height: 1.5; }
.hp-mr-item__reason strong { color: var(--danger); }
.hp-mr-item__form { margin: var(--sp-2) 0 0; }
.hp-mr-new { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.hp-mr-new__item { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.hp-mr-new__copy { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; flex: 1 1 260px; }
.hp-mr-new__label { font-family: var(--font-head, 'Cinzel', serif); font-size: 1rem; color: var(--text-bright); }
.hp-mr-new__desc { font-size: 0.88rem; color: var(--text-dim); line-height: 1.45; }

/* ═══════════════════════════════════════════════════════════════════
   /dashboard/passport — Phase 47 revamp, page-specific rules.

   CSP-safe: per-item accent colors arrive via data-accent="#hex"
   (public/js/main.js sets --accent on the element). With no JS the
   styles fall back to gold. No inline styles / <style> anywhere.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Passport ID card (banner + avatar + name) ── */
.hp-passport-id { padding: 0; overflow: hidden; }
.hp-passport-id__banner {
  height: 150px;
  background: linear-gradient(135deg, var(--accent, var(--gold)), var(--bg-3) 85%);
  position: relative;
}
.hp-passport-id__banner-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hp-passport-id__row {
  display: flex;
  align-items: flex-end;
  gap: var(--sp-4);
  padding: 0 var(--sp-5) var(--sp-5);
  margin-top: -44px;
}
.hp-passport-id__avatar {
  width: 92px;
  height: 92px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 3px solid var(--bg-3);
  background: var(--bg-2);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hp-passport-id__avatar img { width: 100%; height: 100%; object-fit: cover; }
.hp-passport-id__avatar-initial {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 2.2rem;
  color: var(--gold);
}
.hp-passport-id__id { padding-bottom: var(--sp-1); min-width: 0; }
.hp-passport-id__name {
  font-family: var(--font-head, 'Cinzel', serif);
  font-size: 1.4rem;
  color: var(--text-bright);
  margin: 0 0 var(--sp-2);
}
.hp-passport-id__sub { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0; }

/* ── Profile picture & banner upload ── */
.hp-passport-img-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .hp-passport-img-grid { grid-template-columns: 1fr 1fr; } }
.hp-passport-img {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-4);
}
.hp-passport-img__title {
  font-family: var(--font-head, 'Cinzel', serif);
  font-size: 0.95rem;
  color: var(--gold);
  margin: 0 0 var(--sp-3);
}
.hp-passport-img__current,
.hp-passport-img__pending {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}
.hp-passport-img__none { padding: var(--sp-2) 0; }
.hp-passport-img__preview {
  max-width: 96px;
  max-height: 64px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  object-fit: cover;
}
.hp-passport-img__form { max-width: none; gap: var(--sp-3); }
.hp-passport-img__actions { display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; }
.hp-passport-img__remove { margin: 0; }

/* ── Rank ── */
.hp-passport-rank {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent, var(--gold));
  border-radius: var(--radius);
  padding: var(--sp-4);
}
.hp-passport-rank__icon { font-size: 2.4rem; line-height: 1; color: var(--accent, var(--gold)); }
.hp-passport-rank__info { min-width: 0; }
.hp-passport-rank__label {
  font-family: var(--font-head, 'Cinzel', serif);
  color: var(--text-bright);
  margin: 0 0 var(--sp-1);
}
.hp-passport-rank__desc { color: var(--text-dim); margin: 0; font-size: 0.92rem; }

/* ── Badge + title cards ── */
.hp-passport-grid { align-items: stretch; }

.hp-passport-badge {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent, var(--gold));
  border-radius: var(--radius);
  padding: var(--sp-4);
  text-align: center;
}
.hp-passport-badge.is-pinned { box-shadow: 0 0 0 1px var(--accent, var(--gold)) inset; }
.hp-passport-badge.is-locked { opacity: 0.62; border-top-color: var(--border-strong); }
.hp-passport-badge__icon { font-size: 2rem; line-height: 1; color: var(--accent, var(--gold)); }
.hp-passport-badge.is-locked .hp-passport-badge__icon { color: var(--text-dim); }
.hp-passport-badge__info { flex: 1; min-width: 0; }
.hp-passport-badge__label {
  font-family: var(--font-head, 'Cinzel', serif);
  font-size: 0.98rem;
  color: var(--text-bright);
  margin: 0 0 var(--sp-1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.hp-passport-badge__desc { color: var(--text-dim); font-size: 0.88rem; margin: 0; }
.hp-passport-badge__reason { color: var(--text-dim); font-size: 0.85rem; margin: var(--sp-1) 0 0; }
.hp-passport-badge__action { margin: var(--sp-2) 0 0; }

.hp-passport-title {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent, var(--gold));
  border-radius: var(--radius);
  padding: var(--sp-4);
}
.hp-passport-title.is-equipped { box-shadow: 0 0 0 1px var(--accent, var(--gold)) inset; }
.hp-passport-title__label {
  font-family: var(--font-head, 'Cinzel', serif);
  font-size: 1.05rem;
  color: var(--accent, var(--gold));
  margin: 0 0 var(--sp-1);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.hp-passport-title__desc { color: var(--text-dim); font-size: 0.9rem; margin: 0; flex: 1; }
.hp-passport-title__action { margin: var(--sp-2) 0 0; }

/* ───────────────────────────────────────────────────────────────────
   /dashboard/notifications — per-user email preferences (Phase 47)
   Page-specific only; reuses the shared kit (.hp-panel/.hp-pill/.hp-btn).
   Namespaced .hp-notif-* so nothing leaks. CSP-safe (classes only).
   (Lives here, not in _dash-notifications.css, because the layout only
    links main.css + revamp.css — partials are not bundled/served.)
   ─────────────────────────────────────────────────────────────────── */
.hp-notif-form { margin: 0; }

.hp-notif-list {
  list-style: none;
  margin: var(--sp-4) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

/* A single preference row: control on the left, copy on the right. */
.hp-notif-row {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--t-fast);
}
.hp-notif-row:hover { border-color: var(--border-strong); }

/* The toggle control */
.hp-notif-toggle {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin-top: 0.15rem;
}
.hp-notif-checkbox {
  position: absolute;
  width: 44px;
  height: 24px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.hp-notif-switch {
  display: inline-block;
  width: 44px;
  height: 24px;
  border-radius: var(--radius-pill);
  background: var(--bg-3);
  border: 1px solid var(--border-strong);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.hp-notif-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: transform var(--t-fast), background var(--t-fast);
}
.hp-notif-checkbox:checked + .hp-notif-switch {
  background: var(--success-soft);
  border-color: var(--success);
}
.hp-notif-checkbox:checked + .hp-notif-switch::after {
  transform: translateX(20px);
  background: var(--success);
}
.hp-notif-checkbox:focus-visible + .hp-notif-switch {
  outline: none;
  box-shadow: 0 0 0 3px rgba(232, 123, 30, 0.28);
}

/* Row copy */
.hp-notif-body { min-width: 0; flex: 1; }
.hp-notif-name {
  display: block;
  font-family: var(--font-head, 'Cinzel', serif);
  font-size: 1rem;
  color: var(--text-bright);
  cursor: pointer;
}
.hp-notif-desc {
  margin: var(--sp-2) 0 0;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.5;
}
.hp-notif-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}
.hp-notif-key {
  font-size: 0.72rem;
  color: var(--text-dim);
  opacity: 0.85;
}

/* Locked (always-on) rows */
.hp-notif-row--locked {
  background: var(--bg-3);
  border-style: dashed;
  border-color: var(--border-strong);
}
.hp-notif-lock {
  flex: 0 0 auto;
  font-size: 1.1rem;
  line-height: 1.4;
  margin-top: 0.1rem;
  filter: grayscale(0.3);
}
.hp-notif-row--locked .hp-notif-name { cursor: default; }

/* Misc */
.hp-notif-actions { margin-top: var(--sp-5); }
.hp-notif-empty { display: block; }

@media (prefers-reduced-motion: reduce) {
  .hp-notif-row,
  .hp-notif-switch,
  .hp-notif-switch::after { transition: none !important; }
}

/* ═══ PHASE 47 — DASHBOARD PAGE-SPECIFIC CSS (merged from per-page files) ═══ */

/* ---- _dash-contact-history.css ---- */
/* ═══════════════════════════════════════════════════════════════════
   Contact History — /dashboard/contact-history
   Page-specific tweaks only. Layout/cards/pills/stats/empty come from
   the shared Phase 47 dashboard kit in revamp.css.
   ═══════════════════════════════════════════════════════════════════ */

/* "When" timestamp — dimmer, tabular so columns line up. */
.hp-ch-when {
  color: var(--text-dim);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Non-routed recipient (general team message). */
.hp-ch-team {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* Message excerpt cell — soft, readable, never too wide. */
.hp-ch-msg {
  color: var(--text-dim);
  max-width: 38ch;
}

/* Helper line under the table. */
.hp-ch-foot {
  margin: var(--sp-3) 0 0;
  color: var(--text-dim);
  font-size: 0.85rem;
  font-style: italic;
}

/* ---- _dash-kits.css ---- */
/* ═══════════════════════════════════════════════════════════════════
   /dashboard/kits — player-facing Game Kits (Phase 47 revamp)
   Page-specific bits only; reuses the shared dashboard kit
   (.hp-panel / .hp-pill / .hp-btn / .hp-deflist / .hp-card-grid).
   ─────────────────────────────────────────────────────────────────── */

/* "Before you claim" helper list */
.hp-kit-howto__list {
  list-style: none;
  margin: var(--sp-2) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.hp-kit-howto__list li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.55;
}
.hp-kit-howto__list li::before {
  content: "\2726";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--fire);
}
.hp-kit-howto__list strong { color: var(--text-bright); }

/* Kit cards: each kit sits in its own .hp-panel, laid out as a column so
   the action row pins to the bottom for a tidy grid. */
.hp-kit-grid { margin-top: var(--sp-6); }
.hp-kit {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.hp-kit__meta { margin-top: var(--sp-1); }
.hp-kit__actions { margin-top: auto; padding-top: var(--sp-2); }
.hp-kit__form { margin: 0; }
.hp-kit__form .hp-btn--primary { width: 100%; justify-content: center; }

/* Disabled / unavailable action button (cooldown, sold out, etc.) */
.hp-kit__btn--off {
  width: 100%;
  justify-content: center;
  cursor: not-allowed;
  opacity: 0.7;
}
.hp-kit__btn--off:hover {
  border-color: var(--border-strong);
  color: var(--text-bright);
}

/* ---- _dash-my-requests.css ---- */
/* ═══════════════════════════════════════════════════════════════════
   /dashboard/my-requests — page-specific bits (Phase 47 revamp)
   Reuses the dashboard kit (.hp-panel / .hp-form / .hp-pill / .hp-btn
   / .hp-empty). Only the request-list rows + the "start new" list and a
   "not approved" status pill need their own rules. CSP-safe; no inline
   styles. Namespaced .hp-mr-*.
   ─────────────────────────────────────────────────────────────────── */

/* Status pill variant for rejected requests (kit has good/muted only). */
.hp-mr-pill--bad {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(201, 90, 90, 0.4);
}

/* List of the member's own requests. */
.hp-mr-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.hp-mr-item {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.hp-mr-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.hp-mr-item__title {
  font-family: var(--font-head, 'Cinzel', serif);
  font-size: 1.1rem;
  color: var(--text-bright);
  margin: 0;
}

.hp-mr-item__when {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.hp-mr-item__summary {
  margin: var(--sp-1) 0 0;
  color: var(--text);
  line-height: 1.5;
}

.hp-mr-item__reason {
  margin: var(--sp-1) 0 0;
  padding: var(--sp-3) var(--sp-4);
  background: var(--danger-soft);
  border: 1px solid rgba(201, 90, 90, 0.35);
  border-radius: var(--radius);
  color: var(--text-bright);
  font-size: 0.92rem;
  line-height: 1.5;
}
.hp-mr-item__reason strong { color: var(--danger); }

.hp-mr-item__form {
  margin: var(--sp-2) 0 0;
}

/* "Start a new request" picker list. */
.hp-mr-new {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.hp-mr-new__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.hp-mr-new__copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1 1 260px;
}

.hp-mr-new__label {
  font-family: var(--font-head, 'Cinzel', serif);
  font-size: 1rem;
  color: var(--text-bright);
}

.hp-mr-new__desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.45;
}

/* ---- _dash-notifications.css ---- */
/* ═══════════════════════════════════════════════════════════════════
   /dashboard/notifications — per-user email preferences (Phase 47)

   Page-specific only. The page otherwise reuses the shared dashboard kit
   (.hp-panel / .hp-pill / .hp-btn / .hp-empty / .hp-form__actions).
   Namespaced .hp-notif-* so nothing leaks. Fully CSP-safe (classes only).
   ─────────────────────────────────────────────────────────────────── */

.hp-notif-form { margin: 0; }

.hp-notif-list {
  list-style: none;
  margin: var(--sp-4) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

/* A single preference row: control on the left, copy on the right. */
.hp-notif-row {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--t-fast);
}
.hp-notif-row:hover { border-color: var(--border-strong); }

/* ── The toggle control ── */
.hp-notif-toggle {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin-top: 0.15rem;
}
/* Keep the real checkbox functional + focusable, but visually hidden. */
.hp-notif-checkbox {
  position: absolute;
  width: 44px;
  height: 24px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.hp-notif-switch {
  display: inline-block;
  width: 44px;
  height: 24px;
  border-radius: var(--radius-pill);
  background: var(--bg-3);
  border: 1px solid var(--border-strong);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.hp-notif-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: transform var(--t-fast), background var(--t-fast);
}
.hp-notif-checkbox:checked + .hp-notif-switch {
  background: var(--success-soft);
  border-color: var(--success);
}
.hp-notif-checkbox:checked + .hp-notif-switch::after {
  transform: translateX(20px);
  background: var(--success);
}
.hp-notif-checkbox:focus-visible + .hp-notif-switch {
  outline: none;
  box-shadow: 0 0 0 3px rgba(232, 123, 30, 0.28);
}

/* ── Row copy ── */
.hp-notif-body { min-width: 0; flex: 1; }
.hp-notif-name {
  display: block;
  font-family: var(--font-head, 'Cinzel', serif);
  font-size: 1rem;
  color: var(--text-bright);
  cursor: pointer;
}
.hp-notif-desc {
  margin: var(--sp-2) 0 0;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.5;
}
.hp-notif-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}
.hp-notif-key {
  font-size: 0.72rem;
  color: var(--text-dim);
  opacity: 0.85;
}

/* ── Locked (always-on) rows ── */
.hp-notif-row--locked {
  background: var(--bg-3);
  border-style: dashed;
  border-color: var(--border-strong);
}
.hp-notif-lock {
  flex: 0 0 auto;
  font-size: 1.1rem;
  line-height: 1.4;
  margin-top: 0.1rem;
  filter: grayscale(0.3);
}
.hp-notif-row--locked .hp-notif-name { cursor: default; }

/* ── Misc ── */
.hp-notif-actions { margin-top: var(--sp-5); }
.hp-notif-empty { display: block; }

@media (prefers-reduced-motion: reduce) {
  .hp-notif-row,
  .hp-notif-switch,
  .hp-notif-switch::after { transition: none !important; }
}

/* ---- _dash-passport.css ---- */
/* ═══════════════════════════════════════════════════════════════════
   /dashboard/passport — Phase 47 revamp, page-specific rules.

   CSP-safe: per-item accent colors arrive via data-accent="#hex"
   (public/js/main.js sets --accent on the element). With no JS the
   styles fall back to gold. No inline styles / <style> anywhere.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Passport ID card (banner + avatar + name) ── */
.hp-passport-id { padding: 0; overflow: hidden; }
.hp-passport-id__banner {
  height: 150px;
  background: linear-gradient(135deg, var(--accent, var(--gold)), var(--bg-3) 85%);
  position: relative;
}
.hp-passport-id__banner-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hp-passport-id__row {
  display: flex;
  align-items: flex-end;
  gap: var(--sp-4);
  padding: 0 var(--sp-5) var(--sp-5);
  margin-top: -44px;
}
.hp-passport-id__avatar {
  width: 92px;
  height: 92px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 3px solid var(--bg-3);
  background: var(--bg-2);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hp-passport-id__avatar img { width: 100%; height: 100%; object-fit: cover; }
.hp-passport-id__avatar-initial {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 2.2rem;
  color: var(--gold);
}
.hp-passport-id__id { padding-bottom: var(--sp-1); min-width: 0; }
.hp-passport-id__name {
  font-family: var(--font-head, 'Cinzel', serif);
  font-size: 1.4rem;
  color: var(--text-bright);
  margin: 0 0 var(--sp-2);
}
.hp-passport-id__sub { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0; }

/* ── Profile picture & banner upload ── */
.hp-passport-img-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .hp-passport-img-grid { grid-template-columns: 1fr 1fr; } }
.hp-passport-img {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-4);
}
.hp-passport-img__title {
  font-family: var(--font-head, 'Cinzel', serif);
  font-size: 0.95rem;
  color: var(--gold);
  margin: 0 0 var(--sp-3);
}
.hp-passport-img__current,
.hp-passport-img__pending {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}
.hp-passport-img__none { padding: var(--sp-2) 0; }
.hp-passport-img__preview {
  max-width: 96px;
  max-height: 64px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  object-fit: cover;
}
.hp-passport-img__form { max-width: none; gap: var(--sp-3); }
.hp-passport-img__actions { display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; }
.hp-passport-img__remove { margin: 0; }

/* ── Rank ── */
.hp-passport-rank {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent, var(--gold));
  border-radius: var(--radius);
  padding: var(--sp-4);
}
.hp-passport-rank__icon { font-size: 2.4rem; line-height: 1; color: var(--accent, var(--gold)); }
.hp-passport-rank__info { min-width: 0; }
.hp-passport-rank__label {
  font-family: var(--font-head, 'Cinzel', serif);
  color: var(--text-bright);
  margin: 0 0 var(--sp-1);
}
.hp-passport-rank__desc { color: var(--text-dim); margin: 0; font-size: 0.92rem; }

/* ── Badge + title cards ── */
.hp-passport-grid { align-items: stretch; }

.hp-passport-badge {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent, var(--gold));
  border-radius: var(--radius);
  padding: var(--sp-4);
  text-align: center;
}
.hp-passport-badge.is-pinned { box-shadow: 0 0 0 1px var(--accent, var(--gold)) inset; }
.hp-passport-badge.is-locked { opacity: 0.62; border-top-color: var(--border-strong); }
.hp-passport-badge__icon { font-size: 2rem; line-height: 1; color: var(--accent, var(--gold)); }
.hp-passport-badge.is-locked .hp-passport-badge__icon { color: var(--text-dim); }
.hp-passport-badge__info { flex: 1; min-width: 0; }
.hp-passport-badge__label {
  font-family: var(--font-head, 'Cinzel', serif);
  font-size: 0.98rem;
  color: var(--text-bright);
  margin: 0 0 var(--sp-1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.hp-passport-badge__desc { color: var(--text-dim); font-size: 0.88rem; margin: 0; }
.hp-passport-badge__reason { color: var(--text-dim); font-size: 0.85rem; margin: var(--sp-1) 0 0; }
.hp-passport-badge__action { margin: var(--sp-2) 0 0; }

.hp-passport-title {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent, var(--gold));
  border-radius: var(--radius);
  padding: var(--sp-4);
}
.hp-passport-title.is-equipped { box-shadow: 0 0 0 1px var(--accent, var(--gold)) inset; }
.hp-passport-title__label {
  font-family: var(--font-head, 'Cinzel', serif);
  font-size: 1.05rem;
  color: var(--accent, var(--gold));
  margin: 0 0 var(--sp-1);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.hp-passport-title__desc { color: var(--text-dim); font-size: 0.9rem; margin: 0; flex: 1; }
.hp-passport-title__action { margin: var(--sp-2) 0 0; }

/* ---- _dash-permissions.css ---- */
/* ═══════════════════════════════════════════════════════════════════
   /dashboard/what-can-i-do — "What Can I Do?" permission list
   Page-specific rules only; reuses the .hp-panel / .hp-pill kit.
   CSP-safe (classes only). Namespaced .hp-perm-*.
   ─────────────────────────────────────────────────────────────────── */

/* Locked tier panels read as muted/disabled but still legible. */
.hp-perm-panel.is-locked { opacity: 0.78; }

/* Capability list inside each tier panel */
.hp-perm-list {
  list-style: none;
  margin: var(--sp-3) 0 0;
  padding: 0;
  display: grid;
  gap: var(--sp-2);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .hp-perm-list { grid-template-columns: repeat(2, 1fr); }
}

.hp-perm-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: 0.55rem 0.7rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  line-height: 1.45;
}
.hp-perm-item.is-locked { color: var(--text-dim); }

/* The leading check / lock marker */
.hp-perm-mark {
  flex-shrink: 0;
  width: 1.4em;
  height: 1.4em;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.8em;
  margin-top: 0.05em;
}
.hp-perm-mark--yes {
  background: var(--success-soft);
  border: 1px solid var(--success);
  color: var(--success);
}
.hp-perm-mark--lock {
  background: var(--bg-3);
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
}

.hp-perm-label {
  color: var(--text);
  font-size: 0.92rem;
}
.hp-perm-item.is-locked .hp-perm-label { color: var(--text-dim); }

/* Footnote panel link */
.hp-perm-note { margin: 0; }
.hp-perm-note a { color: var(--gold-bright); text-decoration: none; }
.hp-perm-note a:hover { text-decoration: underline; }

/* ---- _dash-points.css ---- */
/* ═══════════════════════════════════════════════════════════════════
   /dashboard/points — Your Bastage Bucks (Phase 47 revamp)
   Page-specific bits only; the wallet uses the shared .hp-stats kit and
   the ledger uses the legacy .data-table. CSP-safe (no inline styles).
   ─────────────────────────────────────────────────────────────────── */

/* Ledger amount coloring — money in vs money out. */
.dpts-earn  { color: var(--success); font-weight: 600; }
.dpts-spend { color: var(--danger); font-weight: 600; }

/* ---- _dash-profile.css ---- */
/* ═══════════════════════════════════════════════════════════════════
   /dashboard/profile — Phase 47 revamp
   Page-specific additions only. The form + panels reuse the shared
   dashboard kit (.hp-panel, .hp-form, .hp-deflist, .hp-pill, .hp-btn)
   from revamp.css; the rules below cover the two genuinely page-specific
   bits: the read-only Discord facts and the danger-zone button.
   ─────────────────────────────────────────────────────────────────── */

/* Read-only Discord facts — give the values a subtle "system value" feel
   so they read as locked, not editable. Roomier rows than the base list. */
.hp-profile-ro { row-gap: var(--sp-3); }
.hp-profile-ro dd {
  font-family: var(--font-body, 'Crimson Pro', serif);
  color: var(--text);
  word-break: break-word;
}

/* Danger zone — a clearly-different, lower-key red treatment so it never
   competes with the primary "Save profile" action above it. */
.hp-profile-danger {
  border-color: rgba(201, 90, 90, 0.4);
  border-left: 3px solid var(--danger);
}
.hp-profile-danger .hp-panel__title { color: var(--danger); }
.hp-profile-danger__btn {
  border-color: rgba(201, 90, 90, 0.5);
  color: #e89b9b;
}
.hp-profile-danger__btn:hover {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: #f3c2c2;
}

/* ---- _dash-rpg-character.css ---- */
/* ═══════════════════════════════════════════════════════════════════
   _dash-rpg-character.css — page-specific rules for /dashboard/rpg/*
   (the RPG character sheet). CSP-safe: every dynamic per-item color is
   delivered via data-accent="#hex" (public/js/main.js sets --accent).
   Reuses the dashboard kit (.hp-panel / .hp-form / .hp-pill / .hp-btn);
   only genuinely page-specific styling lives here, namespaced .hp-rpg-*.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Rarity pill: background tinted by the catalog's rarity color ── */
.hp-rpg-rarity {
  background: var(--accent, var(--gold));
  color: #0c0c0c;
}

/* ── Item / pet / spell thumbnails ── */
.hp-rpg-thumb {
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-strong, #2c2624);
  background: #0c0a09;
  flex: 0 0 auto;
}
.hp-rpg-thumb--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-2, #1a1614);
  color: var(--text-dim, #6b6664);
}
.hp-rpg-thumb--40 { width: 40px; height: 40px; }
.hp-rpg-thumb--48 { width: 48px; height: 48px; }
.hp-rpg-thumb--56 { width: 56px; height: 56px; }
.hp-rpg-thumb--64 { width: 64px; height: 64px; }

/* ── Hero header: theme-color accent ── */
.hp-rpg-hero {
  border-left: 4px solid var(--accent, var(--gold));
  padding-left: 14px;
}
.hp-rpg-hero__name { display: flex; align-items: center; gap: 10px; }
.hp-rpg-hero__avatar {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid var(--accent, var(--gold));
  vertical-align: middle;
}
.hp-rpg-hero__xp { margin-top: 8px; }
.hp-rpg-hero__xptext { margin-top: 6px; }

/* ── XP bar fill: stepped widths (CSP-safe, no inline style) ── */
.hp-rpg-xpfill--0   { width: 0%; }
.hp-rpg-xpfill--5   { width: 5%; }
.hp-rpg-xpfill--10  { width: 10%; }
.hp-rpg-xpfill--15  { width: 15%; }
.hp-rpg-xpfill--20  { width: 20%; }
.hp-rpg-xpfill--25  { width: 25%; }
.hp-rpg-xpfill--30  { width: 30%; }
.hp-rpg-xpfill--35  { width: 35%; }
.hp-rpg-xpfill--40  { width: 40%; }
.hp-rpg-xpfill--45  { width: 45%; }
.hp-rpg-xpfill--50  { width: 50%; }
.hp-rpg-xpfill--55  { width: 55%; }
.hp-rpg-xpfill--60  { width: 60%; }
.hp-rpg-xpfill--65  { width: 65%; }
.hp-rpg-xpfill--70  { width: 70%; }
.hp-rpg-xpfill--75  { width: 75%; }
.hp-rpg-xpfill--80  { width: 80%; }
.hp-rpg-xpfill--85  { width: 85%; }
.hp-rpg-xpfill--90  { width: 90%; }
.hp-rpg-xpfill--95  { width: 95%; }
.hp-rpg-xpfill--100 { width: 100%; }

/* ── "No character yet" banner ── */
.hp-rpg-newbanner {
  background: #2a1f0a;
  border-color: #5a3f0a;
}
.hp-rpg-newbanner__cta { margin-left: 8px; }

/* ── Section sub-headings (formerly .cap-tier-title in <section>) ── */
.hp-rpg-subhead {
  font-family: var(--font-head, 'Cinzel', serif);
  color: var(--text-bright);
  font-size: 1rem;
  margin: var(--sp-4, 1rem) 0 var(--sp-3, 0.75rem);
}
.hp-rpg-progress { color: var(--text-dim); margin: 0 0 var(--sp-3, 0.75rem); }

/* ── Stat callout grid ── */
.hp-rpg-stats {
  display: grid;
  gap: var(--sp-3, 0.75rem);
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}
.hp-rpg-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: var(--sp-3, 0.75rem);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  text-align: center;
}
.hp-rpg-stat__label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.hp-rpg-stat__num {
  font-family: var(--font-display, var(--font-head));
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
}

/* ── Generic card grid + cards (items, pets, skills, spells, quests) ── */
.hp-rpg-grid {
  display: grid;
  gap: var(--sp-4, 1rem);
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.hp-rpg-card {
  padding: var(--sp-4, 1rem);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
}
.hp-rpg-card--locked { opacity: 0.6; }
.hp-rpg-card--row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hp-rpg-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hp-rpg-card__body { flex: 1; min-width: 0; }
.hp-rpg-card__desc {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: var(--sp-2, 0.5rem) 0 0;
}
.hp-rpg-equipped { color: var(--gold); }
.hp-rpg-inlineform { display: inline; margin-top: var(--sp-2, 0.5rem); }

/* ── Lists (equipped gear, recent events, completed quests) ── */
.hp-rpg-gear,
.hp-rpg-events {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text);
}
.hp-rpg-gear li,
.hp-rpg-events li { margin: 0.2rem 0; }

/* ── Character form: image upload fieldsets ── */
.hp-rpg-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
}
.hp-rpg-imgfield {
  border: 1px solid var(--border-strong, #2c2624);
  padding: 10px;
  border-radius: 8px;
  margin: 8px 0;
}
.hp-rpg-imgfield__legend {
  padding: 0 6px;
  font-weight: 600;
  color: var(--gold);
}
.hp-rpg-imgfield__live {
  display: flex;
  gap: 12px;
  align-items: center;
}
.hp-rpg-imgfield__pending { margin-top: 6px; }
.hp-rpg-imgfield__upload {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.hp-rpg-imgfield__file { max-width: 320px; }
.hp-rpg-preview {
  max-height: 80px;
  border-radius: 6px;
  border: 1px solid var(--border-strong, #2c2624);
}
.hp-rpg-preview--pending { border: 1px dashed var(--gold, #c89a3a); }

/* ---- _dash-rpg.css ---- */
/* ═══════════════════════════════════════════════════════════════════
   /dashboard/rpg — legacy RPG profile fallback view (Phase 47 look)
   CSP-safe: no inline styles. Reuses the dashboard kit (.hp-panel,
   .hp-dash-hero, .hp-pill, .hp-btn, .hp-empty); only the XP bar and the
   achievement cards need page-specific rules, namespaced .hp-rpg-*.
   ─────────────────────────────────────────────────────────────────── */

/* ── XP progress bar ── */
.hp-rpg-xp {
  height: 14px;
  margin-top: var(--sp-2);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.hp-rpg-xp__fill {
  height: 100%;
  width: 0;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--gold), var(--fire));
  transition: width var(--t-med);
}
.hp-rpg-xp__caption {
  margin: var(--sp-3) 0 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* CSP-safe fixed-step widths (view snaps the % to the nearest 5). */
.hp-rpg-xp__fill--0   { width: 0; }
.hp-rpg-xp__fill--5   { width: 5%; }
.hp-rpg-xp__fill--10  { width: 10%; }
.hp-rpg-xp__fill--15  { width: 15%; }
.hp-rpg-xp__fill--20  { width: 20%; }
.hp-rpg-xp__fill--25  { width: 25%; }
.hp-rpg-xp__fill--30  { width: 30%; }
.hp-rpg-xp__fill--35  { width: 35%; }
.hp-rpg-xp__fill--40  { width: 40%; }
.hp-rpg-xp__fill--45  { width: 45%; }
.hp-rpg-xp__fill--50  { width: 50%; }
.hp-rpg-xp__fill--55  { width: 55%; }
.hp-rpg-xp__fill--60  { width: 60%; }
.hp-rpg-xp__fill--65  { width: 65%; }
.hp-rpg-xp__fill--70  { width: 70%; }
.hp-rpg-xp__fill--75  { width: 75%; }
.hp-rpg-xp__fill--80  { width: 80%; }
.hp-rpg-xp__fill--85  { width: 85%; }
.hp-rpg-xp__fill--90  { width: 90%; }
.hp-rpg-xp__fill--95  { width: 95%; }
.hp-rpg-xp__fill--100 { width: 100%; }

/* ── Achievement grid ── */
.hp-rpg-ach-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: 1fr;
  margin-top: var(--sp-4);
}
@media (min-width: 600px)  { .hp-rpg-ach-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .hp-rpg-ach-grid { grid-template-columns: repeat(3, 1fr); } }

.hp-rpg-ach {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.hp-rpg-ach.is-locked { opacity: 0.6; }
.hp-rpg-ach.is-earned { border-color: rgba(201, 168, 76, 0.45); }
.hp-rpg-ach__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.3rem;
  color: var(--gold-bright);
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
}
.hp-rpg-ach.is-earned .hp-rpg-ach__icon {
  color: #1a1206;
  background: linear-gradient(135deg, var(--gold-bright), var(--fire));
  border-color: rgba(255, 200, 120, 0.5);
}
.hp-rpg-ach__body { min-width: 0; }
.hp-rpg-ach__title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin: 0 0 var(--sp-1);
  font-family: var(--font-head, 'Cinzel', serif);
  font-size: 1rem;
  color: var(--text-bright);
}
.hp-rpg-ach__desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-dim);
}

@media (prefers-reduced-motion: reduce) {
  .hp-rpg-xp__fill { transition: none !important; }
}

/* ---- _dash-store.css ---- */
/* ═══════════════════════════════════════════════════════════════════
   /dashboard/store — Phase 47 revamp (page-specific bits only)
   Reuses the dashboard kit: .hp-panel, .hp-card-grid, .hp-deflist,
   .hp-pill, .hp-btn, .hp-empty. CSP-safe — classes only, no inline styles.
   ─────────────────────────────────────────────────────────────────── */

/* Slightly wider min so item cards don't get cramped. */
.hp-store-grid { grid-template-columns: 1fr; }
@media (min-width: 620px) {
  .hp-store-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

/* Each item is an .hp-panel that flexes into a column so the buy
   action sits flush at the bottom of every card. */
.hp-store-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.hp-store-card.is-disabled { opacity: 0.82; }

.hp-store-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
}
.hp-store-card__title {
  font-family: var(--font-head, 'Cinzel', serif);
  font-size: 1.1rem;
  color: var(--text-bright);
  margin: 0;
}
.hp-store-card__desc {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
}
.hp-store-card__facts { margin-top: auto; }

/* Buy form + "need more" note pinned to the bottom of the card. */
.hp-store-card__buy { margin: 0; }
.hp-store-card__buy .hp-btn { width: 100%; justify-content: center; }
.hp-store-card__note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-dim);
  font-style: italic;
}
