/* =========================================================
   INVEST LIKE A WARRIOR – GOLD LACE V1
   MAIN LAYOUT & COMPONENTS
   ========================================================= */

/* ---------------------------------
   1. APP HEADER / TOP NAV
   --------------------------------- */
/* Brand emblem inside header */
.brand-emblem {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.6));
}

/* Header container */
.app-header {
  backdrop-filter: blur(16px);
  background: linear-gradient(
    to right,
    rgba(6, 7, 14, 0.9),
    rgba(19, 16, 7, 0.92)
  );
  border-bottom: 1px solid rgba(240, 212, 138, 0.18);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.75);
  position: sticky;
  top: 0;
  z-index: 20;
}

/* ---------------------------------
   1.1 — GLOBAL TOP LOGO (Main Header)
   --------------------------------- */

.app-brand-top {
  display: flex;
  justify-content: center;
  padding: 0.75rem 0 0.25rem;
}

.app-brand-top img {
  width: 180px;
  height: auto;
  object-fit: contain;
  opacity: 0.92;
  filter: drop-shadow(0 0 12px rgba(0, 0, 0, 0.55));
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.app-brand-top img:hover {
  transform: scale(1.03);
  opacity: 1;
}

.app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 0.6rem 1.25rem;
}

/* Left side: logo + product name */
.app-logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-logo {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: var(--gold-glow-soft);
}

.app-title-main {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.app-title-sub {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Right side: nav items */
.app-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-nav-link {
  position: relative;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.app-nav-link::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: -2px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
  opacity: 0;
  transform: scaleX(0.7);
  transform-origin: center;
  transition: opacity 0.16s ease-out, transform 0.16s ease-out;
}

.app-nav-link:hover {
  color: var(--gold-bright);
}
.app-nav-link--active {
  color: var(--gold-bright);
  background: radial-gradient(circle at top, rgba(240, 212, 138, 0.18), transparent 60%);
}
.app-nav-link--active::after {
  opacity: 1;
  transform: scaleX(1);
}

/* Mobile nav toggle (hidden by default) */
.app-nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(240, 212, 138, 0.4);
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  color: var(--gold-primary);
}

/* ---------------------------------
   2. PAGE LAYOUTS
   --------------------------------- */

.page {
  flex: 1;
  display: flex;
  justify-content: center;
}

.page-inner {
  width: 100%;
  max-width: var(--layout-max-width);
  padding: 1.25rem 1.25rem 2.25rem;
}

/* Dashboard 2-column layout — left narrower, right wider */
.layout-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: var(--space-12);
  align-items: start;
}

