﻿@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;700&family=Instrument+Serif:ital@0;1&family=Noto+Sans+SC:wght@400;500;700&family=Noto+Serif+SC:wght@500;700&display=swap');

:root {
  color-scheme: dark;

  /* Museum Night Colors */
  --bg-0: #090B0F;        /* Page background: Deep dark slate blue */
  --bg-1: #121722;        /* Main panels: Glass exhibition cases */
  --bg-2: #1A2130;        /* Raised surface: Cards and content blocks */
  --bg-3: #222A3A;        /* Interactive surface: Hover states */

  --text-0: #F5F1E8;      /* Primary text: Warm parchment white */
  --text-1: #B8C0CC;      /* Secondary text: Readable light grey-blue */
  --text-2: #8F99A8;      /* Supporting text: Slate grey, WCAG compliant */

  --accent-gold: #D6B56D;   /* Theme Main: Curator's Muted Gold */
  --accent-copper: #C07A4A; /* Preview tool / Accent 2 */
  --accent-jade: #7BC6A4;   /* Mechanics / Green */
  --accent-blue: #8FB9D1;   /* Cards / Blue */
  --accent-red: #E17768;    /* Warnings / Issues / Red */

  --line-soft: rgba(214, 181, 109, 0.12);
  --line-strong: rgba(214, 181, 109, 0.25);
  --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.5);

  /* Typography Stacks */
  --font-display-zh: "Noto Serif SC", "Source Han Serif SC", serif;
  --font-body-zh: "Noto Sans SC", "Source Han Sans SC", system-ui, sans-serif;
  --font-ui: "Inter", "Noto Sans SC", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-display-en: "Cormorant Garamond", "Instrument Serif", serif;
  --font-ui-en: "Inter", system-ui, sans-serif;

  /* Legacy Mappings to prevent breakage */
  --bg-dark: var(--bg-0);
  --bg-panel: var(--bg-1);
  --bg-card: var(--bg-2);
  --bg-hover: var(--bg-3);

  --text-primary: var(--text-0);
  --text-muted: var(--text-1);
  --text-faint: var(--text-2);

  --gold-bright: var(--accent-gold);
  --gold-dim: #9e844f;

  --sts-red: var(--accent-red);
  --sts-green: var(--accent-jade);
  --sts-blue: var(--accent-blue);
  --sts-purple: #B298DC;
  --sts-gold: var(--accent-gold);

  --line-dim: rgba(255, 255, 255, 0.05);
  --line-gold: rgba(214, 181, 109, 0.35);

  --shadow-main: var(--shadow-soft);
  --shadow-glow-gold: 0 0 16px rgba(214, 181, 109, 0.15);
  --shadow-glow-green: 0 0 16px rgba(123, 198, 164, 0.15);
  --shadow-glow-red: 0 0 16px rgba(225, 119, 104, 0.15);

  --radius-sharp: 0px;
  --radius-mild: 8px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

*:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-dark);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border: 1px solid var(--bg-dark);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-bright);
}

body {
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.01em;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, hsla(44, 70%, 55%, 0.08) 0%, transparent 70%),
    radial-gradient(circle at 12% 30%, hsla(12, 70%, 50%, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 88% 70%, hsla(210, 65%, 50%, 0.04) 0%, transparent 45%),
    radial-gradient(ellipse 60% 30% at 50% 100%, hsla(30, 50%, 40%, 0.03) 0%, transparent 60%),
    var(--bg-dark);
  position: relative;
  min-height: 100vh;
}

/* Subtle parchment grain noise overlay */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.045;
  mix-blend-mode: overlay;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, textarea {
  font-family: inherit;
  color: inherit;
}

/* Site Header (Curator's Top Bar) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(9, 11, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px var(--gold-bright));
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand strong {
  font-family: var(--font-display-zh), var(--font-display-en), serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

.beating-heart-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
}

.beating-heart {
  position: relative;
  width: 7px;
  height: 7px;
  background-color: var(--sts-red);
  transform: rotate(-45deg);
  box-shadow: 0 0 8px var(--sts-red);
}

.beating-heart::before,
.beating-heart::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  background-color: var(--sts-red);
  border-radius: 50%;
}

.beating-heart::before { top: -4px; left: 0; }
.beating-heart::after { top: 0; left: 4px; }

/* Restrict brand-sub metadata styling */
.brand small {
  display: block;
  font-size: 11px;
  color: var(--gold-bright);
  font-family: var(--font-ui);
  letter-spacing: 0.05em;
  margin-top: 2px;
  opacity: 0.85;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 32px);
  font-family: var(--font-ui);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.site-nav a {
  position: relative;
  padding: 6px 0;
  transition: var(--transition);
}

