/* Beat `lp-tales` of the landing page (LP, 2026-11-14, round two 2026-11-15; .scratch/ui_integration/briefs/LP_DESIGN.md
   §5 and §8.6, brief LP2_B3): its OWN styles only (its object, inside templates/dashboard/landing/tales.html). The type,
   the content box, the night band, the strings and the dock are the frame's (static/css/a2/landing.css). Flat, every
   class lp-tales-.

   The object: one page of The Seven Trials, re-lettered live. The page is a 16:9 spread, so it stands under the
   statement, the line and the language words. It sits IN THE BEAT'S COLUMN (the owner, 2026-11-15: "the story
   stretches all the way to the left edge of my screen"): its left edge on the same vertical as the statement and the
   words, its right edge no further than the content box's (where the strings' zone begins), and the whole page fits
   in one view with the words above it: its height is at most the screen less the words and a little air above and
   below (--lp-tales-air), so its width is at most that times 16/9.
   Its lettering stays 11px or more: the comic's smallest fitted lettering is 25.26 page pixels (the Persian and
   English narration), so the whole page needs 1115px (11 × 2560 / 25.26). Where the column is narrower than that
   (below 1437px wide) the page stays 1115px wide and is swiped sideways in a strip the column's width (.lp-tales-vp).
   The balloons' lines are centred, never stretched (review R6); the captions keep the reader's justified lines. The
   live lettering is the reader's own engine and type (static/js/comics_lettering.js, static/css/comics_lettering.css):
   static/js/a2/landing/tales.js lays it on a stage in page pixels scaled to the page (.lp-tales-stage). Before that,
   and with no script, the still boxes (.lp-tales-b) carry their Finglish at one size that fits the smallest. */

.lp-tales-ob{min-height:0}

/* the language words: the reader's (static/css/a2/tale.css .tl-lg): paper words, the one the page is lettered in
   white and underlined; the first word's letters on the statement's vertical */
