/* /perso and /carnet on a computer: everything on one screen, no page scroll and no list to scroll (owner, 2026-11-05).
   Only what carries .pp-fit (the /perso grid) or .cn-fit (the diary) changes: the same character window over /map, the
   garage and storage keep charwin.css. perso/fit.js measures and picks the density. Same media query there: under it
   (phones, small tablets, very short windows) the page stacks and scrolls normally. */
.cw-tab[data-t="past"] { display: none; }
.cn-pager { display: none; }
.pp-ms-s { display: none; }
/* a phone or a small window scrolls the page, never a list inside it */
.pp-fit .cw-list { max-height: none; overflow: visible; }

@media (min-width: 1101px) and (min-height: 560px) {
  /* ---- the frame */
  body:has(.pp-fit, .cn-fit) .zc-foot { display: none; }
  body:has(.pp-fit, .cn-fit) .zc-page ~ main { padding-top: 8px; padding-bottom: 0; min-height: 0; }
  body:has(.pp-fit, .cn-fit) .zc-page .wrap { max-width: none; }
  /* the floating Chat button would sit on the content: while closed it goes in the banner row */
  body:has(.pp-fit, .cn-fit) .zc-chat.float:not(.open) { top: calc(var(--zc-navh) + 13px); bottom: auto; right: 170px; }
  body:has(.pp-fit, .cn-fit) .zc-chat.float:not(.open) .zc-chat-tab { padding: 3px 12px 3px 5px; font-size: 14px; }
  body:has(.pp-fit, .cn-fit) .zc-chat.float:not(.open) .zc-chat-tab img { width: 24px; height: 24px; }

  .zc-page ~ main:has(#app > .zc-empty) { min-height: calc(100vh - 306px); }   /* a blank diary: the footer stays, no scroll */
  /* ---- /perso: 3D model above the file on the left, the window takes the rest */
  #app:has(.pp-fit) { max-width: none; }
  .pp-grid.pp-fit { height: var(--pp-h, 600px); gap: 12px; align-items: stretch; grid-template-columns: 230px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "v c" "f c"; }
  .pp-fit > .pp-v3d, .pp-fit > .pp-file { position: static; min-height: 0; }
  .pp-grid.pp-fit.pp-side { grid-template-columns: 240px 204px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); grid-template-areas: "v f c"; }
  .pp-fit.pp-side > .pp-file { overflow: hidden; }
  .pp-grid.pp-fit.pp-side.pp-nofile { grid-template-columns: 240px minmax(0, 1fr); grid-template-areas: "v c"; }
  .pp-fit.pp-side.pp-nofile > .pp-file { display: none; }
  .pp-fit > .pp-v3d { display: flex; }
  .pp-fit .v3d { flex: 1; min-width: 0; display: flex; flex-direction: column; margin: 0; }
  .pp-fit .v3d-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .pp-fit .v3d-stage { flex: 1; min-height: 0; height: auto; }
  .pp-fit .v3d-bar { padding: 4px 8px; gap: 8px; }
  .pp-fit .v3d-hint { font-size: 11.5px; line-height: 1.15; }
  .pp-fit .v3d-note { padding: 0 8px 6px; font-size: 12px; }
  .pp-fit > .pp-main { min-height: 0; display: flex; }
  .pp-fit #charwin { flex: 1; min-width: 0; display: flex; }
  .pp-fit #charwin > .cw { flex: 1; min-width: 0; display: flex; flex-direction: column; margin: 0; }
  .pp-fit .cw-body-wrap { flex: 1; min-height: 0; min-width: 0; padding: 8px 12px; }
  .pp-fit .cw-body-wrap.pp-over { overflow-y: auto; scrollbar-width: thin; }   /* last resort: fit.js could not make it fit */
  .pp-past-sec { display: none; }
  /* names still cut: the row gives up its words and its town sign, never its tabs (Bastha 2026-11-08, site rule "never hide the navigation") */
  body.pp-noban .zc-page .zc-page-txt, body.pp-noban .zc-page .zc-town, body.pp-noban .zc-page .zc-page-i { display: none; }
  /* ---- Santé: fit.js fitHealth steps .bl-s1 .. .bl-s5 until the cards, the gauges and the body all hold */
  .pp-fit .bl.bl-wideb .bl-main { grid-template-columns: 262px minmax(0, 1fr) 312px; }
  .pp-fit .bl.bl-wideb .bl-bodyc { display: grid; grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 2px 8px; align-items: start; }
  .pp-fit .bl.bl-wideb .bl-bodyc .cw-bps { grid-row: 1 / span 2; width: 96px; height: 235px; }
  .pp-fit .bl.bl-wideb .bl-parts { grid-column: 2; grid-row: 1; overflow: hidden; font-size: 11.5px; line-height: 1.15; }
  .pp-fit .bl.bl-wideb .bl-part { padding: 0 2px; }
  .pp-fit .bl.bl-wideb .bl-kit { grid-column: 2; grid-row: 2; margin-top: 0; padding-top: 2px; }
  .pp-fit .bl.bl-wideb .bl-k { font-size: 11.5px; line-height: 1.25; }
  .pp-fit .bl.bl-s1, .pp-fit .bl.bl-s2, .pp-fit .bl.bl-s3, .pp-fit .bl.bl-s4, .pp-fit .bl.bl-s5 { gap: 5px; }
  .pp-fit .bl[class*="bl-s"] .bl-top { padding: 2px 10px; gap: 8px; }
  .pp-fit .bl[class*="bl-s"] .bl-top .zc-moodle { zoom: .62; }
  .pp-fit .bl[class*="bl-s"] .bl-verdict h2 { font-size: 21px; }
  .pp-fit .bl[class*="bl-s"] .bl-verdict p { margin: 0; font-size: 12.5px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pp-fit .bl[class*="bl-s"] .bl-main { gap: 8px; }
  .pp-fit .bl[class*="bl-s"] .bl-gauges { padding: 2px 8px 2px; justify-content: flex-start; gap: 0; }
  .pp-fit .bl[class*="bl-s"] .bl-g { height: 16px; font-size: 12px; }
  .pp-fit .bl[class*="bl-s"] .bl-gs-sec h4 { margin: 1px 0 0; font-size: 10.5px; line-height: 1.2; }
  .pp-fit .bl[class*="bl-s"] .bl-bodyc { padding: 3px 5px; gap: 3px; }
  .pp-fit .bl[class*="bl-s"]:not(.bl-wideb) .bl-bodyc .cw-bps { width: 88px; height: 216px; }
  .pp-fit .bl[class*="bl-s"] .bl-kit h4 { font-size: 10.5px; margin: 0; }
  .pp-fit .bl[class*="bl-s"] .bl-k { font-size: 11.5px; line-height: 1.25; }
  .pp-fit .bl[class*="bl-s"] .bl-note { padding: 3px 7px; font-size: 12px; line-height: 1.25; }
  /* steps 2+: the cards in newspaper columns, urgent first, nothing to scroll */
  .pp-fit .bl.bl-s2 .bl-cards, .pp-fit .bl.bl-s3 .bl-cards, .pp-fit .bl.bl-s4 .bl-cards, .pp-fit .bl.bl-s5 .bl-cards { display: block; column-count: 2; column-gap: 8px; column-fill: balance; overflow: hidden; padding: 0; -webkit-mask-image: none; mask-image: none; }
  .pp-fit .bl.bl-s3 .bl-cards { column-count: 3; }
  .pp-fit .bl.bl-s4 .bl-cards, .pp-fit .bl.bl-s5 .bl-cards { column-count: 4; column-gap: 6px; }
  .pp-fit .bl.bl-s2 .bl-cards > *, .pp-fit .bl.bl-s3 .bl-cards > *, .pp-fit .bl.bl-s4 .bl-cards > *, .pp-fit .bl.bl-s5 .bl-cards > * { margin: 0 0 4px; }
  .pp-fit .bl.bl-s2 .bl-c, .pp-fit .bl.bl-s3 .bl-c, .pp-fit .bl.bl-s4 .bl-c, .pp-fit .bl.bl-s5 .bl-c { gap: 6px; padding: 2px 5px; break-inside: avoid; }
  .pp-fit .bl.bl-s5 .bl-c.is-fam { break-inside: auto; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
  .pp-fit .bl.bl-s2 .bl-have, .pp-fit .bl.bl-s3 .bl-have, .pp-fit .bl.bl-s4 .bl-have, .pp-fit .bl.bl-s5 .bl-have { break-inside: avoid; break-before: avoid; }
  .pp-fit .bl.bl-s2 .bl-chip small, .pp-fit .bl.bl-s3 .bl-chip small, .pp-fit .bl.bl-s4 .bl-chip small { white-space: normal; }
  .pp-fit .bl.bl-s2 .bl-c .zc-moodle, .pp-fit .bl.bl-s3 .bl-c .zc-moodle, .pp-fit .bl.bl-s4 .bl-c .zc-moodle, .pp-fit .bl.bl-s5 .bl-c .zc-moodle { zoom: .5; }
  .pp-fit .bl.bl-s2 .bl-why, .pp-fit .bl.bl-s3 .bl-why, .pp-fit .bl.bl-s4 .bl-why, .pp-fit .bl.bl-s5 .bl-why { display: none; }
  .pp-fit .bl.bl-s2 .bl-c.is-fam .bl-lines, .pp-fit .bl.bl-s3 .bl-c.is-fam .bl-lines, .pp-fit .bl.bl-s4 .bl-c.is-fam .bl-lines, .pp-fit .bl.bl-s5 .bl-c.is-fam .bl-lines { columns: 1; }
  .pp-fit .bl.bl-s2 .bl-ct h3, .pp-fit .bl.bl-s3 .bl-ct h3, .pp-fit .bl.bl-s4 .bl-ct h3, .pp-fit .bl.bl-s5 .bl-ct h3 { font-size: 13px; line-height: 1.15; }
  .pp-fit .bl.bl-s2 .bl-ct h3 small, .pp-fit .bl.bl-s3 .bl-ct h3 small, .pp-fit .bl.bl-s4 .bl-ct h3 small, .pp-fit .bl.bl-s5 .bl-ct h3 small { font-size: 11.5px; }
  .pp-fit .bl.bl-s2 .bl-do, .pp-fit .bl.bl-s3 .bl-do, .pp-fit .bl.bl-s4 .bl-do, .pp-fit .bl.bl-s5 .bl-do, .pp-fit .bl.bl-s2 .bl-lines, .pp-fit .bl.bl-s3 .bl-lines, .pp-fit .bl.bl-s4 .bl-lines, .pp-fit .bl.bl-s5 .bl-lines { margin-top: 0; font-size: 12px; line-height: 1.18; }
  .pp-fit .bl.bl-s2 .bl-lines small, .pp-fit .bl.bl-s3 .bl-lines small, .pp-fit .bl.bl-s4 .bl-lines small, .pp-fit .bl.bl-s5 .bl-lines small { font-size: 11px; }
  .pp-fit .bl.bl-s2 .bl-have, .pp-fit .bl.bl-s3 .bl-have, .pp-fit .bl.bl-s4 .bl-have, .pp-fit .bl.bl-s5 .bl-have { margin-top: 0; font-size: 11.5px; }
  .pp-fit .bl.bl-s2 .bl-none, .pp-fit .bl.bl-s3 .bl-none, .pp-fit .bl.bl-s4 .bl-none, .pp-fit .bl.bl-s5 .bl-none { font-size: 11.5px; }
  .pp-fit .bl.bl-s2 .bl-chips, .pp-fit .bl.bl-s3 .bl-chips, .pp-fit .bl.bl-s4 .bl-chips, .pp-fit .bl.bl-s5 .bl-chips, .pp-fit .bl.bl-s2 .bl-goods, .pp-fit .bl.bl-s3 .bl-goods, .pp-fit .bl.bl-s4 .bl-goods, .pp-fit .bl.bl-s5 .bl-goods { gap: 2px 4px; }
  .pp-fit .bl.bl-s2 .bl-chip, .pp-fit .bl.bl-s3 .bl-chip, .pp-fit .bl.bl-s4 .bl-chip, .pp-fit .bl.bl-s5 .bl-chip { flex-basis: 100%; gap: 4px; padding: 1px 5px 1px 2px; font-size: 11.5px; }
  .pp-fit .bl.bl-s2 .bl-chip .zc-moodle, .pp-fit .bl.bl-s3 .bl-chip .zc-moodle, .pp-fit .bl.bl-s4 .bl-chip .zc-moodle, .pp-fit .bl.bl-s5 .bl-chip .zc-moodle { zoom: .5; }
  .pp-fit .bl.bl-s2 .bl-gd, .pp-fit .bl.bl-s3 .bl-gd, .pp-fit .bl.bl-s4 .bl-gd, .pp-fit .bl.bl-s5 .bl-gd { padding: 1px 6px 1px 2px; font-size: 11.5px; }
  .pp-fit .bl.bl-s2 .bl-cards h4, .pp-fit .bl.bl-s3 .bl-cards h4, .pp-fit .bl.bl-s4 .bl-cards h4, .pp-fit .bl.bl-s5 .bl-cards h4 { margin: 0 0 1px; font-size: 10.5px; }
  /* step 5: two lines each at most; .bl-cut, the last resort: one. The rest stays in the tooltip */
  .pp-fit .bl.bl-s5 .bl-ct h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pp-fit .bl.bl-s5 .bl-do, .pp-fit .bl.bl-s5 .bl-lines li { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; padding: 0; }
  .pp-fit .bl.bl-s5.bl-cut .bl-c:not(.bl-2l) .bl-do, .pp-fit .bl.bl-s5.bl-cut .bl-c:not(.bl-2l) .bl-lines li { display: block; white-space: nowrap; text-overflow: ellipsis; }
  .pp-fit .bl.bl-s4 .bl-main, .pp-fit .bl.bl-s5 .bl-main { grid-template-columns: 262px minmax(0, 1fr) 250px; }
  .pp-fit .bl.bl-s4 .bl-g, .pp-fit .bl.bl-s5 .bl-g { grid-template-columns: 74px minmax(0, 1fr) 96px; }
  .pp-fit .bl-cards.bl-over { overflow-y: auto; }
  @media (min-height: 1000px) { .pp-fit .bl[class*="bl-s"] .bl-gauges { justify-content: space-between; } .pp-fit .bl[class*="bl-s"] .bl-g { height: 26px; font-size: 14px; } .pp-fit .bl[class*="bl-s"] .bl-gs-sec h4 { font-size: 12.5px; } }
  .cw-tab[data-t="past"] { display: block; }

  /* a narrow file: its title reads whole, the player's name is at the top of the window and of the page */
  .pp-side .pp-file > .zc-panel:first-child .zc-panel-meta { display: none; }
  @media (max-width: 1499px) { .pp-fit .pp-file > .zc-panel:first-child .zc-panel-meta { display: none; } }
  /* the file, compact unless there's room for its long form and a good 3D model above it (fit.js fitFile) */
  .pp-file.pp-compact { gap: 6px; }
  .pp-file.pp-compact .zc-panel { margin: 0; }
  .pp-file.pp-compact .zc-panel-bar { min-height: 0; padding: 3px 8px; gap: 6px; }
  .pp-file.pp-compact .zc-panel-title { font-size: 15px; }
  .pp-file.pp-compact .zc-panel-bar .zc-ico, .pp-file.pp-compact .zc-panel-bar img { width: 20px; height: 20px; }
  .pp-file.pp-compact .zc-panel-body { padding: 6px 8px; }
  .pp-file.pp-compact .pp-nums { margin-top: 5px; gap: 5px; }
  .pp-file.pp-compact .zc-stat { padding: 3px 8px; min-height: 0; }
  .pp-file.pp-compact .pp-nums .zc-stat-k { font-size: 12px; }
  .pp-file.pp-compact .pp-nums .zc-stat-v { font-size: 20px; line-height: 1.05; }
  .pp-file.pp-compact .zc-list { display: flex; flex-wrap: wrap; gap: 3px; }
  .pp-file.pp-compact .zc-list li { display: inline-flex; align-items: center; gap: 3px; min-height: 0; padding: 1px 6px 1px 2px; border: 1px solid var(--win-line-soft); border-radius: 3px; font-size: 13px; background: none; }
  .pp-file.pp-compact .zc-list li .zc-ico, .pp-file.pp-compact .zc-list li img { width: 18px; height: 18px; }
  .pp-file.pp-compact .zc-list .zc-list-main, .pp-file.pp-compact .zc-list .zc-list-end { display: none; }
  .pp-file.pp-compact .zc-list .pp-ms-s { display: inline; }
  .pp-file.pp-compact .pp-links { gap: 4px; }
  .pp-file.pp-compact .pp-links .btn { min-height: 0; height: 28px; padding: 0 8px; gap: 6px; font-size: 13px; white-space: nowrap; overflow: hidden; }
  .pp-file.pp-compact .pp-links .btn img { width: 20px; height: 20px; }
  .pp-file.pp-nolinks .pp-links, .pp-file .zc-list li.pp-ms-hid { display: none; }
  .pp-file.pp-compact .zc-list li.pp-ms-more { padding: 1px 8px; font-weight: 600; color: var(--win-text-dim, #bdbdbd); }

  /* ---- Infos: fit.js steps .pp-d1 .. .pp-d3 until it fits */
  .pp-fit .cw-info { align-items: center; gap: 12px; margin-bottom: 8px; }
  .pp-fit .cw-portrait { width: 64px; height: 64px; } .pp-fit .cw-prof { width: 44px; height: 44px; }
  .pp-fit .cw-name { font-size: 19px; line-height: 1.15; } .pp-fit .cw-profn { margin-bottom: 2px; }
  .pp-fit .cw-kv, .pp-fit .cw-kv tbody { display: flex; flex-wrap: wrap; gap: 0 18px; } .pp-fit .cw-kv tr { display: flex; gap: 6px; } .pp-fit .cw-kv td { padding: 0; }
  .pp-fit .cw-h { margin: 0 0 5px; padding-bottom: 2px; }
  .pp-fit .cw-tgs { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 10px; }
  .pp-fit .cw-tg { flex: 1 1 240px; }
  .pp-fit .cw-tg-job { flex: 1 1 100%; }
  .pp-fit .cw-tg-job { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; }
  .pp-fit .cw-tg-job .cw-tgh { align-self: stretch; align-items: center; background: none; }
  .pp-fit .cw-job { padding: 3px 8px; } .pp-fit .cw-jobn { font-size: 14px; }
  .pp-fit .cw-boosts { margin-top: 0; }
  .pp-fit .cw-tg-job .cw-tlist { padding: 3px 6px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .pp-fit .cw-tgh { padding: 3px 8px 2px; }
  .pp-fit .cw-tgn { padding: 3px 8px 0; font-size: 12px; line-height: 1.25; }
  .pp-fit .cw-tlist { padding: 4px 5px; }
  /* opening a trait's text must not push the rest out of the screen: it floats over the rows */
  .pp-fit .cw-trait { position: relative; }
  .pp-fit .cw-trait.open .cw-tdesc { position: absolute; z-index: 30; top: 100%; left: 0; width: max(100%, 300px); padding: 7px 9px; background: rgba(10, 10, 10, .97); border: 1px solid rgba(228, 193, 90, .7); box-shadow: 0 6px 18px rgba(0, 0, 0, .6); }
  .pp-fit .cw-trait.open.up .cw-tdesc { top: auto; bottom: 100%; }
  .pp-fit .cw-trait.open.left .cw-tdesc { left: auto; right: 0; }
  /* a large screen with room to spare: larger rows */
  .pp-fit .pp-big .cw-portrait { width: 84px; height: 84px; } .pp-fit .pp-big .cw-name { font-size: 24px; }
  .pp-fit .pp-big .cw-tlist { gap: 3px; } .pp-fit .pp-big .cw-trait { padding: 5px 8px; font-size: 16px; } .pp-fit .pp-big .cw-trait img { width: 24px; height: 24px; }
  .pp-fit .pp-d1 .cw-tgs { gap: 6px 8px; }
  .pp-fit .pp-d1 .cw-trait, .pp-fit .pp-d2 .cw-trait, .pp-fit .pp-d3 .cw-trait { padding: 1px 5px; font-size: 13px; line-height: 1.25; }
  .pp-fit .pp-d1 .cw-tlist, .pp-fit .pp-d2 .cw-tlist, .pp-fit .pp-d3 .cw-tlist { gap: 1px; padding: 2px 4px; }
  .pp-fit .pp-d1 .cw-trait img, .pp-fit .pp-d2 .cw-trait img, .pp-fit .pp-d3 .cw-trait img { width: 16px; height: 16px; }
  .pp-fit .pp-d2 .cw-tg, .pp-fit .pp-d3 .cw-tg { flex-basis: 190px; }
  .pp-fit .pp-d2 .cw-tg-job, .pp-fit .pp-d3 .cw-tg-job { flex-basis: 100%; }
  .pp-fit .pp-d2 .cw-tg-good, .pp-fit .pp-d3 .cw-tg-good, .pp-fit .pp-d3 .cw-tg-bad { flex: 2 1 380px; }
  .pp-fit .pp-d2 .cw-tg-good .cw-tlist, .pp-fit .pp-d3 .cw-tg-good .cw-tlist, .pp-fit .pp-d3 .cw-tg-bad .cw-tlist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-fit .pp-d3 .cw-tgn { display: none; }
  .pp-fit .pp-d3 .cw-portrait { width: 44px; height: 44px; } .pp-fit .pp-d3 .cw-prof { width: 30px; height: 30px; }

  /* ---- Compétences: categories in 2 or 3 columns, row height chosen by fit.js (--cw-rh), figures untouched */
  .pp-fit .cw-skills { column-gap: 26px; column-fill: balance; }
  .pp-fit .cw-cat { margin: 0; padding-bottom: calc(var(--cw-rh, 22px) * .4); break-inside: avoid; }
  .pp-fit .cw-skill { height: var(--cw-rh, 22px); gap: 6px; padding: 0 2px; line-height: 1.15; font-size: 13px; grid-template-columns: minmax(0, 1fr) auto 16px 98px 46px; }
  .pp-fit .cw-skh { margin-bottom: 2px; column-gap: 6px; grid-template-columns: minmax(0, 1fr) 16px 98px 46px; }
  .pp-fit .cw-xp, .pp-fit .cw-xt { font-size: 12px; }
  .pp-fit .pp-tight .cw-skill { font-size: 12.5px; }
  .pp-fit .pp-tight .cw-cat { padding-bottom: 3px; }
  .pp-fit .pp-tight .cw-skh { margin: 0 0 1px; padding-bottom: 0; font-size: 12px; line-height: 1.2; }
  .pp-fit .cw-sq img, .pp-fit .cw-sqp { width: var(--cw-sq, 16px); height: var(--cw-sq, 16px); }
  .pp-fit .cw-sqp i { background-size: var(--cw-sq, 16px) var(--cw-sq, 16px); }
  .pp-fit .cw-xnote { margin: 0 0 6px; padding: 3px 8px; }

  /* ---- Vêtements / Inventaire / Anciens: rows in as many newspaper columns as it takes (fit.js fitList) */
  .pp-fit .cw-inv, .pp-fit .cw-solo { height: 100%; min-height: 0; }
  .pp-fit .cw-pane { min-height: 0; }
  .pp-fit .cw-cbtns { width: auto; flex-wrap: wrap; align-content: flex-start; min-height: 0; }
  .pp-fit .cw-ph { padding: 2px 8px; }
  .pp-fit .cw-list { flex: 1; min-height: 0; max-height: none; overflow: hidden; display: grid; grid-auto-flow: column; column-gap: 6px; align-content: start; }
  .pp-fit .cw-list.pp-over { overflow-y: auto; }
  .pp-fit .cw-list .cw-row { --ic: calc(var(--cw-rh) - 4px); min-height: 0; height: var(--cw-rh); gap: 6px; padding: 0 5px; grid-template-columns: var(--ic) minmax(0, 1fr) 40px; font-size: var(--cw-fs, 13.5px); line-height: 1.15; }
  .pp-fit .cw-list .cw-ic { width: var(--ic); height: var(--ic); }
  .pp-fit .cw-list .cw-w { font-size: .92em; }
  .pp-fit .cw-list .cw-ic2 { display: none; }
  /* the name gives way first and only as a last resort; what follows it stays whole. Tight: "porté" becomes one letter, the word in its title */
  .pp-fit .cw-list .cw-in { display: flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; }
  .pp-fit .cw-list .cw-nm { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pp-fit .cw-list .cw-q { flex: none; }
  .pp-fit .cw-list .cw-tag { flex: none; font-size: 10.5px; line-height: 1.2; margin: 0; padding: 0 3px; }
  .pp-fit .cw-list.pp-mark .cw-tag { font-size: 0; padding: 0 2px; }
  .pp-fit .cw-list.pp-mark .cw-tag::before { content: attr(data-m); font-size: 10.5px; }
  .pp-fit .cw-list.pp-cat .cw-row { grid-template-columns: var(--ic) minmax(0, 1fr) 120px 40px; }
  .pp-fit .cw-list.pp-cat .cw-ic2 { display: block; }
  .pp-fit .cw-list.pp-slim .cw-row { grid-template-columns: var(--ic) minmax(0, 1fr); } .pp-fit .cw-list.pp-slim .cw-w { display: none; }
  /* last tier: only the icons with their count; the name, weight and stats stay in the tooltip */
  .pp-fit .cw-list.pp-icons { column-gap: 2px; }
  .pp-fit .cw-list.pp-icons .cw-row { position: relative; grid-template-columns: minmax(0, 1fr); justify-items: center; padding: 0; border: 1px solid rgba(255, 255, 255, .08); }
  .pp-fit .cw-list.pp-icons .cw-in { position: absolute; right: 1px; bottom: 0; overflow: visible; font-size: 0; }
  .pp-fit .cw-list.pp-icons .cw-nm { display: none; }
  .pp-fit .cw-list.pp-icons .cw-in .cw-q { font-size: 10.5px; color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; }
  .pp-fit .cw-list.pp-icons .cw-tag, .pp-fit .cw-list.pp-icons .cw-w { display: none; }
  /* past characters: name | survived | zombies | killed by | date */
  .pp-fit .cw-cols.pp-pc { gap: 6px; padding: 0 5px; }
  .pp-fit .cw-cols.pp-pc, .pp-fit .cw-list .cw-row.pp-pr { grid-template-columns: minmax(0, 1fr) 74px 64px 130px 92px; }
  .pp-fit .cw-list.pp-slim .cw-row.pp-pr { grid-template-columns: minmax(0, 1fr) 62px 56px; } .pp-fit .cw-list.pp-slim .pp-pr .cw-ic2, .pp-fit .cw-list.pp-slim .pp-pr .cw-w { display: none; }
  .pp-pr .pp-epi { display: inline; margin: 0 0 0 6px; white-space: nowrap; }
  .pp-pr .pp-kills img, .pp-pr .pp-kills .zc-ico { width: 16px; height: 16px; }
  .pp-pr > span:nth-child(2), .pp-pr > span:nth-child(3) { text-align: right; justify-content: flex-end; }

  /* ---- /carnet: one short row on top, the diary in newspaper columns, one page at a time (‹ ›) */
  main.wrap:has(.cn-fit) { max-width: none; }
  #app.cn-fit { height: var(--cn-h, 600px); display: flex; flex-direction: column; gap: 6px; }
  .cn-fit .cn-top { flex: none; display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; }
  .cn-fit .cn-chars { flex: none; flex-direction: column; flex-wrap: wrap; justify-content: center; max-height: 54px; gap: 2px 6px; margin: 0; }
  .cn-fit .zc-card.cn-head { flex: 0 1 auto; padding: 3px 12px; gap: 2px 14px; }
  .cn-fit .cn-head h2 { font-size: 21px; white-space: nowrap; } .cn-fit .cn-head .cn-sub { font-size: 13.5px; white-space: nowrap; }
  .cn-fit .cn-head .zc-slot--64 { --s: 34px; --pad: 3px; }
  .cn-fit .cn-head .cn-nums b { font-size: 21px; } .cn-fit .cn-head .cn-nums span { font-size: 12px; }
  .cn-fit .cn-form { flex: 1 1 280px; margin: 0; gap: 6px; align-items: stretch; }
  .cn-fit .cn-form textarea { min-height: 0; height: auto; resize: none; padding: 4px 8px; line-height: 1.2; font-size: 14px; }
  .cn-fit .cn-tools { flex: 0 1 auto; flex-wrap: nowrap; margin: 0; gap: 6px; }
  .cn-fit .cn-tools input[readonly] { flex: 0 1 170px; }
  .cn-fit .cn-tools > .cn-msg:not(#msg) { display: none; }
  .cn-fit .cn-tools #msg:empty { display: none; }
  .cn-fit > .zc-panel { flex: 1; min-height: 0; margin: 0; display: flex; flex-direction: column; }
  .cn-fit > .zc-panel > .zc-panel-bar { flex: none; min-height: 0; padding-top: 2px; padding-bottom: 2px; }
  .cn-fit .cn-tl { flex: 1; min-height: 0; padding: 0; overflow: hidden; }
  .cn-fit .cn-cols { height: 100%; padding: 0; }
  .cn-pager { display: inline-flex; align-items: center; gap: 8px; margin-left: 12px; }
  .cn-pager[hidden] { display: none; }
  .cn-pager span { min-width: 74px; text-align: center; color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .cn-fit .cn-day { padding: 0; border: 0; }
  .cn-fit .cn-day h3 { margin: 3px 0 1px; padding-bottom: 1px; font-size: 15px; border-bottom: 1px solid var(--win-line-soft); break-after: avoid; }
  .cn-fit .cn-e { grid-template-columns: 22px minmax(0, 1fr) auto; gap: 6px; padding: 1px 0; align-items: center; break-inside: avoid; }
  .cn-fit .cn-e .zc-slot { --s: 18px; --pad: 1px; }
  .cn-fit .cn-e p { margin: 0; font-size: 13.5px; line-height: 1.2; }
  .cn-fit .cn-e time { margin: 0; font-size: 11.5px; }
  .cn-fit > .pagefoot { flex: none; margin: 0; padding-bottom: 4px; font-size: 12px; line-height: 1.25; }
}
/* desktop heights up to 900 px (1366x768): the banner row gets thinner, the Personnages / Carnet tabs stay */
@media (min-width: 1101px) and (min-height: 560px) and (max-height: 900px) {
  body:has(.pp-fit, .cn-fit) .zc-page .wrap { min-height: 0; padding-top: 2px; padding-bottom: 3px; }
  body:has(.pp-fit, .cn-fit) .zc-ptabs a { height: 34px; font-size: 15px; }
  body:has(.pp-fit, .cn-fit) .zc-ptabs a img { width: 24px; height: 24px; }
  body:has(.pp-fit, .cn-fit) .zc-page .zc-sign { padding: 3px 10px 3px; font-size: 15px; line-height: 1.1; }
  body:has(.pp-fit, .cn-fit) .zc-page .zc-sign-sub { font-size: 10px; }
  body:has(.pp-fit, .cn-fit) .zc-page p.zc-page-desc { font-size: 13px; }
  body:has(.pp-fit, .cn-fit) .zc-chat.float:not(.open) { top: calc(var(--zc-navh) + 3px); }
}
@media (min-width: 1500px) and (min-height: 560px) {
  /* wide screens: a wider left column (3D above the file: a tall thin stage would crop the model, it frames by height) */
  .pp-grid.pp-fit { gap: 16px; grid-template-columns: 300px minmax(0, 1fr); }
  .pp-fit .cw-body-wrap { padding: 12px 16px; }
}
