/* The homepage's hero (scripts/story.mjs, story.js): one stage that plays the app's story like slides. Everything here is
   prefixed st- or hv- (the site's own class names have collided with the phone's three times); the phones reuse the
   .phone rules of styles.css. */

/* The hero: one tall stage the scroll plays (site-src/home.html, scripts/story.mjs → heroDeck, story.js; docs/i18n.md →
   Website). .hv is as long as its scenes (story.js: --len stage heights) and .hv-stage stays under the header while it
   passes: a field of one colour per scene (.hv[data-scene]), the scene's giant word behind (the cover's is the headline
   itself), its line at the top (the words that are playing underlined), and the subject in front. The subject is the
   app: on the cover and in Read, three phones that fan out of one; after that one phone, tossed aside like a card and
   coming in again between scenes, in the middle, or at the right of what is beside it (what is said out loud, a browser window, the desktop
   app). The cat from the logo looks over the phone. story.js sizes it: --S the stage's height, --k Read's phones'
   scale, --gap between them, --fw and --fh the film's box, and each phone's place (--fx, --fy, --ry, --fo). */
.hero { padding: 0; }
.st-brand { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; font-family: var(--sans); font-size: 30px; font-weight: 700; letter-spacing: -0.02em; color: var(--fg, var(--ink)); }
.st-brand img { width: 56px; height: 56px; border-radius: 15px; box-shadow: 0 6px 18px rgba(28, 27, 26, .14); outline: 1px solid var(--logo-edge); outline-offset: -1px; }
.hv {
  --paper: var(--bg); --word: var(--surface-alt); --fg: var(--ink); --fg-2: var(--ink-2); --line: var(--accent); --ease: cubic-bezier(.2, .8, .2, 1);
  --S: 720px; --top: 64px; --k: .5; --gap: 22px; --floor: 24px; --fw: 520px; --fh: 540px;
  position: relative; background: var(--paper); transition: background-color .7s ease;
}
/* as long as its beats (story.js: --len + 1 of them, --U of scroll each, the last holding the stage). The hero has the
   stage's colour too: on a touch screen the stage is the small viewport's height, and the strip under it when the
   browser's bars are away is the same field. */
.hv.hv-live { height: calc(var(--len) * var(--U, var(--S)) + var(--S)); }
/* where the scroll stops on a touch screen (story.js puts one at each beat and one at the hero's end, and sets
   html.hv-snap while the page is in the hero): one swipe, one beat, however hard it is flung */
