/* MaoStress — dark glass (monochrome black & white) */

:root {
  --mao-bg0: #161616;
  --mao-bg1: #1b1b1b;
  --mao-bg2: #141414;
  --mao-surface: rgba(29, 29, 29, 0.82);
  --mao-surface-2: rgba(37, 37, 37, 0.78);
  --mao-glass: rgba(255, 255, 255, 0.04);
  --mao-glass-strong: rgba(255, 255, 255, 0.08);
  --mao-border: rgba(255, 255, 255, 0.09);
  --mao-border-strong: rgba(255, 255, 255, 0.11);
  --mao-border-glow: rgba(93, 93, 93, 0.22);
  --mao-text: #efefef;
  --mao-muted: rgba(239, 239, 239, 0.68);
  --mao-dim: rgba(239, 239, 239, 0.45);
  --mao-text-muted: var(--mao-muted);
  --mao-text-dim: var(--mao-dim);
  --mao-accent: #5d5d5d;
  --mao-accent-2: #9d9d9d;
  --mao-accent-soft: rgba(93, 93, 93, 0.14);
  --mao-moon-tint: rgba(210, 210, 210, 0.30);
  --mao-moon: var(--mao-moon-tint);
  --mao-success: #cbcbcb;
  --mao-warning: #d2d2d2;
  --mao-danger: #909090;
  --mao-radius: 18px;
  --mao-radius-sm: 12px;
  --mao-blur: 10px;
  --mao-font: "Sora", "DM Sans", system-ui, sans-serif;
  --mao-mono: "JetBrains Mono", ui-monospace, monospace;
  --mao-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --mao-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.mao {
  margin: 0;
  min-height: 100vh;
  font-family: var(--mao-font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--mao-text);
  background-color: var(--mao-bg0);
  -webkit-font-smoothing: antialiased;
}

/* Aurora + noise backdrop */
.mao-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  /* Compositor: own layer + paint containment — same look, less invalidation while scrolling */
  transform: translate3d(0, 0, 0);
  isolation: isolate;
  contain: paint;
}

/* Aurora — static gradient (no animation, no repaint) */
.mao-aurora {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(ellipse 95% 50% at 50% -12%, rgba(69, 69, 69, 0.2), transparent 52%),
    radial-gradient(ellipse 45% 28% at 95% 15%, rgba(87, 87, 87, 0.09), transparent 45%),
    radial-gradient(ellipse 40% 25% at 5% 55%, rgba(73, 73, 73, 0.07), transparent 42%),
    linear-gradient(180deg, #0f0f0f 0%, #181818 42%, #161616 100%);
  transform: translate3d(0, 0.5%, 0) scale(1.035);
}

/* Noise — hidden (SVG feTurbulence + mix-blend-mode too expensive; invisible at 0.045 opacity) */
.mao-noise {
  display: none;
}

/* Grid overlay — static, contained */
.mao-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 75%);
  opacity: 0.35;
  contain: strict;
}

.mao-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 55% at 50% 45%, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
}

/* Soft glows — static (no animation, painted once by GPU) */
.mao-atmo-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.46;
  pointer-events: none;
}

.mao-atmo-glow--1 {
  width: min(58vw, 500px);
  height: min(58vw, 500px);
  top: -6%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(
    circle,
    rgba(99, 99, 99, 0.26) 0%,
    rgba(61, 61, 61, 0.08) 48%,
    transparent 68%
  );
}

.mao-atmo-glow--2 {
  width: min(75vw, 640px);
  height: min(75vw, 640px);
  bottom: -18%;
  right: -12%;
  background: radial-gradient(
    circle,
    rgba(131, 131, 131, 0.12) 0%,
    rgba(83, 83, 83, 0.04) 50%,
    transparent 65%
  );
}

/* Atmospheric sparks — 3 static (no animation, no drop-shadow; text-shadow is cheaper) */
.mao-atmo-moon {
  position: absolute;
  color: rgba(93, 93, 93, 0.5);
  text-shadow: 0 0 14px rgba(93, 93, 93, 0.3);
  pointer-events: none;
}

.mao-atmo-moon--1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  top: 8%;
  left: 4%;
  transform: rotate(-20deg);
  opacity: 0.32;
}

.mao-atmo-moon--2 {
  font-size: clamp(1.2rem, 2.8vw, 1.9rem);
  top: 38%;
  right: 6%;
  transform: rotate(14deg);
  opacity: 0.22;
}

.mao-atmo-moon--3 {
  font-size: clamp(1.4rem, 3.2vw, 2.1rem);
  bottom: 22%;
  left: 10%;
  transform: rotate(10deg);
  opacity: 0.18;
}

