#rs-inspect {
    background: #111827;
    border-radius: 12px;
    overflow: hidden;
    margin: 0;
}

/* ── Panel ──────────────────────────────────── */
.rs-panel  { display: none; }
.rs-panel--active { display: block; }
.rs-hidden { display: none !important; }

/* ── Wear ───────────────────────────────────── */
#rs-canvas-wrap {
    position: relative;
    background: #0d1117;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
}
#rs-canvas {
    display: block;
    max-width: 100%;
    height: auto;
}
#rs-wear-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.55);
}
#rs-fallback {
    padding: 16px;
    text-align: center;
}
#rs-fallback img { max-width: 100%; border-radius: 8px; }
.rs-unavailable {
    color: #6b7280;
    font-size: 12px;
    margin-top: 6px;
}

/* ── Slider ─────────────────────────────────── */
#rs-slider-wrap {
    padding: 22px 16px 14px;
    position: relative;
}
#rs-tooltip {
    position: absolute;
    top: 5px;
    transform: translateX(-50%);
    background: #1f2937;
    border: 1px solid #374151;
    color: #f9fafb;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 5px;
    pointer-events: none;
    white-space: nowrap;
}
#rs-track {
    display: flex;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}
.rs-seg { display: block; }
.rs-fn { background: #22c55e; }
.rs-mw { background: #84cc16; }
.rs-ft { background: #eab308; }
.rs-ww { background: #f97316; }
.rs-bs { background: #ef4444; }

#rs-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
    cursor: pointer;
    margin: 0;
}
#rs-slider::-webkit-slider-runnable-track {
    height: 4px;
    background: #374151;
    border-radius: 2px;
}
#rs-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    margin-top: -6px;
    background: #f9fafb;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #3b82f6;
    cursor: pointer;
}
#rs-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #f9fafb;
    border-radius: 50%;
    border: none;
    box-shadow: 0 0 0 2px #3b82f6;
    cursor: pointer;
}

/* ── Spinner ────────────────────────────────── */
.rs-spinner {
    display: block;
    width: 32px;
    height: 32px;
    border: 3px solid #374151;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: rs-spin .75s linear infinite;
}
@keyframes rs-spin { to { transform: rotate(360deg); } }

/* ── Price-history chart card ──────────────────────────────────────────── */
.rs-ph-card {
  padding: 16px;
  background: #111827;
  border-radius: 12px;
  display: flex; flex-direction: column;
  gap: 12px;
}
.rs-ph-mkts {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.rs-ph-mkt {
  appearance: none;
  border: 1px solid #374151;
  background: #1f2937;
  color: #d1d5db;
  font-size: 12px; font-weight: 600;
  letter-spacing: .02em;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .14s, border-color .14s, color .14s;
}
.rs-ph-mkt:hover:not([disabled]) {
  background: #283042;
  border-color: #4b5563;
  color: #f3f4f6;
}
.rs-ph-mkt[disabled] {
  opacity: .35;
  cursor: not-allowed;
}
.rs-ph-mkt-active {
  background: #6366f1 !important;
  border-color: #6366f1 !important;
  color: #fff !important;
  box-shadow: 0 0 0 2px rgba(99,102,241,.25);
}

.rs-ph-periods {
  display: inline-flex;
  border: 1px solid #374151;
  border-radius: 8px;
  overflow: hidden;
  width: max-content;
}
.rs-ph-btn {
  appearance: none;
  border: 0;
  background: #1f2937;
  color: #9ca3af;
  font-size: 12px; font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
  border-right: 1px solid #374151;
  transition: background .14s, color .14s;
}
.rs-ph-btn:last-child { border-right: 0; }
.rs-ph-btn:hover { background: #283042; color: #f3f4f6; }
.rs-ph-active {
  background: #374151;
  color: #f3f4f6;
}

.rs-ph-stage {
  position: relative;
  width: 100%;
  height: 300px;
  border-radius: 8px;
  overflow: hidden;
  background: #0d1117;
}
.rs-ph-chart {
  width: 100%;
  height: 100%;
}
.rs-ph-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13,17,23,.7);
  color: #9ca3af;
}
.rs-ph-overlay > div {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 13px;
}
.rs-ph-empty p { margin: 0; }

/* Empty state for skins with zero tracked markets */
.rs-ph-empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 36px 24px;
  color: #9ca3af;
}
.rs-ph-empty-state svg { color: #4b5563; margin-bottom: 12px; }
.rs-ph-empty-state h4 {
  margin: 0 0 6px;
  font-family: var(--rsk-font-head, 'Rajdhani', sans-serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: #f3f4f6;
}
.rs-ph-empty-state p {
  margin: 0;
  font-size: 13px;
  max-width: 340px;
  line-height: 1.45;
}

/* ── Live market prices table ────────────────────────────── */
#rs-market-prices { margin-top: 0; }
#rs-mp-table-wrap {
  background: #111827;
  border-radius: 12px;
  overflow: hidden;
}
.rs-mp-state {
  padding: 24px;
  color: #6b7280;
  font-size: 14px;
  text-align: center;
}
#rs-mp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: #d1d5db;
}
#rs-mp-table thead th {
  background: #1f2937;
  padding: 10px 16px;
  text-align: left;
  font-weight: 600;
  color: #9ca3af;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
#rs-mp-table tbody tr {
  border-bottom: 1px solid #1f2937;
  transition: background .1s;
}
#rs-mp-table tbody tr:last-child { border-bottom: none; }
#rs-mp-table tbody tr:hover { background: rgba(255,255,255,.03); }
#rs-mp-table tbody td { padding: 12px 16px; }
.rs-mp-name  { font-weight: 600; color: #f3f4f6; }
.rs-mp-price { font-weight: 700; color: #34d399; font-size: 15px; font-feature-settings: "tnum"; }
.rs-mp-count { color: #6b7280; font-size: 13px; font-feature-settings: "tnum"; }
.rs-mp-buy {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(99,102,241,.15);
  border: 1px solid rgba(99,102,241,.35);
  border-radius: 6px;
  color: #a5b4fc;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.rs-mp-buy:hover {
  background: rgba(99,102,241,.28);
  border-color: #6366f1;
  color: #c7d2fe;
}

/* ── Price history chart layout ──────────────────────────── */
.rs-ph-controls {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  align-items: center;
  justify-content: space-between;
}
.rs-ph-markets, .rs-ph-periods {
  display: flex; gap: 6px; flex-wrap: wrap;
}
#rs-ph-wrap {
  position: relative;
  background: #111827;
  border-radius: 10px;
  overflow: hidden;
  min-height: 300px;
}
#rs-ph-chart { height: 300px; }
#rs-ph-empty, #rs-ph-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 14px;
  background: #111827;
  pointer-events: none;
}
