@charset "UTF-8";
/* =====================================================================
 *  AI 데모 페이지 — style.css 토큰을 그대로 사용 (밝은 블루/화이트 톤)
 * ===================================================================== */

/* ------------------------------- Hero ------------------------------- */
.demo-page { padding-top: 72px; }

.demo-hero {
  position: relative;
  padding: clamp(44px, 6.5vw, 74px) 0 clamp(30px, 4vw, 46px);
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #eef5ff 0%, #f8fbff 70%, #ffffff 100%);
}
.demo-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .85;
  pointer-events: none;
}
.demo-hero-bg svg { width: 100%; height: 100%; }
.demo-hero .h2 { margin: 18px 0 16px; }
.demo-hero .lead { max-width: 62ch; }

.demo-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(26px, 4vw, 40px);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--sh-sm);
}
.demo-stats div { background: #fff; padding: 16px 14px; }
.demo-stats b {
  display: block;
  font-size: clamp(18px, 2.4vw, 25px);
  font-weight: 780;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
  color: var(--bl);
}
.demo-stats span { font-size: 12px; color: var(--txt-mute); }
@media (max-width: 620px) { .demo-stats { grid-template-columns: 1fr 1fr; } }

/* ----------------------------- 체험 잠금 ----------------------------- */
.lock-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(245, 158, 11, .35);
  border-radius: var(--r-md);
  background: #fffaf0;
}
.lock-bar .lock-ic {
  flex: none;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #b45309;
  background: rgba(245, 158, 11, .14);
}
.lock-bar .ic-open { display: none; }
.lock-txt { flex: 1; min-width: 0; }
.lock-txt b { display: block; font-size: 15px; font-weight: 700; color: var(--txt); }
.lock-txt span { font-size: 13.2px; color: var(--txt-dim); }
.lock-bar .btn { flex: none; }

/* 해제 상태 */
.lock-bar.is-open {
  border-color: rgba(18, 183, 106, .35);
  background: #f0fdf7;
}
.lock-bar.is-open .lock-ic { color: #0e8f55; background: rgba(18, 183, 106, .14); }
.lock-bar.is-open .ic-lock { display: none; }
.lock-bar.is-open .ic-open { display: block; }
.lock-bar.is-open .btn {
  color: var(--txt-dim);
  background: #fff;
  border: 1px solid var(--line-strong);
  box-shadow: none;
  animation: none;
}
.lock-bar.is-open .btn:hover { color: var(--rd); border-color: rgba(229, 72, 77, .4); }

@media (max-width: 620px) {
  .lock-bar { flex-wrap: wrap; }
  .lock-bar .btn { width: 100%; }
}

/* 잠금 모달 */
.lock-card { width: min(430px, 100%); }
.lock-body { padding: 26px; }
.lock-body > p {
  font-size: 14px;
  color: var(--txt-dim);
  line-height: 1.75;
  margin-bottom: 18px;
}
.lock-body input {
  width: 100%;
  font: inherit;
  font-size: 16px;
  letter-spacing: .05em;
  color: var(--txt);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 13px 15px;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.lock-body input:focus {
  outline: none;
  background: #fff;
  border-color: var(--bl);
  box-shadow: 0 0 0 3px rgba(26, 92, 245, .12);
}
.lock-body .btn { width: 100%; margin-top: 14px; }
.lock-err {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--rd);
}
.lock-note { margin-top: 16px; font-size: 12.5px; color: var(--txt-mute); text-align: center; }

/* ------------------------------- Tabs ------------------------------- */
.demo-section { padding-top: clamp(32px, 5vw, 52px); }

.demo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.demo-tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 17px;
  font-size: 14px;
  font-weight: 620;
  color: var(--txt-dim);
  border: 1px solid var(--line);
  border-radius: 99px;
  background: #fff;
  box-shadow: var(--sh-sm);
  transition: .35s var(--ease);
}
.demo-tab svg { opacity: .7; }
.demo-tab:hover {
  color: var(--bl);
  border-color: rgba(26, 92, 245, .4);
  transform: translateY(-2px);
}
.demo-tab.is-active {
  color: #fff;
  font-weight: 700;
  border-color: transparent;
  background: var(--grad);
  background-size: 200% 100%;
  box-shadow: var(--sh-bl);
  animation: shimmer 8s linear infinite;
}
.demo-tab.is-active svg { opacity: 1; }

