.custom-story-view {
  --custom-story-navy: #062a61;
  --custom-story-ink: #18355f;
  --custom-story-muted: #62758f;
  --custom-story-blue: #eaf4ff;
  --custom-story-line: #cfe1f5;
  --custom-story-orange: #ff650d;
  background: #fff;
}

.custom-story-contact-page {
  padding: 42px 32px 64px;
  background: #fff;
}

.custom-story-contact-container {
  width: min(100%, 1280px);
  margin: 0 auto;
}

.custom-story-contact-back {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--custom-story-ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  text-underline-offset: 4px;
}

.custom-story-contact-back:hover { text-decoration: underline; }

.custom-story-contact-back:focus-visible,
.custom-story-contact-submit:focus-visible,
.custom-story-contact-field input:focus-visible,
.custom-story-contact-field textarea:focus-visible,
.custom-story-photo-note a:focus-visible {
  outline: 3px solid rgba(47, 128, 237, .35);
  outline-offset: 3px;
}

.custom-story-contact-panel {
  min-height: 620px;
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(0, 48fr) minmax(0, 52fr);
  overflow: hidden;
  border: 1px solid var(--custom-story-line);
  border-radius: 42px;
  background: var(--custom-story-blue);
  box-shadow: 0 12px 36px rgba(6, 42, 97, .06);
}

.custom-story-contact-intro {
  min-width: 0;
  padding: 52px 48px 0;
  display: flex;
  flex-direction: column;
}

.custom-story-contact__title-art {
  width: min(100%, 600px);
  display: block;
}

.custom-story-contact__title-art img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: left center;
}

.custom-story-contact__lead {
  max-width: 510px;
  margin: 21px 0 0;
  color: var(--custom-story-muted);
  font-size: 18px;
  line-height: 1.55;
}

