.home-page .ghost-companion { position: fixed; inset: 0; z-index: 41; overflow: hidden; pointer-events: none; }
.ghost-companion[hidden], .ghost-dog[hidden] { display: none; }
.ghost-dock {
  position: absolute;
  right: max(16px, env(safe-area-inset-right));
  bottom: var(--dock-bottom);
  display: flex;
  align-items: center;
  gap: 18px;
  height: 56px;
  padding: 6px 14px 6px 18px;
  border-radius: 16px;
  background: var(--glass-sheen), var(--glass-dark);
  box-shadow: 0 8px 36px #060a1226;
  color: var(--ink);
  pointer-events: auto;
}
.ghost-greeting { font-family: var(--sans); font-size: 14px; font-weight: 400; line-height: 1; white-space: nowrap; }
.ghost-switch {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
}
.ghost-switch > span {
  display: block;
  position: relative;
  width: 34px;
  height: 20px;
  border: 1px solid #becfe94a;
  border-radius: 20px;
  background: #becfe91a;
  transition: background .2s;
}
.ghost-switch > span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #b6c4d9;
  transition: transform .2s, background .2s;
}
.ghost-switch[aria-checked="true"] > span { background: #a7bddb; border-color: #cbdcf5; }
.ghost-switch[aria-checked="true"] > span::after { transform: translateX(14px); background: #203047; }
.ghost-switch:focus-visible, .ghost-dog:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ghost-switch:disabled { cursor: default; opacity: .5; }
.ghost-dog {
  position: absolute;
  top: 0;
  left: 0;
  width: 48px;
  height: 54px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: none;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
}
.ghost-canvas { display: block; width: 100%; height: 100%; }
@media (max-width: 760px), (hover: none) {
  .ghost-dock { right: max(12px, env(safe-area-inset-right)); bottom: calc(var(--dock-bottom) + 86px); height: 48px; gap: 9px; padding: 2px 8px 2px 13px; border-radius: 13px; }
}
@supports (backdrop-filter: blur(1px)) {
  .ghost-dock { -webkit-backdrop-filter: blur(18px) saturate(115%); backdrop-filter: blur(18px) saturate(115%); }
}
html[data-motion="off"] .ghost-switch > span,
html[data-motion="off"] .ghost-switch > span::after { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .ghost-switch > span, .ghost-switch > span::after { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .ghost-dock { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (forced-colors: active) {
  .ghost-dock { color: CanvasText; background: Canvas; border: 1px solid CanvasText; }
  .ghost-switch > span { background: Canvas; border-color: ButtonText; }
  .ghost-switch > span::after { background: ButtonText; }
  .ghost-switch[aria-checked="true"] > span { background: Highlight; border-color: Highlight; }
  .ghost-switch[aria-checked="true"] > span::after { background: HighlightText; }
}
@media print { .home-page .ghost-companion { display: none; } }
