/* 公开网页的键盘、表单与电脑推荐弹窗修正；在原有主题之后加载。 */
.skip-link {
  position:fixed;
  top:12px;
  left:12px;
  z-index:10000;
  padding:12px 18px;
  color:#fff;
  background:#10266b;
  border-radius:8px;
  transform:translateY(-160%);
}
.skip-link:focus { transform:none; outline:3px solid #b73c30; outline-offset:3px; }
#main-content { scroll-margin-top:100px; }
body.apple-store-ui .search-box:focus-within { outline:3px solid #185f98; outline-offset:3px; }
body.apple-store-ui .order-panel .field-error { color:#a52d24; font-size:13px; line-height:1.5; }
.field-error[hidden] { display:none !important; }
body.apple-store-ui .order-panel [aria-invalid="true"] { border-color:#a52d24 !important; outline:2px solid #a52d24; outline-offset:2px; }
body.apple-store-ui .order-panel :is(input,select,textarea):focus-visible { outline:3px solid #185f98; outline-offset:3px; }
body.apple-store-ui .privacy-consent .field-error { grid-column:1 / -1; }

/* 电脑窗口高度不足时只滚动卡片内容，页头、关闭键和翻页键始终留在屏内。 */
@media (min-width:761px) {
  html[data-store-theme="light"] body.apple-store-ui dialog.promotion-dialog {
    height:min(760px,calc(100dvh - 32px)) !important;
    max-height:calc(100dvh - 32px) !important;
    overflow:hidden;
  }
  body.apple-store-ui .promotion-dialog-shell {
    height:100%;
    min-height:0;
    display:grid;
    grid-template-rows:auto minmax(0,1fr) auto;
  }
  body.apple-store-ui .promotion-dialog-shell>header { padding-right:52px; }
  body.apple-store-ui .promotion-carousel { min-height:0; overflow-y:auto !important; align-items:flex-start; }
  body.apple-store-ui .promotion-card { min-height:0; grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr); }
  body.apple-store-ui .promotion-card-copy { min-width:0; overflow-wrap:anywhere; }
  body.apple-store-ui .promotion-image,
  body.apple-store-ui .promotion-image img { min-height:0; height:100%; }
  body.apple-store-ui .promotion-arrow.is-prev { left:8px; }
  body.apple-store-ui .promotion-arrow.is-next { right:8px; }
  body.apple-store-ui .promotion-dialog-close {
    top:10px; right:10px; bottom:auto; left:auto;
    width:44px; height:44px;
    transform:none;
    z-index:2;
  }
}
