* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #101418;
    color: #f3f6f8;
}

.page {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
}

.site-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 20px;
}

h1 {
    margin: 0 0 8px;
    font-size: 32px;
}

p {
    margin: 0;
    color: #b8c4ce;
}

.result-count {
    background: #1d2730;
    border: 1px solid #344552;
    border-radius: 10px;
    padding: 10px 14px;
    white-space: nowrap;
    color: #dbe7ef;
}

.filters {
    display: grid;
    grid-template-columns: 2fr repeat(6, minmax(140px, 1fr)) auto;
    gap: 12px;
    align-items: end;
    background: #161c22;
    border: 1px solid #2c3944;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 18px;
}

.filter {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #c8d4dd;
}

input,
select,
button {
    height: 38px;
    border-radius: 8px;
    border: 1px solid #3a4b58;
    background: #0f1419;
    color: #f3f6f8;
    padding: 0 10px;
    font-size: 14px;
}

button {
    cursor: pointer;
    background: #243342;
    font-weight: 700;
}

button:hover {
    background: #304357;
}

.table-wrapper {
    overflow: auto;
    border: 1px solid #2c3944;
    border-radius: 14px;
    background: #0d1116;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1350px;
}

th,
td {
    padding: 10px 12px;
    border-bottom: 1px solid #26323c;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}

th {
    position: sticky;
    top: 0;
    background: #1b2530;
    color: #ffffff;
    z-index: 1;
}

tr:hover td {
    background: #151d25;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    background: #223041;
    color: #dbe7ef;
    margin: 2px 4px 2px 0;
    white-space: nowrap;
}

.empty-state {
    padding: 28px;
    color: #b8c4ce;
}

@media (max-width: 1100px) {
    .site-header {
        display: block;
    }

    .result-count {
        display: inline-block;
        margin-top: 14px;
    }

    .filters {
        grid-template-columns: 1fr 1fr;
    }

    .filter.wide,
    button {
        grid-column: 1 / -1;
    }
}


.pet-link,
.back-link {
    color: #8fd3ff;
    font-weight: 700;
    text-decoration: none;
}

.pet-link:hover,
.back-link:hover {
    text-decoration: underline;
}

.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
}

.detail-card {
    border: 1px solid #2c3944;
    border-radius: 14px;
    background: #0d1116;
    padding: 18px;
}

.detail-card h2 {
    margin-top: 0;
    color: #ffffff;
}

.detail-card.full-width {
    grid-column: 1 / -1;
}

.detail-table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
}

.detail-table.narrow {
    min-width: 0;
}

.detail-table th {
    width: 220px;
    position: static;
    background: #1b2530;
    color: #dbe7ef;
}

.detail-table td {
    background: #111922;
}

.muted {
    color: #aebbc6;
}

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


/* Version 3: mutation information table */
.detail-card.full-width .detail-table th,
.detail-card.full-width .detail-table td {
    vertical-align: top;
}

.detail-card.full-width .detail-table thead th {
    text-align: left;
}

.detail-card.full-width .detail-table td {
    min-width: 120px;
}


/* Version 3.1: mutation result lookup */
.mutation-source-block {
    margin-bottom: 22px;
}

.highlighted-cell {
    outline: 2px solid #8fd3ff;
    outline-offset: -2px;
    background: #172d3d !important;
}


/* Version 3.2: SWGPets-style recipe + pathway experiment */
.mutation-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.pathway-toggle {
    border: 1px solid #47677d;
    background: #122537;
    color: #dcefff;
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 700;
}

.pathway-toggle:hover {
    background: #19344d;
}

.mutation-recipe-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    background: #111922;
}

.mutation-recipe-table th,
.mutation-recipe-table td {
    border: 1px solid #2c3944;
    padding: 10px;
    text-align: center;
}

.mutation-recipe-table th {
    background: #1b2530;
    color: #ffffff;
}

.mutation-recipe-table td {
    background: #181f36;
}

.mutation-recipe-table tbody th {
    width: 180px;
    text-align: right;
}

.mutation-recipe-table tfoot td {
    font-size: 0.85rem;
    color: #aebbc6;
    background: #10161d;
}

.pathway-panel {
    margin: 16px 0;
    padding: 18px;
    border: 1px solid #2c3944;
    border-radius: 14px;
    background: #0a0f14;
}

.mutation-pathway {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.pathway-step {
    width: min(520px, 100%);
    border: 1px solid #2c3944;
    border-radius: 14px;
    background: #111922;
    padding: 14px;
    text-align: center;
}

.pathway-step.current-step {
    outline: 2px solid #8fd3ff;
    background: #172d3d;
}

.pathway-stage {
    font-size: 0.8rem;
    color: #aebbc6;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 5px;
}

.pathway-result {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
}

.pathway-requirements {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    color: #dbe7ef;
    font-size: 0.9rem;
}

.pathway-requirements span {
    background: #0d1116;
    border: 1px solid #2c3944;
    border-radius: 999px;
    padding: 5px 9px;
}

.pathway-arrow {
    color: #8fd3ff;
    font-size: 1.6rem;
    font-weight: 900;
}


/* Version 3.3: recipe/pathway mapping consistency */
.mutation-recipe-table th,
.mutation-recipe-table td {
    min-width: 120px;
}


/* Version 3.8: compact multi-special filter and pet-page top layout */

.special-dropdown-filter {
    position: relative;
}

.special-dropdown-toggle {
    width: 100%;
    text-align: left;
    border: 1px solid #334653;
    background: #0d1116;
    color: #f3f6f8;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
}

.special-dropdown-toggle:hover {
    background: #111922;
}

.special-dropdown-panel {
    position: absolute;
    z-index: 50;
    top: calc(100% - 4px);
    left: 0;
    width: min(420px, 92vw);
    max-height: 320px;
    overflow: auto;
    border: 1px solid #334653;
    border-radius: 12px;
    background: #0d1116;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
    padding: 10px;
}

.special-checkboxes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.special-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 8px;
    cursor: pointer;
}

.special-option:hover {
    background: #172536;
}

.special-option input {
    accent-color: #8fd3ff;
}

.selected-specials {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.selected-special-tag {
    display: inline-flex;
    align-items: center;
    border: 1px solid #334653;
    background: #172536;
    color: #dcefff;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 0.82rem;
}

/* Pet page top row: General Info | Specials | Preview */
.detail-grid {
    grid-template-columns: minmax(360px, 1.25fr) minmax(220px, 0.75fr) minmax(300px, 1fr);
    align-items: start;
}

.detail-card.full-width {
    grid-column: 1 / -1;
}

.image-card {
    min-height: 100%;
}

.image-placeholder {
    min-height: 260px;
    border: 2px dashed #47677d;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aebbc6;
    background: #0a0f14;
    margin-bottom: 12px;
    font-weight: 700;
}

.palette-placeholder {
    border: 1px solid #2c3944;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    color: #aebbc6;
    background: #111922;
}

.tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    color: #8fd3ff;
    cursor: help;
    font-weight: 800;
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    width: 280px;
    background: #0a0f14;
    color: #dbe7ef;
    text-align: left;
    border: 1px solid #47677d;
    border-radius: 10px;
    padding: 10px;
    position: absolute;
    z-index: 80;
    left: 50%;
    bottom: 140%;
    transform: translateX(-50%);
    transition: opacity 0.15s ease;
    font-weight: 400;
    line-height: 1.4;
    box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.tooltip:hover .tooltip-text,
.tooltip:focus .tooltip-text {
    visibility: visible;
    opacity: 1;
}

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


/* Version 3.9: pet page UI + compact special filter polish */

/* Main filter alignment */
.filters {
    align-items: end;
}

.special-dropdown-filter {
    min-width: 170px;
    max-width: 180px;
}

.special-dropdown-filter > span {
    display: block;
    line-height: 1.15;
    min-height: 32px;
}

.special-dropdown-filter small {
    display: block;
    font-size: 0.68rem;
    color: #b8c4ce;
    line-height: 1.05;
}

.special-dropdown-toggle {
    min-height: 38px;
    padding: 9px 12px;
    white-space: nowrap;
}

.special-dropdown-panel {
    width: 260px;
    max-height: 250px;
}

.special-option {
    padding: 6px 8px;
    font-size: 0.9rem;
}

.selected-specials {
    max-width: 180px;
}

.selected-special-tag {
    font-size: 0.75rem;
    padding: 3px 7px;
}

/* Pet page compact cards */
.special-icon-list {
    display: grid;
    gap: 8px;
}

.special-icon-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 8px;
    border: 1px solid #2c3944;
    border-radius: 10px;
    background: #111922;
}

