/* Context stays next to the material it explains. Essential copy never requires hover. */
:root {
  --bw-note-bg: #fbefe4;
  --bw-note-border: #dbb99b;
  --bw-note-ink: #38291f;
  --bw-note-muted: #71523d;
  --bw-note-accent: #925124;
}
html[data-theme="dark"] {
  --bw-note-bg: #30271f;
  --bw-note-border: #775943;
  --bw-note-ink: #f2e6da;
  --bw-note-muted: #d9bfa8;
  --bw-note-accent: #e5ac7a;
}
.bw-author-note, .context-guide, #panel-guide {
  box-sizing: border-box;
  background: var(--bw-note-bg) !important;
  color: var(--bw-note-ink) !important;
  border: 1px solid var(--bw-note-border) !important;
  border-radius: 16px;
}
.bw-author-note {
  width: 100%; max-width: 72ch;
  margin: 26px 0 32px; padding: 22px 24px;
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  font-size: var(--reading-size,18px);
  text-align: start; font-style: normal; font-weight: 400;
  letter-spacing: normal; text-transform: none;
  clear: both; scroll-margin-block-start: 150px;
}
.bw-author-note *, .bw-author-note *::before, .bw-author-note *::after { box-sizing: border-box; }
.bw-author-note .bw-note-brandline {
  display: flex; align-items: center; gap: 9px;
  color: var(--bw-note-muted) !important;
  font: 600 14px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif !important;
  letter-spacing: 0 !important; text-transform: none !important;
  margin: 0 0 10px !important;
}
.bw-note-logo {
  display: inline-block; flex: 0 0 26px; width: 26px; height: 24px;
  background: currentColor;
  -webkit-mask: url('/assets/ui-20261018-v3/brand.svg') center/contain no-repeat;
  mask: url('/assets/ui-20261018-v3/brand.svg') center/contain no-repeat;
}
.bw-author-note .bw-note-title {
  margin: 0 0 9px !important; padding: 0 !important; border: 0 !important;
  color: var(--bw-note-ink) !important;
  font-size: max(18px,1.05em) !important; line-height: 1.4 !important;
  font-family: inherit !important; font-weight: 650 !important; letter-spacing: -.015em !important;
  text-transform: none !important; text-wrap: pretty;
}
.bw-author-note .bw-note-copy, .bw-author-note .bw-note-detail {
  margin: 0 !important; padding: 0 !important;
  color: var(--bw-note-ink) !important;
  font-size: max(16px,.94em) !important; line-height: 1.65 !important;
  letter-spacing: 0 !important; text-transform: none !important;
  word-break: normal; overflow-wrap: break-word; hyphens: none; text-wrap: pretty;
}
.bw-author-note .bw-note-more {
  margin: 14px 0 0 !important; padding: 0 !important; border: 0 !important;
  background: transparent !important; box-shadow: none !important;
}
.bw-author-note .bw-note-more > summary {
  display: flex !important; align-items: center; justify-content: flex-start;
  gap: 10px; min-height: 44px; width: fit-content; max-width: 100%;
  margin: 0 !important; padding: 8px 0 !important;
  border: 0 !important; border-radius: 6px; background: none !important;
  color: var(--bw-note-accent) !important; cursor: pointer;
  list-style: none; font-size: 15px !important; font-weight: 650 !important;
  line-height: 1.45 !important; letter-spacing: 0 !important; text-transform: none !important;
}
.bw-note-more > summary::-webkit-details-marker, .bw-work-guide > summary::-webkit-details-marker { display: none; }
.bw-author-note .bw-note-more > summary::before, .bw-author-note .bw-note-more > summary::after { content: none !important; }
.bw-note-chevron { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.bw-note-more[open] > summary .bw-note-chevron { transform: rotate(180deg); }
.bw-author-note .bw-note-details {
  border-top: 1px solid var(--bw-note-border); margin-top: 6px; padding-top: 16px;
  display: grid; gap: 14px;
}
.bw-author-note .bw-note-detail strong {
  display: block; color: var(--bw-note-ink) !important;
  font: inherit !important; font-weight: 650 !important; margin-bottom: 3px;
}
.bw-author-note a { color: var(--bw-note-accent) !important; text-underline-offset: .2em; }
/* The interactive explanations should be comfortable to operate by touch. */
.plain-letter-controls button, .plain-speech-controls button { min-height: 44px; }
.bw-note-more > summary:focus-visible, .bw-work-guide > summary:focus-visible {
  outline: 3px solid var(--bw-note-accent); outline-offset: 4px;
}
.context-guide .guide-heading, .context-guide .guide-heading .brand-mark,
.context-guide .guide-next, #panel-guide > summary { color: var(--bw-note-accent) !important; }
.context-guide p, .context-guide h3 { color: var(--bw-note-ink) !important; }
.bw-note-language[lang="en"] { display: none; }
html[lang^="en"] .bw-note-language[lang="ru"] { display: none; }
html[lang^="en"] .bw-note-language[lang="en"] { display: block; }
/* Progressive fallback outside the app, then moved below its rendered heading. */
.bw-note-music { width: min(100% - 48px,760px); margin: 28px auto 0; }
.music-width > .bw-note-music { width: min(100%,760px); margin: 0 0 32px; }
.bw-note-panel { margin-block: 18px; padding: 16px 18px; }
/* The artwork remains a full-screen work; explanation is a deliberate disclosure. */
.bw-work-guide {
  position: fixed; z-index: 85;
  top: calc(var(--bw-ma-header-height,110px) + var(--bw-ma-toolbar-height,56px) + 10px);
  left: max(18px,env(safe-area-inset-left)); max-width: min(480px,calc(100vw - 36px));
  border: 1px solid var(--bw-note-border); border-radius: 12px;
  background: var(--bw-note-bg); color: var(--bw-note-ink);
}
.bw-work-guide > summary {
  display: flex; align-items: center; gap: 10px; min-height: 44px;
  padding: 9px 14px; list-style: none; cursor: pointer;
  font: 600 14px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
}
.bw-work-guide .bw-author-note {
  border: 0 !important; margin: 0; padding: 16px 20px;
  max-height: max(200px,calc(100dvh - 350px)); overflow: auto; overscroll-behavior: contain;
}
/* Familiar action cues always retain their readable labels. */
.primary-nav a[data-nav], [data-bw-action-icon] { align-items: center; gap: .45em; }
.primary-nav a[data-nav] { display: inline-flex; }
[data-bw-action-icon]::before { margin-inline-end: .35em; }
.primary-nav a[data-nav]::before, [data-bw-action-icon]::before {
  content: ""; display: inline-block; width: 19px; height: 19px; flex: 0 0 19px;
  vertical-align: -.2em; background: currentColor;
  -webkit-mask: var(--bw-action-icon) center/contain no-repeat;
  mask: var(--bw-action-icon) center/contain no-repeat;
}
.primary-nav [data-nav="home"], [data-bw-action-icon="book"] { --bw-action-icon: url('/assets/ui-20261018-v5/book.svg'); }
.primary-nav [data-nav="analysis"], [data-bw-action-icon="analyze"] { --bw-action-icon: url('/assets/ui-20261018-v5/analyze.svg'); }
[data-bw-action-icon="copy"] { --bw-action-icon: url('/assets/ui-20261018-v5/copy.svg'); }
[data-bw-action-icon="external"] { --bw-action-icon: url('/assets/ui-20261018-v5/external.svg'); }
[data-bw-action-icon="play"] { --bw-action-icon: url('/assets/ui-20261018-v5/play.svg'); }
[data-bw-action-icon="pause"] { --bw-action-icon: url('/assets/ui-20261018-v5/pause.svg'); }
[data-bw-action-icon="headphones"] { --bw-action-icon: url('/assets/ui-20261018-v5/headphones.svg'); }
[data-bw-action-icon="wallet"] { --bw-action-icon: url('/assets/ui-20261018-v5/wallet.svg'); }
.menu-tile[href*="/extensions/"] > .menu-icon {
  color: transparent; background: url('/assets/ui-20261018-v5/chrome.svg') center/contain no-repeat;
}
.bw-browser-icon {
  display: inline-block; width: 22px; height: 22px; flex: 0 0 22px;
  margin-inline-end: 8px; vertical-align: -.27em; object-fit: contain;
}
@media(max-width:600px) {
  .bw-author-note { padding: 18px; border-radius: 14px; margin-block: 22px 26px; }
  .bw-note-music { width: calc(100% - 32px); margin-block: 20px 0; }
  .music-width > .bw-note-music { width: 100%; margin-block: 0 26px; }
  .primary-nav { gap: 20px !important; }
  .primary-nav a[data-nav]::before { width: 18px; height: 18px; flex-basis: 18px; }
}
@media(prefers-reduced-motion:no-preference) {
  .bw-note-chevron { transition: transform .16s ease; }
}
@media(forced-colors:active) {
  .bw-author-note,.context-guide,.bw-work-guide { background: Canvas !important; color: CanvasText !important; border-color: CanvasText !important; }
  .bw-author-note * { color: CanvasText !important; }
  .bw-note-logo,.primary-nav a[data-nav]::before,[data-bw-action-icon]::before { background: CanvasText; }
}
@media print {
  .bw-author-note,.bw-work-guide { display:none !important; }
}