.site-nav a::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; width: 0; height: 1px;
  background-color: var(--gold-bright);
  transition: var(--transition);
}

.site-nav a:hover {
  color: var(--text-primary);
}

.site-nav a:hover::after,
.site-nav a.active::after {
  width: 100%;
}

.site-nav a.active {
  color: var(--gold-bright);
}

.lang-switch {
  display: flex;
  background: #0a0c12;
  border: 1px solid var(--line-strong);
  padding: 2px;
  gap: 2px;
}

.lang-switch button {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  cursor: pointer;
  transition: var(--transition);
}

.lang-switch button:hover {
  color: var(--text-primary);
}

.lang-switch button.active {
  background: var(--line-strong);
  color: var(--gold-bright);
}

/* Page Containers */
main {
  width: min(1280px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

.page-head {
  margin: 0 0 24px;
  padding: 32px;
  background:
    linear-gradient(135deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: var(--shadow-main);
  text-align: center;
}

.page-head h1 {
  font-family: var(--font-display-zh), var(--font-display-en), serif;
  font-weight: 500;
  font-size: clamp(34px, 4.5vw, 56px);
  color: var(--gold-bright);
  margin: 0 0 8px;
  text-shadow: 0 0 8px rgba(214, 181, 109, 0.15);
  letter-spacing: -0.01em;
}

.page-head p.lead {
  max-width: 800px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 15.5px;
}

/* Button aesthetics (curated plaque buttons) */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  font-family: var(--font-ui);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  border-radius: 6px;
  position: relative;
}

.button:hover {
  color: var(--text-primary);
  border-color: var(--gold-bright);
  background: var(--bg-hover);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.button.primary {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: var(--bg-dark);
  font-weight: 700;
}

.button.primary:hover {
  background: var(--text-primary);
  border-color: var(--text-primary);
  box-shadow: 0 4px 16px rgba(214, 181, 109, 0.25);
  color: var(--bg-dark);
}

.button:active {
  transform: scale(0.97);
}

/* Hero Section (Curator Gallery Welcome Banner) */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  background:
    radial-gradient(circle at 80% 20%, hsla(44, 70%, 55%, 0.03) 0%, transparent 60%),
    linear-gradient(135deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: clamp(24px, 4vw, 48px);
  margin-bottom: 32px;
  box-shadow: var(--shadow-main);
}

.hero-images {
  position: relative;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  grid-template-rows: repeat(2, 110px);
  gap: 12px;
  background: rgba(0, 0, 0, 0.25);
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.6);
}

.hero-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  transition: var(--transition);
  filter: grayscale(0.1) contrast(1.05);
}

.hero-images img:nth-child(1) {
  grid-row: span 2;
}

.hero-images img:hover {
  transform: scale(1.02);
  border-color: var(--gold-bright);
  filter: grayscale(0) contrast(1.1);
  z-index: 10;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.release-line {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.15em;
  color: var(--gold-bright);
  margin: 0 0 12px;
  text-transform: uppercase;
  opacity: 0.9;
}

.hero h1 {
  font-family: var(--font-display-zh), var(--font-display-en), serif;
  font-weight: 700;
  font-size: clamp(36px, 5vw, 56px);
  margin: 0 0 16px;
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(214, 181, 109, 0.1);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.hero p:not(.release-line) {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0 0 24px;
  line-height: 1.6;
}

/* Event Choices UI elements inside Hero */
.hero-choices-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.hero-choice-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 18px;
  background: rgba(18, 23, 34, 0.45);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  font-family: var(--font-ui);
}

.hero-choice-btn:hover {
  background: rgba(214, 181, 109, 0.06);
  border-color: var(--gold-bright);
  color: var(--text-primary);
  transform: translateX(4px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-choice-btn .choice-prefix {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--gold-bright);
  margin-right: 16px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.hero-choice-btn .choice-text {
  font-size: 14.5px;
  line-height: 1.3;
}

/* Features Triptych Panel Section */
.mod-intro-section {
  background: var(--bg-panel);
  border: 1px solid var(--line-strong);
  padding: 40px 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-main);
  border-radius: 16px;
}

.intro-heading {
  font-family: var(--font-display-zh), var(--font-display-en), serif;
  font-size: 24px;
  color: var(--gold-bright);
  text-align: center;
  margin: 0 0 32px;
  letter-spacing: 0.03em;
  text-shadow: 1px 1px 2px var(--bg-dark);
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feat-card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  padding: 24px;
  position: relative;
  transition: var(--transition);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.feat-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-bright);
  background: var(--bg-hover);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.feat-card h3 {
  font-family: var(--font-display-zh), var(--font-display-en), serif;
  font-size: 18px;
  color: var(--gold-bright);
  margin: 0 0 12px;
  font-weight: 600;
}

.feat-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Codex Controls (Exhibition directory filter bar) */
.tool-row {
  position: sticky;
  top: 70px;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  background: rgba(18, 23, 34, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 360px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 12px;
  color: var(--gold-bright);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: 6px;
  font-family: var(--font-ui);
  font-size: 13.5px;
  transition: var(--transition);
}

.search input:focus {
  outline: none;
  border-color: var(--gold-bright);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 12px rgba(214, 181, 109, 0.15);
}

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

.chip {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  cursor: pointer;
  transition: var(--transition);
  border-radius: 6px;
}

.chip:hover {
  border-color: var(--gold-bright);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.chip.active {
  background: rgba(214, 181, 109, 0.12);
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  font-weight: 600;
}

/* Split-Pane Updates Codex Layout */
.update-board {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: start;
}

/* Left Pane: Sticky Card Inspector Panel */
.inspector-pane {
  position: sticky;
  top: 140px;
  background: rgba(18, 23, 34, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line-soft);
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  min-height: 520px;
  max-height: calc(100vh - 170px);
  display: flex;
  flex-direction: column;
}

.inspector-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 420px;
  color: var(--text-faint);
  text-align: center;
}

.inspector-placeholder-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.inspector-card-preview {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: inspectFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  overflow-y: auto;
  flex: 1;
  padding-right: 8px;
  margin-right: -8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(214, 181, 109, 0.3) rgba(0, 0, 0, 0.1);
}

.inspector-card-preview::-webkit-scrollbar {
  width: 6px;
}

.inspector-card-preview::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

.inspector-card-preview::-webkit-scrollbar-thumb {
  background: rgba(214, 181, 109, 0.3);
  border-radius: 3px;
  transition: background 0.2s ease;
}

.inspector-card-preview::-webkit-scrollbar-thumb:hover {
  background: var(--gold-bright);
}

@keyframes inspectFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.inspector-art-frame {
  width: 96px;
  height: 96px;
  margin: 0 auto 4px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(214, 181, 109, 0.1) 0%, transparent 80%),
    #0a0c12;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-mild);
  box-shadow:
    0 8px 16px rgba(0,0,0,0.4),
    inset 0 0 10px rgba(0,0,0,0.6);
}

.inspector-art-frame img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.inspector-header {
  text-align: center;
  border-bottom: 1px dashed var(--line-strong);
  padding-bottom: 10px;
  position: relative;
}

.inspector-header h2 {
  font-family: var(--font-display-zh), var(--font-display-en), serif;
  font-size: 20px;
  color: var(--gold-bright);
  margin: 0 0 6px;
  font-weight: 600;
}

.inspector-header .pin-badge {
  position: static;
  display: inline-block;
  margin-top: 4px;
  font-size: 9.5px;
  padding: 2px 8px;
  background: rgba(214, 181, 109, 0.12);
  border: 1px solid var(--gold-bright);
  color: var(--gold-bright);
  font-family: var(--font-ui);
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 4px;
}

.clear-pin-btn {
  background: transparent;
  border: 0;
  color: var(--sts-red);
  font-family: var(--font-ui);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  margin-left: 8px;
  text-decoration: underline;
}

.clear-pin-btn:hover {
  color: var(--text-primary);
}

.inspector-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}

.inspector-tags .tag {
  background: rgba(214, 181, 109, 0.08);
  border: 1px solid var(--line-strong);
  color: var(--gold-bright);
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  font-family: var(--font-ui);
  text-transform: uppercase;
  border-radius: 4px;
}

.inspector-comp {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.inspector-sect-title {
  font-family: var(--font-ui);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  margin: 0 0 4px;
}

.inspector-desc-block {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--line-soft);
  padding: 12px;
  border-radius: var(--radius-mild);
  font-size: 14px;
  line-height: 1.55;
}

.inspector-desc-block.vanilla-box {
  border-left: 3px solid var(--text-muted);
}

.inspector-desc-block.current-box {
  border-left: 3px solid var(--accent-jade);
  background: rgba(123, 198, 164, 0.04);
}

.inspector-desc-block p {
  margin: 0;
}

/* Right Pane: Comparison Lists */
.compare-group {
  border: 1px solid var(--line-soft);
  background: var(--bg-panel);
  padding: 24px;
  margin-bottom: 24px;
  border-radius: 16px;
  box-shadow: var(--shadow-main);
}

.group-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 14px;
}

.group-head img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px var(--gold-bright));
}

