/* Only this compact action is visible before the existing login control. */
:is(.topbar, #happyNavigationBar) #phone-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 3px;
  min-width: 0;
  min-height: 30px;
  margin: 0;
  padding: 5px 6px;
  border: 1px solid currentColor;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
}
.happy-merged-home .topbar #phone-shortcut { color: #e6d5a6; }
:is(.topbar, #happyNavigationBar) #phone-shortcut svg { flex: 0 0 13px; }
:is(.topbar, #happyNavigationBar) #phone-shortcut:disabled { opacity: .6; cursor: wait; }
:is(.topbar, #happyNavigationBar) #phone-shortcut:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

#phone-shortcut-guide:not([open]),
#phone-shortcut-guide [hidden] { display: none !important; }
#phone-shortcut-guide {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  z-index: 10010;
  width: min(430px, calc(100vw - 28px));
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 18px;
  border: 1px solid #d5c8ee;
  border-radius: 18px;
  background: #fffaf3;
  color: #251840;
  overflow: auto;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
  box-shadow: 0 16px 70px #0006;
  font-family: inherit;
}
#phone-shortcut-guide::backdrop { background: #080b22b3; }
#phone-shortcut-guide .phone-shortcut-heading { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
#phone-shortcut-guide h2 { margin: 0; font-size: 17px; line-height: 1.4; }
#phone-shortcut-guide p,
#phone-shortcut-guide li { margin: 0; font-size: 14px; line-height: 1.65; }
#phone-shortcut-guide button,
#phone-shortcut-guide .phone-shortcut-app-link {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  padding: 9px 13px;
  border: 1px solid #c7b3dd;
  border-radius: 10px;
  background: #fff;
  color: #49218c;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
}
#phone-shortcut-guide .phone-shortcut-close { flex: 0 0 auto; }
#phone-shortcut-guide .phone-shortcut-primary,
#phone-shortcut-guide .phone-shortcut-app-link { background: #5827a8; border-color: #5827a8; color: #fff; }
#phone-shortcut-guide button:disabled { opacity: .6; cursor: wait; }
#phone-shortcut-guide .phone-shortcut-status:not(:empty) { margin-top: 12px; padding: 10px; border-radius: 10px; background: #f0e7ff; font-weight: 600; }
#phone-shortcut-guide .phone-shortcut-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#phone-shortcut-guide .phone-shortcut-guide-body { margin-top: 12px; }
#phone-shortcut-guide .phone-shortcut-context:not(:empty),
#phone-shortcut-guide .phone-shortcut-steps { margin-top: 12px; }
#phone-shortcut-guide details { margin-top: 12px; }
#phone-shortcut-guide summary { cursor: pointer; font-size: 13px; line-height: 1.65; }
#phone-shortcut-guide ul { margin: 12px 0; padding-inline-start: 20px; }
#phone-shortcut-guide li + li { margin-top: 10px; }
#phone-shortcut-guide label { display: block; margin: 12px 0 6px; font-size: 13px; }
#phone-shortcut-guide input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0 0 8px;
  padding: 10px;
  border: 1px solid #8a719f;
  border-radius: 8px;
  background: #fff;
  color: #251840;
  font-size: 16px;
}
#phone-shortcut-guide .phone-shortcut-note { margin-top: 12px; font-size: 12px; color: #514264; }
#phone-shortcut-guide .phone-shortcut-copy-status:not(:empty) { margin-top: 8px; }
#phone-shortcut-guide :is(button, a, input, summary):focus-visible { outline: 3px solid #5827a8; outline-offset: 2px; }
@media (max-width: 380px) {
  :is(.topbar, #happyNavigationBar) #phone-shortcut { font-size: 10px; padding-inline: 4px; gap: 2px; }
}

/* Keep the real login and every navigation control reachable on narrow screens. */
#happyNavigationBar #phone-shortcut { max-width: 136px; }
#happyNavigationBar #phone-shortcut span { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) {
  #happyNavigationBar #phone-shortcut { flex: 0 0 30px; width: 30px; padding: 5px; }
  #happyNavigationBar #phone-shortcut span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 380px) {
  #happyNavigationBar:has(#phone-shortcut) .happy-nav-brand::before { display: none; }
}
