/* The sky and seasons panel. Owner: J44. Sits top left; the joystick is bottom left, well clear of it. */
.sky {
  position: absolute;
  left: calc(env(safe-area-inset-left) + 14px);
  top: calc(env(safe-area-inset-top) + 14px);
  z-index: 30;
  transition: opacity .3s ease;
}
.sky.sky-away, #ui.title-on .sky { opacity: 0; visibility: hidden; }

.sky-btn {
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; padding: 0;
  border: 0; border-radius: 50%;
  background: rgba(251, 240, 226, .92);
  box-shadow: 0 0 0 2px rgba(251, 240, 226, .75), 0 6px 18px rgba(74, 63, 74, .16);
  pointer-events: auto;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.sky-btn:hover { background: #fff6e8; }
.sky-open .sky-btn { background: #ffe9ae; }

.sky-panel {
  position: absolute;
  left: 0; top: 66px;
  width: min(452px, calc(100vw - 28px - env(safe-area-inset-left) - env(safe-area-inset-right)));
  max-height: calc(100vh - 94px - env(safe-area-inset-top));
  max-height: calc(100dvh - 94px - env(safe-area-inset-top));
  overflow-y: auto;
  padding: 12px 14px 14px;
  border-radius: 24px;
  background: rgba(251, 240, 226, .95);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .55), 0 10px 30px rgba(74, 63, 74, .18);
  color: var(--ink);
  pointer-events: auto;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .24s ease, transform .24s ease, visibility 0s linear .24s;
}
.sky-open .sky-panel {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity .24s ease, transform .24s ease, visibility 0s;
}
.sky-calm .sky-btn, .sky-calm .sky-panel, .sky-calm .sky-choice, .sky-calm { transition-duration: .001s; transition-delay: 0s; }
.sky-calm .sky-panel { transform: none; }

.sky-h {
  margin: 2px 4px 7px;
  font-size: 14px; font-weight: 700; letter-spacing: .02em;
  opacity: .72;
}
.sky-row + .sky-h { margin-top: 12px; }
.sky-row { display: grid; gap: 7px; }
.sky-seasons { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sky-times { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.sky-choice {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 72px; padding: 6px 3px;
  border: 0; border-radius: 16px;
  background: rgba(255, 255, 255, .62);
  color: var(--ink);
  font: 600 14px/1.14 var(--font);
  cursor: pointer;
  transition: background-color .22s ease, box-shadow .22s ease;
}
.sky-choice:hover { background: rgba(255, 255, 255, .95); }
.sky-choice[aria-pressed="true"] {
  background: #ffe9ae;
  box-shadow: inset 0 0 0 2.5px #f5c869;
}
.sky-icon { font-size: 26px; line-height: 1.1; }
.sky-swatch {
  width: 28px; height: 28px; border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7);
}
.sky-label { display: block; text-align: center; }

.sky-btn:focus-visible, .sky-choice:focus-visible {
  outline: 3px solid #b77a9b;
  outline-offset: 2px;
}

.sky-note { display: none; margin: 9px 4px 0; font-size: 14px; line-height: 1.25; opacity: .8; }
.sky-note.show { display: block; }

/* Phones: the five seasons go 3 + 2, with the calendar taking the wide place, and times 2 + 2. */
@media (max-width: 480px) {
  .sky-seasons { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .sky-seasons .sky-choice { grid-column: span 2; }
  .sky-seasons .sky-calendar { grid-column: span 4; flex-direction: row; gap: 8px; }
  .sky-seasons .sky-choice { min-height: 64px; }
  .sky-times { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sky-times .sky-choice { flex-direction: row; gap: 8px; min-height: 52px; }
  .sky-times .sky-swatch { width: 22px; height: 22px; flex: none; }
}