/* Layout shell (no transform here — descendants use position:fixed modals; transform would break viewport anchoring) */
.mao-shell {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.mao-sidebar {
  width: 268px;
  flex-shrink: 0;
  padding: 1.25rem 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  border-right: 1px solid var(--mao-border);
  background: linear-gradient(180deg, rgba(24, 24, 24, 0.94) 0%, rgba(16, 16, 16, 0.86) 100%);
  transform: translateZ(0);
}

.mao-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem;
  text-decoration: none;
  color: inherit;
  border-radius: var(--mao-radius-sm);
  transition: background 0.25s var(--mao-ease);
}

.mao-brand:hover {
  background: var(--mao-glass);
}

.mao-brand-mark {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(93, 93, 93, 0.18), transparent 60%),
    linear-gradient(160deg, rgba(33, 33, 33, 0.95), rgba(19, 19, 19, 0.95));
  border: 1px solid rgba(93, 93, 93, 0.35);
  box-shadow:
    0 0 22px rgba(93, 93, 93, 0.22),
    0 8px 26px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 0.25s var(--mao-ease), box-shadow 0.25s var(--mao-ease);
}

.mao-brand:hover .mao-brand-mark {
  border-color: rgba(93, 93, 93, 0.6);
  box-shadow:
    0 0 30px rgba(93, 93, 93, 0.35),
    0 8px 26px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.mao-brand-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 1px 4px rgba(93, 93, 93, 0.45));
}

.mao-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.mao-brand-text strong {
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.mao-brand-text span {
  font-size: 0.72rem;
  color: var(--mao-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.mao-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.mao-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem 0.65rem 0.95rem;
  border-radius: var(--mao-radius-sm);
  color: var(--mao-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s var(--mao-ease), background 0.2s var(--mao-ease), transform 0.2s var(--mao-ease);
  border: 1px solid transparent;
}

/* Left indicator bar (collapsed by default) */
.mao-nav a::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--mao-accent), var(--mao-accent-2));
  transform: translateY(-50%);
  transition: height 0.22s var(--mao-ease), opacity 0.22s var(--mao-ease);
  opacity: 0;
}

.mao-nav a i {
  width: 1.15rem;
  text-align: center;
  opacity: 0.8;
  transition: color 0.2s var(--mao-ease), transform 0.2s var(--mao-ease);
}

.mao-nav a:hover {
  color: var(--mao-text);
  background: var(--mao-glass);
  transform: translateX(2px);
}

.mao-nav a:hover i {
  color: var(--mao-accent);
  opacity: 1;
}

.mao-nav a:hover::before {
  height: 40%;
  opacity: 0.6;
}

.mao-nav a.is-active {
  color: var(--mao-text);
  background: linear-gradient(135deg, rgba(93, 93, 93, 0.18), rgba(157, 157, 157, 0.06));
  border-color: rgba(93, 93, 93, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 6px 18px rgba(93, 93, 93, 0.12);
}

.mao-nav a.is-active::before {
  height: 58%;
  opacity: 1;
}

.mao-nav a.is-active i {
  color: var(--mao-accent);
  opacity: 1;
}

.mao-sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--mao-border);
}

/* Main */
.mao-main {
  flex: 1;
  min-width: 0;
  padding: 1.5rem 1.75rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mao-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.mao-crumb {
  font-size: 0.8rem;
  color: var(--mao-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 0.35rem;
}

.mao-page-title {
  margin: 0;
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.mao-page-desc {
  margin: 0.35rem 0 0;
  max-width: 52ch;
  color: var(--mao-muted);
  font-size: 0.95rem;
}

/* Glass panels */
.glass {
  position: relative;
  border-radius: var(--mao-radius);
  background: linear-gradient(155deg, var(--mao-surface) 0%, var(--mao-surface-2) 100%);
  border: 1px solid var(--mao-border);
  box-shadow: var(--mao-shadow);
  overflow: hidden;
  transform: translateZ(0);
}

.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, transparent 42%, transparent 100%);
  opacity: 0.5;
}

.glass > * {
  position: relative;
  z-index: 1;
}

.glass-pad {
  padding: 1.35rem 1.5rem;
}

.glass-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--mao-border);
}

.glass-header h2,
.glass-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

/* Buttons */
.mao-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 1.15rem;
  border-radius: 11px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform 0.18s var(--mao-ease), box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

.mao-btn:active {
  transform: translateY(1px);
}

/* Matte primary — flat, muted, subtle hover glow */
.mao-btn-primary {
  color: #ededed;
  background: #515151;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.mao-btn-primary:hover {
  background: #595959;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(93, 93, 93, 0.2), 0 4px 14px rgba(93, 93, 93, 0.14);
}

