:root {
  --bg: #0a0708;
  --bg-soft: #14100f;
  --card: #181113;
  --card-hover: #221619;
  --border: #321f22;
  --text: #f0e7e8;
  --muted: #9c8a8c;
  --accent: #ff2435;
  --accent-2: #ff6a5e;
  --danger: #ff2435;
  --radius: 14px;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 36, 53, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 36, 53, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  z-index: 0;
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(10, 11, 15, 0.7);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--mono);
  font-weight: 800;
  font-size: 1.05rem;
}
.brand-mark { color: var(--accent); }
.accent { color: var(--accent); }
.top-nav { display: flex; gap: 22px; }
.top-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s;
}
.top-nav a:hover, .top-nav a.active { color: var(--text); }
.auth-btn { display: inline-flex; align-items: center; gap: 6px; font-family: var(--sans); font-size: 0.84rem; font-weight: 600;
  color: var(--muted); background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 5px 11px; cursor: pointer; transition: border-color .15s, color .15s; }
.auth-btn:hover { border-color: var(--accent); color: var(--text); }
.auth-btn svg { display: block; }
.auth-dot { width: 7px; height: 7px; border-radius: 50%; background: #5bd6a0; box-shadow: 0 0 6px #5bd6a0; }

/* sign-in modal (email/password + GitHub) */
.nftw-modal-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(6,7,10,.72); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.nftw-modal { width: 100%; max-width: 360px; background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 22px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.55); }
.nftw-modal-x { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.nftw-modal-x:hover { color: var(--text); }
.nftw-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.nftw-tab { flex: 1; padding: 8px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg); color: var(--muted);
  font-family: var(--sans); font-weight: 700; font-size: 0.86rem; cursor: pointer; transition: all .12s; }
.nftw-tab.on { border-color: var(--accent); background: rgba(228,75,75,.14); color: #ff8a82; }
.nftw-form { display: flex; flex-direction: column; gap: 11px; }
.nftw-form label { display: flex; flex-direction: column; gap: 5px; font-size: 0.76rem; color: var(--muted); font-weight: 600; }
.nftw-form input { padding: 9px 11px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 0.92rem; }
.nftw-form input:focus { outline: none; border-color: var(--accent); }
.nftw-submit { margin-top: 3px; }
.nftw-err { color: #ff8a82; font-size: 0.8rem; margin: 0; line-height: 1.4; }
.nftw-hint { color: var(--muted); font-size: 0.74rem; margin: 0; line-height: 1.4; }
.nftw-forgot { background: none; border: 0; color: var(--accent); font-size: 0.78rem; cursor: pointer; padding: 2px; align-self: flex-start; }
.nftw-forgot:hover { text-decoration: underline; }
.nftw-or { display: flex; align-items: center; text-align: center; gap: 10px; margin: 16px 0 12px; color: var(--muted); font-size: 0.74rem; }
.nftw-or::before, .nftw-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.nftw-github { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.nftw-h { margin: 0 0 6px; font-size: 1.1rem; }
.nftw-back { align-self: center; margin-top: 2px; }

/* recovery codes (modal + profile) */
.nftw-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin: 12px 0; }
.nftw-codes code { font-family: var(--mono); font-size: 0.86rem; letter-spacing: .04em; background: var(--bg); border: 1px solid var(--border);
  border-radius: 7px; padding: 7px 6px; text-align: center; color: var(--text); user-select: all; }
.nftw-codes-actions { display: flex; gap: 8px; margin-bottom: 12px; }
.nftw-copy, .nftw-dl { flex: 1; padding: 7px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--muted); font-size: 0.8rem; cursor: pointer; }
.nftw-copy:hover, .nftw-dl:hover { border-color: var(--accent); color: var(--text); }
.nftw-done { width: 100%; }

/* header avatar thumbnail */
.auth-av { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; margin: -6px 2px -6px -6px; border: 1px solid var(--border); }
/* switch between sign in / create account inside the modal */
.nftw-switch { text-align: center; font-size: 0.8rem; color: var(--muted); margin: 12px 0 0; }
.nftw-swap { background: none; border: 0; color: var(--accent); font-size: 0.8rem; font-weight: 700; cursor: pointer; padding: 0; }
.nftw-swap:hover { text-decoration: underline; }

/* avatar crop editor */
.prof-editor { max-width: 340px; }
.prof-stage { width: 280px; height: 280px; max-width: 100%; display: block; margin: 4px auto 12px; border-radius: 12px;
  background: #0f1114; cursor: grab; touch-action: none; }
.prof-stage:active { cursor: grabbing; }
.prof-slider { display: flex; align-items: center; gap: 10px; font-size: 0.76rem; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.prof-slider input[type="range"] { flex: 1; accent-color: var(--accent); }
.prof-editor-btns { display: flex; gap: 7px; margin: 10px 0 14px; }
.prof-editor-btns .btn { flex: 1; padding: 7px 4px; font-size: 0.78rem; }
.prof-editor-actions { display: flex; gap: 8px; }
.prof-editor-actions .btn { flex: 1; }

/* profile page */
.prof-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: start; }
.prof-card h2 { margin: 0 0 10px; font-size: 1rem; }
.prof-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.prof-avatar { width: 88px; height: 88px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; border: 2px solid var(--border); background: var(--bg-soft); display: grid; place-items: center; }
.prof-avatar img { width: 100%; height: 100%; object-fit: cover; }
.prof-avatar-ph { font-family: var(--mono); font-weight: 800; font-size: 1.7rem; color: var(--muted); }
.prof-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prof-name { font-weight: 800; font-size: 1.05rem; }
.prof-sub { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); word-break: break-all; }
.prof-field { display: flex; flex-direction: column; gap: 6px; font-size: 0.78rem; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.prof-field input { padding: 9px 11px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 0.92rem; }
.prof-field input:focus { outline: none; border-color: var(--accent); }
.prof-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.prof-note { color: var(--muted); font-size: 0.82rem; line-height: 1.5; margin: 0 0 12px; }
.prof-rc-count { font-family: var(--mono); font-size: 0.82rem; color: var(--accent); margin: 0 0 10px; }
.prof-toast { font-size: 0.84rem; margin: 12px 0 0; min-height: 1.1em; }
.btn-ghost { background: var(--card); color: var(--muted); border: 1px solid var(--border); cursor: pointer; }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.btn-danger { background: rgba(228,75,75,.14); color: #ff8a82; border: 1px solid rgba(228,75,75,.4); cursor: pointer; }
.btn-danger:hover { background: rgba(228,75,75,.22); }
.lang-switch { display: inline-flex; gap: 6px; margin-left: 8px; align-items: center; }
.lang-switch button {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: 1px solid transparent; cursor: pointer;
  padding: 3px 4px; border-radius: 7px; opacity: 0.5; transition: opacity 0.15s;
}
.lang-switch button.on { opacity: 1; border-color: var(--border); background: rgba(255, 255, 255, 0.06); }
.lang-switch button:hover { opacity: 0.9; }
.lang-switch .flag { width: 22px; height: 15px; border-radius: 2px; display: block; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18); }
.lang-switch .flag-label { font-family: var(--mono); font-size: 0.6rem; color: var(--muted); letter-spacing: 0.05em; }
.lang-switch button.on .flag-label { color: var(--text); }

/* Hero */
.hero { padding: 72px 0 40px; }
.kicker {
  font-family: var(--mono);
  color: var(--accent-2);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.lead { color: var(--muted); font-size: 1.1rem; max-width: 540px; }

/* Section head */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 40px 0 22px;
}
.section-head h2 { font-size: 1.4rem; font-weight: 700; }
.count { color: var(--muted); font-family: var(--mono); font-size: 0.9rem; }

/* Game grid */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  padding-bottom: 80px;
}
.game-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s, border-color 0.18s, background 0.18s;
  position: relative;
  overflow: hidden;
}
.game-banner {
  aspect-ratio: 460 / 215;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.game-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.game-card:hover .game-banner img { transform: scale(1.05); }
.game-card-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, var(--glow, transparent), transparent 60%);
  opacity: 0.5;
  pointer-events: none;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: var(--card-hover);
}
.game-card.disabled {
  opacity: 0.55;
  pointer-events: none;
}
.game-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--mono);
  color: #fff;
}
.game-card h3 { font-size: 1.15rem; font-weight: 700; }
.game-card p { color: var(--muted); font-size: 0.9rem; }
.game-meta {
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.tool-badge {
  background: rgba(255, 36, 53, 0.16);
  color: #ff8a82;
  padding: 3px 9px;
  border-radius: 999px;
}
.soon-badge {
  background: rgba(139, 147, 167, 0.14);
  color: var(--muted);
  padding: 3px 9px;
  border-radius: 999px;
}

/* List controls (search / sort / view) */
.list-controls { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.search-input {
  flex: 1; min-width: 180px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px;
  color: var(--text); font-family: var(--sans); font-size: 0.95rem;
}
.search-input:focus { outline: none; border-color: var(--accent); }
.sort-select {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px;
  color: var(--text); font-family: var(--sans); cursor: pointer;
}
.view-toggle { display: flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.view-toggle button {
  background: var(--card); border: none; color: var(--muted);
  padding: 0 14px; cursor: pointer; font-size: 1.1rem;
}
.view-toggle button.active { background: var(--accent); color: #fff; }
.no-results { color: var(--muted); text-align: center; padding: 40px; }

/* List view */
.game-grid.view-list { grid-template-columns: 1fr; }
.view-list .game-card { flex-direction: row; }
.view-list .game-banner {
  width: 220px; flex-shrink: 0;
  border-bottom: none; border-right: 1px solid var(--border);
}
.view-list .game-card-body { justify-content: center; }

/* Compact view */
.game-grid.view-compact { grid-template-columns: 1fr; gap: 8px; }
.view-compact .game-card { flex-direction: row; align-items: center; }
.view-compact .game-banner {
  width: 92px; flex-shrink: 0;
  border-bottom: none; border-right: 1px solid var(--border);
}
.view-compact .game-card-body { flex-direction: row; align-items: center; gap: 14px; width: 100%; padding: 10px 16px; }
.view-compact .game-card-body p { display: none; }
.view-compact .game-card-body h3 { font-size: 1rem; }
.view-compact .game-meta { margin-left: auto; margin-top: 0; }

/* ---- Pinned section + pin / drag controls ---- */
.pinned-section { margin-bottom: 26px; }
.pinned-section .game-grid { padding-bottom: 0; }
.pin-star { color: #f5c451; }

.pin-btn {
  position: absolute; top: 8px; right: 8px; z-index: 3; pointer-events: auto;
  width: 30px; height: 30px; display: grid; place-items: center; padding: 0;
  border-radius: 8px; cursor: pointer; color: #fff;
  background: rgba(8, 8, 12, 0.6); border: 1px solid rgba(255, 255, 255, 0.18);
  opacity: 0; transition: opacity 0.15s, background 0.15s, color 0.15s, transform 0.15s;
  backdrop-filter: blur(2px);
}
.game-card:hover .pin-btn, .pin-btn:focus-visible { opacity: 1; }
.pin-btn:hover { background: rgba(8, 8, 12, 0.85); transform: scale(1.08); }
.pin-btn.pinned { opacity: 1; color: #f5c451; border-color: rgba(245, 196, 81, 0.6); background: rgba(40, 32, 8, 0.78); }
.game-card.disabled { pointer-events: none; }
.game-card.disabled .pin-btn { pointer-events: auto; }

.drag-handle {
  position: absolute; top: 8px; left: 8px; z-index: 3;
  width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 8px; cursor: grab; color: #fff; font-size: 1rem; line-height: 1;
  background: rgba(8, 8, 12, 0.6); border: 1px solid rgba(255, 255, 255, 0.18);
  opacity: 0; transition: opacity 0.15s; backdrop-filter: blur(2px);
}
.game-card:hover .drag-handle { opacity: 0.9; }
.drag-handle:active { cursor: grabbing; }
.game-card.is-draggable { user-select: none; }

.game-card.dragging { opacity: 0.4; }
.game-card.drag-over-before { box-shadow: inset 3px 0 0 0 var(--accent); }
.game-card.drag-over-after { box-shadow: inset -3px 0 0 0 var(--accent); }
.view-list .game-card.drag-over-before, .view-compact .game-card.drag-over-before { box-shadow: inset 0 3px 0 0 var(--accent); }
.view-list .game-card.drag-over-after, .view-compact .game-card.drag-over-after { box-shadow: inset 0 -3px 0 0 var(--accent); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---- Game detail page ---- */
.breadcrumb {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  padding: 28px 0 0;
}
.breadcrumb a { color: var(--accent-2); text-decoration: none; }
.game-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 0 10px;
}
.game-hero-banner {
  width: 300px;
  flex-shrink: 0;
  aspect-ratio: 460 / 215;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.game-hero-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-hero-text h1 { font-size: 2rem; font-weight: 800; }
.game-hero-text p { color: var(--muted); }
.reset-widget { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.reset-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 16px;
  text-align: center;
  min-width: 110px;
}
.reset-label { display: block; font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 4px; }
.reset-time { font-family: var(--mono); font-size: 1.15rem; font-weight: 700; color: var(--accent); }
@media (max-width: 720px) { .reset-widget { margin-left: 0; width: 100%; } }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  padding: 30px 0 80px;
}
.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.18s, border-color 0.18s;
}
.tool-card:hover { transform: translateY(-3px); border-color: var(--accent-2); }
.tool-card.disabled { opacity: 0.5; pointer-events: none; }
.tool-card .tool-type {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tool-card h3 { margin: 8px 0 6px; font-size: 1.1rem; }
.tool-card p { color: var(--muted); font-size: 0.9rem; }

/* ---- Phasmophobia tool ---- */
.tool-page { padding: 24px 0 80px; }
.tool-page h1 { font-size: 1.9rem; margin: 16px 0 6px; }
.tool-page .tool-sub { color: var(--muted); margin-bottom: 28px; }

.evidence-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 820px) {
  .evidence-layout { grid-template-columns: 1fr; }
  .game-hero { flex-direction: column; text-align: center; }
  .game-hero-banner { width: 100%; max-width: 460px; }
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.panel h2 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 16px;
  font-family: var(--mono);
}

.evidence-list { display: flex; flex-direction: column; gap: 8px; }
.evidence-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--sans);
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}
.evidence-btn:hover { border-color: var(--muted); }
.evidence-btn .state {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.evidence-btn.include {
  border-color: var(--accent);
  background: rgba(255, 36, 53, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 36, 53, 0.3);
}
.evidence-btn.include .state { color: #ff6a6a; }
.evidence-btn.exclude {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.015);
  opacity: 0.5;
}
.evidence-btn.exclude span:first-child { text-decoration: line-through; }
.evidence-btn.exclude .state { color: var(--muted); }
.evidence-btn.disabled { opacity: 0.4; }

.controls { margin-top: 16px; display: flex; gap: 10px; }
.btn {
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 9px 16px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}
.btn:hover { border-color: var(--accent); }

.ghost-list { display: flex; flex-direction: column; gap: 10px; }
.ghost-item {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  transition: all 0.15s;
}
.ghost-item.ruled-out { opacity: 0.3; }
.ghost-item.match { border-color: var(--accent-2); }
.ghost-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.ghost-name { font-weight: 700; font-size: 1.02rem; }
.ghost-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.ev-chip {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}
.ev-chip.confirmed { background: rgba(255, 36, 53, 0.18); color: #ff8a82; }
.ghost-detail {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 10px;
  display: none;
}
.ghost-item.open .ghost-detail { display: block; }
.summary {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.summary b { color: var(--accent-2); }

/* ---- Game icon images ---- */
.game-icon-img { width: 58%; height: 58%; object-fit: contain; }

/* ---- Checklist tool ---- */
.checklist-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  padding: 24px 0 16px;
  align-items: start;
}
.check-section { padding: 20px; }
.check-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.check-head h2 { margin: 0; }
.check-head-right { display: flex; align-items: center; gap: 10px; }
.reset-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent-2);
  background: rgba(0, 224, 184, 0.1);
  padding: 3px 8px;
  border-radius: 999px;
}
.check-count { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); }
.check-progress {
  height: 5px;
  background: var(--bg-soft);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}
.check-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.25s;
}
.check-rows { display: flex; flex-direction: column; gap: 6px; }
.check-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  cursor: pointer;
  transition: all 0.13s;
  user-select: none;
}
.check-row:hover { border-color: var(--muted); }
.check-box {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--muted);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  color: var(--bg);
  flex-shrink: 0;
}
.check-row.checked { border-color: var(--accent-2); background: rgba(0, 224, 184, 0.07); }
.check-row.checked .check-box { background: var(--accent-2); border-color: var(--accent-2); }
.check-row.checked .check-label { color: var(--muted); text-decoration: line-through; }
.check-label { font-size: 0.94rem; }

