:root {
  --dsp-white: #ffffff;
  --dsp-black: #000000;
  --dsp-accent: #6aaac2;

  --dsp-red: #d92d20;
  --dsp-red-soft: rgba(217, 45, 32, 0.10);
  --dsp-red-border: rgba(217, 45, 32, 0.55);

  --dsp-accent-soft: rgba(106, 170, 194, 0.12);
  --dsp-accent-soft-strong: rgba(106, 170, 194, 0.18);

  --dsp-gray: #666666;
  --dsp-border: rgba(0, 0, 0, 0.08);

  --dsp-radius: 3px;
  --dsp-shadow-soft: 0 16px 42px rgba(0, 0, 0, 0.07);
  --dsp-shadow-button: 0 16px 32px rgba(0, 0, 0, 0.15);
  --dsp-shadow-accent: 0 16px 36px rgba(106, 170, 194, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #ffffff;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: "Manrope", Arial, sans-serif;
  background: #ffffff;
  color: #000000;
  overflow-x: hidden;
}

button,
input,
textarea {
  font-family: "Manrope", Arial, sans-serif;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.dsp-app {
  width: 100%;
  min-height: 100vh;
  padding: 24px 20px;
  background: #ffffff;
}

.dsp-shell {
  width: min(980px, 100%);
  margin: 0 auto;
}

.dsp-card {
  padding: clamp(24px, 3vw, 42px);
  border-radius: var(--dsp-radius);
  background: #ffffff;
  border: 1px solid var(--dsp-border);
  animation: dsp-card-in 360ms cubic-bezier(.2, .9, .2, 1) both;
}

.dsp-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  padding: 8px 13px;
  border-radius: var(--dsp-radius);
  background: var(--dsp-accent-soft);
  color: var(--dsp-accent);
  font-size: 13px;
  font-weight: 800;
}

.dsp-title {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  font-weight: 800;
}

.dsp-title span {
  color: var(--dsp-accent);
}

.dsp-subtitle {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--dsp-gray);
  font-size: 16px;
  line-height: 1.65;
}

.dsp-form {
  display: grid;
  gap: 16px;
  margin-top: 26px;
}

.dsp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.dsp-field {
  animation: dsp-soft-in 220ms ease both;
}

.dsp-field-full {
  grid-column: 1 / -1;
}

