:root {
  --bg: #08090e;
  --bg-elevated: #11131c;
  --bg-card: #151824;
  --bg-card-hover: #1a1e2e;
  --border: #252a3d;
  --border-bright: #373f5c;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #8b5cf6;
  --accent-bright: #a78bfa;
  --accent-glow: rgba(139, 92, 246, 0.22);
  --cyan: #22d3ee;
  --green: #4ade80;
  --gold: #facc15;

  /* Minecraft Tooltip & Rarity Colors */
  --mc-rarity-common: #ffffff;
  --mc-rarity-uncommon: #ffff55;
  --mc-rarity-rare: #55ffff;
  --mc-rarity-epic: #ff55ff;
  --mc-enchant: #a8a8a8;
  --mc-lore: #aa00aa;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.65);
}

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

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(139, 92, 246, 0.12), transparent 38%),
    radial-gradient(circle at 85% 10%, rgba(34, 211, 238, 0.08), transparent 34%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

code,
kbd,
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.hidden {
  display: none !important;
}

.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 9, 14, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  padding-top: 10px;
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(34, 211, 238, 0.14));
  border: 1px solid var(--border-bright);
  border-radius: 10px;
}

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

.brand-name {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
}

.brand-plus {
  color: var(--accent-bright);
}

.brand-sub {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  font-weight: 600;
}

.search-wrap {
  position: relative;
  flex: 1 1 320px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--text-dim);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 40px;
  padding: 0 56px 0 38px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-input::placeholder {
  color: var(--text-dim);
}

.search-kbd {
  position: absolute;
  right: 10px;
  padding: 2px 7px;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: 5px;
  pointer-events: none;
}

.clear-search-btn {
  position: absolute;
  right: 10px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 6px;
  background: var(--border);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 13px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.nav-tab:hover {
  color: var(--text);
  border-color: var(--border-bright);
}

.nav-tab.active {
  background: rgba(139, 92, 246, 0.16);
  border-color: var(--accent);
  color: var(--text);
}

.nav-badge {
  font-size: 0.72rem;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.nav-badge.accent {
  background: rgba(139, 92, 246, 0.25);
  color: var(--accent-bright);
  border-color: rgba(139, 92, 246, 0.45);
}

/* Main Content */
.main-content {
  padding-top: 24px;
  padding-bottom: 84px;
}

/* Hero */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(21, 24, 36, 0.96), rgba(17, 19, 28, 0.92));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
}

