/* 생긴다는데 — 포스터/진(zine) 언어: 잉크 + 오프화이트 + 코발트 단일 액센트, 직각, 하드 섀도 */

@font-face {
  font-family: "GmarketSans";
  font-weight: 700;
  font-display: swap;
  src: url("https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansBold.woff") format("woff");
}
@font-face {
  font-family: "GmarketSans";
  font-weight: 500;
  font-display: swap;
  src: url("https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansMedium.woff") format("woff");
}

:root {
  --paper: #f2f1ec;
  --ink: #17171a;
  --ink-soft: #5d5d64;
  --line: #d6d5cf;
  --accent: #2b3bf2;
  --accent-soft: #e4e7ff;
  --display: "GmarketSans", "Pretendard Variable", Pretendard, sans-serif;
}

* { box-sizing: border-box; }

::selection { background: var(--accent); color: #fff; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

/* 헤더 */
.site-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 64px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
}
.site-head span {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
}
.site-head a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid var(--ink);
  padding: 6px 14px;
  background: #fff;
  transition: transform .12s, box-shadow .12s;
}
.site-head a:hover {
  box-shadow: 3px 3px 0 var(--ink);
  transform: translate(-1px, -1px);
}

/* 헤드라인 */
.big-sentence {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 6.4vw, 44px);
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  word-break: keep-all;
  cursor: text;
}

.blank {
  display: inline-block;
  min-width: 7.5em;
  max-width: 100%;
  border: none;
  border-bottom: 7px solid var(--accent);
  background: transparent;
  font: inherit;
  font-size: 1.18em;
  color: var(--accent);
  padding: 0 8px 4px;
  outline: none;
  vertical-align: baseline;
}
.blank::placeholder { color: #b9bdde; }
.blank:focus { background: var(--accent-soft); }

/* 생긴다는데 / 바뀐다는데 토글 */
.verb-toggle { white-space: nowrap; }
.verb-toggle .verb {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  color: #b7b6af;
  text-decoration: line-through;
  text-decoration-thickness: 3px;
  transition: color .12s;
}
.verb-toggle .verb.active {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 5px solid var(--accent);
}
.verb-toggle .verb:not(.active):hover { color: var(--ink-soft); }
.verb-sep { color: #c9c8c1; margin: 0 8px; font-weight: 500; }

.hint {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 14px 0 56px;
  line-height: 1.8;
}
.hint b { color: var(--accent); font-weight: 700; }

/* 폼 섹션 */
fieldset {
  border: none;
  margin: 0 0 44px;
  padding: 0;
}
legend {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  padding: 0;
  margin-bottom: 14px;
}
legend .sub { font-family: inherit; font-weight: 500; color: var(--ink-soft); font-size: 13px; }

.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pills label { cursor: pointer; }
.pills input { position: absolute; opacity: 0; pointer-events: none; }
.pills span {
  display: inline-block;
  padding: 9px 16px;
  border: 2px solid var(--ink);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  transition: background .12s, color .12s, box-shadow .12s, transform .12s;
}
.pills label:hover span:not(:checked) { box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px, -1px); }
.pills input:checked + span {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: none;
  transform: none;
}
.pills input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

textarea {
  width: 100%;
  min-height: 220px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: #fff;
  padding: 16px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  resize: vertical;
  outline: none;
  transition: box-shadow .12s;
}
textarea:focus { border-color: var(--accent); box-shadow: 4px 4px 0 var(--accent); }
textarea::placeholder { color: #b0afa8; }

.count { font-size: 13px; color: var(--ink-soft); text-align: right; margin-top: 8px; }

/* 제출 버튼 */
.submit-row { margin-top: 8px; }
button.primary {
  appearance: none;
  border: 2px solid var(--ink);
  background: var(--accent);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  padding: 15px 40px;
  cursor: pointer;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform .12s, box-shadow .12s;
}
button.primary:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
button.primary:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--ink); }
button.primary:disabled {
  background: #a9adc9;
  transform: none;
  box-shadow: 5px 5px 0 var(--ink);
  cursor: default;
}

.form-error {
  color: #d0342c;
  font-size: 14px;
  font-weight: 600;
  margin-top: 14px;
  min-height: 1.5em;
}

.privacy {
  margin-top: 64px;
  padding-top: 18px;
  border-top: 2px solid var(--ink);
  font-size: 13px;
  color: var(--ink-soft);
}

/* 관리 페이지로 가는 비밀 표시 */
a.secret-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
  margin-left: 6px;
  vertical-align: 1px;
}
a.secret-dot:hover { background: var(--accent); }

/* 제출 완료 화면 */
.done { display: none; }
.done h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 5.4vw, 36px);
  line-height: 1.5;
  word-break: keep-all;
  margin: 0 0 16px;
}
.done p { color: var(--ink-soft); margin: 0 0 36px; }
.done .actions { display: flex; gap: 14px; flex-wrap: wrap; }
.done a.primary {
  display: inline-block;
  text-decoration: none;
  border: 2px solid var(--ink);
  background: var(--accent);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  padding: 13px 30px;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform .12s, box-shadow .12s;
}
.done a.primary:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
.done button.ghost {
  appearance: none;
  background: #fff;
  border: 2px solid var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  padding: 13px 30px;
  cursor: pointer;
  color: var(--ink);
  transition: transform .12s, box-shadow .12s;
}
.done button.ghost:hover { box-shadow: 4px 4px 0 var(--ink); transform: translate(-1px, -1px); }

/* 로드 모션: 위에서 순서대로 자리 잡기 */
@media (prefers-reduced-motion: no-preference) {
  .big-sentence, .hint, form fieldset, .submit-row {
    animation: rise .5s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .hint { animation-delay: .08s; }
  form fieldset:nth-of-type(1) { animation-delay: .16s; }
  form fieldset:nth-of-type(2) { animation-delay: .24s; }
  .submit-row { animation-delay: .32s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