.special-temp-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #1b2530;
    flex: 0 0 auto;
}

.dna-details summary {
    cursor: pointer;
    color: #8fd3ff;
    font-weight: 700;
}

.dna-location-text {
    margin-top: 8px;
    white-space: pre-wrap;
    line-height: 1.35;
    color: #dbe7ef;
}

.image-placeholder {
    flex-direction: column;
    gap: 10px;
}

.creature-silhouette {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 1px solid #47677d;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #47677d;
    font-size: 2rem;
    background: #0d1116;
}


/* Version 3.9.1: align and compact Specials filter */
.special-dropdown-filter {
    min-width: 150px !important;
    max-width: 170px !important;
    width: 170px !important;
}

.special-dropdown-filter > span {
    display: block;
    min-height: 0 !important;
    line-height: 1.2 !important;
}

.special-dropdown-filter small {
    display: none !important;
}

.special-dropdown-toggle {
    width: 100%;
    min-height: 38px;
    height: 38px;
    padding: 8px 12px;
}

.special-dropdown-panel {
    width: 265px;
    max-height: 255px;
}

.selected-specials {
    max-width: 265px;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 10;
}

.filters {
    align-items: end !important;
}


/* Version 3.10: pet page polish + enzyme dots */
.special-icon-list {
    display: grid;
    gap: 8px;
}

.special-icon-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 8px;
    border: 1px solid #2c3944;
    border-radius: 10px;
    background: #111922;
}

.special-temp-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #1b2530;
    flex: 0 0 auto;
}

.dna-details summary {
    cursor: pointer;
    color: #8fd3ff;
    font-weight: 700;
}

.dna-location-text {
    margin-top: 8px;
    white-space: pre-wrap;
    line-height: 1.35;
    color: #dbe7ef;
}

.image-placeholder {
    flex-direction: column;
    gap: 10px;
}

.creature-silhouette {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 1px solid #47677d;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #47677d;
    font-size: 2rem;
    background: #0d1116;
}

.enzyme-display {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.enzyme-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.35);
    flex: 0 0 auto;
}


.enzyme-dot{
    display:inline-block !important;
    width:14px !important;
    height:14px !important;
    border-radius:50% !important;
    margin-right:6px !important;
    border:1px solid rgba(255,255,255,.5) !important;
    vertical-align:middle !important;
}

.enzyme-display{
    display:inline-flex !important;
    align-items:center !important;
}


/* Version 3.10.2: enzyme dots inside mutation table */
.mutation-recipe-table .enzyme-display {
    justify-content: center;
}

.enzyme-display {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
}

.enzyme-dot {
    display: inline-block !important;
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255,255,255,.55) !important;
    flex: 0 0 auto !important;
}


/* Creature Codex 4.0 */
.site-header{
background:linear-gradient(135deg,#13202b,#1a1f36);
padding:20px;
border:1px solid #2c4555;
border-radius:16px;
margin-bottom:24px;
}
h1{
color:#67d5e8;
letter-spacing:2px;
font-size:40px;
}
.site-header p{
font-size:1.05rem;
}
.pet-link,.site-header a{
color:#67d5e8;
}
.detail-card h2{
color:#67d5e8;
}
.full-width h2{
color:#b48cff;
}


/* Creature Codex v4.1: table sizing + pet hero */
.pet-table {
    table-layout: fixed;
}

.pet-table th,
.pet-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: top;
}

.pet-table .col-pet-name {
    width: 180px;
}

.pet-table .col-pet-family {
    width: 145px;
}

.pet-table .col-supplement,
.pet-table .col-mount,
.pet-table .col-can-fly {
    width: 88px;
    text-align: center;
}

.pet-table .col-dna-source {
    width: 120px;
}

.pet-table .col-bonus-group {
    width: 135px;
}

.pet-table th[class*="col-special"],
.pet-table td[class*="col-special"] {
    width: 105px;
    font-size: 0.86rem;
}

.pet-table td[class*="col-special"] .badge {
    white-space: normal;
    line-height: 1.2;
    padding: 4px 6px;
}

.codex-hero-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: end;
    border: 1px solid rgba(88, 196, 221, 0.35);
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(155, 107, 255, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(88, 196, 221, 0.12), rgba(13, 17, 22, 0.95));
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: 0 14px 40px rgba(0,0,0,.22);
}

.codex-entry-label {
    color: #8fd3ff;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.codex-hero-card h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1;
    color: #ffffff;
}

.codex-hero-card p {
    margin: 8px 0 0;
    color: #dbe7ef;
    font-size: 1.05rem;
}

.codex-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.codex-hero-meta span {
    border: 1px solid rgba(143, 211, 255, 0.35);
    background: rgba(10, 15, 20, 0.55);
    color: #dcefff;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 0.9rem;
    font-weight: 700;
}

.mutation-recipe-table th {
    white-space: nowrap;
}

@media (max-width: 760px) {
    .codex-hero-card {
        align-items: start;
        flex-direction: column;
    }

    .codex-hero-meta {
        justify-content: flex-start;
    }
}


/* Creature Codex v4.2 */
.page-header h1,
.page-header p,
.pet-header h1,
.pet-header p {
    display:none !important;
}

.codex-hero-card {
    margin-top: 8px;
}



/* Creature Codex v4.3 Layout Experiment */

/* Smaller hero */
.codex-hero-card{
    padding:16px 20px !important;
    margin-bottom:14px !important;
}

.codex-entry-label{
    font-size:.72rem !important;
}

.codex-hero-card h2{
    font-size:2.4rem !important;
    margin-bottom:4px !important;
}

.codex-hero-card p{
    font-size:1rem !important;
}

/* Make right side much larger */
.detail-grid{
    display:grid !important;
    grid-template-columns: 1fr 1.45fr !important;
    gap:18px !important;
    align-items:start !important;
}

.detail-grid > :nth-child(1){
    grid-column:1;
    grid-row:1;
}

.detail-grid > :nth-child(2){
    grid-column:1;
    grid-row:2;
}

.detail-grid > :nth-child(3){
    grid-column:2;
    grid-row:1 / span 2;
}

/* Bigger creature profile */
.preview-card,
.creature-profile-card{
    height:100% !important;
}

.image-placeholder{
    min-height:420px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
}

/* Mutation section gets breathing room */
.mutation-section,
.mutation-card{
    margin-top:24px !important;
}

@media (max-width: 1000px){
    .detail-grid{
        grid-template-columns:1fr !important;
    }

    .detail-grid > *{
        grid-column:auto !important;
        grid-row:auto !important;
    }

    .image-placeholder{
        min-height:260px !important;
    }
}


/* Creature Codex v4.4 - remove hero card */
.codex-hero-card{
    display:none !important;
}


/* =========================
   Creature Codex v4.5
   Visual Refresh
   ========================= */

:root{
  --codex-cyan:#58C4DD;
  --mutation-purple:#9B6BFF;
  --specials-green:#4CAF7A;
}

/* Section headers */
.detail-card h2{
  position:relative;
  padding-bottom:10px;
  margin-bottom:16px;
  border-bottom:1px solid rgba(255,255,255,.08);
}

.detail-card h2::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-1px;
  width:90px;
  height:3px;
  border-radius:999px;
}

/* Species Overview */
.detail-card:first-child h2{
  color:var(--codex-cyan);
}
.detail-card:first-child h2::after{
  background:var(--codex-cyan);
}

/* Specials */
.special-icon-item{
  border-color:rgba(76,175,122,.35) !important;
}

.special-temp-icon{
  background:rgba(76,175,122,.15) !important;
}

.detail-card:nth-child(2) h2{
  color:var(--specials-green);
}
.detail-card:nth-child(2) h2::after{
  background:var(--specials-green);
}

/* Creature profile */
.image-placeholder{
  min-height:460px !important;
  border:2px dashed rgba(88,196,221,.35) !important;
  background:
    radial-gradient(circle at center,
      rgba(88,196,221,.08),
      transparent 55%) !important;
}

.creature-silhouette{
  width:110px !important;
  height:110px !important;
  font-size:3rem !important;
  border-color:rgba(88,196,221,.35) !important;
}