.group-head h2 {
  font-family: var(--font-display-zh), var(--font-display-en), serif;
  font-weight: 600;
  font-size: 22px;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.group-head p {
  color: var(--text-muted);
  font-size: 14.5px;
  margin: 0;
}

.compare-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

/* Relic Card Component Design */
.compare-card {
  background: var(--bg-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  position: relative;
  border-radius: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.02);

  /* Glow custom properties (default: Gold/Relic theme) */
  --glow-color: rgba(214, 181, 109, 0.2);
  --border-active: var(--accent-gold);
  --border-active-glow: rgba(214, 181, 109, 0.25);
  --art-glow-color: rgba(214, 181, 109, 0.08);
  --art-border-color: var(--gold-bright);
}

/* Category Vertical Stripe Indicator */
.compare-card::after {
  content: "";
  position: absolute;
  inset: 12px auto 12px 0;
  width: 3px;
  border-radius: 999px;
  background: var(--border-active);
  transition: var(--transition);
}

.compare-card:not(.loaded) {
  animation: cardDealFade 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--index, 0) * 0.015s);
  opacity: 0;
}

.compare-card.loaded {
  opacity: 1;
}

@keyframes cardDealFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (hover: hover) {
  .compare-card:hover {
    transform: translateY(-1px);
    z-index: 5;
    border-color: var(--border-active) !important;
    background-color: var(--bg-hover);
    box-shadow:
      0 6px 16px rgba(0, 0, 0, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }
}

/* Card Pin State on List Cards */
.compare-card.active-inspect {
  z-index: 4;
  border-color: var(--border-active) !important;
  background-color: var(--bg-hover);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.25),
    inset 0 0 0 1px var(--border-active);
}

