html,
body.sun-page {
  height: 100%;
}

body.sun-page {
  overflow: hidden;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -o-user-select: none;
  user-select: none;
}

body.sun-page .sun-shell {
  --sun-zoom-strip: 16px;
  --sun-panel-top: 60px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.sun-shell {
  --sun-zoom-size: 40px;
  --sun-corner-bottom: calc(var(--sun-status-block, 55px) + 12px + env(safe-area-inset-bottom, 0px));
  --sun-corner-inset: calc(12px + env(safe-area-inset-right, 0px));
}

@media (pointer: coarse) {
  .sun-shell {
    --sun-zoom-size: 44px;
  }
}

html.sun-narrow .sun-shell {
  --sun-corner-bottom: calc(var(--sun-status-block, 55px) + 8px + 48px + 12px + env(safe-area-inset-bottom, 0px));
}

.sun-shell.is-zoom-dock {
  --sun-zoom-size: 48px;
  --sun-corner-inset: calc(env(safe-area-inset-right, 0px) + var(--sun-zoom-size) / 2 - 24px);
}

.sun-shell.is-zoom-lifted {
  --sun-zoom-lift: 60px;
}

html.sun-narrow .sun-shell.is-zoom-lifted {
  --sun-zoom-lift: 108px;
}

.sun-header {
  flex: 0 0 auto;
}

.wrapper.sun-frame {
  flex: 1 1 auto;
  align-self: center;
  width: min(var(--wrapper-max), calc(100% - 2 * var(--wrapper-pad)));
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.sun-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}

.sun-body {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.sun-status {
  flex: 0 0 auto;
  background: var(--chrome-bg);
  border-top: 1px solid var(--chrome-line);
}

.sun-status-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 16px;
  padding-top: 5px;
  padding-bottom: 9px;
}

.sun-panel {
  position: absolute;
  top: var(--sun-panel-top);
  bottom: var(--sun-zoom-strip);
  width: max-content;
  overflow: auto;
  z-index: 4;
  box-sizing: border-box;
  background: var(--panel-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sun-dates {
  left: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.sun-dates .sun-panel-sheet {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.sun-layers-scrim {
  display: none;
}

.sun-layers {
  --layers-panel-width: 20rem;
  right: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sun-layers .sun-panel-sheet {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

@property --sun-corner-inset {
  syntax: '<length>';
  inherits: true;
  initial-value: 12px;
}

@property --sun-corner-bottom {
  syntax: '<length>';
  inherits: true;
  initial-value: 12px;
}

@property --panel-content {
  syntax: '<number>';
  inherits: true;
  initial-value: 1;
}

@property --panel-icon {
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}

.sun-panel-edge {
  display: none;
  opacity: var(--panel-icon, 0);
  pointer-events: none;
}

.sun-panel-sheet {
  opacity: var(--panel-content, 1);
}

.sun-panel-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.sun-panel-close span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 1.6px;
  margin-left: -7px;
  margin-top: -0.8px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 200ms ease;
}

.sun-panel-close span:first-child {
  transform: translateY(0) rotate(45deg);
}

.sun-panel-close span:last-child {
  transform: translateY(0) rotate(-45deg);
}

@media (hover: hover) {
  .sun-dates .sun-panel-close:hover span:first-child {
    transform: translateY(5px) rotate(45deg);
  }

  .sun-dates .sun-panel-close:hover span:last-child {
    transform: translateY(-5px) rotate(-45deg);
  }

  .sun-layers .sun-panel-close:hover span:first-child {
    transform: translateY(-5px) rotate(45deg);
  }

  .sun-layers .sun-panel-close:hover span:last-child {
    transform: translateY(5px) rotate(-45deg);
  }
}

.sun-icon {
  display: block;
  overflow: hidden;
}

.sun-cal-pin {
  transition: transform 160ms ease-out;
}

.sun-icon-layer {
  transition: transform 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .sun-panel.is-collapsed .sun-panel-edge:hover .sun-cal-pin,
  html.sun-narrow .sun-panel:not(.is-open):not(.is-morph) .sun-panel-edge:hover .sun-cal-pin {
    transform: translateY(-1.5px);
  }

  .sun-panel.is-collapsed .sun-panel-edge:hover .sun-icon-layer-top,
  html.sun-narrow .sun-panel:not(.is-open):not(.is-morph) .sun-panel-edge:hover .sun-icon-layer-top {
    transform: translateY(-2px);
  }

  .sun-panel.is-collapsed .sun-panel-edge:hover .sun-icon-layer-bottom,
  html.sun-narrow .sun-panel:not(.is-open):not(.is-morph) .sun-panel-edge:hover .sun-icon-layer-bottom {
    transform: translateY(2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sun-panel-close span,
  .sun-cal-pin,
  .sun-icon-layer {
    transition: none;
  }

  .sun-panel-edge:hover .sun-cal-pin,
  .sun-panel-edge:hover .sun-icon-layer-top,
  .sun-panel-edge:hover .sun-icon-layer-bottom {
    transform: none;
  }
}

.sun-panel.is-collapsed,
html.sun-narrow .sun-panel:not(.is-open):not(.is-morph) {
  --panel-content: 0;
  --panel-icon: 1;
  position: fixed;
  top: auto;
  bottom: var(--sun-corner-bottom);
  width: 48px;
  height: 48px;
  margin: 0;
  z-index: 7;
  overflow: visible;
  box-sizing: border-box;
  background: var(--panel-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

html.sun-narrow:has(.sun-layers.is-open) .sun-dates:not(.is-open):not(.is-morph) {
  z-index: 1200;
}

.sun-dates.is-collapsed,
html.sun-narrow .sun-dates:not(.is-open):not(.is-morph) {
  left: var(--sun-corner-inset);
  right: auto;
}

.sun-layers.is-collapsed,
html.sun-narrow .sun-layers:not(.is-open):not(.is-morph) {
  right: var(--sun-corner-inset);
  left: auto;
}

.sun-panel.is-collapsed .sun-panel-sheet,
html.sun-narrow .sun-panel:not(.is-open):not(.is-morph) .sun-panel-sheet {
  visibility: hidden;
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
}

.sun-panel.is-collapsed .sun-panel-edge,
html.sun-narrow .sun-panel:not(.is-open):not(.is-morph) .sun-panel-edge,
.sun-panel.is-morph .sun-panel-edge {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: 0;
  z-index: 2;
  box-sizing: border-box;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: inherit;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  writing-mode: horizontal-tb;
  box-shadow: none;
  transform: none;
}

.sun-panel.is-collapsed .sun-panel-edge,
html.sun-narrow .sun-panel:not(.is-open):not(.is-morph) .sun-panel-edge {
  pointer-events: auto;
}

.sun-panel-edge svg {
  display: block;
  width: 22px;
  height: 22px;
}

.sun-panel.is-collapsed .sun-panel-edge::after,
html.sun-narrow .sun-panel:not(.is-open):not(.is-morph) .sun-panel-edge::after {
  content: attr(aria-label);
  position: absolute;
  bottom: calc(100% + 8px);
  z-index: 8;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--text);
  color: var(--panel-bg);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  writing-mode: horizontal-tb;
}

.sun-dates.is-collapsed .sun-panel-edge::after,
html.sun-narrow .sun-dates:not(.is-open):not(.is-morph) .sun-panel-edge::after {
  left: 0;
}

.sun-layers.is-collapsed .sun-panel-edge::after,
html.sun-narrow .sun-layers:not(.is-open):not(.is-morph) .sun-panel-edge::after {
  right: 0;
}

.sun-panel.is-collapsed .sun-panel-edge:focus-visible,
html.sun-narrow .sun-panel:not(.is-open):not(.is-morph) .sun-panel-edge:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sun-panel.is-collapsed .sun-panel-edge:focus-visible::after,
html.sun-narrow .sun-panel:not(.is-open):not(.is-morph) .sun-panel-edge:focus-visible::after {
  opacity: 1;
}

.sun-panel.is-morph {
  z-index: 8;
  overflow: hidden;
  margin: 0;
  transform-origin: 0 0;
}

html.sun-narrow .sun-panel.is-morph {
  z-index: 1100;
}

body[data-theme="dark"] .sun-panel.is-morph {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.sun-panel.is-morph .sun-panel-sheet {
  visibility: visible;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .sun-panel.is-collapsed .sun-panel-edge:hover::after,
  html.sun-narrow .sun-panel:not(.is-open):not(.is-morph) .sun-panel-edge:hover::after {
    opacity: 1;
  }
}

@media (hover: hover) {
  .sun-panel-close:hover,
  .sun-panel.is-collapsed .sun-panel-edge:hover,
  html.sun-narrow .sun-panel:not(.is-open):not(.is-morph) .sun-panel-edge:hover {
    background: var(--page-bg);
  }

  body[data-theme="dark"] .sun-panel.is-collapsed .sun-panel-edge:hover,
  html.sun-narrow body[data-theme="dark"] .sun-panel:not(.is-open):not(.is-morph) .sun-panel-edge:hover {
    background: color-mix(in srgb, var(--text) 12%, transparent);
  }
}

.right {
  float: right;
}

#Sun3d {
  z-index: -1;
  position: fixed;
  padding: 0;
  margin: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--page-bg);
  background-image: none;
}

@media (max-width: 960px) {
  .sun-panel.is-open,
  .sun-panel.is-morph {
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    bottom: auto;
    width: 100%;
    height: 100%;
    z-index: 1100;
    box-sizing: border-box;
    background: var(--panel-bg);
    border-radius: 0;
    box-shadow: none;
  }

  .sun-panel.is-open {
    overflow: auto;
  }

  .sun-panel.is-open.is-morph {
    overflow: hidden;
  }

  .sun-layers.is-open,
  .sun-layers.is-morph {
    left: auto;
    right: 0;
    width: min(100%, var(--layers-panel-width, 20rem));
    overflow: hidden;
    box-shadow: var(--shadow);
    touch-action: pan-y;
  }

  .sun-layers.is-open *,
  .sun-layers.is-morph * {
    touch-action: pan-y;
  }

  .sun-dates.is-open {
    touch-action: pan-y;
  }

  .sun-layers.is-open:not(.is-morph) + .sun-layers-scrim {
    display: block;
    position: fixed;
    z-index: 1099;
    top: 0;
    bottom: 0;
    left: 0;
    width: calc(100% - min(100%, var(--layers-panel-width, 20rem)));
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .sun-panel.is-open .sun-panel-sheet,
  .sun-panel.is-morph .sun-panel-sheet {
    visibility: visible;
    position: relative;
    inset: auto;
    width: auto;
    min-height: 100%;
    overflow: auto;
    pointer-events: auto;
    box-sizing: border-box;
    padding: 3.25rem 1rem 1rem;
  }

  .sun-panel.is-morph .sun-panel-sheet {
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    min-height: 0;
    overflow: hidden;
    pointer-events: none;
  }

  .sun-layers.is-open .sun-panel-sheet,
  .sun-layers.is-morph .sun-panel-sheet {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 0;
  }

  .sun-layers.is-open .layers-card {
    width: 100%;
  }

  .sun-dates.is-open .sun-panel-sheet {
    overflow: visible;
  }

  .sun-panel-close {
    display: none;
  }

  .sun-panel.is-open .sun-panel-close,
  .sun-panel.is-morph .sun-panel-close {
    display: inline-flex;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 2.25rem;
    height: 2.25rem;
  }

  body.sun-panel-open #sun-body {
    pointer-events: none;
  }
}