/* Mutation research section */
.mutation-section,
.mutation-card{
  border-color:rgba(155,107,255,.35) !important;
  background:
    linear-gradient(
      180deg,
      rgba(155,107,255,.05),
      rgba(155,107,255,.01)
    ) !important;
}

.mutation-section h2,
.mutation-card h2{
  color:var(--mutation-purple) !important;
}

.mutation-section h2::after,
.mutation-card h2::after{
  background:var(--mutation-purple) !important;
}

/* Slight emphasis for enzyme dots */
.enzyme-dot{
  box-shadow:0 0 8px rgba(255,255,255,.15);
}

/* Homepage title polish */
.site-title,
.hero-title,
header h1{
  letter-spacing:.08em;
}


/* =====================================
   Creature Codex v4.6 Homepage Refresh
   ===================================== */

/* Homepage title */
header h1,
.site-title,
.hero-title{
    font-size: clamp(2.6rem, 5vw, 4.2rem) !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
    text-transform: none !important;
    color: #f3f8fc !important;
    text-shadow:
        0 0 25px rgba(88,196,221,.20),
        0 0 60px rgba(88,196,221,.08);
}

/* Subtitle */
header p,
.hero-subtitle{
    color:#b8c8d5 !important;
    font-size:1.05rem !important;
}

/* Subtle glow behind homepage header */
header,
.hero{
    position:relative;
}

header::before,
.hero::before{
    content:"";
    position:absolute;
    top:-80px;
    left:50%;
    transform:translateX(-50%);
    width:700px;
    height:260px;
    background:radial-gradient(
        ellipse at center,
        rgba(88,196,221,.10),
        rgba(88,196,221,.04),
        transparent 70%
    );
    pointer-events:none;
    z-index:0;
}

header > *,
.hero > *{
    position:relative;
    z-index:1;
}

/* Unify colours - cyan for non-mutation sections */
.detail-card:nth-child(2) h2{
    color:#58C4DD !important;
}

.detail-card:nth-child(2) h2::after{
    background:#58C4DD !important;
}

.special-icon-item{
    border-color:rgba(88,196,221,.22) !important;
}

.special-temp-icon{
    background:rgba(88,196,221,.12) !important;
}

/* Homepage table polish */
table tr{
    transition:background-color .15s ease;
}

table tbody tr:nth-child(even){
    background:rgba(255,255,255,.015);
}

table tbody tr:hover{
    background:rgba(88,196,221,.08) !important;
}

table th{
    color:#dcefff;
    border-bottom:1px solid rgba(88,196,221,.18);
}

.pet-link{
    color:#7ed7eb !important;
    font-weight:600;
}

.pet-link:hover{
    color:#a8ecff !important;
}

/* Softer card styling */
.card,
.detail-card{
    box-shadow:
        0 8px 30px rgba(0,0,0,.18);
}


/* =====================================
   Creature Codex v4.7 Header Refresh
   ===================================== */

/* Homepage banner: more intentional, still restrained */
.site-header,
header.site-header {
    position: relative;
    overflow: hidden;
    padding: 34px 34px 30px !important;
    border: 1px solid rgba(88,196,221,.24);
    border-radius: 22px;
    background:
        radial-gradient(circle at 15% 20%, rgba(88,196,221,.18), transparent 32%),
        radial-gradient(circle at 88% 18%, rgba(155,107,255,.18), transparent 30%),
        linear-gradient(135deg, rgba(13,21,29,.94), rgba(15,18,31,.96));
    box-shadow:
        0 20px 70px rgba(0,0,0,.30),
        inset 0 1px 0 rgba(255,255,255,.04);
    margin-bottom: 22px;
}

.site-header::after,
header.site-header::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent, rgba(88,196,221,.08), transparent);
    opacity: .45;
    pointer-events: none;
}

/* Homepage title: less generic, more codex-like */
.site-header h1,
header.site-header h1,
header h1 {
    color: #7ed7eb !important;
    text-transform: none !important;
    letter-spacing: .035em !important;
    font-weight: 800 !important;
    line-height: .95 !important;
    margin-bottom: 8px !important;
    text-shadow:
        0 0 20px rgba(88,196,221,.22),
        0 8px 30px rgba(0,0,0,.55);
}

.site-header p,
header.site-header p,
header p {
    color: #d4e1eb !important;
    max-width: 720px;
}

/* Add a quiet codex divider under the homepage subtitle */
.site-header p::after,
header.site-header p::after {
    content: "";
    display: block;
    width: 150px;
    height: 3px;
    margin-top: 16px;
    border-radius: 999px;
    background: linear-gradient(90deg, #58C4DD, rgba(155,107,255,.85), transparent);
}

/* Pet page: remove the big rounded title banner feel */
.pet-header,
.page-header {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 10px 0 18px !important;
    margin: 0 0 10px !important;
    box-shadow: none !important;
}

/* Pet page title */
.pet-header h1,
.page-header h1,
#pet-title {
    display: block !important;
    color: #7ed7eb !important;
    font-size: clamp(2.2rem, 4.6vw, 3.8rem) !important;
    line-height: 1 !important;
    font-weight: 780 !important;
    letter-spacing: .015em !important;
    text-shadow: 0 0 22px rgba(88,196,221,.16);
    margin: 4px 0 6px !important;
}

/* Pet subtitle */
.pet-header p,
.page-header p,
#pet-subtitle {
    display: block !important;
    color: #b8c8d5 !important;
    font-size: 1.02rem !important;
    margin: 0 !important;
}

/* Back link as breadcrumb, not a big link/button */
.back-link {
    display: inline-flex;
    align-items: center;
    color: #8fd3ff !important;
    font-size: .92rem;
    font-weight: 700;
    text-decoration: none !important;
    margin-bottom: 8px;
    opacity: .92;
}

.back-link:hover {
    color: #b9efff !important;
    opacity: 1;
    text-decoration: underline !important;
}

/* Add subtle entry divider under pet title */
.pet-header::after,
.page-header::after {
    content: "";
    display: block;
    width: 220px;
    height: 2px;
    border-radius: 999px;
    margin-top: 16px;
    background: linear-gradient(90deg, rgba(88,196,221,.8), rgba(155,107,255,.5), transparent);
}

/* Make sure no hidden-title experiment survives */
.page-header h1,
.page-header p,
.pet-header h1,
.pet-header p {
    visibility: visible !important;
}


/* =====================================
   Creature Codex v4.8 Compact Headers
   ===================================== */

/* Remove pet count/result badge from homepage */
#result-count,
.result-count,
.count-badge,
.results-count {
    display: none !important;
}

/* Homepage title should sit on the page, not inside a banner box */
.site-header,
header.site-header {
    padding: 20px 0 18px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    margin-bottom: 16px !important;
    overflow: visible !important;
}

.site-header::after,
header.site-header::after {
    display: none !important;
}

/* Keep a subtle glow, but behind the page rather than as a card */
.site-header::before,
header.site-header::before {
    top: -80px !important;
    left: 220px !important;
    width: 540px !important;
    height: 240px !important;
    opacity: .75 !important;
}

/* Homepage title refinement */
.site-header h1,
header.site-header h1,
header h1 {
    font-size: clamp(2.8rem, 5vw, 4rem) !important;
    color: #7ed7eb !important;
    line-height: .95 !important;
    margin-bottom: 8px !important;
}

.site-header p,
header.site-header p,
header p {
    color: #b8c8d5 !important;
}

/* Pet page header: no box, no huge banner */
.pet-header,
.page-header {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 8px 0 12px !important;
    margin: 0 0 14px !important;
    min-height: 0 !important;
}

/* Kill any old gradient/banner pseudo elements on pet headers */
.pet-header::before,
.page-header::before {
    display: none !important;
}

/* Pet title: smaller, cleaner, codex-entry style */
#pet-title,
.pet-header h1,
.page-header h1 {
    display: block !important;
    color: #7ed7eb !important;
    font-size: clamp(2.1rem, 3.6vw, 2.9rem) !important;
    line-height: 1.02 !important;
    font-weight: 760 !important;
    letter-spacing: .01em !important;
    margin: 4px 0 5px !important;
    text-shadow: 0 0 18px rgba(88,196,221,.12) !important;
}

