/* ── the signs — the party's frame, printer's ink ────────────────────────
   Every sign is the same object: a white sheet, an art-deco frame whose
   corners step in like the logo's side pieces, the party's name across
   the top, and black type. Only the middle changes, and only in four shapes
   (signs.js: room, way, notice, schedule). That sameness is the point —
   whoever makes the sign for the toilets cannot make it look like
   something else.

   Black on white and nothing else, so any printer in any office prints it
   whole: no fill to flood the page, no colour that comes out grey.

   Everything inside is sized in container units of the sign itself, so
   one design is the A5 on a door, the A3 by the lift and the thumbnail in
   the admin, without a second set of numbers. */

.sign{
  --paper:#fff;
  --ink:#000;
  --line:#000;

  position:relative;
  container-type:size;
  overflow:hidden;
  background:var(--paper);
  color:var(--ink);
  font-family:"Poppins",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  /* the sheet's shape — the renderer sets the width, this keeps the page */
  aspect-ratio:210 / 297;
}
.sign.l{ aspect-ratio:297 / 210 }

.sign .frame{ position:absolute; inset:0; width:100%; height:100%; pointer-events:none }
.sign .frame *{ vector-effect:non-scaling-stroke }

/* the column everything sits in, inside the frame */
.sign .body{
  position:absolute; inset:9cqmin 11cqmin 7cqmin;
  display:flex; flex-direction:column; align-items:center;
  text-align:center;
}

/* ── top: WELLNESS / — MEETS — / MADNESS ─────────────────────────── */
.sign .crest{
  display:flex; flex-direction:column; align-items:center; gap:.9cqmin; width:100%;
  color:var(--line);
  font-weight:600; font-size:2.8cqmin; letter-spacing:.42em; line-height:1.1;
  text-transform:uppercase; white-space:nowrap;
}
.sign .crest{ margin-bottom:3cqmin }
/* the letter-spacing trails after the last letter; pull it back */
.sign .crest > div{ padding-left:.42em }
.sign .c-meets{
  display:flex; align-items:center; gap:2.4cqmin; width:46%;
  font-size:.9em;
}
.sign .c-meets::before,.sign .c-meets::after{
  content:""; flex:1; border-top:.25cqmin solid var(--line);
}

/* ── the middle ────────────────────────────────────────────────────── */
.sign .main{
  flex:1; width:100%; min-height:0;
  /* safe: when it is too tall it spills downward, where the fitting can
     measure it, never up over the crest */
  display:flex; flex-direction:column; align-items:center; justify-content:safe center;
  gap:3.5cqmin;
}

.sign .title{
  font-family:"Cinzel",Georgia,serif; font-weight:700;
  color:var(--ink);
  line-height:1.02; letter-spacing:.02em;
  text-wrap:balance;
  /* signs.js shrinks this until it fits; this is where it starts */
  font-size:var(--fs,14cqmin);
  max-width:100%;
}
.sign .sub{
  font-weight:400; font-size:3.4cqmin; letter-spacing:.32em;
  text-transform:uppercase; color:var(--ink);
  padding-left:.32em; text-wrap:balance;
}

/* the deco divider: rule, diamond, rule */
.sign .rule{
  display:flex; align-items:center; gap:1.6cqmin; width:42%;
  color:var(--line);
}
.sign .rule::before,.sign .rule::after{
  content:""; flex:1; border-top:.25cqmin solid currentColor;
}
.sign .rule i{
  width:1.6cqmin; height:1.6cqmin; transform:rotate(45deg);
  border:.25cqmin solid currentColor;
}

/* the medallion: the logo's diamond, with a pictogram inside */
.sign .medal{
  position:relative; width:var(--ms,26cqmin); aspect-ratio:1; flex:none;
  color:var(--line);
}
.sign .medal svg{ position:absolute; inset:0; width:100%; height:100% }
.sign .medal .pict{ inset:27%; width:46%; height:46% }