@media (max-width: 960px) {
  .layout-dashboard {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Choose Warrior two-column layout */
.layout-choose-warrior {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: var(--space-12);
  align-items: start;
}

@media (max-width: 860px) {
  .layout-choose-warrior {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------------------------------
   3. LOGIN PAGE
   --------------------------------- */

.page-login {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.login-card {
  max-width: 440px;
  width: 100%;
  background: radial-gradient(circle at top, #171a32 0, #050509 62%);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(240, 212, 138, 0.4);
  box-shadow: 0 26px 58px rgba(0, 0, 0, 0.85);
  padding: 1.9rem 1.8rem 1.6rem;
  position: relative;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(240, 212, 138, 0.2);
  opacity: 0.5;
  pointer-events: none;
}

.login-card-header {
  text-align: center;
  margin-bottom: 1.4rem;
}

.login-card-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 0.9rem;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--gold-glow-soft);
}

.login-card-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-card-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Login form */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.login-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------------------------------
   4. DASHBOARD – ABILITY SCORES / OVERVIEW
   --------------------------------- */

.section-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-8);
}

.section-heading-row .h-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-heading-row .section-kicker {
  font-size: var(--fs-mono-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

/* Ability score grid */
.ability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--space-10);
}

/* Individual stat card */
.stat-card {
  position: relative;
  padding: var(--space-10);
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top, #191f37 0, #090a13 55%);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(240, 212, 138, 0.06), transparent 65%);
  opacity: 0;
  transition: opacity 0.16s ease-out;
  pointer-events: none;
}
.stat-card:hover::after {
  opacity: 1;
}

.stat-label {
  font-size: var(--fs-mono-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-score-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: var(--space-4);
}

.stat-score-main {
  font-family: var(--font-display);
  font-size: 2.4rem;
  letter-spacing: 0.16em;
}

.stat-score-tier {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(240, 212, 138, 0.4);
  color: var(--gold-bright);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* Progress bar (for score progress to next tier) */
.stat-progress-wrap {
  margin-top: var(--space-6);
  height: 6px;
  border-radius: 999px;
  background: radial-gradient(circle at left, #14192b 0, #05050a 80%);
  overflow: hidden;
  position: relative;
}

.stat-progress-inner {
  height: 100%;
  width: 55%; /* override with inline style as needed */
  background: linear-gradient(90deg, var(--gold-soft), var(--gold-bright));
  box-shadow: var(--gold-glow-soft);
}

/* ---------------------------------
   5. QUEST BOARD
   --------------------------------- */

.quest-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.quest-card {
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top left, #171a33 0, #050509 60%);
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

.quest-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(240, 212, 138, 0.08), transparent 65%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease-out;
}

.quest-card:hover::before {
  opacity: 1;
}

.quest-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
}

.quest-title {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.quest-meta {
  display: flex;
  gap: var(--space-4);
  font-size: var(--fs-body-sm);
  color: var(--text-muted);
}

.quest-body {
  margin-top: var(--space-4);
  font-size: var(--fs-body-md);
}

/* Quest footer with progress & CTA */
.quest-footer {
  margin-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-6);
}

/* ---------------------------------
   6. SAGE (CHAT / JOURNAL) SHELL
   --------------------------------- */

.sage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: var(--space-10);
}

@media (max-width: 960px) {
  .sage-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.sage-chat {
  padding: var(--space-10);
  background: radial-gradient(circle at top, #161a33 0, #05050a 60%);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(240, 212, 138, 0.28);
  box-shadow: var(--shadow-soft);
}

/* Chat transcript container */
.chat-log {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0.3rem;
  margin-bottom: var(--space-8);
}

.chat-message {
  margin-bottom: var(--space-4);
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(12, 15, 25, 0.9);
  border: 1px solid rgba(240, 212, 138, 0.18);
  font-size: var(--fs-body-md);
}

.chat-message--user {
  background: radial-gradient(circle at top right, rgba(240, 212, 138, 0.16), rgba(12, 15, 25, 0.9));
  border-color: rgba(240, 212, 138, 0.55);
}

/* Chat input row */
.chat-input-row {
  display: flex;
  gap: var(--space-6);
}

.chat-input-row .input {
  flex: 1 1 auto;
}

/* ---------------------------------
   7. MAP PAGE / PROGRESSION RING (LIGHT WEIGHT)
   --------------------------------- */

.map-panel {
  padding: var(--space-10);
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at top, #181a33 0, #050509 70%);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

/* Placeholder ring – you can replace with SVG later */
.map-ring {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1px dashed rgba(240, 212, 138, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-8);
  position: relative;
}

.map-ring::after {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  border: 1px solid rgba(240, 212, 138, 0.2);
}

/* ---------------------------------
   8. RESPONSIVE TWEAKS
   --------------------------------- */

@media (max-width: 720px) {
  .app-nav {
    display: none;
  }
  .app-nav.app-nav--open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 52px;
    right: 16px;
    padding: 0.75rem;
    background: rgba(6, 6, 12, 0.98);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(240, 212, 138, 0.3);
    box-shadow: var(--shadow-soft);
  }
  .app-nav-toggle {
    display: inline-flex;
  }

  .page-inner {
    padding-inline: 1rem;
  }

  .login-card {
    padding-inline: 1.2rem;
  }
}
/* ==========================
   Quest Highlight from Map
   ========================== */

.quest-highlight {
  box-shadow: 0 0 12px rgba(217, 177, 92, 0.9),
              0 0 24px rgba(217, 177, 92, 0.5);
  border-color: var(--accent);
  animation: questPulse 1.2s ease-in-out 0s 3;
}

.quest-highlight-soft {
  box-shadow: 0 0 8px rgba(217, 177, 92, 0.4);
  border-color: var(--accent-soft);
}

/* Focused Region banner in Quest header */
.focused-region-banner {
  margin-top: 6px;
  padding: 4px 10px;
  display: inline-flex;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(217, 177, 92, 0.35);
  background: rgba(217, 177, 92, 0.08);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

/* "Back from Region" button inside a quest */
.back-from-region {
  margin-left: 8px;
}

//* Pulse animation */
@keyframes questPulse {
  0% {
    transform: translateY(0);
    box-shadow: 0 0 0 rgba(217, 177, 92, 0.0);
  }
  50% {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(217, 177, 92, 0.9),
                0 0 40px rgba(217, 177, 92, 0.6);
  }
  100% {
    transform: translateY(0);
    box-shadow: 0 0 0 rgba(217, 177, 92, 0.0);
  }
}

/* ==========================
   Quest Highlight from Map
   ========================== */

.quest-highlight {
  box-shadow: 0 0 12px rgba(217, 177, 92, 0.9),
              0 0 24px rgba(217, 177, 92, 0.5);
  border-color: var(--accent);
  animation: questPulse 1.2s ease-in-out 0s 3;
}

.quest-highlight-soft {
  box-shadow: 0 0 8px rgba(217, 177, 92, 0.4);
  border-color: var(--accent-soft);
}

/* Focused Region banner in Quest header */
.focused-region-banner {
  margin-top: 6px;
  padding: 4px 10px;
  display: inline-flex;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(217, 177, 92, 0.35);
  background: rgba(217, 177, 92, 0.08);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

/* "Back from Region" button inside a quest */
.back-from-region {
  margin-left: 8px;
}

/* ---------------------------------
   15. WARRIOR CLASS ACCENT HOOKS
   --------------------------------- */

/* Defaults (in case no class is set) */
body .app-label {
  color: var(--gold-primary);
}

/* Knight – forest green tint */
body.warrior--knight {
  background-image:
    radial-gradient(circle at top, #0e2018 0, transparent 60%),
    radial-gradient(rgba(255,255,255,0.013) 1px, transparent 1px);
  background-size: 100% 100%, 22px 22px;
}
body.warrior--knight .app-label { color: #f3d493; }
body.warrior--knight .brand-emblem { filter: drop-shadow(0 0 12px rgba(78,138,108,0.8)); }
body.warrior--knight .app-header { border-bottom-color: rgba(78,138,108,0.3); }

/* Samurai – deep crimson tint */
body.warrior--samurai {
  background-image:
    radial-gradient(circle at top, #1f0c0c 0, transparent 60%),
    radial-gradient(rgba(255,255,255,0.013) 1px, transparent 1px);
  background-size: 100% 100%, 22px 22px;
}
body.warrior--samurai .app-label { color: #f29b9b; }
body.warrior--samurai .brand-emblem { filter: drop-shadow(0 0 12px rgba(178,33,33,0.8)); }
body.warrior--samurai .app-header { border-bottom-color: rgba(178,33,33,0.3); }

/* Viking – icy blue tint */
body.warrior--viking {
  background-image:
    radial-gradient(circle at top, #0a1020 0, transparent 60%),
    radial-gradient(rgba(255,255,255,0.013) 1px, transparent 1px);
  background-size: 100% 100%, 22px 22px;
}
body.warrior--viking .app-label { color: #a4c8ff; }
body.warrior--viking .brand-emblem { filter: drop-shadow(0 0 12px rgba(90,140,220,0.8)); }
body.warrior--viking .app-header { border-bottom-color: rgba(90,140,220,0.3); }

/* Ninja – deep indigo tint */
body.warrior--ninja {
  background-image:
    radial-gradient(circle at top, #090b20 0, transparent 60%),
    radial-gradient(rgba(255,255,255,0.013) 1px, transparent 1px);
  background-size: 100% 100%, 22px 22px;
}
body.warrior--ninja .app-label { color: #6de7d1; }
body.warrior--ninja .brand-emblem { filter: drop-shadow(0 0 12px rgba(47,95,191,0.8)); }
body.warrior--ninja .app-header { border-bottom-color: rgba(47,95,191,0.3); }

/* Monk – warm amber tint */
body.warrior--monk {
  background-image:
    radial-gradient(circle at top, #1a1208 0, transparent 60%),
    radial-gradient(rgba(255,255,255,0.013) 1px, transparent 1px);
  background-size: 100% 100%, 22px 22px;
}
body.warrior--monk .app-label { color: #ffda9a; }
body.warrior--monk .brand-emblem { filter: drop-shadow(0 0 12px rgba(244,139,39,0.8)); }
body.warrior--monk .app-header { border-bottom-color: rgba(244,139,39,0.3); }

/* Pirate – dark rum tint */
body.warrior--pirate {
  background-image:
    radial-gradient(circle at top, #151008 0, transparent 60%),
    radial-gradient(rgba(255,255,255,0.013) 1px, transparent 1px);
  background-size: 100% 100%, 22px 22px;
}
body.warrior--pirate .app-label { color: #9af58f; }
body.warrior--pirate .brand-emblem { filter: drop-shadow(0 0 12px rgba(154,245,143,0.7)); }
body.warrior--pirate .app-header { border-bottom-color: rgba(154,245,143,0.25); }

/* =========================================
   CHOOSE YOUR WARRIOR · LAYOUT & STYLES
   ========================================= */

.choose-warrior .card-body {
  padding: 1.75rem;
}

.choose-warrior-intro {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-bottom: 1.25rem;
  max-width: 48rem;
}

/* Main two-column layout */

.choose-warrior-layout {
  display: flex;
  gap: 2rem;
  align-items: stretch;
}

/* =========================
   LEFT SIDE · MAIN PREVIEW
   ========================= */

.warrior-main {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.warrior-main-portrait-frame {
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  background: radial-gradient(circle at top, rgba(255,255,255,0.06), transparent 60%);
}

.warrior-main-portrait {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.warrior-main-body {
  padding: 1rem 1.25rem;
  border-radius: 0.9rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.warrior-main-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.75;
  margin-bottom: 0.15rem;
}

.warrior-main-name {
  font-size: 1.4rem;
  font-weight: 600;
}

.warrior-main-tagline {
  font-size: 0.95rem;
  opacity: 0.95;
  margin-bottom: 0.5rem;
}

.warrior-main-line {
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.warrior-main-line-label {
  opacity: 0.8;
  margin-right: 0.25rem;
}

.warrior-main-line-value {
  opacity: 0.95;
}

.warrior-main-bio {
  font-size: 0.9rem;
  margin: 0.6rem 0 0.5rem;
  line-height: 1.45;
}

.warrior-main-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.warrior-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  opacity: 0.92;
  white-space: nowrap;
}

/* =========================
   RIGHT SIDE · SELECTOR
   ========================= */

.warrior-side {
  flex: 0.9;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.warrior-selector-header {
  font-size: 0.9rem;
  font-weight: 500;
}

.warrior-selector-sub {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-top: 0.1rem;
}

.warrior-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* Warrior “chips” (button cards on the right) */

.warrior-chip-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.warrior-chip {
  text-align: left;
  padding: 0.6rem 0.85rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    border-color 0.12s ease,
    background 0.12s ease;
}

.warrior-chip-emblem {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.warrior-chip-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.warrior-chip-name {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 0.88rem;
  color: var(--gold-soft);
}

.warrior-chip-pill,
.warrior-chip-subtitle {
  font-family: var(--font-body);
  font-size: 0.82rem;
  opacity: 0.6;
  font-style: italic;
}

.warrior-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  border-color: rgba(250, 204, 107, 0.25);
  background: rgba(0, 0, 0, 0.55);
}

.warrior-chip:hover .warrior-chip-emblem {
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(250, 204, 107, 0.65));
}

.warrior-chip.is-active {
  border-color: var(--accent, #facc6b);
  box-shadow:
    0 0 0 1px rgba(250, 204, 107, 0.45),
    0 12px 32px rgba(0, 0, 0, 0.45);
  background: radial-gradient(circle at top left,
    rgba(250, 204, 107, 0.15),
    rgba(0, 0, 0, 0.7) 55%);
}

.warrior-chip.is-active .warrior-chip-emblem {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(250, 204, 107, 0.8));
}

/* =========================
   SAGE PANEL & COMMIT AREA
   ========================= */

.warrior-side-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* If you already defined these for another page, you can skip/merge this block */
.sage-mini-panel {
  margin-top: 0.25rem;
  padding: 0.85rem 0.9rem;
  border-radius: 1rem;
  display: flex;
  gap: 0.65rem;
  background: linear-gradient(
    135deg,
    rgba(250, 204, 107, 0.15),
    rgba(56, 189, 248, 0.08)
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.sage-mini-avatar-wrap {
  flex-shrink: 0;
}

.sage-mini-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.7);
}

.sage-mini-copy {
  font-size: 0.8rem;
  line-height: 1.4;
}

.sage-mini-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.15rem;
}

/* Buttons */

.btn-sage-help,
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
}

.btn-sage-help {
  margin-top: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  color: inherit;
}

.btn-primary {
  background: var(--accent, #facc6b);
  color: #111;
  font-weight: 600;
  border: none;
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: inherit;
}

/* Commit block */

.warrior-commit {
  margin-top: 0.5rem;
  padding: 0.85rem 0.95rem;
  border-radius: 0.95rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.warrior-commit-label {
  font-size: 0.9rem;
  font-weight: 500;
}

.warrior-commit-text {
  font-size: 0.8rem;
  opacity: 0.9;
  margin: 0.25rem 0 0.6rem;
}

.warrior-commit .btn-primary {
  width: 100%;
  margin-bottom: 0.4rem;
}

.warrior-commit .btn-ghost {
  width: 100%;
}

/* =========================
   RESPONSIVE TWEAKS
   ========================= */

@media (max-width: 1024px) {
  .warrior-selector-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .choose-warrior .card-body {
    padding: 1.25rem;
  }

  .choose-warrior-layout {
    flex-direction: column;
  }

  .warrior-side {
    flex: 1;
  }
}

@media (max-width: 640px) {
  .warrior-main-body {
    padding: 0.9rem 0.95rem;
  }

  .warrior-selector-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .warrior-commit .btn-primary,
  .warrior-commit .btn-ghost {
    font-size: 0.78rem;
  }
}
.feature-lock-note {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  opacity: 0.85;
  line-height: 1.5;
}

.warrior-commit-note {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  opacity: 0.8;
}

/* === WARRIOR HERO CARD ======================================= */

.warrior-hero-card .card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  align-items: flex-start;
}

/* Frame for the large portrait */
.warrior-hero-portrait-frame {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 3 / 4;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 2px solid var(--accent, #f5c76b);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.7);
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Make image fill the frame responsively */
#warrior-portrait,
#warrior-main-portrait {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center top !important;
  display: block !important;
}

/* On wider screens, you can put text next to the art */
@media (min-width: 960px) {
  .warrior-hero-card .card-body {
    flex-direction: row;
    align-items: center;
  }

  .warrior-hero-portrait-frame {
    margin-right: var(--space-lg);
  }
}
/* =========================================================
   PRIMARY ATTRIBUTES — 3-chip display (Dashboard)
   ========================================================= */

.primary-attr-grid {
  display: flex;
  gap: 8px;
}

.primary-attr-chip {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  text-align: center;
  transition: border-color 0.2s;
}

.primary-attr-chip:hover {
  border-color: rgba(240,212,138,0.25);
}

.primary-attr-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.primary-attr-name {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-primary);
  line-height: 1.2;
}

.primary-attr-domain {
  font-family: var(--font-ui);
  font-size: 0.63rem;
  color: var(--text-muted);
  line-height: 1.2;
}

/* =========================================================
   POWER OBJECT CTA — Dashboard card link
   ========================================================= */

.po-cta-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(240,212,138,0.05);
  border: 1px solid rgba(240,212,138,0.2);
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s;
}

.po-cta-card:hover {
  background: rgba(240,212,138,0.1);
  border-color: rgba(240,212,138,0.4);
}

.po-cta-icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
}

.po-cta-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--gold-soft);
  font-weight: 600;
  margin-bottom: 2px;
}

.po-cta-sub {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* =========================================================
   ABILITY SCORES CARD
   ========================================================= */

.ability-card .card-header {
  align-items: flex-start;
}

.ability-note {
  opacity: 0.8;
  font-size: 0.85rem;
}

.ability-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ability-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ability-label {
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.9;
}

.ability-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ability-bar-bg {
  flex: 1;
  height: 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255,255,255,0.04);
  overflow: hidden;
  position: relative;
}

.ability-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgba(123, 218, 255, 0.9),
    rgba(221, 250, 173, 0.95)
  );
  transition: width 0.35s ease-out;
}

/* =========================================================
   ABILITY SCORES – severity tiers
   ========================================================= */

/* 0–7 = critical */
.ability-bar-fill.score-tier-low {
  background: linear-gradient(90deg, #5b1b1b, #ff5c5c); /* deep red → red */
}

/* 8–11 = caution */
.ability-bar-fill.score-tier-mid {
  background: linear-gradient(90deg, #806015, #ffd666); /* brown-gold → amber */
}

/* 12–20 = healthy */
.ability-bar-fill.score-tier-high {
  background: linear-gradient(90deg, #23583a, #6de3b6); /* deep green → mint */
}

.ability-score-text {
  min-width: 3.5rem;
  font-size: 0.85rem;
  text-align: right;
  opacity: 0.85;
}

.ability-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.ability-footer-note {
  opacity: 0.8;
}

/* Mobile tweaks */
@media (max-width: 720px) {
  .ability-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Ability Scores form layout */
.ability-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 2rem;
}

.ability-form-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ability-form-row label {
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.9;
}

.ability-form-row input[type="number"] {
  max-width: 7rem;
}

.ability-form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.ability-form-note {
  opacity: 0.8;
}

@media (max-width: 720px) {
  .ability-form-grid {
    grid-template-columns: 1fr;
  }
}
.ability-bar-fill.is-primary-stat {
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
  filter: brightness(1.15);
}

/* Base fill – fallback if no tier class is set */
.ability-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgba(123, 218, 255, 0.9),
    rgba(221, 250, 173, 0.95)
  );
  transition: width 0.35s ease-out;
}

/* Severity tiers (override base) */
.ability-bar-fill.score-tier-low {
  background: linear-gradient(90deg, #5b1b1b, #ff5c5c);
  box-shadow: 0 0 10px rgba(255, 80, 80, 0.55), 0 0 3px rgba(255, 80, 80, 0.4) inset;
}

.ability-bar-fill.score-tier-mid {
  background: linear-gradient(90deg, #806015, #ffd666);
  box-shadow: 0 0 10px rgba(255, 195, 60, 0.45), 0 0 3px rgba(255, 195, 60, 0.3) inset;
}

.ability-bar-fill.score-tier-high {
  background: linear-gradient(90deg, #23583a, #6de3b6);
  box-shadow: 0 0 10px rgba(100, 220, 175, 0.45), 0 0 3px rgba(100, 220, 175, 0.3) inset;
}

/* =========================================================
   UI PASS — HEADER, NAV, TYPOGRAPHY UPGRADES
   ========================================================= */

/* ── App label ("INVEST LIKE A WARRIOR") ── */
.app-label {
  font-family: var(--font-ui);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-primary);
  opacity: 0.75;
  line-height: 1;
}

/* ── App title (page name in header) ── */
.app-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  line-height: 1.1;
}

/* ── Brand emblem — slightly larger ── */
.brand-emblem {
  width: 46px !important;
  height: 46px !important;
}

/* ── Score bar track — taller ── */
.ability-bar-bg {
  height: 13px !important;
}

/* ── Target score ticker ── */
.ability-bar-target {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  border-radius: 2px;
  background: rgba(250, 204, 107, 0.9);
  box-shadow: 0 0 5px rgba(250, 204, 107, 0.7);
  transform: translateX(-50%);
  pointer-events: none;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.ability-bar-target.is-achieved {
  background: rgba(109, 227, 182, 0.95);
  box-shadow: 0 0 6px rgba(109, 227, 182, 0.7);
}

.ability-bar-target-label {
  position: absolute;
  bottom: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.58rem;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  color: rgba(250, 204, 107, 0.85);
  white-space: nowrap;
  line-height: 1;
}

.ability-bar-target.is-achieved .ability-bar-target-label {
  color: rgba(109, 227, 182, 0.9);
}

/* ── Card title — slightly more presence ── */
.card-title {
  font-size: 1.2rem !important;
  letter-spacing: 0.1em;
}

/* ── Header brand logo (replaces text app-label) ── */
.header-brand-logo {
  height: 18px;
  width: auto;
  display: block;
  opacity: 0.88;
  margin-bottom: 2px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

/* ── Warrior title image (hero card) ── */
.warrior-title-img {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  opacity: 0.95;
  margin-bottom: 10px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6));
}

/* ── Warrior class emblem (hero card, below title) ── */
.warrior-class-emblem {
  display: block;
  width: 180px;
  height: 180px;
  object-fit: contain;
  margin: -82px auto 16px;
  opacity: 0.9;
  filter: drop-shadow(0 0 10px rgba(240,212,138,0.3));
  transition: filter 0.3s ease;
}

/* Per-warrior emblem glow colors */
body.warrior--knight  .warrior-class-emblem { filter: drop-shadow(0 0 12px rgba(78,138,108,0.55)); }
body.warrior--samurai .warrior-class-emblem { filter: drop-shadow(0 0 12px rgba(178,33,33,0.55)); }
body.warrior--viking  .warrior-class-emblem { filter: drop-shadow(0 0 12px rgba(90,140,220,0.55)); }
body.warrior--pirate  .warrior-class-emblem { filter: drop-shadow(0 0 12px rgba(154,245,143,0.45)); }
body.warrior--ninja   .warrior-class-emblem { filter: drop-shadow(0 0 12px rgba(47,95,191,0.55)); }
body.warrior--monk    .warrior-class-emblem { filter: drop-shadow(0 0 12px rgba(244,139,39,0.55)); }

/* ── Warrior tagline — visible, styled ── */
.warrior-hero-tagline {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--gold-soft);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
  line-height: 1.4;
}

/* ── Warrior hero copy — slightly larger ── */
.warrior-hero-copy {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ── Top nav — global game-HUD styling ── */
.top-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.top-nav a {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  transition: color 0.15s, background 0.15s;
  position: relative;
  text-decoration: none;
}

.top-nav a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

/* Active / current page */
.top-nav a[aria-current="page"],
.top-nav a.is-active {
  color: var(--gold-soft);
  background: rgba(240, 212, 138, 0.07);
}

.top-nav a[aria-current="page"]::after,
.top-nav a.is-active::after {
  content: '';
  position: absolute;
  bottom: 1px;
  left: 18%;
  right: 18%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--gold-soft), transparent);
}

/* ── Header inner — slightly taller breathing room ── */
.app-header-inner {
  padding: 0.75rem 1.25rem !important;
}

/* ── Shell / content area — a touch more top padding ── */
.shell {
  padding-top: 1.5rem;
}

/* ── Warrior panel section label — more contrast ── */
.warrior-panel-section-label {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: rgba(240, 212, 138, 0.65);
}

/* ── Map region cards — hover lift ── */
.map-region {
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.map-region:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.5), 0 0 0 1px rgba(240,212,138,0.2);
}

/* ── Quest card — hover lift ── */
.quest-card {
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.quest-card:hover:not(.is-completed) {
  transform: translateY(-1px);
}

/* ── Welcome Card ── */
.welcome-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 4px;
}

.welcome-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}

.welcome-greeting {
  font-family: var(--font-display);
  font-size: 2.0rem;
  color: var(--gold-soft);
  line-height: 1.2;
}

.welcome-subline {
  font-size: 1rem;
  color: rgba(240, 212, 138, 0.5);
  margin-top: 6px;
}

.btn-logout-link {
  background: none;
  border: 1px solid rgba(240, 212, 138, 0.2);
  color: rgba(240, 212, 138, 0.5);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
  margin-top: 4px;
}
.btn-logout-link:hover {
  color: var(--gold-soft);
  border-color: rgba(240, 212, 138, 0.5);
}

.welcome-section-label {
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(240, 212, 138, 0.4);
  margin-bottom: -10px;
}

.action-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.action-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.action-icon {
  font-size: 1.15rem;
  line-height: 1.5;
  flex-shrink: 0;
}

.action-text {
  font-size: 1rem;
  color: rgba(240, 212, 138, 0.75);
  line-height: 1.5;
  text-decoration: none;
  transition: color 0.2s;
}
.action-text:hover {
  color: var(--gold-soft);
  text-decoration: underline;
}

.welcome-name-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.welcome-name-input {
  flex: 1;
  min-width: 0;
}

.btn.btn-sm {
  padding: 6px 14px;
  font-size: 0.78rem;
}


/* ============================================================
   DASHBOARD REBUILD — new layout components
   ============================================================ */

/* Left column stacker */
.dash-left {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

/* Profile card portrait — compact in narrower column */
.dash-portrait-frame {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md, 12px);
  overflow: hidden;
  background: rgba(0,0,0,0.3);
  margin-bottom: 12px;
}

.dash-portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Warrior identity text under portrait */
.dash-warrior-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-warrior-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--gold-soft);
  letter-spacing: 0.04em;
}

.dash-warrior-tagline {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.4;
}

.dash-class-badge {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(250, 204, 107, 0.12);
  border: 1px solid rgba(250, 204, 107, 0.25);
  color: var(--gold-soft);
}

/* Right panel card */
.dash-panel-card {
  display: flex;
  flex-direction: column;
}

/* Thin divider between panel sections */
.card-section-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 0;
}

/* Power Object CTA row */
.dash-po-section {
  padding-top: 14px !important;
  padding-bottom: 14px !important;
}

.dash-po-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-md, 10px);
  background: rgba(250, 204, 107, 0.07);
  border: 1px solid rgba(250, 204, 107, 0.15);
  color: var(--gold-soft);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dash-po-cta:hover {
  background: rgba(250, 204, 107, 0.13);
  border-color: rgba(250, 204, 107, 0.3);
}

.dash-po-arrow {
  margin-left: auto;
  opacity: 0.5;
}

/* Sage strip padding tweak */
.warrior-sage-strip.card-body {
  padding-top: 14px !important;
}




