/* The monster book: the "Carnet de monstres" tab of the Journal (L) and the sheet window of a creature (ui/windows/Bestiary*.js). `--c` = the colour of a tier (bestiaryModel.js).
   A page of the Esprit rémanent's memory: lavender paper in a double frame with a faint spectral mist, zones as folding cartouches, cards edged with the colour of their tier. */
.bst { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 9px; border-radius: 4px; color: #2c2a37;
  background: radial-gradient(120% 60% at 15% 0%, rgba(255, 255, 255, 0.55), transparent 60%), radial-gradient(90% 50% at 100% 100%, rgba(140, 118, 214, 0.28), transparent 70%),
    radial-gradient(#ffffff40 1px, transparent 1.3px) 0 0 / 8px 8px, linear-gradient(#bab5d5, #a39dc2);
  box-shadow: inset 0 0 0 1px #6f6a8f, inset 0 0 0 3px #d9d6ea, inset 0 0 0 4px #8e88b3, inset 0 0 24px rgba(88, 70, 160, 0.25); }
.bst-head { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 4px; border: 1px solid #8e88b3;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.7), rgba(222, 217, 240, 0.85) 60%, rgba(205, 196, 236, 0.9)); box-shadow: 0 1px 0 #fff inset, 0 2px 6px rgba(60, 50, 110, 0.18); }
.bst-emblem { --p: 0; position: relative; flex: none; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle, #f6f4ff 52%, transparent 54%), conic-gradient(#8b6ad8, #c79bf0, #8b6ad8); box-shadow: 0 0 0 2px #585374, 0 0 12px rgba(150, 120, 230, 0.55); }
.bst-emblem i { position: absolute; inset: 9px; border-radius: 50%; border: 1px dashed #a79fd0; }
.bst-emblem i::before { content: '✧'; position: absolute; top: -2px; left: 50%; transform: translateX(-50%); font-size: var(--fs-small); color: #7a5fd0; font-style: normal; }
.bst-emblem b { font-size: var(--fs-strong); color: #3d2f78; text-shadow: 0 0 6px #fff; }
.bst-sum { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.bst-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bst-title b { font-size: calc(15px * var(--ui-text)); color: #23222b; letter-spacing: 0.02em; }
.bst-sub { font-size: var(--fs-small); font-style: italic; color: #6a58b0; font-variant: small-caps; letter-spacing: 0.04em; }
.bst-count { margin-left: auto; font-size: var(--fs-small); font-weight: 700; color: #4f4b66; }
.bst-lore { margin: 0; font-size: var(--fs-small); font-style: italic; color: #5a5672; line-height: 1.35; }
.bst-global { height: 6px; border-radius: 3px; background: #e9e7f3; box-shadow: inset 0 0 0 1px #9b96bb; overflow: hidden; }
.bst-global i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #686291, #4fa36b 30%, #3f8fd6 55%, #6b6496 80%, #b14fd9); box-shadow: 0 0 6px rgba(160, 120, 230, 0.6); }
.bst-bars { display: flex; flex-wrap: wrap; gap: 3px; }
.bst-tierchip { display: inline-flex; align-items: center; gap: 3px; padding: 0 6px; border-radius: 8px; font-size: var(--fs-caption); background: rgba(255, 255, 255, 0.75); border: 1px solid #b4afcf; color: #383645; }
.bst-tierchip i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.bst-tools { display: flex; gap: 6px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.bst-filters, .bst-folds { display: flex; gap: 3px; flex-wrap: wrap; align-items: center; }
.bst-chip { padding: 1px 9px; border-radius: 9px; border: 1px solid #8e88b3; background: rgba(255, 255, 255, 0.8); color: #383645; font: inherit; font-size: var(--fs-small); cursor: pointer; }
.bst-chip:hover { border-color: #585374; background: #fff; }
.bst-chip.on { background: linear-gradient(#6f68a0, #4f4a76); color: #fff; border-color: #3d3960; font-weight: 700; }
.bst-search { width: 130px; padding: 2px 8px; border-radius: 9px; border: 1px solid #8e88b3; background: #fbfaff; color: #2c2a37; font: inherit; font-size: var(--fs-small); }
.bst-empty { color: #4f4b66; margin: 8px 2px; font-style: italic; }
/* A zone: a folding cartouche. */
.bst-zone { border-radius: 5px; border: 1px solid #8e88b3; background: rgba(255, 255, 255, 0.28); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6); overflow: hidden; }
.bst-sec { display: flex; align-items: center; gap: 6px; width: 100%; padding: 4px 8px; border: 0; font: inherit; font-size: var(--fs-body); color: #4f4b66; cursor: pointer; text-align: left;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.85), rgba(225, 220, 242, 0.6) 55%, transparent); }
.bst-zone.k-dungeon .bst-sec { background: linear-gradient(90deg, rgba(232, 222, 255, 0.95), rgba(205, 190, 240, 0.6) 55%, transparent); }
.bst-sec:hover { background: rgba(255, 255, 255, 0.95); }
.bst-sec b { color: #23222b; }
.bst-chev { width: 12px; font-size: var(--fs-strong); line-height: 1; color: #6a58b0; }
.bst-sec-ico { font-size: var(--fs-small); }
.bst-zbar { flex: 1; max-width: 160px; height: 4px; margin-left: auto; border-radius: 2px; background: #d6d3e6; overflow: hidden; }
.bst-zbar i { display: block; height: 100%; background: linear-gradient(90deg, #8b6ad8, #c79bf0); }
.bst-zcount { min-width: 38px; text-align: right; font-size: var(--fs-small); font-weight: 700; }
.bst-zone.shut .bst-sec { opacity: 0.85; }
.bst-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 5px; padding: 6px; }
/* A card. */
.bst-tile { --c: #55526a; position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 4px 4px; border-radius: 7px; cursor: pointer; font: inherit;
  border: 1px solid #5d5976; border-top: 3px solid var(--c); background: linear-gradient(#fbfaff, #e3e0ef); color: #2c2a37; box-shadow: inset 0 0 0 1px #fff, 0 2px 4px rgba(50, 40, 90, 0.18); }
.bst-tile::before, .bst-tile::after { content: ''; position: absolute; bottom: 3px; width: 6px; height: 6px; border: 1px solid #a49ec6; pointer-events: none; }
.bst-tile::before { left: 3px; border-right: 0; border-top: 0; }
.bst-tile::after { right: 3px; border-left: 0; border-top: 0; }
.bst-tile:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px #fff, 0 0 0 1px var(--c), 0 4px 10px rgba(80, 60, 150, 0.3); }
.bst-tile.t-6 { background: linear-gradient(#f3f2f7, #efe1f7); box-shadow: inset 0 0 0 1px #fff, 0 0 8px rgba(177, 79, 217, 0.45); }
.bst-frame { position: relative; width: 54px; height: 54px; border-radius: 6px; display: grid; place-items: center; overflow: hidden; box-sizing: content-box;
  background: radial-gradient(circle at 50% 35%, #d7d1f5, #8a82bd 60%, #5a5384); border: 2px solid var(--c); box-shadow: inset 0 -8px 14px rgba(40, 30, 80, 0.35); }
.bst-pic { width: 54px; height: 54px; object-fit: cover; }
.glimpse { filter: brightness(0) opacity(0.7) drop-shadow(0 0 3px #b9a6ff); }
.bst-blob { width: 26px; height: 22px; border-radius: 50% 50% 44% 44%; box-shadow: inset -4px -4px 0 rgba(0, 0, 0, 0.25); }
.bst-rank { position: absolute; top: 0; right: 0; width: 14px; height: 14px; border-top-right-radius: 4px; border-bottom-left-radius: 4px; display: grid; place-items: center; font-size: var(--fs-micro); line-height: 1; color: #fff; background: #5a557f; }
.bst-tile.r-elite .bst-rank, .bst-card.r-elite .bst-rank { background: #7b8794; }
.bst-name { width: 100%; font-size: var(--fs-caption); font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bst-lv { margin-top: -2px; font-size: var(--fs-micro); font-weight: 700; color: #6a58b0; letter-spacing: 0.02em; }
.bst-tile.locked .bst-lv { color: #6d6988; }
.bst-tile.glimpsed { background: linear-gradient(#e9e6f4, #cfcae2); }
.bst-tile.glimpsed .bst-name { font-style: italic; color: #4f4b66; }
.bst-tile.locked { cursor: default; border-top-width: 1px; background: repeating-linear-gradient(135deg, #d4d0e6 0 6px, #ccc8e0 6px 12px); border-color: #9b96bb; box-shadow: inset 0 0 0 1px #e6e3f1; color: #6d6988; }
.bst-tile.locked:hover { transform: none; box-shadow: inset 0 0 0 1px #e6e3f1; }
.bst-tile.locked .bst-frame { background: radial-gradient(circle at 50% 40%, #c2bddc, #a39dc2); border-color: #9b96bb; box-shadow: none; }
.bst-tile.locked.r-boss .bst-frame { border-color: #a9852c; }
.bst-tile.locked .bst-name { font-weight: 400; }
.bst-q { font-size: calc(20px * var(--ui-text)); font-weight: 800; color: #7b769c; text-shadow: 0 1px 0 #e6e3f1; }
.bst-q.small { font-size: var(--fs-strong); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 4px; border: 1px dashed #a4a0bc; background: #ecebf3; color: #8b86a9; }
/* The segmented knowledge bar: one segment per tier, the one filling glows a little. */
.bst-seg { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; width: 100%; height: 5px; }
.bst-seg i { position: relative; background: #b9b6c9; overflow: hidden; border-radius: 1px; }
.bst-tile.locked .bst-seg i { background: #a9a4c6; }
.bst-seg i b { position: absolute; inset: 0 auto 0 0; background: var(--c); }
.bst-seg i.part b { box-shadow: 0 0 4px var(--c); }
.bst-seg.big i.part b { animation: bstFill 2.4s ease-in-out infinite; } /* one bar at a time: the sheet, never every tile */
.bst-seg.big { height: 9px; gap: 2px; width: 210px; }
@keyframes bstFill { 50% { filter: brightness(1.35); } }
/* The admin right click (bestiaryAdmin.js). */
.bst-admin-sub { padding: 4px 12px 0; font-size: var(--fs-small); color: #c7c2de; }
.bst-admin-tiers { display: flex; gap: 2px; padding: 2px 10px 4px; }
.bst-admin-tiers .gf-btn { min-width: 22px; padding: 1px 4px; font-size: var(--fs-small); }
/* The sheet window. */
.bst-card { display: flex; flex-direction: column; gap: 6px; max-height: min(620px, calc(100vh - 140px)); overflow-y: auto; padding-right: 2px; }
.bst-hero { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 6px; border: 1px solid #8e88b3; color: #2c2a37;
  background: radial-gradient(70% 120% at 0% 50%, rgba(150, 125, 230, 0.35), transparent 70%), radial-gradient(#ffffff50 1px, transparent 1.3px) 0 0 / 8px 8px, linear-gradient(110deg, #e4e0f4, #c9c3e3);
  box-shadow: inset 0 1px 0 #fff, 0 2px 6px rgba(60, 50, 110, 0.2); }
.bst-heroframe { position: relative; flex: none; width: 92px; height: 92px; border-radius: 8px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #e2dcff, #8a82bd 62%, #4f4878); border: 2px solid var(--c); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.6), 0 0 14px color-mix(in srgb, var(--c) 55%, transparent); }
.bst-bigpic { width: 92px; height: 92px; object-fit: cover; }
.bst-heroframe .bst-blob { width: 44px; height: 38px; }
.bst-heroframe .bst-rank { width: 16px; height: 16px; font-size: var(--fs-small); }
.bst-heroinfo { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bst-heroname { font-size: var(--fs-title); color: #23222b; letter-spacing: 0.02em; }
.bst-badge { align-self: flex-start; padding: 0 7px; border-radius: 8px; font-size: var(--fs-caption); font-weight: 700; background: var(--c); color: #fff; }
.bst-hero .bst-seg i { background: #e4e2ee; box-shadow: inset 0 0 0 1px #9b96bb; }
.bst-goal { display: flex; flex-direction: column; padding: 3px 7px; border-radius: 0 6px 6px 0; border-left: 3px solid var(--c); background: rgba(255, 255, 255, 0.75); font-size: var(--fs-small); }
.bst-goal b { color: #23222b; }
.bst-goal span { color: #5a5672; }
.bst-goal.done { --c: #b14fd9; }
.bst-track { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; }
.bst-step { --c: #888; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 2px; border-radius: 4px; background: #e4e2ee; color: #8a87a0; font-size: var(--fs-caption); border: 1px solid #c9c6dc; }
.bst-step i { width: 16px; height: 16px; border-radius: 2px; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: var(--fs-small); background: #cfcce0; color: #fff; }
.bst-step small { font-size: var(--fs-micro); }
.bst-step.on { background: color-mix(in srgb, var(--c) 16%, #fbfaff); color: #2c2a37; border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.bst-step.on i { background: var(--c); }
.bst-step.cur { border-color: var(--c); box-shadow: inset 0 -2px 0 var(--c); font-weight: 700; }
.bst-step.nxt { border-style: dashed; border-color: var(--c); color: #4a4760; }
.bst-parts { display: flex; flex-direction: column; gap: 5px; }
.bst-part { padding: 5px 7px; border-radius: 4px; background: #f8f7fc; border: 1px solid #cfccdf; border-left: 3px solid var(--c); }
.bst-part.sealed { background: repeating-linear-gradient(45deg, #efeef5 0 6px, #e7e6ef 6px 12px); border-left-color: #a4a0bc; }
.bst-part-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; font-size: var(--fs-strong); }
.bst-lock { font-size: var(--fs-strong); filter: grayscale(0.4); }
.bst-prec { margin: 4px 0 0; font-size: var(--fs-small); color: #625f77; }
.bst-prec span { color: #6a58b0; font-weight: 700; }
.bst-desc { margin: 0 0 6px; font-style: italic; font-size: var(--fs-body); }
.bst-kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: var(--fs-body); }
.bst-kv b { text-align: right; }
.bst-sub { margin-top: 6px; font-size: var(--fs-small); font-weight: 700; color: #6a6682; text-transform: uppercase; letter-spacing: 0.04em; }
.bst-places { margin: 2px 0 0; padding-left: 16px; font-size: var(--fs-body); }
.bst-stats { display: flex; flex-direction: column; gap: 3px; margin-bottom: 5px; }
.bst-stat { display: grid; grid-template-columns: 108px 1fr 86px; gap: 6px; align-items: center; font-size: var(--fs-body); }
.bst-stat b { text-align: right; white-space: nowrap; }
.bst-bar { position: relative; height: 6px; border-radius: 1px; background: #dcdae8; overflow: hidden; }
.bst-bar i { position: absolute; inset: 0 auto 0 0; background: #8e88b3; }
.bst-bar u { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, #8e88b3 0 2px, #c3bfdc 2px 4px); }
.bst-skill { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; border-top: 1px dashed #d4d1e2; }
.bst-skill:first-of-type { border-top: 0; }
.bst-skill p { margin: 1px 0; }
.bst-skico { flex: none; width: 32px; height: 32px; border-radius: 2px; box-shadow: 0 0 0 1px #2c2a37; }
.bst-loots { display: flex; flex-direction: column; gap: 4px; }
.bst-loot { display: flex; gap: 8px; align-items: center; font-size: var(--fs-body); }
.bst-loot-tile { width: 36px; height: 36px; flex: none; }
.bst-odds { display: flex; gap: 6px; margin-top: 1px; }
.bst-word { padding: 0 5px; border-radius: 2px; font-size: var(--fs-caption); font-weight: 700; background: #e3ddf6; color: #4b3f82; }
.bst-pct { font-size: var(--fs-small); font-weight: 800; color: #2e7d3a; }
.bst-loot-unknown { display: flex; gap: 4px; margin: 4px 0; }

/* The notes of the Esprit (BestiaryWindow.notes) and the glyph of each part. */
.bst-notes { position: relative; padding: 6px 12px 7px; border-radius: 6px; border: 1px solid #b4afcf; text-align: center;
  background: radial-gradient(90% 140% at 50% 0%, rgba(255, 255, 255, 0.9), rgba(232, 227, 246, 0.9)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7); }
.bst-notes-h { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: var(--fs-small); color: #6a58b0; font-variant: small-caps; letter-spacing: 0.06em; }
.bst-notes-h::before, .bst-notes-h::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #a79fd0, transparent); }
.bst-quote { margin: 3px 0 0; font-size: var(--fs-body); font-style: italic; color: #3d3956; line-height: 1.4; }
.bst-runes { margin: 4px 0 2px; font-size: var(--fs-lead); letter-spacing: 0.12em; color: #8d7fc7; opacity: 0.75; filter: blur(0.3px); text-shadow: 0 0 6px rgba(141, 127, 199, 0.6); }
.bst-glyph { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; border-radius: 50%; font-size: var(--fs-small); color: #fff; background: var(--c); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8); }
.bst-part.sealed .bst-glyph { background: #a4a0bc; }
.bst-part-h b { display: inline-flex; align-items: center; }