.mao-btn-primary:active {
  background: #484848;
  box-shadow: none;
}

.mao-btn-ghost {
  color: var(--mao-text);
  background: var(--mao-glass-strong);
  border-color: var(--mao-border);
}

.mao-btn-ghost:hover {
  border-color: rgba(93, 93, 93, 0.28);
  background: rgba(255, 255, 255, 0.07);
}

.mao-btn-danger {
  color: #ededed;
  background: #4b4b4b;
  border-color: rgba(255, 255, 255, 0.08);
}

.mao-btn-danger:hover {
  background: #555555;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(93, 93, 93, 0.2), 0 4px 14px rgba(93, 93, 93, 0.14);
}

.mao-btn-sm {
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
}

.mao-stop-one {
  min-width: 68px;
}

.mao-stop-one.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.mao-stop-one.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  animation: mao-stop-spin 0.7s linear infinite;
}

.mao-btn-block {
  width: 100%;
}

/* Forms */
.mao-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mao-muted);
  margin-bottom: 0.4rem;
}

.mao-input,
.mao-select,
.mao-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 11px;
  border: 1px solid var(--mao-border);
  background: rgba(0, 0, 0, 0.28);
  color: var(--mao-text);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.mao-input:focus,
.mao-select:focus,
.mao-textarea:focus {
  border-color: rgba(93, 93, 93, 0.45);
  box-shadow: 0 0 0 3px rgba(93, 93, 93, 0.12);
}

.mao-textarea {
  min-height: 120px;
  resize: vertical;
}

.mao-field {
  margin-bottom: 1rem;
}

.mao-field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
}

.mao-hint {
  font-size: 0.78rem;
  color: var(--mao-dim);
  margin-top: 0.35rem;
}

/* Stats grid */
.mao-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.stat-card {
  position: relative;
  padding: 1.1rem 1.2rem 1.1rem 1.2rem;
  border-radius: var(--mao-radius-sm);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--mao-border);
}

.stat-card:has(.stat-card__icon) {
  padding-right: 3.35rem;
}

.stat-card__icon {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(93, 93, 93, 0.12), rgba(157, 157, 157, 0.08));
  border: 1px solid rgba(93, 93, 93, 0.22);
  color: var(--mao-accent);
  font-size: 1rem;
  pointer-events: none;
}

.stat-card .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mao-muted);
  margin: 0 0 0.35rem;
}

.stat-card .value {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
  background: linear-gradient(90deg, #ebebeb, #d9d9d9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-card .sub {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--mao-dim);
}

/* Dashboard — slot occupancy rings */
.mao-stats--slot-gauges {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.mao-slot-gauge {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 1.1rem 1rem 1rem;
  border-radius: var(--mao-radius);
  min-height: 0;
}

.mao-slot-gauge.glass {
  overflow: hidden;
}

.mao-slot-gauge__head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
}

.mao-slot-gauge__icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(
    145deg,
    rgba(93, 93, 93, 0.12),
    rgba(157, 157, 157, 0.08)
  );
  border: 1px solid rgba(93, 93, 93, 0.2);
  color: var(--mao-accent);
  font-size: 0.9rem;
}

.mao-slot-gauge[data-variant="l4"] .mao-slot-gauge__icon {
  color: #cbcbcb;
  border-color: rgba(203, 203, 203, 0.25);
  background: linear-gradient(
    145deg,
    rgba(203, 203, 203, 0.14),
    rgba(157, 157, 157, 0.06)
  );
}

.mao-slot-gauge[data-variant="tg"] .mao-slot-gauge__icon {
  color: #bdbdbd;
  border-color: rgba(189, 189, 189, 0.28);
  background: linear-gradient(
    145deg,
    rgba(189, 189, 189, 0.14),
    rgba(93, 93, 93, 0.06)
  );
}

.mao-slot-gauge .label {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mao-muted);
}

.mao-slot-gauge--layer-off {
  opacity: 0.55;
  filter: grayscale(0.35);
}

.mao-slot-gauge__off {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.35rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #909090;
  background: rgba(144, 144, 144, 0.15);
  border-radius: 4px;
  vertical-align: middle;
}

.mao-slot-gauge__viz {
  position: relative;
  width: min(168px, 100%);
  margin: 0.35rem auto 0.25rem;
  aspect-ratio: 1;
}

.mao-slot-gauge__svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.35));
}

.mao-slot-gauge__track {
  stroke: rgba(255, 255, 255, 0.1);
}

.mao-slot-gauge__fill {
  transition: stroke-dashoffset 0.05s linear;
}