/* Pet subtitle */
#pet-subtitle,
.pet-header p,
.page-header p {
    display: block !important;
    color: #b8c8d5 !important;
    font-size: .98rem !important;
    margin: 0 !important;
}

/* Small divider only */
.pet-header::after,
.page-header::after {
    content: "";
    display: block;
    width: 180px;
    height: 2px;
    border-radius: 999px;
    margin-top: 12px;
    background: linear-gradient(90deg, rgba(88,196,221,.85), rgba(155,107,255,.55), transparent);
}

/* Breadcrumb compact */
.back-link {
    margin-bottom: 6px !important;
    font-size: .9rem !important;
}

/* Pull content upward a little after shrinking header */
.detail-grid {
    margin-top: 4px !important;
}


/* v4.8.1 subtitle refinement */
.site-header p,
header.site-header p,
header p{
    font-size:0.95rem !important;
    color:#aebdca !important;
    letter-spacing:0.02em;
}


/* Footer */
.codex-footer {
    margin-top: 40px;
    padding: 24px 0 32px;
    border-top: 1px solid rgba(88,196,221,0.15);
    text-align: center;
    color: #aebdca;
    font-size: 0.9rem;
    line-height: 1.8;
}
.footer-beta { margin-top: 8px; }
.footer-feedback { color: #7ed7eb; font-weight: 600; }


/* Creature Codex v4.9: ability icons */
.ability-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.ability-icon {
    width: 28px;
    height: 28px;
    image-rendering: auto;
    border-radius: 6px;
    flex: 0 0 auto;
    box-shadow: 0 0 0 1px rgba(255,255,255,.12);
}

.special-icon-item .ability-icon {
    width: 32px;
    height: 32px;
}

.ability-icon-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(88,196,221,.12);
    color: #8fd3ff;
}

.badge .ability-with-icon {
    gap: 5px;
}

.badge .ability-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.special-icon-item {
    padding: 7px 9px;
}

.special-icon-item .ability-with-icon span:last-child {
    font-weight: 600;
}


/* Creature Codex v4.10.7: stable compact homepage table */
#result-count {
    display: none !important;
}

.col-pet-name {
    width: 210px;
}

.col-pet-family {
    width: 160px;
}

.col-specials {
    width: 200px;
}

.col-bonus-group {
    width: 150px;
}

.col-dna-source {
    width: 140px;
}

.col-mount {
    width: 100px;
    text-align: center;
}

.specials-icon-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    align-items: center !important;
    min-height: 28px !important;
}

.specials-icon-row img.ability-icon {
    display: inline-block !important;
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    object-fit: contain !important;
    border-radius: 4px !important;
    vertical-align: middle !important;
}


/* Creature Codex v4.12: Abilities index */
.codex-nav {
    display: flex;
    gap: 10px;
    margin: 0 0 18px;
}

.codex-nav a {
    color: #8fd3ff;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid rgba(88,196,221,.20);
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(88,196,221,.06);
}

.codex-nav a:hover {
    color: #c8f4ff;
    border-color: rgba(88,196,221,.45);
}

.abilities-table th,
.abilities-table td {
    vertical-align: top;
}

.ability-name-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 240px;
}

.ability-expand {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid rgba(88,196,221,.35);
    background: rgba(88,196,221,.08);
    color: #8fd3ff;
    cursor: pointer;
    font-weight: 800;
}

.ability-row.expanded {
    background: rgba(88,196,221,.08);
}

.ability-details-panel {
    border: 1px solid rgba(155,107,255,.25);
    border-radius: 14px;
    padding: 16px;
    background: rgba(155,107,255,.045);
}

.ability-details-meta {
    display: grid;
    gap: 5px;
    margin-bottom: 14px;
    color: #b8c8d5;
}

.rank-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 14px;
}

.rank-table th,
.rank-table td {
    border: 1px solid rgba(255,255,255,.08);
    padding: 8px 10px;
}

.rank-table th {
    background: rgba(255,255,255,.045);
}

.ability-used-by {
    display: grid;
    gap: 8px;
    color: #dcefff;
}

.ability-used-by a,
.abilities-table a {
    color: #8fd3ff;
}

.verified-badge {
    font-size: .72rem;
    border-radius: 999px;
    padding: 2px 7px;
    margin-left: 4px;
    white-space: nowrap;
}

.verified-badge.verified {
    background: rgba(88,196,221,.16);
    color: #b8f2ff;
}

.verified-badge.provisional {
    background: rgba(155,107,255,.14);
    color: #d9c7ff;
}

.ability-details-note {
    color: #b8c8d5;
    font-style: italic;
}

.ability-link,
.ability-icon-link {
    text-decoration: none;
    color: inherit;
}

.ability-link:hover span:last-child {
    color: #8fd3ff;
    text-decoration: underline;
}

.ability-icon-link:hover img.ability-icon {
    box-shadow: 0 0 0 1px rgba(126,215,235,.6), 0 4px 12px rgba(0,0,0,.35);
}


/* Creature Codex v4.13: Ability cards redesign */
.abilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.ability-card {
    border: 1px solid rgba(88,196,221,.18);
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(88,196,221,.08), transparent 34%),
        rgba(13, 18, 24, .92);
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
    overflow: hidden;
}

.ability-card-main {
    padding: 16px;
}

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

.ability-card-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ability-card-icon {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    border-radius: 8px !important;
}

.ability-card h2 {
    margin: 0 0 4px;
    font-size: 1.25rem;
    color: #f2fbff;
}

.ability-card-subtitle {
    color: #9fb3c2;
    font-size: .88rem;
    line-height: 1.25;
}

.ability-category-pill {
    border-radius: 999px;
    padding: 5px 9px;
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
    color: #dcefff;
    background: rgba(88,196,221,.10);
    border: 1px solid rgba(88,196,221,.22);
}

.ability-card-summary {
    margin: 0 0 14px;
    color: #dce7ee;
    line-height: 1.4;
}

.ability-stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.ability-stat {
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 12px;
    background: rgba(255,255,255,.025);
    padding: 9px 10px;
}

.ability-stat span {
    display: block;
    color: #93a6b5;
    font-size: .76rem;
    margin-bottom: 3px;
}

.ability-stat strong {
    color: #ffffff;
    font-size: .95rem;
}

.ability-card-toggle {
    width: 100%;
    border: 1px solid rgba(88,196,221,.25);
    border-radius: 12px;
    background: rgba(88,196,221,.075);
    color: #8fd3ff;
    font-weight: 800;
    padding: 9px 11px;
    cursor: pointer;
}

.ability-card-toggle:hover {
    background: rgba(88,196,221,.13);
    border-color: rgba(88,196,221,.45);
}

.ability-card-details {
    padding: 16px;
    border-top: 1px solid rgba(155,107,255,.18);
    background: rgba(8, 11, 16, .35);
}

.ability-card-details h3 {
    margin: 0 0 10px;
    color: #9B6BFF;
    font-size: 1rem;
}

.ability-family-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ability-family-chips a {
    text-decoration: none;
    color: #8fd3ff;
    border: 1px solid rgba(88,196,221,.18);
    border-radius: 999px;
    padding: 4px 8px;
    background: rgba(88,196,221,.06);
    font-size: .86rem;
}

.ability-family-chips a:hover {
    border-color: rgba(88,196,221,.45);
    color: #c8f4ff;
}

.muted {
    color: #9fb3c2;
}

.ability-card.category-damage {
    border-color: rgba(255, 110, 110, .22);
}
.ability-card.category-damage .ability-category-pill {
    background: rgba(255, 110, 110, .10);
    border-color: rgba(255, 110, 110, .22);
}

.ability-card.category-damage-over-time {
    border-color: rgba(255, 170, 75, .22);
}
.ability-card.category-damage-over-time .ability-category-pill {
    background: rgba(255, 170, 75, .10);
    border-color: rgba(255, 170, 75, .22);
}

.ability-card.category-control {
    border-color: rgba(88,196,221,.28);
}
.ability-card.category-control .ability-category-pill {
    background: rgba(88,196,221,.12);
    border-color: rgba(88,196,221,.28);
}

.ability-card.category-defensive-buff {
    border-color: rgba(100, 220, 160, .22);
}
.ability-card.category-defensive-buff .ability-category-pill {
    background: rgba(100, 220, 160, .10);
    border-color: rgba(100, 220, 160, .22);
}

