:root{
  --canvas:#EEF2E6; --panel:#FFFFFF; --sunk:#F7F9F2;
  --ink:#22302A; --ink2:#4A5A50; --muted:#6E7D72;
  --rule:#C8D3BC; --hair:#DCE4D0;
  --accent:#2E6B44; --accent-soft:#E3EDE4; --accent-ink:#1F4D30;
  --amber:#8A5300; --amber-soft:#F6EBD5;
  --green:#2E6B44; --green-soft:#E3EDE4;
  --red:#A33A2A; --red-soft:#F7E5E1;
  /* the hard border and offset shadow the cards are drawn with */
  --edge:#22302A;
  --pale:#B9C9AC;          /* the tortoise's head and legs */
  --disp:"Young Serif",Georgia,serif;
  --text:"Fraunces",Georgia,serif;
  --ui:"IBM Plex Sans",system-ui,-apple-system,sans-serif;
  --mono:"IBM Plex Mono",ui-monospace,Menlo,monospace;
  --r:10px;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --canvas:#151A16; --panel:#1C231E; --sunk:#232B25;
  --ink:#E7EEE6; --ink2:#AFBCB2; --muted:#87958B;
  --rule:#2E3830; --hair:#28312A;
  --accent:#7FC08F; --accent-soft:#1B2A20; --accent-ink:#9BD2A8;
  --amber:#E0A55A; --amber-soft:#332715;
  --green:#7FC08F; --green-soft:#1B2A20;
  --red:#E58A76; --red-soft:#2E1A16;
  --edge:#3E4C42;
  --pale:#5E7263;
}}
*{box-sizing:border-box}
/* author display rules beat the UA [hidden] rule, so force it */
[hidden]{display:none!important}
body{margin:0;background:var(--canvas);color:var(--ink);font-family:var(--ui);font-size:15px;line-height:1.55;-webkit-font-smoothing:antialiased}
/* Young Serif comes in one weight; asking for a bolder one only smears it */
h1,h2,h3,h4{font-family:var(--disp);font-weight:400;margin:0;letter-spacing:0}
p{margin:0 0 12px}
button{font-family:inherit;font-size:inherit;cursor:pointer}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
img{max-width:100%}
/* a label a screen reader reads out and nobody sees */
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

.top{position:sticky;top:0;z-index:40;background:var(--panel);border-bottom:1px solid var(--rule);display:flex;align-items:center;gap:16px;padding:12px 20px;flex-wrap:wrap}
.brand{display:flex;align-items:center;gap:9px;font-family:var(--disp);font-weight:400;font-size:22px;background:none;border:0;padding:0;color:var(--ink);line-height:1}
.brand:hover{color:var(--accent)}
.blob{width:19px;height:19px;border-radius:48% 52% 45% 55%;background:var(--accent);flex:none}
.proj{font-size:15px;color:var(--ink2)}
.spacer{flex:1}
.ops{display:flex;align-items:center;gap:14px}   /* the studio's own tools, shown only to whoever runs it */
.meter{display:flex;align-items:center;gap:14px;background:var(--sunk);border:1px solid var(--rule);border-radius:var(--r);padding:7px 14px}
.meter .lab{font-family:var(--mono);font-size:9.5px;letter-spacing:.11em;text-transform:uppercase;color:var(--muted);display:block}
.meter .val{font-family:var(--mono);font-size:15px;font-weight:500;color:var(--ink);font-variant-numeric:tabular-nums}
.meter .val.spent{color:var(--amber)}
.meter .sep{width:1px;align-self:stretch;background:var(--rule)}

.wrap{display:grid;grid-template-columns:232px 1fr;min-height:calc(100vh - 56px)}
.rail{border-right:1px solid var(--rule);padding:18px 12px;position:sticky;top:57px;align-self:start}
.rail .cap{font-family:var(--mono);font-size:9.5px;letter-spacing:.13em;text-transform:uppercase;color:var(--muted);padding:0 10px 10px}
.step{display:grid;grid-template-columns:22px 1fr;gap:10px;align-items:start;width:100%;background:none;border:0;text-align:left;padding:9px 10px;border-radius:8px;color:var(--ink2)}
.step:hover{background:var(--sunk)}
.step[aria-current="true"]{background:var(--accent-soft);color:var(--ink)}
.step .n{font-family:var(--mono);font-size:10.5px;width:20px;height:20px;border-radius:50%;display:grid;place-items:center;border:1px solid var(--rule);background:var(--panel);color:var(--muted)}
.step[aria-current="true"] .n{border-color:var(--accent);color:var(--accent-ink);font-weight:500}
.step .t{font-size:13.5px;font-weight:500;line-height:1.3}
.step .s{font-size:11.5px;color:var(--muted);display:block;margin-top:2px}

main{padding:26px 30px 70px;max-width:1000px}
.head{margin-bottom:22px}
.eyebrow{font-family:var(--mono);font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--accent-ink);margin:0 0 7px}
.head h2{font-size:clamp(23px,3vw,29px);line-height:1.12}
.head p{color:var(--ink2);margin-top:7px;max-width:62ch}
.panel{display:none}.panel.on{display:block}

.card{background:var(--panel);border:1px solid var(--rule);border-radius:var(--r);padding:18px 20px;margin-bottom:14px}
.card h3{font-size:16px;margin-bottom:3px}
.card .sub{font-size:13px;color:var(--muted);margin-bottom:14px}
.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px}
label.f{display:block;margin-bottom:12px}
label.f .k,.k{font-family:var(--mono);font-size:9.5px;letter-spacing:.11em;text-transform:uppercase;color:var(--muted);display:block;margin-bottom:5px}
input[type=text],select,textarea{width:100%;font-family:var(--ui);font-size:14.5px;color:var(--ink);background:var(--canvas);border:1px solid var(--rule);border-radius:8px;padding:9px 11px}
textarea{font-family:var(--mono);font-size:12.5px;line-height:1.6;resize:vertical}
input:focus,select:focus,textarea:focus{border-color:var(--accent);outline:none}

.opts{display:grid;gap:10px}
.opt{display:grid;grid-template-columns:20px 1fr auto;gap:13px;align-items:start;border:1px solid var(--rule);border-radius:var(--r);padding:14px 16px;background:var(--panel);cursor:pointer}
.opt[data-sel="1"]{border-color:var(--accent);background:var(--accent-soft)}
.opt .dot{width:16px;height:16px;border-radius:50%;border:1.5px solid var(--rule);margin-top:3px;background:var(--panel)}
.opt[data-sel="1"] .dot{border:5px solid var(--accent)}
.opt b{font-family:var(--disp);font-weight:400;font-size:15px;display:block}
.opt span{font-size:13px;color:var(--ink2);display:block;margin-top:3px}
.opt .price{font-family:var(--mono);font-size:14px;white-space:nowrap;font-variant-numeric:tabular-nums}
.opt .price em{display:block;font-style:normal;font-size:10px;color:var(--muted);text-transform:uppercase;margin-top:2px}
.flag{display:inline-block;font-family:var(--mono);font-size:9.5px;letter-spacing:.09em;text-transform:uppercase;padding:2px 6px;border-radius:4px;margin-left:7px}
.flag.rec{background:var(--green-soft);color:var(--green)}
.flag.exp{background:var(--amber-soft);color:var(--amber)}

.beat{display:grid;grid-template-columns:34px 1fr 100px;gap:12px;align-items:start;padding:10px 0;border-top:1px solid var(--hair)}
.beat:first-of-type{border-top:0}
.beat .i{font-family:var(--mono);font-size:11.5px;color:var(--muted);padding-top:9px}
.beat .txt{font-family:var(--text);font-weight:600;font-size:15.5px;line-height:1.45;color:var(--ink);background:transparent;border:1px solid transparent;border-radius:7px;padding:8px 9px;width:100%;resize:none;overflow:hidden;min-height:40px;display:block}
.beat .txt:hover{background:var(--sunk)}
.beat .txt:focus{background:var(--panel);border-color:var(--accent);outline:none}
.role{font-family:var(--mono);font-size:9.5px;letter-spacing:.07em;text-transform:uppercase;padding:3px 7px;border-radius:4px;background:var(--sunk);color:var(--muted);margin-top:10px;display:inline-block;white-space:nowrap}

.sgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:10px}
.sq{aspect-ratio:var(--page-ar,3/2);border:1px solid var(--rule);border-radius:8px;background:var(--sunk);display:grid;place-items:center;position:relative;overflow:hidden;padding:6px;cursor:pointer}
.sq img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.sq .num{position:absolute;top:5px;left:7px;font-family:var(--mono);font-size:10px;color:var(--muted);background:var(--panel);padding:0 4px;border-radius:3px;z-index:2}
.sq .st{position:absolute;bottom:5px;right:6px;width:8px;height:8px;border-radius:50%;background:var(--rule);z-index:2}
.sq.done{border-color:var(--green)}.sq.done .st{background:var(--green)}
.sq.run .st{background:var(--amber);animation:pulse 1s infinite}
@keyframes pulse{50%{opacity:.3}}
.sq.sel{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft)}
.sq .cap{font-size:10.5px;color:var(--ink2);text-align:center;line-height:1.3;z-index:1}
.sq.done .cap{display:none}

