/* ClipVision navigation architecture: one task studio, one model catalog, one account. */

/* Late content and image updates must not pull an already opened route. */
.cv-ai-studio-screen,
#cvLanguageChat,
#balanceScreen,
#communityFeedScreen,
#myCommunityScreen,
#catalogScreen,
#taskScreen {
  overflow-anchor: none;
}

.cv-welcome-start-options,
.cv-all-models-hub,
.cv-all-models-chat-tabs {
  display: none;
}

.cv-bottom-nav-shell {
  display: contents;
}

.cv-ai-studio-child-back,
.cv-community-studio-back {
  display: none;
}

body.cv-ai-studio-design-open:not(.welcome-open) .cv-ai-studio-child-back,
body.cv-ai-studio-photoshoots-open:not(.welcome-open) .cv-community-studio-back {
  box-sizing: border-box;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  border: 0;
  color: rgba(248, 243, 230, .76);
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

body.cv-ai-studio-design-open:not(.welcome-open) .cv-ai-studio-child-back {
  display: inline-flex;
  width: min(100%, 620px);
  margin: 0 auto 12px;
  padding: 0 2px;
}

body.cv-ai-studio-photoshoots-open:not(.welcome-open) .cv-community-studio-back {
  display: inline-flex;
  margin: 0 0 13px;
  padding: 0;
}

body.cv-ai-studio-photoshoots-open:not(.welcome-open) #communityFeedScreen {
  isolation: isolate;
  opacity: 1 !important;
  background:
    radial-gradient(circle at 50% -8rem, rgba(224, 191, 93, .11), transparent 26rem),
    linear-gradient(180deg, #090a09, #070807 68%) !important;
  mix-blend-mode: normal;
}

:is(.cv-ai-studio-child-back, .cv-community-studio-back) > span {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 1px solid rgba(232, 199, 108, .25);
  border-radius: 11px;
  color: #e8c76c;
  background: rgba(232, 199, 108, .055);
  font-size: 17px;
  line-height: 1;
}

:is(.cv-ai-studio-child-back, .cv-community-studio-back) > b {
  letter-spacing: .01em;
}

.cv-saved-photoshoots-guide {
  box-sizing: border-box;
  display: grid;
  width: 100%;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  margin: 0 0 14px;
  padding: 11px;
  border: 1px solid rgba(232, 199, 108, .18);
  border-radius: 17px;
  background: radial-gradient(circle at 0 0, rgba(232, 199, 108, .1), transparent 48%), rgba(255, 255, 255, .025);
}

.cv-saved-photoshoots-guide-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  color: #17140d;
  background: linear-gradient(145deg, #f8dda0, #dfb845);
  font-size: 17px;
}

.cv-saved-photoshoots-guide-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.cv-saved-photoshoots-guide-copy b {
  color: #f6f1e8;
  font-size: 11px;
  line-height: 1.2;
}

.cv-saved-photoshoots-guide-copy small {
  color: rgba(244, 239, 231, .5);
  font-size: 8px;
  line-height: 1.4;
}

.cv-saved-photoshoots-guide button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid rgba(247, 221, 145, .72);
  border-radius: 12px;
  color: #17140d;
  background: linear-gradient(145deg, #f7dda0, #dfb845);
  font: inherit;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.cv-saved-photoshoots-guide button i {
  font-size: 13px;
  font-style: normal;
}

html body.cv-navigation-v2 .bottom-nav #studioNav,
html body.cv-navigation-v2 .bottom-nav #languageChatNav,
html body.cv-navigation-v2 .bottom-nav #photoNav,
html body.cv-navigation-v2 .bottom-nav #videoNav,
html body.cv-navigation-v2 .bottom-nav #feedNav,
.bottom-nav .cv-legacy-nav-control {
  display: none !important;
  pointer-events: none !important;
}

.bottom-nav-wrap .bottom-nav {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(104px, 1.06fr) minmax(0, 1fr) !important;
  align-items: center;
  gap: 4px !important;
  max-width: 460px;
  min-height: 60px;
  margin-inline: auto;
  padding: 5px 6px calc(5px + env(safe-area-inset-bottom)) !important;
}

html[data-cv-navigation-architecture-installed="1"] body:not(.welcome-open) #cvBottomNavWrap .bottom-nav {
  display: grid !important;
  width: min(calc(100vw - 28px), 460px) !important;
  height: auto !important;
  min-height: 60px !important;
  grid-template-areas: none !important;
  grid-template-columns: minmax(0, 1fr) minmax(104px, 1.06fr) minmax(0, 1fr) !important;
  grid-template-rows: minmax(50px, auto) !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 5px 6px calc(5px + env(safe-area-inset-bottom)) !important;
  border-color: rgba(232, 199, 108, .2) !important;
  border-radius: 22px !important;
  background:
    linear-gradient(180deg, rgba(31, 31, 27, .94), rgba(10, 11, 10, .97)),
    rgba(8, 9, 8, .94) !important;
  box-shadow:
    0 14px 36px rgba(0, 0, 0, .42),
    inset 0 1px rgba(255, 255, 255, .055) !important;
  backdrop-filter: blur(22px) saturate(120%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(120%) !important;
}

html[data-cv-navigation-architecture-installed="1"] body:not(.welcome-open) #cvBottomNavWrap .bottom-nav .cv-bottom-nav-lens {
  display: none !important;
}

html[data-cv-navigation-architecture-installed="1"] body:not(.welcome-open) #cvBottomNavWrap .bottom-nav #allModelsNav,
html[data-cv-navigation-architecture-installed="1"] body:not(.welcome-open) #cvBottomNavWrap .bottom-nav #aiStudioNav,
html[data-cv-navigation-architecture-installed="1"] body:not(.welcome-open) #cvBottomNavWrap .bottom-nav #balanceNav {
  position: relative !important;
  inset: auto !important;
  display: flex !important;
  width: auto !important;
  max-width: none !important;
  height: 50px !important;
  min-height: 50px !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 5px 4px !important;
  border: 1px solid transparent !important;
  border-radius: 16px !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

html[data-cv-navigation-architecture-installed="1"] body:not(.welcome-open) #cvBottomNavWrap .bottom-nav #allModelsNav {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

html[data-cv-navigation-architecture-installed="1"] body:not(.welcome-open) #cvBottomNavWrap .bottom-nav #aiStudioNav {
  grid-column: 2 !important;
  grid-row: 1 !important;
  height: 50px !important;
  min-height: 50px !important;
  margin-top: 0 !important;
}

