/* Compact partner acknowledgement. The marks retain their original colours;
   their shared surface follows the selected planet, like the event buttons. */
.collaboration {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 55;
  width: 284px;
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--planet-border);
  border-radius: 3px;
  background: var(--planet-surface);
  box-shadow: inset 0 1px var(--planet-inset);
  color: var(--app-ink, #152b32);
  text-align: center;
}
.collaboration h2 {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .015em;
}
.collaboration-logos {
  display: grid;
  grid-template-columns: 66px 54px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}
.collaboration-logos a {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 52px;
  border-radius: 3px;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s ease;
}
.collaboration-logos a:hover { background-color: #fff4de40; }
.collaboration-logos a:focus-visible {
  outline: 2px solid var(--app-ink, #152b32);
  outline-offset: 3px;
}
.collaboration-logos img {
  display: block;
  object-fit: contain;
  width: 100%;
  height: 52px;
}
.collaboration-logos .partner-it { max-width: 110px; height: auto; }
.collaboration-logos .maptheory-partner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}
.collaboration-logos .partner-maptheory { width: 36px; height: 36px; }
.maptheory-partner span { font-size: 9px; font-weight: 700; line-height: 1.2; }
/* Allow room for three partner marks without shrinking the existing logos.
   Music attribution sits above the taller dock while music is playing. */
.credit { bottom: max(112px, calc(env(safe-area-inset-bottom) + 96px)); }
/* Compact layouts have full-width action stacks. Keep the partner dock below
   the Moon rather than covering those actions with a fixed badge. */
@media (max-width:700px), (max-aspect-ratio:7/5) {
  .collaboration {
    position: absolute;
    top: calc(419svh + min(100vw, 72svh) + 120px);
    bottom: auto;
  }
  .credit { bottom: max(16px, env(safe-area-inset-bottom)); }
}
/* Phones use a narrower surface with 44px link targets. */
@media (max-width:700px) {
  .collaboration {
    right: max(12px, env(safe-area-inset-right));
    width: 248px;
    padding: 6px;
  }
  .collaboration h2 { font-size: 9px; }
  .collaboration-logos {
    grid-template-columns: 56px 48px minmax(0, 1fr);
    gap: 12px;
  }
  .collaboration-logos a { min-height: 48px; }
  .collaboration-logos .partner-ai { height: 48px; }
  .collaboration-logos .partner-it { max-width: 100px; }
}
@media (max-width:700px) and (max-height:650px) {
  .collaboration { top: calc(484svh + min(100vw, 72svh) + 120px); }
}
@media (prefers-reduced-motion:reduce) {
  .collaboration-logos a { transition: none; }
}
