.app-top-chrome-stack{
  grid-row: 1;
  grid-column: 1;
  position: sticky;
  align-self: start;
  left: 12px;
  right: 12px;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  justify-self: center;
  z-index: 3300;
  width: min(
    calc(100% - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)),
    720px
  );
  display: grid;
  gap: 8px;
  pointer-events: none;
  box-sizing: border-box;
}

#appSurfaceStage{
  position: relative;
  z-index: 1;
}

html[data-app-surface-bundle="calendar-surface"] body:not(.discover-mode):not(.feed-mode) .app-top-chrome-stack,
body.calendar-mode-list:not(.discover-mode):not(.feed-mode) .app-top-chrome-stack,
body.calendar-mode-grid:not(.discover-mode):not(.feed-mode) .app-top-chrome-stack,
body.workflow-screen-open .app-top-chrome-stack{
  display: grid;
}

body.workflow-screen-open .app-top-chrome-stack{
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  left: auto;
  right: auto;
  transform: none;
  align-self: auto;
}

html[data-app-surface-bundle="events-surface"] .app-top-chrome-stack,
html[data-app-surface-bundle="discover-surface"] .app-top-chrome-stack,
body:is(.feed-mode, .discover-mode) .app-top-chrome-stack{
  position: static;
  left: auto;
  right: auto;
  top: auto;
  z-index: auto;
  display: contents;
}

html[data-app-surface-bundle="calendar-surface"] body:not(.discover-mode):not(.feed-mode) .calendar-theme-banner,
body.calendar-mode-list:not(.discover-mode):not(.feed-mode) .calendar-theme-banner,
body.calendar-mode-grid:not(.discover-mode):not(.feed-mode) .calendar-theme-banner{
  position: relative;
  left: auto;
  right: auto;
  top: 0;
  width: 100%;
  z-index: 1;
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
  border: 1px solid color-mix(in srgb, var(--surface-6) 28%, rgba(255,255,255,0.10));
  border-radius: 24px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  will-change: transform;
}

.calendar-theme-banner{
  grid-row: 1;
  position: relative;
  left: auto;
  right: auto;
  top: 0;
  z-index: 1;
  box-sizing: border-box;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
  border: 1px solid color-mix(in srgb, var(--surface-6) 28%, rgba(255,255,255,0.10));
  border-radius: 24px;
  color: var(--text-main);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  contain: layout paint;
  pointer-events: auto;
}

.calendar-theme-banner.ui-shell-hidden,
.calendar-theme-banner[hidden]{
  display: none !important;
}

.calendar-theme-banner.is-skeleton{
  pointer-events: none;
}

.calendar-theme-banner .banner-skeleton{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calendar-theme-banner:not(.is-skeleton) .banner-skeleton{
  display: none !important;
}

.calendar-theme-banner.is-skeleton .banner-top,
.calendar-theme-banner.is-skeleton .banner-actions{
  display: none !important;
}

.calendar-theme-banner .banner-skeleton-top{
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
}

.calendar-theme-banner .banner-skeleton-avatar{
  width: 36px;
  height: 36px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.calendar-theme-banner .banner-skeleton-title{
  width: min(180px, 68%);
  height: 13px;
  border-radius: 999px;
}

.calendar-theme-banner .banner-skeleton-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-theme-banner .banner-skeleton-chip{
  width: 72px;
  height: 24px;
  border-radius: 999px;
}

.calendar-theme-banner .banner-skeleton-avatar,
.calendar-theme-banner .banner-skeleton-title,
.calendar-theme-banner .banner-skeleton-chip{
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.34) 45%,
    rgba(255, 255, 255, 0.16) 100%
  );
  background-size: 240% 100%;
  animation: banner-skeleton-shimmer 1.2s linear infinite;
}

@keyframes banner-skeleton-shimmer{
  0% { background-position: 100% 0; }
  100% { background-position: -120% 0; }
}

.calendar-theme-banner .banner-top{
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  grid-column: 1 / -1;
}

.calendar-theme-banner .banner-top .banner-text:first-child{
  grid-column: 1 / -1;
  text-align: center;
}

.calendar-theme-banner .banner-avatar{
  width: 52px;
  height: 52px;
  border-radius: 999px;
  flex: 0 0 auto;
  background-image: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.07));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 8px 22px rgba(0, 0, 0, 0.32);
  border: 1px solid color-mix(in srgb, var(--surface-6) 28%, rgba(255,255,255,0.14));
}

.calendar-theme-banner .banner-text{
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  text-align: left;
  flex-direction: column;
  gap: 3px;
}

.calendar-theme-banner .banner-title-row{
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 22px;
  text-align: left;
}

.calendar-theme-banner .banner-title-anchor{
  position: relative;
  display: inline-block;
  vertical-align: top;
  min-width: 0;
  max-width: 100%;
}