.hero-left {
  max-width: 680px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 11px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: var(--accent-bright);
  font-size: 0.76rem;
  font-weight: 600;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.hero-title {
  margin: 0 0 6px;
  font-size: clamp(1.45rem, 2.5vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.93rem;
}

.hero-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-card {
  min-width: 112px;
  padding: 12px 16px;
  background: rgba(8, 9, 14, 0.65);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
}

.stat-label {
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Toolbar */
.toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.category-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.cat-pill:hover {
  color: var(--text);
  border-color: var(--border-bright);
}

.cat-pill.active {
  background: var(--accent);
  border-color: var(--accent-bright);
  color: #ffffff;
}

.cat-pill-count {
  font-size: 0.72rem;
  opacity: 0.85;
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.control-group {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.control-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 600;
}

.select-input {
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.83rem;
}

.select-input:focus {
  outline: none;
  border-color: var(--accent);
}

.btn-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-chip:hover {
  border-color: var(--border-bright);
  color: var(--text);
}

.btn-chip.active {
  background: rgba(250, 204, 21, 0.14);
  border-color: rgba(250, 204, 21, 0.55);
  color: var(--gold);
}

.btn-chip.compare-active {
  background: rgba(34, 211, 238, 0.14);
  border-color: rgba(34, 211, 238, 0.55);
  color: var(--cyan);
}

.view-toggle {
  margin-left: auto;
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.view-toggle .icon-btn {
  border: none;
  border-radius: 0;
}

.icon-btn:hover {
  color: var(--text);
  background: var(--bg-card-hover);
}

.icon-btn.active {
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent-bright);
}

.btn-primary {
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary:hover {
  background: #7c3aed;
}

.results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.link-btn {
  border: none;
  background: none;
  color: var(--accent-bright);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.link-btn:hover {
  text-decoration: underline;
}

/* Kit Grid & Cards */
.kit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.kit-grid.list-mode {
  grid-template-columns: 1fr;
}

.kit-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
  cursor: pointer;
}

.kit-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-bright);
  background: var(--bg-card-hover);
}

.kit-grid.list-mode .kit-card {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.kit-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.kit-card-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.kit-shulker-badge {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: rgba(8, 9, 14, 0.7);
  border: 1px solid var(--border-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kit-meta-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid var(--border-bright);
  background: rgba(8, 9, 14, 0.65);
  color: var(--text-muted);
}

.pill.featured {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(139, 92, 246, 0.5);
  color: var(--accent-bright);
}

.pill.version {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.35);
}

.kit-title {
  margin: 0;
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--text);
}

.kit-summary {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kit-card-actions-top {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.mini-action-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mini-action-btn:hover {
  border-color: var(--border-bright);
  color: var(--text);
}

.mini-action-btn.pinned {
  color: var(--gold);
  border-color: rgba(250, 204, 21, 0.5);
  background: rgba(250, 204, 21, 0.12);
}

.mini-action-btn.compared {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(34, 211, 238, 0.12);
}

/* Mini 27-slot Shulker Preview on Cards */
.mini-shulker-frame {
  padding: 6px;
  border-radius: 9px;
  background: #0d0f17;
  border: 1px solid var(--border);
}

.mini-shulker-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 3px;
}

.mini-slot {
  position: relative;
  aspect-ratio: 1;
  background: #171a26;
  border: 1px solid #232738;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mini-slot.match-highlight {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px var(--cyan);
  background: rgba(34, 211, 238, 0.12);
}

.mini-slot svg {
  width: 78%;
  height: 78%;
}

.mini-count {
  position: absolute;
  right: 2px;
  bottom: 0;
  font-size: 0.6rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 1px 1px 0 #000000;
  line-height: 1;
}

.kit-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(37, 42, 61, 0.65);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.inspect-cta {
  color: var(--accent-bright);
  font-weight: 700;
  font-size: 0.8rem;
}

/* Minecraft Slot Glint */
.enchanted-glint::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    125deg,
    transparent 20%,
    rgba(192, 132, 252, 0.22) 45%,
    rgba(240, 171, 252, 0.35) 50%,
    rgba(192, 132, 252, 0.22) 55%,
    transparent 80%
  );
  background-size: 220% 220%;
  animation: glintSweep 3.4s linear infinite;
  pointer-events: none;
}

@keyframes glintSweep {
  0% {
    background-position: 150% 150%;
  }
  100% {
    background-position: -50% -50%;
  }
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(4, 5, 10, 0.78);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-shell {
  width: 100%;
  max-width: 860px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.modal-shell-wide {
  max-width: 1120px;
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  background: rgba(17, 19, 28, 0.96);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-shulker-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-badges {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close-btn:hover {
  background: #ef444426;
  border-color: #ef444466;
}

.modal-body {
  padding: 20px 22px 24px;
}

.modal-summary {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.modal-tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.modal-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-tab {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
}

.modal-tab.active {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent);
  color: var(--text);
}

.slot-search-input {
  height: 34px;
  width: 220px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.82rem;
}

.slot-search-input:focus {
  outline: none;
  border-color: var(--cyan);
}

/* Authentic Minecraft Shulker GUI */
.mc-gui-frame {
  padding: 16px;
  background: #222634;
  border: 2px solid #3c435c;
  box-shadow: inset 0 2px 0 #4f5878, inset 0 -2px 0 #141620;
  border-radius: 10px;
}

.mc-gui-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #e2e8f0;
}

.mc-gui-slots-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.mc-shulker-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 6px;
}

.mc-slot {
  position: relative;
  aspect-ratio: 1;
  background: #10121a;
  border-top: 2px solid #090a10;
  border-left: 2px solid #090a10;
  border-right: 2px solid #383e54;
  border-bottom: 2px solid #383e54;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.08s ease, box-shadow 0.12s ease;
}

.mc-slot:hover,
.mc-slot.selected {
  background: #1b2030;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.mc-slot.highlighted {
  box-shadow: inset 0 0 0 2px var(--cyan), 0 0 12px rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.14);
}

.mc-slot.dimmed {
  opacity: 0.25;
}

.mc-slot svg {
  width: 74%;
  height: 74%;
  z-index: 1;
}

.mc-slot-count {
  position: absolute;
  right: 4px;
  bottom: 2px;
  z-index: 2;
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 1.5px 1.5px 0 #000000, -0.5px -0.5px 0 #000000;
  line-height: 1;
  pointer-events: none;
}

.slot-detail-bar {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 9px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

.slot-detail-hint {
  color: var(--text-dim);
}

/* Minecraft Floating Tooltip */
.mc-tooltip {
  position: fixed;
  z-index: 90;
  max-width: 300px;
  padding: 8px 11px;
  background: rgba(16, 0, 16, 0.94);
  border: 2px solid #28007f;
  box-shadow: 0 0 0 2px rgba(16, 0, 16, 0.95), 0 12px 28px rgba(0, 0, 0, 0.7);
  border-radius: 4px;
  pointer-events: none;
  font-size: 0.82rem;
  line-height: 1.38;
}

.mc-tt-name {
  font-weight: 700;
  margin-bottom: 3px;
}

.mc-tt-enchant {
  color: var(--mc-enchant);
}

.mc-tt-lore {
  color: #c084fc;
  font-style: italic;
  margin-top: 2px;
}

.mc-tt-id {
  color: #64748b;
  font-size: 0.72rem;
  margin-top: 4px;
}

.rarity-common { color: var(--mc-rarity-common); }
.rarity-uncommon { color: var(--mc-rarity-uncommon); }
.rarity-rare { color: var(--mc-rarity-rare); }
.rarity-epic { color: var(--mc-rarity-epic); }

/* Manifest Table */
.manifest-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 10px;
  flex-wrap: wrap;
}

.manifest-meta {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.manifest-table-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.manifest-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.manifest-table th,
.manifest-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.manifest-table th {
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.manifest-item-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Notes Card */
.notes-card {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.notes-card h3,
.notes-card h4 {
  margin: 0 0 8px;
}

.notes-card p {
  margin: 0 0 16px;
  color: var(--text-muted);
}

.notes-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.notes-meta-box {
  padding: 10px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.notes-meta-box span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.notes-meta-box strong {
  font-size: 0.9rem;
}

.tag-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
}

.tag-chip:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* Reverse Item Index */
.index-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.index-header h2 {
  margin: 0 0 4px;
}

.index-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.index-search-input {
  width: 280px;
}

.item-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
}

.index-card {
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.index-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.index-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.index-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #0e1018;
  border: 1px solid var(--border-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.index-kit-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.index-kit-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.76rem;
  cursor: pointer;
}

.index-kit-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* Compare Bar & Modal */
.compare-subtitle {
  margin: 4px 0 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.compare-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 16px;
  z-index: 45;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}

.compare-bar-inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: rgba(17, 19, 28, 0.96);
  border: 1px solid var(--accent);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7);
  border-radius: 12px;
  flex-wrap: wrap;
}

.compare-bar-items {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.compare-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  font-size: 0.8rem;
}

.compare-pill button {
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0;
}

.compare-bar-actions {
  display: flex;
  gap: 8px;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.compare-col {
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.compare-col h3 {
  margin: 0 0 8px;
  font-size: 0.98rem;
}

/* Empty State & Toast & Footer */
.empty-state {
  text-align: center;
  padding: 54px 20px;
  background: var(--bg-elevated);
  border: 1px dashed var(--border-bright);
  border-radius: var(--radius-lg);
}

.empty-icon {
  margin-bottom: 12px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 95;
  padding: 10px 16px;
  background: #181b29;
  border: 1px solid var(--accent);
  color: var(--text);
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.footer {
  border-top: 1px solid var(--border);
  background: rgba(8, 9, 14, 0.9);
  padding: 18px 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-note {
  color: var(--text-dim);
}

@media (max-width: 680px) {
  .mc-shulker-grid {
    gap: 4px;
  }
  .mc-slot-count {
    font-size: 0.66rem;
  }
  .modal-shell {
    max-height: 96vh;
  }
  .slot-search-input {
    width: 100%;
  }
}
