html { scroll-padding-top:0; }
body main.cg-library {
  --ink: #223337;
  --paper: #f8f6ef;
  --line: #d8d3c5;
  --rail: #1b3036;
  display: grid;
  grid-template-columns: clamp(222px,19vw,300px) minmax(0,1fr);
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  text-align: left;
  font: 400 1rem/1.5 'Hope Launch Sans', Arial, sans-serif;
}
.cg-library * { box-sizing: border-box; }
.cg-library :is(h1,h2,h3,p,figure,ul) { margin: 0; padding: 0; }
.cg-library a { color: inherit; text-decoration: none; }
.cg-library a:focus-visible,.cg-library summary:focus-visible { outline: 3px solid #bc9252; outline-offset: 3px; }
body .cg-library .cg-side {
  margin:0;
  padding:0;
  border:0;
  border-right:1px solid #847652;
  border-radius:0;
  background:var(--rail);
  color:#f1efe4;
  min-width:0;
}
.cg-directory {
  position:sticky;
  top:72px;
  display:flex;
  flex-direction:column;
  width:100%;
  padding:0;
  border:0;
  border-radius:0;
  background:var(--rail);
}
.cg-directory>summary {
  list-style:none;
  display:block;
  padding:23px clamp(16px,2vw,31px) 14px;
  color:#dcc69b;
  font:700 .78rem/1.5 'Hope Launch Sans',Arial,sans-serif;
  text-transform:uppercase;
  letter-spacing:.11em;
  cursor:pointer;
}
.cg-directory>summary::-webkit-details-marker { display:none; }
.cg-directory>summary::after { content:""; display:inline-block; margin:0 0 3px 9px; width:6px; height:6px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(45deg); }
.cg-directory[open]>summary::after { transform:rotate(225deg); margin-bottom:0; }
.cg-side-scroll {
  max-height:calc(100dvh - 139px);
  overflow:auto;
  overscroll-behavior:contain;
  padding:0 clamp(15px,1.8vw,27px) 26px;
  scrollbar-width:thin;
  scrollbar-color:#83928d #1b3036;
}
.cg-side nav.cg-groups,.cg-side nav.cg-useful { display:block; position:static; width:auto; margin:0; padding:0; border:0; background:none; }
.cg-side .cg-group { padding:5px 0 9px; border-top:1px solid #ffffff1a; }
.cg-side .cg-group-title {
  display:flex;
  align-items:center;
  gap:9px;
  min-height:40px;
  margin:3px 0;
  padding:2px 4px;
  border:0;
  background:transparent;
  color:#fcf8e8;
  font-weight:700;
  line-height:1.2;
}
.cg-side .cg-group-title[aria-current="location"] { color:#f6d491; }
.cg-group-title img { flex:0 0 27px; width:27px; height:27px; object-fit:contain; }
.cg-side .cg-group ul { list-style:none; padding-left:17px; margin-left:16px; border-left:1px solid #66746b; }
.cg-side .cg-group li { margin:0; padding:0; }
.cg-side .cg-group li a,.cg-side .cg-useful>a { display:block; padding:4px 1px; line-height:1.35; color:#d4dfda; font-size:.88rem; }
.cg-side a:hover,.cg-side a:focus-visible { color:#fff1cd; text-decoration:underline; text-underline-offset:3px; }
.cg-side nav.cg-useful { padding:13px 4px 0; border-top:1px solid #ffffff26; }
.cg-useful h2 { color:#decda8; font:700 .89rem/1.5 'Hope Launch Sans',Arial,sans-serif; margin:0 0 5px; }
.cg-library .cg-content { min-width:0; width:100%; }
.cg-library .cg-cover {
  display:grid;
  grid-template-columns:minmax(270px,.85fr) minmax(0,1.15fr);
  align-items:stretch;
  width:100%;
  min-height:245px;
  margin:0;
  padding:0;
  position:relative;
  isolation:isolate;
  z-index:0;
  overflow:hidden;
  border:0;
  border-radius:0;
  border-bottom:1px solid #bcab84;
  box-shadow:none;
  background:#efe3c9;
  color:#273733;
}
.cg-cover-text { align-self:center; padding:32px 12px 32px clamp(24px,3.8vw,68px); }
.cg-library .cg-cover h1,.cg-library .cg-chapter-heading h2 { font-family:Georgia,'Times New Roman',serif; letter-spacing:-.045em; text-transform:none; }
.cg-library .cg-cover h1 { color:#203737; font-size:clamp(3rem,5.3vw,5.3rem); font-weight:500; line-height:.94; margin:0 0 15px; }
.cg-library .cg-cover h1 em { font:italic 500 1em/1.08 Georgia,serif; color:#76542a; }
.cg-library .cg-cover p { max-width:38ch; color:#394b49; font:500 1.02rem/1.55 'Hope Launch Sans',Arial,sans-serif; }
.cg-library .cg-cover figure { align-self:stretch; position:relative; margin:0; }
.cg-cover figure img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:52% 47%; mix-blend-mode:multiply; }
.cg-cover figure::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,#efe3c9,rgba(239,227,201,0) 32%),linear-gradient(0deg,#38342626,transparent 30%); pointer-events:none; }
.cg-library .cg-cover figcaption { position:absolute; z-index:1; bottom:15px; right:18px; background:#213537f0; border:1px solid #c7b58c; border-radius:5px; color:#fff8df; font-size:.86rem; }
.cg-cover figcaption a { display:block; padding:7px 12px; }
.cg-cover figcaption a:hover { text-decoration:underline; }
.cg-library .cg-chapters { width:100%; max-width:1440px; margin:auto; }
.cg-library .hg-section { --shade:#e9ecda; --rule:#b8c099; --accent:#3e583e; padding:clamp(25px,3.2vw,50px) clamp(23px,3.8vw,68px); scroll-margin-top:75px; border-bottom:1px solid var(--line); }
.cg-library #combats { --shade:#eddfd5; --rule:#c5a78c; --accent:#7a4b34; background:#f6efe7; }
.cg-library #ateliers { --shade:#dfebe5; --rule:#a4bdb1; --accent:#335c53; background:#eff3ef; }
.cg-library #exploration { --shade:#ece3ce; --rule:#beac84; --accent:#75592c; background:#f5f0e5; }
.cg-chapter-heading { display:flex; align-items:center; gap:14px; margin-bottom:20px; }
.cg-chapter-heading>img { width:46px; height:46px; object-fit:contain; padding:5px; background:var(--shade); border:1px solid var(--rule); border-radius:9px; flex:none; }
.cg-library .cg-chapter-heading h2 { color:var(--ink); font-size:clamp(1.8rem,2.7vw,2.8rem); font-weight:500; line-height:1.12; margin:0 0 3px; }
.cg-chapter-heading p { color:#4c5a55; font-size:.97rem; line-height:1.45; }
@media(min-width:1100px) {
  .cg-library .hg-section {
    position:relative;
    isolation:isolate;
  }
  .cg-library .hg-section::before {
    content:"";
    position:absolute;
    top:0;
    right:0;
    width:26%;
    height:105px;
    z-index:-1;
    pointer-events:none;
    opacity:.32;
    background:var(--chapter-scene) var(--scene-position,center)/cover no-repeat;
    mask-image:linear-gradient(90deg,transparent,#000 50%),linear-gradient(0deg,transparent,#000 65%);
    mask-composite:intersect;
  }
  #premiers-pas { --chapter-scene:url('/assets/features/incarnam-terrain.png'); --scene-position:50% 43%; }
  #combats { --chapter-scene:url('/assets/guides18/arene-12224.jpg'); }
  #ateliers { --chapter-scene:url('/assets/features/galet-rutilant.png'); }
  #ateliers.hg-section::before { background-size:83px; background-position:68% center; opacity:.21; }
  #exploration { --chapter-scene:url('/assets/guides18/foire-cartes.jpg'); }
}
.cg-library .hg-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:clamp(12px,1.55vw,26px); }
.cg-library .hg-pair { grid-template-columns:repeat(2,minmax(0,1fr)); }
.cg-library .hg-card { display:flex; flex-direction:column; overflow:hidden; min-width:0; border:1px solid #cdcabc; border-radius:9px; background:#fffdf8; box-shadow:0 3px 12px #27373708; text-align:left; }
.cg-library .hg-card:hover { border-color:var(--accent); box-shadow:0 5px 15px #27373715; }
.cg-library .hg-card:hover h3 { text-decoration:underline; text-underline-offset:3px; }
.hg-art { display:flex; align-items:center; justify-content:center; width:100%; height:clamp(124px,11vw,175px); overflow:hidden; background:var(--shade); border-bottom:1px solid #d8d1be; }
.hg-art img { min-width:0; min-height:0; width:100%; height:100%; object-fit:cover; display:block; }
.hg-art-items img { object-fit:contain; width:28%; height:85%; }
.hg-art-items img:nth-child(2) { height:96%; }
.hg-art-classes { background:#d4e0d6; }
.hg-art-classes img { align-self:end; }
.hg-art-journal img { object-position:50% 32%; }
.hg-art-interface { padding:7px; background:#283d3c; }
.hg-art-craft { padding:8px; background:#dedfcc; }
.hg-art-interface img,.hg-art-craft img,.hg-art-seal img { object-fit:contain; }
.hg-art-seal img { height:70%; width:70%; }
.hg-card-copy { padding:14px clamp(13px,1.3vw,21px) 18px; }
.cg-library .hg-card-copy h3 { color:#203336; font:750 clamp(1.08rem,1.4vw,1.35rem)/1.2 'Hope Launch Sans',Arial,sans-serif; letter-spacing:-.025em; margin:0 0 7px; }
.cg-library .hg-card-copy p { color:#465754; font-size:.95rem; line-height:1.5; }
@media(max-width:1090px) {
  .cg-library .hg-grid,.cg-library .hg-pair { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .cg-library .hg-grid:not(.hg-pair) .hg-card:last-child { grid-column:1/-1; display:grid; grid-template-columns:1fr 1fr; align-items:center; }
  .cg-library .hg-grid:not(.hg-pair) .hg-card:last-child .hg-art { border:0; min-height:108px; height:100%; max-height:140px; }
}
@media(max-width:900px) { .cg-directory { top:62px; } }
@media(max-width:780px) {
  body main.cg-library { display:block; }
  .cg-library .cg-side { position:sticky; top:62px; z-index:4; border-right:0; border-bottom:1px solid #8d7b55; }
  .cg-directory { position:static; }
  .cg-directory>summary { padding:12px 20px; min-height:44px; }
  .cg-side-scroll { max-height:min(58dvh,450px); padding:0 20px 12px; }
  .cg-side nav.cg-groups { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 16px; }
  .cg-side nav.cg-useful { display:flex; align-items:baseline; flex-wrap:wrap; gap:0 16px; }
  .cg-library .hg-section { scroll-margin-top:113px; }
  .cg-library .cg-cover { grid-template-columns:1fr 1fr; }
}
@media(max-width:560px) {
  .cg-library .cg-cover { display:flex; flex-direction:column; }
  .cg-cover-text { padding:25px 20px 18px; align-self:stretch; }
  .cg-library .cg-cover h1 { font-size:clamp(2.6rem,9.25vw,3.4rem); margin-bottom:9px; }
  .cg-cover h1 br { display:none; }
  .cg-cover h1 em::before { content:" "; }
  .cg-library .cg-cover figure { height:125px; }
  .cg-cover figure::after { background:linear-gradient(180deg,#efe3c9 0%,transparent 40%); }
  .cg-library .hg-section { padding:25px 16px; }
  .cg-chapter-heading { gap:9px; margin-bottom:14px; }
  .cg-chapter-heading>img { width:39px; height:39px; }
  .cg-library .hg-grid,.cg-library .hg-pair { grid-template-columns:1fr; }
  .cg-library .hg-grid:not(.hg-pair) .hg-card:last-child { display:flex; }
  .cg-library .hg-grid .hg-art,.cg-library .hg-grid:not(.hg-pair) .hg-card:last-child .hg-art { aspect-ratio:2.16; height:auto; min-height:0; max-height:none; }
}