.mao-slot-gauge__fill--l4 {
  stroke: #cbcbcb;
}

.mao-slot-gauge__fill--l7 {
  stroke: var(--mao-accent);
}

.mao-slot-gauge__fill--tg {
  stroke: #bdbdbd;
}

.mao-slot-gauge__center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.12em;
  font-family: var(--mao-mono);
  font-size: clamp(1.05rem, 3.5vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--mao-text);
  pointer-events: none;
}

.mao-slot-gauge__num {
  background: linear-gradient(90deg, #ebebeb, #d9d9d9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mao-slot-gauge[data-variant="l4"] .mao-slot-gauge__num {
  background: linear-gradient(90deg, #f9f9f9, #cbcbcb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mao-slot-gauge[data-variant="tg"] .mao-slot-gauge__num {
  background: linear-gradient(90deg, #f4f4f4, #bdbdbd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mao-slot-gauge__sep {
  opacity: 0.4;
  font-weight: 500;
  font-size: 0.85em;
}

.mao-slot-gauge__cap {
  font-size: 0.62em;
  font-weight: 600;
  opacity: 0.65;
  color: var(--mao-muted);
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
}

.mao-slot-gauge .sub {
  margin: 0.5rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--mao-dim);
}

@media (prefers-reduced-motion: reduce) {
  .mao-slot-gauge__fill {
    transition: none;
  }
}

/* Tags */
.mao-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mao-tag-l4 {
  background: rgba(123, 123, 123, 0.2);
  color: #bebebe;
  border: 1px solid rgba(123, 123, 123, 0.35);
}

.mao-tag-l7 {
  background: rgba(145, 145, 145, 0.15);
  color: #cacaca;
  border: 1px solid rgba(145, 145, 145, 0.3);
}

.mao-tag-other {
  background: rgba(166, 166, 166, 0.12);
  color: #d2d2d2;
  border: 1px solid rgba(166, 166, 166, 0.28);
}

.mao-tag-info {
  background: rgba(93, 93, 93, 0.12);
  color: var(--mao-accent);
}

.mao-tag-success {
  background: rgba(203, 203, 203, 0.1);
  color: var(--mao-success);
}

.mao-tag-warning {
  background: rgba(210, 210, 210, 0.1);
  color: var(--mao-warning);
}

/* Tables */
.mao-table-wrap {
  overflow-x: auto;
  border-radius: var(--mao-radius-sm);
  border: 1px solid var(--mao-border);
}

.mao-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.mao-table th,
.mao-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--mao-border);
}

.mao-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mao-muted);
  background: rgba(0, 0, 0, 0.2);
}

.mao-table tr:last-child td {
  border-bottom: none;
}

.mao-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Code */
.mao-code,
pre.mao-code {
  font-family: var(--mao-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  padding: 1rem 1.1rem;
  border-radius: var(--mao-radius-sm);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--mao-border);
  overflow-x: auto;
  margin: 0;
  color: #d3d3d3;
}

/* Alerts */
.mao-alert {
  padding: 0.85rem 1rem;
  border-radius: var(--mao-radius-sm);
  font-size: 0.88rem;
  border: 1px solid var(--mao-border);
  margin-bottom: 1rem;
}

.mao-alert-success {
  background: rgba(203, 203, 203, 0.08);
  border-color: rgba(203, 203, 203, 0.25);
  color: #e0e0e0;
}

.mao-alert-error {
  background: rgba(144, 144, 144, 0.08);
  border-color: rgba(144, 144, 144, 0.28);
  color: #d8d8d8;
}

/* News list */
.mao-news-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--mao-border);
}

.mao-news-item:last-child {
  border-bottom: none;
}

.mao-news-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.mao-news-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.mao-news-date {
  font-size: 0.78rem;
  color: var(--mao-dim);
}

.mao-news-body {
  margin: 0;
  color: var(--mao-muted);
  font-size: 0.9rem;
  white-space: pre-wrap;
}


/* Auth card centering */
.mao-auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 3rem;
}

.mao-auth-card {
  width: 100%;
  max-width: 420px;
}

.captcha-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.captcha-box img {
  height: 52px;
  border-radius: 10px;
  border: 1px solid var(--mao-border);
  background: rgba(0, 0, 0, 0.35);
}

/* API docs */
.api-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.mao-api-param-list {
  margin: 0.5rem 0 1rem;
  padding-left: 1.2rem;
  color: var(--mao-muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.mao-api-param-list code {
  font-family: var(--mao-mono);
  font-size: 0.82rem;
  color: var(--mao-accent);
}

.method-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.method-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--mao-border);
  font-size: 0.82rem;
}

