/* 오디씨 LAB v2: Pretendard 한 가족, 덜어낸 디자인. 손그림 느낌은 캐릭터 일러스트가 담당 */
:root {
  --lilac: #bfadff;
  --lilac-hover: #b09bff;
  --lilac-soft: #f3efff;
  --lilac-line: #ddd3ff;
  --ink: #323329;
  --ink-soft: #55564c;
  --bg: #fffdf8;
  --surface: #ffffff;
  --border: #e7e4da;
  --box-gray: #f1f0ec;
  --radius: 14px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "D2Coding", monospace;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

strong {
  font-weight: 700;
}

h1,
h2,
h3 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- 헤더 / 푸터 ---------- */
.site-header {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.logo img {
  width: auto;
  height: 26px;
  display: block;
}
.lab-badge {
  display: inline-block;
  padding: 3px 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  background: var(--lilac);
  border-radius: 999px;
  vertical-align: middle;
}
.header-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
}
.header-link:hover {
  color: var(--ink);
  text-decoration: underline;
}

.site-footer {
  margin-top: 72px;
  padding: 28px 0 44px;
  border-top: 1px solid var(--border);
  font-size: 15px;
  color: var(--ink-soft);
  text-align: center;
}
.site-footer p {
  margin: 4px 0;
}

/* ---------- 공통 ---------- */
.section {
  margin-top: 64px;
}
.section-title {
  margin: 0 0 20px;
  font-size: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.3;
  color: var(--ink);
  text-decoration: none;
  background: var(--lilac);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover {
  background: var(--lilac-hover);
}
.btn:active {
  background: #a48dfa;
}
.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border);
}
.btn-secondary:hover,
.btn-secondary:active {
  background: var(--lilac-soft);
}
.btn-block {
  width: 100%;
}
.btn:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

/* ---------- 홈 ---------- */
.home-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding-top: 40px;
}
.home-hero h1 {
  margin: 0 0 12px;
  font-size: 34px;
}
.home-hero h1 .lab-badge {
  font-size: 16px;
  padding: 4px 10px;
  margin-left: 4px;
  position: relative;
  top: -4px;
}
.home-hero p {
  margin: 0;
  color: var(--ink-soft);
}
.home-hero img {
  width: 96px;
}

.recipe-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.recipe-card {
  display: block;
  padding: 20px;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.recipe-card:hover {
  border-color: var(--lilac);
  box-shadow: 0 4px 16px rgba(50, 51, 41, 0.06);
}
.recipe-card h3 {
  margin: 0 0 6px;
  font-size: 20px;
}
.recipe-card p {
  margin: 0;
  color: var(--ink-soft);
}
.recipe-card .card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  font-size: 15px;
}
.tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  background: var(--lilac-soft);
  border-radius: 999px;
}
.go {
  margin-left: auto;
  font-weight: 700;
}
.coming-soon {
  margin: 16px 0 0;
  font-size: 15px;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------- 레시피 페이지 ---------- */
.recipe-hero {
  padding-top: 32px;
  text-align: center;
}
.recipe-hero .character {
  width: 120px;
  margin: 0 auto 16px;
}
.recipe-hero .kicker {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
}
.recipe-hero h1 {
  margin: 0 0 16px;
  font-size: 30px;
}
.recipe-hero .lead {
  margin: 0 auto;
  max-width: 32em;
  font-size: 18px;
}
.recipe-hero .byline {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--ink-soft);
}
.reel-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  padding: 10px 18px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.reel-link:hover {
  border-color: var(--lilac);
  background: var(--lilac-soft);
}
.jump {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
}
.jump a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}
.jump a:hover {
  color: var(--ink);
  border-color: var(--lilac);
}

/* 사용법: 번호 목록 */
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 0 0 20px 42px;
}
.step:last-child {
  padding-bottom: 0;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  background: var(--lilac);
  border-radius: 50%;
}
.step p {
  margin: 0;
}

.note-box {
  margin-top: 28px;
  padding: 18px 20px;
  background: var(--lilac-soft);
  border-radius: var(--radius);
  font-size: 16px;
}
.note-box ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.note-box .aside-note {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--lilac-line);
  color: var(--ink-soft);
}

/* 프롬프트 */
.prompt-intro {
  margin: 0 0 16px;
}
.copy-bar {
  position: sticky;
  top: 8px;
  z-index: 5;
  margin-bottom: 12px;
}
.copy-bar .btn {
  box-shadow: 0 2px 10px rgba(50, 51, 41, 0.12);
}
.prompt-box {
  position: relative;
  background: var(--box-gray);
  border-radius: var(--radius);
  overflow: hidden;
}
.prompt-box pre {
  margin: 0;
  padding: 20px 18px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: anywhere;
  tab-size: 2;
}
.prompt-box.is-collapsed pre {
  max-height: 360px;
  overflow: hidden;
}
.prompt-box.is-collapsed::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 96px;
  background: linear-gradient(rgba(241, 240, 236, 0), var(--box-gray) 85%);
  pointer-events: none;
}
.prompt-actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.prompt-meta {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--ink-soft);
  text-align: center;
}

/* FAQ: 구분선 아코디언 */
.faq {
  border-top: 1px solid var(--border);
}
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 18px 36px 18px 0;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.15s ease;
}
.faq details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}
.faq .answer {
  padding: 0 0 20px;
}
.faq .answer p {
  margin: 0;
}

/* 만든 사람 */
.maker {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 64px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.maker img {
  flex: none;
  width: 56px;
  height: 56px;
}
.maker p {
  margin: 0;
}
.maker .ask {
  margin-top: 2px;
  font-size: 16px;
  color: var(--ink-soft);
}

/* 토스트 */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 50;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(50, 51, 41, 0.2);
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.is-shown {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* 404 */
.notfound {
  padding: 56px 16px 24px;
  text-align: center;
}
.notfound img {
  width: 110px;
  margin: 0 auto 20px;
}
.notfound h1 {
  margin: 0 0 8px;
  font-size: 26px;
}
.notfound p {
  margin: 0 0 24px;
  color: var(--ink-soft);
}

.nowrap {
  white-space: nowrap;
}

@media (min-width: 640px) {
  .home-hero {
    padding-top: 56px;
  }
  .home-hero h1 {
    font-size: 42px;
  }
  .home-hero img {
    width: 130px;
  }
  .recipe-hero .character {
    width: 140px;
  }
  .recipe-hero h1 {
    font-size: 38px;
  }
  .section-title {
    font-size: 26px;
  }
  .prompt-box pre {
    font-size: 15px;
    padding: 24px;
  }
  .prompt-actions {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn,
  .recipe-card,
  .toast,
  .faq summary::after {
    transition: none;
  }
}
