/* Compact creature details; the catalog and shared combat styles stay independent. */
.bestiaryBossFilters { display: flex; flex-wrap: wrap; gap: 0 20px; }
.monsterProfile .bestiaryBreadcrumb { margin-bottom: 8px; }
.monsterProfile .monsterDetail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr); gap: 10px 16px; padding: 12px; }
.monsterProfile .monsterDetailHeader { gap: 8px; }
.monsterProfile .monsterPortrait { width: 68px; height: 68px; }
.monsterProfile .monsterPortrait img { width: 64px; height: 64px; }
.monsterProfile .monsterDetailHeader h2 { font-size: 24px; overflow-wrap: anywhere; }
.monsterProfile .monsterLevelControl { align-self: center; align-items: center; grid-template-columns: minmax(0, 1fr) 70px auto; gap: 8px; margin: 0; padding: 8px; }
.monsterProfile .monsterLevelControl label small { line-height: 1.4; }
.monsterProfile .monsterLevelControl input { min-height: 36px; padding: 6px; }
.monsterProfile .monsterLevelControl button { min-height: 36px; padding: 7px 10px; }
.monsterProfile .monsterBossNotice { align-self: center; margin: 0; padding: 8px 10px; }
.monsterProfile .monsterVitals { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
.monsterProfile .monsterVitals > li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 8px; padding: 6px 9px; }
.monsterProfile .monsterVitals strong { margin: 0; font-size: 20px; }
.monsterProfile .monsterVitals small { flex-basis: 100%; font-size: 10px; }
.monsterProfile :is(.attackSection, .resistanceSection, .lootSection) { margin-top: 10px; padding: 12px; }
.monsterProfile .sectionHeading { margin-bottom: 8px; }
.monsterProfile .monsterVoicesSection { margin-top: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: rgba(8,13,21,.72); }
.monsterProfile .monsterVoices { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; padding: 0; list-style: none; font-size: 12px; font-weight: 700; color: #ff8800; }
html[data-color-mode='beige'] .monsterProfile .monsterVoicesSection { background: var(--panel-fill); border-color: var(--panel-edge); }
.monsterProfile .monsterVoices li { max-width: 100%; overflow-wrap: anywhere; }
.monsterProfile .sectionHeading .eyebrow { margin: 0; }
.monsterProfile .combatSubheading { margin-bottom: 7px; font-size: 17px; }
.monsterProfile .monsterComboEstimate { margin: 0 0 8px; font-size: 11px; }
.monsterProfile .defenseHeading { margin-top: 12px; padding-top: 10px; }
.monsterProfile :is(.attackGrid, .defenseGrid) { grid-template-columns: repeat(auto-fit, minmax(225px, 1fr)); gap: 6px; align-items: start; }
.monsterProfile :is(.attackGrid, .defenseGrid) { grid-auto-rows: 54px; }
.monsterProfile :is(.attackItem, .defenseAbility, .defenseStat) { box-sizing: border-box; height: 54px; min-height: 0; }
.monsterProfile .attackItem { align-content: start; }
.monsterProfile .defenseAbility { align-content: center; }
.monsterProfile :is(.attackItem, .defenseAbility) { gap: 3px 8px; padding: 6px 8px; border-radius: 7px; }
.monsterProfile .attackName { gap: 6px; }
.monsterProfile .attackName h3 { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.monsterProfile .attackDamage { font-size: 15px; line-height: 1.3; }
.monsterProfile .attackMeta { gap: 3px 8px; }
.monsterProfile .attackMeta span { padding: 0; border: 0; border-radius: 0; background: none; font-size: 10px; }
.monsterProfile .attackMeta:empty { display: none; }
.monsterProfile .hasAttackPreview { position: relative; padding-bottom: 26px; }
.monsterProfile .monsterPreviewTrigger { position: absolute; right: 3px; bottom: 2px; display: grid; place-items: center; width: 24px; height: 24px; min-width: 24px; min-height: 24px; padding: 0; border: 0; border-radius: 5px; color: var(--anchor, #9cd6f4); background: transparent; cursor: pointer; }
.monsterProfile .monsterPreviewTrigger:hover, .monsterProfile .monsterPreviewTrigger[aria-expanded='true'] { background: var(--surface-raised, #1b2738); }
.monsterProfile .monsterPreviewTrigger:focus-visible { outline: 2px solid var(--anchor, #9cd6f4); outline-offset: 2px; }
.monsterAttackPreview { position: fixed; z-index: 1000; width: min(420px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); overflow-y: auto; padding: 10px; box-sizing: border-box; border: 1px solid #66738a; border-radius: 10px; color: #e8eef7; background: #101721; box-shadow: 0 10px 35px #0009; }
.monsterAttackPreview[hidden] { display: none; }
.monsterAttackPreview header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.monsterAttackPreview header strong { font-size: 13px; }
.monsterAttackPreview button { flex: none; min-width: 32px; min-height: 32px; padding: 0; border: 1px solid #66738a; border-radius: 5px; color: inherit; background: transparent; cursor: pointer; font-size: 20px; }
.monsterAttackPreview canvas { display: block; width: 100%; height: auto; border-radius: 5px; image-rendering: pixelated; }
.monsterAttackPreview canvas[hidden] { display: none; }
.monsterAttackPreview .monsterPreviewStatus { margin: 6px 0; color: #bac6d8; font-size: 12px; }
.monsterAttackPreview .monsterPreviewStatus:empty { display: none; }
.monsterAttackPreview > small { display: block; margin-top: 6px; color: #bac6d8; font-size: 10px; }
@media (pointer: coarse) {
    .monsterProfile .monsterPreviewTrigger { width: 40px; height: 36px; }
    .monsterProfile .hasAttackPreview { padding-bottom: 40px; }
    .monsterProfile :is(.attackGrid, .defenseGrid) { grid-auto-rows: 68px; }
    .monsterProfile :is(.attackItem, .defenseAbility, .defenseStat) { height: 68px; }
}
.monsterProfile .defenseStat { gap: 8px; padding: 8px 10px; border-radius: 7px; }
.monsterProfile .defenseStat strong { font-size: 16px; }
.monsterProfile .resistanceGrid { grid-template-columns: repeat(auto-fit, minmax(95px, 1fr)); gap: 5px; }
.monsterProfile .resistanceItem { padding: 6px 8px; gap: 2px 6px; border-radius: 7px; }
.monsterProfile .resistanceItem strong { font-size: 14px; }
.monsterProfile .monsterTraits { margin-top: 10px; border-top: 1px solid var(--border); }
.monsterProfile .monsterTraits h2 { margin: 10px 0 6px; font-family: inherit; font-size: 13px; font-weight: 700; }
.monsterProfile .monsterTraits p { margin: 0; color: var(--text-muted, #9baabd); font-size: 12px; }
.monsterProfile .monsterImmunities { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; }
.monsterProfile .monsterImmunities li { padding: 3px 8px; border: 1px solid var(--border); border-radius: 5px; color: var(--anchor, #9cd6f4); font-size: 11px; }
.monsterProfile .monsterFlags { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 3px 16px; margin: 0; }
.monsterProfile .monsterFlags > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; padding: 3px 0; border-bottom: 1px solid var(--border); font-size: 11px; }
.monsterProfile .monsterFlags dt { color: var(--text-muted, #9baabd); overflow-wrap: anywhere; }
.monsterProfile .monsterFlags dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.monsterProfile .monsterFlags dt a { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.monsterProfile .monsterFlags dt a:hover { color: var(--anchor); text-decoration-style: solid; }
.monsterProfile .monsterImmunities a { display: block; margin: -3px -8px; padding: 3px 8px; color: inherit; }
.monsterProfile a.resistanceItem { text-decoration: none; }
.monsterProfile a.resistanceItem:hover { border-color: var(--anchor); }
.monsterProfile :is(.monsterImmunities a, .monsterFlags a, a.resistanceItem):focus-visible { outline: 2px solid var(--anchor); outline-offset: 3px; border-radius: 4px; }
.monsterProfile .resistanceSection .sectionHeading > a { font-size: 11px; }
.monsterProfile .lootTable :is(th, td) { padding: 6px 9px; }
.monsterProfile .lootTable thead th { padding-block: 4px; }
.monsterProfile .lootSortButton { min-height: 24px; min-width: 0; margin: 0; padding: 0; gap: 5px; border: 0; border-radius: 0; background: none; box-shadow: none; }
.monsterProfile .lootSortButton:hover { background: none; box-shadow: none; filter: none; text-decoration: underline; text-underline-offset: 3px; }
.monsterProfile .lootSortButton:focus-visible { outline: 2px solid var(--anchor); outline-offset: 3px; }
.monsterProfile .rarityBadge { padding: 3px 6px; }
@media (max-width: 800px) {
    .monsterProfile .monsterDetail { grid-template-columns: minmax(0, 1fr); }
    .monsterProfile .monsterLevelControl { grid-template-columns: minmax(0, 1fr) 76px auto; }
    .monsterProfile .monsterLevelControl label, .monsterProfile .monsterLevelControl button { grid-column: auto; }
}
@media (max-width: 480px) {
    .monsterProfile :is(.monsterDetail, .attackSection, .resistanceSection, .lootSection, .monsterVoicesSection) { padding: 9px; }
    .monsterProfile .monsterLevelControl { grid-template-columns: 76px minmax(0, 1fr); }
    .monsterProfile .monsterLevelControl label { grid-column: 1 / -1; }
    .monsterProfile .monsterVitals > li { padding: 5px; }
    .monsterProfile .monsterVitals strong { font-size: 17px; }
    .monsterProfile :is(.attackGrid, .defenseGrid) { grid-template-columns: minmax(0, 1fr); }
    .monsterProfile .monsterFlags { grid-template-columns: minmax(0, 1fr); }
    .monsterProfile .lootTable :is(th, td) { padding: 6px 4px; }
}
