/* ============================================================
   ミツカル 構成設計ツール — 固有スタイル
   ============================================================ */

/* ---------- 構成設計ビューの2カラム ---------- */
.dm--mitsukaru .dm-side { min-width: 0; } /* スマホ幅でナビの横スクロールがページ幅を押し広げないように */
.mk-plan { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.45fr); gap: 18px; align-items: start; }
.mk-result { display: grid; gap: 18px; min-width: 0; }
#mk-out { display: grid; gap: 18px; min-width: 0; }
#mk-out[hidden], .mk-empty[hidden] { display: none; }
.mk-empty { border: 1.5px dashed var(--line); border-radius: var(--r); padding: 48px 20px; text-align: center; color: var(--gray); font-weight: 700; background: #fff; display: grid; gap: 12px; justify-items: center; line-height: 1.8; }
.mk-empty .dm-ico { width: 34px; height: 34px; stroke: var(--p); }

/* ---------- ページ構成ツリー ---------- */
.mk-tree { font-size: 13.5px; }
.mk-tree ul { padding-left: 24px; position: relative; }
.mk-tree ul::before { content: ""; position: absolute; left: 9px; top: 0; bottom: 18px; width: 2px; background: var(--line); }
.mk-tree li { position: relative; padding: 3px 0; }
.mk-tree ul > li::before { content: ""; position: absolute; left: -15px; top: 19px; width: 13px; height: 2px; background: var(--line); }
.mk-node { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 700; line-height: 1.5; }
.mk-node--top { background: var(--ink); color: #fff; border-color: var(--ink); }
.mk-node--goal { border-color: var(--p); background: var(--p-bg); color: var(--p-text); font-weight: 900; }
.mk-node--sub { font-size: 12.5px; padding: 3px 10px; color: var(--gray); }
.mk-node em { font-style: normal; font-size: 11px; font-weight: 900; padding: 1px 7px; border-radius: 999px; background: var(--p); color: #fff; line-height: 1.5; }
.mk-node--top em { background: #fff; color: var(--ink); }

/* ---------- ワイヤーフレーム ---------- */
.mk-wf { --mk-ind: var(--p); font-size: 12.5px; line-height: 1.6; color: var(--ink); background: #fff; }
.mk-ph { background: repeating-linear-gradient(135deg, #e6e8ec 0 6px, #f1f2f4 6px 12px); border: 1px solid var(--line); border-radius: 6px; display: grid; place-items: center; color: var(--gray); font-weight: 900; font-size: 11.5px; min-height: 64px; text-align: center; padding: 6px; }
.mk-wf__head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 2px solid var(--mk-ind); }
.mk-wf__head b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-wf__head nav { display: flex; gap: 10px; margin-left: auto; font-size: 11px; font-weight: 700; color: var(--gray); white-space: nowrap; }
.mk-wf__burger { display: none; margin-left: auto; width: 18px; height: 12px; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); position: relative; flex-shrink: 0; }
.mk-wf__burger::after { content: ""; position: absolute; left: 0; right: 0; top: 3px; height: 2px; background: var(--ink); }
.mk-wf__btn { display: inline-block; background: var(--mk-ind); color: #fff; font-weight: 900; font-size: 11px; padding: 4px 11px; border-radius: 999px; white-space: nowrap; line-height: 1.6; }
.mk-wf__btn--lg { font-size: 12.5px; padding: 8px 18px; }
.mk-wf__hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; padding: 20px 14px; background: #f7f8f7; align-items: center; }
.mk-wf__hero h3 { font-size: 17px; line-height: 1.45; margin-bottom: 8px; letter-spacing: .01em; }
.mk-wf__hero p { color: var(--gray); margin-bottom: 12px; font-size: 12px; }
.mk-ph--hero { min-height: 130px; }
.mk-wf__sec { padding: 16px 14px; border-top: 1px solid var(--hair); }
.mk-wf__sec h4 { font-size: 13.5px; margin-bottom: 10px; padding-left: 10px; border-left: 3px solid var(--mk-ind); line-height: 1.3; }
.mk-wf__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mk-wf__blk .mk-ph { min-height: 46px; margin-bottom: 6px; }
.mk-wf__blk b { display: block; font-size: 12.5px; line-height: 1.4; margin-bottom: 3px; }
.mk-wf__blk p { font-size: 11.5px; color: var(--gray); }
.mk-wf__cols--cases .mk-ph { min-height: 78px; }
.mk-wf__price { font-weight: 900; font-size: 14px; }
.mk-wf__price + small { display: block; font-size: 11px; color: var(--gray); font-weight: 700; }
.mk-wf__faq dt { font-weight: 900; font-size: 12.5px; margin-top: 6px; }
.mk-wf__faq dd { color: var(--gray); font-size: 11.5px; padding-left: 14px; }
.mk-wf__contact { padding: 20px 14px; background: var(--ink); color: #fff; text-align: center; }
.mk-wf__contact h4 { font-size: 14px; margin-bottom: 4px; }
.mk-wf__contact p { font-size: 12px; color: #d5d9e2; margin-bottom: 10px; }
.mk-wf__tel { display: block; margin-top: 8px; font-size: 12px; font-weight: 700; color: #fff; }
.mk-wf__foot { padding: 10px 14px; font-size: 11px; color: var(--gray); font-weight: 700; border-top: 1px solid var(--hair); }
.mk-wf__fixed { display: none; position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 8px; gap: 8px; }
.mk-wf__fixed span { flex: 1; text-align: center; padding: 9px 6px; border-radius: 8px; font-weight: 900; font-size: 12px; }
.mk-wf__fixed .tel { border: 1.5px solid var(--ink); color: var(--ink); }
.mk-wf__fixed .cta { background: var(--mk-ind); color: #fff; }
/* スマホ表示 */
#mk-device.dm-device--phone .dm-device__body { max-height: 560px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.mk-wf.is-sp .mk-wf__head nav, .mk-wf.is-sp .mk-wf__head .mk-wf__btn { display: none; }
.mk-wf.is-sp .mk-wf__burger { display: block; }
.mk-wf.is-sp .mk-wf__hero, .mk-wf.is-sp .mk-wf__cols { grid-template-columns: 1fr; }
.mk-wf.is-sp .mk-wf__hero { padding: 16px 12px; }
.mk-wf.is-sp .mk-wf__hero h3 { font-size: 16px; }
.mk-wf.is-sp .mk-wf__btn--lg { display: block; text-align: center; }
.mk-wf.is-sp .mk-wf__fixed { display: flex; }
@media (max-width: 600px) { .mk-wf__hero, .mk-wf__cols { grid-template-columns: 1fr; } .mk-wf__head nav { display: none; } }

/* ---------- 文章の下書き ---------- */
.mk-draft { display: grid; gap: 12px; }
.mk-draft__h { font-size: 12.5px; font-weight: 900; color: var(--p-text); margin-bottom: 4px; }
.mk-draft .dm-out { min-height: 54px; padding: 12px 14px; font-size: 13.5px; }

/* ---------- 導線チェック ---------- */
.mk-check { display: grid; gap: 8px; }
.mk-check__item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r-s); background: #fff; transition: border-color .2s, background .2s; }
.mk-check__item.is-on { border-color: var(--p); background: var(--p-bg); }
.mk-check__n { font-family: var(--ff-num); font-size: 12px; font-weight: 700; color: var(--gray); width: 22px; flex-shrink: 0; }
.mk-check__t { font-weight: 900; font-size: 13.5px; flex: 1; line-height: 1.5; }
.mk-check__t small { display: block; font-size: 12px; color: var(--gray); font-weight: 700; }
.mk-switch { width: 46px; height: 26px; border-radius: 999px; background: #c5cad4; position: relative; flex-shrink: 0; transition: background .2s; }
.mk-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.28); transition: left .2s var(--ease); }
.mk-switch[aria-checked="true"] { background: var(--p); }
.mk-switch[aria-checked="true"]::after { left: 23px; }
.mk-score { font-family: var(--ff-num); font-size: 56px; font-weight: 700; line-height: 1; color: var(--ink); }
.mk-score small { font-family: var(--ff); font-size: 14px; color: var(--gray); font-weight: 900; margin-left: 4px; }
.mk-verdict { margin-top: 12px; font-size: 13.5px; font-weight: 700; line-height: 1.8; }

/* ---------- 制作の進行 ---------- */
.mk-flow__roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.mk-flow__role { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 12.5px; line-height: 1.6; }
.mk-flow__role b { display: block; font-size: 11.5px; color: var(--p-text); margin-bottom: 2px; }
.mk-flow__role--us b { color: var(--ink); }
.mk-inc { display: grid; gap: 6px; margin: 10px 0 12px; font-size: 13px; font-weight: 700; }
.mk-inc li { padding-left: 20px; position: relative; }
.mk-inc li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 6px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* ---------- 公開後の改善 ---------- */
.mk-sugg { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-s); background: #fff; }
.mk-sugg .t { font-weight: 900; font-size: 13.5px; line-height: 1.5; }
.mk-sugg .s { font-size: 12.5px; color: var(--gray); }
.mk-sugg .s b { color: var(--p-text); }
.mk-sugg.is-done { border-color: var(--ok); background: var(--ok-bg); }

/* ---------- レスポンシブ ---------- */
@media (max-width: 1100px) { .mk-plan { grid-template-columns: 1fr; } }
@media (max-width: 960px) {
  .mk-score { font-size: 46px; }
  .mk-flow__roles { grid-template-columns: 1fr; }
  .mk-sugg { grid-template-columns: 1fr; }
  .mk-sugg .dm-btn { width: 100%; }
}

/* 完成イメージ（サンプルサイトを縮小表示） */
.mk-frame { position: relative; width: 100%; overflow: hidden; background: #fff; }
.mk-frame iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; background: #fff; }
#mk-wf[hidden] { display: none; }
.dm-device--phone .mk-frame { border-radius: 0; }

/* デモサイト一覧 */
.mk-sites { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.mk-site { display: grid; gap: 14px; padding: 18px; align-content: start; }
.mk-site--feat { grid-column: 1 / -1; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 24px; border-top: 4px solid var(--accent); }
.mk-site__visual { position: relative; display: block; padding: 0 14% 10% 0; }
.mk-site__pc { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 18px 36px -24px rgba(16,19,25,.45); }
.mk-site__pc img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; display: block; }
.mk-site__sp { position: absolute; right: 0; bottom: 0; width: 28%; border: 4px solid var(--ink); border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 16px 30px -18px rgba(16,19,25,.6); }
.mk-site__sp img { width: 100%; height: auto; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; display: block; }
.mk-site__ind { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mk-site__name { font-size: 18px; font-weight: 900; line-height: 1.4; }
.mk-site__name small { display: block; font-size: 12.5px; color: var(--gray); font-weight: 700; margin-top: 2px; }
.mk-site__desc { font-size: 13.5px; color: var(--gray); }
.mk-site--feat .mk-site__name { font-size: 21px; }
.mk-site--feat .mk-site__desc { font-size: 14px; color: var(--ink); }
/* 画面内プレビュー: スマホ幅では iframe の代わりに静止画＋開くボタン */
.mk-still { display: none; position: relative; }
.mk-still img { width: 100%; height: auto; display: block; }
.mk-still span { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 13px; font-weight: 900; padding: 9px 16px; border-radius: 999px; white-space: nowrap; }
@media (max-width: 960px) {
  .mk-sites { grid-template-columns: minmax(0, 1fr); }
  .mk-site--feat { grid-template-columns: minmax(0, 1fr); }
  .mk-frame { display: none; }
  .mk-still { display: block; }
}