/* Card Category Theming (Variables) */

/* Relics: Gold Theme */
.compare-card.type-relics {
  --border-active: var(--accent-gold);
  --art-glow-color: rgba(214, 181, 109, 0.1);
  --art-border-color: var(--accent-gold);
}

/* Cards: Blue Theme */
.compare-card.type-cards {
  --border-active: var(--accent-blue);
  --art-glow-color: rgba(143, 185, 209, 0.1);
  --art-border-color: var(--accent-blue);
}

/* Ancients: Gold Theme */
.compare-card.type-ancients {
  --border-active: var(--accent-gold);
  --art-glow-color: rgba(214, 181, 109, 0.1);
  --art-border-color: var(--accent-gold);
}

/* Ascension: Red Theme */
.compare-card.type-ascension {
  --border-active: var(--accent-red);
  --art-glow-color: rgba(225, 119, 104, 0.1);
  --art-border-color: var(--accent-red);
}

/* Mechanics: Jade Theme */
.compare-card.type-mechanics {
  --border-active: var(--accent-jade);
  --art-glow-color: rgba(123, 198, 164, 0.1);
  --art-border-color: var(--accent-jade);
}

/* Preview Tools: Copper Theme */
.compare-card.type-preview {
  --border-active: var(--accent-copper);
  --art-glow-color: rgba(192, 122, 74, 0.1);
  --art-border-color: var(--accent-copper);
}

.compare-card:hover .card-art-frame,
.compare-card.active-inspect .card-art-frame {
  border-color: var(--art-border-color) !important;
  background: radial-gradient(circle at center, var(--art-glow-color) 0%, transparent 80%), #0a0c12 !important;
}

.compare-card .pin-badge {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(214, 181, 109, 0.12);
  border: 1px solid var(--gold-bright);
  color: var(--gold-bright);
  font-size: 8px;
  font-weight: 700;
  padding: 1px 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family: var(--font-ui);
  z-index: 15;
  border-radius: 2px;
}

/* Card Header (Art Frame + Title) */
.card-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-art-frame {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.03) 0%, transparent 85%),
    #0a0c12;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-mild);
  box-shadow: inset 0 0 6px rgba(0,0,0,0.6);
  flex-shrink: 0;
  transition: var(--transition);
}

@media (hover: hover) {
  .compare-card:hover .card-art-frame {
    border-color: var(--border-active);
    background:
      radial-gradient(circle at center, var(--art-glow-color) 0%, transparent 80%),
      #0a0c12;
  }
}

.card-title-block {
  min-width: 0;
}

.card-title-block h3 {
  font-family: var(--font-display-zh), var(--font-display-en), serif;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: var(--transition);
}

@media (hover: hover) {
  .compare-card:hover .card-title-block h3 {
    text-shadow: 0 0 8px var(--gold-bright);
  }
}

.compare-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.compare-card .tag {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line-strong);
  color: var(--text-muted);
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 2px;
  font-family: var(--font-ui);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Card Compare Details */
.compare-card .sts-card-current {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-primary);
  border-top: 1px solid var(--line-soft);
  padding-top: 10px;
}

/* Card details toggles inside updating panels */
.item-details {
  border-top: 1px dashed var(--line-strong);
  margin-top: 8px;
  padding-top: 8px;
}

.item-details summary {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--gold-bright);
  cursor: pointer;
  list-style: none;
}