html[data-cv-navigation-architecture-installed="1"] body:not(.welcome-open) #cvBottomNavWrap .bottom-nav #balanceNav {
  grid-column: 3 !important;
  grid-row: 1 !important;
}

.bottom-nav .nav-btn:not(.cv-legacy-nav-control) {
  position: relative;
  display: flex !important;
  min-width: 0;
  min-height: 50px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 16px;
}

.bottom-nav .nav-btn:not(.cv-legacy-nav-control) .cv-nav-label {
  max-width: 100%;
  overflow: hidden;
  font-size: 9.5px !important;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-nav .cv-ai-studio-nav {
  min-height: 50px !important;
  margin-top: 0;
  border: 1px solid rgba(239, 209, 123, .32) !important;
  color: #eed37f !important;
  background: linear-gradient(145deg, rgba(238, 204, 108, .12), rgba(222, 176, 64, .035)) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .035) !important;
}

.bottom-nav .cv-ai-studio-nav .cv-nav-icon,
.bottom-nav .cv-ai-studio-nav .cv-nav-label {
  color: inherit !important;
}

.bottom-nav .cv-ai-studio-nav .cv-nav-icon svg {
  stroke: currentColor !important;
}

.bottom-nav .cv-ai-studio-nav.active {
  border-color: rgba(255, 229, 154, .82) !important;
  color: #17140d !important;
  background: linear-gradient(145deg, #f8df99, #ddb348) !important;
  box-shadow: 0 7px 20px rgba(218, 174, 57, .2), inset 0 1px rgba(255, 255, 255, .7) !important;
}

html[data-cv-navigation-architecture-installed="1"] body:not(.welcome-open) #cvBottomNavWrap .bottom-nav :is(#allModelsNav, #balanceNav).active {
  border-color: rgba(232, 199, 108, .2) !important;
  color: #f1d57d !important;
  background: rgba(232, 199, 108, .075) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .035) !important;
}

