/* Photo triggers only; the site's photo dimensions and 3D layout stay in its own CSS. */
[data-ms-home-albums-trigger] { cursor: pointer; }
[data-ms-home-albums-trigger]:focus-visible {
  outline: 3px solid #c9a74a;
  outline-offset: 4px;
}
.ms-home-albums-badge-anchor { position: relative; }
.ms-home-albums-badge {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 10px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 999px;
  background: rgba(12, 25, 42, .88);
  color: #fff;
  font: 600 13px/1.2 system-ui, sans-serif;
  pointer-events: none;
}
html.ms-home-albums-scroll-lock,
body.ms-home-albums-scroll-lock {
  overflow: hidden !important;
  overscroll-behavior: none;
}
.ms-home-albums-dialog {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #101923;
  color: #fff;
  font: 400 16px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overscroll-behavior: none;
}
.ms-home-albums-dialog:not([open]) { display: none; }
.ms-home-albums-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.ms-home-albums-dialog::backdrop { background: rgba(0, 0, 0, .88); }
.ms-home-albums-dialog *,
.ms-home-albums-notice * { box-sizing: border-box; }
.ms-home-albums-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(255, 255, 255, .18);
}
.ms-home-albums-dialog .ms-home-albums-title {
  margin: 0;
  padding: 0;
  max-width: min(70vw, 1100px);
  color: #fff;
  font: 600 clamp(16px, 2vw, 22px)/1.25 system-ui, sans-serif;
  overflow-wrap: anywhere;
}
.ms-home-albums-dialog .ms-home-albums-control,
.ms-home-albums-notice .ms-home-albums-notice-close {
  appearance: none;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, .58);
  border-radius: 6px;
  background: #233446;
  color: #fff;
  font: 600 15px/1.2 system-ui, sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}
.ms-home-albums-dialog .ms-home-albums-control:hover,
.ms-home-albums-notice .ms-home-albums-notice-close:hover { background: #354d65; }
.ms-home-albums-dialog .ms-home-albums-control:focus-visible,
.ms-home-albums-notice .ms-home-albums-notice-close:focus-visible {
  outline: 3px solid #ead184;
  outline-offset: 3px;
}
.ms-home-albums-dialog .ms-home-albums-control:disabled {
  opacity: .45;
  cursor: default;
}
.ms-home-albums-stage {
  position: relative;
  display: grid;
  align-items: center;
  justify-items: center;
  min-width: 0;
  min-height: 0;
  padding: 12px max(12px, env(safe-area-inset-right)) 12px max(12px, env(safe-area-inset-left));
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
  overscroll-behavior: contain;
}
.ms-home-albums-image-slot {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.ms-home-albums-dialog .ms-home-albums-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
  background: transparent;
  user-select: none;
  -webkit-user-select: none;
}
.ms-home-albums-dialog .ms-home-albums-image[hidden],
.ms-home-albums-dialog .ms-home-albums-status[hidden],
.ms-home-albums-dialog .ms-home-albums-retry[hidden] { display: none; }
.ms-home-albums-dialog .ms-home-albums-status {
  position: absolute;
  left: max(20px, env(safe-area-inset-left));
  right: max(20px, env(safe-area-inset-right));
  top: 40%;
  margin: 0;
  padding: 12px;
  color: #fff;
  text-align: center;
  font: 400 16px/1.5 system-ui, sans-serif;
  overflow-wrap: anywhere;
}
.ms-home-albums-dialog .ms-home-albums-retry {
  position: absolute;
  top: calc(40% + 84px);
}
.ms-home-albums-footer {
  padding: 8px max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  border-top: 1px solid rgba(255, 255, 255, .18);
}
.ms-home-albums-navigation {
  display: grid;
  grid-template-columns: minmax(44px, 140px) minmax(80px, 1fr) minmax(44px, 140px);
  align-items: center;
  gap: 12px;
  width: min(100%, 680px);
  margin: 0 auto;
}
.ms-home-albums-dialog .ms-home-albums-counter {
  margin: 0;
  padding: 0;
  color: #fff;
  font: 600 15px/1.25 system-ui, sans-serif;
  text-align: center;
}
.ms-home-albums-dialog .ms-home-albums-caption {
  max-width: 1100px;
  max-height: 4.4em;
  overflow: auto;
  overscroll-behavior: contain;
  margin: 8px auto 0;
  padding: 0;
  color: #e3e9ee;
  text-align: center;
  font: 400 14px/1.45 system-ui, sans-serif;
  overflow-wrap: anywhere;
}
.ms-home-albums-notice {
  box-sizing: border-box;
  position: fixed;
  z-index: 2147483000;
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: fit-content;
  max-width: min(720px, calc(100% - 24px));
  margin: 0 auto;
  padding: 14px 16px;
  border: 1px solid #c6d3df;
  border-radius: 8px;
  background: #152537;
  color: #fff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .24);
  font: 400 15px/1.4 system-ui, sans-serif;
}
.ms-home-albums-notice .ms-home-albums-notice-text {
  margin: 0;
  padding: 0;
  color: #fff;
  font: inherit;
}
@media (max-width: 540px) {
  .ms-home-albums-header { min-height: 58px; gap: 10px; }
  .ms-home-albums-stage { padding-top: 8px; padding-bottom: 8px; }
  .ms-home-albums-navigation { grid-template-columns: minmax(44px, 1fr) auto minmax(44px, 1fr); gap: 8px; }
  .ms-home-albums-dialog .ms-home-albums-control { padding: 10px; font-size: 13px; }
  .ms-home-albums-dialog .ms-home-albums-counter { font-size: 13px; }
  .ms-home-albums-dialog .ms-home-albums-caption { max-height: 4.1em; font-size: 13px; line-height: 1.35; }
  .ms-home-albums-badge { right: 7px; bottom: 7px; padding: 6px 9px; font-size: 12px; }
  .ms-home-albums-notice { align-items: flex-start; gap: 10px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .ms-home-albums-header { min-height: 48px; padding-top: 4px; padding-bottom: 4px; }
  .ms-home-albums-footer { padding-top: 4px; padding-bottom: max(4px, env(safe-area-inset-bottom)); }
  .ms-home-albums-dialog .ms-home-albums-caption { max-height: 1.45em; margin-top: 3px; }
  .ms-home-albums-stage { padding-top: 4px; padding-bottom: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .ms-home-albums-dialog,
  .ms-home-albums-dialog *,
  .ms-home-albums-notice,
  .ms-home-albums-notice * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