/* ------------------------------- Grid ------------------------------- */
.demo-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 1000px) { .demo-grid { grid-template-columns: 1fr; } }

.demo-panel {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--sh-sm);
  padding: 26px;
}
.panel-head { margin-bottom: 22px; }
.panel-head .h3 { margin-bottom: 8px; }
.panel-head p { font-size: 14.2px; color: var(--txt-dim); line-height: 1.72; }

/* ------------------------------- Form ------------------------------- */
.demo-form { display: grid; gap: 15px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--txt);
  margin-bottom: 7px;
}
.field label i { font-style: normal; color: var(--bl); margin-left: 3px; }
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 14.5px;
  color: var(--txt);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
  resize: vertical;
}
.field textarea { min-height: 110px; line-height: 1.7; }
.field input::placeholder,
.field textarea::placeholder { color: #a3aec4; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--bl);
  box-shadow: 0 0 0 3px rgba(26, 92, 245, .12);
}
.field select { appearance: none; cursor: pointer; }

.form-actions { display: flex; gap: 10px; margin-top: 22px; }
.form-actions .btn { flex: 1; }
.form-note { margin-top: 12px; font-size: 12px; color: var(--txt-mute); text-align: center; }

.btn[disabled] { opacity: .5; pointer-events: none; }

.run-spin {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
}

/* ------------------------------ Output ------------------------------ */
.out-panel { padding: 0; overflow: hidden; display: flex; flex-direction: column; min-height: 520px; }

.out-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.out-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--txt-mute);
  white-space: nowrap;
}
.out-status i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--txt-mute);
  transition: background .3s ease;
}
.out-status.is-run { color: var(--bl); }
.out-status.is-run i { background: var(--bl); animation: ping2 1.2s ease-in-out infinite; }
.out-status.is-done { color: #0e8f55; }
.out-status.is-done i { background: var(--lm); }
.out-status.is-err { color: var(--rd); }
.out-status.is-err i { background: var(--rd); }

.out-meta {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--txt-mute);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.out-meta b { color: var(--txt-dim); font-weight: 700; }

.icon-btn {
  flex: none;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--txt-dim);
  border: 1px solid var(--line);
  background: #fff;
  transition: .3s ease;
}
.icon-btn:hover { color: var(--bl); border-color: rgba(26, 92, 245, .45); }

.out-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  max-height: 68vh;
  background: #fff;
}
.out-empty {
  height: 100%;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  color: var(--txt-mute);
  font-size: 14px;
  line-height: 1.8;
}
.out-empty b { color: var(--txt-dim); }

.md.is-streaming::after {
  content: "";
  display: inline-block;
  width: 8px; height: 15px;
  background: var(--bl);
  vertical-align: -2px;
  margin-left: 2px;
  animation: blink 1s steps(2) infinite;
}

/* 진행 단계 안내 */
.stage-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  padding: 12px 16px;
  border: 1px solid rgba(26, 92, 245, .22);
  border-radius: var(--r-sm);
  background: var(--bl-soft);
  color: var(--bl-deep);
  font-size: 13.5px;
  font-weight: 600;
}
.stage-note::before {
  content: "";
  flex: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(26, 92, 245, .3);
  border-top-color: var(--bl);
  animation: spin .8s linear infinite;
}
.stage-note.is-done::before {
  border: 0;
  background: var(--lm);
  animation: none;
}

/* 생성된 이미지 */
.gen-image {
  margin: 20px 0 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: var(--sh);
  animation: imgIn .8s var(--ease);
}
@keyframes imgIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.gen-image img { width: 100%; height: auto; display: block; }
.gen-image figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 15px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--txt-mute);
  background: #fff;
}
.gen-image figcaption a {
  color: var(--bl);
  font-weight: 700;
  white-space: nowrap;
}
.gen-image figcaption a:hover { text-decoration: underline; }