/* ── way: rows of destination + arrow ─────────────────────────────── */
.sign .ways{ width:100%; display:flex; flex-direction:column }
.sign .way{
  display:flex; align-items:center; gap:4cqmin;
  padding:3.2cqmin 1cqmin;
  border-top:.25cqmin solid var(--line);
}
.sign .way:last-child{ border-bottom:.25cqmin solid var(--line) }
.sign .way .w-text{ flex:1; min-width:0; text-align:left }
.sign .way .w-main{
  display:block;
  font-family:"Cinzel",Georgia,serif; font-weight:700;
  font-size:var(--fs,9cqmin); line-height:1.05; color:var(--ink);
}
.sign .way.r .w-text{ text-align:right }
.sign .way .arrow{ width:var(--as,11cqmin); height:var(--as,11cqmin); flex:none; color:var(--line) }
.sign .way.r .arrow{ order:2 }
.sign .way .w-sub{
  display:block; margin-top:.8cqmin;
  font-family:"Poppins",sans-serif; font-weight:400;
  font-size:3cqmin; letter-spacing:.28em; text-transform:uppercase; color:var(--ink);
}

/* ── notice: a short text ─────────────────────────────────────────── */
.sign .text{
  max-width:88%;
  font-size:var(--ts,4.6cqmin); line-height:1.45; font-weight:400;
  color:var(--ink); white-space:pre-line; text-wrap:pretty;
}
.sign .lines{
  list-style:none; width:88%;
  font-size:var(--ts,4.4cqmin); line-height:1.35; text-align:left;
  display:flex; flex-direction:column; gap:2cqmin;
}
.sign .lines li{ display:flex; gap:2.4cqmin; align-items:baseline }
.sign .lines li::before{
  content:""; flex:none; width:1.3cqmin; height:1.3cqmin;
  transform:translateY(-.3cqmin) rotate(45deg);
  border:.25cqmin solid var(--line);
}

/* ── schedule: times and acts ─────────────────────────────────────── */
.sign .day{
  font-weight:600; font-size:3cqmin; letter-spacing:.34em; text-transform:uppercase;
  color:var(--line); padding-left:.34em;
}
.sign .slots{ width:94%; display:flex; flex-direction:column }
.sign .slot{
  display:grid; grid-template-columns:auto 1fr; gap:4cqmin; align-items:baseline;
  padding:var(--sp,2cqmin) 0; text-align:left;
  border-bottom:.2cqmin dotted var(--line);
  font-size:var(--ts,4.2cqmin);
}
.sign .slot:last-child{ border-bottom:0 }
.sign .slot b{
  font-family:"Cinzel",Georgia,serif; font-weight:700; color:var(--line);
  font-variant-numeric:tabular-nums; min-width:5.2em;
}
.sign .slot span{ line-height:1.25 }
.sign .slot .s-main{ display:block }
.sign .slot small{ display:block; color:var(--ink); font-size:.7em; margin-top:.2em }

/* the middle sits a little above centre, where the eye expects it */
.sign .body{ padding-bottom:4cqmin }

/* a landscape sheet is short: the medallion gives way */
.sign.l .body{ inset:7cqmin 9cqmin 5.5cqmin }
.sign.l .main{ gap:2.6cqmin }
.sign.l .medal{ width:var(--ms,20cqmin) }

/* ── the sign while it is being edited ───────────────────────────────
   Text you can click shows a dashed edge on hover and a solid one while
   you type, like any design tool; empty fields show what goes there.
   None of this exists on paper or in a thumbnail (.editing only). */
/* an editable field breaks long words by default (the browser's own
   style for contenteditable); on a sign a word stays whole and the type
   shrinks instead, exactly as on paper */
