.academy-welcome {
  width: min(92vw, 440px);
  max-height: 90vh;
  max-height: 90dvh;
  box-sizing: border-box;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--theme-border);
  border-radius: 20px;
  background: var(--theme-surface);
  color: var(--theme-text);
}
.academy-welcome[open] { display: flex; flex-direction: column; }
.academy-welcome::backdrop { background: rgb(0 0 0 / .55); }
.academy-welcome > img {
  width: 100%;
  display: block;
  height: auto;
  aspect-ratio: 2 / 1;
  flex: 0 0 auto;
  object-fit: cover;
  object-position: center;
  background: var(--theme-surface-alt);
}
.academy-welcome__content { padding: 24px; overflow: auto; min-height: 0; text-align: center; overflow-wrap: anywhere; }
.academy-welcome__content h2 { margin-top: 0; }
.academy-welcome__close {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  margin: 0;
  z-index: 1;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
  border: 1px solid var(--theme-border);
  border-radius: 50%;
  background: var(--theme-surface);
  color: var(--theme-text);
  font-size: 24px;
  cursor: pointer;
}
.academy-welcome__coupon {
  display: grid;
  grid-template-columns: minmax(0, 160px) auto;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}
.academy-welcome__coupon [role="status"] { grid-column: 1 / -1; font-size: .8rem; }
.academy-welcome__coupon [role="status"]:empty { display: none; }
.academy-welcome__coupon input {
  padding: 10px 12px;
  box-sizing: border-box;
  height: 44px;
  min-width: 0;
  max-width: 100%;
  text-align: center;
  font: inherit;
  color: var(--theme-accent);
  background: var(--theme-surface-alt);
  border: 1px dashed var(--theme-accent);
  border-radius: 10px;
}

.academy-welcome__content h2 { font-size: 1.25rem; margin-bottom: 10px; }
.academy-welcome__content p { font-size: .9rem; margin-block: 10px 16px; }
.academy-welcome__coupon .btn { padding: 0 16px; height: 44px; border-radius: 10px; font-size: .85rem; white-space: nowrap; }
.academy-welcome__coupon input { width: 100%; }
.academy-welcome:not(:has(> img)) .academy-welcome__content { padding-top: 48px; }

@media(max-width:480px) {
  .academy-welcome__content { padding: 20px 16px; }
  .academy-welcome__coupon { grid-template-columns: minmax(0, 150px) auto; }
}

/* The heading receives initial dialog focus without a visible frame. */
#academy-welcome-title:focus { outline: none; box-shadow: none; }
