/* Tales (js/tales.js): a shelf of cream paper like the home page's lobby, and
   a reader in the story's ink — Georgia on deep teal, as in hollow-story.css. */
.tales-overlay { padding: calc(16px + var(--sat)) calc(16px + var(--sar)) calc(16px + var(--sab)) calc(16px + var(--sal)); background: #151e2ce8; }
/* The box is sized by the overlay, never by the window: ui.js zooms the body
   (up to 1.6 on a wide window), and under that zoom 100vh/100dvh are more
   than the screen, so a box capped by them ran off the top or the bottom.
   The overlay is pinned to the screen's edges at any zoom; one row of exactly
   its height, and a box at most 100% of it, always fits. One scrollbar: the
   box's own. */
.overlay.tales-overlay { grid-template-rows: minmax(0, 1fr); place-items: center; overflow: hidden; }
.overlay .obox.tales-book {
  width: min(1080px, 100%); max-width: 100%; max-height: 100%;
  padding: 26px 34px 30px; text-align: left; border-radius: 6px;
  background: #f4eedf; color: #3b4946; border: 1px solid #bba57280; box-shadow: 0 28px 100px #0008;
  overflow-x: hidden; overflow-wrap: break-word;
}
.tales-book p { margin: 0; opacity: 1; }   /* after style.css's .overlay p, so it wins */
.tales-book button { font: inherit; }
.tales-book button:hover:not(:disabled) { transform: none; filter: none; }
.tales-book button:focus-visible, .tales-book summary:focus-visible, .tales-book textarea:focus-visible,
.tales-book select:focus-visible, .tales-book input:focus-visible + span { outline: 3px solid #c99a3e; outline-offset: 3px; }
.tales-book [tabindex="-1"]:focus { outline: none; }
.tales-book [hidden] { display: none !important; }
.tl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.tl-top { margin: -6px 0 6px; }
.tl-back { min-height: 44px; padding: 8px 4px; border: 0; background: none; color: #58635b; font: 14px system-ui, sans-serif !important; }
.tl-back:hover { color: #2c3d36; text-decoration: underline; text-underline-offset: 4px; }

.tl-head { max-width: 640px; margin-bottom: 8px; }
.tl-eyebrow { margin: 0 0 6px; color: #7b8665; font: 600 11px/1.5 system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase; }
:is(.overlay, .tales-site) .tales-book :is(h1, h2) { margin: 0 0 10px; color: #33453f; font: 500 34px/1.15 Georgia, serif; letter-spacing: -.01em; }
:is(.overlay, .tales-site) .tales-book .tl-lede { margin: 0 0 6px; color: #5b675f; font: 16px/1.6 Georgia, serif; opacity: 1; }
.tl-shelf { margin-top: 34px; }
.tl-shelf.tl-curated { margin-top: 0; }
:is(.overlay, .tales-site) .tales-book .tl-sh { margin: 0 0 14px; color: #7b8665; font: 600 11px/1.5 system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase; }
:is(.overlay, .tales-site) .tales-book .tl-note { margin: 4px 0 0; color: #6b7467; font: 14px/1.55 system-ui, sans-serif; opacity: 1; }
:is(.overlay, .tales-site) .tales-book .tl-signin { margin-top: 30px; text-align: center; color: #8a8c78; font-size: 13px; }
.tl-empty { display: flex; align-items: center; gap: 16px; padding: 22px 20px; border: 1px dashed #b3b49c; border-radius: 4px; background: #ece5d2; }
.tl-empty span { color: #a08a55; font: 34px Georgia, serif; }
:is(.overlay, .tales-site) .tales-book .tl-empty p { margin: 0; font: italic 16px/1.5 Georgia, serif; color: #5b675f; }

/* the library's header: the title on the left, Write a tale on the right */
.tl-lhead { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 20px; max-width: none; margin-bottom: 22px; }
:is(.overlay, .tales-site) .tales-book .tl-lhead :is(h1, h2) { grid-column: 1; grid-row: 1; margin-bottom: 2px; }
:is(.overlay, .tales-site) .tales-book .tl-lhead .tl-lede { grid-column: 1; grid-row: 2; margin: 0; }
.tl-hact { grid-column: 2; grid-row: 1 / span 2; }
.tl-hact:empty { display: none; }
:is(.overlay, .tales-site) .tales-book .tl-hact .tl-note { margin: 0; }
.tales-book .tl-write { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 9px 20px; border-radius: 999px; }

/* filter chips */
.tl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.tl-chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 7px 15px; border-radius: 999px;
  border: 1px solid #cdc2a1; background: #fbf7ec; color: #45554e; font: 14px/1.2 system-ui, sans-serif !important; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.tl-chip:hover { border-color: #9fa47f; background: #fffcf3; }
.tl-chipn { color: #988f72; font-size: 12px; font-variant-numeric: tabular-nums; }
.tl-chip[aria-pressed="true"] { background: #3f6559; border-color: #3f6559; color: #fff4dd; }
.tl-chip[aria-pressed="true"] .tl-chipn { color: #c9dccb; }

/* covers: a soft gradient, a little drawing, a whisper of paper grain */
.tl-cover {
  position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 10;
  background: linear-gradient(170deg, var(--c1), var(--c2));
  --m: #fff3d6; --s: #fff6dc; --d: #0003; --g: #fff3d6;
}
.tl-cover svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tl-cover::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .22; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* a painted cover (art/tales/<id>.webp): the gradient waits behind it while it loads */
.tl-cover.has-art svg, .tl-cover.has-art::after { display: none; }
.tl-paint { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.tl-cover .m { fill: var(--m); }
.tl-cover .s { fill: var(--s); }
.tl-cover .d { fill: var(--d); }
.tl-cover .g { fill: var(--g); opacity: .06; }
.tl-cover .w { fill: none; stroke: var(--m); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tl-cover .o6 { opacity: .6; }
.tl-cover .o5 { opacity: .55; }
.tl-cover .o3 { opacity: .32; }
.tl-pal-night  { --c1: #1f2c48; --c2: #44597f; --d: #16203a; }
.tl-pal-dusk   { --c1: #5d5381; --c2: #d8a08f; --d: #463c66; --s: #fff0e0; }
.tl-pal-sea    { --c1: #1d4f5c; --c2: #6fa6a2; --d: #153f49; --m: #eef6ee; }
.tl-pal-meadow { --c1: #8fb3a4; --c2: #d9dca6; --d: #4f7a5a; --m: #fffbe6; --s: #fffbe6; }
.tl-pal-snow   { --c1: #b8cde0; --c2: #eef3f6; --m: #5f7f9d; --s: #7d9bb8; --d: #93aec6; --g: #ffffff; }
.tl-pal-hearth { --c1: #5f3a2c; --c2: #d99a52; --d: #47291d; --m: #ffe7b0; --g: #ffd98a; }
.tl-pal-paper  { --c1: #e7dfc8; --c2: #f1ebda; display: grid; place-items: center; }
.tl-pal-paper::after { display: none; }
.tl-fmark { color: #b08b62; font: 26px Georgia, serif; }

/* the shelf: books in a grid */
.tl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(224px, 1fr)); gap: 26px 20px; }
.tl-card { position: relative; min-width: 0; }
/* on the website a curated tale is a link to its page (js/tales.js taleHref) */
a.tl-open, a.tl-resume, a.tl-cplay { text-decoration: none; }
.tl-open {
  display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0; margin: 0; text-align: left; color: #33453f;
  background: #fbf7ec; border: 1px solid #ddd3b6; border-radius: 8px; overflow: hidden; cursor: pointer;
  box-shadow: 0 1px 0 #e6dcc0, 0 4px 14px #6b5a2c12; transition: box-shadow .18s, border-color .18s, transform .18s;
}
.tales-book .tl-open:hover:not(:disabled) { border-color: #c2b68f; box-shadow: 0 1px 0 #e6dcc0, 0 10px 24px #6b5a2c24; transform: translateY(-2px); }
.tales-book .tl-open:focus-visible { outline: 3px solid #c99a3e; outline-offset: 3px; }
.tl-open .tl-cover { flex: none; border-bottom: 1px solid #0000000d; }
.tl-cbody { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 13px; }
.tl-ctitle {
  font: 600 17.5px/1.28 Georgia, serif; color: #2f4039; letter-spacing: -.005em; text-wrap: balance;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tl-cline {
  font: 14px/1.5 Georgia, serif; color: #5f6a61;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.tl-ctags {
  font: italic 12.5px/1.4 Georgia, serif; color: #8a8670;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tl-cmeta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-top: auto; padding-top: 4px; font: 12px/1.4 system-ui, sans-serif; color: #85866f; }
.tl-hasaudio { margin-left: -5px; color: #9b8656; font: 13px/1 Georgia, serif; }
.tl-crate { color: #9b8656; white-space: nowrap; }
.tl-tag { margin-left: auto; color: #8f8a72; font-size: 11px; letter-spacing: .02em; }
.tl-readmark {
  position: absolute; top: 9px; right: 9px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: #fbf7ecee; color: #3f6559; font: 700 13px/1 system-ui, sans-serif; box-shadow: 0 1px 4px #0002;
}
.tl-card.is-read .tl-ctitle { color: #4c5b54; }
/* the play button sits on the cover's lower right */
.tl-cpwrap { position: absolute; top: 0; left: 0; right: 0; aspect-ratio: 16 / 10; pointer-events: none; }
.tl-cplay {
  position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%; background: #fbf7ecf2; color: #2c4a41; cursor: pointer; pointer-events: auto;
  box-shadow: 0 2px 10px #0003; transition: transform .15s, background .15s;
}
.tales-book .tl-cplay:hover:not(:disabled) { background: #fff; transform: scale(1.06); }
.tl-cplay .tl-picon { margin-left: 3px; border-left-width: 11px; border-top-width: 6.5px; border-bottom-width: 6.5px; }
.tl-card.writing .tl-open { border-style: dashed; background: #f4efdf; }
.tl-card.failed .tl-open { background: #f5ebe0; border-color: #dcc0a6; }
.tl-card.failed .tl-cmeta { color: #96613b; }
.tl-card .tl-bar { margin-top: auto; }
/* with a pointer that hovers, the play button waits for the card's hover */
@media (hover: hover) and (pointer: fine) {
  .tl-cplay { opacity: 0; transform: scale(.9); transition: opacity .18s, transform .18s, background .15s; }
  .tl-card:hover .tl-cplay, .tl-cplay:focus-visible { opacity: 1; transform: none; }
  .tales-book .tl-card:hover .tl-cplay:hover { transform: scale(1.06); }
}

/* keep reading: one wide card above the shelf */
.tl-resume {
  display: flex; align-items: center; gap: 18px; width: 100%; margin: 0 0 24px; padding: 10px 18px 10px 10px; text-align: left; cursor: pointer;
  background: #efe7d2; border: 1px solid #d8cba7; border-radius: 10px; color: #33453f; transition: background .15s, border-color .15s;
}
.tales-book .tl-resume:hover:not(:disabled) { background: #f4edda; border-color: #bfb187; }
.tl-resume .tl-cover { flex: none; width: 132px; border-radius: 6px; }
.tl-rbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tl-reye { color: #7b8665; font: 600 11px/1.4 system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase; }
.tl-rtitle { font: 600 20px/1.25 Georgia, serif; color: #2f4039; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-rwhere { display: flex; align-items: center; gap: 12px; color: #6f7563; font: 13px/1.4 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.tl-rbar { flex: 0 1 180px; height: 4px; border-radius: 2px; background: #d9cfb3; overflow: hidden; }
.tl-rbar i { display: block; height: 100%; background: #3f6559; border-radius: inherit; }
.tl-rgo { flex: none; color: #7f8b6d; font: 30px/1 Georgia, serif; }
/* Tonight (one bedtime story for the evening) and Keep reading, side by side when both are there */
.tl-tops { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 0 0 24px; }
.tl-tops.both { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.tl-tops .tl-resume { margin: 0; height: 100%; }
.tl-tonight { position: relative; min-width: 0; }
.tl-tonight .tl-tcard { background: #f6f0df; }
.tl-tonight .tl-tcard.with-play { padding-right: 68px; }
.tales-book .tl-tonight .tl-tcard:hover:not(:disabled) { background: #fbf6e8; }
.tl-tonight .tl-cplay { right: 16px; top: 50%; bottom: auto; margin-top: -20px; opacity: 1; transform: none; }
.tales-book .tl-tonight .tl-cplay:hover:not(:disabled) { transform: scale(1.06); }
/* the reader: a painted cover above the title, on the first page only */
.tl-rcover { width: min(100%, 220px); margin: 0 0 12px; }
.tl-rcover .tl-cover { border-radius: 8px; box-shadow: 0 4px 16px #0004; }
.tl-rhead.slim .tl-rcover { display: none; }

.tl-primary, .tl-secondary { min-height: 44px; padding: 10px 20px; border-radius: 3px; font: 15px Georgia, serif !important; cursor: pointer; }
.tl-primary { border: 1px solid #3f6559; background: #3f6559; color: #fff1d3; }
.tl-primary:hover:not(:disabled) { background: #2c5147; }
.tl-secondary { border: 1px solid #a7b09a; background: transparent; color: #4b5f4c; }
.tl-secondary:hover { background: #e4e6d6; }
.tl-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* spinner and bar for a tale being written */
.tl-spin { display: inline-block; width: 18px; height: 18px; border: 2px solid #c7bd9b; border-top-color: #3f6559; border-radius: 50%; animation: tl-spin 1s linear infinite; }
.tl-spin.big { width: 34px; height: 34px; border-width: 3px; }
@keyframes tl-spin { to { transform: rotate(360deg); } }
.tl-bar { display: block; height: 6px; margin-top: auto; border-radius: 3px; background: #e2dbc4; overflow: hidden; }
.tl-bar i { display: block; height: 100%; background: linear-gradient(90deg, #8aa184, #3f6559); border-radius: inherit; transition: width .6s ease; }
.tl-bar.big { height: 10px; margin: 14px 0 6px; max-width: 460px; }
.tl-progress { max-width: 560px; padding: 18px 0 6px; }
:is(.overlay, .tales-site) .tales-book .tl-pmsg { margin: 0; font: italic 17px/1.55 Georgia, serif; color: #4b5a51; opacity: 1; }
:is(.overlay, .tales-site) .tales-book .tl-quote { margin: 12px 0 0; padding-left: 14px; border-left: 3px solid #cbbf98; font: 15px/1.5 Georgia, serif; color: #66705f; }
.tl-progress .tl-spin.big { margin-bottom: 14px; }
@media (prefers-reduced-motion: reduce) { .tl-spin, .tl-listen.loading .tl-play::after { animation-duration: 3s; } .tl-bar i { transition: none; } }
/* the writing desk's little films: two stacked clips, the next fading in */
/* the writing desk's progress (a write, a rewrite) is as wide as its card, the
   films filling it and the words and bar beneath at the same width */
.tales-progress .tl-progress, .tales-rewriting .tl-progress { max-width: 720px; }
.tales-progress .tl-bar.big, .tales-rewriting .tl-bar.big { max-width: none; }
.tl-films {
  position: relative; width: 100%; max-width: 720px; aspect-ratio: 16 / 9; margin: 0 0 18px;
  overflow: hidden; border-radius: 14px; background: #2a3b3c;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 6px 18px rgba(40, 52, 44, .18);
  isolation: isolate;
}
.tl-films[hidden] { display: none; }
.tl-film {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0; transition: opacity .8s ease; pointer-events: none;
}
.tl-film.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .tl-film { transition: none; } }
/* mute and pause: two small round buttons over the panel's corner */
.tl-fctl { position: absolute; right: 8px; bottom: 8px; z-index: 2; display: flex; gap: 6px; }
.tl-films.still .tl-fctl { display: none; }
.tl-fbtn {
  width: 34px; height: 34px; padding: 0; margin: 0; border: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  color: #fffaf0; background: rgba(32, 40, 38, .46); box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: .82; transition: opacity .2s ease, background-color .2s ease;
}
.tl-fbtn svg { width: 21px; height: 21px; display: block; }
.tl-fbtn:hover, .tl-fbtn:focus-visible { opacity: 1; background: rgba(32, 40, 38, .66); }
.tl-fbtn:focus-visible { outline: 2px solid #fffaf0; outline-offset: 2px; }
@media (pointer: coarse) { .tl-fbtn { width: 38px; height: 38px; } .tl-fbtn svg { width: 22px; height: 22px; } }
/* a bigger panel, slightly bigger buttons (phones keep theirs) */
@media (min-width: 641px) {
  .tl-fctl { right: 12px; bottom: 12px; gap: 8px; }
  .tl-fbtn { width: 40px; height: 40px; }
  .tl-fbtn svg { width: 23px; height: 23px; }
}
/* the browser wouldn't play the sound without a tap: the mute button says so */
.tl-fbtn.hint { width: auto; gap: 6px; padding: 0 14px 0 9px; border-radius: 999px; opacity: 1; background: rgba(32, 40, 38, .66); }
.tl-fsay { font: 600 13px/1 system-ui, sans-serif; letter-spacing: .01em; white-space: nowrap; }

/* the write form */
.tl-form { max-width: 640px; margin-top: 18px; }
.tl-label { display: block; margin: 16px 0 6px; padding: 0; color: #536352; font: 600 12px system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.tl-form textarea, .tl-form select {
  width: 100%; max-width: 100%; padding: 12px 14px; border: 1px solid #a3a58f; border-radius: 3px;
  background: #fffdf6; color: #2f4039; font: 17px/1.5 Georgia, serif; user-select: text; -webkit-user-select: text;
}
.tl-form textarea { min-height: 120px; resize: vertical; }
.tl-form select { font-size: 16px; }
.tl-under { display: flex; justify-content: flex-end; min-height: 6px; margin-top: 4px; font: 13px/1.5 system-ui, sans-serif; color: #6b7467; }
.tl-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tl-count { flex: none; font-variant-numeric: tabular-nums; }
.tl-count.near { color: #a0582e; }
.tl-len { display: flex; gap: 10px; flex-wrap: wrap; border: 0; padding: 0; margin: 0; }
.tl-len legend { float: left; width: 100%; }
.tl-len label { position: relative; cursor: pointer; }
.tl-len input { position: absolute; opacity: 0; }
.tl-len span { display: block; min-width: 150px; padding: 10px 16px; border: 1px solid #a7b09a; border-radius: 3px; font: 16px Georgia, serif; color: #33453f; background: #fbf7ec; }
.tl-len small { display: block; font: 12px system-ui, sans-serif; color: #7a7f68; }
.tl-len input:checked + span { background: #dfe6d2; border-color: #3f6559; box-shadow: inset 0 0 0 1px #3f6559; }
/* whether it's set in Starfall */
.tl-who { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 14px; }
.tl-check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font: 15px Georgia, serif; color: #33453f; }
.tl-check input { width: 18px; height: 18px; margin: 0; accent-color: #3f6559; }
.tl-check.tl-narrate { display: flex; width: max-content; margin-top: 10px; }
:is(.overlay, .tales-site) .tales-book .tl-error { margin: 14px 0 0; color: #9a4b23; font: 14px/1.5 system-ui, sans-serif; opacity: 1; }
:is(.overlay, .tales-site) .tales-book .tl-error:empty { display: none; }

/* ------- the reader ------- */
.overlay .obox.tales-book.tales-reader {
  display: flex; flex-direction: column; width: min(760px, 100%);
  height: 100%; max-height: 900px; overflow: hidden;
  padding: 16px 0 12px; background: #1c2e33; color: #f3ead2; border: 1px solid #7c9684; border-top: 3px solid #bdcc9b; border-radius: 15px;
}
.tales-reader .tl-progress { padding: 30px 40px; }
:is(.overlay, .tales-site) .tales-reader .tl-pmsg { color: #d0d8ca; }
.tl-rtop { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 28px 4px; }
.tales-reader .tl-back { color: #c7cfbf; }
.tales-reader .tl-back:hover { color: #fff4dd; }
.tl-pageof { color: #9fb0a5; font: 12px system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.tl-ink { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 48px; }
.tl-rhead { flex: none; padding: 6px 0 14px; margin-bottom: 14px; border-bottom: 1px solid #80938d40; }
.tales-reader .tl-eyebrow { color: #b3d5c8; }
:is(.overlay, .tales-site) .tales-reader h2 { margin: 0 0 6px; color: #faf0d6; font: 500 32px/1.2 Georgia, serif; }
.tl-rmeta { margin: 0; color: #c4cdbf; font: italic 14px/1.5 Georgia, serif; }
.tl-rhead.slim { padding: 0 0 8px; margin-bottom: 10px; }
.tl-rhead.slim .tl-eyebrow, .tl-rhead.slim .tl-rmeta, .tl-rhead.slim .tl-crumb, .tl-rhead.slim .tl-ssum, .tl-rhead.slim .tl-rdet { display: none; }
/* your own tale's details: its words and days, and "Your idea" folded beneath */
.tl-rdet { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin: 4px 0 0; font: 12.5px/1.5 system-ui, sans-serif; color: #9fb0a5; }
:is(.overlay, .tales-site) .tales-book .tl-rfacts { margin: 0; color: #9fb0a5; font: 12.5px/1.5 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.tl-idea { min-width: 0; }
.tl-idea[open] { flex-basis: 100%; }
.tl-idea summary { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; color: #b3d5c8; cursor: pointer; list-style: none; border-radius: 6px; }
.tl-idea summary::-webkit-details-marker { display: none; }
.tl-idea summary::before { content: ''; width: 0; height: 0; border-left: 5px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform .15s; }
.tl-idea[open] summary::before { transform: rotate(90deg); }
.tl-idea summary:hover { color: #fff4dd; }
.tales-book .tl-idea summary:focus-visible { outline: 2px solid #bdcc9b; outline-offset: 2px; }
.tl-ideabox { margin: 4px 0 2px; padding: 10px 14px; max-height: 17em; overflow-y: auto; border-left: 2px solid #bdcc9b88; background: #ffffff0a; border-radius: 0 6px 6px 0; }
:is(.overlay, .tales-site) .tales-book .tl-iprompt { margin: 0; color: #e7e0c8; font: italic 15px/1.55 Georgia, serif; white-space: pre-wrap; overflow-wrap: anywhere; }
:is(.overlay, .tales-site) .tales-book .tl-iprompt.tl-inone { color: #a7b5ab; }
.tl-ipers { margin: 8px 0 0; display: grid; gap: 2px; }
.tl-ipers div { display: flex; flex-wrap: wrap; gap: 0 6px; }
.tl-ipers dt { color: #9fb0a5; }
.tl-ipers dd { margin: 0; color: #e7e0c8; }
.tl-night .tales-reader .tl-rdet, .tl-night .tales-reader .tl-rfacts, .tl-night .tales-reader .tl-ipers dt { color: #8a7656; }
.tl-night .tales-reader .tl-idea summary { color: #a8916a; }
.tl-night .tales-reader .tl-iprompt, .tl-night .tales-reader .tl-ipers dd { color: #c9b48d; }
.tl-night .tales-reader .tl-ideabox { border-color: #6b583c; background: #00000014; }
/* a serial's part: "Title · Part 2 of 4" with ‹ › to its neighbours, and the serial's summary, quietly */
.tl-crumb { display: flex; align-items: center; gap: 4px; margin: 0 0 6px; }
.tl-crumb .tl-eyebrow { margin: 0; }
.tl-cstep {
  display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 28px; padding: 0 6px;
  border: 0; border-radius: 8px; background: none; color: #7b8665; font: 17px/1 Georgia, serif; text-decoration: none; cursor: pointer;
}
.tl-cstep:hover { background: #80938d22; }
.tl-cstep:focus-visible { outline: 2px solid #bdcc9b; outline-offset: 1px; }
.tales-reader .tl-cstep { color: #b3d5c8; }
.tl-ssum { margin: 0 0 8px; color: #8b9a8f; font: italic 14px/1.5 Georgia, serif; max-width: 52em; }
.tales-reader .tl-ssum { color: #a7b5ab; }
/* "Continue the story?" at the end of your own tale */
.tl-nudge { display: flex; align-items: center; justify-content: center; gap: 2px; margin: 8px 0 0; }
.tl-nudgex { min-width: 32px; min-height: 32px; border: 0; border-radius: 8px; background: none; color: #9fb0a5; font: 18px/1 system-ui, sans-serif; cursor: pointer; }
.tl-nudgex:hover { color: #fff4dd; background: #263c3b; }
:is(.overlay, .tales-site) .tales-reader .tl-rhead.slim h2 { font-size: 17px; color: #e4d2a2; }
.tl-page { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #7c968466 transparent; user-select: text; -webkit-user-select: text; }
.tl-page p, .tl-measure p { margin: 0 0 1em; color: #f3ead2; font: 19px/1.7 Georgia, serif; opacity: 1; text-wrap: pretty; }
.tl-page p:last-child, .tl-measure p:last-child { margin-bottom: 0; }
.tl-page em { font-style: italic; }
.tl-page strong { font-weight: 700; color: #fff7e2; }
.tl-page .tl-break, .tl-measure .tl-break { text-align: center; color: #bdcc9b; letter-spacing: .6em; margin: .4em 0 1.1em; }
.tl-end { flex: none; padding: 10px 0 2px; border-top: 1px solid #80938d40; margin-top: 12px; }
.tl-fin { margin: 0; text-align: center; color: #bdcc9b; font: 22px Georgia, serif; }
.tl-end .tl-actions { justify-content: center; margin-top: 8px; }
/* "How was it?": five stars, and a note if they like (the reader's ink) */
.tl-rate { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 10px; margin-top: 6px; }
.tl-rq { color: #bdcc9b; font: italic 15px/1.4 Georgia, serif; }
.tl-stars { display: inline-flex; }
.tl-star {
  min-width: 34px; min-height: 36px; padding: 0 3px; border: 0; border-radius: 8px; background: none; cursor: pointer;
  color: #80938d88; font: 23px/1 Georgia, serif !important; font-style: normal !important; transition: color .12s, transform .12s;
}
.tl-star.on { color: #ebc96d; }
.tl-star:focus-visible { outline: 2px solid #aee6d1; outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) {
  .tl-stars:hover .tl-star { color: #ebc96dcc; }
  .tl-stars .tl-star:hover ~ .tl-star { color: #80938d88; }
  .tl-star:hover { transform: scale(1.12); }
}
.tl-rnotebtn {
  min-height: 32px; padding: 4px 6px; border: 0; background: none; cursor: pointer; color: #bdcc9b;
  font: 14px Georgia, serif !important; text-decoration: underline; text-decoration-color: #bdcc9b66; text-underline-offset: 4px;
}
.tl-rnotebtn:hover { color: #fff4dd; }
.tl-rnote { flex-basis: 100%; display: flex; justify-content: center; }
.tl-rnote[hidden] { display: none; }
.tl-rnote textarea {
  box-sizing: border-box; width: min(100%, 460px); min-height: 58px; padding: 8px 12px; resize: vertical; border: 1px solid #7c9684;
  border-radius: 10px; background: #13221f; color: #f3ead2; font: 15px/1.5 Georgia, serif;
}
.tl-rnote textarea:focus { outline: 2px solid #aee6d1; outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { .tl-star { transition: none; } .tl-star:hover { transform: none; } }
.tales-reader .tl-primary { background: #dce9ca; border-color: #b6c9b0; color: #182e29; }
.tales-reader .tl-primary:hover:not(:disabled) { background: #f1f7dc; }
.tales-reader .tl-secondary { color: #e9e3cc; border-color: #7c9684; }
.tales-reader .tl-secondary:hover { background: #263c3b; }
.tl-nav { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 28px 0; }
.tl-turn { min-width: 96px; min-height: 44px; padding: 8px 14px; border: 1px solid #7c968499; border-radius: 10px; background: #263c3b; color: #fff4dd; font: 16px Georgia, serif !important; cursor: pointer; }
.tl-turn:hover:not(:disabled) { background: #365250; }
.tl-turn:disabled { opacity: .3; }
.tl-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; min-width: 0; }
.tl-dots i { width: 6px; height: 6px; border-radius: 50%; background: #7c9684; }
.tl-dots i.on { background: #e4d2a2; transform: scale(1.35); }
.tales-reader button:focus-visible { outline-color: #aee6d1; }

/* listening: a round play button, a word, a thin seek bar and the time */
.tl-lslot { margin-top: 12px; }
.tl-listen { display: flex; align-items: center; gap: 12px; max-width: 560px; }
.tl-play {
  position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border: 1px solid #b6c9b0; border-radius: 50%; background: #dce9ca; color: #182e29; cursor: pointer;
}
.tl-play:hover:not(:disabled) { background: #f1f7dc; }
.tl-picon { display: block; width: 0; height: 0; margin-left: 3px; border-left: 12px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.tl-listen.playing .tl-picon { width: 12px; height: 14px; margin: 0; box-sizing: border-box; border: 0; border-left: 4px solid currentColor; border-right: 4px solid currentColor; }
.tl-listen.loading .tl-play::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid transparent; border-top-color: #e4d2a2; animation: tl-spin 1s linear infinite;
}
.tl-lword { flex: none; min-width: 74px; color: #b3d5c8; font: 600 11px/1 system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.tl-ltime { flex: none; color: #9fb0a5; font: 12px system-ui, sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-seek {
  flex: 1; min-width: 60px; height: 24px; margin: 0; padding: 0; background: transparent; cursor: pointer;
  -webkit-appearance: none; appearance: none; --p: 0%;
}
.tl-seek::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, #e4d2a2 var(--p), #80938d55 var(--p)); }
.tl-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4px; border: 0; border-radius: 50%; background: #faf0d6; box-shadow: 0 0 0 3px #1c2e33; }
.tl-seek::-moz-range-track { height: 4px; border-radius: 2px; background: #80938d55; }
.tl-seek::-moz-range-progress { height: 4px; border-radius: 2px; background: #e4d2a2; }
.tl-seek::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #faf0d6; }
.tl-listen:not(.started) .tl-seek { opacity: .55; }
.tl-seek:focus-visible { outline: 2px solid #aee6d1; outline-offset: 3px; border-radius: 4px; }
:is(.overlay, .tales-site) .tales-reader .tl-lnote { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0; color: #c4cdbf; font: italic 14px/1.5 Georgia, serif; }
.tl-spin.small { width: 14px; height: 14px; border-color: #80938d; border-top-color: #e4d2a2; }
.tl-link { min-height: 36px; padding: 6px 14px; border: 1px solid #7c9684; border-radius: 999px; background: transparent; color: #fff4dd; font: 14px Georgia, serif !important; font-style: normal !important; cursor: pointer; }
.tl-link:hover:not(:disabled) { background: #263c3b; }
.tl-link:disabled { opacity: .6; cursor: default; }
.tl-aloud .tl-link { display: inline-flex; align-items: center; gap: 9px; }
.tl-aloud .tl-picon { margin-left: 1px; border-left-width: 9px; border-top-width: 5.5px; border-bottom-width: 5.5px; }
:is(.overlay, .tales-site) .tales-reader .tl-lerr { margin: 6px 0 0; color: #f0c39a; font: 13px/1.5 system-ui, sans-serif; }
:is(.overlay, .tales-site) .tales-reader .tl-lerr:empty { display: none; }
/* past the first page the header is slim, and so is the control */
.tl-rhead.slim .tl-lslot { margin-top: 4px; }
.tl-rhead.slim .tl-lnote, .tl-rhead.slim .tl-lerr { display: none !important; }
.tl-rhead.slim .tl-play { width: 32px; height: 32px; }
.tl-rhead.slim .tl-picon { border-left-width: 10px; border-top-width: 6px; border-bottom-width: 6px; }
.tl-rhead.slim .tl-listen.playing .tl-picon { width: 10px; height: 12px; border-left-width: 3px; border-right-width: 3px; }
.tl-rhead.slim .tl-lword { display: none; }

/* ------- changing your own tale (js/tales.js: edit, rewrite, history, rename) ------- */
.tales-book { position: relative; }
.tl-tools { flex: 1; display: flex; justify-content: flex-end; gap: 2px; min-width: 0; }
.tl-tool { min-height: 36px; padding: 6px 10px; border: 0; border-radius: 6px; background: none; color: #a9b9ae; font: 13px system-ui, sans-serif !important; cursor: pointer; white-space: nowrap; }
.tl-tool:hover:not(:disabled) { color: #fff4dd; background: #263c3b; }
.tl-renamable { cursor: text; }
.tl-renamable:hover { text-decoration: underline dotted #7c9684; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.tl-rninput {
  width: 100%; max-width: 100%; margin: 0; padding: 4px 8px; border: 1px solid #7c9684; border-radius: 4px;
  background: #142427; color: #faf0d6; font: inherit; user-select: text; -webkit-user-select: text;
}
.tl-rninput:focus { outline: 2px solid #aee6d1; outline-offset: 1px; }
/* the editor: the title and every paragraph a box; Save and Cancel stay in view below */
.tl-editing { overflow-y: auto; overscroll-behavior: contain; padding-bottom: 18px; scrollbar-width: thin; scrollbar-color: #7c968466 transparent; }
.tl-etitle, .tl-eblock {
  display: block; width: 100%; max-width: 100%; margin: 0; border: 1px solid transparent; border-radius: 6px;
  background: #ffffff08; color: #f3ead2; user-select: text; -webkit-user-select: text;
}
.tl-etitle { padding: 6px 10px; margin: 4px 0 14px; color: #faf0d6; font: 500 28px/1.25 Georgia, serif; }
.tl-eblock { padding: 8px 10px; margin-bottom: 8px; font: 19px/1.7 Georgia, serif; resize: none; overflow: hidden; }
.tl-etitle:hover, .tl-eblock:hover { border-color: #7c968455; }
.tl-etitle:focus, .tl-eblock:focus { outline: none; border-color: #aee6d1aa; background: #ffffff0f; }
.tl-eblock.tl-ehit { border-color: #f0c39a; }
.tl-ebar {
  flex: none; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px;
  padding: 10px 48px 0; border-top: 1px solid #80938d40;
}
:is(.overlay, .tales-site) .tales-book .tl-eerr { flex: 1 1 200px; margin: 0; color: #f0c39a; font: 13px/1.5 system-ui, sans-serif; }
:is(.overlay, .tales-site) .tales-book .tl-eerr:empty { display: none; }
/* a small dialog over the reader */
.tl-modal { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 16px; background: #0b1416b3; border-radius: inherit; }
.tl-mbox {
  width: min(520px, 100%); max-height: 100%; overflow-y: auto; padding: 20px 22px; border-radius: 12px;
  background: #22383d; color: #f3ead2; border: 1px solid #7c9684; box-shadow: 0 18px 60px #0008;
}
:is(.overlay, .tales-site) .tales-book .tl-mh { margin: 0 0 12px; color: #faf0d6; font: 500 21px/1.25 Georgia, serif; }
.tl-mbox textarea {
  width: 100%; max-width: 100%; padding: 10px 12px; border: 1px solid #7c9684; border-radius: 6px; resize: vertical;
  background: #142427; color: #f3ead2; font: 17px/1.5 Georgia, serif; user-select: text; -webkit-user-select: text;
}
.tl-mbox textarea:focus { outline: 2px solid #aee6d1; outline-offset: 1px; }
:is(.overlay, .tales-site) .tales-book .tl-mnote { margin: 6px 0 0; color: #9fb0a5; font: 12.5px/1.5 system-ui, sans-serif; }
.tl-mbox .tl-eerr { margin-top: 8px !important; }
.tl-mbox .tl-actions { justify-content: flex-end; margin-top: 14px; }
/* the dialog's buttons look the same over the reader and over the write form */
.tl-mbox .tl-primary { background: #dce9ca; border-color: #b6c9b0; color: #182e29; }
.tl-mbox .tl-primary:hover:not(:disabled) { background: #f1f7dc; }
.tl-mbox .tl-secondary { color: #e9e3cc; border-color: #7c9684; }
.tl-mbox .tl-secondary:hover { background: #2c4644; }
:is(.overlay, .tales-site) .tales-book .tl-mtext { margin: 0; color: #d9d2bc; font: 16px/1.55 Georgia, serif; }
/* Rewrite's three ways: a quiet list of choices, each with its one line */
.tl-rwmodes { display: grid; gap: 6px; margin: 12px 0 0; padding: 0; border: 0; min-width: 0; }
.tl-rwmode { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border: 1px solid #7c968455; border-radius: 8px; cursor: pointer; }
.tl-rwmode:hover { border-color: #7c9684; background: #ffffff08; }
.tl-rwmode:has(input:checked) { border-color: #aee6d1aa; background: #2c4644; }
.tl-rwmode input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: #aee6d1; }
.tl-rwmode input:focus-visible { outline: 2px solid #aee6d1; outline-offset: 2px; }
.tl-rwmode span { display: grid; gap: 2px; min-width: 0; }
.tl-rwmode b { color: #faf0d6; font: 500 16px/1.3 Georgia, serif; }
.tl-rwmode small { color: #a9b9ae; font: 13px/1.45 system-ui, sans-serif; }
/* what the note sounds like: a gentle line under it, offering the other way */
:is(.overlay, .tales-site) .tales-book .tl-suggest { margin: 8px 0 0; color: #e4d2a2; font: italic 15px/1.5 Georgia, serif; }
:is(.overlay, .tales-site) .tales-book .tl-suggest:empty { display: none; }
.tl-sgbtn {
  margin-left: 4px; padding: 3px 10px; min-height: 32px; border: 1px solid #e4d2a288; border-radius: 999px; background: #e4d2a21a;
  color: #faf0d6; font: 14px Georgia, serif !important; font-style: normal; cursor: pointer;
}
.tl-sgbtn:hover { background: #e4d2a233; }
.tl-sgbtn:focus-visible { outline: 2px solid #aee6d1; outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { .tl-suggest:not(:empty) { animation: tl-sgin .25s ease-out; } }
@keyframes tl-sgin { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } }
.tl-hlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tl-hitem {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; width: 100%; padding: 9px 12px; text-align: left;
  border: 1px solid transparent; border-radius: 8px; background: #ffffff08; color: #f3ead2; cursor: pointer;
}
.tl-hitem:hover { background: #ffffff12; }
.tl-hitem[aria-pressed="true"] { border-color: #bdcc9b; background: #bdcc9b1f; }
.tl-hwhat { font: 15px/1.4 Georgia, serif; min-width: 0; overflow-wrap: anywhere; }
.tl-hwhen { color: #9fb0a5; font: 12.5px/1.6 system-ui, sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-hprev { max-height: min(38vh, 320px); overflow-y: auto; margin-top: 12px; padding: 12px 14px; border-radius: 8px; background: #142427; scrollbar-width: thin; }
.tl-hprev p { margin: 0 0 .8em; color: #e9e1c8; font: 15px/1.6 Georgia, serif; opacity: 1; }
.tl-hprev .tl-htitle { color: #faf0d6; font-size: 17px; }
.tl-hprev .tl-break { text-align: center; color: #bdcc9b; letter-spacing: .6em; }
.tl-hprev:focus-visible { outline: 2px solid #aee6d1; }
:is(.overlay, .tales-site) .tales-reader .tl-stale { margin-top: 6px; }
/* a short word that something happened */
.tl-toast {
  position: fixed; left: 50%; top: calc(68px + var(--sat, 0px)); z-index: 1000; transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 9px 18px; border-radius: 999px; background: #182e29; color: #fff4dd;
  font: 14px/1.4 system-ui, sans-serif; box-shadow: 0 8px 26px #0006; pointer-events: none; animation: tl-toast 2.6s ease both;
}
@keyframes tl-toast { 0% { opacity: 0; transform: translate(-50%, -8px); } 8%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tl-toast { animation: none; } }
/* a card's ✎ (your own tales), and the name box it opens */
.tl-crn {
  position: absolute; top: 8px; right: 8px; z-index: 2; display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 50%; background: #fbf7ecd9; color: #5b675f; font: 15px/1 Georgia, serif !important; cursor: pointer;
  opacity: .8; box-shadow: 0 1px 4px #0002;
}
.tl-crn:hover, .tl-crn:focus-visible { opacity: 1; color: #2f4039; }
.tl-crename { position: absolute; left: 8px; right: 8px; top: 8px; z-index: 3; }
.tl-crename .tl-rninput { background: #fffdf6; color: #2f4039; border-color: #a3a58f; font: 600 16px/1.3 Georgia, serif; padding: 8px 10px; }
.tl-crename .tl-rninput:focus { outline-color: #c99a3e; }
.tl-card.renaming .tl-crn { visibility: hidden; }

/* your own tales: a row for each serial, its parts in order, scrolled sideways */
.tl-srow { margin: 0 0 26px; min-width: 0; }
.tl-srhead { position: relative; display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; min-width: 0; }
:is(.overlay, .tales-site) .tales-book .tl-srtitle { margin: 0; min-width: 0; color: #33453f; font: 600 19px/1.3 Georgia, serif; overflow-wrap: anywhere; }
:is(.overlay, .tales-site) .tales-book .tl-soloh { margin: 4px 0 12px; }
.tl-srcount { flex: none; color: #8a8670; font: 12px/1.4 system-ui, sans-serif; }
.tl-srhead .tl-crn { position: static; flex: none; width: 30px; height: 30px; align-self: center; box-shadow: none; background: transparent; }
.tl-srhead .tl-crn:hover, .tl-srhead .tl-crn:focus-visible { background: #e9e1cb; }
.tl-srhead.renaming .tl-crn { visibility: hidden; }
.tl-srhead .tl-crename { left: 0; right: 0; top: -6px; }
.tl-srlist {
  list-style: none; margin: -6px; padding: 6px 6px 14px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 224px); gap: 20px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding: 0 6px; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: #c2b68f transparent;
}
.tl-srpart { min-width: 0; scroll-snap-align: start; display: flex; }
.tl-srpart > .tl-card { flex: 1; }
.tl-cpart { color: #8b7a4c; font: 600 10.5px/1.4 system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.tl-srcont {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 160px; padding: 16px;
  border: 1px dashed #b9ae8b; border-radius: 8px; background: #f7f2e4; color: #3f6559; cursor: pointer; text-align: center;
  transition: background .15s, border-color .15s;
}
.tl-srcont:hover { background: #fbf7ec; border-color: #8f9a76; }
.tales-book .tl-srcont:focus-visible { outline: 3px solid #c99a3e; outline-offset: 3px; }
.tl-srplus { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #3f6559; color: #fff4dd; font: 24px/1 Georgia, serif; }
.tl-srword { font: 600 16px/1.3 Georgia, serif; }
.tl-srcont small { color: #7f846c; font: 12px/1.4 system-ui, sans-serif; }
.tl-moremine { margin: 18px 0 0; text-align: center; }
.tl-moremine small { color: #7f846c; font-size: 13px; }

/* phones: the shared overlay rules (style.css) make the box a bottom sheet */
@media (max-width: 640px) {
  .tales-overlay { padding: calc(8px + var(--sat)) calc(8px + var(--sar)) 0 calc(8px + var(--sal)); }
  .overlay .obox.tales-book, .overlay .obox.wide.tales-book {
    width: 100%; height: 100%; max-height: none; padding: 14px 16px calc(18px + var(--sab));
    border-radius: 14px 14px 0 0; margin: 0;
  }
  :is(.overlay, .tales-site) .tales-book :is(h1, h2) { font-size: 27px; }
  :is(.overlay, .tales-site) .tales-book .tl-lede { font-size: 15px; }
  /* the shelf becomes a compact list: a square cover, then the words */
  .tl-lhead { margin-bottom: 16px; }
  .tl-hact { grid-row: 1; }
  :is(.overlay, .tales-site) .tales-book .tl-lhead .tl-lede { grid-column: 1 / -1; }
  :is(.overlay, .tales-site) .tales-book .tl-lhead :is(h1, h2) { font-size: 30px; }
  .tales-book .tl-write { min-height: 40px; padding: 8px 15px; font-size: 14px !important; }
  .tl-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 16px; padding: 2px 16px; scrollbar-width: none; }
  .tl-chips::-webkit-scrollbar { display: none; }
  .tl-chip { flex: none; min-height: 36px; padding: 6px 13px; font-size: 13.5px !important; }
  .tl-grid { grid-template-columns: 1fr; gap: 10px; }
  .tl-srlist { grid-auto-columns: min(320px, calc(100vw - 72px)); gap: 10px; margin: -6px -16px; padding: 6px 16px 12px; scroll-padding: 0 16px; }
  .tl-srhead { flex-wrap: wrap; row-gap: 0; }
  :is(.overlay, .tales-site) .tales-book .tl-srtitle:not(.tl-soloh) { flex: 1 1 100%; font-size: 18px; }
  .tl-srcont { flex-direction: row; min-height: 0; padding: 12px; }
  .tl-srcont small { display: none; }
  .tl-srplus { width: 32px; height: 32px; font-size: 20px; }
  .tl-srow { margin-bottom: 20px; }
  .tl-open { flex-direction: row; align-items: flex-start; padding: 8px; border-radius: 10px; }
  .tl-open .tl-cover { width: 76px; height: 76px; aspect-ratio: 1; border: 0; border-radius: 6px; }
  .tl-cbody { gap: 3px; padding: 1px 4px 0 12px; min-width: 0; align-self: stretch; }
  .tl-ctitle { font-size: 16px; -webkit-line-clamp: 2; }
  .tl-cline { font-size: 13.5px; line-height: 1.42; -webkit-line-clamp: 2; }
  .tl-cmeta { padding-top: 3px; }
  .tl-readmark { top: 12px; right: auto; left: 12px; width: 18px; height: 18px; font-size: 10px; }
  .tl-cpwrap { top: 8px; left: 8px; right: auto; width: 76px; height: 76px; aspect-ratio: auto; }
  .tl-cplay { right: 5px; bottom: 5px; width: 30px; height: 30px; }
  .tl-cplay::before { content: ''; position: absolute; inset: -7px; border-radius: 50%; }
  .tl-cplay .tl-picon { margin-left: 2px; border-left-width: 9px; border-top-width: 5.5px; border-bottom-width: 5.5px; }
  .tl-resume { gap: 12px; padding: 8px 12px 8px 8px; margin-bottom: 16px; }
  .tl-resume .tl-cover { width: 64px; aspect-ratio: 1; }
  .tl-tops { gap: 10px; margin-bottom: 16px; }
  .tl-tonight .tl-tcard.with-play { padding-right: 58px; }
  .tl-tonight .tl-cplay { right: 12px; width: 36px; height: 36px; margin-top: -18px; }
  .tl-rcover { width: 150px; margin-bottom: 8px; }
  .tl-rtitle { font-size: 17px; }
  .tl-rbar { flex-basis: 110px; }
  .tl-len span { min-width: 0; }
  .tl-len label { flex: 1; }
  .overlay .obox.tales-book.tales-reader, .overlay .obox.wide.tales-book.tales-reader {
    height: 100%; max-height: none; padding: 10px 0 calc(10px + var(--sab));
    border-radius: 14px 14px 0 0;
  }
  .tl-rtop { padding: 0 16px 2px; }
  .tl-ink { padding: 0 20px; }
  :is(.overlay, .tales-site) .tales-reader h2 { font-size: 25px; }
  .tl-page p, .tl-measure p { font-size: calc(18px * var(--tl-scale, 1)); line-height: 1.65; }
  .tl-nav { padding: 8px 16px 0; }
  .tl-turn { min-width: 0; }
  .tl-turn span { display: none; }
  .tl-listen { gap: 10px; }
  .tl-lword { min-width: 0; }
  .tl-listen.started .tl-lword { display: none; }
  .tales-reader .tl-progress { padding: 24px 20px; }
  .tl-tool { padding: 6px 7px; font-size: 12.5px !important; }
  .tl-rtop:has(.tl-tools) .tl-pageof { display: none; }
  .tl-ebar { padding: 8px 20px 0; }
  .tl-etitle { font-size: 23px; }
  .tl-eblock { font-size: 18px; line-height: 1.65; }
}

/* ------- bedtime comforts (js/tales.js: the moon, Aa, night) ------- */
/* the sleep timer: a quiet moon after the time, lit when a timer is set */
.tl-sleep { position: relative; flex: none; display: inline-flex; align-items: center; gap: 2px; }
.tl-moon {
  display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%;
  background: none; color: #80938d; cursor: pointer; transition: color .2s, background-color .2s;
}
.tl-moon:hover { color: #d0d8ca; background: #263c3b; }
.tl-moon.on { color: #e4d2a2; }
.tl-moon.fading { opacity: .6; }
.tl-sleft { min-width: 0; color: #9fb0a5; font: 11px/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-sleft:empty { display: none; }
/* a small panel under its button: the moon's menu, Aa's choices */
.tl-pop {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 20; display: flex; flex-direction: column; gap: 2px; min-width: 148px;
  padding: 5px; border: 1px solid #7c968499; border-radius: 12px; background: #13221f; box-shadow: 0 10px 28px #0000004d; text-align: left;
}
.tl-pop[hidden] { display: none; }
.tl-pop button, .tl-pop a {
  display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 12px 6px 10px; border: 0; border-radius: 8px; background: none;
  color: #d0d8ca; font: 13px system-ui, sans-serif !important; font-style: normal !important; text-align: left; cursor: pointer; white-space: nowrap;
}
.tl-pop a { text-decoration: none; }
.tl-pop button:hover, .tl-pop button:focus-visible, .tl-pop a:hover, .tl-pop a:focus-visible { background: #263c3b; color: #fff4dd; }
.tl-pop button:focus-visible, .tl-pop a:focus-visible { outline: 2px solid #aee6d1; outline-offset: -2px; }
/* ⋯: Print is the quieter way to keep a tale, under a hairline */
.tl-pop .tl-quiet { margin-top: 3px; border-top: 1px solid #7c968433; border-radius: 0 0 8px 8px; color: #9fb0a5; }
.tl-pop .tl-quiet:first-child { margin-top: 0; border-top: 0; border-radius: 8px; }
.tl-sleepmenu button::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%; }
.tl-sleepmenu button[aria-checked="true"] { color: #e4d2a2; }
.tl-sleepmenu button[aria-checked="true"]::before { background: currentColor; }
/* Aa: text size in three steps, and night */
.tl-comfort { position: relative; flex: none; margin-left: auto; }
.tl-tools + .tl-comfort { margin-left: 0; }
.tl-aa {
  min-width: 36px; min-height: 36px; padding: 4px 8px; border: 0; border-radius: 6px; background: none; color: #a9b9ae;
  font: 15px/1 Georgia, serif !important; cursor: pointer;
}
.tl-aa:hover, .tl-aa[aria-expanded="true"] { color: #fff4dd; background: #263c3b; }
.tl-aapop { min-width: 0; }
.tl-sizes { display: flex; gap: 2px; }
.tl-aapop .tl-size { justify-content: center; min-width: 44px; padding: 6px 8px; font: 15px/1 Georgia, serif !important; }
.tl-aapop .tl-size[data-size="s"] { font-size: 13px !important; }
.tl-aapop .tl-size[data-size="l"] { font-size: 18px !important; }
.tl-aapop .tl-size[aria-pressed="true"] { background: #2c4644; color: #e4d2a2; box-shadow: inset 0 0 0 1px #7c968499; }
.tl-aapop .tl-nightbtn { justify-content: center; }
.tl-aapop .tl-nightbtn[aria-checked="true"] { color: #e4d2a2; background: #2c4644; box-shadow: inset 0 0 0 1px #7c968499; }
/* ⋯: download, print, share — one quiet menu beside Aa */
.tl-etc { position: relative; flex: none; }
.tl-etcbtn {
  min-width: 36px; min-height: 36px; padding: 2px 8px 6px; border: 0; border-radius: 6px; background: none; color: #a9b9ae;
  font: 20px/1 Georgia, serif !important; letter-spacing: .04em; cursor: pointer;
}
.tl-etcbtn:hover, .tl-etcbtn[aria-expanded="true"] { color: #fff4dd; background: #263c3b; }
/* Share: the link, read-only, and Stop sharing set apart at the left */
.tl-mbox .tl-shurl {
  width: 100%; padding: 9px 11px; border: 1px solid #7c9684; border-radius: 6px; background: #142427; color: #f3ead2;
  font: 14px/1.4 ui-monospace, Menlo, monospace; user-select: all; -webkit-user-select: all;
}
.tl-mbox .tl-shurl:focus { outline: 2px solid #aee6d1; outline-offset: 1px; }
.tl-mbox .tl-shoff { margin-right: auto; border-color: transparent; color: #c9b9a0; }
.tl-mbox .tl-shoff:hover:not(:disabled) { border-color: #7c9684; }
/* the text sizes: everything set in the reader multiplies --tl-scale */
.tl-size-s { --tl-scale: .88; }
.tl-size-l { --tl-scale: 1.18; }
.tl-page p, .tl-measure p { font-size: calc(19px * var(--tl-scale, 1)); }
/* night, on the reader's ink: darker, warmer, softer amber type */
.overlay.tl-night .obox.tales-book.tales-reader, .tales-site.tl-night .tl-sheet.tales-reader {
  background: #15110c; color: #c9ab7c; border-color: #4f4130; border-top-color: #7a6140;
}
.tl-night .tales-reader .tl-page p { color: #c2a678; }
.tl-night .tales-reader .tl-page strong { color: #d2b483; }
.tl-night .tales-reader .tl-page .tl-break, .tl-night .tales-reader .tl-fin { color: #8a7150; }
:is(.overlay, .tales-site).tl-night .tales-reader h2 { color: #d6b582; }
:is(.overlay, .tales-site).tl-night .tales-reader .tl-rhead.slim h2 { color: #b99a6b; }
.tl-night .tales-reader .tl-rmeta, .tl-night .tales-reader .tl-eyebrow, .tl-night .tales-reader .tl-cstep, .tl-night .tales-reader .tl-ssum, .tl-night .tales-reader .tl-nudgex { color: #9b8564; }
.tl-night .tales-reader .tl-rhead, .tl-night .tales-reader .tl-end { border-color: #4f413066; }
.tl-night .tales-reader .tl-back, .tl-night .tales-reader .tl-tool, .tl-night .tales-reader .tl-aa, .tl-night .tales-reader .tl-etcbtn, .tl-night .tales-reader .tl-pageof { color: #9b8564; }
.tl-night .tales-reader .tl-turn { background: #211a12; border-color: #4f4130; color: #c9ab7c; }
.tl-night .tales-reader .tl-turn:hover:not(:disabled) { background: #2c2318; }
.tl-night .tales-reader .tl-dots i { background: #4f4130; }
.tl-night .tales-reader .tl-dots i.on { background: #b99a6b; }
.tl-night .tales-reader .tl-play { background: #8f7550; border-color: #8f7550; color: #15110c; }
.tl-night .tales-reader .tl-lword, .tl-night .tales-reader .tl-ltime, .tl-night .tales-reader .tl-sleft { color: #9b8564; }
.tl-night .tales-reader .tl-moon { color: #7a6a52; }
.tl-night .tales-reader .tl-moon.on { color: #c9ab7c; }
.tl-night .tales-reader .tl-seek::-webkit-slider-runnable-track { background: linear-gradient(to right, #9b8564 var(--p), #4f413088 var(--p)); }
.tl-night .tales-reader .tl-seek::-webkit-slider-thumb { background: #c9ab7c; box-shadow: 0 0 0 3px #15110c; }
.tl-night .tales-reader .tl-seek::-moz-range-progress { background: #9b8564; }
.tl-night .tl-pop { background: #1d1711; border-color: #4f4130; }
.tl-night .tl-pop button, .tl-night .tl-pop a { color: #c2a678; }
.tl-night .tl-pop .tl-quiet { color: #97815e; border-color: #4f413066; }
.tl-night .tl-pop button:hover, .tl-night .tl-pop button:focus-visible, .tl-night .tl-pop a:hover, .tl-night .tl-pop a:focus-visible,
.tl-night .tl-aapop [aria-pressed="true"], .tl-night .tl-aapop [aria-checked="true"] { background: #2c2318; color: #d6b582; }
.tl-night .tl-moon:hover, .tl-night .tl-aa:hover, .tl-night .tl-aa[aria-expanded="true"], .tl-night .tl-tool:hover:not(:disabled),
.tl-night .tl-etcbtn:hover, .tl-night .tl-etcbtn[aria-expanded="true"] { background: #2c2318; color: #d6b582; }
.tales-reader, .tales-reader .tl-page p { transition: background-color .4s, color .4s, border-color .4s; }
@media (prefers-reduced-motion: reduce) {
  .tl-moon, .tales-reader, .tales-reader .tl-page p { transition: none; }
}

/* Make it personal: a closed disclosure under Read it aloud, three short fields */
.tl-personal { margin-top: 12px; max-width: 640px; }
.tl-personal summary { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; cursor: pointer; color: #536352; font: 15px Georgia, serif; list-style: none; }
.tl-personal summary::-webkit-details-marker { display: none; }
.tl-personal summary::before { content: '›'; display: inline-block; width: 10px; color: #8a8c78; transition: transform .15s; }
.tl-personal[open] summary::before { transform: rotate(90deg); }
.tl-pwho { color: #85866f; font: 13px system-ui, sans-serif; }
.tl-pfields { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 12px; padding: 4px 0 2px 16px; }
.tl-pfield span { display: block; margin-bottom: 4px; color: #6b7467; font: 12px system-ui, sans-serif; }
.tl-pfield input {
  width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1px solid #a3a58f; border-radius: 3px;
  background: #fffdf6; color: #2f4039; font: 16px/1.4 Georgia, serif; user-select: text; -webkit-user-select: text;
}
.tl-pfield input:focus-visible { outline: 3px solid #c99a3e; outline-offset: 2px; }
:is(.overlay, .tales-site) .tales-book .tl-pnote { grid-column: 1 / -1; margin: 0; color: #8a8c78; font: 12px system-ui, sans-serif; }
@media (prefers-reduced-motion: reduce) { .tl-personal summary::before { transition: none; } }
/* who writes a tale (js/tales.js AI_NOTE), under the form's button and in the first-send dialog */
:is(.overlay, .tales-site) .tales-book .tl-ainote { margin: 14px 0 0; color: #6b7467; font: 12px/1.5 system-ui, sans-serif; }
:is(.overlay, .tales-site) .tales-book .tl-ainote a { color: #8a5a1f; }
:is(.overlay, .tales-site) .tales-book .tl-mtext a { color: inherit; text-decoration: underline; }
/* reporting a shelf tale from the reader (js/tales.js openReport) */
.tl-rpreasons { display: grid; gap: 2px; margin: 10px 0; }
.tl-mform #tl-rpnote { width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 3px; font: 15px/1.4 Georgia, serif; }

/* moderation: a quiet line on the owner's card, and the share dialog's note */
.tl-cmod { display: block; margin-top: 4px; color: #96613b; font: italic 12.5px/1.4 Georgia, serif; }
:is(.overlay, .tales-site) .tales-book .tl-shmod { margin: 4px 0 8px; color: #e4c79a; }
:is(.overlay, .tales-site) .tales-book .tl-shpers { color: #c9b9a0; }
.tl-mbox .tl-primary .tl-spin.small { vertical-align: -2px; margin-right: 4px; border-color: #3f655955; border-top-color: #3f6559; }

/* bedtime (Tales.bedtime): one story at the loft's bed, the room going dark */
.tl-bed {
  position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; overflow: hidden;
  padding: calc(16px + var(--sat, 0px)) calc(16px + var(--sar, 0px)) calc(16px + var(--sab, 0px)) calc(16px + var(--sal, 0px));
  background: #0c1419; color: #e9dfc4; opacity: 1;
  transition: background-color 60s linear, opacity 1.2s ease;
  animation: tl-bedin 1.2s ease;
}
@keyframes tl-bedin { from { opacity: 0; } }
.tl-bed [hidden] { display: none !important; }
.tl-bedbox {
  display: flex; flex-direction: column; width: min(680px, 100%); height: 100%; max-height: 100%; min-height: 0;
  filter: none; transition: filter 60s linear, opacity 60s linear;
}
.tl-bedtop { flex: none; display: flex; justify-content: flex-start; padding: 0 0 12px; }
.tl-bedx, .tl-bedback {
  min-height: 48px; padding: 10px 20px; border: 1px solid #ffffff33; border-radius: 999px; background: #ffffff0a;
  color: #d6dccf; font: 500 15px system-ui, sans-serif; cursor: pointer;
}
.tl-bedx span { margin-right: 4px; }
.tl-bedx:hover, .tl-bedback:hover { color: #f3ead2; border-color: #ffffff55; background: #ffffff14; }
.tl-bedx:focus-visible, .tl-bedback:focus-visible, .tl-bedplay:focus-visible, .tl-bedend:focus-visible, .tl-bedgo:focus-visible, .tl-bedalt:focus-visible { outline: 3px solid #c99a3e; outline-offset: 3px; }
.tl-bedink { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 8px 4px 24px; scrollbar-width: thin; }
.tl-bed p { margin: 0; }
/* the bedside card: the cover, Tonight, the title, what it is */
.tl-bedcover { width: min(100%, 520px, max(240px, calc((100dvh - 460px) * 1.6))); margin: 0 auto 20px; }
.tl-bedcover .tl-cover { border-radius: 12px; box-shadow: 0 10px 34px #0008; }
.tl-bed-on .tl-bedcover { width: min(100%, 340px); margin: 0 0 16px; }
.tl-bedeye { color: #9fb9ad; font: 600 11px/1.5 system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase; }
.tl-bed .tl-bedtitle { margin: 6px 0 10px; color: #f3e6c4; font: 500 30px/1.2 Georgia, serif; }
.tl-bed .tl-bedtitle:focus { outline: none; }
.tl-bed .tl-bedline { margin: 0 0 8px; color: #cfc6ab; font: 17px/1.55 Georgia, serif; }
.tl-bed .tl-bedmeta { margin: 0 0 22px; color: #8f9c92; font: 13px/1.5 system-ui, sans-serif; }
.tl-bed .tl-bedmeta .tl-hasaudio { margin-left: 8px; color: #c9b98f; }
.tl-bed-on .tl-bedline, .tl-bed-on .tl-bedmeta { display: none; }
.tl-bed-on .tl-bedtitle { margin-bottom: 18px; }
.tl-bed .tl-bed-empty { margin: 0 0 22px; color: #8f9c92; font: italic 16px/1.6 Georgia, serif; }
.tl-bedacts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 8px; }
.tl-bedgo {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; min-width: 170px; padding: 12px 30px;
  border: 0; border-radius: 999px; background: #e3cf98; color: #1a2420; font: 600 18px Georgia, serif; cursor: pointer;
  box-shadow: 0 4px 18px #0006;
}
.tl-bedgo:hover { background: #efdcaa; }
.tl-bedgo .tl-picon { margin-left: 0; border-left-width: 11px; border-top-width: 6.5px; border-bottom-width: 6.5px; }
.tl-bedmore { display: flex; flex-wrap: wrap; gap: 10px; }
.tl-bedalt {
  min-height: 44px; padding: 9px 18px; border: 1px solid #c9b98f66; border-radius: 999px; background: none;
  color: #e9dfc4; font: 15px system-ui, sans-serif; cursor: pointer;
}
.tl-bedalt:hover { border-color: #c9b98faa; background: #ffffff0d; }
.tl-bedlisten { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; }
.tl-bedplay {
  display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 1px solid #c9b98f88; border-radius: 50%;
  background: none; color: #e9dfc4; cursor: pointer;
}
.tl-bedlisten.playing .tl-picon { width: 12px; height: 14px; margin: 0; box-sizing: border-box; border: 0; border-left: 4px solid currentColor; border-right: 4px solid currentColor; }
.tl-bedclock { color: #8f9c92; font: 13px system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.tl-bedtext p { margin: 0 0 .9em; color: #dcd2b6; font: 19px/1.7 Georgia, serif; }
.tl-bedtext .tl-break { text-align: center; color: #8a7d5a; letter-spacing: .6em; }
.tl-bed .tl-bedwait { color: #8f9c92; font: italic 16px/1.6 Georgia, serif; }
.tl-bedfin { margin-top: 10px !important; text-align: center; }
.tl-bedend {
  min-height: 44px; padding: 9px 24px; border: 1px solid #c9b98f88; border-radius: 999px; background: none;
  color: #e9dfc4; font: 16px Georgia, serif; cursor: pointer;
}
/* the way back, always at the foot */
.tl-bedfoot { flex: none; padding: 12px 0 0; border-top: 1px solid #ffffff14; }
.tl-bedback { display: block; width: 100%; }
/* the light goes down over a minute: softer, never unreadable */
.tl-bed.tl-bed-dim { background-color: #05080a; }
.tl-bed.tl-bed-dim .tl-bedbox { filter: brightness(.62) saturate(.8); opacity: .82; }
.tl-bed.tl-bed-out { opacity: 0; }
.tl-bed.tl-bed-still, .tl-bed.tl-bed-still .tl-bedbox { transition: none; animation: none; }
@media (prefers-reduced-motion: reduce) { .tl-bed, .tl-bedbox { transition: none; animation: none; } }
@media (max-width: 560px) {
  .tl-bed .tl-bedtitle { font-size: 25px; } .tl-bedtext p { font-size: 17.5px; } .tl-bed .tl-bedline { font-size: 16px; }
  .tl-bedacts { flex-direction: column; align-items: stretch; }
  .tl-bedgo { width: 100%; }
  .tl-bedmore { flex-direction: column; }
  .tl-bedalt { width: 100%; }
}

/* A phone on its side has about 200px between the reader's top row and its
   page turns: the cover stands beside the title instead of above it, so the
   first page's heading fits there and never runs under Next. */
@media (orientation: landscape) and (max-height: 500px) {
  .tales-overlay { padding-top: calc(8px + var(--sat)); padding-bottom: calc(8px + var(--sab)); }
  .overlay .obox.tales-book.tales-reader { padding: 8px 0 6px; }
  .tl-rtop { padding-bottom: 0; }
  .tl-rhead:not(.slim) { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 18px; align-items: center; padding: 2px 0 8px; margin-bottom: 8px; }
  .tl-rhead:not(.slim) > * { grid-column: 2; }
  .tl-rhead:not(.slim) .tl-rcover { grid-column: 1; grid-row: 1 / span 6; width: 116px; margin: 0; }
  :is(.overlay, .tales-site) .tales-reader .tl-rhead h2 { font-size: 22px; margin-bottom: 2px; }
  .tl-rhead .tl-rmeta { margin-bottom: 0; }
  .tl-rhead .tl-lslot { margin-top: 6px; }
  /* and should a large text size still push the heading down, it passes under
     the page turns rather than over them */
  .tl-nav { position: relative; z-index: 1; padding-top: 6px; background: inherit; }
  .tl-turn { min-height: 40px; }
}
