/* ===== SPECIAL OS CHROME STYLES ===== */
:root {
  --os-accent: #3b82f6;
  --os-icon-size: 80px;
  --os-icon-emoji: 2rem;
}

/* Taskbar */
.os-taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  z-index: 9000;
  user-select: none;
}

/* Taskbar window buttons container — never use x-show+display:flex together */
.os-taskbar-windows {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 3px;
  overflow: hidden;
  min-width: 0;
}

/* Taskbar button */
.os-taskbar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.75);
  background: transparent;
  border: none;
  cursor: pointer;
  max-width: 160px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: background 150ms, color 150ms;
  animation: taskbar-btn-in 150ms cubic-bezier(0.34,1.56,0.64,1) both;
}
.os-taskbar-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
.os-taskbar-btn.active { background: rgba(255,255,255,0.18); color: #fff; border-bottom: 2px solid var(--os-accent, #3b82f6); }
@keyframes taskbar-btn-in {
  from { opacity: 0; transform: translateY(6px) scale(0.85); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes taskbar-btn-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(4px) scale(0.9); }
}
.taskbar-btn-in  { animation: taskbar-btn-in  150ms cubic-bezier(0.34,1.56,0.64,1) both; }
.taskbar-btn-out { animation: taskbar-btn-out 100ms ease-in both; }

/* Desktop */
.os-desktop {
  position: fixed;
  inset: 0;
  bottom: 48px;
  overflow: hidden;
  background: #0c0c16; /* fallback under the wallpaper layer */
}

/* Wallpaper gradient derived from the user's accent color — changing the
   accent in Settings re-tints the desktop live (no JS, pure CSS var). */
.os-desktop-wallpaper {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--os-accent, #3b82f6) 22%, #0c0a20) 0%,
    color-mix(in srgb, var(--os-accent, #3b82f6) 42%, #1a1838) 50%,
    color-mix(in srgb, var(--os-accent, #3b82f6) 18%, #14122c) 100%);
}

.os-desktop-texture {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 30%, color-mix(in srgb, var(--os-accent, #3b82f6) 10%, transparent) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, color-mix(in srgb, var(--os-accent, #3b82f6) 8%, transparent) 0%, transparent 60%);
}

/* Window */
.os-window {
  position: absolute;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.08),
    0 1px 2px rgba(0,0,0,0.07),
    0 4px 12px rgba(0,0,0,0.10),
    0 20px 48px rgba(0,0,0,0.20),
    0 48px 96px rgba(0,0,0,0.14);
  overflow: hidden;
  min-width: 200px;
  min-height: 150px;
}
.dark .os-window {
  background: #1e2433;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 1px 2px rgba(0,0,0,0.20),
    0 4px 12px rgba(0,0,0,0.25),
    0 20px 48px rgba(0,0,0,0.40),
    0 48px 96px rgba(0,0,0,0.35);
}
.os-window.focused {
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.12),
    0 2px 4px rgba(0,0,0,0.10),
    0 8px 20px rgba(0,0,0,0.14),
    0 28px 60px rgba(0,0,0,0.26),
    0 56px 112px rgba(0,0,0,0.18);
}
.dark .os-window.focused {
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.10),
    0 2px 4px rgba(0,0,0,0.24),
    0 8px 20px rgba(0,0,0,0.32),
    0 28px 60px rgba(0,0,0,0.50),
    0 56px 112px rgba(0,0,0,0.42);
}
.os-window.maximized { border-radius: 0 !important; }

/* Titlebar */
.os-titlebar {
  display: flex;
  align-items: center;
  height: 38px;
  min-height: 38px;
  padding: 0 8px 0 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 100%);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  cursor: grab;
  user-select: none;
  flex-shrink: 0;
}
.dark .os-titlebar { border-bottom-color: rgba(255,255,255,0.06); background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%); }
.os-titlebar:active { cursor: grabbing; }

.os-titlebar-title {
  flex: 1;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #374151;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dark .os-titlebar-title { color: #e5e7eb; }

.os-titlebar-title-edit {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: inherit;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0;
  cursor: default;
  caret-color: transparent;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: none;
}
.os-titlebar-title-edit:focus {
  cursor: text;
  caret-color: auto;
  user-select: text;
}
.os-titlebar-instance-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
  flex-shrink: 0;
}
.os-titlebar:hover .os-titlebar-instance-actions,
.os-titlebar:has(.os-titlebar-title-edit:focus) .os-titlebar-instance-actions {
  opacity: 1;
  pointer-events: auto;
}
.os-titlebar-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 5px;
  border-radius: 5px;
  opacity: .65;
  color: inherit;
  line-height: 1;
  transition: opacity .15s, background .15s;
}
.os-titlebar-action-btn:hover { opacity: 1; background: rgba(120,120,128,.15); }
.os-titlebar-action-btn--delete:hover { background: rgba(255,59,48,.15); }

/* Window control group (upper right) */
.os-win-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  flex-shrink: 0;
}

