/* Bibliothèque Comics : le comic book américain, quatre couleurs sur papier journal. Trames de points, encrage épais,
   ombres sans flou, récitatifs jaunes et bulles. Toujours sur papier, comme un vrai fascicule : pas de thème sombre.
   Tout passe par les variables d'app.css, sauf le bandeau de comics.js. */
@font-face { font-family: "Bangers"; src: url("fonts/bangers-latin-400.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Comic Neue"; src: url("fonts/comic-neue-latin-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

body[data-library="comics"], .library-card[href="#/comics"] {
  --ink: #15120e;
  --pop: #ffd21f;
  --sky: #1667c8;
  --bg: #fbf0d2;
  --surface: #fffdf4;
  --surface-2: #f8e8b6;
  --border: #15120e;
  --text: #15120e;
  --text-2: #5c5244;
  --accent: #e2202c;
  --accent-text: #fff;
  --danger: #c01520;
  --logo: #e2202c;
  --shadow: 5px 5px 0 #15120e;
  --shadow-cover: 3px 3px 0 #15120e;
  --radius: 2px;
  --title: "Bangers", Impact, "Arial Narrow", sans-serif;
  --speech: "Comic Neue", "Comic Sans MS", var(--sans);
  color: var(--text);
  color-scheme: light;
}
html:has(body[data-library="comics"]) { background: #fbf0d2; color-scheme: light; }

body[data-library="comics"] {
  background: none;

  /* La trame de points, qui s'efface en descendant */
  &::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(circle, rgb(226 32 44 / 0.3) 1.7px, transparent 1.9px) 0 0 / 10px 10px; mask-image: linear-gradient(205deg, #000, transparent 38%); }
  #theme-toggle { display: none; }

  /* Titres : du lettrage, pas de la typographie */
  :is(h1, h2, h3, .tabs button, .see-all, .choice strong, .dice-verdict, .grimoire-label, .hero-side h2) { font-family: var(--title); font-weight: 400; letter-spacing: 0.035em; }
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.55rem; }
  h3 { font-size: 1.25rem; }

  /* Boutons et champs : encrés, ils s'enfoncent quand on appuie */
  :is(button, .button, input, select) { border-radius: 2px; }
  input, select { border: 2px solid var(--ink); background: #fff; }
  :is(.primary, .pill, .ghost, .danger) { border: 2.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); font: 400 1.02rem/1.25 var(--title); letter-spacing: 0.05em; transition: transform 0.08s, box-shadow 0.08s; }
  :is(.primary, .pill, .ghost, .danger):hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
  :is(.primary, .pill, .ghost, .danger):active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
  .primary, .primary:hover:not(:disabled) { background: var(--accent); border-color: var(--ink); color: #fff; }
  :is(.ghost, .pill) { background: #fff; color: var(--ink); }
  :is(.ghost, .pill):hover:not(:disabled) { background: var(--pop); color: var(--ink); }
  .danger { color: var(--danger); }
  .linkbtn:hover { color: var(--accent); }
  .iconbtn { border-radius: 2px; color: var(--ink); }
  .iconbtn:hover { background: var(--ink); color: var(--pop); }

  /* Barre du haut : le bandeau jaune de couverture */
  .topbar { background: var(--pop); backdrop-filter: none; border-bottom: 3px solid var(--ink); }
  .brand-name { font: 400 1.4rem/1 var(--title); letter-spacing: 0.045em; }
  .brand b { color: var(--accent); }
  .mainnav a { font: 400 1.1rem/1.2 var(--title); letter-spacing: 0.05em; color: var(--ink); border-radius: 0; }
  .mainnav a:hover { color: var(--accent); }
  .mainnav a[aria-current] { background: var(--ink); color: var(--pop); transform: skewX(-7deg); }
  .libbtn { background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 0; box-shadow: 3px 3px 0 var(--ink); font: 400 1.12rem/1 var(--title); letter-spacing: 0.05em; }

  /* Menu des bibliothèques : le bandeau jaune, debout, encré */
  .shelf { background: var(--pop); border-right: 3px solid var(--ink); }
  .shelf-brand { font: 400 1.25rem/1 var(--title); letter-spacing: 0.045em; }
  .shelf-brand b { color: var(--accent); }
  .shelf-title { color: var(--ink); font: 400 0.9rem/1 var(--title); letter-spacing: 0.08em; }
  :is(.shelf-lib, .shelf-item) { color: var(--ink); border-radius: 0; }
  .shelf-lib { font: 400 1.15rem/1.2 var(--title); letter-spacing: 0.05em; }
  :is(.shelf-lib, .shelf-item):hover { background: var(--ink); color: var(--pop); }
  .shelf-lib[aria-current] { background: var(--ink); color: var(--pop); box-shadow: 4px 4px 0 var(--accent); }
  .shelf-lib[aria-current] .icon { color: var(--pop); }
  .shelf-sub { border-left: 2px solid var(--ink); }
  .shelf-sub .shelf-item[aria-current] { color: var(--accent); font-weight: 700; }
  .shelf-count { color: inherit; }
  .shelf-foot { border-top: 2px solid var(--ink); }
  .searchbox input { background: #fff; border-color: var(--ink); border-radius: 0; }
  .searchbox .icon { color: var(--ink); }
  .avatar { background: var(--accent); color: #fff; border: 2.5px solid var(--ink); border-radius: 50%; font-family: var(--title); font-size: 1.1rem; }
  .menu { border: 2.5px solid var(--ink); border-radius: 0; }
  .menu :is(a, button) { border-radius: 0; box-shadow: none; }
  .chip { color: var(--ink); font-weight: 600; border-radius: 0; }
  .chip .icon { color: var(--ink); }
  .chip:hover { background: var(--ink); color: var(--pop); }
  .chip:hover .icon { color: var(--pop); }
  .chip:is([aria-current="true"], [aria-pressed="true"]) { background: var(--accent); border-color: var(--ink); color: #fff; }
  .chip:is([aria-current="true"], [aria-pressed="true"]) .icon { color: #fff; }
  .filter-chips .chip { border: 2px solid var(--ink); background: #fff; }
  .filter-chips .chip:hover { background: var(--ink); }
  .filter-chips .chip:is([aria-current="true"], [aria-pressed="true"]) { background: var(--accent); }

  /* Têtes de section : des récitatifs */
  .section-head h2, .tabs button[aria-selected="true"] { display: inline-block; padding: 0.05rem 0.7rem 0; background: var(--pop); border: 2.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); color: var(--ink); font-size: 1.45rem; transform: rotate(-0.8deg); }
  .tabs { align-items: center; padding: 0.15rem 0.3rem 0.45rem 0.1rem; overflow-y: hidden; }
  .tabs button { padding: 0.05rem 0.7rem 0; font-size: 1.3rem; color: var(--text-2); }
  .tabs button:hover { color: var(--accent); }
  .tabs button[aria-selected="true"]::after { display: none; }
  .section-head .meta { margin-top: 0.55rem; }
  .see-all { font-size: 1.05rem; color: var(--ink); }

  /* Couvertures : des cases */
  .cover { border-radius: 0; outline: 2.5px solid var(--ink); outline-offset: -1px; }
  .card:nth-child(even) .cover { transform: rotate(0.7deg); }
  .card:nth-child(3n) .cover { transform: rotate(-0.7deg); }
  .card:hover .cover { transform: translate(-3px, -4px) rotate(-1.4deg); box-shadow: 7px 8px 0 var(--accent); }
  .eyebrow { font-weight: 700; color: var(--text-2); }
  .eyebrow::before { border-radius: 0; transform: rotate(45deg); }
  .card-title { font-weight: 700; }
  .badge { border: 2px solid var(--ink); border-radius: 0; background: var(--pop); color: var(--ink); font-weight: 700; backdrop-filter: none; }
  :is(.bar, .cover-progress) { height: 7px; border: 1.5px solid var(--ink); border-radius: 0; background: #fff; }
  :is(.bar, .cover-progress) > i { background: var(--accent); border-radius: 0; }
  .rail-arrow { border: 2.5px solid var(--ink); border-radius: 0; box-shadow: 3px 3px 0 var(--ink); background: var(--pop); }

  /* Accueil : pleine page sur fond de rayons */
  .hero { border: 4px solid var(--ink); border-radius: 0; box-shadow: var(--shadow); background: repeating-conic-gradient(from 3deg at 12% 45%, #ffe16e 0 8deg, var(--pop) 8deg 16deg); }
  .hero-art { display: none; }
  .hero-body h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1; color: var(--accent); text-shadow: 2px 2px 0 var(--ink); }
  .hero .eyebrow, .hero .hero-sub, .hero .hero-desc, .hero .hero-progress { color: var(--ink); font-weight: 600; }
  .hero-cover .cover { box-shadow: 6px 6px 0 var(--ink); }
  .hero-side { padding: 0.9rem 1rem; background: var(--surface); border: 2.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
  .hero-side h2 { font-size: 1.1rem; text-transform: none; color: var(--ink); }
  .welcome-die { color: var(--ink); filter: drop-shadow(5px 5px 0 var(--ink)); }
  .welcome-die svg { fill: var(--accent); stroke-width: 1; }

  /* Le comic du jour : une case bleue */
  .grimoire { position: relative; padding: 2rem; border: 4px solid var(--ink); box-shadow: var(--shadow); background: radial-gradient(circle, rgb(255 255 255 / 0.2) 1.8px, transparent 2px) 0 0 / 9px 9px, var(--sky); color: #fff; }
  .grimoire h2 { font: 400 clamp(2.2rem, 4.6vw, 3.6rem)/1 var(--title); letter-spacing: 0.03em; color: var(--pop); text-shadow: 3px 3px 0 var(--ink); }
  .grimoire h2 a:hover { color: #fff; }
  .grimoire .hero-sub { color: #fff; font-weight: 600; }
  .grimoire-desc { font: 1rem/1.5 var(--sans); color: #fff; }
  .grimoire-label { position: absolute; left: -4px; top: -4px; gap: 0.4rem; padding: 0.1rem 0.8rem 0; background: var(--pop); border: 3px solid var(--ink); color: var(--ink); font-size: 1.15rem; text-transform: none; }
  .grimoire-body { padding-top: 0.8rem; }
  .grimoire-cover .cover { box-shadow: 7px 7px 0 var(--ink); }

  /* Ce soir, on lit quoi ? */
  .choice { border: 2.5px solid var(--ink); border-radius: 0; background: var(--surface); box-shadow: 3px 3px 0 var(--ink); }
  .choice strong { font-size: 1.15rem; }
  .choice:hover { background: var(--surface-2); }
  .choice[aria-selected="true"] { background: var(--accent); border-color: var(--ink); color: #fff; }
  .feature { border: 2.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
  .feature h3 a:hover { color: var(--accent); }
  .game:hover strong { color: var(--accent); }

  /* Le coup du sort : l'onomatopée qui claque */
  .dice { border: 4px solid var(--ink); border-radius: 0; box-shadow: var(--shadow); background: radial-gradient(circle, rgb(226 32 44 / 0.2) 1.8px, transparent 2px) 0 0 / 9px 9px, var(--surface); }
  .dice-intro h2 { font-size: 1.7rem; }
  .d20 { width: 132px; height: 132px; color: var(--ink); filter: drop-shadow(4px 4px 0 var(--ink)); }
  .d20 svg { fill: var(--pop); stroke-width: 0.8; }
  .d20-face { top: 50%; font: 400 1.5rem/1 var(--title); letter-spacing: 0.03em; color: var(--accent); transform: translateY(-50%) rotate(-7deg); }
  .d20:hover { transform: rotate(-5deg) scale(1.07); }
  .d20.rolling { animation: cx-shake 0.75s linear; }
  .dice-verdict { font-size: 1.4rem; color: var(--accent); }

  /* Vide, ou rien trouvé */
  .empty { padding: 2.2rem 1rem; color: var(--text-2); }
  .empty-icon { width: 92px; height: 92px; color: var(--ink); filter: drop-shadow(4px 4px 0 var(--ink)); }
  .empty-icon svg { fill: var(--pop); stroke-width: 0.9; }
  .loading-die { color: var(--accent); }

  /* Explorateur */
  .explore-head h1 { font-size: 2.6rem; color: var(--accent); text-shadow: 2px 2px 0 var(--ink); }
  .segmented { border: 2.5px solid var(--ink); border-radius: 0; }
  .segmented button { border-radius: 0; box-shadow: none; }
  .segmented button[aria-pressed="true"] { background: var(--ink); color: var(--pop); }
  .grid-heading { border-top: 3px solid var(--ink); font-size: 1.4rem; }
  .table-wrap { border: 2.5px solid var(--ink); border-radius: 0; }
  .list th { font: 400 0.98rem var(--title); letter-spacing: 0.05em; text-transform: none; color: var(--ink); }
  .list td, .list th { border-color: rgb(21 18 14 / 0.25); }
  .list .group-row th { background: var(--pop); }
  .dot { border-radius: 0; transform: rotate(45deg); }

  /* Fiche et fenêtres */
  dialog { border: 3px solid var(--ink); border-radius: 0; }
  .sheet { border-width: 0 0 0 4px; border-radius: 0; }
  .sheet-hero { background: radial-gradient(circle, rgb(21 18 14 / 0.16) 1.6px, transparent 1.8px) 0 0 / 8px 8px, var(--pop); }
  .sheet-art { display: none; }
  .sheet-hero .cover { box-shadow: 6px 6px 0 var(--ink); }
  .sheet-main h2 { font-size: 2rem; line-height: 1.05; }
  .sheet-close { border: 2.5px solid var(--ink); background: #fff; }
  .facts { border-top: 3px solid var(--ink); }
  .sheet-keywords span { border-radius: 0; background: var(--surface-2); color: var(--ink); }
  .file:is(:hover, [aria-current="true"]) { border-color: var(--ink); border-radius: 0; }
  .upload { border: 2.5px solid var(--ink); border-radius: 0; }
  .drop-hint { border: 5px dashed var(--ink); border-radius: 0; font: 400 2.4rem var(--title); letter-spacing: 0.04em; color: var(--accent); }
}
@keyframes cx-shake {
  0%, 100% { transform: rotate(0) scale(1); }
  15% { transform: rotate(-9deg) scale(1.16); }
  35% { transform: rotate(8deg) scale(0.92); }
  55% { transform: rotate(-6deg) scale(1.12); }
  75% { transform: rotate(5deg) scale(0.97); }
}

/* Bandeau de couverture : la manchette, le numéro dans le coin, un récitatif et une bulle */
.cx-mast { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 0.6rem 1.4rem; align-items: center; padding: 1.1rem 1.4rem 1.2rem; overflow: hidden; border: 4px solid var(--ink); box-shadow: var(--shadow); background: radial-gradient(circle, rgb(255 255 255 / 0.22) 2px, transparent 2.2px) 0 0 / 10px 10px, var(--accent); }
.cx-corner { grid-row: 1 / span 2; display: grid; justify-items: center; align-content: center; min-width: 92px; min-height: 92px; padding: 0.4rem 0.6rem; background: #fff; border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); font-weight: 700; text-transform: uppercase; font-size: 0.72rem; }
.cx-corner strong { font: 400 1.7rem/1 var(--title); letter-spacing: 0.03em; color: var(--accent); }
.cx-logo { display: flex; align-items: baseline; gap: 0.7rem; margin: 0; font: 400 clamp(3.4rem, 8.5vw, 6.2rem)/0.92 var(--title); letter-spacing: 0.03em; color: var(--pop); text-shadow: 4px 4px 0 var(--ink); transform: rotate(-1.4deg); transform-origin: 0 50%; }
.cx-logo small { font-size: 0.42em; color: #fff; }
.cx-caption { grid-column: 2; justify-self: start; margin: 0; padding: 0.15rem 0.7rem; background: var(--pop); border: 2.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); font: 700 0.9rem/1.25 var(--speech); }
.cx-bubble { grid-column: 3; grid-row: 1 / span 2; position: relative; align-self: center; max-width: 250px; margin: 0; padding: 0.85rem 1.1rem; background: #fff; border: 3px solid var(--ink); border-radius: 50% / 46%; font: 700 0.92rem/1.25 var(--speech); text-align: center; text-transform: uppercase; }
.cx-bubble::before, .cx-bubble::after { content: ""; position: absolute; left: 18px; bottom: -18px; width: 0; height: 0; border-style: solid; border-width: 18px 16px 0 0; border-color: var(--ink) transparent transparent; transform: skewX(24deg); }
.cx-bubble::after { left: 21px; bottom: -12px; border-width: 13px 11px 0 0; border-top-color: #fff; }
.cx-stamp { position: absolute; right: 0.5rem; bottom: 0.3rem; padding: 0 0.3rem; color: #fff; font: 700 0.66rem/1.3 var(--speech); letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.85; }

/* Carte sur la page de choix */
.library-card[href="#/comics"] { position: relative; border: 3px solid var(--ink); border-radius: 0; box-shadow: var(--shadow); background: linear-gradient(to bottom, transparent 40%, var(--surface) 66%), radial-gradient(circle, rgb(226 32 44 / 0.26) 1.7px, transparent 1.9px) 0 0 / 9px 9px, var(--surface); }
.library-card[href="#/comics"]:hover { transform: translate(-2px, -3px) rotate(-0.6deg); box-shadow: 8px 8px 0 var(--ink); }
.library-card[href="#/comics"] strong { font: 400 2rem/1 var(--title); letter-spacing: 0.04em; color: var(--accent); }
.library-card[href="#/comics"] .library-count { color: var(--ink); font-weight: 700; }
.library-card[href="#/comics"] .library-empty { color: var(--ink); filter: drop-shadow(4px 4px 0 var(--ink)); }
.library-card[href="#/comics"] .library-empty svg { fill: var(--pop); stroke-width: 0.9; }
.library-card[href="#/comics"] .cover { border-radius: 0; outline: 2px solid var(--ink); outline-offset: -1px; }

@media (max-width: 760px) {
  body[data-library="comics"] {
    h1 { font-size: 1.9rem; }
    .hero-body h1 { font-size: 1.7rem; }
    .grimoire { padding: 1.2rem; }
    .grimoire-body { padding-top: 0.6rem; }
    .tabs button, .section-head h2, .tabs button[aria-selected="true"] { font-size: 1.15rem; }
    .d20 { width: 108px; height: 108px; }
  }
  .cx-mast { grid-template-columns: auto minmax(0, 1fr); padding: 0.8rem 0.8rem 1.4rem; gap: 0.6rem 0.8rem; }
  .cx-corner { grid-row: auto; min-width: 66px; min-height: 66px; padding: 0.25rem; }
  .cx-corner strong { font-size: 1.2rem; }
  .cx-logo { flex-wrap: wrap; gap: 0 0.5rem; font-size: 3.2rem; text-shadow: 3px 3px 0 var(--ink); }
  .cx-logo small { text-shadow: 1.5px 1.5px 0 var(--ink); }
  .cx-caption { grid-column: 1 / -1; }
  .cx-bubble { grid-column: 1 / -1; grid-row: auto; justify-self: end; max-width: none; padding: 0.6rem 1rem; }
  .cx-bubble::before, .cx-bubble::after { display: none; }
}

/* Lecteur : le fascicule ouvert sur fond bleu nuit, les notes sont des bulles */
body[data-library="comics"] {
  &.reading { background: var(--ink); }
  &.reading::before { display: none; }
  :is(.rd-stage, .rd-opening) { background: radial-gradient(circle, rgb(255 255 255 / 0.07) 1.7px, transparent 1.9px) 0 0 / 11px 11px, #13233f; }
  .rd-opening p { color: #fff; font: 400 1.5rem var(--title); letter-spacing: 0.04em; }
  .rd-opening img { box-shadow: 7px 7px 0 var(--ink); outline: 3px solid var(--ink); }
  .rd-top { background: var(--pop); border-bottom: 3px solid var(--ink); }
  .rd-home { color: var(--ink); font-weight: 700; }
  .rd-title { border-left: 3px solid var(--ink); }
  .rd-title strong { font: 400 1.3rem/1.1 var(--title); letter-spacing: 0.035em; }
  .rd-title span, .rd-where { color: var(--ink); }
  .rd-meter { height: 6px; background: #fff; border-bottom: 2px solid var(--ink); }
  .rd-meter span { background: var(--accent); }
  .rd-side { border-right: 3px solid var(--ink); }
  .rd-panel { border-left: 2px solid var(--ink); }
  .rd-panel-head h2 { font-size: 1.25rem; }
  .rd-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--pop); }
  .thumb { border-radius: 0; }
  .thumb.current { border-color: var(--accent); }
  .pdfViewer .canvasWrapper { box-shadow: 6px 6px 0 #000; outline: 2px solid #000; }
  :is(.rd-dock, .rd-tools, .rd-menu, .rd-bubble, .rd-editor) { border: 2.5px solid var(--ink); border-radius: 0; box-shadow: 4px 4px 0 var(--ink); }
  .rd-dock .iconbtn[aria-pressed="true"] { background: var(--ink); color: var(--pop); }
  .rd-page { background: #fff; border: 2px solid var(--ink); border-radius: 0; }
  .rd-zoom, .rd-tool { border-radius: 0; box-shadow: none; }
  .rd-tool[aria-pressed="true"] { background: var(--ink); color: var(--pop); }
  .rd-menu-row button { border: 2px solid var(--ink); border-radius: 0; box-shadow: none; }
  .rd-menu-row button[aria-pressed="true"] { background: var(--ink); color: var(--pop); }
  .rd-sep { width: 2px; background: var(--ink); }
  .rd-toast { background: var(--pop); color: var(--ink); border: 2.5px solid var(--ink); border-radius: 0; box-shadow: 3px 3px 0 var(--ink); font: 700 0.9rem/1.3 var(--speech); }
  .rd-tip { border-radius: 0; }
  .mark-chip { border-radius: 0; box-shadow: none; }

  /* Le point : une petite étoile d'impact */
  .note-note { --seal: #1667c8; }
  .note-perso { --seal: #e2202c; }
  .note-arc { --seal: #0a8a4c; }
  .note-case { --seal: #f08400; }
  .note-replique { --seal: #8a2fc9; }
  .note-reference { --seal: #0894b3; }
  .note-secret { --seal: #15120e; }
  .pin { width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 0; background: none; box-shadow: none; filter: drop-shadow(1px 0 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 1px 0 #fff) drop-shadow(0 -1px 0 #fff) drop-shadow(1.5px 1.5px 0 var(--ink)); }
  .pin::after { content: ""; position: absolute; inset: 0; background: var(--seal); clip-path: polygon(50% 0, 62% 26%, 92% 12%, 78% 40%, 100% 50%, 78% 60%, 92% 88%, 62% 74%, 50% 100%, 38% 74%, 8% 88%, 22% 60%, 0 50%, 22% 40%, 8% 12%, 38% 26%); }
  .pin.small { width: 13px; height: 13px; margin: -6.5px 0 0 -3px; }

  /* La bulle et sa queue */
  .slip-threads path { fill: #fff; stroke: var(--ink); stroke-width: 2; stroke-dasharray: none; stroke-linejoin: round; opacity: 0.85; }
  .slip-threads path.lit { opacity: 1; }
  .slip { --ink: #15120e; padding: 0.6rem 0.95rem 0.8rem; font: 700 0.86rem/1.24 var(--speech); transform: none; filter: drop-shadow(3px 3px 0 rgb(0 0 0 / 0.75)); }
  .slip::before { background: #fff; border: 2.5px solid var(--ink); border-radius: 20px; clip-path: none; }
  .slip[data-side="left"]::after, .slip[data-side="right"]::after { content: ""; position: absolute; top: 14px; width: 4px; height: 15px; background: #fff; }
  .slip[data-side="right"]::after { left: 0; }
  .slip[data-side="left"]::after { right: 0; }
  .slip:is(.lit, .writing) { filter: drop-shadow(5px 5px 0 var(--seal)); }
  .slip-seal { width: 26px; height: 26px; margin: -1.05rem 0 0 -1.25rem; border: 2px solid var(--ink); border-radius: 50%; background: var(--seal); color: #fff; box-shadow: 2px 2px 0 var(--ink); }
  .slip-name { color: var(--seal); font: 400 0.92rem/1 var(--title); letter-spacing: 0.06em; text-transform: none; }
  .slip textarea { text-transform: uppercase; }
  .slip-quote { font: 700 0.72rem/1.3 var(--speech); text-transform: none; }
  .slip-trash:hover { color: var(--accent); }
  .rd-seal { border: 2px solid var(--ink); border-radius: 50%; background: var(--seal); box-shadow: none; }
  .rd-seal[aria-pressed="true"] { outline: 2.5px solid var(--accent); outline-offset: 1px; }
  .rd-type-name { font: 700 0.86rem/1.2 var(--speech); }
  .pdfViewer[data-tool="note"] .page { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 24 24' fill='%23fff' stroke='%2315120e' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M12 3c5 0 9 3 9 7s-4 7-9 7c-1 0-2-.1-2.9-.4L3 21l1.7-5.1C3.7 14.5 3 12.8 3 10c0-4 4-7 9-7z'/%3E%3C/svg%3E") 3 27, crosshair; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-library="comics"] .d20.rolling { animation: none; }
}
