/* Standalone "How to use" page (/howto/) + modal sheet (generated from web/src/app.css by scripts/build-howto.mjs). */
:root {
  --shadow-cover: 0 8px 24px rgba(28, 27, 26, 0.12);
  --shadow-pop: 0 14px 36px rgba(28, 27, 26, 0.18);
}
@media (prefers-color-scheme: dark) {
  :root { --shadow-cover: 0 8px 24px rgba(0, 0, 0, 0.4); --shadow-pop: 0 14px 36px rgba(0, 0, 0, 0.55); }
}
.ht-main { min-height: calc(100svh - 140px); }
.ht-page { padding: 56px 0 88px; }
.ht-page h1 { margin: 0 0 28px; font-size: clamp(32px, 4.5vw, 44px); }
.ht-site-seg {
  display: grid; grid-template-columns: 1fr 1fr; width: min(280px, 100%); margin: 0 auto 28px; padding: 4px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--hairline);
}
.ht-site-seg button {
  border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 15px; font-weight: 500;
  padding: 8px 16px; border-radius: 999px; cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease;
}
.ht-site-seg button.on { background: var(--ink); color: var(--bg); font-weight: 600; }
.ht-site-list { max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.ht-site-list[hidden] { display: none; }
.ht-site-group { display: flex; flex-direction: column; gap: 7px; padding: 0; margin: 0; }
.ht-site-ghead { margin: 0 0 0 16px; font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--ink-2); letter-spacing: 0.01em; }
.ht-site-foot { max-width: 680px; margin: 20px auto 0; }
.ht-site-card { background: var(--surface); border-radius: 18px; overflow: hidden; border: 1px solid var(--hairline); }
.ht-site-row {
  display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box; border: 0; background: none; color: var(--ink);
  font: inherit; font-size: 16px; font-weight: 500; padding: 15px 18px; text-align: left; text-decoration: none; cursor: pointer;
  transition: background-color 0.15s ease;
}
.ht-site-row:hover { background: var(--surface-alt); }
.ht-site-row + .ht-site-row { border-top: 1px solid var(--hairline); }
.ht-site-row .icon { width: 16px; height: 16px; margin-left: auto; color: var(--ink-3); flex: none; }
.ht-site-prem { margin-left: auto; font-size: 14px; font-weight: 400; color: var(--ink-2); }
.ht-site-prem + .icon { margin-left: 0; }
dialog.modal {
  padding: 0; border: 1px solid var(--hairline); border-radius: 22px; background: var(--bg); color: var(--ink);
  box-shadow: var(--shadow-lg); margin: auto;
}
dialog.modal::backdrop { background: rgba(18, 17, 16, 0.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal .icon { width: 18px; height: 18px; display: block; flex: none; }
.modal .icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: transparent; color: var(--ink-2); cursor: pointer;
}
.modal .icon-btn:focus { outline: none; }
.modal .icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.modal .icon-btn:hover { background: var(--surface-alt); color: var(--ink); }
.modal .muted { color: var(--ink-2); }

/* ---------- How to use (views/howto.js, views/howto-scenes.js; docs/onboarding.md → How to use) */
.howto-open .icon, .howto-row > .icon { width: 16px; height: 16px; margin-left: auto; color: var(--ink-3); }
.howto-premium + .icon { margin-left: 0; }
.modal.howto-modal { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--bg); }
.howto-list { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px 20px; }
.howto-group { display: flex; flex-direction: column; gap: 6px; }
.howto-ghead { margin: 0 0 0 14px; font-family: var(--sans); font-size: 12.5px; font-weight: 500; color: var(--ink-2); letter-spacing: 0.01em; }
.howto-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.howto-sheet-head h2 { font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.25; margin: 0; }
.howto-head-tools { display: flex; gap: 4px; }
.howto-row { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; color: var(--ink); padding: 13px 16px; font-size: 15px; text-align: left; cursor: pointer; }
.howto-row:hover { background: var(--surface-alt); }
.set-card > .howto-row + .howto-row { border-top: 1px solid var(--hairline); }
.howto-premium { margin-left: auto; font-size: 13.5px; }
.modal.howto-sheet { width: min(640px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--bg); }
.howto-sheet-body { display: flex; flex-direction: column; gap: 16px; padding: 16px 20px 24px; }
.howto-line { position: relative; text-align: center; }
.howto-line p { margin: 0 auto; max-width: 480px; font-size: 16px; line-height: 1.5; }
.howto-copied { position: absolute; left: 50%; top: 50%; translate: -50% -50%; background: var(--ink); color: var(--bg); border-radius: 999px; padding: 6px 14px; font-size: 14px; white-space: nowrap; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.howto-copied.on { opacity: 1; }
.howto-take { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.howto-take:empty { display: none; }
.howto-pill { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; min-height: 52px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-size: 17px; font-weight: 600; cursor: pointer; transition: scale 0.12s, background 0.15s; }
.howto-pill:hover { background: var(--surface-alt); }
.howto-pill:active { scale: 0.97; }
.howto-pill.address { font-size: 20px; }
.howto-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.howto-pill .icon { width: 18px; height: 18px; color: var(--ink-3); }
.howto-note { margin: 0; font-size: 14px; text-align: center; }

/* the animation: a 520 × 350 stage scaled to the sheet; the web app's screens in miniature */
.ht-box { position: relative; width: 100%; aspect-ratio: 520 / 350; overflow: hidden; border-radius: 16px; background: var(--surface-alt); }
.ht-stage {
  position: absolute; left: 0; top: 0; width: 520px; height: 350px; transform-origin: 0 0; overflow: hidden;
  --rbg: #FFFFFF; --rink: #1C1B1A; --rink2: #6B6760; --rline: #ECE8E1; --rhover: #F2EFEA; --tts: #D9643A33; --sel: rgba(217, 100, 58, 0.22); --hl: rgba(246, 211, 101, 0.55);
  --bezel: #1D1D1F; --edge: rgba(0, 0, 0, 0.12); --deck: linear-gradient(#DAD6CF, #B8B3AB);
  font-family: var(--sans); color: var(--ink); line-height: 1.3; user-select: none; -webkit-user-select: none;
}
@media (prefers-color-scheme: dark) {
  .ht-stage { --rbg: #121110; --rink: #D9D4CB; --rink2: #A39E95; --rline: #2E2C29; --rhover: #262421; --tts: #F07A4F40; --sel: rgba(240, 122, 79, 0.35); --hl: rgba(246, 211, 101, 0.35); --bezel: #33312E; --edge: rgba(255, 255, 255, 0.1); --deck: linear-gradient(#3A3936, #2A2927); }
}
.ht-stage .icon { width: 10px; height: 10px; }
.ht-scene, .ht-dev, .ht-sc { position: absolute; inset: 0; }
.ht-laptop { position: absolute; left: 30px; top: 14px; width: 460px; }
.ht-lid { width: 460px; height: 300px; padding: 7px; border-radius: 14px 14px 6px 6px; background: var(--bezel); box-shadow: 0 0 0 1px var(--edge); }
.ht-screen { position: relative; width: 446px; height: 286px; border-radius: 7px; overflow: hidden; background: var(--bg); }
.ht-base { position: relative; width: 520px; height: 12px; margin-left: -30px; border-radius: 1px 1px 10px 10px; background: var(--deck); }
.ht-base i { position: absolute; left: 50%; top: 0; width: 70px; height: 4px; translate: -50% 0; border-radius: 0 0 5px 5px; background: rgba(0, 0, 0, 0.14); }
.ht-win { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.ht-chrome { position: relative; flex: none; height: 22px; display: flex; align-items: center; gap: 4px; padding: 0 8px; background: var(--surface-alt); border-bottom: 1px solid var(--hairline); }
.ht-chrome > i { width: 7px; height: 7px; border-radius: 50%; background: #FF5F57; }
.ht-chrome > i:nth-child(2) { background: #FEBC2E; } .ht-chrome > i:nth-child(3) { background: #28C840; }
.ht-addr { position: absolute; left: 50%; translate: -50% 0; width: 170px; height: 14px; border-radius: 7px; background: var(--bg); color: var(--ink-2); font-size: 7.5px; line-height: 14px; text-align: center; }
.ht-dl { position: absolute; right: 9px; top: 5px; color: var(--ink-3); }
.ht-dl.on { color: var(--accent); }
.ht-view { position: relative; flex: 1; overflow: hidden; }
.ht-app { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); }

/* the web app: header, Library */
.ht-top { flex: none; height: 30px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border-bottom: 1px solid var(--hairline); font-size: 8px; }
.ht-brand { display: flex; align-items: center; gap: 5px; font-weight: 650; font-size: 9.5px; }
.ht-brand img { width: 15px; height: 15px; border-radius: 4px; }
.ht-nav { display: flex; gap: 2px; color: var(--ink-2); }
.ht-nav span { padding: 2px 7px; border-radius: 999px; }
.ht-nav .on { color: var(--ink); font-weight: 650; background: var(--surface-alt); }
.ht-right { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.ht-av { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.ht-av .icon { width: 11px; height: 11px; }
.ht-body { position: relative; flex: 1; padding: 12px 14px; }
.ht-faded { opacity: 0.6; }
.ht-ghost { height: 38px; margin-top: 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--hairline); }
.ht-libhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.ht-h1 { font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.1; letter-spacing: -0.01em; }
.ht-acts { display: flex; gap: 6px; }
.ht-btn { display: inline-flex; align-items: center; gap: 3px; height: 18px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--surface); color: var(--ink); font-size: 7.5px; font-weight: 550; white-space: nowrap; transition: scale 0.1s; }
.ht-btn .icon { width: 9px; height: 9px; }
.ht-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.ht-btn.small { height: 16px; padding: 0 7px; font-size: 7px; }
.ht-stage .down { scale: 0.92; filter: brightness(0.94); }
.ht-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ht-search { display: flex; align-items: center; gap: 4px; width: 150px; height: 18px; padding: 0 7px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--surface); color: var(--ink-3); }
.ht-search .icon { width: 8px; height: 8px; }
.ht-search i { font-style: normal; font-size: 7px; white-space: nowrap; overflow: hidden; }
.ht-segs { display: flex; gap: 1px; padding: 2px; border-radius: 999px; background: var(--surface-alt); font-size: 7px; color: var(--ink-2); }
.ht-segs > * { padding: 2px 7px; border-radius: 999px; }
.ht-segs b { background: var(--surface); color: var(--ink); font-weight: 600; }
.ht-slot { position: absolute; left: 0; top: 80px; width: 62px; }
.ht-cv { width: 62px; height: 92px; border-radius: 3px; background: center / cover no-repeat; box-shadow: var(--shadow-cover); }
.ht-cvf { padding: 7px 6px; color: #fff; overflow: hidden; }
.ht-cvf b { display: block; font-family: var(--serif); font-size: 7.5px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.ht-bt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 5px; font-family: var(--serif); font-size: 7.5px; font-weight: 600; line-height: 1.25; }
.ht-ba { display: block; font-size: 6.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-dim { position: absolute; inset: 0; background: rgba(18, 17, 16, 0.32); opacity: 0; }
.ht-dim.on { opacity: 1; }
.ht-panel { position: absolute; left: 50%; top: 0; width: 250px; padding-bottom: 8px; border-radius: 0 0 9px 9px; background: var(--surface); box-shadow: var(--shadow-pop); opacity: 0; }
.ht-panelbar { display: flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px; border-bottom: 1px solid var(--hairline); color: var(--ink-3); }
.ht-panelpath { display: grid; place-items: center end; margin-left: auto; width: 70px; height: 12px; padding: 0 4px; border-radius: 6px; background: var(--surface-alt); }
.ht-panelpath .icon { width: 7px; height: 7px; }
.ht-frow { display: flex; align-items: center; gap: 6px; height: 22px; margin: 0 4px; padding: 0 6px; border-radius: 5px; font-size: 7.5px; }
.ht-panelbar + .ht-frow { margin-top: 4px; }
.ht-frow .icon { width: 11px; height: 11px; color: var(--ink-3); }
.ht-frow.on { background: var(--accent-soft); }
.ht-panelfoot { display: flex; justify-content: flex-end; gap: 5px; padding: 8px 10px 0; }

/* a phone with the app's Library */
.ht-phone { position: absolute; left: 176px; top: 3px; width: 168px; height: 344px; padding: 5px; border-radius: 30px; background: var(--bezel); box-shadow: 0 0 0 1px var(--edge); }
.ht-pscr { position: relative; width: 158px; height: 334px; border-radius: 25px; overflow: hidden; background: var(--bg); }
.ht-island { position: absolute; left: 50%; top: 7px; width: 46px; height: 13px; translate: -50% 0; border-radius: 7px; background: #000; }
.ht-sb { position: absolute; left: 18px; top: 8px; font-size: 7.5px; font-weight: 600; }
.ht-ph1 { position: absolute; left: 8px; top: 30px; font-family: var(--serif); font-size: 20px; font-weight: 600; }
.ht-pplus { position: absolute; right: 8px; top: 33px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-alt); color: var(--accent); font-size: 14px; line-height: 20px; text-align: center; }
.ht-pills { position: absolute; left: 8px; top: 58px; display: flex; gap: 4px; font-size: 6px; }
.ht-pills > * { padding: 2px 6px; border-radius: 999px; background: var(--surface-alt); color: var(--ink-2); }
.ht-pills b { background: var(--ink); color: var(--bg); font-weight: 600; }
.ht-pslot { position: absolute; left: 0; top: 80px; width: 43px; }
.ht-pslot .ht-cv { width: 43px; height: 64px; }
.ht-pslot .ht-bt { font-size: 6px; }
.ht-pslot .ht-ba { font-size: 5.5px; }
.ht-drag { position: absolute; left: 0; top: 0; z-index: 10; }
.ht-file { display: inline-flex; align-items: center; gap: 4px; max-width: 150px; padding: 3px 7px 3px 4px; border-radius: 6px; background: var(--surface); color: var(--ink); font-size: 8px; font-weight: 600; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2); }
.ht-file em { flex: none; padding: 1px 4px; border-radius: 3px; color: #fff; font-style: normal; font-size: 6.5px; font-weight: 700; }
.ht-file em.pdf { background: #C2453A; } .ht-file em.epub { background: #2E7D4F; }
.ht-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ht-drop { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; }
.ht-dropcard { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 26px; border-radius: 14px; border: 1.5px dashed var(--accent); background: var(--surface); box-shadow: var(--shadow-pop); text-align: center; }
.ht-dropcard .icon { width: 16px; height: 16px; color: var(--accent); }
.ht-dropcard b { font-size: 8.5px; font-weight: 600; }
.ht-dropcard small { font-size: 6.5px; color: var(--ink-2); }

/* the reader, its player bar, the answer card */
.ht-rd { background: var(--rbg); color: var(--rink); }
.ht-rtop { flex: none; display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px; border-bottom: 1px solid var(--rline); }
.ht-rtop > .icon { width: 11px; height: 11px; }
.ht-rtitle { flex: 1; min-width: 0; font-family: var(--serif); font-size: 9.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-tools { display: flex; align-items: center; gap: 1px; }
.ht-tool { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; transition: scale 0.1s; }
.ht-tool .icon { width: 10.5px; height: 10.5px; }
.ht-tool[data-k="more"] { width: 9px; }
.ht-tool[data-k="more"] .icon { width: 7px; height: 7px; rotate: 90deg; }
.ht-tool.on { color: var(--accent); }
.ht-tool.lit { background: var(--accent); color: #fff; }
.ht-rmain { position: relative; flex: 1; overflow: hidden; }
.ht-pgbox { position: absolute; top: 14px; left: 98px; width: 250px; height: 150px; overflow: hidden; }
.ht-pg { height: 150px; column-width: 250px; column-gap: 24px; column-fill: auto; font-family: var(--serif); font-size: 10.5px; line-height: 1.6; }
.ht-pg p { margin: 0 0 6px; }
.ht-pg h6 { margin: 0 0 6px; font-family: var(--serif); font-size: 13px; font-weight: 700; line-height: 1.3; }
.ht-pg .tl { color: var(--rink2); font-size: 8.5px; }
.ht-pg .s { border-radius: 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.ht-pg .s.read { background: var(--tts); }
.ht-pg .s.marked { background: var(--hl); }
.ht-tr .x, .ht-tr .xon .o { display: none; }
.ht-tr .xon .x { display: inline; }
.ht-player { flex: none; height: 0; overflow: hidden; background: var(--rbg); box-shadow: inset 0 1px 0 var(--rline); }
.ht-plin { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px; height: 36px; padding: 0 10px; }
.ht-plinfo { display: flex; flex-direction: column; min-width: 0; }
.ht-plinfo b { font-size: 7.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-plinfo span { font-size: 6px; color: var(--rink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-plctl { display: flex; align-items: center; gap: 5px; }
.ht-plctl .icon { width: 9px; height: 9px; }
.ht-play { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; }
.ht-pltiles { display: flex; justify-content: flex-end; align-items: center; gap: 2px; }
.ht-pltiles > .icon { width: 8px; height: 8px; margin-left: 2px; }
.ht-tile { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 26px; padding: 2px 3px; border-radius: 5px; font-size: 5.5px; white-space: nowrap; transition: color 0.2s; }
.ht-tile .icon { width: 8.5px; height: 8.5px; }
.ht-tile b { font-size: 7px; line-height: 8.5px; font-variant-numeric: tabular-nums; }
.ht-tile.down { background: var(--rhover); }
.ht-tile.flash { color: var(--accent); }
.ht-foot { flex: none; height: 22px; padding: 4px 10px 0; }
.ht-prog { height: 2px; border-radius: 2px; background: var(--rline); }
.ht-prog span { display: block; width: 22%; height: 100%; border-radius: 2px; background: var(--accent); }
.ht-footrow { display: flex; justify-content: space-between; margin-top: 3px; font-size: 6px; color: var(--rink2); }
.ht-ask { position: absolute; top: 0; right: 0; bottom: 0; z-index: 2; width: 172px; display: flex; flex-direction: column; background: var(--rbg); border-left: 1px solid var(--rline); visibility: hidden; }
.ht-askhead { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 4px 9px; }
.ht-askhead b { display: flex; align-items: center; gap: 4px; font-size: 8px; font-weight: 650; }
.ht-askhead b .icon { width: 9px; height: 9px; color: var(--accent); }
.ht-askhead > span { display: flex; gap: 4px; color: var(--rink2); }
.ht-askhead > span .icon { width: 8.5px; height: 8.5px; }
.ht-turns { flex: 1; min-height: 0; padding: 4px 9px; overflow: hidden; }
.ht-q { margin: 0 0 4px; font-size: 7.5px; font-weight: 650; line-height: 1.4; }
.ht-q:empty { display: none; }
.ht-q2 { margin-top: 8px; }
.ht-a { margin: 0; font-size: 7.5px; line-height: 1.55; }
.ht-askin { display: flex; align-items: flex-end; gap: 3px; min-height: 22px; margin: 6px; padding: 3px 3px 3px 8px; border-radius: 10px; background: var(--rhover); }
.ht-field { flex: 1; min-width: 0; min-height: 11px; padding: 2px 0; font-size: 7.5px; line-height: 1.4; }
.ht-field:empty::before { content: attr(data-ph); color: var(--ink-3); }
.ht-mic, .ht-send { flex: none; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; transition: scale 0.1s; }
.ht-mic .icon { width: 9px; height: 9px; }
.ht-mic.on { color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.ht-send { background: var(--accent); color: #fff; }
.ht-send .icon { width: 8px; height: 8px; }
.ht-toast { position: absolute; left: 50%; bottom: 66px; translate: -50% 0; z-index: 5; padding: 4px 10px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 7.5px; white-space: nowrap; box-shadow: var(--shadow-pop); opacity: 0; }

/* the speed dialog */
.ht-dialog { position: absolute; left: 50%; top: 50%; z-index: 5; width: 200px; padding: 12px 14px; border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); opacity: 0; }
.ht-dlgh { font-family: var(--serif); font-size: 11px; font-weight: 600; }
.ht-speedrow { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 6px 0; }
.ht-round { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-alt); font-size: 11px; transition: scale 0.1s; }
.ht-speedv { min-width: 52px; text-align: center; font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ht-range { position: relative; height: 3px; margin: 8px 0 6px; border-radius: 2px; background: var(--hairline); --v: 0.2; }
.ht-range i { position: absolute; left: 0; top: 0; width: calc(var(--v) * 100%); height: 100%; border-radius: 2px; background: var(--accent); }
.ht-range span { position: absolute; top: 50%; left: calc(var(--v) * 100%); width: 9px; height: 9px; translate: -50% -50%; border-radius: 50%; background: var(--accent); }
.ht-marks { display: flex; justify-content: space-between; font-size: 6px; color: var(--accent-ink); }
.ht-dlgact { display: flex; justify-content: flex-end; margin-top: 8px; }

/* selection, highlights, the selection menu */
.ht-selbox, .ht-hlbox { position: absolute; inset: 0; pointer-events: none; }
.ht-selbox i, .ht-hlbox i { position: absolute; border-radius: 1px; }
.ht-selbox i { background: var(--sel); }
.ht-hlbox i { background: var(--hl); mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) { .ht-hlbox i { mix-blend-mode: normal; } }
.ht-sel { position: absolute; left: 50%; z-index: 4; width: max-content; max-width: 380px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 5px; border-radius: 10px; border: 1px solid var(--rline); background: var(--rbg); color: var(--rink); box-shadow: var(--shadow-pop); visibility: hidden; }
.ht-sws { display: flex; gap: 4px; padding: 0 4px 0 1px; }
.ht-sw { width: 14px; height: 14px; border-radius: 50%; background: var(--m); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); transition: scale 0.1s; }
.ht-si { display: inline-flex; align-items: center; gap: 3px; padding: 3px 5px; border-radius: 6px; font-size: 7px; white-space: nowrap; }
.ht-si .icon { width: 9px; height: 9px; }

/* Notes and the browser's download */
.ht-noted { border: 1px solid var(--hairline); border-radius: 10px; overflow: hidden; background: var(--surface); }
.ht-nrow { display: flex; align-items: center; gap: 8px; padding: 7px 9px; }
.ht-nrow + .ht-nrow { border-top: 1px solid var(--hairline); }
.ht-nrow > .icon { width: 8px; height: 8px; color: var(--ink-3); }
.ht-cv.tiny { flex: none; width: 24px; height: 36px; border-radius: 2px; }
.ht-cv.tiny b { display: none; }
.ht-ntext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1.5px; }
.ht-ntext b { font-size: 8px; font-weight: 650; }
.ht-nlatest { font-size: 7px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-nlatest .icon { width: 7px; height: 7px; margin-right: 3px; vertical-align: -1px; color: var(--accent); }
.ht-nlatest mark { background: var(--hl); color: inherit; font-family: var(--serif); }
.ht-ntext small { font-size: 6px; color: var(--ink-2); }
.ht-dlpop { position: absolute; top: 3px; right: 5px; z-index: 5; display: flex; align-items: center; gap: 6px; width: 150px; padding: 7px 8px; border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-pop); opacity: 0; --done: 0; }
.ht-dlpop > .icon { width: 16px; height: 16px; color: var(--ink-2); }
.ht-dlpop > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ht-dlpop b { font-size: 7.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-dlpop i { position: relative; height: 2px; border-radius: 2px; background: var(--hairline); overflow: hidden; }
.ht-dlpop i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--done) * 100%); background: var(--accent); }

/* the PDF viewer */
.ht-pager, .ht-zoom { display: flex; align-items: center; gap: 2px; margin-left: 4px; font-size: 7px; }
.ht-pager .icon, .ht-zoom .icon { width: 8px; height: 8px; }
.ht-pager b { padding: 0 4px; border: 1px solid var(--rline); border-radius: 4px; font-weight: 500; }
.ht-pager span { color: var(--rink2); }
.ht-zoom b { font-weight: 500; }
.ht-pdfmain { background: var(--surface-alt); }
.ht-scan { position: absolute; left: 50%; top: 10px; width: 152px; height: 205px; translate: -50% 0; padding: 7px 9px 10px; background: linear-gradient(168deg, #FAF6EE 0%, #F4EFE4 56%, #EFE9DC 100%); border: 0.5px solid rgba(90, 74, 52, 0.16); box-shadow: inset 7px 0 10px -8px rgba(60, 44, 24, 0.24), 0 2px 10px rgba(0, 0, 0, 0.15); display: flex; flex-direction: column; }
.ht-srun { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 4px; padding-bottom: 3px; margin-bottom: 4px; border-bottom: 0.5px solid rgba(90, 74, 52, 0.24); font-family: var(--serif); font-size: 3.8px; color: #6B6256; }
.ht-srun span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht-scan h6 { flex: none; margin: 0 0 4px; font-family: var(--serif); font-size: 5.8px; font-weight: 700; color: #2F2B26; text-align: center; }
.ht-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; overflow: hidden; }
.ht-cols div { overflow: hidden; font-family: var(--serif); font-size: 3.3px; line-height: 1.55; color: #3E3A34; text-align: justify; }
.ht-sfoot { flex: none; margin-top: 4px; padding-top: 2.5px; border-top: 0.5px solid rgba(90, 74, 52, 0.2); text-align: center; font-family: var(--serif); font-size: 3.8px; color: #6B6256; }
.ht-status { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 8px; color: var(--rink2); opacity: 0; }
.ht-spin { width: 16px; height: 16px; border: 2px solid var(--rline); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
.ht-s2 .ht-rtop .ht-btn { margin-right: 2px; }

/* other apps on the computer: a mail being written, an AI agent's chat */
.ht-mail { position: absolute; inset: 0; background: var(--surface); }
.ht-mailbar { display: flex; justify-content: flex-end; align-items: center; height: 30px; padding: 0 12px; }
.ht-sendbtn { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; transition: scale 0.1s; }
.ht-sendbtn .icon { width: 11px; height: 11px; }
.ht-mailto { display: flex; gap: 6px; margin: 0 16px; padding: 6px 0; border-bottom: 1px solid var(--hairline); font-size: 8.5px; }
.ht-mailto span { color: var(--ink-2); }
.ht-mailto b { font-weight: 600; }
.ht-mailsub { height: 22px; margin: 0 16px; border-bottom: 1px solid var(--hairline); }
.ht-mail .ht-file { margin: 12px 16px 0; scale: 1.2; transform-origin: 0 0; box-shadow: 0 0 0 1px var(--hairline); }
.ht-lines { padding: 14px 16px; }
.ht-lines i { display: block; width: 80%; height: 4px; margin: 7px 0; border-radius: 2px; background: var(--hairline); }
.ht-chat { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.ht-msgs { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; overflow: hidden; }
.ht-me { align-self: flex-end; max-width: 280px; padding: 5px 8px; border-radius: 9px; background: var(--surface-alt); font-size: 8px; line-height: 1.45; white-space: pre-line; }
.ht-pasted { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-height: 40.5px; color: var(--ink-2); font-size: 7px; }
.ht-bot { display: flex; align-items: flex-start; gap: 5px; opacity: 0; }
.ht-ok { display: grid; place-items: center; width: 12px; height: 12px; border-radius: 50%; background: #2E7D4F; color: #fff; }
.ht-ok .icon { width: 8px; height: 8px; }
.ht-shape { display: flex; flex-direction: column; gap: 4px; padding-top: 3px; }
.ht-shape i { display: block; width: 170px; height: 4px; border-radius: 2px; background: var(--hairline); }
.ht-done { font-size: 8.5px; font-weight: 600; }
.ht-chatin { display: flex; align-items: center; gap: 6px; min-height: 30px; margin: 0 14px 10px; padding: 6px 7px 6px 10px; border-radius: 11px; border: 1px solid var(--hairline); background: var(--surface); }
.ht-chatfield { flex: 1; min-width: 0; min-height: 10px; font-size: 8px; }
.ht-chatfield.block { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink-2); font-size: 7px; white-space: pre-line; }
.ht-up { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); color: var(--bg); transition: scale 0.1s; }

/* this sheet, as the AI agent's first beat shows it */
.ht-sheet { position: absolute; left: 50%; top: 16px; width: 240px; translate: -50% 0; padding: 10px 12px 14px; border-radius: 14px; background: var(--bg); box-shadow: var(--shadow-pop); text-align: center; }
.ht-sheethead { display: flex; align-items: center; justify-content: space-between; text-align: left; }
.ht-sheethead b { font-family: var(--serif); font-size: 10px; font-weight: 600; }
.ht-sheetart { height: 70px; margin: 8px 0; border-radius: 8px; background: var(--surface-alt); }
.ht-sheet p { margin: 0 0 9px; font-size: 7.5px; line-height: 1.45; }
.ht-sheetline { position: relative; }
.ht-copied { position: absolute; left: 50%; top: 50%; translate: -50% -60%; padding: 3px 9px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 7px; white-space: nowrap; opacity: 0; }
.ht-pillmini { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--surface); box-shadow: var(--shadow); font-size: 8px; font-weight: 600; transition: scale 0.1s; }
.ht-pillmini .icon { width: 9px; height: 9px; color: var(--ink-3); }

/* the finger's mark: an accent ring with a faint fill, a ring breathing outwards, a light edge so it shows on accent buttons */
/* Save web pages: Chrome, the extension's icon and popup (extension/src/popup), the phone's Read later folder */
.ht-ext { position: absolute; right: 7px; top: 3px; width: 16px; height: 16px; border-radius: 4px; display: grid; place-items: center; transition: scale 0.1s; }
.ht-ext img { width: 12px; height: 12px; border-radius: 3px; }
.ht-wpage { position: absolute; left: 70px; right: 70px; top: 22px; color: var(--ink); }
.ht-wpage h4 { margin: 0; font-family: var(--serif); font-size: 18px; font-weight: 700; }
.ht-wpage small { display: block; margin: 4px 0 10px; color: var(--ink-2); font-size: 7.5px; }
.ht-wpage p { margin: 0; font-family: var(--serif); font-size: 8.5px; line-height: 1.75; }
.ht-xpop { position: absolute; right: 6px; top: 3px; width: 160px; border-radius: 9px; background: var(--surface); box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18), 0 0 0 1px var(--hairline); overflow: hidden; opacity: 0; }
.ht-xbar { display: flex; align-items: center; gap: 4px; padding: 6px 7px; border-bottom: 1px solid var(--hairline); font-size: 7.5px; }
.ht-xbar img { width: 10px; height: 10px; border-radius: 2px; }
.ht-xbar b { flex: 1; }
.ht-xbar .icon { color: var(--ink-2); width: 9px; height: 9px; }
.ht-xpane { display: grid; gap: 5px; padding: 8px 8px 9px; font-size: 7px; }
.ht-xpane[hidden] { display: none; }
.ht-xtitle { font-family: var(--serif); font-size: 9px; line-height: 1.25; }
.ht-xmeta { display: flex; gap: 6px; color: var(--ink-2); font-size: 6.5px; }
.ht-xmeta span { display: inline-flex; align-items: center; gap: 2px; }
.ht-xmeta .icon { width: 7px; height: 7px; }
.ht-xsave { display: flex; align-items: center; justify-content: center; height: 18px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 7.5px; font-weight: 600; transition: scale 0.1s; }
.ht-xss { display: flex; align-items: center; justify-content: center; height: 16px; border-radius: 999px; background: var(--surface-alt); color: var(--ink); border: 0.5px solid var(--hairline); font-size: 7px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; }
.ht-xrun, .ht-xdone { justify-items: center; text-align: center; padding: 12px 8px; }
.ht-xrun b, .ht-xdone b { font-size: 8px; }
.ht-xrun small, .ht-xdone small { color: var(--ink-2); font-size: 6.5px; }
.ht-xspin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent-soft); border-top-color: var(--accent); animation: ht-xspin 0.9s linear infinite; }
@keyframes ht-xspin { to { rotate: 1turn; } }
.ht-xprog { width: 100%; height: 2px; border-radius: 2px; background: var(--surface-alt); overflow: hidden; }
.ht-xprog i { display: block; height: 100%; background: var(--accent); }
.ht-xok { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #2E8B57; background: rgba(46, 139, 87, 0.18); }
.ht-xok .icon { width: 12px; height: 12px; }
.ht-pgrid { position: absolute; left: 9px; right: 9px; top: 80px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 7px; }
.ht-pcell .ht-cv { width: 100%; height: 64px; }
.ht-pcell .ht-bt { font-size: 6px; }
.ht-pfolder { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 4px; height: 64px; border-radius: 6px; background: var(--surface-alt); }
.ht-pfolder .ht-cv.tiny { width: 100%; height: 100%; }
.ht-pfslot.on { border-radius: 2px; background: #E2E8F2; box-shadow: var(--shadow-cover); }
.ht-xfall { position: absolute; left: 0; top: 0; width: 43px; height: 64px; opacity: 0; z-index: 5; }
.ht-xcv { width: 43px; height: 64px; border-radius: 3px; padding: 6px 5px; background: #E2E8F2; box-shadow: var(--shadow-cover); color: #1C1B1A; overflow: hidden; }
.ht-xcv small { display: block; font-size: 3.5px; letter-spacing: 0.04em; color: #6B6760; }
.ht-xcv i { display: block; width: 8px; height: 1.5px; margin: 3px 0 4px; background: #D9643A; }
.ht-xcv b { display: block; font-family: var(--serif); font-size: 6.5px; line-height: 1.2; font-weight: 700; overflow-wrap: anywhere; }

/* Native desktop window title bar (Electron) */
.ht-chrome-app { background: var(--bg); }
.ht-wintitle { position: absolute; left: 50%; translate: -50% 0; font-size: 8px; font-weight: 600; color: var(--ink-2); letter-spacing: 0.01em; }

/* Chrome Screenshot Crop Editor (chrome scene beat 2) */
.ht-edbar { flex: none; height: 24px; display: flex; align-items: center; gap: 6px; padding: 0 10px; background: var(--surface); border-bottom: 1px solid var(--hairline); font-size: 7.5px; }
.ht-edbrand { display: inline-flex; align-items: center; gap: 4px; margin-right: auto; }
.ht-edbrand img { width: 11px; height: 11px; border-radius: 2.5px; }
.ht-edbrand b { font-weight: 650; }
.ht-edchip { padding: 2px 7px; border-radius: 999px; background: var(--surface-alt); color: var(--ink-2); font-size: 6.5px; font-weight: 600; }
.ht-edchip.on { background: var(--accent-soft); color: var(--accent); }
.ht-edcanvas { position: relative; flex: 1; display: grid; place-items: center; background: #262421; overflow: hidden; }
.ht-edpage { position: relative; width: 186px; height: 190px; padding: 10px 12px; border-radius: 3px; background: #FAF8F5; color: #1C1B1A; overflow: hidden; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32); }
.ht-edpage h5 { margin: 0; font-family: var(--serif); font-size: 10px; font-weight: 700; }
.ht-edpage small { display: block; margin: 2px 0 6px; font-size: 5.5px; color: #6B6760; }
.ht-edpage p { margin: 0; font-family: var(--serif); font-size: 6px; line-height: 1.55; color: #2E2C29; display: -webkit-box; -webkit-line-clamp: 9; -webkit-box-orient: vertical; overflow: hidden; }
.ht-edfoot { position: absolute; left: 12px; right: 12px; bottom: 10px; display: flex; flex-direction: column; gap: 4px; padding-top: 6px; border-top: 1px solid #E7E2DA; }
.ht-edfoot i { display: block; width: 65%; height: 4px; border-radius: 2px; background: #D8D2C8; }
.ht-edfoot i:last-child { width: 42%; }
.ht-cropbox { position: absolute; left: 6px; right: 6px; top: 6px; height: 176px; border: 1.5px solid var(--accent); border-radius: 2px; pointer-events: none; z-index: 3; }
.ht-crophdl { position: absolute; left: 50%; bottom: -4px; width: 22px; height: 6px; translate: -50% 0; border-radius: 999px; background: var(--accent); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); }
.ht-cropmask { position: absolute; left: 0; right: 0; top: 182px; bottom: 0; background: rgba(18, 17, 16, 0.56); z-index: 2; pointer-events: none; }
.ht-edsaving, .ht-edsaved { position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 6; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 8px; font-weight: 600; box-shadow: var(--shadow-pop); opacity: 0; pointer-events: none; }

/* Two-step Voice → Language picker (controls scene; zero horizontal pills) */
.ht-vdlg { width: 212px; padding: 10px 12px 12px; }
.ht-vhead { display: flex; align-items: center; gap: 5px; margin-bottom: 7px; }
.ht-vhead2 .icon { width: 9px; height: 9px; color: var(--ink-2); }
.ht-vlang-row { display: flex; align-items: center; gap: 5px; padding: 6px 8px; margin-bottom: 7px; border-radius: 8px; background: var(--surface-alt); font-size: 7.5px; transition: scale 0.1s; }
.ht-vlang-row .icon { width: 9px; height: 9px; color: var(--ink-2); flex: none; }
.ht-vlang-lb { font-weight: 600; color: var(--ink); }
.ht-vlang-val { margin-left: auto; color: var(--ink-2); font-size: 7px; }
.ht-vlist { display: flex; flex-direction: column; gap: 3px; }
.ht-vlist[hidden], .ht-vstep[hidden] { display: none; }
.ht-vrow { display: flex; align-items: center; justify-content: space-between; padding: 5px 7px; border-radius: 7px; font-size: 7.5px; transition: scale 0.1s; }
.ht-vrow > span { display: flex; flex-direction: column; gap: 1px; }
.ht-vrow b { font-weight: 600; color: var(--ink); }
.ht-vrow small { font-size: 6px; color: var(--ink-2); }
.ht-vrow .icon { width: 9px; height: 9px; color: var(--accent); }
.ht-vrow.on { background: var(--accent-soft); }
.ht-vsec { margin: 5px 0 3px; font-size: 6px; font-weight: 600; color: var(--ink-2); }
.ht-vlrow { display: flex; align-items: center; justify-content: space-between; padding: 5px 7px; border-radius: 6px; font-size: 7.5px; color: var(--ink); transition: scale 0.1s; }
.ht-vlrow .icon { width: 8.5px; height: 8.5px; color: var(--accent); }
.ht-vlrow.on { background: var(--accent-soft); font-weight: 600; }

/* Background music download dialog & gentle chapter music waves */
.ht-tile.on { color: var(--accent); background: var(--accent-soft); }
.ht-bgmdlg { width: 206px; }
.ht-bgmbody { margin: 5px 0 8px; font-size: 7.5px; color: var(--ink-2); }
.ht-bgmprog { height: 4px; border-radius: 999px; background: var(--surface-alt); overflow: hidden; opacity: 0; }
.ht-bgmprog i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--accent); }
.ht-bgmwaves { position: absolute; left: 50%; bottom: 8px; translate: -50% 0; display: flex; align-items: center; gap: 3px; height: 18px; padding: 0 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent-soft) 85%, transparent); opacity: 0; pointer-events: none; }
.ht-bgmwaves i { display: block; width: 2px; height: 11px; border-radius: 2px; background: var(--accent); transform-origin: 50% 50%; }

/* Translate options menu & bilingual mode */
.ht-tr.bi .o { display: block; font-size: 8.5px; color: var(--rink2); margin-bottom: 1.5px; }
.ht-tr.bi .x { display: block; }
.ht-trmenu { position: absolute; right: 74px; top: 30px; z-index: 6; width: 162px; padding: 5px; border-radius: 9px; background: var(--surface); border: 1px solid var(--hairline); box-shadow: var(--shadow-pop); opacity: 0; visibility: hidden; font-size: 7px; color: var(--ink); }
.ht-trm-row { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 5px 6px; border-radius: 6px; transition: scale 0.1s; }
.ht-trm-row.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.ht-trm-chk { opacity: 0; display: inline-grid; place-items: center; }
.ht-trm-chk .icon { width: 9px; height: 9px; }
.ht-trm-row.on .ht-trm-chk { opacity: 1; }
.ht-trm-sep { height: 1px; margin: 4px 2px; background: var(--hairline); }
.ht-trm-qual { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 2px; border-radius: 7px; background: var(--surface-alt); }
.ht-tq { text-align: center; padding: 3px 4px; border-radius: 5px; color: var(--ink-2); font-weight: 500; }
.ht-tq.on { background: var(--surface); color: var(--accent); font-weight: 650; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.ht-trm-lang { display: flex; align-items: center; gap: 5px; padding: 4px 6px; color: var(--ink-2); font-size: 6.5px; }
.ht-trm-lang .icon { width: 8px; height: 8px; color: var(--accent); flex: none; }

/* Comics & webtoons vertical strip + bubbles + width stepper */
.ht-cstep { display: inline-flex; align-items: center; gap: 4px; padding: 1px 4px; border-radius: 999px; background: var(--rhover); border: 1px solid var(--rline); font-size: 6.5px; margin-right: 4px; }
.ht-csb { display: grid; place-items: center; width: 13px; height: 13px; border-radius: 50%; background: var(--rbg); font-weight: 700; transition: scale 0.1s; }
.ht-csw { font-variant-numeric: tabular-nums; font-weight: 600; }
.ht-strip-view { position: absolute; inset: 0; display: flex; justify-content: center; align-items: flex-start; background: var(--surface-alt); overflow: hidden; }
.ht-strip-col { flex: none; width: 160px; display: flex; flex-direction: column; gap: 0; will-change: transform, width; }
.ht-cpanel { position: relative; flex: none; width: 100%; aspect-ratio: 780 / 720; line-height: 0; overflow: hidden; }
.ht-cpanel + .ht-cpanel { border-top: 1px solid rgba(28, 27, 26, 0.14); }
.ht-cart { display: block; width: 100%; height: 100%; object-fit: cover; }
.ht-bubble {
  position: absolute; max-width: 48%; min-width: 54px; padding: 5px 8px;
  border-radius: 50% / 44%; background: #FFFFFF; color: #1C1B1A;
  border: 1.2px solid #1D2024; box-shadow: 0 2px 6px rgba(24, 30, 38, 0.15);
  font-size: 6.5px; font-weight: 650; line-height: 1.28; text-align: center;
  white-space: pre-line; transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.ht-bubble::before, .ht-bubble::after { content: ""; position: absolute; pointer-events: none; transition: background-color 0.2s; }
.ht-b-tr::before { bottom: -6px; left: 18%; width: 10px; height: 10px; background: #1D2024; clip-path: polygon(34% 0%, 100% 34%, 0% 100%); }
.ht-b-tr::after { bottom: -4px; left: calc(18% + 1.4px); width: 9px; height: 9px; background: #FFFFFF; clip-path: polygon(30% 0%, 100% 34%, 4% 92%); }
.ht-b-tl::before { bottom: -6px; right: 18%; width: 10px; height: 10px; background: #1D2024; clip-path: polygon(0% 34%, 66% 0%, 100% 100%); }
.ht-b-tl::after { bottom: -4px; right: calc(18% + 1.4px); width: 9px; height: 9px; background: #FFFFFF; clip-path: polygon(0% 34%, 70% 0%, 96% 92%); }
.ht-b1 { right: 5%; top: 9%; }
.ht-b2 { left: 5%; top: 10%; }
.ht-b3 { right: 6%; top: 9%; }
.ht-bubble .ht-btl { display: none; }
.ht-bubble.tr { border-color: #D9643A; box-shadow: 0 2px 8px rgba(217, 100, 58, 0.24); }
.ht-bubble.tr::before { background: #D9643A; }
.ht-bubble.tr .ht-bo { display: none; }
.ht-bubble.tr .ht-btl { display: inline; color: #1C1B1A; }
.ht-bubble.shimmer { background: #FCE9DF; border-color: var(--accent); }
.ht-bubble.shimmer::after { background: #FCE9DF; }
.ht-sttoast { position: absolute; bottom: 10px; left: 50%; translate: -50% 0; z-index: 4; padding: 3px 9px; border-radius: 999px; background: rgba(28, 27, 26, 0.84); color: #FAF8F5; font-size: 6.5px; font-weight: 500; white-space: nowrap; opacity: 0; pointer-events: none; }

/* Library Ask suggestion pill & matching cover highlight */
.ht-sug { display: inline-block; padding: 4px 8px; border-radius: 999px; background: var(--surface-alt); border: 1px solid var(--hairline); font-size: 7px; color: var(--ink); transition: scale 0.1s; }
.ht-slot.ht-match .ht-cv { box-shadow: 0 0 0 2px var(--accent), var(--shadow-cover); }

/* Note editor dialog with black ink mic inside textarea (highlights scene) */
.ht-notedlg { width: 224px; }
.ht-nquote { margin: 5px 0 6px; padding-left: 7px; border-left: 2px solid var(--accent); font-family: var(--serif); font-size: 7px; line-height: 1.35; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ht-nbox { position: relative; min-height: 44px; padding: 6px 22px 6px 8px; border-radius: 8px; background: var(--surface-alt); font-size: 7.5px; line-height: 1.4; color: var(--ink); }
.ht-ntextin:empty::before { content: attr(data-ph); color: var(--ink-3); }
.ht-nmic { position: absolute; right: 5px; bottom: 5px; width: 16px; height: 16px; display: grid; place-items: center; color: var(--ink); transition: scale 0.1s; }
.ht-nmic .icon { width: 10px; height: 10px; }
.ht-nmic.on { color: var(--accent); }
.ht-nlisten { height: 10px; margin-top: 4px; font-size: 6.5px; color: var(--accent); opacity: 0; }

/* Folders jiggle edit mode, folder preview, and desktop right-click context menu */
.ht-delb { position: absolute; left: -5px; top: -5px; z-index: 3; width: 14px; height: 14px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-size: 9px; font-weight: 700; line-height: 1; opacity: 0; transform: scale(0.6); transition: opacity 0.15s, transform 0.15s; }
.ht-fgrid.jiggle .ht-delb { opacity: 1; transform: scale(1); }
.ht-fgrid.jiggle .ht-fslot .ht-cv { animation: ht-jiggle 0.28s ease-in-out infinite alternate; }
@keyframes ht-jiggle { from { rotate: -1.4deg; } to { rotate: 1.4deg; } }
@media (prefers-reduced-motion: reduce) { .ht-fgrid.jiggle .ht-fslot .ht-cv { animation: none; } }
.ht-fslot.ht-drop-target .ht-cv { box-shadow: 0 0 0 2px var(--accent), var(--shadow-cover); transform: scale(1.06); }
.ht-wfolder { width: 62px; height: 92px; padding: 5px; gap: 4px; border-radius: 7px; border: 1px solid var(--hairline); }
.ht-ctx { position: absolute; z-index: 8; width: 118px; padding: 4px; border-radius: 8px; background: var(--surface); border: 1px solid var(--hairline); box-shadow: var(--shadow-pop); opacity: 0; visibility: hidden; }
.ht-ctxrow { display: flex; align-items: center; gap: 5px; padding: 4px 6px; border-radius: 5px; font-size: 7px; color: var(--ink); transition: scale 0.1s; }
.ht-ctxrow .icon { width: 8px; height: 8px; color: var(--ink-2); }
.ht-ctxrow.danger, .ht-ctxrow.danger .icon { color: #C2453A; }

/* End-of-book review & Achievements animal height pile (finish scene) */
.ht-end { flex-direction: row; align-items: center; justify-content: center; gap: 22px; padding: 16px 24px; }
.ht-end-left { position: relative; flex: none; }
.ht-endcv { width: 84px; height: 124px; border-radius: 5px; }
.ht-stamp { position: absolute; left: 50%; top: 50%; translate: -50% -50%; padding: 2px 7px; border-radius: 4px; border: 1.8px solid var(--accent); background: color-mix(in srgb, var(--bg) 90%, transparent); color: var(--accent); font-size: 8px; font-weight: 800; letter-spacing: 0.08em; white-space: nowrap; opacity: 0; }
.ht-end-right { width: 210px; display: flex; flex-direction: column; gap: 7px; }
.ht-endk { font-size: 7px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.ht-endt { font-family: var(--serif); font-size: 13px; font-weight: 700; line-height: 1.2; color: var(--ink); }
.ht-stars { display: flex; gap: 3px; }
.ht-star { color: var(--hairline); transition: color 0.15s; }
.ht-star .icon { width: 13px; height: 13px; }
.ht-star.on { color: #D98A3A; }
.ht-revbox { position: relative; min-height: 30px; padding: 5px 20px 5px 7px; border-radius: 7px; background: var(--surface); border: 1px solid var(--hairline); font-size: 7px; line-height: 1.35; }
.ht-revtxt:empty::before { content: attr(data-ph); color: var(--ink-3); }
.ht-revmic { position: absolute; right: 4px; bottom: 4px; width: 15px; height: 15px; display: grid; place-items: center; color: var(--ink); transition: scale 0.1s; }
.ht-revmic .icon { width: 9px; height: 9px; }
.ht-revmic.on { color: var(--accent); }
.ht-endacts { display: flex; gap: 6px; margin-top: 2px; }
.ht-achbody { flex: 1; padding: 10px 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.ht-achhead { display: flex; align-items: center; justify-content: space-between; }
.ht-achhead b { font-family: var(--serif); font-size: 15px; font-weight: 650; }
.ht-newbadge { padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 6.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0; }
.ht-achcard { position: relative; flex: 1; border-radius: 12px; background: var(--surface); border: 1px solid var(--hairline); overflow: hidden; color: var(--ink); }
.ht-achsvg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ht-ach-start { position: absolute; left: 102px; bottom: 18px; width: 20px; height: auto; opacity: 0.48; pointer-events: none; }
.ht-ach-end { position: absolute; right: 14px; bottom: 18px; width: 106px; height: auto; opacity: 0.24; pointer-events: none; }
.ht-pile { position: absolute; left: 42px; bottom: 20px; width: 42px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ht-pileh { font-size: 6.5px; font-weight: 700; color: var(--accent); margin-bottom: 2px; white-space: nowrap; }
.ht-sp { display: block; width: 40px; height: 10px; border-radius: 2px; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.14); }
.ht-sp-0 { background: #D9643A; }
.ht-sp-1 { background: #5C6B58; }
.ht-sp-2 { background: #6A5A7E; }
.ht-sp-3 { background: #9A6B3C; }
.ht-animal { position: absolute; left: 168px; bottom: 30px; width: 72px; height: auto; opacity: 0; pointer-events: none; }
.ht-animal img { width: 100%; height: auto; display: block; }

/* Built-in Browser (Desktop How to use scene) */
.ht-bwin { background: var(--bg); }
.ht-btabs { flex: none; height: 22px; display: flex; align-items: center; gap: 4px; padding: 0 7px; background: var(--surface-alt); border-bottom: 1px solid var(--hairline); }
.ht-btabs > i { width: 6px; height: 6px; border-radius: 50%; background: #FF5F57; flex: none; }
.ht-btabs > i:nth-child(2) { background: #FEBC2E; }
.ht-btabs > i:nth-child(3) { background: #28C840; }
.ht-blib { display: inline-flex; align-items: center; gap: 3px; height: 15px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--surface); border: 0.5px solid var(--hairline); font-size: 6.5px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.ht-blib .icon { width: 7.5px; height: 7.5px; color: var(--accent); }
.ht-bdiv { width: 1px; height: 10px; background: var(--hairline); flex: none; }
.ht-btab { display: inline-flex; align-items: center; gap: 3.5px; height: 16px; max-width: 120px; padding: 0 6px; border-radius: 6px 6px 0 0; background: var(--bg); border: 0.5px solid var(--hairline); border-bottom: 0; font-size: 6.5px; font-weight: 600; color: var(--ink); }
.ht-btab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht-btab .icon { width: 7px; height: 7px; color: var(--ink-2); flex: none; }
.ht-btab-ic { display: inline-grid; place-items: center; width: 14px; height: 14px; color: var(--ink-2); flex: none; }
.ht-btab-ic .icon { width: 8px; height: 8px; }
.ht-bspace { flex: 1; }
.ht-bbar { flex: none; height: 24px; display: flex; align-items: center; gap: 5px; padding: 0 7px; background: var(--bg); border-bottom: 1px solid var(--hairline); }
.ht-bnav { display: inline-flex; align-items: center; gap: 3px; color: var(--ink-2); flex: none; }
.ht-bnav .icon { width: 8px; height: 8px; }
.ht-bomni { flex: 1; min-width: 0; height: 16px; display: flex; align-items: center; gap: 4px; padding: 0 4px; border-radius: 999px; background: var(--surface-alt); border: 0.5px solid var(--hairline); }
.ht-bsh { display: inline-flex; align-items: center; gap: 2px; height: 12px; padding: 0 4px; border-radius: 999px; color: var(--ink-2); font-size: 6px; font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.ht-bsh .icon { width: 7.5px; height: 7.5px; }
.ht-bsh.blocking { background: var(--accent-soft); color: var(--accent); }
.ht-bhost { flex: 1; min-width: 0; font-size: 6.8px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-brm, .ht-baa, .ht-bstar { display: inline-grid; place-items: center; width: 14px; height: 13px; border-radius: 4px; color: var(--ink-2); flex: none; transition: scale 0.1s, color 0.15s, background-color 0.15s; }
.ht-brm .icon, .ht-bstar .icon { width: 8px; height: 8px; }
.ht-brm.on { background: var(--accent-soft); color: var(--accent); }
.ht-baa { font-size: 6.5px; font-weight: 700; font-family: var(--serif); opacity: 0; overflow: hidden; }
.ht-bacts { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.ht-btrsplit { display: inline-flex; align-items: center; height: 16px; border-radius: 999px; background: var(--surface); border: 0.5px solid var(--hairline); overflow: hidden; }
.ht-btrbtn { display: inline-grid; place-items: center; width: 16px; height: 16px; color: var(--ink); transition: scale 0.1s, background-color 0.15s, color 0.15s; }
.ht-btrbtn .icon { width: 8.5px; height: 8.5px; }
.ht-btrbtn.on { background: var(--accent); color: #fff; }
.ht-btrchev { display: inline-grid; place-items: center; width: 10px; height: 16px; border-left: 0.5px solid var(--hairline); color: var(--ink-2); }
.ht-btrchev .icon { width: 6px; height: 6px; }
.ht-blsn { display: inline-flex; align-items: center; gap: 3px; height: 16px; padding: 0 6px; border-radius: 999px; background: var(--surface); border: 0.5px solid var(--hairline); color: var(--ink); font-size: 6.5px; font-weight: 600; white-space: nowrap; transition: scale 0.1s, background-color 0.15s, color 0.15s; }
.ht-blsn .icon { width: 8px; height: 8px; }
.ht-blsn-wf { display: none; align-items: center; gap: 1.5px; height: 8px; }
.ht-blsn-wf i { display: block; width: 1.5px; height: 8px; border-radius: 1px; background: currentColor; transform-origin: 50% 50%; }
.ht-blsn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ht-blsn.on .ht-blsn-ic { display: none; }
.ht-blsn.on .ht-blsn-wf { display: inline-flex; }
.ht-bsave { display: inline-grid; place-items: center; width: 17px; height: 16px; border-radius: 5px; color: var(--ink); transition: scale 0.1s, color 0.15s, background-color 0.15s; }
.ht-bsave .icon { width: 8.5px; height: 8.5px; }
.ht-bsave.on { background: var(--accent-soft); color: var(--accent); }
.ht-bnotice { flex: none; height: 0; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px; background: var(--surface); border-bottom: 0 solid var(--hairline); font-size: 7px; font-weight: 600; color: var(--ink); opacity: 0; }
.ht-bnotice .ht-btn.small { height: 14px; padding: 0 6px; font-size: 6.2px; }
.ht-bview { position: relative; flex: 1; overflow: hidden; background: var(--bg); }
.ht-bweb { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--surface); }
.ht-bsitebar { flex: none; height: 18px; display: flex; align-items: center; gap: 6px; padding: 0 14px; border-bottom: 0.5px solid var(--hairline); font-size: 6.5px; color: var(--ink-2); }
.ht-bsitebar b { font-weight: 700; color: var(--ink); margin-right: auto; }
.ht-bsitebar i { display: block; width: 18px; height: 3px; border-radius: 2px; background: var(--hairline); }
.ht-bwebcol { flex: 1; padding: 10px 62px 0; overflow: hidden; }
.ht-bad { display: flex; align-items: center; justify-content: center; border-radius: 5px; background: var(--surface-alt); border: 1px dashed var(--hairline); color: var(--ink-3); font-size: 6.5px; font-weight: 700; letter-spacing: 0.08em; overflow: hidden; margin-bottom: 6px; padding: 4px 0; max-height: 24px; }
.ht-bwebcol h4 { margin: 0 0 5px; font-family: var(--serif); font-size: 11px; font-weight: 700; line-height: 1.25; color: var(--ink); }
.ht-bwebcol p { margin: 0 0 5px; font-family: var(--serif); font-size: 7.4px; line-height: 1.55; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ht-bcook { position: absolute; left: 10px; right: 10px; bottom: 8px; height: 22px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; border-radius: 7px; background: var(--ink); color: var(--bg); font-size: 6.8px; font-weight: 600; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22); }
.ht-bcook i { display: block; width: 26px; height: 10px; border-radius: 999px; background: var(--accent); }
.ht-bread { position: absolute; inset: 0; background: var(--rbg); color: var(--rink); overflow: hidden; opacity: 0; visibility: hidden; }
.ht-breadcol { padding: 12px 66px 0; font-family: var(--serif); }
.ht-breadcol h4 { margin: 0; font-size: 11.5px; font-weight: 700; line-height: 1.25; }
.ht-brtr { overflow: hidden; height: 0; opacity: 0; }
.ht-brtr-in { color: #6B3A22; background: #FBEFE8; border-radius: 4px; padding: 1.5px 5px; }
@media (prefers-color-scheme: dark) { .ht-brtr-in { color: #F0B69C; background: rgba(240, 122, 79, 0.16); } }
.ht-brtr-h { font-size: 8.5px; font-weight: 650; line-height: 1.3; }
.ht-bro { margin: 6px 0 0; font-size: 7.4px; line-height: 1.5; color: var(--rink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ht-brtr-p { font-size: 7.6px; line-height: 1.52; }
.ht-brtr-p .s { border-radius: 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-color 0.25s; }
.ht-brtr-p .s.read { background: var(--tts); }

.ht-mark {
  position: absolute; left: 0; top: 0; z-index: 20; width: 30px; height: 30px; border-radius: 50%; pointer-events: none; opacity: 0; --b: 0; --p: 0;
  border: 1.6px solid var(--accent); background: color-mix(in srgb, var(--accent) calc(10% + var(--p) * 8%), transparent);
  box-shadow: 0 0 0 1.2px color-mix(in srgb, var(--bg) 95%, transparent);
}
.ht-mark i { position: absolute; inset: -1.6px; border-radius: 50%; border: 1.4px solid var(--accent); opacity: calc(0.6 * (1 - var(--b))); transform: scale(calc(1 + 0.6 * var(--b))); }
@media (max-width: 600px) {
  .lib-head { flex-wrap: wrap; }
  .lib-actions { width: 100%; flex-wrap: wrap; }
  .lib-actions .btn { flex: 1 1 0; justify-content: center; }
  .lib-actions .search { order: 3; flex: 1 0 100%; max-width: none; }
}

/* Built-in Privacy Reading Browser (Desktop-only #/browse) */
body.browsing { overflow: hidden; }
.browser-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--bg);
}
.browser-chrome {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
  z-index: 20;
}
.browser-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  height: 40px;
  min-height: 40px;
  padding: 0 12px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--hairline);
  -webkit-app-region: drag;
}
@media (prefers-color-scheme: dark) {
  .browser-tabs { background: #171614; }
}
html[data-platform="darwin"]:not([data-fullscreen="1"]) .browser-tabs {
  padding-left: 80px;
}
html[data-platform="darwin"][data-fullscreen="1"] .browser-tabs {
  padding-left: 12px;
}
.browser-library-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px 0 8px;
  border: 0;
  border-radius: 8px;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  color: var(--ink);
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
  flex: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-app-region: no-drag;
  transition: background 140ms ease, box-shadow 140ms ease;
}
.browser-library-btn:hover {
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.browser-library-ico {
  width: 16px;
  height: 16px;
  color: var(--ink-2);
}
.browser-tabs-divider {
  width: 1px;
  height: 16px;
  background: var(--hairline);
  margin: 0 8px;
  flex: none;
}
.browser-tabs-list {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 1 auto;
  min-width: 0;
  height: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.browser-tabs-list::-webkit-scrollbar { display: none; }
.browser-tabs-spacer {
  flex: 1 1 12px;
  min-width: 12px;
  height: 100%;
  -webkit-app-region: drag;
}
.browser-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 220px;
  min-width: 96px;
  flex: 0 1 180px;
  height: 30px;
  padding: 0 8px 0 10px;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-app-region: no-drag;
  border: 1px solid transparent;
  transition: background 120ms ease, color 120ms ease;
}
.browser-tab:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); color: var(--ink); }
.browser-tab.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  border-color: color-mix(in srgb, var(--hairline) 75%, transparent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
@media (prefers-color-scheme: dark) {
  .browser-tab.active { box-shadow: none; }
}
.browser-tab.private { color: var(--ink); }
.browser-tab.private.active { background: var(--surface); }
.browser-tab-ico-slot { display: inline-flex; align-items: center; flex: none; }
.browser-tab-ico { width: 14px; height: 14px; flex: 0 0 auto; opacity: 0.75; }
.browser-tab-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser-tab-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 0;
  padding: 0;
  flex: none;
  -webkit-app-region: no-drag;
  transition: opacity 120ms ease, background 120ms ease;
}
.browser-tab:hover .browser-tab-close,
.browser-tab.active .browser-tab-close,
.browser-tab-close:focus-visible { opacity: 0.7; }
.browser-tab-close:hover { opacity: 1; background: var(--hairline); }
.browser-tab-close .icon { width: 12px; height: 12px; }
.browser-tab-add {
  width: 28px;
  height: 28px;
  flex: none;
  margin-left: 4px;
  color: var(--ink-2);
  -webkit-app-region: no-drag;
}
.browser-tab-add:hover { color: var(--ink); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.browser-tab-add .icon { width: 16px; height: 16px; }
.browser-tab-private { margin-left: 0; }
.browser-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  min-height: 44px;
  padding: 0 12px;
  background: var(--bg);
}
.browser-toolbar .icon-btn { width: 32px; height: 32px; }
.browser-nav-group,
.browser-actions-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
.browser-omnibar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 180px;
  height: 32px;
  padding: 0 4px 0 6px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--hairline);
}
.browser-omnibar:focus-within {
  border-color: var(--accent);
  box-shadow: var(--focus);
  background: var(--surface);
}
.browser-lock { display: inline-flex; color: var(--leaf); }
.browser-lock .icon { width: 14px; height: 14px; }
.browser-private-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  flex: 0 0 auto;
}
.browser-omnibar input.browser-url-input {
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13.5px;
  outline: none;
}
.browser-omnibar input.browser-url-input:focus-visible {
  box-shadow: none;
  border-color: transparent;
}
.browser-toolbar .icon-btn.browser-star { width: 26px; height: 26px; }
.browser-star.on { color: var(--accent); }
.browser-pop-wrap { position: relative; display: inline-flex; align-items: center; }
.browser-shields-wrap .browser-popover { left: 0; right: auto; }
.icon-btn.browser-shields-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 22px;
  min-width: 24px;
  padding: 0 6px;
  width: auto;
  border-radius: 999px;
  color: var(--ink-2);
}
.icon-btn.browser-shields-btn .icon { width: 13px; height: 13px; }
.icon-btn.browser-shields-btn.blocking {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.browser-shields-btn.off { color: var(--ink-3); }
.browser-icon-slot { display: inline-flex; }
.browser-badge {
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.browser-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 240px;
  max-width: 300px;
  z-index: 40;
}
.browser-translate-menu {
  min-width: 248px;
}
.browser-translate-menu .menu-item {
  padding: 8px 10px;
  font-size: 14px;
  gap: 8px;
}
.browser-translate-menu .menu-item[aria-checked="true"] {
  color: var(--accent-ink);
  font-weight: 600;
}
.browser-translate-menu .menu-item .icon {
  width: 16px;
  height: 16px;
  flex: none;
}
.browser-translate-menu .menu-lang-hint {
  font-size: 12.5px;
  color: var(--ink-3);
  flex: none;
  max-width: 104px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.browser-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px 4px;
  font-size: 13.5px;
}
.browser-pop-stat { margin: 0; padding: 0 12px 8px; }
.browser-switch input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.browser-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--accent-soft);
  color: var(--ink);
  border-top: 1px solid var(--hairline);
  font-size: 13.5px;
}
.browser-notice.error {
  background: color-mix(in srgb, var(--danger) 14%, var(--surface));
  color: var(--danger);
}
.browser-notice-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser-notice-actions { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.browser-workspace {
  display: flex;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.browser-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.browser-ask-btn[hidden] { display: none; }
.browser-ask-btn.on { color: var(--accent); background: var(--accent-soft); }
.browser-viewport {
  position: relative;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  background: var(--bg);
}
.browser-frozen-page {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
}
.browser-start {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 36px 24px 48px;
  max-width: 820px;
  margin: 0 auto;
}
.browser-start-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  text-align: center;
}
.browser-start-sec { margin-bottom: 28px; }
.browser-start-sec h2 { font-size: 15px; font-weight: 600; color: var(--ink-2); margin: 0 0 12px; }
.browser-start-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.browser-start-head h2 { margin: 0; }
.browser-bm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}
.browser-bm-card {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  overflow: hidden;
}
.browser-bm-open {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  padding: 12px 34px 12px 14px;
  background: transparent;
  border: none;
  color: var(--ink);
  cursor: pointer;
}
.browser-bm-open:hover { background: var(--surface-alt); }
.browser-bm-title { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser-bm-host { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn.browser-bm-rm { position: absolute; right: 6px; top: 6px; width: 24px; height: 24px; opacity: 0.55; }
.icon-btn.browser-bm-rm .icon { width: 14px; height: 14px; }
.icon-btn.browser-bm-rm:hover { opacity: 1; }
.browser-history-list {
  list-style: none;
  margin: 0;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
}
.browser-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.browser-history-row:hover { background: var(--surface-alt); }
.browser-history-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser-history-host { flex: 0 0 auto; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser-screen-host {
  position: absolute;
  inset: 0;
  z-index: 30;
  overflow: hidden;
  background: var(--bg);
}
.browser-screen-overlay {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.browser-screen-scroll {
  flex: 1;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 16px;
}
.browser-screen-stage {
  position: relative;
  display: inline-block;
  max-width: 100%;
  box-shadow: var(--shadow-pop);
  border-radius: 8px;
  overflow: hidden;
}
.browser-screen-img {
  display: block;
  max-width: 100%;
  height: auto;
}
.browser-screen-bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.browser-screen-patch {
  position: absolute;
  display: block;
  pointer-events: none;
}
.browser-screen-bubble {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4px;
  border-radius: 6px;
  font-size: clamp(10px, 1.3vw, 15px);
  line-height: 1.2;
  font-weight: 600;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
}
.browser-screen-bubble.vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* --- Credits, Top-up & Grouped Usage History --- */
.menu-credits { font-variant-numeric: tabular-nums; }

.credits-bal-wrap {
  display: inline-flex;
  align-items: baseline;
  font-variant-numeric: tabular-nums;
}
.credits-bal-num {
  font-size: 16px;
  font-weight: 650;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.credits-bal-num.amber { color: var(--amber); }
.credits-bal-num.danger { color: var(--danger); }
.credits-bal-den {
  font-size: 14.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.credits-topup-zero { background: var(--accent-soft); }
.credits-topup-zero:hover { background: color-mix(in srgb, var(--accent-soft) 86%, var(--accent)); }
.modal.credits-history-modal { width: min(560px, calc(100vw - 32px)); }
.credits-history-scroll {
  max-height: min(62vh, 520px);
  overflow-y: auto;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--surface);
  margin-top: 8px;
}

.credits-history { display: flex; flex-direction: column; }
.credits-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 16px;
}
.credits-month { display: inline-flex; align-items: center; gap: 2px; margin-left: -6px; }
.credits-month-btn { width: 30px; height: 30px; padding: 0; }
.credits-month-btn .icon { width: 16px; height: 16px; }
.credits-month-btn:disabled { opacity: 0.35; cursor: default; }
.credits-month-label {
  font-size: 14px;
  font-weight: 600;
  min-width: 84px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.credits-totals { font-size: 13px; font-variant-numeric: tabular-nums; }

.credits-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px 10px;
  flex-wrap: wrap;
}
.credits-pill {
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink-2);
  border-radius: 999px;
  padding: 4px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}
.credits-pill:hover { background: var(--surface-alt); color: var(--ink); }
.credits-pill[aria-checked="true"] {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--accent-ink);
}

.credits-state {
  margin: 0;
  padding: 18px 16px;
  font-size: 14px;
  border-top: 1px solid var(--hairline);
}
.credits-state-err {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.credits-list { display: flex; flex-direction: column; border-top: 1px solid var(--hairline); transition: opacity 140ms ease; }
.credits-list.loading { opacity: 0.55; pointer-events: none; }
.credits-item + .credits-item { border-top: 1px solid var(--hairline); }
.credits-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  text-align: start;
  color: var(--ink);
  font: inherit;
}
button.credits-row.expandable {
  border: 0;
  background: none;
  cursor: pointer;
  transition: background 140ms ease;
}
button.credits-row.expandable:hover { background: var(--surface-alt); }
button.credits-row.expandable:focus-visible { outline: none; box-shadow: inset var(--focus); }

.credits-cover {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 7px;
  aspect-ratio: 1;
  box-shadow: none;
  border: 1px solid var(--hairline);
}
.credits-cover .cf-title { font-size: 8px; padding: 3px; line-height: 1.1; }
.credits-cover .cf-author { display: none; }

.credits-icon {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.credits-icon .icon { width: 18px; height: 18px; }
.credits-icon.tone-book { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); }
.credits-icon.tone-comic { background: color-mix(in srgb, #9B59B6 15%, transparent); color: #8E44AD; }
.credits-icon.tone-web { background: color-mix(in srgb, #2E86C1 15%, transparent); color: #2471A3; }
.credits-icon.tone-ask { background: color-mix(in srgb, #D48806 15%, transparent); color: #B7791F; }
.credits-icon.tone-voice { background: color-mix(in srgb, #17A589 15%, transparent); color: #148F77; }
.credits-icon.tone-grant { background: color-mix(in srgb, var(--leaf) 16%, transparent); color: var(--leaf); }
.credits-icon.tone-neutral { background: var(--surface-alt); color: var(--ink-2); }
@media (prefers-color-scheme: dark) {
  .credits-icon.tone-comic { color: #C994E0; }
  .credits-icon.tone-web { color: #6DB3E8; }
  .credits-icon.tone-ask { color: #F0B85A; }
  .credits-icon.tone-voice { color: #5CD0B9; }
}

.credits-item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.credits-item-title {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.credits-item-meta {
  font-size: 13px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.credits-item-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  margin-inline-start: auto;
}
.credits-delta {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.credits-delta.positive { color: var(--accent-ink); }
.credits-chev {
  width: 15px;
  height: 15px;
  color: var(--ink-3);
  transition: transform 180ms ease;
}
.credits-item[data-expanded="true"] .credits-chev { transform: rotate(180deg); }

.credits-detail-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 200ms ease;
}
.credits-item[data-expanded="true"] .credits-detail-wrap { grid-template-rows: 1fr; }
.credits-detail {
  overflow: hidden;
  background: color-mix(in srgb, var(--surface-alt) 55%, transparent);
}
.credits-item[data-expanded="true"] .credits-detail {
  border-top: 1px solid var(--hairline);
}
.credits-bd-group { display: flex; flex-direction: column; gap: 6px; padding: 10px 16px 12px 64px; }
.credits-bd-group + .credits-bd-group {
  border-top: 1px solid var(--hairline);
  padding-top: 10px;
}
.credits-bd-head {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.credits-bd-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  line-height: 1.4;
}
.credits-bd-label { color: var(--ink-2); min-width: 0; }
.credits-bd-val { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }

.credits-more {
  display: flex;
  justify-content: center;
  padding: 12px 16px;
  border-top: 1px solid var(--hairline);
}

/* Top-up modal */
.topup-panel { padding-top: 28px; }
.topup-panel .btn.wide { max-width: 360px; }
.topup-note { max-width: 360px; margin: 4px 0 6px; }
.credit-packs { margin-top: 10px; }
.credit-pack { align-items: center; }
.credit-pack-left { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.credit-pack-amount { font-size: 15.5px; font-variant-numeric: tabular-nums; }
.credit-pack-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.credit-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.credit-badge.bonus {
  background: var(--surface-alt);
  color: var(--ink-2);
}
.credit-pack[aria-checked="true"] .credit-badge.bonus {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent-ink);
}
.credit-badge.best {
  background: var(--accent);
  color: #fff;
}
.credit-pack-price {
  font-size: 15.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .credits-bd-group { padding-left: 16px; }
  .credits-item-meta { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .credits-chev, .credits-detail-wrap, .credits-pill, button.credits-row.expandable { transition: none; }
}

/* ---------- Unified Reader Book Index Drawer & Mobile Floating Dock (#123 §2.5) */
.panel.index-panel {
  width: min(400px, 100%);
  animation: index-slide-in var(--em-dur) var(--em-ease);
}
@keyframes index-slide-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.index-panel-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 6px 14px 20px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.index-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: none;
}
.index-search-ico {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--r-ink-2);
  pointer-events: none;
}
.reader .index-search-wrap input.search-input {
  width: 100%;
  min-height: 40px;
  height: 40px;
  padding: 0 36px 0 36px;
  border-radius: 12px;
  border: 1px solid var(--r-line);
  background: var(--r-hover);
  color: var(--r-ink);
  font-size: 14px;
}
.reader .index-search-wrap input.search-input:focus {
  border-color: var(--accent);
  background: var(--r-bg);
}
.reader .index-search-wrap input.search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}
.index-search-spin {
  position: absolute;
  right: 36px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--r-line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.index-search-clear {
  position: absolute;
  right: 4px;
  width: 30px;
  height: 30px;
}
.index-search-clear .icon { width: 15px; height: 15px; }
.index-tabs-wrap {
  flex: none;
}
.index-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
}
.index-tabs:has(> :nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.index-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  padding: 7px 6px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.index-tab-ico { width: 14px; height: 14px; flex: none; }
.index-tab[aria-selected="true"] {
  background: var(--r-bg);
  color: var(--r-ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.index-sub-tabs-wrap {
  flex: none;
}
.index-sub-tabs-wrap[hidden] {
  display: none;
}
.index-sub-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
}
.index-sub-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid var(--r-line);
  border-radius: 999px;
  background: transparent;
  color: var(--r-ink-2);
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.index-sub-tab:hover {
  background: var(--r-hover);
  color: var(--r-ink);
}
.index-sub-tab[aria-selected="true"] {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent-ink);
  font-weight: 600;
}
.index-sub-count {
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  opacity: 0.78;
}
.index-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}
.index-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.toc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.toc-item-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.toc-item-trail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.toc-item-page {
  font-size: 12.5px;
  color: var(--r-ink-2);
  font-variant-numeric: tabular-nums;
}
.toc-item.current .toc-item-page { color: var(--accent); }
.toc-speaking { width: 15px; height: 15px; color: var(--accent); flex: none; }
.index-here-marker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 4px;
}
.index-here-line {
  flex: 1;
  height: 1px;
  background: var(--accent);
  opacity: 0.65;
}
.index-here-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.index-here-add {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  flex: none;
}
.index-here-add:hover {
  background: var(--accent);
  color: #fff;
}
.index-here-add .icon { width: 14px; height: 14px; }
.index-row {
  position: relative;
  border: 1px solid var(--r-line);
  border-radius: 14px;
  background: transparent;
  transition: background 150ms ease, border-color 150ms ease;
}
.index-row:hover { background: var(--r-hover); }
.index-row-go {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  padding: 11px 36px 11px 13px;
  border: 0;
  background: transparent;
  color: var(--r-ink);
  text-align: left;
  cursor: pointer;
  border-radius: 13px;
}
.index-row-del {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 32px;
  height: 32px;
  opacity: 0;
  transition: opacity 140ms ease;
}
.index-row-del .icon { width: 15px; height: 15px; }
.index-row:hover .index-row-del,
.index-row:focus-within .index-row-del { opacity: 0.78; }
.index-row-del:hover { opacity: 1 !important; color: var(--danger); }
.bm-row-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.bm-row-ico {
  width: 14px;
  height: 14px;
  color: var(--accent);
  fill: var(--accent);
  flex: none;
}
.bm-row-chap {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bm-row-pos {
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  flex: none;
}
.bm-row-excerpt {
  margin: 0;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.45;
  color: var(--r-ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.index-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.index-row-meta .by-agent {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--accent);
}
.index-row-meta .by-agent .icon { width: 12px; height: 12px; }
.index-filter-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.index-chip {
  border: 1px solid var(--r-line);
  background: transparent;
  color: var(--r-ink-2);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
}
.index-chip[aria-checked="true"] {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent-ink);
}
.index-hl-passage {
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.index-hl-passage > span {
  background: color-mix(in srgb, var(--mark) 40%, transparent);
  border-radius: 3px;
  padding: 1px 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.reader[data-theme="dark"] .index-hl-passage > span {
  background: color-mix(in srgb, var(--mark) 32%, transparent);
}
.index-note-body {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--r-ink);
}
.index-note-quote {
  margin: 2px 0 0;
  padding: 2px 0 2px 10px;
  border-left: 3px solid var(--mark);
  font-family: var(--serif);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--r-ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.qa-index-quote {
  margin: 0;
  padding: 2px 0;
  font-family: var(--serif);
  font-size: 13.5px;
  color: var(--r-ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.qa-index-q {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}
.qa-index-a {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--r-ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: max-height var(--em-dur) var(--em-ease);
}
.qa-index-row.expanded .qa-index-a {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}
.qa-index-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px 9px;
}
.qa-show-btn { padding: 2px 6px; min-height: 26px; font-size: 12.5px; color: var(--accent); }
.index-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 44px 16px;
  text-align: center;
}
.index-empty-ico { width: 28px; height: 28px; color: var(--r-ink-2); opacity: 0.6; }
.index-empty p { margin: 0; font-size: 14px; }
.index-empty-msg { padding: 24px 8px; text-align: center; }
.index-search-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.index-search-group {
  margin: 12px 4px 6px;
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--r-ink-2);
}
.index-search-status { padding: 12px 6px; font-size: 13.5px; }
.search-hit mark {
  background: var(--accent-soft);
  color: var(--r-ink);
  font-weight: 650;
  border-radius: 3px;
  padding: 0 2px;
}
.saved-hit {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.saved-hit-ico { width: 15px; height: 15px; color: var(--accent); margin-top: 2px; flex: none; }
.saved-hit-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.saved-hit-main { font-size: 14px; line-height: 1.4; }
.saved-hit-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.index-ctx-menu, .browser-tile-ctx {
  position: fixed;
  z-index: 60;
  min-width: 160px;
}

/* Mobile floating Reader Dock below 640px (4 dock tools + floating [Translate][Ask][Listen] parity) */
@media (max-width: 640px) {
  .reader:not(.pdf):not(.embedded) .mobile-dock-only {
    display: inline-grid;
  }
  .reader:not(.pdf):not(.embedded) .mobile-dock-only[hidden] {
    display: none;
  }
  .reader:not(.pdf):not(.embedded) .reader-tools {
    position: fixed;
    bottom: calc(8px + env(safe-area-inset-bottom));
    left: 12px;
    right: 12px;
    max-width: 360px;
    margin: 0 auto;
    z-index: 15;
    justify-content: space-around;
    padding: 4px 8px;
    gap: 4px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--r-bg) 88%, transparent);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid var(--r-line);
    box-shadow: var(--shadow-pop);
    transition: opacity 180ms ease;
  }
  .reader.panel-open:not(.pdf):not(.embedded) .reader-tools,
  .reader.asking:not(.pdf):not(.embedded) .reader-tools {
    opacity: 0;
    pointer-events: none;
  }
  .reader:not(.pdf):not(.embedded) .reader-fab-group {
    position: absolute;
    right: 0;
    bottom: calc(100% + 56px);
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .reader:not(.pdf):not(.embedded) .reader-fab-group .icon-btn:not(.translate-more) {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--r-bg) 88%, transparent);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid var(--r-line);
    box-shadow: var(--shadow-pop);
  }
  .reader:not(.pdf):not(.embedded) .reader-fab-group .translate-wrap {
    border-radius: 999px;
    background: color-mix(in srgb, var(--r-bg) 88%, transparent);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid var(--r-line);
    box-shadow: var(--shadow-pop);
    padding-right: 4px;
  }
  .reader:not(.pdf):not(.embedded) .reader-fab-group .translate-wrap .translate-btn {
    border: 0;
  }
  .reader:not(.pdf):not(.embedded) .reader-fab-group .translate-wrap .translate-btn:not(.busy) {
    box-shadow: none;
    background: transparent;
  }
  .reader:not(.pdf):not(.embedded) .reader-fab-group .translate-menu {
    top: auto;
    bottom: calc(100% + 8px);
  }
  .reader:not(.pdf):not(.embedded) .reader-fab-group .listen-btn {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    border-radius: 999px;
  }
  .reader:not(.pdf):not(.embedded) .reader-fab-group .listen-btn:hover {
    background: var(--accent-ink);
  }
  .reader:not(.pdf):not(.embedded) .reader-foot {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }
  .index-row-del { opacity: 0.72; }
}

/* ---------- Embedded Browser Reader Mode + Listen Pill + Paper PDF Pill (#123 §5.5) */
.reader.embedded {
  position: absolute;
  inset: 0;
  z-index: 25;
  animation: reader-enter var(--em-dur) var(--em-ease);
}
@keyframes reader-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.reader-foot.embedded-web-foot {
  padding: 6px 20px;
  border-top: 1px solid var(--r-line);
  background: var(--r-chrome);
}
.reader-web-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
}
.reader-web-source { color: var(--r-ink-2); font-size: 13px; }
.reader-web-nav { display: inline-flex; align-items: center; gap: 8px; }
.reader-web-next { background: var(--accent) !important; border-color: var(--accent) !important; color: #fff !important; }

.browser-toolbar .icon-btn.browser-reader-btn,
.browser-toolbar .icon-btn.browser-aa-btn { width: 28px; height: 28px; }
.browser-reader-btn { transition: transform var(--em-dur) var(--em-ease), opacity 200ms ease, color 150ms ease; }
.browser-reader-btn.on,
.browser-aa-btn.on {
  color: var(--accent);
  background: var(--accent-soft);
}
.browser-aa-glyph { font-family: var(--serif); font-size: 13px; font-weight: 700; line-height: 1; }
.browser-listen-btn {
  min-height: 32px;
  height: 32px;
  padding: 0 12px;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 13.5px;
  border-radius: 999px;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.browser-listen-btn:hover:not(:disabled) {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
}
.browser-listen-btn:disabled {
  background: var(--surface-alt);
  border-color: var(--hairline);
  color: var(--ink-3);
  cursor: default;
}
.browser-listen-btn.playing {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}
.browser-listen-btn.busy {
  opacity: 0.92;
}
.browser-listen-ico { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; }
.browser-listen-ico .icon { width: 16px; height: 16px; }
.browser-listen-spin {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}
.browser-listen-prompt {
  min-width: 256px;
  max-width: 296px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.browser-listen-prompt[hidden] { display: none; }
.browser-listen-prompt-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 2px;
}
.browser-listen-prompt-sub {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}
.browser-listen-prompt-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}
.browser-listen-prompt-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.browser-listen-prompt-btn {
  width: 100%;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  font-size: 13.5px;
  border-radius: 9px;
}
.browser-viewport[data-popover-open="true"] .browser-reader-host {
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .listen-btn.busy, .pl-play-spin, .browser-listen-spin { animation: none; }
}

.browser-save-btn { position: relative; }
.browser-save-btn.has-pdf-dot::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.menu-item.accent-item { color: var(--accent-ink); font-weight: 600; }

.browser-pdf-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: center;
  margin: 4px 12px 6px;
  padding: 2px 6px 2px 12px;
  height: 36px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
  animation: pdf-pill-in var(--em-dur) var(--em-ease);
  transition: transform 240ms var(--em-ease), opacity 220ms ease;
}
.browser-pdf-pill.shrinking {
  opacity: 0;
  transform: translate(120px, -24px) scale(0.45);
}
@keyframes pdf-pill-in {
  from { opacity: 0; transform: translateY(-10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.browser-pdf-pill-act {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--accent-ink);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
}
.browser-pdf-pill-act .icon { width: 16px; height: 16px; color: var(--accent); }
.browser-pdf-pill-close { width: 26px; height: 26px; }
.browser-pdf-pill-close .icon { width: 14px; height: 14px; }

.browser-reader-host {
  position: absolute;
  inset: 0;
  z-index: 25;
  background: var(--bg);
  overflow: hidden;
}
.browser-reader-skeleton {
  max-width: 640px;
  margin: 64px auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.skel-line {
  display: block;
  height: 18px;
  border-radius: 9px;
  background: linear-gradient(90deg, var(--surface-alt) 25%, var(--hairline) 50%, var(--surface-alt) 75%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.2s ease-in-out infinite;
}
.skel-line.wide { width: 82%; height: 26px; }
.skel-line.short { width: 56%; }
@keyframes skel-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ---------- Browser Start Page: Categorized Recommended Reading Directory (#123 §3) */
.browser-start {
  max-width: 980px;
}
.browser-private-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.browser-private-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
}
.private-head-ico { width: 22px; height: 22px; color: var(--accent); }
.dir-edit-btn { color: var(--accent); font-weight: 600; }
.dir-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 14px;
  scrollbar-width: none;
}
.dir-chips::-webkit-scrollbar { display: none; }
.dir-chip {
  flex: none;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.dir-chip:hover { background: var(--surface-alt); color: var(--ink); }
.dir-chip[aria-selected="true"] {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent-ink);
  font-weight: 600;
}
.browser-dir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 12px 10px;
}
.dir-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 14px;
  animation: dir-tile-in var(--em-dur) var(--em-ease) backwards;
  animation-delay: var(--stagger, 0ms);
  transition: transform var(--em-dur) var(--em-ease), opacity 160ms ease;
}
@keyframes dir-tile-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.dir-tile.removing {
  opacity: 0;
  transform: scale(0.4);
}
.dir-tile.dragging { opacity: 0.45; }
.dir-tile.drop-over { outline: 2px solid var(--accent); outline-offset: 2px; }
.dir-tile-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 6px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  transition: background 140ms ease, transform 120ms ease;
}
.dir-tile-btn:hover { background: var(--surface-alt); }
.dir-tile-btn:active { transform: scale(0.96); }
.dir-tile-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  background: var(--mono-bg, var(--surface-alt));
  color: var(--mono-fg, var(--ink));
  border: 1px solid var(--hairline);
  overflow: hidden;
  flex: none;
}
/* the site's own icon on a white plate in both themes: favicons are drawn for white browser chrome, and a dark one
   (Rust's black gear) would vanish on a dark tile */
.dir-tile-icon.has-fav {
  background: #fff;
}
.dir-tile-icon.has-fav img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
}
@media (prefers-color-scheme: dark) {
  .dir-tile-icon:not(.has-fav):not(.add-dashed) {
    background: var(--mono-bg-dark, var(--surface-alt));
    color: var(--mono-fg-dark, var(--ink));
  }
}
.dir-tile-title {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.dir-tile.editing {
  animation: tile-jiggle 0.13s ease-in-out infinite alternate;
  animation-delay: var(--jiggle-delay, 0ms);
}
@keyframes tile-jiggle {
  from { transform: rotate(-1.5deg); }
  to { transform: rotate(1.5deg); }
}
.dir-tile-del {
  position: absolute;
  top: 2px;
  right: 12px;
  width: 24px;
  height: 24px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--danger);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16);
}
.dir-tile-del .icon { width: 18px; height: 18px; }
.dir-tile-add {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 10px 6px;
  gap: 8px;
}
.dir-tile-add:hover { background: var(--surface-alt); }
.dir-tile-icon.add-dashed {
  background: transparent;
  border: 1.5px dashed var(--hairline);
  color: var(--ink-2);
}
.dir-edit-cat {
  margin-bottom: 16px;
  padding: 12px 14px 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  transition: box-shadow 250ms ease, border-color 250ms ease, opacity 150ms ease;
}
.dir-edit-cat.highlight-new {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}
.dir-edit-cat.dragging { opacity: 0.45; }
.dir-edit-cat.drop-over { border-color: var(--accent); }
.dir-edit-cat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.dir-drag-handle {
  display: inline-flex;
  color: var(--ink-3);
  cursor: grab;
}
.dir-drag-handle .icon { width: 16px; height: 16px; }
.dir-cat-name-slot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.dir-cat-title {
  font-size: 14.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dir-cat-rename-btn .icon { width: 14px; height: 14px; }
.dir-cat-rename-input {
  flex: 1;
  max-width: 240px;
  height: 30px;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--bg);
  font-size: 14px;
  font-weight: 600;
}
.dir-edit-cat-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.dir-edit-cat-actions .icon-btn.danger { color: var(--danger); }
.dir-new-cat-btn {
  width: 100%;
  background: var(--surface-alt);
  border-color: transparent;
  margin-top: 4px;
}
.dir-reset-wrap {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}
.dir-fill-current {
  width: 100%;
  justify-content: flex-start;
  margin-bottom: 12px;
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent-ink);
}
.field-error {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--danger);
}
.browser-history-more { margin-top: 6px; color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .panel.index-panel,
  .reader.embedded,
  .browser-pdf-pill,
  .dir-tile {
    animation: none;
    transition: opacity 200ms ease;
  }
  .dir-tile.editing {
    animation: none;
  }
  .index-sub-tab,
  .reader-tools {
    transition: none;
  }
  .skel-line {
    animation: none;
  }
}

/* ---------- Pronunciation reporting & voice contributions (Lean Phase 1, no credits) */
.modal.pron-modal {
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}
.pron-form .field-label { margin-top: 14px; }
.pron-recent {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}
.pron-recent-btn {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.4;
  text-align: start;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pron-recent-btn:hover { background: var(--surface-alt); color: var(--ink); }
.pron-recent-btn[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--ink);
}
.pron-quote {
  margin: 12px 0 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-alt);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.pron-symptoms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pron-chip {
  min-height: 36px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pron-chip:hover { background: var(--surface-alt); color: var(--ink); }
.pron-chip[aria-checked="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.pron-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-2);
  cursor: pointer;
}
.pron-consent input[type=checkbox] {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  flex: none;
  accent-color: var(--accent);
  cursor: pointer;
}

.pron-box { gap: 16px; }
.pron-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pron-block + .pron-block {
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
}
.pron-subhead {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.pron-milestones {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pron-milestone {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  font-size: 14.5px;
}
.pron-step-dot {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--surface-alt);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.pron-milestone.unlocked .pron-step-dot {
  background: var(--accent-soft);
  color: var(--accent);
}
.pron-step-dot .icon { width: 14px; height: 14px; stroke-width: 2.4; }
.pron-step-label {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.pron-milestone:not(.unlocked) .pron-step-label { color: var(--ink-2); }
.pron-step-meta {
  flex: none;
  font-size: 13px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pron-done-icon { width: 16px; height: 16px; color: var(--leaf); flex: none; stroke-width: 2.3; }

.pron-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex: none;
}
.pron-pill.ready { background: var(--accent-soft); color: var(--accent-ink); }
.pron-pill.active { background: color-mix(in srgb, var(--ink) 8%, var(--surface)); color: var(--ink); }
.pron-pill.done { background: color-mix(in srgb, var(--leaf) 16%, transparent); color: var(--leaf); }
.pron-pill.muted { background: var(--surface-alt); color: var(--ink-2); }

.pron-reports {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.pron-report-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--hairline);
}
.pron-report-row:first-child { border-top: 0; padding-top: 2px; }
.pron-report-row:last-child { padding-bottom: 2px; }
.pron-report-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.pron-report-span {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Referral bonus credit line & Invite friends card ---------- */
.credits-bonus {
  font-size: 13.5px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.credits-bonus.locked {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 12.5px;
  font-weight: 550;
}

.ref-share {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}
.ref-sub {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}
.ref-link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 12px;
  border-radius: 12px;
  background: var(--surface-alt);
}
.ref-url {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: all;
}
.ref-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.ref-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  min-width: 0;
}
.ref-stat + .ref-stat {
  border-inline-start: 1px solid var(--hairline);
}
.ref-stat-val {
  font-size: 20px;
  font-weight: 650;
  line-height: 1.2;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.ref-stat-label {
  font-size: 12.5px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.ref-debt {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.ref-list {
  display: flex;
  flex-direction: column;
}
.ref-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
}
.ref-item + .ref-item {
  border-top: 1px solid var(--hairline);
}
.ref-item-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.ref-item-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.ref-item-plan {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
}
.ref-item-meta {
  font-size: 12.5px;
  line-height: 1.35;
}
.ref-reward {
  flex: none;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ref-reward.positive { color: var(--accent-ink); }

@media (max-width: 520px) {
  .ref-link-row {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 12px;
  }
  .ref-stat { padding: 12px; }
}




/* ---------- Top 1: Contextual Define popover (.define-pop) ---------- */
.define-pop {
  --d-bg: #FFFFFF;
  --d-ink: #1C1B1A;
  --d-ink-2: #6B6760;
  --d-line: #E7E2DA;
  --d-shadow: 0 12px 32px rgba(28, 27, 26, 0.16);
  position: fixed;
  z-index: 34;
  display: flex;
  flex-direction: column;
  width: 276px;
  max-width: calc(100vw - 24px);
  padding: 12px 14px 0;
  border-radius: 16px;
  background: var(--d-bg);
  color: var(--d-ink);
  border: 0.5px solid var(--d-line);
  box-shadow: var(--d-shadow);
  animation: define-in var(--em-dur) var(--em-ease);
  overflow: hidden;
}
.define-pop.scale-c { width: 296px; }
.define-pop.no-foot { padding-bottom: 12px; }
.define-pop[hidden] { display: none; }
.define-pop:focus { outline: none; box-shadow: var(--d-shadow); }
.reader[data-theme="sepia"] .define-pop {
  --d-bg: #F7F0DF;
  --d-ink: #3B2F21;
  --d-ink-2: #7A6A55;
  --d-line: #E2D5BA;
  --accent-soft: #F1D9C6;
  --d-shadow: 0 12px 28px rgba(59, 47, 33, 0.14);
}
.reader[data-theme="dark"] .define-pop {
  --d-bg: #1C1B19;
  --d-ink: #F2EFEA;
  --d-ink-2: #A39E95;
  --d-line: #2E2C29;
  --d-shadow: none;
}
@keyframes define-in {
  from { opacity: 0; transform: translateY(4px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.define-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  flex: none;
}
.define-head-compact {
  align-items: center;
  margin-bottom: 6px;
}
.define-compact-label {
  font-size: 14px;
  font-weight: 550;
  color: var(--d-ink-2);
}
.define-head-text {
  flex: 1;
  min-width: 0;
}
.define-word {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.28;
  color: var(--d-ink);
  overflow-wrap: anywhere;
}
.define-meta {
  margin: 3px 0 0;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.35;
  color: var(--d-ink-2);
  overflow-wrap: anywhere;
}
.define-speak-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  margin: -6px -6px -4px 0;
}
.define-slow-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--accent-ink);
  letter-spacing: -0.02em;
  line-height: 1;
  user-select: none;
}
.define-speak-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: var(--d-ink-2);
  transition: color 220ms ease, background 220ms ease;
}
.define-speak-btn:hover {
  background: var(--r-hover, var(--surface-alt));
  color: var(--d-ink);
}
.define-speak-btn.playing {
  color: var(--accent);
  background: var(--accent-soft);
  animation: define-wave-pulse 1.1s ease-in-out infinite;
}
.define-speak-btn.warm {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 11%, transparent);
}
@keyframes define-wave-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.define-body {
  position: relative;
  min-height: 64px;
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
}
.define-body.settled {
  min-height: 0;
}
.define-scroll {
  max-height: 168px;
  overflow-y: auto;
  padding-bottom: 2px;
}
.define-body.scale-c.has-speak .define-meaning {
  padding-right: 40px;
}
.define-scale-c-speak {
  position: absolute;
  top: -2px;
  right: 0;
  z-index: 2;
}
.define-thinking {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--d-ink-2);
}
.define-meaning {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 22px;
  color: var(--d-ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.define-nuance {
  margin: 6px 0 0;
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.48;
  color: var(--d-ink-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.define-err-row {
  margin: 4px 0 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--d-ink-2);
}
.define-retry {
  border: 0;
  background: none;
  padding: 2px 4px;
  color: var(--accent-ink);
  font-weight: 600;
  cursor: pointer;
}
.define-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 40px;
  margin: 10px -14px 0;
  padding: 0 6px;
  border-top: 0.5px solid var(--d-line);
  flex: none;
}
.define-foot-locked,
.define-foot-single {
  justify-content: flex-end;
}
.define-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  min-width: 0;
  max-width: none;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--d-ink-2);
  font-size: 14px;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
  transition: color 200ms var(--em-ease), background 160ms ease, transform 220ms var(--em-ease);
}
.define-action:hover:not(:disabled) {
  background: var(--r-hover, var(--surface-alt));
  color: var(--d-ink);
}
.define-action:disabled {
  opacity: 0.45;
  cursor: default;
}
.define-action .icon { width: 16px; height: 16px; flex: none; }
.define-action span { overflow: hidden; text-overflow: ellipsis; }
.define-action.accent,
.define-action.saved {
  color: var(--accent-ink);
}
.define-action.saved {
  animation: define-save-pop var(--em-dur) var(--em-ease);
}
@keyframes define-save-pop {
  0% { transform: scale(0.92); }
  55% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* ---------- Top 2: Echo Pause (SpeedSheet switch + breathing indicator) ---------- */
.pl-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.pl-wave {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 13px;
  flex: none;
  color: var(--accent);
}
.pl-wave[hidden] { display: none; }
.pl-wave i {
  display: block;
  width: 2.5px;
  height: 12px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
  animation: pl-wave-hop 0.9s ease-in-out infinite;
}
.pl-wave i:nth-child(2) { animation-delay: 0.18s; }
.pl-wave i:nth-child(3) { animation-delay: 0.36s; }
@keyframes pl-wave-hop {
  0%, 100% { transform: scaleY(0.32); }
  50% { transform: scaleY(0.95); }
}
@keyframes echo-breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.pl-wave.echo-gap {
  animation: echo-breathe 1.8s ease-in-out infinite;
}
.pl-wave.echo-gap i {
  animation: none;
  transform: scaleY(0.55);
}
.listen-btn.echo-gap {
  color: var(--accent);
  animation: echo-breathe 1.8s ease-in-out infinite;
}
.pl-tile.on {
  color: var(--accent-ink);
  background: var(--accent-soft);
}
.speed-divider {
  border: 0;
  border-top: 0.5px solid var(--hairline);
  margin: 16px 0 12px;
}
.speed-echo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  cursor: pointer;
  user-select: none;
}
.speed-echo-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
}
.em-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: none;
  width: 46px;
  height: 26px;
}
.em-switch-input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.em-switch-track {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 16%, transparent);
  transition: background 220ms var(--em-ease);
}
.em-switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 240ms var(--em-ease);
}
.em-switch-input:checked + .em-switch-track {
  background: var(--accent);
}
.em-switch-input:checked + .em-switch-track::after {
  transform: translateX(20px);
}
.em-switch-input:focus-visible + .em-switch-track {
  box-shadow: var(--focus);
}

/* ---------- Top 3: Zero-Debt Paper Card Stack (.cards-overlay) ---------- */
.page-head-actions,
.notes-book-actions,
.panel-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.panel-head-actions { gap: 2px; }
.cards-overlay {
  --card-front: #F6F1E7;
  --card-back: #F1EAE0;
  --card-backing: #EDE6D8;
  --card-border: #E7E2DA;
  --card-shadow: 0 14px 36px rgba(28, 27, 26, 0.11);
  position: fixed;
  inset: 0;
  z-index: 65;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  animation: cards-fade-in 240ms var(--em-ease);
  user-select: none;
  -webkit-user-select: none;
}
.cards-overlay:focus { outline: none; box-shadow: none; }
@media (prefers-color-scheme: dark) {
  .cards-overlay {
    --card-front: #1C1B19;
    --card-back: #22201D;
    --card-backing: #242220;
    --card-border: #2E2C29;
    --card-shadow: none;
  }
}
@keyframes cards-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cards-top {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 8px;
  height: 58px;
  padding: 0 12px;
  flex: none;
}
html[data-platform="darwin"]:not([data-fullscreen="1"]) .cards-top {
  padding-left: 80px;
}
.cards-close {
  width: 48px;
  height: 48px;
  border-radius: 999px;
}
.cards-title {
  margin: 0;
  text-align: center;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cards-top-spacer { width: 48px; height: 48px; }
.cards-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 8px 16px 28px;
  position: relative;
  overflow: hidden;
}
.cards-viewport {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(400px, calc(100vw - 48px));
  height: min(520px, calc(100vh - 116px));
}
.cards-edge {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  color: var(--ink-2);
  flex: none;
}
.cards-edge:disabled {
  opacity: 0.25;
  cursor: default;
}
@media (max-width: 640px) {
  .cards-edge { display: none; }
  .cards-viewport {
    height: min(calc(100vh - 104px), calc((100vw - 48px) * 1.38));
  }
}
.cards-next-peek {
  position: absolute;
  top: 14px;
  bottom: 17px;
  right: -12px;
  width: 10px;
  border-radius: 0 16px 16px 0;
  background: var(--card-front);
  border: 0.5px solid var(--card-border);
  border-left: 0;
  opacity: 0.65;
  pointer-events: none;
}
@media (min-width: 641px) {
  .cards-next-peek { display: none; }
}
.paper-card-shell {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  touch-action: pan-y;
  transition: transform 260ms var(--em-ease);
}
.paper-card-shell.bounce-left {
  animation: card-rubber-left 280ms var(--em-ease);
}
.paper-card-shell.bounce-right {
  animation: card-rubber-right 280ms var(--em-ease);
}
@keyframes card-rubber-left {
  0% { transform: translateX(0); }
  38% { transform: translateX(-18px); }
  100% { transform: translateX(0); }
}
@keyframes card-rubber-right {
  0% { transform: translateX(0); }
  38% { transform: translateX(18px); }
  100% { transform: translateX(0); }
}
.paper-card {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 20px 24px 12px;
  border-radius: 20px;
  background: var(--card-front);
  color: var(--ink);
  border: 0.5px solid var(--card-border);
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: background 220ms ease, transform 140ms var(--em-ease);
  will-change: transform;
}
.paper-card.is-back {
  background: var(--card-back);
}
.paper-card.flipping {
  transform: scale(1.018) perspective(900px) rotateY(6deg);
}
.paper-card.flip-settle {
  animation: card-flip-settle 280ms var(--em-ease);
}
@keyframes card-flip-settle {
  0% { transform: scale(1.018) perspective(900px) rotateY(-4deg); }
  100% { transform: scale(1) perspective(900px) rotateY(0deg); }
}
.paper-card.soft-bounce {
  animation: card-soft-bounce 260ms var(--em-ease);
}
@keyframes card-soft-bounce {
  0% { transform: scale(1); }
  40% { transform: scale(0.985); }
  100% { transform: scale(1); }
}
.paper-card-backing {
  position: relative;
  z-index: 1;
  height: 3px;
  margin: 0 10px;
  border-radius: 0 0 14px 14px;
  background: var(--card-backing);
  border: 0.5px solid var(--card-border);
  border-top: 0;
  flex: none;
}
.paper-card-backing.first-peek {
  animation: card-backing-peek 250ms var(--em-ease);
}
@keyframes card-backing-peek {
  0% { transform: translateY(-2px); opacity: 0.5; }
  55% { transform: translateY(2px); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}
.paper-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  margin: -6px -12px 10px 0;
  flex: none;
}
.paper-card-source {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.card-speak-slot {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: none;
}
.card-hit {
  min-width: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  cursor: pointer;
}
.card-speak-btn {
  border-radius: 999px;
  color: var(--ink-2);
}
.card-speak-btn.playing {
  color: var(--accent);
  background: var(--accent-soft);
}
.card-speak-btn.warm {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 11%, transparent);
}
.paper-card-body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  user-select: text;
  -webkit-user-select: text;
  transition: opacity 110ms ease;
}
.paper-card-body.ink-out { opacity: 0; }
.paper-card-body.ink-in { animation: card-ink-in 170ms ease; }
@keyframes card-ink-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.card-serif-quote {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.62;
  color: var(--ink);
  overflow-y: auto;
  overflow-wrap: anywhere;
}
.card-vocab-hit {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 4px;
  padding: 1px 4px;
  font-weight: 600;
}
.card-vocab-back,
.card-note-back,
.card-qa-back {
  justify-content: flex-start;
  padding-top: 6px;
}
.card-back-headword {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  flex: none;
}
.card-accent-rule {
  display: inline-block;
  width: 28px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
  margin-bottom: 14px;
  flex: none;
}
.card-back-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  touch-action: pan-y;
}
.card-qa-scroll {
  padding-bottom: 24px;
}
.card-scroll-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24px;
  background: linear-gradient(to bottom, transparent, var(--card-back));
  pointer-events: none;
}
.card-back-note {
  margin: 0;
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.card-note-passage {
  margin: 0;
  padding: 2px 0 2px 14px;
  border-left: 3px solid var(--mark, var(--accent));
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  overflow-y: auto;
  overflow-wrap: anywhere;
}
.card-qa-question {
  margin: 0 0 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
}
.card-qa-ico {
  width: 16px;
  height: 16px;
  margin-top: 4px;
  color: var(--accent);
  flex: none;
}
.card-qa-quote {
  margin: 0;
  padding-left: 12px;
  border-left: 2.5px solid var(--card-border);
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-hl-front {
  justify-content: center;
  gap: 10px;
}
.card-open-quote {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 700;
  line-height: 0.75;
  color: var(--accent);
  user-select: none;
}
.card-hl-text {
  margin: 0;
  font-family: var(--serif);
  line-height: 1.58;
  color: var(--ink);
  overflow-y: auto;
  overflow-wrap: anywhere;
  line-break: strict;
}
.card-hl-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex: none;
}
.card-hl-meta .card-accent-rule { margin-bottom: 0; }
.card-hl-date {
  font-size: 12.5px;
  color: var(--ink-2);
}
.paper-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px -12px -4px -10px;
  flex: none;
}
.card-show-btn {
  padding: 0 10px;
  border-radius: 10px;
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 550;
}
.card-show-btn:hover { background: var(--surface-alt); }
.card-flip-btn {
  border-radius: 999px;
  color: var(--ink-3);
  transition: color 200ms ease, background 160ms ease;
}
.card-flip-btn.is-back {
  color: var(--accent-ink);
}

@media (prefers-reduced-motion: reduce) {
  .define-pop,
  .define-speak-btn.playing,
  .define-action.saved,
  .pl-wave i,
  .cards-overlay,
  .paper-card.flip-settle,
  .paper-card.soft-bounce,
  .paper-card-backing.first-peek,
  .paper-card-shell.bounce-left,
  .paper-card-shell.bounce-right {
    animation: none !important;
  }
  .paper-card.flipping {
    transform: none !important;
  }
  .paper-card-body.ink-in {
    animation: card-ink-in 200ms ease !important;
  }
  .pl-wave.echo-gap,
  .listen-btn.echo-gap {
    animation: none !important;
    opacity: 0.65;
  }
}


/* ---------- DocuMeow Revamp: 3-Tab Shell, Unified Omnibox, 3-Layer Home, Catalog, Licenses, Comic A11y ---------- */

/* 3-tab top navigation with outline/filled icons (§1.1) */
.app-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.app-nav .nav-ico {
  width: 17px;
  height: 17px;
  flex: none;
}

/* ---------- Home (Scheme D): one horizontal rail, entry zone, Continue reading + Achievements, My library ----------
   Every Home layer shares one rail: the page container gives the only horizontal margin (20px compact, 32px from 600px)
   and the rail's content is at most 1080px. The shelf grid, the Continue row and the catalog page use the same columns. */
.home-rail {
  --screen-margin: 20px;
  --rail-gap: 16px;
  --cols: 3;
  width: 100%;
  max-width: calc(1080px + 2 * var(--screen-margin));
  margin: 0 auto;
  padding-inline: var(--screen-margin);
}
@media (min-width: 600px) { .home-rail { --screen-margin: 32px; --cols: 4; } }
@media (min-width: 720px) { .home-rail { --cols: 5; } }
@media (min-width: 900px) { .home-rail { --cols: 6; } }
@media (min-width: 1040px) { .home-rail { --cols: 7; } }
@media (min-width: 1144px) { .home-rail { --cols: 8; } }
.home-rail .grid { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 20px var(--rail-gap); }
.home-unified { padding-top: 0; }
.home-unified .lib-body { display: flex; flex-direction: column; gap: 28px; }
.home-layer { display: flex; flex-direction: column; gap: 12px; }
.home-layer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.home-layer-actions { display: inline-flex; align-items: center; gap: 4px; }
.home-layer-title { margin: 0; font-size: 20px; font-weight: 650; line-height: 1.25; letter-spacing: -0.01em; color: var(--ink); }
@media (min-width: 720px) { .home-layer-title { font-size: 22px; } }

/* Entry zone: phones stack the capsule over the 5-tile row; from 720px they share one row (the capsule up to 440px on
   the left, 8 tiles flush right). The capsule (with the row, when they share it) stays at the top while scrolling. */
.home-entry { display: contents; }
.omnibox-bar { position: sticky; top: var(--app-top-h, 0px); z-index: 18; padding: 8px 0; background: var(--bg); }
.home-entry .freq-sites { margin: 4px 0 24px; }
@media (min-width: 720px) {
  .home-entry {
    display: flex; align-items: center; gap: 16px;
    position: sticky; top: var(--app-top-h, 0px); z-index: 18; padding: 12px 0; margin-bottom: 24px; background: var(--bg);
  }
  .home-entry .omnibox-bar { position: static; flex: 1 1 0; min-width: 230px; max-width: 440px; padding: 0; }
  .home-entry .freq-sites { flex: 0 1 auto; margin: 0 0 0 auto; }
}
@media (min-width: 1064px) { .home-entry { gap: 24px; } }

/* The Omnibox capsule: the full rail; `⧉ N` (only while N > 0) and the mic sit inside its trailing end */
.omnibox-capsule {
  display: flex; align-items: center; width: 100%; min-height: 44px;
  border-radius: 22px; background: var(--surface-alt); color: var(--ink-2);
}
.omnibox-capsule:hover { background: color-mix(in srgb, var(--ink) 6%, var(--surface-alt)); }
.omnibox-trigger {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 8px 0 14px;
  border: 0; border-radius: 22px; background: none; color: var(--ink-3); font: inherit; font-size: 15px; text-align: left; cursor: text;
}
.omnibox-lead-ico { width: 18px; height: 18px; flex: none; color: var(--ink-2); }
.omnibox-placeholder { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.omnibox-tabs-btn {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 44px; height: 44px; padding: 0 8px;
  border: 0; border-radius: 22px; background: none; color: var(--ink); font: inherit; font-size: 13px; font-weight: 600;
  font-variant-numeric: tabular-nums; cursor: pointer;
}
.omnibox-tabs-ico { width: 17px; height: 17px; }
.omnibox-mic-btn {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: none; color: var(--ink-2); cursor: pointer;
}
.omnibox-tabs-btn:hover, .omnibox-mic-btn:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.omnibox-mic-btn .icon { width: 19px; height: 19px; }

/* Frequent sites: fixed tiles (44×44 icon, one 11px label line); never a scrolling strip */
.freq-sites { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.freq-tile {
  min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0;
  border: 0; background: none; color: var(--ink-2); font: inherit; text-decoration: none; cursor: pointer;
}
.freq-ico {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--hairline); background: var(--surface); color: var(--ink); font-size: 17px; font-weight: 700;
}
.freq-ico img { width: 26px; height: 26px; object-fit: contain; border-radius: 5px; }
.freq-ico .icon { width: 20px; height: 20px; color: var(--ink-2); }
.freq-tile:hover .freq-ico { border-color: color-mix(in srgb, var(--ink) 22%, var(--hairline)); }
.freq-tile:focus-visible { outline: none; }
.freq-tile:focus-visible .freq-ico { box-shadow: var(--focus); }
.freq-name { max-width: 100%; font-size: 11px; line-height: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.freq-row .freq-tile:nth-child(n+5):not(.freq-all) { display: none; }
@media (min-width: 720px) {
  .freq-row { grid-template-columns: repeat(8, minmax(44px, 60px)); gap: 6px; }
  .freq-row .freq-tile:nth-child(n+5):not(.freq-all) { display: flex; }
}
@media (min-width: 1064px) { .freq-row { gap: 8px; } }
.freq-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 8px; padding: 4px 10px 6px; }
.site-monogram { line-height: 1; }

/* Continue reading (2 columns per card) + Achievements card (1 column), on the shelf grid's own columns and gap */
.continue-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: var(--rail-gap, 16px); align-items: stretch; }
.continue-card {
  grid-column: span 2; position: relative; display: flex; min-width: 0; min-height: 96px; overflow: hidden;
  border: 1px solid var(--hairline); border-radius: 12px; background: var(--surface);
}
.continue-card:hover { border-color: color-mix(in srgb, var(--ink) 18%, var(--hairline)); }
.continue-card-link {
  flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 12px; padding: 0 12px 0 0;
  border: 0; background: none; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer;
}
.continue-card .continue-cover { flex: none; width: 64px; height: 96px; border-radius: 0; box-shadow: none; outline: 0; }
.continue-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 12px 0 14px; }
.continue-card-title {
  font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.continue-card-sub { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.continue-card-prog { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; }
.continue-card:has(.continue-pager) .continue-card-body { padding-bottom: 24px; }
.continue-card-prog .progress { flex: 1; }
.continue-card-pct { font-size: 12px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.serial-thumb { display: grid; place-items: center; background: var(--surface-alt); overflow: hidden; }
.serial-thumb img { width: 100%; height: 100%; object-fit: cover; }
.serial-mono span { font-size: 22px; font-weight: 700; color: var(--ink-2); }
.serial-tr-pill { align-self: flex-start; margin-top: 4px; padding: 1px 8px; border-radius: 999px; background: var(--surface-alt); color: var(--ink-2); font-size: 11.5px; }
.serial-next-btn { position: absolute; top: 4px; right: 4px; }
.continue-pager { position: absolute; right: 4px; bottom: 2px; display: flex; }
.continue-dot { display: grid; place-items: center; width: 18px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
.continue-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 22%, transparent); }
.continue-dot[aria-current="true"]::before { background: var(--ink); }
.ach-home-card {
  grid-column: span 1; min-width: 0; min-height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 10px 8px; border: 1px solid var(--hairline); border-radius: 12px; background: var(--surface);
  color: var(--ink); text-align: center; text-decoration: none;
}
.ach-home-card:hover { border-color: color-mix(in srgb, var(--ink) 18%, var(--hairline)); }
.ach-home-pic { display: grid; place-items: center; width: 52px; height: 44px; }
.ach-home-pic > * { max-width: 52px; max-height: 44px; }
.ach-home-count { font-size: 12.5px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
@media (max-width: 359px) { .continue-card, .ach-home-card { grid-column: 1 / -1; } }
.home-sync-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px;
  border-radius: 12px; border: 1px solid var(--hairline); background: var(--surface); font-size: 13.5px; color: var(--ink-2);
}

/* My library header: title · Free books › (a link) · + (import a file; its glyph's right edge on the rail) */
.home-lib-head { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.home-lib-head .home-layer-title { flex: 1; min-width: 0; }
.home-head-link {
  display: inline-flex; align-items: center; gap: 2px; min-height: 44px;
  color: var(--accent-ink); font-size: 15px; font-weight: 550; text-decoration: none; white-space: nowrap;
}
.home-head-link:hover { text-decoration: underline; }
.home-head-chev { width: 16px; height: 16px; }
.home-import-btn {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px;
  border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer;
}
.home-import-btn:hover { background: var(--surface-alt); }
.home-import-btn .icon { width: 24px; height: 24px; }
.home-sort-bar { margin-bottom: 4px; }

/* Omnibox palette: a full-screen sheet on phones; on wide windows a popover whose field sits on the Home capsule
   (or, opened with ⌘K elsewhere, a centered palette). One highlighted row = a full-row tint, never a side stripe. */
dialog.omnibox-dialog {
  width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0;
  border: 0; background: var(--bg); color: var(--ink); overflow: hidden;
}
dialog.omnibox-dialog[open] { display: flex; flex-direction: column; }
dialog.omnibox-dialog::backdrop { background: rgba(18, 17, 16, 0.28); }
@media (min-width: 720px) {
  dialog.omnibox-dialog {
    width: min(640px, calc(100vw - 32px)); height: auto; max-height: min(80vh, 720px); margin: 12vh auto auto;
    border: 1px solid var(--hairline); border-radius: 22px; box-shadow: var(--shadow-pop);
  }
  dialog.omnibox-dialog.anchored { position: fixed; right: auto; bottom: auto; margin: 0; max-width: calc(100vw - 32px); }
  dialog.omnibox-dialog.anchored::backdrop { background: rgba(18, 17, 16, 0.12); }
  dialog.omnibox-dialog .omnibox-cancel-btn { display: none; }
}
.omnibox-head { display: flex; align-items: center; gap: 8px; padding: 8px 20px; }
@media (min-width: 720px) { .omnibox-head { padding: 4px; } }
.omnibox-field {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 0 0 14px;
  border-radius: 22px; background: var(--surface-alt);
}
.omnibox-field-lead { display: grid; place-items: center; color: var(--ink-2); }
.omnibox-field-lead .icon { width: 18px; height: 18px; }
.omnibox-field .omnibox-input {
  flex: 1; min-width: 0; width: auto; min-height: 44px; padding: 0 4px; border: 0; border-radius: 0;
  background: transparent; color: var(--ink); font-size: 16px; box-shadow: none; outline: none;
}
.omnibox-field .omnibox-input::selection { background: var(--accent-soft); color: var(--ink); }
.omnibox-voice-btn.listening { color: var(--accent); }
.omnibox-voice-btn.send-ready { background: var(--accent); color: #fff; }
.omnibox-results { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 10px 16px; overscroll-behavior: contain; }
@media (min-width: 720px) { .omnibox-results { padding: 4px 4px 10px; } }
.omnibox-section { display: flex; flex-direction: column; }
.omnibox-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; padding: 0 10px; }
.omnibox-sec-title { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.omnibox-row {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 10px;
  border-radius: 12px; color: var(--ink); cursor: pointer;
}
.omnibox-row:hover, .omnibox-row.active { background: var(--surface-alt); }
.omnibox-row-ico { flex: none; display: grid; place-items: center; width: 32px; height: 32px; color: var(--ink-2); }
.omnibox-row-ico .icon { width: 18px; height: 18px; }
.omnibox-row-ico.accent { color: var(--accent); }
.omnibox-site-ico {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; overflow: hidden;
  border: 1px solid var(--hairline); border-radius: 8px; background: var(--surface); font-size: 14px; font-weight: 700;
}
.omnibox-site-ico img { width: 20px; height: 20px; object-fit: contain; }
.omnibox-row .omnibox-cover { flex: none; width: 32px; height: 48px; border-radius: 4px; }
.omnibox-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.omnibox-row-title { font-size: 15px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.omnibox-row-sub { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.omnibox-host { color: var(--ink-2); }
.omnibox-host-hit { color: var(--ink); font-weight: 600; }
.omnibox-host-name { color: var(--ink-2); }
.omnibox-fill {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: -6px -8px -6px 0;
  border: 0; border-radius: 50%; background: none; color: var(--ink-3); cursor: pointer;
}
.omnibox-fill:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.omnibox-fill .icon { width: 18px; height: 18px; }
.omnibox-row-chev { flex: none; width: 16px; height: 16px; color: var(--ink-3); }
.omnibox-row-act { flex: none; }
.omnibox-ai-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 10px; }
.omnibox-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border: 1px solid var(--hairline); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; cursor: pointer;
}
.omnibox-chip:hover { background: var(--surface-alt); }
.omnibox-chip-ico { width: 15px; height: 15px; color: var(--accent); }
.omnibox-l2-host { flex: 1; min-height: 220px; overflow-y: auto; display: flex; flex-direction: column; }
.omnibox-l2-host .ask-card { position: static; width: 100%; max-height: none; border: 0; box-shadow: none; }

/* Sort pills (My library) and category pills (All sites, the catalog) */
.sort-pills {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.sort-pill {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.sort-pill[aria-selected="true"],
.sort-pill[aria-pressed="true"],
.sort-pill.active {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent-ink);
  font-weight: 600;
}
.catalog-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}
.catalog-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.catalog-cover-fallback {
  padding: 10px 8px;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  color: var(--ink-2);
}
.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 14px 10px;
}
@media (max-width: 540px) {
  .sites-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 8px;
  }
}
.site-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.site-tile.editing {
  animation: site-jiggle 280ms ease-in-out infinite alternate;
}
@keyframes site-jiggle {
  from { transform: rotate(-1.1deg); }
  to { transform: rotate(1.1deg); }
}
.site-tile.drop-over {
  outline: 2px solid var(--accent);
  border-radius: 14px;
}
.site-tile-link {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.site-tile-link:hover {
  background: var(--surface-alt);
}
.site-tile-ico {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
}
.site-tile-ico img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
}
.site-add-dashed {
  border-style: dashed;
  color: var(--ink-2);
}
.site-tile-name {
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--ink);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-ext-arrow {
  font-size: 11px;
  color: var(--ink-3);
  margin-left: 2px;
}
.site-tile-del {
  position: absolute;
  top: 0;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--bg);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.web-ext-cue {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  font-size: 13.5px;
  color: var(--ink-2);
}
.web-ext-cue[hidden] { display: none; }
.web-ext-cue-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* All sites: the editable directory by category, in a sheet opened from the last Frequent sites tile */
.modal.all-sites-modal { width: min(760px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--bg); }
.all-sites-sheet { padding: 20px 20px 24px; }
.sites-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.sites-footer { display: flex; justify-content: flex-end; }
.pill-del { margin-left: 6px; color: var(--ink-3); cursor: pointer; }

/* Catalog Browser (#/catalog) & CatalogBookSheet (§3.2.4) */
.catalog-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.catalog-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.catalog-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.catalog-book-dialog {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.catalog-sheet-hero {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.catalog-sheet-cover {
  width: 96px;
  flex: none;
}
.catalog-sheet-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.catalog-sheet-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
}
.catalog-sheet-author {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
}
.catalog-sheet-stats {
  font-size: 13px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.catalog-sheet-desc {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
}
.catalog-sheet-license {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-2);
}

/* Open-source Licenses (#/licenses, §5.3) */
.license-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
}
.license-badge-line { margin: 4px 0 0; }
.license-copyright { margin: 8px 0 0; font-size: 14px; }
.license-note { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink); }
.license-links { margin-top: 12px; }

/* Ask L2 Official Site Cards (§2.4) */
.ask-site-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.ask-site-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: var(--surface);
}
.ask-site-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ask-site-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ask-site-card-host {
  font-size: 12px;
  color: var(--ink-2);
}

/* Electron Browser Breadcrumb & Accessible Reader Bar (§1.2, §4.3) */
.browser-crumb {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--ink);
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
}
.browser-crumb:hover { background: var(--accent-soft); color: var(--accent-ink); }
.browser-a11y-reader-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface);
}
.browser-a11y-reader-bar[hidden] { display: none; }

/* Blind Listen to Manga Accessible Bubble Stream & Bundled Comic Colophon (§4.4.3, §5.1.4) */
.comic-a11y-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 26;
  width: min(380px, 100%);
  display: flex;
  flex-direction: column;
  border-inline-start: 1px solid var(--hairline);
  background: var(--bg);
  color: var(--ink);
}
.comic-a11y-panel[hidden] { display: none; }
.comic-a11y-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
}
.comic-a11y-heading {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}
.comic-a11y-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.comic-a11y-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.comic-a11y-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.comic-a11y-item {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.comic-a11y-item.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.comic-a11y-bubble-btn {
  width: 100%;
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  cursor: pointer;
}
.comic-a11y-item-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.comic-a11y-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}
.comic-a11y-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--hairline);
}
.sample-colophon {
  margin-top: 6px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--ink-3);
  text-align: center;
}
.sample-colophon a {
  color: var(--ink-2);
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .site-tile.editing {
    animation: none !important;
  }
}

/* Phone "How to use" animations (site-src/howto-mobile-scenes.js; ported from iOS HelpAnimation.swift). */
.ht-box.ht-box-mobile { aspect-ratio: auto; height: min(410px, 56dvh); min-height: 330px; }
.hm-stage {
  position: absolute; left: 0; top: 0; transform-origin: 0 0; overflow: hidden;
  --rbg: #FFFFFF; --rink: #1C1B1A; --rink2: #6B6760; --rline: #ECE8E1; --tts: #D9643A33; --sel: rgba(217, 100, 58, 0.22); --hl: rgba(246, 211, 101, 0.45);
  --hl-g: rgba(155, 211, 174, 0.45);
  --pframe: #171717; --pedge: var(--hairline); --pdeck: rgba(128, 124, 118, 0.55);
  font-family: var(--sans); color: var(--ink); line-height: 1.3; user-select: none; -webkit-user-select: none;
}
@media (prefers-color-scheme: dark) {
  .hm-stage {
    --rbg: #121110; --rink: #D9D4CB; --rink2: #A39E95; --rline: #2E2C29; --tts: #F07A4F40; --sel: rgba(240, 122, 79, 0.35); --hl: rgba(246, 211, 101, 0.35);
    --hl-g: rgba(155, 211, 174, 0.35);
    --pframe: #171717; --pedge: rgba(163, 158, 149, 0.45); --pdeck: rgba(163, 158, 149, 0.45);
  }
}
.hm-stage .icon { width: 10px; height: 10px; display: block; flex: none; }
.hm-stage .down { scale: 0.9; filter: brightness(0.94); }
.hm-scene, .hm-beat { position: absolute; inset: 0; }

/* Devices: MiniPhone (201×437 screen + 4px bezel = 209×445) & MiniLaptop (372×232 screen + 6px bezel) */
.hm-phone {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 209px; height: 445px; padding: 4px; border-radius: 31px;
  background: var(--pframe); box-shadow: 0 0 0 1px var(--pedge), 0 6px 20px rgba(0, 0, 0, 0.14);
}
.hm-pscr { position: relative; width: 201px; height: 437px; border-radius: 27px; overflow: hidden; background: var(--bg); }
.hm-sbar { position: absolute; left: 0; top: 0; right: 0; height: 28px; z-index: 15; pointer-events: none; }
.hm-time { position: absolute; left: 22px; top: 9px; font-size: 8px; font-weight: 600; color: var(--ink); line-height: 1; }
.hm-island { position: absolute; left: 50%; top: 5px; width: 62px; height: 18px; translate: -50% 0; border-radius: 9px; background: #000; }
.hm-sicons { position: absolute; right: 14px; top: 10px; display: flex; align-items: center; gap: 3px; color: var(--ink); }
.hm-sicons .icon { width: 8px; height: 8px; }
.hm-bat { display: block; width: 12px; height: 6px; border-radius: 2px; background: currentColor; }

.hm-laptop { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 384px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.12)); }
.hm-llid { width: 384px; height: 244px; padding: 6px; border-radius: 10px 10px 2px 2px; background: var(--pframe); box-shadow: 0 0 0 1px var(--pedge); }
.hm-lscr { position: relative; width: 372px; height: 232px; border-radius: 3px; overflow: hidden; background: var(--bg); }
.hm-lbase { width: 398px; height: 7px; margin-left: -7px; border-radius: 0 0 6px 6px; background: var(--pdeck); }
.hm-wbar { position: relative; flex: none; height: 17px; display: flex; align-items: center; gap: 3px; padding: 0 7px; background: var(--surface-alt); }
.hm-wbar > i { width: 5px; height: 5px; border-radius: 50%; background: var(--hairline); }
.hm-waddr { position: absolute; left: 50%; translate: -50% 0; padding: 0 18px; height: 11px; line-height: 11px; border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: 6px; white-space: nowrap; }

/* Shared phone screen pieces: glass buttons, large title, tab bar, dim, grabber */
.hm-screen { position: absolute; inset: 0; background: var(--bg); color: var(--ink); overflow: hidden; }
.hm-gbtn {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--ink);
  border: 0.5px solid var(--hairline); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); transition: scale 0.1s;
}
.hm-gbtn .icon { width: 9px; height: 9px; }
.hm-gbtn.accent { color: var(--accent); }
.hm-lhead { position: relative; height: 60px; }
.hm-lhead > b { position: absolute; left: 10px; top: 31px; font-size: 17px; font-weight: 700; line-height: 22px; color: var(--ink); white-space: nowrap; }
.hm-lbtns { position: absolute; right: 8px; top: 31px; display: flex; gap: 6px; }
.hm-tabs {
  position: absolute; left: 50%; bottom: 11px; translate: -50% 0; z-index: 4;
  display: grid; grid-template-columns: repeat(3, 1fr); width: 137px; height: 30.5px; padding: 0 2px;
  border-radius: 999px; background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 0.5px solid var(--hairline); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.hm-tabs.wide { width: 180px; }
.hm-tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5px; color: var(--ink); }
.hm-tab .icon { width: 10.5px; height: 10.5px; }
.hm-tab em { font-style: normal; font-size: 5px; font-weight: 500; line-height: 1; white-space: nowrap; overflow: hidden; max-width: 100%; }
.hm-tab.on { color: var(--accent); }
.hm-tab.on::before { content: ""; position: absolute; inset: 2.5px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.hm-dim { position: absolute; inset: 0; z-index: 6; background: #000; opacity: 0; pointer-events: none; }
.hm-dim.on { opacity: 0.18; }
.hm-dim2 { z-index: 9; }
.hm-grab { display: block; width: 18px; height: 2.5px; margin: 4px auto 0; border-radius: 999px; background: var(--hairline); }

/* Covers */
.hm-cv { width: 54.5px; height: 81.75px; border-radius: 3px; background: center / cover no-repeat; box-shadow: 0 1.5px 4px rgba(0, 0, 0, 0.14); overflow: hidden; flex: none; }
.hm-cvf { display: grid; place-items: center; padding: 4px; color: #fff; text-align: center; }
.hm-cvf b { font-size: 6px; font-weight: 600; line-height: 1.2; overflow: hidden; }
.hm-cvscan { background: #F4EFE4; position: relative; }
.hm-scanpg { width: 201px; height: 284px; padding: 10px 12px 12px; background: linear-gradient(168deg, #FAF6EE 0%, #F4EFE4 56%, #EFE9DC 100%); border: 0.5px solid rgba(90, 74, 52, 0.16); box-shadow: inset 8px 0 12px -9px rgba(60, 44, 24, 0.24), 0 3px 12px rgba(0, 0, 0, 0.12); color: #2F2B26; overflow: hidden; display: flex; flex-direction: column; }
.hm-srun { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 6px; padding-bottom: 3.5px; margin-bottom: 5px; border-bottom: 0.5px solid rgba(90, 74, 52, 0.24); font-family: var(--serif); font-size: 4.4px; color: #6B6256; }
.hm-srun span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-scanpg h6 { flex: none; margin: 0 0 5px; font-family: var(--serif); font-size: 6.2px; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; color: #2F2B26; }
.hm-scols { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; overflow: hidden; }
.hm-scols div { font-family: var(--serif); font-size: 3.4px; line-height: 1.56; color: #3E3A34; text-align: justify; overflow: hidden; }
.hm-sfoot { flex: none; margin-top: 5px; padding-top: 3px; border-top: 0.5px solid rgba(90, 74, 52, 0.2); text-align: center; font-family: var(--serif); font-size: 4.4px; color: #6B6256; }
.hm-scanpg.mini { transform: scale(0.271); transform-origin: 0 0; }
.hm-scanpg.mini h6 { font-size: 8px; color: #2F2B26; }
.hm-scanpg.mini .hm-scols div { font-size: 5.5px; line-height: 1.45; color: #3E3A34; }
.hm-cvart { padding: 7.5px 6px; color: #1C1B1A; display: flex; flex-direction: column; align-items: flex-start; }
.hm-cvart small { font-size: 3.5px; font-weight: 600; letter-spacing: 0.03em; color: #6B6760; white-space: nowrap; overflow: hidden; max-width: 100%; }
.hm-cvart i { display: block; width: 10px; height: 1.8px; margin: 3.5px 0 4.5px; background: #D9643A; }
.hm-cvart b { font-family: var(--serif); font-size: 7px; font-weight: 700; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }

/* Library & Import file picker */
.hm-chips { position: absolute; left: 10px; top: 58px; display: flex; gap: 4px; white-space: nowrap; }
.hm-chips span { padding: 0 8px; height: 16.5px; line-height: 16.5px; border-radius: 999px; background: var(--surface-alt); color: var(--ink); font-size: 7px; font-weight: 500; }
.hm-chips span.on { background: var(--ink); color: var(--bg); }
.hm-slot { position: absolute; left: 0; top: 80px; width: 54.5px; }
.hm-bt { display: block; margin-top: 3px; font-size: 7px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-ba { display: block; font-size: 6px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-fpicker {
  position: absolute; left: 0; top: 0; width: 201px; height: 437px; z-index: 8;
  border-radius: 14px 14px 0 0; background: var(--surface); visibility: hidden;
}
.hm-fpsearch {
  display: flex; align-items: center; height: 17px; margin: 22px 10px 9px; padding: 0 7px;
  border-radius: 999px; background: var(--surface-alt); color: var(--ink-3);
}
.hm-fpsearch .icon { width: 7px; height: 7px; }
.hm-fprow { position: relative; display: flex; align-items: center; gap: 7px; height: 26px; padding: 0 12px; }
.hm-fprow::after { content: ""; position: absolute; left: 33px; right: 0; bottom: 0; height: 0.5px; background: var(--hairline); }
.hm-fprow.on { background: var(--surface-alt); }
.hm-fprow .icon { width: 13px; height: 13px; color: var(--ink-3); }
.hm-fprow span { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.hm-fprow b { font-size: 7.5px; font-weight: 400; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-fprow i { display: block; width: 40px; height: 3px; border-radius: 2px; background: var(--hairline); }

/* Two-device beats: Computer web library, Mail, AI assistant, Chrome */
.hm-wlib { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.hm-wtop { display: flex; align-items: center; justify-content: space-between; height: 34px; padding: 0 18px; border-bottom: 0.5px solid var(--hairline); }
.hm-wtop img { width: 18px; height: 18px; border-radius: 4px; }
.hm-wadd { display: grid; place-items: center; width: 40px; height: 18px; border-radius: 999px; background: var(--accent); color: #fff; }
.hm-wadd .icon { width: 9px; height: 9px; }
.hm-wshelf { position: relative; flex: 1; }
.hm-wslot { position: absolute; left: 18px; top: 72px; width: 50px; }
.hm-wcv { width: 50px; height: 75px; }
.hm-drag { position: absolute; left: 0; top: 0; z-index: 10; pointer-events: none; }
.hm-fchip { display: inline-flex; align-items: center; gap: 3px; padding: 3px 5px; border-radius: 5px; background: var(--surface-alt); color: var(--ink); font-size: 6.5px; font-weight: 600; white-space: nowrap; }
.hm-fchip em { padding: 1px 3px; border-radius: 2px; color: #fff; font-style: normal; font-size: 5px; font-weight: 700; }
.hm-fchip em.pdf { background: #C0392B; }
.hm-fchip em.epub { background: #2E7D4F; }
.hm-fchip.lg { transform: scale(1.35); transform-origin: 0 0; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18); background: var(--surface); }
.hm-fchip.mail { margin: 14px 16px 0; transform: scale(1.35); transform-origin: 0 0; }

.hm-mailbg { position: absolute; inset: 0; background: var(--surface-alt); }
.hm-mail { position: absolute; inset: 0; background: var(--surface); }
.hm-mailbar { display: flex; justify-content: flex-end; align-items: center; height: 36px; padding: 0 15px; }
.hm-sendbtn { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; transition: scale 0.1s; }
.hm-sendbtn .icon { width: 10px; height: 10px; }
.hm-mailto { display: flex; gap: 6px; margin: 0 16px; padding: 8px 0; border-bottom: 0.5px solid var(--hairline); font-size: 10px; }
.hm-mailto span { color: var(--ink-2); }
.hm-mailto b { font-weight: 600; color: var(--ink); }

.hm-hmini { background: var(--surface-alt); }
.hm-hmsheet { position: absolute; left: 0; right: 0; top: 26px; bottom: 0; border-radius: 14px 14px 0 0; background: var(--bg); display: flex; flex-direction: column; align-items: center; }
.hm-hmtop { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 9px 9px 0; gap: 4px; }
.hm-hmtop > b { flex: 1; text-align: center; font-size: 8px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-hmdone { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 92%, transparent); border: 0.5px solid var(--hairline); font-size: 7.5px; font-weight: 600; color: var(--ink); }
.hm-hmline { position: relative; width: 181px; margin-top: 26px; text-align: center; }
.hm-hmline p { margin: 0; font-size: 8px; line-height: 1.4; color: var(--ink); }
.hm-hmcopied { position: absolute; left: 50%; top: 50%; translate: -50% -50%; padding: 0 9px; height: 22px; line-height: 22px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 7.5px; white-space: nowrap; opacity: 0; }
.hm-hmpill { margin-top: 16px; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--surface); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); font-size: 8.5px; font-weight: 600; color: var(--ink); transition: scale 0.1s; }
.hm-hmpill .icon { width: 8px; height: 8px; color: var(--ink-3); }

.hm-chat { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.hm-msgs { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 10px 14px 6px; overflow: hidden; }
.hm-me { align-self: flex-end; max-width: 250px; padding: 5px 9px; border-radius: 9px; background: var(--surface-alt); font-size: 9px; line-height: 1.35; color: var(--ink); white-space: pre-line; }
.hm-pasted { width: 240px; padding: 7px 8px 0; border-bottom: 7px solid transparent; max-height: 44px; font-size: 7.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hm-bot { display: flex; align-items: flex-start; gap: 6px; opacity: 0; }
.hm-ok { display: grid; place-items: center; width: 12px; height: 12px; border-radius: 50%; background: #2E7D4F; color: #fff; flex: none; }
.hm-ok .icon { width: 8px; height: 8px; }
.hm-shape { display: flex; flex-direction: column; gap: 4px; padding-top: 3px; }
.hm-shape i { display: block; width: 170px; height: 4px; border-radius: 2px; background: var(--hairline); }
.hm-done { font-size: 9px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-chatin { display: flex; align-items: center; gap: 6px; min-height: 34px; margin: 0 14px 10px; padding: 6px 9px; border-radius: 11px; border: 0.5px solid var(--hairline); background: var(--surface); }
.hm-chatfield { flex: 1; min-width: 0; min-height: 10px; font-size: 9px; color: var(--ink); line-height: 1.3; }
.hm-chatfield.block { max-height: 30px; font-size: 7.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.hm-up { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); color: var(--bg); transition: scale 0.1s; }
.hm-up .icon { width: 9px; height: 9px; }

/* Chrome + Read later folder drop */
.hm-chrome { position: absolute; inset: 0; background: var(--bg); }
.hm-ext { position: absolute; right: 11px; top: 2.5px; width: 12px; height: 12px; border-radius: 3px; display: grid; place-items: center; transition: scale 0.1s; }
.hm-ext img { width: 11px; height: 11px; border-radius: 2.5px; }
.hm-wpage { padding: 18px 46px 0; color: var(--ink); }
.hm-wpage h4 { margin: 0; font-family: var(--serif); font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-wpage small { display: block; margin: 4px 0 10px; font-size: 7px; color: var(--ink-2); }
.hm-wpage p { margin: 0; font-family: var(--serif); font-size: 8.5px; line-height: 1.75; }
.hm-xpop {
  position: absolute; right: 6px; top: 20px; width: 156px; border-radius: 9px;
  background: var(--surface); border: 0.5px solid var(--hairline); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  overflow: hidden; opacity: 0;
}
.hm-xbar { display: flex; align-items: center; gap: 4px; height: 21px; padding: 0 7px; border-bottom: 0.5px solid var(--hairline); font-size: 7.5px; }
.hm-xbar img { width: 11px; height: 11px; border-radius: 2.5px; }
.hm-xbar b { flex: 1; font-weight: 700; color: var(--ink); }
.hm-xbar .icon { width: 8px; height: 8px; color: var(--ink-2); }
.hm-xpane { display: flex; flex-direction: column; gap: 5px; padding: 8px; font-size: 7px; }
.hm-xpane[hidden] { display: none; }
.hm-xtitle { font-size: 8.5px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.hm-xmeta { display: flex; gap: 6px; font-size: 6.5px; color: var(--ink-2); }
.hm-xmeta span { display: inline-flex; align-items: center; gap: 2px; }
.hm-xmeta .icon { width: 7px; height: 7px; }
.hm-xsave { display: grid; place-items: center; height: 18px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 7.5px; font-weight: 500; transition: scale 0.1s; }
.hm-xss { display: grid; place-items: center; height: 17px; padding: 0 6px; border-radius: 999px; background: var(--surface-alt); border: 0.5px solid var(--hairline); color: var(--ink); font-size: 7px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-xrun, .hm-xdone { align-items: center; text-align: center; padding: 11px 8px 9px; }
.hm-xrun b, .hm-xdone b { font-size: 8px; font-weight: 600; color: var(--ink); }
.hm-xrun small, .hm-xdone small { font-size: 6.5px; color: var(--ink-2); }
.hm-xspin { width: 14px; height: 14px; border-radius: 50%; border: 1.6px solid var(--accent-soft); border-top-color: var(--accent); animation: ht-xspin 0.9s linear infinite; }
.hm-xprog { width: 100%; height: 2px; border-radius: 999px; background: var(--surface-alt); overflow: hidden; }
.hm-xprog i { display: block; height: 100%; background: var(--accent); }
.hm-xok { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(46, 139, 87, 0.18); color: #2E8B57; }
.hm-xok .icon { width: 11px; height: 11px; }

.hm-fslot { position: absolute; left: 10px; top: 80px; width: 54.5px; }
.hm-folder {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px;
  width: 54.5px; height: 81.75px; padding: 5px; border-radius: 7px;
  background: var(--surface-alt); border: 0.5px solid var(--hairline);
}
.hm-fcv { width: 100%; height: 100%; border-radius: 1.5px; box-shadow: none; padding: 2px; }
.hm-fcv small { font-size: 1.8px; }
.hm-fcv i { width: 4px; height: 1px; margin: 1.5px 0 2px; }
.hm-fcv b { font-size: 3px; }
.hm-fdrop { opacity: 0; }
.hm-fdrop.on { opacity: 1; }
.hm-xfall { position: absolute; left: 0; top: 0; width: 54.5px; height: 81.75px; z-index: 7; opacity: 0; pointer-events: none; }
.hm-fallcv { width: 54.5px; height: 81.75px; }

/* Reader page & bars */
.hm-rd { background: var(--rbg); color: var(--rink); }
.hm-pgbox { position: absolute; left: 13px; top: 60px; width: 175px; height: 328px; overflow: hidden; }
.hm-pg { height: 328px; column-width: 175px; column-gap: 24px; column-fill: auto; font-family: var(--serif); font-size: 10.5px; line-height: 1.65; color: var(--rink); }
.hm-pg.has-tl { font-size: 9.5px; line-height: 1.6; }
.hm-pg h6 { margin: 0 0 10px; font-family: var(--serif); font-size: 14.5px; font-weight: 700; line-height: 1.25; color: var(--rink); }
.hm-pg p { margin: 0 0 6px; }
.hm-pg .tl { color: color-mix(in srgb, var(--rink) 72%, transparent); }
.hm-pg .s { border-radius: 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hm-pg .s.read { background: var(--tts); }
.hm-pg .s.marked { background: var(--hl); }

.hm-rbars { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.hm-rclose { position: absolute; left: 8px; top: 31.5px; }
.hm-rtitle { position: absolute; left: 36px; top: 31.5px; width: 70px; height: 22px; line-height: 22px; font-size: 7.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-rtitle.short { width: 52px; }
.hm-rpill {
  position: absolute; right: 8.5px; top: 31.5px; height: 22px; padding: 0 3px; display: flex; align-items: center;
  border-radius: 999px; background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 0.5px solid var(--hairline); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.hm-ri { display: grid; place-items: center; width: 25px; height: 20px; color: var(--ink); transition: scale 0.1s; }
.hm-ri .icon { width: 9.5px; height: 9.5px; }
.hm-ri.on { color: var(--accent); }
.hm-rbot {
  position: absolute; left: 16px; bottom: 15px; width: 139px; height: 22px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  border-radius: 999px; background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 0.5px solid var(--hairline); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.hm-rbot > span { display: grid; place-items: center; color: var(--ink); }
.hm-rbot .icon { width: 9px; height: 9px; }
.hm-ra { font-size: 10px; font-weight: 400; line-height: 1; }
.hm-listen {
  position: absolute; right: 13px; bottom: 13px; width: 25.5px; height: 25.5px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18); transition: scale 0.1s;
}
.hm-listen .icon { width: 11px; height: 11px; }
.hm-listen-float { z-index: 5; width: 27px; height: 27px; right: 12.25px; bottom: 12.25px; opacity: 0; }
.hm-wf { display: inline-flex; align-items: center; gap: 1.5px; height: 8.5px; }
.hm-wf i { display: block; width: 1.6px; height: 8.5px; border-radius: 1px; background: currentColor; transform-origin: 50% 50%; }

/* Full player sheet & mini player bar & speed sheet */
.hm-mplayer {
  position: absolute; left: 10px; top: 368px; width: 181px; height: 23px; z-index: 4;
  display: flex; align-items: center; gap: 5px; padding: 0 3px 0 6px;
  border-radius: 999px; background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 0.5px solid var(--hairline); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); transition: scale 0.1s;
}
.hm-mpcv { width: 12px; height: 18px; border-radius: 1.5px; }
.hm-mptxt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hm-mptxt b { font-size: 7px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-mptxt small { font-size: 6px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-mppause { display: grid; place-items: center; width: 16px; color: var(--ink); }
.hm-mppause .icon { width: 9px; height: 9px; }
.hm-mpmic { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; flex: none; }
.hm-mpmic .icon { width: 8px; height: 8px; }

.hm-psheet {
  position: absolute; left: 0; top: 31px; width: 201px; height: 406px; z-index: 8;
  border-radius: 14px 14px 0 0; background: var(--bg); color: var(--ink); visibility: hidden;
}
.hm-psclose { position: absolute; left: 10px; top: 11px; width: 16px; height: 16px; display: grid; place-items: center; color: var(--ink); transition: scale 0.1s; }
.hm-psclose .icon { width: 10px; height: 10px; }
.hm-pstitle { position: absolute; left: 32px; right: 32px; top: 13px; text-align: center; font-size: 6.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-pscv { position: absolute; left: 50.5px; top: 40px; width: 100px; height: 150px; border-radius: 5px; }
.hm-pslines { position: absolute; left: 15px; top: 204px; width: 171px; display: flex; flex-direction: column; align-items: center; gap: 2.5px; font-family: var(--serif); font-size: 7.5px; line-height: 1.25; }
.hm-pslines span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-pslines .l0 { color: var(--ink-2); opacity: 0.8; }
.hm-pslines .l1 { color: var(--ink); }
.hm-pslines .l2 { color: var(--ink-2); opacity: 0.5; }
.hm-psmeta { position: absolute; left: 14px; right: 14px; top: 248px; }
.hm-psmeta b { display: block; font-size: 10.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-psmeta small { display: block; font-size: 8px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-scrub { position: absolute; left: 14px; top: 291px; width: 173px; height: 4px; border-radius: 999px; background: var(--surface-alt); overflow: hidden; }
.hm-scrub i { display: block; width: 38px; height: 100%; border-radius: 999px; background: var(--ink-2); }
.hm-scrubt { position: absolute; left: 14px; top: 299px; width: 173px; display: flex; justify-content: space-between; font-size: 5.5px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.hm-pctl { position: absolute; left: 10px; top: 315px; width: 181px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; justify-items: center; color: var(--ink); }
.hm-pctl .icon { width: 10px; height: 10px; }
.hm-ppause { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; }
.hm-ppause .icon { width: 12px; height: 12px; }
.hm-ptiles { position: absolute; left: 8px; top: 361px; width: 185px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; }
.hm-ptile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: 27px; border-radius: 7px; background: var(--surface-alt); color: var(--ink); transition: scale 0.1s;
}
.hm-ptile .icon { width: 8px; height: 8px; }
.hm-ptile b { font-size: 4.8px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; max-width: 100%; padding: 0 1px; }
.hm-ptile.on { background: var(--accent-soft); color: var(--accent); }
.hm-ptile.accent { background: var(--accent); color: #fff; }

.hm-spdsheet {
  position: absolute; left: 0; bottom: 0; width: 201px; height: 150px; z-index: 10;
  border-radius: 14px 14px 0 0; background: var(--surface); padding: 14px 20px 0; text-align: center; visibility: hidden;
}
.hm-spdsheet > b { display: block; font-size: 8.5px; font-weight: 600; color: var(--ink-2); }
.hm-spdrow { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }
.hm-spdbtn { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-alt); font-size: 12px; font-weight: 600; color: var(--ink); transition: scale 0.1s; }
.hm-spdv { min-width: 68px; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.hm-spdrange { position: relative; height: 2px; margin: 22px 0 10px; border-radius: 999px; background: var(--hairline); --v: 0.2; }
.hm-spdrange i { position: absolute; left: 0; top: 0; width: calc(var(--v) * 100%); height: 100%; border-radius: 999px; background: var(--accent); }
.hm-spdrange span { position: absolute; top: 50%; left: calc(var(--v) * 100%); width: 14px; height: 14px; translate: -50% -50%; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22); }
.hm-spdmarks { display: flex; justify-content: space-between; font-size: 5.5px; color: var(--ink-2); }

/* Answer card (Ask & Voice) */
.hm-acard {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 8;
  border-radius: 14px 14px 0 0; background: var(--surface); color: var(--ink);
  box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.14);
}
.hm-achead { display: flex; align-items: center; justify-content: space-between; padding: 5px 10px 0; font-size: 7.5px; }
.hm-acstat { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; color: var(--ink); }
.hm-acstat .icon { width: 8.5px; height: 8.5px; color: var(--accent); }
.hm-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.hm-acx { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--surface-alt); color: var(--ink-2); }
.hm-acx .icon { width: 7px; height: 7px; }
.hm-acbody { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 8px 10px; }
.hm-acpad { height: 18px; }
.hm-acq { margin: 0; font-size: 8.5px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.hm-acq:empty, .hm-aca:empty { display: none; }
.hm-aca { margin: 0; font-size: 8px; line-height: 1.5; color: var(--ink); }
.hm-acsep { display: block; width: 100%; height: 0.5px; background: var(--hairline); }
.hm-chip {
  display: inline-flex; align-items: center; gap: 3.5px; height: 17px; padding: 0 6px;
  border-radius: 999px; background: var(--accent-soft); font-size: 7px; color: var(--ink);
}
.hm-chip .icon { width: 7.5px; height: 7.5px; color: var(--accent); }
.hm-chip em { font-style: normal; color: var(--ink-3); }
.hm-chip b { font-weight: 600; color: var(--accent); }
.hm-acfoot { display: flex; align-items: center; gap: 6px; padding: 4px 10px 14px; border-top: 0.5px solid var(--hairline); }
.hm-acfield { flex: 1; min-width: 0; display: flex; align-items: center; gap: 3px; height: 22px; padding: 0 3px 0 8px; border-radius: 11px; background: var(--surface-alt); }
.hm-actext { flex: 1; min-width: 0; font-size: 7.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-actext.ph { color: var(--ink-3); }
.hm-acsend { flex: none; display: grid; place-items: center; width: 15px; height: 15px; color: var(--accent); transition: scale 0.1s; }
.hm-acsend .icon { width: 14px; height: 14px; }
.hm-orb { position: relative; flex: none; width: 24px; height: 24px; --b: 0; transition: scale 0.1s; }
.hm-orbin { position: relative; z-index: 2; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; }
.hm-orbmic .icon { width: 10px; height: 10px; }
.hm-orbwf { display: none; }
.hm-orb.on .hm-orbmic { display: none; }
.hm-orb.on .hm-orbwf { display: inline-flex; }
.hm-halo1, .hm-halo2 { position: absolute; inset: 0; border-radius: 50%; opacity: 0; pointer-events: none; }
.hm-orb.on .hm-halo1 { background: color-mix(in srgb, var(--accent) 18%, transparent); transform: scale(1.3); opacity: 1; }
.hm-orb.on .hm-halo2 { border: 1px solid var(--accent); opacity: calc(0.35 * (1 - var(--b))); transform: scale(calc(1.05 + 0.55 * var(--b))); }

/* Highlights selection, handles & iOS selection menu */
.hm-selbox, .hm-hlbox { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hm-selbox i, .hm-hlbox i { position: absolute; border-radius: 1px; }
.hm-selbox i { background: var(--sel); }
.hm-hlbox i { background: var(--hl); mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) { .hm-hlbox i { mix-blend-mode: normal; } }
.hm-hdl { position: absolute; width: 4px; }
.hm-hdl::after { content: ""; position: absolute; left: 1.5px; top: 0; bottom: 0; width: 1px; background: var(--accent); }
.hm-hdl::before { content: ""; position: absolute; left: 0; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.hm-hdl.top::before { top: 0; }
.hm-hdl.bot::before { bottom: 0; }
.hm-smenu {
  position: absolute; left: 50%; z-index: 5; width: 162px; border-radius: 8px;
  background: var(--surface); border: 0.5px solid var(--hairline); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); visibility: hidden;
}
.hm-sws { display: flex; align-items: center; justify-content: space-between; height: 21px; padding: 0 10px; border-bottom: 0.5px solid var(--hairline); }
.hm-sw { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.1); transition: scale 0.1s; }
.hm-sacts { display: grid; grid-template-columns: repeat(6, 1fr); height: 25px; align-items: center; }
.hm-sact { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5px; color: var(--ink); min-width: 0; }
.hm-sact.accent { color: var(--accent); }
.hm-sact .icon { width: 7.5px; height: 7.5px; }
.hm-sact em { font-style: normal; font-size: 4.8px; font-weight: 500; line-height: 1; white-space: nowrap; overflow: hidden; max-width: 100%; }

/* Notes & Share sheet */
.hm-ncard { margin: 6px 8px 0; border-radius: 10px; background: var(--surface); overflow: hidden; }
.hm-nrow { position: relative; display: flex; align-items: center; gap: 6px; padding: 7px 8px; min-height: 56px; }
.hm-nrow + .hm-nrow::before { content: ""; position: absolute; left: 36px; right: 0; top: 0; height: 0.5px; background: var(--hairline); }
.hm-ncv { width: 22px; height: 33px; border-radius: 2px; }
.hm-ntxt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hm-ntxt > b { font-size: 8px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-ntxt > small { font-size: 6.5px; color: var(--ink-2); }
.hm-nq { display: flex; align-items: flex-start; gap: 3px; font-size: 7.5px; color: var(--ink-2); line-height: 1.25; }
.hm-nq .icon { width: 7.5px; height: 7.5px; color: var(--accent); margin-top: 1px; }
.hm-nq span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-nhl { font-family: var(--serif); font-size: 7.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-nhl mark { background: var(--hl-g); color: var(--ink); }
.hm-nrow > .icon { width: 7px; height: 7px; color: var(--ink-3); }
.hm-shsheet {
  position: absolute; left: 0; bottom: 0; width: 201px; height: 220px; z-index: 8;
  border-radius: 14px 14px 0 0; background: var(--surface); visibility: hidden;
}
.hm-shhead { display: flex; align-items: center; gap: 7px; padding: 12px 12px 10px; border-bottom: 0.5px solid var(--hairline); }
.hm-shdoc { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 5px; background: var(--surface-alt); color: var(--ink-2); flex: none; }
.hm-shdoc .icon { width: 12px; height: 12px; }
.hm-shhead b { flex: 1; font-size: 8px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-shapps { display: flex; justify-content: space-between; padding: 12px 14px 0; }
.hm-shapps i { display: block; width: 30px; height: 30px; border-radius: 7px; background: var(--surface-alt); }
.hm-shlist { margin: 14px 12px 0; border-radius: 9px; background: color-mix(in srgb, var(--surface-alt) 65%, transparent); }
.hm-shlist div { display: flex; align-items: center; height: 22px; padding: 0 10px; }
.hm-shlist i { display: block; width: 60px; height: 3px; border-radius: 2px; background: var(--hairline); }

/* Translate (bilingual reveal under heading & each paragraph) */
.hm-trpg { position: absolute; left: 13px; top: 60px; width: 175px; height: 328px; overflow: hidden; font-family: var(--serif); color: var(--rink); }
.hm-trpg h6 { margin: 0; font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.hm-trrev { overflow: hidden; height: 0; opacity: 0; }
.hm-trh span { display: block; padding-top: 3px; font-size: 12.5px; font-weight: 700; line-height: 1.25; color: color-mix(in srgb, var(--rink) 72%, transparent); }
.hm-tro { margin: 8px 0 0; font-size: 9.5px; line-height: 1.65; }
.hm-trp p { margin: 0; padding-top: 3px; font-size: 9.5px; line-height: 1.65; color: color-mix(in srgb, var(--rink) 72%, transparent); }

/* PDF on a phone */
.hm-pdf { background: var(--surface-alt); }
.hm-pdfscan { position: absolute; left: 0; top: 58px; width: 201px; height: 284px; transform-origin: 50% 30%; }
.hm-pdfcnt { position: absolute; left: 50%; top: 397px; translate: -50% 0; padding: 0 8px; height: 14px; line-height: 14px; border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: 6.5px; font-weight: 500; }
.hm-pdftop { position: absolute; left: 8px; right: 8px; top: 31.5px; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.hm-pdftop b { flex: 1; text-align: center; font-size: 8.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-pdfreflow { position: absolute; inset: 0; z-index: 5; background: var(--rbg); opacity: 0; visibility: hidden; }
.hm-pdfconv {
  position: absolute; left: 50%; top: 370px; translate: -50% 0; z-index: 9;
  padding: 0 8px; height: 17px; line-height: 17px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.72); color: #fff; font-size: 6.5px; white-space: nowrap; opacity: 0;
}

/* Chrome Screenshot Crop Editor (mobile chrome beat 1b) */
.hm-edbar { display: flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; background: var(--surface); border-bottom: 0.5px solid var(--hairline); font-size: 6.5px; }
.hm-edbrand { display: inline-flex; align-items: center; gap: 3px; margin-right: auto; }
.hm-edbrand img { width: 10px; height: 10px; border-radius: 2px; }
.hm-edchip { padding: 1.5px 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 6px; font-weight: 600; }
.hm-edsave { padding: 2px 7px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 6px; font-weight: 600; transition: scale 0.1s; }
.hm-edcanvas { position: relative; height: 194px; display: grid; place-items: center; background: #262421; overflow: hidden; }
.hm-edpage { position: relative; width: 158px; height: 156px; padding: 8px 10px; border-radius: 3px; background: #FAF8F5; color: #1C1B1A; overflow: hidden; box-shadow: 0 5px 14px rgba(0, 0, 0, 0.3); }
.hm-edpage h5 { margin: 0; font-family: var(--serif); font-size: 8.5px; font-weight: 700; }
.hm-edpage small { display: block; margin: 2px 0 5px; font-size: 5px; color: #6B6760; }
.hm-edpage p { margin: 0; font-family: var(--serif); font-size: 5.5px; line-height: 1.5; color: #2E2C29; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.hm-edfoot { position: absolute; left: 10px; right: 10px; bottom: 8px; display: flex; flex-direction: column; gap: 3px; padding-top: 5px; border-top: 1px solid #E7E2DA; }
.hm-edfoot i { display: block; width: 65%; height: 3px; border-radius: 2px; background: #D8D2C8; }
.hm-edfoot i:last-child { width: 42%; }
.hm-cropbox { position: absolute; left: 5px; right: 5px; top: 5px; height: 142px; border: 1.4px solid var(--accent); border-radius: 2px; z-index: 3; }
.hm-crophdl { position: absolute; left: 50%; bottom: -3.5px; width: 18px; height: 5px; translate: -50% 0; border-radius: 999px; background: var(--accent); }
.hm-cropmask { position: absolute; left: 0; right: 0; top: 147px; bottom: 0; background: rgba(18, 17, 16, 0.56); z-index: 2; }
.hm-edsaving, .hm-edsaved { position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 6; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 7px; font-weight: 600; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); opacity: 0; pointer-events: none; }

/* Two-step Voice → Language sheet (mobile controls; ZERO horizontal pills) */
.hm-vsheet {
  position: absolute; left: 0; bottom: 0; width: 201px; height: 224px; z-index: 10;
  border-radius: 14px 14px 0 0; background: var(--bg); padding: 0 10px 10px; visibility: hidden;
}
.hm-vstep[hidden], .hm-vlist[hidden] { display: none; }
.hm-vshead { display: flex; align-items: center; justify-content: space-between; padding: 8px 2px 6px; font-size: 8.5px; font-weight: 650; color: var(--ink); }
.hm-vshead2 { justify-content: flex-start; gap: 5px; }
.hm-vshead2 .icon { width: 9px; height: 9px; color: var(--ink-2); }
.hm-vlangrow { display: flex; align-items: center; gap: 5px; padding: 6px 8px; margin-bottom: 7px; border-radius: 9px; background: var(--surface); border: 0.5px solid var(--hairline); font-size: 7.5px; transition: scale 0.1s; }
.hm-vlangrow .icon { width: 8.5px; height: 8.5px; color: var(--ink-2); flex: none; }
.hm-vlangrow span { font-weight: 600; color: var(--ink); }
.hm-vlangval { margin-left: auto; font-style: normal; color: var(--ink-2); font-size: 7px; }
.hm-vlist { display: flex; flex-direction: column; border-radius: 9px; background: var(--surface); overflow: hidden; border: 0.5px solid var(--hairline); }
.hm-vrow { display: flex; align-items: center; justify-content: space-between; padding: 7px 9px; font-size: 7.5px; color: var(--ink); transition: scale 0.1s; }
.hm-vrow + .hm-vrow { border-top: 0.5px solid var(--hairline); }
.hm-vrow .icon { width: 8.5px; height: 8.5px; color: var(--accent); }
.hm-vrow.on { background: var(--accent-soft); }
.hm-vsec { margin: 5px 0 3px 4px; font-size: 6px; font-weight: 600; color: var(--ink-2); }
.hm-vlrow { display: flex; align-items: center; justify-content: space-between; padding: 5.5px 8px; border-radius: 7px; background: var(--surface); margin-bottom: 3px; font-size: 7.5px; color: var(--ink); transition: scale 0.1s; }
.hm-vlrow .icon { width: 8px; height: 8px; color: var(--accent); }
.hm-vlrow.on { background: var(--accent-soft); font-weight: 600; }

/* BGM download alert & chapter music waves */
.hm-bgmalert {
  position: absolute; left: 50%; top: 50%; z-index: 12; width: 162px; padding: 11px 10px 8px;
  border-radius: 12px; background: var(--surface); border: 0.5px solid var(--hairline);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24); text-align: center; opacity: 0; visibility: hidden;
}
.hm-bgmalert > b { display: block; font-size: 8px; font-weight: 650; color: var(--ink); }
.hm-bgmalert > small { display: block; margin: 3px 0 7px; font-size: 6.5px; color: var(--ink-2); }
.hm-bgmprog { height: 3px; margin-bottom: 7px; border-radius: 999px; background: var(--surface-alt); overflow: hidden; opacity: 0; }
.hm-bgmprog i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--accent); }
.hm-bgmacs { display: grid; grid-template-columns: 1fr 1fr; border-top: 0.5px solid var(--hairline); margin: 0 -10px -8px; }
.hm-bgmacs > * { padding: 6px 4px; font-size: 7.5px; color: var(--ink-2); transition: scale 0.1s; }
.hm-bgmdl { border-left: 0.5px solid var(--hairline); color: var(--accent); font-weight: 650; }
.hm-bgmwaves { position: absolute; left: 50%; top: 186px; translate: -50% 0; display: flex; align-items: center; gap: 3px; height: 14px; padding: 0 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent-soft) 90%, transparent); opacity: 0; pointer-events: none; }
.hm-bgmwaves i { display: block; width: 1.8px; height: 9px; border-radius: 1.5px; background: var(--accent); transform-origin: 50% 50%; }

/* Library Ask suggestion & cover highlight */
.hm-lacbody { gap: 5px; padding: 6px 10px 14px; }
.hm-sug { display: inline-block; padding: 4px 8px; border-radius: 999px; background: var(--surface-alt); border: 0.5px solid var(--hairline); font-size: 7px; color: var(--ink); transition: scale 0.1s; }
.hm-slot.hm-match .hm-cv { box-shadow: 0 0 0 2px var(--accent), 0 1.5px 4px rgba(0, 0, 0, 0.14); }

/* Note sheet with black ink mic inside textarea (highlights) */
.hm-nsheet {
  position: absolute; left: 0; bottom: 0; width: 201px; height: 228px; z-index: 10;
  border-radius: 14px 14px 0 0; background: var(--bg); padding: 0 10px 12px; visibility: hidden;
}
.hm-nshead { display: flex; align-items: center; justify-content: space-between; padding: 10px 2px 8px; font-size: 7.5px; color: var(--ink-2); }
.hm-nshead > b { color: var(--ink); font-weight: 650; }
.hm-nssave { color: var(--accent) !important; transition: scale 0.1s; }
.hm-nquote { margin: 0 0 7px; padding-left: 6px; border-left: 2px solid var(--accent); font-family: var(--serif); font-size: 6.5px; line-height: 1.35; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-nbox { position: relative; min-height: 62px; padding: 7px 20px 7px 8px; border-radius: 9px; background: var(--surface-alt); font-size: 7.5px; line-height: 1.4; color: var(--ink); }
.hm-ntextin:empty::before { content: attr(data-ph); color: var(--ink-3); }
.hm-nmic { position: absolute; right: 5px; bottom: 5px; width: 16px; height: 16px; display: grid; place-items: center; color: var(--ink); transition: scale 0.1s; }
.hm-nmic .icon { width: 10px; height: 10px; }
.hm-nmic.on { color: var(--accent); }
.hm-nlisten { margin-top: 5px; font-size: 6.5px; color: var(--accent); opacity: 0; }

/* Translate options sheet (Bilingual / Only / Standard / Best / Cantonese) */
.hm-trsheet {
  position: absolute; left: 0; bottom: 0; width: 201px; height: 174px; z-index: 10;
  border-radius: 14px 14px 0 0; background: var(--surface); padding: 4px 10px 10px; visibility: hidden;
}
.hm-trrow { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 6px 8px; margin-top: 6px; border-radius: 8px; background: var(--surface-alt); font-size: 7px; color: var(--ink); transition: scale 0.1s; }
.hm-trrow .icon { width: 8px; height: 8px; color: var(--accent); }
.hm-trrow.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.hm-trqual { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 8px; padding: 2px; border-radius: 8px; background: var(--surface-alt); font-size: 7px; text-align: center; color: var(--ink-2); }
.hm-trqual > span { padding: 4px; border-radius: 6px; transition: scale 0.1s; }
.hm-trbest.on { background: var(--surface); color: var(--accent); font-weight: 650; }
.hm-trlang { display: flex; align-items: center; gap: 5px; margin-top: 8px; padding: 5px 8px; border-radius: 7px; background: var(--bg); font-size: 6.8px; color: var(--ink-2); }
.hm-trlang .icon { width: 8px; height: 8px; color: var(--accent); }

/* Comics & webtoons vertical strip (mobile) */
.hm-comic { background: var(--bg); }
.hm-cbox { position: absolute; left: 0; right: 0; top: 58px; bottom: 0; overflow: hidden; background: var(--surface-alt); }
.hm-cstrip { position: absolute; left: 0; right: 0; top: 0; display: flex; flex-direction: column; gap: 0; }
.hm-cpanel { position: relative; flex: none; width: 100%; aspect-ratio: 780 / 720; line-height: 0; overflow: hidden; }
.hm-cpanel + .hm-cpanel { border-top: 1px solid rgba(28, 27, 26, 0.14); }
.hm-cart { display: block; width: 100%; height: 100%; object-fit: cover; }
.hm-cbub {
  position: absolute; max-width: 48%; min-width: 56px; padding: 5px 8px;
  border-radius: 50% / 44%; background: #FFFFFF; color: #1C1B1A;
  border: 1.2px solid #1D2024; box-shadow: 0 2px 6px rgba(24, 30, 38, 0.15);
  font-size: 6.5px; font-weight: 650; line-height: 1.28; text-align: center;
  white-space: pre-line; transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.hm-cbub::before, .hm-cbub::after { content: ""; position: absolute; pointer-events: none; transition: background-color 0.2s; }
.hm-cb-tr::before { bottom: -6px; left: 18%; width: 10px; height: 10px; background: #1D2024; clip-path: polygon(34% 0%, 100% 34%, 0% 100%); }
.hm-cb-tr::after { bottom: -4px; left: calc(18% + 1.4px); width: 9px; height: 9px; background: #FFFFFF; clip-path: polygon(30% 0%, 100% 34%, 4% 92%); }
.hm-cb-tl::before { bottom: -6px; right: 18%; width: 10px; height: 10px; background: #1D2024; clip-path: polygon(0% 34%, 66% 0%, 100% 100%); }
.hm-cb-tl::after { bottom: -4px; right: calc(18% + 1.4px); width: 9px; height: 9px; background: #FFFFFF; clip-path: polygon(0% 34%, 70% 0%, 96% 92%); }
.hm-cb1 { right: 5%; top: 9%; }
.hm-cb2 { left: 5%; top: 10%; }
.hm-cb3 { right: 6%; top: 9%; }
.hm-cbub .x { display: none; }
.hm-cbub.tr { border-color: #D9643A; box-shadow: 0 2px 8px rgba(217, 100, 58, 0.24); }
.hm-cbub.tr::before { background: #D9643A; }
.hm-cbub.tr .o { display: none; }
.hm-cbub.tr .x { display: inline; color: #1C1B1A; }
.hm-cbub.shimmer { background: #FCE9DF; border-color: var(--accent); }
.hm-cbub.shimmer::after { background: #FCE9DF; }
.hm-stpill { position: absolute; left: 50%; top: 66px; translate: -50% 0; z-index: 6; padding: 3px 9px; border-radius: 999px; background: rgba(28, 27, 26, 0.84); color: #FAF8F5; font-size: 6.5px; white-space: nowrap; opacity: 0; pointer-events: none; }

/* Folders jiggle edit mode (mobile) */
.hm-delb { position: absolute; left: -4px; top: -4px; z-index: 3; width: 13px; height: 13px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-size: 9px; font-weight: 700; line-height: 1; opacity: 0; transform: scale(0.6); transition: opacity 0.15s, transform 0.15s; }
.hm-jlib.jiggle .hm-delb { opacity: 1; transform: scale(1); }
.hm-jlib.jiggle .hm-jfslot .hm-cv { animation: ht-jiggle 0.28s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .hm-jlib.jiggle .hm-jfslot .hm-cv { animation: none; } }
.hm-jfslot.hm-drop-target .hm-cv { box-shadow: 0 0 0 2px var(--accent), 0 1.5px 4px rgba(0, 0, 0, 0.14); transform: scale(1.06); }
.hm-jdone { position: absolute; right: 8px; top: 31px; z-index: 6; display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 7.5px; font-weight: 650; opacity: 0; visibility: hidden; transition: scale 0.1s; }
.hm-jlib.jiggle .hm-lbtns { opacity: 0; }

/* Offline downloads (mobile-only) */
.hm-offsheet {
  position: absolute; left: 0; bottom: 0; width: 201px; height: 190px; z-index: 10;
  border-radius: 14px 14px 0 0; background: var(--bg); padding: 0 10px 10px;
}
.hm-offcard { border-radius: 10px; background: var(--surface); border: 0.5px solid var(--hairline); overflow: hidden; margin-top: 6px; }
.hm-setlist { margin: 8px 10px 0; }
.hm-setcrumb { margin: -6px 0 2px 10px; font-size: 6.5px; color: var(--ink-2); }
.hm-offrow { display: flex; align-items: center; gap: 6px; padding: 7px 9px; }
.hm-offrow + .hm-offrow { border-top: 0.5px solid var(--hairline); }
.hm-offrow > span:not(.hm-offdel) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1.5px; }
.hm-offrow b { font-size: 7.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-offrow small { font-size: 6px; color: var(--ink-2); }
.hm-offdel { flex: none; padding: 2px 6px; border-radius: 999px; background: color-mix(in srgb, #C2453A 12%, transparent); color: #C2453A; font-size: 6.5px; font-weight: 600; display: inline-grid; place-items: center; transition: scale 0.1s; }
.hm-offdel .icon { width: 8px; height: 8px; }

/* Finish & Achievements (mobile) */
.hm-end { display: flex; flex-direction: column; align-items: center; padding: 42px 14px 14px; gap: 7px; text-align: center; }
.hm-endk { font-size: 6.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.hm-endcvw { position: relative; }
.hm-endcv { width: 68px; height: 102px; border-radius: 5px; }
.hm-stamp { position: absolute; left: 50%; top: 50%; translate: -50% -50%; padding: 2px 6px; border-radius: 4px; border: 1.6px solid var(--accent); background: color-mix(in srgb, var(--bg) 90%, transparent); color: var(--accent); font-size: 7.5px; font-weight: 800; letter-spacing: 0.07em; white-space: nowrap; opacity: 0; }
.hm-endt { font-family: var(--serif); font-size: 11px; font-weight: 700; color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-stars { display: flex; gap: 3px; }
.hm-star { color: var(--hairline); }
.hm-star .icon { width: 12px; height: 12px; }
.hm-star.on { color: #D98A3A; }
.hm-revbox { position: relative; width: 100%; min-height: 36px; padding: 6px 20px 6px 8px; border-radius: 8px; background: var(--surface); border: 0.5px solid var(--hairline); text-align: left; font-size: 7px; line-height: 1.35; }
.hm-revtxt:empty::before { content: attr(data-ph); color: var(--ink-3); }
.hm-revmic { position: absolute; right: 4px; bottom: 4px; width: 15px; height: 15px; display: grid; place-items: center; color: var(--ink); transition: scale 0.1s; }
.hm-revmic .icon { width: 9px; height: 9px; }
.hm-revmic.on { color: var(--accent); }
.hm-endacts { display: flex; gap: 6px; margin-top: 2px; }
.hm-finbtn { padding: 4px 10px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 7px; font-weight: 600; transition: scale 0.1s; }
.hm-shrbtn { display: inline-flex; align-items: center; gap: 3px; padding: 4px 9px; border-radius: 999px; background: var(--surface); border: 0.5px solid var(--hairline); font-size: 7px; font-weight: 600; color: var(--ink); }
.hm-shrbtn .icon { width: 8px; height: 8px; }
.hm-newbadge { position: absolute; right: 10px; top: 36px; padding: 2px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 6px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0; }
.hm-achcard { position: relative; margin: 4px 10px 0; height: 220px; border-radius: 12px; background: var(--surface); border: 0.5px solid var(--hairline); overflow: hidden; color: var(--ink); }
.hm-achsvg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hm-ach-start { position: absolute; left: 48px; bottom: 26px; width: 16px; height: auto; opacity: 0.48; pointer-events: none; }
.hm-ach-end { position: absolute; right: 5px; bottom: 26px; width: 62px; height: auto; opacity: 0.24; pointer-events: none; }
.hm-pile { position: absolute; left: 14px; bottom: 26px; width: 30px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.hm-pileh { font-size: 6px; font-weight: 700; color: var(--accent); margin-bottom: 2px; white-space: nowrap; }
.hm-sp { display: block; width: 30px; height: 9px; border-radius: 2px; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.14); }
.hm-sp-0 { background: #D9643A; }
.hm-sp-1 { background: #5C6B58; }
.hm-sp-2 { background: #6A5A7E; }
.hm-sp-3 { background: #9A6B3C; }
.hm-animal { position: absolute; left: 70px; bottom: 52px; width: 52px; height: auto; opacity: 0; pointer-events: none; }
.hm-animal img { width: 100%; height: auto; display: block; }

/* Built-in Browser (mobile) */
.hm-brw { background: var(--bg); }
.hm-btop { position: absolute; left: 6px; right: 6px; top: 29px; z-index: 6; display: flex; align-items: center; gap: 3.5px; }
.hm-btop .hm-gbtn { width: 19px; height: 19px; flex: none; }
.hm-btop .hm-gbtn .icon { width: 8.5px; height: 8.5px; }
.hm-burl { flex: 1; min-width: 0; height: 19px; display: flex; align-items: center; gap: 3px; padding: 0 4px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 94%, transparent); border: 0.5px solid var(--hairline); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.hm-bsh { display: inline-flex; align-items: center; gap: 1.5px; padding: 0 3px; height: 13px; border-radius: 999px; color: var(--ink-2); font-size: 5.5px; font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.hm-bsh .icon { width: 7px; height: 7px; }
.hm-bsh.blocking { background: var(--accent-soft); color: var(--accent); }
.hm-bhost { flex: 1; min-width: 0; text-align: center; font-size: 6px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-baa { flex: none; display: inline-grid; place-items: center; padding: 0 3.5px; height: 13px; border-radius: 999px; font-family: var(--serif); font-size: 6.5px; font-weight: 700; color: var(--ink); transition: scale 0.1s, background-color 0.15s, color 0.15s; }
.hm-baa.on { background: var(--accent); color: #fff; }
.hm-btabn { flex: none; width: 16px; height: 16px; border-radius: 4.5px; border: 1px solid var(--ink-2); display: inline-grid; place-items: center; font-size: 6.5px; font-weight: 700; color: var(--ink); background: color-mix(in srgb, var(--surface) 92%, transparent); }
.hm-bsaved { position: absolute; left: 10px; right: 10px; top: 53px; z-index: 9; display: flex; align-items: center; gap: 5px; padding: 5px 7px; border-radius: 999px; background: var(--surface); border: 0.5px solid var(--hairline); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16); font-size: 6.5px; opacity: 0; visibility: hidden; }
.hm-bsaved-ic { width: 12px; height: 12px; border-radius: 50%; display: inline-grid; place-items: center; background: #2E7D4F; color: #fff; flex: none; }
.hm-bsaved-ic .icon { width: 7px; height: 7px; }
.hm-bsaved b { flex: 1; min-width: 0; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-bsaved em { flex: none; font-style: normal; padding: 1.5px 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 6px; font-weight: 650; }
.hm-bweb { position: absolute; left: 0; right: 0; top: 54px; bottom: 0; padding: 6px 12px 0; background: var(--surface); overflow: hidden; }
.hm-bsitebar { display: flex; align-items: center; justify-content: space-between; padding-bottom: 5px; margin-bottom: 7px; border-bottom: 0.5px solid var(--hairline); font-size: 6px; color: var(--ink-2); }
.hm-bsitebar b { font-weight: 700; color: var(--ink); }
.hm-bsitebar i { display: block; width: 14px; height: 2.5px; border-radius: 2px; background: var(--hairline); }
.hm-bad { display: flex; align-items: center; justify-content: center; border-radius: 5px; background: var(--surface-alt); border: 1px dashed var(--hairline); color: var(--ink-3); font-size: 6.5px; font-weight: 700; letter-spacing: 0.08em; overflow: hidden; max-height: 28px; margin-bottom: 6px; padding: 4px 0; }
.hm-bweb h4 { margin: 0 0 6px; font-family: var(--serif); font-size: 11px; font-weight: 700; line-height: 1.25; color: var(--ink); }
.hm-bweb p { margin: 0 0 6px; font-family: var(--serif); font-size: 7.5px; line-height: 1.55; color: var(--ink-2); }
.hm-bcook { position: absolute; left: 8px; right: 40px; bottom: 14px; height: 24px; display: flex; align-items: center; justify-content: space-between; padding: 0 9px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: 6.5px; font-weight: 600; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }
.hm-bcook i { display: block; width: 22px; height: 9px; border-radius: 999px; background: var(--accent); }
.hm-bread { position: absolute; left: 0; right: 0; top: 54px; bottom: 0; padding: 10px 13px 16px; background: var(--rbg); color: var(--rink); font-family: var(--serif); overflow: hidden; opacity: 0; visibility: hidden; }
.hm-bread h4 { margin: 0; font-size: 11.5px; font-weight: 700; line-height: 1.25; }
.hm-brtr { overflow: hidden; height: 0; opacity: 0; }
.hm-brtr-in { color: #6B3A22; background: #FBEFE8; border-radius: 4px; padding: 1.5px 4.5px; }
@media (prefers-color-scheme: dark) { .hm-brtr-in { color: #F0B69C; background: rgba(240, 122, 79, 0.16); } }
.hm-brtr-h { font-size: 8.5px; font-weight: 650; line-height: 1.3; }
.hm-bro { margin: 7px 0 0; font-size: 7.6px; line-height: 1.52; color: var(--rink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hm-brtr-p { font-size: 7.8px; line-height: 1.52; }
.hm-brtr-p .s { border-radius: 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-color 0.25s; }
.hm-brtr-p .s.read { background: var(--tts); }
.hm-brfoot { position: absolute; left: 13px; right: 54px; bottom: 14px; font-family: var(--sans); font-size: 5.8px; color: var(--rink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-bfloat { position: absolute; right: 10px; bottom: 14px; z-index: 7; display: flex; flex-direction: column; gap: 6px; }
.hm-btrbtn, .hm-blsn { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 2px 7px rgba(0, 0, 0, 0.16); transition: scale 0.1s, background-color 0.15s, color 0.15s; }
.hm-btrbtn { background: color-mix(in srgb, var(--surface) 94%, transparent); border: 0.5px solid var(--hairline); color: var(--ink); }
.hm-btrbtn .icon { width: 10px; height: 10px; }
.hm-btrbtn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.hm-blsn { background: var(--accent); color: #fff; }
.hm-blsn .icon { width: 10.5px; height: 10.5px; }
.hm-blsn-wf { display: none; }
.hm-blsn.on .hm-blsn-ic { display: none; }
.hm-blsn.on .hm-blsn-wf { display: inline-flex; }
.hm-bmenu { position: absolute; right: 8px; top: 52px; z-index: 10; width: 120px; padding: 4px; border-radius: 9px; background: var(--surface); border: 0.5px solid var(--hairline); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2); transform-origin: 100% 0; opacity: 0; visibility: hidden; }
.hm-bmenu-head { padding: 3px 6px 2px; font-size: 5.8px; font-weight: 600; color: var(--ink-2); }
.hm-bmenu-row { display: flex; align-items: center; gap: 5px; padding: 5px 6px; border-radius: 6px; font-size: 7px; font-weight: 600; color: var(--ink); transition: scale 0.1s, background-color 0.15s; }
.hm-bmenu-row .icon { width: 8.5px; height: 8.5px; color: var(--accent); flex: none; }
.hm-bmenu-row.on { background: var(--accent-soft); color: var(--accent); }
