/* Shared by the React shell and the standalone language courses. */
body { isolation: isolate; }
#qh-anime-atmosphere { position: fixed; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; pointer-events: none; user-select: none; contain: strict; }
#qh-anime-atmosphere[hidden],.qh-reading-progress[hidden] { display: none; }
.qh-reading-progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 82; pointer-events: none; background: transparent; }
.qh-reading-progress > span { display: block; width: 100%; height: 100%; transform: scaleX(0); transform-origin: left center; background: linear-gradient(90deg, #c693c6, #8f9bd4, #91b9d0); }
.qh-anime-dock { position: fixed; z-index: 80; right: max(20px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); display: flex; align-items: center; max-width: calc(100vw - 24px); padding: 5px; border: 1px solid #dfd8ed; border-radius: 20px; background: #fffafef5; color: #564965; box-shadow: 0 5px 25px #553d7114, 0 1px 3px #553d710c; font: 13px/1.5 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif; }
.qh-anime-dock button,.qh-anime-dock summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 13px; border: 0; border-radius: 14px; background: transparent; color: inherit; cursor: pointer; font: inherit; touch-action: manipulation; white-space: nowrap; }
.qh-anime-dock summary { list-style: none; }
.qh-anime-dock summary::-webkit-details-marker { display: none; }
.qh-anime-dock button:not(:disabled):hover,.qh-anime-dock summary:hover,.qh-anime-spaces[open] > summary { background: #f1ebf7; color: #614c81; }
.qh-anime-dock button:disabled { cursor: default; color: #746c80; }
.qh-anime-dock :focus-visible { outline: 2px solid #8871ab; outline-offset: 3px; }
.qh-anime-dock svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.qh-anime-spaces > summary > svg { color: #aa79b4; }
.qh-anime-chevron { color: #9b8ca7; font-size: 16px; }
.qh-anime-spaces[open] .qh-anime-chevron { transform: rotate(180deg); }
.qh-anime-divider { height: 20px; width: 1px; margin: 0 2px; background: #e4ddeb; }
.qh-anime-motion .qh-motion-play { display: none; }
.qh-anime-motion[aria-pressed='false'] .qh-motion-play { display: block; }
.qh-anime-motion[aria-pressed='false'] .qh-motion-pause { display: none; }
.qh-anime-space-panel { position: absolute; right: 0; bottom: calc(100% + 12px); width: 300px; max-width: calc(100vw - 24px); max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); overflow-y: auto; overscroll-behavior: contain; padding: 15px 11px 11px; border: 1px solid #e0d8ec; border-radius: 20px; background: #fffbfe; box-shadow: 0 12px 40px #5845751c; }
.qh-anime-panel-kicker { margin: 0 10px 11px; color: #9a7fa9; font-size: 10px; letter-spacing: .08em; }
.qh-anime-space-panel nav { display: grid; gap: 3px; }
.qh-anime-space-panel a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 8px 11px; border-radius: 11px; color: #574768; text-decoration: none; font-size: 13px; box-sizing: border-box; }
.qh-anime-space-panel a:hover,.qh-anime-space-panel a[aria-current] { background: #f1ebf8; color: #654884; }
.qh-anime-space-panel a[aria-current] { font-weight: 600; }
.qh-anime-space-panel small { color: #9786a6; font-size: 9px; letter-spacing: .055em; }
.qh-anime-panel-note { margin: 12px 10px 1px; padding-top: 10px; border-top: 1px solid #ece5f1; color: #9a8aa6; font-size: 11px; }
/* Reserve a safe landing below the last links without covering page controls. */
html[data-qh-atmosphere='ready'] body { padding-bottom: max(90px, calc(76px + env(safe-area-inset-bottom))); }
/* Disabled entrance animations must leave content in its normal visible state. */
/* Stay still before preference hydration, including on a slow connection. */
html:not([data-qh-motion='playing']) *,html:not([data-qh-motion='playing']) *::before,html:not([data-qh-motion='playing']) *::after { animation: none !important; transition-duration: 0s !important; }
html[data-qh-motion='paused'] *,html[data-qh-motion='paused'] *::before,html[data-qh-motion='paused'] *::after { animation: none !important; }
html[data-qh-visibility='hidden'] *,html[data-qh-visibility='hidden'] *::before,html[data-qh-visibility='hidden'] *::after { animation-play-state: paused !important; }
html[data-qh-motion='paused'],html[data-qh-motion='paused'] * { scroll-behavior: auto !important; }
html[data-qh-motion='paused'] *,html[data-qh-motion='paused'] *::before,html[data-qh-motion='paused'] *::after { transition-duration: 0s !important; }
html[data-qh-motion='paused'] #qh-anime-atmosphere { visibility: hidden; }
@media (max-width: 760px) {
  .qh-anime-dock { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); border-radius: 17px; padding: 3px; font-size: 12px; }
  .qh-anime-dock button,.qh-anime-dock summary { padding: 0 10px; gap: 6px; }
  .qh-anime-dock svg { width: 16px; height: 16px; }
  .qh-anime-space-panel { width: 286px; }
}
@media (prefers-reduced-motion: reduce) {
  #qh-anime-atmosphere { display: none; }
  html,html * { scroll-behavior: auto !important; }
  *,*::before,*::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; }
}
@media print {
  #qh-anime-atmosphere,.qh-anime-dock,.qh-reading-progress { display: none !important; }
  html[data-qh-atmosphere='ready'] body { padding-bottom: 0; }
}
