/* One return control across public, account and wallet shells. */
body.fn-premium .fn-return {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 12px 9px 8px;
  margin: 0 0 12px;
  border: 1px solid var(--fn-border, #30323d);
  border-radius: 12px;
  background: var(--fn-surface, #151821);
  color: var(--fn-text-primary, #f2f3f7);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  text-align: start;
  vertical-align: middle;
  cursor: pointer;
  touch-action: manipulation;
}
body.fn-premium .fn-return:hover { background: var(--fn-surface-hover, #222632); border-color: #626877; }
body.fn-premium .fn-return:focus-visible { outline: 2px solid var(--fn-accent, #ffb000); outline-offset: 3px; }
.fn-return-icon { display: block; flex: 0 0 20px; width: 20px; height: 20px; }
.fn-return-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.fn-premium .fn-return--compact { margin: 0; }
body.fn-premium :is(.fn-return--icon, .fn-return--overlay, .fn-return--close) {
  width: 44px; min-width: 44px; height: 44px; padding: 0; margin: 0; justify-content: center;
}
.fn-return--icon .fn-return-label, .fn-return--overlay .fn-return-label, .fn-return--close .fn-return-label {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
body.fn-premium .fn-return--overlay { background: #11141eee; color: #fff; border-color: #ffffff42; box-shadow: 0 2px 12px #0004; }
body.fn-premium .fn-return:disabled { opacity: .4; cursor: default; }
.fn-return-row { margin: 0 0 12px; }
.fn-return-row .fn-return { margin: 0; }
[dir="rtl"] .fn-return:not(.fn-return--close) .fn-return-icon { transform: scaleX(-1); }
@media (prefers-reduced-motion: no-preference) {
  .fn-return { transition: background-color .15s, border-color .15s; }
}

/* Account header only: the back control sits on the flat page, not in a tile. */
body.fn-premium .fn-acct .fn-ig-topbar .fn-return {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #f5f7fc;
}

body.fn-premium .fn-acct .fn-ig-topbar .fn-return:hover,
body.fn-premium .fn-acct .fn-ig-topbar .fn-return:focus-visible {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #fff;
  outline: 1px solid rgba(255, 255, 255, 0.28);
  outline-offset: -1px;
}
