/* AI 양식 만들기 (/make) — common.css 의 --ui-* 색을 그대로 쓴다 */
.mk { max-width: 1100px; margin: 8px auto 0; padding: 0 16px 32px; font-size: 15px; line-height: 1.7; }
.mk h1 { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.mk h2 { margin: 36px 0 12px; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.mk-lead { margin-top: 8px; color: var(--ui-sub); }
.mk-box { margin-top: 22px; padding: 16px; border: 1px solid var(--ui-border); border-radius: 14px; background: var(--ui-surface); }
.mk-box textarea {
  width: 100%; box-sizing: border-box; resize: vertical; min-height: 84px; padding: 12px 14px;
  border: 1px solid var(--ui-border); border-radius: 10px; background: var(--ui-bg); color: var(--ui-text);
  font: inherit; line-height: 1.6;
}
.mk-box textarea:focus { outline: 2px solid var(--ui-primary); outline-offset: -1px; }
.mk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mk-chip {
  padding: 5px 11px; border: 1px solid var(--ui-border); border-radius: 999px; background: var(--ui-surface);
  color: var(--ui-sub); font: inherit; font-size: 13px; cursor: pointer;
}
.mk-chip:hover { background: var(--ui-hover); color: var(--ui-text); }
.mk-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.mk-status { color: var(--ui-sub); font-size: 13.5px; }
.mk-go, .mk-buy {
  padding: 10px 20px; border: 0; border-radius: 10px; background: var(--ui-primary); color: var(--ui-on-primary);
  font: inherit; font-weight: 700; cursor: pointer;
}
.mk-go:hover, .mk-buy:hover { background: var(--ui-primary-hover); }
.mk-go:disabled { opacity: .6; cursor: progress; }
.mk-msg { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--ui-hover); font-size: 14px; }
.mk-msg.bad { color: var(--ui-danger); }
.mk-plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mk-plan { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--ui-border); border-radius: 14px; background: var(--ui-surface); }
.mk-plan.best { border-color: var(--ui-primary); }
.mk-price { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.mk-price small { margin-left: 2px; font-size: 14px; font-weight: 600; color: var(--ui-sub); }
.mk-desc { color: var(--ui-sub); font-size: 14px; flex: 1; }
.mk-qty { display: flex; gap: 14px; font-size: 14px; margin-bottom: 4px; }
.mk-fine { margin-top: 14px; color: var(--ui-muted); font-size: 12.5px; line-height: 1.6; }
.mk-fine a { color: inherit; }
.mk-acct { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 0 0 18px; font-size: 13px; color: var(--ui-sub); }
.mk-acct[hidden], .mk-acct span:empty, .mk-acct [hidden] { display: none; }
.mk-code code { padding: 3px 8px; border-radius: 6px; background: var(--ui-hover); font-size: 13px; word-break: break-all; }
.mk-acct input { padding: 6px 10px; border: 1px solid var(--ui-border); border-radius: 8px; background: var(--ui-bg); color: var(--ui-text); font: inherit; width: 260px; max-width: 100%; }
.mk-acct button { font: inherit; cursor: pointer; }
.mk-link { border: 0; background: none; padding: 0; color: var(--ui-sub); text-decoration: underline; }
.mk-sub { display: block; color: var(--ui-sub); font-size: 12.5px; font-weight: 500; }
@media (max-width: 600px) {
  .mk h1 { font-size: 24px; }
  .mk-plan-grid { grid-template-columns: 1fr; }
  .mk-go { width: 100%; }
}

/* 첫 화면(index) 안에 들어갈 때: 히어로 안 입력창 + 아래 결과·이용권 영역 */
.mk-home { max-width: 760px; margin: 22px auto 0; padding: 0; text-align: left; }
.mk-home .mk-lead { margin: 0; font-size: 15px; }
.mk-home .mk-box { margin-top: 12px; box-shadow: 0 6px 24px rgba(15, 23, 42, .06); }
.mk-home > .mk-fine { margin-top: 8px; font-size: 12px; }
.mk-home-rest { padding-bottom: 0; }
.mk-home-rest > section:not([hidden]) { margin-bottom: 24px; }

/* 요금 안내 페이지(pricing.html) */
.pricing .mk-plan-grid { margin: 22px 0 8px; }
.pricing a.mk-buy { display: block; text-align: center; text-decoration: none; color: #fff; }
.pricing ol { padding-left: 1.4em; list-style: decimal; }

/* ---------- AI 결과: 목록 맨 위, 자주 쓰는 양식과 같은 카드 (.card/.thumb 는 common.css) ---------- */
.mk-sec h2 .mk-clock { margin-left: 8px; font-variant-numeric: tabular-nums; }
.mk-sec .mk-result-q { margin: -6px 0 16px; color: var(--ui-sub); font-size: 13.5px; }
.mk-progress { height: 3px; margin: -8px 0 14px; border-radius: 99px; background: var(--ui-hover); overflow: hidden; }
.mk-progress i { display: block; height: 100%; width: 3%; border-radius: inherit; background: linear-gradient(90deg, #3b82f6, #8b5cf6); transition: width .4s ease; }
.mk-card .thumb::before { display: none; }
.mk-card:not([href]) { cursor: default; }
.mk-card:not([href]) .thumb { transform: none !important; }
.mk-card:not([href]) .thumb::after { display: none; }
.mk-sheet { position: absolute; left: 0; top: 0; z-index: 1; width: 794px; height: 1123px; padding: 64px 60px; box-sizing: border-box; transform: scale(var(--s, .22)); transform-origin: 0 0; background: #fff; color: #111827; overflow: hidden; transition: opacity .5s; font-size: 13px; }
.thumb.ready .mk-sheet { opacity: 0; pointer-events: none; }
.mk-scan { position: absolute; left: 0; right: 0; top: 0; height: 30%; background: linear-gradient(180deg, transparent, rgba(59, 130, 246, .10), transparent); animation: mk-scan 2.4s ease-in-out infinite; z-index: 2; pointer-events: none; }
.mk-card.done .mk-scan, .mk-card.failed .mk-scan { display: none; }
@keyframes mk-scan { 0% { transform: translateY(-100%); } 100% { transform: translateY(340%); } }
.sk-top { position: relative; display: flex; align-items: center; justify-content: center; min-height: 110px; margin-bottom: 26px; }
.mk-sh-title { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: .12em; text-align: center; word-break: keep-all; animation: mk-in .4s ease both; }
.mk-sh-title:empty { width: 240px; height: 30px; border-radius: 6px; background: #eef0f3; animation: mk-pulse 1.2s ease-in-out infinite; }
.sk-ap { position: absolute; right: 0; top: 0; border-collapse: collapse; font-size: 12px; animation: mk-in .4s ease both; }
.sk-ap th, .sk-ap td { border: 1px solid #333; padding: 4px 10px; text-align: center; font-weight: 700; }
.sk-ap td { height: 52px; }
.sk-body { transition: transform .5s ease; }
.sk-b.in { animation: mk-in .35s ease both; }
.sk-b.cur > :last-child::after, .sk-b.cur .sk-tb tr:last-child td:first-child::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 3px; vertical-align: -2px; background: #2563eb; animation: mk-blink 1s steps(1) infinite; }
@keyframes mk-blink { 50% { opacity: 0; } }
.sk-h { margin: 22px 0 10px; padding-left: 10px; border-left: 4px solid #111; font-size: 16px; font-weight: 800; line-height: 1.1; }
.sk-tb { width: 100%; border-collapse: collapse; table-layout: fixed; margin-bottom: 6px; }
.sk-tb th, .sk-tb td { height: 30px; padding: 0 8px; border: 1px solid #555; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sk-tb th { background: #f3f4f6; font-weight: 700; text-align: center; }
.sk-f th { width: 18%; }
.sk-ck td:first-child { text-align: left; } .sk-ck th:nth-child(1) { width: 66%; } .sk-ck td { background: #fff; }
.sk-ck b { display: block; width: 13px; height: 13px; margin: auto; border: 1.5px solid #555; border-radius: 2px; }
.sk-box { position: relative; height: 120px; border: 1px solid #555; margin-bottom: 6px; } .sk-box em { position: absolute; left: 0; top: 0; padding: 6px 10px; font-style: normal; font-weight: 700; }
.sk-p { margin: 8px 0; line-height: 1.8; } .sk-cl { margin: 10px 0; } .sk-cl strong { display: block; margin-bottom: 4px; }
.sk-ul { margin: 6px 0; padding-left: 18px; line-height: 1.9; }
.sk-sign { margin-top: 26px; text-align: center; line-height: 2.2; } .sk-sign p { margin: 0; } .sk-sign span { display: inline-block; width: 120px; border-bottom: 1px solid #555; }
.sk-bar { display: inline-block; height: 10px; margin: 3px 4px 3px 0; border-radius: 3px; background: #e9ecf1; vertical-align: middle; animation: mk-pulse 1.2s ease-in-out infinite; }
.mk-sh-stage { position: absolute; left: 0; right: 0; top: 200px; margin: 0; color: #94a3b8; font-size: 26px; text-align: center; }
.mk-sh-stage:empty { display: none; }
@keyframes mk-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes mk-pulse { 50% { opacity: .5; } }
.mk-tag { font-weight: 600; }
.mk-state { display: inline-flex; align-items: center; gap: 4px; }
.mk-dot { width: 6px; height: 6px; border-radius: 50%; background: #cbd5e1; }
.mk-state.writing .mk-dot { background: #3b82f6; animation: mk-pulse .9s ease-in-out infinite; }
.mk-state.ok { color: #059669; } .mk-state.ok .mk-dot { background: #059669; }
.mk-state.bad { color: #dc2626; } .mk-state.bad .mk-dot { background: #dc2626; }
.mk-card.failed .mk-sheet { opacity: .45; }
.mk-card { position: relative; }
.mk-del { position: absolute; top: 8px; right: 8px; z-index: 3; width: 28px; height: 28px; border: 1px solid var(--ui-border); border-radius: 50%; background: var(--ui-bg); color: var(--ui-sub); font-size: 17px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.mk-card:hover .mk-del, .mk-del:focus-visible { opacity: 1; } .mk-del:hover { color: #dc2626; border-color: #dc2626; }
@media (hover: none) { .mk-del { opacity: .9; } }
.mk-undo, .index-body > .mk-undo { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 11px 16px; border-radius: 12px; background: #111827; color: #fff; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: calc(100vw - 32px); }
.mk-undo[hidden], .index-body > .mk-undo[hidden] { display: none; } .mk-undo button { border: 0; background: none; color: #93c5fd; font: inherit; font-weight: 700; cursor: pointer; padding: 0; }
.mk-sticky, .index-body > .mk-sticky { position: fixed; left: 50%; bottom: 18px; z-index: 55; transform: translateX(-50%); display: flex; gap: 6px; width: min(640px, calc(100vw - 24px)); padding: 6px; border: 1px solid var(--ui-border); border-radius: 16px; background: color-mix(in srgb, var(--ui-surface) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 10px 30px rgba(15, 23, 42, .16); animation: mk-up .25s ease both; } @keyframes mk-up { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
.mk-sticky[hidden], .index-body > .mk-sticky[hidden] { display: none; }
.mk-sticky input { flex: 1; min-width: 0; padding: 11px 14px; border: 0; border-radius: 11px; background: var(--ui-bg); color: var(--ui-text); font: inherit; font-size: 15px; outline: none; }
.mk-sticky input:focus { box-shadow: 0 0 0 2px var(--ui-primary); }
.mk-sticky button { flex: none; padding: 0 16px; border: 0; border-radius: 11px; background: var(--ui-primary); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
body.has-mk-sticky .mk-undo { bottom: 84px; }
body.has-mk-sticky { padding-bottom: 80px; }
@media (max-width: 600px) { .mk-sticky button { padding: 0 12px; font-size: 14px; } .mk-sticky input { font-size: 16px; } }
#mk-result { scroll-margin-top: 72px; }   /* 폰: 위 분류 띠에 제목이 가리지 않게 */
/* 자유 문서 미리보기 (달력·학습지 등) — 실제 문서와 같은 794px 폭에 그린 뒤 축소 */
.mk-sheet.free { padding: 49px 53px; }
.mk-sheet.land { width: 1123px; height: 794px; transform: scale(calc(var(--s, .22) * .707)); }
.sk-free { animation: mk-in .4s ease both; }
.sk-free .ai-doc { font-size: 10.5pt; line-height: 1.5; color: #111; word-break: keep-all; }
.sk-free .ai-doc table { border-collapse: collapse; }
.sk-free .ai-doc ul, .sk-free .ai-doc ol { padding-left: 1.4em; }
.sk-free .ai-doc .x-blank { display: inline-block; min-width: 28mm; border-bottom: .5pt solid #333; }

/* 첫 화면 AI 만들기 영상 (assets/ai-demo.mp4 — 무음 반복 미리보기, 누르면 크게) */
button.hero-badge { font: inherit; font-size: 12.5px; cursor: pointer; }
.hb-play { display: inline-flex; align-items: center; gap: 3px; margin-left: 2px; padding-left: 9px; border-left: 1px solid var(--ui-border); color: var(--ui-primary); font-weight: 600; }
.hb-play svg, .mk-demo-t em svg { width: 11px; height: 11px; }
.mk-demo { display: flex; align-items: center; gap: 16px; width: 100%; max-width: 520px; margin: 26px auto 0; padding: 10px 18px 10px 10px; border: 1px solid var(--ui-border); border-radius: 18px; background: var(--ui-surface); color: inherit; font: inherit; text-align: left; cursor: pointer; box-shadow: 0 6px 24px rgba(15, 23, 42, .05); transition: box-shadow .2s, transform .2s; }
.mk-demo:hover { box-shadow: 0 10px 30px rgba(15, 23, 42, .1); transform: translateY(-1px); }
.mk-demo-v { flex: none; width: 92px; aspect-ratio: 9 / 16; border-radius: 10px; object-fit: cover; background: #eef1f7; }
.mk-demo-t { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mk-demo-t b { font-size: 16px; letter-spacing: -.02em; word-break: keep-all; }
.mk-demo-t small { color: var(--ui-sub); font-size: 13px; line-height: 1.5; word-break: keep-all; }
.mk-demo-t em { display: inline-flex; align-items: center; gap: 5px; font-style: normal; font-size: 13px; font-weight: 600; color: var(--ui-primary); }
.mk-demo-dlg { padding: 0; border: 0; border-radius: 18px; background: #000; overflow: visible; max-height: 92vh; }
.mk-demo-dlg::backdrop { background: rgba(10, 12, 18, .72); }
.mk-demo-dlg video { display: block; height: min(86vh, 860px); aspect-ratio: 9 / 16; max-width: 92vw; border-radius: 18px; }
.mk-demo-x { position: absolute; top: -14px; right: -14px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #fff; color: #111; font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
@media (max-width: 560px) { .mk-demo-x { top: 8px; right: 8px; } .mk-demo-t b { font-size: 15px; } }
