@font-face {
  font-family: "Gmarket Sans Profile";
  src: url("/profile/assets/GmarketSansLight.ttf") format("truetype");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

.profile-maker-main {
  overflow: hidden;
  background: #f5f7ff;
}

.profile-maker-hero {
  display: grid;
  min-height: 470px;
  padding: calc(var(--header-height) + 64px) 24px 72px;
  place-items: center;
  color: #fff;
  background:
    linear-gradient(105deg, rgba(7, 28, 111, 0.94), rgba(32, 41, 163, 0.82)),
    url("/assets/background.webp") center / cover no-repeat;
  text-align: center;
}

.profile-maker-hero__inner {
  width: min(900px, 100%);
}

.profile-maker-hero p {
  margin: 0 0 18px;
  color: #bde9ff;
  font-family: "Mulmaru", Pretendard, sans-serif;
  font-size: clamp(1rem, 1.7vw, 1.3rem);
}

.profile-maker-hero h1 {
  margin: 0;
  font-family: "Mulmaru", Pretendard, sans-serif;
  font-size: clamp(3rem, 6vw, 5.8rem);
  font-weight: normal;
  letter-spacing: -0.075em;
  line-height: 1.08;
  text-shadow: 0 8px 0 rgba(0, 20, 82, 0.2);
  word-break: keep-all;
}

.profile-maker-hero span {
  display: block;
  margin-top: 24px;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.65;
  word-break: keep-all;
}

.profile-maker-content {
  padding: 84px 24px 110px;
}

.profile-maker-layout {
  display: grid;
  width: min(1120px, 100%);
  margin: 0 auto;
  align-items: start;
  gap: clamp(42px, 6vw, 78px);
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.85fr);
}

.profile-preview-panel,
.profile-input-panel {
  min-width: 0;
}

.profile-maker-section-heading {
  display: flex;
  min-height: 62px;
  margin-bottom: 24px;
  align-items: center;
  gap: 15px;
}

.profile-maker-section-heading > span {
  display: grid;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  place-items: center;
  color: #fff;
  background: #2029a3;
  border-radius: 16px;
  box-shadow: 0 7px 0 #a8d9ef;
  font-family: "Mulmaru", Pretendard, sans-serif;
  font-size: 1rem;
}

.profile-maker-section-heading p {
  margin: 0 0 4px;
  color: #627891;
  font-size: 0.88rem;
  font-weight: 800;
}

.profile-maker-section-heading h2 {
  margin: 0;
  color: #102f60;
  font-family: "Mulmaru", Pretendard, sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  font-weight: normal;
  letter-spacing: -0.055em;
  line-height: 1.12;
}

.profile-canvas-frame {
  display: grid;
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1;
  place-items: center;
  background: #fff;
  border: 10px solid #fff;
  border-radius: 30px;
  box-shadow: 0 28px 70px rgba(26, 48, 105, 0.18);
}

.profile-canvas-frame canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.profile-canvas-loading {
  display: flex;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  color: #2029a3;
  background: rgba(247, 249, 255, 0.94);
  font-family: "Mulmaru", Pretendard, sans-serif;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.profile-canvas-frame.is-ready .profile-canvas-loading {
  opacity: 0;
  visibility: hidden;
}

.profile-maker-form {
  padding: 34px;
  background: #fff;
  border: 1px solid rgba(32, 41, 163, 0.11);
  border-radius: 28px;
  box-shadow: 0 24px 64px rgba(26, 48, 105, 0.13);
}

.profile-name-field {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.profile-name-field > span:first-child {
  color: #17375f;
  font-family: "Mulmaru", Pretendard, sans-serif;
  font-size: 1.08rem;
}

.profile-name-field__control {
  display: flex;
  position: relative;
  align-items: center;
}

.profile-name-field input {
  width: 100%;
  height: 66px;
  padding: 0 76px 0 20px;
  color: #2029a3;
  background: #f8f9ff;
  border: 3px solid #dce1f4;
  border-radius: 16px;
  font-family: "Gmarket Sans Profile", Pretendard, sans-serif;
  font-size: 1.55rem;
  font-weight: 300;
  outline: none;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.profile-name-field input:focus {
  background: #fff;
  border-color: #2029a3;
  box-shadow: 0 0 0 5px rgba(32, 41, 163, 0.1);
}

.profile-name-field input::placeholder {
  color: #9aa8bd;
}

.profile-name-field__control small {
  position: absolute;
  right: 19px;
  color: #71829a;
  font-size: 0.9rem;
}

.profile-name-field__control small b {
  color: #2029a3;
}

.profile-field-help {
  margin: 12px 0 0;
  color: #667b92;
  font-size: 0.86rem;
  line-height: 1.55;
  word-break: keep-all;
}

.profile-sentence-preview {
  margin: 28px 0;
  padding: 20px;
  background: #edf4ff;
  border-radius: 17px;
}

.profile-sentence-preview span {
  display: block;
  margin-bottom: 8px;
  color: #627891;
  font-size: 0.78rem;
  font-weight: 800;
}

.profile-sentence-preview strong {
  display: block;
  min-height: 1.5em;
  color: #2029a3;
  font-family: "Gmarket Sans Profile", Pretendard, sans-serif;
  font-size: clamp(1.12rem, 2.1vw, 1.48rem);
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 1.5;
  word-break: keep-all;
}

.profile-download-button {
  display: flex;
  width: 100%;
  min-height: 64px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px 20px;
  color: #fff;
  background: #2029a3;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 8px 0 #98d5ef;
  font-family: "Mulmaru", Pretendard, sans-serif;
  font-size: 1.08rem;
  cursor: pointer;
  transition: box-shadow 150ms ease, opacity 150ms ease, transform 150ms ease;
}

.profile-download-button:hover:not(:disabled) {
  box-shadow: 0 10px 0 #75c7eb;
  transform: translateY(-2px);
}

.profile-download-button:active:not(:disabled) {
  box-shadow: 0 3px 0 #75c7eb;
  transform: translateY(5px);
}

.profile-download-button:focus-visible {
  outline: 4px solid #f5bf4f;
  outline-offset: 4px;
}

.profile-download-button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.profile-download-button .icon-glyph {
  width: 27px;
  height: 27px;
  font-size: 26px;
}

.profile-download-status {
  min-height: 1.5em;
  margin: 18px 0 0;
  color: #2029a3;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 860px) {
  .profile-maker-layout {
    width: min(590px, 100%);
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .profile-maker-hero {
    min-height: 370px;
    padding: calc(var(--header-height) + 52px) 20px 56px;
  }

  .profile-maker-hero h1 {
    font-size: clamp(2.45rem, 12vw, 3.65rem);
  }

  .profile-maker-hero span {
    margin-top: 18px;
    font-size: 0.92rem;
  }

  .profile-maker-content {
    padding: 58px 14px 82px;
  }

  .profile-maker-layout {
    gap: 52px;
  }

  .profile-maker-section-heading {
    margin-bottom: 19px;
  }

  .profile-maker-section-heading > span {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .profile-maker-section-heading h2 {
    font-size: clamp(1.55rem, 8vw, 2rem);
  }

  .profile-canvas-frame {
    border-width: 7px;
    border-radius: 22px;
  }

  .profile-maker-form {
    padding: 24px 18px 25px;
    border-radius: 22px;
  }

  .profile-name-field input {
    height: 62px;
    font-size: 1.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-canvas-loading,
  .profile-download-button,
  .profile-name-field input {
    transition: none;
  }
}
