#shell-side, #shell-tabs {
  --sh-bg: #202c33; --sh-border: #2a3942; --sh-text: #e9edef; --sh-muted: #8696a0; --sh-accent: #00d9a3; --sh-hover: #2a3942;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
#shell-side.sh-light, #shell-tabs.sh-light {
  --sh-bg: #ffffff; --sh-border: #d1d7db; --sh-text: #111b21; --sh-muted: #667781; --sh-accent: #008a6b; --sh-hover: #eceff1;
}
body.has-shell { box-sizing: border-box; }

#shell-side {
  display: none; position: fixed; left: 0; top: 0; bottom: 0; width: 240px; z-index: 50;
  flex-direction: column; gap: 4px; padding: 16px 12px;
  background: var(--sh-bg); border-right: 1px solid var(--sh-border);
}
.sh-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; font-size: 18px; font-weight: 700; color: var(--sh-text); }
.sh-brand svg { color: var(--sh-accent); }
.sh-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: var(--sh-text); text-decoration: none; font-size: 15px; }
.sh-item svg { color: var(--sh-muted); flex-shrink: 0; }
.sh-item:hover { background: var(--sh-hover); }
.sh-item.on { background: var(--sh-hover); font-weight: 600; }
.sh-item.on svg { color: var(--sh-accent); }

#shell-tabs {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--sh-bg); border-top: 1px solid var(--sh-border); padding-bottom: env(safe-area-inset-bottom);
}
.sh-tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 7px; color: var(--sh-muted); text-decoration: none; font-size: 11px; }
.sh-tab.on { color: var(--sh-accent); }

@media (min-width: 900px) {
  body.has-shell { padding-left: 240px !important; }
  #shell-side { display: flex; }
}
@media (max-width: 899px) {
  body.has-shell { padding-bottom: calc(64px + env(safe-area-inset-bottom)) !important; }
  #shell-tabs { display: flex; }
  body.sh-typing #shell-tabs { display: none !important; }
}
