* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: inherit; }
.app-shell { display: grid; grid-template-columns: 320px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 1.25rem;
  background: rgba(13, 18, 28, .96);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.brand {
  display: flex;
  gap: .8rem;
  align-items: center;
  text-decoration: none;
  padding: .85rem;
  border-radius: 18px;
  background: var(--panel-2);
  box-shadow: var(--shadow);
}
.brand-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent);
  font-size: 1.6rem;
}
.brand strong { display: block; font-size: 1.05rem; }
.brand small { display: block; color: var(--muted); margin-top: .1rem; }
.search-label, .sidebar h2 {
  display: block;
  margin: 1.4rem 0 .55rem;
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.search {
  width: 100%;
  padding: .85rem .95rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #070a10;
  color: var(--text);
  outline: none;
}
.search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(35, 104, 251, .22); }
.nav-link, .monster-link {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem .85rem;
  margin: .25rem 0;
  border-radius: 12px;
  text-decoration: none;
  color: var(--muted);
}
.nav-link:hover, .monster-link:hover, .active { background: rgba(35, 104, 251, .18); color: var(--text); }
.monster-link span:last-child { color: var(--accent-2); font-size: .8rem; }
.content { padding: clamp(1.2rem, 4vw, 4rem); max-width: 1120px; width: 100%; }
.hero, .card, .monster-page {
  background: rgba(13, 18, 28, .88);
  border-radius: 26px;
  box-shadow: var(--shadow);
}
.card, .monster-page { border: 1px solid var(--border); }
.hero { padding: clamp(1.4rem, 4vw, 3rem); }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: .8rem; }
h1 { margin: .4rem 0 1rem; font-size: clamp(2.2rem, 6vw, 4.5rem); line-height: .96; }
p { color: var(--muted); line-height: 1.7; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.card { padding: 1.15rem; }
.card h3 { margin: 0 0 .35rem; }
.stat { font-size: 2rem; font-weight: 800; color: var(--accent-2); }
.monster-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.monster-card { text-decoration: none; transition: transform .18s ease, border-color .18s ease; }
.monster-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: .45rem; margin: .8rem 0; }
.tag {
  display: inline-flex;
  border: 1px solid var(--border);
  background: rgba(35, 104, 251, .12);
  color: var(--muted);
  padding: .3rem .55rem;
  border-radius: 999px;
  font-size: .8rem;
}
.monster-page { overflow: hidden; }
.monster-header {
  padding: clamp(1.2rem, 4vw, 2.4rem);
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.monster-header h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
.monster-body { padding: clamp(1.2rem, 4vw, 2.4rem); display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.25rem; }
.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td { text-align: left; padding: .85rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.info-table th { color: var(--muted); width: 38%; }
.list { margin: .5rem 0 0; padding-left: 1.2rem; color: var(--muted); line-height: 1.7; }
.empty { padding: 2rem; border: 1px dashed var(--border); border-radius: 18px; color: var(--muted); }
@media (max-width: 840px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .monster-body { grid-template-columns: 1fr; }
}

.main-section h2, .creature-panel h2 { margin-top: 0; }
.creature-panel { display: grid; gap: 1rem; align-content: start; }
.creature-image-wrap, .side-card {
  margin: 0;
  padding: 1rem;
  background: rgba(8, 11, 18, .82);
  border: 1px solid var(--border);
  border-radius: 20px;
}
.creature-image-wrap { text-align: center; }
.creature-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #070a10;
}
.creature-image-wrap figcaption {
  margin-top: .75rem;
  color: var(--muted);
  font-size: .9rem;
}
.side-card p { margin-bottom: 0; }
.side-card .info-table th,
.side-card .info-table td { padding: .65rem 0; }
.side-card .info-table th { padding-right: .8rem; }


.wiki-link {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid rgba(111, 156, 255, .5);
}
.wiki-link:hover { color: var(--text); border-bottom-color: var(--accent); }
.button-link {
  display: inline-flex;
  padding: .75rem 1rem;
  border-radius: 12px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-weight: 800;
}
.compact-header { padding: clamp(1.2rem, 3vw, 2rem); }
blockquote {
  margin: .8rem 0 0;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 14px 14px 0;
  background: rgba(35, 104, 251, .08);
  color: var(--muted);
  line-height: 1.7;
}
.muted { color: var(--muted); }
.drops-list strong { color: var(--text); }
.item-image { object-fit: contain; padding: 1.5rem; }
@media (min-width: 1200px) {
  .content { max-width: 1280px; }
  .creature-panel { max-width: 300px; }
}

.nav-dropdown {
  margin: 1rem 0;
}
.nav-dropdown summary {
  cursor: pointer;
  list-style: none;
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
  padding: .5rem .2rem;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary::after {
  content: "▾";
  float: right;
  color: var(--accent-2);
  transition: transform .16s ease;
}
.nav-dropdown:not([open]) summary::after { transform: rotate(-90deg); }
.nav-dropdown .monster-nav { margin-top: .25rem; }
.item-link span:last-child { color: var(--accent-2); font-size: .8rem; }

.home-hero { margin-bottom: 1rem; }
.home-directory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.directory-card, .home-note {
  background: rgba(13, 18, 28, .88);
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: clamp(1.1rem, 3vw, 1.6rem);
}
.directory-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .5rem;
}
.directory-card h2, .home-note h2 { margin: .1rem 0 .3rem; }
.small-link {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 800;
  font-size: .9rem;
}
.small-link:hover { color: var(--text); }
.directory-list {
  display: grid;
  gap: .45rem;
  margin-top: 1rem;
}
.directory-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem .9rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(8, 11, 18, .65);
  color: var(--text);
  text-decoration: none;
}
.directory-row:hover {
  border-color: var(--accent);
  background: rgba(35, 104, 251, .14);
}
.directory-row span {
  color: var(--accent-2);
  font-size: .85rem;
  text-align: right;
}
.home-note { margin-top: 1rem; }
.small-empty { padding: 1rem; }

.visual-home-hero {
  margin-bottom: 1rem;
}

.home-bestiary {
  margin-top: 1rem;
  background: rgba(13, 18, 28, .88);
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: clamp(1.1rem, 3vw, 1.8rem);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.15rem;
}
.section-heading h2 {
  margin: .2rem 0 0;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
}
.section-heading p {
  margin: 0;
  max-width: 320px;
  text-align: right;
}

.mob-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
}

.home-mob-card {
  display: block;
  overflow: hidden;
  min-height: 245px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(8, 11, 18, .75);
  color: var(--text);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.home-mob-card:hover,
.home-mob-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: rgba(35, 104, 251, .10);
  box-shadow: 0 18px 45px rgba(35, 104, 251, .18);
  outline: none;
}

.home-mob-image-frame {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  margin: .7rem .7rem 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #070a10;
}
.home-mob-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .2s ease;
}
.home-mob-card:hover .home-mob-image-frame img,
.home-mob-card:focus-visible .home-mob-image-frame img {
  transform: scale(1.045);
}

.home-mob-info {
  padding: .9rem .95rem 1rem;
}
.home-mob-info h3 {
  margin: 0 0 .35rem;
  font-size: 1.02rem;
}
.home-mob-info span {
  display: block;
  color: var(--accent-2);
  font-size: .85rem;
  line-height: 1.35;
}
.home-mob-card:hover h3,
.home-mob-card:focus-visible h3 {
  color: var(--accent-2);
}

@media (max-width: 640px) {
  .section-heading {
    display: block;
  }
  .section-heading p {
    max-width: none;
    text-align: left;
    margin-top: .6rem;
  }
}

/* Cleaner homepage: fewer outlines, more breathing room */
.home-hero.visual-home-hero {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: clamp(1rem, 4vw, 2.4rem) 0 clamp(1.5rem, 5vw, 3.5rem);
  margin-bottom: 0;
}
.home-bestiary {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin-top: 0;
}
.section-heading {
  border-top: 1px solid rgba(37, 48, 68, .65);
  padding-top: clamp(1.3rem, 3vw, 2rem);
}
.home-mob-card {
  background: rgba(18, 25, 39, .72);
  border-color: rgba(37, 48, 68, .72);
}
.home-mob-image-frame {
  border: 0;
  background: rgba(8, 11, 18, .55);
}

body {
  transition: background .2s ease, color .2s ease;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.sidebar nav:last-of-type {
  flex: 1;
}

.brand {
  background: transparent;
  box-shadow: none;
  padding: .55rem .2rem 1.1rem;
  border-radius: 0;
  border-bottom: 1px solid rgba(37, 48, 68, .65);
}

.brand-icon {
  background: var(--accent);
  color: white;
}

.nav-link, .monster-link {
  justify-content: flex-start;
  align-items: center;
}

.monster-link span:last-child,
.item-link span:last-child {
  color: inherit;
  font-size: inherit;
}

.nav-dot {
  width: 1.35rem;
  flex: 0 0 1.35rem;
  color: var(--accent-2) !important;
  font-size: 1rem !important;
  text-align: center;
}

.theme-toggle-wrap {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(37, 48, 68, .65);
}

.theme-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .75rem;
  border: 0;
  border-radius: 14px;
  padding: .8rem .85rem;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: rgba(35, 104, 251, .14);
  outline: none;
}