.sign.editing [data-f]{ overflow-wrap:normal; word-break:normal }
.sign.editing [data-f]{
  outline:1px dashed transparent; outline-offset:.6cqmin; border-radius:.4cqmin;
  cursor:text; min-width:1ch; caret-color:var(--accent);
  transition:outline-color .12s;
}
.sign.editing [data-f]:hover{ outline-color:var(--accent-line) }
.sign.editing [data-f]:focus{ outline:1.5px solid var(--accent) }
.sign.editing [data-f]:empty::before{
  content:attr(data-ph); color:rgba(0,0,0,.28); pointer-events:none;
}
/* a row's detail line only shows empty while that row is being worked on */
.sign.editing .w-sub:empty:not(:focus),
.sign.editing .slot small:empty:not(:focus){ display:none }
.sign.editing .way:focus-within .w-sub:empty,
.sign.editing .slot:focus-within small:empty{ display:block }
/* a row's own + and ×, at its right edge, in the sheet's side margin.
   Screen-sized (px), not sheet-sized: they are buttons, not print. */
.sign.editing :is(.way,.slot,.line-row){ position:relative }
.sign.editing .row-tools{
  position:absolute; right:-7.5cqmin; top:50%; transform:translateY(-50%);
  display:flex; flex-direction:column; gap:3px; opacity:0; transition:opacity .12s;
}
.sign.editing :is(.way,.slot,.line-row):is(:hover,:focus-within) .row-tools{ opacity:1 }
.sign.editing .row-tools button{
  width:20px; height:20px; display:grid; place-items:center; padding:0;
  border:1px solid var(--line-strong); border-radius:6px; background:#fff; color:var(--accent);
  font:600 13px/1 -apple-system,BlinkMacSystemFont,sans-serif; cursor:pointer;
  box-shadow:0 1px 3px rgba(0,0,0,.12);
}
.sign.editing .row-tools .rt-del:hover{ color:#b42318; border-color:#fecdca }
.sign.editing .row-tools .rt-add:hover{ background:var(--accent-soft) }
/* on a touch screen there is no hover: the tools are always there */
@media (hover:none){ .sign.editing .row-tools{ opacity:1 } }
.sign.editing .line-row .line{ flex:1 }
.sign.editing .add-row{
  align-self:center; margin-top:-1cqmin;
  padding:4px 12px; border:1px dashed var(--line-strong); border-radius:999px; background:#fff;
  font:500 12px/1.3 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color:var(--accent); cursor:pointer;
}
.sign.editing .add-row:hover{ background:var(--accent-soft); border-style:solid }
.sign.editing [data-act]{ cursor:pointer }
.sign.editing [data-act]:hover{ color:var(--accent) }
.sign.editing .medal.ghost{
  display:grid; place-items:center;
  border:.35cqmin dashed rgba(0,0,0,.25); transform:rotate(45deg) scale(.72);
  color:rgba(0,0,0,.35);
}
.sign.editing .medal.ghost .ghost-plus{ transform:rotate(-45deg); font-size:8cqmin; line-height:1 }
.sign.editing .medal.ghost:hover{ border-color:var(--accent); color:var(--accent) }

/* ══ the editor ═══════════════════════════════════════════════════════
   Two panels of the admin, the way every other page is built: on the
   left the side panel (pictograms, programme) under the same
   segmented tabs the rest of the admin uses; on the right the editor —
   one toolbar that starts with "Nou", the page on a desk, every page in
   a strip below. They
   fill the height the admin's frame leaves, so the page never scrolls.
   Below a laptop's width the side panel becomes a drawer, opened from the
   toolbar; on a phone, a sheet over the tab bar. */

body[data-page="signs"] .wrap{ max-width:none; padding-bottom:1.5rem }

.cv{
  --cv-desk:#eceef2;
  --cv-room:calc(100dvh - 3rem);
  position:relative;
  display:grid; grid-template-columns:18.5rem minmax(0,1fr); gap:1rem;
  height:var(--cv-room); min-height:30rem;
}
.cv-lib,.cv-ed{
  min-height:0; display:flex; flex-direction:column; overflow:hidden;
  background:var(--card); border:1px solid var(--line); border-radius:var(--r-lg); box-shadow:var(--shadow);
}
.cv-ed{ position:relative }

/* ── the side panel ── */
.cv-lib-head{ flex:none; display:flex; align-items:center; gap:.4rem; padding:.75rem .75rem .5rem }
.cv-tabs{ flex:1; display:flex }
.cv-tabs button{ flex:1; padding-inline:.4rem }
.cv-lib .cv-lib-close{ display:none }
.cv-panel-body{ flex:1; overflow:auto; padding:.35rem .9rem 1.25rem }
.cv-icons{ display:grid; grid-template-columns:repeat(3, 1fr); gap:.45rem }
.cv-icon{
  display:flex; flex-direction:column; align-items:center; gap:.35rem;
  padding:.7rem .25rem .5rem; border:1px solid var(--line); border-radius:var(--r-sm);
  background:var(--card); cursor:pointer; font:inherit; font-size:.68rem; color:var(--muted);
}
.cv-icon:hover{ border-color:var(--accent-line); color:var(--accent) }
.cv-icon.on{ background:var(--accent-soft); border-color:var(--accent); color:var(--accent) }
.cv-icon svg{ width:26px; height:26px }
.cv-lib .hint{ font-size:.82rem }
.cv-lib .field{ margin-bottom:.8rem }
.cv-lib select{ width:100% }
.cv-wide{ width:100%; justify-content:center }

/* ── the toolbar: Nou · side-panel buttons (narrow only) · this page · save, undo, print ── */
.cv-bar{
  flex:none; display:flex; align-items:center; flex-wrap:wrap; gap:.4rem .5rem;
  padding:.55rem .6rem .55rem .75rem; border-bottom:1px solid var(--line);
}
.cv-libbtns{ display:none; align-items:center; gap:.25rem }
/* the groups dissolve into the bar, so it wraps control by control, not
   group by group */
.cv-ctx{ display:contents }
.cv-ctx .grow{ display:none }
.cv-bar .sep,.cv-ctx .sep{ flex:none; width:1px; height:1.6rem; background:var(--line); margin:0 .15rem }
.cv-actions{ flex:none; margin-left:auto; display:flex; align-items:center; gap:.2rem }
.cv-status{ font-size:.78rem; color:var(--faint); white-space:nowrap; margin-right:.3rem }
.cv-ico{
  width:2.3rem; height:2.3rem; display:grid; place-items:center;
  border:0; border-radius:var(--r-sm); background:none; color:var(--muted); cursor:pointer;
}
.cv-ico svg{ width:19px; height:19px }
.cv-ico:hover:not(:disabled){ background:var(--bg); color:var(--ink) }
.cv-ico:disabled{ opacity:.35; cursor:default }
.cv-ico.danger:hover{ background:var(--bad-bg); color:var(--bad) }
.cv-print{ display:inline-flex; align-items:center; gap:.45rem; margin-left:.25rem }
.cv-print svg{ width:17px; height:17px }
.cv-menu-wrap{ position:relative }
.cv-menu{
  position:absolute; right:0; top:calc(100% + .4rem); z-index:30;
  width:17rem; padding:.4rem; background:var(--card);
  border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--shadow-pop);
}
.cv-menu button{
  display:block; width:100%; text-align:left; padding:.65rem .75rem;
  border:0; border-radius:var(--r-sm); background:none; font:inherit; font-size:.9rem; cursor:pointer; color:var(--ink);
}
.cv-menu button:hover{ background:var(--accent-soft); color:var(--accent) }
.cv-menu-note{ font-size:.75rem; color:var(--faint); padding:.4rem .75rem .3rem; line-height:1.4 }

