/* lyx-shell: transparent topbar, sidebar, container, tooltips (start) */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--lyx-bg);
  color: var(--lyx-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  transition: background .35s ease, color .35s ease;
}
.lyx-main { padding: 20px 16px; }

/* scroll: slim themed scrollbar, vertical only (addendum v1.3) */
html { scrollbar-width: thin; scrollbar-color: var(--lyx-muted) transparent; }
body::-webkit-scrollbar { width: 6px; }
body::-webkit-scrollbar-track { background: transparent; }
body::-webkit-scrollbar-thumb { background: var(--lyx-muted); border-radius: 3px; }

/* back-to-top: shell-wide, appears after scrolling (addendum v1.3) */
.lyx-shell-totop {
  position: fixed;
  z-index: 55;
  right: calc(14px + env(safe-area-inset-right, 0px));
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--lyx-card);
  border: 1px solid var(--lyx-line);
  color: var(--lyx-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.lyx-shell-totop svg { width: 20px; height: 20px; display: block; }
.lyx-shell-totop.lyx-show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.lyx-shell-toptip {
  position: fixed;
  z-index: 80;
  pointer-events: none;
  background: var(--lyx-text);
  color: var(--lyx-bg);
  font-size: 12px;
  line-height: 1;
  padding: 6px 9px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -2px);
  transition: opacity .18s ease, transform .18s ease;
}
.lyx-shell-toptip.lyx-show { opacity: 1; transform: translate(-50%, 0); }

/* topbar */
.lyx-shell-topbar {
  position: sticky;
  top: 0;
  z-index: 70;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  padding-top: calc(6px + env(safe-area-inset-top, 0px));
  background: transparent;
}
.lyx-shell-left { display: flex; align-items: center; min-width: 0; }
.lyx-shell-right { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.lyx-shell-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--lyx-text);
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.lyx-shell-btn:active { background: rgba(127, 127, 127, .18); }
.lyx-shell-btn svg { width: 22px; height: 22px; display: block; }
#lyx-button-logo svg { width: 30px; height: 30px; }
.lyx-shell-brand {
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  white-space: nowrap;
  cursor: pointer;
  transition: max-width .45s ease, opacity .35s ease;
}
.lyx-shell-brand span {
  display: inline-block;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: .2px;
  padding-right: 6px;
  transform: translateX(-10px);
  transition: transform .45s ease;
}
.lyx-shell-brand.lyx-open { max-width: 130px; opacity: 1; }
.lyx-shell-brand.lyx-open span { transform: translateX(0); }

/* sidebar: only the slide animates, menu items have no hover or highlight effects */
.lyx-shell-sidebar {
  position: fixed;
  z-index: 60;
  top: 56px;
  bottom: 0;
  left: 0;
  width: 232px;
  max-width: 80%;
  background: var(--lyx-side);
  border-right: 1px solid var(--lyx-line);
  display: flex;
  flex-direction: column;
  transform: translateX(-105%);
  transition: transform .45s ease;
}
.lyx-shell-sidebar.lyx-open { transform: translateX(0); }
.lyx-shell-nav { flex: 1; padding: 10px 8px 4px; }
.lyx-shell-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 8px;
  background: transparent;
  border: 0;
  color: var(--lyx-text);
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}
.lyx-shell-item svg { width: 20px; height: 20px; flex: none; }
.lyx-shell-item.lyx-active { color: var(--lyx-accent); }
.lyx-shell-ver { padding: 12px 14px; font-size: 12px; color: var(--lyx-muted); }

/* tooltip */
.lyx-shell-tip {
  position: absolute;
  z-index: 80;
  pointer-events: none;
  background: var(--lyx-text);
  color: var(--lyx-bg);
  font-size: 12px;
  line-height: 1;
  padding: 6px 9px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -2px);
  transition: opacity .18s ease, transform .18s ease;
}
.lyx-shell-tip.lyx-show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .lyx-shell-brand, .lyx-shell-brand span, .lyx-shell-sidebar, .lyx-shell-tip, .lyx-shell-totop, .lyx-shell-toptip, body { transition: none; }
}
/* lyx-shell: styles (end) */
