/* market-core.css — extrait de market.css (audit §5.1). Ne pas éditer market.css directement. */
/* === Market Stats: layout + sidebar encarts === */
.market-main {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.5rem;
  align-items: flex-start;
}
.market-content {
  flex: 1 1  min(100%, 600px);
  min-width: 0;
}

/* Market Stats — retour Merchant Bay (style Inventory / Main Console) */
.market-stats-page .market-stats-merchant-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  margin: 0;
  padding: 0.54rem 0.9rem;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid rgba(120, 200, 255, 0.55);
  background: radial-gradient(circle at 30% 20%, rgba(100, 180, 255, 0.24), rgba(0, 42, 82, 0.92));
  color: rgba(210, 235, 255, 0.98);
  font-family: "Chakra Petch", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}
.market-stats-page .market-stats-merchant-back-icon {
  flex: 0 0 auto;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.92;
}
.market-stats-page .market-stats-merchant-back-label {
  flex: 0 1 auto;
  min-width: 0;
}
.market-stats-page .market-stats-merchant-back:hover {
  color: #fff;
  background: radial-gradient(circle at 30% 20%, rgba(130, 200, 255, 0.32), rgba(0, 58, 108, 0.95));
  border-color: rgba(140, 220, 255, 0.78);
  box-shadow:
    0 4px 14px rgba(80, 160, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}
.market-stats-page .market-stats-merchant-back:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(4, 12, 28, 0.95),
    0 0 0 4px rgba(120, 200, 255, 0.42);
}
.market-stats-page .market-stats-merchant-back--mobile {
  display: none;
}
.market-stats-page .market-stats-merchant-back--desktop {
  display: inline-flex;
}
.market-stats-page .market-stats-sidebar-top {
  display: none;
}

/* Market Stats — en-tête titre */
.market-stats-page .market-stats-header {
  margin-bottom: 0.75rem;
}
.market-stats-page .market-stats-header .page-titre {
  margin: 0;
}

.app-stats-page .market-stats-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(120, 200, 255, 0.55);
  background: radial-gradient(circle at 30% 20%, rgba(100, 180, 255, 0.24), rgba(0, 42, 82, 0.92));
  color: rgba(210, 235, 255, 0.98);
  text-decoration: none;
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}
.app-stats-page .market-stats-back-btn-icon {
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 400;
}
.app-stats-page .market-stats-back-btn:hover {
  color: #fff;
  border-color: rgba(140, 220, 255, 0.78);
  background: radial-gradient(circle at 30% 20%, rgba(130, 200, 255, 0.32), rgba(0, 58, 108, 0.95));
}
.app-stats-page .market-stats-back-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(4, 12, 28, 0.95), 0 0 0 4px rgba(120, 200, 255, 0.4);
}
.market-sidebar {
  flex: 0 0 250px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Filtres (schéma / rareté / étoile) : desktop = panneau toujours ouvert ; mobile = accordéon */
.market-filters-toggle {
  display: none;
  position: relative;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.65rem 2.35rem 0.65rem 0.9rem;
  margin: 0;
  border-radius: 10px;
  border: 1px solid rgba(120, 200, 255, 0.38);
  background: radial-gradient(circle at 0 0, rgba(100, 180, 255, 0.2), rgba(0, 8, 22, 0.92));
  color: #eaf4ff;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.42);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.market-filters-toggle:hover {
  border-color: rgba(160, 220, 255, 0.55);
  background: radial-gradient(circle at 0 0, rgba(120, 200, 255, 0.26), rgba(0, 12, 28, 0.95));
}
.market-filters-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(4, 12, 28, 0.95), 0 0 0 4px rgba(120, 200, 255, 0.4);
}
.market-filters-toggle-label {
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.03em;
}
.market-filters-toggle-hint {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(180, 210, 245, 0.75);
}
.market-filters-toggle-chevron {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.65rem;
  opacity: 0.9;
  transition: transform 0.2s ease;
}
.market-filters-toggle[aria-expanded="true"] .market-filters-toggle-chevron {
  transform: translateY(-50%) rotate(180deg);
}

