/* One small shared control, inside each existing header; no fixed overlay. */
.entry-switcher-trigger {
  order: 100;
  flex: 0 0 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 5px;
  border: 1px solid var(--strong);
  border-radius: 10px;
  background: var(--paper-soft);
  color: var(--wine);
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  touch-action: manipulation;
}
.entry-switcher-trigger[aria-expanded="true"] { background: var(--wine-soft); border-color: var(--wine); }
.entry-switcher-trigger:focus-visible, .entry-switcher-links a:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 3px;
}
.auth-screen { position: relative; }
.entry-switcher-login {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
}
.masthead:has(.entry-switcher-trigger), .assistant-topline:has(.entry-switcher-trigger),
.read-header:has(.entry-switcher-trigger), .media-header:has(.entry-switcher-trigger) { gap: 6px; }
.masthead:has(.entry-switcher-trigger) .brand-block > div { min-width: 0; }
.masthead:has(.entry-switcher-trigger) .brand-mark { flex-shrink: 0; }
.masthead:has(.entry-switcher-trigger) h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-switcher-shell {
  display: flex;
  flex-direction: column;
  max-height: calc(var(--dialog-visible-height, 100dvh) - 16px);
  overflow: hidden;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  background: var(--paper-soft);
}
.entry-switcher-shell .dialog-head { align-items: center; }
.entry-switcher-shell .dialog-head h2 { margin: 0; }
.entry-switcher-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 4px; }
.entry-switcher-links a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 44px;
  min-height: 68px;
  padding: 12px;
  border: 1px solid var(--strong);
  border-radius: 12px;
  background: #152332;
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
  touch-action: manipulation;
}
.entry-switcher-links strong { font-size: 15px; line-height: 1.45; }
.entry-switcher-links span { color: var(--muted); font-size: 12px; }
.entry-switcher-links a[aria-current] { border-color: var(--wine); background: var(--wine-soft); }
.entry-switcher-links a[aria-current] span { color: var(--wine); }
#entry-switcher-note { padding-inline: 4px; margin: 12px 0 0; }
@media (hover: hover) and (pointer: fine) {
  .entry-switcher-trigger:hover, .entry-switcher-links a:hover { border-color: var(--wine); background: var(--wine-soft); }
}
@container app (max-width: 359px) {
  .assistant-topline:has(.entry-switcher-trigger) > .work-title { font-size: 14px; }
}