.ability-card.category-debuff,
.ability-card.category-sustain {
    border-color: rgba(155,107,255,.28);
}
.ability-card.category-debuff .ability-category-pill,
.ability-card.category-sustain .ability-category-pill {
    background: rgba(155,107,255,.12);
    border-color: rgba(155,107,255,.28);
}

.ability-card.category-utility {
    border-color: rgba(255, 210, 105, .22);
}
.ability-card.category-utility .ability-category-pill {
    background: rgba(255, 210, 105, .10);
    border-color: rgba(255, 210, 105, .22);
}

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

    .ability-stat-row {
        grid-template-columns: 1fr;
    }
}


.abilities-grid{display:block;margin-top:16px}
.ability-list-item{border-bottom:1px solid rgba(255,255,255,.08)}
.ability-row{display:grid;grid-template-columns:40px 40px 1.5fr 1fr 100px 80px;align-items:center;gap:12px;padding:12px}
.toggle{width:28px;height:28px;border-radius:50%;background:none;border:1px solid #3aaad0;color:#8fd3ff}
.aname{font-weight:700}
.acat{color:#9fb3c2}
.ability-detail{padding:0 12px 16px 12px}
.families{margin-top:10px;color:#cfdbe5}
@media(max-width:900px){
 .ability-row{grid-template-columns:32px 32px 1fr 80px 60px}
 .acat{display:none}
}


/* Creature Codex v4.15: refined compact abilities list */
.ability-list-shell {
    margin-top: 18px;
    border: 1px solid rgba(88,196,221,.16);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(10, 15, 20, .45);
}

.ability-list-head,
.ability-row {
    display: grid;
    grid-template-columns: 42px 42px minmax(220px, 1.8fr) minmax(150px, .9fr) 120px 120px;
    gap: 12px;
    align-items: center;
}

.ability-list-head {
    padding: 10px 14px;
    background: rgba(255,255,255,.045);
    color: #dcefff;
    font-size: .84rem;
    font-weight: 800;
    border-bottom: 1px solid rgba(88,196,221,.14);
}

.ability-head-ability {
    grid-column: 1 / span 3;
}

.ability-row {
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,.075);
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.ability-list-item:last-child .ability-row {
    border-bottom: 0;
}

.ability-list-item.open .ability-row {
    background: rgba(88,196,221,.065);
    border-bottom: 1px solid rgba(88,196,221,.13);
}

.ability-row:hover {
    background: rgba(88,196,221,.045);
}

.ability-toggle {
    width: 27px;
    height: 27px;
    border-radius: 999px;
    border: 1px solid rgba(88,196,221,.45);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #8fd3ff;
    font-weight: 900;
    background: rgba(88,196,221,.06);
}

.ability-row-icon .ability-icon {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    border-radius: 7px !important;
}

.ability-row-title {
    display: grid;
    gap: 2px;
}

.ability-row-title strong {
    color: #ffffff;
    font-size: 1rem;
}

.ability-row-title small {
    color: #94a8b7;
    font-size: .82rem;
    line-height: 1.25;
}

.ability-row-category {
    color: #b8dff0;
}

.ability-row-cost,
.ability-row-cooldown {
    color: #ffffff;
    font-weight: 800;
}

.ability-detail-panel {
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background:
        radial-gradient(circle at top right, rgba(155,107,255,.07), transparent 35%),
        rgba(8, 11, 16, .42);
}

.ability-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, .7fr);
    gap: 16px;
}

.ability-rank-card,
.ability-side-card {
    border: 1px solid rgba(155,107,255,.22);
    border-radius: 14px;
    background: rgba(255,255,255,.025);
    padding: 14px;
}

.ability-rank-card h3,
.ability-side-card h3 {
    margin: 0 0 10px;
    color: #9B6BFF;
    font-size: 1rem;
}

.ability-rank-table {
    width: 100%;
    border-collapse: collapse;
}

.ability-rank-table th,
.ability-rank-table td {
    border-bottom: 1px solid rgba(255,255,255,.075);
    padding: 9px 10px;
    vertical-align: top;
}

.ability-rank-table tr:last-child td {
    border-bottom: 0;
}

.ability-rank-table th {
    color: #dcefff;
    background: rgba(255,255,255,.035);
    text-align: left;
    font-size: .84rem;
}

.rank-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 24px;
    border-radius: 999px;
    background: rgba(88,196,221,.10);
    color: #9ee8f8;
    border: 1px solid rgba(88,196,221,.22);
    font-weight: 800;
}

.ability-used-count {
    color: #ffffff;
    font-weight: 800;
    margin-bottom: 10px;
}

.ability-family-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ability-family-chips a {
    color: #8fd3ff;
    text-decoration: none;
    border: 1px solid rgba(88,196,221,.18);
    border-radius: 999px;
    padding: 4px 8px;
    background: rgba(88,196,221,.055);
    font-size: .84rem;
}

.ability-family-chips a:hover {
    border-color: rgba(88,196,221,.45);
    color: #c8f4ff;
}

@media (max-width: 900px) {
    .ability-list-head {
        display: none;
    }

    .ability-row {
        grid-template-columns: 34px 38px 1fr auto;
    }

    .ability-row-category {
        grid-column: 3;
        color: #9fb3c2;
        font-size: .86rem;
    }

    .ability-row-cost,
    .ability-row-cooldown {
        font-size: .86rem;
    }

    .ability-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Creature Codex v4.20: compact ability drawer + Wild Creatures page */
.ability-list-head,
.ability-row {
    grid-template-columns: 34px 42px minmax(240px, 1.8fr) minmax(150px, .9fr) 110px 110px;
}

.ability-toggle {
    border: 0;
    background: transparent;
    color: #8fd3ff;
    font-size: 1.35rem;
    line-height: 1;
    transition: transform .15s ease;
}

.ability-list-item.open .ability-toggle {
    transform: none;
}

.ability-detail-panel {
    padding: 10px 16px 16px 92px;
    border-left: 3px solid rgba(88,196,221,.35);
    background: rgba(8, 11, 16, .32);
}

.ability-detail-grid {
    display: block;
}

.ability-rank-card {
    max-width: 900px;
    border-color: rgba(88,196,221,.16);
    background: rgba(255,255,255,.018);
    padding: 12px;
}

.ability-rank-card h3 {
    color: #b8dff0;
    font-size: .92rem;
    margin-bottom: 8px;
}

.ability-rank-table th,
.ability-rank-table td {
    padding: 7px 9px;
    vertical-align: middle;
}

.ability-rank-table th:first-child,
.ability-rank-table td:first-child {
    width: 72px;
}

.ability-rank-table th:nth-child(2),
.ability-rank-table td:nth-child(2) {
    width: 150px;
}

.wild-filters {
    grid-template-columns: minmax(220px, 2fr) minmax(160px, 1fr) 90px minmax(140px, 1fr) minmax(140px, 1fr) auto;
}

.wild-help-card {
    border: 1px solid rgba(88,196,221,.16);
    background: rgba(88,196,221,.055);
    border-radius: 12px;
    color: #c8d4dd;
    padding: 12px 14px;
    margin: 0 0 16px;
    font-size: .94rem;
}

.wild-table {
    min-width: 1500px;
}

.wild-table th:nth-child(1) { width: 210px; }
.wild-table th:nth-child(2) { width: 360px; }
.wild-table th:nth-child(3) { width: 260px; }
.wild-table th:nth-child(4) { width: 88px; }
.wild-table th:nth-child(5) { width: 100px; }
.wild-table th:nth-child(6) { width: 120px; }
.wild-table th:nth-child(7) { width: 220px; }

.wild-creature-name strong {
    color: #fff;
}

.wild-special-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.wild-special-chip {
    height: auto;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(88,196,221,.20);
    border-radius: 999px;
    padding: 4px 8px 4px 5px;
    background: rgba(88,196,221,.055);
    color: #dbe7ef;
    font-size: .82rem;
    font-weight: 700;
    white-space: nowrap;
}

.wild-special-chip:hover {
    border-color: rgba(88,196,221,.48);
    background: rgba(88,196,221,.11);
}

.wild-special-chip strong {
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(155,107,255,.18);
    color: #dcccff;
    font-size: .75rem;
}

.wild-ability-icon {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    object-fit: cover;
}

.wild-ability-icon-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #8fd3ff;
}

.wild-resource-list {
    display: grid;
    gap: 3px;
    color: #c8d4dd;
}

