@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=DM+Sans:wght@300;400;500;700&display=swap");

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #07111c;
  --bg2: #0d1b2a;
  --bg3: #122338;
  --gold: #c9a84c;
  --gold2: #f0d080;
  --gold3: #8b6914;
  --cream: #f0e6d3;
  --muted: #7a8fa8;
  --g-green: #22c55e;
  --g-green-glow: rgba(34, 197, 94, 0.5);
  --g-cyan: #06b6d4;
  --g-cyan-glow: rgba(6, 182, 212, 0.5);
  --g-yellow: #eab308;
  --g-yellow-glow: rgba(234, 179, 8, 0.45);
  --g-orange: #f97316;
  --g-orange-glow: rgba(249, 115, 22, 0.5);
  --g-red: #ef4444;
  --g-red-glow: rgba(239, 68, 68, 0.5);
  --g-purple: #a855f7;
  --g-purple-glow: rgba(168, 85, 247, 0.5);
  --g-blue: #3b82f6;
  --g-blue-glow: rgba(59, 130, 246, 0.5);
  --g-pink: #ec4899;
  --g-pink-glow: rgba(236, 72, 153, 0.5);
  --border: rgba(201, 168, 76, 0.15);
  --card: rgba(13, 27, 42, 0.8);
}

body.lg-ministry-dash {
  font-family: "DM Sans", sans-serif;
  background: var(--bg);
  color: var(--cream);
  overflow-x: hidden;
  min-height: 100vh;
}

.bg-fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 15% 20%, rgba(6, 182, 212, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 85% 75%, rgba(168, 85, 247, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 50% 50%, rgba(201, 168, 76, 0.04) 0%, transparent 70%),
    #07111c;
}

.grid-lines {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(201, 168, 76, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 168, 76, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

.lg-dash-topbar {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px clamp(12px, 4vw, 24px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 17, 28, 0.92);
  backdrop-filter: blur(10px);
}

.lg-dash-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--gold2);
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: clamp(13px, 3.5vw, 15px);
}

.lg-dash-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold3), var(--gold));
  color: #07111c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

.lg-dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-left: auto;
}

.lg-dash-actions a {
  font-size: 11px;
  font-family: "DM Sans", sans-serif;
  color: var(--gold);
  border: 1px solid rgba(201, 168, 76, 0.35);
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lg-dash-actions a:hover {
  background: rgba(201, 168, 76, 0.12);
  color: var(--gold2);
}

@media (max-width: 720px) {
  .lg-dash-topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .lg-dash-brand {
    justify-content: center;
  }
  .lg-dash-actions {
    justify-content: center;
    margin-left: 0;
  }
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(12px, 4vw, 24px) clamp(48px, 8vw, 80px);
}

.dash-header {
  padding: clamp(24px, 5vw, 40px) 0 clamp(16px, 3vw, 22px);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
  text-align: center;
}

.lg-setup-banner {
  margin: 0 0 clamp(20px, 4vw, 28px);
  padding: clamp(14px, 3vw, 18px) clamp(16px, 4vw, 22px);
  border-radius: 14px;
  border: 1px solid rgba(201, 168, 76, 0.45);
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.14), rgba(6, 182, 212, 0.08));
  box-shadow: 0 0 0 1px rgba(7, 17, 28, 0.5) inset;
}

.lg-setup-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(14px, 3vw, 20px);
}

.lg-setup-banner-text {
  flex: 1 1 220px;
  min-width: 0;
  text-align: left;
}

.lg-setup-banner-title {
  display: block;
  font-family: "Cinzel", serif;
  font-size: clamp(14px, 3.2vw, 17px);
  font-weight: 700;
  color: var(--gold2);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.lg-setup-banner-desc {
  display: block;
  font-size: clamp(11px, 2.4vw, 12px);
  line-height: 1.45;
  color: var(--muted);
  max-width: 42em;
}

.lg-setup-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}

.lg-setup-banner-btn {
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #07111c;
  background: linear-gradient(135deg, var(--gold2), var(--gold));
  border: 1px solid rgba(201, 168, 76, 0.6);
  padding: 10px 20px;
  border-radius: 10px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lg-setup-banner-btn:hover {
  color: #07111c;
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.35);
  transform: translateY(-1px);
}

@media (max-width: 560px) {
  .lg-setup-banner-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .lg-setup-banner-text {
    text-align: center;
  }
  .lg-setup-banner-actions {
    justify-content: center;
  }
}