.lp-tales-lg{display:flex;align-items:center;gap:24px;height:44px;margin:0 0 14px -2px}
.lp .lp-tales-l{height:44px;font-size:17px;color:rgba(244,239,230,.6);background-image:linear-gradient(#F4EFE6,#F4EFE6)}
.lp .lp-tales-l:hover{color:#fff}
.lp .lp-tales-l[aria-pressed="true"]{color:#fff;background-size:100% 2px}
.lp .lp-tales-l[lang="fa"]{font-family:var(--ffa);font-size:18px}
.lp .lp-tales-l:focus-visible{outline:3px solid #F4EFE6;outline-offset:2px;border-radius:4px}

/* the page's window (.lp-tales-sh): as wide as the column, or as the screen's height allows the whole page with the
   words (58px: 44 and 14 under them) and the air, whichever is less, but never under 1115px of page; the hook sits at
   its right-middle, so the pomegranate run ends at the page's (or the strip's) right edge. */
.lp-tales-sh{--lp-tales-air:clamp(20px,3svh,40px);--lp-tales-lgh:58px;position:relative;width:min(100%,max(1115px,calc((100svh - var(--lp-tales-lgh) - 2 * var(--lp-tales-air)) * 16 / 9)))}
.lp-tales-vp{position:relative;overflow:hidden;border-radius:6px}
/* the page: no frame; 1115px or the window's width, whichever is more */
.lp-tales-pg{position:relative;width:max(1115px,100%);aspect-ratio:16 / 9;overflow:hidden;background:#1c1a17;container-type:inline-size;font:400 16px/normal Inter,system-ui,sans-serif;letter-spacing:normal}
.lp-tales-img{position:absolute;left:0;top:0;display:block;width:100%;height:100%;max-width:none;user-select:none;-webkit-user-drag:none}

/* the live lettering: a stage in the page's own pixels (2560 × 1440), scaled to the page; the engine lays each box
   on it (.box, .txt, its floats: comics_lettering.css) */
.lp-tales-stage{position:absolute;left:0;top:0;width:2560px;height:1440px;transform-origin:0 0;transform:scale(var(--lp-tales-k,.4));pointer-events:none}
.lp-tales-layer{position:absolute;left:0;top:0;width:100%;height:100%}
/* a balloon's lines are centred, never justified (the engine's line breaks and sizes are unchanged: alignment moves
   no break) */
.lp-tales-layer .box.speech .txt,.lp-tales-layer .box.shout .txt,.lp-tales-layer .box.whisper .txt,.lp-tales-layer .box.thought .txt{text-align:center}

/* the still boxes: placed by percentages of the page (data-area / 2560 × 1440), the text at one size per language
   that fits the smallest box (in the page's own width: 1cqw = 25.6 page pixels), centred; the live layer takes
   over once it is laid */
.lp-tales-still{position:absolute;left:0;top:0;width:100%;height:100%;content-visibility:auto;contain-intrinsic-size:auto 100%}
.lp-tales-b{position:absolute;display:flex;align-items:center;justify-content:center;text-align:center;color:#15120e}
.lp-tales-b span{display:none;font-weight:600;line-height:1.18}
.lp-tales-fi,.lp-tales-en{font-family:"Open Sans",Inter,system-ui,sans-serif;font-stretch:90%;letter-spacing:.02em;font-size:1cqw}
.lp-tales-en{font-size:.9cqw}
.lp-tales-fa{font-family:Vazirmatn,Tahoma,sans-serif;font-size:.9cqw;line-height:1.5}
.lp-tales-pg[data-lang="fi"] .lp-tales-fi,.lp-tales-pg[data-lang="fa"] .lp-tales-fa,.lp-tales-pg[data-lang="en"] .lp-tales-en{display:block}
.lp-tales-live .lp-tales-still{visibility:hidden}
/* with script the still words are not laid out at all until the live lettering takes over (or fails), so the
   lettering's face is not fetched before the beat is near (review R18) */
.lp-tales-wait .lp-tales-still{display:none}
.lp-tales-b1{left:7.2266%;top:1.6667%;width:6.4062%;height:4.2361%}
.lp-tales-b2{left:75.4297%;top:1.5972%;width:8.3984%;height:5.9722%}
.lp-tales-b3{left:1.6797%;top:71.1111%;width:20.7812%;height:5.2778%}
.lp-tales-b4{left:40.1172%;top:71.5278%;width:10.8594%;height:5.6944%}

/* the hook: the page's right-middle, where the pomegranate run ends */
.lp-tales-hook{left:auto;right:0;top:50%}

/* -- below 1437px (the column under 1115px): the page stays 1115px wide (its smallest lettering 11px) and is swiped
   sideways in a strip the column's width; tales.js rests it where no balloon or caption is cut -------------------- */
@media (max-width:1436px){
  .lp-tales-vp{overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .lp-tales-vp::-webkit-scrollbar{display:none}
}
/* review R7: where the page is wider than the strip (tales.js .lp-tales-can) the strip says it moves. A mouse drags it
   (the grab hand; grabbing while it is held), the arrow keys move it once it has focus (a region named "The comic
   page"), and each edge where more of the page is hidden fades softly into the night band (.lp-tales-more-l/-r). */
.lp-tales-vp.lp-tales-can{cursor:grab}
.lp-tales-vp.lp-tales-drag{cursor:grabbing;user-select:none;-webkit-user-select:none}
.lp-tales-vp.lp-tales-can .lp-tales-img{-webkit-user-drag:none;user-select:none}
.lp-tales-vp.lp-tales-more-r{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 56px),rgba(0,0,0,.18));mask-image:linear-gradient(90deg,#000 calc(100% - 56px),rgba(0,0,0,.18))}
.lp-tales-vp.lp-tales-more-l{-webkit-mask-image:linear-gradient(90deg,rgba(0,0,0,.18),#000 56px);mask-image:linear-gradient(90deg,rgba(0,0,0,.18),#000 56px)}
.lp-tales-vp.lp-tales-more-l.lp-tales-more-r{-webkit-mask-image:linear-gradient(90deg,rgba(0,0,0,.18),#000 56px,#000 calc(100% - 56px),rgba(0,0,0,.18));mask-image:linear-gradient(90deg,rgba(0,0,0,.18),#000 56px,#000 calc(100% - 56px),rgba(0,0,0,.18))}
/* the focus ring on the strip's frame (the mask above would clip a ring drawn by the strip itself) */
.lp .lp-tales-vp:focus-visible{outline:none}
.lp-tales-sh:has(.lp-tales-vp:focus-visible){outline:3px solid #F4EFE6;outline-offset:4px;border-radius:8px}

/* where the strip would end inside the far balloon ("Rostamam; pesar-e Zāl.": its drawn balloon and tail run from
   .732 to .842 of the page, 816 to 939px of 1115) or less than 16px past it (a column of 812 to 954px, 983 to 1230px
   wide), the strip ends at 812px, before that balloon begins, and the pomegranate run is longer; a swipe brings the
   balloon in */
@media (max-width:1230px){
  .lp-tales-sh{max-width:812px}
}

@media (max-width:699px),(orientation:portrait) and (max-width:1199px){
  .lp-tales-lg{gap:18px;margin-bottom:12px}
  .lp-tales-sh{--lp-tales-lgh:56px}
  .lp .lp-tales-l{font-size:16px}
  .lp .lp-tales-l[lang="fa"]{font-size:17px}
}

/* -- a phone held upright: the page turned (owner, 2026-11-17, at 375px: "i think we need to rotate the comic and have
   the user rotate their phone"). The whole page, turned a quarter clockwise in a frame the column's width and 16:9
   tall, its top along the frame's right edge (as the tale reader turns, static/css/a2/tale.css), so the phone is turned
   onto its side to read it; no strip to swipe. --lt-turned tells the lettering engine its meter is turned
   (static/js/comics_lettering.js). The language words stay upright above it; the hook stays at the frame's
   right-middle. ------------------------------------------------------------------------------------------------- */
/* R11-T1 (owner, 2026-11-18, the iPad mini at 744: "here too the comic should be rotated. essentially on any vertical
   screen like the phones the tales should be rotated because they are wide"): every upright touch screen, as the tale
   reader turns (static/css/a2/tale.css), not phones only. */
@media (orientation:portrait) and (pointer:coarse){
  .lp-tales-sh{width:100%;max-width:none;aspect-ratio:9 / 16}
  .lp-tales-vp{--lt-turned:1;position:absolute;left:0;top:0;width:177.7778%;height:56.25%;overflow:hidden;transform-origin:0 0;transform:rotate(90deg) translateY(-100%);-webkit-mask-image:none;mask-image:none}
  .lp-tales-pg{width:100%}
}
/* a tall tablet: the turned frame no taller than the screen leaves under the language words, centred in the column */
@media (orientation:portrait) and (pointer:coarse) and (min-width:700px){
  .lp-tales-sh{width:min(100%,calc((100svh - 220px) * 9 / 16));margin-inline:auto}
}
