:root.companion-theme {
  color-scheme: dark;
  background-color: #111724;
}

.companion-theme .panel-shell {
  margin: 0;
  min-height: 100vh;
  color: hsl(var(--foreground, 210 35% 96%));
  background-color: hsl(var(--background, 223 34% 10%));
  background-image: linear-gradient(150deg, hsl(var(--accent, 203 76% 55%) / 0.13), transparent 55%);
}

.companion-theme .panel-shell::after {
  content: none;
}

.companion-theme .companion-surface {
  color: hsl(var(--card-foreground, 210 35% 96%));
  background: hsl(var(--card, 221 35% 15%) / 0.96);
  border-color: hsl(var(--border, 218 22% 27%));
  box-shadow: 0 16px 48px rgb(0 0 0 / 0.24);
}

.companion-theme .companion-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.625rem 1rem;
  border-radius: 0.375rem;
  background: hsl(var(--primary, 192 96% 58%));
  color: hsl(var(--primary-foreground, 223 32% 8%));
  font-weight: 700;
  text-decoration: none;
}

.companion-theme .companion-primary:hover {
  background: hsl(192 96% 72%);
}

.companion-theme :is(a, button, summary, input, textarea):focus-visible {
  outline: 2px solid hsl(var(--ring, 192 96% 58%));
  outline-offset: 3px;
}

.companion-theme .panel-shell.companion-briefing {
  background-color: #080e19;
  background-image: linear-gradient(180deg, rgb(8 14 25 / 0.64), rgb(8 14 25 / 0.94)), url("/images/return-galaxy-1920.webp");
  background-position: center;
  background-size: cover;
}

.companion-theme .companion-briefing::before {
  content: none;
}

.companion-stage {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 1.5rem 1rem;
}

.companion-console {
  display: grid;
  gap: 1.25rem;
  width: min(100%, 35rem);
  min-width: 0;
  text-align: center;
}

.companion-masthead {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
}

.companion-emblem {
  display: block;
  width: 4.75rem;
  height: 4.75rem;
  object-fit: contain;
  margin-bottom: 0.35rem;
  filter: drop-shadow(0 0 1rem rgb(68 196 231 / 0.27));
}

.companion-kicker {
  color: #96deed;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.companion-kicker span {
  margin-inline: 0.25rem;
  color: #d8b87b;
}

.companion-masthead h1 {
  color: #f0f7fb;
  font-size: 2.125rem;
  font-weight: 700;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.companion-caption {
  color: #b3c2d1;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.companion-theme .companion-card {
  display: grid;
  gap: 1rem;
  min-width: 0;
  padding: 1.5rem;
  border: 1px solid #35495c;
  border-top-color: #548396;
  border-radius: 0.5rem;
  background: linear-gradient(160deg, rgb(25 39 55 / 0.98), rgb(15 24 37 / 0.98));
  box-shadow: 0 16px 48px rgb(0 0 0 / 0.4), inset 0 1px rgb(218 243 253 / 0.06);
}

.companion-card h2 {
  width: 100%;
  max-width: none;
  margin: 0;
  text-align: center;
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.35;
}

.companion-release-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: #c9d6e1;
  font-size: 0.875rem;
}

.companion-release-meta li + li::before {
  content: "/";
  margin-inline-end: 0.5rem;
  color: #d8b87b;
}

.companion-release-notes {
  color: #c8d6e1;
  font-size: 0.9375rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.companion-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.companion-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding-inline: 1rem;
  border: 1px solid #4e6275;
  border-radius: 0.375rem;
  color: #f0f7fb;
  text-decoration: none;
}

.companion-secondary:hover {
  background: #21374a;
}

.companion-return {
  justify-self: center;
  color: #bed4e3;
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.companion-theme details.companion-checksum {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 1px solid #35495c;
  border-radius: 0.375rem;
  background: #0e1927;
  color: #e1edf5;
  font-size: 0.875rem;
}

.companion-theme .companion-checksum > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.4rem 0.75rem;
  border: 0;
  border-radius: 0.375rem;
  background: #142536;
  color: #d8edf7;
  cursor: pointer;
  list-style: none;
}

.companion-theme .companion-checksum > summary:hover {
  background: #1c3347;
}

.companion-checksum > summary::-webkit-details-marker {
  display: none;
}

.companion-checksum > summary::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-inline-end: 1px solid currentColor;
  border-block-end: 1px solid currentColor;
  transform: translateY(-0.12rem) rotate(45deg);
}

.companion-checksum[open] > summary::after {
  transform: rotate(225deg);
}

.companion-theme .companion-checksum > code {
  display: block;
  margin: 0;
  padding: 0.75rem;
  border: 0;
  border-top: 1px solid #35495c;
  border-radius: 0 0 0.375rem 0.375rem;
  background: #0e1927;
  color: #d8edf7;
  font-size: 0.75rem;
  overflow-wrap: anywhere;
  white-space: normal;
  user-select: all;
}

.companion-identity {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid #35495c;
  border-radius: 0.375rem;
  background: #35495c;
  overflow: hidden;
}

.companion-identity > div {
  display: grid;
  gap: 0.25rem;
  padding: 0.8rem 0.75rem;
  background: #132231;
}

.companion-identity dt {
  color: #acbfd0;
  font-size: 0.8125rem;
}

.companion-identity dd {
  color: #eff6fa;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.companion-release-form label {
  text-align: left;
}

.companion-theme .companion-release-form :is(input:not([type="hidden"]), textarea) {
  width: 100%;
  min-width: 0;
  padding: 0.6rem 0.75rem;
  border: 1px solid #4d6275;
  border-radius: 0.375rem;
  background: #0e1927;
  color: #eff6fa;
}

@media (max-width: 440px) {
  .companion-theme .panel-shell.companion-briefing {
    background-image: linear-gradient(180deg, rgb(8 14 25 / 0.64), rgb(8 14 25 / 0.94)), url("/images/return-galaxy-960.webp");
  }

  .companion-masthead h1 { font-size: 1.875rem; }
  .companion-theme .companion-card { padding: 1.125rem; }
}
