/* Mandarin Time's compact top bar. Each illustration retains its native aspect ratio. */
html[data-app-theme="theme-mandarin-time"] body > header {
  --mt-fruit-width: clamp(51px, calc(44vw - 82px), 103px);
  height: clamp(48px, 12.4vw, 53px);
  min-height: clamp(48px, 12.4vw, 53px);
  isolation: isolate;
  background: linear-gradient(112deg, #994ade, #8d45e7 52%, #7934ed) !important;
}
html[data-app-theme="theme-mandarin-time"] body > header::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto clamp(88px, 32%, 225px);
  height: 46%;
  background: url("mandarin-header-lights.v3.webp") left top -9px / clamp(153px, 46vw, 214px) auto repeat-x;
  mask-image: linear-gradient(to right, transparent, black 4%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 4%, black 95%, transparent);
  pointer-events: none;
}
html[data-app-theme="theme-mandarin-time"] body > header::after {
  inset-inline-start: max(2px, min(1.2vw, 9px));
  bottom: -8px;
  width: min(61%, 288px);
  height: auto;
  aspect-ratio: 514 / 60;
  background: url("mandarin-header-sprig.v3.webp") left bottom / contain no-repeat;
  pointer-events: none;
}
html[data-app-theme="theme-mandarin-time"] body > header .ub-brand-line {
  position: relative;
  align-self: stretch;
  margin: 0;
  padding-inline-end: calc(var(--mt-fruit-width) - 19px);
  column-gap: clamp(1px, 1vw, 6px);
}
html[data-app-theme="theme-mandarin-time"] body > header .studio-wordmark {
  width: clamp(88px, 29vw, 126px);
}
html[data-app-theme="theme-mandarin-time"] body > header .ub-brand-line::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -18px;
  bottom: -1px;
  width: var(--mt-fruit-width);
  aspect-ratio: 205 / 97;
  background: url("mandarin-header-fruit.v3.webp") center bottom / contain no-repeat;
  pointer-events: none;
}
html[data-app-theme="theme-mandarin-time"] body > header .ub-service-word {
  align-items: center;
  font-family: inherit;
  font-size: clamp(12px, 3.6vw, 16px);
  font-weight: 700;
}
html[data-app-theme="theme-mandarin-time"] body > header:has(> .bm-wall-button:not([hidden], [style*="display: none"])) {
  --mt-fruit-width: clamp(44px, 16vw, 84px);
}
html[data-app-theme="theme-mandarin-time"] body > header :is(#chatFab, .bm-wall-button) {
  z-index: 1;
}
html[data-app-theme="theme-mandarin-time"] body > header #chbadge {
  box-sizing: border-box;
  z-index: 2;
  min-width: 20px !important;
  height: 20px !important;
  padding-inline: 4px !important;
  line-height: 16px !important;
  background: #bc1343 !important;
  color: white !important;
  border: 2px solid white !important;
  border-radius: 9px !important;
  pointer-events: none;
}
html[data-app-theme="theme-mandarin-time"] body > header > #chbadge {
  right: 11px !important;
  top: 3px !important;
}
html[data-app-theme="theme-mandarin-time"] body > header #chatFab #chbadge {
  right: -5px !important;
  top: -5px !important;
}

/* Scale one undistorted panorama around the actual portrait. The toolbar remains in flow. */
html[data-app-theme="theme-mandarin-time"] #app .card:is(:has(> div > .mt-master-avatar, > div > div > .mt-master-avatar), .cp-profile-hero:has(.cp-client-avatar)) {
  container-type: inline-size;
  padding: 10px 16px clamp(34px, 9vw, 57px);
  background:
    url("mandarin-profile-scene.v2.webp") center top / max(100%, 350px) auto no-repeat,
    url("mandarin-profile-border.v2.webp") center bottom / 100% auto no-repeat,
    #fff !important;
}
html[data-app-theme="theme-mandarin-time"] #app .card:has(> div > .mt-master-avatar, > div > div > .mt-master-avatar) > div:first-child,
html[data-app-theme="theme-mandarin-time"] #app .cp-profile-hero:has(.cp-client-avatar) > .cp-profile-tools {
  --mt-portrait: clamp(84px, 28cqw, 152px);
  min-height: 44px;
  min-block-size: max(44px, calc(42cqw + 5px - var(--mt-portrait)));
  align-items: flex-start !important;
  margin-block-end: 0 !important;
}
html[data-app-theme="theme-mandarin-time"] #app :is(.mt-master-avatar, .cp-client-avatar) {
  --mt-portrait: clamp(84px, 28cqw, 152px);
  width: var(--mt-portrait);
  height: var(--mt-portrait);
  border-radius: 50%;
  box-shadow: 0 0 0 2px #fff0bf, 0 0 0 4px #d99145, 0 2px 10px #c8914559;
}
html[data-app-theme="theme-mandarin-time"] #app :is(.mt-master-avatar .mav, .cp-client-avatar > .bm-booking-avatar) {
  width: var(--mt-portrait) !important;
  height: var(--mt-portrait) !important;
  min-width: 0;
  border-radius: 50%;
  object-fit: cover;
}
html[data-app-theme="theme-mandarin-time"] #app :is(.mt-master-avatar, .cp-client-avatar)::after {
  content: none;
}
html[data-app-theme="theme-mandarin-time"] #app .card:has(.mt-master-avatar) > div:first-child :is(.bm-settings-gear, [onclick="shareMaster()"]),
html[data-app-theme="theme-mandarin-time"] #app .cp-profile-tools .cp-icon-button {
  background: #fffc !important;
  border-radius: 12px;
}
.vxp-mini[data-app-theme="theme-mandarin-time"] > .vxp-mini-tools {
  background-size: 60% auto;
}
.vxp-mini[data-app-theme="theme-mandarin-time"] > .vxp-mini-tools::after {
  height: auto;
  aspect-ratio: 1200 / 503;
  background: url("mandarin-profile-scene.v2.webp") center / contain no-repeat;
  opacity: 1;
  filter: none;
}