.church-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: clamp(10px, 2.5vw, 11px);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.dash-header h1 {
  font-family: "Cinzel", serif;
  font-size: clamp(26px, 5vw, 44px);
  font-weight: 700;
  color: var(--gold2);
  letter-spacing: 1px;
  margin-bottom: 6px;
  line-height: 1.15;
}

.dash-header .sub {
  font-size: clamp(11px, 2.5vw, 12px);
  color: var(--muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hmeta {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 3vw, 28px);
  flex-wrap: wrap;
}

.hmi {
  font-size: clamp(11px, 2.5vw, 12px);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.hmi-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: dp 2s ease-in-out infinite;
}

@keyframes dp {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.nav {
  display: flex;
  gap: 4px;
  background: rgba(13, 27, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: clamp(20px, 4vw, 28px);
  flex-wrap: wrap;
}

.ntab {
  flex: 1 1 auto;
  min-width: min(100%, 104px);
  min-height: 44px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: clamp(10px, 2.8vw, 12px);
  letter-spacing: 0.5px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  color: var(--muted);
  font-family: "DM Sans", sans-serif;
  text-align: center;
  line-height: 1.25;
}

.ntab:hover {
  color: var(--gold2);
}

.ntab.on {
  background: var(--bg3);
  color: var(--gold2);
  font-weight: 700;
  box-shadow: 0 0 12px rgba(201, 168, 76, 0.15);
}

.page {
  display: none;
}
.page.on {
  display: block;
}

.gcard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: clamp(16px, 3vw, 20px);
  backdrop-filter: blur(12px);
  transition: border-color 0.3s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.gcard:hover {
  transform: translateY(-2px);
}

.gcard-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 14px 14px 0 0;
}

.glow-green {
  color: var(--g-green);
  text-shadow: 0 0 12px var(--g-green-glow), 0 0 24px var(--g-green-glow);
}
.glow-cyan {
  color: var(--g-cyan);
  text-shadow: 0 0 12px var(--g-cyan-glow), 0 0 24px var(--g-cyan-glow);
}
.glow-yellow {
  color: var(--g-yellow);
  text-shadow: 0 0 12px var(--g-yellow-glow), 0 0 24px var(--g-yellow-glow);
}
.glow-orange {
  color: var(--g-orange);
  text-shadow: 0 0 12px var(--g-orange-glow), 0 0 24px var(--g-orange-glow);
}
.glow-red {
  color: var(--g-red);
  text-shadow: 0 0 12px var(--g-red-glow), 0 0 24px var(--g-red-glow);
}
.glow-purple {
  color: var(--g-purple);
  text-shadow: 0 0 12px var(--g-purple-glow), 0 0 24px var(--g-purple-glow);
}
.glow-blue {
  color: var(--g-blue);
  text-shadow: 0 0 12px var(--g-blue-glow), 0 0 24px var(--g-blue-glow);
}
.glow-gold {
  color: var(--gold2);
  text-shadow: 0 0 12px rgba(240, 208, 128, 0.5), 0 0 24px rgba(240, 208, 128, 0.3);
}

@keyframes hgGreen {
  0%,
  100% {
    box-shadow: 0 0 6px 2px rgba(34, 197, 94, 0.9), 0 0 18px 5px rgba(34, 197, 94, 0.4);
  }
  50% {
    box-shadow: 0 0 12px 4px rgba(34, 197, 94, 1), 0 0 30px 8px rgba(34, 197, 94, 0.6);
  }
}
@keyframes hgYellow {
  0%,
  100% {
    box-shadow: 0 0 6px 2px rgba(234, 179, 8, 0.9), 0 0 18px 5px rgba(234, 179, 8, 0.4);
  }
  50% {
    box-shadow: 0 0 12px 4px rgba(253, 224, 71, 1), 0 0 30px 8px rgba(234, 179, 8, 0.6);
  }
}
@keyframes hgOrange {
  0%,
  100% {
    box-shadow: 0 0 6px 2px rgba(249, 115, 22, 0.9), 0 0 18px 5px rgba(249, 115, 22, 0.4);
  }
  50% {
    box-shadow: 0 0 12px 4px rgba(251, 146, 60, 1), 0 0 30px 8px rgba(249, 115, 22, 0.6);
  }
}
@keyframes hgRed {
  0%,
  100% {
    box-shadow: 0 0 6px 2px rgba(239, 68, 68, 0.9), 0 0 18px 5px rgba(239, 68, 68, 0.4);
  }
  50% {
    box-shadow: 0 0 14px 5px rgba(248, 113, 113, 1), 0 0 35px 10px rgba(239, 68, 68, 0.7);
  }
}
@keyframes hgGray {
  0%,
  100% {
    box-shadow: 0 0 4px 1px rgba(156, 163, 175, 0.4);
  }
  50% {
    box-shadow: 0 0 7px 2px rgba(156, 163, 175, 0.5);
  }
}
@keyframes hbeat {
  0%,
  100% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.35);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.2);
  }
  70% {
    transform: scale(1);
  }
}

.heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  animation-duration: 2.2s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  font-size: 9px;
}

.heart::after {
  content: "♥";
  animation: hbeat 2.2s ease-in-out infinite;
}

.hg {
  animation-name: hgGreen;
  background: var(--g-green);
  color: #052e16;
}
.hy {
  animation-name: hgYellow;
  background: var(--g-yellow);
  color: #422006;
}
.ho {
  animation-name: hgOrange;
  background: var(--g-orange);
  color: #431407;
}
.hr {
  animation-name: hgRed;
  background: var(--g-red);
  color: #fff;
}
.hx {
  animation-name: hgGray;
  background: #4b5563;
  color: #d1d5db;
}

.g4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.g3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.g2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.snum {
  font-family: "Cinzel", serif;
  font-size: clamp(28px, 8vw, 40px);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.slbl {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.sdelta {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.sh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}

.st {
  font-family: "Cinzel", serif;
  font-size: clamp(14px, 3.5vw, 16px);
  color: var(--gold2);
  display: flex;
  align-items: center;
  gap: 10px;
}

.st::before {
  content: "";
  width: 3px;
  height: 18px;
  border-radius: 2px;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold), 0 0 16px rgba(201, 168, 76, 0.4);
  flex-shrink: 0;
}

.vab {
  font-size: 11px;
  color: var(--gold);
  border: 1px solid rgba(201, 168, 76, 0.3);
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  background: none;
  font-family: "DM Sans", sans-serif;
  transition: all 0.2s;
}

.vab:hover {
  background: rgba(201, 168, 76, 0.1);
}

.pbadge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.pb-vip {
  background: rgba(168, 85, 247, 0.15);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.3);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.2);
}
.pb-2nd {
  background: rgba(6, 182, 212, 0.15);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.3);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.2);
}
.pb-att {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.3);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.2);
}
.pb-ina {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.25);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.15);
}
.pb-ret {
  background: rgba(234, 179, 8, 0.15);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.3);
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.2);
}

.cb-con {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.25);
}
.cb-irr {
  background: rgba(234, 179, 8, 0.12);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.25);
}
.cb-abs {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

canvas {
  width: 100% !important;
  max-width: 100%;
}

.chart-wrap {
  position: relative;
  padding: 4px 0;
  width: 100%;
  min-height: 200px;
  height: clamp(200px, 45vw, 300px);
}

@media (min-width: 1024px) {
  .chart-wrap {
    height: auto;
    min-height: 220px;
  }
}

.donut-row {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 20px);
  flex-wrap: wrap;
}

.donut-col {
  flex: 1 1 200px;
  max-width: 220px;
  min-width: 160px;
  margin: 0 auto;
}

.chart-wrap--donut {
  height: clamp(200px, 52vw, 280px);
  min-height: 200px;
}

.dl {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.dli {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(11px, 2.5vw, 12px);
}

.dldot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.fbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  align-items: center;
}

.ftag {
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 11px;
  border: 1px solid rgba(201, 168, 76, 0.2);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  transition: all 0.2s;
  letter-spacing: 0.5px;
  min-height: 40px;
}

.ftag:hover,
.ftag.on {
  background: rgba(201, 168, 76, 0.12);
  color: var(--gold2);
  border-color: rgba(201, 168, 76, 0.4);
  box-shadow: 0 0 8px rgba(201, 168, 76, 0.15);
}

.mtable-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 0 4px;
}

.mtable {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 12px;
}

.mtable th {
  padding: 10px 12px;
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.8px;
  font-size: 10px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(201, 168, 76, 0.12);
  white-space: nowrap;
}

.mtable td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(201, 168, 76, 0.06);
  color: var(--cream);
  vertical-align: middle;
}

.mtable tr:hover td {
  background: rgba(201, 168, 76, 0.04);
}

.lg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 18px;
}

.lgcard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  backdrop-filter: blur(12px);
  transition: transform 0.2s, border-color 0.3s;
  cursor: pointer;
}

