/* Tovia Content 1.2.0 — 디자인 명세 v0.1 기준. 테마 없이도 동작하도록 값은 직접 적는다. */
.tovia-prompt, .tovia-action, .tovia-downloads, .tovia-related, .tovia-comparison, .tovia-step-overview, .tovia-step-section, .tovia-sample {
  box-sizing: border-box;
}

/* 옛 영문 라벨(PROMPT, BEFORE, AT A GLANCE, YOUR TURN, NEXT STEP)은 숨긴다. STEP 번호만 칩으로 남긴다. */
.tovia-label { display: none !important; }

/* ---------- STEP ---------- */
.tovia-step-section { margin: 2.75rem 0; }
.tovia-step-section > .tovia-label {
  display: inline-block !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .6875rem; font-weight: 600; letter-spacing: .02em; line-height: 1.4;
  color: #fff; background: #15171c; padding: .18rem .45rem; border-radius: 3px;
  margin: 0 0 .5rem !important;
}
.tovia-step-section > h2, .tovia-step-section > .wp-block-heading:first-of-type {
  font-size: 1.1875rem !important; font-weight: 700; letter-spacing: -0.025em; line-height: 1.45;
  margin: 0 0 1rem !important; padding-bottom: .45rem; border-bottom: 2px solid #15171c;
}

