/* Keep the original ticket actions and readers; repair their flow and viewport. */
@layer v85Alignment {
 html.vercel-layout[data-theme] body #appView.vercel-standalone-ticket #tradeRail>.panel .trade-amount-controls {
  height:auto!important;min-height:0!important;flex:0 0 auto!important;
  display:flex!important;flex-direction:column!important;gap:4px!important;
 }
 html.vercel-layout[data-theme] body #appView.vercel-standalone-ticket #tradeRail>.panel .trade-amount-controls #amountInput {
  margin-bottom:0!important;
 }
 html.vercel-layout[data-theme] body #appView.vercel-standalone-ticket #tradeRail>.panel .trade-amount-controls .trade-estimate {
  margin:0!important;
 }
 html.vercel-layout[data-theme] body #appView.vercel-standalone-ticket #tradeRail>.panel #amts {
  height:auto!important;min-height:40px!important;margin:0!important;align-items:stretch!important;
 }
 html.vercel-layout[data-theme] body #appView.vercel-standalone-ticket #tradeRail>.panel #amts button {
  display:flex!important;align-items:center!important;justify-content:center!important;
  height:auto!important;min-height:40px!important;line-height:20px!important;
  white-space:nowrap!important;font-size:12px!important;padding:8px 4px!important;
 }
 html.vercel-layout[data-theme] body #appView.vercel-standalone-ticket #tradeRail>.panel #amts button:disabled {
  opacity:.4!important;cursor:not-allowed!important;
 }
 html.vercel-layout[data-theme] body #appView.vercel-standalone-ticket #tradeRail>.panel #sellAvailable {
  position:static!important;height:auto!important;min-height:18px!important;
  margin:8px 0 0!important;padding:0!important;line-height:18px!important;white-space:normal!important;
 }
 html.vercel-layout[data-theme] body #appView.vercel-standalone-ticket #tradeRail {
  max-height:var(--ticket-visible-height,calc(100dvh - 116px))!important;
  overflow-y:auto!important;overscroll-behavior-y:contain!important;scroll-padding-bottom:64px!important;
 }
 html.vercel-layout[data-theme] body #appView.vercel-standalone-ticket #tradeRail>.panel {
  min-height:0!important;
 }
 html.vercel-layout[data-theme] body #appView.vercel-standalone-ticket #tradeRail.position-ticket-framed {
  overflow:hidden!important;
 }
 html.vercel-layout[data-theme] body #appView.vercel-standalone-ticket #tradeRail.position-ticket-framed>.panel {
  box-sizing:border-box!important;height:var(--ticket-visible-height)!important;
  max-height:var(--ticket-visible-height)!important;overflow:hidden!important;
  display:flex!important;flex-direction:column!important;
 }
 html.vercel-layout[data-theme] body #appView.vercel-standalone-ticket #tradeRail.position-ticket-framed>.panel>.vercel-ticket-identity {
  flex:0 0 auto!important;
 }
 html.vercel-layout[data-theme] body #appView.vercel-standalone-ticket #tradeRail.position-ticket-framed .vercel-ticket-context {
  margin-bottom:12px!important;
 }
 html.vercel-layout[data-theme] body #appView.vercel-standalone-ticket #tradeRail.position-ticket-framed .vercel-ticket-identity .segbar {
  margin:8px 0!important;
 }
 html.vercel-layout[data-theme] body #appView.vercel-standalone-ticket #tradeRail.position-ticket-framed>.panel>.position-ticket-scroll {
  display:flex;flex-direction:column;flex:1 1 auto;min-height:0;overflow-y:auto;
  overscroll-behavior-y:contain;scrollbar-width:thin;scroll-padding-block:12px;
 }
 html.vercel-layout[data-theme] body #appView.vercel-standalone-ticket #tradeRail.position-ticket-framed>.panel>.position-ticket-action {
  flex:0 0 auto;padding-top:12px;background:var(--v85-surface);
 }
 html.vercel-layout[data-theme] body #appView.vercel-standalone-ticket #tradeRail .position-ticket-action #btnTrade {
  position:static!important;inset:auto!important;width:100%!important;margin:0!important;min-height:44px!important;
 }
 @media(max-width:760px){
  html.vercel-layout[data-theme] body #appView.vercel-standalone-ticket #tradeRail {
   max-height:var(--ticket-visible-height,calc(100dvh - 28px))!important;
  }
 }
}

/* A software keyboard changes the visible window, not the form's type size.
   Scroll the existing form as one surface instead of squeezing its middle
   between a fixed identity block and a fixed action footer. */
@layer v104Restoration {
 @media(max-width:760px){
  html.vercel-layout body #appView.vercel-standalone-ticket #tradeRail.position-ticket-framed {
   top:calc(var(--ticket-viewport-top,0px) + 14px)!important;
   bottom:auto!important;
  }
  html.vercel-layout body #appView.vercel-standalone-ticket #tradeRail.position-ticket-framed[data-ticket-keyboard] {
   height:var(--ticket-visible-height)!important;max-height:var(--ticket-visible-height)!important;
   overflow-y:auto!important;overflow-x:hidden!important;scroll-padding-block:12px!important;
  }
  html.vercel-layout body #appView.vercel-standalone-ticket #tradeRail.position-ticket-framed[data-ticket-keyboard]>.panel {
   height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important;
  }
  html.vercel-layout body #appView.vercel-standalone-ticket #tradeRail.position-ticket-framed[data-ticket-keyboard]>.panel>.position-ticket-scroll {
   flex:0 0 auto!important;height:auto!important;overflow:visible!important;
  }
  html.vercel-layout body #appView.vercel-standalone-ticket #tradeRail.position-ticket-framed[data-ticket-keyboard] .trade-amount-controls,
  html.vercel-layout body #appView.vercel-standalone-ticket #tradeRail.position-ticket-framed[data-ticket-keyboard] #amountInput {
   flex-shrink:0!important;
  }
 }
 html.vercel-layout body #appView #tradeRail .trade-amount-input:focus-within {
  outline:1px solid color-mix(in srgb,var(--v85-text) 50%,var(--v85-panel))!important;
  outline-offset:-1px!important;box-shadow:none!important;
 }
 html.vercel-layout body #appView #tradeRail .trade-amount-input #qty:is(:focus,:focus-visible) {
  outline:none!important;box-shadow:none!important;
 }
}
