.proto-popup {
  box-sizing: border-box;
  width: min(440px, calc(100vw - var(--space-8)));
  max-height: calc(100dvh - var(--space-8));
  margin: auto;
  padding: var(--space-8);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--tacet-radius-2xl);
  background: var(--background);
  color: var(--foreground);
  font: 400 1rem/1.5 var(--font-body);
  text-align: left;
}
.proto-popup::backdrop {
  background: color-mix(in srgb, var(--ink-deep), transparent 55%);
}
.proto-popup [hidden],
.proto-popup-launcher[hidden] {
  display: none !important;
}
.proto-popup h2 {
  margin: var(--space-6) 0 var(--space-3);
  font-size: var(--text-2xl);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.proto-popup p {
  margin: 0 0 var(--space-4);
  color: var(--muted-foreground);
}
.proto-popup__heading {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
}
.proto-popup__heading img {
  flex: none;
}
.proto-popup__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: var(--space-8);
  height: var(--space-8);
  border: 0;
  border-radius: var(--tacet-radius-lg);
  background: transparent;
  color: inherit;
  font-size: var(--text-2xl);
  cursor: pointer;
}
.proto-popup__selection {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-4);
  margin: var(--space-4) 0;
  border-radius: var(--tacet-radius-lg);
  background: var(--muted);
}
.proto-popup__selection span {
  color: var(--muted-foreground);
  font-size: var(--text-sm);
}
.proto-popup__selection strong {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.proto-popup__platforms {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.proto-popup__platforms button {
  flex: 1;
  min-height: 44px;
  padding: var(--space-2);
  font: inherit;
  border: 1px solid var(--border);
  border-radius: var(--tacet-radius-lg);
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.proto-popup__platforms button[aria-pressed='true'] {
  border-color: var(--foreground);
  background: var(--muted);
}
.proto-popup__download,
.proto-popup__open {
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--foreground);
  border-radius: var(--tacet-radius-lg);
  color: var(--background);
  background: var(--foreground);
  font: 600 1rem/1.3 var(--font-body);
  text-decoration: none;
  text-align: center;
}
.proto-popup__open {
  color: var(--foreground);
  background: transparent;
}
.proto-popup a[aria-disabled='true'] {
  opacity: 0.5;
  cursor: wait;
}
.proto-popup .proto-popup__install {
  font-size: var(--text-sm);
  margin: var(--space-4) 0;
}
.proto-popup .proto-popup__feedback {
  font-size: var(--text-sm);
  min-height: 3em;
  margin-bottom: var(--space-3);
}
.proto-popup .proto-popup__help {
  font-size: var(--text-xs);
  text-align: center;
  margin: var(--space-4) 0 0;
}
.proto-popup__retry {
  display: block;
  margin: var(--space-4) auto 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: underline;
  font: inherit;
  cursor: pointer;
}
.proto-popup :is(button, a):focus-visible,
.proto-popup-launcher:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}
.proto-popup :is(button, a[href]):hover {
  filter: brightness(0.94);
}
.proto-popup-launcher {
  position: fixed;
  inset: auto var(--space-6) var(--space-6) auto;
  z-index: 110;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--tacet-radius-lg);
  background: var(--background);
  color: var(--foreground);
  font: 500 1rem/1.4 var(--font-body);
  cursor: pointer;
}
@media (max-width: 480px) {
  .proto-popup {
    padding: var(--space-6);
  }
}