.wild-resource-list strong {
    color: #f3f6f8;
}

.wild-location-cell,
.wild-notes-cell {
    color: #c8d4dd;
    line-height: 1.35;
}

@media (max-width: 900px) {
    .ability-detail-panel {
        padding: 10px 12px 14px 12px;
        border-left: 0;
    }

    .wild-filters {
        grid-template-columns: 1fr 1fr;
    }
}

/* Creature Codex v4.21: restore compact abilities + refine Wild Creatures */
.ability-list-shell {
    border-color: rgba(88,196,221,.18);
    background: rgba(8, 12, 16, .52);
}
.ability-list-head,
.ability-row {
    grid-template-columns: 34px 44px minmax(260px, 1.9fr) minmax(150px, .9fr) 110px 110px !important;
    gap: 10px;
}
.ability-row {
    min-height: 48px;
    padding: 8px 14px !important;
}
.ability-row-title strong { line-height: 1.1; }
.ability-row-title small { line-height: 1.15; }
.ability-toggle {
    width: 24px !important;
    height: 24px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(88,196,221,.36) !important;
    background: rgba(88,196,221,.05) !important;
    font-size: 1rem !important;
}
.ability-list-item.open .ability-toggle { background: rgba(88,196,221,.12) !important; }
.ability-detail-panel {
    margin: 0 !important;
    padding: 10px 16px 14px 98px !important;
    border: 0 !important;
    border-left: 3px solid rgba(88,196,221,.34) !important;
    background: linear-gradient(90deg, rgba(88,196,221,.055), rgba(8,11,16,.26) 35%, rgba(8,11,16,.10)) !important;
}
.ability-rank-card {
    max-width: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 0 !important;
}
.ability-rank-card h3 {
    color: #9B6BFF !important;
    font-size: .92rem !important;
    margin: 0 0 7px !important;
}
.ability-rank-table th,
.ability-rank-table td {
    padding: 6px 10px !important;
}
.ability-rank-table th {
    background: rgba(255,255,255,.035) !important;
}
.ability-rank-table th:first-child,
.ability-rank-table td:first-child { width: 64px !important; }
.ability-rank-table th:nth-child(2),
.ability-rank-table td:nth-child(2) { width: 160px !important; }

.wild-filters {
    align-items: end;
    gap: 12px;
}
.wild-help-card {
    display: none;
}
.wild-table-wrapper {
    border-radius: 14px;
    border: 1px solid rgba(88,196,221,.16);
    overflow: auto;
}
.wild-table {
    min-width: 1180px !important;
    border-collapse: separate;
    border-spacing: 0;
}
.wild-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(22,31,42,.98);
}
.wild-table th:nth-child(1) { width: 220px; }
.wild-table th:nth-child(2) { width: 390px; }
.wild-table th:nth-child(3) { width: 250px; }
.wild-table th:nth-child(4) { width: 80px; }
.wild-table th:nth-child(5) { width: 100px; }
.wild-table th:nth-child(6) { width: 250px; }
.wild-table th:nth-child(7) { width: 90px; }
.wild-table td {
    padding-top: 10px;
    padding-bottom: 10px;
    vertical-align: top;
}
.wild-main-row:hover td {
    background: rgba(88,196,221,.035);
}
.wild-special-chip {
    min-height: 25px;
    padding: 3px 8px 3px 4px;
    font-size: .8rem;
    border-color: rgba(88,196,221,.18);
    background: rgba(88,196,221,.045);
}
.wild-special-chip strong {
    min-width: 17px;
    height: 17px;
    font-size: .72rem;
}
.wild-ability-icon {
    width: 18px;
    height: 18px;
}
.wild-location-cell,
.wild-notes-cell {
    font-size: .88rem;
}
.wild-resource-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.wild-resource-pills span {
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.035);
    border-radius: 999px;
    padding: 3px 7px;
    font-size: .78rem;
    color: #cfdbe5;
    white-space: nowrap;
}
.wild-resource-pills strong {
    color: #ffffff;
}
.badge-positive {
    background: rgba(88,196,221,.16) !important;
    color: #dffaff !important;
}
.wild-detail-toggle {
    border: 1px solid rgba(88,196,221,.22);
    background: rgba(88,196,221,.06);
    color: #b8eaff;
    border-radius: 999px;
    padding: 5px 10px;
    font-weight: 800;
    font-size: .78rem;
    cursor: pointer;
}
.wild-detail-toggle:hover {
    border-color: rgba(88,196,221,.5);
    background: rgba(88,196,221,.12);
}
.wild-detail-row td {
    padding: 0 14px 14px 54px !important;
    background: rgba(8,11,16,.38);
    border-bottom: 1px solid rgba(88,196,221,.10);
}
.wild-detail-drawer {
    display: grid;
    grid-template-columns: minmax(100px,160px) minmax(100px,160px) minmax(260px,1fr);
    gap: 12px;
    border-left: 3px solid rgba(88,196,221,.32);
    padding: 10px 12px;
    background: rgba(255,255,255,.025);
}
.wild-detail-drawer div {
    display: grid;
    gap: 4px;
}
.wild-detail-drawer strong {
    color: #9B6BFF;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.wild-detail-drawer span {
    color: #dbe7ef;
    font-size: .88rem;
    line-height: 1.35;
}
@media (max-width: 900px) {
    .ability-list-head,
    .ability-row { grid-template-columns: 30px 38px 1fr auto !important; }
    .ability-detail-panel { padding: 10px 12px 14px 52px !important; }
    .wild-detail-drawer { grid-template-columns: 1fr; }
}


/* Creature Codex v4.22: Wild Creatures teaches-column polish */
.wild-table {
    min-width: 1040px !important;
}
.wild-table th:nth-child(1) { width: 240px !important; }
.wild-table th:nth-child(2) { width: 430px !important; }
.wild-table th:nth-child(3) { width: 260px !important; }
.wild-table th:nth-child(4) { width: 84px !important; }
.wild-table th:nth-child(5) { width: 110px !important; }
.wild-table th:nth-child(6) { width: 90px !important; }
.wild-special-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(150px, max-content));
    gap: 6px 8px !important;
    align-items: start;
}
.wild-special-chip {
    min-height: 30px !important;
    height: 30px !important;
    display: inline-grid !important;
    grid-template-columns: 22px minmax(0, 1fr) 22px;
    align-items: center;
    gap: 7px !important;
    max-width: 185px;
    padding: 3px 6px 3px 4px !important;
    border-radius: 9px !important;
    border-color: rgba(88,196,221,.16) !important;
    background: rgba(12,28,36,.58) !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.025);
    text-align: left;
}
.wild-special-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #e6f2f7;
    font-size: .78rem;
    line-height: 1;
}
.wild-special-chip strong {
    justify-self: end;
    min-width: 20px !important;
    width: 20px !important;
    height: 20px !important;
    font-size: .72rem !important;
    color: #f0e9ff !important;
    background: rgba(155,107,255,.24) !important;
    border: 1px solid rgba(155,107,255,.28);
}
.wild-ability-icon {
    width: 22px !important;
    height: 22px !important;
    border-radius: 6px !important;
}
.wild-resource-pills {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 5px;
}
.wild-detail-drawer {
    grid-template-columns: minmax(110px,150px) minmax(110px,150px) minmax(240px,360px) minmax(260px,1fr) !important;
}
.wild-detail-notes {
    min-width: 0;
}
@media (max-width: 900px) {
    .wild-special-list { grid-template-columns: repeat(auto-fit, minmax(140px, max-content)); }
    .wild-detail-drawer { grid-template-columns: 1fr !important; }
}

