/* Your own book (drop/drop.js): a rulebook dropped here and read by this page alone. */
.reading { width: min(100%, 470px); display: flex; flex-direction: column; align-items: center; }
.reading .anchor { width: clamp(118px, 13vw, 146px); margin: -4px 0 14px; }
.reading .status { height: 28px; transition: color .3s ease; }
html:not(.js) .reading .drop { display: none; }
.drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 30px 24px; border-radius: 24px;
  border: 1.5px dashed rgba(242,179,61,.42); background: rgba(26,33,48,.62); text-align: center; cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease; -webkit-tap-highlight-color: transparent; }
.drop:hover, .drop.over { border-color: var(--lantern); background: rgba(242,179,61,.07); }
.drop.over { transform: scale(1.015); }
.drop:focus-within { outline: 2px solid var(--lantern); outline-offset: 4px; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop .big { font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.2; color: var(--bone); }
.drop .small { font-size: 14px; line-height: 1.45; color: var(--bone-55); max-width: 22em; text-wrap: balance; }
.reading.busy .drop { opacity: .45; pointer-events: none; }

/* The pages as they are read: small, in a row that wraps, each arriving as it is drawn. */
.leaves { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 6px; width: 100%; margin-top: 16px; min-height: 0; }
.leaves:empty { display: none; }
.leaf { border-radius: 2px; background: repeating-linear-gradient(transparent 0 5px, rgba(14,17,27,.1) 5px 6px) content-box, #EDE6D6; padding: 7px 8px;  box-shadow: 0 6px 14px rgba(0,0,0,.45); animation: leafIn .42s cubic-bezier(.2,1.25,.3,1) both; }
.leaf.drawn { padding: 0; background: #EDE6D6; }   /* blank paper, ruled faintly, until the page itself is drawn */
.leaves .more { align-self: center; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .14em; color: var(--bone-55); padding: 0 4px; }
@keyframes leafIn { from { opacity: 0; transform: translateY(10px) scale(.92); } to { opacity: 1; transform: none; } }

/* What reading found. */
.found { width: 100%; margin-top: 20px; }
.found[hidden] { display: none; }
.found .head h3, .found > h3 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: clamp(28px, 3vw, 34px); line-height: 1.1; letter-spacing: -.012em; text-wrap: balance; }
/* A book that couldn't be read: the referee's voice, a lead that has stepped back and the rest (app/Referee/Trouble.swift). */
.found h3.trouble .lead { color: var(--bone-55); }
.found h3.trouble + .line { margin-top: 12px; }
.found h3.trouble ~ .textbtn { margin-top: 10px; margin-left: -12px; }
.found .head .sub, .found .line { margin: 8px 0 0; font-size: 16px; line-height: 1.5; color: var(--bone-70); text-wrap: pretty; }
.found .contents { margin: 12px 0 0; font-family: var(--serif); font-size: 18px; line-height: 1.45; color: var(--bone-85); text-wrap: pretty; }
.found .contents .stamp { margin-right: 6px; }
.found .slab { margin-top: 18px; }
.found .slab[hidden] { display: none; }
.found .asks { margin-top: 16px; }
.found .askchip span { overflow: hidden; text-overflow: ellipsis; }
.found .candour { margin: 14px auto 0; }
.found .row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; margin-top: 18px; }

/* The visitor's own page, drawn here, with the sentence lit where it is printed. */
dialog.pageview.pdf .stamp { margin: -8px 0 14px; }
dialog.pageview.pdf .paper { position: relative; margin: 0 auto; border-radius: 4px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.55); }
dialog.pageview.pdf .paper canvas { display: block; }
dialog.pageview.pdf .lit { position: absolute; border-radius: 3px; background: rgba(242,179,61,.36); mix-blend-mode: multiply; box-shadow: 0 0 0 1px rgba(242,179,61,.5); pointer-events: none; }

@media (prefers-reduced-motion: reduce) { .leaf { animation: none; } .drop, .drop.over { transform: none; transition: none; } }
.reading.done .drop { display: none; }   /* once a book is read, "Read another book" is the way back to the shelf and the drop */
@media (min-width: 861px) { #yours { align-items: start; } #yours .words { position: sticky; top: 24vh; } }

/* The shelf: three books of ours, standing, to pick up and drop in (or tap). Typographic covers, our own type, no art. */
.shelf { display: flex; justify-content: center; align-items: flex-end; gap: 14px; width: 100%; margin: 4px 0 18px; padding-bottom: 10px; border-bottom: 1px solid rgba(242,179,61,.18); }
.reading.done .shelf, .reading.busy .shelf { margin-bottom: 14px; }
.book { position: relative; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; width: 96px; height: 138px; padding: 11px 10px 12px;
  border: 0; border-radius: 3px 6px 6px 3px; background: #F4EEE1; color: #1E1B16; text-align: left; cursor: grab; -webkit-tap-highlight-color: transparent;
  box-shadow: inset 4px 0 0 rgba(30,27,22,.08), 0 14px 26px rgba(0,0,0,.5), 0 0 0 1px rgba(0,0,0,.25);
  transition: transform .25s cubic-bezier(.3,1.4,.5,1), box-shadow .25s ease, opacity .25s ease; }
.book .k { font: 600 6.5px/1.2 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: #8A6A2A; }
.book .t { font-family: var(--serif); font-weight: 600; font-size: 17px; line-height: 1.05; letter-spacing: -.01em; hyphens: manual; }
.book .t::before { content: ""; display: block; width: 26px; height: 1.5px; margin-bottom: 7px; background: #C9922B; }   /* the cover's rule sits over the title, however many lines it takes */
.book:hover, .book:focus-visible { transform: translateY(-6px) rotate(-1.5deg); box-shadow: inset 4px 0 0 rgba(30,27,22,.08), 0 22px 34px rgba(0,0,0,.55), 0 0 30px rgba(242,179,61,.18); }
.book:active { cursor: grabbing; }
.book.lifted { opacity: .4; }
.book.taken { opacity: .35; transform: translateY(4px); }
.book.ghost { position: fixed; z-index: 60; margin: 0; pointer-events: none; }
.book.held { cursor: grabbing; box-shadow: inset 4px 0 0 rgba(30,27,22,.08), 0 30px 50px rgba(0,0,0,.6), 0 0 40px rgba(242,179,61,.22); }
.book { touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.reading.busy .book { pointer-events: none; }
@media (max-width: 380px) { .shelf { gap: 10px; } .book { width: 86px; height: 124px; } .book .t { font-size: 15.5px; } }
@media (prefers-reduced-motion: reduce) { .book, .book:hover, .book:focus-visible { transition: none; transform: none; } }