/* Traffic light buttons */
.os-btn-close, .os-btn-minimize, .os-btn-maximize {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: filter 150ms, transform 100ms cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
}
.os-btn-close { background: #ff5f57; }
.os-btn-minimize { background: #ffbd2e; }
.os-btn-maximize { background: #28c840; }
.os-btn-close:hover { filter: brightness(1.15); }
.os-btn-minimize:hover { filter: brightness(1.15); }
.os-btn-maximize:hover { filter: brightness(1.15); }
.os-btn-close:active,
.os-btn-minimize:active,
.os-btn-maximize:active { transform: scale(0.72); transition-duration: 40ms; }

/* Window content */
.os-window-content {
  flex: 1;
  overflow: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}
/* Module host fills the window; overflow: visible lets shadow content that grows
   beyond window height escape into .os-window-content's scroll container. */
.os-window-content > * {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  width: 100%;
  overflow: visible;
}

/* Resize handle */
/* Resize handles — 8 hit-targets around the window edge */
.os-rh { position: absolute; z-index: 10; }
.os-rh-n  { top: 0;    left: 6px;  right: 6px;  height: 5px; cursor: n-resize; }
.os-rh-s  { bottom: 0; left: 6px;  right: 6px;  height: 5px; cursor: s-resize; }
.os-rh-w  { left: 0;   top: 6px;   bottom: 6px; width: 5px;  cursor: w-resize; }
.os-rh-e  { right: 0;  top: 6px;   bottom: 6px; width: 5px;  cursor: e-resize; }
.os-rh-nw { top: 0;    left: 0;    width: 10px; height: 10px; cursor: nw-resize; }
.os-rh-ne { top: 0;    right: 0;   width: 10px; height: 10px; cursor: ne-resize; }
.os-rh-sw { bottom: 0; left: 0;    width: 10px; height: 10px; cursor: sw-resize; }
.os-rh-se { bottom: 0; right: 0;   width: 10px; height: 10px; cursor: se-resize; }

/* Context menu */
.os-context-menu {
  position: fixed;
  z-index: 9600;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.06);
  padding: 4px;
  min-width: 180px;
  overflow: hidden;
}
.dark .os-context-menu {
  background: rgba(30,36,51,0.98);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08);
}

.os-context-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #111827;
  cursor: pointer;
  transition: background 100ms;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}