.lgcard:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 168, 76, 0.4);
}

.lgc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}

.lgc-name {
  font-family: "Cinzel", serif;
  font-size: 14px;
  color: var(--cream);
  margin-bottom: 3px;
  word-break: break-word;
}

.lgc-ldr {
  font-size: 11px;
  color: var(--muted);
}

.lgc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.lgcs {
  background: rgba(7, 17, 28, 0.5);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}

.lgcs-n {
  font-size: 16px;
  font-weight: 700;
  font-family: "Cinzel", serif;
}

.lgcs-l {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.lgc-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 10px;
}

.lgc-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1s ease;
}

.lgc-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 10px;
  color: var(--muted);
  padding-top: 10px;
  border-top: 1px solid rgba(201, 168, 76, 0.08);
}

.spark {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 28px;
}

.spark-bar {
  width: 6px;
  border-radius: 1px;
  min-height: 3px;
  transition: height 0.3s;
}

.prog {
  margin-bottom: 10px;
}

.prog-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.prog-lbl {
  font-size: 12px;
  color: var(--muted);
  flex: 1 1 100%;
  min-width: 0;
}

@media (min-width: 640px) {
  .prog-lbl {
    flex: 0 0 160px;
  }
}

.prog-bg {
  flex: 1;
  min-width: 120px;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.prog-fill {
  height: 100%;
  border-radius: 3px;
  position: relative;
}

@keyframes fillIn {
  from {
    width: 0;
  }
}

.prog-val {
  font-size: 12px;
  font-weight: 700;
  min-width: 52px;
  text-align: right;
  flex-shrink: 0;
}

.moverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  padding: 16px;
}

.moverlay.open {
  display: flex;
}

.mdl {
  background: #0d1b2a;
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 16px;
  padding: clamp(20px, 4vw, 28px);
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
}

.mclose {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.mclose:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--cream);
}

.mtit {
  font-family: "Cinzel", serif;
  font-size: 18px;
  color: var(--gold2);
  margin-bottom: 18px;
  padding-right: 40px;
}

.mrow {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(201, 168, 76, 0.07);
  font-size: 12px;
}

.mrow:last-of-type {
  border-bottom: none;
}

.mk {
  color: var(--muted);
  flex-shrink: 0;
}

.mv {
  color: var(--cream);
  font-weight: 500;
  text-align: right;
  word-break: break-word;
}

.lg-qh-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.lg-qh-header,
.lg-qh-row {
  display: grid;
  grid-template-columns: minmax(88px, 1.15fr) repeat(4, minmax(40px, 1fr));
  gap: 4px;
  align-items: center;
}

.lg-qh-header {
  padding: 8px 0;
  border-bottom: 1px solid rgba(201, 168, 76, 0.15);
  margin-bottom: 6px;
  min-width: 280px;
}

.lg-qh-row {
  padding: 7px 0;
  border-bottom: 1px solid rgba(201, 168, 76, 0.05);
  min-width: 280px;
}

.lg-qh-header-cell {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.5px;
  text-align: center;
}

.lg-qh-header-cell:first-child {
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.lg-qh-group {
  font-size: 11px;
  color: var(--cream);
  word-break: break-word;
}

.lg-qh-q {
  display: flex;
  justify-content: center;
}

.lg-action-item {
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.lg-action-body {
  flex: 1;
  min-width: min(100%, 180px);
}

.lg-action-item .lg-act-btn {
  font-size: 11px;
  border: 1px solid rgba(201, 168, 76, 0.3);
  background: transparent;
  color: var(--gold);
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  white-space: nowrap;
  transition: background 0.2s;
  min-height: 40px;
}

.lg-action-item .lg-act-btn:hover {
  background: rgba(201, 168, 76, 0.1);
}

@media (max-width: 480px) {
  .lg-action-item {
    flex-direction: column;
    align-items: stretch;
  }
  .lg-action-item .lg-act-btn {
    width: 100%;
    white-space: normal;
  }
}

.lg-dash-foot {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  padding: 24px clamp(12px, 4vw, 24px) 36px;
}

.health-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 3vw, 24px);
}

.health-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(100%, 200px);
}

@media (max-width: 600px) {
  .ntab {
    flex: 1 1 calc(50% - 4px);
    min-width: calc(50% - 4px);
  }
}

@media (max-width: 380px) {
  .ntab {
    flex: 1 1 100%;
    min-width: 100%;
  }
}
