/* SkyBuddy · Sky 360° (see sky/sky.js) */
#sky-view { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #0b1a3a; color: #214d49; overflow: hidden; overscroll-behavior: none }
#sky-view::backdrop { background: #0b1a3a }
#sky-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none }
#sky-canvas:active { cursor: grabbing }
.sky-top { position: absolute; top: max(12px, env(safe-area-inset-top)); left: 12px; right: 12px; display: flex; align-items: center; gap: 10px; pointer-events: none }
.sky-top > * { pointer-events: auto }
.sky-top h2 { margin: 0; padding: 8px 14px; border-radius: 14px; background: #fffef7e6; font-size: clamp(14px, 2.4vw, 19px); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; pointer-events: none }
.sky-close, .sky-info-close { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 auto; padding: 0; border: 0; border-radius: 15px; background: #fffef7; color: #214d49; font-size: 30px; line-height: 1; box-shadow: 0 3px 0 #0003 }
.sky-motion { margin-left: auto; display: flex; align-items: center; gap: 6px; min-height: 48px; padding: 8px 14px; border: 0; border-radius: 15px; background: #fffef7; color: #214d49; font-size: 14px; font-weight: 800; box-shadow: 0 3px 0 #0003 }
.sky-motion[aria-pressed=true] { background: #287f6e; color: #fff }
.sky-motion[hidden] { display: none }
.sky-chips { position: absolute; top: 124px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 28px); display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; pointer-events: none }
.sky-chip-group { display: contents }
.sky-chips button { pointer-events: auto; min-height: 48px; padding: 10px 16px; border: 1px solid #ffffff80; border-radius: 24px; background: #fffef7ee; color: #214d49; font: inherit; font-size: 15px; font-weight: 800; box-shadow: 0 3px 0 #0002; cursor: pointer }
.sky-chips button:active:not(:disabled) { transform: translateY(2px) }
.sky-chips .sky-stars { background: #24305e; color: #fff8dc; border-color: #ffffff40 }
.sky-chips .sky-stars[aria-pressed=true] { background: #fff1b8; color: #6b4d0f }
.sky-chips .sky-find { position: static; transform: none }
.sky-chips .sky-find:active:not(:disabled) { transform: translateY(2px) }
.sky-mission { position: absolute; right: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); margin: 0; padding: 10px 14px; border-radius: 18px; background: #fff5d8f2; color: #6b4d0f; font-size: 16px; font-weight: 800; box-shadow: 0 3px 0 #0002; display: flex; gap: 8px; align-items: center }
.sky-mission[hidden] { display: none }
.sky-mission span { font-size: 22px; opacity: .55 } .sky-mission span[data-got=true] { opacity: 1 }
.sky-find { position: absolute; top: 124px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 28px); min-height: 48px; padding: 10px 18px; border: 1px solid #ffffff80; border-radius: 24px; background: #fffef7ee; color: #214d49; font-size: 14px; font-weight: 800; box-shadow: 0 3px 0 #0002 }
.sky-find:active:not(:disabled) { transform: translate(-50%, 2px) }
.sky-find:disabled { opacity: .85 }
.sky-observer-toggle { position: absolute; left: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: 48px; height: 48px; border: 2px solid #fffef7; border-radius: 15px; background: #fffef7e6; font-size: 24px; color: #214d49; box-shadow: 0 3px 0 #0003 }
.sky-observer-toggle[aria-pressed=true] { background: #287f6e; color: white }
.sky-info { z-index: 2 }
.sky-hint { position: absolute; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 8px); width: max-content; max-width: calc(100vw - 32px); margin: 0; padding: 10px 16px; border-radius: 16px; background: #fffef7f0; font-size: 15px; font-weight: 800; text-align: center; opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none }
.sky-hint.show { opacity: 1; transform: translate(-50%, 0) }
#sky-view:has(.sky-mission:not([hidden])) .sky-hint { bottom: calc(138px + env(safe-area-inset-bottom)) } /* above the "find" mission, never over it */
.sky-pad { position: absolute; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, 52px); gap: 8px }
.sky-pad button { height: 52px; padding: 0; border: 0; border-radius: 15px; background: #fffef7e6; color: #214d49; font-size: 24px; font-weight: 900; box-shadow: 0 3px 0 #0003 }
.sky-pad button:active, .sky-close:active, .sky-motion:active { transform: translateY(2px); box-shadow: 0 1px 0 #0003 }
.sky-info { position: absolute; left: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: min(420px, calc(100vw - 260px)); display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 20px; background: #fffef7; box-shadow: 0 6px 0 #0003 }
.sky-info[hidden] { display: none }
.sky-info-icon { font-size: 34px; line-height: 1 }
.sky-info div { flex: 1; min-width: 0 }
.sky-info b { display: block; font-size: 18px; letter-spacing: -.02em }
.sky-info small { display: block; margin-top: 2px; color: #5b7c78; font-size: 13px; font-weight: 700 }
.sky-info p { margin: 6px 0 0; font-size: 15px; line-height: 1.4 }
.sky-info-close { width: 40px; height: 40px; font-size: 24px; background: #edf4ef; box-shadow: none }
.sky-note { position: absolute; left: 50%; top: calc(max(12px, env(safe-area-inset-top)) + 58px); transform: translateX(-50%); max-width: calc(100vw - 32px); margin: 0; padding: 0 12px; border-radius: 12px; background: #fffef7cc; font-size: 13px; font-weight: 700; text-align: center; line-height: 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.sky-note:empty { display: none }
body.sky-looking #moment, body.sky-looking #notice { visibility: hidden }
/* The way in: a bright round button among the map tools */
#tools #sky-open { background: #287f6e; color: #fff; border-radius: 50% }
#tools #sky-open:hover { background: #1f6a5c }
#tools #sky-open .label { display: none }
#sky-open .icon { width: 24px; height: 24px; stroke-width: 2 }
@media (max-width: 760px) {
  #tools #sky-open { position: fixed; right: 23px; top: 240px; bottom: auto; z-index: 3; width: auto; min-width: 56px; height: 56px; padding: 0 16px; gap: 6px; display: flex; align-items: center; border-radius: 28px; box-shadow: 0 4px 0 #1d6258; font-size: 14px; font-weight: 800 }
  #tools #sky-open .label { display: inline }
  body.card-open #tools #sky-open, body.sleeping #tools #sky-open { display: none }
  .sky-motion .label { display: none }
  .sky-pad { grid-template-columns: repeat(4, 48px); gap: 6px } .sky-pad button { height: 48px }
  .sky-info { left: 10px; right: 10px; width: auto; bottom: calc(70px + env(safe-area-inset-bottom)) }
  .sky-hint { bottom: calc(72px + env(safe-area-inset-bottom)) }
  .sky-note { width: max-content; white-space: normal; line-height: 1.35; padding: 6px 12px }
}
@media (prefers-reduced-motion: reduce) { .sky-hint { transition: none } }