.btn{border:1px solid var(--rule);background:var(--panel);color:var(--ink);border-radius:8px;padding:8px 14px;font-size:13.5px;font-weight:500}
.btn:hover{background:var(--sunk)}
.btn.pri{background:var(--accent);border-color:var(--accent);color:#fff}
.btn.sm{padding:5px 10px;font-size:12.5px}
.btn[disabled]{opacity:.45;cursor:not-allowed}
.row{display:flex;gap:9px;flex-wrap:wrap;align-items:center;margin-top:14px}

.scrim{position:fixed;inset:0;background:rgba(15,12,10,.5);display:none;place-items:center;z-index:80;padding:20px}
.scrim.on{display:grid}
.modal{background:var(--panel);border:1px solid var(--rule);border-radius:14px;width:min(640px,100%);max-height:88vh;overflow:auto;box-shadow:0 20px 50px rgba(0,0,0,.24)}
.mhead{padding:16px 20px;border-bottom:1px solid var(--rule);display:flex;justify-content:space-between;gap:12px}
.mhead h3{font-size:17px}.mhead .ctx{font-size:12.5px;color:var(--muted);margin-top:2px}
.mbody{padding:18px 20px}
.mfoot{padding:14px 20px;border-top:1px solid var(--rule);background:var(--sunk)}
/* the help form. Somebody's own account of what went wrong is prose, not a payload, so it is not set in mono. */
.modal.narrow{width:min(520px,100%)}
#help-said{font-family:var(--ui);font-size:14.5px;line-height:1.55}
#help-mail a,#help-ok a,#help-err a{color:inherit;text-decoration:underline}
.mrow{display:grid;grid-template-columns:20px 1fr auto auto;gap:11px;align-items:center;padding:9px 11px;border:1px solid var(--rule);border-radius:8px;margin-bottom:7px;cursor:pointer}
.mrow[data-sel="1"]{border-color:var(--accent);background:var(--accent-soft)}
.mrow .dot{width:14px;height:14px;border-radius:50%;border:1.5px solid var(--rule)}
.mrow[data-sel="1"] .dot{border:4.5px solid var(--accent)}
.mrow .nm{font-size:13.5px;font-weight:500}
.mrow .tag{font-family:var(--mono);font-size:10.5px;color:var(--muted)}
.mrow .cr{font-family:var(--mono);font-size:13px;font-variant-numeric:tabular-nums}

.ledge{display:grid}
.li{display:flex;justify-content:space-between;gap:12px;font-size:13.5px;padding:7px 0;border-top:1px solid var(--hair)}
.li:first-child{border-top:0}
.li .n{color:var(--ink2)}
.li .v{font-family:var(--mono);font-variant-numeric:tabular-nums}
.li.tot{border-top:1.5px solid var(--rule);padding-top:10px;font-weight:600}
.warn{background:var(--amber-soft);color:var(--amber);border-radius:8px;padding:10px 13px;font-size:13px;margin-top:12px}
.err{background:var(--red-soft);color:var(--red);border-radius:8px;padding:10px 13px;font-size:13px;margin-top:12px}
.note{border-left:3px solid var(--accent);background:var(--accent-soft);padding:13px 16px;border-radius:0 8px 8px 0;font-size:13.5px;color:var(--ink2);margin-top:14px}
.note b{color:var(--ink);font-family:var(--disp)}
code{font-family:var(--mono);font-size:12px;background:var(--sunk);padding:1.5px 5px;border-radius:4px}

.toast{position:fixed;bottom:18px;left:50%;transform:translateX(-50%) translateY(90px);background:var(--ink);color:var(--canvas);padding:11px 18px;border-radius:9px;font-size:13.5px;z-index:90;transition:transform .22s ease;max-width:90vw}
.toast.on{transform:translateX(-50%) translateY(0)}

.gate{display:grid;place-items:center;min-height:70vh;text-align:center;padding:20px}
.gate .box{max-width:460px}
.gate h2{font-size:26px;margin-bottom:10px}
.gate p{color:var(--ink2);text-wrap:balance}
.gate p.dim{font-size:14px;margin-top:-4px}

@media (max-width:820px){
  .wrap{grid-template-columns:1fr}
  .rail{position:static;border-right:0;border-bottom:1px solid var(--rule);display:flex;gap:6px;overflow-x:auto;padding:10px}
  .rail .cap{display:none}
  .step{grid-template-columns:auto;min-width:112px}.step .s{display:none}
  main{padding:20px 16px 60px}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* ===== chat + canvas layout ===== */
.split{display:grid;grid-template-columns:min(440px,38%) 1fr;height:calc(100vh - 57px)}
.chat{display:flex;flex-direction:column;border-right:1px solid var(--rule);background:var(--panel);min-height:0}
.log{flex:1;overflow-y:auto;padding:22px 20px 8px;display:flex;flex-direction:column;gap:14px}
.msg{display:flex;gap:10px;align-items:flex-start;max-width:100%}
.msg.me{justify-content:flex-end}
.msg .av{width:22px;height:22px;border-radius:50%;background:var(--accent);color:#fff;flex:none;margin-top:2px;display:grid;place-items:center;font-family:var(--disp);font-size:11px}
.msg .av::after{content:"t"}
.msg .bub{font-size:14.5px;line-height:1.55;max-width:88%}
.msg.me .bub{background:var(--accent-soft);color:var(--ink);padding:9px 13px;border-radius:14px 14px 4px 14px;font-weight:500}
.msg .bub a{color:var(--accent-ink)}
.dim{color:var(--muted);font-size:13px}
.bad{color:var(--red)}
.working{display:inline-block;width:9px;height:9px;border-radius:50%;background:var(--accent);margin-right:5px;animation:bl 1s infinite}
@keyframes bl{50%{opacity:.25}}

.composer{border-top:1px solid var(--rule);padding:12px 16px 16px;background:var(--panel)}
.chips{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:10px}
.chip{border:1px solid var(--rule);background:var(--canvas);color:var(--ink);border-radius:18px;padding:7px 13px;font-size:13px}
.chip:hover{background:var(--sunk)}
.chip.pri{background:var(--accent);border-color:var(--accent);color:#fff}
.inputrow{display:flex;gap:8px}
.inputrow input{flex:1}
.inputrow .btn{padding:9px 15px}

.canvas{display:flex;flex-direction:column;min-height:0;background:var(--canvas)}
.ctab{display:flex;align-items:center;gap:4px;padding:10px 16px;border-bottom:1px solid var(--rule);background:var(--panel)}
.tb{background:none;border:0;padding:6px 12px;border-radius:7px;font-size:13.5px;font-weight:500;color:var(--muted)}
.tb:hover:not([disabled]){background:var(--sunk);color:var(--ink)}
.tb.on{background:var(--accent-soft);color:var(--accent-ink)}
.tb[disabled]{opacity:.4;cursor:default}
.tb.util{font-size:12.5px;color:var(--muted);font-weight:400}   /* a utility beside Save, not a step in the book */
.cbody{flex:1;overflow-y:auto;padding:20px}
/* the road ahead, while the workspace has nothing in it yet */
.steps{list-style:none;margin:0 auto;padding:0;width:min(360px,100%);display:flex;flex-direction:column;gap:2px}
.steps li{display:grid;grid-template-columns:18px 1fr auto;align-items:center;gap:12px;padding:10px 12px;border-radius:9px;color:var(--muted);font-size:14.5px}
.steps .d{width:9px;height:9px;border-radius:50%;border:1.5px solid var(--rule);justify-self:center}
.steps li[aria-current]{background:var(--panel);color:var(--ink);font-weight:500}
.steps li[aria-current] .d{background:var(--accent);border-color:var(--accent)}
.steps li.done{color:var(--ink2)}
.steps li.done .d{background:var(--rule);border-color:var(--rule)}
.steps .here{font-family:var(--mono);font-size:11px;color:var(--accent-ink);letter-spacing:.04em}
.steps li:not([aria-current]) .here{display:none}
.stepsnote{margin:20px auto 0;width:min(360px,100%);padding:0 12px;font-family:var(--mono);font-size:11.5px;line-height:1.5;color:var(--muted)}
/* the workspace centres whatever is standing in for a book */
#cbody:has(.steps){display:flex;flex-direction:column;justify-content:center}
.empty{height:100%;display:grid;place-items:center;text-align:center;color:var(--muted)}
.empty .blob.big{width:46px;height:46px;border-radius:48% 52% 45% 55%;background:var(--rule);display:block;margin:0 auto 14px}
.empty p{max-width:34ch}

.castgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(176px,1fr));gap:14px}
.ccard{margin:0;background:var(--panel);border:1px solid var(--rule);border-radius:var(--r);overflow:hidden;position:relative}
.ccard.done{border-color:var(--green)}
.cimg{aspect-ratio:1;background:var(--sunk);display:grid;place-items:center}
.cimg img{width:100%;height:100%;object-fit:cover;display:block}
.ph{font-size:12px;color:var(--muted);font-family:var(--mono)}
.ccard figcaption{padding:10px 12px}
.ccard figcaption b{display:block;font-family:var(--disp);font-size:14.5px}
.ccard figcaption span{font-size:12px;color:var(--muted)}
.ccard .redo{position:absolute;top:8px;right:8px;opacity:.75;background:var(--panel);transition:opacity .15s}
.ccard:hover .redo,.ccard .redo:focus-visible{opacity:1}
.chip[disabled]{opacity:.4;cursor:default}

.beats{max-width:740px}
.detail{margin-top:20px;background:var(--panel);border:1px solid var(--rule);border-radius:var(--r);padding:16px 18px}
.detail h4{font-family:var(--disp);font-size:16px;margin-bottom:10px}
.detail .big{width:100%;border-radius:8px;border:1px solid var(--rule);margin-bottom:12px;display:block}
.muted{color:var(--muted);font-weight:400;letter-spacing:0;text-transform:none}

@media (max-width:900px){
  .split{grid-template-columns:1fr;height:auto}
  .chat{border-right:0;border-bottom:1px solid var(--rule);height:62vh}
  .canvas{height:auto}
}

/* ===== moodboard ===== */
.moodwrap{max-width:860px}
.moodwrap img{width:100%;border-radius:var(--r);border:1px solid var(--rule);display:block;margin-bottom:12px}

/* ===== storyboard (the dummy) ===== */
.board{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px}
.bcard{display:flex;flex-direction:column;gap:8px;min-width:0;text-align:left;padding:12px 13px;border:1px solid var(--rule);border-radius:10px;background:var(--panel);color:var(--ink);cursor:pointer}
.bcard:hover{border-color:var(--accent)}
.bcard.sel{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft)}
.bcard .bhead{display:flex;align-items:center;gap:8px}
.bcard .swatch{width:26px;height:26px;border-radius:6px;border:1px solid rgba(0,0,0,.12);flex:none}
.bcard .bnum{font-family:var(--mono);font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.bcard .btext{font-family:var(--text);font-weight:600;font-size:14px;line-height:1.4;color:var(--ink);overflow-wrap:anywhere}
.bcard .btext.quiet{font-family:var(--ui);font-weight:400;font-style:italic;color:var(--muted)}
.bcard .bline{display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px;font-size:12.5px;line-height:1.4;color:var(--ink2);overflow-wrap:anywhere}
.bcard .bk{flex:none;width:100%;font-family:var(--mono);font-size:9px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.bcard .gauge{flex:1;min-width:60px;height:7px;background:var(--sunk);border-radius:4px;overflow:hidden;display:block}
.bcard .gauge i{display:block;height:100%;background:var(--accent);border-radius:4px}
.bcard .bpct{font-size:12px;color:var(--muted)}
.boardkey{display:flex;flex-wrap:wrap;align-items:center;gap:6px 16px;font-size:12.5px;color:var(--ink2);background:var(--panel);border:1px solid var(--rule);border-radius:10px;padding:10px 13px;margin-bottom:14px}
.boardkey>span{display:inline-flex;align-items:center;gap:6px}
.boardkey .k1{width:14px;height:14px;border-radius:4px;background:var(--accent-soft);border:1px solid var(--rule);display:inline-block}
.boardkey .k2{font-family:var(--mono);font-size:9px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:500}
.boardkey .k3{width:34px;height:7px;border-radius:4px;background:var(--sunk);display:inline-block;overflow:hidden}
.boardkey .k3 i{display:block;width:60%;height:100%;background:var(--accent)}
.cardrow.pics{grid-template-columns:repeat(3,minmax(0,1fr))}
.pcard.withimg img{display:block;width:100%;aspect-ratio:1;object-fit:cover;border-radius:7px;margin-bottom:7px;background:var(--sunk)}
@media (max-width:900px){.cardrow.pics{grid-template-columns:1fr}}

/* ===== manuscript ===== */
.manuscript{
  max-width:62ch;background:var(--panel);border:1px solid var(--rule);
  border-radius:var(--r);padding:24px 28px;margin-bottom:26px;
}
.manuscript h4{font-family:var(--disp);font-size:21px;margin-bottom:14px}
.manuscript p{font-family:var(--text);font-weight:600;font-size:16.5px;line-height:1.7;color:var(--ink);margin:0 0 13px}
.manuscript p.dim{font-family:var(--ui);font-weight:400;font-size:12.5px;color:var(--muted);margin-top:16px}
.pagehead{font-family:var(--mono);font-size:10px;letter-spacing:.13em;text-transform:uppercase;color:var(--muted);margin-bottom:10px}

/* ===== prompt inspector ===== */
.prompt{background:var(--panel);border:1px solid var(--rule);border-radius:var(--r);margin-bottom:10px;overflow:hidden}
.prompt summary{padding:11px 15px;cursor:pointer;font-size:14px;display:flex;gap:10px;align-items:baseline;flex-wrap:wrap}
.prompt summary::-webkit-details-marker{display:none}
.prompt summary b{font-family:var(--mono);font-size:11.5px;letter-spacing:.08em;color:var(--accent-ink)}
.prompt summary .tag{font-family:var(--mono);font-size:11px;color:var(--muted)}
.prompt[open] summary{border-bottom:1px solid var(--rule);background:var(--sunk)}
.prompt pre{
  margin:0;padding:16px 18px;font-family:var(--mono);font-size:12px;line-height:1.65;
  white-space:pre-wrap;overflow-wrap:anywhere;color:var(--ink2);max-height:460px;overflow-y:auto;
}

.pfhead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:5px}
.pfhead .k{margin-bottom:0}
.pfnav{display:flex;gap:5px}
#pf-refs{margin-top:6px}

.sbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.sq .pick{position:absolute;top:5px;right:6px;width:20px;height:20px;border-radius:5px;border:1.5px solid var(--rule);background:var(--panel);z-index:3;display:grid;place-items:center;font-size:13px;line-height:1;color:#fff}
.sq .pick:hover{border-color:var(--accent)}
.sq .pick.on{background:var(--accent);border-color:var(--accent)}
.sq .pick.on::after{content:"✓"}
.sq.picked{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft)}

.sq .old{position:absolute;left:5px;bottom:5px;z-index:2;font-family:var(--mono);font-size:9px;letter-spacing:.04em;text-transform:uppercase;background:var(--amber);color:#fff;padding:1px 5px;border-radius:3px}
.sq .chk{position:absolute;right:20px;bottom:3px;z-index:2;width:16px;height:16px;border-radius:50%;display:grid;place-items:center;font-size:11px;font-weight:700;line-height:1;color:#fff;background:var(--muted)}
.sq .chk.ok{background:var(--green)}
.sq .chk.bad{background:var(--red)}
.note{font-size:13px;color:var(--ink2);background:var(--sunk);border:1px solid var(--rule);border-radius:8px;padding:8px 11px;margin-bottom:10px}
.note.warn{background:var(--red-soft);border-color:transparent;color:var(--ink)}
.note.good{background:var(--green-soft);border-color:transparent}
.note ul{margin:5px 0 0 18px}
.pages{display:grid;grid-template-columns:repeat(auto-fill,minmax(420px,1fr));gap:20px}
.page{margin:0}
.sheet{position:relative;aspect-ratio:var(--page-ar,842/561);container-type:inline-size;overflow:hidden;border-radius:8px;border:1px solid var(--rule);background:var(--sunk)}
.sheet img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;max-width:none}
.sheet .ln{position:absolute;white-space:nowrap;font-family:'Andika','Atkinson Hyperlegible',system-ui,sans-serif;font-weight:700;line-height:1;transform-origin:50% 62%}
.sheet .lab{position:absolute;opacity:.95}
.page figcaption{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:7px;font-size:12.5px}
.page figcaption b{font-family:var(--mono);font-weight:500;color:var(--muted)}
.page figcaption label{display:flex;align-items:center;gap:6px;color:var(--muted)}
.page figcaption select{width:auto;font-size:12.5px;padding:3px 7px}
.tagw{font-family:var(--mono);font-size:9.5px;text-transform:uppercase;letter-spacing:.04em;background:var(--amber);color:#fff;padding:1px 6px;border-radius:3px}
@media (max-width:560px){.pages{grid-template-columns:1fr}}

label.auto{display:flex;align-items:flex-start;gap:9px;margin-top:14px;padding:10px 12px;border:1px solid var(--rule);border-radius:8px;font-size:13px;cursor:pointer}
label.auto input{margin-top:3px;flex:none}

.ccard .cfault{display:block;margin-top:4px;font-size:11.5px;color:var(--red)}

.tnotes{margin:6px 0 0 18px;font-size:13px}
.tnotes li{margin-bottom:4px}

label.f .hint{display:block;margin-top:4px;font-size:11.5px;color:var(--muted)}

.styles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:22px;max-width:900px}
.stylecard{display:block;text-align:left;padding:8px;border:2px solid var(--rule);border-radius:12px;background:var(--panel);cursor:pointer}
.stylecard:hover{border-color:var(--accent)}
.stylecard.on{border-color:var(--accent);background:var(--accent-soft)}
.stylecard .sheet{border-radius:6px;margin-bottom:8px}
.stylecard .sname{display:flex;justify-content:space-between;align-items:baseline;font-size:14px}
.stylecard .sname i{font-style:normal;font-family:var(--mono);font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:var(--accent)}
.stylecard .dim{display:block}
@media (max-width:560px){.styles{grid-template-columns:1fr}}

.manuscript.editing .mstitle{font:inherit;font-family:var(--disp);font-size:20px;font-weight:400;width:100%;border:1px solid transparent;background:transparent;padding:4px 6px;margin:0 -6px 8px;border-radius:6px}
.manuscript.editing .msbody{font:inherit;width:100%;min-height:320px;border:1px solid transparent;background:transparent;padding:6px;margin:0 -6px;border-radius:6px;resize:none;line-height:1.75;overflow:hidden}
.manuscript.editing .mstitle:hover,.manuscript.editing .msbody:hover{border-color:var(--rule)}
.manuscript.editing .mstitle:focus,.manuscript.editing .msbody:focus{border-color:var(--accent);background:var(--canvas);outline:none}

.cardrow{display:grid;gap:8px;margin-top:10px}
.pcard{display:block;width:100%;text-align:left;border:1.5px solid var(--rule);background:var(--panel);color:var(--ink);border-radius:10px;padding:10px 12px;cursor:pointer;font-size:13.5px;line-height:1.45}
.pcard:hover:not([disabled]){border-color:var(--accent);background:var(--accent-soft)}
.pcard b{display:block;font-family:var(--disp);font-size:15px}
.pcard .ptag{display:block;font-family:var(--mono);font-size:10px;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);margin:2px 0 5px}
.pcard .pbody{display:block;color:var(--ink2)}
.pcard[disabled]{opacity:.5;cursor:default}
.pcard.picked{opacity:1;border-color:var(--accent);background:var(--accent-soft)}

.every{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--ink2);cursor:pointer;white-space:nowrap}
.every input{margin:0}
.bub a.change{font-size:12.5px;margin-left:4px;white-space:nowrap}

.pcard .strip{display:flex;height:22px;border-radius:5px;overflow:hidden;margin:2px 0 7px;border:1px solid rgba(0,0,0,.1)}
.pcard .strip i{flex:1;display:block}
.sheet .covertitle{position:absolute;left:8%;right:8%;top:6%;text-align:center;font-family:'Andika',system-ui,sans-serif;font-weight:700;font-size:7cqw;line-height:1.12;color:#2B211B;text-shadow:0 0 .12em #fff8,0 0 .2em #fff8}
.sheet .covertitle.classic{font-family:'Fraunces',Georgia,serif;font-weight:600}

.talk{background:var(--panel);border:1px solid var(--rule);border-radius:10px;padding:14px 16px;max-width:760px}
.talk textarea{margin-bottom:10px}
.talk .talkon{display:flex;align-items:center;gap:7px;font-size:13px;margin-bottom:12px;cursor:pointer}
.sheet.talksheet{display:grid;place-items:center;font-family:'Andika',system-ui,sans-serif;font-weight:700;color:#2B211B}
.sheet.talksheet.classic{font-family:'Fraunces',Georgia,serif;font-weight:600}
.sheet.talksheet>div{width:72%}
.sheet.talksheet b{display:block;font-size:4cqw;margin-bottom:1.6cqw}
.sheet.talksheet p{font-size:2cqw;opacity:.8;margin:0 0 1.6cqw;line-height:1.35}
.sheet.talksheet ol{margin:0;padding-left:3.4cqw;font-size:2.5cqw;line-height:1.35}
.sheet.talksheet li{margin-bottom:1cqw}

.savedat{font-family:var(--mono);font-size:10.5px;color:var(--muted);margin-right:4px;white-space:nowrap}
.savedat.bad{color:var(--red)}

/* files */
.frow{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;padding:9px 11px;border:1px solid var(--rule);border-radius:8px;margin-bottom:7px}
.frow .fk{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);min-width:42px}
.frow .fn{min-width:0}.frow .fn b{display:block;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.frow .fn span{font-size:12px;color:var(--muted)}
.frow .fa{display:flex;gap:6px}
@media (max-width:520px){.frow{grid-template-columns:1fr}.frow .fk{display:none}}

/* staging record on a spread */
.staging summary{cursor:pointer}
.staging ol{margin:8px 0 6px 18px;display:grid;gap:8px}
.staging li{font-size:12.5px;line-height:1.45}
.staging li.pick{font-weight:500}

/* keeping a person for later books */
.ccard .keep{position:absolute;left:8px;top:8px}
.ccard .kept{position:absolute;left:8px;top:10px;font-size:11px;background:var(--panel);border:1px solid var(--rule);border-radius:6px;padding:2px 7px;color:var(--muted)}

/* sign-in */
.signin{display:flex;gap:8px;margin:18px 0 10px;flex-wrap:wrap;justify-content:center}
.signin input{flex:1 1 220px;min-width:0;padding:9px 11px;border:1px solid var(--rule);border-radius:8px;font:inherit;background:var(--panel)}

/* ---------------- home: the shelf and the way in ---------------- */
/*
 * The first screen: ruled paper, one card that asks who the next book is for,
 * the books still being made, and a shelf of the finished ones. What it shows
 * depends only on how many books the person has — none, one, or several.
 */
.home{min-height:100vh;background:var(--canvas);background-image:repeating-linear-gradient(var(--canvas) 0 31px,var(--hair) 31px 32px)}
.hhead{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px;padding:20px 40px;background:var(--canvas);border-bottom:2px solid var(--edge)}
.wordmark{font-family:var(--disp);font-weight:400;font-size:30px;line-height:1;background:none;border:0;padding:0;color:var(--ink)}
.hmain{max-width:1120px;margin:0 auto;padding:40px 40px 64px;display:flex;flex-direction:column;gap:34px}
.hmain.narrow{max-width:860px;padding-top:48px;gap:28px}

/* the account button, and what it opens */
.acct{position:relative}
.acctbtn{display:flex;align-items:center;gap:10px;min-height:44px;padding:0 14px;border:1.5px solid var(--edge);border-radius:14px;background:var(--panel);font-weight:500;font-size:14px;color:var(--ink)}
.avatar{width:28px;height:28px;border-radius:50%;background:var(--accent);color:#fff;display:grid;place-items:center;font-size:13px;flex:none}
.acctmenu{position:absolute;right:0;top:calc(100% + 8px);z-index:30;min-width:220px;padding:14px;background:var(--panel);border:1.5px solid var(--edge);border-radius:14px;box-shadow:4px 4px 0 var(--edge);display:flex;flex-direction:column;gap:10px;align-items:flex-start}
.acctmenu .mail{margin:0;font-size:13px;color:var(--ink2);overflow-wrap:anywhere}
/* the operator's way to /ops is a link, not a button, so it needs the button's shape */
.acctmenu a.btn{display:inline-block;text-decoration:none}

/* the welcome, on a first visit */
.hhero{display:flex;flex-direction:column;gap:12px;text-align:center}
.hhero h1{font-size:56px;line-height:1.08}
.hhero p{margin:0;font-size:18px;color:var(--ink2)}
.hnote{margin:0;text-align:center;font-family:var(--mono);font-size:13px;color:var(--ink2)}
.hnote.left{text-align:left;font-size:12px}

/* the card that asks */
.hcard{background:var(--panel);border:1.5px solid var(--edge);border-radius:14px;box-shadow:5px 5px 0 var(--edge);display:flex;flex-direction:column}
.hcard.flat{box-shadow:none}
.hcard.strip{padding:16px;flex-direction:row;flex-wrap:wrap;gap:14px;align-items:center}
/* one line where there is room for it; on a phone the greeting wraps inside its bubble */
@media (min-width:701px){.hcard.strip .hbub{white-space:nowrap}}
.hsaid{display:flex;gap:12px;align-items:flex-start;padding:24px 24px 8px}
.hcard.strip .hsaid{padding:0;flex:0 1 auto;min-width:0;max-width:100%}
.tav{flex:none;width:32px;height:32px;border-radius:50%;background:var(--accent);color:#fff;display:grid;place-items:center;font-family:var(--disp);font-size:15px}
.hsaid>div{display:flex;flex-direction:column;gap:6px;margin-top:4px}
.hbub{align-self:flex-start;margin:0;font-size:18px;line-height:1.5;padding:10px 16px;background:var(--canvas);border-radius:4px 16px 16px 16px}
.hcard.strip .hbub{font-size:16px;padding:8px 14px}
.hsub{margin:0 0 0 4px;font-size:14px;color:var(--ink2)}
.hform{margin:12px 16px 16px;display:flex;gap:10px;align-items:center;border:1.5px solid var(--rule);border-radius:14px;background:var(--sunk);padding:8px}
.hcard.strip .hform{margin:0;flex:1 1 420px;padding:4px 4px 4px 12px}
.hform input{flex:1;min-height:48px;border:0;background:transparent;font:400 18px var(--ui);color:var(--ink);padding:0 6px}
.hcard.strip .hform input{min-height:44px;font-size:16px}
.hform input::placeholder{color:var(--muted)}
.hsend{flex:none;width:48px;height:48px;border:1.5px solid var(--edge);border-radius:14px;background:var(--accent);color:#fff;display:grid;place-items:center}
.hcard.strip .hsend{width:44px;height:44px}
.halso{display:flex;flex-wrap:wrap;gap:16px;padding:0 24px 20px;font-size:14px}
.halso button{background:none;border:0;padding:0;color:var(--accent);font:inherit;text-decoration:underline;text-underline-offset:3px}
.halso button:hover{color:var(--accent-ink)}

/* one book, large */
.hone{display:flex;flex-direction:row;flex-wrap:wrap;gap:32px;align-items:center;padding:24px}
.hone .side{flex:1 1 340px;display:flex;flex-direction:column;gap:12px}
.hone h1{font-size:36px;line-height:1.1}
.hmeta{margin:0;font-family:var(--mono);font-size:13px;color:var(--ink2)}
.hcalm{margin:0;font-size:15px;color:var(--ink2)}
.hrow{display:flex;flex-wrap:wrap;gap:10px;margin-top:4px}
.hbtn{display:inline-flex;align-items:center;min-height:44px;padding:0 18px;border:1.5px solid var(--edge);border-radius:14px;background:transparent;color:var(--ink);font-weight:500;font-size:15px;text-decoration:none}
.hbtn.pri{background:var(--accent);color:#fff;font-weight:600}
.hbtn.pri:hover{background:var(--accent-ink)}

/* a run of books still being made */
.heyebrow{margin:0;font-family:var(--mono);font-size:12px;letter-spacing:.08em;text-transform:uppercase;font-weight:400;color:var(--ink2)}
.hgo{display:flex;flex-direction:column;gap:14px}
.hgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.hwip{display:flex;gap:18px;align-items:center;background:var(--panel);border:1.5px solid var(--edge);border-radius:14px;padding:14px}
.hwip .side{flex:1;display:flex;flex-direction:column;gap:8px;min-width:0}
.hwip h3{font-size:20px;overflow-wrap:anywhere}
.hlink{align-self:flex-start;background:none;border:0;padding:0;font:600 14px var(--ui);color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.hlink:hover{color:var(--accent-ink)}
.bar{height:8px;background:var(--hair);border-radius:14px;overflow:hidden}
.bar i{display:block;height:100%;background:var(--accent);border-radius:14px}
.hwip .bar{height:6px;border-radius:3px}

/* the shelf: a spine per book, standing on a board */
.hshelf{display:flex;flex-direction:column;gap:18px}
.hshelfname{font-size:22px}
.shelfhead{display:flex;justify-content:space-between;align-items:baseline;gap:16px}
.shelfhead h2{font-size:26px}
.shelfhead p{margin:0;font-size:14px;color:var(--ink2)}
.hboards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:24px;align-items:end;padding-bottom:10px;border-bottom:8px solid var(--edge)}
.hboards.four{grid-template-columns:repeat(4,minmax(0,1fr))}
.spine{display:flex;align-items:flex-end;aspect-ratio:3/4;border-radius:3px 10px 10px 3px;box-shadow:inset 8px 0 0 rgba(0,0,0,.16);padding:14px;text-decoration:none;border:0;font:inherit;text-align:left;overflow:hidden}
.spine span{font-family:var(--disp);font-size:18px;line-height:1.1;overflow-wrap:anywhere}
.spine:hover{box-shadow:inset 8px 0 0 rgba(0,0,0,.16),0 -4px 0 var(--edge)}
.spine.small{width:96px;flex:none;aspect-ratio:3/4;border-radius:2px 8px 8px 2px;box-shadow:inset 6px 0 0 rgba(0,0,0,.16);padding:0}
.spine.small span{display:none}   /* the title is beside it, on the card */
.spine.big{width:190px;flex:none;border-radius:3px 12px 12px 3px;box-shadow:inset 10px 0 0 rgba(0,0,0,.16);padding:16px}
.spine.big span{font-size:22px}
.spine.pic span{text-shadow:0 1px 3px rgba(0,0,0,.55)}
.spine.blank{background:var(--sunk);border:1.5px dashed var(--muted);box-shadow:none;color:var(--ink2)}
.spine.blank:hover{box-shadow:0 -4px 0 var(--edge)}

@media (max-width:860px){
  .hhead,.hmain{padding-left:16px;padding-right:16px}
  .hhero h1{font-size:38px}
  .hgrid{grid-template-columns:1fr}
  .hboards,.hboards.four{grid-template-columns:repeat(3,minmax(0,1fr))}
  .hone .side{flex-basis:100%}
  .spine.big{width:140px}
}

/* ---------------- the brief: one question, and what it changes ---------------- */
/*
 * A screen of its own, between home and the studio. The question and its
 * answers sit together on the left; the panel on the right says what the
 * answer does to the book, and follows the pointer across the cards.
 */
.brief{min-height:100vh;background:var(--canvas);display:flex;flex-direction:column}
.bhead{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px;padding:20px 44px}
.wordmark.sm{font-size:26px}
.bbook{font-size:15px;color:var(--ink2)}
.bmain{flex:1;display:flex;align-items:safe center;justify-content:center;padding:10px 44px 56px}
.bmain>*{min-width:0}
.bask,.bpanel{flex-basis:0}
.bmain{gap:48px;flex-wrap:wrap;max-width:1208px;margin:0 auto;width:100%}
.bask{flex:1 1 540px;display:flex;flex-direction:column;gap:18px}
.bask h1{font-size:50px;line-height:1.06}
.bask h1.long{font-size:36px;line-height:1.12}
.bsub{margin:0;font-size:17px;color:var(--ink2)}

.dots{display:flex;gap:9px}
.dot{width:10px;height:10px;border-radius:50%;background:var(--rule)}
.dot.on{background:var(--accent)}

.bcards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:8px}
.bcards.tall{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
/* words read as a row; an age earns the tall card, with its numeral large */
.bcard{display:flex;align-items:baseline;justify-content:space-between;gap:14px;min-height:52px;padding:14px 18px;border:1.5px solid var(--rule);border-radius:14px;background:var(--panel);color:var(--ink);text-align:left;font:inherit}
.bcards.tall .bcard{flex-direction:column;align-items:flex-start;justify-content:space-between;gap:10px;min-height:118px;padding:18px}
.bcard .l{font-family:var(--disp);font-size:19px;line-height:1.2;overflow-wrap:anywhere}
.bcards.tall .bcard .l{font-size:28px;line-height:1.08}
.bcard .n{font-family:var(--mono);font-size:11.5px;line-height:1.45;color:var(--ink2);flex:none;text-align:right}
.bcards.tall .bcard .n{text-align:left}
.bcard:hover,.bcard:focus-visible{border-color:var(--edge);box-shadow:5px 5px 0 var(--edge)}
.bcard.on{background:var(--accent);border-color:var(--edge);color:#fff;box-shadow:5px 5px 0 var(--edge)}
.bcard.on .n{color:#D6E5D9}
/* the one we would pick: marked, not chosen — choosing it is still the person's */
.bcard.sug{border-color:var(--edge);border-width:1.5px}
.bcard .tag{align-self:flex-start;margin-top:2px;font-family:var(--mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--accent);border:1px solid var(--accent);border-radius:99px;padding:1px 7px}

.btype{display:flex;gap:10px;align-items:center;margin-top:4px}
.btype input{flex:1;min-height:52px;border:1.5px solid var(--rule);border-radius:14px;background:var(--sunk);font:400 16px var(--ui);color:var(--ink);padding:0 18px}
.btype input::placeholder{color:var(--muted)}
.brow{display:flex;gap:22px;align-items:center;margin-top:2px}

.bpanel{flex:1 1 320px;background:var(--panel);border:1.5px solid var(--rule);border-radius:14px;padding:30px;display:flex;flex-direction:column;gap:18px}
.peyebrow{margin:0;font-family:var(--mono);font-size:11.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink2)}
.plead{margin:0;font-family:var(--text);font-size:21px;line-height:1.6;color:var(--ink)}
.pfacts{display:flex;flex-direction:column;gap:11px;margin-top:2px}
.pfacts div{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding-bottom:10px;border-bottom:1px solid var(--hair)}
.pfacts span{font-size:14px;color:var(--ink2)}
.pfacts b{font-family:var(--mono);font-size:15px;font-weight:500}
.pnote{margin:0;font-size:14px;line-height:1.55;color:var(--ink2)}

/*
 * Choosing the story, on the brief's frame: a wider question side, and three
 * stories read across rather than down. Every row is the same row in all three,
 * so they are compared on the same terms.
 */
.pitch .bask{flex:1 1 700px}
.pitch .bask h1{font-size:44px}
/* a subgrid, so the same row sits at the same height in all three: the point of reading across */
.pcols{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:auto auto auto auto auto auto;gap:16px;margin-top:4px}
.pcols.one{grid-template-columns:minmax(0,420px);justify-content:start}
.pcol{display:grid;grid-row:span 6;grid-template-rows:subgrid;min-width:0;padding:0;border:1.5px solid var(--rule);border-radius:14px;background:var(--panel);color:var(--ink);text-align:left;font:inherit;overflow:hidden}
.pcol .strip{display:block;height:7px;flex:none}
.pcol .t{display:block;padding:16px 17px 14px;border-bottom:1px solid var(--hair);font-family:var(--disp);font-size:21px;line-height:1.14;overflow-wrap:anywhere}
.pcol .pcell{display:block;padding:15px 17px;border-bottom:1px solid var(--hair)}
.pcol .pcell:last-child{border-bottom:0}
.pcell .k{display:block;font-family:var(--mono);font-size:9.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink2);margin-bottom:6px}
.pcell .s{display:block;font-family:var(--mono);font-size:12.5px;font-weight:500;margin-bottom:3px;overflow-wrap:anywhere}
.pcell .v{display:block;font-size:13.5px;line-height:1.48;color:var(--ink)}
.pcell .v.dim{color:var(--ink2)}
.pcol:hover,.pcol:focus-visible,.pcol.on{border-color:var(--edge);box-shadow:6px 6px 0 var(--edge)}
.pwait{margin:0;font-size:15px;line-height:1.55;color:var(--ink2)}

/* while they are being thought up: the same columns, the same rows, nothing in them yet */
.pcol.ghost{border-style:dashed;box-shadow:none}
.pcol.ghost .strip{background:var(--rule)}
.pcol.ghost .t{padding-top:19px;padding-bottom:17px}
.gbar{display:block;height:11px;border-radius:5px;background:var(--sunk);margin-top:7px;animation:gpulse 1.7s ease-in-out var(--d,0s) infinite}
.pcol.ghost .t .gbar{height:18px;margin-top:0}
.pcol.ghost .pcell .gbar:first-of-type{margin-top:0}
@keyframes gpulse{0%,100%{opacity:1}50%{opacity:.4}}
@media (prefers-reduced-motion:reduce){.gbar{animation:none;opacity:.7}}
.pitch .hbtn:disabled,.pitch .btype input:disabled{opacity:.45}

/*
 * The words: the story set as a typescript, one numbered line a paragraph. The
 * panel on the right carries on from the brief and the stories before it.
 */
#wait .bask{flex:1 1 640px;gap:20px}
#wait .bpanel,.words .bpanel{align-self:flex-start}
.words .bask{flex:1 1 700px}   /* beside the title, not floating against a long story */
.words .bask>div{display:flex;flex-direction:column;gap:18px}
.wtitle{font-family:var(--disp);font-size:38px;line-height:1.1;font-weight:400;color:var(--ink);width:100%;border:1.5px solid transparent;border-radius:10px;background:transparent;padding:4px 8px;margin:0 -8px}
.wtitle:hover{border-color:var(--rule)}
.wtitle:focus{border-color:var(--accent);background:var(--panel);outline:none}
.wtitle::placeholder{color:var(--muted)}
.wmeta{display:flex;flex-wrap:wrap;gap:18px;font-family:var(--mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink2)}

.tscript{display:flex;flex-direction:column;gap:7px;background:var(--panel);border:1.5px solid var(--rule);border-radius:16px;padding:20px 28px 24px;font-family:var(--mono);color:var(--ink)}
/* said once, at the top of the story, so the lines do not have to be hovered to be found */
.tcap{display:flex;align-items:baseline;gap:8px;margin:0 0 14px;padding-bottom:12px;border-bottom:1px solid var(--hair);font-family:var(--mono);font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink2)}
.tcap b{font-weight:400;color:var(--muted)}
.tcap b::before{content:"\00b7";margin-right:8px}
.tscript.dim{opacity:.5}
.tline{display:flex;gap:18px;align-items:baseline}
.tn{width:22px;flex:none;text-align:right;font-size:11px;color:#AFBCA6;padding-top:7px}
/* every line is a field, and looks like one at rest — not only under the pointer */
.tt{flex:1;min-width:0;font:inherit;font-size:14px;line-height:1.95;letter-spacing:-.1px;color:var(--ink);border:1.5px solid transparent;border-radius:8px;background:var(--sunk);padding:2px 10px;margin-left:-10px;resize:none;overflow:hidden;cursor:text}
.tt:hover{border-color:var(--rule)}
.tt:focus{border-color:var(--accent);background:var(--panel);outline:none}
.tt.wordless{color:var(--muted)}
.tnote{flex:none;font-size:10.5px;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);padding-top:9px}
/* a spread with no words: the line is short, and says so right beside itself */
.tline.silent .tt{flex:0 0 auto;width:3.4em;text-align:center}

.wsay{margin:0;font-size:14.5px;line-height:1.55;color:var(--ink2)}
.wacts{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.wacts .hbtn{background:var(--panel);border-color:var(--rule);font-weight:400;font-size:14px}
.wacts .hbtn.pri{background:var(--accent);border-color:var(--edge);color:#fff;font-weight:600;font-size:15px;box-shadow:4px 4px 0 var(--edge)}
.wbusy{display:flex;align-items:center;gap:14px;font-size:14.5px;color:var(--ink2)}

.wpick{display:flex;flex-direction:column;gap:12px;background:var(--panel);border:1.5px solid var(--edge);border-radius:14px;padding:20px 22px;box-shadow:5px 5px 0 var(--edge)}
.wopts{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px}
.wopt{display:flex;flex-direction:column;gap:7px;text-align:left;padding:15px 16px;border:1.5px solid var(--rule);border-radius:12px;background:var(--sunk);color:var(--ink);font:inherit}
.wopt:hover{border-color:var(--edge);box-shadow:4px 4px 0 var(--edge)}
.wopt b{font-family:var(--disp);font-size:18px;font-weight:400;line-height:1.15}
.wopt span{font-family:var(--text);font-size:14.5px;line-height:1.5;color:var(--ink2)}

/* the wait: the tortoise crosses, slowly */
.wtrack{display:flex;flex-direction:column;gap:12px;background:var(--panel);border:1.5px solid var(--rule);border-radius:16px;padding:30px 32px 26px;max-width:620px}
/* --at runs 0 to 1: the share of the way across, measured so the tortoise's nose stops at the edge, never past it */
.tortwalk{padding-left:calc(var(--at,0) * (100% - var(--tw,190px)));transition:padding-left 1s linear;--tw:190px}
#rtort{--tw:150px}
.tortwalk svg{display:block;max-width:100%}
.wcosy{margin:4px 0 0;font-family:var(--text);font-size:19px;line-height:1.55;color:var(--ink);transition:opacity .4s ease;min-height:2.6em}
.wtab{margin:0;font-size:13.5px;line-height:1.5;color:var(--muted)}

/*
 * How it looks: one style large, the rest beside it. The swatches are the same
 * four shapes in nine materials, drawn here rather than fetched, so looking
 * costs nothing.
 */
.look .lkmain{flex:1;display:flex;flex-direction:column;gap:16px;align-items:stretch;max-width:1192px;width:100%;margin:0 auto;padding:6px 44px 36px}
.lkhead{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:20px}
.lkhead h1{margin:0;font-family:var(--disp);font-size:34px;font-weight:400;line-height:1.1}
.lkhead .bsub{margin-top:6px}
.lkshapewrap{position:relative}
.lkchip{display:flex;align-items:center;gap:10px;padding:8px 13px;border:1px solid var(--rule);border-radius:10px;background:var(--panel);font:400 12.5px var(--ui);color:var(--ink2)}
.lkchip b{color:var(--ink);font-weight:500}
.lkchip .ch{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.lkchip:hover{border-color:var(--edge)}
.pbox{display:block;background:var(--sunk);border:1px solid var(--rule);border-radius:3px;flex:none}
.pbox.on{background:var(--accent-soft);border-color:var(--edge)}
.lkshapes{position:absolute;right:0;top:calc(100% + 8px);z-index:30;display:flex;gap:10px;padding:14px;background:var(--panel);border:1.5px solid var(--edge);border-radius:14px;box-shadow:5px 5px 0 var(--edge)}
.lkshape{display:flex;flex-direction:column;align-items:center;gap:7px;width:104px;padding:12px 8px;border:1.5px solid var(--rule);border-radius:10px;background:var(--panel);font:inherit;color:var(--ink)}
.lkshape:hover,.lkshape.on{border-color:var(--edge);box-shadow:4px 4px 0 var(--edge)}
.lkshape .t{font-size:12.5px;font-weight:500}
.lkshape .n{font-family:var(--mono);font-size:9.5px;color:var(--ink2);text-align:center;line-height:1.35}

.lkbody{display:flex;gap:24px;align-items:flex-start;min-height:0}
.lkone{flex:none;width:430px;display:flex;flex-direction:column;gap:4px}
.lkbig{border:1.5px solid var(--edge);border-radius:12px;overflow:hidden;box-shadow:6px 6px 0 var(--edge);line-height:0;margin-bottom:12px}
.lkbig img,.lkbig .swatch{display:block;width:100%;height:auto}
.lkone h2{margin:0;font-family:var(--disp);font-size:24px;font-weight:400;line-height:1.15}
.lkwhat{margin:0;font-size:14px;line-height:1.5;color:var(--ink2)}
.lksurface{margin:4px 0 0;font-family:var(--mono);font-size:11px;line-height:1.55;color:var(--muted)}

.lkgrid{flex:1;min-width:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-content:start}
.lkthumb{display:flex;flex-direction:column;gap:0;padding:0;border:1.5px solid var(--rule);border-radius:10px;background:var(--panel);font:inherit;color:var(--ink);text-align:left;overflow:hidden}
.lkthumb .swatch,.lkthumb img{display:block;width:100%;height:auto}
.lkthumb .t{display:block;padding:8px 10px 9px;font-size:12px;border-top:1px solid var(--hair)}
.lkthumb:hover,.lkthumb:focus-visible{border-color:var(--edge)}
.lkthumb.on{border-color:var(--edge);box-shadow:4px 4px 0 var(--edge)}
.lkthumb.on .t{font-weight:600}

@media (max-width:1000px){
  .lkbody{flex-direction:column}
  .lkone{width:100%}
  .lkgrid{width:100%;grid-template-columns:repeat(2,minmax(0,1fr))}
}

/*
 * The pictures. The cast first — drawn once, and every page drawn to match —
 * then the book filling up a page at a time. The price is on the button, not
 * behind a window of prompts and model names.
 */
.pmain{flex:1;display:flex;flex-direction:column;max-width:1192px;width:100%;margin:0 auto;padding:6px 44px 32px}
.pmain>section{display:flex;flex-direction:column;gap:18px}
.phead{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:20px}
.phead h1{margin:0;font-family:var(--disp);font-size:34px;font-weight:400;line-height:1.1}
.phead .bsub{margin-top:6px}
.pmeter{display:flex;align-items:center;gap:16px;padding:12px 18px;border:1.5px solid var(--rule);border-radius:14px;background:var(--panel)}
.pmeter span{display:flex;flex-direction:column;gap:2px}
.pmeter .sep{width:1px;align-self:stretch;background:var(--hair)}
.pmeter .k{font-family:var(--mono);font-size:9.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink2);font-weight:400}
.pmeter .v{font-family:var(--mono);font-size:17px;font-weight:500;font-variant-numeric:tabular-nums}

.pccards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}
.pccard{display:flex;flex-direction:column;gap:9px;padding:14px;border:1.5px dashed var(--rule);border-radius:14px;background:var(--panel)}
.pccard.done{border-style:solid;border-color:var(--edge);box-shadow:4px 4px 0 var(--edge)}
.pcpic{display:block;aspect-ratio:1/1;border-radius:8px;background:var(--sunk);overflow:hidden;position:relative}
.pcpic img{display:block;width:100%;height:100%;object-fit:cover}
.pcwait{position:absolute;inset:0;display:grid;place-items:center;font-family:var(--mono);font-size:10px;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
.pcname{font-family:var(--disp);font-size:17px;line-height:1.15}
.pcrole{font-size:12px;line-height:1.4;color:var(--ink2)}

.pcready{display:flex;flex-direction:column;gap:12px;padding:20px 24px;border:1.5px solid var(--rule);border-radius:16px;background:var(--panel)}
.pcready .row{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:16px}
.pcready .lead{font-family:var(--text);font-size:19px}
.pcready .note{font-family:var(--mono);font-size:12.5px;color:var(--ink2)}
.pcstrip{display:flex;gap:3px}
.pcstrip .pcell{flex:1 1 0;height:14px;border:1px solid var(--rule);border-radius:3px;background:var(--sunk)}
.pcstrip.thin .pcell{height:9px;opacity:.5}
.pcstrip.thin .pcell.on{opacity:1;border-color:var(--edge)}

.hbtn.big{flex-direction:column;align-items:flex-start;gap:1px;min-height:50px;padding:7px 22px;line-height:1.25}
.hbtn.big .sub{font-weight:400;font-size:12.5px;opacity:.85}
.pnote{font-size:13.5px;color:var(--ink2)}

.ppgrid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px}
.ppage{margin:0;display:flex;flex-direction:column;gap:6px}
.ppage .ppic{display:block;aspect-ratio:4/3;border:1.5px dashed var(--rule);border-radius:6px;overflow:hidden}
.ppage.doing .ppic{border-style:solid;opacity:.5}
.ppage.done .ppic{border-style:solid;border-color:var(--edge)}
.ppage .ppic img{display:block;width:100%;height:100%;object-fit:cover}
.ppage figcaption{display:flex;align-items:baseline;gap:7px;min-width:0}
.ppage .n{font-family:var(--mono);font-size:10px;color:var(--muted);flex:none}
.ppage .w{flex:1;min-width:0;font-size:11.5px;line-height:1.35;color:var(--ink2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

@media (max-width:1000px){
  .pccards{grid-template-columns:repeat(3,minmax(0,1fr))}
  .ppgrid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/*
 * The end: the cover as the one thing left, then the book itself. The two PDFs
 * are told apart by what you would do with them, not by their trim size.
 */
.dmain{flex:1;display:flex;flex-direction:column;justify-content:center;max-width:1060px;width:100%;margin:0 auto;padding:6px 44px 40px}
.dmain>section{display:flex;flex-direction:column;gap:22px}
.dhead h1{margin:0;font-family:var(--disp);font-size:40px;font-weight:400;line-height:1.08}
.dhead .bsub{margin-top:8px}

.dccards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;max-width:760px}
.dccard{flex:1 1 0;min-width:0;display:flex;flex-direction:column;padding:0;border:1.5px solid var(--rule);border-radius:12px;background:var(--panel);font:inherit;color:var(--ink);text-align:left;overflow:hidden}
.dccard:hover{border-color:var(--edge)}
.dccard.on{border-color:var(--edge);box-shadow:5px 5px 0 var(--edge)}
.dcpic{display:block;aspect-ratio:4/5;position:relative;padding:14px 15px}
.dcpic .dct{display:block;font-family:var(--disp);font-size:16px;line-height:1.12;color:rgba(34,48,42,.78)}
.dcpic .dct.light{color:rgba(255,255,255,.92)}
.dcname{display:block;padding:13px 15px 0;font-size:14.5px;font-weight:500}
.dcwhat{display:block;padding:4px 15px 15px;font-size:12.5px;line-height:1.45;color:var(--ink2)}

.dbwrap{display:flex;gap:48px;align-items:center;flex-wrap:wrap}
.dbbook{flex:none;display:flex;width:276px}
.dbbook .spinex{width:16px;background:#A75E4E;border:1.5px solid var(--edge);border-right:0;border-radius:4px 0 0 4px}
.dbbook .front{flex:1;aspect-ratio:4/5;border:1.5px solid var(--edge);border-radius:0 6px 6px 0;box-shadow:8px 8px 0 var(--edge);display:flex;flex-direction:column;justify-content:space-between;padding:22px 20px;position:relative;overflow:hidden}
.dbbook .front img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.dbbook .front .t{position:relative;font-family:var(--disp);font-size:27px;line-height:1.1;color:#FFF6EE;text-shadow:0 1px 10px rgba(0,0,0,.35)}
.dbbook .front .f{position:relative;font-family:var(--mono);font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;color:rgba(255,246,238,.85);text-shadow:0 1px 8px rgba(0,0,0,.35)}
.dbside{flex:1;min-width:0;display:flex;flex-direction:column;gap:20px}
.dblead{margin:8px 0 0;font-family:var(--text);font-size:19px;line-height:1.55}

.dbways{display:flex;gap:16px;align-items:stretch}
.dbway{flex:1 1 0;min-width:0;display:flex;flex-direction:column;gap:11px;padding:20px 22px;border:1.5px solid var(--rule);border-radius:16px;background:var(--panel)}
.dbway.on{border-color:var(--edge);box-shadow:5px 5px 0 var(--edge)}
.dbway b{font-family:var(--disp);font-size:19px;font-weight:400;line-height:1.15}
.dbway .w{font-size:13.5px;line-height:1.45;color:var(--ink2)}
.dbway .bits{display:flex;flex-direction:column;gap:6px}
.dbway .bits span{display:flex;gap:8px;font-size:12.5px;line-height:1.4;color:var(--ink2)}
.dbway .bits span::before{content:"\2713";color:var(--accent);flex:none}
.dbway .hbtn{margin-top:auto;align-self:stretch;justify-content:center;text-align:center}
.dbway .hbtn.big{align-items:center}
.dblinks{display:flex;flex-wrap:wrap;gap:20px;align-items:center}

@media (max-width:900px){
  .dccards{flex-wrap:wrap}
  .dccard{flex-basis:46%}
  .dbways{flex-direction:column}
}
@media (prefers-reduced-motion:reduce){.wcosy{transition:none}.tortwalk{transition:none}}
.trail{height:2px;background:repeating-linear-gradient(to right,var(--rule) 0 5px,transparent 5px 16px)}
.tort .tlimb{fill:var(--pale);stroke:var(--edge);stroke-width:2.5;stroke-linejoin:round}
.tort .tneck-out{stroke:var(--edge);stroke-width:22;fill:none;stroke-linecap:round}
.tort .tneck{stroke:var(--pale);stroke-width:17;fill:none;stroke-linecap:round}
.tort .teye{fill:var(--edge)}
.tort .tshell{fill:var(--accent);stroke:var(--edge);stroke-width:3;stroke-linejoin:round}
.tort .tscute{stroke:var(--edge);stroke-width:2;fill:none;opacity:.4;stroke-linecap:round}


/* the panel's top half: the brief, kept in front of you while you choose */
.pwhat{margin:0;font-size:15.5px;line-height:1.5;color:var(--ink)}
.ptags{margin:0;font-size:14px;line-height:1.5;color:var(--ink2)}
.ptags b{color:var(--ink);font-weight:500}
.prule{height:1px;background:var(--hair);margin:2px -30px 0}

@media (max-width:900px){
  .bhead,.bmain{padding-left:16px;padding-right:16px}
  .bask h1{font-size:34px}
  .bcards,.bcards.tall{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* a copy that is not the real one says so, above everything, on every screen */
.envbar{position:sticky;top:0;z-index:100;padding:6px 16px;background:var(--amber-soft);color:var(--amber);border-bottom:1px solid var(--rule);font-family:var(--mono);font-size:11px;letter-spacing:.09em;text-transform:uppercase;text-align:center}

/* which English the book is written in, beside the brief */
.pengl{display:flex;align-items:center;gap:8px;margin:2px 0 12px;font-size:13px;color:var(--ink2);white-space:nowrap}
.pengl select{flex:1 1 auto;min-width:0;font:inherit;font-size:13px;color:var(--ink);background:var(--panel);border:1px solid var(--rule);border-radius:8px;padding:4px 8px}

/* ---------------- the reader: the book page by page, and a page changed in plain terms ---------------- */
.reader .bhead{padding-bottom:12px}
.rhead-right{display:flex;align-items:center;gap:16px}
.rcount{font-family:var(--mono);font-size:12.5px;letter-spacing:.06em;color:var(--ink2);font-variant-numeric:tabular-nums}
.hbtn.sm{min-height:36px;padding:0 14px;font-size:14px;border-radius:11px}
.hbtn.rbtn{background:var(--panel);box-shadow:4px 4px 0 var(--edge)}
.rmain{flex:1;display:flex;gap:40px;align-items:flex-start;justify-content:center;max-width:1280px;width:100%;margin:0 auto;padding:4px 44px 34px}
.rbook{flex:1 1 760px;min-width:0;display:flex;flex-direction:column;align-items:center;gap:18px}
.rstage{display:flex;align-items:center;justify-content:center;gap:20px;width:100%}
.rsheet{flex:0 1 auto;min-width:0}
.rsheet .sheet{border:1.5px solid var(--edge);border-radius:10px;box-shadow:8px 8px 0 var(--edge);background:var(--panel);max-width:100%}
.rturn{flex:none;width:52px;height:52px;border-radius:50%;border:1.5px solid var(--edge);background:var(--panel);color:var(--ink);font:500 28px/1 var(--ui);display:grid;place-items:center;padding-bottom:4px}
.rturn:disabled{opacity:.3}
.rstrip{display:flex;gap:4px;width:min(620px,100%)}
.rstrip button{flex:1;min-width:0;height:14px;padding:0;border-radius:3px;border:1px solid rgba(0,0,0,.1)}
.rstrip button.on{outline:2px solid var(--edge);outline-offset:2px}
.rhint{margin:-4px 0 0;font-size:13px;color:var(--muted)}
.rpanel{flex:0 0 360px;position:relative;align-self:flex-start}
.rpanel h3{margin:0;font-family:var(--disp);font-weight:400;font-size:22px}
.rpanel textarea{width:100%;min-height:86px;resize:vertical;font:15px/1.5 var(--ui);color:var(--ink);background:var(--sunk);border:1.5px solid var(--rule);border-radius:12px;padding:10px 12px}
.rpanel .rnote{margin:-8px 0 0;font-size:13px;color:var(--muted)}
.rpanel label.rnote{margin:0}
.rpanel .x{position:absolute;top:18px;right:18px}
.rpanel .wtrack{padding:20px 22px 18px;max-width:none}
.rpanel .wcosy{font-size:16px;min-height:0}
.rpick{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.rpick figure{margin:0;display:flex;flex-direction:column;gap:6px}
.rpick figcaption{font-family:var(--mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink2)}
.rpick .new .sheet{outline:2.5px solid var(--accent);outline-offset:2px}
.rrow{display:flex;gap:10px;flex-wrap:wrap}
.grab{display:none}
.tch{display:none}
/* the finished screen, once pages have changed since the PDF */
.dbnotice{display:flex;flex-direction:column;gap:10px;background:var(--accent-soft);border:1.5px solid var(--accent);border-radius:14px;padding:16px 18px}
.dbnotice b{font-family:var(--text);font-size:17px}
.dbnotice span{font-size:13.5px;color:var(--ink2)}
.dblinks{display:flex;align-items:center;gap:22px;flex-wrap:wrap}
@media (max-width:700px){
  .reader .bhead{padding:14px 16px}
  .rbookname{display:none}
  .rmain{padding:4px 16px 24px;flex-direction:column;justify-content:flex-start;align-items:stretch;gap:18px}
  .rbook{flex:none;width:100%}
  .rturn{display:none}
  .rsheet .sheet{box-shadow:5px 5px 0 var(--edge)}
  #rchange{width:100%;justify-content:center}
  .kb{display:none}
  .tch{display:inline}
  .rpanel{position:fixed;left:0;right:0;bottom:0;z-index:40;flex:none;border-radius:18px 18px 0 0;border-bottom:0;max-height:56vh;overflow:auto;box-shadow:0 -10px 30px rgba(0,0,0,.18);padding:24px 18px calc(28px + env(safe-area-inset-bottom,0px))}
  .grab{display:block;width:44px;height:5px;border-radius:9px;background:var(--rule);margin:-10px auto 4px}
}

/* the guardian question: one more turn of the home conversation */
.hsaid.me{justify-content:flex-end;padding-top:4px}
.hbub.me{background:var(--accent);color:#fff;border-radius:16px 4px 16px 16px}
.hsaid + .hsaid{padding-top:10px}
.hchoices{display:flex;flex-wrap:wrap;gap:10px;padding:8px 24px 14px 68px}
.hfine{margin:0;padding:0 24px 22px 68px;font-size:13px;color:var(--muted);max-width:62ch}
@media (max-width:700px){ .hchoices,.hfine{padding-left:24px} }

/* your account: the brief's two columns */
.amain{display:flex;gap:48px;align-items:flex-start;justify-content:center;flex-wrap:wrap;max-width:1080px;width:100%;margin:0 auto;padding:16px 44px 56px}
.acol{flex:1 1 520px;min-width:0;display:flex;flex-direction:column;gap:20px}
.acol h1{font-size:44px;line-height:1.06;margin:0}
.acol .bsub{margin-top:-8px}
.arows{display:flex;flex-direction:column;background:var(--panel);border:1.5px solid var(--rule);border-radius:14px}
.arow{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;border-bottom:1px solid var(--hair)}
.arow:last-child{border-bottom:0}
.arow b{font-family:var(--text);font-size:17px;font-weight:600}
.arow span{display:block;font-size:13.5px;color:var(--ink2)}
.adanger{display:flex;flex-direction:column;gap:12px;padding:20px;border:1.5px solid var(--danger,#B4473A);border-radius:14px;background:var(--panel)}
.adanger h2{margin:0;font-family:var(--disp);font-weight:400;font-size:22px}
#adelbody{display:flex;flex-direction:column;gap:12px}
.adanger p{margin:0;font-size:14.5px;color:var(--ink2)}
.adanger ul{margin:0;padding-left:18px;font-size:14.5px;color:var(--ink2)}
.alabel{font-size:14px;color:var(--ink2)}
.adanger input,.hdel input{font:15px var(--ui);padding:10px 12px;border:1.5px solid var(--rule);border-radius:10px;background:var(--sunk);color:var(--ink);width:100%;max-width:360px}
.hbtn.danger{background:var(--danger,#B4473A);border-color:#7E2A21;color:#fff;font-weight:600}
.hbtn.danger:disabled{opacity:.45}
.apanel{flex:0 1 340px}
.apanel ul{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:8px;font-size:14.5px;color:var(--ink)}
/* deleting one book, in its own card */
.hdellink{font-weight:500;color:var(--ink2);font-size:13.5px}
.hdel{display:flex;flex-direction:column;gap:10px;margin-top:4px;padding:14px 16px;border:1.5px solid var(--danger,#B4473A);border-radius:12px;background:var(--sunk)}
.hdel p{margin:0;font-size:14px;color:var(--ink2)}
.arow:has(+ .arow[hidden]:last-child){border-bottom:0}
@media (max-width:700px){ .amain{padding:8px 16px 40px} .acol h1{font-size:34px} .apanel{flex:1 1 100%;margin:0} }

/* ---------------- the landing page: home's own page, carried on downwards ---------------- */
.landing .hhead .hbtn.sm{background:var(--panel)}
.lmain{max-width:1120px;margin:0 auto;padding:40px 40px 0;display:flex;flex-direction:column;gap:84px}
.lfirst{max-width:860px;margin:0 auto;width:100%;display:flex;flex-direction:column;gap:28px}
.lproof{display:flex;justify-content:center;gap:10px 22px;flex-wrap:wrap;font:12.5px var(--mono);letter-spacing:.05em;color:var(--ink2)}
.lproof span::before{content:"✓ ";color:var(--accent)}
.lsec{display:flex;flex-direction:column;gap:26px}
.lsec>h2{margin:0;font-family:var(--disp);font-weight:400;font-size:38px;line-height:1.1;text-wrap:balance}
.lsec>p.lsub{margin:-12px 0 0;max-width:60ch;font-size:17px;color:var(--ink2)}
.lsteps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.lstep{background:var(--panel);border:1.5px solid var(--edge);border-radius:14px;box-shadow:5px 5px 0 var(--edge);padding:20px;display:flex;flex-direction:column;gap:12px}
.lstep .n{font:12px var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--accent)}
.lstep h3{margin:0;font-family:var(--disp);font-weight:400;font-size:23px;line-height:1.15}
.lstep p{margin:0;font-size:14.5px;color:var(--ink2)}
.lmini{border:1px solid var(--rule);border-radius:10px;background:var(--sunk);padding:12px;display:flex;flex-direction:column;gap:8px;min-height:132px}
.lmini .q{font-family:var(--disp);font-size:15px}
.lmini .q.small{font-size:13px;color:var(--ink2)}
.lmini .chips{display:flex;flex-wrap:wrap;gap:6px}
.lmini .chips i{font-style:normal;font-size:11.5px;padding:4px 8px;border:1px solid var(--rule);border-radius:8px;background:var(--panel)}
.lmini .chips i.on{background:var(--accent);color:#fff;border-color:var(--edge)}
.lmini .three{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;flex:1}
.lmini .three b{border:1px solid var(--rule);border-radius:7px;background:var(--panel);font:600 12px/1.25 var(--text);padding:8px}
.lmini .three b.on{border:1.5px solid var(--edge);box-shadow:2px 2px 0 var(--edge)}
.lmini.pic{padding:0;overflow:hidden;min-height:0}
.lmini.pic img{display:block;width:100%;height:auto}
.lbook{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:36px;align-items:center}
.lbook .big{margin:0}
.lbook .big img{display:block;width:100%;height:auto;border:1.5px solid var(--edge);border-radius:10px;box-shadow:8px 8px 0 var(--edge);background:var(--panel)}
.lbook .side{display:flex;flex-direction:column;gap:14px}
.lbook .side p{margin:0;font-size:16px;color:var(--ink2);max-width:46ch}
.lthumbs{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:4px}
.lthumbs button{padding:0;border:1px solid var(--rule);border-radius:6px;overflow:hidden;background:var(--panel)}
.lthumbs button.on{outline:2px solid var(--edge);outline-offset:2px}
.lthumbs img{display:block;width:100%;height:auto}
.lfor{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.lfor div{border-top:2px solid var(--edge);padding-top:12px;display:flex;flex-direction:column;gap:6px}
.lfor b{font-family:var(--text);font-size:17px}
.lfor span{font-size:14px;color:var(--ink2)}
.lfaq{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 40px}
.lfaq div{display:flex;flex-direction:column;gap:6px;padding:16px 0;border-bottom:1px solid var(--hair)}
.lfaq b{font-family:var(--text);font-size:17px}
.lfaq span{font-size:14.5px;color:var(--ink2)}
.lend{display:flex;flex-direction:column;align-items:center;gap:16px;text-align:center;padding:12px 0 0}
.lend h2{margin:0;font-family:var(--disp);font-weight:400;font-size:40px}
.lend .hbtn{box-shadow:4px 4px 0 var(--edge)}
.lfoot{margin:72px auto 0;max-width:1120px;border-top:1.5px solid var(--edge);padding:22px 40px 34px;display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;font-size:13.5px;color:var(--ink2)}
/* sign-in as one more turn of the conversation */
.lsign{display:flex;flex-direction:column;gap:10px;padding:8px 24px 22px 68px}
.lsign form{display:flex;gap:10px;flex-wrap:wrap}
.lsign input{flex:1 1 260px;min-width:0;font:16px var(--ui);padding:12px 14px;border:1.5px solid var(--rule);border-radius:12px;background:var(--sunk);color:var(--ink)}
.lsign .or{font-size:13px;color:var(--muted)}
.lsign .fine{margin:0;font-size:13px;color:var(--muted)}
.lsign .fine .hlink{display:inline;font-size:13px}
@media (max-width:760px){
  .lmain{padding:24px 16px 0;gap:60px}
  .lsteps,.lfor,.lfaq,.lbook{grid-template-columns:1fr}
  .lsec>h2{font-size:30px}
  .lsign{padding-left:24px}
  .lfoot{padding:20px 16px 30px}
}

/* sending a book to family: the link, on the finished screen */
.dbways{flex-wrap:wrap}
.dbway.wide{flex:1 1 100%;order:9}
#dbshare{display:flex;flex-direction:column;gap:11px;flex:1}
#dbshare .bits{flex:1}
.share{display:flex;flex-direction:column;gap:10px}
.dbway.wide .share{flex-direction:row;flex-wrap:wrap;align-items:center;gap:12px 16px}
.share .link{display:flex;gap:8px;align-items:center;flex:1 1 380px;min-width:0}
.share .link input{flex:1;min-width:0;font:13px var(--mono);background:var(--sunk);border:1.5px solid var(--rule);border-radius:10px;padding:10px 12px;color:var(--ink)}
.share .row{display:flex;gap:10px;flex-wrap:wrap}
.share .fine,#dbshare .fine{margin:0;font-size:13px;color:var(--muted);flex:1 1 100%}
.share .fine .hlink{display:inline;font-size:13px}
.hbtn.wa{background:#1F8B4C;border-color:#14572F;color:#fff;font-weight:600}

/* a shared book, for the family: the reader with nothing to change */
.rmade{display:flex;align-items:center;gap:14px;flex-wrap:wrap;justify-content:center;padding:14px 18px;border:1.5px dashed var(--rule);border-radius:14px;font-size:14px;color:var(--ink2)}
.rmade .hlink{align-self:auto}
@media (max-width:700px){ .sharedbook .rbookname{display:none} }
.hlink.ainline{display:inline;font-size:13.5px}
.aswitch{flex:none;width:46px;height:26px;border-radius:99px;border:1.5px solid var(--edge);background:var(--rule);position:relative;padding:0}
.aswitch::after{content:"";position:absolute;top:2px;left:2px;width:19px;height:19px;border-radius:50%;background:#fff;transition:left .15s ease}
.aswitch[aria-checked="true"]{background:var(--accent)}
.aswitch[aria-checked="true"]::after{left:21px}

/* ---------------- credits ---------------- */
/* the balance, in every header beside the account */
.credits{display:inline-flex;align-items:center;gap:7px;min-height:38px;padding:0 14px;border:1.5px solid var(--rule);border-radius:99px;background:var(--panel);font:600 14px var(--ui);color:var(--ink);cursor:pointer}
.credits:hover{border-color:var(--edge)}
.credits i{font-style:normal;color:var(--amber);font-size:15px}
.hdright{display:flex;align-items:center;gap:12px}
/* what a book uses, on the cast screen before anything is drawn */
.pccost{display:flex;flex-direction:column;max-width:420px;border-top:1px solid var(--hair)}
.pccost div{display:flex;justify-content:space-between;padding:9px 0;border-bottom:1px solid var(--hair);font-size:14.5px}
.pccost b{font-family:var(--mono);font-weight:600}
.pccost .left b{color:var(--accent)}
.pccost .short b{color:var(--amber)}
/* choosing a plan */
.plmain{display:flex;flex-direction:row;gap:40px;align-items:flex-start;justify-content:center;flex-wrap:wrap;max-width:1180px;width:100%;margin:0 auto;padding:10px 44px 56px}
.plcol{flex:1 1 560px;min-width:0;display:flex;flex-direction:column;gap:20px}
.plcol h1{font-size:46px;line-height:1.06;margin:0}
.plcol .bsub{margin-top:-8px}
.plans{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;padding-top:6px}
.plan{position:relative;display:flex;flex-direction:column;gap:10px;padding:20px;background:var(--panel);border:1.5px solid var(--rule);border-radius:16px;text-align:left;font:inherit;color:var(--ink);cursor:pointer}
.plan:hover{border-color:var(--edge)}
.plan[aria-checked="true"]{border-color:var(--edge);box-shadow:5px 5px 0 var(--edge)}
.plan:disabled{opacity:.55;cursor:default}
.plan .tag{position:absolute;top:-11px;left:18px;font:11px var(--mono);letter-spacing:.08em;text-transform:uppercase;background:var(--accent);color:var(--panel);padding:3px 9px;border-radius:99px}
.plan b{font-family:var(--disp);font-weight:400;font-size:21px}
.plan .price{font-family:var(--disp);font-size:34px;line-height:1}
.plan .price small{font:500 14px var(--ui);color:var(--ink2)}
.plan .what{font-size:14px;color:var(--ink2)}
.plan ul{margin:0;padding-left:18px;font-size:13.5px;color:var(--ink2);display:flex;flex-direction:column;gap:4px}
.plan .radio{position:absolute;top:18px;right:18px;width:20px;height:20px;border-radius:50%;border:1.5px solid var(--edge)}
.plan[aria-checked="true"] .radio{background:radial-gradient(circle,var(--accent) 0 5px,transparent 6px)}
.plfine{margin:0;font-size:13.5px;color:var(--muted)}
.plgo{display:flex;gap:14px;align-items:center;flex-wrap:wrap}
.plgo .hbtn.pri{box-shadow:4px 4px 0 var(--edge);min-height:50px;padding:0 24px;font-size:16px}
.plgo .hbtn.pri:disabled{opacity:.45;box-shadow:none;cursor:default}
.plpanel{flex:0 0 300px;align-self:flex-start}
.buys{display:flex;flex-direction:column}
.buys div{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--hair);font-size:14.5px}
.buys div.sub span{padding-left:14px;color:var(--muted)}
.buys div.sub b{color:var(--muted)}
.buys b{font-family:var(--mono);font-weight:600;white-space:nowrap}
/* back from paying */
.paidmain{justify-content:center}
.paid{display:flex;flex-direction:column;align-items:center;text-align:center;gap:14px;margin:auto;padding:40px 16px}
.paid h1{font-size:44px;margin:0}
.paid .bsub{max-width:52ch}
.paidbig{font-family:var(--disp);font-size:56px;line-height:1;color:var(--accent)}
.go{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.go .hbtn.pri{box-shadow:4px 4px 0 var(--edge);flex-direction:column;align-items:flex-start;gap:1px;min-height:54px;padding:7px 22px}
/* the account: plan, credits, where they went */
.anum{font-family:var(--disp);font-size:30px;line-height:1;color:var(--ink)}
.arow .anum{display:block;margin-bottom:6px;font-family:var(--disp);font-size:30px;line-height:1;color:var(--ink)}
.ahist>div{flex:1;min-width:0}
.hist{display:flex;flex-direction:column;margin-top:10px}
.hist div{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid var(--hair);font-size:14px;color:var(--ink2)}
.hist div:last-child{border-bottom:0}
.hist b{font-family:var(--mono);font-weight:600;color:var(--ink)}
.hist b.plus{color:var(--accent)}
/* the reader: not enough for a redraw */
.lowbox{display:flex;flex-direction:column;gap:10px;padding:14px 16px;border:1.5px solid var(--amber);border-radius:12px;background:var(--amber-soft)}
.lowbox p{margin:0;font-size:14px;color:var(--ink2)}
.lowbox b{color:var(--ink)}
@media (max-width:760px){
  .plans{grid-template-columns:1fr}
  .plmain{padding:8px 16px 40px}
  .plcol h1{font-size:34px}
  .plpanel{flex:1 1 100%}
  .credits span{display:none}
  .paid h1{font-size:34px}
}

/* ---------------- a photo of the child ---------------- */
.bphoto{display:flex;flex-direction:column;gap:14px}
.paddbtn{display:flex;align-items:center;gap:16px;padding:16px 18px;border:1.5px dashed var(--edge);border-radius:16px;background:var(--panel);text-align:left;font:inherit;color:var(--ink);width:100%;cursor:pointer}
.paddbtn:hover{border-style:solid}
.pcam{flex:none;width:48px;height:48px;border-radius:12px;background:var(--accent-soft);display:grid;place-items:center;color:var(--accent)}
.paddbtn b,.padded b{display:block;font-family:var(--disp);font-weight:400;font-size:19px}
.paddbtn .t,.padded .t{display:block;font-size:14px;color:var(--ink2)}
.padded{display:flex;align-items:center;gap:16px;padding:14px 16px;border:1.5px solid var(--edge);border-radius:16px;background:var(--panel);box-shadow:4px 4px 0 var(--edge)}
.pthumb{flex:none;width:72px;height:72px;border-radius:12px;object-fit:cover}
.pacts{margin-left:auto;display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.por{display:flex;align-items:center;gap:12px;font:12px var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.por::before,.por::after{content:"";flex:1;height:1px;background:var(--hair)}
.pconsent{margin:0;font-size:13px;color:var(--muted)}
.pconsent b{color:var(--ink2);font-weight:600}
.pccard.pair{grid-column:span 2}
.pcpair{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.pcpair figure{margin:0;display:flex;flex-direction:column;gap:5px}
.pcpair figcaption{font:11px var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
@media (max-width:760px){ .pccard.pair{grid-column:auto} .padded{flex-wrap:wrap} .pacts{flex-direction:row;margin-left:0} }

/* the look picker: a made-up child drawn in each look, the drawn shapes only if the picture will not load */
.lksample{display:block;position:relative;max-width:100%}
.lksample img{display:block;width:100%;height:100%;object-fit:cover}
.lksample .lkfallback{display:none}
.lksample.nosample img{display:none}
.lksample.nosample .lkfallback{display:block}

/* the pages being drawn: the book kept closed until the last one is in */
.ppwrap{display:flex;flex-direction:column;align-items:center;gap:22px;width:100%;max-width:720px;margin:0 auto;padding:6px 0 40px;text-align:center}
.ppwrap h1{margin:0}
.ppwrap .bsub{margin:-6px 0 0;max-width:52ch}
.ppclosed{position:relative;width:360px;max-width:calc(100% - 12px);aspect-ratio:4/3;border-radius:6px 14px 14px 6px;background:#F3E3C3;border:2px solid var(--edge);box-shadow:10px 10px 0 var(--edge);overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:0 20px 0 42px;box-sizing:border-box}
.ppclosed::before{content:"";position:absolute;left:0;top:0;bottom:0;width:22px;background:#E2C997;border-right:2px solid var(--edge)}
.ppclosed .kid{width:120px;height:120px;border-radius:50%;border:2px solid var(--edge);overflow:hidden;background:#fff;flex:none}
.ppclosed .kid img{width:100%;height:100%;object-fit:cover;display:block}
.ppclosed .ttl{font-family:var(--disp);font-size:clamp(26px,6vw,38px);line-height:1.05;color:#22302A;overflow-wrap:anywhere}
.ppclosed .for{font-size:14px;color:#4A5A50}
.ppribbon{width:420px;max-width:100%;display:flex;flex-direction:column;gap:8px}
.ppbar{height:12px;border-radius:99px;background:var(--sunk);border:1.5px solid var(--edge);overflow:hidden}
.ppbar i{display:block;height:100%;width:0;background:var(--accent);transition:width .6s ease}
.ppcount{font:13px var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.ppfail{margin:0;font-size:14.5px;color:var(--ink2)}
.ppwrap .pnote{max-width:52ch}
@media (max-width:760px){.ppclosed{width:280px}.ppclosed .kid{width:96px;height:96px}}

/* "Change my answer", under the reply it takes back */
.hsaid.me > div{display:flex;flex-direction:column;align-items:flex-end;gap:4px}
.hsaid.me .hchange{font-size:13.5px;align-self:flex-end;width:auto;text-align:right}

/* a story of their own: one box to paste it in, and titles suggested from it */
.wpaste{width:100%;box-sizing:border-box;min-height:380px;resize:vertical;background:var(--panel);border:1.5px solid var(--rule);border-radius:16px;padding:22px 26px;font:16px/1.7 var(--ui);color:var(--ink)}
.wpaste:focus{outline:none;border-color:var(--accent)}
.wpaste::placeholder{color:var(--muted)}
.wnote{font-size:14px;color:var(--ink2);margin:-6px 0 0}
.tsug{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:-6px}
.tsug .lab{font:11px var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--ink2);margin-right:4px}
.tsug .tpick{font:500 14.5px var(--ui);background:var(--panel);border:1.5px solid var(--rule);border-radius:99px;padding:6px 14px;color:var(--ink);cursor:pointer}
.tsug .tpick:hover{border-color:var(--accent)}
.tsug .tpick.on{border-color:var(--accent);background:var(--accent);color:#fff}
.tsug .hlink{font-size:13.5px;align-self:center}
.tsug .think{font-size:14px;color:var(--ink2)}
.tsug .think i{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--accent);margin-right:6px;vertical-align:middle;opacity:.6}
.wlong{background:#FBF3DF;border:1.5px solid #E7D3A3;border-radius:12px;padding:12px 16px;font-size:14.5px;color:#22302A;margin:0}
.wlong b{font-weight:600}
.wacts .hbtn[disabled]{opacity:.45;cursor:default}
.bpanel .pwrite{display:flex;align-items:center;gap:10px;white-space:nowrap}

/* the way back: the same place on every screen, under the logo, naming where it goes */
.backrow{padding:0 44px;margin:-8px 0 0}
.backrow .back{display:inline-flex;align-items:center;gap:7px;background:none;border:0;padding:6px 0;font:600 14.5px var(--ui);color:var(--accent);cursor:pointer}
.backrow .back .ar{font-size:17px;line-height:1}
.backrow .back u{text-decoration:underline;text-underline-offset:3px}
.backrow .back:hover u{text-decoration-thickness:2px}
@media (max-width:760px){.backrow{padding:0 16px}}

/* a button that has been pressed and is working */
.spin{display:inline-block;width:15px;height:15px;margin-right:10px;vertical-align:-2px;border-radius:50%;border:2.5px solid currentColor;border-top-color:transparent;opacity:.85;animation:spin .9s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.hbtn.working,.hbtn.working:disabled{opacity:.9;cursor:progress}
.backrow .back:disabled{opacity:.4;cursor:default}
.backrow .back:disabled u{text-decoration:none}
@media (prefers-reduced-motion:reduce){.spin{animation-duration:2.5s}}

/*
 * Who is in it. Before anything is drawn, a cast list: an initial, the name,
 * the role and one line of how they will look — no empty frames, which read as
 * a drawing already under way. The frames come with the press of the button.
 */
.pccards{display:flex;flex-direction:column;gap:14px}
.cgrp{margin:6px 0 -4px;font:11px var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--ink2)}
.cpeople{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.cthings{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.ccard{display:flex;flex-direction:column;gap:12px;padding:16px;border:1.5px solid var(--rule);border-radius:14px;background:var(--panel);min-width:0}
.ccard.done{border-color:var(--edge);box-shadow:4px 4px 0 var(--edge)}
.ccard.pair{grid-column:span 2}
.cthings .ccard{flex-direction:row;align-items:center;gap:12px;padding:12px 14px}
.cav{flex:none;width:52px;height:52px;border-radius:50%;display:grid;place-items:center;font:400 24px var(--disp);color:#22302A;background:#E8EFE0;border:1.5px solid var(--rule)}
.cthings .cav{width:38px;height:38px;font-size:18px;border-radius:10px}
.cpic{display:block;width:100%;aspect-ratio:1/1;border-radius:10px;overflow:hidden;background:var(--sunk);position:relative}
.cpic img{display:block;width:100%;height:100%;object-fit:cover}
.cthings .cpic{width:38px;height:38px;flex:none;border-radius:10px}
.cpic.drawing{background:linear-gradient(100deg,var(--sunk) 30%,var(--panel) 50%,var(--sunk) 70%);background-size:300% 100%;animation:cshimmer 1.6s linear infinite}
.cpic.drawing i{position:absolute;left:0;right:0;bottom:10px;text-align:center;font:normal 12px var(--mono);letter-spacing:.08em;color:var(--ink2)}
.cthings .cpic.drawing i{display:none}
@keyframes cshimmer{from{background-position:100% 0}to{background-position:0 0}}
@media (prefers-reduced-motion:reduce){.cpic.drawing{animation:none}}
.cwho b{display:block;font:400 19px/1.15 var(--disp);color:var(--ink);overflow-wrap:anywhere}
.cthings .cwho b{font-size:16px}
.crole{display:block;font-size:12.5px;color:var(--ink2);margin-top:3px}
.clook{display:block;font-size:13.5px;line-height:1.45;color:var(--ink);margin-top:8px}
.cacts{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin-top:auto;font-size:13px}
.cacts .ok{color:var(--accent);font-weight:600}
.cacts .hlink{font-size:13px}
@media (max-width:900px){.cpeople{grid-template-columns:repeat(2,minmax(0,1fr))}.cthings{grid-template-columns:repeat(2,minmax(0,1fr))}}
.hbtn.working,.hbtn.big.working{flex-direction:row;align-items:center;white-space:nowrap;flex:none;width:max-content;max-width:100%}
.wacts .hbtn.working[disabled],.hbtn.working[disabled]{opacity:1;cursor:progress}
.lkthumb .lksample{width:100%!important;height:auto!important;aspect-ratio:230/160}
/* the reader, while a page's words are still being put on it */
.sheet .placing{position:absolute;left:4%;top:4%;display:inline-flex;align-items:center;gap:2px;padding:8px 14px;border-radius:99px;background:var(--panel);border:1px solid var(--rule);box-shadow:0 2px 10px rgba(0,0,0,.08);font:500 13px var(--ui);color:var(--ink2)}
.sheet .placing.bad{color:var(--ink)}
.sheet .placing .hlink{margin-left:6px}
/* the one-line strip keeps the other two ways in, as a quiet line under it */
.hcard.strip .halso{flex-basis:100%;padding:0 4px;gap:12px;font-size:13.5px;color:var(--ink2)}
/* the way to pick a story, at the foot of each card */
.pcol .pgo{display:flex;align-items:center;justify-content:center;gap:6px;margin:4px 17px 17px;padding:10px 14px;border:1.5px solid var(--edge);border-radius:10px;font:600 15px var(--ui);color:var(--ink);background:var(--panel)}
.pcol:hover .pgo,.pcol:focus-visible .pgo,.pcol.on .pgo{background:var(--accent);border-color:var(--accent);color:var(--panel)}
.pcol.ghost .pgo{border:1.5px dashed var(--rule);min-height:44px;box-sizing:border-box}

/* ---------------- your characters ---------------- */
.chmain{flex:1;width:100%;max-width:1180px;margin:0 auto;padding:6px 44px 48px;box-sizing:border-box}
.chmain section{display:flex;flex-direction:column;gap:24px}
.chtop{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:16px}
.chtop h1{margin:0;font-family:var(--disp);font-size:34px;font-weight:400;line-height:1.1}
.chtop .bsub{max-width:62ch}
.chgrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.chcard{display:flex;flex-direction:column;gap:10px;padding:14px;border:1.5px solid var(--edge);border-radius:14px;background:var(--panel);box-shadow:4px 4px 0 var(--edge);min-width:0;text-align:left;font:inherit;color:var(--ink)}
.chcard b{font-family:var(--disp);font-weight:400;font-size:20px;line-height:1.1;display:block;overflow-wrap:anywhere}
.chcard .rel{display:block;font-size:14px;color:var(--ink2)}
.chcard .meta{font:11.5px var(--mono);color:var(--ink2);letter-spacing:.02em}
.chcard .acts{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:auto}
.chcard .chbad{font-size:12.5px;color:var(--red)}
.chpic{display:grid;place-items:center;aspect-ratio:1;border-radius:10px;overflow:hidden;background:var(--sunk)}
.chpic img{width:100%;height:100%;object-fit:cover;display:block}
.chpic.none{font-family:var(--disp);font-size:44px;color:var(--ink2)}
.chpic.drawing{background:linear-gradient(100deg,var(--sunk) 30%,var(--panel) 50%,var(--sunk) 70%);background-size:300% 100%;animation:cshimmer 1.6s linear infinite}
.chpic.drawing i{font:12px var(--mono);color:var(--ink2);font-style:normal}
.chcard.add{border-style:dashed;box-shadow:none;align-items:center;justify-content:center;text-align:center;gap:8px;color:var(--ink2);cursor:pointer;min-height:220px}
.chcard.add .plus{width:54px;height:54px;border-radius:50%;border:1.5px dashed var(--edge);display:grid;place-items:center;font-size:28px;color:var(--ink)}
.chcard.add b{color:var(--ink)}
.chcard.add:hover,.chcard.add:focus-visible{border-color:var(--edge);background:var(--canvas)}
.chnote{margin:0;font-size:13.5px;color:var(--ink2);max-width:70ch}
.chcols{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:28px;align-items:start}
.chfields{display:flex;flex-direction:column;gap:18px;min-width:0}
.chf{display:flex;flex-direction:column;gap:8px}
.chf .k{font:11px var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--ink2)}
.chf input,.chf textarea,.chf select{font:16px var(--ui);padding:12px 14px;border:1.5px solid var(--rule);border-radius:12px;background:var(--panel);color:var(--ink);box-sizing:border-box;width:100%}
.chf select{max-width:320px}
.chf textarea{min-height:110px;line-height:1.55;resize:vertical}
.chf input:focus,.chf textarea:focus,.chf select:focus{outline:none;border-color:var(--accent)}
.chf .hint{font-size:13px;color:var(--ink2)}
.chopts{display:flex;flex-wrap:wrap;gap:8px}
.chopts button{font:500 14.5px var(--ui);background:var(--panel);border:1.5px solid var(--rule);border-radius:99px;padding:7px 14px;color:var(--ink);cursor:pointer}
.chopts button.on{border-color:var(--accent);background:var(--accent);color:var(--panel)}
.chdrop{display:flex;align-items:center;gap:14px;padding:14px;border:1.5px dashed var(--rule);border-radius:12px;background:var(--panel);font-size:14px;color:var(--ink2);cursor:pointer}
.chdrop b{color:var(--ink)}
.chdrop.on{border-style:solid;border-color:var(--accent)}
.chdrop .ic{width:44px;height:44px;border-radius:10px;background:var(--sunk);display:grid;place-items:center;font-size:20px;flex:none}
.chbtns{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.chdelbox{display:flex;flex-direction:column;gap:10px;padding:14px;border:1.5px solid var(--rule);border-radius:12px;background:var(--panel)}
.chdelbox p{margin:0}
.chside{display:flex;flex-direction:column;gap:14px;padding:20px;border:1.5px solid var(--rule);border-radius:16px;background:var(--panel)}
.chside .eb{font:11px var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--ink2);margin:0}
.chside p{margin:0;font-size:14.5px;color:var(--ink2)}
.chside .big{font-family:var(--disp);font-size:20px;color:var(--ink);line-height:1.25}
.chside ol{margin:0;padding-left:18px;color:var(--ink2);font-size:14.5px;display:flex;flex-direction:column;gap:6px}
/* the home screen's row of them */
.hchars{display:flex;flex-direction:column;gap:12px}
.hcharshead{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px}
.hcharshead h2{margin:0;font-family:var(--disp);font-weight:400;font-size:24px}
.hcharshead p{margin:4px 0 0;font-size:14px;color:var(--ink2)}
.hcharsrow{display:flex;flex-wrap:wrap;gap:12px}
.hface{display:flex;align-items:center;gap:10px;padding:6px 14px 6px 6px;border:1.5px solid var(--rule);border-radius:99px;background:var(--panel);font:500 15px var(--ui);color:var(--ink);text-align:left;cursor:pointer}
.hface img,.hface .ini{width:40px;height:40px;border-radius:50%;object-fit:cover;object-position:50% 18%;background:var(--sunk);flex:none}
.hface .ini{display:grid;place-items:center;font-family:var(--disp);color:var(--ink2)}
.hface small{display:block;font:12px var(--ui);color:var(--ink2)}
.hface.go{border-color:var(--edge);box-shadow:3px 3px 0 var(--edge)}
.hface:hover,.hface:focus-visible{border-color:var(--edge)}
/* the question: who else is in this book */
.bwho{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;max-width:820px}
.bwc{position:relative;display:flex;flex-direction:column;gap:6px;padding:12px;border:1.5px solid var(--rule);border-radius:14px;background:var(--panel);font:inherit;color:var(--ink);text-align:left;cursor:pointer}
.bwc .pic{display:grid;place-items:center;aspect-ratio:1;border-radius:10px;overflow:hidden;background:var(--sunk)}
.bwc .pic img{width:100%;height:100%;object-fit:cover;display:block}
.bwc .pic .ini{font-family:var(--disp);font-size:36px;color:var(--ink2)}
.bwc b{font-family:var(--disp);font-weight:400;font-size:18px}
.bwc .r{font-size:13px;color:var(--ink2)}
.bwc.on,.bwc:hover,.bwc:focus-visible{border-color:var(--edge)}
.bwc.on{box-shadow:4px 4px 0 var(--edge)}
.bwc .tick{position:absolute;top:18px;right:18px;width:28px;height:28px;border-radius:50%;background:var(--panel);border:1.5px solid var(--edge);display:grid;place-items:center;font-size:15px;font-weight:700}
.bwc.on .tick{background:var(--accent);border-color:var(--accent);color:var(--panel)}
.bwhoacts{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
/* the cast screen: keep someone for later books */
.ckeep{display:flex;align-items:center;gap:8px;font:500 13.5px var(--ui);color:var(--ink);cursor:pointer}
.ckeep input{position:absolute;opacity:0;width:1px;height:1px}
.ckeep .box{width:20px;height:20px;border-radius:6px;border:1.5px solid var(--edge);display:grid;place-items:center;font-size:12px;font-weight:700;background:var(--panel);flex:none}
.ckeep input:checked + .box{background:var(--accent);border-color:var(--accent);color:var(--panel)}
.ckeep input:checked + .box::after{content:"✓"}
.ckeep input:focus-visible + .box{outline:2px solid var(--accent);outline-offset:2px}
.ckeep.in{color:var(--ink2);cursor:default}
.ckeep.in .box{background:var(--accent);border-color:var(--accent);color:var(--panel)}
@media (max-width:700px){
  .chmain{padding:6px 16px 36px}
  .chgrid,.bwho{grid-template-columns:repeat(2,minmax(0,1fr))}
  .chcols{grid-template-columns:1fr}
  .chtop h1{font-size:28px}
}

/* ---------------- the shelf: each book's next one, and series ---------------- */
.hbook{display:flex;flex-direction:column;gap:10px;min-width:0}
.hbook > .spine,.hstack > .spine:last-child{width:100%}
.hstack{position:relative}
.hstack .spine.back{position:absolute;inset:0;transform:translate(9px,-9px);opacity:.85;pointer-events:none}
.hstack .spine.back span{visibility:hidden}
.hstack > .spine:last-child{position:relative}
.hunder{display:flex;flex-direction:column;gap:2px;min-height:44px}
.hser{font:11px var(--mono);letter-spacing:.06em;text-transform:uppercase;color:var(--ink2)}
.hfor{font-size:13px;color:var(--ink2)}
.hnext{font:600 13.5px var(--ui);color:var(--accent);text-decoration:underline;text-underline-offset:3px;background:none;border:0;padding:0;text-align:left;cursor:pointer}
.hnudge{display:flex;align-items:center;gap:18px;padding:16px 18px;border:1.5px solid var(--edge);border-radius:14px;background:var(--panel);box-shadow:4px 4px 0 var(--edge)}
.hnudge .covr{width:78px;flex:none;aspect-ratio:3/4;border-radius:2px 8px 8px 2px;background:var(--sunk) center/cover;box-shadow:inset 6px 0 0 rgba(0,0,0,.16)}
.hnudge .tx{flex:1;min-width:0}
.hnudge b{display:block;font-family:var(--disp);font-weight:400;font-size:21px;line-height:1.2}
.hnudge p{margin:4px 0 0;font-size:14px;color:var(--ink2)}
.hnudge .faces{display:flex}
.hnudge .faces img{width:38px;height:38px;border-radius:50%;object-fit:cover;object-position:50% 18%;border:2px solid var(--panel);margin-left:-10px;background:var(--sunk)}
.hnudge .faces img:first-child{margin-left:0}
.hnudge .acts{display:flex;flex-direction:column;align-items:center;gap:6px}
@media (max-width:700px){
  .hnudge{flex-wrap:wrap;gap:14px}
  .hnudge .covr{width:64px}
  .hnudge .tx{flex:1 1 180px}
  .hnudge .faces{display:none}
  .hnudge .acts{flex:1 1 100%;align-items:stretch}
}
/* the sheet: the next book in a series */
.seqscrim{position:fixed;inset:0;z-index:60;background:rgba(20,26,22,.42);overflow-y:auto;padding:48px 16px}
.seqsheet{position:relative;max-width:720px;margin:0 auto;background:var(--canvas);border:1.5px solid var(--edge);border-radius:18px;box-shadow:8px 8px 0 var(--edge);padding:28px 30px;display:flex;flex-direction:column;gap:18px;color:var(--ink)}
.seqsheet h1{margin:0;font-family:var(--disp);font-weight:400;font-size:32px;line-height:1.1;padding-right:30px}
.seqsheet .sub{margin:0;color:var(--ink2)}
.seqsheet .k{margin:0 0 8px;font:11px var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--ink2)}
.seqx{position:absolute;top:14px;right:16px;width:36px;height:36px;border:0;background:none;font-size:26px;line-height:1;color:var(--ink2);cursor:pointer;border-radius:8px}
.seqx:hover{color:var(--ink);background:var(--sunk)}
.seqcarry{display:flex;gap:16px;align-items:center;padding:16px;border:1.5px solid var(--rule);border-radius:14px;background:var(--panel)}
.seqcarry .covr{width:86px;flex:none;aspect-ratio:3/4;border-radius:2px 8px 8px 2px;background:var(--sunk) center/cover;box-shadow:inset 6px 0 0 rgba(0,0,0,.16)}
.seqfacts{flex:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 18px;font-size:14px;min-width:0}
.seqfacts span{display:block;font:11px var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--ink2)}
.seqfacts b{font-weight:500}
.seqchips{display:flex;flex-wrap:wrap;gap:8px}
.seqchip{display:flex;align-items:center;gap:8px;padding:4px 12px 4px 4px;border:1.5px solid var(--rule);border-radius:99px;background:var(--panel);font:500 14px var(--ui);color:var(--ink)}
.seqchip img{width:30px;height:30px;border-radius:50%;object-fit:cover;object-position:50% 18%;background:var(--sunk)}
.seqchip.add{border-style:dashed;padding:6px 12px;color:var(--ink2);cursor:pointer}
.seqchip.add.on{border-style:solid;border-color:var(--edge);color:var(--ink);padding:4px 12px 4px 4px}
.seqq{display:flex;flex-direction:column}
.seqq input{font:16px var(--ui);padding:13px 15px;border:1.5px solid var(--rule);border-radius:12px;background:var(--panel);color:var(--ink);width:100%;box-sizing:border-box}
.seqq input:focus{outline:none;border-color:var(--accent)}
.seqideas{display:flex;flex-wrap:wrap;gap:8px;margin-top:-6px}
.seqideas button{font:500 14px var(--ui);background:var(--panel);border:1.5px solid var(--rule);border-radius:99px;padding:7px 14px;color:var(--ink);cursor:pointer}
.seqideas button.on{border-color:var(--accent);background:var(--accent);color:var(--panel)}
.seqbtns{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
@media (max-width:700px){.seqscrim{padding:12px}.seqsheet{padding:20px}.seqsheet h1{font-size:26px}.seqcarry{align-items:flex-start}.seqcarry .covr{width:64px}.seqfacts{grid-template-columns:1fr}}
/* the landing page's email box, lit up when "Sign in" is pressed */
#lmail.flash,.hform.flash{animation:lflash 1.2s ease-out}
@keyframes lflash{0%{box-shadow:0 0 0 0 var(--accent);border-color:var(--accent)}40%{box-shadow:0 0 0 6px color-mix(in srgb,var(--accent) 35%,transparent);border-color:var(--accent)}100%{box-shadow:0 0 0 0 transparent}}
@media (prefers-reduced-motion:reduce){#lmail.flash,.hform.flash{animation:none;border-color:var(--accent)}}
/* the dots above a heading, rippling while something is being worked out */
.dots.waiting .dot.on{animation:dotwave 1.4s ease-in-out infinite}
.dots.waiting .dot.on:nth-child(2){animation-delay:.12s}
.dots.waiting .dot.on:nth-child(3){animation-delay:.24s}
.dots.waiting .dot.on:nth-child(4){animation-delay:.36s}
.dots.waiting .dot.on:nth-child(5){animation-delay:.48s}
.dots.waiting .dot.on:nth-child(6){animation-delay:.6s}
.dots.waiting .dot.on:nth-child(7){animation-delay:.72s}
.dots.waiting .dot.on:nth-child(8){animation-delay:.84s}
@keyframes dotwave{0%,60%,100%{opacity:1;transform:scale(1)}30%{opacity:.25;transform:scale(.7)}}
@media (prefers-reduced-motion:reduce){.dots.waiting .dot.on{animation:dotfade 2.4s ease-in-out infinite}@keyframes dotfade{50%{opacity:.4}}}

/* ---------------- make it feel like home ---------------- */
.bhome{display:flex;flex-direction:column;gap:20px;max-width:620px}
.bhf{display:flex;flex-direction:column;gap:9px}
.bhf .k{font:11px var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--ink2)}
.bhf input{font:16px var(--ui);padding:11px 14px;border:1.5px solid var(--rule);border-radius:12px;background:var(--panel);color:var(--ink);box-sizing:border-box;width:100%}
.bhf input:focus{outline:none;border-color:var(--accent)}
.bhf .hint{font-size:13px;color:var(--ink2)}
.bhcalls{display:grid;grid-template-columns:auto 1fr;gap:10px 14px;align-items:center}
.bhcalls label{font:500 15px var(--ui);color:var(--ink2);min-width:96px}
.bhchips{display:flex;flex-wrap:wrap;gap:8px}
.bhchips button{font:500 14px var(--ui);background:var(--panel);border:1.5px solid var(--rule);border-radius:99px;padding:6px 13px;color:var(--ink);cursor:pointer}
.bhchips button.on{border-color:var(--accent);background:var(--accent);color:var(--panel)}
.bhacts{display:flex;gap:12px;align-items:center}
.chabout{display:grid;grid-template-columns:auto 1fr;gap:4px 10px;margin:0;font-size:13px}
.chabout dt{font:10.5px var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--ink2);padding-top:2px}
.chabout dd{margin:0;color:var(--ink);overflow-wrap:anywhere}
@media (max-width:700px){.bhcalls{grid-template-columns:1fr}.bhcalls label{min-width:0}}

/* a phone: two books a row on the shelf, so each one's "what happens next?" has room under it */
@media (max-width:520px){ .hboards,.hboards.four{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px} }
