/* StarStory Studio — Custom Dialog System */
.starstory-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483640 !important;
  background: rgba(28, 22, 48, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.starstory-dialog-backdrop.is-active {
  opacity: 1;
  pointer-events: auto;
}
.starstory-dialog-card {
  position: relative;
  z-index: 2147483647 !important;
  background: #FFFFFF;
  border-radius: 24px;
  width: 100%;
  max-width: 450px;
  padding: 32px 28px 26px;
  text-align: center;
  box-sizing: border-box;
  box-shadow: 0 24px 70px -12px rgba(28, 22, 48, 0.45), 0 0 0 1px rgba(106, 90, 184, 0.1);
  transform: scale(0.92) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.starstory-dialog-backdrop.is-active .starstory-dialog-card {
  transform: scale(1) translateY(0);
}
.starstory-dialog-badge {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
  background: linear-gradient(135deg, #EDEAF8 0%, #E3F1E9 100%);
  border: 1.5px solid #DFDCEC;
  box-shadow: 0 6px 16px rgba(106, 90, 184, 0.12);
}
.starstory-dialog-badge.is-danger {
  background: linear-gradient(135deg, #FFEBEB 0%, #FFF3E0 100%);
  border-color: #FFCDD2;
}
.starstory-dialog-badge.is-success {
  background: linear-gradient(135deg, #E8F5E9 0%, #D1F2D9 100%);
  border-color: #C8E6C9;
}
.starstory-dialog-title {
  font-family: 'Comfortaa', cursive, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #2C2740;
  margin: 0 0 12px;
  line-height: 1.35;
}
.starstory-dialog-body {
  font-family: 'Comfortaa', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.94rem;
  line-height: 1.6;
  color: #5B5475;
  margin: 0 0 24px;
  white-space: pre-line;
  word-break: break-word;
}
.starstory-dialog-input-wrap {
  margin: -10px 0 20px;
}
.starstory-dialog-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1.5px solid #DFDCEC;
  font-family: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
  outline: none;
  background: #FAF8F5;
  color: #2C2740;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.starstory-dialog-input:focus {
  border-color: #6A5AB8;
  background: #FFFFFF;
}
.starstory-dialog-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
}
.starstory-dialog-btn {
  flex: 1;
  padding: 12px 20px;
  border-radius: 14px;
  font-family: 'Comfortaa', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  outline: none;
}
.starstory-dialog-btn--cancel {
  background: #F3F1F8;
  color: #5B5475;
  border: 1.5px solid #DFDCEC;
}
.starstory-dialog-btn--cancel:hover {
  background: #E8E5F0;
  color: #2C2740;
  border-color: #CEC9E0;
}
.starstory-dialog-btn--confirm {
  background: #6A5AB8;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(106, 90, 184, 0.35);
}
.starstory-dialog-btn--confirm:hover {
  background: #5847A5;
  box-shadow: 0 6px 18px rgba(106, 90, 184, 0.45);
  transform: translateY(-1px);
}
.starstory-dialog-btn--confirm:active {
  transform: translateY(1px);
}
.starstory-dialog-btn--confirm.is-danger {
  background: #E54D5D;
  box-shadow: 0 4px 14px rgba(229, 77, 93, 0.35);
}
.starstory-dialog-btn--confirm.is-danger:hover {
  background: #D43B4B;
  box-shadow: 0 6px 18px rgba(229, 77, 93, 0.45);
}

@media (max-width: 480px) {
  .starstory-dialog-card {
    padding: 24px 18px 18px;
    border-radius: 20px;
    max-width: 94%;
  }
  .starstory-dialog-title {
    font-size: 1.15rem;
  }
  .starstory-dialog-body {
    font-size: 0.9rem;
    margin-bottom: 18px;
  }
  .starstory-dialog-input {
    font-size: 16px !important;
    padding: 12px 14px;
    min-height: 46px;
  }
  .starstory-dialog-actions {
    gap: 8px;
  }
  .starstory-dialog-btn {
    padding: 12px 14px;
    font-size: 0.9rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
  }
}
