/* UG-MERGE-20261020-01
 * Selectively adapt a731e276's mentor sheet to the current blue dream UI.
 * Keep the existing dossier art, shared header, catalog and entrance animation.
 * The source's membership screens and global theme overrides are not imported.
 */
.phone.subpage-layout #appMain.mentor-detail-view {
  height: 100%;
  padding: calc(72px + env(safe-area-inset-top, 0px)) 0 0;
  overflow: hidden;
}

.phone #appMain.mentor-detail-view > .mentor-profile-screen {
  --mentor-sheet-top: clamp(56px, 12dvh, 112px);
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  max-width: none !important;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.mentor-profile-screen .mentor-detail-underlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(#548aca, #1d448f);
  pointer-events: none;
}

.mentor-detail-underlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 31, 77, .28);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  pointer-events: none;
}

.mentor-detail-underlay .mentor-page-track {
  overflow: hidden;
}

.mentor-detail-underlay > .mentor-pager-screen {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
}

/* The sheet sits above this full background target, including desktop sides. */
.mentor-profile-screen .mentor-detail-dismiss {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

.mentor-profile-screen .mentor-detail-sheet {
  position: absolute;
  inset: var(--mentor-sheet-top) 0 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 600px;
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 26px 26px 0 0;
  background: var(--paper);
  box-shadow: 0 -12px 34px rgba(8, 43, 103, .25);
}

.mentor-detail-sheet .mentor-detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--dream-surface);
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.mentor-detail-sheet .mentor-detail-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.mentor-detail-sheet .mentor-dossier {
  min-height: 100%;
  margin: 0;
  padding: 36px 16px 18px;
  border-radius: 0;
}

.mentor-detail-sheet .dossier-header > div {
  min-width: 0;
}

.mentor-detail-sheet .dossier-header p {
  overflow-wrap: anywhere;
}

.mentor-detail-sheet .dossier-label {
  right: 48px;
}

.mentor-detail-sheet .story-scroll {
  max-height: min(48dvh, 480px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.mentor-detail-sheet .dossier-action-dock {
  display: flex;
  align-items: stretch;
  flex: 0 0 auto;
  gap: 12px;
  padding: 12px 16px max(12px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: var(--dream-surface);
}

.mentor-detail-sheet .dossier-action-dock > button {
  flex: 1;
  width: auto;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 12px 10px;
  font-size: 14px;
  line-height: 20px;
}

.mentor-detail-sheet .dossier-action-dock > .library-action {
  flex: 1.4;
}

.phone .mentor-detail-dismiss:focus-visible {
  outline: 3px solid #dceaff;
  outline-offset: -5px;
}

@media (max-width: 360px) {
  .mentor-detail-sheet .mentor-dossier { padding-inline: 12px; }
  .mentor-detail-sheet .dossier-action-dock { gap: 8px; padding-inline: 12px; }
  .mentor-detail-sheet .dossier-action-dock > button { font-size: 13px; }
}
