/* /help — every button of the write screen, explained ON the screen: a
   drawing of the real app (Paper, what a new writer sees) stays pinned while
   the cards scroll; each card moves the camera onto its button, lights it and
   points at it (help.js). The whole page is Paper too. The drawing's colours
   are the app's own (src/lib/ui/page-top.css .is-light, page-editor.css). */

/* ---------- the page in Paper ---------- */
html.hb-paper {
  color-scheme: light;
  --bg: #f3eee6;
  --bg-deep: #ebe4d9;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --border: rgba(60, 50, 40, 0.14);
  --border-strong: rgba(60, 50, 40, 0.24);
  --hairline: rgba(255, 255, 255, 0.9);
  --fg: #26221f;
  --fg-soft: #3b342e;
  --fg-2: #4f4842;
  --fg-3: #5f5852;
  --accent-text: #a8285a;
  --accent-soft: rgba(194, 58, 108, 0.1);
  --accent-border: rgba(194, 58, 108, 0.38);
  --ex: #a8285a; --ex-bd: rgba(168, 40, 90, 0.42);
  --st: #9a4708; --st-bd: rgba(154, 71, 8, 0.42);
  --ai: #6a3fc4; --ai-bd: rgba(106, 63, 196, 0.38);
  --lk: #1d6b35; --lk-bd: rgba(29, 107, 53, 0.42);
  --nt: #7a5a00; --nt-bd: rgba(170, 130, 20, 0.45); --nt-wash: #fff4c6;
  --hb-head: var(--site-head-h);
}
html.hb-paper body { background: radial-gradient(120% 60% at 50% 0%, #fbf7f1 0%, var(--bg) 60%); }
html.hb-paper .site-head.scrolled { background: rgba(251, 248, 243, 0.86); box-shadow: inset 0 -1px 0 var(--border), 0 10px 30px -22px rgba(60, 40, 20, 0.5); }
html.hb-paper .btn-secondary { background: #fff; color: var(--fg); border-color: var(--border-strong); box-shadow: 0 6px 16px -12px rgba(60, 40, 20, 0.5); }
html.hb-paper .btn-secondary:hover { background: #faf6f0; border-color: rgba(60, 50, 40, 0.34); }
html.hb-paper .site-foot { background: var(--bg-deep); }
kbd { font-family: var(--font-ui); font-size: 0.82em; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: #fff; border: 1px solid var(--border-strong); box-shadow: 0 1px 0 var(--border-strong); color: var(--fg); white-space: nowrap; }

/* ---------- hero ---------- */
.hb-hero { padding: 54px 0 34px; text-align: center; }
.hb-hero .crumbs { font-size: 13px; color: var(--fg-3); margin-bottom: 16px; }
.hb-hero h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(38px, 6.4vw, 72px); line-height: 1.04; margin: 0 0 16px; letter-spacing: -0.01em; }
.hb-hero h1 em { font-style: italic; background: linear-gradient(120deg, #c23a6c, #d9622f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hb-hero .lead { max-width: 640px; margin: 0 auto; color: var(--fg-soft); font-size: 17px; line-height: 1.6; }
.hb-hero .lead a { color: var(--accent-text); font-weight: 600; }
.hb-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 900px; margin: 22px auto 0; }
.hb-jump a { font-size: 12.5px; font-weight: 600; color: var(--fg-2); padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.7); border: 1px solid var(--border); transition: background 0.15s, color 0.15s; }
.hb-jump a:hover { background: #fff; color: var(--fg); }
.hb-scrollhint { margin-top: 26px; display: inline-flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); }
.hb-scrollhint i { width: 22px; height: 34px; border-radius: 12px; border: 2px solid var(--border-strong); position: relative; }
.hb-scrollhint i::after { content: ""; position: absolute; left: 50%; top: 6px; width: 4px; height: 7px; margin-left: -2px; border-radius: 2px; background: var(--accent-text); animation: hb-wheel 1.6s ease-in-out infinite; }
@keyframes hb-wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 80% { opacity: 0; transform: translateY(10px); } 100% { opacity: 0; } }

/* ---------- the tour: stage pinned, cards scrolling ---------- */
.hb-tour { position: relative; display: grid; grid-template-columns: 236px minmax(0, 1fr) 380px; gap: 22px; max-width: 1720px; margin: 0 auto; padding: 0 24px 80px; }
.hb-stage {
  position: sticky; top: calc(var(--hb-head) + 14px);
  height: calc(100vh - var(--hb-head) - 28px);
  height: calc(100svh - var(--hb-head) - 28px);
  border-radius: 28px; overflow: hidden;
  background:
    radial-gradient(70% 60% at 20% 10%, rgba(240, 106, 155, 0.10), transparent 70%),
    radial-gradient(60% 60% at 90% 90%, rgba(167, 139, 250, 0.12), transparent 70%),
    #ece5da;
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 #fff, 0 40px 80px -50px rgba(60, 40, 20, 0.55);
}
.hb-stage::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(60, 50, 40, 0.13) 1px, transparent 1.2px); background-size: 22px 22px; opacity: 0.5; pointer-events: none; }
.hb-hud { position: absolute; z-index: 30; left: 16px; top: 14px; display: flex; align-items: center; gap: 8px; padding: 7px 12px 7px 11px; font: inherit; cursor: pointer; text-align: left; transition: background 0.15s, box-shadow 0.15s; border-radius: 999px; background: rgba(255, 255, 255, 0.88); border: 1px solid var(--border); box-shadow: 0 10px 24px -16px rgba(60, 40, 20, 0.5); font-size: 12px; font-weight: 700; color: var(--fg-2); max-width: calc(100% - 32px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-hud-dot { width: 7px; height: 7px; border-radius: 50%; background: #d94d82; box-shadow: 0 0 0 4px rgba(217, 77, 130, 0.18); animation: hb-pulse 1.8s ease-in-out infinite; flex: none; }
@keyframes hb-pulse { 50% { box-shadow: 0 0 0 7px rgba(217, 77, 130, 0.05); } }
.hb-prog { position: absolute; z-index: 30; left: 18px; right: 18px; bottom: 12px; height: 3px; border-radius: 3px; background: rgba(60, 50, 40, 0.1); overflow: hidden; }
.hb-prog i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, #d94d82, #e8833a); transition: width 0.6s cubic-bezier(.2, .8, .2, 1); }

.hb-steps { position: relative; padding: 18vh 0 32vh; }
.hb-sec { padding: 22vh 4px 6vh; }
.hb-sec:first-child { padding-top: 0; }
.hb-sec span { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; background: #26221f; color: #fff; font-size: 13px; font-weight: 800; margin-bottom: 14px; }
.hb-sec h2 { font-family: var(--font-display); font-weight: 500; font-size: 34px; line-height: 1.1; margin-bottom: 8px; }
.hb-sec p { color: var(--fg-2); font-size: 15px; }
.hb-step { min-height: 62vh; display: flex; align-items: center; scroll-margin-top: 20vh; }
.hb-card {
  position: relative; width: 100%; padding: 22px 24px 22px 26px; border-radius: 22px;
  background: rgba(255, 255, 255, 0.72); border: 1px solid var(--border);
  box-shadow: 0 24px 50px -36px rgba(60, 40, 20, 0.5);
  opacity: 0.34; transform: translateY(14px) scale(0.98); filter: saturate(0.4);
  transition: opacity 0.5s, transform 0.6s cubic-bezier(.2, .8, .2, 1), filter 0.5s, background 0.5s, box-shadow 0.5s;
}
.hb-card::before { content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(#d94d82, #e8833a); opacity: 0; transition: opacity 0.5s; }
.hb-step.on .hb-card { opacity: 1; transform: none; filter: none; background: #fff; box-shadow: 0 34px 70px -38px rgba(60, 40, 20, 0.6), 0 0 0 1px rgba(217, 77, 130, 0.08); }
.hb-step.on .hb-card::before { opacity: 1; }
.hb-kick { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 10px; }
.hb-kick em { font-style: normal; color: var(--fg-3); letter-spacing: 0.04em; }
.hb-card h3 { font-size: 21px; line-height: 1.3; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.hb-card p { font-size: 15px; line-height: 1.65; color: var(--fg-soft); }
.hb-card p b { color: var(--fg); }
.hb-card .hb-when { margin-top: 12px; font-size: 13px; color: var(--fg-3); display: flex; gap: 8px; align-items: baseline; }
.hb-card .hb-when::before { content: "Shows"; flex: none; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: var(--bg); color: var(--fg-2); }
.hb-step.flash .hb-card { animation: hb-flash 1.2s ease; }
@keyframes hb-flash { 20% { box-shadow: 0 0 0 4px rgba(217, 77, 130, 0.35), 0 34px 70px -38px rgba(60, 40, 20, 0.6); } }

/* chips: the app's buttons, in words */
.hb-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 9px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--fg-soft); background: linear-gradient(180deg, #fff, #f6f1ea); border: 1px solid var(--border); box-shadow: inset 0 1px 0 #fff, 0 6px 14px -10px rgba(60, 40, 20, 0.45); vertical-align: middle; white-space: nowrap; }
.hb-card p .hb-chip { height: 24px; font-size: 12.5px; padding: 0 9px 0 7px; margin: 2px 0; }
.hb-chip svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hb-chip.ex { color: var(--ex); border-color: var(--ex-bd); }
.hb-chip.st { color: var(--st); border-color: var(--st-bd); }
.hb-chip.ai { color: var(--ai); border-color: var(--ai-bd); }
.hb-chip.lk { color: var(--lk); border-color: var(--lk-bd); }
.hb-chip.nt { color: var(--nt); border-color: var(--nt-bd); background: var(--nt-wash); }
.hb-chip .hm-orb { width: 13px; height: 13px; }

/* ---------- after the tour ---------- */
.hb-after { padding-bottom: 80px; display: grid; gap: 24px; max-width: 860px; }
.hb-keysbox, .hb-end { background: #fff; border: 1px solid var(--border); border-radius: 22px; padding: 26px 28px; box-shadow: 0 24px 50px -36px rgba(60, 40, 20, 0.5); }
.hb-keysbox h2, .hb-end h2 { font-family: var(--font-display); font-weight: 500; font-size: 28px; margin-bottom: 14px; }
.hb-keys { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.hb-keys td { padding: 10px 8px; border-top: 1px solid var(--border); vertical-align: top; color: var(--fg-soft); }
.hb-keys td:first-child { white-space: nowrap; width: 1%; padding-right: 22px; }
.hb-end { text-align: center; }
.hb-end p { color: var(--fg-2); margin-bottom: 18px; }
.hb-end .btn { margin: 4px; }

/* =====================================================================
   THE DRAWING — the write screen at 1200×780, Paper. Everything in px of
   that frame; help.js scales and moves the camera.
   ===================================================================== */
@property --inv { syntax: "<number>"; inherits: true; initial-value: 1; }
.hm { position: absolute; inset: 0; overflow: hidden; }
.hm-cam {
  position: absolute; left: 0; top: 0; width: 1200px; height: 780px; transform-origin: 0 0;
  --inv: 1;
  transition: transform 0.95s cubic-bezier(.25, .85, .2, 1), --inv 0.95s cubic-bezier(.25, .85, .2, 1);
  will-change: transform;
  font-family: var(--font-ui);
  --p-fg: #26221f; --p-fg2: #3b342e; --p-fg3: #5f5852; --p-dim: #8f877f;
  --p-bd: rgba(60, 50, 40, 0.14); --p-bd2: rgba(60, 50, 40, 0.24);
  --p-face: radial-gradient(140% 120% at 0% 0%, rgba(240, 106, 155, 0.08), transparent 60%), linear-gradient(180deg, #ffffff 0%, #f6f1ea 100%);
  --p-shadow: inset 0 1px 0 #ffffff, 0 8px 18px -12px rgba(60, 40, 20, 0.35);
  color: var(--p-fg);
}
.hm-app { position: absolute; inset: 0; border-radius: 22px; overflow: hidden; background: #fbfaf7; box-shadow: 0 0 0 1px rgba(60, 50, 40, 0.12), 0 50px 100px -40px rgba(60, 40, 20, 0.55); transition: opacity 0.6s, transform 0.8s cubic-bezier(.2, .8, .2, 1); }
.hm .hm-i { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hm-orb { display: inline-block; flex: none; width: 15px; height: 15px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 12%, #c4b5fd 30%, #7c3aed 75%, #4c1d95 100%); box-shadow: 0 0 8px rgba(124, 58, 237, 0.45); }
.hm-ib { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: var(--p-fg3); }
.hm-ib.sm { width: 24px; height: 24px; }
.hm-pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--p-face); border: 1px solid var(--p-bd); box-shadow: var(--p-shadow); font-size: 12.5px; font-weight: 700; color: var(--p-fg2); white-space: nowrap; }
.hm-agent { color: #4c2a9a; border-color: rgba(106, 63, 196, 0.3); background: linear-gradient(180deg, #f5f0ff, #ece3ff); }
.hm-prim { color: #fff; border-color: transparent; background: linear-gradient(135deg, #c23a6c, #d9622f); }

/* sidebar */
.hm-side { position: absolute; left: 12px; top: 12px; bottom: 12px; width: 232px; padding: 14px 12px; border-radius: 18px; background: linear-gradient(180deg, #fff, #f7f2eb); border: 1px solid var(--p-bd); box-shadow: 0 20px 40px -28px rgba(60, 40, 20, 0.45); display: flex; flex-direction: column; }
.hm-side-top { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 0 6px; }
.hm-side .kn-logo { --kn-h: 17px; color: var(--p-fg); }
.hm-book { display: flex; align-items: center; justify-content: space-between; margin: 18px 6px 16px; }
.hm-book b { font-family: var(--font-display); font-size: 19px; font-weight: 500; }
.hm-pill-s { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; color: #a8285a; background: #fde9f1; }
.hm-side-h { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 0 6px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--p-fg3); }
.hm-chaps { margin-top: 6px; padding: 2px; }
.hm-chap { display: flex; align-items: center; gap: 9px; padding: 8px 8px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--p-fg2); }
.hm-chap i { font-style: normal; font-size: 11px; color: var(--p-dim); width: 12px; text-align: center; }
.hm-chap.on { background: #fde9f1; color: #7d1d44; }
.hm-side-foot { margin-top: auto; display: grid; gap: 2px; }
.hm-row { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--p-fg2); }
.hm-chip-d { margin-left: auto; font-style: normal; font-size: 10.5px; font-weight: 800; color: #1d6b35; background: rgba(29, 107, 53, 0.1); padding: 2px 7px; border-radius: 999px; }

/* main + top bar */
.hm-main { position: absolute; left: 256px; right: 0; top: 0; bottom: 0; }
.hm-bar { position: absolute; top: 12px; right: 16px; display: flex; align-items: center; gap: 8px; z-index: 4; }
.hm-pill-g { display: inline-flex; height: 32px; border-radius: 999px; background: var(--p-face); border: 1px solid var(--p-bd); box-shadow: var(--p-shadow); color: var(--p-fg2); }
.hm-pill-g > span { display: grid; place-items: center; width: 32px; }
.hm-pill-g > span.dim { color: #b7afa6; }

/* the page */
.hm-page { position: absolute; left: 132px; top: 50px; width: 600px; }
.hm-top { margin-bottom: 18px; }
.hm-top-r { display: flex; justify-content: flex-end; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; color: var(--p-fg3); }
.hm-aa, .hm-exp { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 999px; background: rgba(60, 50, 40, 0.07); color: var(--p-fg2); font-weight: 700; }
.hm-aa { font-family: var(--font-display); font-size: 13px; }
.hm-chname { font-family: var(--font-display); font-size: 30px; font-weight: 500; margin-top: 6px; display: inline-block; }
.hm-chline { font-family: var(--font-display); font-style: italic; font-size: 14px; color: var(--p-fg3); margin-top: 2px; display: table; }

.hm-p { position: relative; margin-bottom: 16px; }
.hm-t { font-family: var(--font-display); font-size: 16.5px; line-height: 1.75; color: var(--p-fg); text-wrap: pretty; position: relative; }
.hm-t.is-draft { color: #5d554e; }
.hm-t.hm-empty { min-height: 29px; }
.hm-dash { position: absolute; left: -44px; top: 14px; width: 7px; height: 1px; background: #bfb6ac; transition: opacity 0.3s; }
.hm-line { position: absolute; left: -11px; top: 4px; bottom: 4px; width: 1px; border-radius: 2px; background: transparent; transition: background 0.3s, box-shadow 0.3s; }
.hm-caret { display: inline-block; width: 1.5px; height: 1.1em; margin-left: 1px; vertical-align: -0.2em; background: #c23a6c; animation: hm-blink 1s steps(1) infinite; }
@keyframes hm-blink { 50% { opacity: 0; } }

/* the margin */
.hm-rail { position: absolute; right: calc(100% + 12px); top: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; opacity: 0; transform: translateX(8px); transition: opacity 0.35s, transform 0.45s cubic-bezier(.2, .9, .3, 1.1); pointer-events: none; z-index: 3; }
.hm-b { display: inline-flex; align-items: center; gap: 0; height: 32px; min-width: 32px; padding: 0 8px; border-radius: 999px; background: var(--p-face); border: 1px solid var(--p-bd); box-shadow: var(--p-shadow); color: var(--p-fg2); font-size: 12.5px; font-weight: 700; white-space: nowrap; transition: color 0.2s, border-color 0.2s, box-shadow 0.3s, transform 0.18s, opacity 0.3s, filter 0.3s; }
.hm-l { max-width: 0; overflow: hidden; opacity: 0; transition: max-width 0.45s cubic-bezier(.2, .8, .2, 1), opacity 0.3s, margin 0.45s; }
.hm-b.is-name .hm-l, .s-names .hm-rail .hm-b .hm-l, .hm-b.is-target .hm-l { max-width: 220px; opacity: 1; margin-left: 6px; }
.hm-b[data-tone="expand"] { color: #a8285a; border-color: rgba(168, 40, 90, 0.4); }
.hm-b[data-tone="steer"] { color: #9a4708; border-color: rgba(154, 71, 8, 0.42); }
.hm-b[data-tone="lock"] { color: #1d6b35; border-color: rgba(29, 107, 53, 0.42); }
.hm-b[data-tone="ai"] { color: #6a3fc4; border-color: rgba(106, 63, 196, 0.38); }
.hm-gap { height: 18px; }
.hm-shine { position: relative; overflow: hidden; }
.hm-shine::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.95), transparent); animation: hm-shine 2.4s ease-in-out infinite; }
@keyframes hm-shine { 60%, 100% { left: 130%; } }

/* which paragraph has the margin */
.s-a1 #p1 .hm-rail, .s-a2 #p2 .hm-rail, .s-a3 #p3 .hm-rail, .s-a4 #p4 .hm-rail { opacity: 1; transform: none; }
.s-a1 #p1 .hm-dash, .s-a2 #p2 .hm-dash, .s-a3 #p3 .hm-dash, .s-a4 #p4 .hm-dash { opacity: 0; }
.s-a2 #p2 .hm-line { background: rgba(60, 50, 40, 0.3); }
/* p1: only when locked */
#p1 .hm-rail { display: none; }
.s-locked #p1 .hm-rail { display: flex; }
.hm-locked .u { display: none; }
.s-unlock .hm-locked .a { display: none; }
.s-unlock .hm-locked .u { display: inline; }
.hm .s-unlock .hm-locked, .hm.s-unlock .hm-locked { border-color: rgba(154, 71, 8, 0.5); color: #9a4708; }
.s-locked #p1 .hm-t::before { content: ""; position: absolute; left: -11px; top: 4px; bottom: 4px; width: 1px; background: #1d6b35; box-shadow: 0 0 6px rgba(29, 107, 53, 0.4); }
/* p2's states */
#p2 .r-stop { display: none; }
.s-running #p2 .r-main, .s-running #p2 .r-foot { display: none; }
.s-running #p2 .r-stop { display: inline-flex; }
.s-running #p2 .hm-line { background: #d94d82; box-shadow: 0 0 8px rgba(217, 77, 130, 0.6); animation: hm-breathe 1.6s ease-in-out infinite; }
@keyframes hm-breathe { 50% { opacity: 0.35; } }
.s-steer #p2 .r-main, .s-steer #p2 .r-im, .s-steer #p2 .r-lk { display: none; }
.s-steer #p2 .hm-rail { top: 92px; }
.s-steer #p2 .hm-line { top: 96px; }
/* p3 */
.s-pick #p3 .r-pick { display: inline-flex; }
@keyframes hm-pop { from { opacity: 0; transform: translateY(-8px) scale(0.85); } }
.s-pick #p3 .hm-t.is-draft { color: var(--p-fg); }
/* p4 */
#p4 .r-open { display: none; }
.s-opening #p4 .r-dice { display: none; }
.s-opening #p4 .r-open { display: inline-flex; }

/* the change hint */
.hm-cut { display: none; text-decoration: line-through; text-decoration-color: #c0392b; color: #9b2f22; background: rgba(192, 57, 43, 0.08); border-radius: 3px; }
.s-hint .hm-cut { display: inline; animation: hm-cutfade 2.6s ease both; }
.s-hint .hm-add { background: rgba(230, 120, 30, 0.2); border-radius: 3px; box-shadow: 0 0 0 2px rgba(230, 120, 30, 0.2); animation: hm-wash 2.6s ease both; }
@keyframes hm-wash { from { background: rgba(230, 120, 30, 0.45); } }
@keyframes hm-cutfade { from { opacity: 0; } 20% { opacity: 1; } }

/* bible dots */
.hm-dots { position: absolute; left: -30px; top: 9px; display: flex; gap: 3px; opacity: 0; transition: opacity 0.4s; }
.hm-dots i { width: 5px; height: 5px; border-radius: 50%; background: #d94d82; animation: hm-breathe 1.2s ease-in-out infinite; }
.hm-dots i:nth-child(2) { animation-delay: 0.2s; }
.hm-dots i:nth-child(3) { animation-delay: 0.4s; }
.s-dots .hm-dots { opacity: 1; }
.s-dots #p1 .hm-dash { opacity: 0; }

/* the old note */
.hm-note { display: none; position: relative; margin: 0 0 18px; padding: 12px 14px; border-radius: 12px; background: #fff4c6; border: 1px solid rgba(170, 130, 20, 0.35); font-family: var(--font-display); font-size: 15px; color: #4a3b10; box-shadow: 0 10px 20px -16px rgba(120, 90, 0, 0.6); }
.hm-note-tag { position: absolute; right: 10px; bottom: -11px; display: inline-flex; gap: 5px; align-items: center; font-family: var(--font-ui); font-size: 10.5px; font-weight: 800; color: #7a5a00; background: #fff4c6; border: 1px solid rgba(170, 130, 20, 0.35); padding: 2px 8px; border-radius: 999px; }
.hm-note-tag .hm-i { width: 12px; height: 12px; }
.s-note .hm-note { display: block; animation: hm-pop 0.5s cubic-bezier(.2, .9, .3, 1.2) both; }

/* the steer box */
.hm-steer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s cubic-bezier(.2, .8, .2, 1); }
.hm-steer-in { overflow: hidden; min-height: 0; position: relative; }
.s-steer .hm-steer { grid-template-rows: 1fr; }
.s-steer .hm-steer-in { padding-bottom: 12px; }
.hm-back { position: absolute; right: calc(100% + 12px); top: 2px; opacity: 0; transform: translateX(8px); transition: opacity 0.35s, transform 0.45s; z-index: 3; }
.s-steer .hm-back { opacity: 1; transform: none; }
.hm-srow { margin-top: 2px; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 4px 0 12px; border-radius: 999px; background: var(--p-face); border: 1px solid var(--p-bd2); box-shadow: var(--p-shadow); }
.hm-slabel { display: inline-flex; align-items: center; gap: 6px; padding-right: 10px; border-right: 1px solid var(--p-bd2); font-size: 12.5px; font-weight: 700; color: #9a4708; }
.hm-sinput { flex: 1; min-width: 0; font-size: 13px; color: var(--p-fg); white-space: nowrap; overflow: hidden; }
.hm-sx { color: var(--p-dim); display: grid; }
.hm-go { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #f58a3a, #d96a17); color: #fff; flex: none; }
.hm .hm-go .hm-i { stroke-width: 2.4; width: 14px; height: 14px; }
.hm-quick { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.hm-q { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px 0 9px; border-radius: 999px; border: 1px solid var(--p-bd); background: var(--p-face); box-shadow: var(--p-shadow); font-size: 12px; font-weight: 700; color: var(--p-fg2); white-space: nowrap; transition: transform 0.2s, box-shadow 0.3s; }
.hm .hm-q .hm-i { width: 13px; height: 13px; }
.hm-q .hm-orb { width: 12px; height: 12px; }
.hm-q.on { color: #9a4708; border-color: rgba(154, 71, 8, 0.45); background: #fff1e4; }
.hm-cust { margin-left: auto; }
.hm-q.is-target { transform: translateY(-2px); }

/* the progress box while the AI writes */
.hm-prog { display: none; align-items: center; gap: 10px; height: 34px; margin-bottom: 10px; padding: 0 14px; border-radius: 999px; background: var(--p-face); border: 1px solid var(--p-bd); box-shadow: var(--p-shadow); font-size: 12.5px; font-weight: 600; color: var(--p-fg2); }
.s-running .hm-prog { display: flex; animation: hm-pop 0.4s ease both; }
.hm-prog-e { display: none; color: #6a3fc4; }
.hm-spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid rgba(60, 50, 40, 0.15); border-top-color: #d94d82; animation: hm-spin 0.8s linear infinite; flex: none; }
@keyframes hm-spin { to { transform: rotate(360deg); } }

/* next moments */
.hm-next { margin: 0 0 18px; }
.hm-next-h { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #a8285a; margin-bottom: 6px; }
.hm .hm-next-h .hm-i { width: 12px; height: 12px; }
.hm-nc { position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 12px; margin-bottom: 2px; border-radius: 10px; background: #fff; border: 1px solid var(--p-bd); font-size: 12.5px; color: var(--p-fg2); }
.hm-nc i { font-style: normal; width: 20px; height: 20px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #c23a6c; color: #fff; font-size: 10.5px; font-weight: 800; }

/* the right edge */
.hm-strip { position: absolute; right: 8px; top: 64px; bottom: 76px; width: 4px; display: flex; flex-direction: column; gap: 3px; }
.hm-strip i { display: block; border-radius: 2px; background: #cdc5bb; }
.hm-strip i.g { background: #3d9a5a; }
.hm-strip i.y { background: #e0b62c; }
.hm-strip b { position: absolute; left: -3px; right: -3px; top: 0; height: 26%; border-radius: 4px; background: rgba(60, 50, 40, 0.1); }
.hm-end, .hm-reopen { position: absolute; right: 22px; display: inline-flex; align-items: center; height: 40px; min-width: 40px; padding: 0 12px; border-radius: 999px; background: var(--p-face); border: 1px solid var(--p-bd); box-shadow: var(--p-shadow); color: var(--p-fg2); font-size: 12.5px; font-weight: 700; justify-content: center; }
.hm-end { bottom: 20px; }
.hm-reopen { bottom: 70px; opacity: 0; transform: translateY(8px); transition: opacity 0.35s, transform 0.35s; }
.s-reopen .hm-reopen { opacity: 1; transform: none; }
.hm-end span, .hm-reopen span { max-width: 0; overflow: hidden; opacity: 0; white-space: nowrap; transition: max-width 0.4s, opacity 0.3s, margin 0.4s; }
.hm-end.is-target span, .hm-reopen.is-target span { max-width: 160px; opacity: 1; margin-left: 6px; }

/* popovers */
.hm-pop { position: absolute; z-index: 6; background: #fff; border: 1px solid var(--p-bd2); border-radius: 16px; box-shadow: 0 24px 50px -24px rgba(60, 40, 20, 0.5); padding: 14px; opacity: 0; transform: translateY(-6px) scale(0.97); transform-origin: top right; transition: opacity 0.3s, transform 0.35s cubic-bezier(.2, .9, .3, 1.15); pointer-events: none; }
.hm-aapop { left: 446px; top: 88px; width: 240px; }
.hm-exppop { left: 456px; top: 88px; width: 270px; display: grid; gap: 2px; padding: 8px; }
.hm-exppop span { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--p-fg2); }
.hm-exppop span:first-child { background: rgba(60, 50, 40, 0.06); }
.s-aa .hm-aapop, .s-export .hm-exppop, .s-credits .hm-pop-h { font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--p-fg3); margin: 4px 0 6px; }
.hm-slide { height: 4px; border-radius: 4px; background: linear-gradient(90deg, #c23a6c 55%, rgba(60, 50, 40, 0.12) 55%); position: relative; margin: 10px 4px 12px; }
.hm-slide i { position: absolute; left: 55%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #fff; border: 1px solid var(--p-bd2); box-shadow: 0 2px 6px rgba(60, 40, 20, 0.25); }
.hm-seg { display: flex; padding: 3px; border-radius: 12px; background: rgba(60, 50, 40, 0.07); margin-bottom: 8px; }
.hm-seg span { flex: 1; text-align: center; font-size: 12.5px; font-weight: 700; padding: 6px 0; border-radius: 9px; color: var(--p-fg3); }
.hm-seg span.on { background: #fff; color: var(--p-fg); box-shadow: 0 2px 6px rgba(60, 40, 20, 0.15); }

/* the credits window — the app's own (lib/ui/kudoai-wallet: dark, an aurora
   on top, three packs, the middle one the hero). Every number is blurred:
   prices and packs may change, this page shouldn't have to. */
.hm-crwrap { position: absolute; inset: 0; z-index: 9; display: grid; place-items: center; background: rgba(20, 16, 22, 0.55); opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.s-credits .hm-crwrap { opacity: 1; }
.hm-crmodal { width: 760px; border-radius: 22px; overflow: hidden; background: #232026; border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8); color: #f3eff4; transform: translateY(24px) scale(0.96); transition: transform 0.55s cubic-bezier(.2, .9, .3, 1.15); }
.s-credits .hm-crmodal { transform: none; }
.hm-cr-hero { position: relative; height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 20px; background: radial-gradient(60% 90% at 30% 0%, rgba(240, 106, 155, 0.45), transparent 70%), radial-gradient(60% 90% at 80% 10%, rgba(139, 92, 246, 0.4), transparent 70%), #2a2430; }
.hm-cr-hero b { font-family: var(--font-display); font-size: 25px; font-weight: 500; }
.hm-cr-left { position: absolute; left: 16px; top: 14px; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12); font-size: 12px; font-weight: 700; }
.hm-cr-x { position: absolute; right: 16px; top: 16px; opacity: 0.7; display: grid; }
.hm-cr-emb { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 10px; background: radial-gradient(circle at 40% 35%, #ffb0c8, #e2457f 60%, #a8285a); box-shadow: 0 0 0 7px rgba(240, 106, 155, 0.15), 0 0 30px rgba(240, 106, 155, 0.6); color: #fff; }
.hm-cr-packs { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 14px; align-items: center; padding: 22px 22px 10px; }
.hm-crp { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 14px 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); text-align: center; }
.hm-crp.g { border-color: rgba(110, 220, 150, 0.35); }
.hm-crp.b { border-color: rgba(120, 160, 255, 0.4); }
.hm-crp.h { padding: 30px 16px 16px; border-color: rgba(240, 106, 155, 0.55); background: linear-gradient(180deg, rgba(240, 106, 155, 0.12), rgba(255, 255, 255, 0.03)); box-shadow: 0 0 40px -10px rgba(240, 106, 155, 0.45); }
.hm-crp em { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: #6fd99a; color: #0d2a18; }
.hm-crp.h em { background: linear-gradient(135deg, #e2457f, #f08a7a); color: #fff; }
.hm-crp.b em { background: #8fb2ff; color: #0f1d3d; }
.hm .hm-crp em .hm-i { width: 11px; height: 11px; }
.hm-cr-art { width: 30px; height: 44px; border-radius: 6px; background: linear-gradient(160deg, #7be3a5, #2f9a5d); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.6); }
.hm-crp.b .hm-cr-art { background: linear-gradient(160deg, #9fbcff, #3e63c9); width: 34px; }
.hm-crp > span { font-size: 12.5px; color: #d9d3dc; }
.hm-crp strong { font-family: var(--font-display); font-size: 30px; font-weight: 500; line-height: 1.1; }
.hm-crp.h strong { font-size: 40px; }
.hm-crp small { font-size: 11px; color: #b8b0bb; line-height: 1.35; }
.hm-crp u { text-decoration: none; display: block; width: 100%; margin-top: 6px; padding: 8px; border-radius: 10px; font-size: 12.5px; font-weight: 800; background: linear-gradient(180deg, #7fdca5, #4fb97c); color: #0d2a18; }
.hm-crp.h u { padding: 11px; background: linear-gradient(135deg, #e2457f, #f07a86); color: #fff; }
.hm-crp.b u { background: linear-gradient(180deg, #a9c2ff, #7b9cf0); color: #0f1d3d; }
.hm-cr-cmp { width: 100%; display: grid; gap: 4px; padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, 0.25); font-size: 11px; color: #c9c1cc; }
.hm-cr-cmp span { display: flex; justify-content: space-between; gap: 8px; }
.hm-cr-foot { display: flex; justify-content: center; gap: 22px; padding: 12px 16px 18px; font-size: 11.5px; color: #c9c1cc; }
.hm-cr-foot span { display: inline-flex; align-items: center; gap: 5px; }
.hm .hm-cr-foot .hm-i { width: 13px; height: 13px; }
/* a number nobody should quote: blurred, never readable */
.hm-blur { font-style: normal; filter: blur(5px); opacity: 0.85; user-select: none; }
strong.hm-blur { filter: blur(8px); }

/* full-page views (Bible, My Books, Settings) */
.hm-view { position: absolute; inset: 0; z-index: 5; background: #fbfaf7; opacity: 0; transform: translateY(14px); transition: opacity 0.45s, transform 0.55s cubic-bezier(.2, .8, .2, 1); pointer-events: none; padding: 22px 30px; }
.s-v-bible .hm-bible, .s-v-books .hm-books, .s-v-settings .hm-settings { opacity: 1; transform: none; }
.hm-btool, .hm-vh { display: flex; align-items: center; gap: 10px; }
.hm-vh b { font-family: var(--font-display); font-size: 26px; font-weight: 500; margin-right: auto; }
.hm-bsearch { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; width: 210px; border-radius: 999px; background: #fff; border: 1px solid var(--p-bd2); font-size: 12.5px; color: var(--p-fg3); }
.hm-chipr { display: flex; gap: 4px; margin-right: auto; }
.hm-chipr b, .hm-chipr i { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 5px 10px; border-radius: 999px; color: var(--p-fg3); }
.hm-chipr b { background: #26221f; color: #fff; }
.hm-bfield { position: relative; height: 600px; margin-top: 16px; }
.hm-bc { position: absolute; width: 230px; padding: 14px 16px; border-radius: 16px; background: #fff; border: 1px solid var(--p-bd); box-shadow: 0 18px 36px -24px rgba(60, 40, 20, 0.5); animation: hm-float 7s ease-in-out infinite; }
.hm-bc:nth-child(2n) { animation-duration: 8.5s; animation-delay: -2s; }
.hm-bc:nth-child(3n) { animation-duration: 9.5s; animation-delay: -4s; }
@keyframes hm-float { 50% { transform: translate(6px, -9px); } }
.hm-bc em { display: block; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #a8285a; }
.hm-bc[data-k="c"] em { color: #6a3fc4; }
.hm-bc[data-k="p"] em { color: #1d6b35; }
.hm-bc[data-k="t"] em { color: #9a4708; }
.hm-bc[data-k="e"] em { color: #2a5d9a; }
.hm-bc b { display: block; font-family: var(--font-display); font-size: 17px; font-weight: 500; margin: 3px 0 4px; }
.hm-bc span { font-size: 12px; color: var(--p-fg3); line-height: 1.45; display: block; }
.hm-bc-story { width: 300px; padding: 20px; background: linear-gradient(180deg, #fff, #fdf1f5); border-color: rgba(194, 58, 108, 0.3); }
.hm-bask { position: absolute; left: 50%; bottom: 26px; width: 520px; margin-left: -260px; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 6px 0 16px; border-radius: 999px; background: #fff; border: 1px solid rgba(106, 63, 196, 0.35); box-shadow: 0 0 0 6px rgba(106, 63, 196, 0.08), 0 24px 40px -24px rgba(60, 40, 20, 0.6); font-size: 13.5px; opacity: 0; transform: translateY(12px); transition: opacity 0.4s, transform 0.45s; }
.hm-bask > span:nth-child(2) { flex: 1; }
.hm-bask .hm-go { background: linear-gradient(180deg, #8b5cf6, #6d28d9); }
.s-ask .hm-bask { opacity: 1; transform: none; }
.s-ask .hm-bible { box-shadow: inset 0 0 70px rgba(124, 58, 237, 0.2); }
.hm-drawer { position: absolute; right: 18px; top: 74px; bottom: 18px; width: 320px; padding: 20px; border-radius: 18px; background: #fff; border: 1px solid var(--p-bd2); box-shadow: 0 30px 60px -30px rgba(60, 40, 20, 0.6); transform: translateX(110%); transition: transform 0.55s cubic-bezier(.2, .8, .2, 1); }
.s-drawer .hm-drawer { transform: none; }
.hm-drawer em { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #6a3fc4; }
.hm-drawer b { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 500; margin: 4px 0 10px; }
.hm-drawer p { font-size: 13px; line-height: 1.6; color: var(--p-fg2); margin-bottom: 16px; }
.hm-tidy { color: #6a3fc4; border-color: rgba(106, 63, 196, 0.38); }
.hm-bgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
.hm-bk { position: relative; padding: 12px; border-radius: 18px; background: #fff; border: 1px solid var(--p-bd); box-shadow: 0 18px 36px -26px rgba(60, 40, 20, 0.5); }
.hm-bk > b { display: block; font-family: var(--font-display); font-size: 17px; font-weight: 500; margin: 10px 4px 2px; }
.hm-bk > span { font-size: 12px; color: var(--p-fg3); margin: 0 4px; }
.hm-cov { height: 210px; border-radius: 12px; display: flex; align-items: flex-end; padding: 16px; }
.hm-cov b { font-family: var(--font-display); font-size: 22px; font-weight: 500; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); }
.hm-cov.c1 { background: linear-gradient(160deg, #2b4a6b, #0f1d2c 70%); }
.hm-cov.c2 { background: linear-gradient(160deg, #e99a5c, #a8285a); }
.hm-cov.c3 { background: linear-gradient(160deg, #9fb7d6, #4a5f86); }
.hm-bk-a { position: absolute; right: 18px; top: 18px; display: flex; gap: 6px; }
.hm-bk-a .hm-ib { background: rgba(255, 255, 255, 0.9); width: 28px; height: 28px; }
.hm-tabs { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(60, 50, 40, 0.07); margin: 22px 0 18px; }
.hm-tabs span { font-size: 13px; font-weight: 700; padding: 7px 16px; border-radius: 9px; color: var(--p-fg3); }
.hm-tabs span.on { background: #fff; color: var(--p-fg); box-shadow: 0 2px 6px rgba(60, 40, 20, 0.15); }
.hm-set { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 620px; padding: 18px 20px; margin-bottom: 10px; border-radius: 16px; background: #fff; border: 1px solid var(--p-bd); }
.hm-set b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.hm-set span { font-size: 12.5px; color: var(--p-fg3); }
.hm-q-i { font-style: normal; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--p-bd2); font-size: 10px; color: var(--p-fg3); margin-left: 4px; }
.hm-sw { flex: none; width: 40px; height: 24px; border-radius: 999px; background: rgba(60, 50, 40, 0.18); position: relative; }
.hm-sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }

/* the right panel */
.hm-panel { position: absolute; right: 12px; top: 56px; bottom: 12px; width: 340px; z-index: 7; border-radius: 18px; background: linear-gradient(180deg, #fff, #f8f3ec); border: 1px solid var(--p-bd2); box-shadow: 0 30px 60px -30px rgba(60, 40, 20, 0.6); padding: 16px; transform: translateX(calc(100% + 24px)); transition: transform 0.6s cubic-bezier(.2, .8, .2, 1); overflow: hidden; }
.hm.s-p-suggest .hm-panel, .hm.s-p-split .hm-panel, .hm.s-p-inmind .hm-panel, .hm.s-p-versions .hm-panel, .hm.s-p-history .hm-panel, .hm.s-p-agent .hm-panel { transform: none; }
.hm-pp { display: none; }
.s-p-suggest .hm-pp-suggest, .s-p-split .hm-pp-split, .s-p-inmind .hm-pp-inmind, .s-p-versions .hm-pp-versions, .s-p-history .hm-pp-history, .s-p-agent .hm-pp-agent { display: block; }
.hm-ph { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; margin-bottom: 14px; }
.hm-sg { padding: 13px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--p-bd); margin-bottom: 10px; font-family: var(--font-display); font-size: 14.5px; line-height: 1.5; box-shadow: 0 12px 24px -20px rgba(60, 40, 20, 0.5); }
.s-p-suggest .hm-sg { animation: hm-pop 0.5s cubic-bezier(.2, .9, .3, 1.2) both; }
.s-p-suggest .hm-sg:nth-child(3) { animation-delay: 0.1s; }
.s-p-suggest .hm-sg:nth-child(4) { animation-delay: 0.2s; }
.hm-sg em { display: block; font-family: var(--font-ui); font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #6a3fc4; margin-bottom: 3px; }
.hm-sg[data-k="close"] { border-left: 3px solid #c23a6c; }
.hm-sg[data-k="prog"] { border-left: 3px solid #6a3fc4; }
.hm-sg[data-k="twist"] { border-left: 3px solid #d9622f; }
.hm-reroll-b, .hm-big { display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 999px; font-size: 13px; font-weight: 800; margin-top: 12px; }
.hm-reroll-b { border: 1px solid rgba(106, 63, 196, 0.38); color: #6a3fc4; background: #f5f0ff; }
.hm-big { color: #fff; background: linear-gradient(135deg, #c23a6c, #d9622f); box-shadow: 0 12px 24px -14px rgba(194, 58, 108, 0.8); }
.hm-link { display: block; text-align: center; font-size: 12px; font-weight: 700; color: var(--p-fg3); margin-top: 10px; text-decoration: underline; text-underline-offset: 3px; }
.hm-tl { position: relative; padding-left: 4px; }
.hm-tl-tag { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; color: var(--p-fg3); background: rgba(60, 50, 40, 0.07); margin: 4px 0 8px; }
.hm-tl-tag.on { color: #fff; background: #c23a6c; }
.hm-mo { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 6px; border-radius: 12px; background: #fff; border: 1px solid var(--p-bd); font-size: 13px; color: var(--p-fg3); opacity: 0.6; }
.hm-mo.on { opacity: 1; color: var(--p-fg); border-color: rgba(194, 58, 108, 0.35); background: #fdf3f7; }
.hm-mo i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: rgba(60, 50, 40, 0.12); font-size: 10.5px; font-weight: 800; flex: none; }
.hm-mo.on i { background: #c23a6c; color: #fff; }
.hm-sp { color: #6a3fc4; display: grid; }
.hm .hm-sp .hm-i { width: 12px; height: 12px; }
.hm-cutline { position: relative; height: 2px; margin: 16px 0 12px; border-top: 2px dashed #c23a6c; }
.hm-cutline span { position: absolute; left: 50%; top: -17px; margin-left: -16px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid rgba(194, 58, 108, 0.45); color: #c23a6c; box-shadow: 0 6px 14px -8px rgba(194, 58, 108, 0.8); }
.s-p-split .hm-cutline span { animation: hm-nudge 1.8s ease-in-out infinite; }
@keyframes hm-nudge { 50% { transform: translateY(5px); } }
.hm-im { padding: 10px 12px; margin-bottom: 8px; border-radius: 12px; background: #fff; border: 1px solid var(--p-bd); font-size: 13px; }
.hm-im em { display: block; font-style: normal; font-size: 9.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #a8285a; margin-bottom: 2px; }
.hm-im[data-k="c"] em { color: #6a3fc4; }
.hm-im[data-k="t"] em { color: #9a4708; }
.hm-prop { display: flex; align-items: center; gap: 6px; padding: 10px 12px; margin: 12px 0 8px; border-radius: 12px; background: #f5f0ff; border: 1px solid rgba(106, 63, 196, 0.35); font-size: 12px; }
.hm-prop b { flex: 1; font-weight: 700; color: #4c2a9a; }
.hm-mini { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--p-bd2); background: #fff; color: var(--p-fg2); }
.hm-mini.on { background: #6a3fc4; color: #fff; border-color: transparent; }
.hm-mini.wide { display: flex; justify-content: center; margin: 4px 0 10px; padding: 9px; }
.hm-askbar { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 999px; background: #fff; border: 1px solid rgba(106, 63, 196, 0.32); font-size: 13px; color: var(--p-fg2); }
.hm-map { position: relative; padding-left: 8px; }
.hm-map::before { content: ""; position: absolute; left: 15px; top: 14px; bottom: 30px; width: 2px; background: rgba(60, 50, 40, 0.15); }
.hm-v { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin-bottom: 8px; border-radius: 12px; background: #fff; border: 1px solid var(--p-bd); font-size: 12.5px; }
.hm-v i { width: 12px; height: 12px; border-radius: 50%; background: #b9b0a6; flex: none; box-shadow: 0 0 0 3px #fff; }
.hm-v[data-k="ex"] i { background: #d94d82; }
.hm-v[data-k="st"] i { background: #e8833a; }
.hm-v b { flex: 1; font-weight: 700; }
.hm-v span { font-size: 11px; color: var(--p-fg3); }
.hm-v em { font-style: normal; font-size: 9.5px; font-weight: 800; letter-spacing: 0.08em; padding: 2px 7px; border-radius: 999px; background: #26221f; color: #fff; }
.hm-v em.p { background: #6a3fc4; }
.hm-v.hm-br { margin-left: 26px; }
.hm-v.prev { border-color: rgba(106, 63, 196, 0.5); box-shadow: 0 0 0 3px rgba(106, 63, 196, 0.12); }
.hm-pp-versions .hm-big { position: absolute; left: 16px; right: 16px; bottom: 16px; }
.hm-h { display: grid; grid-template-columns: 1fr auto; padding: 10px 12px; margin-bottom: 6px; border-radius: 12px; background: #fff; border: 1px solid var(--p-bd); font-size: 12.5px; border-left: 3px solid #b9b0a6; }
.hm-h[data-k="ex"] { border-left-color: #d94d82; }
.hm-h[data-k="st"] { border-left-color: #e8833a; }
.hm-h span { grid-column: 1; font-size: 11.5px; color: var(--p-fg3); }
.hm-h em { grid-row: 1 / 3; grid-column: 2; align-self: center; font-style: normal; font-size: 11px; color: var(--p-fg3); }
.hm-h.dim { opacity: 0.5; }
.hm-now { font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #a8285a; display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.hm-now::after { content: ""; flex: 1; height: 1px; background: rgba(194, 58, 108, 0.4); }
.hm-msg { padding: 11px 13px; border-radius: 14px; background: #fff; border: 1px solid var(--p-bd); font-size: 13px; line-height: 1.5; margin-bottom: 10px; }
.hm-msg.me { margin-left: 40px; background: #26221f; color: #fff; border-color: transparent; }
.hm-tool { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: #1d6b35; margin-bottom: 4px; }
.hm .hm-tool .hm-i { width: 13px; height: 13px; }
.hm-aura { position: absolute; inset: 0; pointer-events: none; border-radius: 22px; opacity: 0; transition: opacity 0.6s; box-shadow: inset 0 0 0 2px rgba(124, 58, 237, 0.45), inset 0 0 80px rgba(124, 58, 237, 0.25); }
.s-agentwork .hm-aura { opacity: 1; animation: hm-breathe 2.4s ease-in-out infinite; }

/* the menu drawer */
.hm-menu { position: absolute; right: 12px; top: 12px; bottom: 12px; width: 260px; z-index: 8; padding: 16px; border-radius: 18px; background: linear-gradient(180deg, #fff, #f7f2eb); border: 1px solid var(--p-bd2); box-shadow: 0 30px 60px -30px rgba(60, 40, 20, 0.6); transform: translateX(calc(100% + 24px)); transition: transform 0.55s cubic-bezier(.2, .8, .2, 1); display: grid; align-content: start; gap: 12px; }
.s-menu .hm-menu { transform: none; }
.hm-mg { display: grid; gap: 1px; padding: 4px; border-radius: 12px; }
.hm-mg em { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--p-fg3); padding: 4px 8px; }
.hm-mg span { font-size: 13px; font-weight: 600; color: var(--p-fg2); padding: 6px 8px; border-radius: 8px; }
.hm-mg span.on { background: #fde9f1; color: #7d1d44; }

/* the phone */
.hm-phone { position: absolute; left: 420px; top: 14px; width: 360px; height: 752px; border-radius: 52px; background: #1c1a1e; padding: 11px; box-shadow: 0 50px 90px -40px rgba(30, 20, 10, 0.8), inset 0 0 0 2px #3a363d; opacity: 0; transform: translateY(40px) scale(0.94); transition: opacity 0.55s, transform 0.7s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
.s-phone .hm-phone { opacity: 1; transform: none; }
.s-phone .hm-app { opacity: 0; transform: scale(0.96); }
.hm-ph-in { position: relative; height: 100%; border-radius: 42px; overflow: hidden; background: #fbfaf7; padding: 50px 16px 0 14px; }
.hm-ph-in::before { content: ""; position: absolute; top: 12px; left: 50%; width: 92px; height: 26px; margin-left: -46px; border-radius: 999px; background: #1c1a1e; }
.hm-ph-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.hm-ph-r { display: flex; gap: 6px; align-items: center; }
.hm-ph-r .hm-pill { padding: 0 9px; }
.hm-ph-page { padding-left: 50px; }
.hm-ph-t { position: relative; font-family: var(--font-display); font-size: 15px; line-height: 1.7; margin-bottom: 14px; color: var(--p-fg); }
.hm-ph-t.on::before { content: ""; position: absolute; left: -9px; top: 4px; bottom: 4px; width: 1px; background: rgba(60, 50, 40, 0.3); }
.hm-ph-dash { position: absolute; left: -40px; top: 12px; width: 7px; height: 1px; background: #bfb6ac; }
.hm-ph-p { position: relative; }
.hm-ph-rail { position: absolute; left: -48px; top: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; z-index: 2; }
.hm-ph-rail .hm-b .hm-l { max-width: 0; opacity: 0; margin: 0; }
.s-ph-names .hm-ph-rail .hm-b .hm-l { max-width: 120px; opacity: 1; margin-left: 6px; }
.hm-ph-sheet { position: absolute; left: 0; right: 0; bottom: 0; height: 74%; padding: 14px 16px; border-radius: 26px 26px 0 0; background: #fff; box-shadow: 0 -20px 40px -20px rgba(60, 40, 20, 0.5); transform: translateY(105%); transition: transform 0.6s cubic-bezier(.2, .8, .2, 1); z-index: 3; }
.s-ph-sheet .hm-ph-sheet { transform: none; }
.hm-handle { display: block; width: 40px; height: 5px; border-radius: 5px; background: rgba(60, 50, 40, 0.2); margin: 0 auto 14px; }

/* ---------- Autopilot (src/lib/ui/autopilot-run.css, in Paper) ----------
   The margin's button under Suggest next, the start window with its
   direction, the cards drawn in the empty paragraph's place, the pill at the
   page's foot, the pause, the ribbon and Clear all. Positions are layout,
   never transforms, so help.js aims where they end up. */
.hm-cam { --ap-violet: #6d28d9; --ap-close: #1d6aa3; --ap-progress: #23784a; --ap-twist: #a3337f; }
.s-opening #p4 .r-ap { display: none; }
/* its icon: lines writing themselves, the page scrolling up a line each time */
.hm .hm-wr { overflow: hidden; }
.hm .hm-wr path { stroke-width: 2; stroke-dasharray: 1 2; stroke-dashoffset: 1; opacity: 0; animation: hm-wr-line 4.8s ease-in-out infinite; }
.hm .hm-wr .w1 { animation-delay: -3.6s; }
.hm .hm-wr .w2 { animation-delay: -2.4s; }
.hm .hm-wr .w3 { animation-delay: -1.2s; }
.hm .hm-wr .wp { fill: currentColor; stroke: none; opacity: 0; animation: hm-wr-pen 4.8s linear infinite; }
@keyframes hm-wr-line {
  0% { transform: translateY(0); stroke-dashoffset: 1; opacity: 0; animation-timing-function: linear; }
  1% { opacity: 1; }
  15% { transform: translateY(0); stroke-dashoffset: 0; }
  19% { transform: translateY(0); }
  25%, 44% { transform: translateY(-4.6px); }
  50%, 69% { transform: translateY(-9.2px); }
  75% { transform: translateY(-13.8px); }
  94% { transform: translateY(-13.8px); stroke-dashoffset: 0; opacity: 1; }
  100% { transform: translateY(-18.4px); stroke-dashoffset: 0; opacity: 0; }
}
@keyframes hm-wr-pen {
  0% { transform: translateX(0); opacity: 1; }
  15% { transform: translateX(16px); opacity: 1; }
  18%, 24.99% { transform: translateX(16px); opacity: 0; }
  25% { transform: translateX(0); opacity: 1; }
  40% { transform: translateX(12px); opacity: 1; }
  43%, 49.99% { transform: translateX(12px); opacity: 0; }
  50% { transform: translateX(0); opacity: 1; }
  65% { transform: translateX(14.5px); opacity: 1; }
  68%, 74.99% { transform: translateX(14.5px); opacity: 0; }
  75% { transform: translateX(0); opacity: 1; }
  90% { transform: translateX(8.5px); opacity: 1; }
  93%, 100% { transform: translateX(8.5px); opacity: 0; }
}
/* never pressed yet: its name out, a violet ring pulsing */
.s-apbtn #t-autopilot { color: var(--ap-violet); border-color: rgba(109, 40, 217, 0.55); background: linear-gradient(180deg, #f7f2ff, #ede4ff); animation: hm-apring 2.2s ease-out infinite; }
.s-apbtn #t-autopilot .hm-l { max-width: 220px; opacity: 1; margin-left: 6px; }
@keyframes hm-apring {
  0% { box-shadow: 0 0 0 0 rgba(109, 40, 217, 0.45), 0 0 14px -2px rgba(109, 40, 217, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(109, 40, 217, 0), 0 0 18px 0 rgba(109, 40, 217, 0.3); }
  100% { box-shadow: 0 0 0 0 rgba(109, 40, 217, 0), 0 6px 16px -10px rgba(60, 40, 20, 0.5); }
}

/* the cards: kind in the frame's top line, face down while drafted */
.hm-fan { position: relative; width: 116px; height: 156px; margin: 0 auto; }
.hm-fan .c { position: absolute; inset: 0; border-radius: 12px; background: #fffdf9; border: 1px solid rgba(60, 40, 30, 0.16); box-shadow: 0 14px 28px -16px rgba(90, 60, 30, 0.55); }
.hm-fan .c::before { content: ""; position: absolute; inset: 7px; border-radius: 8px; border: 1px solid var(--k); opacity: 0.6; }
.hm-fan .c::after { content: ""; position: absolute; left: 22px; right: 22px; top: 40px; height: 60px; background: linear-gradient(var(--kw), var(--kw)) 15% 0 / 70% 9px no-repeat, linear-gradient(var(--kw), var(--kw)) 0 24px / 100% 6px no-repeat, linear-gradient(var(--kw), var(--kw)) 0 38px / 100% 6px no-repeat, linear-gradient(var(--kw), var(--kw)) 0 52px / 60% 6px no-repeat; opacity: 0.5; }
.hm-fan .c em { position: absolute; left: 0; right: 0; top: 1px; text-align: center; font-style: normal; font-size: 9px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--k); }
.hm-fan .c em::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 0; bottom: 0; width: 64px; margin-left: -32px; background: #fffdf9; }
.hm-fan .c.l { --k: var(--ap-close); --kw: rgba(29, 106, 163, 0.3); z-index: 1; transform: translateX(-30%) rotate(-6deg) scale(0.94); }
.hm-fan .c.r { --k: var(--ap-progress); --kw: rgba(35, 120, 74, 0.3); z-index: 2; transform: translateX(30%) rotate(6deg) scale(0.94); }
.hm-fan .c.f { --k: var(--ap-twist); --kw: rgba(163, 51, 127, 0.3); z-index: 3; }
.hm-fan.sm { width: 60px; height: 82px; }
.hm-fan.sm .c { border-radius: 8px; }
.hm-fan.sm .c::before { inset: 4px; border-radius: 5px; }
.hm-fan.sm .c::after { left: 12px; right: 12px; top: 22px; height: 34px; background-size: 70% 5px, 100% 3px, 100% 3px, 60% 3px; background-position: 15% 0, 0 13px, 0 21px, 0 29px; }
/* the shuffle while a beat is drafted */
.s-aprun .hm-apdeck .c { animation: 2.85s cubic-bezier(.45, .05, .35, 1) infinite; }
.s-aprun .hm-apdeck .c.f { animation-name: hm-shuf-f; }
.s-aprun .hm-apdeck .c.l { animation-name: hm-shuf-l; }
.s-aprun .hm-apdeck .c.r { animation-name: hm-shuf-r; }
@keyframes hm-shuf-f { 0%, 30%, 100% { transform: none; } 7.5% { transform: translateX(-48%) rotate(-6deg) scale(0.94); } 15% { transform: scale(0.9); } 22.5% { transform: translateX(48%) rotate(6deg) scale(0.94); } }
@keyframes hm-shuf-l { 0%, 30%, 100% { transform: translateX(-30%) rotate(-6deg) scale(0.94); } 7.5% { transform: translateX(10%) rotate(3deg) scale(0.92); } 15% { transform: translateX(-48%) rotate(-9deg) scale(0.88); } 22.5% { transform: translateX(-12%) rotate(-2deg) scale(0.92); } }
@keyframes hm-shuf-r { 0%, 30%, 100% { transform: translateX(30%) rotate(6deg) scale(0.94); } 7.5% { transform: translateX(48%) rotate(9deg) scale(0.88); } 15% { transform: translateX(-10%) rotate(-3deg) scale(0.92); } 22.5% { transform: translateX(12%) rotate(2deg) scale(0.92); } }

/* the start window */
.hm-apwrap { position: absolute; inset: 0; z-index: 9; display: grid; place-items: center; background: rgba(38, 28, 20, 0.4); opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.s-apmodal .hm-apwrap { opacity: 1; }
.hm-apmodal { position: relative; width: 440px; padding: 22px 30px 18px; border-radius: 24px; text-align: center; background: linear-gradient(180deg, #fffdf9, #f8f2ea); border: 1px solid var(--p-bd2); box-shadow: 0 40px 90px -30px rgba(40, 25, 10, 0.7); transform: translateY(24px) scale(0.96); transition: transform 0.55s cubic-bezier(.2, .9, .3, 1.15); }
.s-apmodal .hm-apmodal { transform: none; }
.hm-apx { position: absolute; right: 16px; top: 16px; display: grid; color: var(--p-dim); }
.hm-apart { position: relative; width: 120px; height: 92px; margin: 0 auto 8px; padding-top: 4px; }
.hm-aph { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 500; margin-bottom: 6px; color: var(--p-fg); }
.hm-aplead { max-width: 360px; margin: 0 auto 16px; font-size: 13.5px; line-height: 1.5; color: var(--p-fg2); }
.hm-apdir { text-align: left; margin-bottom: 16px; }
.hm-apdir em { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ap-violet); }
.hm .hm-apdir em .hm-i { width: 12px; height: 12px; }
.hm-apbox { padding: 11px 13px; border-radius: 13px; border: 1px solid rgba(109, 40, 217, 0.45); background: #fff; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12); font-family: var(--font-display); font-size: 14.5px; line-height: 1.5; color: var(--p-fg); }
.hm-apdir small { display: block; margin-top: 7px; font-size: 11.5px; color: var(--p-fg3); }
.hm-apgo { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; background: linear-gradient(135deg, #7c3aed, #c2366e); color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap; box-shadow: 0 12px 26px -12px rgba(124, 58, 237, 0.9); }
.hm-apgo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%); transform: translateX(-120%); animation: hm-apshine 3.2s ease-in-out 0.6s infinite; }
@keyframes hm-apshine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.hm-aplater { display: block; margin-top: 9px; font-size: 13px; font-weight: 600; color: var(--p-fg3); }

/* the window's part 2: Pick your director (lib/ui/director-art) */
.hm-ap2 { display: none; }
.s-apdirector .hm-ap1 { display: none; }
.s-apdirector .hm-ap2 { display: block; }
.s-apdirector .hm-apmodal { width: 600px; padding-top: 24px; }
.hm-drgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 12px; text-align: left; }
.hm-dr { position: relative; display: flex; flex-direction: column; padding: 8px 10px 10px; border-radius: 16px; background: #fff; border: 1px solid var(--p-bd2); box-shadow: 0 10px 22px -18px rgba(60, 40, 20, 0.6); }
.hm-dr.on { border-color: rgba(109, 40, 217, 0.6); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18), 0 14px 28px -18px rgba(109, 40, 217, 0.6); }
.hm-drcheck { position: absolute; right: 8px; top: 8px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ap-violet); color: #fff; opacity: 0; }
.hm .hm-drcheck .hm-i { width: 12px; height: 12px; stroke-width: 2.6; }
.hm-dr.on .hm-drcheck { opacity: 1; }
.hm-drart { display: block; width: 100%; height: 92px; }
.hm-drsays { align-self: center; margin: -4px 0 6px; padding: 2px 9px; border-radius: 999px; background: #f3edff; color: #4c2a9a; font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.hm-drname { display: flex; flex-direction: column; gap: 1px; margin-bottom: 4px; }
.hm-drname b { font-size: 12.5px; font-weight: 800; color: var(--p-fg); }
.hm-drname em { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ap-violet); }
.hm-drline { font-size: 10.5px; line-height: 1.4; color: var(--p-fg2); margin-bottom: 8px; }
.hm-pips { display: flex; gap: 4px; margin-top: auto; }
.hm-pips i, .hm-drlegend i { width: 9px; height: 9px; border-radius: 50%; background: var(--ap-close); }
.hm-pips i.p, .hm-drlegend i.p { background: var(--ap-progress); }
.hm-pips i.t, .hm-drlegend i.t { background: var(--ap-twist); }
.hm-drlegend { display: flex; justify-content: center; align-items: center; gap: 12px; margin-bottom: 14px; font-size: 11px; font-weight: 600; color: var(--p-fg3); }
.hm-drlegend span { display: inline-flex; align-items: center; gap: 5px; }
.hm .hm-aplater .hm-i { width: 12px; height: 12px; transform: rotate(90deg); vertical-align: -1px; margin-right: 2px; }
/* the director's face: thinking in front of the deck's line, and the pill's orb */
.hm-drface { display: block; flex: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; }
.hm-aploader .hm-drface { width: 24px; height: 24px; box-shadow: 0 0 0 1px rgba(109, 40, 217, 0.25); }
.hm-appill-orb .hm-drface { width: 26px; height: 26px; background: #fff7ec; }

/* on the page: what it wrote after p2, the page scrolled down to it */
.hm-ap { display: none; }
.s-ap .hm-ap { display: block; }
.s-ap .hm-top, .s-ap #p1, .s-ap .hm-note, .s-ap .hm-next, .s-ap #p3, .s-ap #p4 { display: none; }
.hm-apmark { display: flex; align-items: center; gap: 10px; margin: 2px 0 8px; }
.hm-ribbon { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 20px 0 10px; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; background: linear-gradient(100deg, #7c3aed, #c2366e); clip-path: polygon(0 0, 100% 0, calc(100% - 9px) 50%, 100% 100%, 0 100%); }
.hm .hm-ribbon .hm-i { width: 13px; height: 13px; stroke-width: 2; }
.hm-apline { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(109, 40, 217, 0.45), transparent); }
.hm-apclear { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--p-bd2); background: #fff; color: var(--p-fg2); font-size: 12px; font-weight: 600; white-space: nowrap; transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.18s; }
.hm .hm-apclear .hm-i { width: 13px; height: 13px; }
.s-apclear .hm-apclear { color: #c62f35; border-color: rgba(229, 72, 77, 0.5); background: #fdeeee; }
.s-apmark #ap1 .hm-rail { opacity: 1; transform: none; }
.s-apmark #ap1 .hm-dash { opacity: 0; }
.s-apmark #ap1 .hm-p .hm-t::before { content: ""; position: absolute; left: -11px; top: 4px; bottom: 4px; width: 1px; background: rgba(60, 50, 40, 0.3); }
/* Remove bookmark asks first, as Locked does */
.hm-unmark .u { display: none; }
.s-unmark .hm-unmark .a { display: none; }
.s-unmark .hm-unmark .u { display: inline; }
.hm.s-unmark .hm-unmark { border-color: rgba(154, 71, 8, 0.5); color: var(--p-fg); }
/* the deck, in the next empty paragraph's place */
.hm-apdeck, .hm-appaused { display: none; }
.s-aprun .hm-apdeck { display: flex; }
.s-aprun #ap3 { display: none; }
.hm-apdeck { flex-direction: column; align-items: center; width: max-content; margin: 0 auto; padding: 2px 24px 6px; }
.hm-apdeck-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 12px; font-weight: 600; color: #4a4038; }
.hm-apchip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px 0 7px; border-radius: 999px; color: var(--ap-violet); border: 1px solid rgba(109, 40, 217, 0.45); background: rgba(109, 40, 217, 0.08); font-size: 11.5px; font-weight: 700; }
.hm .hm-apchip .hm-i { width: 13px; height: 13px; }
.hm-aploader { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 12px; font-weight: 600; color: #4a4038; }
.hm-apdots { display: inline-flex; gap: 4px; }
.hm-apdots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ap-violet); animation: hm-apdot 1.2s ease-in-out infinite; }
.hm-apdots i:nth-child(2) { animation-delay: 0.15s; }
.hm-apdots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes hm-apdot { 0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); } 40% { opacity: 1; transform: scale(1.1); } }
/* paused under the last beat */
.s-appaused .hm-appaused { display: flex; animation: hm-pop 0.5s cubic-bezier(.2, .9, .3, 1.2) both; }
.hm-appaused { flex-direction: column; align-items: center; gap: 12px; max-width: 460px; margin: 8px auto 0; padding: 16px 18px 14px; border-radius: 18px; border: 1px solid rgba(109, 40, 217, 0.35); background: radial-gradient(120% 90% at 50% 0%, rgba(109, 40, 217, 0.1), transparent 70%), #fff; box-shadow: var(--p-shadow); }
.hm-appaused-l { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: #2a2420; }
.hm .hm-appaused-l .hm-i { color: var(--ap-violet); }
.hm-appaused-r { display: flex; gap: 10px; }
.hm-appaused-h { margin-top: -4px; max-width: 380px; font-size: 12px; line-height: 1.45; color: #4a4038; text-align: center; }
.hm-apquiet { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(60, 40, 30, 0.16); background: #fff; color: #2a2420; font-size: 14px; font-weight: 600; white-space: nowrap; }
.hm-sq { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 2px; background: currentColor; }
/* the pill at the page's foot (centred by margin, not a transform) */
.hm-appill { position: absolute; left: 0; right: 0; bottom: 56px; z-index: 6; width: max-content; margin: 0 auto; display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: #1f1b24; border: 1px solid rgba(167, 139, 250, 0.35); box-shadow: 0 16px 36px -14px rgba(0, 0, 0, 0.8); opacity: 0; transform: translateY(16px); transition: opacity 0.35s, transform 0.45s cubic-bezier(.34, 1.3, .64, 1); }
.s-aprun .hm-appill { opacity: 1; transform: none; }
.s-aprun .hm-end { opacity: 0; }
.hm-appill-go { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 4px; color: #f3eef6; font-size: 13px; font-weight: 600; white-space: nowrap; }
.hm-appill-orb { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #7c3aed, #c2366e); color: #fff; animation: hm-aporb 2.4s ease-in-out infinite; }
.hm .hm-appill-orb .hm-i { width: 14px; height: 14px; }
@keyframes hm-aporb { 50% { box-shadow: 0 0 0 6px rgba(167, 139, 250, 0.18); } }
.hm-appill-stop { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.16); color: #f3eef6; }
.hm-appill-pause { display: flex; align-items: center; justify-content: center; gap: 3px; }
.hm-appill-pause .hm-pz { width: 3px; height: 11px; border-radius: 1.5px; background: currentColor; }

/* ---------- the camera's marks ---------- */
.hm-spot { position: absolute; z-index: 40; left: 0; top: 0; width: 1200px; height: 780px; border-radius: 22px; pointer-events: none; box-shadow: 0 0 0 4000px rgba(38, 28, 20, 0.32); opacity: 0; transition: left 0.95s cubic-bezier(.25, .85, .2, 1), top 0.95s cubic-bezier(.25, .85, .2, 1), width 0.95s cubic-bezier(.25, .85, .2, 1), height 0.95s cubic-bezier(.25, .85, .2, 1), border-radius 0.95s, opacity 0.5s; }
.hm-spot.on { opacity: 1; }
.hm-ring { position: absolute; z-index: 41; left: 0; top: 0; width: 10px; height: 10px; border-radius: 16px; pointer-events: none; border: calc(2px * var(--inv)) solid #e2457f; box-shadow: 0 0 0 calc(4px * var(--inv)) rgba(226, 69, 127, 0.22), 0 0 calc(24px * var(--inv)) rgba(226, 69, 127, 0.45); opacity: 0; transition: left 0.95s cubic-bezier(.25, .85, .2, 1), top 0.95s cubic-bezier(.25, .85, .2, 1), width 0.95s cubic-bezier(.25, .85, .2, 1), height 0.95s cubic-bezier(.25, .85, .2, 1), border-radius 0.95s, opacity 0.5s; }
.hm-ring.on { opacity: 1; animation: hm-ring 2s ease-in-out 1s infinite; }
@keyframes hm-ring { 50% { box-shadow: 0 0 0 calc(9px * var(--inv)) rgba(226, 69, 127, 0.1), 0 0 calc(34px * var(--inv)) rgba(226, 69, 127, 0.35); } }
.hm-cursor { position: absolute; z-index: 42; left: 0; top: 0; width: 26px; height: 26px; pointer-events: none; transform-origin: 4px 3px; transform: scale(var(--inv)); filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.3)); transition: left 1.05s cubic-bezier(.3, .8, .2, 1), top 1.05s cubic-bezier(.3, .8, .2, 1), opacity 0.4s; opacity: 0; }
.hm-cursor.on { opacity: 1; }
.hm-cursor svg { width: 100%; height: 100%; display: block; transform-origin: 4px 3px; }
.hm-cursor.press svg { animation: hm-press 0.35s ease; }
@keyframes hm-press { 50% { transform: scale(0.8); } }
.hm-ripple { position: absolute; z-index: 41; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; pointer-events: none; border: 2.5px solid #e2457f; animation: hm-ripple 0.8s ease-out forwards; }
@keyframes hm-ripple { from { transform: scale(calc(0.2 * var(--inv))); opacity: 1; } to { transform: scale(calc(2.2 * var(--inv))); opacity: 0; } }
.hm .is-target { z-index: 5; }
.hm-b.is-target, .hm-q.is-target, .hm-pill.is-target, .hm-ib.is-target { box-shadow: var(--p-shadow), 0 0 0 4px rgba(226, 69, 127, 0.16); }
.hm .is-press { transform: scale(0.9) !important; }

.hb-hud:hover { background: #fff; box-shadow: 0 0 0 3px var(--accent-soft), 0 10px 24px -16px rgba(60, 40, 20, 0.5); }
.hb-hud svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--fg); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hb-hud .hb-hud-chev { width: 13px; height: 13px; stroke: var(--fg-3); transition: transform 0.2s; }
.hb-hud[aria-expanded="true"] .hb-hud-chev { transform: rotate(180deg); }
#hb-hud { overflow: hidden; text-overflow: ellipsis; }

/* the map: every section and button. A computer: always there, on the left;
   narrower: a sheet the label on the screen opens. */
.hb-toc { position: sticky; top: calc(var(--hb-head) + 14px); align-self: start; height: calc(100vh - var(--hb-head) - 28px); height: calc(100svh - var(--hb-head) - 28px); display: flex; flex-direction: column; border-radius: 22px; background: rgba(255, 255, 255, 0.7); border: 1px solid var(--border); box-shadow: 0 24px 50px -40px rgba(60, 40, 20, 0.5); overflow: hidden; }
.hb-toc-h { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; font-size: 13px; }
.hb-toc-h b { font-weight: 800; }
.hb-toc-x { display: none; border: 0; background: none; padding: 6px; border-radius: 10px; cursor: pointer; color: var(--fg-2); }
.hb-toc-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.hb-toc .hb-search { display: flex; align-items: center; gap: 8px; margin: 2px 10px 8px; padding: 0 12px; height: 38px; border-radius: 12px; background: #fff; border: 1px solid var(--border-strong); flex: none; }
.hb-toc .hb-search:focus-within { border-color: var(--accent-border); box-shadow: 0 0 0 3px var(--accent-soft); }
.hb-toc .hb-search svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--fg-3); stroke-width: 2; stroke-linecap: round; }
.hb-toc .hb-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 13.5px; color: var(--fg); }
.hb-toc .hb-search input::placeholder { color: var(--fg-3); }
.hb-toc-list a[hidden], .hb-toc-sec[hidden] { display: none; }
.hb-toc-list a.first { box-shadow: inset 0 0 0 1px var(--accent-border); }
.hb-toc-none { display: none; padding: 4px 18px 16px; font-size: 13px; color: var(--fg-3); }
.hb-toc-none.on { display: block; }
.hb-toc-none a { color: var(--accent-text); font-weight: 600; }
.hb-toc-list { flex: 1; overflow-y: auto; padding: 0 8px 16px; overscroll-behavior: contain; scrollbar-width: thin; }
.hb-toc-sec { margin: 12px 8px 4px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); display: flex; gap: 6px; }
.hb-toc-sec:first-child { margin-top: 2px; }
.hb-toc-sec.on { color: var(--accent-text); }
.hb-toc-list a { display: block; padding: 5px 10px; border-radius: 9px; font-size: 13px; line-height: 1.35; color: var(--fg-2); transition: background 0.15s, color 0.15s; }
.hb-toc-list a:hover { background: rgba(60, 50, 40, 0.06); color: var(--fg); }
.hb-toc-list a.on { background: #fde9f1; color: #7d1d44; font-weight: 700; }
.hb-toc-dim { display: none; }
/* the label on the screen only opens the map where the map isn't already shown */
@media (min-width: 981px) { .hb-hud { cursor: default; } .hb-hud:hover { box-shadow: 0 10px 24px -16px rgba(60, 40, 20, 0.5); } .hb-hud .hb-hud-chev { display: none; } }
@media (max-width: 1280px) {
  .hb-tour { grid-template-columns: 200px minmax(0, 1fr) 320px; gap: 14px; padding: 0 14px 80px; }
  .hb-toc-list a { font-size: 12.5px; }
  .hb-card { padding: 20px 20px 20px 22px; }
  .hb-card h3 { font-size: 19px; }
  .hb-card p { font-size: 14.5px; }
}
@media (max-width: 980px) {
  .hb-toc { position: fixed; z-index: 70; left: 0; right: 0; bottom: 0; top: auto; width: auto; height: 78vh; height: 78svh; border-radius: 24px 24px 0 0; border-bottom: 0; background: #fff; box-shadow: 0 -30px 60px -30px rgba(60, 40, 20, 0.6); transform: translateY(105%); pointer-events: none; transition: transform 0.4s cubic-bezier(.2, .85, .2, 1); }
  .hb-toc::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 5px; background: rgba(60, 50, 40, 0.2); margin: 9px auto 0; flex: none; }
  .hb-toc.open { transform: none; pointer-events: auto; }
  .hb-toc-x { display: grid; }
  .hb-toc-dim { display: block; position: fixed; inset: 0; z-index: 69; background: rgba(38, 28, 20, 0.28); opacity: 0; pointer-events: none; transition: opacity 0.25s; }
  .hb-toc-dim.on { opacity: 1; pointer-events: auto; }
}

/* back up: previous / next step, and the top */
.hb-nav { position: absolute; z-index: 31; right: 14px; bottom: 24px; display: flex; gap: 6px; }
.hb-nav button { display: inline-flex; align-items: center; gap: 6px; height: 38px; min-width: 38px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.92); color: var(--fg); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 24px -14px rgba(60, 40, 20, 0.55); transition: transform 0.15s, background 0.15s; }
.hb-nav button:hover { background: #fff; transform: translateY(-1px); }
.hb-nav button:disabled { opacity: 0.4; cursor: default; transform: none; }
.hb-nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#hb-prev svg { transform: rotate(180deg); }

/* ---------- phone & narrow: stage on top, cards underneath ---------- */
@media (max-width: 980px) {
  .hb-tour { display: block; padding: 0 0 40px; }
  .hb-stage { top: var(--hb-head); height: 50vh; height: 50svh; border-radius: 0 0 26px 26px; z-index: 10; border-top: 0; }
  .hb-hud { font-size: 11px; top: 10px; left: 12px; padding: 5px 11px 5px 9px; }
  .hb-nav { right: 10px; bottom: 18px; }
  .hb-nav button { height: 34px; min-width: 34px; padding: 0 9px; }
  .hb-top span { display: none; }
  .hb-steps { padding: 4vh 16px 40vh; }
  .hb-sec { padding: 14vh 4px 2vh; }
  .hb-sec h2 { font-size: 27px; }
  .hb-step { min-height: 44vh; align-items: flex-start; scroll-margin-top: 0; }
  .hb-card { padding: 18px 18px 18px 20px; border-radius: 20px; }
  .hb-card h3 { font-size: 18px; }
  .hb-card p { font-size: 14.5px; line-height: 1.6; }
}
@media (max-width: 600px) {
  .hb-hero { padding: 34px 0 18px; }
  .hb-hero .lead { font-size: 15.5px; }
  .hb-jump { display: none; }
  .hb-keysbox, .hb-end { padding: 20px 18px; }
  .hb-keys td:first-child { white-space: normal; padding-right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .hm-cam, .hm-spot, .hm-ring, .hm-cursor, .hb-card { transition-duration: 0.01s !important; }
  .hm *, .hm *::before, .hm *::after, .hb-hud-dot, .hb-scrollhint i::after { animation: none !important; }
  /* Autopilot's icon: four written lines, still */
  .hm .hm-wr path { stroke-dashoffset: 0; opacity: 1; }
  .hm .hm-wr .w1 { transform: translateY(-4.6px); }
  .hm .hm-wr .w2 { transform: translateY(-9.2px); }
  .hm .hm-wr .w3 { transform: translateY(-13.8px); }
}