.item-details summary::-webkit-details-marker {
  display: none;
}

.detail-grid {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.detail-row {
  background: hsla(0, 0%, 0%, 0.25);
  border: 1px solid var(--line-dim);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-title {
  font-family: "Outfit", sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--gold-bright);
}

.detail-copy {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Merchant Rug downloads container (Install panel) */
.install-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: start;
}

.merchant-shop {
  background: var(--bg-panel);
  border: 1px solid var(--line-soft);
  padding: 0 !important;
  border-radius: 16px;
  box-shadow: var(--shadow-main);
  overflow: hidden;
}

.merchant-shop h2 {
  font-family: var(--font-display-zh), var(--font-display-en), serif;
  font-weight: 600;
  font-size: 22px;
  color: var(--gold-bright);
  padding: 24px 24px 12px;
  margin: 0;
}

/* Red Merchant Rug */
.merchant-rug {
  background:
    radial-gradient(circle at center, hsla(12, 90%, 55%, 0.12) 0%, transparent 75%),
    linear-gradient(135deg, hsl(12, 70%, 8%) 0%, hsl(12, 80%, 3%) 100%);
  border-top: 3px solid var(--sts-red);
  padding: 32px 24px;
  position: relative;
  box-shadow: inset 0 8px 24px rgba(0,0,0,0.8);
}

.merchant-rug::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed var(--gold-dim);
  opacity: 0.25;
  pointer-events: none;
}

/* Merchant Speech Balloon */
.merchant-speech {
  position: relative;
  background: #E8E5DD;
  color: #121418;
  padding: 12px 18px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 14.5px;
  line-height: 1.4;
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
  animation: balloonPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.merchant-speech::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 32px;
  border-width: 8px 8px 0;
  border-style: solid;
  border-color: #E8E5DD transparent;
  display: block;
  width: 0;
}

@keyframes balloonPop {
  from { opacity: 0; transform: scale(0.92) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.download-group {
  border-bottom: 1px dashed hsla(44, 73%, 58%, 0.15);
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.download-group:last-of-type {
  border: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}

.download-group-title {
  font-family: var(--font-ui);
  font-size: 13px;
  text-transform: uppercase;
  color: var(--gold-bright);
  letter-spacing: 0.08em;
  margin: 0 0 16px;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Metadata lists below rug */
.merchant-rug dl.meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 24px;
  border-top: 1px dashed hsla(44, 73%, 58%, 0.15);
  margin-top: 24px;
  padding-top: 20px;
  font-size: 13.5px;
}

.merchant-rug dl.meta dt {
  font-family: var(--font-ui);
  font-weight: 700;
  color: var(--gold-bright);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.05em;
}

.merchant-rug dl.meta dd {
  margin: 0;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.hash-container {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hash {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.copy-hash-btn {
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  color: var(--gold-bright);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  cursor: pointer;
  transition: var(--transition);
}

.copy-hash-btn:hover {
  border-color: var(--gold-bright);
  background: var(--line-strong);
}

.copy-hash-btn.copied {
  background: var(--sts-green);
  border-color: var(--sts-green);
  color: var(--bg-dark);
}

/* SVG Dotted Journey Map walkthrough paths */
.spire-steps-container {
  position: relative;
}

.spire-steps-list {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0 0 0 20px;
}

/* Vertical dotted SVG-drawn connector path */
.spire-steps-list::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 20px;
  width: 2px;
  background-image: linear-gradient(to bottom, var(--gold-dim) 50%, transparent 50%);
  background-size: 2px 10px;
  opacity: 0.5;
  z-index: 1;
}

.step-node {
  display: flex;
  align-items: start;
  gap: 20px;
  margin-bottom: 28px;
  position: relative;
  z-index: 5;
}

.step-node:last-of-type {
  margin-bottom: 0;
}

.step-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--gold-bright);
  background: #0a0c12;
  color: var(--gold-bright);
  font-family: var(--font-display-zh), var(--font-display-en), serif;
  font-weight: 700;
  font-size: 16px;
  display: grid;
  place-items: center;
  box-shadow:
    0 4px 12px rgba(0,0,0,0.6),
    inset 0 0 8px rgba(0,0,0,0.8);
  flex-shrink: 0;
  transition: var(--transition);
}

.step-node:hover .step-icon {
  border-color: var(--text-primary);
  color: var(--text-primary);
  box-shadow:
    0 4px 16px rgba(214, 181, 109, 0.25),
    inset 0 0 8px rgba(0,0,0,0.8);
  transform: scale(1.08);
}

.step-text {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.55;
  padding-top: 8px;
}

/* Event Choices panel layout (Issues & Changelog) */
.issue-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.issue-column-title {
  font-family: var(--font-display-zh), var(--font-display-en), serif;
  font-size: 22px;
  color: var(--gold-bright);
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 12px;
  margin: 0 0 20px;
  text-transform: uppercase;
}

.issue-list,
.change-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.issue,
.change {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow-main);
  position: relative;
  transition: var(--transition);
}

.issue:hover,
.change:hover {
  transform: translateY(-2px);
  border-color: var(--gold-bright);
}

.issue strong,
.change strong {
  display: block;
  font-family: var(--font-display-zh), var(--font-display-en), serif;
  font-size: 15.5px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.issue p,
.change p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.issue[data-level="待修复"]::after,
.issue[data-level="Needs fix"]::after {
  content: "FIX";
  position: absolute;
  top: 14px; right: 14px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 9px;
  padding: 2px 6px;
  background: var(--sts-red);
  color: var(--bg-dark);
  border-radius: 4px;
}

.issue[data-level="待修复"],
.issue[data-level="Needs fix"] {
  border-color: var(--sts-red);
}

.issue[data-level="待修复"] strong,
.issue[data-level="Needs fix"] strong {
  color: hsl(12, 100%, 75%);
}

.issue[data-level="待测试"]::after,
.issue[data-level="Needs testing"]::after {
  content: "TESTING";
  position: absolute;
  top: 14px; right: 14px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 9px;
  padding: 2px 6px;
  background: var(--sts-gold);
  color: var(--bg-dark);
  border-radius: 4px;
}

.issue[data-level="待测试"],
.issue[data-level="Needs testing"] {
  border-color: var(--sts-gold);
}

.issue[data-level="待测试"] strong,
.issue[data-level="Needs testing"] strong {
  color: hsl(45, 100%, 75%);
}

/* Slay the Spire Keyword Typography coloring */
.sts-keyword-attack,
.sts-keyword-stat-strength,
.sts-keyword-mech-blood-debt,
.sts-keyword-status-vulnerable {
  color: var(--sts-red);
  font-weight: 700;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.9);
}

.sts-keyword-skill,
.sts-keyword-stat-dexterity,
.sts-keyword-mech-seedbed,
.sts-keyword-mech-plant,
.sts-keyword-mech-sprout,
.sts-keyword-mech-rootblight,
.sts-keyword-status-poison {
  color: var(--sts-green);
  font-weight: 700;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.9);
}

.sts-keyword-power,
.sts-keyword-stat-energy,
.sts-keyword-mech-relic,
.sts-keyword-mech-ancient,
.sts-keyword-mech-gold,
.sts-keyword-mech-contract,
.sts-keyword-mech-prestige,
.sts-keyword-mech-loot,
.sts-keyword-stat-temp-hp {
  color: var(--sts-gold);
  font-weight: 700;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.9);
}

