/* Shared dialog surface. Long forms scroll inside the card; close stays visible. */
.app-dialog-mask {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px 16px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.72);
}
.app-dialog-mask.is-open {
  display: flex;
}
.app-dialog-card {
  box-sizing: border-box;
  flex: 0 1 auto;
  width: 440px;
  max-width: 100%;
  max-height: calc(100dvh - 108px);
  overflow-y: auto;
  scrollbar-width: thin;
  padding: 36px;
  border: 1px solid #414141;
  border-radius: 40px;
  background: #0d0d0d;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 20px 48px #0006;
}
.app-dialog-close {
  position: static;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: block;
}
.app-dialog-close img {
  display: block;
  width: 36px;
  height: 36px;
}
.app-dialog-card button,
.app-dialog-card input {
  font: inherit;
}
.app-dialog-card a {
  text-decoration: none;
}
.app-dialog-card button,
.app-dialog-card a {
  cursor: pointer;
}
.app-dialog-card [hidden] {
  display: none !important;
}
.app-dialog-mask :focus-visible:not(.login-dialog-input):not(.register-dialog-input) {
  outline: 2px solid #ff7b40;
  outline-offset: 3px;
}
@media (max-width: 767px) {
  .app-dialog-mask {
    gap: 16px;
    padding: 16px;
  }
  .app-dialog-card {
    width: 440px;
    padding: 26px 20px;
    border-radius: 28px;
    max-height: calc(100dvh - 84px);
  }
}