.theme-toggle-icon {
  color: var(--accent-2);
  font-size: 1.1rem;
}

.theme-toggle-label {
  flex: 1;
  color: var(--muted);
}

.theme-switch {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}

.theme-switch span {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  transition: transform .18s ease;
}

.theme-toggle[aria-pressed="false"] .theme-switch {
  background: #b9c4d6;
}

.theme-toggle[aria-pressed="false"] .theme-switch span {
  transform: translateX(-18px);
}

.content {
  max-width: 1360px;
  padding-top: 0;
}

.home-hero.visual-home-hero {
  padding: 0 0 clamp(1.4rem, 3vw, 2.2rem);
}

.hero-render-placeholder {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(260px, 34vw, 430px);
  margin: 0 calc(clamp(1.2rem, 4vw, 4rem) * -1) 0 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 45%, rgba(35, 104, 251, .36), transparent 30%),
    radial-gradient(circle at 78% 38%, rgba(143, 54, 255, .24), transparent 28%),
    linear-gradient(180deg, rgba(8, 11, 18, .25), var(--bg) 96%),
    #080b12;
}

.hero-render-placeholder::before {
  content: "Replace this area with your final transparent render";
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  color: var(--muted);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-render-placeholder::after {
  content: "";
  position: absolute;
  inset: clamp(1rem, 3vw, 2rem);
  border: 2px dashed rgba(111, 156, 255, .35);
  border-radius: 28px;
  pointer-events: none;
}

.hero-render-placeholder span {
  position: relative;
  z-index: 1;
  color: var(--text);
  text-align: center;
  font-size: clamp(3.3rem, 11vw, 9rem);
  line-height: .8;
  letter-spacing: .02em;
  text-transform: uppercase;
  font-weight: 1000;
  text-shadow: 0 10px 35px rgba(35, 104, 251, .35);
}

.hero-subtitle {
  max-width: 760px;
  margin: -1.2rem auto 0;
  text-align: center;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.section-heading {
  border-top: 0;
  padding-top: 0;
}

.section-heading h2 {
  margin-top: .15rem;
}

.home-mob-info h3 {
  margin: 0;
  text-align: center;
}

.home-mob-info span { display: none; }

@media (max-width: 840px) {
  .theme-toggle-wrap { margin-top: 1rem; }
  .content { padding-top: 1.2rem; }
  .hero-render-placeholder { margin-right: 0; border-radius: 24px; }
}
/* Horror Circus package artwork */
.hero-render-placeholder {
  min-height: 0;
  background: transparent !important;
  margin-right: 0;
  overflow: hidden;
}
.hero-render-placeholder::before,
.hero-render-placeholder::after { display: none !important; }
.hero-render-placeholder img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  object-position: center;
}
.hero-subtitle { margin-top: 1.25rem; }
.home-mob-image-frame img { object-fit: cover; width: 100%; height: 100%; }
.item-image { image-rendering: pixelated; object-fit: contain; padding: 2rem; }

/* Requested asset/layout refinements */
.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 10px;
}

.home-mob-image-frame img,
.creature-image {
  object-fit: cover;
  object-position: center;
}