.sts-keyword-status,
.sts-keyword-curse,
.sts-keyword-mech-verdict,
.sts-keyword-status-weak {
  color: var(--sts-purple);
  font-weight: 700;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.9);
}

.sts-keyword-stat-block,
.sts-keyword-stat-plated-armor {
  color: hsl(210, 95%, 65%);
  font-weight: 700;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.9);
}

.sts-keyword-stat-focus,
.sts-keyword-mech-fission,
.sts-keyword-mech-temp-page,
.sts-keyword-mech-ethereal,
.sts-keyword-mech-inherent,
.sts-keyword-stat-draw,
.sts-keyword-mech-loot-lock,
.sts-keyword-mech-copy {
  color: hsl(195, 95%, 60%);
  font-weight: 700;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.9);
}

.sts-keyword-stat-vigor {
  color: hsl(340, 95%, 65%);
  font-weight: 700;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.9);
}

.sts-keyword-mech-exhaust,
.sts-keyword-mech-retain,
.sts-keyword-mech-unplayable,
.sts-keyword-status-frail {
  color: hsl(28, 95%, 60%);
  font-weight: 700;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.9);
}

/* Upgraded stats and diffs values */
.sts-upgrade-val {
  color: var(--sts-green) !important;
  font-weight: 700;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.9);
}


/* Animated keyword glows mimicking game elements */
@keyframes text-glow-pulse {
  0%, 100% {
    text-shadow: 0 0 3px currentColor, 1px 1px 1px rgba(0, 0, 0, 0.85);
  }
  50% {
    text-shadow: 0 0 8px currentColor, 1px 1px 1px rgba(0, 0, 0, 0.85);
  }
}

[class*="sts-keyword-"] {
  animation: text-glow-pulse 2.2s infinite ease-in-out;
}

/* Cross-card codex hyperlinks */
.codex-link {
  color: var(--gold-bright);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 700;
  transition: var(--transition);
  text-shadow: 0 0 4px hsla(44, 73%, 58%, 0.25);
}