/* CV_NAVIGATION_CONTROLS_POLISH_20260905
   Keep the compact All Models glyph on the same gold icon rail as the
   studio and account destinations, including while a section is opening. */
html[data-cv-navigation-architecture-installed="1"] body:not(.welcome-open) #cvBottomNavWrap .bottom-nav #allModelsNav .cv-nav-icon {
  color: #e1bf5c !important;
}

html[data-cv-navigation-architecture-installed="1"] body:not(.welcome-open) #cvBottomNavWrap .bottom-nav #allModelsNav .cv-nav-icon svg {
  stroke: currentColor !important;
}

html body.cv-navigation-v2.welcome-open #cvBottomNavWrap,
html body.cv-navigation-v2.welcome-open .bottom-nav-wrap,
body.welcome-open .bottom-nav-wrap {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.welcome-open .welcome-overlay {
  display: flex;
  box-sizing: border-box;
  height: 100dvh;
  min-height: 100dvh;
  overflow-y: auto;
  flex-direction: column;
  justify-content: flex-start;
  padding: max(22px, env(safe-area-inset-top)) 16px max(22px, env(safe-area-inset-bottom));
  scrollbar-gutter: stable;
}

body.welcome-open .welcome-card.cv-welcome-showcase-intro {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: clamp(18px, 5svh, 44px) 0 20px;
}

body.welcome-open .welcome-card .welcome-title {
  margin-top: clamp(28px, 7dvh, 62px);
  font-size: clamp(36px, 10vw, 54px);
  line-height: .96;
}

body.welcome-open .welcome-card .welcome-text {
  max-width: 390px;
  margin-top: 13px;
  font-size: 14px;
  line-height: 1.45;
}

body.welcome-open .cv-welcome-studio-callout,
body.welcome-open .welcome-arrows {
  display: none !important;
}

body.welcome-open .cv-welcome-start-options {
  display: grid;
  gap: 10px;
  margin-top: clamp(24px, 5dvh, 42px);
}

.cv-welcome-start-card {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 112px;
  grid-template-columns: 108px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  padding: 10px 13px 10px 10px;
  border: 1px solid rgba(238, 203, 106, .22);
  border-radius: 25px;
  color: #f9f5e9;
  background: linear-gradient(135deg, rgba(27, 27, 23, .96), rgba(10, 10, 9, .98));
  box-shadow: inset 0 1px rgba(255, 255, 255, .035), 0 18px 45px rgba(0, 0, 0, .2);
  text-align: left;
}

.cv-welcome-start-card.is-studio {
  border-color: rgba(246, 210, 108, .5);
  background: radial-gradient(circle at 18% 20%, rgba(223, 178, 58, .16), transparent 34%), linear-gradient(135deg, #1d1b14, #0b0b09 70%);
}

.cv-welcome-start-visual {
  position: relative;
  display: block;
  height: 92px;
  overflow: hidden;
  border-radius: 18px;
  background: #161612;
}

.cv-welcome-start-visual img {
  position: absolute;
  width: 64px;
  height: 84px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, .15);
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .42);
}

.cv-welcome-start-visual img:first-child {
  left: 7px;
  top: 4px;
  z-index: 2;
  transform: rotate(-4deg);
}

.cv-welcome-start-visual img:last-child {
  right: 7px;
  top: 6px;
  transform: rotate(5deg);
}

.cv-welcome-start-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.cv-welcome-start-copy small {
  margin-bottom: 6px;
  color: #e5c56c;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .14em;
}

.cv-welcome-start-copy b {
  color: #fff;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: -.035em;
}

.cv-welcome-start-copy em {
  margin-top: 7px;
  color: rgba(255, 255, 255, .53);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.3;
}

