/* MIRAM earnings detail pages: large, readable screenshots with minimal controls. */
body.modelpayments-detail-page {
  background: #f5f2ec;
}

.modelpayments-detail-page .mp-detail-main {
  min-height: 70vh;
}

.modelpayments-detail-page .mp-detail-container {
  padding-top: clamp(48px, 6vw, 92px);
  padding-bottom: clamp(90px, 9vw, 145px);
}

.mp-detail-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.mp-detail-heading h1 {
  margin: 0;
  color: #202328;
  font-size: clamp(2.9rem, 5.7vw, 5.8rem);
  font-weight: 570;
  line-height: 1;
  letter-spacing: -0.065em;
}

.mp-detail-subtitle {
  margin: 15px 0 0;
  color: #646362;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
}

.mp-detail-all {
  flex: 0 0 auto;
  padding-bottom: 5px;
  color: #484644;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.mp-model-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid rgba(32, 35, 40, 0.18);
  margin-bottom: clamp(30px, 4vw, 62px);
}

.mp-model-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 12px;
  color: #484644;
  background: #faf8f4;
  font-size: clamp(0.86rem, 1.3vw, 1.02rem);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease;
}

.mp-model-nav a + a {
  border-left: 1px solid rgba(32, 35, 40, 0.18);
}

.mp-model-nav a:hover {
  background: #eae5db;
}

.mp-model-nav a[aria-current="page"] {
  background: #202328;
  color: #f5f2ec;
  cursor: default;
}

.mp-detail-photos {
  display: grid;
  gap: clamp(34px, 5vw, 66px);
  justify-items: center;
}

.mp-detail-figure {
  width: 100%;
  max-width: 1600px;
  margin: 0;
  text-align: center;
}

.mp-detail-photo-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(32, 35, 40, 0.12);
  background: #ffffff;
  cursor: zoom-in;
}

.mp-detail-photo-button img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  margin: 0 auto;
  object-fit: contain;
}

.mp-detail-figure figcaption {
  margin-top: 13px;
  color: #696862;
  font-size: 0.87rem;
  font-weight: 600;
}

.mp-detail-copy {
  display: grid;
  gap: clamp(44px, 6vw, 78px);
  max-width: 1000px;
  margin: clamp(72px, 8vw, 120px) auto clamp(60px, 8vw, 110px);
}

.mp-detail-section {
  border-top: 1px solid rgba(32, 35, 40, 0.24);
  padding-top: 28px;
}

.mp-detail-section h2 {
  margin: 0 0 24px;
  color: #202328;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  font-weight: 580;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.mp-detail-section p {
  max-width: 890px;
  margin: 0;
  color: #414347;
  font-size: clamp(1.04rem, 1.45vw, 1.22rem);
  line-height: 1.78;
}

/* First model: the payment figures should be understandable without reading a wall of text. */
.mp-earnings-start {
  margin: 0 0 27px !important;
  font-weight: 500;
}

.mp-earnings-periods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(32, 35, 40, 0.24);
  border-bottom: 1px solid rgba(32, 35, 40, 0.24);
}

.mp-earnings-period {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 25px clamp(14px, 2.2vw, 28px) 30px;
}

.mp-earnings-period:first-child {
  padding-left: 0;
}

.mp-earnings-period + .mp-earnings-period {
  border-left: 1px solid rgba(32, 35, 40, 0.16);
}

.mp-earnings-period-heading {
  min-height: 7em;
}