.method-row.is-disabled {
  opacity: 0.45;
}

/* Purchase cards */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.plan-card {
  padding: 1.15rem;
  border-radius: var(--mao-radius);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s var(--mao-ease);
  border: 1px solid var(--mao-border);
  background: rgba(0, 0, 0, 0.15);
}

.plan-card:hover {
  border-color: rgba(93, 93, 93, 0.35);
  transform: translateY(-2px);
}

.plan-card.selected {
  border-color: rgba(93, 93, 93, 0.55);
  box-shadow: 0 0 0 1px rgba(93, 93, 93, 0.2);
}

.plan-card h4 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.plan-card .price {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

.plan-card .meta {
  font-size: 0.8rem;
  color: var(--mao-muted);
}

/* Chart container */
.mao-chart-box {
  position: relative;
  height: 280px;
}

/* Dashboard — Activity + News side by side */
.mao-dash-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 1rem;
  margin-top: 0.5rem;
  align-items: stretch;
}

.mao-dash-split__panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.mao-dash-split__panel .glass-header {
  flex-shrink: 0;
}

.mao-dash-split__panel--chart .mao-chart-box {
  flex: 1;
  min-height: 260px;
}

.mao-dash-split__news-body {
  flex: 1;
  min-height: 0;
  max-height: min(420px, 55vh);
  overflow-y: auto;
  padding-right: 0.25rem;
  margin-top: 0.15rem;
}

.mao-dash-split__news-body .mao-news-item:first-child {
  margin-top: 0;
}

@media (max-width: 960px) {
  .mao-dash-split {
    grid-template-columns: 1fr;
  }

  .mao-dash-split__news-body {
    max-height: none;
    overflow-y: visible;
  }
}

/* Mobile */
.mao-burger {
  display: none;
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 50;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--mao-border);
  background: linear-gradient(135deg, rgba(93, 93, 93, 0.35), rgba(157, 157, 157, 0.25));
  color: #fff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--mao-shadow);
}

@media (max-width: 1020px) {
  .mao-shell {
    flex-direction: column;
  }

  .mao-sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--mao-border);
  }

  .mao-nav {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }

  .mao-nav a {
    flex: 1 1 auto;
    min-width: 140px;
    justify-content: center;
  }

  .mao-sidebar-foot {
    flex-direction: row;
    width: 100%;
    border-top: none;
    padding-top: 0;
  }

  .mao-sidebar-foot .mao-btn {
    flex: 1;
  }
}

@media (max-width: 600px) {
  .mao-main {
    padding: 1rem 1rem 2rem;
  }

  .mao-field-row {
    grid-template-columns: 1fr;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
  background: rgba(93, 93, 93, 0.25);
  border-radius: 8px;
}

/* Selection */
::selection {
  background: rgba(93, 93, 93, 0.35);
  color: #fff;
}

/* Styled native selects (site-wide) */
.mao-select-wrap {
  position: relative;
  width: 100%;
}

.mao-select-wrap::after {
  content: "";
  position: absolute;
  right: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid rgba(194, 194, 194, 0.55);
  pointer-events: none;
}

select.mao-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.35rem;
  cursor: pointer;
  min-height: 2.65rem;
  line-height: 1.3;
}

select.mao-select option:disabled {
  color: rgba(130, 130, 130, 0.45);
}

/* Stress panel: two-column layout (form | running attacks) */
.mao-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}

/* Open dropdowns must paint above the "Active attacks" column (sibling grid item). */
.mao-panel-grid > .mao-attack-card:has(.mao-cselect.is-open) {
  position: relative;
  z-index: 10;
}

@media (max-width: 1100px) {
  .mao-panel-grid {
    grid-template-columns: 1fr;
  }
}

/* Allow method dropdown to extend past card; .glass overflow:hidden would clip it (Layer 7). */
.mao-attack-card.glass {
  overflow: visible;
}

.mao-attack-card,
.mao-running-card {
  min-height: 640px;
  display: flex;
  flex-direction: column;
}

.mao-attack-card .mao-field {
  margin-bottom: 0.5rem;
}

.mao-attack-card .mao-label {
  margin-bottom: 0.28rem;
}

.mao-attack-card .mao-field-row {
  gap: 0.55rem;
}

/* Extra gap before Launch */
.mao-attack-card .mao-field:last-of-type {
  margin-bottom: 1rem;
}

