/* Sūtra Nexus v2 chrome and reading layout.
   Banner, drawer and phone dock behavior adapted from Webex Lab
   frame.css / phone-nav.js / polish.css at commit
   7631b317cbf2cad236403df960b5d5fac353a6de.
   Webex and Cisco wording is not used. */
:root {
  --bg: #f4f0ff;
  --bg-2: #fff8fb;
  --ink: #1b1340;
  --ink-dim: #3b3560;
  --card: #ffffff;
  --line: #d9d0f5;
  --accent: #6d28d9;
  --accent-2: #0891b2;
  --glow: rgba(109, 40, 217, 0.35);
  --header-h: 64px;
  --banner-h: 64px;
  --dock-h: 0px;
  --fscale: 1;
  --sans: "Segoe UI", "Noto Sans", system-ui, sans-serif;
  --deva: "Noto Sans Devanagari", "Nirmala UI", "Mangal", sans-serif;
  color-scheme: light;
}
@font-face {
  font-family: "Noto Sans Devanagari";
  src: local("Noto Sans Devanagari"), local("Noto Sans Devanagari Regular"),
    url("../fonts/NotoSansDevanagari-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0900-097F, U+A8E0-A8FF, U+1CD0-1CF6;
}
html[data-theme="dark"] {
  --bg: #100c22;
  --bg-2: #1a1433;
  --ink: #f5f3ff;
  --ink-dim: #d6d0f0;
  --card: #241b3d;
  --line: #4c3d78;
  --accent: #c4b5fd;
  --accent-2: #67e8f9;
  --glow: rgba(196, 181, 253, 0.4);
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #ffffff;
  --bg-2: #f7f7f8;
  --ink: #1a1a1a;
  --ink-dim: #333333;
  --card: #ffffff;
  --line: #cccccc;
  --accent: #5b21b6;
  --accent-2: #0f766e;
  --glow: rgba(91, 33, 182, 0.2);
}
html[data-theme="contrast"] {
  --bg: #000000;
  --bg-2: #000000;
  --ink: #ffffff;
  --ink-dim: #ffffff;
  --card: #000000;
  --line: #ffffff;
  --accent: #ffff00;
  --accent-2: #00ffff;
  --glow: transparent;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { font-size: calc(18px * var(--fscale)); scroll-behavior: smooth; background: var(--bg); }
html[data-motion="reduce"] { scroll-behavior: auto; }
body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(244, 114, 182, 0.28), transparent 55%),
    radial-gradient(800px 380px at 100% 0%, rgba(34, 211, 238, 0.25), transparent 50%),
    radial-gradient(700px 360px at 50% 100%, rgba(250, 204, 21, 0.18), transparent 50%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  overflow-x: clip;
  padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom));
}
img, svg { max-width: 100%; }
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
.skip {
  position: absolute;
  left: 8px;
  top: -40px;
  background: #fff;
  color: #111;
  padding: 8px 12px;
  z-index: 80;
}
.skip:focus { top: 8px; }
.site-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--header-h);
  padding: 8px 14px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.menu-btn, .display-btn, .rail-btn, .dock-item, .icon-btn {
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.menu-btn { display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.brand b { display: block; font-size: 1.05rem; line-height: 1.15; }
.brand small { display: block; color: var(--ink-dim); font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-spacer { flex: 1; }
.canon-banner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  height: var(--banner-h);
  max-height: var(--banner-h);
  min-height: var(--banner-h);
  overflow: hidden;
  padding: 0 8px;
  background:
    radial-gradient(420px 80px at 0% 0%, rgba(34, 211, 238, 0.55), transparent 60%),
    radial-gradient(380px 80px at 80% 120%, rgba(244, 114, 182, 0.5), transparent 60%),
    linear-gradient(115deg, #042f2e 0%, #1e1b4b 42%, #4c1d95 78%, #9d174d 100%);
  box-shadow: 0 10px 28px rgba(34, 211, 238, 0.25);
}
.rail-btn {
  flex: none;
  width: 44px;
  color: #082f49;
  background: #f8fafc;
  font-size: 1.4rem;
  line-height: 1;
}
.rail-scroller {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 48px;
  overflow: hidden;
}
.rail-scroller::before, .rail-scroller::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28px;
  z-index: 1;
  pointer-events: none;
}
.rail-scroller::before { left: 0; background: linear-gradient(90deg, #1e1b4b, transparent); }
.rail-scroller::after { right: 0; background: linear-gradient(270deg, #4c1d95, transparent); }
.section-rail {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  height: 48px;
  max-height: 48px;
  scrollbar-width: none;
  align-items: center;
}
.section-rail::-webkit-scrollbar { display: none; }
.section-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  color: #082f49;
  background: #f8fafc;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.86rem;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
}
.section-chip[aria-current="page"] {
  background: linear-gradient(120deg, #22d3ee, #818cf8 55%, #f472b6);
  color: #082f49;
}
.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 6, 23, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  z-index: 50;
}
.backdrop.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(420px, 92vw);
  background: var(--card);
  color: var(--ink);
  z-index: 60;
  transform: translateX(-105%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 8px 0 30px rgba(0, 0, 0, 0.2);
  padding-bottom: env(safe-area-inset-bottom);
}
.drawer.is-open { transform: translateX(0); }
.wheel-hero {
  display: grid;
  place-items: center;
  padding: 16px 16px 8px;
}
.wheel-hero svg { width: 96px; height: 96px; filter: drop-shadow(0 0 12px var(--glow)); }
html[data-motion="reduce"] .wheel-spin { animation: none; }
@media (min-width: 721px) {
  html[data-motion="full"] .wheel-spin, html:not([data-motion="reduce"]) .wheel-spin {
    transform-box: fill-box;
    transform-origin: center;
    animation: spin 18s linear infinite;
  }
}
@keyframes spin { to { transform: rotate(360deg); } }
.drawer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px 8px;
}
.drawer-bar p { margin: 0; font-weight: 800; }
.drawer-search { padding: 0 12px 8px; }
.drawer-search input, .q-input, .game input, .game select {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  padding: 8px 12px;
}
.drawer-list { overflow: auto; padding: 4px 8px 16px; }
.drawer-group { margin: 10px 8px 4px; font-size: 0.78rem; color: var(--ink-dim); font-weight: 700; }
.drawer-list a, .search-hit {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
}
.drawer-list a[aria-current="page"], .drawer-list a:hover { background: color-mix(in srgb, var(--accent) 16%, var(--card)); }
.drawer-list b { display: block; }
.drawer-list span { display: block; color: var(--ink-dim); font-size: 0.82rem; line-height: 1.3; }
.main-wrap { max-width: 980px; margin: 0 auto; padding: 22px 16px 32px; }
.hero-title { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.15; margin: 0 0 8px; }
.lede { font-size: 1.08rem; color: var(--ink-dim); }
.card, .learn, .example, .quiz, .sources, .eco, .path, .diagram-card, .dl-card {
  background: color-mix(in srgb, var(--card) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  margin: 14px 0;
  box-shadow: 0 10px 30px rgba(49, 20, 90, 0.06);
}
h1, h2, h3 { line-height: 1.25; }
.deva, .sutra-line {
  font-family: var(--deva);
  font-size: 1.45rem;
  line-height: 1.8;
  padding-top: 0.2em;
  padding-bottom: 0.15em;
}
.note {
  border-left: 4px solid var(--accent-2);
  padding: 8px 12px;
  background: color-mix(in srgb, var(--accent-2) 10%, var(--card));
  border-radius: 0 12px 12px 0;
}
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; margin: 8px 0; }
.steps li::before {
  counter-increment: step;
  content: counter(step);
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #22d3ee, #a78bfa);
  color: #082f49;
  font-weight: 800;
}
.quiz-q { margin: 12px 0; }
.quiz-q button, .choice, .game button, .filter-bar button, .path button {
  min-height: 44px;
  margin: 4px 6px 4px 0;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.quiz-q button[aria-pressed="true"] { outline: 2px solid var(--accent); }
.why { font-size: 0.95rem; }
.diagram-card svg, .diagram-card img { width: 100%; height: auto; display: block; }
.diagram-card figcaption { margin-top: 8px; color: var(--ink-dim); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.dl-room {
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.dl-room summary {
  min-height: 44px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 800;
}
.dl-room:not([open]) .dl-grid { display: none; }
.dl-room .dl-grid { padding: 0 12px 12px; }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.thumb {
  width: 160px;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
  background: #eef2ff;
  display: block;
  flex: none;
}
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.phone-dock {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  justify-content: space-around;
  gap: 2px;
  flex-wrap: wrap;
}
.dock-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: inherit;
  font-size: 0.62rem;
  line-height: 1.1;
  padding: 4px 1px;
  background: transparent;
  white-space: nowrap;
}
.guide-face { width: 56px; height: 56px; display: block; }
.guide-face svg, .monkey-idle { width: 56px; height: 56px; transform-origin: 50% 80%; }
html:not([data-motion="reduce"]) .monkey-idle { animation: monkey-wave 3.2s ease-in-out infinite; }
@keyframes monkey-wave {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(10deg); }
}
html:not([data-motion="reduce"]) .monkey-idle .blink { animation: monkey-blink 4.6s infinite; transform-origin: center; }
@keyframes monkey-blink {
  0%, 90%, 100% { transform: scaleY(1); }
  94%, 97% { transform: scaleY(0.12); }
}
.dock-item[aria-current="page"] { color: var(--accent); }
.dock-item.menu-glow {
  box-shadow: 0 0 16px var(--glow);
  background: color-mix(in srgb, var(--accent) 12%, var(--card));
}
.nav-hint {
  position: static;
  order: -1;
  flex: 1 0 100%;
  z-index: 1;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: auto;
  max-width: none;
  margin: 0 4px 2px;
  padding: 4px 6px 4px 12px;
  border-radius: 999px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.78rem;
  line-height: 1.2;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}
.nav-hint span { white-space: nowrap; font-weight: 700; }
.nav-hint button {
  min-height: 36px;
  min-width: 44px;
  width: auto;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: #fde047;
  color: #1b1340;
  font: inherit;
  font-weight: 700;
}
.display-panel {
  position: absolute;
  right: 12px;
  top: calc(var(--header-h) - 4px);
  width: min(360px, calc(100vw - 24px));
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  z-index: 35;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}
.display-panel[hidden] { display: none; }
.swatch { width: 44px; height: 44px; border-radius: 10px; border: 2px solid var(--line); }
.contrast-warn { color: #9a3412; font-weight: 700; }
html[data-theme="dark"] .contrast-warn, html[data-theme="contrast"] .contrast-warn { color: #fdba74; }
.guide-root { position: fixed; z-index: 46; right: 16px; bottom: 16px; pointer-events: none; }
.guide-fab, .guide-panel { pointer-events: auto; }
.guide-fab, .guide-root button.guide-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  background: radial-gradient(circle at 30% 30%, #fde68a, #f59e0b 45%, #7c3aed);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.7);
  cursor: pointer;
}
.guide-panel {
  width: min(380px, calc(100vw - 24px));
  max-height: min(68dvh, 560px);
  overflow: auto;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  padding: 12px;
}
.guide-panel header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.guide-cards { display: grid; gap: 8px; }
.guide-cards button, .guide-log button {
  min-height: 44px;
  text-align: left;
  font: inherit;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: inherit;
  padding: 8px 10px;
}
.guide-log p { white-space: pre-wrap; }
.site-footer { max-width: 980px; margin: 12px auto 0; padding: 0 16px 28px; }
.disclaimer-panel {
  display: flex;
  gap: 14px;
  text-align: left;
  margin: 0 0 16px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 2px solid #0f766e;
  background: linear-gradient(135deg, #dcfce7 0%, #d1fae5 40%, #dbeafe 100%);
  color: #0b1f2a;
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.25), 0 8px 28px rgba(15, 118, 110, 0.25);
}
.disclaimer-panel h2, .disclaimer-panel p, .disclaimer-panel a { color: #0b1f2a; }
.disclaimer-panel a { color: #0b3a8f; font-weight: 800; }
.disclaimer-panel p { margin: 0; font-size: 1rem; line-height: 1.55; }
.disclaimer-ico { flex: none; width: 48px; height: 48px; }
.footer-brand { text-align: center; font-weight: 800; margin: 8px 0 4px; }
.site-copy { text-align: center; margin: 0 0 12px; }
.brand-icons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.brand-icon {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  text-decoration: none;
}
.brand-icon svg { width: 36px; height: 36px; fill: currentColor; }
.brand-web { background: radial-gradient(circle at 30% 25%, #7c3aed, #312e81 70%); }
.brand-gh { background: #24292f; }
.brand-lt { background: #43e55e; color: #052e16; }
.monkey-icon { width: 52px; height: 52px; }
.search-hits { display: grid; gap: 6px; margin-top: 8px; }
.search-hit { border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); text-align: left; padding: 6px 8px; vertical-align: top; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
html[data-motion="reduce"] * { animation: none !important; transition: none !important; }
@media (max-width: 720px) {
  body {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
    padding-bottom: 0;
    --dock-h: 0px;
  }
  .site-header, .canon-banner, .phone-dock { flex: none; }
  .page-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; }
  .phone-dock { display: flex; position: static; }
  html[data-nav-hint="1"] .nav-hint { display: flex; }
  .menu-desktop { display: none; }
  .guide-fab { display: none; }
  .guide-root { right: 0; left: 0; bottom: calc(68px + env(safe-area-inset-bottom)); }
  .guide-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(68px + env(safe-area-inset-bottom));
    width: auto;
    max-height: min(46dvh, 420px);
    border-radius: 18px 18px 0 0;
  }
  .brand small { display: none; }
}
@media (min-width: 721px) {
  .phone-dock, .nav-hint { display: none !important; }
  body.drawer-open { padding-left: min(420px, 92vw); }
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="full"]) * { animation: none !important; transition: none !important; }
}
@page { margin: 16mm; }

/* Large menu, non-blocking tour, talking guide, compact downloads. */
.menu-btn {
  min-height: 52px;
  font-size: 1.12rem;
  font-weight: 800;
  padding: 0 16px;
}
.drawer { width: min(30rem, 100%); }
.drawer-bar p { font-size: 1.45rem; font-weight: 800; }
.drawer-list a.menu-link {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  row-gap: 2px;
  min-height: 76px;
  padding: 10px 12px;
}
.drawer-list a.menu-link > span { display: contents; }
.drawer-list .menu-ico {
  width: 44px;
  height: 44px;
  grid-column: 1;
  grid-row: 1 / span 2;
  padding: 8px;
  border-radius: 12px;
  color: #4c1d95;
  background: linear-gradient(160deg, #fff, #ddd6fe);
  box-shadow: 0 4px 0 #7c3aed;
}
.drawer-list a b {
  grid-column: 2;
  grid-row: 1;
  font-size: 1.2rem;
  line-height: 1.2;
  color: var(--ink);
}
.drawer-list a span span {
  grid-column: 2;
  grid-row: 2;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--ink-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.menu-btn .menu-ico, .dock-item .menu-ico {
  width: 26px;
  height: 26px;
  padding: 3px;
  border-radius: 8px;
  color: #4c1d95;
  background: linear-gradient(160deg, #fff, #e9d5ff);
  box-shadow: none;
}
.dock-item { font-size: 0.74rem; font-weight: 800; min-height: 58px; gap: 3px; }
.sources.sources-deeper {
  margin-top: 1.4rem;
  padding: 1rem 1.1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--bg-2) 88%, var(--card));
}
.sources.sources-deeper h2 { margin: 0 0 0.4rem; font-size: 1.35rem; }
.sources.sources-deeper li { margin: 0.55rem 0; line-height: 1.45; }
.sources.sources-deeper a { font-weight: 800; }
.filter-bar input[type="search"] {
  min-height: 44px;
  flex: 1 1 180px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  padding: 8px 12px;
}
.visual-fold, .dl-room { margin: 10px 0; }
.visual-fold {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.visual-fold summary {
  min-height: 44px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 800;
}
.ob-layer { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.ob-spot {
  position: fixed;
  z-index: 70;
  border-radius: 14px;
  pointer-events: none;
  box-shadow: 0 0 0 3px #fde047, 0 0 16px #c4b5fd;
}
.ob-card {
  position: fixed;
  z-index: 72;
  pointer-events: auto;
  box-sizing: border-box;
  width: min(440px, calc(100vw - 16px));
  height: auto;
  overflow: auto;
  padding: 14px 14px 12px;
  border-radius: 22px;
  color: #1b1340;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(120deg, #22d3ee, #a78bfa, #f472b6) border-box;
  border: 3px solid transparent;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}
.ob-num {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #7c3aed;
  color: #fff;
  font-weight: 800;
}
.ob-count { margin: 0; font-weight: 700; }
.ob-card h2 { margin: 6px 0; font-size: 1.25rem; color: #1b1340; }
.ob-card p { margin: 0 0 10px; line-height: 1.45; color: #1b1340; }
.ob-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ob-actions button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  background: #ede9fe;
  color: #3b0764;
}
.ob-actions [data-ob-next] { background: #7c3aed; color: #fff; }
.guide-root {
  position: fixed;
  z-index: 45;
  right: 12px;
  bottom: 16px;
  width: auto;
  left: auto;
  pointer-events: none;
}
.sb-monkey, .sb-panel, .sb-panel * { pointer-events: auto; }
.sb-monkey {
  width: 148px;
  height: 176px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.sb-float, .sb-monkey svg, .sb-avatar svg { width: 100%; height: 100%; display: block; }
.sb-soft {
  position: absolute;
  inset: 18% 12% 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.55), transparent 70%);
  filter: blur(6px);
}
html:not([data-motion="reduce"]) .sb-monkey[data-pose="idle"] .sb-float,
html:not([data-motion="reduce"]) .guide-root[data-pose="idle"] .sb-float {
  animation: sb-bob 3.2s ease-in-out infinite;
}
html:not([data-motion="reduce"]) .sb-monkey[data-pose="wave"] .sb-arm-right,
html:not([data-motion="reduce"]) .guide-root[data-pose="wave"] .sb-arm-right,
html:not([data-motion="reduce"]) .guide-root[data-pose="talk"] .sb-arm-right {
  transform-origin: 146px 172px;
  animation: sb-wave 0.9s ease-in-out infinite;
}
@keyframes sb-bob { 50% { transform: translateY(-6px); } }
@keyframes sb-wave { 50% { transform: rotate(-18deg); } }
.sb-panel {
  position: fixed;
  right: 16px;
  bottom: var(--guide-lift, 16px);
  width: min(380px, calc(100vw - 24px));
  max-height: min(72dvh, calc(100dvh - var(--guide-lift, 16px) - 16px), 560px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 20px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
  overflow: auto;
}
.sb-panel[hidden] { display: none; }
.sb-bar, .sb-along, .sb-voice, .sb-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sb-bar { justify-content: space-between; }
.sb-who { display: flex; gap: 8px; align-items: center; }
.sb-avatar { position: relative; width: 48px; height: 56px; flex: none; }
.sb-soft { pointer-events: none; }
.sb-status, .sb-note { margin: 0; color: var(--ink-dim); font-size: 0.92rem; }
.sb-log { display: grid; gap: 8px; }
.sb-log p, .sb-chips { margin: 0; }
.sb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sb-chips button, .sb-along button, .sb-voice button, .sb-form button, .sb-bar button {
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
}
.sb-form { margin-top: auto; }
.sb-form input, .sb-voice select {
  flex: 1 1 140px;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  padding: 6px 10px;
}
.is-reading {
  outline: 3px solid #f59e0b;
  border-radius: 12px;
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.35);
}
body.tour-open .guide-root { visibility: visible; z-index: 74; }
::highlight(sb-sentence) { background: #fde047; color: #1b1340; }
@media (max-width: 720px) {
  .guide-root {
    left: auto;
    right: 8px;
    width: auto;
    bottom: var(--guide-lift, 120px);
  }
  .sb-monkey { width: 78px; height: 94px; }
  .sb-panel {
    left: 8px;
    right: 8px;
    width: auto;
    bottom: var(--guide-lift, 120px);
    max-height: min(46dvh, 380px, calc(100dvh - var(--guide-lift, 120px) - 12px));
    border-radius: 18px;
  }
  .filter-bar {
    position: sticky;
    top: 0;
    z-index: 4;
    flex-wrap: nowrap;
    overflow-x: auto;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    padding: 8px 0;
  }
  .filter-bar button, .filter-bar input { flex: none; }
  .dl-grid { grid-template-columns: 1fr; }
  .dl-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 4px 10px;
    align-items: center;
    padding: 8px;
    margin: 8px 0;
  }
  .dl-card .thumb { width: 72px; height: 48px; grid-row: 1 / span 3; }
  .dl-card h3, .dl-card p { margin: 0; }
  .dl-card h3 { font-size: 1rem; }
  .diagram-card svg { max-height: 220px; width: auto; max-width: 100%; }
  .hero-title { font-size: 1.7rem; }
  .lede, .learn p, .sources li { font-size: 1.05rem; }
}
@media (min-width: 721px) {
  body.drawer-open { padding-left: min(30rem, 92vw); }
}
@media (prefers-reduced-motion: reduce) {
  .sb-float, .sb-arm-right, .is-reading { animation: none; }
}
.main-wrap > svg { display: block; max-width: 100%; height: auto; }
