/* Reuse the original three-face portal; the account source card fills one whole face. */
.rail-right .rail-portal-slot#cup-history[data-portal-study-ready="true"]{flex-basis:504px}
/* The initial shell reserves the same account region before deferred scripts.
   Never expose the retired history-link fallback or change the cup-list height. */
@media(min-width:721px){.rail-right .rail-portal-slot#cup-history[data-initial-page="account"]{position:relative;display:block;flex:0 0 504px;min-height:184px;padding:18px 16px 14px;overflow:clip;isolation:isolate;pointer-events:auto;background:none;border:0}}
.portal-navigation,.portal-dots{display:none}
.portal-face[data-portal-page="account"]{grid-template-rows:minmax(0,1fr);background:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;border-radius:20px}
.portal-face[data-portal-page="account"] .portal-face-header,
.portal-face[data-portal-page="account"] .portal-face-footer{display:none}
.portal-face[data-portal-page="account"] .portal-body{padding:0;overflow:hidden}
.portal-face[data-portal-page="account"]::after{display:none}
.account-card-host{border:0;width:100%;height:100%;display:block;background:transparent}
/* A hidden carousel face may be painted during its 3D turn. The embedded
   account controls must leave layout entirely, including their shadow tree. */
.portal-face[data-portal-page="account"][aria-hidden="true"] .account-card-host{display:none}
/* Reuse source flat-face handling after the original 3D transition settles. */
.portal-module:not(.is-turning) .portal-track{transform:none!important}
.portal-module:not(.is-turning) .portal-face{transform:none!important;visibility:hidden}
.portal-module:not(.is-turning) .portal-face.is-current{visibility:visible}

.portal-stage{user-select:none;-webkit-user-select:none}

/* Reuse the portal's existing action button; data rows keep their source layout. */
.portal-match-entry{display:flex;align-items:center;gap:4px}
.portal-match-entry .portal-match-row{flex:1;min-width:0}
.portal-favorite{flex-shrink:0}

/* Keep the approved portal and cup list in separate scroll/paint regions. */
@media(min-width:721px){
  .atlas-layout > .rail.rail-right{height:100dvh;min-height:0;overflow-x:hidden;overflow-y:auto;isolation:isolate}
  .rail-right::before{inset-block-start:504px}
  .rail-right .rail-portal-slot#cup-history[data-portal-study-ready="true"]{overflow:clip;isolation:isolate}
  .rail-right > .rail-header{flex:0 0 auto}
  .rail-right > .rail-viewport{flex:1 0 160px;min-height:160px;isolation:isolate}
  .portal-face[data-portal-page="history"] .portal-body{max-height:none}
}