/* ---------- 전체 과정 ---------- */
.tovia-step-overview { border: 1px solid #e2e4e0; border-radius: 6px; padding: 1.25rem 1.4rem; margin: 0 0 2.5rem; }
.tovia-overview-title { margin: 0 0 .85rem !important; font-size: .9375rem; }
.tovia-step-overview ol { list-style: none; counter-reset: tovia-ov; margin: 0; padding: 0 !important; display: grid; gap: .5rem; }
.tovia-step-overview li { counter-increment: tovia-ov; display: flex; gap: .7rem; align-items: baseline; font-size: .9375rem; margin: 0 !important; }
.tovia-step-overview li::before {
  content: counter(tovia-ov); flex: none; min-width: 1.3rem; text-align: center; padding: .1rem 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .6875rem;
  color: #3a3f49; background: #eceee9; border-radius: 3px;
}

/* ---------- 비교 ---------- */
.tovia-comparison.wp-block-columns {
  gap: 1px !important; background: #e2e4e0; border: 1px solid #e2e4e0; border-radius: 6px; overflow: hidden;
  margin: 0 0 2rem; flex-wrap: nowrap;
}
.tovia-comparison > .wp-block-column { background: #fff; padding: 1.25rem; margin: 0 !important; }
.tovia-comparison > .wp-block-column:last-child, .tovia-comparison > .is-after { background: #fefbec; }
.tovia-comparison h3 { font-size: .8125rem !important; font-weight: 600; color: #6b7280; margin: 0 0 .85rem !important; letter-spacing: 0; }
.tovia-comparison > .wp-block-column:last-child h3 { color: #15171c; }
.tovia-comparison p { font-size: .9375rem; color: #3a3f49; margin: 0 0 .7rem; }
.tovia-comparison > .wp-block-column:last-child p { color: #15171c; }
.tovia-comparison p:last-child { margin-bottom: 0; }
@media (max-width: 46rem) {
  .tovia-comparison.wp-block-columns { flex-wrap: wrap !important; }
  .tovia-comparison > .wp-block-column { flex-basis: 100% !important; }
}

/* ---------- 행동 안내 ---------- */
.tovia-action {
  border-left: 3px solid #f5d35a; background: #fefbed; border-radius: 0 5px 5px 0;
  padding: .95rem 1.15rem; margin: 0 0 1.35rem;
}
.tovia-action p { margin: 0 0 .4rem !important; font-size: .9375rem; }
.tovia-action p:last-child { margin-bottom: 0 !important; }

/* ---------- 예시 자료 ---------- */
.tovia-sample {
  background: #f4f5f3; border-radius: 5px; padding: 1rem 1.15rem; margin: 0 0 1.15rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Noto Sans KR", monospace;
  font-size: .8125rem; line-height: 1.85; color: #3a3f49;
}
.tovia-sample p { margin: 0 !important; }

/* ---------- 프롬프트 블록 ---------- */
.tovia-prompt {
  border: 1px solid #c9ccc5; border-radius: 6px; overflow: hidden; background: #f4f5f3;
  margin: 0 0 1.75rem; padding: 0;
}
.tovia-prompt .tovia-prompt-title {
  font-size: .9375rem !important; font-weight: 700; line-height: 1.5; letter-spacing: -0.01em;
  margin: 0 !important; padding: 1rem 1.15rem 0; border: 0 !important; color: #15171c;
}
.tovia-prompt .tovia-version {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .6875rem; color: #6b7280;
  margin: .15rem 0 0 !important; padding: 0 1.15rem;
}
.tovia-prompt .tovia-prompt-description { font-size: .8125rem; color: #6b7280; margin: .25rem 0 0 !important; padding: 0 1.15rem; }
.tovia-prompt-details { margin-top: 1rem; border-top: 1px solid #e2e4e0; background: #fff; }
.tovia-prompt-details summary {
  cursor: pointer; padding: .7rem 1.15rem; font-size: .8125rem; font-weight: 600; color: #3a3f49;
  list-style: none; display: flex; align-items: center; gap: .5rem;
}
.tovia-prompt-details summary::-webkit-details-marker { display: none; }
.tovia-prompt-details summary::before { content: "+"; font-family: ui-monospace, monospace; width: 1rem; text-align: center; }
.tovia-prompt-details[open] summary::before { content: "−"; }
.tovia-prompt-details summary:hover { background: #f4f5f3; }
.tovia-prompt .tovia-prompt-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Noto Sans KR", monospace;
  font-size: .8125rem; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2;
  max-height: 32rem; overflow: auto; color: #3a3f49; background: #fff;
  margin: 0; padding: 0 1.15rem 1.15rem; border: 0; border-radius: 0;
}
.tovia-prompt-actions { display: flex; gap: .5rem; flex-wrap: wrap; padding: .7rem 1.15rem; border-top: 1px solid #e2e4e0; }
.tovia-prompt-actions button {
  font: inherit; font-size: .8125rem; font-weight: 600; line-height: 1.4;
  border: 1px solid #c9ccc5; border-radius: 4px; padding: .45rem .8rem; background: #fff; color: #15171c; cursor: pointer;
}
.tovia-prompt-actions button:first-child { background: #15171c; color: #fff; border-color: #15171c; }
.tovia-prompt-actions button:hover { opacity: .85; }
.tovia-prompt-actions button[hidden] { display: none; }
.tovia-copy-status { font-size: .75rem; color: #3a3f49; margin: 0 !important; padding: 0 1.15rem; min-height: 0; }
.tovia-copy-status:not(:empty) { padding: 0 1.15rem .7rem; }
.tovia-prompt button:focus-visible, .tovia-prompt summary:focus-visible, .tovia-related a:focus-visible {
  outline: 2px solid #15171c; outline-offset: 2px;
}

/* ---------- 이 글에서 쓴 자료 ---------- */
.tovia-downloads { border: 1px solid #e2e4e0; border-radius: 6px; padding: 1.3rem 1.4rem; margin: 3rem 0 0; }
.tovia-downloads h2, .tovia-downloads h3 { font-size: 1rem !important; margin: 0 0 .3rem !important; border: 0 !important; padding: 0 !important; }
.tovia-downloads > p { font-size: .875rem; color: #6b7280; margin: 0 0 1rem !important; }
.tovia-downloads .wp-block-file { margin: .5rem 0 0 !important; }

/* ---------- 이어서 보면 좋은 글 ---------- */
.tovia-related { margin: 3rem 0 0; }
.tovia-related h2 { font-size: 1rem !important; margin: 0 0 1rem !important; border: 0 !important; padding: 0 !important; }
.tovia-related ul { list-style: none; padding: 0 !important; margin: 0; }
.tovia-related li { margin: 0 !important; border-top: 1px solid #e2e4e0; }
.tovia-related li:last-child { border-bottom: 1px solid #e2e4e0; }
.tovia-related a { display: flex; gap: .9rem; align-items: baseline; padding: .9rem 0; text-decoration: none !important; color: #15171c; font-size: .9375rem; font-weight: 600; }
.tovia-related a:hover { background: none !important; }
.tovia-related a:hover span { box-shadow: inset 0 -.45em 0 #fbe489; }
.tovia-related em { font-style: normal; flex: none; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Noto Sans KR", monospace; font-size: .6875rem; font-weight: 400; color: #6b7280; }

/* ---------- 글 메타 (테마가 없을 때 대비) ---------- */
.tovia-post-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; font-size: .8125rem; margin: .9rem 0 0; }
.tovia-post-meta div { display: flex; gap: .4rem; }
.tovia-post-meta dt { color: #6b7280; }
.tovia-post-meta dd { margin: 0; }

/* ---------- 편집기 ---------- */
.tovia-editor input, .tovia-editor textarea { box-sizing: border-box; }
.tovia-editor .components-base-control { margin-bottom: 16px; }
.tovia-editor li button { margin: 4px; }
.tovia-editor.tovia-related li { padding: 8px 0; }
.tovia-editor.tovia-related li span { margin-right: 8px; }
.tovia-editor.tovia-prompt { padding: 16px; background: #fff; }