.cv-welcome-start-card > i {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
  color: #f3d57d;
  background: rgba(255, 255, 255, .04);
  font-style: normal;
  font-weight: 900;
}

body.cv-all-models-open:not(.welcome-open):not(.cv-language-chat-open) .cv-all-models-hub {
  position: relative;
  z-index: 12;
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0 auto 12px;
  padding: 18px 0 0;
}

.cv-all-models-heading > span {
  color: #cfae58;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .16em;
}

.cv-all-models-heading h1 {
  margin: 5px 0 1px;
  color: #f8f5ec;
  font-size: 27px;
  line-height: 1;
  letter-spacing: -.045em;
}

.cv-all-models-heading p {
  margin: 6px 0 0;
  color: rgba(245, 243, 235, .48);
  font-size: 11px;
  font-weight: 700;
}

.cv-all-models-showcase {
  position: relative;
  isolation: isolate;
  min-height: 166px;
  margin-top: 14px;
  overflow: hidden;
  padding: 16px 17px 18px;
  border: 1px solid rgba(232, 199, 108, .18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 8%, rgba(226, 190, 88, .15), transparent 35%),
    linear-gradient(145deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .012));
  box-shadow: 0 20px 48px rgba(0, 0, 0, .24), inset 0 1px rgba(255, 255, 255, .05);
}

.cv-all-models-hub > .cv-all-models-showcase:first-child {
  margin-top: 0;
}

.cv-all-models-showcase::after {
  content: "";
  position: absolute;
  right: -62px;
  bottom: -104px;
  z-index: -1;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(232, 199, 108, .13);
  border-radius: 50%;
  box-shadow: 0 0 0 30px rgba(232, 199, 108, .025), 0 0 0 61px rgba(232, 199, 108, .015);
}

.cv-all-models-showcase-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.cv-all-models-showcase-brand > i {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  flex: 0 0 29px;
  border: 1px solid rgba(247, 225, 158, .48);
  border-radius: 9px;
  color: #17130b;
  background: linear-gradient(145deg, #f4dc8b, #c69836);
  box-shadow: 0 8px 20px rgba(211, 166, 47, .18);
  font-size: 9px;
  font-style: normal;
  font-weight: 950;
}

.cv-all-models-showcase-brand span,
.cv-all-models-showcase-brand small,
.cv-all-models-showcase-brand b {
  display: block;
}

.cv-all-models-showcase-brand small {
  color: #d7b75e;
  font-size: 7px;
  font-weight: 950;
  letter-spacing: .15em;
}

.cv-all-models-showcase-brand b {
  margin-top: 2px;
  color: rgba(248, 245, 236, .53);
  font-size: 8px;
  font-weight: 850;
}

.cv-all-models-showcase h2 {
  max-width: 92%;
  margin: 24px 0 0;
  color: #f8f5ec;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(29px, 8.7vw, 40px);
  font-weight: 900;
  line-height: .9;
  letter-spacing: -.035em;
  text-transform: uppercase;
}

.cv-all-models-showcase h2 span {
  color: #e4c568;
}

.cv-all-models-showcase > p {
  max-width: 92%;
  margin: 10px 0 0;
  color: rgba(244, 239, 231, .57);
  font-size: 10px;
  font-weight: 680;
  line-height: 1.42;
}

body.cv-all-models-open:not(.welcome-open):not(.cv-language-chat-open) #homeHero {
  display: none !important;
}

.cv-all-models-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-top: 10px;
  padding: 4px;
  overflow: hidden;
  border: 1px solid rgba(232, 199, 108, .16);
  border-radius: 17px;
  background: rgba(14, 14, 12, .9);
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}

.cv-all-models-tabs button {
  display: flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 5px;
  border: 0;
  border-radius: 13px;
  outline: 0;
  color: rgba(255, 255, 255, .48);
  background: transparent;
  box-shadow: none;
  font-size: 9.5px;
  font-weight: 850;
  line-height: 1.12;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: color .18s ease, background-color .18s ease;
}

.cv-all-models-tabs button::before,
.cv-all-models-tabs button::after {
  display: none !important;
  content: none !important;
}