.design-gallery { margin-top: 2rem; }
.design-viewer { display: grid; grid-template-columns: minmax(220px, 360px) 1fr; gap: 1.25rem; align-items: start; }
.design-preview-wrap { margin: 0; }
.design-preview {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  image-rendering: pixelated;
  background: var(--panel, #101722);
  border-radius: 14px;
  padding: 18px;
}
.design-preview-wrap figcaption { margin-top: .7rem; font-weight: 700; text-align: center; }
.design-picker { display: grid; grid-template-columns: repeat(4, minmax(90px, 1fr)); gap: .75rem; }
.design-thumb {
  appearance: none;
  border: 1px solid var(--border, #263247);
  background: var(--panel, #101722);
  color: inherit;
  border-radius: 12px;
  padding: .55rem;
  cursor: pointer;
  text-align: left;
}
.design-thumb:hover,
.design-thumb.active { border-color: #2368fb; box-shadow: 0 0 0 1px #2368fb inset; }
.design-thumb img { width: 100%; aspect-ratio: 1; object-fit: contain; image-rendering: pixelated; display: block; }
.design-thumb span { display: block; margin-top: .45rem; font-size: .8rem; line-height: 1.2; }
.related-links { margin: 1.5rem 0; }

@media (max-width: 860px) {
  .design-viewer { grid-template-columns: 1fr; }
  .design-picker { grid-template-columns: repeat(4, minmax(70px, 1fr)); }
}
@media (max-width: 560px) {
  .design-picker { grid-template-columns: repeat(2, minmax(100px, 1fr)); }
}

/* v4 — Horror Circus memory-game inspired theme */
:root {
  --bg:#090706;
  --panel:#15100d;
  --panel-2:#201712;
  --text:#ead9b4;
  --muted:#aa9c84;
  --accent:#a22d23;
  --accent-2:#c59c52;
  --danger:#a22d23;
  --border:#403126;
  --shadow:0 24px 70px rgba(0,0,0,.38);
  font-family:Georgia, "Times New Roman", serif;
}

body { background:var(--bg); }
.sidebar {
  background:#0d0a08;
  border-right:1px solid #2d231d;
  backdrop-filter:none;
}

.brand { border-bottom-color:#2d231d; }
.brand-logo { border-radius:4px; }
.brand strong { text-transform:uppercase; letter-spacing:.075em; }
.brand small { color:var(--accent-2); text-transform:uppercase; letter-spacing:.12em; font-size:.68rem; }

.nav-dropdown summary {
  color:var(--accent-2);
  letter-spacing:.13em;
}
.nav-dropdown summary::after { color:var(--muted); }
.nav-link,.monster-link {
  color:var(--muted);
  border-radius:4px;
  padding:.58rem .62rem;
  margin:.12rem 0;
}
.nav-link:hover,.monster-link:hover,.active {
  background:#1c1410;
  color:var(--text);
}

.nav-art {
  width:26px;
  height:26px;
  flex:0 0 26px;
  display:grid;
  place-items:center;
}
.nav-art img {
  width:24px;
  height:24px;
  object-fit:contain;
  display:block;
  image-rendering:pixelated;
  image-rendering:crisp-edges;
}
.item-nav-art img { width:23px; height:23px; }

.theme-toggle-wrap { border-top-color:#2d231d; }
.theme-toggle { border-radius:4px; }
.theme-toggle:hover,.theme-toggle:focus-visible { background:#1c1410; }
.theme-toggle-icon { color:var(--accent-2); }
.theme-switch { background:var(--accent); box-shadow:inset 0 0 0 1px rgba(234,217,180,.18); }
.theme-toggle[aria-pressed="false"] .theme-switch { background:#8d795e; }

.eyebrow { color:var(--accent-2); letter-spacing:.16em; }
h1,h2,h3 { color:var(--text); }
p,.list { color:var(--muted); }
.wiki-link { color:var(--accent-2); border-bottom-color:rgba(197,156,82,.45); }
.wiki-link:hover { color:var(--text); border-bottom-color:var(--accent); }
.button-link { background:var(--accent); color:#fff0df; border-radius:3px; }

.hero-render-placeholder {
  background:#070504!important;
  border-bottom:1px solid #2f241d;
}
.hero-render-placeholder img {
  width:100%;
  max-height:460px;
  object-fit:cover;
  object-position:center;
}
.hero-subtitle { color:#d3c1a2; }

.home-bestiary { padding-top:1rem; }
.section-heading { margin-bottom:1rem; }
.home-mob-card {
  background:#100c0a;
  border:1px solid #30251e;
  border-radius:8px;
  box-shadow:none;
}
.home-mob-card:hover,.home-mob-card:focus-visible {
  transform:translateY(-3px);
  border-color:var(--accent-2);
  background:#17100d;
  box-shadow:0 12px 28px rgba(0,0,0,.24);
}
.home-mob-image-frame { margin:0; border-radius:7px 7px 0 0; background:#080605; }
.home-mob-info { padding:.78rem .8rem .86rem; border-top:1px solid #2a201a; }
.home-mob-info h3 { text-transform:uppercase; letter-spacing:.045em; font-size:.94rem; }
.home-mob-card:hover h3,.home-mob-card:focus-visible h3 { color:var(--accent-2); }

.monster-page,.card { background:var(--panel); border-color:var(--border); border-radius:8px; }
.monster-header { background:#100c0a; border-bottom-color:#392b22; }
.creature-image-wrap,.side-card { background:#100c0a; border-color:#35281f; border-radius:7px; }
.creature-image { background:#080605; border-color:#30241d; border-radius:4px; }
.info-table th,.info-table td { border-bottom-color:#30241d; }
.tag { background:#1c100d; border-color:#533127; color:#d2b996; border-radius:3px; }
blockquote { border-left-color:var(--accent); background:#170c0a; border-radius:0; }

.design-preview,.design-thumb { background:#0f0b09; border-color:#3e3026; border-radius:6px; }
.design-thumb:hover,.design-thumb.active { border-color:var(--accent-2); box-shadow:0 0 0 1px var(--accent-2) inset; }

@media (max-width:840px){
  .sidebar { background:#0d0a08; }
}

/* v5 — poster pages use the right rail as the interactive design viewer */
.poster-panel {
  align-self: start;
}
.poster-viewer-card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 1rem;
}
.poster-panel .design-preview-wrap {
  margin: 0;
}
.poster-panel .design-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 360px;
  object-fit: contain;
  padding: .5rem;
  background: transparent;
  border-radius: 0;
}
.poster-panel .design-preview-wrap figcaption {
  margin-top: .55rem;
  color: var(--text);
  text-align: center;
  font-weight: 800;
}
.poster-picker-heading {
  margin: 1rem 0 .6rem;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .72rem;
  font-weight: 900;
}
.poster-panel .design-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .45rem;
}
.poster-panel .design-thumb {
  min-width: 0;
  padding: .35rem;
  border: 1px solid var(--border);
  background: var(--panel-2);
  border-radius: 4px;
  text-align: center;
}
.poster-panel .design-thumb:hover,
.poster-panel .design-thumb.active {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 1px var(--accent-2) inset;
}
.poster-panel .design-thumb img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  image-rendering: pixelated;
}
.poster-panel .design-thumb span {
  display: none;
}

@media (max-width: 900px) {
  .poster-panel .design-picker { grid-template-columns: repeat(8, minmax(42px, 1fr)); }
}
@media (max-width: 620px) {
  .poster-panel .design-picker { grid-template-columns: repeat(4, minmax(52px, 1fr)); }
}


/* v6 — cleaner poster hover label + accordion sidebar without a desktop scrollbar */
.poster-picker-heading {
  display:flex;
  align-items:baseline;
  gap:.38rem;
  flex-wrap:wrap;
}
.poster-picker-name {
  color:var(--text);
  letter-spacing:.02em;
  text-transform:none;
  font-size:.78rem;
  font-weight:700;
}

@media (min-width: 841px) {
  .sidebar {
    overflow:hidden;
  }
  .sidebar nav:last-of-type {
    min-height:0;
    flex:0 1 auto;
  }
  .nav-dropdown {
    margin:.65rem 0;
  }
  .nav-dropdown .monster-nav {
    max-height:calc(100vh - 250px);
    overflow:hidden;
  }
  .monster-link {
    padding:.48rem .55rem;
    margin:.06rem 0;
  }
  .nav-art {
    width:24px;
    height:24px;
    flex-basis:24px;
  }
  .theme-toggle-wrap {
    margin-top:auto;
  }
}

/* Extremely short desktop windows still need access to every link. Hide the
   scrollbar chrome while retaining wheel/touch scrolling as a fallback. */
@media (min-width: 841px) and (max-height: 620px) {
  .sidebar {
    overflow-y:auto;
    scrollbar-width:none;
  }
  .sidebar::-webkit-scrollbar { display:none; }
}


/* v7 — eased sidebar accordion */
.nav-dropdown > summary {
  position: relative;
  transition: color .22s ease, background-color .22s ease;
}
.nav-dropdown > summary::after {
  float: none;
  position: absolute;
  right: .2rem;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  transform-origin: center;
  transition: transform .28s cubic-bezier(.22,.8,.24,1), color .22s ease;
}
.nav-dropdown:not([open]) > summary::after {
  transform: translateY(-50%) rotate(-90deg);
}
.nav-dropdown > .monster-nav {
  overflow: hidden;
  will-change: height, opacity, transform;
  transform-origin: top;
}
.nav-dropdown.is-opening > .monster-nav,
.nav-dropdown.is-closing > .monster-nav {
  pointer-events: none;
}
.nav-dropdown.is-opening > summary,
.nav-dropdown[open] > summary {
  color: var(--accent-2);
}

/* Links arrive a fraction after the panel itself so the motion feels softer. */
.nav-dropdown[open]:not(.is-closing) .monster-link {
  animation: sidebarLinkIn .24s ease both;
}
.nav-dropdown[open]:not(.is-closing) .monster-link:nth-child(2) { animation-delay:.015s; }
.nav-dropdown[open]:not(.is-closing) .monster-link:nth-child(3) { animation-delay:.03s; }
.nav-dropdown[open]:not(.is-closing) .monster-link:nth-child(4) { animation-delay:.045s; }
.nav-dropdown[open]:not(.is-closing) .monster-link:nth-child(5) { animation-delay:.06s; }
.nav-dropdown[open]:not(.is-closing) .monster-link:nth-child(n+6) { animation-delay:.075s; }
@keyframes sidebarLinkIn {
  from { opacity:0; transform:translateY(-4px); }
  to { opacity:1; transform:translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-dropdown > summary::after,
  .nav-dropdown > summary,
  .nav-dropdown .monster-link { transition:none!important; animation:none!important; }
}

/* --- Consistent article vertical rhythm --- */
.main-section > h2 {
  margin: 2rem 0 .65rem;
  line-height: 1.15;
}
.main-section > h2:first-child {
  margin-top: 0;
}
.main-section > p,
.main-section > .list {
  margin-top: 0;
  margin-bottom: 0;
}
.main-section > .list {
  padding-left: 1.15rem;
}
.main-section > .button-link {
  margin-top: 1.5rem;
  margin-bottom: .1rem;
}
.main-section > .button-link + h2 {
  margin-top: 1.65rem;
}


/* v10 — compact creature gallery previews + carousel lightbox */
.creature-gallery-section {
  margin-top: 2rem;
}
.creature-gallery-section[hidden] { display: none !important; }
.creature-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .7rem;
  max-width: 760px;
}
.creature-gallery-thumb {
  appearance: none;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  cursor: zoom-in;
  transition: transform .18s ease, border-color .18s ease, filter .18s ease;
}
.creature-gallery-thumb:hover,
.creature-gallery-thumb:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent-2);
  filter: brightness(1.07);
  outline: none;
}
.creature-gallery-thumb:focus-visible {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-2) 35%, transparent);
}
.creature-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-open { overflow: hidden; }
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 58px;
  align-items: center;
  gap: clamp(.5rem, 2vw, 1.25rem);
  padding: clamp(4rem, 7vw, 5.5rem) clamp(1rem, 3vw, 2.5rem) 1.25rem;
  background: rgba(5, 3, 2, .94);
  backdrop-filter: blur(8px);
}
.gallery-lightbox[hidden] { display: none !important; }
.gallery-lightbox figure {
  margin: 0;
  min-width: 0;
  min-height: 0;
  max-height: calc(100vh - 6.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .7rem;
}
.gallery-lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 9rem);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 22px 70px rgba(0,0,0,.55);
  user-select: none;
  -webkit-user-drag: none;
}
.gallery-lightbox figcaption {
  color: var(--muted);
  font-size: .9rem;
  text-align: center;
}
.gallery-lightbox-close,
.gallery-lightbox-nav {
  appearance: none;
  border: 1px solid rgba(234,217,180,.28);
  border-radius: 4px;
  background: rgba(21,16,13,.9);
  color: var(--text);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.gallery-lightbox-close:hover,
.gallery-lightbox-nav:hover,
.gallery-lightbox-close:focus-visible,
.gallery-lightbox-nav:focus-visible {
  border-color: var(--accent-2);
  background: rgba(32,23,18,.96);
  outline: none;
}
.gallery-lightbox-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 44px;
  height: 44px;
  font-size: 1.7rem;
  line-height: 1;
}
.gallery-lightbox-nav {
  width: 52px;
  height: 64px;
  font-size: 2.1rem;
  line-height: 1;
  justify-self: center;
}
.gallery-lightbox-nav:active { transform: scale(.96); }
.gallery-lightbox-single .gallery-lightbox-nav { visibility: hidden; }

@media (max-width: 900px) {
  .creature-gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .creature-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-lightbox {
    grid-template-columns: 1fr;
    padding: 4.2rem .75rem 4.5rem;
  }
  .gallery-lightbox figure { max-height: calc(100vh - 8.7rem); }
  .gallery-lightbox img { max-height: calc(100vh - 11rem); }
  .gallery-lightbox-nav {
    position: absolute;
    bottom: .8rem;
    width: 50px;
    height: 50px;
  }
  .gallery-lightbox-prev { left: calc(50% - 62px); }
  .gallery-lightbox-next { right: calc(50% - 62px); }
}
@media (max-width: 420px) {
  .creature-gallery-grid { gap: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .creature-gallery-thumb,
  .gallery-lightbox-close,
  .gallery-lightbox-nav { transition: none; }
}

/* v11 — use the available desktop width so the right rail does not float with a large empty gutter */
@media (min-width: 841px) {
  .content {
    max-width: none;
    width: 100%;
    padding-right: clamp(1.2rem, 2.2vw, 2.4rem);
  }
  .monster-body {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
    column-gap: clamp(1.2rem, 2vw, 2rem);
  }
  .creature-panel {
    width: 100%;
    max-width: 320px;
    justify-self: end;
  }
}

/* Homepage landing-page polish */
.home-hero.visual-home-hero {
  padding-bottom: clamp(2rem, 3.8vw, 3.2rem);
}
.hero-subtitle {
  max-width: 800px;
  margin-top: 1rem;
  line-height: 1.55;
}
.home-bestiary,
.home-collections {
  margin-top: 0;
  padding-top: clamp(1rem, 2vw, 1.5rem);
}
.home-collections {
  margin-top: clamp(2.8rem, 5vw, 4.5rem);
  padding-bottom: clamp(2rem, 5vw, 4rem);
}
.mob-card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(.9rem, 1.5vw, 1.25rem);
}
.home-mob-card {
  min-height: 0;
}
.home-mob-image-frame {
  aspect-ratio: 4 / 3;
}
.home-mob-info {
  min-height: 64px;
  display: grid;
  place-items: center;
}

.poster-collection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}
.poster-collection-card {
  display: grid;
  grid-template-columns: minmax(120px, 34%) minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  background: #100c0a;
  border: 1px solid #30251e;
  border-radius: 8px;
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}
.poster-collection-card:hover,
.poster-collection-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--accent-2);
  background: #17100d;
  outline: none;
}
.poster-collection-art {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 1.1rem;
  background: #080605;
  border-right: 1px solid #2a201a;
}
.poster-collection-art img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 230px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.poster-collection-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.4rem;
  min-width: 0;
  padding: clamp(1rem, 2vw, 1.5rem);
}
.poster-collection-copy h3 {
  margin: 0 0 .45rem;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}
.poster-collection-copy p {
  margin: 0;
  line-height: 1.5;
}
.collection-meta {
  display: flex;
  align-items: baseline;
  gap: .65rem;
  color: var(--muted);
  font-size: .86rem;
  text-transform: uppercase;
  letter-spacing: .055em;
}
.collection-meta strong {
  color: var(--accent-2);
  font-size: 1.45rem;
  letter-spacing: 0;
}

@media (max-width: 1050px) {
  .mob-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .poster-collection-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .mob-card-grid { grid-template-columns: 1fr; }
  .poster-collection-card { grid-template-columns: 110px minmax(0, 1fr); }
  .poster-collection-art { min-height: 170px; padding: .7rem; }
  .collection-meta { align-items: flex-start; flex-direction: column; gap: .15rem; }
}


/* Homepage breathing room + cross-promotion */
.visual-home-hero { margin-top: 28px; }

.sidebar-plugs {
  margin-top: auto;
  padding: 14px 12px 12px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 7px;
}
.sidebar-plug {
  display: grid;
  grid-template-columns: 30px minmax(0,1fr);
  gap: 9px;
  align-items: center;
  padding: 9px 10px;
  color: var(--cream);
  text-decoration: none;
  background: color-mix(in srgb, var(--panel2) 74%, transparent);
  border: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.sidebar-plug:hover,
.sidebar-plug:focus-visible {
  background: var(--panel2);
  border-color: color-mix(in srgb, var(--gold) 38%, transparent);
  transform: translateY(-1px);
}
.sidebar-plug-icon { color: var(--gold); text-align:center; font-size: 1rem; }
.sidebar-plug strong { display:block; font-size:.84rem; line-height:1.15; }
.sidebar-plug small { display:block; margin-top:2px; color:var(--muted); font-size:.67rem; line-height:1.2; }
.marketplace-plug .sidebar-plug-icon { color: var(--red); }
.discord-plug .sidebar-plug-icon { color: var(--gold); }

.home-plugs {
  margin: 52px 0 34px;
  padding-top: 34px;
  border-top: 1px solid color-mix(in srgb, var(--gold) 20%, transparent);
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}
.home-plug {
  min-width:0;
  padding: clamp(22px,3vw,34px);
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--gold) 22%, transparent);
}
.home-plug-buy {
  background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--red) 18%, transparent), transparent 42%), var(--panel);
}
.home-plug-game {
  background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 42%), var(--panel);
}
.home-plug-discord {
  background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--cream) 8%, transparent), transparent 42%), var(--panel);
}
.home-plug-kicker {
  color:var(--gold);
  text-transform:uppercase;
  letter-spacing:.15em;
  font-size:.72rem;
  font-weight:900;
}
.home-plug h2 { margin:.25em 0 .35em; font-size:clamp(1.55rem,2.6vw,2.4rem); }
.home-plug p { max-width:620px; color:var(--muted); line-height:1.55; margin:0 0 18px; }
.home-plug-button {
  display:inline-flex;
  align-items:center;
  gap:9px;
  min-height:44px;
  padding:10px 15px;
  text-decoration:none;
  color:var(--cream);
  background:var(--panel2);
  border:1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  font-weight:800;
  transition:transform .18s ease, border-color .18s ease, background .18s ease;
}
.home-plug-button:hover,.home-plug-button:focus-visible { transform:translateY(-2px); border-color:var(--gold); }
.home-plug-button.primary { background:var(--red); border-color:color-mix(in srgb, var(--cream) 24%, var(--red)); color:#fff0df; }


@media (max-width: 1120px) and (min-width: 781px) {
  .home-plugs { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .home-plug-discord { grid-column:1 / -1; }
}
@media (max-width: 780px) {
  .visual-home-hero { margin-top: 16px; }
  .home-plugs { grid-template-columns:1fr; margin-top:38px; }
}


/* v15 — collapsible mobile navigation */
.mobile-header,
.sidebar-backdrop { display:none; }

@media (max-width:840px) {
  body.mobile-nav-open { overflow:hidden; }
  .mobile-header {
    position:sticky;
    top:0;
    z-index:120;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    min-height:58px;
    padding:8px 12px;
    background:rgba(9,7,6,.96);
    border-bottom:1px solid #2d231d;
    backdrop-filter:blur(10px);
  }
  .mobile-menu-toggle {
    display:inline-flex;
    align-items:center;
    gap:8px;
    min-height:40px;
    padding:8px 11px;
    border:1px solid var(--border);
    border-radius:4px;
    background:var(--panel);
    color:var(--text);
    font:800 .78rem/1 Georgia,"Times New Roman",serif;
    text-transform:uppercase;
    letter-spacing:.08em;
    cursor:pointer;
  }
  .mobile-menu-toggle span:first-child {
    color:var(--accent-2);
    font-size:1.15rem;
    line-height:1;
  }
  .mobile-menu-toggle:focus-visible {
    outline:2px solid var(--accent-2);
    outline-offset:2px;
  }
  .mobile-brand {
    display:flex;
    align-items:center;
    gap:8px;
    min-width:0;
    color:var(--text);
    text-decoration:none;
    text-transform:uppercase;
    letter-spacing:.07em;
    font-weight:900;
    font-size:.78rem;
  }
  .mobile-brand img {
    width:34px;
    height:34px;
    object-fit:cover;
    border-radius:3px;
  }
  .sidebar {
    position:fixed!important;
    inset:0 auto 0 0;
    z-index:140;
    width:min(86vw,320px);
    height:100dvh!important;
    padding-top:1rem;
    transform:translateX(-102%);
    transition:transform .28s cubic-bezier(.22,.8,.24,1);
    box-shadow:18px 0 45px rgba(0,0,0,.38);
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }
  body.mobile-nav-open .sidebar { transform:translateX(0); }
  .sidebar-backdrop {
    position:fixed;
    inset:0;
    z-index:130;
    display:block;
    background:rgba(0,0,0,.58);
    opacity:0;
    transition:opacity .22s ease;
  }
  .sidebar-backdrop[hidden] { display:none; }
  body.mobile-nav-open .sidebar-backdrop { opacity:1; }
  .content { padding-top:clamp(1rem,4vw,1.5rem); }
}

@media (prefers-reduced-motion:reduce) {
  .sidebar,.sidebar-backdrop { transition:none!important; }
}

/* v16 — creature page reading order: article first, summary second, gallery last on mobile */
@media (max-width: 840px) {
  .monster-body {
    display: flex;
    flex-direction: column;
  }
  .monster-body > .main-section { order: 1; }
  .monster-body > .creature-panel { order: 2; }
  .monster-body > .creature-gallery-section { order: 3; }
  .monster-body > .creature-panel {
    max-width: none;
    width: 100%;
  }
}

/* Desktop keeps the familiar article + right summary rail, with gallery beneath the article. */
@media (min-width: 841px) {
  .monster-body > .main-section {
    grid-column: 1;
    grid-row: 1;
  }
  .monster-body > .creature-panel {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
  .monster-body > .creature-gallery-section {
    grid-column: 1;
    grid-row: 2;
  }
}

/* Supplied sidebar pixel icons */
.nav-art img,
.sidebar-plug-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.sidebar-plug-icon {
  display: grid;
  place-items: center;
  overflow: visible;
}
.sidebar-plug-icon img {
  width: 32px;
  height: 32px;
}

/* v18 — Studio (Block Perfect launcher) default / original Horror Circus mode */
:root[data-theme="studio"] {
  --bg:var(--bps-bg);
  --panel:var(--bps-surface);
  --panel-2:var(--bps-surface-raised);
  --panel2:var(--bps-surface-raised);
  --cream:var(--bps-text);
  --text:var(--bps-text);
  --muted:var(--bps-text-muted);
  --gold:var(--bps-cyan);
  --red:var(--bps-blue);
  --accent:var(--bps-blue);
  --accent-2:var(--bps-cyan);
  --danger:var(--bps-danger);
  --border:var(--bps-border);
  --shadow:var(--bps-shadow);
  font-family:var(--bps-font);
  color-scheme:dark;
}
:root[data-theme="circus"] { color-scheme:dark; }
:root[data-theme="studio"] .sidebar {background:#0d141c;border-right-color:var(--border);}
:root[data-theme="studio"] .brand {border-bottom-color:var(--border);}
:root[data-theme="studio"] .brand small,
:root[data-theme="studio"] .nav-dropdown summary,
:root[data-theme="studio"] .eyebrow,
:root[data-theme="studio"] .theme-toggle-icon {color:var(--accent-2);}
:root[data-theme="studio"] .nav-link:hover,
:root[data-theme="studio"] .monster-link:hover,
:root[data-theme="studio"] .active,
:root[data-theme="studio"] .theme-toggle:hover,
:root[data-theme="studio"] .theme-toggle:focus-visible {background:#1b2d3e;color:var(--text);}
:root[data-theme="studio"] .theme-toggle-wrap {border-top-color:var(--border);}
:root[data-theme="studio"] .theme-switch {background:#294052;box-shadow:inset 0 0 0 1px #526778;}
:root[data-theme="studio"] .theme-toggle[aria-pressed="false"] .theme-switch {background:var(--bps-blue);}
:root[data-theme="studio"] .theme-toggle[aria-pressed="true"] .theme-switch {background:#a22d23;}
:root[data-theme="studio"] .hero-render-placeholder {background:var(--bps-bg)!important;border-bottom-color:var(--border);}
:root[data-theme="studio"] .hero-subtitle {color:var(--bps-text-soft);}
:root[data-theme="studio"] .home-mob-card,
:root[data-theme="studio"] .poster-collection-card {background:var(--bps-surface);border-color:var(--border);border-radius:16px;}
:root[data-theme="studio"] .home-mob-card:hover,
:root[data-theme="studio"] .home-mob-card:focus-visible,
:root[data-theme="studio"] .poster-collection-card:hover,
:root[data-theme="studio"] .poster-collection-card:focus-visible {background:#1a2937;border-color:var(--bps-border-hover);}
:root[data-theme="studio"] .home-mob-image-frame,
:root[data-theme="studio"] .poster-collection-art,
:root[data-theme="studio"] .creature-image {background:var(--bps-surface-deep);border-color:var(--border);}
:root[data-theme="studio"] .home-mob-info,
:root[data-theme="studio"] .poster-collection-art {border-color:var(--border);}
:root[data-theme="studio"] .monster-page,
:root[data-theme="studio"] .card,
:root[data-theme="studio"] .side-card,
:root[data-theme="studio"] .creature-image-wrap,
:root[data-theme="studio"] .poster-panel {background:var(--panel);border-color:var(--border);}
:root[data-theme="studio"] .monster-header {background:var(--bps-surface-header);border-bottom-color:var(--border);}
:root[data-theme="studio"] .info-table th,
:root[data-theme="studio"] .info-table td {border-bottom-color:var(--border);}
:root[data-theme="studio"] .wiki-link {color:var(--bps-cyan);border-bottom-color:rgba(84,199,255,.40);}
:root[data-theme="studio"] .wiki-link:hover {color:#e6f4ff;border-bottom-color:var(--accent);}
:root[data-theme="studio"] .button-link,
:root[data-theme="studio"] .home-plug-button.primary {background:var(--bps-blue);border-color:rgba(84,199,255,.40);color:#fff;}
:root[data-theme="studio"] .tag {background:#142d40;border-color:#31536c;color:var(--bps-text-soft);}
:root[data-theme="studio"] blockquote {background:#102130;border-left-color:var(--accent);}
:root[data-theme="studio"] .design-preview,
:root[data-theme="studio"] .design-thumb {background:var(--bps-surface-header);border-color:var(--border);}
:root[data-theme="studio"] .design-thumb:hover,
:root[data-theme="studio"] .design-thumb.active {border-color:var(--accent-2);box-shadow:0 0 0 1px var(--accent-2) inset;}
:root[data-theme="studio"] .sidebar-plug {background:var(--bps-surface-alt);color:var(--text);}
:root[data-theme="studio"] .sidebar-plug:hover,
:root[data-theme="studio"] .sidebar-plug:focus-visible {background:#1b2d3e;border-color:var(--bps-border-hover);}
:root[data-theme="studio"] .home-plug {background:var(--bps-surface);border-color:var(--border);}
:root[data-theme="studio"] .home-plug-button {background:#182e40;color:#e6f4ff;border-color:#31536c;}
:root[data-theme="studio"] .gallery-lightbox-close,
:root[data-theme="studio"] .gallery-lightbox-nav {background:var(--bps-surface);border-color:#41576b;}
:root[data-theme="studio"] .gallery-lightbox-close:hover,
:root[data-theme="studio"] .gallery-lightbox-nav:hover {background:#1b2d3e;border-color:var(--accent-2);}
@media(max-width:840px){
  :root[data-theme="studio"] .mobile-header {background:rgba(9,13,18,.97);border-bottom-color:var(--border);}
  :root[data-theme="studio"] .sidebar {background:#0d141c;}
}

/* Theme switch: label only, no decorative icon */
.theme-toggle { gap: 10px; }
.discord-plug .sidebar-plug-icon .fa-discord { font-size: 1.35rem; line-height: 1; }

/* Crafting viewer: works with Studio and Circus theme variables. */
.recipe-section { margin-top: 1.5rem; }
.recipe-viewer { max-width: 590px; padding: clamp(12px,2.5vw,22px); border: 1px solid var(--border); border-radius: 16px; background: var(--panel-2); }
.recipe-viewer-top { display:flex; justify-content:space-between; color:var(--muted); font-size:.78rem; font-weight:700; letter-spacing:.03em; margin-bottom:14px; }
.recipe-workspace { display:flex; align-items:center; justify-content:center; gap:clamp(8px,3vw,24px); }
.recipe-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; width:min(100%,216px); flex:0 1 216px; }
.recipe-grid-shapeless { grid-template-columns:repeat(2,minmax(0,1fr)); width:min(100%,144px); flex-basis:144px; }
.recipe-slot { position:relative; display:grid; place-items:center; min-width:0; aspect-ratio:1; border-radius:5px; background:var(--panel); border:1px solid var(--border); }
.recipe-slot-filled { cursor:help; outline-offset:2px; }
.recipe-slot-filled:focus-visible { outline:2px solid var(--accent-2); }
.recipe-slot img { width:78%; height:78%; object-fit:contain; image-rendering:pixelated; }
.recipe-slot-tooltip { position:absolute; z-index:5; bottom:calc(100% + 7px); left:50%; transform:translateX(-50%); white-space:nowrap; background:var(--bg); color:var(--text); border:1px solid var(--border); border-radius:6px; padding:5px 8px; font-size:.78rem; pointer-events:none; opacity:0; visibility:hidden; box-shadow:var(--shadow); }
.recipe-slot:hover .recipe-slot-tooltip,.recipe-slot:focus-visible .recipe-slot-tooltip,.recipe-slot:focus-within .recipe-slot-tooltip { opacity:1; visibility:visible; }
.recipe-count { position:absolute; right:3px; bottom:1px; font-size:.75rem; font-weight:800; text-shadow:0 1px 2px #000; }
.recipe-arrow { flex:none; color:var(--accent-2); font-size:clamp(20px,4vw,32px); }
.recipe-output { flex:0 0 clamp(54px,14vw,76px); }
.recipe-result { width:100%; }
.recipe-note { font-size:.83rem; line-height:1.5; margin:14px 0 0; color:var(--muted); }
@media(max-width:390px) { .recipe-workspace {gap:7px;} .recipe-grid {gap:3px;} .recipe-viewer {padding:10px;} }

/* Global wiki shell: Studio is mandatory outside the Horror Circus section. */
.circus-navigation { display:none !important; }
.in-circus .circus-navigation { display:block !important; }
.global-nav-icon { width:22px;height:22px;object-fit:contain;image-rendering:pixelated;margin-right:8px; }
.nav-link[data-page="horror-circus"] { justify-content:flex-start;align-items:center; }
.studio-home { width:100%; max-width:1440px; margin:auto; color:#f4f7fb; font-family:Inter,ui-sans-serif,system-ui,sans-serif; }
.studio-intro {padding:clamp(30px,5vw,76px) 0 36px;max-width:840px;}
.studio-kicker {font-size:11px;letter-spacing:.17em;color:var(--bps-cyan);font-weight:800;display:inline-block;margin-bottom:14px;}
.studio-intro h1 {font-size:clamp(38px,5.2vw,76px);line-height:1.05;letter-spacing:-.045em;margin:0 0 22px;font-weight:850;}
.studio-intro h1 span {color:var(--bps-cyan);}
.studio-intro p {font-size:clamp(15px,1.5vw,19px);line-height:1.65;color:var(--bps-text-muted);max-width:690px;margin:0;}
.studio-feature {display:grid;grid-template-columns:minmax(0,1.3fr) minmax(300px,.7fr);background:var(--bps-surface);border:1px solid #293a49;border-radius:20px;overflow:hidden;}
.studio-feature-art {display:block;position:relative;min-height:300px;background:#080c13;overflow:hidden;}
.studio-feature-art img {width:100%;height:100%;object-fit:cover;display:block;transition:transform .4s ease;}
.studio-feature-art:hover img {transform:scale(1.025);}
.studio-feature-overlay {position:absolute;bottom:20px;left:20px;background:#0b141de8;border:1px solid #ffffff33;padding:11px 15px;border-radius:9px;font-size:12px;font-weight:800;letter-spacing:.06em;display:flex;gap:15px;align-items:center;}
.studio-feature-copy {padding:clamp(25px,3vw,45px);display:flex;flex-direction:column;justify-content:center;}
.studio-feature-copy h2 {font-size:clamp(29px,3vw,45px);margin:0 0 14px;letter-spacing:-.03em;}
.studio-feature-copy p {color:#b3c3d0;line-height:1.65;margin:0 0 28px;}
.studio-feature-actions {display:flex;gap:10px;flex-wrap:wrap;}
.studio-primary,.studio-secondary {display:inline-flex;align-items:center;gap:10px;text-decoration:none;border-radius:9px;padding:12px 15px;font-size:13px;font-weight:750;}
.studio-primary {background:var(--bps-blue);color:white;}
.studio-secondary {border:1px solid #3a5266;color:#d9eaf5;}
.studio-primary:hover {background:#21a3f2;}
.studio-secondary:hover {background:#203448;}
.studio-more {margin-top:55px;}
.studio-section-title {display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:20px;}
.studio-section-title h2 {font-size:clamp(24px,3vw,35px);margin:0;letter-spacing:-.025em;}
.studio-section-title>span {font-size:13px;color:#8299aa;}
.studio-library {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.studio-library-card {display:flex;align-items:center;gap:17px;padding:20px;border:1px solid #2b3b49;background:var(--bps-surface);border-radius:14px;text-decoration:none;min-width:0;}
a.studio-library-card:hover {border-color:var(--bps-cyan);background:#192734;}
.studio-library-card>img,.studio-coming-icon {width:58px;height:58px;object-fit:contain;flex:none;}
.studio-library-card>img {image-rendering:pixelated;}
.studio-coming-icon {display:grid;place-items:center;background:#22313f;border-radius:12px;color:#6f8799;}
.studio-library-card span:nth-child(2) {display:grid;gap:5px;flex:1;min-width:0;}
.studio-library-card strong {font-size:16px;}
.studio-library-card small {color:#94aabc;font-size:12px;}
.studio-library-card>.fa-arrow-right {color:#65c7ff;}
.studio-coming {opacity:.7;}
.studio-soon {font-size:9px;letter-spacing:.08em;color:var(--bps-text-muted);white-space:nowrap;}
.studio-footer {display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;margin-top:58px;padding:24px 0;border-top:1px solid #263543;color:#8299aa;font-size:11px;letter-spacing:.06em;}
.studio-footer a {text-decoration:none;color:#b9d8eb;}
@media(max-width:1000px){.studio-feature {grid-template-columns:1fr;}.studio-feature-art{min-height:250px;aspect-ratio:16/6;}.studio-feature-copy{padding:28px;}}
@media(max-width:650px){.studio-intro{padding:30px 0;}.studio-feature-art{min-height:180px;aspect-ratio:16/8;}.studio-library{grid-template-columns:1fr;}.studio-section-title{align-items:start;flex-direction:column;gap:8px;}.studio-more{margin-top:38px;}.studio-footer{margin-top:38px;}.studio-feature-copy{padding:22px;}}

/* Studio identity: use the supplied full-width logo, not the Horror Circus pack icon. */
.brand:has(.bps-brand-logo) {display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:14px 8px 16px;}
.bps-brand-logo {display:block;width:100%;max-width:245px;height:auto;object-fit:contain;background:transparent;}
.bps-brand-caption {font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);padding-left:2px;}
.mobile-brand img[src$="bps-logo.png"] {width:auto;height:25px;max-width:min(56vw,220px);object-fit:contain;border-radius:0;}
@media(max-width:420px){.mobile-brand img[src$="bps-logo.png"]{max-width:46vw;height:20px;}}

/* Featured key art: preserve the supplied 16:9 composition at every width. */
.studio-feature {grid-template-columns:minmax(0,1fr);max-width:1000px;}
.studio-feature-art {min-height:0 !important;aspect-ratio:16 / 9 !important;width:100%;}
.studio-feature-art img {display:block;width:100%;height:100%;object-fit:contain;object-position:center;}
.studio-feature-copy {padding:clamp(20px,3vw,34px);}
@media(max-width:1000px){.studio-feature-art{min-height:0 !important;aspect-ratio:16 / 9 !important;}}
@media(max-width:650px){.studio-feature-art{min-height:0 !important;aspect-ratio:16 / 9 !important;}}

/* Keep featured artwork at 16:9, but give the feature a more compact footprint. */
.studio-feature { max-width: 760px; margin-inline: auto; }
.studio-feature-art { aspect-ratio: 16 / 9 !important; min-height: 0 !important; }
.studio-feature-art img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 650px) { .studio-feature { max-width: 100%; } }

/* Featured add-on: compact side-by-side desktop layout, uncropped 16:9 art. */
.studio-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  max-width: 1050px;
  margin-inline: 0;
  align-items: center;
}
.studio-feature-art {
  width: 100%;
  min-height: 0 !important;
  aspect-ratio: 16 / 9 !important;
  align-self: center;
}
.studio-feature-art img {
  width: 100%; height: 100%; object-fit: contain; object-position: center;
}
.studio-feature-copy {min-width: 0; padding: clamp(20px, 2.5vw, 32px);}
@media (max-width: 800px) {
  .studio-feature {grid-template-columns: minmax(0, 1fr); max-width: 760px; margin-inline: auto;}
  .studio-feature-art {aspect-ratio: 16 / 9 !important; min-height: 0 !important;}
}

/* Studio landing page: balanced use of wide displays without enlarging the art. */
.studio-home { max-width: none; margin: 0; }
.studio-intro { padding-top: clamp(28px, 3.6vw, 56px); max-width: 940px; }
.studio-feature { max-width: none; width: 100%; margin-inline: 0; grid-template-columns: minmax(0, 44%) minmax(0, 1fr); align-items: stretch; }
.studio-feature-art { min-height: 0 !important; aspect-ratio: 16 / 9 !important; align-self: start; }
.studio-feature-art img { width:100%; height:100%; object-fit:contain; }
.studio-feature-copy { padding: clamp(25px, 3vw, 46px); justify-content:center; }
.studio-feature-copy p { max-width: 56ch; }
.studio-feature-explore { border-top: 1px solid #304252; margin-top: 30px; padding-top: 19px; display:grid; gap:0; }
.studio-explore-heading { font-size: 10px; letter-spacing:.14em; color:#84b5d1; font-weight:800; margin-bottom: 6px; }
.studio-feature-explore a { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:10px 0; color:#d5e8f5; font-size:13px; text-decoration:none; border-bottom:1px solid #283846; }
.studio-feature-explore a:hover { color:#83d0ff; }
.studio-feature-explore a i { color:#68c5fa; font-size:11px; }
.studio-library { grid-template-columns: minmax(0,1fr); }
.studio-library-card { max-width:none; }
@media (min-width: 1550px) { .studio-feature { grid-template-columns: minmax(0, 42%) minmax(0, 1fr); } }
@media (max-width: 1050px) { .studio-feature { grid-template-columns: minmax(0, 1fr); } .studio-feature-art { max-width: 760px; width:100%; } .studio-feature-copy { padding: 26px; } }
@media (max-width: 650px) { .studio-feature-copy { padding: 22px; } .studio-feature-explore { margin-top:24px; } }

/* Featured add-on: equal halves on desktop, uncluttered information. */
@media (min-width: 1051px) {
  .studio-feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; align-items: stretch; }
  .studio-feature-art { aspect-ratio: 16 / 9 !important; width: 100%; min-height: 0 !important; align-self: center; }
  .studio-feature-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
  .studio-feature-copy { min-width: 0; padding: clamp(24px, 3vw, 46px); justify-content: center; }
}
.studio-feature-explore, .studio-feature-overlay { display: none !important; }
/* Colorful Concrete wiki, Studio styling only */
.cc-wrap{max-width:1360px;margin:auto;color:#eef5fc;font-family:Inter,system-ui,sans-serif;padding:16px 0 60px}.cc-wrap h1,.cc-wrap h2,.cc-wrap h3{font-family:inherit;letter-spacing:-.03em;color:#f6f9ff}.cc-wrap p{color:#b4c6d5;line-height:1.7}.cc-eyebrow{color:#77ccff;font-size:11px;letter-spacing:.16em;font-weight:800}.cc-hero{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:38px;background:#15212b;border:1px solid #304252;border-radius:18px;overflow:hidden}.cc-hero>img{width:100%;aspect-ratio:16/9;object-fit:contain;display:block}.cc-hero>div{padding:24px 32px 24px 0}.cc-hero h1,.cc-pagehead h1{font-size:clamp(34px,4vw,58px);margin:12px 0}.cc-button{display:inline-flex;background:#148ad5;color:white;text-decoration:none;border-radius:8px;padding:12px 17px;font-weight:700;margin-top:12px}.cc-intro{margin-top:42px}.cc-intro h2{font-size:27px}.cc-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.cc-cards a,.cc-steps>div{border:1px solid #304252;border-radius:12px;background:#15212b;padding:22px;text-decoration:none;color:#eaf3fa;display:grid;gap:10px}.cc-cards a:hover{border-color:#68c9ff}.cc-cards span{color:var(--bps-text-muted);line-height:1.55}.cc-shots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.cc-shots button{border:1px solid #304252;padding:0;background:#14212b;border-radius:10px;overflow:hidden;cursor:pointer}.cc-shots img{width:100%;aspect-ratio:16/9;object-fit:cover;display:block}.cc-pagehead{max-width:850px;margin:25px 0 30px}.cc-controls{display:flex;gap:15px;flex-wrap:wrap;margin-bottom:22px}.cc-controls label{display:grid;gap:7px;font-size:13px;color:#b4c6d5}.cc-controls select{background:#182733;color:#f4f8ff;border:1px solid #395063;border-radius:8px;padding:11px;min-width:180px}.cc-designs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.cc-design{min-width:0;display:grid;gap:8px;background:#15212b;border:1px solid #304252;padding:13px;border-radius:12px}.cc-tex{height:135px;display:grid;place-items:center;background:var(--bps-surface-header);border-radius:8px;overflow:hidden}.cc-tex img{width:112px;height:112px;object-fit:cover;image-rendering:pixelated}.cc-design small,.cc-muted{color:#91a9bc;font-size:12px}.cc-design code{font-size:10px;overflow-wrap:anywhere;color:#9ebbd0}.cc-steps{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;margin-bottom:25px}.cc-steps p{margin:0}.cc-recipe{border:1px solid #304252;background:#15212b;border-radius:13px;padding:22px;margin:25px 0;max-width:760px}.cc-recipe-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.cc-recipe-head h3{margin:0}.cc-recipe-head span{font-size:12px;color:#9ebbd0}.cc-craft{display:flex;align-items:center;gap:24px;margin:20px 0;flex-wrap:wrap}.cc-grid{display:grid;grid-template-columns:repeat(3,74px);gap:4px}.cc-slot,.cc-result{background:#263947;border:1px solid #5a7387;border-radius:5px;display:grid;place-items:center;text-align:center;font-size:11px;padding:4px;min-height:68px;overflow-wrap:anywhere}.cc-result{width:120px;min-height:92px;font-weight:700}.cc-arrow{font-size:30px;color:#80cfff}.cc-lightbox{position:fixed;inset:0;z-index:9999;background:#000e;display:flex;align-items:center;justify-content:center;gap:12px;padding:40px 15px}.cc-lightbox img{max-width:min(85vw,1300px);max-height:85vh;object-fit:contain}.cc-lightbox button{border:1px solid #637788;border-radius:8px;background:#17232c;color:white;cursor:pointer;font-size:30px;padding:8px 14px}.cc-close{position:absolute;right:20px;top:15px}.cc-count{position:absolute;bottom:12px;color:white;font-size:13px}@media(max-width:850px){.cc-hero{grid-template-columns:1fr;gap:0}.cc-hero>div{padding:25px}.cc-cards{grid-template-columns:1fr}.cc-designs{grid-template-columns:repeat(2,minmax(0,1fr))}.cc-shots{grid-template-columns:repeat(2,1fr)}}@media(max-width:550px){.cc-designs{grid-template-columns:1fr 1fr;gap:8px}.cc-tex{height:110px}.cc-tex img{width:95px;height:95px}.cc-steps{grid-template-columns:1fr}.cc-grid{grid-template-columns:repeat(3,58px)}.cc-slot{min-height:58px}.cc-lightbox{gap:4px;padding:50px 5px}.cc-lightbox button{font-size:23px;padding:7px}.cc-lightbox img{max-width:75vw}}
/* Colorful Concrete: shared wiki article + narrow right-rail layout */
.cc-wiki-layout{max-width:none;width:100%;padding:18px clamp(12px,2.5vw,42px) 65px;box-sizing:border-box}
.cc-entry-head{padding:12px 0 25px;border-bottom:1px solid var(--border);margin-bottom:30px}
.cc-entry-head h1{font-size:clamp(36px,4vw,62px);line-height:1.08;margin:10px 0 12px}
.cc-entry-head p{font-size:16px;margin:0;max-width:750px}
.cc-entry{display:grid;grid-template-columns:minmax(0,1fr) minmax(245px,300px);gap:clamp(18px,3vw,42px);align-items:start}
.cc-entry .cc-article{min-width:0}
.cc-article-section{margin:0 0 30px}.cc-article-section h2{font-size:25px;margin:0 0 12px}.cc-article-section p{margin:0 0 12px}
.cc-entry-rail{min-width:0}.cc-side-card{background:var(--panel);border:1px solid var(--border);border-radius:9px;padding:14px;margin-bottom:16px}
.cc-side-card h2{font-size:19px;margin:12px 0}.cc-side-card p{font-size:13px}.cc-keyart{width:100%;aspect-ratio:16/9;object-fit:contain;border-radius:5px}.cc-tool-icon{display:block;width:110px;height:110px;object-fit:contain;margin:auto;image-rendering:pixelated}
.cc-rail-link{display:block;border-top:1px solid var(--border);padding:10px 0;text-decoration:none;color:var(--accent-2);font-size:13px}
.cc-design-links,.cc-related-designs{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:12px}.cc-design-links a,.cc-related-designs a{display:grid;gap:8px;align-content:start;text-decoration:none;color:var(--text);font-size:12px;padding:10px;border:1px solid var(--border);border-radius:8px;background:var(--panel)}.cc-design-links img,.cc-related-designs img{width:100%;aspect-ratio:1;object-fit:contain;image-rendering:pixelated}.cc-design-links a:hover,.cc-related-designs a:hover{border-color:var(--accent-2)}
.cc-block-stage{background:var(--panel-2);border:1px solid var(--border);border-radius:7px;display:grid;place-items:center;aspect-ratio:1;overflow:hidden}.cc-block-stage canvas{width:100%;max-width:280px;height:auto;aspect-ratio:1;image-rendering:pixelated}
.cc-picker-heading{font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--accent-2);margin:18px 0 10px}.cc-picker-heading span{font-weight:500;letter-spacing:0;text-transform:none;color:var(--text)}
.cc-palette-tabs{display:flex;gap:6px;margin-bottom:10px}.cc-palette-tabs button{flex:1;background:var(--panel-2);color:var(--text);border:1px solid var(--border);border-radius:5px;padding:8px;cursor:pointer}.cc-palette-tabs button.active{border-color:var(--accent-2);color:var(--accent-2)}
.cc-color-picker{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.cc-color-thumb{padding:5px;border:1px solid var(--border);border-radius:5px;background:var(--panel-2);cursor:pointer;min-width:0}.cc-color-thumb:hover,.cc-color-thumb:focus-visible,.cc-color-thumb.active{border-color:var(--accent-2);box-shadow:0 0 0 1px var(--accent-2) inset}.cc-color-thumb img{display:block;width:100%;aspect-ratio:1;object-fit:contain;image-rendering:pixelated}.cc-block-id{font-family:monospace;font-size:10px;overflow-wrap:anywhere;color:var(--muted);margin:12px 0}
.cc-sidebar-section{margin:14px 0 0}.cc-sidebar-heading{width:100%;display:flex;justify-content:space-between;align-items:center;background:transparent;border:0;color:var(--accent-2);font-size:11px;letter-spacing:.11em;font-weight:800;padding:11px 8px;cursor:pointer;text-align:left}.cc-sidebar-heading span{transition:transform .25s ease}.cc-sidebar-heading[aria-expanded="false"] span{transform:rotate(-90deg)}.cc-sidebar-contents{display:grid;grid-template-rows:1fr;transition:grid-template-rows .32s cubic-bezier(.2,.7,.2,1),opacity .25s ease;opacity:1}.cc-sidebar-contents.collapsed{grid-template-rows:0fr;opacity:0}.cc-sidebar-contents{overflow:hidden}.cc-sidebar-link{display:flex;align-items:center;gap:10px;min-height:36px;padding:7px 10px;border-radius:5px;color:var(--muted);text-decoration:none;font-size:13px}.cc-sidebar-link img{width:22px;height:22px;object-fit:contain;image-rendering:pixelated}.cc-sidebar-link:hover,.cc-sidebar-link.active,.cc-main-link.active{background:var(--panel-2);color:var(--text)}
@media(max-width:950px){.cc-entry{grid-template-columns:minmax(0,1fr) 245px;gap:18px}}
@media(max-width:740px){.cc-entry{display:flex;flex-direction:column}.cc-entry .cc-article{order:0;width:100%}.cc-entry-rail{order:1;width:100%}.cc-color-picker{grid-template-columns:repeat(8,minmax(0,1fr))}.cc-block-stage{max-width:360px;margin:auto}.cc-wiki-layout{padding:12px 16px 48px}}
@media(max-width:430px){.cc-color-picker{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.cc-sidebar-contents,.cc-sidebar-heading span{transition:none}}
/* Accordion contents have multiple links; animate the entire list rather than implicit grid rows. */
.cc-sidebar-contents{display:block;max-height:900px;overflow:hidden;transition:max-height .36s cubic-bezier(.2,.7,.2,1),opacity .25s ease}
.cc-sidebar-contents.collapsed{max-height:0}

/* Single, poster-style design selector; no separate page per design. */
.cc-design-selector button{display:grid;gap:8px;align-content:start;text-decoration:none;color:var(--text);font:inherit;font-size:12px;padding:10px;border:1px solid var(--border);border-radius:8px;background:var(--panel);cursor:pointer;text-align:center;min-width:0}
.cc-design-selector button img{width:100%;aspect-ratio:1;object-fit:contain;image-rendering:pixelated}
.cc-design-selector button:hover,.cc-design-selector button.active,.cc-design-selector button:focus-visible{border-color:var(--accent-2);outline-offset:2px}

/* Colorful Concrete: stacked previews matching the Horror Circus infobox. */
.cc-tiled-stage{margin:12px 0;padding:12px;background:var(--panel-2);border:1px solid var(--border);border-radius:7px;text-align:center}
.cc-tiled-stage h3{font-size:13px;margin:0 0 8px;text-align:left}
.cc-tiled-stage canvas{display:block;width:100%;max-width:320px;height:auto;margin:auto;image-rendering:pixelated}
.cc-pillar-note{font-size:12px;color:var(--muted);line-height:1.5}
.cc-sidebar-section>.cc-sidebar-heading{cursor:default}

/* Colorful Concrete: unified navigation and one-block-height preview. */
.cc-sidebar-plugs{display:flex!important;flex-direction:column;gap:9px;margin-top:auto}
.cc-block-stage{display:flex;flex-direction:column;align-items:center;justify-content:center;aspect-ratio:auto;padding:12px}
.cc-block-stage h3{align-self:stretch;text-align:left;font-size:13px;margin:0 0 8px}
.cc-block-stage canvas{width:100%;max-width:280px;height:auto}

.cc-sidebar-heading{padding:16px 12px 7px;color:#8ed3ff;font-size:11px;font-weight:800;letter-spacing:.13em;text-transform:uppercase;}

/* Match Horror Circus recipe dimensions and shapeless presentation. */
.cc-recipe{border:0;background:transparent;border-radius:0;padding:0;max-width:none;margin:28px 0}
.cc-recipe h2{margin:0 0 14px;font-size:1.45rem}
.cc-recipe .recipe-viewer{max-width:590px}
.cc-recipe .recipe-grid{grid-template-columns:repeat(3,minmax(0,1fr));width:min(100%,216px);gap:4px}
.cc-recipe .recipe-grid-shapeless{grid-template-columns:repeat(2,minmax(0,1fr));width:min(100%,144px);flex-basis:144px}
.cc-recipe .recipe-slot{width:auto;min-height:0;padding:0;overflow:visible;aspect-ratio:1;border-radius:5px;background:var(--panel);border:1px solid var(--border)}
.cc-recipe .recipe-slot img{display:block;width:78%;height:78%;object-fit:contain;image-rendering:pixelated}
.cc-recipe .recipe-output{flex:0 0 clamp(54px,14vw,76px)}
.cc-recipe .recipe-result{width:100%}
.cc-recipe .recipe-workspace{flex-wrap:nowrap}
@media(max-width:390px){.cc-recipe .recipe-grid{gap:3px}}
/* Align Colorful Concrete article headers with the Horror Circus wiki header rhythm. */
:root[data-theme="studio"] .cc-wiki-layout .cc-entry-head{padding:26px 32px 30px;margin:0 0 30px;background:var(--panel, #15212b);border-bottom:1px solid var(--border);border-radius:0}
:root[data-theme="studio"] .cc-wiki-layout .cc-entry-head .cc-eyebrow{display:block;font-size:12px;line-height:1.4;font-weight:800;letter-spacing:.13em;text-transform:uppercase;margin:0 0 10px}
:root[data-theme="studio"] .cc-wiki-layout .cc-entry-head h1{font-size:clamp(34px,4vw,58px);line-height:1.1;letter-spacing:-.025em;margin:0 0 14px;font-weight:800}
:root[data-theme="studio"] .cc-wiki-layout .cc-entry-head p{margin:0;line-height:1.65;max-width:780px}
@media(max-width:700px){:root[data-theme="studio"] .cc-wiki-layout .cc-entry-head{padding:22px 18px 25px}}

/* Colorful Concrete and Horror Circus share one sidebar, heading, and link system.
   Page-specific selectors below only affect layout, never substitute styling. */
:root[data-theme="studio"] .cc-wiki-layout .cc-entry-head .eyebrow {
  display:block;
  color:var(--bps-cyan);
  font-size:.8rem;
  line-height:1.4;
  font-weight:700;
  letter-spacing:.16em;
  text-transform:uppercase;
  margin:0 0 10px;
}
:root[data-theme="studio"] .cc-wiki-layout .cc-picker-heading {color:var(--bps-cyan);}
:root[data-theme="studio"] .cc-wiki-layout .cc-article a.wiki-link,
:root[data-theme="studio"] .cc-wiki-layout .cc-rail-link.wiki-link {
  color:var(--bps-cyan);
  text-decoration:none;
  font-weight:700;
  border-bottom-color:rgba(84,199,255,.40);
}
:root[data-theme="studio"] .cc-wiki-layout .cc-article a.wiki-link:hover,
:root[data-theme="studio"] .cc-wiki-layout .cc-rail-link.wiki-link:hover {
  color:#e6f4ff;
  border-bottom-color:var(--accent);
}
:root[data-theme="studio"] .cc-wiki-layout .cc-design-links a span {color:var(--bps-cyan);}
:root[data-theme="studio"] .cc-wiki-layout .cc-design-links a:hover span {color:#e6f4ff;}
/* The collection heading now uses .nav-dropdown > summary and the links
   use .monster-link, both shared with the Horror Circus sidebar. */