.codex-link:hover {
  text-shadow: 0 0 10px currentColor;
  text-decoration: underline double;
}

/* Make links inside keyword classes inherit keyword-specific colors and glow animation */
[class*="sts-keyword-"] .codex-link {
  color: inherit !important;
  text-shadow: inherit !important;
  animation: inherit !important;
}

[class*="sts-keyword-"] .codex-link:hover {
  text-shadow: 0 0 12px currentColor, 1px 1px 1px rgba(0, 0, 0, 0.9) !important;
  text-decoration: underline double !important;
}

/* Mechanics Codex Sub-Menu Styles */
.codex-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.codex-menu-item {
  width: 100%;
  padding: 8px 12px;
  background: hsla(0, 0%, 0%, 0.25);
  border: 1px solid var(--line-dim);
  border-radius: var(--radius-mild);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.codex-menu-item:hover {
  background: hsla(44, 73%, 58%, 0.05);
  border-color: var(--gold-bright);
  transform: translateX(3px);
}

.codex-menu-item.active-menu-item {
  background: hsla(44, 73%, 58%, 0.1);
  border-color: var(--gold-bright);
  box-shadow: 0 0 8px hsla(44, 73%, 58%, 0.2);
}

.codex-menu-item strong {
  display: block;
  font-family: var(--font-display-zh), var(--font-display-en), serif;
  font-size: 13.5px;
  color: var(--gold-bright);
  font-weight: 600;
}

.codex-menu-item span {
  font-size: 12px;
  color: var(--text-muted);
}

.source-art-placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  width: 100%;
  height: 100%;
  color: var(--gold-bright);
  font-size: 13px;
  font-weight: 700;
  background: radial-gradient(circle at center, rgba(214, 181, 109, 0.08) 0%, transparent 80%), #0a0c12;
}

.source-art-placeholder small {
  font-size: 9px;
  color: var(--text-faint);
  text-transform: uppercase;
}

/* Custom Interactive UI Details Drawer */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  border: 1px dashed var(--line-strong);
  background: rgba(10, 12, 18, 0.5);
  color: var(--text-muted);
  text-align: center;
}

.empty-state.hidden {
  display: none !important;
}

.clear-search-link {
  color: var(--gold-bright);
  text-decoration: underline;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
}

/* About Grid */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: start;
}

.about-grid .panel {
  background: var(--bg-panel);
  border: 1px solid var(--line-soft);
  padding: 32px;
  border-radius: 16px;
}

.about-grid .panel h2 {
  font-family: var(--font-display-zh), var(--font-display-en), serif;
  font-weight: 600;
  font-size: 22px;
  color: var(--gold-bright);
  margin-top: 0;
  margin-bottom: 16px;
}

.about-grid .panel p {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.65;
  margin-bottom: 16px;
}

.about-grid .panel p:last-of-type {
  margin-bottom: 0;
}

/* Forum Frame */
.forum-frame {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-mild);
  box-shadow: var(--shadow-main);
  background-color: var(--bg-dark);
}

.hidden {
  display: none !important;
}

/* QoL Feature Banner */
.qol-feature-banner {
  display: flex;
  align-items: stretch;
  gap: 32px;
  background:
    linear-gradient(135deg, rgba(18, 23, 34, 0.85) 0%, rgba(9, 11, 15, 0.85) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: clamp(20px, 3vw, 32px);
  margin-bottom: 24px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.qol-feature-banner:hover {
  border-color: var(--gold-bright);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.qol-badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-bright);
  background: rgba(214, 181, 109, 0.1);
  border: 1px solid rgba(214, 181, 109, 0.25);
  padding: 3px 10px;
  margin-bottom: 12px;
  border-radius: 4px;
}

.qol-banner-content {
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.qol-banner-content h3 {
  font-family: var(--font-display-zh), var(--font-display-en), serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--gold-bright);
  margin: 0 0 8px;
}

.qol-banner-desc {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 16px;
}

.qol-banner-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qol-banner-feat-item {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 4px 12px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  transition: var(--transition);
}

.qol-banner-feat-item:hover {
  color: var(--text-primary);
  border-color: rgba(214, 181, 109, 0.3);
  background: rgba(214, 181, 109, 0.06);
}

.qol-banner-image-container {
  flex: 0 0 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qol-banner-img {
  width: 100%;
  max-width: 280px;
  height: auto;
  border-radius: var(--radius-mild);
  border: 1px solid var(--line-dim);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.5),
    inset 0 0 10px rgba(0, 0, 0, 0.6);
  transition: var(--transition);
  object-fit: cover;
}

.qol-banner-img:hover {
  border-color: hsla(44, 73%, 58%, 0.35);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.5),
    0 0 16px hsla(44, 73%, 58%, 0.1);
  transform: translateY(-2px) scale(1.01);
}

