/* SORA Project V122 — profile workspace, participant previews and stable motion. */

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  max-width: 100%;
  overflow-x: clip;
}

/* Faster cross-document motion: the old page remains visible until the new
   page is ready, while both layers animate only opacity and transform. */
::view-transition-group(root) {
  animation-duration: 340ms !important;
  animation-timing-function: cubic-bezier(.16, 1, .3, 1) !important;
}

::view-transition-old(root) {
  animation: v122-page-old 180ms ease-out both !important;
}

::view-transition-new(root) {
  animation: v122-page-new 340ms cubic-bezier(.16, 1, .3, 1) both !important;
}

@keyframes v122-page-old {
  from { opacity: 1; transform: translate3d(0, 0, 0); }
  to { opacity: .88; transform: translate3d(0, -2px, 0); }
}

@keyframes v122-page-new {
  from { opacity: .72; transform: translate3d(0, 7px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

body.v108-fallback-transitions.v108-motion-ready main {
  animation-duration: 320ms !important;
}

body.v108-fallback-transitions.v108-page-leaving main {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/* Profile settings: navigation on the left, one focused workspace on right. */
.profile-edit-dialog {
  width: min(1080px, calc(100dvw - 28px)) !important;
}

.profile-settings-workspace {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  min-width: 0;
}

.profile-settings-nav {
  position: sticky;
  top: 0;
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(119, 167, 211, .12);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(17, 29, 44, .86), rgba(8, 15, 25, .76));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

.profile-settings-nav button {
  appearance: none;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 8px 10px;
  color: #9eacc0;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: transform .24s cubic-bezier(.16, 1, .3, 1), color .2s ease, border-color .2s ease, background-color .2s ease, box-shadow .24s ease;
}

.profile-settings-nav button > i {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #6f91ad;
  border-radius: 11px;
  background: rgba(112, 159, 197, .07);
  transition: color .2s ease, background-color .2s ease, transform .24s cubic-bezier(.16, 1, .3, 1);
}

.profile-settings-nav button span,
.profile-settings-nav button strong,
.profile-settings-nav button small { display: block; min-width: 0; }
.profile-settings-nav button strong { color: inherit; font-size: 12px; line-height: 1.15; }
.profile-settings-nav button small { margin-top: 3px; color: #617286; font-size: 9.5px; line-height: 1.15; }

.profile-settings-nav button:hover,
.profile-settings-nav button:focus-visible {
  color: #edf8ff;
  border-color: rgba(56, 174, 244, .18);
  background: rgba(39, 135, 205, .075);
  outline: none;
  transform: translateX(2px);
}

.profile-settings-nav button.is-active {
  color: #fff;
  border-color: rgba(77, 185, 247, .32);
  background: linear-gradient(135deg, rgba(32, 138, 231, .25), rgba(35, 200, 235, .10));
  box-shadow: 0 10px 26px rgba(0, 104, 184, .12), inset 0 1px 0 rgba(255, 255, 255, .06);
}

.profile-settings-nav button.is-active > i {
  color: #fff;
  background: linear-gradient(145deg, #258fee, #2ec9ef);
  box-shadow: 0 8px 20px rgba(33, 152, 228, .24);
  transform: scale(1.03);
}

.profile-settings-content { min-width: 0; }
.profile-settings-content > [hidden] { display: none !important; }
.profile-settings-content > .profile-settings-section {
  min-height: 330px;
  padding: 20px !important;
  border-radius: 22px !important;
  background: linear-gradient(160deg, rgba(19, 32, 48, .86), rgba(8, 15, 25, .84)) !important;
}

.profile-settings-content > .profile-settings-section.is-active {
  animation: v122-settings-pane .34s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes v122-settings-pane {
  from { opacity: .45; transform: translate3d(8px, 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.profile-account-settings > label,
.profile-security-settings > label { display: block; max-width: 560px; }
.profile-field-hint { display: block; margin-top: 7px; color: #70849b; font-size: 10px; }

/* Rich circular previews replace boxed AI-looking icons. */
.release-page .release-participant-button {
  grid-template-columns: 78px minmax(0, 1fr) auto !important;
  min-height: 58px !important;
  padding: 8px 11px !important;
  border-radius: 17px !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(51, 174, 247, .12), transparent 46%),
    linear-gradient(145deg, rgba(22, 38, 55, .94), rgba(10, 19, 31, .94)) !important;
}

.release-page .release-participant-button-characters {
  background:
    radial-gradient(circle at 12% 0%, rgba(139, 92, 246, .14), transparent 46%),
    linear-gradient(145deg, rgba(24, 35, 55, .94), rgba(12, 18, 33, .94)) !important;
}

.release-page .release-participant-button::before { width: 2px !important; opacity: .65 !important; }

.release-participant-visual {
  display: flex;
  align-items: center;
  width: 78px;
  min-width: 78px;
  padding-left: 2px;
}

.release-participant-visual > span {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-left: -10px;
  overflow: hidden;
  color: #dff6ff;
  border: 2px solid #0c1826;
  border-radius: 50%;
  background: linear-gradient(145deg, #1b88df, #29c9e9);
  box-shadow: 0 7px 18px rgba(0, 0, 0, .22);
  font-size: 11px;
  transition: transform .28s cubic-bezier(.16, 1, .3, 1), border-color .2s ease;
}

.release-participant-visual > span:first-child { margin-left: 0; z-index: 3; }
.release-participant-visual > span:nth-child(2) { z-index: 2; background: linear-gradient(145deg, #2262c8, #6d5df6); }
.release-participant-visual > span:nth-child(3) { z-index: 1; background: linear-gradient(145deg, #7257ef, #cf63ee); }
.release-participant-visual img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.release-participant-button:hover .release-participant-visual > span:nth-child(1) { transform: translateY(-2px) rotate(-3deg); }
.release-participant-button:hover .release-participant-visual > span:nth-child(2) { transform: translateY(-3px); }
.release-participant-button:hover .release-participant-visual > span:nth-child(3) { transform: translateY(-2px) rotate(3deg); }

.release-page .release-participant-button-copy strong { font-size: 12.5px !important; }
.release-page .release-participant-button-copy small { font-size: 9.8px !important; }
.release-participants-modal-symbol { border-radius: 50% !important; }

/* Recommendations: symmetric frame and predictable card track. */
.release-page .recommendations-section {
  width: min(1120px, calc(100vw - 32px)) !important;
  max-width: 1120px !important;
  margin-inline: auto !important;
}

.release-page .recommendations-heading,
.release-page .recommendations-section > .recommendations-heading {
  padding: 0 46px 14px !important;
}

.release-page .recommendations-carousel,
.release-page .recommendations-carousel.has-controls {
  width: 100% !important;
  min-width: 0 !important;
}

.release-page .recommendations-carousel.has-controls {
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) 38px !important;
  align-items: center !important;
  gap: 8px !important;
}

.release-page .recommendations-row {
  display: flex !important;
  flex: 1 1 auto !important;
  align-items: stretch !important;
  gap: 12px !important;
  min-width: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 6px 0 15px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-padding-inline: 1px !important;
  scrollbar-width: none;
}

.release-page .recommendations-row::-webkit-scrollbar { display: none; }
.release-page .recommendations-carousel.is-ready:not(.has-overflow) .recommendations-row { justify-content: center !important; }
.release-page .recommendations-carousel.is-ready.has-overflow .recommendations-row { justify-content: flex-start !important; }

.release-page .recommend-card {
  flex: 0 0 132px !important;
  width: 132px !important;
  min-width: 132px !important;
  max-width: 132px !important;
  margin: 0 !important;
  contain: layout style;
}

.release-page .recommend-poster {
  width: 132px !important;
  height: 190px !important;
  border-radius: 16px !important;
}

.release-page .recommendations-carousel .recommend-arrow {
  align-self: center !important;
  margin: 0 !important;
}

/* SMM is directly below Dubber and has its own social-spectrum identity. */
.role-badge[data-role="SMM"],
.role-option:has(input[value="SMM"]) span,
.permissions-role-pill[data-role="SMM"] {
  color: #fff !important;
  background: linear-gradient(135deg, #ff4d9d 0%, #8b5cf6 48%, #22d3ee 100%) !important;
  border-color: rgba(207, 114, 255, .42) !important;
  box-shadow: 0 7px 20px rgba(139, 92, 246, .20) !important;
}

@media (max-width: 900px) {
  .profile-settings-workspace { grid-template-columns: 184px minmax(0, 1fr); gap: 10px; }
  .profile-settings-nav { padding: 6px; }
  .profile-settings-nav button { grid-template-columns: 32px minmax(0, 1fr); min-height: 50px; padding: 7px; }
  .profile-settings-nav button > i { width: 32px; height: 32px; }
  .release-page .release-participant-button { grid-template-columns: 68px minmax(0, 1fr) auto !important; }
  .release-participant-visual { width: 68px; min-width: 68px; }
  .release-participant-visual > span { width: 31px; height: 31px; }
  .release-page .recommend-card { flex-basis: 122px !important; width: 122px !important; min-width: 122px !important; max-width: 122px !important; }
  .release-page .recommend-poster { width: 122px !important; height: 176px !important; }
}

@media (max-width: 640px) {
  .profile-edit-dialog { width: calc(100dvw - 12px) !important; max-height: calc(100dvh - 12px) !important; }
  .profile-settings-workspace { display: block; }
  .profile-settings-nav {
    position: sticky;
    z-index: 3;
    top: -10px;
    display: flex;
    gap: 7px;
    margin: -2px -2px 10px;
    padding: 7px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .profile-settings-nav::-webkit-scrollbar { display: none; }
  .profile-settings-nav button {
    grid-template-columns: 30px auto;
    flex: 0 0 auto;
    width: auto;
    min-height: 44px;
    padding: 6px 10px 6px 7px;
    scroll-snap-align: start;
  }
  .profile-settings-nav button > i { width: 30px; height: 30px; }
  .profile-settings-nav button small { display: none; }
  .profile-settings-nav button:hover { transform: translateY(-1px); }
  .profile-settings-content > .profile-settings-section { min-height: 0; padding: 14px !important; }
  .release-page .release-participant-actions { gap: 8px !important; }
  .release-page .release-participant-button { grid-template-columns: 62px minmax(0, 1fr) auto !important; min-height: 60px !important; }
  .release-participant-visual { width: 62px; min-width: 62px; }
  .release-participant-visual > span { width: 29px; height: 29px; margin-left: -9px; }
  .release-page .recommendations-section { width: calc(100vw - 20px) !important; }
  .release-page .recommendations-heading,
  .release-page .recommendations-section > .recommendations-heading { padding: 0 2px 11px !important; }
  .release-page .recommendations-carousel,
  .release-page .recommendations-carousel.has-controls { display: block !important; }
  .release-page .recommend-card { flex-basis: 112px !important; width: 112px !important; min-width: 112px !important; max-width: 112px !important; }
  .release-page .recommend-poster { width: 112px !important; height: 162px !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  ::view-transition-old(root),
  ::view-transition-new(root),
  .profile-settings-content > .profile-settings-section.is-active { animation: none !important; }
  .profile-settings-nav button,
  .release-participant-visual > span { transition: none !important; }
}
