/* ==========================================================================
   2256 : HOMO SYNTHÉSIS — RÈGLES & UNIVERS
   ========================================================================== */

.hs-help-open {
  overflow: hidden;
}

.hs-help-menu {
  position: relative;
  flex: none;
}

.hs-help-menu__button {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #2a3a39;
  background: transparent;
  color: var(--hs-texte-muted, #91a09e);
  cursor: pointer;
  font-family: var(--hs-font-titre, sans-serif);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hs-help-menu__button:hover,
.hs-help-menu__button[aria-expanded="true"] {
  color: var(--hs-accent, #49adb6);
  border-color: rgba(73, 173, 182, .65);
  background: rgba(73, 173, 182, .08);
}

.hs-help-menu__panel {
  position: fixed;
  z-index: 5100;
  width: min(290px, calc(100vw - 20px));
  padding: 8px;
  background: #0d1514;
  border: 1px solid #2a3a39;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .48);
}

.hs-help-menu__group + .hs-help-menu__group {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #22302f;
}

.hs-help-menu__group-title {
  padding: 4px 7px 6px;
  color: #74817f;
  font-family: var(--hs-font-mono, monospace);
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hs-help-menu__item {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 7px 9px;
  border: 0;
  background: transparent;
  color: var(--hs-texte, #e4e7de);
  cursor: pointer;
  text-align: left;
  font-family: var(--hs-font-titre, sans-serif);
  font-size: 10px;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.hs-help-menu__item:hover {
  background: rgba(73, 173, 182, .09);
  color: var(--hs-accent, #49adb6);
}

.hs-help-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
}

.hs-help-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 8, .82);
  backdrop-filter: blur(3px);
}

.hs-help-modal__dialog {
  position: absolute;
  inset: 5vh 6vw;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #101817;
  border: 1px solid #2a3a39;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .65);
}

.hs-help-modal__header {
  flex: none;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 18px;
  border-bottom: 1px solid #22302f;
  background: #0b1211;
}

.hs-help-modal__eyebrow {
  margin-bottom: 3px;
  color: var(--hs-accent, #49adb6);
  font-family: var(--hs-font-mono, monospace);
  font-size: 9px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.hs-help-modal__header h2 {
  margin: 0;
  color: #f0f1e9;
  font-family: var(--hs-font-titre, sans-serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: .5px;
}

.hs-help-modal__close {
  width: 38px;
  height: 38px;
  flex: none;
  border: 1px solid #2a3a39;
  background: transparent;
  color: #91a09e;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.hs-help-modal__close:hover {
  color: var(--hs-accent, #49adb6);
  border-color: rgba(73, 173, 182, .65);
}

.hs-help-modal__content {
  flex: 1;
  overflow-y: auto;
  padding: 28px clamp(22px, 5vw, 78px) 52px;
  scrollbar-width: thin;
  scrollbar-color: #2f4a48 #0b1211;
}

/* Ascenseur dédié aux fenêtres Règles / Univers.
   Chrome peut ignorer le thème global sur ce conteneur scrollable :
   on le force ici pour rester cohérent avec le reste de l'interface. */
.hs-help-modal__content::-webkit-scrollbar {
  width: 8px;
}

.hs-help-modal__content::-webkit-scrollbar-track {
  background: #0b1211;
}

.hs-help-modal__content::-webkit-scrollbar-thumb {
  min-height: 42px;
  background: #2f4a48;
  border: 1px solid #0b1211;
}

.hs-help-modal__content::-webkit-scrollbar-thumb:hover {
  background: var(--hs-accent, #49adb6);
}

.hs-help-modal__content::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

/* ==========================================================================
   BIBLIOTHÈQUE PUBLIQUE DES CARTES
   ========================================================================== */

.hs-help-modal--cards .hs-help-modal__dialog {
  inset: 2.5vh 2vw;
}

.hs-help-modal--cards .hs-help-modal__content {
  padding: 22px clamp(14px, 2vw, 32px) 44px;
}

.hs-card-library {
  max-width: 1680px;
  margin: 0 auto;
}

.hs-card-library__intro {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
  color: #aeb8b4;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 14px;
}

.hs-card-library__intro p { margin: 0; }
.hs-card-library__intro strong { color: #eef0e8; }

.hs-card-library__toolbar {
  position: sticky;
  top: -22px;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 150px auto;
  align-items: end;
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px;
  border: 1px solid #263735;
  background: rgba(11, 18, 17, .97);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .28);
}

.hs-card-library__toolbar label {
  display: grid;
  gap: 5px;
  color: #758582;
  font-family: var(--hs-font-mono, monospace);
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hs-card-library__toolbar input,
.hs-card-library__toolbar select {
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #304340;
  border-radius: 0;
  outline: none;
  background: #101a18;
  color: #d5dad2;
  font: 12px var(--hs-font-mono, monospace);
}

.hs-card-library__toolbar input:focus,
.hs-card-library__toolbar select:focus {
  border-color: var(--hs-accent, #49adb6);
}

.hs-card-library__count {
  padding: 0 4px 10px;
  color: var(--hs-accent, #49adb6);
  font-family: var(--hs-font-mono, monospace);
  font-size: 10px;
  white-space: nowrap;
}

.hs-card-library__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.hs-card-library__item {
  min-width: 0;
  padding: 16px;
  border: 1px solid #263735;
  background: linear-gradient(145deg, rgba(22, 34, 32, .92), rgba(10, 17, 16, .96));
  box-shadow: 0 14px 32px rgba(0, 0, 0, .22);
}

.hs-card-library__item-header {
  margin-bottom: 13px;
  padding-bottom: 10px;
  border-bottom: 1px solid #263735;
}

.hs-card-library__item-header h3 {
  margin: 0 0 3px;
  color: #eef0e8;
  font: 500 18px var(--hs-font-titre, sans-serif);
  letter-spacing: .4px;
  text-transform: uppercase;
}

.hs-card-library__item-header p,
.hs-card-library-zoom__header p {
  margin: 0;
  color: #6f827e;
  font: 9px var(--hs-font-mono, monospace);
  letter-spacing: .8px;
  text-transform: uppercase;
}

.hs-card-library__item-body {
  display: grid;
  grid-template-columns: minmax(300px, 1.55fr) minmax(170px, .8fr);
  gap: 16px;
  align-items: start;
}

.hs-card-library__faces,
.hs-card-library-zoom__faces {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  min-width: 0;
}

.hs-card-library__card-button {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.hs-card-library__face-label {
  color: #71807d;
  font: 9px var(--hs-font-mono, monospace);
  letter-spacing: .9px;
  text-transform: uppercase;
}

.hs-card-library__card-host {
  display: block;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .38));
  transition: transform 140ms ease, filter 140ms ease;
}

.hs-card-library__card-button:hover .hs-card-library__card-host {
  transform: translateY(-3px);
  filter: drop-shadow(0 15px 17px rgba(0, 0, 0, .5));
}

.hs-card-library__card-host--normal {
  width: min(230px, 19vw);
  aspect-ratio: 744 / 484;
}

.hs-card-library__card-host--heavy {
  width: min(155px, 13vw);
  aspect-ratio: 750 / 1050;
}

.hs-card-library__card-host > .hs-card {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

.hs-card-library__lore {
  max-height: 260px;
  overflow: auto;
  padding: 12px 13px;
  border-left: 2px solid rgba(73, 173, 182, .42);
  background: rgba(5, 11, 10, .48);
}

.hs-card-library__lore h4 {
  margin: 0 0 8px;
  color: var(--hs-accent, #49adb6);
  font: 600 10px var(--hs-font-mono, monospace);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.hs-card-library__lore-text {
  color: #b8c0bc;
  font: 13px/1.55 "Source Serif 4", Georgia, serif;
}

.hs-card-library__lore-text p { margin: 0 0 10px; }
.hs-card-library__lore-text p:last-child { margin-bottom: 0; }
.hs-card-library__lore-text strong { color: #e4e7de; }

.hs-card-library__empty {
  padding: 48px 20px;
  border: 1px dashed #2b3b39;
  color: #7f8d8a;
  text-align: center;
  font: 12px var(--hs-font-mono, monospace);
}

.hs-card-library__more {
  min-height: 42px;
  display: block;
  margin: 20px auto 0;
  padding: 9px 18px;
  border: 1px solid rgba(73, 173, 182, .55);
  background: rgba(73, 173, 182, .08);
  color: var(--hs-accent, #49adb6);
  cursor: pointer;
  font: 600 10px var(--hs-font-titre, sans-serif);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hs-card-library__more:hover {
  background: rgba(73, 173, 182, .16);
  border-color: var(--hs-accent, #49adb6);
}

.hs-card-library-zoom {
  position: absolute;
  inset: 0;
  /* Toujours au-dessus des fiches Atlas / Habitants / Équipement (z-index 24). */
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 6, 6, .91);
  backdrop-filter: blur(5px);
}

.hs-card-library-zoom__panel {
  width: min(1500px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #38504d;
  background: #0d1514;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .72);
}

.hs-card-library-zoom__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 16px;
  border-bottom: 1px solid #263735;
}

.hs-card-library-zoom__header h3 {
  margin: 0 0 3px;
  color: #f0f1e9;
  font: 500 20px var(--hs-font-titre, sans-serif);
  text-transform: uppercase;
}

.hs-card-library-zoom__body {
  display: grid;
  grid-template-columns: minmax(500px, 1.7fr) minmax(260px, .7fr);
  gap: 24px;
  overflow: auto;
  padding: 22px;
}

.hs-card-library__card-button--zoom .hs-card-library__card-host--normal {
  width: min(500px, 34vw);
}

.hs-card-library__card-button--zoom .hs-card-library__card-host--heavy {
  width: min(330px, 24vw);
}

.hs-card-library__lore--zoom {
  max-height: none;
  font-size: 15px;
}

@media (max-width: 1180px) {
  .hs-card-library__grid { grid-template-columns: 1fr; }
  .hs-card-library__card-host--normal { width: min(300px, 32vw); }
  .hs-card-library__card-host--heavy { width: min(205px, 22vw); }
}

@media (max-width: 760px) {
  .hs-help-modal--cards .hs-help-modal__dialog { inset: 0; }
  .hs-card-library__intro { display: block; }
  .hs-card-library__intro p + p { margin-top: 7px; }
  .hs-card-library__toolbar { grid-template-columns: 1fr 1fr; top: -14px; }
  .hs-card-library__search { grid-column: 1 / -1; }
  .hs-card-library__item-body,
  .hs-card-library-zoom__body { grid-template-columns: 1fr; }
  .hs-card-library__card-host--normal { width: min(42vw, 280px); }
  .hs-card-library__card-host--heavy { width: min(31vw, 205px); }
  .hs-card-library__lore { max-height: none; }
  .hs-card-library-zoom { padding: 0; }
  .hs-card-library-zoom__panel { width: 100%; height: 100%; }
  .hs-card-library-zoom__faces { flex-wrap: wrap; }
  .hs-card-library__card-button--zoom .hs-card-library__card-host--normal { width: min(82vw, 500px); }
  .hs-card-library__card-button--zoom .hs-card-library__card-host--heavy { width: min(62vw, 330px); }
}

.hs-help {
  max-width: 980px;
  margin: 0 auto;
  color: #d9ddd4;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 16px;
  line-height: 1.68;
}

.hs-help h1,
.hs-help h2,
.hs-help h3,
.hs-help h4,
.hs-help h5,
.hs-help h6 {
  color: #f0f1e9;
  font-family: var(--hs-font-titre, "Oswald", sans-serif);
  font-weight: 500;
  line-height: 1.22;
}

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

.hs-help h2 {
  margin: 42px 0 14px;
  padding-bottom: 7px;
  border-bottom: 1px solid #243230;
  font-size: 23px;
}

.hs-help h3 {
  margin: 30px 0 10px;
  color: var(--hs-accent, #49adb6);
  font-size: 18px;
}

.hs-help h4 {
  margin: 24px 0 8px;
  font-size: 15px;
}

.hs-help p {
  margin: 0 0 14px;
}

.hs-help strong {
  color: #f0f1e9;
}

.hs-help em {
  color: #b9c1bd;
}

.hs-help code {
  padding: 1px 5px;
  background: #0a1110;
  color: #d39a56;
  border: 1px solid #23302f;
  font-family: var(--hs-font-mono, monospace);
  font-size: .9em;
}

.hs-help pre {
  overflow-x: auto;
  margin: 18px 0;
  padding: 14px 16px;
  background: #09100f;
  border: 1px solid #23302f;
}

.hs-help pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: #d7ddd4;
}

.hs-help blockquote {
  margin: 18px 0;
  padding: 8px 16px;
  border-left: 3px solid var(--hs-accent, #49adb6);
  background: rgba(73, 173, 182, .05);
  color: #c9d0cc;
}

.hs-help ul,
.hs-help ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

.hs-help li {
  margin: 5px 0;
}

.hs-help hr {
  margin: 30px 0;
  border: 0;
  border-top: 1px solid #263432;
}

.hs-help__table-wrap {
  overflow-x: auto;
  margin: 18px 0 24px;
}

.hs-help table {
  width: 100%;
  border-collapse: collapse;
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

.hs-help th,
.hs-help td {
  padding: 9px 10px;
  border: 1px solid #293735;
  text-align: left;
  vertical-align: top;
}

.hs-help th {
  background: #111c1a;
  color: var(--hs-accent, #49adb6);
  font-family: var(--hs-font-titre, sans-serif);
  font-size: 10px;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.hs-help tr:nth-child(even) td {
  background: rgba(255, 255, 255, .015);
}

.hs-help__loading,
.hs-help__error {
  padding: 30px;
  color: #91a09e;
  font-family: var(--hs-font-mono, monospace);
  font-size: 12px;
  text-align: center;
}

.hs-help__error {
  color: #d78b7f;
}

@media (max-width: 760px) {
  .hs-help-modal__dialog {
    inset: 10px;
  }

  .hs-help-modal__content {
    padding: 22px 18px 40px;
  }

  .hs-help {
    font-size: 15px;
  }

  .hs-help h1 {
    font-size: 27px;
  }
}

/* ==========================================================================
   V1.36 — BIBLIOTHÈQUES PUBLIQUES : ATLAS + HABITANTS
   Même modale et même barre de filtres que la bibliothèque Équipements.
   ========================================================================== */

.hs-help-modal--world .hs-help-modal__dialog {
  inset: 2.5vh 2vw;
}

.hs-world-library {
  max-width: 1680px;
  margin: 0 auto;
}

.hs-world-library__toolbar {
  grid-template-columns: minmax(280px, 1fr) 190px auto;
}

.hs-world-library__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.hs-world-library__item {
  min-width: 0;
  min-height: 260px;
  display: grid;
  grid-template-columns: minmax(190px, .72fr) minmax(0, 1.28fr);
  overflow: hidden;
  border: 1px solid #263735;
  background: linear-gradient(145deg, rgba(22, 34, 32, .92), rgba(10, 17, 16, .96));
  box-shadow: 0 14px 32px rgba(0, 0, 0, .22);
}

.hs-world-library__item--character {
  grid-template-columns: 190px minmax(0, 1fr);
}

.hs-world-library__visuals {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 92px;
  border-right: 1px solid #263735;
  background: #07100f;
}

.hs-world-library__visuals:has(.hs-world-library__image:only-child) {
  grid-template-rows: minmax(0, 1fr);
}

.hs-world-library__image {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, #15211f 0 8px, #0d1715 8px 16px);
  color: #62736f;
  font: 9px var(--hs-font-mono, monospace);
  letter-spacing: .9px;
  text-transform: uppercase;
}

.hs-world-library__image[role="button"] {
  cursor: zoom-in;
}

.hs-world-library__image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 180ms ease, filter 180ms ease;
}

.hs-world-library__image[role="button"]:hover img {
  transform: scale(1.025);
  filter: brightness(1.06);
}

.hs-world-library__image--location {
  min-height: 170px;
}

.hs-world-library__image--map {
  border-top: 1px solid #263735;
}

.hs-world-library__image--map::after {
  content: attr(data-label);
  position: absolute;
  left: 8px;
  bottom: 7px;
  padding: 3px 5px;
  background: rgba(5, 12, 11, .82);
  color: var(--hs-accent, #49adb6);
  font: 7px var(--hs-font-mono, monospace);
  letter-spacing: .9px;
}

.hs-world-library__image--portrait {
  min-height: 300px;
  border-right: 1px solid #263735;
}

.hs-world-library__image--portrait img {
  object-position: center top;
}

.hs-world-library__content {
  min-width: 0;
  padding: 15px 16px 16px;
  display: flex;
  flex-direction: column;
}

.hs-world-library__header {
  margin-bottom: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid #263735;
}

.hs-world-library__header h3 {
  margin: 0 0 4px;
  color: #eef0e8;
  font: 500 19px var(--hs-font-titre, sans-serif);
  letter-spacing: .4px;
  line-height: 1.05;
  text-transform: uppercase;
}

.hs-world-library__header p,
.hs-world-library__function,
.hs-world-library__foot {
  margin: 0;
  color: #71827e;
  font: 9px var(--hs-font-mono, monospace);
  letter-spacing: .55px;
}

.hs-world-library__function {
  margin-bottom: 10px;
  color: var(--hs-accent, #49adb6);
  line-height: 1.45;
}

.hs-world-library__description {
  margin: 0;
  color: #b8c0bc;
  font: 13px/1.5 "Source Serif 4", Georgia, serif;
}

.hs-world-library__facts {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(73, 173, 182, .15);
}

.hs-world-library__facts span {
  min-width: 0;
  padding: 5px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  border-bottom: 1px solid rgba(73, 173, 182, .11);
}

.hs-world-library__facts span:nth-child(odd) {
  padding-right: 10px;
}

.hs-world-library__facts span:nth-child(even) {
  padding-left: 10px;
  border-left: 1px solid rgba(73, 173, 182, .11);
}

.hs-world-library__facts b,
.hs-world-library__facts strong {
  font: 7px var(--hs-font-mono, monospace);
  font-weight: 400;
  letter-spacing: .6px;
  text-transform: uppercase;
}

.hs-world-library__facts b { color: #71827e; }
.hs-world-library__facts .is-yes { color: var(--hs-accent, #49adb6); }
.hs-world-library__facts .is-no { color: #b16517; }

.hs-world-library__caste {
  margin: 0 0 12px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.hs-world-library__caste span {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 5px 7px;
  border: 1px solid rgba(73, 173, 182, .18);
  background: rgba(73, 173, 182, .04);
}

.hs-world-library__caste b {
  color: #71827e;
  font: 7px var(--hs-font-mono, monospace);
  font-weight: 400;
}

.hs-world-library__caste strong {
  color: var(--hs-accent, #49adb6);
  font: 500 16px var(--hs-font-titre, sans-serif);
}

.hs-world-library__foot {
  margin-top: auto;
  padding-top: 11px;
  text-transform: uppercase;
}

.hs-world-library-zoom {
  position: absolute;
  inset: 0;
  z-index: 24;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 6, 6, .93);
  backdrop-filter: blur(5px);
}

.hs-world-library-zoom__panel {
  width: min(1500px, 100%);
  height: min(92vh, 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #38504d;
  background: #0d1514;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .72);
}

.hs-world-library-zoom__header {
  flex: none;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 14px;
  border-bottom: 1px solid #263735;
}

.hs-world-library-zoom__header h3 {
  margin: 0 0 3px;
  color: #f0f1e9;
  font: 500 20px var(--hs-font-titre, sans-serif);
  text-transform: uppercase;
}

.hs-world-library-zoom__header p {
  margin: 0;
  color: #71827e;
  font: 9px var(--hs-font-mono, monospace);
  letter-spacing: .8px;
  text-transform: uppercase;
}

.hs-world-library-zoom__body {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 16px;
  background: #050909;
}

.hs-world-library-zoom__body img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

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

@media (max-width: 760px) {
  .hs-world-library__toolbar { grid-template-columns: 1fr; }
  .hs-world-library__item,
  .hs-world-library__item--character { grid-template-columns: 1fr; }
  .hs-world-library__visuals {
    grid-template-columns: minmax(0, 1fr) 150px;
    grid-template-rows: 220px;
    border-right: 0;
    border-bottom: 1px solid #263735;
  }
  .hs-world-library__visuals:has(.hs-world-library__image:only-child) {
    grid-template-columns: 1fr;
    grid-template-rows: 220px;
  }
  .hs-world-library__image--map {
    border-top: 0;
    border-left: 1px solid #263735;
  }
  .hs-world-library__image--portrait {
    min-height: 280px;
    border-right: 0;
    border-bottom: 1px solid #263735;
  }
  .hs-world-library-zoom { padding: 0; }
  .hs-world-library-zoom__panel { width: 100%; height: 100%; }
}

.hs-world-library__open {
  min-height: 34px;
  margin-top: 12px;
  padding: 7px 10px;
  border: 1px solid rgba(73, 173, 182, .42);
  background: rgba(73, 173, 182, .06);
  color: var(--hs-accent, #49adb6);
  cursor: pointer;
  font: 600 9px var(--hs-font-titre, sans-serif);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hs-world-library__open:hover {
  border-color: var(--hs-accent, #49adb6);
  background: rgba(73, 173, 182, .12);
  color: #eef0e8;
}

.hs-world-library-zoom--sheet .hs-world-library-zoom__panel {
  width: min(1450px, 100%);
}

.hs-world-library-sheet {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(300px, .8fr) minmax(0, 1.35fr);
  gap: 22px;
  overflow: auto;
  padding: 20px;
}

.hs-world-library-sheet__media {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hs-world-library-sheet__media figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid #2b3d3a;
  background: #050909;
  cursor: zoom-in;
}

.hs-world-library-sheet__media figure img {
  display: block;
  width: 100%;
  max-height: 440px;
  object-fit: contain;
}

.hs-world-library-sheet__media figure figcaption {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 6px;
  background: rgba(5, 12, 11, .84);
  color: var(--hs-accent, #49adb6);
  font: 8px var(--hs-font-mono, monospace);
  letter-spacing: .8px;
}

.hs-world-library-sheet__media--portrait figure img {
  max-height: 620px;
  object-fit: contain;
  object-position: center top;
}

.hs-world-library-sheet__caste {
  margin-bottom: 0;
}

.hs-world-library-sheet__text {
  min-width: 0;
  padding-right: 6px;
}

.hs-world-library-sheet__text section + section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #263735;
}

.hs-world-library-sheet__text h4 {
  margin: 0 0 9px;
  color: var(--hs-accent, #49adb6);
  font: 600 10px var(--hs-font-mono, monospace);
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.hs-world-library-sheet__prose,
.hs-world-library-sheet__lead {
  color: #c0c8c4;
  font: 14px/1.62 "Source Serif 4", Georgia, serif;
}

.hs-world-library-sheet__prose p,
.hs-world-library-sheet__lead {
  margin: 0 0 11px;
}

.hs-world-library-sheet__prose p:last-child {
  margin-bottom: 0;
}

.hs-world-library-sheet__mono,
.hs-world-library-sheet__temporal {
  margin: 0;
  color: #879793;
  font: 10px/1.55 var(--hs-font-mono, monospace);
}

.hs-world-library-sheet__temporal {
  margin-bottom: 18px;
  padding: 10px 12px;
  border-left: 2px solid rgba(73, 173, 182, .48);
  background: rgba(73, 173, 182, .05);
}

.hs-world-library-sheet__resources {
  display: grid;
  gap: 2px;
}

.hs-world-library-sheet__resources > div {
  display: grid;
  grid-template-columns: 105px 38px minmax(0, 1fr);
  gap: 9px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(73, 173, 182, .11);
}

.hs-world-library-sheet__resources b,
.hs-world-library-sheet__resources strong,
.hs-world-library-sheet__resources span {
  font: 9px/1.45 var(--hs-font-mono, monospace);
  font-weight: 400;
}

.hs-world-library-sheet__resources b { color: #71827e; text-transform: uppercase; }
.hs-world-library-sheet__resources strong.is-yes { color: var(--hs-accent, #49adb6); }
.hs-world-library-sheet__resources strong.is-no { color: #b16517; }
.hs-world-library-sheet__resources span { color: #b5bfbb; }

@media (max-width: 860px) {
  .hs-world-library-sheet {
    grid-template-columns: 1fr;
  }
  .hs-world-library-sheet__media--portrait figure img {
    max-height: 440px;
  }
}


/* ==========================================================================\n   V1.37 — HABITANTS : ÉQUIPEMENT CANONIQUE EN LECTURE SEULE\n   Reprend la géométrie de l'inventaire personnage, sans D12 ni interaction.\n   ========================================================================== */
.hs-world-library__actions {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.hs-world-library__actions .hs-world-library__open { margin-top: 0; }

.hs-character-equipment {
  display: block;
  padding: 24px;
}
.hs-character-equipment__body {
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 469px minmax(230px, 300px);
  gap: clamp(34px, 5vw, 72px);
  align-items: start;
}
.hs-character-equipment__grid {
  width: 469px;
  display: grid;
  grid-template-columns: repeat(3, 149px);
  gap: 20px 14px;
  align-items: start;
}
.hs-character-equipment .slot-block {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hs-character-equipment .slot-block--mixed { gap: 2px; }
.hs-character-equipment .slot-block--feet {
  grid-column: 1 / span 2;
  align-items: center;
}
.hs-character-equipment .slot-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.hs-character-equipment .equipment-slot {
  position: relative;
  box-sizing: border-box;
  width: 149px;
  display: grid;
  place-items: center;
  overflow: visible;
  background: var(--hs-fond-sombre, #0b1312);
  border: 1px solid #22302f;
}
.hs-character-equipment .equipment-slot::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: -1px;
  left: -1px;
  width: 8px;
  height: 8px;
  border-top: 1px solid var(--hs-accent, #49adb6);
  border-left: 1px solid var(--hs-accent, #49adb6);
  pointer-events: none;
}
.hs-character-equipment .equipment-slot--normal { height: 97.613px; }
.hs-character-equipment .equipment-slot--large {
  height: 207.8px;
  background: var(--hs-surface, #101918);
  border-color: #2a3a39;
}
.hs-character-equipment .equipment-slot--large::after {
  content: "";
  position: absolute;
  z-index: 1;
  right: -1px;
  bottom: -1px;
  width: 8px;
  height: 8px;
  border-right: 1px solid var(--hs-accent, #49adb6);
  border-bottom: 1px solid var(--hs-accent, #49adb6);
  pointer-events: none;
}
.hs-character-equipment .equipment-slot--split {
  background-image: linear-gradient(to bottom, transparent calc(50% - .5px), #22302f calc(50% - .5px), #22302f calc(50% + .5px), transparent calc(50% + .5px));
}
.hs-character-equipment .slot-label {
  min-height: 13px;
  display: grid;
  grid-template-columns: max-content max-content 1fr;
  align-items: baseline;
  column-gap: 6px;
}
.hs-character-equipment .slot-label span {
  color: var(--hs-texte-muted, #71827e);
  font-family: var(--hs-font-titre, sans-serif);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.hs-character-equipment .slot-caste-marker,
.hs-character-equipment .slot-label .slot-caste-marker {
  color: var(--hs-accent, #49adb6);
  font-family: var(--hs-font-mono, monospace);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 13px;
  text-transform: uppercase;
}
.hs-character-equipment .slot-caste-marker--top {
  position: absolute;
  left: 0;
  top: -16px;
  z-index: 3;
  pointer-events: none;
}
.hs-character-equipment .slot-label small {
  justify-self: end;
  color: #94abb5;
  font-family: var(--hs-font-mono, monospace);
  font-size: 9px;
  white-space: nowrap;
}
.hs-character-equipment .slot-label--mixed-bottom > span:first-child { grid-column: 1; }
.hs-character-equipment .slot-label--mixed-bottom .slot-caste-marker--bottom { grid-column: 2; }
.hs-character-equipment .hs-character-equipment__card {
  cursor: zoom-in;
  transition: filter 120ms ease, transform 120ms ease;
}
.hs-character-equipment .hs-character-equipment__card:hover {
  filter: brightness(1.06);
}
.hs-character-equipment__portrait {
  width: min(290px, 100%);
  min-height: 430px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #22302f;
  background: radial-gradient(circle at 50% 38%, rgba(71,97,92,.24), transparent 48%), #0b1111;
}
.hs-character-equipment__portrait .group-inventory__portrait-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 430px;
  max-height: 560px;
  object-fit: contain;
  object-position: center top;
}
.hs-character-equipment__portrait .group-inventory__portrait-placeholder {
  color: var(--hs-texte-muted, #71827e);
  font-family: var(--hs-font-titre, sans-serif);
  font-size: 52px;
  font-weight: 600;
  letter-spacing: 3px;
}
@media (max-width: 900px) {
  .hs-world-library__actions { grid-template-columns: 1fr; }
  .hs-character-equipment__body { grid-template-columns: 469px; }
  .hs-character-equipment__portrait { justify-self: start; }
}