.cv-all-models-tabs button:focus,
.cv-all-models-tabs button:focus-visible,
.cv-all-models-tabs button:active {
  border: 0 !important;
  outline: 0 !important;
}

.cv-all-models-tabs button span {
  min-width: 0;
  white-space: normal;
}

.cv-all-models-tabs button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.cv-all-models-tabs button.active {
  color: #17140d;
  background: linear-gradient(135deg, #f8df96, #dab04a);
  box-shadow: inset 0 1px rgba(255, 255, 255, .65);
}

body.cv-navigation-v2 #cvModeSwitchHost {
  display: none !important;
}

body.cv-language-chat-open .cv-all-models-chat-tabs {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 6px 12px 0;
  padding: 4px;
  border: 1px solid rgba(231, 198, 106, .15);
  border-radius: 15px;
  background: rgba(14, 14, 13, .94);
}

.cv-all-models-chat-tabs button {
  min-width: 0;
  min-height: 36px;
  overflow: hidden;
  padding: 7px 4px;
  border: 0;
  border-radius: 11px;
  color: rgba(255, 255, 255, .48);
  background: transparent;
  font-size: 9px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cv-all-models-chat-tabs button.active {
  color: #17140d;
  background: linear-gradient(135deg, #f8df96, #dab04a);
}

.cv-ai-studio-directions {
  margin-top: 16px;
}

.cv-ai-studio-content-block {
  margin-top: 10px;
  border-color: rgba(232, 199, 98, .16);
  background: linear-gradient(145deg, rgba(231, 193, 86, .035), transparent 42%), rgba(12, 14, 11, .74);
}

.cv-ai-studio-content-block + .cv-ai-studio-content-block {
  margin-top: 10px;
}

.cv-ai-studio-direction-list {
  display: grid;
  gap: 8px;
}

.cv-ai-studio-direction-card {
  position: relative;
  display: grid;
  min-height: 88px;
  grid-template-columns: 76px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(238, 205, 112, .17);
  border-radius: 21px;
  color: #f7f3e8;
  background: linear-gradient(135deg, rgba(28, 28, 24, .96), rgba(12, 12, 11, .98));
  text-align: left;
}

.cv-ai-studio-direction-card > img {
  width: 76px;
  height: 72px;
  object-fit: cover;
  border-radius: 15px;
}

.cv-ai-studio-direction-card > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.cv-ai-studio-direction-card small {
  color: #d6b65e;
  font-size: 7px;
  font-weight: 950;
  letter-spacing: .13em;
}

.cv-ai-studio-direction-card b {
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.1;
}

.cv-ai-studio-direction-card em {
  margin-top: 5px;
  overflow: hidden;
  color: rgba(255, 255, 255, .48);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.3;
}

.cv-ai-studio-direction-card > i {
  color: #e8c86c;
  font-style: normal;
  font-weight: 900;
}

@media (max-width: 360px) {
  .cv-welcome-start-card {
    min-height: 100px;
    grid-template-columns: 92px minmax(0, 1fr) 26px;
    gap: 10px;
    border-radius: 21px;
  }

  .cv-welcome-start-visual {
    height: 80px;
  }

  .cv-welcome-start-visual img {
    width: 55px;
    height: 72px;
  }

  .cv-welcome-start-copy b {
    font-size: 19px;
  }

  .cv-welcome-start-copy em {
    font-size: 9.5px;
  }

  .cv-all-models-tabs button {
    min-height: 44px;
    flex-direction: row;
    gap: 5px;
    padding: 5px 3px;
    font-size: 9px;
  }

  .bottom-nav-wrap .bottom-nav {
    grid-template-columns: minmax(0, 1fr) minmax(96px, 1.04fr) minmax(0, 1fr) !important;
  }

  .bottom-nav .nav-btn:not(.cv-legacy-nav-control) .cv-nav-label {
    font-size: 8.7px !important;
  }
}

@media (min-width: 700px) {
  body.welcome-open .cv-welcome-start-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.welcome-open .welcome-card.cv-welcome-showcase-intro {
    width: min(100%, 760px);
  }

  body.cv-all-models-open:not(.welcome-open):not(.cv-language-chat-open) .cv-all-models-hub {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bottom-nav .cv-ai-studio-nav.active {
    transform: none;
  }
}

/* The chat is another tab of the same All Models workspace. Reuse the
   single top switcher instead of rendering a second chat-only control. */
body.cv-all-models-open:not(.welcome-open) .cv-all-models-hub {
  display: block;
}

body.cv-all-models-open.cv-language-chat-open .cv-all-models-hub {
  position: fixed;
  z-index: 4055;
  top: 0;
  right: 0;
  left: 0;
  max-width: none;
  margin: 0;
  padding: max(12px, env(safe-area-inset-top)) 14px 10px;
  border-bottom: 1px solid rgba(232, 199, 108, .15);
  background: radial-gradient(circle at 82% 0, rgba(223, 191, 92, .06), transparent 14rem), #080907;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .24);
  pointer-events: auto;
}

body.cv-all-models-open.cv-language-chat-open .cv-all-models-showcase {
  display: none !important;
}

body.cv-all-models-open.cv-language-chat-open #cvLanguageChat {
  inset: auto 0 0;
  top: var(--cv-all-models-chat-top, 158px);
  height: auto;
  max-height: none;
  padding-top: 0;
}

/* Drawers must sit above the tab rail even in a short landscape viewport. */
body.cv-language-chat-open #cvLanguageChat:has(.cv-language-drawer.is-open) {
  z-index: 6000;
}

body.cv-telegram-expanded.cv-all-models-open.cv-language-chat-open .cv-all-models-hub {
  top: var(--cv-fullscreen-safe-top, 104px);
  padding-top: 12px;
}

body.cv-all-models-open.cv-language-chat-open .cv-all-models-chat-tabs {
  display: none !important;
}

/* Keep the first-top-up pill above the navigation shell. The shell has its
   own high stacking context, so the older 2582 layer could be painted under
   the panel and look clipped on phones. Align it to the same centered rail. */
html body.cv-navigation-v2:not(.welcome-open) #cvBottomNavWrap .cv-first-topup-bonus {
  z-index: 5203 !important;
  right: max(10px, calc((100vw - 520px) / 2 + 10px)) !important;
  bottom: calc(70px + env(safe-area-inset-bottom)) !important;
  left: auto !important;
  transform: none !important;
  pointer-events: auto !important;
}