.cv-chip{
  flex:none; display:flex; align-items:center; gap:.4rem;
  height:2.2rem; padding:0 .65rem; border:1px solid transparent; border-radius:var(--r-sm);
  background:none; font:inherit; font-size:.83rem; color:var(--ink); cursor:pointer; white-space:nowrap;
}
.cv-chip:hover{ background:var(--bg) }
.cv-chip.on{ background:var(--accent-soft); color:var(--accent) }
.cv-chip svg{ width:17px; height:17px }
.cv-chip.icon-only{ width:2.3rem; padding:0; justify-content:center }
.cv-chip.icon-only span{ display:none }
.cv-chip.danger{ color:var(--bad) }
.cv-chip.danger:hover{ background:var(--bad-bg) }
.cv-select{
  flex:none; height:2.2rem; padding:0 2rem 0 .7rem; border:1px solid var(--line-strong);
  border-radius:var(--r-sm); font:inherit; font-size:.83rem; background-color:var(--card); width:auto;
}
.cv-step{ flex:none; display:flex; align-items:center; border:1px solid var(--line-strong); border-radius:var(--r-sm); height:2.2rem }
.cv-step button{ width:2rem; height:100%; border:0; background:none; cursor:pointer; font-size:1rem; color:var(--muted) }
.cv-step button:hover{ color:var(--ink) }
.cv-step span{ min-width:3.8rem; text-align:center; font-size:.8rem; font-variant-numeric:tabular-nums }

