/* Bestiario del DM: lista de criaturas a la izquierda, su ficha a la derecha (encima del mapa del combate) */
.bst { position: absolute; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(4,3,2,.62); backdrop-filter: blur(3px); }
.bst-win { width: min(1320px, 100%); height: min(860px, 100%); display: grid; grid-template-rows: auto auto minmax(0, 1fr); background:
  radial-gradient(120% 70% at 50% 0%, rgba(120,84,40,.18), transparent 60%), linear-gradient(#15110d, #0d0a08);
  border: 1px solid #5a4630; box-shadow: 0 0 0 1px #000, inset 0 0 0 1px rgba(212,166,74,.12), 0 30px 80px rgba(0,0,0,.8); }
.bst-load { padding: 40px; text-align: center; color: var(--muted); font-family: var(--display); letter-spacing: .1em; }
.bst-h { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid #3a2e21; background: linear-gradient(rgba(212,166,74,.07), transparent); }
.bst-ic { width: 38px; height: 38px; filter: drop-shadow(0 2px 4px #000); }
.bst-t { display: flex; flex-direction: column; min-width: 0; }
.bst-t small { font-family: var(--display); font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: #a08660; }
.bst-t b { font-family: var(--display); font-size: 21px; color: #f0dcae; letter-spacing: .03em; text-shadow: 0 2px 6px #000; }
.bst-books { display: flex; gap: 6px; flex-wrap: wrap; }
.bst-book { background: none; border: 0; border-bottom: 2px solid transparent; color: #b9a07a; font-family: var(--display); font-size: 16px; padding: 2px 4px; cursor: pointer; }
.bst-book.on { color: #f0dcae; border-color: #d4a64a; }
.bst-search { margin-left: auto; display: flex; align-items: center; gap: 8px; width: min(340px, 34vw); padding: 6px 10px; background: #0a0806; border: 1px solid #3f3224; }
.bst-search:focus-within { border-color: #a9844a; box-shadow: 0 0 0 1px rgba(212,166,74,.25); }
.bst-search img { width: 20px; height: 20px; opacity: .8; }
.bst-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 15px; }
.bst-x { display: flex; align-items: center; gap: 6px; background: #120e0b; border: 1px solid #3f3224; color: #d9c8a6; padding: 6px 12px; cursor: pointer; font: inherit; }
.bst-x:hover { border-color: #a9844a; color: #f3e1b4; }
.bst-x img { width: 18px; height: 18px; }
.bst-groups { display: flex; gap: 4px; padding: 8px 14px; border-bottom: 1px solid #2a2119; overflow-x: auto; scrollbar-width: none; }
.bst-groups::-webkit-scrollbar { display: none; }
.bst-g { flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: #110d0a; border: 1px solid #2f261c; color: #bfae8d; cursor: pointer; font: inherit; font-size: 14px; }
.bst-g img { width: 20px; height: 20px; }
.bst-g small { color: #7d6a50; font-size: 12px; }
.bst-g:hover { border-color: #6a5236; color: #ead8b2; }
.bst-g.on { background: linear-gradient(#3a2b18, #241a0f); border-color: #c9a35e; color: #f6e4bb; }
.bst-g.on small { color: #d7b878; }
.bst-body { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); min-height: 0; }
.bst-list { position: relative; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid #2a2119; scrollbar-width: thin; scrollbar-color: #4a3a28 transparent; }
.bst-list::-webkit-scrollbar, .bst-sheet::-webkit-scrollbar { width: 8px; }
.bst-list::-webkit-scrollbar-thumb, .bst-sheet::-webkit-scrollbar-thumb { background: #3f3122; border: 2px solid #0d0a08; }
.bst-card { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 5px 8px; background: linear-gradient(90deg, #15100c, #0f0c09); border: 1px solid #261e16; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.bst-card:hover { border-color: #5a4630; background: linear-gradient(90deg, #1d1610, #120e0b); }
.bst-card.on { border-color: #d4a64a; background: linear-gradient(90deg, #2c2012, #15100b); box-shadow: inset 3px 0 0 #f0c868; }
.bst-tok { width: 52px; height: 52px; border-radius: 50%; background: #3a1a14 center / cover no-repeat; border: 2px solid #6b3428; box-shadow: 0 2px 6px #000, inset 0 0 0 1px rgba(0,0,0,.6); display: grid; place-items: center; }
.bst-tok span { font-family: var(--display); font-size: 22px; color: #f0dcae; }
.bst-card.on .bst-tok { border-color: #d4a64a; }
.bst-cn { display: flex; flex-direction: column; min-width: 0; }
.bst-cn b { font-size: 16px; color: #f0e2c2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bst-cn small { color: #9c8a6c; font-size: 13px; }
.bst-cs { display: flex; gap: 8px; }
.bst-cs span { display: flex; flex-direction: column; align-items: center; min-width: 30px; font-weight: 700; color: #e6d3a8; font-size: 15px; line-height: 1.05; }
.bst-cs small { font-size: 10px; letter-spacing: .12em; color: #8a7556; font-weight: 400; }
.bst-empty { padding: 30px 14px; text-align: center; color: #8c7b62; }
.bst-empty.big { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 90px; font-family: var(--display); letter-spacing: .06em; }
.bst-empty.big img { width: 64px; height: 64px; opacity: .5; }
.bst-sheet { overflow-y: auto; min-height: 0; display: flex; flex-direction: column; scrollbar-width: thin; scrollbar-color: #4a3a28 transparent; }
.bst-add { position: sticky; bottom: 0; margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: linear-gradient(transparent, #0d0a08 30%); border-top: 1px solid #3a2e21; }
.bst-add .btn.primary { margin-left: auto; padding: 9px 22px; font-size: 16px; }
.bst-step { display: flex; align-items: center; border: 1px solid #4a3a28; background: #0a0806; }
.bst-step button { width: 34px; height: 34px; background: none; border: 0; color: #e8cf96; font-size: 20px; cursor: pointer; }
.bst-step button:hover { background: #241a10; }
.bst-step b { min-width: 34px; text-align: center; font-size: 18px; color: #f6e6bf; }

/* ---- la ficha */
.bs { padding: 0 22px 18px; color: #e3d6bd; font-size: 15.5px; line-height: 1.45; }
.bs-head { position: relative; display: flex; align-items: flex-end; min-height: 230px; margin: 0 -22px; padding: 18px 22px 12px; overflow: hidden; }
.bs-art { position: absolute; inset: 0; background: center 30% / cover no-repeat; }
.bs-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,10,8,.96) 0%, rgba(13,10,8,.55) 45%, rgba(13,10,8,.1) 75%), linear-gradient(transparent 55%, #0d0a08); }
.bs-head:not(:has(.bs-art)) { min-height: 0; padding-top: 18px; }
.bs-title { position: relative; display: flex; flex-direction: column; gap: 2px; max-width: 70%; }
.bs-title h2 { font-size: 30px; color: #f6e2b0; text-shadow: 0 2px 8px #000, 0 0 2px #000; line-height: 1.05; }
.bs-title i { color: #cdb88f; font-size: 15px; }
.bs-title small { color: #8e7b5d; font-size: 13px; letter-spacing: .04em; }
.bs-rule { height: 2px; margin: 10px 0; background: linear-gradient(90deg, #8e2a1e, #c9a35e 30%, transparent); }
.bs-core { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bs-stat { display: flex; flex-direction: column; align-items: flex-start; padding: 6px 10px; background: rgba(255,240,210,.03); border: 1px solid #2c231a; }
.bs-stat small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #9b8462; }
.bs-stat > b { font-family: var(--display); font-size: 24px; color: #f3dfae; line-height: 1.1; }
.bs-stat span { font-size: 13px; color: #a8957a; }
.bs-abil { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.bs-ab { display: grid; grid-template-columns: 26px auto minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; column-gap: 6px; padding: 5px 8px; background: #0f0c09; border: 1px solid #2c231a; }
.bs-ab img { grid-row: 1 / span 2; grid-column: 1; width: 26px; height: 26px; }
.bs-ab small { grid-row: 1; grid-column: 2 / span 2; font-size: 11px; letter-spacing: .14em; color: #9b8462; }
.bs-ab > b { grid-row: 2; grid-column: 2; font-size: 17px; color: #f0e0bc; }
.bs-ab span { grid-row: 2; grid-column: 3; font-size: 13px; color: #c7a96c; }
.bs-lines { display: flex; flex-direction: column; gap: 2px; }
.bs-l b { color: #e1b86a; font-weight: 700; }
.bs-h { margin: 14px 0 6px; font-family: var(--display); font-size: 17px; letter-spacing: .1em; color: #e9c47a; border-bottom: 1px solid #5a2a20; padding-bottom: 3px; }
.bs-sec { display: flex; flex-direction: column; gap: 7px; }
.bs-p { margin: 0; }
.bs-pn { color: #f3dfae; font-style: italic; }
.bs-src { margin-top: 16px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #6e5e48; }

/* ---- el botón del cajón */
.ed-bestiary { display: flex; align-items: center; gap: 12px; padding: 10px 12px; text-align: left; background: linear-gradient(#2a1f12, #17110a); border: 1px solid #a9844a; color: inherit; font: inherit; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(240,200,104,.12); }
.ed-bestiary:hover { border-color: #f0c868; background: linear-gradient(#36281a, #1d150c); }
.ed-bestiary img { width: 34px; height: 34px; filter: drop-shadow(0 2px 3px #000); }
.ed-bestiary div { display: flex; flex-direction: column; }
.ed-bestiary b { font-family: var(--display); font-size: 15px; letter-spacing: .06em; color: #f3dfae; }
.ed-bestiary small { color: #a8957a; font-size: 13px; }
.ed-bestiary.sm { padding: 7px 10px; } .ed-bestiary.sm img { width: 26px; height: 26px; }

@media (max-width: 900px) {
  .bst { padding: 0; }
  .bst-body { grid-template-columns: 1fr; grid-template-rows: 40% 60%; }
  .bst-list { border-right: 0; border-bottom: 1px solid #2a2119; }
  .bs-abil { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bst-search { width: auto; flex: 1; }
}