.os-context-item:hover { background: rgba(59,130,246,0.1); }
.dark .os-context-item { color: #e5e7eb; }
.dark .os-context-item:hover { background: rgba(255,255,255,0.08); }

.os-context-separator {
  height: 1px;
  background: rgba(0,0,0,0.08);
  margin: 4px 0;
}
.dark .os-context-separator { background: rgba(255,255,255,0.08); }

/* Toast */
.os-toast-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.os-toast {
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  animation: toast-in 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
  max-width: 320px;
}
.os-toast.info { background: #374151; }
.os-toast.success { background: #16a34a; }
.os-toast.error { background: #dc2626; }
.os-toast.warning { background: #d97706; }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(24px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

/* Desktop icon */
.os-desktop-icon {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 150ms,
              transform 200ms cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 200ms ease-out;
  width: var(--os-icon-size);
  text-decoration: none;
  background: transparent;
  border: none;
  outline: none;
}
.os-desktop-icon:hover:not(.icon-dragging) { background: rgba(255,255,255,0.15); transform: translateY(-4px) scale(1.08); box-shadow: 0 12px 32px rgba(0,0,0,0.40); }
.os-desktop-icon:active:not(.icon-dragging) { transform: translateY(-1px) scale(0.96); transition-duration: 60ms; }
.os-desktop-icon.icon-dragging { opacity: 0.4; transform: scale(0.95); }
.os-desktop-icon.icon-drag-over { background: rgba(0,122,255,0.35) !important; transform: scale(1.08); box-shadow: 0 0 0 2px rgba(0,122,255,0.6); }
.os-desktop-icon.icon-reorder-target { transform: scale(1.05); box-shadow: 0 0 0 2px rgba(255,255,255,0.5); }
.os-desktop-icon-emoji { font-size: var(--os-icon-emoji); line-height: 1; }

.os-desktop-icon-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ff3b30;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.os-desktop-icon-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  text-align: center;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Start button — pill with Saturn logo + "Spaces" label */
/* Start/Spaces button — embossed, glassy, 3D pill with the Saturn logo */
.os-start-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 15px 0 11px;
  border-radius: 19px;
  border: 1px solid rgba(255,255,255,0.22);
  border-top-color: rgba(255,255,255,0.4);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0.10) 45%, rgba(255,255,255,0.04) 100%),
    radial-gradient(120% 80% at 30% 0%, rgba(147,197,253,0.22), transparent 70%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.55),
    inset 0 -1px 2px rgba(0,0,0,0.25),
    0 1px 2px rgba(0,0,0,0.35),
    0 4px 14px rgba(0,0,0,0.28);
  cursor: pointer;
  transition: background 150ms, transform 100ms, box-shadow 150ms, filter 150ms;
  flex-shrink: 0;
  margin-right: 4px;
  width: auto;
}
.os-start-btn:hover {
  filter: brightness(1.12);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.65),
    inset 0 -1px 2px rgba(0,0,0,0.25),
    0 2px 4px rgba(0,0,0,0.35),
    0 6px 20px rgba(96,165,250,0.35);
}
.os-start-btn:active {
  transform: scale(0.95) translateY(0.5px);
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.25);
}
.os-start-btn.active {
  border-color: rgba(96,165,250,0.55);
  background:
    linear-gradient(180deg, rgba(147,197,253,0.4) 0%, rgba(96,165,250,0.18) 100%),
    radial-gradient(120% 80% at 30% 0%, rgba(147,197,253,0.3), transparent 70%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.5),
    0 0 0 1px rgba(96,165,250,0.3),
    0 4px 16px rgba(96,165,250,0.4);
}
.os-start-logo { width: 24px; height: 19px; flex-shrink: 0; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.35)); }
.os-start-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* Clock */
.os-clock {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  padding: 0 8px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.35); }
.dark ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); }
.dark ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* Module base */
/* font-size in rem so the Settings font-size slider (which sets html font-size)
   cascades into every module. No font-family here — it inherits across shadow
   boundaries from html, where Settings writes the chosen family. */
.module-root {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: 0.875rem;
}

/* ─── Shared emoji picker trigger button (used in module settings panels) ── */
.icon-pick-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 20px;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  line-height: 1;
}
.icon-pick-btn:hover { border-color: #007aff; background: rgba(0,122,255,0.05); }
.wrapper.dark .icon-pick-btn {
  background: #2c2c2e;
  border-color: rgba(255,255,255,0.15);
  color: #f5f5f7;
}
.wrapper.dark .icon-pick-btn:hover { border-color: #007aff; }

/* Alpine x-cloak */
[x-cloak] { display: none !important; }

/* Animations */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fade-in 200ms ease-out; }
.animate-slide-up { animation: slide-up 200ms ease-out; }

/* workspace create form row — flex layout decoupled from x-show */
.ws-create-row { display: flex; gap: 8px; align-items: center; }


/* ── Window loading skeleton ─────────────────────────────────────────────── */
/* Overlays the content area (below the 38px titlebar) until win.ready. */
.os-skeleton {
  position: absolute;
  top: 38px;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 14px;
  pointer-events: none;
  z-index: 2;
}
.dark .os-skeleton { background: #1f2937; }
.os-skeleton-bar,
.os-skeleton-block {
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(0,0,0,0.06) 25%, rgba(0,0,0,0.11) 50%, rgba(0,0,0,0.06) 75%);
  background-size: 200% 100%;
  animation: os-skeleton-shimmer 1.4s ease-in-out infinite;
}
.dark .os-skeleton-bar,
.dark .os-skeleton-block {
  background: linear-gradient(90deg, rgba(255,255,255,0.07) 25%, rgba(255,255,255,0.13) 50%, rgba(255,255,255,0.07) 75%);
  background-size: 200% 100%;
}
.os-skeleton-bar { height: 14px; }
.os-skeleton-block { height: 96px; }
@keyframes os-skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .os-skeleton-bar, .os-skeleton-block { animation: none; }
}