/* --------------------------- Markdown 렌더 -------------------------- */
.md { font-size: 15px; line-height: 1.82; color: var(--txt-dim); word-break: break-word; }
.md > *:first-child { margin-top: 0; }
.md h1, .md h2, .md h3, .md h4 {
  color: var(--txt);
  line-height: 1.34;
  margin: 26px 0 12px;
  letter-spacing: -.028em;
}
.md h1 { font-size: 23px; }
.md h2 {
  font-size: 18.5px;
  padding-bottom: 9px;
  border-bottom: 2px solid var(--bl-soft);
}
.md h3 { font-size: 16.5px; }
.md h4 { font-size: 15px; color: var(--txt-dim); }
.md p { margin: 12px 0; }
.md strong { color: var(--txt); font-weight: 700; }
.md em { color: var(--bl); font-style: normal; }
.md ul, .md ol { margin: 12px 0; padding-left: 22px; }
.md li { margin: 7px 0; }
.md li::marker { color: var(--bl); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.md blockquote {
  margin: 14px 0;
  padding: 10px 16px;
  border-left: 3px solid var(--bl);
  background: var(--bl-soft);
  border-radius: 0 8px 8px 0;
  color: var(--txt-dim);
}
.md code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .88em;
  color: var(--bl-deep);
  background: var(--bl-soft);
  border: 1px solid rgba(26, 92, 245, .16);
  padding: 2px 6px;
  border-radius: 5px;
}
.md pre {
  margin: 16px 0;
  padding: 16px;
  background: #0d1c38;
  border-radius: var(--r-sm);
  overflow-x: auto;
}
.md pre code {
  color: #d6e2f7;
  background: none;
  border: 0;
  padding: 0;
  font-size: 12.8px;
  line-height: 1.7;
}
.md table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13.8px;
  display: block;
  overflow-x: auto;
}
.md th, .md td {
  border: 1px solid var(--line);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
}
.md th {
  background: var(--bg-soft);
  color: var(--txt);
  font-weight: 700;
  white-space: nowrap;
}

/* ------------------------------- Board ------------------------------ */
.board { margin-top: clamp(40px, 6vw, 64px); }
.board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
}
.board-sub { font-size: 13px; color: var(--txt-mute); }

/* 종류 필터 */
.board-filter { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 620;
  color: var(--txt-dim);
  border: 1px solid var(--line);
  border-radius: 99px;
  background: #fff;
  transition: .25s ease;
}
.chip em {
  font-style: normal;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--txt-mute);
  background: var(--bg-tint);
  border-radius: 99px;
  padding: 1px 7px;
}
.chip:hover { color: var(--bl); border-color: rgba(26, 92, 245, .35); }
.chip.is-active {
  color: #fff;
  background: var(--bl);
  border-color: var(--bl);
}
.chip.is-active em { color: #fff; background: rgba(255, 255, 255, .22); }

.board-list {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--sh-sm);
}
.post {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 13px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  transition: background .25s ease;
}
.post:last-child { border-bottom: 0; }
.post:hover { background: var(--bl-soft); }

/* 종류 배지 */
.post-tag {
  flex: none;
  min-width: 64px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 7px;
  color: var(--bl-deep);
  background: var(--bl-soft);
}
.post-tag.t-product { color: #7c3aed; background: #f1ecfe; }
.post-tag.t-inquiry { color: #b45309; background: #fef4e2; }
.post-tag.t-seo     { color: #0e8f55; background: #e7f8f0; }
.post-tag.t-review  { color: #be185d; background: #fdeef5; }
.post-tag.t-photo   { color: #0369a1; background: #e4f4fd; }

.post-thumb {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid var(--line);
}
.post-title {
  flex: 1;
  font-size: 14.5px;
  color: var(--txt);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-date { flex: none; font-size: 12px; color: var(--txt-mute); }
.post.is-new { animation: postIn .8s var(--ease); }
@keyframes postIn {
  from { background: rgba(26, 92, 245, .18); transform: translateX(-8px); }
}
.board-empty { padding: 26px; text-align: center; color: var(--txt-mute); font-size: 14px; }

/* ------------------------------- Modal ------------------------------ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(13, 28, 56, .5);
  backdrop-filter: blur(4px);
  animation: fadeIn .25s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal-card {
  width: min(760px, 100%);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: 0 40px 90px -30px rgba(13, 28, 56, .5);
  overflow: hidden;
}
.modal-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.modal-head h4 { flex: 1; font-size: 17px; }
.modal-body { padding: 24px; overflow-y: auto; }

/* ------------------------ Reduced motion --------------------------- */
@media (prefers-reduced-motion: reduce) {
  .demo-tab.is-active { animation: none; }
  .stage-note::before { animation: none; }
}