.dsp-field-label {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.dsp-field-help {
  margin: -2px 0 8px;
  color: #777777;
  font-size: 12px;
  line-height: 1.45;
}

.dsp-required {
  color: var(--dsp-accent);
}

.dsp-input,
.dsp-textarea {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: #ffffff;
  color: #000000;
  border-radius: var(--dsp-radius);
  outline: none;
  padding: 15px 16px;
  font-size: 15px;
  font-weight: 600;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.dsp-input:focus,
.dsp-textarea:focus {
  border-color: rgba(106, 170, 194, 0.75);
  box-shadow: 0 0 0 5px rgba(106, 170, 194, 0.12);
  transform: translateY(-1px);
}

.dsp-textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.55;
}

.dsp-field.is-invalid .dsp-field-label {
  color: var(--dsp-red);
}

.dsp-field.is-invalid .dsp-required {
  color: var(--dsp-red);
}

.dsp-field.is-invalid .dsp-input,
.dsp-field.is-invalid .dsp-textarea,
.dsp-field.is-invalid .dsp-file-drop,
.dsp-field.is-invalid .dsp-map-wrap,
.dsp-field.is-invalid .dsp-consent {
  border-color: var(--dsp-red-border);
  background: linear-gradient(180deg, #ffffff, rgba(217, 45, 32, 0.025));
  box-shadow: 0 0 0 5px var(--dsp-red-soft);
}

.dsp-field.is-invalid {
  animation: dsp-invalid-pulse 240ms ease both;
}

/* Files */
.dsp-file-drop {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px dashed rgba(0, 0, 0, 0.18);
  border-radius: var(--dsp-radius);
  background: #ffffff;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.dsp-file-drop:hover {
  border-color: rgba(106, 170, 194, 0.55);
  background: rgba(106, 170, 194, 0.035);
}

.dsp-file-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.dsp-file-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.dsp-file-title {
  font-size: 14px;
  font-weight: 900;
  color: #000000;
}

.dsp-file-description {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.45;
  color: #777777;
}

.dsp-file-button {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  padding: 0 15px;
  border-radius: var(--dsp-radius);
  background: #000000;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease;
}

.dsp-file-button:hover {
  transform: translateY(-1px);
  background: #111111;
}

.dsp-file-counter {
  font-size: 12px;
  color: #858585;
}

.dsp-file-list {
  display: grid;
  gap: 8px;
}

.dsp-file-item {
  display: grid;
  grid-template-columns: 54px 1fr 28px;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px;
  border-radius: var(--dsp-radius);
  background: #f6f6f7;
}

.dsp-file-preview {
  width: 54px;
  height: 42px;
  border-radius: var(--dsp-radius);
  overflow: hidden;
  background: #e9e9e9;
  display: grid;
  place-items: center;
  color: #777777;
  font-size: 12px;
  font-weight: 900;
}

.dsp-file-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dsp-file-name {
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dsp-file-meta {
  margin-top: 2px;
  color: #777777;
  font-size: 12px;
}

.dsp-file-remove {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: #000000;
  color: #ffffff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.dsp-file-remove:hover {
  background: var(--dsp-accent);
}

/* Map */
.dsp-map-wrap {
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: var(--dsp-radius);
  overflow: hidden;
  background: #ffffff;
}

.dsp-map {
  width: 100%;
  height: 380px;
}

.dsp-map-info {
  padding: 12px 14px;
  color: #666666;
  font-size: 13px;
  line-height: 1.45;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.dsp-map-info strong {
  color: #000000;
}

/* Consent */
.dsp-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: var(--dsp-radius);
  background: #ffffff;
  color: #666666;
  font-size: 12px;
  line-height: 1.55;
}

.dsp-consent input {
  margin-top: 2px;
  flex: 0 0 auto;
}

.dsp-consent a {
  color: var(--dsp-accent);
  text-decoration: none;
  font-weight: 800;
}

.dsp-consent a:hover {
  text-decoration: underline;
}

/* Actions */
.dsp-actions {
  margin-top: 6px;
}

.dsp-submit {
  width: 100%;
  min-height: 60px;
  border: 0;
  border-radius: var(--dsp-radius);
  background: #000000;
  color: #ffffff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.01em;
  box-shadow: var(--dsp-shadow-button);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    opacity 180ms ease;
}

.dsp-submit:hover {
  transform: translateY(-2px);
  background: #111111;
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.20);
}

.dsp-submit:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.dsp-submit.is-error {
  background: var(--dsp-red);
  box-shadow: 0 16px 32px rgba(217, 45, 32, 0.20);
}

.dsp-error-box {
  display: none;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--dsp-radius);
  background: var(--dsp-red-soft);
  color: var(--dsp-red);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.dsp-error-box.is-visible {
  display: block;
}

/* Status */
.dsp-status-card {
  width: min(680px, calc(100% - 32px));
  margin: 40px auto;
  padding: 32px;
  border-radius: var(--dsp-radius);
  background: #ffffff;
  border: 1px solid var(--dsp-border);
  box-shadow: var(--dsp-shadow-soft);
  text-align: center;
  animation: dsp-card-in 380ms cubic-bezier(.2, .9, .2, 1) both;
}

.dsp-status-icon {
  width: 78px;
  height: 78px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--dsp-accent-soft);
  color: var(--dsp-accent);
  font-size: 36px;
  font-weight: 900;
}

.dsp-status-title {
  margin: 0;
  font-size: clamp(25px, 3.6vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.dsp-status-text {
  margin: 14px auto 0;
  max-width: 520px;
  color: #666666;
  font-size: 16px;
  line-height: 1.65;
}

.dsp-close-parent {
  margin-top: 22px;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--dsp-radius);
  background: #000000;
  color: #ffffff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
}

.dsp-honeypot {
  position: absolute !important;
  left: -99999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@keyframes dsp-card-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dsp-soft-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dsp-invalid-pulse {
  0% {
    transform: translateX(0);
  }
  35% {
    transform: translateX(-4px);
  }
  70% {
    transform: translateX(4px);
  }
  100% {
    transform: translateX(0);
  }
}

@media (max-width: 760px) {
  .dsp-app {
    padding: 12px 10px;
  }

  .dsp-card {
    padding: 24px 17px;
  }

  .dsp-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .dsp-map {
    height: 330px;
  }

  .dsp-file-head {
    align-items: stretch;
    flex-direction: column;
  }

  .dsp-file-button {
    width: 100%;
  }

  .dsp-submit {
    min-height: 56px;
  }
}

@media (max-width: 420px) {
  .dsp-title {
    font-size: 29px;
  }

  .dsp-map {
    height: 300px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}