.mao-attack-card form > button[type="submit"].mao-btn-primary {
  width: 100%;
  box-sizing: border-box;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.mao-running-table {
  flex: 1;
  min-height: 280px;
}

/* Segmented tabs (JsonStresser-style) */
.mao-tabs-seg {
  display: flex;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 1.15rem;
  border: 1px solid var(--mao-border);
}

.mao-tab-seg {
  flex: 1;
  text-align: center;
  padding: 0.82rem 0.5rem;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--mao-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  transition: background 0.2s var(--mao-ease), color 0.2s, box-shadow 0.2s;
}

.mao-tab-seg:hover {
  color: var(--mao-text);
}

.mao-tab-seg.is-active {
  background: linear-gradient(135deg, rgba(93, 93, 93, 0.22), rgba(157, 157, 157, 0.14));
  color: var(--mao-text);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Glass custom dropdowns */
.mao-cselect {
  position: relative;
  width: 100%;
  z-index: 1;
}

.mao-cselect.is-open {
  z-index: 200;
}

.mao-cselect__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 11px;
  border: 1px solid var(--mao-border);
  background: rgba(0, 0, 0, 0.32);
  color: var(--mao-text);
  font-family: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.mao-cselect__trigger:hover {
  border-color: rgba(93, 93, 93, 0.3);
}

.mao-cselect.is-open .mao-cselect__trigger {
  border-color: rgba(93, 93, 93, 0.5);
  box-shadow: 0 0 0 3px rgba(93, 93, 93, 0.12);
}

.mao-cselect__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mao-cselect__caret {
  font-size: 0.72rem;
  opacity: 0.65;
  transition: transform 0.25s var(--mao-ease);
}

.mao-cselect.is-open .mao-cselect__caret {
  transform: rotate(180deg);
}

.mao-cselect__menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: 280px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid rgba(93, 93, 93, 0.28);
  background: rgba(18, 18, 18, 0.96);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}

.mao-cselect__menu[hidden] {
  display: none !important;
}

.mao-cselect__optgroup {
  padding: 0.45rem 0.5rem 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mao-muted);
  position: sticky;
  top: 0;
  background: rgba(18, 18, 18, 0.98);
  z-index: 1;
}

.mao-cselect__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  margin-bottom: 2px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--mao-text);
  font-family: inherit;
  font-size: 0.86rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.mao-cselect__option:hover:not(.is-disabled) {
  background: rgba(93, 93, 93, 0.1);
}

.mao-cselect__option.is-selected {
  background: rgba(93, 93, 93, 0.16);
}

.mao-cselect__option.is-disabled {
  opacity: 0.48;
  cursor: not-allowed;
  color: var(--mao-muted);
}

.mao-cselect--methods .mao-cselect__menu {
  max-height: min(52vh, 420px);
}

.mao-cselect__option.mao-cselect__option--method {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0.6rem 0.65rem;
}

.mao-cselect__option--method .mao-method-row-main {
  width: 100%;
}

.mao-cselect__option--method .mao-method-desc {
  margin-top: 0.25rem;
  width: 100%;
  font-size: 0.74rem;
  line-height: 1.35;
}

/* Tools: tabbed panels */
.mao-tools-tabs {
  margin-bottom: 1rem;
}

.mao-tool-pane {
  display: none;
}

.mao-tool-pane.is-active {
  display: block;
}

.mao-tool-panel {
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.mao-tool-panel .mao-code {
  flex: 1;
  min-height: 200px;
  margin-top: 1rem;
}

.mao-tool-panel form .mao-btn[type="submit"] {
  width: 100%;
  box-sizing: border-box;
}

/* Tool loading state */
.mao-tool-out.is-loading {
  position: relative;
  color: transparent !important;
  min-height: 100px;
}

.mao-tool-out.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border: 3px solid rgba(93, 93, 93, 0.15);
  border-top-color: var(--mao-accent);
  border-radius: 50%;
  animation: mao-tool-spin 0.7s linear infinite;
}

@keyframes mao-tool-spin {
  to { transform: rotate(360deg); }
}

@keyframes mao-stop-spin {
  to { transform: rotate(360deg); }
}

.mao-tool-panel .mao-btn.is-busy {
  pointer-events: none;
  opacity: 0.75;
  cursor: wait;
  position: relative;
}

.mao-btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(21, 21, 21, 0.25);
  border-top-color: #151515;
  border-radius: 50%;
  animation: mao-tool-spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 0.3em;
}

/* Nmap mode cselect inside .glass: menu uses fixed positioning (set by JS)
   so it escapes overflow:hidden + transform containment */
#mao-nmap-mode-menu {
  position: fixed;
  left: 0;
  top: 0;
  right: auto;
  width: auto;
  z-index: 10000;
}