/* ── Animated background ─────────────────────────────────────────────────── */
@keyframes os-aurora {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.os-desktop-wallpaper.animated {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--os-accent, #3b82f6) 28%, #0c0a20) 0%,
    color-mix(in srgb, var(--os-accent, #3b82f6) 15%, #0d1124) 33%,
    color-mix(in srgb, var(--os-accent, #3b82f6) 45%, #1a1838) 66%,
    color-mix(in srgb, var(--os-accent, #3b82f6) 18%, #100e26) 100%);
  background-size: 300% 300%;
  animation: os-aurora 13s ease infinite;
}
@media (prefers-reduced-motion: reduce) {
  .os-desktop-wallpaper.animated { animation: none; }
}

/* ── Night Sky wallpaper (photo) ───────────────────────────────────────────── */
/* Photo: Unsplash Cq5NaI0yKBE, rotated to landscape (4032×2268 — 16:9, so cover
   ≈ fit-width with no big crop). Scale stays ≥1 during the drift so the photo
   always covers the viewport. */
.os-desktop-wallpaper.wallpaper-starfield {
  background: #08081a;
  overflow: hidden;
}
.os-desktop-wallpaper.wallpaper-starfield::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/shell/assets/wallpaper-night-sky.jpg') center / cover no-repeat;
  will-change: transform;
}
.os-desktop-wallpaper.wallpaper-starfield.animated {
  animation: none; /* cancel the generic .animated aurora sweep */
}
.os-desktop-wallpaper.wallpaper-starfield.animated::before {
  animation: os-sky-drift 900s ease-in-out infinite alternate;
}
@keyframes os-sky-drift {
  from { transform: scale(1.02); }
  to   { transform: scale(1.14) translate(2%, -2%); }
}
@media (prefers-reduced-motion: reduce) {
  .os-desktop-wallpaper.wallpaper-starfield.animated::before { animation: none; }
}

/* ── Per-app onboarding: window-scoped overlay (shell/app-onboarding.js) ──── */
.os-app-onboarding {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.os-app-ob-panel { width: min(440px, 100%); padding: 28px 26px 22px; }
.os-app-ob-panel .os-onboarding-slide { min-height: 160px; }
/* "↻ Replay intro" button for app settings panels */
.ob-replay-btn {
  background: none;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 7px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
}
.wrapper.dark .ob-replay-btn { border-color: rgba(255,255,255,.18); }
.ob-replay-btn:hover { border-color: var(--os-accent, #3b82f6); }
/* Minimal settings overlay for apps without their own panel (Replay-only) */
.app-settings-min {
  position: absolute;
  inset: 0;
  z-index: 45;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.app-settings-card {
  background: #fff;
  color: #111827;
  border-radius: 14px;
  padding: 18px;
  width: min(340px, 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}
.dark .app-settings-card { background: #1e2433; color: #e5e7eb; }
.app-settings-card .as-title { font-weight: 700; font-size: 1rem; }
.app-settings-card .as-row { display: flex; justify-content: flex-end; }

/* ── Onboarding modal ────────────────────────────────────────────────────── */
.os-onboarding-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.os-onboarding-panel {
  background: #ffffff;
  border-radius: 20px;
  padding: 36px 32px 28px;
  width: min(520px, 94vw);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.06),
    0 8px 32px rgba(0,0,0,0.18),
    0 32px 80px rgba(0,0,0,0.30);
}
.dark .os-onboarding-panel {
  background: #1e2433;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 8px 32px rgba(0,0,0,0.40),
    0 32px 80px rgba(0,0,0,0.55);
}
.os-onboarding-slide {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding-bottom: 8px;
}
.os-ob-icon { font-size: 3rem; line-height: 1; margin-bottom: 2px; }
.os-ob-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
  letter-spacing: -0.02em;
}
.dark .os-ob-title { color: #f3f4f6; }
.os-ob-body {
  font-size: 0.9rem;
  line-height: 1.65;
  color: #6b7280;
  max-width: 380px;
  margin: 0;
}
.dark .os-ob-body { color: #9ca3af; }
.os-ob-tip {
  display: block;
  padding: 5px 0;
  font-size: 0.875rem;
  color: #374151;
}
.dark .os-ob-tip { color: #d1d5db; }
.os-ob-tip kbd {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 0.8em;
  font-family: inherit;
  color: #374151;
}
.dark .os-ob-tip kbd {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
  color: #e5e7eb;
}
/* Settings page (slide 3): tab icons act like tabs; content renders below */
.os-ob-feat--active {
  background: rgba(59,130,246,0.12);
  box-shadow: inset 0 0 0 1.5px var(--os-accent, #3b82f6);
}
.dark .os-ob-feat--active { background: rgba(147,197,253,0.16); }
.os-ob-settings-body {
  margin-top: 16px;
  max-height: 320px;
  overflow-y: auto;
  text-align: left;
  border-top: 1px solid #f3f4f6;
  padding-top: 12px;
}
.dark .os-ob-settings-body { border-top-color: rgba(255,255,255,0.07); }

.os-onboarding-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f3f4f6;
}
.dark .os-onboarding-footer { border-top-color: rgba(255,255,255,0.07); }
.os-ob-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #6b7280;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.dark .os-ob-check { color: #9ca3af; }
.os-ob-dots {
  display: flex;
  gap: 6px;
  flex: 1;
  justify-content: center;
}
.os-ob-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e5e7eb;
  transition: background 0.2s, transform 0.2s;
  cursor: pointer;
  flex-shrink: 0;
}
.dark .os-ob-dot { background: rgba(255,255,255,0.15); }
.os-ob-dot.active { background: var(--os-accent); transform: scale(1.3); }
.os-ob-next-btn {
  background: var(--os-accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 22px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 150ms, transform 100ms;
  white-space: nowrap;
  flex-shrink: 0;
}
.os-ob-next-btn:hover { filter: brightness(1.12); }
.os-ob-next-btn:active { transform: scale(0.97); }

/* Onboarding feature / ecosystem icon rows */
.os-ob-feat-row {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: nowrap;
  margin-top: 6px;
}
.os-ob-feat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  width: 54px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.os-ob-feat:hover {
  background: rgba(59,130,246,0.08);
  transform: translateY(-2px);
}
.dark .os-ob-feat:hover { background: rgba(255,255,255,0.07); }
.os-ob-feat--self { cursor: default; }
.os-ob-feat-icon {
  font-size: 1.75rem;
  line-height: 1;
}
.os-ob-feat-name {
  font-size: 0.65rem;
  font-weight: 600;
  color: #374151;
  text-align: center;
  line-height: 1.2;
}
.dark .os-ob-feat-name { color: #d1d5db; }
.os-ob-feat-badge {
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(59,130,246,0.12);
  color: var(--os-accent);
}
.os-ob-hover-info {
  min-height: 3em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #6b7280;
  max-width: 400px;
  margin-top: 4px;
}
.dark .os-ob-hover-info { color: #9ca3af; }
.os-ob-hover-info strong { color: #374151; }
.dark .os-ob-hover-info strong { color: #e5e7eb; }
.os-ob-hover-hint { opacity: 0.55; font-style: italic; }

/* Start menu ODVI ecosystem tiles — external-link hint */
.os-odvi-tile .os-app-tile-label::after { content: ' ↗'; opacity: 0.5; }

/* Onboarding title beta badge */
.os-ob-title-badge {
  display: inline-block;
  font-size: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #818cf8;
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.28);
  border-radius: 999px;
  padding: 2px 7px;
  vertical-align: middle;
  margin-left: 6px;
  position: relative;
  top: -2px;
}
.dark .os-ob-title-badge {
  color: #a5b4fc;
  background: rgba(99,102,241,0.2);
  border-color: rgba(99,102,241,0.4);
}

/* Space trivia line */
.os-ob-trivia {
  font-size: 0.78rem;
  color: rgba(107,114,128,0.85);
  text-align: center;
  min-height: 1.4em;
  margin: 2px 0 -4px;
  padding: 0 8px;
  line-height: 1.5;
}
.os-ob-trivia > span:last-child { font-style: italic; }
.dark .os-ob-trivia { color: rgba(156,163,175,0.7); }
.os-ob-trivia-tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #818cf8;
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 999px;
  padding: 1px 8px;
  margin-right: 6px;
  vertical-align: middle;
}
.dark .os-ob-trivia-tag {
  color: #a5b4fc;
  background: rgba(99,102,241,0.18);
  border-color: rgba(99,102,241,0.35);
}