html body.cv-navigation-v2:not(.welcome-open) #cvBottomNavWrap .bottom-nav .nav-btn,
html body.cv-navigation-v2:not(.welcome-open) #cvBottomNavWrap .bottom-nav #balanceNav {
  pointer-events: auto !important;
}

@media (max-width: 370px) {
  html body.cv-navigation-v2:not(.welcome-open) #cvBottomNavWrap .cv-first-topup-bonus {
    bottom: calc(68px + env(safe-area-inset-bottom)) !important;
  }
}

/* Stable mobile geometry. Telegram changes the visual viewport while it
   expands; top-anchored content no longer recentres and visibly jumps. */
html.cv-mobile-editorial:not(.cv-desktop-mode) body.welcome-open.cv-telegram-expanded .welcome-overlay {
  height: 100dvh !important;
  min-height: 100svh !important;
  justify-content: flex-start !important;
  padding: calc(var(--cv-fullscreen-safe-top, 104px) + 12px) 16px max(22px, env(safe-area-inset-bottom)) !important;
}

html.cv-mobile-editorial:not(.cv-desktop-mode) body.welcome-open.cv-telegram-expanded .welcome-card.cv-welcome-showcase-intro {
  padding-top: 0 !important;
}

/* Primary app destinations share the same visual top rail in Telegram. */
html.cv-mobile-editorial:not(.cv-desktop-mode) body.cv-telegram-expanded:not(.welcome-open) .cv-ai-studio-screen,
html.cv-mobile-editorial:not(.cv-desktop-mode) body.cv-telegram-expanded:not(.welcome-open) #communityFeedScreen.cv-community-screen {
  padding-top: calc(var(--cv-fullscreen-safe-top, 104px) + 13px) !important;
  scroll-padding-top: calc(var(--cv-fullscreen-safe-top, 104px) + 13px) !important;
}