/* Stress panel tabs */
.mao-tabs-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.mao-tab-btn {
  flex: 1;
  min-width: 110px;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--mao-border);
  background: rgba(0, 0, 0, 0.22);
  color: var(--mao-muted);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.mao-tab-btn:hover {
  color: var(--mao-text);
  border-color: rgba(93, 93, 93, 0.28);
}

.mao-tab-btn.is-active {
  color: var(--mao-text);
  border-color: rgba(93, 93, 93, 0.45);
  background: linear-gradient(135deg, rgba(93, 93, 93, 0.14), rgba(157, 157, 157, 0.09));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Method picker (replaces native select) */
.mao-method-picker {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 340px;
  overflow-y: auto;
  padding: 0.45rem;
  border-radius: var(--mao-radius-sm);
  border: 1px solid var(--mao-border);
  background: rgba(0, 0, 0, 0.28);
}

.mao-method-group-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mao-muted);
  margin: 0.4rem 0 0.15rem;
  padding: 0 0.25rem;
}

.mao-method-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.8rem;
  border-radius: 11px;
  border: 1px solid var(--mao-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--mao-text);
  font-family: inherit;
  font-size: 0.87rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, opacity 0.2s;
}

.mao-method-row:hover:not(:disabled) {
  border-color: rgba(93, 93, 93, 0.35);
  background: rgba(93, 93, 93, 0.07);
}

.mao-method-row.is-selected {
  border-color: rgba(93, 93, 93, 0.55);
  background: rgba(93, 93, 93, 0.12);
  box-shadow: 0 0 0 1px rgba(93, 93, 93, 0.12);
}

.mao-method-row:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.mao-method-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mao-method-name {
  font-weight: 600;
}

.mao-method-badges {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
}

.mao-badge {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.45rem;
  border-radius: 5px;
  text-transform: uppercase;
}

.mao-badge-off {
  background: rgba(84, 84, 84, 0.45);
  border: 1px solid rgba(162, 162, 162, 0.35);
  color: #e7e7e7;
}

.mao-badge-premium {
  background: rgba(166, 166, 166, 0.18);
  border: 1px solid rgba(166, 166, 166, 0.45);
  color: #d2d2d2;
}

.mao-method-desc {
  margin-top: 0.35rem;
  font-size: 0.76rem;
  color: var(--mao-dim);
  line-height: 1.35;
}

/* Plan card lines */
.plan-card .plan-lines {
  margin-top: 0.65rem;
  font-size: 0.82rem;
  color: var(--mao-muted);
  line-height: 1.65;
}

.plan-card .plan-lines div {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0;
}

.plan-card .plan-lines div:last-child {
  border-bottom: none;
}

.plan-card__buy {
  width: 100%;
  margin-top: 0.85rem;
}

/* Purchase modals */
.mao-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-sizing: border-box;
}

.mao-modal[hidden] {
  display: none !important;
}

.mao-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.72);
  backdrop-filter: none;
}

.mao-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  max-height: min(90vh, 640px);
  display: flex;
  flex-direction: column;
  margin: 0;
  animation: mao-modal-in 0.22s var(--mao-ease);
}

.mao-modal--stack {
  z-index: 12100;
}

.mao-modal__panel--wide {
  max-width: 520px;
}

.mao-pay-timer {
  margin-left: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(192, 192, 192, 0.95);
}

.mao-pay-coin-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 0.85rem;
  display: block;
  object-fit: contain;
}

.mao-pd-row {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--mao-border);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.65rem;
}

.mao-pd-row:last-of-type {
  margin-bottom: 0;
}

.mao-pd-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--mao-muted);
  margin-bottom: 0.35rem;
}