/* ── the desk and the page on it ── */
.cv-canvas{ flex:1; min-height:0; position:relative; display:grid; place-items:center; overflow:hidden; background:var(--cv-desk) }
.cv-page{ box-shadow:0 1px 3px rgba(17,24,39,.08), 0 14px 36px rgba(17,24,39,.14); background:#fff }
.cv-page .sign{ width:100%; height:100% }

.cv-pop{
  position:absolute; z-index:20; display:grid; grid-template-columns:repeat(3, 2.6rem); gap:.25rem;
  padding:.4rem; background:var(--card); border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--shadow-pop);
}
.cv-pop[hidden]{ display:none }
.cv-pop button{
  width:2.6rem; height:2.6rem; display:grid; place-items:center; border:0; border-radius:var(--r-sm);
  background:none; cursor:pointer; color:var(--ink);
}
.cv-pop button:hover{ background:var(--accent-soft); color:var(--accent) }
.cv-pop button.on{ background:var(--accent); color:var(--accent-ink) }
.cv-pop .mid{ visibility:hidden }
.cv-pop svg{ width:22px; height:22px }

/* ── the pages strip ── */
.cv-pages{
  flex:none; display:flex; align-items:center; gap:.7rem;
  height:7.4rem; padding:.55rem .9rem; overflow-x:auto;
  border-top:1px solid var(--line);
}
.cv-thumb{
  position:relative; flex:none; height:100%; display:flex; flex-direction:column; align-items:center; gap:.3rem;
  border:0; background:none; padding:0; cursor:pointer; font:inherit;
}
/* the box has the sheet's proportions, so the strip can size itself
   without waiting for the sign inside to lay out */
.cv-thumb .box{
  height:calc(100% - 1.3rem); aspect-ratio:210 / 297; box-sizing:content-box;
  padding:3px; border-radius:var(--r-sm); border:2px solid transparent;
}
.cv-thumb.land .box{ aspect-ratio:297 / 210; height:calc((100% - 1.3rem) * .72); margin-block:auto 0 }
.cv-thumb .sign{ width:100%; height:100%; box-shadow:0 1px 4px rgba(17,24,39,.2) }
.cv-thumb:hover .box{ border-color:var(--accent-line) }
.cv-thumb.on .box{ border-color:var(--accent) }
.cv-thumb small{ font-size:.7rem; color:var(--faint); font-variant-numeric:tabular-nums }
.cv-thumb.on small{ color:var(--accent); font-weight:650 }
.cv-thumb.drop-before .box{ box-shadow:-5px 0 0 -2px var(--accent) }
.cv-thumb.dragging{ opacity:.4 }
/* who made it, when a lead did: their name on the sheet's foot */
.cv-thumb .who{
  position:absolute; left:50%; bottom:1.55rem; transform:translateX(-50%); max-width:calc(100% + .4rem);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  font-size:.6rem; font-weight:700; line-height:1; padding:.2rem .4rem; border-radius:2rem;
  color:var(--accent); border:1px solid var(--accent-line); background:var(--accent-soft);
}
/* somebody else's sign: printable, not editable — the controls say so */
.cv.locked .cv-ctx{ opacity:.45 }
.cv-thumb .x{ position:absolute; top:-2px; right:-4px; font-size:.7rem; background:var(--card); border-radius:999px; padding:0 .3rem; box-shadow:var(--shadow); color:var(--muted) }
.cv-add{
  flex:none; height:calc(100% - 1.3rem); aspect-ratio:210/297; align-self:flex-start;
  display:grid; place-items:center; border:2px dashed var(--line-strong); border-radius:var(--r-sm);
  background:none; cursor:pointer; color:var(--faint); font-size:1.6rem;
}
.cv-add:hover{ border-color:var(--accent); color:var(--accent) }