/* ---- Gear score calculator ---- */
.gs-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  align-items: start;
  padding: 24px 0 80px;
}
@media (max-width: 820px) { .gs-layout { grid-template-columns: 1fr; } }
.gs-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.gs-row { display: flex; gap: 10px; }
.gs-stat, .gs-val {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.92rem;
}
.gs-stat { flex: 1; }
.gs-val { width: 110px; }
.gs-del {
  width: 40px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--danger);
  border-radius: 9px;
  font-size: 1.2rem;
  cursor: pointer;
}
.gs-del:hover { border-color: var(--danger); }
.gs-score-box { text-align: center; padding: 28px 20px; }
.gs-score { font-size: 3.4rem; font-weight: 800; font-family: var(--mono); line-height: 1; }
.gs-tier {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.95rem;
  padding: 5px 14px;
  border-radius: 999px;
}
.t-god { background: rgba(255,36,53,.26); color: #ff5b66; box-shadow: 0 0 22px rgba(255,36,53,.25); }
.t-great { background: rgba(255,36,53,.18); color: #ff7a72; }
.t-good { background: rgba(255,122,90,.16); color: #ffa07a; }
.t-decent { background: rgba(156,138,140,.16); color: var(--muted); }
.t-low { background: rgba(120,40,46,.22); color: #b97; }
.gs-breakdown {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.gs-breakdown b { color: var(--accent-2); }
.tool-note {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 9px;
  padding: 12px 16px;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 8px;
}

/* ---- Loadout builder ---- */
.opt-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  font-family: var(--sans);
  font-size: 0.9rem;
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
  transition: all 0.13s;
}
.opt:hover { border-color: var(--muted); }
.opt.sel { border-color: var(--accent); background: rgba(255, 36, 53, 0.12); color: #ff8a82; }
.opt.dim { opacity: 0.4; pointer-events: none; }
.build-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.build-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.build-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-btn {
  font-family: var(--mono);
  font-size: 0.74rem;
  padding: 3px 9px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  margin-left: 5px;
}
.mini-btn:hover { border-color: var(--accent); color: var(--text); }
.mini-btn.del:hover { border-color: var(--danger); color: var(--danger); }

/* ---- Node timer ---- */
.et-clock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
}
.et-label { font-family: var(--mono); color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.et-time { font-family: var(--mono); font-size: 2.2rem; font-weight: 800; color: var(--accent); }
.filter-btn.active { border-color: var(--accent); color: #ff8a82; }
.node-list { display: flex; flex-direction: column; gap: 8px; }
.node-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
}
.node-row.up { border-color: var(--accent); background: rgba(255, 36, 53, 0.06); }
.node-job {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: 9px;
  display: grid; place-items: center;
  font-family: var(--mono); font-weight: 800; font-size: 0.8rem;
}
.node-job.MIN { background: rgba(180, 130, 60, 0.2); color: #d8a566; }
.node-job.BTN { background: rgba(80, 160, 90, 0.18); color: #79c98a; }
.node-info { display: flex; flex-direction: column; }
.node-info strong { font-size: 0.98rem; }
.node-info span { font-size: 0.8rem; color: var(--muted); }
.node-status { margin-left: auto; font-family: var(--mono); font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.node-status.up { color: var(--accent); font-weight: 600; }

/* ---- Damage calculator ---- */
.calc-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.calc-field label { font-size: 0.9rem; color: var(--muted); }
.calc-field input {
  width: 130px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 11px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.9rem;
}
.calc-out { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; }
.calc-out > div { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.calc-out span { color: var(--muted); font-size: 0.9rem; }
.calc-out b { font-family: var(--mono); font-size: 1.5rem; color: var(--accent); }
.calc-out b.accent2 { color: var(--accent-2); }

/* ---- Tier list ---- */
.tier-row { display: flex; gap: 14px; margin-bottom: 14px; align-items: stretch; }
.tier-badge {
  width: 56px; flex-shrink: 0;
  border-radius: 11px;
  display: grid; place-items: center;
  font-family: var(--mono); font-weight: 800; font-size: 1.6rem;
}
.tier-SS { background: linear-gradient(135deg, rgba(255,196,80,.26), rgba(155,140,255,.26)); color: #ffd27a; font-size: 1.25rem; }
.tier-S { background: rgba(255,36,53,.28); color: #ff5b66; }
.char-portrait.no-img { display: grid; place-items: center; }
.char-portrait.no-img::after { content: "?"; color: var(--muted); font-weight: 700; }
.tier-A { background: rgba(255,100,70,.2); color: #ff8a5b; }
.tier-B { background: rgba(210,170,60,.16); color: #d8b65a; }
.tier-C { background: rgba(156,138,140,.16); color: var(--muted); }
.tier-chars { display: flex; flex-wrap: wrap; gap: 10px; flex: 1; }
.char-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 116px;
  transition: all 0.15s;
  font: inherit;
  text-align: center;
  cursor: pointer;
  align-items: center;
}
.char-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.char-portrait {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-soft);
  display: block;
}
.char-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.char-name { font-weight: 700; font-size: 0.92rem; }
.role-chip {
  font-family: var(--mono); font-size: 0.7rem;
  padding: 2px 8px; border-radius: 999px; align-self: flex-start;
}
.role-DPS { background: rgba(255,36,53,.16); color: #ff8a82; }
.role-Buff { background: rgba(210,170,60,.16); color: #d8b65a; }
.role-Survival { background: rgba(80,160,180,.16); color: #6cc; }
.char-link { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.char-card:hover .char-link { color: var(--accent); }

/* Bond Gift Planner — pin (heart) + "Raising now" section */
.bond-pin { position: absolute; top: 6px; right: 6px; z-index: 3; width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 8px; cursor: pointer; font-size: 1rem; line-height: 1; color: var(--muted);
  background: rgba(8,8,12,.55); border: 1px solid rgba(255,255,255,.14); transition: .15s; }
.bond-pin:hover { color: #ff5b80; transform: scale(1.12); background: rgba(8,8,12,.8); }
.bond-pin.on { color: #ff4f7e; border-color: rgba(255,79,126,.55); background: rgba(60,12,28,.7); opacity: 1; }
.char-card.is-pinned { border-color: rgba(255,79,126,.5); box-shadow: 0 0 0 1px rgba(255,79,126,.18); }
.gift-pinned { margin: 6px 0 4px; }
.gift-pinned:empty { display: none; }
.pinned-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.pinned-head h2 { font-size: 1.05rem; margin: 0; }
.pin-heart { color: #ff4f7e; }
.pinned-count { font-family: var(--mono); font-size: 0.8rem; color: #ff7da0; }
.pinned-empty { font-size: 0.85rem; color: var(--muted); background: var(--bg-soft); border: 1px dashed var(--border);
  border-radius: 10px; padding: 11px 14px; margin: 6px 0 4px; }
.pin-msg { max-height: 0; overflow: hidden; opacity: 0; transition: .25s; font-size: 0.84rem; color: #ff8aa6;
  border-left: 3px solid #ff4f7e; padding-left: 0; }
.pin-msg.show { max-height: 60px; opacity: 1; padding: 8px 0 8px 12px; margin: 4px 0 10px; }

/* ---- NTE bond gift planner ---- */
.char-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.gift-best { font-size: 0.74rem; color: var(--muted); line-height: 1.2; }
.gift-best-aff { font-family: var(--mono); font-size: 0.78rem; font-weight: 700; color: #6cc; }
.uni-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 20px;
  padding: 12px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; }
.uni-title { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
#gift-universal { display: flex; flex-wrap: wrap; gap: 8px; }
.uni-chip { font-size: 0.78rem; padding: 4px 10px; border-radius: 999px;
  background: rgba(80,160,180,.14); color: #9dd; }
.gift-sub { margin-top: 6px; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.gift-list { display: flex; flex-direction: column; gap: 8px; }
.gift-row { display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; }
.gift-icon { font-size: 1.5rem; flex: 0 0 auto; width: 34px; text-align: center; }
.gift-main { flex: 1; min-width: 0; }
.gift-name { display: block; font-weight: 700; font-size: 0.95rem; }
.gift-where { display: block; font-size: 0.78rem; color: var(--muted); }
.gift-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: 0 0 auto; }
.gift-aff { font-family: var(--mono); font-weight: 800; font-size: 0.9rem; padding: 1px 8px; border-radius: 6px; }
.gift-aff.aff-hi { background: rgba(255,36,53,.16); color: #ff8a82; }
.gift-aff.aff-mid { background: rgba(210,170,60,.16); color: #d8b65a; }
.gift-aff.aff-lo { background: rgba(80,160,180,.16); color: #6cc; }
.gift-cost { font-family: var(--mono); font-size: 0.76rem; color: var(--muted); white-space: nowrap; }

/* ---- NTE build detail panel ---- */
.bd-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.bd-title { display: flex; align-items: center; gap: 16px; }
.bd-portrait {
  width: 84px; height: 84px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}
.bd-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.bd-name { font-weight: 800; font-size: 1.4rem; margin-right: 10px; }
.bd-tier { width: auto; padding: 2px 12px; font-size: 1rem; display: inline-grid; vertical-align: middle; margin-right: 8px; }
.bd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bd-item {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.bd-wide { grid-column: 1 / -1; }
.bd-label { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.bd-item b { font-size: 1.02rem; }
.bd-team { display: flex; flex-wrap: wrap; gap: 6px; }
.bd-team .ev-chip { cursor: pointer; }
.bd-team .ev-chip:hover { background: rgba(255,36,53,.18); color: #ff8a82; }

/* Player-tested team comps (Prydwen) */
.bd-teams { display: flex; flex-direction: column; gap: 8px; }
.team-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 7px 10px; background: rgba(255,255,255,.02); border: 1px solid rgba(255,255,255,.08); border-radius: 9px; }
.team-label { font-family: var(--mono); font-size: 0.64rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--accent-2); min-width: 120px; flex-shrink: 0; }
.bd-team .ev-chip.team-carry { cursor: default; background: rgba(0,224,184,.16); border-color: rgba(0,224,184,.4);
  color: var(--accent-2); font-weight: 700; }
.bd-team .ev-chip.team-carry:hover { background: rgba(0,224,184,.16); color: var(--accent-2); }
.bd-team-hint { font-size: 0.78rem; color: var(--muted); line-height: 1.45; margin-top: 4px; }
.bd-note { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.bd-credit { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); margin-top: 14px; }
@media (max-width: 620px) { .bd-grid { grid-template-columns: 1fr; } }

/* ---- Cursed possessions ---- */
.cp-list { display: flex; flex-direction: column; gap: 12px; }
.cp-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color 0.15s;
}
.cp-card.open { border-color: var(--accent); }
.cp-head { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.cp-name { font-weight: 700; font-size: 1.1rem; margin-right: 10px; }
.cp-toggle { color: var(--muted); font-family: var(--mono); transition: transform 0.2s; }
.cp-card.open .cp-toggle { transform: rotate(180deg); }
.cp-summary { color: var(--muted); font-size: 0.92rem; margin-top: 8px; }
.cp-detail { display: none; margin-top: 14px; border-top: 1px solid var(--border); padding-top: 14px; }
.cp-card.open .cp-detail { display: block; }
.cp-detail p { font-size: 0.92rem; margin-bottom: 10px; line-height: 1.55; }
.cp-detail b { color: var(--text); }
.cp-sublist { margin: 0 0 12px; padding-left: 18px; }
.cp-sublist li { font-size: 0.88rem; color: var(--muted); margin-bottom: 5px; }
.sp-check-wrap { display: flex; align-items: center; gap: 11px; cursor: pointer; }
.sp-check { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.sp-section { font-size: 1.05rem; margin: 22px 0 12px; display: flex; align-items: baseline; gap: 10px; }
.sp-hint { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); font-weight: 400; text-transform: none; }
.sp-tokens { font-family: var(--mono); font-size: 0.74rem; color: var(--accent-2); margin-right: 8px; }
.cp-card.is-checked { opacity: 0.6; }
.cp-card.is-checked .cp-name { text-decoration: line-through; color: var(--muted); }

/* ---- DDV recipe browser ---- */
.rc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; padding-bottom: 60px; }
/* DDV items — catalogue category tabs (in-game collection style) */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.cat-tab {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-size: 0.85rem; cursor: pointer;
  padding: 7px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card); color: var(--muted);
  transition: all 0.13s;
}
.cat-tab:hover { border-color: var(--muted); color: var(--text); }
.cat-tab.on { background: rgba(255,36,53,.14); border-color: var(--accent); color: #ff8a82; font-weight: 700; }
.cat-tab .cat-count {
  font-family: var(--mono); font-size: 0.7rem; padding: 1px 7px; border-radius: 999px;
  background: rgba(255,255,255,.06); color: var(--muted);
}
.cat-tab.on .cat-count { background: rgba(255,36,53,.2); color: #ffb0aa; }

.rc-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.furn-card { padding: 12px 14px; }
.furn-card .rc-top { margin-bottom: 0; align-items: center; }
.furn-card .rc-img { width: 44px; height: 44px; }
.rc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.rc-name { font-weight: 700; font-size: 1rem; display: inline-flex; align-items: center; gap: 8px; }
.rc-img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; background: rgba(255,255,255,.04); flex: 0 0 auto; vertical-align: middle; }
.rc-stars { font-size: 0.78rem; white-space: nowrap; }
.rc-ing { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.rc-chip { font-size: 0.78rem; padding: 3px 8px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border); color: var(--muted); }
.rc-meta { display: flex; gap: 16px; font-family: var(--mono); font-size: 0.85rem; color: var(--text); flex-wrap: wrap; }
.it-where { font-size: 0.82rem; color: var(--muted); margin-bottom: 6px; }
.it-where b { color: var(--text); }

/* ---- DDV friendship tracker ---- */
.fr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; padding-bottom: 60px; }
.fr-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; gap: 12px; }
.fr-card.fr-max { border-color: var(--accent-2); }
.fr-portrait {
  width: 56px; height: 56px; flex-shrink: 0;
  border-radius: 10px; overflow: hidden; position: relative;
  display: grid; place-items: center;
}
.fr-initial { font-family: var(--mono); font-weight: 800; font-size: 1.4rem; color: #fff; }
.fr-portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fr-info { flex: 1; min-width: 0; }
.fr-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.fr-name { font-weight: 600; font-size: 0.88rem; }
.fr-lvl { font-family: var(--mono); font-weight: 800; font-size: 1.05rem; color: var(--accent); flex-shrink: 0; }
.fr-card.fr-max .fr-lvl { color: var(--accent-2); }
.fr-dlc { display: inline-block; font-family: var(--mono); font-size: 0.62rem; padding: 1px 6px; border-radius: 999px; margin: 4px 0; }
.dlc-rift { background: rgba(0,224,184,.16); color: var(--accent-2); }
.dlc-vale { background: rgba(124,92,255,.18); color: #b3a4ff; }
.dlc-wish { background: rgba(255,159,67,.18); color: #ffb066; }
.fr-bar { height: 6px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; margin: 6px 0 8px; }
.fr-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.2s; }
.fr-btns { display: flex; gap: 5px; }
.fr-btns .mini-btn { flex: 1; padding: 5px 0; font-size: 0.82rem; }
.fr-filter.active, .fr-act-filter.active { border-color: var(--accent); color: #ff8a82; }
.fr-role {
  width: 100%; margin-top: 6px;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 7px;
  padding: 4px 6px; color: var(--text); font-size: 0.76rem; font-family: var(--sans); cursor: pointer;
}

/* ---- Equipment guide ---- */
.eq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
}
.eq-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
}
.eq-top { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.eq-img {
  width: 70px; height: 70px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  padding: 6px;
}
.eq-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.eq-name { font-weight: 700; font-size: 1.05rem; }
.eq-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.eq-purpose { color: var(--muted); font-size: 0.9rem; margin-bottom: 12px; }
.eq-tiers { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.eq-tier {
  display: flex; gap: 10px; align-items: baseline;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.85rem;
}
.eq-tier-n {
  font-family: var(--mono); font-weight: 800; font-size: 0.75rem;
  color: var(--accent); flex-shrink: 0;
}
.eq-line { font-size: 0.88rem; line-height: 1.5; margin-bottom: 8px; }
.eq-line b { color: var(--text); }

/* ---- Speed tuning ---- */
.st-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.st-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.st-name, .st-num {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.9rem;
}
.st-name { flex: 1; min-width: 70px; }
.st-num { width: 72px; font-family: var(--mono); }
.st-side {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 0.74rem;
  cursor: pointer;
  background: var(--bg-soft);
}
.st-side.ally { color: #6cb6ff; border-color: rgba(108,182,255,.4); }
.st-side.enemy { color: var(--accent); border-color: rgba(255,36,53,.4); }
.st-del {
  width: 34px; flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--danger);
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
}
.turn-seq { display: flex; flex-direction: column; gap: 7px; }
.turn-pill {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--muted);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 0.92rem;
}
.turn-pill.ally { border-left-color: #6cb6ff; }
.turn-pill.enemy { border-left-color: var(--accent); }
.turn-n { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); width: 20px; }

/* ---- Warframe cycles ---- */
.cycle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.cycle-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--muted);
  border-radius: var(--radius);
  padding: 18px;
}
.cycle-card.warm { border-left-color: #ff9f43; }
.cycle-card.cool { border-left-color: #54a0ff; }
.cycle-name { font-size: 0.92rem; color: var(--muted); margin-bottom: 10px; }
.cycle-state { font-size: 1.3rem; font-weight: 800; text-transform: capitalize; }
.cycle-timer { font-family: var(--mono); font-size: 1.5rem; color: var(--accent); margin-top: 6px; }

/* ---- Warframe worldstate ---- */
.ws-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; align-items: start; }
.ws-section h2 { margin-bottom: 12px; }
.ws-sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 12px; }
.ws-timer { font-family: var(--mono); color: var(--accent); }
.ws-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 12px;
  margin-bottom: 7px;
}
.ws-tag {
  font-family: var(--mono); font-size: 0.72rem;
  padding: 3px 8px; border-radius: 6px;
  background: rgba(255,255,255,.06); color: var(--muted);
  flex-shrink: 0; min-width: 56px; text-align: center;
}
.ws-tag.tier-Lith { color: #8bd; } .ws-tag.tier-Meso { color: #6c9; }
.ws-tag.tier-Neo { color: #c9c; } .ws-tag.tier-Axi { color: #db8; }
.ws-tag.tier-Requiem { color: #d88; }
.ws-info { display: flex; flex-direction: column; flex: 1; }
.ws-info strong { font-size: 0.92rem; }
.ws-info span { font-size: 0.8rem; color: var(--muted); }
.ws-row .ws-timer { margin-left: auto; white-space: nowrap; }
.ws-baro { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---- Game tabs ---- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 24px 0 22px; }
.tab {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-family: var(--sans); font-size: 0.98rem; font-weight: 600;
  padding: 10px 18px; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.tool-grid.view-list { grid-template-columns: 1fr; }

/* ---- News ---- */
#news-root { display: flex; flex-direction: column; gap: 8px; padding-bottom: 60px; }
.news-row {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--card); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 13px 16px;
  text-decoration: none; color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.news-row:hover { transform: translateX(3px); border-left-color: var(--accent-2); }
.news-title { font-weight: 600; font-size: 0.96rem; }
.news-meta { font-family: var(--mono); font-size: 0.76rem; color: var(--muted); }

/* News cards (preview thumbnails linking to the article preview page) */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.news-card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; text-decoration: none; color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.news-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.news-thumb { display: block; aspect-ratio: 16 / 9; background: var(--bg-soft); overflow: hidden; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-thumb.no-img, .news-thumb:empty { background: linear-gradient(135deg, var(--bg-soft), rgba(255,255,255,.03)); }
.news-body { display: flex; flex-direction: column; gap: 7px; padding: 13px 15px; }
.news-card .news-title { font-weight: 700; font-size: 0.95rem; line-height: 1.3; }
.news-snippet {
  font-size: 0.82rem; color: var(--muted); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* News article preview page */
.news-article { max-width: 760px; }
.na-hero { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--bg-soft); margin-bottom: 20px; }
.na-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.na-source { font-family: var(--mono); font-size: 0.8rem; color: var(--accent-2); }
.na-title { font-size: 1.8rem; line-height: 1.2; margin: 8px 0 16px; }
.na-summary { font-size: 1.05rem; line-height: 1.6; color: var(--text); }
.na-summary.na-muted { color: var(--muted); font-style: italic; }
.na-content { font-size: 1.02rem; line-height: 1.7; color: var(--text); }
.na-content p { margin: 0 0 16px; }
.na-content h2, .na-content h3, .na-content h4 { margin: 24px 0 10px; line-height: 1.25; }
.na-content ul { margin: 0 0 16px; padding-left: 22px; }
.na-content li { margin: 4px 0; }
.na-content a { color: var(--accent-2); }
.na-content img { max-width: 100%; height: auto; border-radius: 10px; margin: 12px 0; display: block; }
.na-content blockquote { margin: 0 0 16px; padding: 8px 16px; border-left: 3px solid var(--accent); color: var(--muted); }
.na-credit {
  margin: 28px 0 4px; padding: 14px 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; border-left: 3px solid var(--accent-2);
}
.na-credit-label { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-right: 8px; }
.na-credit a { color: var(--accent-2); font-weight: 700; text-decoration: none; }
.na-credit-note { font-size: 0.82rem; color: var(--muted); margin-top: 6px; }
.na-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 20px 0 8px; }
.na-cta { text-decoration: none; }

/* ---- Codes ---- */
.codes-updated { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.codes-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.redeem-btn { text-decoration: none; white-space: nowrap; background: rgba(255,36,53,.14); border-color: var(--accent); color: #ff8a82; }
.redeem-btn:hover { background: rgba(255,36,53,.22); }
.codes-note { font-size: 0.82rem; color: var(--muted); line-height: 1.5; margin-bottom: 16px; padding-left: 12px; border-left: 2px solid var(--border); }
.codes-list { display: flex; flex-direction: column; gap: 8px; padding-bottom: 60px; }
.code-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 14px;
}
.code-row.is-used { opacity: 0.55; }
.code-check { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--accent); cursor: pointer; }
.code-main { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.code-text {
  font-family: var(--mono); font-size: 1rem; font-weight: 700;
  color: var(--accent-2); letter-spacing: 0.03em;
}
.code-row.is-used .code-text { text-decoration: line-through; }
.code-reward { font-size: 0.82rem; color: var(--muted); }
.code-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.code-valid { font-family: var(--mono); font-size: 0.76rem; color: var(--muted); white-space: nowrap; }
.code-valid.ok { color: #5bd6a0; font-weight: 700; }
.code-valid.expired { color: var(--danger); font-weight: 700; }
.code-added { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); white-space: nowrap; opacity: .8; }
.code-row.is-expired { border-color: rgba(255,36,53,.35); }
.code-row.is-expired .code-text { color: var(--danger); }
.code-copy { flex-shrink: 0; }

/* ---- Warframe drop table ---- */
.drop-facets {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.facet-group { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.facet-title {
  font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted); width: 80px; flex-shrink: 0;
}
.facet-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.chip-toggle {
  font-family: var(--sans); font-size: 0.8rem;
  padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-soft);
  color: var(--muted); cursor: pointer; transition: all 0.13s;
}
.chip-toggle:hover { border-color: var(--muted); color: var(--text); }
.chip-toggle.on { background: rgba(255,36,53,.15); border-color: var(--accent); color: #ff8a82; }
.drop-count { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); margin-bottom: 12px; }
.drop-list { display: flex; flex-direction: column; gap: 5px; padding-bottom: 60px; }
.drop-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 13px;
}
.drop-item { font-weight: 600; font-size: 0.92rem; flex: 1; min-width: 140px; }
.drop-src { color: var(--muted); font-size: 0.82rem; flex: 1; display: flex; align-items: center; gap: 7px; }
.src-tag {
  font-family: var(--mono); font-size: 0.66rem; padding: 2px 6px; border-radius: 5px;
  flex-shrink: 0;
}
.tag-R { background: rgba(124,92,255,.18); color: #b3a4ff; }
.tag-M { background: rgba(42,143,168,.2); color: #5bc7e0; }
.drop-chance { font-family: var(--mono); font-size: 0.9rem; color: var(--text); width: 64px; text-align: right; flex-shrink: 0; }
.rar { font-family: var(--mono); font-size: 0.7rem; padding: 2px 8px; border-radius: 999px; flex-shrink: 0; width: 78px; text-align: center; }
.rar-0 { background: rgba(150,150,150,.15); color: #aaa; }
.rar-1 { background: rgba(180,200,210,.15); color: #cdd; }
.rar-2 { background: rgba(212,175,55,.18); color: #e3c054; }
.rar-3 { background: rgba(0,224,184,.16); color: var(--accent-2); }
@media (max-width: 680px) {
  .drop-row { flex-wrap: wrap; }
  .drop-item { flex-basis: 100%; }
  .facet-title { width: 100%; }
}

/* ---- Outlast: Trials & Maps guide ---- */
.trial-list { display: flex; flex-direction: column; gap: 12px; padding-bottom: 60px; }
.trial-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.trial-head { display: flex; align-items: center; gap: 14px; padding: 12px 14px; cursor: pointer; list-style: none; }
.trial-head::-webkit-details-marker { display: none; }
.trial-thumb { width: 84px; height: 48px; flex: 0 0 auto; border-radius: 8px; overflow: hidden; background: var(--bg-soft); }
.trial-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trial-headtext { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.trial-map { font-weight: 700; font-size: 1.05rem; }
.trial-names { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.trial-caret { color: var(--muted); transition: transform 0.15s; }
.trial-card[open] .trial-caret { transform: rotate(90deg); }
.trial-body { padding: 0 16px 18px; }
.trial-hero { width: 100%; max-height: 280px; object-fit: cover; border-radius: 10px; margin-bottom: 16px; display: block; }
.trial-block { margin-top: 14px; }
.trial-title { font-size: 1.05rem; margin-bottom: 6px; color: var(--accent-2); }
.trial-intro { color: var(--muted); font-size: 0.9rem; margin-bottom: 10px; }
.trial-objs { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 5px; }
.trial-objs li { font-size: 0.92rem; }
/* general tips + per-trial tips + layouts + interactive-map button */
/* Mission selector + per-mission panel */
.mission-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0 14px; }
.mission-tab { font-family: var(--sans); font-size: 0.82rem; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--muted); cursor: pointer; transition: all 0.13s; }
.mission-tab:hover { border-color: var(--muted); color: var(--text); }
.mission-tab.on { background: rgba(212,132,42,.16); border-color: var(--accent); color: #e0a45a; font-weight: 700; }
.mission-goal { font-size: 0.98rem; font-style: italic; color: var(--text); border-left: 3px solid var(--accent-2); padding-left: 12px; margin-bottom: 10px; }
.mission-prime { font-size: 0.88rem; color: var(--muted); margin-bottom: 12px; }
.mission-prime b { color: var(--accent-2); }

/* Full-screen interactive-map modal (scrolling only moves the map, not the page) */
.map-modal { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.82); backdrop-filter: blur(3px);
  display: none; flex-direction: column; padding: 24px; }
.map-modal.on { display: flex; }
.map-modal-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 4px 12px; color: var(--text); font-size: 0.9rem; }
.map-modal-bar a { color: var(--accent-2); }
.map-modal-frame { flex: 1; width: 100%; border: 1px solid var(--border); border-radius: 12px; background: #0b0809; display: block; }
.floor-tabs { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; justify-content: center; }
.floor-tab { font: inherit; font-size: 0.8rem; padding: 5px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--muted); transition: all 0.13s; }
.floor-tab:hover { border-color: var(--muted); color: var(--text); }
.floor-tab.on { background: rgba(212,132,42,.18); border-color: var(--accent); color: #e0a45a; font-weight: 700; }
.map-view { flex: 1; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: #0b0809;
  display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; }
.map-view.grabbing { cursor: grabbing; }
.map-view-img { max-width: 100%; max-height: 100%; transform-origin: center; will-change: transform; user-select: none; -webkit-user-drag: none; }
.map-view-hint { text-align: center; color: var(--muted); font-size: 0.78rem; margin-top: 8px; }
/* the floor-map thumbnails act as buttons that open the viewer */
button.layout-item { font: inherit; text-align: left; cursor: pointer; }
.general-tips { background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--accent-2); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.gt-title { font-weight: 700; font-size: 0.95rem; display: block; margin-bottom: 8px; }
.general-tips ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; }
.general-tips li { font-size: 0.9rem; color: var(--muted); }
.fex-btn { display: inline-flex; text-decoration: none; margin-bottom: 16px; background: rgba(0,224,184,.12); border-color: var(--accent-2); color: var(--accent-2); }
.fex-btn:hover { background: rgba(0,224,184,.2); }
.layout-block { margin-bottom: 16px; }
.trial-coltitle { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); display: block; margin-bottom: 8px; }
.layout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.layout-item { display: block; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; text-decoration: none; color: var(--text); transition: border-color 0.15s; }
.layout-item:hover { border-color: var(--accent); }
.layout-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #0b0809; display: block; }
.layout-label { display: block; font-size: 0.78rem; padding: 7px 10px; color: var(--muted); }
.layout-none { font-size: 0.85rem; color: var(--muted); margin-bottom: 14px; font-style: italic; }
.trial-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.trial-col { min-width: 0; }
.trial-tips { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; list-style: none; }
.trial-tips li { font-size: 0.9rem; position: relative; padding-left: 4px; }
.trial-tips li::before { content: "▸"; color: var(--accent-2); position: absolute; left: -16px; }
@media (max-width: 640px) { .trial-cols { grid-template-columns: 1fr; } }

/* ---- Outlast: Enemies & Counters ---- */
.enemy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; padding-bottom: 60px; }
.enemy-card { display: flex; gap: 14px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.enemy-portrait { width: 92px; height: 92px; flex: 0 0 auto; border-radius: 10px; overflow: hidden; background: var(--bg-soft); }
.enemy-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.enemy-portrait.no-img { background: linear-gradient(135deg, var(--bg-soft), rgba(255,36,53,.08)); }
.enemy-info { flex: 1; min-width: 0; }
.enemy-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.enemy-name { font-weight: 700; font-size: 1.02rem; }
.enemy-tags { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.enemy-where { background: rgba(212,132,42,.16); color: #e0a45a; }
.enemy-danger { font-family: var(--mono); font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.dg-low { background: rgba(80,160,180,.16); color: #6cc; }
.dg-med { background: rgba(210,170,60,.16); color: #d8b65a; }
.dg-high { background: rgba(255,120,40,.16); color: #ff9a52; }
.dg-boss { background: rgba(255,36,53,.18); color: #ff8a82; }
.enemy-behavior { font-size: 0.88rem; color: var(--muted); margin-bottom: 8px; line-height: 1.5; }
.enemy-counter { font-size: 0.88rem; line-height: 1.5; }
.enemy-counter b { color: var(--accent-2); }

/* ---- Outlast: Recommended builds ---- */
.mbuild-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; padding-bottom: 60px; }
.mbuild-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.mbuild-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.mbuild-name { font-weight: 800; font-size: 1.08rem; }
.mbuild-tags { display: flex; gap: 5px; }
.mbuild-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mbuild-slot { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.mbuild-slot-label { font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.mbuild-slot b { font-size: 0.92rem; }
.mbuild-why { font-size: 0.88rem; color: var(--muted); line-height: 1.55; }
.mbuild-card .mini-btn { align-self: flex-start; text-decoration: none; }

/* =========================================
   Cyberpunk 2077 — Meta Builds
   ========================================= */
.cb-note { color: var(--muted); font-size: 0.9rem; line-height: 1.55; max-width: 70ch; margin: 4px 0 18px; }
.cb-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.cb-fchip { font-family: var(--mono); font-size: 0.76rem; padding: 7px 13px; border-radius: 999px;
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--muted); cursor: pointer; transition: .15s; }
.cb-fchip:hover { color: var(--text); border-color: var(--accent-2); }
.cb-fchip.on { background: rgba(252,238,10,.14); border-color: #caa90a; color: #fce96a; font-weight: 700; }

.cb-builds { display: flex; flex-direction: column; gap: 16px; padding-bottom: 60px; }
.cb-build { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px 18px 16px; }
.cb-build.open { border-color: #caa90a; box-shadow: 0 0 0 1px rgba(252,238,10,.12), 0 10px 40px -20px rgba(252,238,10,.4); }
.cb-build-head { width: 100%; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; text-align: left;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cb-build-title { display: flex; flex-direction: column; gap: 4px; }
.cb-os { font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: .12em; color: #caa90a; }
.cb-name { font-size: 1.3rem; font-weight: 800; line-height: 1.15; }
.cb-build-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.cb-arch { font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: .06em;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 6px; padding: 3px 7px; color: var(--muted); }
.cb-diff { font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: .06em; border-radius: 6px; padding: 3px 7px; }
.cb-diff-beginnerfriendly { background: rgba(74,157,91,.16); color: #6fcf8a; }
.cb-diff-medium { background: rgba(212,132,42,.18); color: #e0a866; }
.cb-diff-hard { background: rgba(255,36,53,.16); color: #ff8a82; }
.cb-caret { font-size: 1.1rem; color: var(--muted); transition: transform .2s; flex-shrink: 0; margin-top: 4px; }
.cb-build.open .cb-caret { transform: rotate(180deg); color: #caa90a; }
.cb-summary { color: var(--text); font-size: 0.94rem; line-height: 1.6; margin: 12px 0 14px; opacity: .92; }

/* attribute distribution bars */
.cb-attrs { display: flex; flex-direction: column; gap: 7px; padding: 12px 14px; background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: 10px; }
.cb-attr { display: grid; grid-template-columns: 110px 1fr 28px; align-items: center; gap: 10px; }
.cb-attr-name { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cb-attr.is-primary .cb-attr-name { color: var(--text); font-weight: 700; }
.cb-prim { color: #fce96a; }
.cb-attr-track { height: 9px; background: rgba(255,255,255,.07); border-radius: 999px; overflow: hidden; }
.cb-attr-fill { display: block; height: 100%; border-radius: 999px; transition: width .4s ease; opacity: .55; }
.cb-attr.is-primary .cb-attr-fill { opacity: 1; box-shadow: 0 0 10px -1px currentColor; }
.cb-attr-val { font-family: var(--mono); font-weight: 700; font-size: 0.9rem; text-align: right; }
.cb-tags-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.cb-tag { font-size: 0.74rem; color: var(--accent-2); background: rgba(0,224,184,.1); border: 1px solid rgba(0,224,184,.25);
  border-radius: 999px; padding: 3px 10px; }

/* expanded detail */
.cb-detail { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; }
.cb-detail[hidden] { display: none; }
.cb-attrnote { font-size: 0.86rem; color: var(--muted); line-height: 1.55; font-style: italic; margin: 0 0 16px;
  border-left: 2px solid #caa90a; padding-left: 12px; }
.cb-sec { margin-bottom: 18px; }
.cb-sec-h { font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent-2); margin: 0 0 10px; }
.cb-sec svg { width: 16px; height: 16px; flex-shrink: 0; }

/* perk skill-tree — circuit branches */
.cb-tree { display: flex; flex-wrap: wrap; gap: 24px; padding: 16px;
  background:
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(255,255,255,.025) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(255,255,255,.025) 23px 24px),
    var(--bg-soft);
  border: 1px solid var(--border); border-radius: 12px; }
.cb-branch { flex: 1 1 290px; min-width: 0; }
.cb-branch-head { display: inline-block; font-family: var(--mono); font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; padding: 4px 10px; border: 1px solid; border-radius: 6px;
  margin-bottom: 16px; background: rgba(0,0,0,.25); }
.cb-branch-nodes { position: relative; display: flex; flex-direction: column; gap: 14px; }
.cb-branch-nodes::before { content: ""; position: absolute; left: 17px; top: 8px; bottom: 16px; width: 2px;
  background: var(--trace); opacity: .35; }
.cb-pnode { position: relative; display: flex; gap: 12px; align-items: flex-start; }
.cb-pnode-chip { position: relative; z-index: 1; flex-shrink: 0; width: 34px; height: 34px; display: grid; place-items: center;
  border: 1.5px solid; border-radius: 8px; background: var(--card); box-shadow: 0 0 12px -4px currentColor; }
.cb-pnode-chip svg { width: 18px; height: 18px; }
.cb-pnode-body { display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.cb-pnode-name { font-weight: 700; font-size: 0.88rem; }
.cb-pnode-desc { font-size: 0.82rem; color: var(--muted); line-height: 1.45; }

/* cyberware — in-game body diagram */
.cb-body-map { display: grid; grid-template-columns: 1fr 150px 1fr; gap: 12px; align-items: start;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.cb-body-col { display: flex; flex-direction: column; gap: 10px; }
.cb-body-fig { position: relative; display: flex; align-items: center; justify-content: center; align-self: stretch; min-height: 320px; }
.cb-body-svg { width: 116px; height: auto; }
.cb-body-arm-l, .cb-body-arm-r { position: absolute; top: 6px; font-family: var(--mono); font-size: 0.56rem; letter-spacing: .12em; }
.cb-body-arm-l { left: 2px; color: #ff8a82; }
.cb-body-arm-r { right: 2px; color: var(--accent-2); }
.cb-slotbox { background: var(--card); border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px;
  display: flex; flex-direction: column; gap: 2px; }
.cb-side-left .cb-slotbox { border-left: 2px solid rgba(255,90,90,.4); }
.cb-side-right .cb-slotbox { border-right: 2px solid rgba(37,208,192,.45); }
.cb-slotbox.is-empty { border-style: dashed; opacity: .45; flex-direction: row; align-items: center; gap: 8px; min-height: 46px; }
.cb-slot-label { font-family: var(--mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: .07em; color: #caa90a; }
.cb-side-left .cb-slot-label { color: #ff8a82; }
.cb-side-right .cb-slot-label { color: var(--accent-2); }
.cb-slotbox.is-empty .cb-slot-label { color: var(--muted); }
.cb-slot-item { font-weight: 700; font-size: 0.86rem; }
.cb-slot-why { font-size: 0.78rem; color: var(--muted); line-height: 1.45; margin-top: 1px; }
.cb-slot-empty { font-size: 1.2rem; color: var(--muted); margin-left: auto; }
.cb-slotbox.has-ico { flex-direction: row; align-items: flex-start; gap: 10px; }
.cb-slot-ico { width: 42px; height: 42px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: #14110c;
  border: 1px solid rgba(252,238,10,.22); display: grid; place-items: center; }
.cb-slot-ico img { width: 100%; height: 100%; object-fit: contain; }
.cb-slot-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.cb-weapon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; }
.cb-weapon { display: flex; gap: 12px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.cb-weapon-ico { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 9px;
  background: rgba(252,238,10,.1); border: 1px solid rgba(252,238,10,.28); color: #fce96a; overflow: hidden; }
.cb-weapon-ico.has-img { background: #14110c; padding: 3px; }
.cb-weapon-ico svg { width: 24px; height: 24px; }
.cb-weapon-ico img { width: 100%; height: 100%; object-fit: contain; }
.cb-weapon-body { display: flex; flex-direction: column; gap: 2px; }
.cb-weapon-name { font-weight: 700; font-size: 0.9rem; }
.cb-weapon-role { font-family: var(--mono); font-size: 0.64rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); background: var(--card); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; margin-left: 4px; }
.cb-weapon-why { font-size: 0.82rem; color: var(--muted); line-height: 1.5; margin-top: 2px; }

.cb-play { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; }
.cb-play li { font-size: 0.88rem; color: var(--muted); line-height: 1.55; }
.cb-play li::marker { color: #caa90a; font-family: var(--mono); font-weight: 700; }
.cb-level { font-size: 0.88rem; color: var(--muted); line-height: 1.6; margin: 0; }

.cb-procon { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cb-procon ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.cb-procon li { font-size: 0.85rem; color: var(--muted); line-height: 1.45; padding-left: 18px; position: relative; }
.cb-pc-h { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.cb-pros .cb-pc-h { color: #6fcf8a; }
.cb-cons .cb-pc-h { color: #ff8a82; }
.cb-pros li::before { content: "+"; position: absolute; left: 2px; color: #6fcf8a; font-weight: 700; }
.cb-cons li::before { content: "–"; position: absolute; left: 2px; color: #ff8a82; font-weight: 700; }

@media (max-width: 720px) {
  .cb-body-map { grid-template-columns: 1fr 1fr; }
  .cb-body-fig { display: none; }
}
@media (max-width: 560px) {
  .cb-attr { grid-template-columns: 88px 1fr 24px; gap: 8px; }
  .cb-procon { grid-template-columns: 1fr; }
  .cb-body-map { grid-template-columns: 1fr; }
  .cb-name { font-size: 1.15rem; }
}

/* set-perk callout (GoW builds) */
.cb-setperk { background: rgba(205,170,83,.08); border: 1px solid rgba(205,170,83,.3); border-radius: 10px;
  padding: 12px 14px; font-size: 0.88rem; color: var(--text); line-height: 1.55; margin-bottom: 18px; }
.cb-setperk-h { display: block; font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: .1em;
  color: #cdaa53; margin-bottom: 5px; }

/* God of War Ragnarök — theme overrides for the shared build components */
[data-game="god-of-war-ragnarok"] .cb-build.open { border-color: #3b6fb5;
  box-shadow: 0 0 0 1px rgba(59,111,181,.14), 0 10px 40px -20px rgba(59,111,181,.5); }
[data-game="god-of-war-ragnarok"] .cb-os { color: #cdaa53; }
[data-game="god-of-war-ragnarok"] .cb-build.open .cb-caret { color: #3b6fb5; }
[data-game="god-of-war-ragnarok"] .cb-fchip.on { background: rgba(59,111,181,.16); border-color: #3b6fb5; color: #9fc2f0; }
[data-game="god-of-war-ragnarok"] .cb-attrnote { border-left-color: #cdaa53; }
[data-game="god-of-war-ragnarok"] .cb-slot-label { color: #cdaa53; }
[data-game="god-of-war-ragnarok"] .cb-side-left .cb-slotbox { border-left-color: rgba(205,170,83,.45); }
[data-game="god-of-war-ragnarok"] .cb-side-right .cb-slotbox { border-right-color: rgba(59,111,181,.5); }
[data-game="god-of-war-ragnarok"] .cb-side-right .cb-slot-label { color: #9fc2f0; }
[data-game="god-of-war-ragnarok"] .cb-body-arm-l { color: #cdaa53; }
[data-game="god-of-war-ragnarok"] .cb-body-arm-r { color: #9fc2f0; }
[data-game="god-of-war-ragnarok"] .cb-body-fig { min-height: 360px; }
.gw-kratos { width: 100%; max-width: 168px; height: auto; max-height: 380px; object-fit: contain; display: block;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,.55)); }

/* God of War Ragnarök — Missables checklist */
.ms-intro-card { background: rgba(59,111,181,.08); border: 1px solid rgba(59,111,181,.3); border-left: 3px solid #3b6fb5;
  border-radius: 12px; padding: 16px 18px; margin-bottom: 18px; }
.ms-intro-head { font-weight: 800; font-size: 1.02rem; color: #9fc2f0; margin: 0 0 8px; }
.ms-intro-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.ms-intro-list li { font-size: 0.9rem; color: var(--muted); line-height: 1.55; }
.ms-controls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 4px 0 16px; }
.ms-progress { font-size: 0.9rem; color: var(--muted); }
.ms-progress b { color: var(--accent-2); font-family: var(--mono); }
.ms-hidecomplete { display: flex; align-items: center; gap: 7px; font-size: 0.85rem; color: var(--muted); cursor: pointer; }
.ms-hidecomplete input { width: 16px; height: 16px; accent-color: var(--accent-2); cursor: pointer; }
.ms-controls .mini-btn { margin-left: auto; cursor: pointer; }
.ms-section { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.ms-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ms-sec-head h3 { margin: 0; font-size: 1.02rem; }
.ms-sec-count { font-family: var(--mono); font-size: 0.8rem; color: var(--accent-2); flex-shrink: 0; }
.ms-sec-note { font-size: 0.84rem; color: var(--muted); line-height: 1.5; margin: 6px 0 0; }
.ms-items { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.ms-item { display: flex; align-items: center; gap: 11px; padding: 8px 9px; border-radius: 8px; cursor: pointer; transition: background .12s; }
.ms-item:hover { background: var(--bg-soft); }
.ms-check { width: 18px; height: 18px; accent-color: var(--accent-2); cursor: pointer; flex-shrink: 0; }
.ms-item-text { font-size: 0.9rem; line-height: 1.4; }
.ms-item.done .ms-item-text { text-decoration: line-through; color: var(--muted); opacity: .7; }
.ms-flag { margin-left: auto; flex-shrink: 0; font-family: var(--mono); font-size: 0.62rem; text-transform: uppercase;
  letter-spacing: .05em; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.ms-flag-onetime { background: rgba(255,36,53,.16); color: #ff8a82; }
.ms-flag-postgame { background: rgba(59,111,181,.18); color: #9fc2f0; }
.ms-flag-story { background: var(--bg-soft); color: var(--muted); }
.ms-hide-done .ms-item.done { display: none; }
.ms-kind-awareness { border-left: 3px solid #cdaa53; }
.ms-kind-tracker { border-left: 3px solid var(--accent-2); }

/* =========================================
   Clair Obscur: Expedition 33 — Meta Builds (in-game build screen)
   ========================================= */
.ex-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; margin-bottom: 6px;
  border-bottom: 1px solid var(--border); scrollbar-width: thin; }
.ex-tab { flex: 0 0 auto; display: flex; flex-direction: row; gap: 10px; align-items: center;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px 8px 8px; cursor: pointer;
  color: var(--muted); transition: .15s; min-width: 120px; }
.ex-tab:hover { color: var(--text); border-color: var(--accent-2); }
.ex-tab.on { background: rgba(201,162,75,.14); border-color: #c9a24b; color: #e6cf95; }
.ex-tab.is-flex { border-style: dashed; }
.ex-tab-portrait { width: 40px; height: 40px; border-radius: 9px; overflow: hidden; flex-shrink: 0;
  background: #15120b; border: 1px solid rgba(201,162,75,.35); display: grid; place-items: center; }
.ex-tab-portrait img { width: 100%; height: 100%; object-fit: cover; }
.ex-tab-portrait.none { background: var(--card); }
.ex-tab-info { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.ex-tab-name { font-weight: 800; font-size: 1rem; display: flex; align-items: center; gap: 6px; }
.ex-tab.on .ex-tab-name { color: #e6cf95; }
.ex-tab-role { font-family: var(--mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: .05em; }
.ex-flex-tag { font-family: var(--mono); font-size: 0.54rem; text-transform: uppercase; letter-spacing: .06em;
  background: rgba(255,255,255,.08); color: var(--muted); border-radius: 4px; padding: 1px 5px; font-weight: 700; }

.ex-team { background: rgba(201,162,75,.08); border: 1px solid rgba(201,162,75,.28); border-left: 3px solid #c9a24b;
  border-radius: 10px; padding: 12px 15px; margin: 12px 0 16px; font-size: 0.9rem; color: var(--muted); line-height: 1.6; }
.ex-team:empty { display: none; }
.ex-team-h { display: block; font-family: var(--mono); font-size: 0.64rem; text-transform: uppercase; letter-spacing: .1em;
  color: #e6cf95; margin-bottom: 5px; font-weight: 700; }

.ex-hero { display: flex; gap: 14px; align-items: center; margin: 16px 0 14px; }
.ex-hero-portrait { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; flex-shrink: 0;
  background: #15120b; border: 1px solid rgba(201,162,75,.4); }
.ex-hero-portrait img { width: 100%; height: 100%; object-fit: cover; }
.ex-hero-text { display: flex; flex-direction: column; gap: 5px; }
.ex-hero-name { font-size: 1.3rem; font-weight: 800; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ex-hero-role { font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: .06em; color: #c9a24b; }
.ex-hero-team { font-size: 0.85rem; color: var(--muted); line-height: 1.5; }
.ex-hero-team b { color: #e6cf95; }

.ex-summary { margin: 4px 0 16px; }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); gap: 14px; align-items: start; }
.ex-panel { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.ex-panel-h { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: .12em;
  color: #c9a24b; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); text-align: center; }
.ex-skills-h, .ex-stats-h { margin-top: 18px; }

.ex-weapon-name { display: block; font-size: 1.25rem; font-weight: 800; color: var(--text); text-align: center; margin-bottom: 12px; }
.ex-weapon-meta { display: flex; flex-direction: column; gap: 8px; }
.ex-wm { display: flex; flex-direction: column; gap: 4px; font-size: 0.86rem; color: var(--text); }
.ex-wm b { font-family: var(--mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.ex-chip { display: inline-block; font-size: 0.74rem; background: rgba(201,162,75,.12); border: 1px solid rgba(201,162,75,.3);
  color: #e6cf95; border-radius: 999px; padding: 2px 9px; margin-right: 5px; }
.ex-skills { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.ex-skills li { display: flex; align-items: center; gap: 9px; font-size: 0.88rem; }
.ex-skill-dot { width: 7px; height: 7px; border-radius: 2px; background: #c9a24b; transform: rotate(45deg); flex-shrink: 0; }

.ex-pictos { display: flex; flex-direction: column; gap: 10px; }
.ex-picto { display: flex; gap: 10px; background: var(--bg-soft); border: 1px solid var(--border); border-left: 3px solid #c9a24b; border-radius: 8px; padding: 9px 11px; }
.ex-picto-ico { width: 38px; height: 38px; flex-shrink: 0; border-radius: 7px; overflow: hidden; background: #15120b;
  border: 1px solid rgba(201,162,75,.3); display: grid; place-items: center; }
.ex-picto-ico img { width: 100%; height: 100%; object-fit: contain; }
.ex-picto-ico.none { display: none; }
.ex-picto-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ex-picto-name { display: block; font-weight: 700; font-size: 0.9rem; }
.ex-picto-effect { display: block; font-size: 0.82rem; color: var(--muted); line-height: 1.45; }

.ex-luminas { display: flex; flex-direction: column; gap: 6px; }
.ex-lumina { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; padding: 8px 11px; }
.ex-lumina-name { font-size: 0.86rem; font-weight: 600; }
.ex-lumina-cost { font-family: var(--mono); font-weight: 700; font-size: 0.82rem; color: #6aa8ff; flex-shrink: 0; }
.ex-lumina-note { font-size: 0.74rem; color: var(--muted); margin: 10px 0 0; line-height: 1.45; }
.ex-stats { font-size: 0.85rem; color: var(--muted); line-height: 1.55; margin: 0; }

[data-game="expedition-33"] .cb-attr.is-primary .cb-attr-fill { box-shadow: 0 0 10px -1px currentColor; }
[data-game="expedition-33"] .cb-prim { color: #e6cf95; }

/* team-build selector */
.ex-builds { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 14px; margin: 6px 0 4px; scrollbar-width: thin; }
.ex-bcard { flex: 0 0 auto; min-width: 170px; display: flex; flex-direction: column; gap: 5px; text-align: left;
  background: var(--card); border: 1px solid var(--border); border-radius: 11px; padding: 11px 14px; cursor: pointer;
  color: var(--text); transition: .15s; }
.ex-bcard:hover { border-color: var(--accent-2); transform: translateY(-2px); }
.ex-bcard.on { border-color: #c9a24b; background: rgba(201,162,75,.12); box-shadow: 0 0 0 1px rgba(201,162,75,.2); }
.ex-bcard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ex-bcard-name { font-weight: 800; font-size: 1rem; }
.ex-bcard.on .ex-bcard-name { color: #e6cf95; }
.ex-bcard-type { font-family: var(--mono); font-size: 0.64rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ex-tier { font-family: var(--mono); font-weight: 800; font-size: 0.62rem; border-radius: 5px; padding: 2px 6px; flex-shrink: 0; }
.ex-tier-s { background: rgba(201,162,75,.22); color: #e6c878; }
.ex-tier-a { background: rgba(106,168,255,.16); color: #9fc2f0; }

/* team synergy banner */
.ex-team-sum { margin: 6px 0 8px; font-size: 0.92rem; color: var(--text); line-height: 1.6; opacity: .95; }
.ex-team-syn { margin: 0; font-size: 0.86rem; color: var(--muted); line-height: 1.55; }
.ex-team-syn b, .ex-team-sum b { color: #e6cf95; }

/* spacing fixes — keep sections from crowding each other */
.ex-grid { margin-bottom: 8px; }
.ex-sec { margin-top: 22px; }
.ex-procon { margin-top: 22px; }
#ex-screen { padding-bottom: 8px; }
#ex-screen + .tool-note { margin-top: 26px; }

@media (max-width: 560px) {
  .ex-grid { grid-template-columns: 1fr; }
}

/* =========================================
   Elden Ring — Meta Builds (buildtierlist-style equipment grid)
   ========================================= */
.er-tier { font-family: var(--mono); font-weight: 800; font-size: 0.66rem; letter-spacing: .05em;
  border-radius: 6px; padding: 3px 8px; }
.er-tier-s { background: rgba(199,160,98,.2); color: #e6c878; border: 1px solid rgba(199,160,98,.5); }
.er-tier-a { background: rgba(106,168,255,.16); color: #9fc2f0; border: 1px solid rgba(106,168,255,.4); }
.er-tier-b { background: var(--bg-soft); color: var(--muted); border: 1px solid var(--border); }

.er-equip { display: grid; grid-template-columns: repeat(auto-fit, minmax(218px, 1fr)); gap: 14px; }
.er-col-h { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: .1em;
  color: #c7a062; margin: 0 0 9px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.er-item { display: flex; gap: 10px; align-items: center; padding: 7px 0; }
.er-item + .er-item { border-top: 1px solid rgba(255,255,255,.04); }
.er-ico { flex-shrink: 0; width: 46px; height: 46px; border-radius: 8px; background: #14110c;
  border: 1px solid rgba(199,160,98,.3); display: grid; place-items: center; overflow: hidden; }
.er-ico-img { width: 100%; height: 100%; object-fit: contain; }
.er-ico-none { background: var(--bg-soft); border-style: dashed; }
.er-ico-none::after { content: "◇"; color: var(--muted); font-size: 1rem; }
.er-item-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.er-item-slot { font-family: var(--mono); font-size: 0.58rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.er-item-name { font-weight: 700; font-size: 0.86rem; }
.er-item-note { font-size: 0.76rem; color: var(--muted); line-height: 1.35; }

[data-game="elden-ring"] .cb-build.open { border-color: #b8924a;
  box-shadow: 0 0 0 1px rgba(199,160,98,.14), 0 10px 40px -20px rgba(199,160,98,.5); }
[data-game="elden-ring"] .cb-build.open .cb-caret { color: #c7a062; }
[data-game="elden-ring"] .cb-fchip.on { background: rgba(199,160,98,.16); border-color: #b8924a; color: #e6c878; }
[data-game="elden-ring"] .cb-attrnote { border-left-color: #c7a062; }
[data-game="elden-ring"] .cb-name { font-size: 1.3rem; }

/* =========================================
   DDV Animal Guide - Styled for NightmareFTW
   ========================================= */

/* Active / inactive status bar on each critter variant + its legend */
.variant-row .var-status { width: 4px; align-self: stretch; min-height: 28px; border-radius: 3px; flex-shrink: 0; background: var(--muted); }
.variant-row.va-on .var-status { background: #43c463; box-shadow: 0 0 6px -1px #43c463; }
.variant-row.va-off .var-status { background: #e5564e; }
.variant-row.va-on { border-color: rgba(67,196,99,.35); }
.var-legend { display: inline-flex; gap: 12px; margin-left: 10px; vertical-align: middle; font-size: 0.78rem; color: var(--muted); }
.var-legend .leg { display: inline-flex; align-items: center; gap: 5px; }
.var-legend .leg-bar { width: 9px; height: 11px; border-radius: 2px; display: inline-block; }
.var-legend .leg-bar.on { background: #43c463; }
.var-legend .leg-bar.off { background: #e5564e; }

/* 1. Grelha Principal dos Cards */
.animal-grid {
  display: grid;
  /* Mínimo de 400px para os cards não ficarem estreitos demais */
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

/* Estilo base do Card (O container principal) */
.animal-card {
  background: #15161a; /* Fundo escuro limpo */
  border: 1px solid #262830;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform .2s ease, border-color .2s ease;
}
.animal-card:hover {
  border-color: #4a5163; /* Highlight subtil no hover */
}

/* 2. Cabeçalho do Card (Imagem + Nome + Progresso) */
.ac-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #262830; /* Separação visual */
  background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 100%);
}

/* Imagem principal do animal */
.ac-img {
  width: 64px; height: 64px; flex-shrink: 0;
  background: #23252d; border-radius: 10px; padding: 6px;
  display: grid; place-items: center;
}
.ac-img img { width: 100%; height: 100%; object-fit: contain; }

/* Título e Badges */
.ac-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ac-name { font-family: var(--sans); font-weight: 800; font-size: 1.15rem; color: #e8eaef; line-height: 1.2; }
.ac-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }

/* Estilo das Chips (Bioma / DLC) */
.ev-chip, .fr-dlc { 
  font-family: var(--mono); font-size: 0.7rem; font-weight: 600;
  padding: 3px 8px; border-radius: 6px;
  background: rgba(255,255,255,0.06); color: #9aa0ab; letter-spacing: 0.02em;
}
/* Cores específicas para DLCs (se definidas no teu JS) */
.dlc-rift { background: rgba(0,224,184,.15); color: #6ce0b8; border: 1px solid rgba(0,224,184,.3); }
.dlc-vale { background: rgba(124,92,255,.15); color: #a694ff; border: 1px solid rgba(124,92,255,.3); }

/* Progresso (0/6) alinhado à direita */
.ac-progress {
  font-family: var(--mono); font-size: 0.9rem; color: #ff6b7a; font-weight: 700;
  background: rgba(255,107,122,0.1); padding: 4px 8px; border-radius: 6px;
}

/* 3. Corpo do Card (Textos informativos) */
.ac-body { padding: 14px 20px 20px; display: flex; flex-direction: column; gap: 8px; }
.ac-line { font-family: var(--sans); font-size: 0.9rem; color: #c5cace; line-height: 1.45; margin: 0; }
.ac-muted { color: #7a818f; }

/* 4. Grelha de Variantes (Os bichos com checkbox) */
.variant-grid {
  display: grid;
  /* Cria colunas automáticas para os variantes fcarem bem organizados */
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); 
  gap: 10px;
  margin-top: 4px;
  background: #0f1014; /* Fundo ligeiramente mais escuro para contrastar */
  border-radius: 12px;
  padding: 14px;
}

/* Linha individual de Variante */
.variant-row {
  display: flex; align-items: center; gap: 10px;
  background: #1a1c23; border: 1px solid transparent; border-radius: 8px; 
  padding: 8px 10px; cursor: pointer; transition: all .15s ease;
}
.variant-row:hover { background: #21242d; border-color: #323640; }

/* Checkbox customizado (estilo do teu tema) */
.var-check { width: 18px; height: 18px; accent-color: #5a7cf7; cursor: pointer; }

/* Imagem da variante */
.var-img { width: 36px; height: 36px; flex-shrink: 0; background: #14151a; border-radius: 6px; padding: 2px; }
.var-img img { width: 100%; height: 100%; object-fit: contain; }

/* Texto da variante (Nome e Agendamento) */
.var-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.var-name { font-weight: 600; color: #e8eaef; font-size: 0.85rem; }
/* Schedule em Mono (Courier/Monospace look) */
.var-sched { 
  font-family: var(--mono); font-size: 0.7rem; color: #6b7280; 
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Estado "Collected" (Já marcado) */
.variant-row.is-owned { opacity: 0.45; filter: grayscale(0.6); }

/* --- COMPANIONS GRID (Lado Direito) --- */
.companion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.comp-card {
  background: #1a1c23; border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
}
.comp-check { position: absolute; top: 8px; right: 8px; width: 16px; height: 16px; }

/* Responsividade Mobile */
@media (max-width: 750px) {
  .animal-grid { grid-template-columns: 1fr; } /* Um card por linha no telemóvel */
  .variant-grid { grid-template-columns: 1fr !important; }
}
/* companions */
.comp-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; position: relative; cursor: pointer; transition: opacity 0.15s; }
.comp-card.is-owned { opacity: 0.4; }
.comp-check { position: absolute; top: 10px; left: 10px; width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.comp-img { width: 90px; height: 90px; border-radius: 12px; overflow: hidden; background: var(--bg-soft); }
.comp-img img { width: 100%; height: 100%; object-fit: contain; }
.comp-body { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.comp-name { font-weight: 700; font-size: 0.9rem; }
.comp-obtain { font-size: 0.74rem; color: var(--muted); line-height: 1.35; }
.src-badge { font-family: var(--mono); font-size: 0.66rem; padding: 2px 8px; border-radius: 999px; }
.src-event { background: rgba(210,170,60,.18); color: #d8b65a; }
.src-premium { background: rgba(180,120,255,.18); color: #b98cff; }
.src-quest { background: rgba(80,160,180,.18); color: #6cc; }
.src-craft { background: rgba(80,200,120,.16); color: #5bd6a0; }
@media (max-width: 560px) { .variant-grid { grid-template-columns: 1fr; } }

/* =========================================
   Honkai: Star Rail — Meta Builds (team comps)
   ========================================= */
.filter-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-btn { font-family: var(--mono); font-size: 0.76rem; padding: 5px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card); color: var(--muted); cursor: pointer; transition: border-color .15s, color .15s; }
.filter-btn:hover { border-color: var(--accent); color: var(--text); }
.mb-element { margin-bottom: 30px; }
.mb-el-head { display: flex; align-items: center; gap: 9px; font-size: 1.05rem; margin: 0 0 14px;
  font-family: var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.el-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 10px currentColor; }
.el-Quantum .el-dot { background: #b18cff; color: #b18cff; }
.el-Lightning .el-dot { background: #cd7be0; color: #cd7be0; }
.el-Fire .el-dot { background: #ff6b5a; color: #ff6b5a; }
.el-Ice .el-dot { background: #6fd3f2; color: #6fd3f2; }
.el-Wind .el-dot { background: #5fd39a; color: #5fd39a; }
.el-Imaginary .el-dot { background: #f2d24a; color: #f2d24a; }
.el-Physical .el-dot { background: #d3d8e0; color: #d3d8e0; }

.dps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.dps-block { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.dps-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.dps-name { font-weight: 800; font-size: 1.02rem; }
.dps-count { margin-left: auto; font-family: var(--mono); font-size: 0.68rem; color: var(--muted); }

.team-comp { margin-top: 10px; }
.comp-label { display: inline-block; font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--accent-2, #00e0b8); margin-bottom: 6px; }
.comp-members { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.comp-member { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 9px; padding: 8px 4px; }
.comp-member.is-carry { border-color: rgba(255,36,53,.4); background: rgba(255,36,53,.06); }
.comp-portrait { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--bg-soft); border: 1px solid var(--border); }
.comp-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.comp-portrait.no-img { display: grid; place-items: center; }
.comp-portrait.no-img::after { content: "?"; color: var(--muted); font-weight: 700; }
.dps-head .comp-portrait { width: 40px; height: 40px; }
.comp-mname { font-size: 0.72rem; font-weight: 600; line-height: 1.2; }
.comp-role { font-family: var(--mono); font-size: 0.58rem; padding: 1px 6px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
@media (max-width: 600px) { .dps-grid { grid-template-columns: 1fr; } }

/* HSR — Character Builds detail */
.hb-build { border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-top: 12px; background: var(--bg-soft); }
.hb-role { display: inline-block; margin-bottom: 10px; }
.hb-gear { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.hb-item { display: flex; flex-direction: column; gap: 3px; background: var(--card); border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; }
.hb-k { font-family: var(--mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.hb-v { font-weight: 700; font-size: 0.92rem; line-height: 1.3; }
.hb-stats { margin-top: 12px; }
.hb-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 6px; }
.hb-slot { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-size: 0.86rem; }
.hb-slot b { display: block; font-family: var(--mono); font-size: 0.6rem; text-transform: uppercase; color: var(--accent); letter-spacing: .05em; margin-bottom: 2px; }
.hb-subs { display: block; margin-top: 5px; font-size: 0.88rem; color: var(--text); line-height: 1.5; }
.hb-note { margin: 10px 0 0; font-size: 0.8rem; color: var(--muted); line-height: 1.5; }

/* HSR — Warp Calendar */
.wc-version { margin-bottom: 26px; }
.wc-vhead { font-family: var(--mono); font-size: 1.02rem; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 12px; color: var(--accent); }
.wc-banners { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.wc-banner { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: 11px; padding: 10px 12px; }
.wc-banner.wc-live { border-color: rgba(91,214,160,.5); background: rgba(91,214,160,.06); box-shadow: 0 0 14px rgba(91,214,160,.12); }
.wc-banner.wc-upcoming { border-color: rgba(255,36,53,.32); }
.wc-banner.wc-past { opacity: .72; }
.wc-pic { width: 50px; height: 50px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: var(--bg-soft); border: 1px solid var(--border); }
.wc-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wc-pic.no-img { display: grid; place-items: center; }
.wc-pic.no-img::after { content: attr(data-init); color: var(--muted); font-weight: 800; font-family: var(--mono); }
.wc-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.wc-char { font-weight: 700; font-size: 0.96rem; }
.wc-dates { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.wc-badge { font-family: var(--mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: .03em; padding: 3px 8px; border-radius: 999px; white-space: nowrap; flex-shrink: 0; }
.wc-b-live { background: rgba(91,214,160,.18); color: #5bd6a0; }
.wc-b-upcoming { background: rgba(255,36,53,.16); color: #ff8a82; }
.wc-b-past { background: var(--bg-soft); color: var(--muted); }
@media (max-width: 560px) { .wc-banners { grid-template-columns: 1fr; } }

/* HSR — Event Calendar (timeline) */
.ev-gantt { position: relative; padding: 8px 4px 4px; }
.ev-axis { position: relative; height: 20px; margin-bottom: 8px; }
.ev-tick { position: absolute; top: 0; bottom: -9999px; border-left: 1px solid var(--border); }
.ev-tick span { position: absolute; top: 0; left: 4px; font-family: var(--mono); font-size: 0.62rem; color: var(--muted); white-space: nowrap; }
.ev-today-line { position: absolute; top: 20px; bottom: 6px; border-left: 2px dotted var(--accent); pointer-events: none; z-index: 3; }
.ev-axis .ev-today { position: absolute; top: 0; transform: translateX(-50%); }
.ev-axis .ev-today span { font-family: var(--mono); font-size: 0.6rem; color: var(--accent); background: var(--bg); padding: 0 4px; border-radius: 4px; }
.ev-row { margin-bottom: 14px; }
.ev-head { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; flex-wrap: wrap; }
.ev-name { font-weight: 700; font-size: 0.94rem; }
.ev-when { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.ev-head .wc-badge { margin-left: auto; }
.ev-track { position: relative; height: 26px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
.ev-bar { position: absolute; top: 3px; bottom: 3px; border-radius: 5px; min-width: 8px; display: flex; align-items: center; padding: 0 8px; overflow: hidden; }
.ev-bar.ev-live { background: linear-gradient(90deg, rgba(91,214,160,.85), rgba(91,214,160,.55)); }
.ev-bar.ev-upcoming { background: linear-gradient(90deg, rgba(255,90,90,.8), rgba(255,90,90,.5)); }
.ev-bar.ev-past { background: rgba(255,255,255,.1); }
.ev-bar-note { font-size: 0.68rem; color: #06121a; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.ev-bar.ev-past .ev-bar-note { color: var(--muted); }
@media (max-width: 560px) { .ev-when { display: none; } }

/* =========================================
   Far Far West — Meta Builds
   ========================================= */
.ffw-wsec { margin-bottom: 26px; }
.ffw-whead { display: flex; align-items: center; gap: 9px; font-size: 1.05rem; margin: 0 0 14px;
  font-family: var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--accent); }
.ffw-wcount { font-size: 0.7rem; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; }
.ffw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.ffw-build { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 11px; }
.ffw-bhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ffw-btitle { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ffw-bname { font-weight: 800; font-size: 1rem; line-height: 1.2; }
.ffw-bauthor { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }
.ffw-bstats { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.ffw-votes { font-family: var(--mono); font-size: 0.78rem; font-weight: 800; color: #5bd6a0; }
.ffw-lv { font-family: var(--mono); font-size: 0.64rem; color: var(--muted); }

.ffw-loadout { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ffw-slot { display: flex; align-items: center; gap: 8px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 9px; padding: 7px 8px; min-width: 0; }
.ffw-slot-txt { display: flex; flex-direction: column; min-width: 0; }
.ffw-slot-txt b { font-size: 0.8rem; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ffw-k { font-family: var(--mono); font-size: 0.56rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ffw-icon { width: 34px; height: 34px; border-radius: 7px; overflow: hidden; flex-shrink: 0; background: #0c0c12; border: 1px solid var(--border); display: grid; place-items: center; }
.ffw-icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ffw-icon.no-img::after { content: attr(data-init); color: var(--muted); font-weight: 800; font-size: 0.8rem; font-family: var(--mono); }
.ffw-icon-sm { width: 24px; height: 24px; border-radius: 6px; }

.ffw-spells { display: flex; flex-direction: column; gap: 5px; }
.ffw-spell-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ffw-spell { display: inline-flex; align-items: center; gap: 5px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px 3px 3px; font-size: 0.76rem; }
.ffw-extra { display: flex; flex-wrap: wrap; gap: 6px; }
.ffw-tag { font-family: var(--mono); font-size: 0.66rem; padding: 3px 8px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text); }
.ffw-tag.ffw-gold { color: #d4a017; border-color: rgba(212,160,23,.3); }
.ffw-tag.ffw-souls { color: #b482ff; border-color: rgba(180,130,255,.3); }
.ffw-desc { font-size: 0.84rem; color: var(--muted); line-height: 1.5; margin: 0; }
@media (max-width: 560px) { .ffw-grid { grid-template-columns: 1fr; } }

/* Far Far West — Maps & Collectibles (interactive map) */
.fm-layout { display: grid; grid-template-columns: 1fr 230px; gap: 16px; align-items: start; }
.fm-mapwrap { position: relative; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #0c0c12; line-height: 0; }
.fm-terrain { width: 100%; height: auto; display: block; }
.fm-markers { position: absolute; inset: 0; pointer-events: none; }
.fm-dot { position: absolute; width: 11px; height: 11px; border-radius: 50%; transform: translate(-50%, -50%);
  background: var(--c); border: 1.5px solid rgba(0,0,0,.65); box-shadow: 0 0 6px var(--c); pointer-events: auto; cursor: help; transition: transform .1s; }
.fm-dot:hover { transform: translate(-50%, -50%) scale(1.7); z-index: 5; }
.fm-legend { display: flex; flex-direction: column; gap: 5px; position: sticky; top: 14px; }
.fm-legend-h { font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 4px; }
.fm-cat { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 8px; cursor: pointer;
  background: var(--card); border: 1px solid var(--border); color: var(--muted); font-size: 0.82rem; text-align: left; transition: all .12s; }
.fm-cat:hover { border-color: var(--accent); }
.fm-cat.on { color: var(--text); border-color: color-mix(in srgb, var(--c) 55%, var(--border)); background: color-mix(in srgb, var(--c) 9%, var(--card)); }
.fm-cat em { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }
.fm-swatch { width: 11px; height: 11px; border-radius: 50%; background: var(--c); flex-shrink: 0; box-shadow: 0 0 5px var(--c); opacity: .45; }
.fm-cat.on .fm-swatch { opacity: 1; }
.fm-all { margin-top: 6px; }
@media (max-width: 680px) { .fm-layout { grid-template-columns: 1fr; } .fm-legend { position: static; flex-flow: row wrap; } .fm-cat { flex: 1 1 130px; } }

/* Far Far West — build card button + detail modal */
.ffw-build-btn { width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.ffw-build-btn:hover { border-color: var(--accent); }
.ffw-open { font-family: var(--mono); font-size: 0.68rem; color: var(--accent); margin-top: 2px; }
.ffw-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.74); backdrop-filter: blur(3px); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 28px 14px; overflow-y: auto; }
.ffw-modal { position: relative; width: 100%; max-width: 640px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.ffw-close { position: absolute; top: 14px; right: 14px; }
.ffw-mhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-right: 70px; }
.ffw-mname { font-size: 1.3rem; margin: 0 0 2px; line-height: 1.2; }
.ffw-mvotes { font-size: 0.95rem; }
.ffw-section { display: flex; flex-direction: column; gap: 9px; padding-top: 12px; border-top: 1px solid var(--border); }
.ffw-wblock { display: flex; align-items: center; gap: 12px; }
.ffw-wrender { width: 60px; height: 60px; border-radius: 9px; overflow: hidden; flex-shrink: 0; background: #0c0c12; border: 1px solid var(--border); display: grid; place-items: center; }
.ffw-wrender img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ffw-wrender.no-img::after { content: attr(data-init); color: var(--muted); font-weight: 800; font-family: var(--mono); }
.ffw-wmeta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ffw-wmeta b { font-size: 0.96rem; line-height: 1.15; }
.ffw-jokers { display: flex; gap: 5px; flex-wrap: wrap; }
.ffw-jk { font-family: var(--mono); font-size: 0.66rem; padding: 2px 8px; border-radius: 6px; line-height: 1.3;
  color: var(--c); background: color-mix(in srgb, var(--c) 13%, var(--card)); border: 1px solid color-mix(in srgb, var(--c) 48%, var(--border)); }
.ffw-stats { display: flex; flex-wrap: wrap; gap: 5px; }
.ffw-statchip { font-family: var(--mono); font-size: 0.7rem; padding: 2px 7px; border-radius: 6px; background: var(--bg-soft); border: 1px solid var(--border); }
.ffw-statchip em { font-style: normal; color: var(--muted); margin-right: 4px; }
.ffw-dspells { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ffw-dspell { display: flex; align-items: center; gap: 8px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 9px; padding: 7px 9px; }
.ffw-dspell b { font-size: 0.84rem; display: block; }
.ffw-hm { display: flex; flex-wrap: wrap; gap: 16px; }
.ffw-hm .ffw-wblock { flex: 1 1 220px; }
@media (max-width: 560px) { .ffw-modal { padding: 16px; } .ffw-mname { font-size: 1.1rem; } }

/* Demonologist — Demon Reference + Equipment Guide */
.dr-grid, .eq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.dr-card, .eq-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.dr-head, .eq-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.dr-name, .eq-name { font-weight: 800; font-size: 1.02rem; }
.dr-card .ghost-evidence { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px; }
.dr-tell { font-size: 0.85rem; color: var(--muted); line-height: 1.5; margin: 5px 0 0; }
.dr-str, .dr-wk { font-family: var(--mono); font-size: 0.58rem; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 5px; margin-right: 6px; }
.dr-str { background: rgba(91,214,160,.16); color: #5bd6a0; }
.dr-wk { background: rgba(255,90,90,.16); color: #ff8a82; }
.eq-card.eq-evidence { border-color: rgba(157,107,255,.32); }
.eq-price { font-family: var(--mono); font-size: 0.74rem; color: #d4a017; }
.eq-badge { display: inline-block; font-family: var(--mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 8px; border-radius: 999px; background: rgba(157,107,255,.16); color: #b98cff; margin-bottom: 8px; }
.eq-badge.eq-util { background: var(--bg-soft); color: var(--muted); }
.eq-desc { font-size: 0.86rem; color: var(--muted); line-height: 1.5; margin: 0; }
@media (max-width: 560px) { .dr-grid, .eq-grid { grid-template-columns: 1fr; } }

/* Marvel Snap — Card Database */
.ms-controls { align-items: center; }
.ms-filters { margin: -8px 0 18px; }
.ms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.ms-card { padding: 0; border: none; background: none; cursor: pointer; border-radius: 12px; line-height: 0; transition: transform .12s; }
.ms-card img { width: 100%; height: auto; display: block; border-radius: 11px; }
.ms-card:hover { transform: translateY(-4px) scale(1.03); z-index: 2; }
.ms-modal { max-width: 560px; }
.ms-detail-grid { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: start; }
.ms-detail-art { width: 100%; height: auto; border-radius: 12px; }
.ms-stats { display: flex; gap: 8px; margin: 8px 0 12px; }
.ms-stat { font-family: var(--mono); font-size: 0.78rem; font-weight: 700; padding: 3px 10px; border-radius: 7px; }
.ms-cost { background: rgba(110,150,255,.18); color: #9ab4ff; }
.ms-power { background: rgba(255,90,90,.18); color: #ff8a82; }
.ms-ability { font-size: 0.95rem; line-height: 1.55; color: var(--text); margin: 0; }
.ms-ability.ms-noability { color: var(--muted); }
.ms-meta { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); margin: 12px 0 6px; }
@media (max-width: 560px) { .ms-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); } .ms-detail-grid { grid-template-columns: 1fr; } .ms-detail-art { max-width: 200px; margin: 0 auto; } }

/* Marvel Snap — Deck Builder */
.db-deck { margin-bottom: 22px; }
.db-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.db-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; }
.db-count { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); padding: 2px 9px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border); }
.db-count.full { color: #5bd6a0; border-color: rgba(91,214,160,.4); }
.db-actions { display: flex; gap: 8px; }
.db-slots { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; }
.db-slot { border-radius: 8px; }
.db-empty { aspect-ratio: 2.5 / 3.5; background: var(--bg-soft); border: 1px dashed var(--border); cursor: default; }
.db-curve { display: flex; align-items: flex-end; gap: 8px; margin-top: 16px; height: 70px; }
.db-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.db-barfill { width: 70%; min-height: 2px; background: linear-gradient(180deg, var(--accent), rgba(228,75,75,.5)); border-radius: 3px 3px 0 0; transition: height .2s; }
.db-bar b { font-family: var(--mono); font-size: 0.62rem; color: var(--muted); margin-top: 4px; }
.db-bar em { position: absolute; top: -14px; font-style: normal; font-family: var(--mono); font-size: 0.66rem; color: var(--text); }
.ms-card.in-deck { outline: 2px solid #5bd6a0; outline-offset: 1px; position: relative; }
.ms-card.in-deck img { opacity: .55; }
.db-check { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.6rem; color: #5bd6a0; text-shadow: 0 1px 4px #000; }
@media (max-width: 700px) { .db-slots { grid-template-columns: repeat(6, 1fr); } }
.db-deck.db-dragover { outline: 2px dashed var(--accent); outline-offset: 3px; }
.ms-card[draggable="true"] { cursor: grab; }
.db-saverow { display: flex; gap: 8px; margin: 14px 0 0; }
.db-saverow .search-input { flex: 1; }
.db-saved { margin-top: 12px; }
.db-saved-h { font-family: var(--mono); font-size: 0.64rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.db-saved-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.db-saved-item { display: flex; align-items: stretch; }
.db-saved-load { font-family: var(--sans); font-size: 0.82rem; color: var(--text); background: var(--card); border: 1px solid var(--border);
  border-right: none; border-radius: 8px 0 0 8px; padding: 5px 11px; cursor: pointer; }
.db-saved-load:hover { border-color: var(--accent); }
.db-saved-load span { font-family: var(--mono); font-size: 0.66rem; color: var(--muted); margin-left: 5px; }
.db-saved-del { border-radius: 0 8px 8px 0; padding: 5px 9px; }
/* Marvel Snap — centered card modal + "view" affordance in the Deck Builder */
.ffw-overlay.ms-overlay { align-items: center; }
.ms-modal { max-height: 90vh; overflow-y: auto; }
.ms-card { position: relative; }
.ms-view { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0,0,0,.62); color: #fff; font-size: 0.66rem; border: 1px solid rgba(255,255,255,.25); opacity: 0; transition: opacity .12s; z-index: 3; cursor: zoom-in; }
.ms-card:hover .ms-view { opacity: 1; }
.ms-view:hover { background: var(--accent); }
@media (hover: none) { .ms-view { opacity: .85; } }
.ms-deck-toggle { margin-top: 14px; }

/* Marvel Snap — Deck Importer */
.di-input { margin-bottom: 20px; }
.di-textarea { width: 100%; resize: vertical; font-family: var(--mono); font-size: 0.82rem; line-height: 1.5; }
.di-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.di-msg { font-size: 0.84rem; margin: 10px 0 0; min-height: 1.1em; }
.di-msg.ok { color: #5bd6a0; }
.di-msg.err { color: #ff8a82; }
.di-deck { margin-top: 4px; }
.di-arch { font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: .04em; color: var(--accent);
  background: rgba(228,75,75,.12); border: 1px solid rgba(228,75,75,.3); border-radius: 999px; padding: 2px 10px; }
.di-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); margin-bottom: 4px; }

/* =========================================
   Play / Arcade
   ========================================= */
.play-cta { display: inline-block; margin-top: 18px; font-size: 0.92rem; color: var(--text); text-decoration: none;
  background: color-mix(in srgb, var(--accent) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border));
  border-radius: 999px; padding: 8px 16px; transition: border-color .15s, transform .12s; }
.play-cta:hover { border-color: var(--accent); transform: translateY(-1px); }
.play-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 8px; }
.play-card { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; text-decoration: none; color: inherit; transition: transform .12s, border-color .12s; }
a.play-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.play-card.disabled, .play-more { opacity: .6; }
.play-emoji { font-size: 2rem; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 12px; flex-shrink: 0;
  background: color-mix(in srgb, var(--c, var(--accent)) 12%, var(--bg-soft)); border: 1px solid color-mix(in srgb, var(--c, var(--accent)) 30%, var(--border)); }
.play-emoji.play-icon { padding: 0; overflow: hidden; }
.play-emoji.play-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.play-meta { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.play-name { font-weight: 800; font-size: 1.1rem; }
.play-blurb { font-size: 0.9rem; color: var(--muted); line-height: 1.5; margin: 0; }

/* =========================================
   Murdoku
   ========================================= */
.md-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.md-casenav { display: flex; align-items: center; gap: 10px; }
.md-caseno { font-family: var(--mono); font-weight: 800; font-size: 1rem; }
.md-solvedtag { color: #5bd6a0; font-size: 0.72rem; font-weight: 700; }
.md-progress { font-family: var(--mono); font-size: 0.76rem; color: var(--muted); }
.md-brief { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.md-scene { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); }
.md-brief p { margin: 8px 0 0; line-height: 1.6; color: var(--text); }
.md-cols { display: grid; grid-template-columns: 1fr 1.25fr; gap: 14px; align-items: start; }
.md-clues ol { margin: 6px 0 0; padding-left: 20px; }
.md-clues li { line-height: 1.6; margin-bottom: 7px; }
.md-hint { font-size: 0.76rem; color: var(--muted); margin-top: 12px; line-height: 1.5; }

.md-board h2, .md-clues h2, .md-accuse h2 { margin: 0 0 10px; }
#md-grids { display: flex; flex-direction: column; gap: 16px; }
.md-grid { display: grid; gap: 3px; }
.md-gtitle { font-family: var(--mono); font-size: 0.64rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 3px; }
.md-gcell { display: grid; place-items: center; font-size: 0.95rem; height: 30px; }
.md-gcell.md-h { background: var(--bg-soft); border-radius: 5px; cursor: default; }
.md-corner { background: none; }
.md-cell { height: 30px; border: 1px solid var(--border); background: var(--bg); border-radius: 5px; cursor: pointer; font-weight: 800; font-size: 0.85rem; padding: 0; transition: background .1s; }
.md-cell:hover { border-color: var(--accent); }
.md-cell.md-yes { background: rgba(91,214,160,.22); color: #5bd6a0; border-color: rgba(91,214,160,.5); }
.md-cell.md-no { background: rgba(255,90,90,.14); color: #ff8a82; border-color: rgba(255,90,90,.35); }

.md-accuse { margin-top: 16px; }
.md-alabel { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 10px 0 6px; }
.md-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.md-chip { font-size: 0.86rem; padding: 6px 11px; border-radius: 9px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; transition: all .12s; }
.md-chip:hover { border-color: var(--accent); }
.md-chip.on { border-color: var(--accent); background: rgba(228,75,75,.14); color: #ff8a82; font-weight: 700; }
.md-accuse-row { display: flex; align-items: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.md-verdict { font-size: 0.92rem; line-height: 1.5; }
.md-verdict.ok { color: #5bd6a0; }
.md-verdict.err { color: #ff8a82; }
.md-verdict.warn { color: var(--muted); }
@media (max-width: 860px) { .md-cols { grid-template-columns: 1fr; } }

/* Murdoku v3 — pixel-art tile map + tools */
.md-bar-r { display: flex; align-items: center; gap: 12px; }
.md-timer { font-family: var(--mono); font-weight: 800; font-size: 1.05rem; color: var(--accent); }
.md-briefline { color: var(--muted); line-height: 1.6; margin: 0 0 16px; }

.mdm-stage { display: flex; justify-content: center; margin: 0 auto 18px; }
.mdm-wrap { position: relative; width: 100%; max-width: 540px; border-radius: 14px; overflow: hidden;
  border: 2px solid var(--border); box-shadow: 0 10px 30px rgba(0,0,0,.45); background: #2a2018; }
.mdm-canvas { display: block; width: 100%; height: 100%; image-rendering: auto; }
.mdm-overlay, .mdm-labels, .mdm-fix { position: absolute; inset: 0; }
.mdm-labels, .mdm-fix { pointer-events: none; }
.mdm-fix { z-index: 1; }
.mdm-fx { position: absolute; }
/* absolutely positioned inside the cell: % sizes resolve against the cell, so a
   sprite can NEVER overflow its tile(s) — object-fit letterboxes tall/wide art */
.mdm-fx img { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 92%; height: 92%; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,.28)); }
.mdm-fx.occ img { width: 95%; height: 95%; }
.mdm-overlay { z-index: 2; }
.mdm-labels { z-index: 3; }
.mdm-tile { position: absolute; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.mdm-tile.walk:hover { box-shadow: inset 0 0 0 2px rgba(255,255,255,.75); border-radius: 3px; }
.mdm-av { width: 98%; aspect-ratio: 1; border-radius: 50%; border: 2px solid; background: var(--bg-soft); box-shadow: 0 2px 6px rgba(0,0,0,.55); }
.mdm-x { color: #ff4d4d; font-weight: 900; font-size: clamp(11px, 3.1vw, 21px); line-height: 1; text-shadow: 0 1px 2px #000; pointer-events: none; }
.mdm-x.auto { color: rgba(255,110,110,.55); font-weight: 700; font-size: clamp(9px, 2.6vw, 17px); }
.mdm-tile.elim { cursor: default; }
.mdm-note { position: absolute; top: 1px; left: 2px; right: 1px; display: flex; flex-wrap: wrap; gap: 0 1px; line-height: 1; pointer-events: none; }
.mdm-note i { font-style: normal; font-weight: 800; font-size: clamp(7px, 1.7vw, 11px); text-shadow: 0 1px 1px #000; }
.mdm-zlabel { position: absolute; transform: translate(-50%, -62%); font-family: var(--mono); font-size: clamp(5px, 1.25vw, 8px);
  font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: #fff; background: rgba(0,0,0,.4);
  padding: 0 4px; border-radius: 5px; white-space: nowrap; opacity: .9; }
.mdm-coord { position: absolute; transform: translate(-50%, -50%); font-family: var(--mono); font-size: clamp(6px, 1.4vw, 10px);
  font-weight: 700; color: rgba(255,255,255,.55); }

/* suspect cards (book-style clue sheet): polaroid portrait + clue bubble */
.mdm-cards { display: flex; flex-wrap: wrap; gap: 14px 10px; justify-content: center; margin: 6px 0 12px; }
.mdm-card { width: 118px; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.mdm-polaroid { position: relative; width: 100%; background: #f6f2e9; border-radius: 6px; padding: 7px 7px 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.mdm-polaroid img { display: block; width: 100%; aspect-ratio: 1; border-radius: 4px; background: #dde5ec; }
.mdm-cardname { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 700;
  color: #23262b; text-align: center; font-size: 0.92rem; padding: 3px 0 2px; }
.mdm-cardx { position: absolute; left: 7px; right: 7px; top: 7px; aspect-ratio: 1; display: grid; place-items: center;
  color: rgba(214,42,42,.88); font-size: 4.4rem; font-weight: 900; line-height: 1; pointer-events: none; }
.mdm-pill { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px; padding: 7px 12px;
  font-size: 0.78rem; color: var(--text); text-align: center; line-height: 1.5; }
.mdm-pill b { color: #ffd24a; }
.mdm-pill .mdm-viclabel { color: #ff8a82; text-transform: uppercase; font-size: 0.72rem; letter-spacing: .04em; }

.mdm-toolbar { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.mdm-tool { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 64px; padding: 8px 12px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--card); color: var(--muted); font-size: 0.72rem; cursor: pointer; transition: all .12s; }
.mdm-tool span { font-size: 1.1rem; line-height: 1; }
.mdm-tool:hover { border-color: var(--accent); color: var(--text); }
.mdm-tool.on { border-color: var(--accent); background: rgba(228,75,75,.16); color: #ff8a82; }

/* wrap onto a new line instead of overflowing sideways into the clues column */
.mdm-tray { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding: 6px 2px 12px; margin-bottom: 6px; }
.mdm-sus { position: relative; flex: 0 0 auto; width: 78px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 6px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--card); cursor: pointer; transition: all .12s; }
.mdm-sus img { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--c); background: var(--bg-soft); }
.mdm-sus span { font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.mdm-sus.on { border-color: var(--c); box-shadow: 0 0 0 1px var(--c); }
.mdm-sus.on span { color: var(--text); }
.mdm-sus.placed { opacity: .55; }
.mdm-dot { position: absolute; top: 4px; right: 6px; color: #5bd6a0; font-size: 0.7rem; font-weight: 800; }

.mdm-lower { margin-top: 6px; }
.mdm-count { font-family: var(--mono); font-size: 1.2rem; font-weight: 800; margin: 0 0 6px; }
.mdm-note-line { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* victim marker + accuse panel */
.mdm-sus.victim { border-color: #9aa0a8; }
.mdm-sus.victim img { filter: grayscale(.5) contrast(.95); }
.mdm-vic { position: absolute; top: 3px; left: 6px; font-size: 0.8rem; filter: drop-shadow(0 1px 1px #000); }
.mdm-vic-tile { position: absolute; top: 1px; right: 2px; font-size: clamp(8px, 2vw, 13px); filter: drop-shadow(0 1px 1px #000); pointer-events: none; }
.mdm-av.vic { filter: grayscale(.55) contrast(.95); }
.mdm-accuse-t { font-weight: 800; margin: 4px 0 2px; color: var(--text); }
.mdm-accuse { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.mdm-accuse-b { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 66px; padding: 6px 4px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card); color: var(--muted); cursor: pointer; transition: all .12s; }
.mdm-accuse-b img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--c); background: var(--bg-soft); }
.mdm-accuse-b span { font-size: 0.7rem; white-space: nowrap; }
.mdm-accuse-b:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }
.mdm-wrong { color: #ff8a82; font-size: 0.9rem; margin: 4px 0 0; }

/* game layout: map (with its tools) on the left, clues on the right */
.md-game { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 22px; align-items: start; }
.md-left { display: flex; flex-direction: column; align-items: center; }
.md-left .mdm-stage { margin: 0 0 12px; width: 100%; }
.md-left .mdm-wrap { max-width: 480px; }
.md-right { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.md-diff { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); font-weight: 700; }
@media (max-width: 900px) { .md-game { grid-template-columns: 1fr; } .md-left .mdm-wrap { max-width: 460px; margin: 0 auto; } }

/* main menu: how-to, chapter picker, case grid */
.mdk-menu { display: flex; flex-direction: column; gap: 18px; }
.mdk-menusub { color: var(--muted); line-height: 1.6; margin: 0; max-width: 72ch; }
.mdk-how { }
.mdk-how ol { margin: 8px 0 0; padding-left: 20px; }
.mdk-how li { line-height: 1.6; margin-bottom: 7px; color: var(--text); }
.mdk-how b { color: #ffd24a; }
.mdk-chtabs { display: flex; gap: 10px; flex-wrap: wrap; }
.mdk-chtab { flex: 1 1 200px; text-align: left; display: flex; flex-direction: column; gap: 3px; padding: 12px 14px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; transition: all .12s; }
.mdk-chtab:hover:not(.locked) { border-color: var(--accent); }
.mdk-chtab.on { border-color: var(--accent); background: rgba(228,75,75,.14); }
.mdk-chtab.locked { opacity: .5; cursor: not-allowed; }
.mdk-chn { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mdk-cht { font-weight: 800; font-size: 0.98rem; }
.mdk-chp { font-family: var(--mono); font-size: 0.72rem; color: var(--accent); }
.mdk-caserow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mdk-caserow h2 { margin: 0; font-size: 1.05rem; }
.mdk-chtitle { color: var(--muted); font-weight: 600; }
.mdk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 9px; }
.mdk-case { display: flex; flex-direction: row; align-items: center; gap: 9px; padding: 11px 13px; text-align: left;
  border-radius: 11px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; transition: all .12s; }
.mdk-case:hover:not(.locked) { border-color: var(--accent); transform: translateY(-1px); }
.mdk-case.locked { opacity: .5; cursor: not-allowed; }
.mdk-case.done { border-color: rgba(91,214,160,.45); background: rgba(91,214,160,.07); }
.mdk-cnum { font-family: var(--mono); font-weight: 800; font-size: 0.95rem; color: var(--muted); min-width: 1.7em; }
.mdk-case.done .mdk-cnum { color: #5bd6a0; }
.mdk-cname { flex: 1; font-size: 0.9rem; font-weight: 600; line-height: 1.3; }
.mdk-case.locked .mdk-cname { color: var(--muted); }
.mdk-cmark { font-size: 0.9rem; color: #5bd6a0; }
.mdk-continue { white-space: nowrap; }
@media (max-width: 560px) { .mdm-zlabel { font-size: 8px; padding: 0 3px; } }

/* ---- Ravenswatch: hero kits, talents & magical objects ---- */
.rw-epithet { color: var(--muted); font-size: 0.95rem; font-style: italic; }
.rw-group { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent); margin: 18px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.rw-ability { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-top: 10px; background: var(--bg-soft); }
/* Merlin's spells are cast by another ability, so they sit indented under it */
.rw-ability.rw-sub { margin-left: 22px; border-left: 2px solid var(--accent); background: var(--card); }
.rw-ab-head { display: flex; align-items: center; gap: 11px; }
.rw-ab-icon { width: 42px; height: 42px; border-radius: 9px; flex-shrink: 0; object-fit: cover; border: 1px solid var(--border); }
.rw-kind { display: inline-block; font-family: var(--mono); font-size: 0.6rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--accent); margin-right: 8px; }
.rw-ab-name { font-weight: 800; font-size: 1rem; }
.rw-unlock { display: inline-block; font-family: var(--mono); font-size: 0.6rem; color: var(--muted); margin-left: 8px; }
.rw-fx { margin: 9px 0 0; padding-left: 18px; }
.rw-fx li { font-size: 0.88rem; line-height: 1.55; margin-bottom: 4px; }
.rw-fx li.rw-fx-sub { color: var(--muted); font-size: 0.83rem; list-style-type: circle; }

.rw-talent .rw-t-head, .rw-object .rw-o-head { display: flex; align-items: center; gap: 11px; }
.rw-t-icon, .rw-o-icon { width: 44px; height: 44px; border-radius: 9px; flex-shrink: 0; object-fit: contain;
  background: var(--card); border: 1px solid var(--border); }
.rw-t-meta, .rw-o-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; }
.rw-t-effect { margin: 10px 0 0; font-size: 0.88rem; line-height: 1.55; }
.rw-t-rarity { margin: 8px 0 0; font-size: 0.82rem; color: var(--muted); line-height: 1.5; }
.rw-t-rarity b { font-family: var(--mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--accent); margin-right: 6px; }

/* the game's rarity colours, used on both the cards and the filter chips */
.rw-object { border-left: 3px solid var(--border); }
.rar-common { --rar: #9fb0bd; }
.rar-rare { --rar: #4f9de0; }
.rar-epic { --rar: #b06fe0; }
.rar-legendary { --rar: #e0a84f; }
.rar-cursed { --rar: #e0574f; }
.rw-object.rar-common, .rw-object.rar-rare, .rw-object.rar-epic,
.rw-object.rar-legendary, .rw-object.rar-cursed { border-left-color: var(--rar); }
.rw-object .rw-rar { background: color-mix(in srgb, var(--rar) 18%, transparent); color: var(--rar); }
.filter-btn.rar-common, .filter-btn.rar-rare, .filter-btn.rar-epic,
.filter-btn.rar-legendary, .filter-btn.rar-cursed { color: var(--rar); }
.filter-btn.rar-common.active, .filter-btn.rar-rare.active, .filter-btn.rar-epic.active,
.filter-btn.rar-legendary.active, .filter-btn.rar-cursed.active { border-color: var(--rar); }

/* ---- HSR tier list: per-character builds + team comps panel ---- */
/* the tier cards are buttons now, so strip the default button chrome */
.char-card.hsr-char { cursor: pointer; font: inherit; text-align: center; }
.tier-badge.tier-inline { width: auto; min-width: 2.2em; padding: 2px 9px; font-size: 0.8rem;
  display: inline-block; vertical-align: middle; margin-right: 6px; }
.td-section { font-size: 1rem; margin: 22px 0 4px; padding-bottom: 7px; border-bottom: 1px solid var(--border); }
.td-count { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); font-weight: 400; }
.td-sub { font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--accent); margin: 14px 0 0; }
.td-comps { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
/* the character whose panel this is, so you can spot them in each comp */
.comp-member.is-focus { border-color: var(--accent); background: rgba(255, 36, 53, 0.12); }

/* ---- Ravenswatch: build directions ---- */
.rw-theme { margin-top: 20px; }
.rw-theme-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin: 0 0 9px; padding-bottom: 7px; border-bottom: 1px solid var(--border); font-size: 1rem; }
.rw-keyword { font-family: var(--mono); font-weight: 800; letter-spacing: .04em; color: var(--accent); }
.rw-theme-count { font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); font-weight: 400; }
.rw-b-talents { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.rw-b-talent { display: flex; gap: 11px; padding: 11px 13px; border: 1px solid var(--border);
  border-radius: 11px; background: var(--bg-soft); }
/* the picks you can open a run with, so the direction is reachable from turn one */
.rw-b-talent.is-starter { border-color: rgba(200, 160, 74, .45); background: rgba(200, 160, 74, .07); }
.rw-b-tname { font-weight: 700; font-size: 0.93rem; margin-right: 7px; }
.rw-starter { background: rgba(200, 160, 74, .18); color: #d9b45e; }