.market-filters-panel {
  display: contents;
}

.market-encart {
  background: radial-gradient(circle at 0 0, rgba(100, 180, 255, 0.16), rgba(0, 7, 26, 0.9));
  border: 1px solid rgba(120, 200, 255, 0.35);
  border-radius: 10px;
  padding: 0.9rem 1rem 1rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}
.market-encart-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #eee;
}
.market-schema-box {
  margin-top: 0.5rem;
  padding: 0.75rem;
  border-radius: 6px;
  background: rgba(0, 10, 20, 0.85);
  border: 1px solid rgba(0, 40, 70, 0.6);
}
.market-select {
  width: 100%;
  padding: 0.5rem 0.6rem;
  font-size: 0.95rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 78, 146, 0.6);
  background: rgba(0, 15, 26, 0.85);
  color: #ddd;
}
.market-select:focus {
  outline: none;
  border-color: #004e92;
  box-shadow: 0 0 0 2px rgba(0, 78, 146, 0.3);
}
.market-schema-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 280px;
  overflow-y: auto;
}
.market-schema-list--max-4 {
  max-height: 9rem;
}
.market-schema-item {
  padding: 0.4rem 0.6rem;
  margin-bottom: 0.25rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #ccc;
  background: rgba(0, 15, 26, 0.5);
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.market-schema-item:hover {
  background: rgba(0, 78, 146, 0.2);
  color: #eee;
  border-color: rgba(0, 78, 146, 0.4);
}
.market-schema-item:focus {
  outline: none;
  border-color: #004e92;
  box-shadow: 0 0 0 2px rgba(0, 78, 146, 0.3);
}
.market-schema-item.selected {
  background: rgba(0, 78, 146, 0.35);
  border-color: #004e92;
  color: #fff;
}
.market-schema-loading,
.market-schema-error {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: #aaa;
}
.market-schema-error {
  color: #e88;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* === Market Stats: sort bar === */
.market-sort-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.market-stats-page .market-sort-bar {
  margin-bottom: 1.35rem;
}
.market-sort-label {
  font-size: 0.95rem;
  color: #bbb;
}
.market-sort-select {
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 78, 146, 0.6);
  background: rgba(0, 15, 26, 0.85);
  color: #ddd;
  min-width: 10rem;
}
.market-sort-select:focus {
  outline: none;
  border-color: #004e92;
  box-shadow: 0 0 0 2px rgba(0, 78, 146, 0.3);
}

/* === Market Stats: template cards (main content) === */
.market-templates-wrap {
  margin-top: 1rem;
}
.market-templates-loading,
.market-templates-empty {
  color: rgba(190, 210, 235, 0.72);
  margin: 0.5rem 0;
}
.market-templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: 1.35rem;
  margin-top: 0.5rem;
}
.market-template-card {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 180px;
  background: radial-gradient(circle at 0 0, rgba(100, 180, 255, 0.14), rgba(0, 6, 22, 0.92));
  border: 1px solid rgba(120, 200, 255, 0.22);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.42);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.market-template-card:hover {
  border-color: rgba(140, 210, 255, 0.42);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(100, 180, 255, 0.12);
  transform: translateY(-1px);
}
.market-template-card.market-template-card--deeplink {
  outline: 2px solid rgba(130, 210, 255, 0.88);
  outline-offset: 2px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(120, 200, 255, 0.35);
}
.market-template-card-title-wrap {
  position: relative;
}
.market-template-card-info-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 1px solid rgba(120, 200, 255, 0.5);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, rgba(120, 200, 255, 0.35), rgba(0, 40, 80, 0.85));
  color: #eaf4ff;
  font-size: 0.85rem;
  font-weight: 600;
  font-style: italic;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.market-template-card-info-btn:hover {
  border-color: rgba(180, 230, 255, 0.75);
  background: radial-gradient(circle at 30% 25%, rgba(160, 220, 255, 0.45), rgba(0, 70, 120, 0.9));
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 40, 80, 0.45);
  transform: scale(1.06);
}
.market-template-card-info-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 20, 40, 0.9), 0 0 0 4px rgba(120, 200, 255, 0.45);
}
.market-template-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: radial-gradient(circle at 0% 0%, rgba(90, 160, 240, 0.2), rgba(4, 10, 26, 0.98));
  border-radius: 10px;
  padding: 1.05rem 1.2rem 1.1rem;
  display: flex;
  flex-direction: column;
  overflow: auto;
  border: 1px solid rgba(120, 200, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.market-template-card-overlay[hidden] {
  display: none !important;
}
.market-template-card-overlay-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #eaf4ff;
  margin-bottom: 0.75rem;
  padding-right: 2rem;
  letter-spacing: 0.02em;
}
.market-template-card-overlay-content {
  flex: 1 1 auto;
  font-size: 0.9rem;
  color: rgba(208, 221, 255, 0.88);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
}
.market-template-card-overlay-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 1px solid rgba(120, 200, 255, 0.45);
  border-radius: 8px;
  background: radial-gradient(circle at 50% 0, rgba(80, 150, 220, 0.25), rgba(0, 25, 50, 0.92));
  color: #d9f1ff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.market-template-card-overlay-close:hover {
  border-color: rgba(180, 230, 255, 0.65);
  background: radial-gradient(circle at 50% 0, rgba(120, 200, 255, 0.35), rgba(0, 50, 90, 0.95));
  color: #fff;
  transform: scale(1.05);
}
.market-template-card-overlay-close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(120, 200, 255, 0.4);
}
.market-template-card-image-wrap {
  flex: 0 0 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 0%, rgba(60, 130, 210, 0.12), rgba(0, 8, 20, 0.95));
  border-right: 1px solid rgba(120, 200, 255, 0.15);
  min-height: 180px;
}
.market-template-card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 220px;
}
.market-template-card-image[data-placeholder="1"] {
  opacity: 0.4;
  background: repeating-linear-gradient(
    -45deg,
    rgba(40, 90, 140, 0.28),
    rgba(40, 90, 140, 0.28) 8px,
    rgba(20, 60, 100, 0.2) 8px,
    rgba(20, 60, 100, 0.2) 16px
  );
}
.market-template-card-info {
  flex: 1 1 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.market-template-card-title {
  padding: 1rem 2.5rem 0.75rem;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
  color: #eaf4ff;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(120, 200, 255, 0.22);
  line-height: 1.3;
  word-break: break-word;
}
.market-template-card-body {
  display: flex;
  flex-direction: row;
  flex: 1 1 auto;
  min-height: 0;
}
.market-template-card-market-col {
  flex: 1 1 50%;
  min-width: 0;
  padding: 0.75rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-right: 1px solid rgba(120, 200, 255, 0.18);
}
.market-template-card-market-col--cheaper {
  background: radial-gradient(circle at 0 0, rgba(34, 197, 94, 0.18), rgba(0, 30, 24, 0.5));
  border-right-color: rgba(72, 200, 130, 0.45);
}
.market-template-card-crafting-col--cheaper {
  background: radial-gradient(circle at 100% 0, rgba(34, 197, 94, 0.18), rgba(0, 30, 24, 0.5));
}
.market-template-card-crafting-col {
  flex: 1 1 50%;
  min-width: 0;
  padding: 0.75rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.market-template-card-market-block {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.market-template-card-market-block .market-template-card-section-title {
  margin-bottom: 0.2rem;
}
.market-template-card-market-block .market-template-card-lowest-price {
  margin-top: 0.15rem;
}
.market-template-card-section-title {
  display: block;
  color: rgba(208, 221, 255, 0.92);
  font-weight: 500;
  margin-bottom: 0.2rem;
  font-size: 0.85rem;
}
.market-template-card-lowest-price {
  font-size: 0.9rem;
  color: rgba(180, 200, 230, 0.65);
  margin-top: 0;
}
.market-template-card-lowest-value {
  color: #eaf4ff;
  font-weight: 500;
}
.market-template-card-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.market-template-card-atomic-prices {
  font-size: 0.85rem;
  color: rgba(180, 200, 230, 0.68);
  margin-top: 0.35rem;
}
.market-template-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 5.5rem;
  padding: 0.48rem 0.85rem;
  border-radius: 8px;
  font-family: var(--font-display, "Chakra Petch", sans-serif);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: #cfe6ff;
  border: 1px solid rgba(120, 170, 220, 0.38);
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(18, 42, 72, 0.88), rgba(8, 20, 40, 0.95));
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease,
    opacity 0.15s ease;
}
.market-template-card-btn:hover {
  opacity: 1;
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(28, 58, 96, 0.95), rgba(12, 30, 56, 0.98));
  border-color: rgba(160, 210, 255, 0.55);
}
.market-template-card-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(4, 12, 28, 0.95),
    0 0 0 4px rgba(100, 180, 255, 0.4);
}
/* AtomicHub — teinte ambre (style Clear Blend Sphere) */
.market-template-card-btn-atomic {
  color: #ffe8c8;
  background: radial-gradient(circle at 30% 20%, rgba(255, 170, 80, 0.28), rgba(42, 24, 6, 0.88));
  border: 1px solid rgba(255, 170, 90, 0.5);
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.market-template-card-btn-atomic:hover {
  background: radial-gradient(circle at 30% 20%, rgba(255, 186, 100, 0.4), rgba(58, 32, 8, 0.94));
  border-color: rgba(255, 190, 110, 0.72);
  box-shadow:
    0 4px 16px rgba(255, 140, 40, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
/* F12 — cyan (style Buy Blend Sphere) */
.market-template-card-btn-f12key {
  color: #e8fbff;
  background: radial-gradient(circle at 30% 20%, rgba(100, 230, 255, 0.28), rgba(6, 48, 62, 0.88));
  border: 1px solid rgba(120, 230, 255, 0.55);
  box-shadow:
    0 2px 12px rgba(0, 40, 60, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.market-template-card-btn-f12key:hover {
  background: radial-gradient(circle at 30% 20%, rgba(130, 240, 255, 0.4), rgba(8, 62, 78, 0.95));
  border-color: rgba(160, 245, 255, 0.75);
  box-shadow:
    0 4px 16px rgba(40, 180, 220, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
/* Blend — violet doux (même language Clear/Buy) */
.market-template-card-btn-blend-sphere {
  color: #f0e8ff;
  background: radial-gradient(circle at 30% 20%, rgba(180, 140, 255, 0.28), rgba(28, 14, 48, 0.88));
  border: 1px solid rgba(180, 150, 255, 0.5);
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.market-template-card-btn-blend-sphere:hover {
  background: radial-gradient(circle at 30% 20%, rgba(200, 160, 255, 0.4), rgba(40, 20, 64, 0.94));
  border-color: rgba(210, 175, 255, 0.72);
  box-shadow:
    0 4px 16px rgba(140, 90, 220, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.market-template-card-btn-blend-sphere--mint-cap {
  color: rgba(210, 220, 235, 0.78);
  background: linear-gradient(180deg, rgba(48, 52, 64, 0.9), rgba(24, 26, 34, 0.95));
  border-color: rgba(120, 130, 150, 0.35);
  box-shadow: none;
  filter: grayscale(0.28);
  cursor: pointer;
}
.market-template-card-btn-blend-sphere--mint-cap:hover {
  opacity: 0.88;
  transform: none;
  box-shadow: none;
}
/* Ascend — doré (style Confirm Blend Sphere) */
.market-template-card-btn-ascend {
  color: #ffe8c8;
  background: radial-gradient(circle at 30% 20%, rgba(255, 186, 100, 0.32), rgba(38, 22, 0, 0.82));
  border: 1px solid rgba(255, 186, 100, 0.6);
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.market-template-card-btn-ascend:hover {
  background: radial-gradient(circle at 30% 20%, rgba(255, 200, 120, 0.45), rgba(58, 34, 4, 0.92));
  border-color: rgba(255, 210, 140, 0.8);
  box-shadow:
    0 4px 16px rgba(255, 150, 50, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.market-template-card-btn-ascend:focus-visible {
  box-shadow:
    0 0 0 2px rgba(4, 12, 28, 0.95),
    0 0 0 4px rgba(255, 186, 100, 0.48);
}
/* Sacrifice — rouge/ambre */
.market-template-card-btn-sacrifice {
  color: #ffe0e0;
  background: radial-gradient(circle at 30% 20%, rgba(255, 120, 100, 0.32), rgba(48, 12, 8, 0.88));
  border: 1px solid rgba(255, 140, 120, 0.55);
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.market-template-card-btn-sacrifice:hover {
  background: radial-gradient(circle at 30% 20%, rgba(255, 140, 120, 0.42), rgba(64, 16, 10, 0.94));
  border-color: rgba(255, 160, 140, 0.75);
  box-shadow:
    0 4px 16px rgba(220, 80, 60, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.market-template-card-crafting-buttons {
  align-items: center;
  margin-top: 0.45rem;
}
.market-template-card-mint-cap-msg {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  color: #ff5c5c;
  line-height: 1.2;
}
.market-template-card-crafting {
  font-size: 0.85rem;
  color: rgba(180, 200, 230, 0.68);
  margin-top: 0.35rem;
}
.market-template-card-loot {
  margin-top: 0.5rem;
}
.market-template-card-loot-outcomes {
  display: block;
  margin-top: 0.2rem;
  line-height: 1.5;
}
.market-template-card-loot-outcome {
  display: inline;
}
.market-template-card-loot-outcome + .market-template-card-loot-outcome {
  margin-left: 0.15rem;
}
.market-template-card-loot-name {
  color: rgba(200, 218, 245, 0.85);
}
.market-template-card-loot-pct {
  color: #eaf4ff;
  font-weight: 500;
}
.market-template-card-loot-avg {
  margin-top: 0.2rem;
}
.market-template-card-price-detail {
  margin-top: 0.45rem;
}
.market-template-card-price-detail-summary {
  display: inline-block;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(160, 210, 255, 0.92);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  list-style: none;
}
.market-template-card-price-detail-summary::-webkit-details-marker {
  display: none;
}
.market-template-card-price-detail-summary::after {
  content: " ▾";
  font-size: 0.75em;
  opacity: 0.85;
}
.market-template-card-price-detail[open] .market-template-card-price-detail-summary::after {
  content: " ▴";
}
.market-template-card-price-detail-summary:hover {
  color: #fff;
}
.market-template-card-price-detail-body {
  margin-top: 0.35rem;
}
.market-template-card-price-detail-body .market-template-card-crafting-line,
.market-template-card-price-detail-body .market-template-card-loot-outcomes {
  display: block;
  margin-top: 0.35rem;
}
.market-template-card-price-detail-body .market-template-card-crafting-line:first-child,
.market-template-card-price-detail-body .market-template-card-loot-outcomes:first-child {
  margin-top: 0;
}
.market-template-card-crafting-total-line {
  margin-top: 0.2rem;
}
.market-template-card-crafting-line {
  display: block;
  color: rgba(200, 218, 245, 0.82);
  margin-top: 0.15rem;
}
.market-template-card-crafting-price {
  color: rgba(220, 235, 255, 0.95);
  font-weight: 500;
}
.market-template-card-crafting-ownhint {
  display: inline;
  font-size: 0.78em;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(120, 226, 178, 0.92);
}
.market-template-card-inline-link {
  color: rgba(160, 210, 255, 0.95);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}
.market-template-card-inline-link:hover {
  color: #fff;
}
.market-template-card-crafting-total {
  display: block;
  color: rgba(180, 200, 230, 0.72);
  margin-top: 0.35rem;
  font-weight: 500;
}
.market-template-card-crafting-total .market-template-card-crafting-price {
  color: #eaf4ff;
}
.market-template-card-rows {
  padding: 0.5rem 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  justify-content: flex-start;
}
.market-template-card-row {
  display: flex;
  align-items: baseline;
  gap: 0;
  min-height: 1.35rem;
  font-size: 0.9rem;
}
.market-template-card-label {
  flex: 0 0 4rem;
  min-width: 0;
  font-size: 0.9rem;
  color: rgba(180, 200, 230, 0.68);
}
.market-template-card-value {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.9rem;
  color: rgba(220, 235, 255, 0.92);
  word-break: break-word;
}

/* === Market Stats: price-over-time chart modal === */
.market-chart-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.market-chart-overlay[hidden] {
  display: none !important;
}
.market-chart-modal {
  background: rgba(0, 30, 50, 0.98);
  border: 1px solid rgba(0, 78, 146, 0.6);
  border-radius: 12px;
  max-width: 90vw;
  width: 640px;
  max-height: 96vh;
  min-height: max(480px, 52vh);
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.market-chart-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(0, 78, 146, 0.5);
}
.market-chart-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #eee;
}
.market-chart-close {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  background: rgba(0, 40, 70, 0.6);
  color: #ccc;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.market-chart-close:hover {
  background: rgba(0, 78, 146, 0.5);
  color: #fff;
}
.market-chart-modal-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding: 1.25rem;
  position: relative;
}
.market-chart-loading,
.market-chart-empty {
  color: #aaa;
  margin: 0;
  font-size: 0.95rem;
}
.market-chart-empty {
  color: #888;
}
.market-chart-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
  flex-shrink: 0;
}
.market-chart-period-row,
.market-chart-currency-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.1rem;
}
.market-chart-period-label {
  font-size: 0.9rem;
  color: #bbb;
  margin-right: 0.15rem;
  flex-shrink: 0;
}
.market-chart-period-btn {
  flex-shrink: 0;
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 78, 146, 0.6);
  background: rgba(0, 15, 26, 0.85);
  color: #ccc;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.market-chart-period-btn:hover {
  background: rgba(0, 78, 146, 0.25);
  color: #eee;
  border-color: rgba(0, 78, 146, 0.8);
}
.market-chart-period-btn.active {
  background: rgba(0, 78, 146, 0.4);
  border-color: #004e92;
  color: #fff;
}
.market-chart-currency-btn {
  flex-shrink: 0;
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 78, 146, 0.6);
  background: rgba(0, 15, 26, 0.85);
  color: #ccc;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.market-chart-currency-btn:hover {
  background: rgba(0, 78, 146, 0.25);
  color: #eee;
  border-color: rgba(0, 78, 146, 0.8);
}
.market-chart-currency-btn.active {
  background: rgba(0, 78, 146, 0.4);
  border-color: #004e92;
  color: #fff;
}
.market-chart-wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1 1 auto;
  min-height: 320px;
  max-height: min(78vh, 720px);
  position: relative;
  box-sizing: border-box;
  padding: 0.75rem 1rem 1rem;
  background: radial-gradient(circle at 0 0, rgba(100, 180, 255, 0.12), rgba(0, 7, 26, 0.9));
  border-radius: 10px;
  border: 1px solid rgba(120, 200, 255, 0.28);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}
.market-chart-modal-body > .market-chart-wrap {
  flex: 1 1 auto;
  max-height: none;
}
.market-chart-canvas-host {
  position: relative;
  flex: 1 1 auto;
  min-height: 260px;
  width: 100%;
  overflow: hidden;
}
.market-chart-wrap canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

/* === Market Stats: ventes par jour, cap et devises === */
.market-sales-by-day-encart {
  margin-bottom: 1.5rem;
  padding: 1rem;
}
.market-cap-section {
  margin-top: 2rem;
  background: rgba(0, 30, 50, 0.4);
  border: 1px solid rgba(0, 78, 146, 0.35);
  border-radius: 8px;
}
.market-sales-by-day-title {
  margin: 0 0 0.75rem 0;
  font-size: 1.1rem;
  color: #ddd;
}
.market-sales-by-day-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.market-by-day-mode-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.market-by-day-mode-btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  background: rgba(0, 78, 146, 0.2);
  border: 1px solid rgba(0, 78, 146, 0.5);
  border-radius: 4px;
  color: #bbb;
  cursor: pointer;
}
.market-by-day-mode-btn:hover {
  background: rgba(0, 78, 146, 0.25);
  color: #eee;
}
.market-by-day-mode-btn.active {
  background: rgba(0, 78, 146, 0.4);
  border-color: #004e92;
  color: #fff;
}
.market-by-day-currency-btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  background: rgba(0, 78, 146, 0.2);
  border: 1px solid rgba(0, 78, 146, 0.5);
  border-radius: 4px;
  color: #bbb;
  cursor: pointer;
}
.market-by-day-currency-btn:hover {
  background: rgba(0, 78, 146, 0.25);
  color: #eee;
}
.market-by-day-currency-btn.active {
  background: rgba(0, 78, 146, 0.4);
  border-color: #004e92;
  color: #fff;
}
.market-cap-mode-btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  background: rgba(0, 78, 146, 0.2);
  border: 1px solid rgba(0, 78, 146, 0.5);
  border-radius: 4px;
  color: #bbb;
  cursor: pointer;
}
.market-cap-mode-btn:hover {
  background: rgba(0, 78, 146, 0.25);
  color: #eee;
}
.market-cap-mode-btn.active {
  background: rgba(0, 78, 146, 0.4);
  border-color: #004e92;
  color: #fff;
}
.market-cap-breakdown-btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  background: rgba(0, 78, 146, 0.2);
  border: 1px solid rgba(0, 78, 146, 0.5);
  border-radius: 4px;
  color: #bbb;
  cursor: pointer;
}
.market-cap-breakdown-btn:hover {
  background: rgba(0, 78, 146, 0.25);
  color: #eee;
}
.market-cap-breakdown-btn.active {
  background: rgba(0, 78, 146, 0.4);
  border-color: #004e92;
  color: #fff;
}
.market-cap-view-select,
.market-cap-schema-unit-select {
  padding: 0.4rem 0.65rem;
  font-size: 0.9rem;
  background: rgba(8, 18, 32, 0.92);
  border: 1px solid rgba(0, 78, 146, 0.55);
  border-radius: 4px;
  color: #eaf4ff;
  cursor: pointer;
  min-width: 11rem;
  max-width: 100%;
}
.market-cap-view-select:focus,
.market-cap-schema-unit-select:focus {
  outline: 2px solid rgba(100, 180, 255, 0.55);
  outline-offset: 1px;
}
.market-cap-currency-btn.is-disabled,
.market-cap-currency-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.to-naron-ratio-mode-btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  background: rgba(0, 78, 146, 0.2);
  border: 1px solid rgba(0, 78, 146, 0.5);
  border-radius: 4px;
  color: #bbb;
  cursor: pointer;
}
.to-naron-ratio-mode-btn:hover {
  background: rgba(0, 78, 146, 0.25);
  color: #eee;
}
.to-naron-ratio-mode-btn.active {
  background: rgba(0, 78, 146, 0.4);
  border-color: #004e92;
  color: #fff;
}
.market-ratio-agg-btn,
.market-ratio-out-agg-btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  background: rgba(0, 78, 146, 0.2);
  border: 1px solid rgba(0, 78, 146, 0.5);
  border-radius: 4px;
  color: #bbb;
  cursor: pointer;
}
.market-ratio-agg-btn:hover,
.market-ratio-out-agg-btn:hover {
  background: rgba(0, 78, 146, 0.25);
  color: #eee;
}
.market-ratio-agg-btn.active,
.market-ratio-out-agg-btn.active {
  background: rgba(0, 78, 146, 0.4);
  border-color: #004e92;
  color: #fff;
}
.market-sales-currency-btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  background: rgba(0, 78, 146, 0.2);
  border: 1px solid rgba(0, 78, 146, 0.5);
  border-radius: 4px;
  color: #bbb;
  cursor: pointer;
}
.market-sales-currency-btn:hover {
  background: rgba(0, 78, 146, 0.25);
  color: #eee;
}
.market-sales-currency-btn.active {
  background: rgba(0, 78, 146, 0.4);
  border-color: #004e92;
  color: #fff;
}
.drops-currency-btn,
.total-currency-btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  background: rgba(0, 78, 146, 0.2);
  border: 1px solid rgba(0, 78, 146, 0.5);
  border-radius: 4px;
  color: #bbb;
  cursor: pointer;
}
.drops-currency-btn:hover,
.total-currency-btn:hover {
  background: rgba(0, 78, 146, 0.25);
  color: #eee;
}
.drops-currency-btn.active,
.total-currency-btn.active {
  background: rgba(0, 78, 146, 0.4);
  border-color: #004e92;
  color: #fff;
}
.market-cap-currency-btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  background: rgba(0, 78, 146, 0.2);
  border: 1px solid rgba(0, 78, 146, 0.5);
  border-radius: 4px;
  color: #bbb;
  cursor: pointer;
}
.market-cap-currency-btn:hover {
  background: rgba(0, 78, 146, 0.25);
  color: #eee;
}
.market-cap-currency-btn.active {
  background: rgba(0, 78, 146, 0.4);
  border-color: #004e92;
  color: #fff;
}
.theoretical-cap-currency-btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  background: rgba(0, 78, 146, 0.2);
  border: 1px solid rgba(0, 78, 146, 0.5);
  border-radius: 4px;
  color: #bbb;
  cursor: pointer;
}
.theoretical-cap-currency-btn:hover {
  background: rgba(0, 78, 146, 0.25);
  color: #eee;
}
.theoretical-cap-currency-btn.active {
  background: rgba(0, 78, 146, 0.4);
  border-color: #004e92;
  color: #fff;
}
.market-sales-by-day-wrap {
  width: 100%;
  height: 280px;
  position: relative;
  box-sizing: border-box;
  padding: 0.75rem 1rem 1rem;
  background: radial-gradient(circle at 0 0, rgba(100, 180, 255, 0.12), rgba(0, 7, 26, 0.9));
  border-radius: 10px;
  border: 1px solid rgba(120, 200, 255, 0.28);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}