/* "Nou": the four styles, each with a small picture of what it makes */
.cv-newbtn{ display:inline-flex; align-items:center; gap:.35rem; font-weight:600 }
.cv-new{
  position:absolute; z-index:35; width:min(27rem, calc(100% - 1rem));
  padding:.75rem; background:var(--card);
  border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--shadow-pop);
}
.cv-new[hidden]{ display:none }
.cv-new-title{ font-size:.78rem; font-weight:650; color:var(--faint); text-transform:uppercase; letter-spacing:.05em; margin:0 0 .6rem .15rem }
.cv-new-grid{ display:grid; grid-template-columns:1fr 1fr; gap:.5rem }
.cv-new-item{
  display:flex; flex-direction:column; align-items:stretch; gap:.5rem; text-align:left;
  padding:.5rem; border:1px solid var(--line); border-radius:var(--r-sm);
  background:var(--card); font:inherit; color:var(--ink); cursor:pointer;
  transition:border-color .12s, box-shadow .12s;
}
.cv-new-item:hover{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft) }
.cv-new-pic{ height:7.5rem; display:flex; align-items:center; justify-content:center; background:var(--well); border-radius:6px; padding:.4rem }
.cv-new-pic .sign{ height:100%; width:auto; box-shadow:0 1px 4px rgba(17,24,39,.16) }
.cv-new-pic.land .sign{ height:auto; width:100% }
.cv-new-words{ display:flex; flex-direction:column; padding:0 .15rem .1rem }
.cv-new-words b{ font-size:.88rem }
.cv-new-words small{ font-size:.74rem; color:var(--muted); line-height:1.35 }

