:root {
  color-scheme: dark;
  --paper: #0b1b25;
  --ink: #eef8f5;
  --muted: #b2cbc8;
  --surface: #132a33;
  --surface-raised: #203c44;
  --surface-deep: #102631;
  --line: #395961;
  --rim: #86744f;
  --gold: #ffdb92;
  --mint: #9be8d1;
  --wiki-cta: linear-gradient(136deg,#ffe6a6,#eab96c 82%);
  --archive-scene: url(archive-hero-wide.webp);
}

body {
  background: radial-gradient(ellipse 70% 560px at 72% -45px,#2b414e,transparent),
    radial-gradient(ellipse 75% 600px at 0 12%,#1b3c40,transparent),var(--paper);
}
.wrap, #main:has(#catalog[data-section=cards]) { width: min(1320px,100% - 54px) }
main { padding-block: 23px 58px }
body > .masthead {
  position: sticky; top: 0; z-index: 4; border-color: #75664c;
  background: #11242ef7; box-shadow: 0 3px 19px #0a151ab2;
}
.header-row { min-height: 64px }
.brand { gap: 10px }
.brand img { width: 62px }
.brand span { color: var(--gold); font: 900 15px/1.15 system-ui,Tahoma,sans-serif; border-inline-start-color: #73857b }
.brand small { display: block; margin-top: 4px; color: var(--mint); font: 700 11px/1.15 Tahoma,sans-serif }
.top-actions :is(select,button,a) {
  display: inline-flex; align-items: center; gap: 5px; min-height: 37px; padding: 4px 10px;
  color: #eef8f5; border: 1px solid #4f6d70; border-radius: 7px; background: #213942;
  font-size: 12px; font-weight: 700; white-space: nowrap; text-decoration: none;
}
.top-actions :is(a,button):hover,.top-actions button[aria-pressed=true] { border-color: #c99d63; color: var(--gold) }
.top-actions { flex-wrap: wrap; justify-content: flex-end }
#wiki-language { cursor: pointer; max-width: 10rem }
.section-tabs { gap: 5px; scrollbar-color: #547375 transparent }
.section-tabs a { padding: 8px 13px 10px; color: #d4e4e1; border-radius: 8px 8px 0 0; font-size: 14px }
.section-tabs a.active { color: #ffe4a4; background: linear-gradient(#d2a86435,#2648487d) }
.section-tabs a.active::after { box-shadow: 0 -1px 8px #d8b66c8c }
#items { scroll-margin-top: 115px }

.hero {
  min-height: clamp(400px,41vw,550px); border: 1px solid var(--rim);
  border-radius: 25px 25px 9px 25px; background: #142935; color: #f5fbf7;
  box-shadow: 0 14px 36px #060e18ae;
}
.hero-picture, .hero-picture .hero-art, .wiki-hero-lights { position: absolute; inset: 0; width: 100%; height: 100% }
.hero-picture { z-index: -3 }
.hero-picture .hero-art { object-fit: cover; object-position: 60% 48% }
.hero::before {
  display: block; background: linear-gradient(90deg,#0b202ef6 2%,#0c222ebe 31%,#0b202e3b 50%,transparent 67%),
    linear-gradient(0deg,#0b1b26cd,transparent 27%);
  z-index: -2;
}
.hero-content { width: min(620px,100%); padding: clamp(25px,5vw,65px) }
.hero h1 {
  color: #f6f6df; font-size: clamp(35px,4.9vw,69px); line-height: 1.09;
  letter-spacing: -.033em; text-shadow: 0 2px 16px #080f19;
}
.hero h1 span {
  color: var(--gold); font: inherit; text-shadow: 0 2px #74512e,0 0 24px #f6b46b38;
}
.hero p { color: #d9f3ec; margin-top: 13px; max-width: 350px; font-size: clamp(14px,1.28vw,17px); text-shadow: 0 2px 8px #050c11 }
.hero-search {
  background: #091d2bf2; border: 1px solid #708578; border-radius: 12px; padding: 6px;
  box-shadow: 0 8px 21px #0b101978; margin-top: 22px;
}
.hero-search select { background: #25454a; color: var(--ink) }
.hero-search button { color: #34220f; background: var(--wiki-cta); box-shadow: inset 0 1px #fff3ca }
.hero-search input::placeholder, .search-row input::placeholder, .guide-search input::placeholder { color: #a8c4c5 }
.hero .guide-home-actions { gap: 9px; margin-top: 13px }
.hero .guide-home-link {
  border: 1px solid #81a9a0; color: #d6f5ea; background: #15363be8;
  min-height: 42px; padding-inline: 12px; border-radius: 8px;
}
.hero .guide-home-link:first-child { color: #402b16; background: var(--wiki-cta); border-color: #f0ce90 }
.hero .guide-home-link:hover { color: #1a2d2b; background: #e7ecca; border-color: #ffe1a6 }
.wiki-hero-lights { z-index: -1; pointer-events: none; overflow: hidden }
.wiki-hero-lights::before {
  content: ""; position: absolute; inset: -20px 0 0;
  background: radial-gradient(circle at 11% 24%,#ffedb8 0 1px,transparent 4px),
    radial-gradient(circle at 25% 57%,#ffdfab 0 1px,transparent 5px),
    radial-gradient(circle at 41% 76%,#b4fde6 0 1px,transparent 4px),
    radial-gradient(circle at 62% 20%,#efe0fc 0 1.5px,transparent 5px),
    radial-gradient(circle at 77% 43%,#a1faf2 0 1.5px,transparent 6px),
    radial-gradient(circle at 87% 64%,#ffe0a9 0 1px,transparent 5px),
    radial-gradient(circle at 96% 79%,#ffe0bc 0 1px,transparent 6px);
  animation: wiki-stars 6.6s ease-in-out infinite alternate;
}
.wiki-hero-lights::after {
  content: ""; position: absolute; top: 19%; left: 16%; width: 160px; height: 2px; opacity: 0;
  background: linear-gradient(90deg,transparent,#b3ffec80 66%,#fff7d2); border-radius: 50%;
  box-shadow: 0 0 10px #a9f9ebaa; animation: wiki-comet 8s ease-out infinite;
}
@keyframes wiki-stars { from { transform: translateY(14px); opacity: .3 } to { transform: translateY(-18px); opacity: .9 } }
@keyframes wiki-comet {
  0%,15% { transform: translate(-110%,0) rotate(-6deg); opacity: 0 }
  27% { opacity: .9 }
  49%,100% { transform: translate(48vw,28px) rotate(7deg); opacity: 0 }
}

[data-category=items], #catalog[data-section=items] { --glow:#f6b28c; --section-art:url(archive-items.webp) }
[data-category=monsters], #catalog[data-section=monsters] { --glow:#93e6ae; --section-art:url(archive-monsters.webp) }
[data-category=cards], #catalog[data-section=cards] { --glow:#d9aeff; --section-art:url(archive-cards.webp) }
[data-category=maps], #catalog[data-section=maps] { --glow:#8ad5ff; --section-art:url(archive-maps.webp) }
[data-category=skills], #catalog[data-section=skills] { --glow:#adbbff; --section-art:url(archive-skills.webp) }
[data-category=pets], #catalog[data-section=pets] { --glow:#ffd698; --section-art:url(archive-pets.webp) }
[data-category=buffs], #catalog[data-section=buffs] { --glow:#9bf1ce; --section-art:url(archive-buffs.webp) }
[data-category=progression], #catalog[data-section=progression] { --glow:#ffbf85; --section-art:url(archive-progression.webp) }

.catalog-overview { margin: 29px 0 0 }
.overview-heading { align-items: center; margin-bottom: 14px }
.overview-heading h2 {
  color: #f7e7bc; display: flex; align-items: center; gap: 12px; font-size: clamp(22px,2.65vw,31px);
}
.overview-heading h2::before {
  content: ""; height: .53em; width: .53em; transform: rotate(45deg);
  background: #e8c382; box-shadow: 0 0 13px #f3bf7c83; border: 1px solid #ffdf9b;
}
.stats-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px }
#stats .stat-card {
  grid-column: auto; isolation: isolate; position: relative; display: grid; align-items: stretch;
  grid-template-rows: auto 1fr; gap: 0; min-height: 0; padding: 0; overflow: hidden;
  border-radius: 16px 16px 7px 16px; border: 1px solid color-mix(in srgb,var(--glow) 42%,#355259);
  color: var(--ink); background: #142b35; box-shadow: 0 6px 13px #07151ec9;
}
#stats .stat-card:hover, #stats .stat-card:focus-visible { border-color: var(--glow); background: #1f3a41 }
.stat-art {
  display: block; overflow: hidden; aspect-ratio: 1.65; background: #254047;
  position: relative; border-bottom: 1px solid color-mix(in srgb,var(--glow) 28%,#285459);
}
.stat-art img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 260ms ease }
.stat-card:hover img { transform: scale(1.055) }
.stat-art::after {
  content: ""; position: absolute; inset: auto 0 0; height: 30%; pointer-events: none;
  background: linear-gradient(0deg,#101d3294,transparent);
}
.stat-caption {
  display: flex; align-items: center; gap: 7px; min-height: 71px; padding: 8px 12px;
  background: linear-gradient(115deg,color-mix(in srgb,var(--glow) 10%,#132c34),#122832 53%);
}
.stat-copy strong { color: #f1f9ed; font-size: clamp(14px,1.53vw,20px) }
.stat-copy small { color: var(--muted); font-size: 12px }
#stats .stat-arrow {
  display: grid; width: 29px; aspect-ratio: 1; place-items: center; border-radius: 50%; font-size: 19px; line-height: 1;
  border: 1px solid color-mix(in srgb,var(--glow,#99e8d8) 45%,#183842); color: var(--glow,#99e8d8);
}
.stat-card::before, .catalog-header::before, .guide-header::before {
  content: ""; position: absolute; z-index: 1; top: 0; left: 0; width: 31%; height: 2px; pointer-events: none;
  background: linear-gradient(90deg,transparent,var(--glow,#ffdc9b) 57%,#fff8cf 65%,transparent);
  box-shadow: 0 0 10px color-mix(in srgb,var(--glow,#ffdc9b) 60%,transparent);
  opacity: 0; animation: wiki-edge 6.4s ease-in-out infinite;
}
.stat-card:nth-child(even)::before { animation-delay: -2.4s }
.stat-card:nth-child(n+5)::before { animation-delay: -4s }
@keyframes wiki-edge {
  0% { opacity: 0; transform: translateX(-100%) }
  19%,72% { opacity: .9 }
  91%,100% { opacity: 0; transform: translateX(325%) }
}

#catalog .catalog-header, #catalog[data-section=cards] .catalog-header, .guide-header {
  position: relative; isolation: isolate; overflow: hidden; min-height: 169px; align-content: center;
  padding: 18px clamp(15px,3.6vw,42px); border: 1px solid color-mix(in srgb,var(--glow,var(--gold)) 45%,#3c4f4d);
  border-radius: 17px 17px 8px 17px; background: #193039; color: var(--gold); box-shadow: 0 9px 22px #080e17ae;
}
#catalog .catalog-header::after, #catalog[data-section=cards] .catalog-header::after, .guide-header::after {
  content: ""; position: absolute; z-index: -1; inset: 0 0 0 auto; width: 72%; height: auto;
  border: 0; outline: 0; border-radius: 0; box-shadow: none; transform: none; pointer-events: none;
  background: linear-gradient(90deg,#193039 2%,#182f3966 48%,#0d202824),var(--section-art,var(--archive-scene)) center 44%/cover no-repeat;
}
.guide-header { --section-art: var(--archive-scene) }
.catalog-header h1, .guide-header h1 { color: var(--glow,var(--gold)); text-shadow: 0 2px 12px #0a171c }
.catalog-header p, #catalog[data-section=cards] .catalog-header p, .guide-header p {
  color: #eaf6f2; max-width: min(66ch,76%); text-shadow: 0 1px 5px #101f28;
}
.crumb, #catalog[data-section=cards] .catalog-header .crumb { color: #c5f0de }

/* Dark reading surfaces keep facts, guides and tool controls legible over the scene. */
.toolbar, #catalog[data-section=cards] .toolbar,
:is(.job-browser,.guide-filter,.guide-box,.guide-entry,.guide-figure,.guide-catalyst,.guide-equipment-results,.guide-set-results .guide-materials) {
  border-color: var(--line); background: linear-gradient(145deg,#1c2b48,#14223a); color: var(--ink);
}
:is(.search-row input,#progression-job,.detail-section select,.gear-options select,.map-explorer select,
    .guide-search input,.guide-equipment-picker select,.guide-set-filters select) {
  border-color: #5c7195; background: #101e35; color: var(--ink);
}
.search-row button { background: #2c4265; color: var(--ink) }
:is(.filter,.tier-chip,.pager button,.related-more,.guide-category-filter button,.guide-grades a,.guide-home-link) {
  color: #dde9ff; border-color: #566e91; background: #213450;
}
:is(.filter,.tier-chip).active,.guide-category-filter button[aria-pressed=true],.guide-grades a[aria-current] {
  color: #2a211c; background: var(--wiki-cta); border-color: #f9d48d;
}
#catalog :is(.card,.item-family), #catalog[data-section=maps] .card, .guide-tile {
  color: var(--ink); border-color: #485e81; background: linear-gradient(145deg,#223753,#192741); box-shadow: 0 3px 9px #0b142737;
}
#catalog :is(.card,.item-family):hover, .guide-tile:hover { border-color: #caad70; box-shadow: 0 3px 15px #080f26b3 }
#catalog .monster-card-tile { border-color: color-mix(in srgb,var(--card-line) 40%,#415571); background: linear-gradient(145deg,#223453,#17243d) }
.monster-card-tile[data-rank=normal] { --card-accent: #b3d9ff }
.monster-card-tile[data-rank=elite] { --card-accent: #e2c8ff }
.monster-card-tile[data-rank=boss] { --card-accent: #ffe1a1 }
.monster-card-tile-art { background: radial-gradient(ellipse at 50% 24%,#42547b,#233352 58%,#1b2542); border-color: #53658b }
:is(.job-card,.gear-job,.guide-item,.guide-chances > div,.guide-chances > div:last-child,.guide-grades a,.related,.map-monster,.spawn-map-link,.drop-card) {
  color: var(--ink); background: #233753; border-color: #4c6489;
}
:is(.job-card.selected,.gear-job[aria-pressed=true],.guide-grades a:hover,.guide-item:hover,.related:hover,.related.selected,.map-monster:hover,.drop-card:hover) {
  color: #fff0c6; background: #344665; border-color: #bfaa78;
}
.job-card.selected,.gear-job[aria-pressed=true] { box-shadow: inset 0 -2px #f4cc81 }
.guide-tile-preview { background: #304467; border-color: #62789a }
.guide-category > h2, .guide-tile h3, .guide-box h2, .guide-related h2, .guide-entry h2,
.guide-catalyst summary, .guide-equipment-results summary { color: var(--gold) }
.guide-tile-arrow, .guide-item-copy small, .guide-filter-status, .guide-steps p, .guide-entry-path li, .guide-search, .guide-equipment-picker,
.guide-figure figcaption, .guide-table-hint, .guide-empty-rune, .guide-set-filters label { color: var(--muted) }
.guide-entry-path li:last-child { color: var(--gold) }
.guide-note, .notice, .detail-warning { background: #422f26; color: #ffe5b3; border-color: #8c6d43 }
.guide-set-bonus { background: #1c443f; color: #b2efd9 }
.guide-rune-table table, .empty, .loading { color: var(--muted); background: var(--surface) }
.guide-rune-table th, .guide-rune-table td { border-color: var(--line) }
.guide-rune-table thead, .guide-rune-table .guide-item:hover { background: var(--surface-raised) }
.site-footer { border-color: #907b5665; background: #111c32e8 }
.footer-row span:first-child { color: var(--gold) }

.modal-panel, .modal-panel[data-kind=items], #detail-modal[data-kind=cards] {
  background: linear-gradient(140deg,#1d2e4b,#111d33 72%); color: var(--ink);
  border: 1px solid #9e835a; border-top: 3px solid #e9c584; box-shadow: 0 19px 62px #030713af;
}
.modal-panel::backdrop { background: #080e20ce }
.modal-panel .modal-close, .modal-panel[data-kind=items] .modal-close { color: #ffe9b9; background: #253750; border-color: #89754f }
.detail-heading h2, .item-profile-identity h2, .monster-card-heading h2 { color: var(--gold) }
.eyebrow, .detail-id, .portrait-note, .fact dt, .item-profile-category, .item-profile-description { color: var(--muted) }
:is(.detail-section,.monster-drops,.monster-card-section) { color: var(--ink); background: #15243c; border-color: #445b80 }
:is(.detail-section,.monster-card-section) h3 { color: #ffe0a4 }
.fact,.monster-card-section .fact { background: #233b59 }
.fact dd,.monster-card-section .fact dd { color: #e8f2ff }
.icon, .item-profile-icon,.map-thumbnail { background-color: #344964; border-color: #687e9f }
.classic-card-icon { background-color: #263855 }
.map-thumbnail small, .spawn-map-link small { color: var(--muted) }
table { color: var(--ink) }
th, td { border-color: var(--line) }
th { background: #294266; color: #edf4ff }
.monster-idle { background: radial-gradient(ellipse at 50% 76%,#3c537d,transparent 49%),#202e4d; border-color: var(--line) }
.drop-group h4 { color: #e2edff; background: #263b5c; border-left: 3px solid var(--group,#90b9f0) }
.drop-tabs [aria-pressed=true] { color: #1c263c; background: var(--wiki-cta); border-color: #e5ca82 }
.drop-percent { color: #a9efd0 }
.item-profile-stats,.item-profile-max .item-profile-stats { background: #233956; border-color: #516987 }
.item-profile-stat dt,.item-profile-section { color: #bbd1ec }
.item-profile-stat dd,.item-profile-reqs li { color: #edf6ff }
.item-profile-section::after, .item-profile-prices { border-color: #4f6689 }
.item-profile-reqs li, .gear-requirement-tags span, .progression-stat-tags span { background: #324966; color: #d5e7ff }
.item-profile-option,.item-profile-effect,.item-profile-max summary { color: #e2c7ff }
.item-profile-upgrade { color: #ffb1e5 }
.item-upgrade-price small { color: #d8c2e4 }

/* Spell card details and readable direction markers. */
.monster-card-detail { --card-tint: #293e62; --card-line: #6984af; --card-accent: #c7e3ff }
.monster-card-detail[data-rank=elite] { --card-tint: #40335f; --card-line: #957cb7; --card-accent: #ebd9ff }
.monster-card-detail[data-rank=boss] { --card-tint: #44374a; --card-line: #b38a51; --card-accent: #ffe0a3 }
.monster-card-detail-art { background: radial-gradient(ellipse at 50% 32%,var(--card-tint),#192946 76%) }
.monster-card-effect { background: linear-gradient(150deg,var(--card-tint),#15243c 74%) }
.monster-card-rule,.monster-card-match { color: var(--ink); background: #121e35; border-color: #4e6690 }
.monster-card-jump { color: #fce1af; background: #303d5a; border-color: #978059 }
.monster-card-jump:hover { background: #48536b; border-color: #e9c78b }
.monster-card-counter-grid:has(> :only-child) { grid-template-columns: minmax(0,1fr) }
.monster-card-counter-hint { margin-block: -2px 9px; font-size: 13px; color: var(--muted) }
.monster-card-match-group { background: #1a353f; border-color: #568580 }
.monster-card-match-group[data-direction=threatened] { background: #352d3e; border-color: #92714e }
.monster-card-match-group[data-direction=paired] { background: #2b3050; border-color: #7d72a5 }
.monster-card-match-group h4,.monster-card-match-group summary { color: #f4deb3 }
.monster-card-match:hover,.monster-card-match:focus-visible { background: #223655; border-color: #ad9869 }
.monster-card-match-rule { color: var(--muted) }
.monster-card-match-copy b { color: #dae9ff }
.monster-card-chain { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 6px; font-size: 14px; color: #f4f7ff }
.monster-card-chain-arrow { font-size: 12px; font-weight: 700; color: #ffdb8f; white-space: nowrap }
.monster-card-chain-current {
  color: #c4e6fc; background: #243e61; border-radius: 4px; padding-inline: 4px;
  font-size: 12px; font-weight: 700;
}

#catalog :is(.card,.item-family), #catalog[data-section=maps] .card, .guide-tile {
  background: linear-gradient(142deg,#21404a,#162d36);
  border-color: #416269; border-radius: 12px 12px 5px 12px;
}
.toolbar, #catalog[data-section=cards] .toolbar, .job-browser { border-color: #47666d; background: #162f3a }
#catalog .monster-card-tile { background: #1b3540; border-color: #607783 }
.monster-card-tile-art {
  background: radial-gradient(ellipse at 50% 18%,#41536b,transparent 73%),#1f303e; border-color: #57717a;
}
#catalog[data-section=maps] .card {
  display: grid; grid-template-columns: minmax(64px,.75fr) minmax(0,1fr); min-height: 104px; padding: 7px;
}
#catalog[data-section=maps] .map-thumbnail {
  width: 100%; height: auto; aspect-ratio: 1; max-height: 132px; border-radius: 8px 8px 4px 8px;
}
.modal-panel, .modal-panel[data-kind=items], #detail-modal[data-kind=cards] {
  background: linear-gradient(145deg,#203c45,#122732 73%); border-color: #b39361;
}
:is(.detail-section,.monster-drops,.monster-card-section,.map-explorer :is(.map-explorer-art,.map-explorer-list)) {
  color: var(--ink); background: #162e39; border-color: #405e66;
}
.fact,.monster-card-section .fact { background: #23434d }

#detail-modal[data-kind=monsters] {
  inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0;
  border: 0; border-radius: 0; overflow: hidden; background: #111e33;
}
#detail-modal[data-kind=monsters] #detail-content { height: 100%; display: grid; min-height: 0; padding: 0 }
#detail-modal[data-kind=monsters] .detail-state { padding: 66px 16px 12px }
#detail-modal[data-kind=monsters] .modal-tools { position: absolute; top: env(safe-area-inset-top); right: env(safe-area-inset-right) }
#detail-modal[data-kind=monsters] .modal-close {
  width: auto; height: 42px; padding: 0 12px; margin: 12px 12px 0 0; font-size: 14px; font-weight: 800; white-space: nowrap;
}
.monster-board {
  display: grid; grid-template-rows: auto minmax(0,1fr); gap: clamp(5px,1.4dvh,13px);
  min-height: 0; width: 100%; max-width: 1440px; margin-inline: auto;
  padding: max(10px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
}
.monster-board-header {
  display: flex; align-items: center; gap: 12px; min-height: 50px; min-width: 0; padding: 5px 98px 5px 8px;
  border: 1px solid #725e46; border-radius: 10px;
  background: radial-gradient(ellipse at 2% 90%,#4d4665,transparent 45%),linear-gradient(110deg,#2a3b62,#182842 72%);
}
.monster-board-heading { min-width: 0 }
.monster-board-heading h2 { color: #ffebbd; font-size: clamp(17px,3.3vw,30px); line-height: 1.12; overflow-wrap: anywhere }
.monster-board-heading p { color: #bdd1ec; margin: 4px 0 0; font-size: 12px }
.monster-overview {
  display: grid; grid-template-columns: clamp(148px,23vw,290px) minmax(0,1fr); grid-template-rows: minmax(0,1fr);
  gap: 9px; min-width: 0; min-height: 0;
}
.monster-reference { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-width: 0; min-height: 0 }
.monster-sheet {
  --sheet-accent: #c5c9ff;
  min-width: 0; padding: 8px; border: 1px solid #536285; border-radius: 9px;
  background: linear-gradient(145deg,#263752,#1a2941);
}
.monster-locations { --sheet-accent: #b8efd5; border-color: #476a72; background: linear-gradient(135deg,#263947,#182d3e) }
.monster-section-label {
  display: flex; align-items: center; gap: 6px; margin: 0 0 7px; color: var(--sheet-accent,#ffdda0); font-size: 14px; line-height: 1.12;
}
.monster-section-label small {
  padding: 2px 6px; border: 1px solid #67718b; border-radius: 12px; font-size: 10px;
  color: inherit; font-variant-numeric: tabular-nums;
}
.monster-vitals .monster-idle {
  display: none; margin: 0 0 7px; border: 0;
  background: radial-gradient(ellipse at 50% 72%,#4f597d,transparent 66%),#202e49;
}
.monster-vitals .monster-idle img { width: min(132px,19dvh) }
.monster-stats-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; margin: 0 }
.monster-stat {
  min-width: 0; padding: 4px 5px; border-left: 2px solid #717caf; border-radius: 4px;
  background: #1e2d47; line-height: 1.12; font-variant-numeric: tabular-nums;
}
.monster-stat dt { color: #c5d2ea; font-size: 10px; font-weight: 650; overflow-wrap: anywhere }
.monster-stat dd {
  color: #fff0c3; font: 750 15px/1.1 Arial,system-ui,sans-serif; margin: 2px 0 0; white-space: nowrap;
}
.monster-map-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 4px }
.monster-map-grid .spawn-map-link {
  gap: 0 6px; min-width: 0; padding: 3px; align-content: center; color: #e5f5ee; border-color: #517179;
  background: #223a49;
}
.monster-map-grid .spawn-map-link:hover,.monster-map-grid .spawn-map-link:focus-visible { border-color: #a8e6d0; background: #2b495c }
.monster-map-grid .spawn-map-link[data-current] { border-color: #ddb774 }
.monster-map-grid .spawn-map-link strong { min-width: 0; line-height: 1.12; overflow-wrap: anywhere }
.monster-map-grid .spawn-map-link > small { line-height: 1.12; white-space: nowrap }
.monster-map-grid .spawn-map-link .map-thumbnail { width: 33px; height: 33px; border-color: #63878c }
.monster-map-grid .spawn-map-link .map-thumbnail small { color: #c7d6e5 }
.monster-drops-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0 }
.monster-drops-pane > .monster-section-label { padding: 2px 0 4px; border-bottom: 1px solid #67583f }
.monster-loot-board {
  --loot-gap: 4px; --loot-padding: 5px; --loot-heading: 23px; --loot-panel-min: 100px;
  display: flex; flex-direction: column; gap: var(--loot-gap); flex: 1 1 0; min-height: 0; overflow: hidden;
}
.monster-loot-board[data-fit=false] { overflow: auto }
.loot-shelf { display: flex; align-items: stretch; gap: var(--loot-gap); flex: none }
.loot-group {
  --loot-accent: #9eb4ce;
  box-sizing: border-box; flex: none; min-width: 0; padding: 0 calc(var(--loot-padding) - 1px) calc(var(--loot-padding) - 1px);
  border: 1px solid color-mix(in srgb,var(--loot-accent) 48%,#253851); border-radius: 8px;
  background: linear-gradient(150deg,color-mix(in srgb,var(--loot-accent) 12%,#172742),#17243b 74%);
}
.loot-group[data-group=weapon] { --loot-accent: #f1b27e }
.loot-group[data-group=armor] { --loot-accent: #8ccdf6 }
.loot-group[data-group=shield] { --loot-accent: #7ccebd }
.loot-group[data-group=accessory] { --loot-accent: #dcb3f2 }
.loot-group[data-group=cards] { --loot-accent: #f9d47c }
.loot-group[data-group=pet] { --loot-accent: #b1c4ff }
.loot-group[data-group=manual] { --loot-accent: #f4a5bf }
.loot-group[data-group=jewel] { --loot-accent: #f6a8ed }
.loot-group[data-group=material] { --loot-accent: #a6d69c }
.loot-group[data-group=use] { --loot-accent: #9de2ec }
.loot-heading {
  display: flex; align-items: center; gap: 5px; justify-content: space-between; height: var(--loot-heading);
  margin: 0; padding: 0 3px; min-width: 0; color: var(--loot-accent); font-size: 12px; line-height: 1;
}
.loot-heading span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.loot-heading small {
  border-radius: 10px; padding: 2px 5px; color: var(--loot-accent); font-size: 9px;
  background: color-mix(in srgb,var(--loot-accent) 15%,#18263e);
}
.loot-grid {
  display: grid; gap: var(--loot-gap); grid-template-columns: repeat(var(--loot-columns),var(--loot-tile-width));
  grid-auto-rows: var(--loot-tile-height);
}
.loot-grid .drop-card {
  box-sizing: border-box; display: grid; position: relative; align-items: center; min-height: 0;
  border-color: color-mix(in srgb,var(--loot-accent) 32%,#344767); border-radius: 6px; gap: 0;
  background: color-mix(in srgb,var(--loot-accent) 8%,#203453); padding: 0; overflow: hidden;
}
.loot-grid .drop-card:hover,.loot-grid .drop-card:focus-visible {
  border-color: var(--loot-accent); outline: 2px solid var(--loot-accent); outline-offset: -2px;
  background: color-mix(in srgb,var(--loot-accent) 22%,#213654);
}
.loot-icon { position: relative; display: block; width: 100%; height: 100%; min-height: 0 }
.loot-grid .loot-icon > .icon {
  position: absolute; display: block; width: 40px; height: 40px; left: 50%; top: 50%; max-width: none;
  transform: translate(-50%,-50%) scale(var(--loot-icon-scale)); border: 0; background-color: transparent;
}
.loot-grid .drop-percent {
  font-size: 10px; line-height: 1.05; font-weight: 700; color: #c0f3d9; letter-spacing: -.03em; white-space: nowrap;
}
.monster-loot-board[data-loot-style=named] .drop-card {
  grid-template-columns: 36px minmax(0,1fr); grid-template-rows: minmax(0,1fr) auto; gap: 0 3px; padding: 2px 4px;
}
.monster-loot-board[data-loot-style=named] .loot-icon { grid-row: span 2 }
.loot-grid .card-text { min-width: 0; overflow: hidden }
.loot-grid .card-name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; overflow-wrap: anywhere; white-space: normal; font-size: 11px; line-height: 1.05;
}
.loot-grid .drop-kind { color: var(--loot-accent); font-size: 9px; line-height: 1.1 }
.monster-loot-board[data-loot-style=icons] .drop-card { grid-template-rows: minmax(0,1fr) auto; justify-items: stretch }
.monster-loot-board[data-loot-style=icons] .card-text,
.monster-loot-board[data-loot-rates=false] .drop-percent { display: none }
.monster-loot-board[data-loot-style=icons] .drop-percent { text-align: center; font-size: 9px; padding-bottom: 1px }
.wiki-drop-origin { margin: 2px 0; padding: 6px 10px; border-radius: 8px; color: #c0f3d9; background: #1d3948; font-size: 12px }
.monster-drops-pane > .monster-section-label small { border-color: #7c674c }
@media (min-width: 1000px) and (min-height: 620px) {
  .monster-vitals .monster-idle { display: grid }
}
.monster-page-nav { display: flex; justify-content: center; align-items: center; gap: 8px; min-width: 0 }
.monster-page-nav output { min-width: 74px; text-align: center; font-variant-numeric: tabular-nums; font-size: 12px; color: #d8e7ff }
.manual-profile h3 { color: #ffe0a4 }
.manual-profile h4 { margin: 12px 0 6px; color: #dceaff; font-size: 13px }
.manual-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(185px,100%),1fr)); gap: 5px }
.manual-grid .drop-card strong { font-size: 12px; overflow-wrap: anywhere }
.manual-upgrade-example { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 5px }
.manual-grid[data-recipe-list=examples] { grid-template-columns: 1fr }
.manual-profile .monster-page-nav { margin-top: 6px }
@media (max-width: 540px) and (orientation: portrait) {
  .monster-overview { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); gap: 5px }
  .monster-reference { gap: 4px }
  .monster-sheet { padding: 4px 5px }
  .monster-section-label { margin-bottom: 4px; font-size: 12px }
  .monster-section-label small { padding: 1px 5px }
  .monster-stats-grid { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 3px }
  .monster-stat { padding: 3px }
  .monster-stat dt,.monster-map-grid .spawn-map-link > small { font-size: 9px }
  .monster-stat dd { font-size: 12px }
  .monster-stat[data-long-value] { grid-column: span 2 }
  .monster-stat[data-long-value] dd { font-size: 10px }
  .monster-map-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 3px }
  .monster-map-grid .spawn-map-link .map-thumbnail { width: 24px; height: 24px }
}
@media (max-height: 470px), (max-width: 360px) {
  .monster-loot-board { --loot-gap: 2px; --loot-padding: 3px; --loot-heading: 17px; --loot-panel-min: 82px }
  .loot-heading { font-size: 10px; gap: 2px }
  .loot-heading small { padding-inline: 4px }
  .monster-board { padding: max(5px,env(safe-area-inset-top)) max(7px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(7px,env(safe-area-inset-left)); gap: 5px }
  .monster-board-header { min-height: 44px; padding-block: 2px }
  #detail-modal[data-kind=monsters] .modal-close { height: 35px; margin-top: 9px }
}
@media (max-height: 470px) and (orientation: landscape) {
  .monster-overview { gap: 5px; grid-template-columns: clamp(131px,21vw,186px) minmax(0,1fr) }
  .monster-board:not([data-many-drops]) .monster-overview { grid-template-columns: clamp(190px,29vw,235px) minmax(0,1fr) }
  .monster-reference { gap: 4px }
  .monster-sheet { padding: 4px }
  .monster-section-label { margin-bottom: 3px; font-size: 11px }
  .monster-section-label small { padding-block: 1px }
  .monster-drops-pane > .monster-section-label { padding: 0 0 3px }
  .monster-stats-grid,.monster-map-grid { gap: 3px }
  .monster-stats-grid { grid-template-columns: repeat(3,minmax(0,1fr)) }
  .monster-stat { padding: 2px 3px }
  .monster-stat dt { font-size: 8.5px; line-height: 1.08 }
  .monster-stat dd { font-size: 10px; line-height: 1.05; letter-spacing: -.1px; margin-top: 1px }
  .monster-stat[data-long-value] { grid-column: span 2 }
  .monster-map-grid[data-many] { grid-template-columns: repeat(2,minmax(0,1fr)) }
  .monster-map-grid .spawn-map-link { gap: 0 3px; padding: 2px }
  .monster-map-grid .spawn-map-link .map-thumbnail { width: 20px; height: 20px }
  .monster-map-grid[data-many] .spawn-map-link { grid-template-columns: minmax(0,1fr); padding-inline: 4px }
  .monster-map-grid[data-many] .map-thumbnail { display: none }
  .monster-map-grid .spawn-map-link strong { font-size: 9px }
  .monster-map-grid .spawn-map-link > small { font-size: 8px }
}
.map-explorer-list h3,.map-explorer-art h3 { color: var(--gold) }
.catalog-header,.guide-header { scroll-margin-top: 110px }
.site-footer { background: #0f242d; border-color: #5a6a60 }

@media (max-width: 970px) {
  #catalog[data-section=maps] .item-grid { grid-template-columns: repeat(3,minmax(0,1fr)) }
}
@media (max-width: 820px) {
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px }
}
@media (max-width: 700px) {
  .wrap, #main:has(#catalog[data-section=cards]) { width: calc(100% - 22px) }
  main { padding-top: 13px; padding-bottom: 30px }
  .header-row { gap: 5px; min-height: 56px }
  .brand { gap: 4px }
  .brand img { width: 45px }
  .brand span { padding-inline-start: 5px; font-size: 11px }
  .brand small { font-size: 10px }
  .top-actions { gap: 4px }
  .top-actions :is(select,button,a) { min-height: 35px; padding: 3px 6px; font-size: 11px }
  .wiki-game-link span { display: none }
  .section-tabs { gap: 2px }
  .section-tabs a { padding: 8px 9px 9px; font-size: 13px }
  .hero-content { padding: 16px }
  .hero h1 { font-size: clamp(31px,8.7vw,50px) }
  .hero p { margin-top: 8px }
  .hero-search { margin-top: 13px }
  .catalog-overview { margin-top: 20px }
  .stat-caption { min-height: 61px; padding: 7px 8px }
  .stat-copy small { font-size: 10px }
  #stats .stat-arrow { width: 21px; font-size: 15px }
  #catalog .catalog-header,#catalog[data-section=cards] .catalog-header,.guide-header { min-height: 122px }
  #catalog .catalog-header::after,#catalog[data-section=cards] .catalog-header::after,.guide-header::after { width: 84%; opacity: .66 }
  #catalog[data-section=maps] .item-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px }
  #catalog[data-section=maps] .card { grid-template-columns: 1fr; min-height: 0 }
  #catalog[data-section=maps] .map-thumbnail { max-height: none; aspect-ratio: 1.18 }
}
@media (max-width: 700px) and (orientation: portrait) {
  .hero { min-height: clamp(420px,118vw,510px); align-items: end }
  .hero-picture .hero-art { object-position: 49% 41% }
  .hero::before { background: linear-gradient(0deg,#0c202d 5%,#10303ddd 26%,#14313d31 63%,transparent 81%) }
}
@media (max-width: 370px) {
  .brand span { display: none }
}
@media (max-height: 480px) and (orientation: landscape) {
  body > .masthead { position: relative }
  #items { scroll-margin-top: 9px }
  .hero { min-height: 325px }
}
@media (prefers-reduced-motion: reduce) {
  .wiki-hero-lights::before,.wiki-hero-lights::after,.stat-card::before,.catalog-header::before,.guide-header::before { animation: none }
  .stat-art img { transition: none; transform: none }
}
[data-wiki-reduced-effects] :is(.wiki-hero-lights,.stat-card,.catalog-header,.guide-header)::before,
[data-wiki-reduced-effects] .wiki-hero-lights::after { animation: none }
[data-wiki-reduced-effects] .stat-art img { transition: none; transform: none }

