/* Shared label-to-attachment spacing for contact and interview forms. */
.sv-contact-page,
.sv-interview-page { --sv-attachment-gap: 8px; }
.sv-contact-page__title {
  margin: 30px 0 55px;
  font: 400 13px/20px var(--sv-times);
  letter-spacing: .14em;
  color: #38302d;
}
.sv-contact-form {
  --contact-line: rgba(50, 48, 45, .12);
  /* Same visible tone as the former translucent fill; opaque so autofill cannot tint it. */
  --contact-input: #dfdbd4;
  font-family: "Noto Serif KR", serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 22px;
  letter-spacing: .06em;
  color: #271e1b;
}
.sv-contact-form__columns {
  display: flex;
  align-items: stretch;
  min-height: 470px;
  border-inline: 1px solid var(--contact-line);
}
.sv-contact-form__fields {
  flex: 0 0 55.5%;
  min-width: 0;
  padding: 44px 4.8% 48px 3.1%;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.sv-contact-form__row {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 22px;
}
/* Shared field markers: a 6px circle followed by 9px of space. */
.sv-contact-form label,
.sv-survey-label {
  display: block;
  position: relative;
  padding-left: 15px;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.sv-contact-form label::before,
.sv-survey-label::before {
  content: "";
  position: absolute;
  left: 0;
  /* Center on the first 22px line, including labels that wrap. */
  top: 8px;
  width: 6px;
  height: 6px;
  border: 1px solid #817f7b;
  border-radius: 50%;
  background: #f9f7f3;
}
.sv-contact-form__row > label { flex: 1; min-width: 0; }
.sv-contact-form__file-label { min-width: 0; }
.sv-contact-form__row > input { flex: 0 0 42%; min-width: 0; }
.sv-contact-form__row > input {
  width: 42%;
  height: 22px;
  padding: 1px 6px;
  border: 0;
  border-radius: 0;
  background: var(--contact-input);
  font: inherit;
  letter-spacing: normal;
  color: inherit;
}
/* Browser autofill backgrounds have UA !important rules; cover them with the same opaque fill. */
.sv-contact-form__row > input:is(:autofill, :-webkit-autofill) {
  box-shadow: 0 0 0 1000px var(--contact-input) inset;
  -webkit-text-fill-color: #271e1b;
  caret-color: #271e1b;
}
.sv-contact-form input:focus-visible,
.sv-contact-form textarea:focus-visible,
.sv-contact-form button:focus-visible { outline: 1px solid #38302d; outline-offset: 3px; }
.sv-contact-form__row--files { flex-direction: column; align-items: stretch; gap: 12px; margin-top: 4px; }
.sv-contact-form__file-input { display: none; }
.sv-contact-form__attach {
  display: block;
  margin: var(--sv-attachment-gap) 0 0 15px;
  padding: 2px 14px;
  border: 1px solid rgba(50, 48, 45, .25);
  color: #38302d;
  background: transparent;
  font: 400 11px/18px "Noto Serif KR", serif;
  letter-spacing: .08em;
}
.sv-contact-form__attach:hover { border-color: rgba(50, 48, 45, .35); }
/* Mobile previews use the full form width; desktop previews align with the input column. */
.sv-contact-form__previews {
  display: grid;
  flex: none;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(auto-fill, minmax(min(112px, 100%), 1fr));
  gap: 10px;
}
.sv-contact-form__preview {
  min-width: 0;
  aspect-ratio: 1;
  background: var(--contact-input);
  overflow: hidden;
  position: relative;
}
.sv-contact-form__preview img { width: 100%; height: 100%; object-fit: contain; }
.sv-contact-form__preview span { display: block; padding: 4px; font: 10px/14px sans-serif; overflow-wrap: anywhere; }
.sv-contact-form__remove { position: absolute; top: 0; right: 0; width: 20px; height: 20px; color: #fff; background: #38302d; font: 14px/20px sans-serif; }
.sv-contact-form__file-help { margin: 4px 0 0 15px; font-size: 12px; font-weight: 400; letter-spacing: 0; color: var(--sv-text-sub); }
.sv-contact-form__notes {
  flex: 1;
  min-width: 0;
  border-left: 1px solid var(--contact-line);
  padding: 44px 4% 48px 5.4%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.sv-contact-form__notes textarea {
  display: block;
  width: 100%;
  height: 270px;
  min-height: 270px;
  margin-top: 10px;
  padding: 14px;
  border: 0;
  border-radius: 0;
  background: rgba(50, 48, 45, .045);
  resize: none;
  font: inherit;
  letter-spacing: normal;
  color: inherit;
}
.sv-contact-form__submit {
  width: 100%;
  min-height: 26px;
  margin-top: 26px;
  padding: 2px 14px;
  background: #807772;
  color: #fff;
  font: inherit;
  font-size: 12px;
  line-height: 22px;
  letter-spacing: .06em;
}
.sv-contact-form__submit:hover { background: #6b625d; }
.sv-contact-form__submit:disabled { opacity: .5; cursor: wait; }
.sv-contact-form__progress {
  display: none;
  margin: 10px 0 0;
  color: #38302d;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.sv-contact-form__progress.is-visible { display: block; }
@media (min-width: 1001px) {
  /* Let the left fields set the column height; equal bottom padding aligns
     the submit button with the attachment help before files are selected. */
  .sv-contact-form__columns { min-height: 0; }
  .sv-contact-form__notes textarea {
    flex: 1 1 0;
    height: 0;
    min-height: 0;
  }
  /* Match the right edge and width of the contact inputs above. */
  .sv-contact-form__row--files {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42%;
    align-items: start;
    gap: 20px;
  }
  .sv-contact-form__previews { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1001px) and (max-width: 1800px) {
  .sv-contact-form__previews { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1001px) and (max-width: 1450px) {
  .sv-contact-form__previews { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .sv-contact-page,
  .sv-interview-page { --sv-attachment-gap: 12px; }
  /* 6px circle + 6px gap on mobile; center the marker on the first 18px line. */
  .sv-contact-form label:not(.sv-inquiry-consent__label),
  .sv-survey-label { padding-left: 12px; line-height: 18px; }
  .sv-contact-form label:not(.sv-inquiry-consent__label)::before,
  .sv-survey-label::before { top: 6px; }
  .sv-contact-page__title { margin-top: 0; margin-bottom: var(--sv-title-space-after); }
  .sv-contact-form__columns { flex-direction: column; min-height: 0; border: 0; gap: 30px; }
  .sv-contact-form__fields { flex-basis: auto; padding: 0; gap: 0; }
  .sv-contact-form__row + .sv-contact-form__row { margin-top: 30px; }
  .sv-contact-form__file-help { margin: 5px 0 0; }
  .sv-contact-form__row { gap: 16px; }
  .sv-contact-form__row > input { flex: 0 0 52%; width: 52%; height: 34px; min-height: 34px; padding: 6px 8px; font-size: 16px; }
  .sv-contact-form__row--files { margin-top: 0; }
  .sv-contact-form__attach { min-height: 40px; font-size: 12px; padding: 8px 16px; }
  .sv-contact-form .sv-contact-form__attach { width: 100%; margin: var(--sv-attachment-gap) 0 0; }
  .sv-contact-form__previews { gap: 8px; }
  .sv-contact-form__remove { width: 32px; height: 32px; line-height: 32px; }
  .sv-contact-form__notes { border: 0; padding: 0; }
  .sv-contact-form__notes textarea { margin-top: 4px; font-size: 16px; }
  .sv-contact-form__submit { height: 40px; min-height: 40px; font-size: 13px; font-weight: 600; }
}
@media (max-width: 500px) {
  .sv-contact-form__row { flex-direction: column; align-items: stretch; gap: 8px; }
  .sv-contact-form__row:not(.sv-contact-form__row--files) { row-gap: 4px; }
  .sv-contact-form__row > input { flex: none; width: 100%; }
  .sv-contact-form__notes textarea { height: 240px; min-height: 240px; }
  .sv-contact-form__submit { margin-top: 20px; }
}

.sv-contact-form__previews[hidden] { display: none; }
.sv-contact-form__attach:disabled, .sv-contact-form__remove:disabled { cursor: wait; opacity: .5; }

.sv-contact-result {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(440px, calc(100% - 32px));
  min-width: calc(var(--sv-min-width) - 32px);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 24px;
  border: 1px solid rgba(50, 48, 45, .25);
  background: var(--sv-bg);
  color: #38302d;
  font: 400 13px/1.9 "Noto Serif KR", serif;
  overflow-y: auto;
  overscroll-behavior: contain;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.sv-contact-result::backdrop { background: rgba(39, 30, 27, .45); }
.sv-contact-result__header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.sv-contact-result__header h2 { font-size: 16px; font-weight: 600; }
.sv-contact-result__close { flex: none; width: 32px; height: 32px; color: inherit; font: 24px/32px sans-serif; }
.sv-contact-result__message { white-space: pre-line; }
.sv-contact-result__confirm { display: block; width: 100%; min-height: 40px; margin-top: 24px; padding: 8px 16px; background: #807772; color: #fff; font: inherit; }
.sv-contact-result__confirm:hover { background: #6b625d; }
.sv-contact-result button:focus-visible { outline: 1px solid #38302d; outline-offset: 3px; }
@media (max-width: 500px) { .sv-contact-result { padding: 20px 16px; } }