.hv-snaps i { position: absolute; left: 0; width: 100%; height: 1px; pointer-events: none; scroll-snap-align: start; scroll-snap-stop: always; scroll-margin-top: var(--top); }
html.hv-snap { scroll-snap-type: y mandatory; }
.hv-stage {
  position: relative; height: var(--S); overflow: hidden; overflow: clip; isolation: isolate;
  background: var(--paper); color: var(--fg); transition: background-color .7s ease, color .5s ease;
}
.hv-live .hv-stage { position: sticky; top: var(--top); }
/* a colour for each scene: the field, the giant word a tone off it, the ink and the underline */
.hv[data-scene="read"] { --paper: #F4E6CE; --word: #EAD5B2; --fg: #1C1B1A; --fg-2: #6B6760; --line: #D9643A; }
.hv[data-scene="listen"] { --paper: #2A2140; --word: #3B2F58; --fg: #F6F1E8; --fg-2: #BDB3CF; --line: #F2A07E; }
.hv[data-scene="translate"] { --paper: #DCE6D0; --word: #C8D7B9; --fg: #1C1B1A; --fg-2: #5F6658; --line: #D9643A; }
.hv[data-scene="voice"] { --paper: #D9643A; --word: #C85630; --fg: #FFF8F0; --fg-2: #FBD9C8; --line: #FFE9A8; }
.hv[data-scene="clip"] { --paper: #D3E1EC; --word: #BDD0DF; --fg: #1C1B1A; --fg-2: #5C6770; --line: #D9643A; }
.hv[data-scene="library"] { --paper: #F2E2C9; --word: #E6CFAB; --fg: #1C1B1A; --fg-2: #6B6760; --line: #D9643A; }
.hv[data-scene="finish"] { --paper: #F5D98F; --word: #EAC76E; --fg: #1C1B1A; --fg-2: #6B5F3F; --line: #C2512B; }
.hv[data-scene="everywhere"] { --paper: #1C1B1A; --word: #2C2A27; --fg: #F6F1E8; --fg-2: #A9A39A; --line: #F07A4F; }
/* the giant words: one per scene behind the subject, as large as the stage allows (--big), drifting as the scene passes
   (--wx). A long word spans the stage behind the phone; a short one (one or two characters) stands to one side of it,
   the sides taking turns (--wl) */
.hv-words { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hv-big {
  position: absolute; left: var(--wl, 50%); top: 57%; margin: 0; transform: translate(-50%, -50%) translateX(var(--wx, 0px));
  font-family: var(--serif); font-weight: 700; font-size: var(--big, 300px); line-height: 1; letter-spacing: -.03em; white-space: nowrap;
  color: var(--word); opacity: 0; transition: opacity .5s ease, color .7s ease;
}
.hv-big.on { opacity: 1; }
/* the words at the top, one on another: the cover's (the app's name, the headline, one line, the way to the apps), then each scene's line */
.hv-caps { position: absolute; z-index: 4; left: 0; right: 0; top: 0; display: grid; justify-items: center; align-items: start; padding: clamp(18px, 4.4vh, 44px) 24px 0; text-align: center; pointer-events: none; }
.hv-cap { grid-area: 1 / 1; max-width: 100%; opacity: 0; visibility: hidden; transform: translateY(14px); transition: opacity .3s ease, transform .3s ease, visibility 0s linear .3s; }
.hv-cap.on { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition: opacity .45s ease .1s, transform .6s var(--ease) .1s, visibility 0s; }
.hv-title .st-brand { justify-content: center; margin-bottom: 14px; }
.hv-title h1 { margin: 0 0 18px; font-size: clamp(40px, 7.2vw, 120px); line-height: 1.02; }
.hv-sub { margin: 0 auto 24px; max-width: 34em; font-size: 19px; line-height: 1.5; color: var(--fg-2); }
.hv-line { margin: 0 auto; max-width: 24em; font-family: var(--serif); font-weight: 600; font-size: clamp(22px, 2.5vw, 36px); line-height: 1.3; color: var(--fg); text-wrap: balance; transition: color .5s ease; }
.hv-act {
  padding-bottom: .08em; background: linear-gradient(var(--line), var(--line)) 0 100% / 0% .085em no-repeat;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-size .45s cubic-bezier(.22, 1, .36, 1);
}
.hv-act.on { background-size: 100% .085em; }
/* Read's phones: on the cover one phone (the others behind it), coming out as Read starts; story.js places each one
   (its transform, opacity and z-index). Wide, they stand side by side, not in a line (each at its own
   height and lean), and the one playing straightens and comes forward. On a phone they are a hand of cards: the one
   playing in front at full size, the others leaning out behind it. The cat is on the one in front (.has-cat): it ducks
   behind a phone and comes up on the next. */
.hv-sets { position: absolute; z-index: 2; left: 0; right: 0; bottom: var(--floor); display: grid; justify-items: center; pointer-events: none; }
.hv-set { display: flex; align-items: flex-end; justify-content: center; perspective: 1600px; opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s linear .3s; }
.hv-set.on { opacity: 1; visibility: visible; transition: opacity .3s ease, visibility 0s; }
.phone.hv-phone {
  --k: inherit; /* the scale story.js gives the stage, not .phone's own */
  flex: none; width: calc(390px * var(--k) + 12px); margin: 0 calc(var(--gap) / 2); padding: 6px;
  border-radius: calc(55px * var(--k) + 6px); background: #1C1B1A;
  box-shadow: 0 24px 48px -18px rgba(28, 27, 26, .4), 0 8px 20px rgba(28, 27, 26, .12);
  transform: scale(.955); transform-origin: 50% 100%; will-change: transform;
  transition: transform .45s var(--ease), box-shadow .4s ease;
}
.hv-phone .screen { border-radius: calc(55px * var(--k)); }
.hv-phone.lit { box-shadow: 0 34px 64px -18px rgba(28, 27, 26, .52), 0 10px 24px rgba(28, 27, 26, .16); }
.hv-phone:not(.has-cat) .hv-cat { opacity: 0; transform: translateY(46%) scale(.72) !important; animation: none !important; pointer-events: none; }
.hv-phone .hv-cat { transition: transform .4s var(--ease), opacity .18s ease; }
.hv-phone:not(:nth-child(2)) { opacity: 0; } /* without script, the one phone */
/* the film: the chapters' stage in a box story.js sizes; its phone is placed, turned and scaled by story.js */
.hv-film {
  position: absolute; z-index: 2; left: 50%; bottom: var(--floor); width: var(--fw); height: var(--fh); margin-left: calc(var(--fw) / -2);
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s linear .3s;
}
.hv-film.on { opacity: 1; visibility: visible; transition: opacity .3s ease, visibility 0s; }
.hv .st-scenes { visibility: hidden; box-shadow: none; background: none; }
.hv .phone.st-phone { transform-origin: 50% 100%; }
/* the cat (scripts/story.mjs → CAT, played by story.js): its chin and paws on the phone's top edge. Its eyes follow the
   pointer, or what the phone is showing (--ex, --ey); it blinks, an ear twitches, and a paw pats when something is
   tapped. Its states: .is-happy (glad eyes, blush: a tap on it, something done on the screen), .is-listen (headphones,
   eyes shut, nodding), .is-talk (its mouth moving: it asks out loud), .is-curious (head to one side: a question),
   .is-wow (wide eyes, mouth open: an answer, a fast scroll), .is-sleepy (nobody has moved for a while). .says shows the bubble; .hop is its jump when it is tapped. */
.phone .hv-cat {
  position: absolute; z-index: 3; left: 18%; bottom: 100%; width: 64%; height: auto; margin-bottom: -5.6%; overflow: visible;
  transform-origin: 50% 100%; pointer-events: auto; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform .4s var(--ease);
}
.hv[data-scene="everywhere"] .hv-cat { filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, .8)); } /* a black cat on the black field: a light edge */
.cat-eye { transform: translate(var(--ex, 0px), var(--ey, 2px)); transition: transform .14s ease-out; } /* --ex, --ey: on the cat, from story.js */
.cat-open { transform-box: fill-box; transform-origin: center; animation: cat-blink 5.2s infinite; transition: opacity .12s ease; }
@keyframes cat-blink { 0%, 93%, 100% { transform: none; } 96% { transform: scaleY(.08); } }
.cat-ear { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .3s var(--ease); }
.cat-ear-r { animation: cat-ear 7s ease-in-out infinite; }
@keyframes cat-ear { 0%, 86%, 100% { transform: none; } 90% { transform: rotate(10deg); } 94% { transform: rotate(-3deg); } }
.hv-cat:hover .cat-ear-l { transform: rotate(-7deg); }
.hv-cat:hover .cat-ear-r { animation: none; transform: rotate(7deg); }
.cat-glad, .cat-shut, .cat-blush, .cat-gasp { opacity: 0; transition: opacity .15s ease; }
.cat-smile { transition: opacity .15s ease; }
.cat-paw { transform-box: fill-box; transform-origin: 50% 0%; }
.cat-paw.pat { animation: cat-pat .34s ease-out; }
@keyframes cat-pat { 35% { transform: translateY(9px) scaleY(.82); } }
.cat-say { opacity: 0; transform: translateY(8px) scale(.6); transform-box: fill-box; transform-origin: 0% 100%; transition: opacity .2s ease, transform .35s var(--ease); }
.hv-cat.says .cat-say { opacity: 1; transform: none; }
.cat-hp { opacity: 0; transform: translateY(-16px); transition: opacity .3s ease, transform .5s var(--ease); }
.hv:is([data-scene="listen"], [data-scene="voice"]) .st-phone .cat-hp { opacity: 1; transform: none; }
/* on the terracotta field the headphones are dark, to be seen */
.hv[data-scene="voice"] .cat-hp path { stroke: #2A2140; }
.hv[data-scene="voice"] .cat-hp rect { fill: #2A2140; stroke: #FFF8F0; }
/* asking out loud: two presses on the headphones (the ear cup dips twice, a ring each time, ×2 beside it), then it speaks */
.cat-ring { transform-box: fill-box; transform-origin: center; opacity: 0; }
.cat-x2 { transform-box: fill-box; transform-origin: 0% 50%; opacity: 0; transform: scale(.5); transition: opacity .2s ease, transform .35s var(--ease); }
.cat-hp rect { transform-box: fill-box; transform-origin: center; }
.pressing .cat-ring { animation: cat-ring .5s ease-out 2; }
.pressing .cat-hp rect:last-of-type { animation: cat-press .5s ease-in-out 2; }
.pressing .cat-x2 { opacity: 1; transform: none; }
@keyframes cat-ring { 0% { transform: scale(.7); opacity: .95; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes cat-press { 30% { transform: scale(.84); } }
.is-talk .cat-smile { opacity: 0; }
.is-talk .cat-gasp { opacity: 1; transform-box: fill-box; transform-origin: 50% 0%; animation: cat-talk .26s ease-in-out infinite alternate; }
@keyframes cat-talk { from { transform: scaleY(.35); } to { transform: none; } }
/* the talk is at the cat's ear: its question beside its head, the tail towards it, and the answer it hears under that; the
   headphones are on the cat, so the stage's own earbud is not shown */
.hv .st-bud { display: none; }
@media (min-width: 901px) {
  .hv .st-say-you { left: auto; right: 36%; top: -2%; max-width: 52%; border-bottom-left-radius: 20px; border-bottom-right-radius: 6px; }
  .hv .st-say-app { left: auto; right: 36%; bottom: auto; top: calc(-2% + 58px); max-width: 60%; border-bottom-left-radius: 20px; border-top-right-radius: 6px; }
}
.is-happy .cat-open, .is-listen .cat-open, .is-sleepy .cat-open { opacity: 0; }
.is-happy .cat-glad, .is-listen .cat-glad, .is-sleepy .cat-shut, .is-happy .cat-blush, .is-wow .cat-gasp { opacity: 1; }
.is-wow .cat-smile { opacity: 0; }
.is-wow .cat-open { animation: none; transform: scale(1.16); }
.is-wow .cat-ear-l { transform: rotate(-9deg); } .is-wow .cat-ear-r { animation: none; transform: rotate(9deg); }
.hv-cat.is-curious { transform: rotate(-8deg) translateY(-1%); }
.hv-cat.is-listen { animation: cat-nod .52s ease-in-out infinite alternate; }
@keyframes cat-nod { from { transform: rotate(-2.4deg); } to { transform: rotate(2.4deg) translateY(1.5%); } }
.hv-cat.is-sleepy { animation: cat-doze 3.4s ease-in-out infinite; }
@keyframes cat-doze { 50% { transform: scaleY(.965) translateY(.6%); } }
.is-sleepy .cat-ear-r { animation: none; }
.hv-cat.hop { animation: cat-hop .5s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes cat-hop { 30% { transform: translateY(-9%) scale(1.04, .97); } 62% { transform: translateY(0) scale(.97, 1.04); } }
/* the cover says there is more below */
.hv-hint { position: absolute; z-index: 4; right: 22px; bottom: 18px; width: 30px; height: 30px; color: var(--fg-2); animation: hv-hint 1.7s ease-in-out infinite; transition: opacity .3s ease; }
.hv:not([data-scene="title"]) .hv-hint, .hv:not(.hv-live) .hv-hint { opacity: 0; }
@keyframes hv-hint { 0%, 100% { transform: none; } 50% { transform: translateY(7px); } }

.st-stage { position: relative; width: 100%; height: 100%; }

/* the scenes: an illustration per chapter (same reader, same cat), crossfaded as the scenes change, with a small loop of
   its own (steam, the train's sway, the lamp, window light). The illustration is 78 % of the film's width and as tall as
   the film; the phone stands at the film's right edge. */
.st-scenes {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 78%; aspect-ratio: 1200 / 1608; border-radius: 28px; overflow: hidden;
  box-shadow: var(--shadow); background: var(--surface-alt);
}
.st-scene { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.st-scene.on { opacity: 1; }
.st-art { position: absolute; inset: 0; overflow: hidden; }
.st-art img {
  width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; display: block;
}
.st-fx { position: absolute; inset: 0; pointer-events: none; }
.st-scene-voice .st-fx::before, .st-scene-voice .st-fx::after {
  content: ""; position: absolute; left: 49%; top: 33%; width: 60px; height: 90px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .7), transparent); filter: blur(6px);
  animation: st-steam 3.2s ease-out infinite;
}
.st-scene-voice .st-fx::after { left: 55%; animation-delay: 1.6s; }
@keyframes st-steam { 0% { transform: translateY(20px) scale(.6); opacity: 0; } 30% { opacity: .9; } 100% { transform: translateY(-80px) scale(1.4); opacity: 0; } }
.st-scene-listen.on .st-art { animation: st-sway 4.5s ease-in-out infinite; }
@keyframes st-sway { 0%, 100% { transform: translate3d(0, 0, 0) rotate(0); } 50% { transform: translate3d(3px, 1px, 0) rotate(.25deg); } }
.st-scene-library .st-fx::before {
  content: ""; position: absolute; left: 0; top: 4%; width: 46%; height: 46%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 196, 120, .45), transparent); animation: st-lamp 3.6s ease-in-out infinite;
}
@keyframes st-lamp { 50% { opacity: .55; transform: scale(1.08); } }
.st-scene-formats .st-fx::before, .st-scene-clip .st-fx::before, .st-scene-translate.st-phase2 .st-fx::before {
  content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255, 250, 240, .35) 50%, transparent 60%);
  background-size: 250% 100%; animation: st-light 7s ease-in-out infinite;
}
.st-scene-formats .st-art-b, .st-scene-translate .st-art-b, .st-scene-finish .st-art-b { opacity: 0; transition: opacity .65s ease; }
.st-scene-formats.st-phase2 .st-art-b, .st-scene-translate.st-phase2 .st-art-b, .st-scene-finish.st-phase2 .st-art-b { opacity: 1; }
@keyframes st-light { 0%, 100% { background-position: 120% 0; } 50% { background-position: -20% 0; } }

/* the phone on the stage: sized by story.js (--k); its screens are stacked and shown one at a time */
/* in a thin frame, as in the hero; story.js sizes it from the illustration (--k) and puts its foot on the illustration's
   (--st-foot: on a phone it sits inside it, as far from its foot as from its side) */
.phone.st-phone {
  position: absolute; z-index: 2; right: 0; top: auto; bottom: var(--st-foot, 0px); transform: none;
  width: calc(390px * var(--k) + 12px); padding: 6px; border-radius: calc(55px * var(--k) + 6px); background: #1C1B1A;
  box-shadow: 0 30px 60px -18px rgba(28, 27, 26, .45), 0 10px 24px rgba(28, 27, 26, .14);
}
.st-phone .screen { border-radius: calc(55px * var(--k)); }
.st-app .st-scr { position: absolute; inset: 0; background: #FFFFFF; opacity: 0; visibility: hidden; transition: opacity .35s ease, transform .5s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .35s; }
.st-app .st-scr.on { opacity: 1; visibility: visible; transition: opacity .35s ease, transform .5s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
.st-app .page.st-mid { padding-top: 112px; }
.st-runhead { font-family: var(--sans); font-size: 13px; color: #A8A39A; margin: 0 0 18px !important; }
/* a book in a language without a voice: its English translation under each paragraph, which narration reads */
.st-reader1 .status { background: linear-gradient(#FFFFFF 84%, rgba(255, 255, 255, 0)); }
.st-reader1.st-bi .page { font-size: 16px; line-height: 1.5; } /* a smaller text size, so a paragraph and its translation fit */
.st-reader1.st-bi .page p.t { display: block; }
.st-reader1.st-bi .page p.t .s { opacity: 1; }
.st-reader1.st-bi .tools .tr { color: #D9643A; }
.st-plane { display: inline-block; width: 15px; height: 15px; }
.st-plane svg { width: 15px; height: 15px; }
.phone .status.st-dark { color: #fff; background: none; }

/* lock screen with the system's Now Playing (the phone put away) */
.st-lock { background: radial-gradient(120% 70% at 50% 0%, #4B3A5C, #1B1622 70%) !important; color: #fff; }
.st-clock { position: absolute; top: 96px; left: 0; right: 0; text-align: center; font-family: var(--sans); }
.st-clock small { display: block; font-size: 19px; font-weight: 600; opacity: .85; }
.st-clock b { display: block; font-size: 96px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.st-np { position: absolute; left: 14px; right: 14px; top: 330px; padding: 16px 18px 14px; border-radius: 26px; background: rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); font-family: var(--sans); }
.st-np-row { display: flex; align-items: center; gap: 12px; }
.st-np-row > span { flex: 1; display: flex; flex-direction: column; }
.st-np-row b { font-size: 16px; } .st-np-row small { font-size: 14px; opacity: .7; }
.st-np-cover { width: 46px !important; height: 69px !important; border-radius: 6px !important; flex: none; }
.st-np-wave { width: 26px; height: 26px; color: #fff; opacity: .9; }
.st-np-bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .25); margin: 14px 0 12px; overflow: hidden; }
.st-np-bar i { display: block; height: 100%; width: 38%; background: #fff; border-radius: 3px; }
.st-np-ctl { display: flex; justify-content: center; gap: 46px; align-items: center; }
.st-np-ctl i { width: 30px; height: 30px; display: block; }
.st-np-ctl .st-np-pp { width: 34px; height: 34px; }
.st-np-pp .st-play { display: none; }
.st-app.st-paused .st-np-pp .st-pause { display: none; }
.st-app.st-paused .st-np-pp .st-play { display: block; }
.st-app:not(.st-paused) .st-np-wave path { animation: wave .7s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }

/* the translation coming in under each paragraph, one after another */
.st-reader2 p.t .st-tr { opacity: 0; transition: opacity .5s ease; }
.st-reader2 p.t.st-in .st-tr { opacity: 1; }
.st-app.trl .st-reader2 p.t .st-tr, .st-app.tro .st-reader2 p.t:not(.st-in) .st-tr { display: none; }
.st-app.tro .st-reader2 p.t:not(.st-in) .shim {
  height: 54px; margin-bottom: 4px;
  background: linear-gradient(transparent 0 6px, #F2EFEA 6px 21px, transparent 21px 33px, #F2EFEA 33px 48px, transparent 48px) 0 0 / 100% 100%;
  -webkit-mask-image: linear-gradient(90deg, #000 72%, transparent 72.1%); mask-image: linear-gradient(90deg, #000 72%, transparent 72.1%);
}

/* the translated book: its title and the chapter heading are blocks like the others; verse keeps its lines */
.st-reader2 .page p { white-space: pre-line; }
.st-reader2 .page p.st-btitle { font-size: 26px; font-weight: 800; line-height: 1.2; margin-bottom: 6px; }
.st-reader2 .page p.t.st-btitle { font-size: 22px; margin-bottom: 14px; }
.st-reader2 .page p.st-bhead { font-family: var(--sans); font-size: 13px; color: #A8A39A; margin-bottom: 4px; }
.st-reader2 .page p.t.st-bhead { margin-bottom: 16px; }

/* covers: the book's picture, else the one the app generates (title and author on a coloured board) */
.st-cover { position: relative; display: block; border-radius: 8px; overflow: hidden; color: #fff; padding: 10px 10px 8px 14px; box-shadow: 0 6px 14px rgba(0, 0, 0, .14); }
.st-cover::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: rgba(0, 0, 0, .14); }
.st-cover b { display: block; font-family: var(--serif); font-size: 13px; line-height: 1.2; font-weight: 600; }
.st-cover b::before { content: ""; display: block; width: 14px; height: 1px; background: rgba(255, 255, 255, .6); margin-bottom: 6px; }
.st-cover small { position: absolute; left: 14px; bottom: 8px; font-size: 8px; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.st-cover.st-img { padding: 0; background: #ddd; }
.st-cover.st-img::before { display: none; }
.st-cover.st-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-tone-violet { background: linear-gradient(#6A5A7E, #574766); }
.st-tone-slate { background: linear-gradient(#36434C, #29343B); }
.st-tone-sage { background: linear-gradient(#5C6B58, #4A5747); }
.st-tone-rose { background: linear-gradient(#8E5A4E, #7A4A40); }
.st-tone-amber { background: linear-gradient(#9A6B3C, #845A31); }
.st-tone-ink { background: linear-gradient(#3B4255, #2E3444); }

/* library */
.st-library { background: #FAF8F5 !important; font-family: var(--sans); }
.st-lib-head { position: absolute; top: 58px; left: 20px; right: 16px; display: flex; align-items: center; gap: 10px; }
.st-lib-head b { flex: 1; font-size: 34px; font-weight: 700; }
.st-lib-head span { width: 44px; height: 44px; border-radius: 50%; padding: 11px; }
.st-chips { position: absolute; top: 116px; left: 20px; display: flex; gap: 8px; }
.st-chips i { font-style: normal; font-size: 15px; padding: 7px 14px; border-radius: 999px; background: #F2EFEA; }
.st-chips i.on { background: #1C1B1A; color: #fff; }
.st-grid { position: absolute; top: 172px; left: 20px; right: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 14px; }
.st-book { display: block; transition: transform .5s cubic-bezier(.2, .8, .2, 1), opacity .4s ease; }
.st-book .st-cover { aspect-ratio: 2 / 3; }
.st-book > b { display: block; font-size: 14px; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-book > small { display: flex; justify-content: space-between; font-size: 12px; color: #6B6760; white-space: nowrap; overflow: hidden; }
.st-book em { font-style: normal; }
.st-found .st-cover { transition: box-shadow .4s ease, transform .5s cubic-bezier(.2, .8, .2, 1); }
.st-app.st-glow .st-found { transform: translateY(-14px) scale(1.06); }
.st-app.st-glow .st-found .st-cover { box-shadow: 0 0 0 3px #D9643A, 0 16px 34px rgba(217, 100, 58, .45); }
.st-app.st-glow .st-book:not(.st-found) { opacity: .45; }
.st-libsheet .st-q, .st-libsheet .st-a { display: block; }
.st-libsheet .meta { display: flex; }

/* files flying in (formats) */
.st-files { position: absolute; inset: 0; pointer-events: none; }
.st-file {
  position: absolute; left: 50%; top: 50%; font-style: normal; font-family: var(--sans); font-weight: 700; font-size: 15px;
  color: #fff; background: #D9643A; border-radius: 10px; padding: 8px 12px; box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
  transform: translate(var(--fx, 0px), var(--fy, 0px)) scale(var(--fs, 1)); opacity: var(--fo, 0);
}

/* authentic 2-column scanned PDF paper page → tap Phone layout → clean single-column phone reflow */
.st-pdf { background: #E9E5DD !important; font-family: var(--sans); color: #1C1B1A; }
.st-pdf .status { background: linear-gradient(#E9E5DD 65%, rgba(233, 229, 221, 0)); transition: background .35s ease; }
.st-pdf.st-pdf-reflowed .status { background: linear-gradient(#FFFFFF 72%, rgba(255, 255, 255, 0)); }
.st-pdf-bar {
  position: absolute; z-index: 5; left: 0; right: 0; top: 47px; height: 44px;
  display: flex; align-items: center; padding: 0 16px 0 68px; gap: 8px;
}
.st-pdf-bar .round-l { left: 16px; }
.st-pdf-title {
  flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; color: #1C1B1A;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.st-pdf-pill {
  flex: none; padding: 7px 13px; border-radius: 999px;
  background: rgba(255, 255, 255, .94); color: #D9643A; font-size: 13px; font-weight: 650;
  box-shadow: 0 0 0 .5px rgba(28, 27, 26, .08), 0 4px 12px rgba(28, 27, 26, .08);
  transition: background-color .25s ease, color .25s ease, box-shadow .25s ease;
}
.st-pdf.st-pdf-on .st-pdf-pill {
  background: #D9643A; color: #FFFFFF; box-shadow: 0 6px 16px rgba(217, 100, 58, .32);
}
.st-scan {
  position: absolute; z-index: 2; left: 18px; right: 18px; top: 104px; bottom: 48px;
  background: linear-gradient(90deg, rgba(118, 96, 66, .08) 0%, rgba(251, 248, 241, 0) 9%, rgba(251, 248, 241, 0) 93%, rgba(118, 96, 66, .05) 100%), #FBF8F1;
  border-radius: 3px; padding: 18px 18px 28px; overflow: hidden;
  box-shadow: 0 1px 0 #ECE7DC, 0 2px 0 #FBF8F1, 0 14px 30px rgba(28, 27, 26, .16), 0 0 0 .5px rgba(28, 27, 26, .1);
  transform-origin: 50% 38%;
  font-family: var(--serif); color: #3D3933;
}
.st-scan-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding-bottom: 6px; margin-bottom: 9px; border-bottom: 1px solid rgba(61, 57, 51, .26);
  font-size: 7.5px; letter-spacing: .09em; text-transform: uppercase; color: #7C756A;
}
.st-scan-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-scan-head b { font-weight: 600; font-variant-numeric: tabular-nums; flex: none; }
.st-scan-ch {
  margin: 0 0 10px; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .05em; color: #2F2B26;
}
.st-scan-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; height: calc(100% - 56px); overflow: hidden; }
.st-scan-col { min-width: 0; overflow: hidden; font-size: 7px; line-height: 1.56; text-align: justify; hyphens: auto; }
.st-scan-col p { margin: 0 0 6px !important; font-size: inherit; line-height: inherit; color: #47433C; text-indent: 1.3em; white-space: pre-line; }
.st-scan-col1 p:first-child { text-indent: 0; }
.st-scan-col1 p:first-child::first-letter { font-size: 16px; font-weight: 700; line-height: 1; float: left; padding-right: 3px; padding-top: 1px; color: #2B2722; }
.st-scan-fig {
  margin: 0 0 8px; padding: 6px 6px 4px; border: 1px solid rgba(61, 57, 51, .18); background: #F5F0E6;
  color: #5C554B; text-align: center;
}
.st-scan-fig svg { display: block; width: 100%; height: 58px; }
.st-scan-fig figcaption { margin-top: 3px; font-size: 6px; font-style: italic; color: #7C756A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-scan-foot {
  position: absolute; left: 18px; right: 18px; bottom: 10px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding-top: 5px; border-top: .5px solid rgba(61, 57, 51, .2);
  font-size: 6.5px; color: #7C756A;
}
.st-scan-foot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-scan-foot b { font-weight: 600; flex: none; }
.st-pdf-conv {
  position: absolute; z-index: 6; left: 50%; bottom: 68px;
  padding: 8px 16px; border-radius: 999px; background: rgba(28, 27, 26, .86); color: #FAF8F5;
  font-size: 13px; font-weight: 600; white-space: nowrap; pointer-events: none;
  opacity: 0; transform: translate(-50%, 10px); transition: opacity .24s ease, transform .28s var(--ease);
}
.st-pdf.st-pdf-conv-on .st-pdf-conv { opacity: 1; transform: translate(-50%, 0); }
.st-reflow {
  position: absolute; z-index: 3; inset: 0; background: #FFFFFF;
  font-family: var(--serif); color: #1C1B1A; opacity: 0; overflow: hidden; pointer-events: none;
}
.st-reflow-body {
  position: absolute; left: 24px; right: 24px; top: 104px; bottom: 88px; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 88%, transparent); mask-image: linear-gradient(#000 88%, transparent);
}
.st-reflow h4 { margin: 0 0 16px; font-size: 26px; font-weight: 800; line-height: 1.22; letter-spacing: -0.01em; color: #1C1B1A; }
.st-reflow p:not(.st-runhead) { margin: 0 0 15px !important; font-size: 18.5px; line-height: 1.6; color: #1C1B1A; white-space: pre-line; }
.st-reflow .bar { bottom: 28px; }
.st-reflow .listen { left: 312px; top: 766px; }

/* the end of the book and the achievements page (docs/DESIGN.md → End of the book, → Achievements), drawn after the
   iOS screens; story.js scrolls each page (--shift), turns the book finished (.st-done) and plays the chart (--c…) */
.st-end, .st-ach { background: #FAF8F5 !important; font-family: var(--sans); color: #1C1B1A; }
.st-end .status, .st-ach .status { background: linear-gradient(#FAF8F5 62%, rgba(250, 248, 245, 0)); }
.st-home, .st-back { position: absolute; z-index: 4; left: 16px; top: 60px; width: 44px; height: 44px; border-radius: 50%; padding: 10px; background: #F2EFEA; }
.st-back { padding: 11px; background: #FFFFFF; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .08), 0 4px 12px rgba(0, 0, 0, .06); }
.st-end-page, .st-ach-page { position: absolute; left: 0; right: 0; top: 0; padding: 112px 20px 40px; display: flex; flex-direction: column; transform: translateY(var(--shift, 0px)); }
.st-card { background: #FFFFFF; border-radius: 16px; padding: 18px 20px; }
.st-fl { font-size: 13px; color: #6B6760; }
.st-fig { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.st-fig b { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.st-fig small { font-size: 13px; color: #6B6760; }
.st-cap { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 26px; border-radius: 24px; background: #D9643A; color: #FFFFFF; font-size: 17px; font-weight: 600; white-space: nowrap; }
.st-cap svg { width: 20px; height: 20px; }
.st-cap.st-plain { background: #F2EFEA; color: #1C1B1A; }
/* not finished: title, cover, My review, Mark finished; finished: the date, the stamp, Share and Mark as unfinished above
   the review, and the Books finished card */
.st-end-hero { order: 1; display: flex; flex-direction: column; align-items: center; }
.st-end-title { position: relative; width: 100%; height: 50px; margin: 2px 0 20px; font-size: 40px; font-weight: 800; letter-spacing: -0.02em; line-height: 50px; text-align: center; }
.st-end-title span { position: absolute; left: 0; right: 0; white-space: nowrap; transition: opacity .35s ease, transform .45s var(--ease); }
.st-end-title .st-t1 { opacity: 0; transform: translateY(10px); }
.st-done .st-end-title .st-t0 { opacity: 0; transform: translateY(-10px); }
.st-done .st-end-title .st-t1 { opacity: 1; transform: none; }
.st-end-cover { position: relative; width: 120px; height: 176px; }
.st-end-cover .st-cover { width: 120px; height: 176px; box-shadow: 0 12px 26px rgba(0, 0, 0, .18); }
.st-stamp { position: absolute; right: -22px; bottom: 16px; padding: 3px; border: 2px solid #D9643A; border-radius: 9px; color: #D9643A; background: rgba(250, 248, 245, .85); opacity: 0; transform: rotate(-12deg) scale(1.9); transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), opacity .2s ease; }
.st-stamp span { display: block; padding: 3px 9px; border: 1px solid #D9643A; border-radius: 6px; font-size: 14px; font-weight: 800; letter-spacing: .1em; white-space: nowrap; }
.st-done .st-stamp { opacity: 1; transform: rotate(-12deg); }
.st-end-book { margin: 14px 0 0 !important; display: flex; flex-direction: column; gap: 2px; text-align: center; }
.st-end-book b { font-size: 18px; font-weight: 600; }
.st-end-book small { font-size: 15px; color: #6B6760; }
.st-review { order: 2; margin-top: 22px; }
.st-end-act { order: 3; display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 22px 0 4px; }
.st-done .st-end-act { order: 2; }
.st-done .st-review { order: 3; }
.st-end-act .st-share, .st-end-act .st-unmark, .st-done .st-end-act .st-mark { display: none; }
.st-done .st-end-act .st-share { display: inline-flex; }
.st-done .st-end-act .st-unmark { display: block; font-size: 15px; color: #6B6760; }
.st-rv-head { display: flex; align-items: center; justify-content: space-between; }
.st-seg { display: flex; width: 112px; height: 32px; padding: 2px; border-radius: 16px; background: #F2EFEA; }
.st-seg i { flex: 1; display: grid; place-items: center; border-radius: 14px; }
.st-seg i svg { width: 22px; height: 22px; }
.st-seg i.on { background: #FFFFFF; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.st-stars { display: flex; align-items: center; gap: 6px; margin-top: 16px; color: #D8D2C8; }
.st-stars svg { width: 28px; height: 28px; flex: none; }
.st-stars span { margin-left: 6px; font-size: 14px; color: #A8A39A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-ph { margin: 18px 0 0 !important; font-size: 17px; color: #A8A39A; }
.st-rv-foot { display: flex; flex-direction: column; align-items: flex-end; gap: 22px; margin-top: 18px; }
.st-rv-mic { width: 22px; height: 22px; }
.st-save { height: 36px; padding: 0 22px; border-radius: 18px; line-height: 36px; background: rgba(217, 100, 58, .35); color: #FFFFFF; font-size: 16px; font-weight: 600; }
.st-end-cards { order: 4; display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.st-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.st-split { margin: 12px 0 0 !important; font-size: 13px; color: #6B6760; }
.st-time hr { border: 0; border-top: 1px solid #EFEAE2; margin: 14px 0 12px; }
.st-days { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.st-days li { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.st-days li > span:first-child { color: #6B6760; white-space: nowrap; }
.st-days i { display: block; height: 6px; }
.st-days em { display: block; height: 6px; border-radius: 3px; background: #D9643A; width: calc(6px + (var(--w) - 6px) * var(--g, 0)); transition: width .7s var(--ease); }
.st-grow .st-days em { --g: 1; }
.st-days li:nth-child(2) em { transition-delay: .06s; } .st-days li:nth-child(3) em { transition-delay: .12s; } .st-days li:nth-child(4) em { transition-delay: .18s; }
.st-days li:nth-child(5) em { transition-delay: .24s; } .st-days li:nth-child(6) em { transition-delay: .3s; } .st-days li:nth-child(7) em { transition-delay: .36s; }
.st-marks { display: flex; align-items: center; gap: 30px; }
.st-chev { width: 18px; height: 18px; margin-left: auto; color: #A8A39A; }
.st-books { display: none; align-items: baseline; gap: 12px; }
.st-done .st-books { display: flex; }
.st-books b { font-family: var(--serif); font-size: 44px; font-weight: 800; color: #D9643A; line-height: 1; }
/* the new-animal moment, over the end page */
.st-moment { position: absolute; inset: 0; z-index: 8; pointer-events: none; visibility: hidden; transition: visibility 0s linear .3s; }
.st-moment.on { visibility: visible; transition: none; }
.st-mdim { position: absolute; inset: 0; background: rgba(28, 27, 26, .45); opacity: 0; transition: opacity .3s ease; }
.st-mcard { position: absolute; left: 20px; right: 20px; top: 190px; padding: 30px 20px 26px; border-radius: 30px; background: #FAF8F5; text-align: center; opacity: 0; transform: scale(.92); transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), opacity .25s ease; }
.st-mclose { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; background: #F2EFEA; color: #6B6760; display: grid; place-items: center; }
.st-mclose svg { width: 15px; height: 15px; }
.st-mtitle { margin: 0 28px 10px !important; font-size: 26px; font-weight: 600; line-height: 1.25; color: #1C1B1A; }
.st-mpic { position: relative; height: 190px; margin: 14px 0 12px; display: grid; place-items: center; }
.st-mpic img { position: relative; max-width: 180px; max-height: 180px; opacity: 0; transform: translateY(70px) scale(.5); transition: transform .8s cubic-bezier(.34, 1.7, .5, 1) .15s, opacity .3s ease .15s; }
.st-mpic .st-glow { position: absolute; width: 230px; height: 230px; border-radius: 50%; background: radial-gradient(closest-side, rgba(217, 100, 58, .3), transparent); opacity: 0; transition: opacity .6s ease .2s; }
.st-mname { display: block; font-size: 20px; font-weight: 600; }
.st-mline { margin: 8px 0 0 !important; font-size: 16px; color: #6B6760; }
.st-mbtn { display: flex; flex-wrap: wrap-reverse; gap: 10px; margin-top: 22px; }
.st-mbtn .st-cap { flex: 1 0 auto; min-width: calc(50% - 5px); height: 46px; padding: 0 16px; font-size: 16px; }
.st-moment.on .st-mdim, .st-moment.on .st-glow { opacity: 1; }
.st-moment.on .st-mcard, .st-moment.on .st-mpic img { opacity: 1; transform: none; }
.st-confetti i { position: absolute; top: 150px; left: var(--x); width: 8px; height: 13px; border-radius: 2px; background: #D9643A; opacity: 0; }
.st-confetti i:nth-child(5n+1) { background: #E8B04B; } .st-confetti i:nth-child(5n+2) { background: #6E9E7A; }
.st-confetti i:nth-child(5n+3) { background: #4A6FA5; } .st-confetti i:nth-child(5n+4) { background: #C75C7A; }
.st-moment.on .st-confetti i { animation: st-fall 2.2s cubic-bezier(.2, .6, .4, 1) var(--d) both; }
@keyframes st-fall {
  0% { opacity: 1; transform: translate3d(0, -60px, 0) rotate(var(--r)); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--dx), 560px, 0) rotate(calc(var(--r) + 540deg)); }
}
/* achievements: the page as the apps draw it (web/src/app.css .ach-*, light theme). Drawn in as the scroll goes:
   --c1 the pile, --c2 the gold line and its tag, --c3 the animal, --c4 the progress bar; .st-named shows the name pill. */
.st-ach {
  --a-ink: #1C1B1A; --a-ink-2: #6B6760; --a-ink-3: #A8A39A; --a-bg: #FAF8F5; --a-surface: #FFFFFF; --a-surface-alt: #F2EFEA;
  --a-hairline: #E7E2DA; --a-accent: #D9643A; --a-serif: var(--serif); --a-sans: var(--sans);
  --gold-top: #D9B76A; --gold-mid: #A9802F; --gold-bot: #7C5A1E; --gold-glow: rgba(201, 164, 92, 0.20);
  --ach-sil: #C9C9C9; --wood: #DCC4A6; --wood-edge: #C9AD8A;
}
.st-ach-page { padding-top: 104px; }
.st-ach-title { margin: 6px 0 12px; font: 700 34px/1.2 var(--a-serif); letter-spacing: -0.01em; }
.st-ach .ach-anchors { display: flex; gap: 8px; overflow: hidden; margin: 0 -20px 18px; padding: 0 20px; }
.st-ach .ach-anchor { flex: none; height: 32px; line-height: 30px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--a-hairline); background: var(--a-surface); color: var(--a-ink); font-size: 14px; font-weight: 550; white-space: nowrap; }
.st-ach .ach-body { display: flex; flex-direction: column; gap: 44px; }
.st-ach .ach-sec { display: flex; flex-direction: column; gap: 16px; min-width: 0; padding: 0 !important; margin: 0; }
.st-ach .ach-h2 { font: 700 20px/1.25 var(--a-sans); margin: 0 !important; letter-spacing: 0; }
.st-ach .ach-hero { gap: 0; }
.st-ach .ach-lead { margin: 0 !important; font-size: 13px; color: var(--a-ink-2); }
.st-ach .ach-height { margin: 0 !important; font: 700 56px/1.15 var(--a-serif); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-ach .ach-summary { margin: 6px 0 0 !important; font-size: 15px; color: var(--a-ink-2); font-variant-numeric: tabular-nums; }
.st-ach .ach-progress { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.st-ach .ach-progress-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 8px; }
.st-ach .ach-missing { margin: 0 !important; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.st-ach .ach-books-tag { padding: 4px 10px; border-radius: 999px; background: var(--a-ink); color: var(--a-bg); font-size: 12px; font-weight: 600; white-space: nowrap; }
.st-ach .ach-bar { display: block; height: 8px; border-radius: 4px; background: var(--a-surface-alt); overflow: hidden; }
.st-ach .ach-bar i { display: block; height: 100%; border-radius: 4px; background: var(--a-accent); width: calc(max(8px, var(--pr) * 100%) * var(--c4, 1)); }
.st-ach .ach-bar-ends { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--a-ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-ach .ach-bar-ends span { overflow: hidden; text-overflow: ellipsis; }
.st-ach .ach-draw { position: relative; margin-top: 22px; overflow: hidden; }
.st-ach .ach-layer { position: absolute; left: 0; top: 0; overflow: visible; }
.st-ach .ach-layer .hair { fill: var(--a-hairline); }
.st-ach .ach-layer .ground { fill: rgba(28, 27, 26, .85); }
.st-ach .ach-ruler-n { font: 10px var(--a-sans); fill: var(--a-ink-3); font-variant-numeric: tabular-nums; }
.st-ach .ach-sil { position: absolute; background: var(--ach-sil); -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.st-ach .ach-pile-spine { position: absolute; }
.st-ach .ach-pile-spine > div { position: absolute; transform: rotate(-90deg); }
.st-ach .st-pile { transform-box: fill-box; transform-origin: 50% 100%; opacity: var(--c1, 1); transform: translateY(calc((1 - var(--c1, 1)) * -60px)); }
.st-ach .ach-gold-line { position: absolute; height: 1.5px; background: var(--a-accent); opacity: var(--c2, 1); }
.st-ach .ach-pile-tag { position: absolute; left: 0; transform: translateY(-50%); padding: 2.5px 7px; border-radius: 999px; background: var(--a-ink); color: var(--a-bg); font-size: 11px; font-weight: 700; line-height: 14px; white-space: nowrap; opacity: var(--c2, 1); }
.st-ach .ach-animal { position: absolute; transform-origin: 50% 100%; transform: scale(calc(.4 + .6 * var(--c3, 1))); opacity: var(--c3, 1); }
.st-ach .ach-animal img { display: block; width: 100%; height: 100%; }
.st-ach .ach-name-pill { position: absolute; height: 26px; line-height: 26px; padding: 0 10px; border-radius: 999px; background: var(--a-surface-alt); color: var(--a-ink); font-size: 12px; font-weight: 600; white-space: nowrap; transition: opacity .35s ease; }
.st-ach:not(.st-named) .ach-name-pill { opacity: 0; }
.st-ach .ach-bspine { position: relative; display: flex; flex-direction: column; align-items: center; padding-bottom: 10px; overflow: hidden; border-radius: 4px 4px 2px 2px; }
.st-ach .ach-bspine::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to right, rgba(0, 0, 0, .2) 0%, rgba(255, 255, 255, .18) 22%, transparent 50%, rgba(0, 0, 0, .08) 80%, rgba(0, 0, 0, .26) 100%); }
.st-ach .ach-bspine-head { flex: none; width: 100%; height: 18px; border-bottom: 1px solid rgba(0, 0, 0, .18); }
.st-ach .ach-bspine-head img { display: block; width: 100%; height: 17px; object-fit: cover; }
.st-ach .ach-bspine-title { margin-top: 8px; }
.st-ach .ach-bspine-fill { flex: 1; min-height: 4px; }
.st-ach .ach-bspine-author { opacity: .75; }
.st-ach .ach-bspine-ring { flex: none; width: 5px; height: 5px; margin-top: 6px; border-radius: 50%; border: 1px solid currentColor; opacity: .6; }
.st-ach .ach-vt { flex: none; writing-mode: vertical-rl; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-ach .ach-vt.upright { text-orientation: upright; text-overflow: clip; }
.st-ach .ach-shelves { display: flex; flex-direction: column; gap: 18px; }
.st-ach .ach-board-items { display: flex; align-items: flex-end; gap: 3px; padding: 0 6px; }
.st-ach .ach-board { height: 6px; border-radius: 3px; background: linear-gradient(to bottom, var(--wood) 55%, var(--wood-edge)); }
.st-ach .ach-shelf-book { flex: none; display: flex; }
.st-ach .ach-year-tab { flex: none; width: 22px; display: flex; align-items: center; justify-content: center; border-radius: 6px 6px 2px 2px; background: var(--a-surface-alt); color: var(--a-ink-2); }
.st-ach .ach-bookend { flex: none; display: block; margin-left: 8px; }
.st-ach .ach-bookend img { display: block; width: 100%; height: 100%; }
.st-ach .ach-wreath-head { position: relative; height: 200px; display: grid; place-items: center; }
.st-ach .ach-glow-soft { position: absolute; left: 50%; top: 50%; width: 300px; height: 200px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, var(--gold-glow), rgba(201, 164, 92, .09) 45%, transparent 100%); }
.st-ach .ach-wreath { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.st-ach .ach-wreath .g-top { stop-color: var(--gold-top); }
.st-ach .ach-wreath .g-mid { stop-color: var(--gold-mid); }
.st-ach .ach-wreath .g-bot { stop-color: var(--gold-bot); }
.st-ach .ach-wreath-text { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; transform: translateY(-4px); }
.st-ach .ach-gold-text { background: linear-gradient(to bottom, var(--gold-top), var(--gold-mid), var(--gold-bot)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.st-ach .ach-wreath-text strong { font: 800 64px/1 var(--a-serif); font-variant-numeric: tabular-nums; }
.st-ach .ach-wreath-text span { font: 700 14px/1.2 var(--a-serif); letter-spacing: 2px; }
.st-ach .ach-group { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.st-ach .ach-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 18px; font-weight: 700; }
.st-ach .ach-group-count { font: 700 16px var(--a-serif); font-variant-numeric: tabular-nums; }
.st-ach .ach-badge-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.st-ach .ach-group .ach-badge-row + .ach-badge-row { margin-top: 8px; }
.st-ach .ach-badge { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; text-align: center; color: var(--a-ink); }
.st-ach .ach-badge img { width: 78px; height: 78px; object-fit: contain; }
.st-ach .ach-badge img.locked { filter: grayscale(1); opacity: .4; }
.st-ach .ach-badge-name { font-size: 15px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.st-ach .ach-badge-name.locked { color: var(--a-ink-2); }
.st-ach .ach-badge-goal { font-size: 14px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.st-ach .ach-badge-goal.locked, .st-ach .ach-badge-sub { color: var(--a-ink-3); }
.st-ach .ach-badge-sub { font-size: 12px; line-height: 1.3; }
.st-ach .ach-badge-date { font-size: 12px; color: var(--a-ink-2); }
.st-ach .ach-hint-room { position: relative; align-self: stretch; height: 30px; }
.st-ach .ach-hint { position: absolute; bottom: 6px; z-index: 1; padding: 4px 10px; border-radius: 999px; white-space: nowrap; background: #F6E6DF; color: var(--a-accent); font-size: 12px; font-weight: 500; line-height: 16px; }
.st-ach .ach-hint.start { left: 0; }
.st-ach .ach-hint.end { right: 0; }
.st-ach .ach-hint.center { left: 50%; transform: translateX(-50%); }
.st-ach .ach-hint-point { position: absolute; bottom: 1px; left: 50%; width: 10px; height: 5px; margin-left: -5px; background: #F6E6DF; clip-path: polygon(0 0, 100% 0, 50% 100%); }

/* what is said out loud, over the illustration (there is no screen to show it on) */
.st-talk { position: absolute; z-index: 3; pointer-events: none; left: 0; top: 50%; transform: translateY(-50%); width: 78%; aspect-ratio: 1200 / 1608; }
.st-bud {
  position: absolute; left: 50%; top: 3.5%; width: 56px; height: 56px; padding: 8px;
  border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); opacity: 0; transform: scale(.8);
  transition: opacity .35s ease, transform .35s ease;
}
.st-bud svg { width: 40px; height: 40px; display: block; }
.st-ring { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; }
.st-talk.st-press .st-ring { animation: ring 0.7s ease-out; }
.st-talk.st-press .st-ring2 { animation-delay: .22s; }
.st-bubble {
  position: absolute; margin: 0; padding: 12px 16px; border-radius: 20px; font-size: 16px; line-height: 1.55;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow); opacity: 0; transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease;
}
.st-say-you { left: 4%; top: 4%; max-width: 44%; border-bottom-left-radius: 6px; }
.st-say-app { left: 4%; top: auto; bottom: 4%; max-width: 64%; font-size: 15px; border-bottom-left-radius: 6px; background: var(--ink); color: var(--bg); display: grid; grid-template-columns: 22px 1fr; column-gap: 10px; }
.st-sub { display: block; grid-column: -2; font-size: .82em; line-height: 1.45; opacity: 0; max-height: 0; overflow: hidden; transition: opacity .4s ease, max-height .4s ease, margin .4s ease; }
.st-subon .st-sub { opacity: .72; max-height: 12em; margin-top: 6px; }
/* English said out loud on a page in another language: the English short, the subtitle under it */
.st-bubble:has(.st-sub) { font-size: 14px; }
.st-bubble:has(.st-sub) .st-said { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.st-say-app:has(.st-sub) .st-said { -webkit-line-clamp: 3; line-clamp: 3; }
.st-subon .st-sub { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; }
.st-voice { flex: none; width: 22px; height: 22px; color: var(--accent); margin-top: 2px; }
.st-talk.st-show-bud .st-bud { opacity: 1; transform: none; }
.st-talk.st-show-you .st-say-you, .st-talk.st-show-app .st-say-app { opacity: 1; transform: none; }
.st-talk.st-show-app .st-voice path { animation: wave .7s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }

/* built-in ad-free Browser screen (browser): 5-target iOS Browser bar, Shields clutter collapse, Reader mode, live bilingual, Smart Listen, Saved banner */
.st-browser { background: #FFFFFF !important; font-family: var(--sans); color: #1C1B1A; --clutter: 0; }
.st-browser .status { height: 50px; background: #FAF8F5; }
.st-brw-bar {
  position: absolute; z-index: 4; left: 0; right: 0; top: 48px; height: 50px; padding: 0 12px 6px;
  display: flex; align-items: center; gap: 7px;
  background: rgba(250, 248, 245, .94); border-bottom: 1px solid #EAE5DC;
}
.st-brw-ic {
  width: 34px; height: 34px; border-radius: 50%; padding: 8px; flex: none;
  display: grid; place-items: center; color: #1C1B1A;
}
.st-brw-omni {
  flex: 1; min-width: 0; height: 34px; border-radius: 17px; padding: 0 4px 0 8px;
  display: flex; align-items: center; gap: 6px;
}
.st-brw-sh {
  display: inline-flex; align-items: center; gap: 3px; flex: none;
  padding: 3px 6px; border-radius: 999px; background: #F8E3D9; color: #D9643A;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
  transition: transform .28s var(--ease), box-shadow .28s ease;
}
.st-brw-sh svg { width: 13px; height: 13px; flex: none; }
.st-brw-sh b { line-height: 1; }
.st-browser.st-brw-sh-pulse .st-brw-sh { transform: scale(1.12); box-shadow: 0 0 0 3px rgba(217, 100, 58, .22); }
.st-brw-host {
  flex: 1; min-width: 0; text-align: center; font-size: 13px; font-weight: 600; color: #1C1B1A;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.st-brw-aa {
  flex: none; padding: 3px 8px; border-radius: 12px; font-size: 13px; font-weight: 700; color: #1C1B1A;
  transition: background-color .25s ease, color .25s ease;
}
.st-browser.st-brw-rd .st-brw-aa { background: #D9643A; color: #FFFFFF; }
.st-brw-tabs {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #1C1B1A;
}
.st-brw-body { position: absolute; left: 0; right: 0; top: 98px; bottom: 0; overflow: hidden; }
/* live webpage layer */
.st-brw-web {
  position: absolute; inset: 0; padding: 14px 18px 20px; background: #FFFFFF;
  transition: opacity .34s ease, transform .38s var(--ease);
}
.st-browser.st-brw-rd .st-brw-web { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.st-brw-snav {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid #EAE5DC;
  font-size: 11px; font-weight: 700; letter-spacing: .12em; color: #A8A39A;
}
.st-brw-wh { margin: 0 0 6px; font-family: var(--serif); font-size: 24px; font-weight: 700; line-height: 1.22; color: #1C1B1A; }
.st-brw-wsub { margin: 0 0 14px !important; font-size: 12.5px; color: #8A857C; }
.st-brw-wp {
  margin: 0 0 14px !important; font-family: var(--serif); font-size: 16px; line-height: 1.55; color: #3A3733;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
.st-brw-ad {
  overflow: hidden; border-radius: 14px; background: #F2EFEA; border: 1px dashed #D4CEC4;
  max-height: calc((1 - var(--clutter, 0)) * 144px);
  padding: calc((1 - var(--clutter, 0)) * 10px) 12px;
  margin-bottom: calc((1 - var(--clutter, 0)) * 16px);
  opacity: calc(1 - var(--clutter, 0));
  transform: scale(calc(1 - var(--clutter, 0) * .08)); transform-origin: 50% 0%;
}
.st-brw-adtag {
  display: inline-block; padding: 2px 7px; border-radius: 5px; margin-bottom: 8px;
  background: #9A9389; color: #FFFFFF; font-size: 10px; font-weight: 700; letter-spacing: .04em;
}
.st-brw-adcard { display: flex; align-items: center; gap: 12px; }
.st-brw-adart { flex: 1; height: 54px; border-radius: 8px; background: linear-gradient(135deg, #E2DDD4, #CFC8BC); } /* a banner */
.st-brw-wmore { -webkit-line-clamp: 9; line-clamp: 9; white-space: pre-line; } /* the page goes on, in its own words */
/* dark Cookie banner: right inset clears bottom-right floating Translate & Listen circles cleanly */
.st-brw-cookie {
  position: absolute; left: 16px; right: 86px; bottom: 26px; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-radius: 16px; background: #2C2A27; color: #F2EFEA;
  box-shadow: 0 12px 26px rgba(28, 27, 26, .24);
  opacity: calc(1 - var(--clutter, 0));
  transform: translateY(calc(var(--clutter, 0) * 24px)) scale(calc(1 - var(--clutter, 0) * .08));
}
.st-brw-cookie span { font-size: 13px; font-weight: 500; color: #E5E0D8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-brw-cookie em {
  font-style: normal; flex: none; padding: 5px 11px; border-radius: 999px;
  background: #FFFFFF; color: #1C1B1A; font-size: 12px; font-weight: 700;
}
/* warm paper Reader mode layer */
.st-brw-reader {
  position: absolute; inset: 0; background: #FAF8F5;
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .36s ease, transform .42s var(--ease);
}
.st-browser.st-brw-rd .st-brw-reader { opacity: 1; transform: none; }
.st-brw-article {
  position: absolute; left: 0; right: 0; top: 0; bottom: 72px; padding: 20px 22px 28px; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 88%, transparent); mask-image: linear-gradient(#000 88%, transparent);
  transition: padding-top .32s var(--ease);
}
.st-browser.st-brw-saved .st-brw-article { padding-top: 56px; }
.st-brw-rh { margin: 0 0 6px; font-family: var(--serif); font-size: 23px; font-weight: 800; line-height: 1.22; color: #1C1B1A; }
.st-brw-rmeta { margin: 4px 0 16px !important; font-size: 12.5px; color: #A8A39A; }
.st-brw-o { margin: 0 0 8px !important; font-family: var(--serif); font-size: 16.5px; line-height: 1.52; color: #1C1B1A; white-space: pre-line; }
.st-brw-tr {
  display: grid; grid-template-rows: 0fr; opacity: 0; margin: 0;
  transition: grid-template-rows .42s var(--ease), opacity .35s ease, margin .35s var(--ease);
}
.st-brw-tr-in { overflow: hidden; }
.st-brw-tr p {
  margin: 0 !important; font-family: var(--serif); font-size: 16px; line-height: 1.54; color: #6B3A22;
  background: #FBEFE8; border-radius: 8px; padding: 7px 10px; white-space: pre-line;
}
.st-brw-tr-title p { font-size: 18px; font-weight: 700; padding: 4px 10px; }
.st-brw-tr.st-brw-in { grid-template-rows: 1fr; opacity: 1; margin-bottom: 14px; }
.st-brw-tr-title.st-brw-in { margin-bottom: 6px; }
.st-brw-s { border-radius: 4px; padding: 1px 2px; margin: 0 -2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-color .25s ease; }
.st-brw-s.now { background: rgba(217, 100, 58, .26); color: #1C1B1A; }
.st-brw-foot {
  position: absolute; left: 20px; bottom: 28px; max-width: calc(100% - 104px);
  padding: 6px 12px; border-radius: 999px; background: #F2EFEA; color: #6B6760;
  font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* bottom-right floating action circles: Translate + Listen */
.st-brw-fabs {
  position: absolute; z-index: 5; right: 18px; bottom: 24px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.st-brw-tr-btn {
  width: 44px; height: 44px; border-radius: 50%; padding: 10px;
  display: grid; place-items: center; color: #1C1B1A;
  transition: background-color .25s ease, color .25s ease, box-shadow .25s ease;
}
.st-browser.st-brw-tr-on .st-brw-tr-btn {
  background: #D9643A; color: #FFFFFF; box-shadow: 0 6px 16px rgba(217, 100, 58, .34);
}
.st-brw-listen {
  position: relative; width: 52px; height: 52px; border-radius: 50%; padding: 13px;
  background: #D9643A; color: #FFFFFF; box-shadow: 0 6px 18px rgba(217, 100, 58, .35);
}
.st-brw-listen i { position: absolute; inset: 13px; transition: opacity .25s ease, transform .3s var(--ease); }
.st-brw-listen .wv { opacity: 0; transform: scale(.6); }
.st-browser.st-brw-play .st-brw-listen .hp { opacity: 0; transform: scale(.6); }
.st-browser.st-brw-play .st-brw-listen .wv { opacity: 1; transform: none; }
.st-browser.st-brw-play .st-brw-listen .wv path { animation: wave .7s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
.st-browser.st-brw-play .st-brw-listen .wv .b2 { animation-delay: -.25s; }
.st-browser.st-brw-play .st-brw-listen .wv .b3 { animation-delay: -.5s; }
.st-browser.st-brw-play .st-brw-listen .wv .b4 { animation-delay: -.15s; }
.st-browser.st-brw-play .st-brw-listen::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid #D9643A; opacity: 0;
  animation: ring 1.6s ease-out infinite;
}
/* top Saved to Read later banner */
.st-brw-saved-bar {
  position: absolute; z-index: 6; left: 50%; top: 12px; max-width: calc(100% - 32px);
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px 7px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 0 0 .5px rgba(28, 27, 26, .08), 0 10px 24px rgba(28, 27, 26, .16);
  font-size: 13px; font-weight: 600; color: #1C1B1A; white-space: nowrap;
  opacity: 0; transform: translate(-50%, -18px) scale(.94); pointer-events: none;
  transition: opacity .3s ease, transform .36s var(--ease);
}
.st-brw-saved-bar i {
  width: 20px; height: 20px; border-radius: 50%; padding: 3.5px; flex: none;
  background: rgba(46, 139, 87, .16); color: #2E8B57; display: grid; place-items: center;
}
.st-brw-saved-bar span { overflow: hidden; text-overflow: ellipsis; }
.st-browser.st-brw-saved .st-brw-saved-bar { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* browser extension clipping a web page into Read later (clip) */
.st-ext {
  position: absolute; z-index: 3; pointer-events: none; left: 0; top: 50%; transform: translateY(-50%);
  width: 78%; aspect-ratio: 1200 / 1608;
  padding: 3.5% 33% 0 3.5%; font-family: var(--sans);
}
.st-ext-win {
  position: relative; width: 100%; border-radius: 14px; background: #FFFFFF; overflow: hidden;
  box-shadow: 0 14px 34px rgba(28, 27, 26, .16), 0 0 0 .5px rgba(28, 27, 26, .08);
  opacity: 0; transform: translateY(-8px) scale(.97); transition: opacity .35s ease, transform .4s ease;
}
.st-ext.st-ext-on .st-ext-win { opacity: 1; transform: none; }
.st-ext-bar {
  display: flex; align-items: center; gap: 4px; padding: 5px 6px 5px 8px;
  background: #F6F3EE; border-bottom: 1px solid #EAE5DC;
}
.st-ext-bar i.d { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.st-ext-bar i.d:nth-child(1) { background: #ED6A5E; }
.st-ext-bar i.d:nth-child(2) { background: #F4BF4F; }
.st-ext-bar i.d:nth-child(3) { background: #61C554; }
.st-ext-addr {
  flex: 1; min-width: 0; margin: 0 3px; padding: 2px 8px; border-radius: 999px; background: #FFFFFF;
  color: #6B6760; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.st-ext-btn {
  position: relative; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  background: #F8E3D9; flex: none; transition: transform .15s ease;
}
.st-ext-btn img { width: 16px; height: 16px; border-radius: 4px; display: block; }
.st-ext.st-ext-tap1 .st-ext-btn { transform: scale(.86); }
.st-ext-ring {
  position: absolute; inset: -4px; border-radius: 999px; border: 2px solid #D9643A; opacity: 0; pointer-events: none;
}
.st-ext.st-ext-tap1 .st-ext-btn .st-ext-ring,
.st-ext.st-ext-tap2 .st-ext-ss .st-ext-ring,
.st-ext.st-ext-tap3 .st-ed-cloud .st-ext-ring { animation: ring .65s ease-out; }
.st-ext-browser { transition: opacity .25s ease; }
.st-ext.st-ext-edit .st-ext-browser { display: none; }
.st-ext-editor { display: none; background: #FAF8F5; color: #1C1B1A; }
.st-ext.st-ext-edit .st-ext-editor { display: block; }
.st-ed-bar {
  display: flex; align-items: center; gap: 5px; padding: 5px 6px 5px 8px;
  background: #FFFFFF; border-bottom: 1px solid #EAE5DC;
}
.st-ed-bar img { width: 14px; height: 14px; border-radius: 3.5px; flex: none; }
.st-ed-bar b { font-size: 10px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.st-ed-tool {
  display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border-radius: 999px;
  background: #F8E3D9; color: #D9643A; font-size: 9px; font-weight: 600; flex: none;
}
.st-ed-tool svg { width: 10px; height: 10px; }
.st-ed-tool em { font-style: normal; }
.st-ed-cloud {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  height: 20px; padding: 0 7px; border-radius: 999px; background: #D9643A; color: #FFFFFF;
  font-size: 9px; font-weight: 600; white-space: nowrap; flex: none; transition: background-color .2s ease, transform .15s ease;
}
.st-ed-cloud em { font-style: normal; display: inline-flex; align-items: center; gap: 3px; }
.st-ed-cloud .st-ed-ok { display: none; }
.st-ed-cloud svg { width: 10px; height: 10px; }
.st-ext.st-ext-tap3 .st-ed-cloud { transform: scale(.92); }
.st-ext.st-ext-saved .st-ed-cloud { background: #2E8B57; }
.st-ext.st-ext-saved .st-ed-go { display: none; }
.st-ext.st-ext-saved .st-ed-ok { display: inline-flex; }
.st-ed-canvas { padding: 8px 12px 10px; background: #242220; }
.st-ed-shot { position: relative; border-radius: 6px; overflow: hidden; background: #FFFFFF; }
.st-ed-page { padding: 8px 10px 6px; display: flex; flex-direction: column; gap: 4px; }
.st-ed-page b { font-family: var(--serif); font-size: 11px; line-height: 1.2; color: #1C1B1A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-ed-page small { font-size: 8.5px; color: #8A857C; margin-bottom: 2px; }
/* the page's own words (narration's passage), and its foot, which the crop leaves out */
.st-ed-page p { margin: 0 !important; max-width: none; font-family: var(--serif); font-size: 8px; line-height: 1.45; color: #3A3733; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; } /* three lines: the crop's edge falls between them and the foot */
.st-ed-foot { display: block; margin-top: 6px; padding: 6px 0 4px; border-top: 1px dashed #E2DCD2; font-size: 7.5px; color: #8A857C; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-crop-frame {
  position: absolute; left: 0; right: 0; top: 0; bottom: calc(var(--crop, 0) * 32%);
  border: 2px solid #D9643A; border-radius: 6px; pointer-events: none;
}
.st-crop-handle {
  position: absolute; left: 50%; bottom: -4px; width: 26px; height: 6px; margin-left: -13px;
  border-radius: 999px; background: #D9643A; box-shadow: 0 2px 6px rgba(28, 27, 26, .28);
}
.st-ext.st-ext-drag .st-crop-handle .st-ext-ring { opacity: 1; animation: ring .9s ease-out infinite; }
.st-crop-mask {
  position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--crop, 0) * 32%);
  background: rgba(28, 27, 26, .58); pointer-events: none;
}
.st-ext-web {
  display: grid; grid-template-columns: 1fr 56px; gap: 10px; align-items: start;
  padding: 10px 12px 12px; min-height: 106px; background: #FFFFFF;
  transition: opacity .25s ease;
}
.st-ext.st-ext-open .st-ext-web { opacity: .45; }
.st-ext-art { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.st-ext-art b {
  font-family: var(--serif); font-size: 13px; line-height: 1.25; color: #1C1B1A;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.st-ext-art small { font-size: 9.5px; color: #8A857C; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-ext-art p { margin: 0 !important; max-width: none; font-family: var(--serif); font-size: 9px; line-height: 1.5; color: #3A3733; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; overflow: hidden; }
.st-ext-thumb {
  width: 56px; height: 68px; border-radius: 6px; margin-top: 2px;
  background: linear-gradient(155deg, #EFE5D8, #DFCEBA); overflow: hidden;
  box-shadow: inset 0 0 0 .5px rgba(28, 27, 26, .06);
}
.st-ext-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* extension popover anchored inside the top-right corner of the browser window */
.st-ext-pop {
  position: absolute; right: 6px; top: 32px; width: 64%; border-radius: 11px;
  background: #FAF8F5; color: #1C1B1A; overflow: hidden;
  box-shadow: 0 10px 24px rgba(28, 27, 26, .22), 0 0 0 .5px rgba(28, 27, 26, .08);
  opacity: 0; transform: translateY(-6px) scale(.94); transform-origin: 92% 0%;
  transition: opacity .24s ease, transform .3s cubic-bezier(.2, .8, .2, 1);
}
.st-ext.st-ext-on.st-ext-open .st-ext-pop { opacity: 1; transform: none; }
.st-ext-head {
  display: flex; align-items: center; gap: 5px; padding: 6px 8px; border-bottom: 1px solid #EAE5DC; background: #FFFFFF;
}
.st-ext-head img { width: 14px; height: 14px; border-radius: 3.5px; }
.st-ext-head b { font-size: 11px; font-weight: 600; }
.st-ext-pane { display: grid; padding: 8px; gap: 5px; }
.st-ext-save {
  position: relative; display: flex; align-items: center; justify-content: center; height: 26px; padding: 0 8px;
  border-radius: 999px; background: #D9643A; color: #FFFFFF; font-size: 10.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: transform .15s ease;
}
.st-ext-ss {
  position: relative; text-align: center; font-size: 9.5px; color: #6B6760; padding: 3px 6px; border-radius: 999px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .15s ease, background-color .15s ease, transform .15s ease;
}
.st-ext.st-ext-tap2 .st-ext-ss { background: #F8E3D9; color: #D9643A; font-weight: 600; transform: scale(.94); }
.st-ext-ok {
  width: 20px; height: 20px; border-radius: 50%; background: rgba(46, 139, 87, .16); color: #2E8B57;
  display: grid; place-items: center; flex: none;
}
.st-ext-ok svg { width: 12px; height: 12px; }
.st-ext-done b { font-size: 11px; font-weight: 600; color: #1C1B1A; }

/* saved article card gliding smoothly from the browser window across to the phone */
.st-ext-fly {
  position: absolute; left: 0; top: 0; width: 64px; height: 88px; border-radius: 8px; transform-origin: 50% 50%;
  background: #F8E3D9; color: #1C1B1A; padding: 8px 7px 6px;
  display: flex; flex-direction: column; gap: 4px;
  box-shadow: 0 12px 26px rgba(217, 100, 58, .28), 0 0 0 1px rgba(217, 100, 58, .35);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.st-ext.st-ext-flying .st-ext-fly { opacity: 1; }
.st-ext-fly b { font-family: var(--serif); font-size: 10px; line-height: 1.2; font-weight: 700; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.st-ext-fly i { width: 14px; height: 2px; border-radius: 1px; background: #D9643A; }
.st-ext-fly small { margin-top: auto; font-size: 7px; color: #8A523E; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Read later folder on the phone (clip) */
.st-clip-lib { background: #FAF8F5 !important; font-family: var(--sans); }
.st-folder-box {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; padding: 8px;
  aspect-ratio: 2 / 3; border-radius: 10px; background: #EAE4DA;
  box-shadow: inset 0 0 0 1px rgba(28, 27, 26, .08);
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s ease;
}
.st-fmini {
  border-radius: 4px; display: flex; flex-direction: column; gap: 3px; padding: 6px 5px; overflow: hidden;
  box-shadow: 0 2px 5px rgba(28, 27, 26, .08);
}
.st-fmini b { font-family: var(--serif); font-size: 7px; line-height: 1.2; font-weight: 700; color: #3A3733; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.st-fm1 { background: #D3E3D9; }
.st-fm2 { background: #DFD8EC; }
/* the page just saved lands as its cover over the folder's tile (the card that flew from the browser: its title, a rule,
   the site), and the tile comes forward so it can be read */
.st-folder-tile { position: relative; transform-origin: 0 0; }
.st-folder-box { position: relative; }
.st-fm3 {
  position: absolute; inset: 0; border-radius: 10px; padding: 14px 12px 10px; display: flex; flex-direction: column; gap: 8px; overflow: hidden;
  background: #F8E3D9; border-top: 4px solid #D9643A; opacity: 0; transform: scale(.55);
  transition: opacity .25s ease, transform .38s cubic-bezier(.34, 1.56, .64, 1);
}
.st-fm3 b { font-family: var(--serif); font-size: 17px; line-height: 1.2; font-weight: 700; color: #1C1B1A; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.st-fm3 i { display: block; flex: none; width: 22px; height: 3px; border-radius: 2px; background: #D9643A; }
.st-fm3 small { margin-top: auto; font-size: 10px; color: #8A523E; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-fm4 { background: rgba(28, 27, 26, .04); box-shadow: none; }
.st-folder-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #D9643A;
  opacity: 0; transform: scale(0); transition: opacity .25s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.st-clip-lib.st-landed .st-folder-tile { z-index: 2; transform: scale(1.34); }
.st-clip-lib.st-landed .st-folder-box { box-shadow: 0 0 0 2.5px #D9643A, 0 16px 30px rgba(217, 100, 58, .34); }
.st-clip-lib.st-landed .st-folder-tile > b, .st-clip-lib.st-landed .st-folder-tile > small { position: relative; background: #FAF8F5; }
.st-clip-lib.st-landed .st-fm3 { opacity: 1; transform: none; }
.st-clip-lib.st-landed .st-folder-dot { opacity: 1; transform: none; }

/* webtoon <dm-strip> vertical comic + in-place speech bubble translation (manga) */
.st-manga { background: #FAF8F5 !important; font-family: var(--sans); }
.st-manga .status { background: linear-gradient(rgba(250, 248, 245, .88) 55%, rgba(250, 248, 245, 0)); }
.st-manga .title { position: absolute; left: 70px; top: 7px; width: 185px; max-width: 185px; }
.st-manga .title b { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-weight: 600; transition: opacity .3s ease; }
.st-manga .title .st-mt1 { position: absolute; left: 2px; right: 2px; top: 0; opacity: 0; }
.st-manga.st-mtr-on .title .st-mt0 { opacity: 0; }
.st-manga.st-mtr-on .title .st-mt1 { opacity: 1; }
.st-manga.st-mtr-on .tools .tr { color: #D9643A; }
.st-strip-toast {
  position: absolute; z-index: 5; left: 50%; top: 102px; transform: translate(-50%, -6px);
  padding: 6px 14px; border-radius: 999px; background: rgba(28, 27, 26, .82); color: #FAF8F5;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity .3s ease, transform .3s var(--ease);
}
.st-manga.st-toast-on .st-strip-toast { opacity: 1; transform: translate(-50%, 0); }
.st-manga-view { position: absolute; inset: 0; overflow: hidden; }
.st-manga-strip { display: flex; flex-direction: column; gap: 0; padding-top: 96px; transform: translateY(var(--mshift, 0px)); }
.st-mpanel { position: relative; width: 390px; height: 360px; flex: none; overflow: hidden; }
.st-mpanel + .st-mpanel { border-top: 1px solid rgba(28, 27, 26, .16); }
.st-mart { display: block; width: 100%; height: 100%; object-fit: cover; }
.st-mbub {
  position: absolute; min-width: 118px; max-width: 158px; min-height: 76px; padding: 12px 15px;
  border-radius: 50% / 45%; background: #FFFFFF; border: 2px solid #1D2024; color: #1C1B1A;
  box-shadow: 0 6px 16px rgba(24, 30, 38, .14); display: grid; place-items: center; text-align: center;
  transition: border-color .35s ease, box-shadow .35s ease;
}
.st-mbub::before, .st-mbub::after {
  content: ""; position: absolute; pointer-events: none; transition: background-color .35s ease;
}
/* Down-left pointed manga tail (Panels 1 & 3) */
.st-mb-tr::before {
  bottom: -11px; left: 16%; width: 22px; height: 22px; background: #1D2024;
  clip-path: polygon(34% 0%, 100% 34%, 0% 100%);
}
.st-mb-tr::after {
  bottom: -7.5px; left: calc(16% + 2.5px); width: 20px; height: 20px; background: #FFFFFF;
  clip-path: polygon(30% 0%, 100% 34%, 4% 92%);
}
/* Down-right pointed manga tail (Panel 2) */
.st-mb-tl::before {
  bottom: -11px; right: 16%; width: 22px; height: 22px; background: #1D2024;
  clip-path: polygon(0% 34%, 66% 0%, 100% 100%);
}
.st-mb-tl::after {
  bottom: -7.5px; right: calc(16% + 2.5px); width: 20px; height: 20px; background: #FFFFFF;
  clip-path: polygon(0% 34%, 70% 0%, 96% 92%);
}
.st-mb0 { top: 42px; right: 24px; }
.st-mb1 { top: 52px; left: 24px; }
.st-mb2 { top: 42px; right: 32px; }
.st-mbub:not(.st-mdone):has(.st-morig.st-mvert),
.st-mbub.st-mdone:has(.st-mtrans.st-mvert) { min-width: 76px; max-width: 112px; min-height: 108px; padding: 15px 14px; border-radius: 47% / 50%; }
.st-mbub.st-mdone:not(:has(.st-mtrans.st-mvert)),
.st-mbub:not(.st-mdone):not(:has(.st-morig.st-mvert)) { min-width: 124px; max-width: 158px; min-height: 72px; padding: 14px 16px; border-radius: 48% / 46%; }
.st-mbub:not(.st-mdone) .st-mtrans,
.st-mbub.st-mdone .st-morig { position: absolute; width: 0; height: 0; overflow: hidden; }
.st-mbub.st-mdone:not(:has(.st-mtrans.st-mvert)).st-mb-tr::before,
.st-mbub:not(.st-mdone):not(:has(.st-morig.st-mvert)).st-mb-tr::before { bottom: -10px; left: 20%; }
.st-mbub.st-mdone:not(:has(.st-mtrans.st-mvert)).st-mb-tr::after,
.st-mbub:not(.st-mdone):not(:has(.st-morig.st-mvert)).st-mb-tr::after { bottom: -6.5px; left: calc(20% + 2.5px); }
.st-mbub.st-mdone:not(:has(.st-mtrans.st-mvert)).st-mb-tl::before,
.st-mbub:not(.st-mdone):not(:has(.st-morig.st-mvert)).st-mb-tl::before { bottom: -10px; right: 20%; }
.st-mbub.st-mdone:not(:has(.st-mtrans.st-mvert)).st-mb-tl::after,
.st-mbub:not(.st-mdone):not(:has(.st-morig.st-mvert)).st-mb-tl::after { bottom: -6.5px; right: calc(20% + 2.5px); }
.st-morig, .st-mtrans {
  grid-area: 1 / 1; font-size: 13.5px; line-height: 1.32; font-weight: 600; white-space: pre-line;
  transition: opacity .35s ease;
}
.st-mvert { writing-mode: vertical-rl; text-orientation: mixed; text-align: left; letter-spacing: .04em; line-height: 1.36; }
.st-mtrans.st-mvert { max-height: 80px; }
.st-mtrans.st-mvert:lang(ja) { max-height: 112px; }
.st-mtrans { opacity: 0; color: #1C1B1A; }
.st-mshim {
  grid-area: 1 / 1; width: 76%; height: 32px; border-radius: 8px; opacity: 0; pointer-events: none;
  background: linear-gradient(100deg, #F2EFEA 25%, #F8E3D9 50%, #F2EFEA 75%) 0 0 / 220% 100%;
  transition: opacity .22s ease;
}
.st-manga.st-mshimmer .st-mbub:not(.st-mdone) .st-morig { opacity: .18; }
.st-manga.st-mshimmer .st-mbub:not(.st-mdone) .st-mshim { opacity: 1; animation: shim .9s linear infinite; }
.st-mbub.st-mdone .st-morig { opacity: 0; }
.st-mbub.st-mdone .st-mtrans { opacity: 1; }
.st-mbub.st-mdone { border-color: #D9643A; box-shadow: 0 6px 18px rgba(217, 100, 58, .26); }
.st-mbub.st-mdone::before { background: #D9643A; }

/* listen: subtle 4.5 MB chapter BGM waves, compact player tile bar (Music between Voice & Sleep), and two-step Voice → Language picker */
.st-bgm-waves {
  position: absolute; z-index: 3; left: 20px; right: 20px; bottom: 112px; height: 42px;
  display: flex; align-items: flex-end; justify-content: center; gap: 6px; pointer-events: none;
  opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .4s var(--ease);
}
.st-reader1.st-bgm-on .st-bgm-waves { opacity: 1; transform: none; }
.st-bgm-waves i {
  display: block; width: 4px; height: 18px; border-radius: 2px; background: rgba(217, 100, 58, .38);
  animation: wave 1.2s ease-in-out infinite alternate; transform-origin: bottom;
}
.st-bgm-waves i:nth-child(2) { height: 28px; animation-delay: -.3s; }
.st-bgm-waves i:nth-child(3) { height: 22px; animation-delay: -.6s; }
.st-bgm-waves i:nth-child(4) { height: 32px; animation-delay: -.15s; }
.st-bgm-waves i:nth-child(5) { height: 24px; animation-delay: -.45s; }
.st-bgm-waves i:nth-child(6) { height: 29px; animation-delay: -.75s; }
.st-bgm-waves i:nth-child(7) { height: 16px; animation-delay: -.2s; }
.st-bgm-pill {
  display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; padding: 5px 11px; border-radius: 999px;
  background: #F8E3D9; color: #D9643A; font-family: var(--sans); font-size: 12px; font-weight: 600;
  box-shadow: 0 4px 12px rgba(217, 100, 58, .16);
}
.st-bgm-pill svg { width: 13px; height: 13px; flex: none; }
.st-bgm-pill em { font-style: normal; }
.st-pbar {
  position: absolute; z-index: 4; left: 16px; right: 16px; bottom: 24px; padding: 10px 8px;
  border-radius: 22px; background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .08), 0 10px 26px rgba(28, 27, 26, .12);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; font-family: var(--sans);
  opacity: 0; transform: translateY(24px); pointer-events: none; transition: opacity .32s ease, transform .38s var(--ease);
}
.st-reader1.st-pbar-on .st-pbar { opacity: 1; transform: none; }
.st-reader1.st-pbar-on .bar, .st-reader1.st-pbar-on .listen,
.st-reader1.st-vopen .bar, .st-reader1.st-vopen .listen { opacity: 0; transform: translateY(14px); }
.st-ptile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 9px 4px; border-radius: 14px; background: #F2EFEA; color: #1C1B1A;
  transition: background-color .25s ease, color .25s ease;
}
.st-ptile b { font-size: 15px; font-weight: 700; line-height: 20px; }
.st-ptile i { width: 20px; height: 20px; display: block; }
.st-ptile small { font-size: 11px; color: #6B6760; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.st-reader1.st-bgm-on .st-ptile-bgm { background: #F8E3D9; color: #D9643A; }
.st-reader1.st-bgm-on .st-ptile-bgm small { color: #D9643A; font-weight: 600; }

/* Two-step Voice → Language picker sheet (ZERO horizontal pills!) */
.st-vdim {
  position: absolute; inset: 0; z-index: 5; background: rgba(28, 27, 26, .22);
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.st-vsheet {
  position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; height: 396px; overflow: hidden;
  background: #FAF8F5; border-radius: 28px 28px 0 0; padding: 10px 20px 26px; font-family: var(--sans);
  box-shadow: 0 -10px 30px rgba(28, 27, 26, .16);
  transform: translateY(105%); transition: transform .38s var(--ease);
}
.st-reader1.st-vopen .st-vdim { opacity: 1; }
.st-reader1.st-vopen .st-vsheet { transform: none; }
.st-vp {
  position: absolute; left: 20px; right: 20px; top: 28px; bottom: 20px;
  transition: transform .36s var(--ease), opacity .28s ease;
}
.st-vp2 { transform: translateX(108%); opacity: 0; }
.st-reader1.st-vstep2 .st-vp1 { transform: translateX(-28%); opacity: 0; }
.st-reader1.st-vstep2 .st-vp2 { transform: none; opacity: 1; }
.st-vhead { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.st-vhead b { font-size: 20px; font-weight: 700; color: #1C1B1A; }
.st-vback { width: 22px; height: 22px; color: #D9643A; flex: none; }
.st-vlang-row {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 14px;
  border-radius: 14px; background: #FFFFFF; box-shadow: 0 0 0 .5px rgba(28, 27, 26, .08);
  font-size: 15px; color: #1C1B1A;
}
.st-vlang-row > svg { width: 18px; height: 18px; color: #D9643A; flex: none; }
.st-vlang-row > span { flex: 1; font-weight: 600; }
.st-vlang-row em { font-style: normal; color: #6B6760; font-size: 14.5px; }
.st-vlang-row .st-vl-b { display: none; }
.st-reader1.st-vyue .st-vlang-row .st-vl-a { display: none; }
.st-reader1.st-vyue .st-vlang-row .st-vl-b { display: inline; color: #D9643A; font-weight: 600; }
.st-vchev { width: 16px; height: 16px; color: #A8A39A; flex: none; }
.st-vlist, .st-vllist { background: #FFFFFF; border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 .5px rgba(28, 27, 26, .06); }
.st-vlist-b { display: none; }
.st-reader1.st-vyue .st-vlist-a { display: none; }
.st-reader1.st-vyue .st-vlist-b { display: block; }
.st-vrow, .st-vlrow {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
}
.st-vrow + .st-vrow, .st-vlrow + .st-vlrow { border-top: 1px solid #EFEAE2; }
.st-vrow > span, .st-vlrow > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-vrow b, .st-vlrow b { font-size: 15.5px; font-weight: 600; color: #1C1B1A; }
.st-vrow small, .st-vlrow small { font-size: 12.5px; color: #6B6760; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-vchk, .st-vlchk { width: 18px; height: 18px; color: #D9643A; flex: none; }
.st-vsec { margin: 0 4px 8px !important; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: #6B6760; text-transform: uppercase; }
.st-vlrow em { font-style: normal; font-size: 12.5px; color: #A8A39A; padding: 2px 8px; border-radius: 999px; background: #F2EFEA; }
.st-vlrow:not(.st-vl-active) .st-vlchk { opacity: 0; }
.st-reader1.st-vstep2 .st-vl-yue { background: #F8E3D9; }
.st-reader1.st-vstep2 .st-vl-yue b { color: #D9643A; }

/* translate: compact Translation options popover (Bilingual / Translation only, Standard / Best, Cantonese) */
.st-tropts {
  position: absolute; z-index: 5; top: 100px; right: 16px; width: 256px; padding: 10px 12px;
  border-radius: 18px; background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 0 0 .5px rgba(28, 27, 26, .08), 0 14px 32px rgba(28, 27, 26, .16);
  font-family: var(--sans); color: #1C1B1A;
  opacity: 0; transform: translateY(-10px) scale(.96); transform-origin: 85% 0%; pointer-events: none;
  transition: opacity .3s ease, transform .35s var(--ease);
}
.st-reader2.st-opts-on .st-tropts { opacity: 1; transform: none; }
.st-topt-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 4px; font-size: 12.5px; color: #6B6760; }
.st-topt-row.st-topt-on { color: #1C1B1A; font-weight: 600; }
.st-topt-row i { width: 15px; height: 15px; color: #D9643A; flex: none; }
.st-tropts hr { border: 0; border-top: 1px solid #EFEAE2; margin: 7px 0; }
.st-topt-tier { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px; font-size: 12.5px; color: #6B6760; }
.st-tseg { display: inline-flex; padding: 2px; border-radius: 999px; background: #F2EFEA; gap: 2px; }
.st-tseg em { font-style: normal; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: #6B6760; transition: background-color .25s ease, color .25s ease; }
.st-tseg .st-ts-std { background: #FFFFFF; color: #1C1B1A; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.st-reader2.st-best-on .st-ts-std { background: transparent; color: #6B6760; box-shadow: none; }
.st-reader2.st-best-on .st-ts-best { background: #D9643A; color: #FFFFFF; }
.st-topt-yue {
  display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 10px;
  font-size: 12px; transition: background-color .25s ease;
}
.st-topt-yue svg { width: 14px; height: 14px; color: #D9643A; flex: none; }
.st-topt-yue b { font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-topt-yue em { font-style: normal; font-size: 11px; color: #D9643A; background: #F8E3D9; padding: 2px 6px; border-radius: 6px; flex: none; }
.st-reader2.st-best-on .st-topt-yue { background: #FAF3EE; }

/* finish: dictated review & filled stars */
.st-stars svg { transition: color .25s ease, fill .25s ease; }
.st-end.st-rated .st-stars svg { color: #E8B04B; fill: #E8B04B; }
.st-end.st-rated .st-stars span { opacity: 0; }
.st-rv-text {
  display: none; margin: 14px 0 0 !important; font-size: 15.5px; line-height: 1.45; color: #1C1B1A;
}
.st-end.st-dictating .st-ph { display: none; }
.st-end.st-dictating .st-rv-text { display: block; }
.st-end.st-dictating .st-rv-mic { color: #D9643A; }
.st-end.st-dictating .st-save { background: #D9643A; }

/* everywhere: the desktop app's window beside the phone (scripts/story.mjs → desktopOverlay, after the real library page).
   Everything in it is sized from the window's own width (cqw), so it is the same window at any size. A book is dropped
   on it (.st-desk-dropping, then .st-desk-dropped), flies to the phone (story.js places .st-desk-fly from where the book
   is in the window to where it is on the phone) and is lit there (.st-synced). */
.st-desk { position: absolute; z-index: 3; pointer-events: none; left: 0; top: 50%; transform: translateY(-50%); width: 78%; font-family: var(--sans); }
.st-desk-win {
  position: relative; width: 100%; border-radius: 12px; background: #FAF8F5; color: #1C1B1A; overflow: hidden; container-type: inline-size;
  box-shadow: 0 24px 54px rgba(0, 0, 0, .3), 0 0 0 .5px rgba(28, 27, 26, .12);
  opacity: 0; transform: translateY(-8px) scale(.97); transition: opacity .35s ease, transform .4s ease;
}
.st-desk.st-desk-on .st-desk-win { opacity: 1; transform: none; }
.st-desk-bar { display: flex; align-items: center; gap: 1cqw; padding: 1.5cqw 1.8cqw; background: #F2EFEA; }
.st-desk-bar i.d { width: 1.7cqw; height: 1.7cqw; border-radius: 50%; flex: none; }
.st-desk-bar i.d:nth-child(1) { background: #ED6A5E; }
.st-desk-bar i.d:nth-child(2) { background: #F4BF4F; }
.st-desk-bar i.d:nth-child(3) { background: #61C554; }
.st-desk-top { display: flex; align-items: center; padding: 1.5cqw 3cqw; border-bottom: 1px solid #EFEAE2; }
.st-desk-name { display: inline-flex; align-items: center; gap: 1.2cqw; flex: 1; }
.st-desk-name img { width: 3.6cqw; height: 3.6cqw; border-radius: .9cqw; }
.st-desk-name b { font-size: 2.3cqw; font-weight: 700; }
.st-desk-tabs { display: flex; gap: .6cqw; font-size: 1.9cqw; }
.st-desk-tabs em, .st-desk-chips em { font-style: normal; padding: .7cqw 1.7cqw; border-radius: 999px; color: #6B6760; white-space: nowrap; }
.st-desk-tabs em.on { background: #F2EFEA; color: #1C1B1A; font-weight: 600; }
.st-desk-tools { flex: 1; display: flex; justify-content: flex-end; color: #1C1B1A; }
.st-desk-tools svg { width: 2.6cqw; height: 2.6cqw; }
.st-desk-head { display: flex; align-items: center; gap: 1.3cqw; padding: 2.8cqw 3cqw 1.4cqw; }
.st-desk-head > b { margin-right: auto; font-family: var(--serif); font-size: 5.2cqw; font-weight: 700; line-height: 1.1; }
.st-desk-find { display: flex; align-items: center; gap: 1cqw; width: 23cqw; height: 5cqw; padding: 0 1.6cqw; border-radius: 999px; background: #FFFFFF; box-shadow: inset 0 0 0 1px #E7E2DA; font-size: 1.7cqw; color: #A8A39A; overflow: hidden; white-space: nowrap; }
.st-desk-find em { font-style: normal; overflow: hidden; text-overflow: ellipsis; }
.st-desk-ask, .st-desk-add { display: inline-flex; align-items: center; gap: .8cqw; height: 5cqw; padding: 0 2cqw; border-radius: 999px; font-size: 1.8cqw; font-weight: 600; white-space: nowrap; }
.st-desk-ask { background: #FFFFFF; box-shadow: inset 0 0 0 1px #E7E2DA; }
.st-desk-add { background: #D9643A; color: #FFFFFF; }
.st-desk-head svg { width: 2.1cqw; height: 2.1cqw; flex: none; }
.st-desk-chips { display: flex; align-items: center; gap: .5cqw; padding: .6cqw 3cqw 2.2cqw; font-size: 1.7cqw; }
.st-desk-chips em.on { background: #FFFFFF; box-shadow: 0 0 0 1px #E7E2DA; color: #1C1B1A; font-weight: 600; }
.st-desk-chips span { margin-left: auto; padding: .7cqw 1.7cqw; border-radius: 999px; box-shadow: inset 0 0 0 1px #E7E2DA; color: #1C1B1A; }
.st-desk-grid { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.6cqw; padding: 0 3cqw 3.4cqw; }
.st-dbook { display: flex; flex-direction: column; gap: .5cqw; min-width: 0; }
.st-dbook .st-cover { aspect-ratio: 2 / 3; border-radius: 1cqw; box-shadow: 0 .6cqw 1.6cqw rgba(0, 0, 0, .16); }
.st-dbook > b { margin-top: .6cqw; font-family: var(--serif); font-size: 2cqw; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-dbook > small { font-size: 1.6cqw; color: #6B6760; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-dbook-new { opacity: 0; transform: scale(.8); transition: opacity .28s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.st-desk.st-desk-dropped .st-dbook-new { opacity: 1; transform: none; }
/* the book being dropped: over the first place in the grid, coming down onto it */
.st-desk-drop {
  position: absolute; left: 3cqw; top: 0; width: calc((100% - 6cqw - 7.8cqw) / 4); aspect-ratio: 2 / 3;
  opacity: 0; transform: translate(-26%, -34%) rotate(-8deg) scale(1.12); transition: opacity .22s ease, transform .45s var(--ease);
}
.st-desk-drop .st-cover { width: 100%; height: 100%; border-radius: 1cqw; box-shadow: 0 1.6cqw 3.2cqw rgba(217, 100, 58, .4), 0 0 0 2px #D9643A; }
.st-desk.st-desk-dropping .st-desk-drop { opacity: 1; transform: translate(-3%, -4%) rotate(-2deg); }
.st-desk.st-desk-dropping .st-desk-drop .st-ext-ring { animation: ring .7s ease-out infinite; }
.st-desk-fly { position: absolute; left: 0; top: 0; width: 60px; aspect-ratio: 2 / 3; opacity: 0; pointer-events: none; transform-origin: 50% 50%; transition: opacity .2s ease; }
.st-desk-fly .st-cover { width: 100%; height: 100%; border-radius: 6px; box-shadow: 0 12px 26px rgba(217, 100, 58, .32), 0 0 0 2px #D9643A; }
.st-desk.st-desk-flying .st-desk-fly { opacity: 1; }
.st-library.st-synced .st-book:first-child { transform: translateY(-6px) scale(1.04); }
.st-library.st-synced .st-book:first-child .st-cover { box-shadow: 0 0 0 2.5px #D9643A, 0 14px 28px rgba(217, 100, 58, .34); }
/* in the hero the window is a real size: wide, it reaches out of the film to the left and the film moves over for it */
@media (min-width: 901px) {
  .hv { --dw: clamp(420px, 44vw, 720px); }
  .hv .st-desk { left: auto; right: 49%; width: var(--dw); } /* its right edge just short of the phone */
  .hv-film { transition: opacity .3s ease, visibility 0s linear .3s, translate .5s var(--ease); }
  .hv-film.on { transition: opacity .3s ease, visibility 0s, translate .5s var(--ease); }
  .hv[data-scene="everywhere"] .hv-film { translate: calc(var(--dw) * .36) 0; }
}

@media (max-width: 900px) {
  .st-brand { font-size: 24px; margin-bottom: 16px; } .st-brand img { width: 44px; height: 44px; border-radius: 12px; }
  .st-scenes { left: 0; right: 0; top: 0; bottom: 0; width: auto; transform: none; aspect-ratio: auto; border-radius: 22px; }
  .st-art img { object-position: 0% 50%; }
  .phone.st-phone { right: var(--st-side, 22px); }
  .st-bubble { font-size: 13px; max-width: 54%; padding: 8px 11px; }
  .st-talk { left: 0; right: 0; top: 0; bottom: 0; width: auto; transform: none; aspect-ratio: auto; }
  .st-say-you { left: 10px; top: 10px; }
  .st-say-app { left: 10px; bottom: 10px; max-width: 54%; font-size: 13px; }
  .st-bud { left: 40%; top: 10px; width: 44px; height: 44px; padding: 6px; }
  .st-bud svg { width: 32px; height: 32px; }
  .st-ext { left: 0; right: 0; top: 0; bottom: 0; width: auto; transform: none; aspect-ratio: auto; padding: 10px 48% 0 10px; }
  .st-ext-win { border-radius: 10px; }
  .st-ext-bar { padding: 4px 5px 4px 6px; gap: 3px; }
  .st-ext-bar i.d { width: 4.5px; height: 4.5px; }
  .st-ext-addr { font-size: 9px; padding: 1.5px 6px; }
  .st-ext-btn { width: 18px; height: 18px; }
  .st-ext-btn img { width: 13px; height: 13px; }
  .st-ext-web { grid-template-columns: 1fr 38px; gap: 6px; padding: 8px 9px 9px; min-height: 80px; }
  .st-ext-art b { font-size: 11px; }
  .st-ext-art small { font-size: 8px; }
  .st-ext-thumb { width: 38px; height: 48px; }
  .st-ext-pop { right: 4px; top: 26px; width: 76%; border-radius: 9px; }
  .st-ext-head { padding: 4px 6px; }
  .st-ext-head img { width: 12px; height: 12px; }
  .st-ext-head b { font-size: 9.5px; }
  .st-ext-pane { padding: 6px; gap: 4px; }
  .st-ext-save { height: 22px; font-size: 9px; }
  .st-ext-ss { font-size: 8.5px; }
  .st-ext-done b { font-size: 9.5px; }
  .st-ext-fly { width: 46px; height: 64px; }
  .st-ed-bar { padding: 4px 5px; gap: 3px; }
  .st-ed-bar b { font-size: 8.5px; }
  .st-ed-tool { display: none; }
  .st-ed-cloud { height: 17px; padding: 0 5px; font-size: 8px; }
  .st-ed-canvas { padding: 6px 8px; }
  .st-ed-page { padding: 6px 7px 4px; gap: 3px; }
  .st-ed-page b { font-size: 9.5px; }
  /* in the hero, on a small screen, what is beside the phone is stacked with it (story.js makes the room): the browser
     window and the desktop app's window above the phone, at the stage's full width; what is said under it */
  .hv .st-ext { padding: 0; }
  .hv .st-desk { left: 0; right: 0; top: 0; width: auto; transform: none; }
  .hv .st-talk { display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 8px; padding: 0 2px; }
  .hv .st-bubble { position: static; max-width: 94%; font-size: 14px; }
  .hv .st-say-you { align-self: flex-end; }
}
@media (max-width: 700px) {
  .hv-caps { padding: 18px 14px 0; }
  .hv-title .st-brand { margin-bottom: 12px; }
  .hv-title h1 { font-size: clamp(32px, 10.2vw, 44px); margin-bottom: 12px; }
  .hv-sub { font-size: 16.5px; margin-bottom: 18px; }
  .hv-line { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  .st-scene, .st-scene-formats .st-art-b, .st-scene-translate .st-art-b, .st-scene-finish .st-art-b, .st-act, .st-app .st-scr, .st-bubble, .st-bud, .st-book, .st-ext-win, .st-ext-pop, .st-ext-fly, .st-folder-box, .st-fm3, .st-folder-dot, .st-desk-win, .st-desk-fly, .st-desk-ways, .st-way, .st-pbar, .st-bgm-waves, .st-vsheet, .st-vp, .st-tropts, .st-morig, .st-mtrans, .st-brw-sh, .st-brw-aa, .st-brw-web, .st-brw-reader, .st-brw-article, .st-brw-tr, .st-brw-s, .st-brw-tr-btn, .st-brw-listen i, .st-brw-saved-bar, .st-pdf-pill, .st-pdf-conv { transition: none !important; }
  .st-scene .st-art, .st-fx::before, .st-fx::after, .st-bgm-waves i, .st-browser.st-brw-play .st-brw-listen .wv path, .st-browser.st-brw-play .st-brw-listen::after { animation: none !important; }
  .st-fx, .st-confetti { display: none; }
  .hv-cap, .hv-set, .hv-film, .hv-phone, .hv-act, .hv-big, .hv-stage { transition: none !important; }
  .hv-cat, .hv-cat *, .hv-hint { animation: none !important; }
  .st-end-title span, .st-stamp, .st-days em, .st-mcard, .st-mpic img, .st-glow, .st-mdim, .st-ach .ach-name-pill { transition: none !important; }
}