.market-sales-by-day-wrap canvas {
  max-width: 100%;
  max-height: 100%;
}

.to-mint-burn-filters {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  background: rgba(8, 22, 42, 0.55);
  border: 1px solid rgba(80, 140, 200, 0.22);
}
.to-mint-burn-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.to-mint-burn-filter-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(170, 200, 235, 0.88);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.to-mint-burn-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.to-mint-burn-chip {
  border: 1px solid rgba(100, 160, 220, 0.35);
  background: rgba(12, 28, 48, 0.72);
  color: rgba(200, 220, 245, 0.9);
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.to-mint-burn-chip:hover {
  border-color: rgba(255, 186, 100, 0.55);
  color: #fff;
}
.to-mint-burn-chip.is-active {
  background: rgba(255, 186, 100, 0.18);
  border-color: rgba(255, 186, 100, 0.65);
  color: #ffe8c8;
}
.to-mint-burn-clear-btn {
  align-self: flex-start;
  margin-top: 0.15rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(100, 160, 220, 0.35);
  background: transparent;
  color: rgba(190, 210, 235, 0.9);
  font-size: 0.82rem;
  cursor: pointer;
}
.to-mint-burn-clear-btn:hover {
  border-color: rgba(255, 186, 100, 0.5);
  color: #fff;
}
.to-mint-burn-filter-empty {
  font-size: 0.82rem;
  color: rgba(150, 180, 215, 0.65);
}
.to-chart-export-bar {
  margin: 0.45rem 0 0;
}
.to-chart-export-csv-btn {
  padding: 0.32rem 0.65rem;
  font-size: 0.82rem;
  border-radius: 4px;
  border: 1px solid rgba(120, 200, 255, 0.45);
  background: rgba(0, 78, 146, 0.25);
  color: rgba(230, 240, 255, 0.95);
  cursor: pointer;
}
.to-chart-export-csv-btn:hover {
  background: rgba(0, 78, 146, 0.4);
  color: #fff;
}