/* The artwork is stationery for the real calendar. Reserve its space separately from controls. */
html[data-app-theme="theme-mandarin-time"] #app .card.su-calendar {
  container-type: inline-size;
  width: 100%;
  max-width: 510px;
  margin-inline: auto;
  padding: 14px clamp(12px, 3.8vw, 20px) clamp(25px, 7.3vw, 40px);
  background:
    url("mandarin-calendar-branch.v2.webp") right 4px top / min(57%, 278px) auto no-repeat,
    url("mandarin-calendar-foot.v2.webp") center bottom / 100% auto no-repeat,
    linear-gradient(155deg, #fffaff, #faf4ff 64%, #fbf4ff) !important;
}
html[data-app-theme="theme-mandarin-time"] #app .su-calendar .su-heading {
  align-items: start;
  flex-wrap: nowrap;
  gap: 4px;
}
html[data-app-theme="theme-mandarin-time"] #app .su-calendar .su-heading > div {
  flex: 1 1 auto;
  min-width: 0;
}
html[data-app-theme="theme-mandarin-time"] #app .su-calendar .su-heading h2,
html[data-app-theme="theme-mandarin-time"] #app .su-calendar .su-heading p {
  width: fit-content;
  max-width: 100%;
  text-shadow: 0 0 4px white, 0 0 8px white;
}
html[data-app-theme="theme-mandarin-time"] #app .su-calendar .su-heading [data-edit-schedule] {
  background: #f5e9ff !important;
  color: #352044 !important;
  box-shadow: 0 2px 8px #59316619;
}
html[data-app-theme="theme-mandarin-time"] #app .su-calendar .su-add-visit {
  margin-block-start: max(14px, calc(19cqw - 40px));
}
html[data-app-theme="theme-mandarin-time"] #app .su-calendar .su-month {
  position: relative;
  margin-block: 16px clamp(23px, 7vw, 36px);
  background: linear-gradient(110deg, #f0ddff, #f5eaff, #efd9ff) !important;
}
html[data-app-theme="theme-mandarin-time"] #app .su-calendar .su-month::after {
  content: "";
  position: absolute;
  inset-inline: 1px;
  top: 100%;
  height: auto;
  aspect-ratio: 743 / 74;
  transform: translateY(-30%);
  background: url("mandarin-calendar-swag.v2.webp") center / contain no-repeat;
  pointer-events: none;
}
html[data-app-theme="theme-mandarin-time"] #app .su-calendar .su-day {
  aspect-ratio: 1;
  font-size: calc(14px * var(--pr-font-factor, 1));
  font-weight: 550;
  min-height: 0 !important;
  min-block-size: 36px !important;
  border: 1px solid #a17bd6 !important;
  background: linear-gradient(145deg, #f8efff, #f0e0ff) !important;
  color: #351d4d !important;
}
html[data-app-theme="theme-mandarin-time"] #app .su-calendar .su-day.is-off {
  background: #fdfaff !important;
  border-color: #d6c6e2 !important;
  color: #776384 !important;
}
html[data-app-theme="theme-mandarin-time"] #app .su-calendar .su-day.has-bookings {
  background: #e4ccfc !important;
  border-color: #9361c5 !important;
}
html[data-app-theme="theme-mandarin-time"] #app .su-calendar .su-day.is-today {
  background: linear-gradient(150deg, #993fe8, #6325bb) !important;
  border-color: #68389d !important;
  color: white !important;
}
html[data-app-theme="theme-mandarin-time"] #app .su-calendar .su-day.is-today > span {
  color: inherit !important;
}
html[data-app-theme="theme-mandarin-time"] #app .su-calendar .su-day[data-day$="-01"]::before,
html[data-app-theme="theme-mandarin-time"] #app .su-calendar .su-day.is-today::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 7%;
  right: 9%;
  height: 6px;
  border-radius: 65% 75% 55% 40%;
  background: linear-gradient(#fff 24%, #fff9f9 60%, #ddd3ea);
  box-shadow: 0 1px 2px #65477942;
  pointer-events: none;
}
html[data-app-theme="theme-mandarin-time"] #app .su-calendar .su-day.is-today::after {
  content: "";
  position: absolute;
  left: -3px;
  top: -5px;
  width: 16px;
  height: 15px;
  transform: rotate(-15deg);
  background: url("mandarin-tab-bow.v3.webp") center / contain no-repeat;
  pointer-events: none;
}
html[data-app-theme="theme-mandarin-time"] #app .su-calendar .su-day:is([data-day$="-01"], :last-child):not(.is-today)::after {
  content: "❄" / "";
  position: absolute;
  right: -2px;
  bottom: 0;
  color: #ac640f;
  font: 13px/1 system-ui, sans-serif;
  pointer-events: none;
}
html[data-app-theme="theme-mandarin-time"] #app .su-calendar .su-month-stats {
  padding: 9px 4px;
  border: 1px solid #c7a1e7 !important;
  background: linear-gradient(100deg, #f3e4ff, #fbf4ff, #f3e4ff) !important;
}
html[data-app-theme="theme-mandarin-time"] #app .su-calendar .su-today {
  position: relative;
  margin-block-start: clamp(11px, 2.7vw, 17px);
  max-width: 66%;
  padding: 7px 10px;
  background: #f6e6ff !important;
  color: #4c285e !important;
}