/* Wild Creatures typography and density polish */
.wild-filters label,
.wild-filters .filter-group label {
    font-size: .78rem !important;
    color: #d7edf7 !important;
    font-weight: 700 !important;
}
.wild-filters input,
.wild-filters select {
    min-height: 38px !important;
    font-size: .88rem !important;
}
.wild-table th {
    color: #e6f7ff !important;
    font-size: .88rem !important;
    font-weight: 900 !important;
    letter-spacing: .005em;
    padding-top: 11px !important;
    padding-bottom: 11px !important;
}
.wild-table td {
    padding-top: 9px !important;
    padding-bottom: 9px !important;
    font-size: .88rem !important;
}
.wild-creature-name strong {
    color: #ffffff !important;
    font-size: .95rem !important;
    font-weight: 850 !important;
    line-height: 1.15 !important;
}
.wild-special-list {
    grid-template-columns: repeat(auto-fit, minmax(132px, max-content)) !important;
    gap: 5px 7px !important;
}
.wild-special-chip {
    min-height: 26px !important;
    height: 26px !important;
    grid-template-columns: 20px minmax(0, 1fr) 18px !important;
    gap: 6px !important;
    max-width: 165px !important;
    padding: 2px 5px 2px 3px !important;
    border-radius: 8px !important;
    border-color: rgba(88,196,221,.12) !important;
    background: rgba(10, 24, 31, .48) !important;
    box-shadow: none !important;
}
.wild-special-chip:hover {
    border-color: rgba(88,196,221,.30) !important;
    background: rgba(12, 32, 42, .62) !important;
}
.wild-special-chip span {
    font-size: .76rem !important;
    font-weight: 700 !important;
    color: rgba(235, 247, 252, .92) !important;
}
.wild-special-chip strong {
    min-width: 18px !important;
    width: 18px !important;
    height: 18px !important;
    font-size: .68rem !important;
    background: rgba(155,107,255,.18) !important;
    border-color: rgba(155,107,255,.20) !important;
}
.wild-ability-icon {
    width: 20px !important;
    height: 20px !important;
    border-radius: 5px !important;
    opacity: .92 !important;
}
.wild-detail-toggle {
    font-size: .78rem !important;
    padding: 6px 12px !important;
}


/* Creature Codex v4.24: Abilities page safe restore
   Reverts the accidental v4.23 layout disruption while preserving the compact drawer. */
.ability-list-head,
.ability-row {
    grid-template-columns: 34px 44px minmax(260px, 1.9fr) minmax(150px, .9fr) 110px 110px !important;
    gap: 10px !important;
    align-items: center !important;
}
.ability-row {
    min-height: 52px !important;
    padding: 9px 14px !important;
}
.ability-row-icon .ability-icon {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
}
.ability-row-title {
    display: grid !important;
    gap: 1px !important;
    align-content: center !important;
}
.ability-row-title strong {
    font-size: 1.02rem !important;
    line-height: 1.08 !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    letter-spacing: 0 !important;
}
.ability-row-title small {
    font-size: .80rem !important;
    line-height: 1.15 !important;
    color: rgba(191, 221, 238, .74) !important;
    font-weight: 500 !important;
}
.ability-row-category {
    color: #b8dff0 !important;
    font-size: .84rem !important;
    font-weight: 750 !important;
}
.ability-row-cost,
.ability-row-cooldown {
    color: #ffffff !important;
    font-size: .88rem !important;
    font-weight: 800 !important;
}
.ability-toggle {
    width: 24px !important;
    height: 24px !important;
    border-radius: 8px !important;
    font-size: .86rem !important;
}
@media (max-width: 900px) {
    .ability-list-head,
    .ability-row { grid-template-columns: 30px 38px 1fr auto !important; }
}

/* Creature Codex v4.25: subtle colour-system polish */
:root {
    --codex-bg: #101418;
    --codex-panel: rgba(13, 17, 22, .92);
    --codex-panel-2: rgba(22, 31, 42, .82);
    --codex-line: rgba(88, 196, 221, .13);
    --codex-line-soft: rgba(255, 255, 255, .07);
    --codex-cyan: #8BE9FD;
    --codex-blue: #60A5FA;
    --codex-violet: #A78BFA;
    --codex-amber: #F6C453;
}

body {
    background:
        radial-gradient(circle at top left, rgba(88,196,221,.055), transparent 34rem),
        radial-gradient(circle at top right, rgba(167,139,250,.045), transparent 32rem),
        #101418;
}

