/* The tutorial participates in the shared overlay stack with its real readers. */
#sidebar.mley-app-sidebar .mley-app-sidebar-footer { justify-content: space-between; align-items: center; padding-inline: .85rem; }
#sidebar.mley-app-sidebar .mley-sidebar-avatar { justify-content: center; min-width: 44px; padding: 0; }
#sidebar.mley-app-sidebar .mley-sidebar-avatar .mley-header-avatar__circle { width: 26px; height: 26px; font-size: .65rem; }
.mley-tutorial-backdrop { position: fixed; inset: 0; background: rgb(0 0 0 / .4); }
.mley-tutorial-dialog { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; }
.mley-tutorial-dialog[hidden], .mley-tutorial-backdrop[hidden] { display: none !important; }
.mley-tutorial-dialog__shell { display: flex; flex-direction: column; width: min(1200px, 100%); max-height: 100%; min-height: 0; border: 1px solid var(--border-color); border-radius: 16px; background: var(--bg-surface); color: var(--text-color); overflow: hidden; }
.mley-tutorial-dialog__head { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1.25rem; border-bottom: 1px solid var(--border-color); }
.mley-tutorial-dialog__head h2 { margin: 0; font-size: clamp(1.15rem, 3vw, 1.6rem); line-height: 1.3; font-weight: var(--weight-bold); }
.mley-tutorial-dialog__head button { flex: 0 0 44px; width: 44px; height: 44px; font-size: 1.5rem; }
.mley-tutorial-dialog__body { overflow-y: auto; min-height: 0; overscroll-behavior: contain; scrollbar-gutter: stable; }
.mley-tutorial-dialog .mley-article-demo { margin: 0; border: 0 !important; box-shadow: none !important; background: transparent; }
.mley-tutorial-dialog .mley-article-demo__heading { display: none; }
.mley-tutorial-dialog :is(button, a):focus-visible { outline: 2px solid var(--accent-color); outline-offset: 2px; }
@media (max-width: 700px) {
  .mley-tutorial-dialog { padding: 0; }
  .mley-tutorial-dialog__shell { width: 100%; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
  .mley-tutorial-dialog__head { padding: max(.5rem, env(safe-area-inset-top)) .8rem .5rem; }
  .mley-tutorial-dialog__body { padding: .8rem .8rem max(.8rem, env(safe-area-inset-bottom)); }
}

.mley-sidebar-pins.is-compact { position: relative; padding: 0; margin-block: .25rem; border-bottom: 0; }
.mley-pins-toggle { align-self: flex-start; }
.mley-pins-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
.mley-sidebar-pins.is-compact [data-pins-menu] { position: absolute; top: 100%; inset-inline: 0; z-index: 5; padding: .75rem; border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-surface); box-shadow: 0 6px 18px rgb(0 0 0 / .12); }
.mley-sidebar-pins [data-pins-empty] { margin: .75rem 0 0; font-size: var(--text-small); color: var(--text-muted); }
.mley-article-demo[hidden] { display: none !important; }
.mley-article-demo__dismiss { flex-shrink: 0; min-height: 44px; }

#sidebar.mley-app-sidebar .sidebar-brand { justify-content: flex-end; }
.mley-sidebar-theme { width: 44px; height: 44px; flex-shrink: 0; }
.mley-sidebar-theme .mley-icon-svg { width: 18px; height: 18px; }

#sidebar.mley-app-sidebar .sidebar-brand { position: relative; border-bottom: 0; }
#sidebar.mley-app-sidebar .sidebar-brand .mley-sidebar-pins.is-compact { position: static; flex: 1; margin: 0; }