.calendar-theme-banner .banner-title{
  display: block;
  min-width: 0;
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-theme-banner .banner-meta-row{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px 10px;
  min-width: 0;
}

.calendar-theme-banner .banner-meta{
  font-size: 12px;
  line-height: 1.35;
  opacity: 0.78;
}

.calendar-theme-banner .banner-relation-stats{
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  justify-self: end;
  gap: 10px;
  min-width: 0;
  text-align: right;
}

.calendar-theme-banner .banner-relation-stats.ui-shell-hidden,
.calendar-theme-banner .banner-relation-stats.is-empty{
  display: none !important;
}

.calendar-theme-banner .banner-relation-stat{
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-main);
  font: inherit;
  font-size: 12px;
  line-height: 1.35;
  opacity: 0.78;
  white-space: nowrap;
  cursor: default;
}

.calendar-theme-banner button.banner-relation-stat:not(:disabled):not(.is-static){
  cursor: pointer;
}

.calendar-theme-banner button.banner-relation-stat:disabled{
  color: var(--text-main);
}

.calendar-theme-banner button.banner-relation-stat:not(:disabled):not(.is-static):hover .label{
  text-decoration: underline;
  text-underline-offset: 2px;
}

.calendar-theme-banner .banner-relation-stat .count{
  font-weight: 700;
  opacity: 0.92;
}

.calendar-theme-banner .banner-relation-stat .label{
  opacity: 0.82;
}

.calendar-theme-banner .banner-desc{
  display: block;
  min-width: 0;
}

.calendar-theme-banner .banner-desc-text{
  display: block;
  font-size: 13px;
  line-height: 1.35;
  opacity: 0.82;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.calendar-theme-banner .banner-desc.is-slots-legend{
  margin-top: 2px;
}

.calendar-theme-banner .banner-desc-text.is-slots-legend{
  display: grid;
  gap: 4px;
  opacity: 0.88;
}

.calendar-theme-banner .banner-profile-link{
  display: inline-block;
  align-self: flex-start;
  max-width: min(280px, 100%);
  min-width: 0;
  color: var(--accent-blue);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.calendar-theme-banner .banner-profile-link:hover,
.calendar-theme-banner .banner-profile-link:focus-visible{
  text-decoration: underline;
}

.calendar-theme-banner .banner-profile-link.ui-shell-hidden,
.calendar-theme-banner .banner-profile-link[hidden]{
  display: none !important;
}

.calendar-theme-banner .banner-slot-legend-line{
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
  line-height: 1.25;
}

.calendar-theme-banner .banner-slot-legend-dot{
  width: 9px;
  height: 9px;
  border-radius: 999px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.calendar-theme-banner .banner-slot-legend-label{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-theme-banner .banner-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  grid-column: 1 / -1;
  min-width: 0;
}

.calendar-theme-banner .banner-actions.is-empty{
  display: none;
}

.calendar-theme-banner .banner-actions .banner-action-btn{
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--surface-6) 22%, rgba(255,255,255,0.10));
  border-radius: var(--btn-radius);
  background: color-mix(in srgb, var(--surface-2) 68%, transparent);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  pointer-events: auto;
}

.calendar-theme-banner .banner-actions .banner-action-btn:disabled{
  opacity: 0.56;
  cursor: default;
}

.calendar-theme-banner .banner-actions .banner-subscribers-btn{
  position: relative;
}

.calendar-theme-banner .banner-badge{
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent-red);
  color: var(--text-main-inverse);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
}

.calendar-theme-banner .banner-actions .banner-share-toggle{
  gap: 6px;
}

.calendar-theme-banner .banner-actions .calendar-tool-caption{
  display: inline-block;
}

.calendar-theme-banner.snapshot-text-mode .banner-actions > *{
  display: none;
}

.calendar-theme-banner.snapshot-text-mode #calendarShareToggle{
  display: inline-flex;
}

.calendar-theme-banner .snapshot-tools-row{
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.calendar-theme-banner .snapshot-range-row{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 720px) {
  .calendar-theme-banner{
    left: 10px;
    right: 10px;
    grid-template-columns: minmax(0, 1fr);
    padding-left: 12px;
    padding-right: 12px;
  }

  .calendar-theme-banner .banner-top{
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
  }

  .calendar-theme-banner .banner-top .banner-text:first-child{
    text-align: center;
  }

  .calendar-theme-banner .banner-avatar{
    width: 44px;
    height: 44px;
  }

  .calendar-theme-banner .banner-title{
    font-size: 16px;
  }

  .calendar-theme-banner .banner-relation-stats{
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-end;
    justify-self: end;
    gap: 3px 10px;
    text-align: right;
  }

  .calendar-theme-banner .banner-relation-stat{
    justify-content: flex-end;
  }

  .calendar-theme-banner .banner-desc-text{
    font-size: 12px;
    line-height: 1.3;
  }

  .calendar-theme-banner .banner-actions{
    justify-content: flex-start;
    padding-left: 54px;
  }
}