h1 {
    background: linear-gradient(90deg, var(--codex-cyan), var(--codex-blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: .01em;
}

.filters,
.table-wrapper,
.detail-card,
.ability-list-shell,
.wild-table-wrapper,
.wild-help-card,
.result-count {
    border-color: var(--codex-line) !important;
}

th,
td,
.ability-row,
.ability-list-head,
.wild-table th,
.wild-detail-row td,
.ability-rank-table th,
.ability-rank-table td {
    border-color: var(--codex-line-soft) !important;
}

button,
.wild-detail-toggle,
.ability-toggle {
    border-color: rgba(88,196,221,.22) !important;
}

button:hover,
.wild-detail-toggle:hover,
.ability-row:hover,
.wild-main-row:hover td {
    background-color: rgba(88,196,221,.075) !important;
}

input:focus,
select:focus,
button:focus-visible,
.ability-row:focus-visible,
.wild-special-chip:focus-visible {
    outline: 2px solid rgba(167,139,250,.55);
    outline-offset: 2px;
}

.badge-positive,
.rank-pill,
.wild-special-chip strong {
    background: rgba(167,139,250,.18) !important;
    border-color: rgba(167,139,250,.22) !important;
    color: #efeaff !important;
}

/* Subtle category colour coding on the Abilities page */
.ability-row-category {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border-radius: 999px;
    padding: 3px 9px;
    border: 1px solid rgba(88,196,221,.12);
    background: rgba(88,196,221,.045);
    line-height: 1.1;
}

.ability-category-damage {
    color: #ffd2d2 !important;
    border-color: rgba(248,113,113,.18) !important;
    background: rgba(248,113,113,.08) !important;
}
.ability-category-damage-over-time {
    color: #f6d1ff !important;
    border-color: rgba(217,70,239,.18) !important;
    background: rgba(217,70,239,.075) !important;
}
.ability-category-control {
    color: #ffe6b4 !important;
    border-color: rgba(246,196,83,.20) !important;
    background: rgba(246,196,83,.08) !important;
}
.ability-category-defensive-buff {
    color: #c8f7dc !important;
    border-color: rgba(74,222,128,.18) !important;
    background: rgba(74,222,128,.075) !important;
}
.ability-category-debuff,
.ability-category-sustain {
    color: #e8ddff !important;
    border-color: rgba(167,139,250,.22) !important;
    background: rgba(167,139,250,.09) !important;
}
.ability-category-utility {
    color: #c8f4ff !important;
    border-color: rgba(88,196,221,.18) !important;
    background: rgba(88,196,221,.075) !important;
}

/* Keep colour treatment subtle on smaller screens. */
@media (max-width: 900px) {
    h1 { font-size: clamp(2rem, 12vw, 3.2rem); }
    .ability-row-category { padding: 0; border: 0; background: transparent !important; }
}

/* Creature Codex v4.26: horizontal mutation pathway beta */
.mutation-pathway-shell {
    margin: 16px 0 18px;
}

.mutation-pathway-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #f3fbff;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .01em;
}

.mutation-pathway-title span {
    border: 1px solid rgba(167, 139, 250, .35);
    background: rgba(167, 139, 250, .10);
    color: #d7ccff;
    border-radius: 999px;
    padding: 2px 7px;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.pathway-panel {
    margin: 16px 0;
    padding: 16px;
    border: 1px solid rgba(139, 233, 253, .16);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(13, 20, 29, .96), rgba(8, 12, 18, .96));
    overflow-x: auto;
}

.mutation-pathway {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    min-width: max-content;
}

.pathway-node {
    display: flex;
    align-items: center;
    gap: 18px;
}

.pathway-step {
    width: 190px;
    min-height: 285px;
    border: 1px solid rgba(139, 233, 253, .16);
    border-radius: 16px;
    background: rgba(17, 25, 34, .82);
    padding: 12px;
    text-align: center;
    box-shadow: 0 10px 26px rgba(0,0,0,.18);
}

.pathway-step.current-step {
    outline: 2px solid rgba(139, 233, 253, .55);
    background: rgba(23, 45, 61, .78);
}

.pathway-image-placeholder {
    height: 118px;
    border: 1px dashed rgba(139, 233, 253, .26);
    border-radius: 14px;
    background:
        radial-gradient(circle at 50% 28%, rgba(139, 233, 253, .10), transparent 38%),
        rgba(8, 12, 18, .72);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: rgba(220, 239, 255, .72);
    margin-bottom: 10px;
}

.pathway-image-placeholder span {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    opacity: .75;
}

.pathway-image-placeholder strong {
    max-width: 150px;
    color: rgba(255,255,255,.88);
    font-size: .86rem;
    line-height: 1.15;
}

.pathway-stage {
    font-size: .68rem;
    color: #aebbc6;
    text-transform: uppercase;
    letter-spacing: .10em;
    margin: 0 0 5px;
}

.pathway-result {
    font-size: 1.02rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.18;
    min-height: 2.35em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pathway-recipe {
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid rgba(139, 233, 253, .12);
}

.pathway-recipe-title {
    color: #aebbc6;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 8px;
}

.pathway-lyase {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid rgba(167, 139, 250, .28);
    background: rgba(167, 139, 250, .10);
    border-radius: 999px;
    padding: 5px 9px;
    color: #efeaff;
    font-size: .78rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.pathway-iso-row {
    display: grid;
    gap: 6px;
    color: #dbe7ef;
    font-size: .76rem;
}

.pathway-iso-row span {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.pathway-final-badge {
    display: inline-flex;
    margin-top: 12px;
    border: 1px solid rgba(246, 196, 83, .28);
    background: rgba(246, 196, 83, .08);
    color: #f6d88c;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: .74rem;
    font-weight: 800;
}

.pathway-arrow {
    color: #8be9fd;
    font-size: 2rem;
    font-weight: 900;
    opacity: .76;
    padding-bottom: 52px;
}

@media (max-width: 720px) {
    .pathway-panel {
        padding: 12px;
    }

    .pathway-step {
        width: 168px;
        min-height: 270px;
    }

    .pathway-image-placeholder {
        height: 104px;
    }

    .pathway-node {
        gap: 12px;
    }
}


/* v4.28 mutation journey simplification */
.mutation-pathway{
 display:flex;
 align-items:center;
 gap:32px;
 width:100%;
 overflow-x:auto;
 padding:10px 0;
}
.pathway-step{
 width:280px;
 min-width:280px;
 padding:18px;
}
.pathway-image-placeholder{
 height:180px;
 margin-bottom:14px;
}
.pathway-result{
 font-size:1.25rem;
 min-height:auto;
}
.pathway-arrow{
 font-size:2.2rem;
 opacity:.9;
}
.pathway-recipe,.pathway-requirements,.pathway-recipe-title{
 display:none !important;
}

/* v4.29 mutation showcase spacing polish */
.mutation-pathway{
    display:flex !important;
    align-items:center !important;
    width:100% !important;
    min-width:0 !important;
    gap:0 !important;
    overflow-x:auto !important;
    padding:8px 0 14px !important;
}

.pathway-node{
    display:flex !important;
    align-items:center !important;
    flex:1 1 0 !important;
    min-width:0 !important;
    gap:0 !important;
}

.pathway-node:last-child{
    flex:0 0 auto !important;
}

.pathway-step{
    width:300px !important;
    min-width:300px !important;
    min-height:0 !important;
    padding:18px !important;
    border-color:rgba(139,233,253,.18) !important;
    background:rgba(17,25,34,.78) !important;
}

.pathway-step.current-step{
    outline:none !important;
    border-color:rgba(139,233,253,.18) !important;
    background:rgba(17,25,34,.78) !important;
}

.pathway-image-placeholder{
    height:190px !important;
    margin-bottom:16px !important;
}

.pathway-result{
    font-size:1.28rem !important;
    min-height:auto !important;
    color:#69e6ff !important;
}

.pathway-arrow{
    flex:1 1 auto !important;
    min-width:120px !important;
    align-self:stretch !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    position:relative !important;
    padding:0 !important;
    margin:0 18px !important;
    color:#8be9fd !important;
    font-size:2rem !important;
    opacity:1 !important;
    text-shadow:0 0 18px rgba(139,233,253,.35) !important;
}

.pathway-arrow::before,
.pathway-arrow::after{
    content:"";
    height:1px;
    flex:1 1 auto;
    max-width:120px;
    background:linear-gradient(90deg, transparent, rgba(139,233,253,.55), transparent);
}

.pathway-arrow::before{ margin-right:14px; }
.pathway-arrow::after{ margin-left:14px; }

.pathway-panel{
    padding:18px !important;
}

@media (max-width: 1050px){
    .mutation-pathway{
        min-width:max-content !important;
    }
    .pathway-node{
        flex:0 0 auto !important;
    }
    .pathway-arrow{
        min-width:96px !important;
    }
}

@media (max-width: 720px){
    .pathway-step{
        width:240px !important;
        min-width:240px !important;
        padding:14px !important;
    }
    .pathway-image-placeholder{
        height:150px !important;
    }
    .pathway-arrow{
        min-width:70px !important;
        margin:0 12px !important;
        font-size:1.6rem !important;
    }
    .pathway-arrow::before,
    .pathway-arrow::after{
        max-width:48px;
    }
}

/* v4.31 mutation research + two-stage pathway polish */
.mutation-pathway.two-stage{
    justify-content:center !important;
    gap:0 !important;
    overflow-x:visible !important;
    max-width:940px !important;
    margin:0 auto !important;
}

.mutation-pathway.two-stage .pathway-node{
    flex:0 0 auto !important;
    max-width:none !important;
}

.mutation-pathway.two-stage .pathway-node:last-child{
    flex:0 0 auto !important;
}

.mutation-pathway.two-stage .pathway-arrow{
    flex:0 0 190px !important;
    min-width:190px !important;
    margin:0 24px !important;
}

.mutation-pathway.two-stage .pathway-arrow::before,
.mutation-pathway.two-stage .pathway-arrow::after{
    max-width:72px !important;
}

.mutation-pathway.three-stage{
    justify-content:space-between !important;
}

.mutation-pathway.long-stage{
    min-width:max-content !important;
}

@media (max-width: 900px){
    .mutation-pathway.two-stage{
        min-width:max-content !important;
        max-width:none !important;
        margin:0 !important;
        overflow-x:auto !important;
        justify-content:flex-start !important;
    }
    .mutation-pathway.two-stage .pathway-node,
    .mutation-pathway.two-stage .pathway-node:last-child{
        flex:0 0 auto !important;
        max-width:none !important;
    }
    .mutation-pathway.two-stage .pathway-arrow{
        min-width:90px !important;
        margin:0 16px !important;
    }
}

/* v4.32: first creature render experiment */
.creature-render{
    display:block;
    width:100%;
    height:100%;
    object-fit:contain;
}
.pathway-render{
    height:190px !important;
    margin-bottom:16px !important;
    border:1px dashed rgba(139,233,253,.26);
    border-radius:16px;
    background:
        radial-gradient(circle at 50% 28%, rgba(139, 233, 253, .08), transparent 42%),
        rgba(8, 12, 18, .72);
    padding:10px;
}
.pet-hero-render-wrap{
    height:300px;
    border:1px solid rgba(139,233,253,.16);
    border-radius:18px;
    background:
        radial-gradient(circle at 50% 30%, rgba(139,233,253,.10), transparent 42%),
        rgba(8,12,18,.72);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:14px;
    overflow:hidden;
}
.pet-hero-render{
    max-width:100%;
    max-height:100%;
    filter: drop-shadow(0 18px 24px rgba(0,0,0,.42));
}
@media (max-width:720px){
    .pathway-render{ height:150px !important; }
    .pet-hero-render-wrap{ height:240px; }
}

/* v4.34: GLB model viewer inside Creature Profile */
.pet-model-wrap{
    min-height:360px;
    border:1px solid rgba(139,233,253,.16);
    border-radius:18px;
    background:
        radial-gradient(circle at 50% 32%, rgba(139,233,253,.12), transparent 45%),
        rgba(8,12,18,.72);
    display:flex;
    flex-direction:column;
    align-items:stretch;
    justify-content:center;
    overflow:hidden;
    position:relative;
}
.pet-model-viewer{
    display:block;
    width:100%;
    height:340px;
    background:transparent;
    --poster-color: transparent;
}
.model-hint{
    position:absolute;
    left:50%;
    bottom:12px;
    transform:translateX(-50%);
    font-size:.78rem;
    letter-spacing:.04em;
    color:rgba(220,245,255,.62);
    background:rgba(3,8,13,.62);
    border:1px solid rgba(139,233,253,.14);
    border-radius:999px;
    padding:6px 10px;
    pointer-events:none;
}
@media (max-width:720px){
    .pet-model-wrap{ min-height:280px; }
    .pet-model-viewer{ height:270px; }
    .model-hint{ font-size:.72rem; }
}