.mao-pd-title span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.mao-pd-copy {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: rgba(93, 93, 93, 0.2);
  color: var(--mao-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.mao-pd-copy:hover {
  background: rgba(93, 93, 93, 0.35);
}

.mao-pd-value {
  font-family: var(--mao-mono, ui-monospace, monospace);
  font-size: 0.88rem;
  color: var(--mao-text);
  word-break: break-all;
  line-height: 1.45;
}

@keyframes mao-modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mao-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.mao-modal__head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.mao-modal__close {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--mao-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.mao-modal__close:hover {
  color: var(--mao-text);
  background: rgba(255, 255, 255, 0.08);
}

.mao-payment-methods {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.mao-payment-method {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  text-align: left;
  padding: 0.85rem 1rem;
  border-radius: 11px;
  border: 1px solid var(--mao-border);
  background: rgba(0, 0, 0, 0.22);
  color: var(--mao-text);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.18s var(--mao-ease);
}

.mao-payment-method:hover {
  border-color: rgba(93, 93, 93, 0.4);
  background: rgba(0, 0, 0, 0.32);
}

.mao-payment-method:active {
  transform: translateY(1px);
}

.mao-payment-method__icon {
  font-size: 1.35rem;
  width: 2rem;
  text-align: center;
  color: rgba(93, 93, 93, 0.85);
}

.mao-payment-method__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.mao-payment-method__name {
  font-weight: 650;
  font-size: 0.92rem;
}

.mao-payment-method__desc {
  font-size: 0.78rem;
  color: var(--mao-muted);
  line-height: 1.35;
}

.mao-payment-method__arrow {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--mao-dim);
}

#mao-coin-search {
  margin-bottom: 0.75rem;
}

.mao-coin-list {
  flex: 1;
  min-height: 120px;
  max-height: min(50vh, 360px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-right: 0.2rem;
}

.mao-coin-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--mao-border);
  background: rgba(0, 0, 0, 0.18);
  color: var(--mao-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.mao-coin-item:hover {
  border-color: rgba(93, 93, 93, 0.35);
  background: rgba(0, 0, 0, 0.28);
}

.mao-coin-item img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  object-fit: contain;
}

.mao-coin-item span {
  font-weight: 600;
  font-size: 0.88rem;
}

.mao-coin-list.is-loading,
.mao-coin-list.is-empty {
  align-items: center;
  justify-content: center;
  color: var(--mao-muted);
  font-size: 0.88rem;
}

/* --- Power Proof --- */
.mao-proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.mao-proof-empty {
  text-align: center;
  color: var(--mao-text-dim);
  font-size: 1rem;
  padding: 3rem 0;
}

.mao-proof-card {
  border-radius: 20px;
  border: 1px solid var(--mao-border);
  background: var(--mao-surface);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
}

.mao-proof-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.38);
  border-color: rgba(93, 93, 93, 0.3);
}

.mao-proof-card__thumb {
  position: relative;
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--mao-border);
}

.mao-proof-card__play {
  position: absolute;
  bottom: .6rem;
  right: .6rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: .75rem;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.mao-proof-card__thumb--empty {
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.3);
  font-size: 2.5rem;
  color: var(--mao-text-dim);
}

.mao-proof-card__body {
  padding: 1rem 1.15rem 1.15rem;
}

.mao-proof-card__title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--mao-text);
}

.mao-proof-card__desc {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--mao-text-muted);
}

.mao-proof-card__count {
  font-size: 0.75rem;
  color: var(--mao-text-dim);
}

.mao-proof-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.78);
  display: none;
  place-items: center;
  padding: 1.5rem;
  overflow-y: auto;
}

.mao-proof-modal-overlay.is-open {
  display: grid;
}

.mao-proof-modal {
  position: relative;
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 22px;
  border: 1px solid var(--mao-border);
  background: linear-gradient(165deg, rgba(24, 24, 24, 0.98), rgba(15, 15, 15, 0.99));
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
  padding: 2rem 1.75rem 1.75rem;
}

.mao-proof-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  background: none;
  border: none;
  color: var(--mao-text-dim);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
  transition: color 0.2s;
}

.mao-proof-modal__close:hover {
  color: var(--mao-text);
}

.mao-proof-modal__title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--mao-text);
  padding-right: 2rem;
}

.mao-proof-modal__desc {
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--mao-text-muted);
  white-space: pre-line;
}

.mao-proof-modal__media {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mao-proof-modal__img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--mao-border);
}

.mao-proof-modal__vid {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--mao-border);
  background: #000;
}

/* ---- CAT on/off toggle (top-right) ---- */
.mao-cat-toggle {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(19, 19, 19, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  font: 600 11px/1 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.14em;
  color: rgba(233, 233, 233, 0.85);
  user-select: none;
}

.mao-cat-toggle__label {
  color: rgba(157, 157, 157, 0.92);
}

.mao-cat-switch {
  position: relative;
  width: 34px;
  height: 18px;
  flex: none;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.mao-cat-switch__dot {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #d4d4d4;
  transition: transform 0.2s ease, background 0.2s ease;
}

.mao-cat-switch[aria-checked="true"] {
  background: rgba(81, 81, 81, 0.85);
  border-color: rgba(93, 93, 93, 0.5);
}

.mao-cat-switch[aria-checked="true"] .mao-cat-switch__dot {
  transform: translateX(16px);
  background: #ededed;
}

.mao-cat-toggle__state {
  width: 24px;
  color: rgba(233, 233, 233, 0.55);
}

@media (max-width: 720px) {
  .mao-cat-toggle {
    top: 10px;
    right: 10px;
    padding: 5px 9px;
    transform: scale(0.92);
    transform-origin: top right;
  }
}
