/* The pages drawn from what the squad says (page.js, and pages.js beside it): they are made of style.css's own
   pieces (.row, .list, .knob, .note, .count, .mbtn, .save, .btns, .rk); only what those have no piece for is
   here, every name `pg-`, so nothing here fights style.css. Colours are style.css's variables: both looks. */

/* a page's body: its pieces one under another */
.pg-body{display:grid;gap:10px;transition:opacity .2s}
.pg-body.busy{opacity:.6}
.pg-body>h2{margin:16px 4px 0}
.pg-body>:is(.row,.list){margin:0}
/* what the squad said of the last press: a card while it says something */
.pg-told:not(:empty){padding:12px 16px;border-radius:18px;background:var(--card);border:1px solid var(--edge);box-shadow:var(--sh);
white-space:pre-wrap;overflow-wrap:anywhere;animation:rise .4s var(--soft) both}
.pg-told:empty{display:none}
/* page.js's stands above its body, outside the body's gap */
.top~.pg-told:not(:empty){margin-bottom:10px}
.pg-bad{color:var(--bad)}
[data-theme=day] .pg-told:not(:empty){border-color:#fff}
/* an input standing alone (a search, a mid, the sheet's answer), as style.css's .field input */
.pg-input{display:block;width:100%;min-width:0;height:48px;padding:0 14px;border-radius:16px;color:var(--ink);background:var(--card);
border:1px solid var(--edge);font-size:15px}
.pg-input::placeholder{color:var(--faint)}
[data-theme=day] .pg-input{background:#fff;border-color:#fff;box-shadow:var(--sh)}

/* a section's rows: each its own card */
.pg-rows{display:grid}
.pg-rows>.list{margin:0 0 8px}
/* a row that runs a command: its arrow in the accent; `.pg-danger` in the colour of harm */
.pg-run svg{color:var(--a)}
.pg-danger,.pg-danger svg{color:var(--bad)}
/* a list row: its head (label and .count), its items as lines, its buttons as lines under them */
.pg-head{display:flex;align-items:center;gap:10px;padding:14px 16px 8px}
.pg-head b{font-weight:700}
.pg-items>.row:first-child{border-top:0}
.pg-empty{padding:4px 16px 12px;color:var(--faint);font-size:13px}
.pg-x{width:36px;height:36px;padding:0;text-align:center;font-size:18px;line-height:1}

/* the sheet that asks one thing: at the foot, over the page dimmed by its own shadow (no veil to put in) */
.pg-sheet{position:fixed;left:0;right:0;bottom:0;z-index:31;max-width:560px;margin:0 auto;display:grid;gap:12px;
padding:20px 16px calc(16px + var(--sb));border-radius:28px 28px 0 0;background:var(--solid);border:1px solid var(--edge);
border-bottom:0;box-shadow:0 0 0 100vmax var(--veil),0 -20px 60px #000c;animation:sheet-up .45s var(--ease) both}
.pg-sheet::before{content:"";width:42px;height:5px;border-radius:9px;background:var(--line);margin:-8px auto 0}
.pg-title{font-size:17px;font-weight:800}
.pg-sheet .btns{margin-top:4px}
.pg-picks{max-height:40vh;overflow:auto;margin:0}
.pg-picks li{animation:none}
.pg-sheet .pg-input{background:var(--card2)}
[data-theme=day] .pg-sheet{border:0;box-shadow:0 0 0 100vmax var(--veil),0 -20px 60px #10173140}
[data-theme=day] .pg-sheet::before{background:#c9cfdd}
[data-theme=day] .pg-sheet .pg-input{background:#f2f4fa;border-color:transparent;box-shadow:none}
/* a yes to harm */
.save.pg-danger{color:#fff;background:var(--bad);box-shadow:0 10px 24px -12px var(--bad)}
@keyframes sheet-up{from{transform:translateY(105%)}}
/* a row's words start at the left whatever their writing, as Home's names do */
.pg-body .row .t{text-align:left}

/* under a sheet, a layer of its own that a tap closes it by (the sheet's shadow dims; this only catches) */
.pg-veil{position:fixed;inset:0;z-index:30;background:transparent}
.pg-sheet{max-height:86vh;overflow:auto}
/* a list's search, inside its card or a sheet */
.list>.pg-search{margin:0 12px 8px;width:calc(100% - 24px);height:42px}
.pg-sheet .pg-search{height:42px}
/* the group switcher at the head of a group's page */
.pg-switch .v{margin-left:auto;max-width:55%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pg-switch svg{color:var(--a)}
/* a long text and the yes that shows it */
textarea.pg-input.pg-long{height:auto;min-height:140px;padding:12px 14px;resize:vertical;line-height:1.5}
.pg-quote{max-height:40vh;overflow:auto;padding:12px 14px;border-radius:14px;background:var(--card2);
white-space:pre-wrap;overflow-wrap:anywhere}
/* the option chosen now, in a pick */
.pg-on .t{font-weight:800}
.pg-check{margin-left:auto;color:var(--a);font-weight:800}
.pg-when{line-height:1.6}

/* the Reader page's part: the card's designs as a grid of their moving pictures (page.js's readerDesigns) */
.rd-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:4px 0}
.rd{display:grid;gap:6px;padding:6px;border-radius:18px;background:var(--card);border:2px solid transparent;color:var(--ink);
text-align:center;transition:border-color .3s}
.rd-art{display:block;width:100%;aspect-ratio:1;border-radius:13px;object-fit:cover;background:var(--card2)}
.rd-n{font-size:12px;font-weight:700;color:var(--dim);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rd-on{border-color:var(--a)}
.rd-on .rd-n{color:var(--ink);font-weight:800}
.rd:disabled{opacity:.7}
/* a person by picture and name (a list's people, the members to pick): his first letter when he has no picture */
.pg-person{display:flex;align-items:center;gap:12px;min-width:0}
.pg-person b{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pg-av{width:36px;height:36px;flex:none;border-radius:50%;overflow:hidden;display:grid;place-items:center;
font-size:15px;font-weight:800;color:var(--ink);background:var(--card2)}
.pg-av img{width:100%;height:100%;object-fit:cover}
.pg-pickp{width:100%}
