/* Phone geometry takes precedence regardless of module stylesheet order. */
#cosmic-preview-workspace {
  grid-template-columns: minmax(0, 402px) 280px;
  gap: 48px;
  padding: 32px 24px;
}
#cosmic-preview-workspace > .device {
  grid-column: 1;
  grid-row: 1;
  border-radius: 48px;
  height: 874px;
}
#cosmic-preview-settings {
  display: block !important;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  padding: 22px;
  border: 1px solid #ffffff14;
  border-radius: 22px;
  background: #120e1b;
}
#cosmic-preview-settings
  > :is(.brand, h1, .intro, .notice, .legend, #size-help) {
  display: none;
}
#cosmic-preview-settings [hidden],
#cosmic-preview-settings:not([data-context='shared']) > .tmp-today-qa {
  display: none !important;
}
#cosmic-preview-settings .cc-preview-heading small {
  color: #b7a3c6;
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 700;
}
#cosmic-preview-settings h2 {
  margin: 12px 0 10px;
  color: #eee5f4;
  font-size: 21px;
  letter-spacing: -0.5px;
}
#cosmic-preview-settings .cc-preview-heading p,
#cosmic-preview-settings .pp-review p {
  font-size: 12px;
  line-height: 1.6;
  color: #a99bb6;
}
#cosmic-preview-settings .control {
  font-size: 11px;
  line-height: 1.5;
}
#cosmic-preview-settings select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 10px;
  color: #e9ddf2;
  border: 1px solid #ffffff20;
  border-radius: 10px;
  background: #1d1628;
  font: inherit;
}
#cosmic-preview-settings .options {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #ffffff12;
}
#cosmic-preview-settings .options button {
  min-height: 40px;
  font-size: 11px;
}
#cosmic-preview-settings[data-context='personal']
  > .control:not(.sky-qa-control):not(.cc-preview-navigation),
#cosmic-preview-settings[data-context='ask']
  > .control:not(.ask-qa-control):not(.ask-qa-state):not(
    .cc-preview-navigation
  ),
#cosmic-preview-settings:not([data-context='personal']) > .sky-qa-control,
#cosmic-preview-settings:not([data-context='personal']) > .pp-review,
#cosmic-preview-settings:not([data-context='ask'])
  > :is(.ask-qa-control, .ask-qa-state),
#cosmic-preview-settings[data-context='personal'] #plus {
  display: none;
}
#cosmic-preview-settings .pp-review {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid #ffffff12;
}
#cosmic-preview-settings .pp-review summary {
  min-height: 40px;
  font-size: 11px;
  cursor: pointer;
}
#cosmic-preview-settings .pp-review > div {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-top: 12px;
}
#cosmic-preview-settings .pp-review label {
  display: grid;
  flex: 1;
  gap: 6px;
  font-size: 11px;
}
#cosmic-preview-settings .pp-review button {
  min-height: 42px;
  padding: 10px;
  border: 1px solid #ffffff24;
  border-radius: 10px;
  background: #241a30;
  color: #e8d8f2;
  cursor: pointer;
}
.device :is(.pp-review, .sky-fixture-ribbon) {
  display: none !important;
}
.device[data-personal-preview] {
  background:
    radial-gradient(circle 1px at 12% 88px, #ffffff55 99%, transparent 100%),
    radial-gradient(circle 1.5px at 82% 148px, #ffffff3d 99%, transparent 100%),
    #100c18;
}
.device[data-personal-preview]::before,
.device[data-personal-preview]::after {
  content: '';
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  pointer-events: none;
}
.device[data-personal-preview]::before {
  top: -115px;
  right: -140px;
  background: #9b6dff22;
}
.device[data-personal-preview]::after {
  bottom: -120px;
  left: -150px;
  background: #ff6fae1a;
}
.device[data-personal-preview] #screen,
.device[data-personal-preview] #screen .sky-screen {
  background: transparent;
}
.device[data-personal-preview] #screen {
  /* The legacy renderer paints the same orbs relative to the scrollport. */
  background-image: none !important;
}
.device > #screen {
  z-index: 1;
}
/* The navigation belongs to the phone's scrollport, including when the page
   scrolls down to prototype controls on a narrow browser. */
.device #screen > .bottom-nav {
  position: sticky;
  left: auto;
  width: 100%;
  transform: none;
}
.device .pp-view {
  padding-top: 3px;
}
.device .pp-page-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 49px;
  padding-bottom: 5px;
  margin: 0 0 6px;
}
.device .pp-brand-art {
  position: relative;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
}
.device .pp-brand-art img {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}
.device .pp-brand-art::before {
  content: none;
}
/* Keep the native header's ambient light outside the inset scrollport, so its
   fade continues behind the system bar instead of ending at its lower edge. */
.cc-brand-ambient {
  position: absolute;
  width: 320px;
  height: 320px;
  pointer-events: none;
}
.device .pp-page-head h1 {
  position: static;
}
/* Chrome stays outside the scrollable app, as it does on a real device. */
.device[data-system-preview] {
  padding-top: 62px;
}
.device[data-system-preview] > #screen {
  height: 810px !important;
  min-height: 0;
  overflow: auto;
}
.cc-system-preview {
  position: absolute;
  inset: 0 0 auto;
  height: 62px;
  padding: 20px 32px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
  z-index: 100;
  color: #f6eef8;
}
.cc-system-preview time {
  font:
    600 16px/20px -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}
.cc-system-preview::after {
  content: '';
  position: absolute;
  top: 11px;
  left: calc(50% - 63px);
  width: 126px;
  height: 37px;
  border-radius: 19px;
  background: #000;
}
.device:not([data-system-preview]) {
  padding-top: env(safe-area-inset-top, 0px);
}
.cc-home-preview {
  position: absolute;
  width: 134px;
  height: 5px;
  border-radius: 99px;
  bottom: 8px;
  left: calc(50% - 67px);
  background: #ffffffd9;
  pointer-events: none;
  z-index: 100;
}
.device:not([data-system-preview]) .cc-home-preview {
  display: none;
}
@media (max-width: 820px) {
  #cosmic-preview-workspace {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 0 0 24px;
  }
  #cosmic-preview-workspace > .device {
    order: 0;
    max-width: 402px;
    flex-shrink: 0;
  }
  #cosmic-preview-settings {
    position: static;
    order: 1;
    width: min(100% - 32px, 402px);
    max-width: none;
    margin: 0;
  }
}
@media (pointer: coarse) and (max-width: 820px) {
  #cosmic-preview-workspace > .device {
    height: 100svh;
    border: none;
    border-radius: 0;
  }
  .device:not([data-system-preview]) > #screen {
    height: calc(100svh - env(safe-area-inset-top, 0px));
    min-height: 0;
    overflow: auto;
  }
}