html.cv-mobile-editorial:not(.cv-desktop-mode) body.cv-telegram-expanded.cv-all-models-open:not(.welcome-open):not(.cv-language-chat-open) .app {
  padding-top: calc(var(--cv-fullscreen-safe-top, 104px) + 13px) !important;
}

/* The create/edit catalog needs a quiet back affordance, not another card. */
html.cv-mobile-editorial:not(.cv-desktop-mode) #catalogScreen .cv-model-sections-back-row {
  min-height: 27px !important;
  margin: 0 0 3px !important;
}

html.cv-mobile-editorial:not(.cv-desktop-mode) #catalogScreen .cv-model-sections-back-row .back-task-btn {
  width: auto !important;
  min-height: 27px !important;
  padding: 3px 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: rgba(239, 226, 188, .68) !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 10px !important;
  font-weight: 850 !important;
}

html.cv-mobile-editorial:not(.cv-desktop-mode) #catalogScreen .cv-model-sections-back-row .back-task-btn:active {
  color: #efd477 !important;
  transform: translateX(-1px) !important;
}

.cv-model-opening { display: none; }
html.cv-model-module-loading #cvModelSettingsBackdrop {
  background: rgba(7, 8, 7, .18);
}
html.cv-model-module-loading .cv-model-opening {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: absolute;
  top: calc(var(--cv-fullscreen-safe-top, var(--safe-top, 14px)) + 12px);
  left: 50%;
  transform: translateX(-50%);
  box-sizing: border-box;
  width: min(360px, calc(100% - 28px));
  padding: 14px 16px;
  border: 1px solid rgba(231, 207, 130, .25);
  border-radius: 18px;
  background: #151610;
  color: #f6f3e9;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
  font: 600 13px/1.4 system-ui, sans-serif;
  pointer-events: auto;
}
.cv-model-opening button {
  flex-shrink: 0;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(231, 207, 130, .25);
  border-radius: 12px;
  background: transparent;
  color: #e7c96f;
  font: inherit;
}

body.cv-task-screen-open:not(.welcome-open) #taskGrid.cv-visual-tool-grid .cv-tool-card {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
}

html.cv-mobile-editorial:not(.cv-desktop-mode) #catalogScreen :is(
  #models, .cv-scenario-hub, .cv-scenario-category-block, .cv-scenario-list, .cv-scenario-card
) {
  box-sizing: border-box !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

html.cv-mobile-editorial:not(.cv-desktop-mode) #catalogScreen .cv-scenario-hub {
  width: 100% !important;
}

/* Photoshoot title and actions must fit down to the narrowest supported phone. */
html.cv-mobile-editorial:not(.cv-desktop-mode) #communityFeedScreen .cv-community-hero h1 {
  max-width: 100% !important;
  font-size: clamp(27px, 9.5vw, 38px) !important;
  line-height: .94 !important;
  letter-spacing: -.045em !important;
  white-space: nowrap !important;
}

html.cv-mobile-editorial:not(.cv-desktop-mode) :is(#communityFeedScreen, #myCommunityScreen) .cv-community-actions button,
html.cv-mobile-editorial:not(.cv-desktop-mode) :is(#communityFeedScreen, #myCommunityScreen) .cv-community-actions .cv-community-repeat {
  box-sizing: border-box !important;
  min-width: 0 !important;
  overflow: hidden !important;
  padding-inline: 5px !important;
  line-height: 1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html.cv-mobile-editorial:not(.cv-desktop-mode) #myCommunityScreen .cv-community-actions > button {
  width: 0 !important;
  flex: 1 1 0 !important;
}

@media (max-width: 370px) {
  html.cv-mobile-editorial:not(.cv-desktop-mode) :is(#communityFeedScreen, #myCommunityScreen) .cv-community-actions button {
    padding-inline: 4px !important;
    font-size: 7.4px !important;
  }
}
