/* Endgame portal page — overview cards with "+" expanders, across PvE / PvP tabs.
   Tabs reuse .lb-toggle/.lb-tab (pvp.css). Tokens from shared/mir-theme.css. */

.eg-toggle { margin-bottom: 18px; }

.eg-intro {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.eg-cards { display: grid; gap: 12px; }

/* ── War Plan hero (PvE lead) ─────────────────────────────────────────── */
.eg-hero {
  position: relative;
  margin-bottom: 26px;
  padding: 22px 22px 18px;
  background:
    linear-gradient(180deg, rgba(201, 164, 74, 0.10) 0%, transparent 46%),
    var(--bg-elevated);
  border: 1px solid var(--portal-gold-dim);
  border-top: 2px solid var(--portal-gold);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.eg-hero-head { display: flex; align-items: flex-start; gap: 14px; }
.eg-hero-icon { flex: 0 0 auto; font-size: 30px; line-height: 1; }
.eg-hero-headtext { flex: 1 1 auto; min-width: 0; }
.eg-hero-title {
  margin: 0 0 4px;
  font-family: 'Cinzel', 'Times New Roman', serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--portal-gold-bright);
}
.eg-hero-lead {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}
.eg-hero-lead strong { color: var(--portal-gold-bright); font-weight: 600; }

.eg-hero-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 16px 0 14px;
}
.eg-flow-step {
  padding: 6px 14px;
  font-family: 'Cinzel', 'Times New Roman', serif;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--portal-gold-bright);
  background: var(--portal-gold-dim);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-pill);
}
.eg-flow-arrow { color: var(--portal-gold); font-size: 14px; opacity: 0.8; }

.eg-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.eg-stat-chip {
  padding: 5px 11px;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}
.eg-stat-chip strong { color: var(--portal-gold-bright); font-weight: 700; }

.eg-hero-body {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.eg-hero-body:last-of-type { margin-bottom: 0; }
.eg-hero-body strong { color: var(--text); font-weight: 600; }

.eg-hero-foot {
  margin: 14px 0 0;
  padding: 11px 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
  background: var(--portal-gold-dim);
  border-left: 2px solid var(--portal-gold);
  border-radius: var(--radius-md);
}
.eg-hero-foot strong { color: var(--portal-gold-bright); font-weight: 600; }

.eg-hero-note { margin: 10px 0 0; font-size: 11px; font-style: italic; color: var(--muted); }

/* ── Grouped sections ("War Plan Activities", "Rewards & Wallet") ──────── */
.eg-section { margin-top: 22px; }
.eg-section-title {
  margin: 0 0 6px;
  padding-bottom: 7px;
  font-family: 'Cinzel', 'Times New Roman', serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--portal-gold-bright);
  border-bottom: 1px solid var(--border-dim);
}
.eg-section-sub {
  margin: 0 0 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* ── Card ─────────────────────────────────────────────────────────────── */
.eg-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--duration) var(--ease);
}
.eg-card.open { border-color: var(--portal-gold-dim); }
.eg-card.open .eg-card-head { border-bottom: 1px solid var(--border-dim); }

.eg-card-head {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--text);
  transition: background var(--duration) var(--ease);
}
.eg-card-head:hover { background: var(--panel-hover); }

.eg-card-icon {
  flex: 0 0 auto;
  width: 28px;
  font-size: 22px;
  line-height: 1;
  text-align: center;
}

.eg-card-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.eg-card-name {
  font-family: 'Cinzel', 'Times New Roman', serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--portal-gold-bright);
}
.eg-card-summary {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.eg-card-toggle {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  color: var(--portal-gold);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-pill);
  transition: color var(--duration) var(--ease),
    border-color var(--duration) var(--ease),
    background var(--duration) var(--ease);
}
.eg-card-head:hover .eg-card-toggle {
  color: var(--portal-gold-bright);
  border-color: var(--portal-gold);
}
.eg-card.open .eg-card-toggle {
  color: #11161f;
  background: var(--portal-gold);
  border-color: var(--portal-gold);
}

/* ── Expanding detail ─────────────────────────────────────────────────── */
.eg-card-detail {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 16px;
  transition: max-height var(--duration) var(--ease),
    opacity var(--duration) var(--ease),
    padding var(--duration) var(--ease);
}
.eg-card.open .eg-card-detail {
  max-height: 1600px;
  opacity: 1;
  padding: 14px 16px 16px;
}

.eg-note {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
}
.eg-note:last-child { margin-bottom: 0; }
.eg-note strong { color: var(--text); font-weight: 600; }

.eg-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-top: 1px solid var(--border-dim);
  font-size: 13px;
}
.eg-stat-row:first-child { border-top: none; }
.eg-stat-label { flex: 0 0 auto; color: var(--muted); }
.eg-stat-value { text-align: right; color: var(--text); }
.eg-stat-value strong { color: var(--portal-gold-bright); font-weight: 600; }

/* ── Currency table (inside the Currencies card) ──────────────────────── */
.eg-curr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.eg-curr-table th,
.eg-curr-table td {
  padding: 7px 8px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border-dim);
}
.eg-curr-table th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.eg-curr-table td:first-child {
  white-space: nowrap;
  font-weight: 600;
  color: var(--portal-gold-bright);
}
.eg-curr-table tr:last-child td { border-bottom: none; }

/* ── Live PvP link ────────────────────────────────────────────────────── */
.eg-live { margin-top: 18px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .eg-card,
  .eg-card-head,
  .eg-card-toggle,
  .eg-card-detail { transition: none; }
}

@media (max-width: 480px) {
  .eg-card-head { gap: 10px; padding: 12px; }
  .eg-card-icon { width: 22px; font-size: 19px; }
  .eg-stat-row { flex-direction: column; gap: 2px; }
  .eg-stat-value { text-align: left; }

  .eg-hero { padding: 16px 14px 14px; }
  .eg-hero-icon { font-size: 24px; }
  .eg-hero-title { font-size: 19px; }
  .eg-hero-flow { gap: 6px; }
  .eg-flow-step { padding: 5px 11px; font-size: 12px; }
}