.mp-earnings-period h3 {
  margin: 0 0 7px;
  color: #202328;
  font-size: clamp(1rem, 1.45vw, 1.19rem);
  font-weight: 620;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.mp-earnings-period .mp-earnings-period-dates {
  margin: 0;
  color: #68645d;
  font-size: clamp(0.86rem, 1.15vw, 1rem);
  font-weight: 480;
  line-height: 1.5;
}

.mp-earnings-amount {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 12px;
}

.mp-earnings-label {
  color: #676562;
  font-size: 0.84rem;
  font-weight: 550;
  line-height: 1.3;
}

.mp-earnings-page-figure {
  color: #424549;
  font-size: clamp(1.22rem, 1.9vw, 1.55rem);
  font-weight: 560;
  line-height: 1.2;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.mp-earnings-model-amount {
  margin-top: 20px;
}

.mp-earnings-model-figure {
  color: #405A67;
  font-size: clamp(1.9rem, 2.8vw, 2.6rem);
  font-weight: 690;
  letter-spacing: -0.055em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.mp-earnings-model-amount .mp-earnings-label {
  color: #405A67;
  font-weight: 680;
}

.mp-earnings-unit {
  font-size: 0.48em;
  font-weight: 550;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.mp-detail-section .mp-earnings-explanation {
  max-width: 760px;
  margin-top: 24px;
  color: #5a5957;
  font-size: 1.01rem;
}

.mp-detail-revenue-share {
  border: none;
  padding: clamp(28px, 4vw, 54px);
  background: #202328;
  color: #f5f2ec;
}

.mp-detail-revenue-share h2 {
  color: #f5f2ec;
}

.mp-detail-revenue-share p {
  color: rgba(245, 242, 236, 0.88);
  max-width: 840px;
}

.mp-detail-revenue-share .mp-share-percent {
  color: #e3cba6;
  font-weight: 700;
}

.mp-model-nav-bottom {
  margin-bottom: 22px;
}

.mp-detail-all-bottom {
  display: inline-block;
}

/* Image viewer: contained by default, no forced native-width scaling. */
body.mp-photo-open {
  overflow: hidden;
}

.mp-photo-dialog {
  position: fixed;
  inset: 0;
  z-index: 300;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #202328;
  color: #f5f2ec;
  overflow: hidden;
}

.mp-photo-dialog::backdrop {
  background: rgba(0, 0, 0, 0.8);
}

.mp-photo-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 0;
}

.mp-photo-top,
.mp-photo-controls {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 8px clamp(14px, 3vw, 40px);
  background: #202328;
}

.mp-photo-top span {
  font-size: 1rem;
  font-weight: 600;
}

.mp-photo-close,
.mp-photo-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(245, 242, 236, 0.28);
  border-radius: 50%;
  color: #f5f2ec;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.mp-photo-close span {
  font-size: 1.7rem;
  line-height: 1;
  transform: translateY(-1px);
}

.mp-photo-arrow {
  font-size: 2rem;
  line-height: 1;
}

.mp-photo-stage {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
  background: #272a2f;
}

.mp-photo-active {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  transition: opacity 160ms ease;
  will-change: transform;
}

.mp-photo-active.is-changing {
  opacity: 0;
}

.mp-photo-controls {
  justify-content: center;
  gap: clamp(20px, 6vw, 46px);
  min-height: 68px;
}

.mp-photo-count {
  min-width: 60px;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
}

.mp-detail-photo-button:focus-visible,
.mp-model-nav a:focus-visible,
.mp-detail-all:focus-visible,
.mp-photo-dialog button:focus-visible {
  outline: 3px solid #d1b58f;
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .modelpayments-detail-page .mp-detail-container {
    padding-top: 42px;
    padding-bottom: 88px;
  }

  .mp-detail-heading {
    align-items: start;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 26px;
  }

  .mp-detail-heading h1 {
    font-size: clamp(2.9rem, 13vw, 4rem);
  }

  .mp-detail-photos {
    gap: 32px;
  }

  .mp-detail-figure figcaption {
    margin-top: 9px;
  }

  .mp-model-nav {
    margin-bottom: 30px;
  }

  .mp-model-nav a {
    min-height: 54px;
    padding: 10px 5px;
  }

  .mp-detail-copy {
    margin: 62px auto 70px;
    gap: 52px;
  }

  .mp-detail-section {
    padding-top: 23px;
  }

  .mp-detail-section h2 {
    margin-bottom: 18px;
  }
  .mp-earnings-periods {
    grid-template-columns: minmax(0, 1fr);
  }

  .mp-earnings-period,
  .mp-earnings-period:first-child {
    padding: 23px 0 25px;
  }

  .mp-earnings-period-heading {
    min-height: 0;
    margin-bottom: 18px;
  }

  .mp-earnings-period h3 {
    margin-bottom: 5px;
    font-size: 1.12rem;
  }

  .mp-earnings-period + .mp-earnings-period {
    border-left: none;
    border-top: 1px solid rgba(32, 35, 40, 0.15);
  }

  .mp-earnings-amount {
    margin-top: 10px;
  }

  .mp-earnings-model-amount {
    margin-top: 14px;
  }

  .mp-earnings-model-figure {
    font-size: 2.25rem;
  }

  .mp-detail-revenue-share {
    padding: 26px 22px;
  }


  .mp-photo-top,
  .mp-photo-controls {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }
}

@media (prefers-reduced-motion: reduce) {
  .mp-model-nav a,
  .mp-photo-active {
    transition: none;
  }
}