.cv-toast{
  position:absolute; left:50%; bottom:8.5rem; transform:translateX(-50%); z-index:40;
  display:flex; align-items:center; gap:1rem; white-space:nowrap;
  padding:.65rem .75rem .65rem 1.1rem; border-radius:var(--r); background:var(--ink); color:#fff;
  font-size:.86rem; box-shadow:var(--shadow-pop);
}
.cv-toast[hidden]{ display:none }
.cv-toast button{ border:0; background:none; color:#a9b4f5; font:inherit; font-weight:650; cursor:pointer; padding:.2rem .4rem }

.cv-scrim{ display:none }

/* ── laptop and narrower: the side panel is a drawer ── */
@media (max-width:1099px){
  .cv{ grid-template-columns:minmax(0,1fr) }
  .cv-libbtns{ display:contents }
  .cv-lib{
    position:absolute; z-index:30; left:0; top:0; bottom:0; width:min(20rem, 88%);
    /* shut, it is gone — not tucked behind the sidebar */
    transform:translateX(-1.5rem); opacity:0; visibility:hidden; pointer-events:none;
    transition:transform .2s cubic-bezier(.2,.8,.3,1), opacity .2s, visibility 0s .2s;
    box-shadow:var(--shadow-pop);
  }
  .cv-lib.open{ transform:none; opacity:1; visibility:visible; pointer-events:auto; transition:transform .2s cubic-bezier(.2,.8,.3,1), opacity .2s }
  /* the side panel's own Pictogrames button is there; the page's is not needed */
  .cv-ctx .cv-pict{ display:none }
  .cv-lib .cv-lib-close{ display:grid }
  .cv-scrim{ display:block; position:absolute; inset:0; z-index:29; background:rgba(17,24,39,.18); border-radius:var(--r-lg) }
  .cv-scrim[hidden]{ display:none }
}

/* ── no sidebar: the admin's top bar and tab bar are there, and the editor
   takes exactly the room between them ── */
@media (max-width:959px){
  body[data-page="signs"] .wrap{ padding:0 }
  body[data-page="signs"] .content{ min-height:0 }
  .cv{
    /* the top bar's height is measured (signs.js): it depends on the
       notch and on the type, and a guess left the page scrolling */
    --cv-room:calc(100dvh - var(--cv-topbar, 3.6rem) - var(--tab-h));
    min-height:0;
  }
  .cv-ed{ border:0; border-radius:0; box-shadow:none }
  .cv-lib{ border-radius:0 var(--r-lg) var(--r-lg) 0 }
  .cv-scrim{ border-radius:0 }
}

/* ── phone: the side panel is a sheet over the tab bar ── */
@media (max-width:760px){
  /* one line that slides sideways, as on any phone app; undo and print
     stay put at its right end */
  .cv-bar{ flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; padding-right:0 }
  .cv-bar::-webkit-scrollbar{ display:none }
  .cv-actions{
    position:sticky; right:0; z-index:2; padding:0 .5rem 0 .6rem; margin-left:auto;
    background:linear-gradient(90deg, transparent, var(--card) .6rem);
  }
  /* on a phone the three doors are icons */
  .cv-libbtns .cv-chip{ width:2.3rem; padding:0; justify-content:center }
  .cv-libbtns .cv-chip span{ display:none }
  .cv-status{ display:none }
  .cv-lib{
    position:fixed; left:0; right:0; top:auto; bottom:var(--tab-h); width:auto; height:min(62dvh, 32rem);
    border-radius:16px 16px 0 0; transform:translateY(2rem);
  }
  .cv-scrim{ position:fixed }
  .cv-icons{ grid-template-columns:repeat(4, 1fr) }
  .cv-pages{ height:6rem; padding:.45rem .7rem }
  .cv-toast{ bottom:7rem }
  .cv-print span{ display:none }
}

/* ══ paper ═════════════════════════════════════════════════════════════ */

/* Laid out off screen rather than display:none, so the type can be
   fitted at the real size before the print dialog opens. */
.sg-print{ position:fixed; left:-300vw; top:0; visibility:hidden; pointer-events:none }
.sg-page{ overflow:hidden }
.sg-page .sign{ width:100%; height:100% }
.sg-page.a5p{ page:a5p; width:148mm; height:210mm }
.sg-page.a5l{ page:a5l; width:210mm; height:148mm }
.sg-page.a4p{ page:a4p; width:210mm; height:297mm }
.sg-page.a4l{ page:a4l; width:297mm; height:210mm }
.sg-page.a3p{ page:a3p; width:297mm; height:420mm }
.sg-page.a3l{ page:a3l; width:420mm; height:297mm }

@page a5p{ size:148mm 210mm; margin:0 }
@page a5l{ size:210mm 148mm; margin:0 }
@page a4p{ size:210mm 297mm; margin:0 }
@page a4l{ size:297mm 210mm; margin:0 }
@page a3p{ size:297mm 420mm; margin:0 }
@page a3l{ size:420mm 297mm; margin:0 }

@media print{
  html,body{ background:none !important; min-height:0 !important }
  body > *:not(.sg-print){ display:none !important }
  .sg-print{ position:static; visibility:visible }
  .sg-page{ break-after:page }
  .sg-page:last-child{ break-after:auto }
}