.inspector-mobile-close {
  display: none;
}

/* Responsive Overrides */
@media (max-width: 980px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 16px;
    clip-path: none;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 8px 0;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 24px;
    clip-path: none;
  }

  .hero-images {
    grid-template-columns: repeat(3, 1fr);
  }

  .update-board {
    grid-template-columns: 1fr;
  }

  .inspector-pane {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 70vh;
    max-height: 550px;
    background: var(--bg-panel);
    border-top: 2px solid var(--border-active);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.9);
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    margin-bottom: 0;
    padding: 20px;
    overflow-y: auto;
    clip-path: none;
  }

  .inspector-pane.mobile-open {
    transform: translateY(0);
  }

  .inspector-mobile-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    z-index: 100;
    transition: var(--transition);
  }

  .inspector-mobile-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-normal);
  }

  .tool-row {
    top: 110px;
    flex-direction: column;
    align-items: stretch;
    clip-path: none;
  }

  .chips {
    justify-content: flex-start;
  }

  .install-grid, .about-grid, .issue-grid {
    grid-template-columns: 1fr;
  }

  .merchant-shop, .about-grid .panel {
    clip-path: none;
  }

  .qol-feature-banner {
    flex-direction: column;
    clip-path: none;
  }

  .qol-banner-image-container {
    flex: 0 0 auto;
    order: -1;
  }

  .qol-banner-img {
    max-width: 100%;
  }
}

@media (max-width: 620px) {
  .hero-images {
    grid-template-columns: 1fr;
  }

  .hero-images img:nth-child(2),
  .hero-images img:nth-child(3) {
    display: none;
  }

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

  .qol-feature-banner {
    padding: 16px;
    gap: 16px;
  }

  .qol-banner-content h3 {
    font-size: 17px;
  }

  .qol-banner-features {
    gap: 6px;
  }
}

/* Related Mechanics styling inside Card Inspector */
.inspector-related-mechanics {
  margin-top: 24px;
  border-top: 1px solid var(--line-strong);
  padding-top: 16px;
}

.mechanics-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
}

.mechanic-info-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line-dim);
  padding: 12px 16px;
  border-radius: var(--radius-mild);
}

.mechanic-info-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.mechanic-info-header img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: var(--radius-mild);
}

.mechanic-info-header h4 {
  font-family: var(--font-ui);
  font-size: 15px;
  margin: 0;
}

.mechanic-info-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 8px 0;
}

.mechanic-info-bullets {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.mechanic-info-bullets li {
  margin-bottom: 4px;
}

/* Game Preview Image styling */
.inspector-preview-image-container {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inspector-preview-img-wrapper {
  position: relative;
  border-radius: var(--radius-mild);
  border: 1px solid var(--line-gold);
  overflow: hidden;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.6),
    inset 0 0 15px rgba(0, 0, 0, 0.8);
  background: #0d0d0d;
  cursor: zoom-in;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.inspector-preview-img-wrapper:hover {
  border-color: var(--gold-bright);
  box-shadow:
    0 12px 32px rgba(212, 175, 55, 0.25),
    inset 0 0 10px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

.inspector-preview-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.inspector-preview-img-wrapper:hover .inspector-preview-img {
  transform: scale(1.02);
}

/* Lightbox modal for preview images */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: lightboxScale 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes lightboxScale {
  from { transform: scale(0.95); }
  to { transform: scale(1); }
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-mild);
  border: 1px solid var(--line-gold);
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
  object-fit: contain;
}

.lightbox-caption {
  font-family: var(--font-ui);
  color: var(--gold-bright);
  font-size: 15px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lightbox-close:hover {
  color: var(--gold-bright);
  opacity: 1;
}

@media (max-height: 680px) and (min-width: 981px) {
  .inspector-pane {
    position: static !important;
    max-height: none !important;
    min-height: auto !important;
    margin-bottom: 24px;
  }
}

/* Accessibility overrides */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .compare-card:not(.loaded) {
    animation: none !important;
    opacity: 1 !important;
  }
  .inspector-card-preview {
    animation: none !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --bg-0: #040507;
    --bg-1: #0A0D14;
    --bg-2: #121622;
    --bg-3: #181E2E;

    --text-0: #FFFFFF;
    --text-1: #E4ECF5;
    --text-2: #B0BAC9;

    --accent-gold: #F2CF7A;
    --line-soft: rgba(242, 207, 122, 0.25);
    --line-strong: rgba(242, 207, 122, 0.45);
  }
  .compare-card {
    border-width: 1.5px;
  }
}

/* Card title custom catalog styling */
.card-title-row-ex {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.card-index-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold-bright);
  opacity: 0.55;
  font-weight: 700;
}