.custom-story-contact__offer {
  max-width: 510px;
  margin: 25px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 9px;
  color: var(--custom-story-ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.custom-story-contact__offer i { color: #8da4bf; font-style: normal; }

.custom-story-contact__mascots {
  width: min(100%, 410px);
  max-height: 260px;
  margin: auto auto 0;
  display: block;
  object-fit: contain;
  object-position: center bottom;
}

.custom-story-contact-form-surface {
  min-width: 0;
  padding: 24px;
  display: flex;
}

.custom-story-contact-form {
  width: 100%;
  min-height: 100%;
  padding: 47px 48px 43px;
  display: flex;
  flex-direction: column;
  border-radius: 34px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(6, 42, 97, .05);
}

.custom-story-contact-form header h2 {
  max-width: 460px;
  margin: 0;
  color: var(--custom-story-navy);
  font-size: clamp(28px, 2.35vw, 32px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.15;
}

.custom-story-contact-form header p {
  margin: 10px 0 0;
  color: var(--custom-story-muted);
  font-size: 16px;
  line-height: 1.5;
}

.custom-story-contact-fields {
  margin-top: 38px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 18px;
}

.custom-story-contact-field {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.custom-story-contact-field--wide { grid-column: 1 / -1; }

.custom-story-contact-field label {
  color: var(--custom-story-ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.custom-story-contact-field label > span[aria-hidden="true"] { color: var(--custom-story-orange); }

.custom-story-contact-field__optional {
  margin-left: 5px;
  color: var(--custom-story-muted);
  font-weight: 500;
}

.custom-story-contact-field input,
.custom-story-contact-field textarea {
  width: 100%;
  border: 1px solid #cbddec;
  border-radius: 14px;
  background: #fff;
  color: var(--custom-story-navy);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.custom-story-contact-field input {
  height: 54px;
  padding: 0 16px;
}

.custom-story-contact-field textarea {
  min-height: 112px;
  padding: 14px 16px;
  resize: vertical;
}

.custom-story-contact-field input::placeholder,
.custom-story-contact-field textarea::placeholder { color: #92a2b8; opacity: 1; }

.custom-story-contact-field input:hover,
.custom-story-contact-field textarea:hover { border-color: #aac8e2; }

.custom-story-contact-field input:focus,
.custom-story-contact-field textarea:focus {
  border-color: #2f80ed;
  box-shadow: 0 0 0 4px rgba(47, 128, 237, .12);
}

.custom-story-contact-field input[aria-invalid="true"],
.custom-story-contact-field textarea[aria-invalid="true"] {
  border-color: #d74e43;
  background: #fffafa;
}

.custom-story-contact-field:has([aria-invalid="true"]) label { color: #b83931; }

.custom-story-contact-error {
  min-height: 17px;
  margin: -1px 0 0;
  color: #b83931;
  font-size: 12px;
  line-height: 1.4;
}

.custom-story-contact-form__action {
  margin-top: auto;
  padding-top: 34px;
}

.custom-story-contact-submit {
  width: 100%;
  min-height: 58px;
  padding: 15px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--custom-story-orange);
  border-radius: 16px;
  background: var(--custom-story-orange);
  box-shadow: 0 12px 26px rgba(255, 101, 13, .18);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.custom-story-contact-submit svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.custom-story-contact-submit:hover {
  border-color: #e85700;
  background: #e85700;
  box-shadow: 0 14px 28px rgba(255, 101, 13, .26);
  transform: translateY(-1px);
}

.custom-story-contact-submit:active { transform: translateY(0); }

.custom-story-contact-form__action > p {
  margin: 12px 0 0;
  color: var(--custom-story-muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.custom-story-photo-note {
  margin: 22px 0 0;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid #f1dfc4;
  border-radius: 18px;
  background: #fff9ef;
}

.custom-story-photo-note > svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: var(--custom-story-orange);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.custom-story-photo-note strong {
  display: block;
  color: var(--custom-story-ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.custom-story-photo-note p {
  margin: 3px 0 0;
  color: var(--custom-story-muted);
  font-size: 13px;
  line-height: 1.45;
}

.custom-story-photo-note a {
  color: var(--custom-story-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  text-align: right;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 1080px) {
  .custom-story-contact-intro { padding-inline: 38px; }
  .custom-story-contact-form { padding: 40px 36px; }
  .custom-story-contact-fields { margin-top: 30px; }
}

@media (max-width: 899px) {
  .custom-story-contact-page { padding: 38px 24px 52px; }
  .custom-story-contact-panel { min-height: 0; grid-template-columns: 1fr; }
  .custom-story-contact-intro { min-height: 0; padding: 46px 46px 0; }
  .custom-story-contact__mascots { width: min(75%, 360px); max-height: 300px; margin-top: 26px; }
  .custom-story-contact-form-surface { padding: 22px; }
  .custom-story-contact-form { min-height: 0; padding: 40px; }
  .custom-story-contact-form__action { margin-top: 12px; }
}

@media (max-width: 599px) {
  .custom-story-contact-page { padding: 32px 16px 42px; }
  .custom-story-contact-back { font-size: 14px; }
  .custom-story-contact-panel { margin-top: 18px; border-radius: 28px; }
  .custom-story-contact-intro { padding: 32px 24px 0; }
  .custom-story-contact__title-art { width: 100%; }
  .custom-story-contact__lead { margin-top: 18px; font-size: 16px; }
  .custom-story-contact__offer { margin-top: 20px; gap: 4px 8px; font-size: 14px; }
  .custom-story-contact__mascots { width: min(82%, 300px); max-height: 265px; margin-top: 20px; }
  .custom-story-contact-form-surface { padding: 12px; }
  .custom-story-contact-form { padding: 30px 24px 26px; border-radius: 22px; }
  .custom-story-contact-form header h2 { font-size: 28px; }
  .custom-story-contact-form header p { font-size: 15px; }
  .custom-story-contact-fields { margin-top: 26px; grid-template-columns: 1fr; gap: 18px; }
  .custom-story-contact-field--wide { grid-column: auto; }
  .custom-story-contact-form__action { padding-top: 24px; }
  .custom-story-contact-submit { min-height: 56px; padding-inline: 16px; font-size: 15px; }
  .custom-story-photo-note { margin-top: 16px; padding: 17px 16px; grid-template-columns: 23px minmax(0, 1fr); align-items: start; gap: 12px; border-radius: 16px; }
  .custom-story-photo-note a { grid-column: 2; text-align: left; }
}

@media (max-width: 370px) {
  .custom-story-contact-intro { padding-inline: 20px; }
  .custom-story-contact-form { padding-inline: 20px; }
  .custom-story-contact-form header h2 { font-size: 26px; }
  .custom-story-contact-submit { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .custom-story-contact-field input,
  .custom-story-contact-field textarea,
  .custom-story-contact-submit { transition: none; }
}
