/* ==========================================================
   オンクラス 集客フロー構想モック
========================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-pale: #f0fdfa;
  --ink: #1e293b;
  --sub: #64748b;
  --line: #e2e8f0;
  --bg: #f1f5f9;
  --card: #ffffff;
  --amber: #b45309;
  --amber-bg: #fef3c7;
  --green: #15803d;
  --green-bg: #dcfce7;
  --blue: #1d4ed8;
  --blue-bg: #dbeafe;
  --purple: #7e22ce;
  --purple-bg: #f3e8ff;
  --red: #b91c1c;
}

body {
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.7;
}

/* ---------- モック説明ヘッダー ---------- */
.mock-header {
  background: #0f172a;
  color: #e2e8f0;
  padding: 10px 20px;
  font-size: 12px;
}
.mock-header-inner { display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: center; justify-content: space-between; max-width: 1400px; margin: 0 auto; }
.mock-header strong { font-size: 13px; }
.mock-tag {
  background: var(--primary);
  color: #fff;
  border-radius: 4px;
  padding: 2px 8px;
  margin-right: 8px;
  font-weight: 600;
}
.mock-principles { display: flex; gap: 16px; flex-wrap: wrap; color: #94a3b8; }
.mock-principles b { color: #5eead4; margin-right: 4px; }

/* ---------- レイアウト ---------- */
.app { display: flex; min-height: calc(100vh - 44px); max-width: 1400px; margin: 0 auto; }

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 14px 0;
  display: flex;
  flex-direction: column;
}
.sidebar-brand { font-weight: 700; padding: 4px 16px 14px; border-bottom: 1px solid var(--line); }
.sidebar-brand span { display: block; font-size: 11px; color: var(--sub); font-weight: 400; }
.nav-item {
  display: block;
  padding: 8px 16px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  border-left: 3px solid transparent;
}
a.nav-item:hover { background: var(--primary-pale); }
.nav-item.active { background: var(--primary-pale); border-left-color: var(--primary); color: var(--primary-dark); font-weight: 700; }
.nav-group-label { padding: 14px 16px 4px; font-size: 12px; color: var(--sub); font-weight: 700; }
.nav-sub { padding-left: 28px; }
.nav-sub2 { padding-left: 42px; font-size: 12.5px; color: #475569; }
.nav-parent { color: #475569; cursor: default; }
.sidebar-note {
  margin: auto 12px 8px;
  font-size: 11px;
  color: var(--sub);
  background: var(--bg);
  border-radius: 6px;
  padding: 8px 10px;
}

.main { flex: 1; padding: 0 24px 120px; min-width: 0; }
.urlbar {
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-family: Menlo, monospace;
  border-radius: 0 0 8px 8px;
  padding: 5px 14px;
  margin: 0 -24px 18px;
}

/* ---------- 画面切替 ---------- */
.screen { display: none; animation: fadein .18s ease; }
.screen.active { display: block; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }

.screen-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.screen-head h1 { font-size: 20px; }
.screen-head h2 { font-size: 17px; }
.backlink { color: var(--primary-dark); text-decoration: none; font-size: 13px; display: inline-block; margin-bottom: 10px; }
.backlink:hover { text-decoration: underline; }
.spacer { flex: 1; }

/* ---------- 汎用部品 ---------- */
.btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink);
  font-family: inherit;
}
.btn:hover { border-color: var(--primary); color: var(--primary-dark); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-small { padding: 4px 10px; font-size: 12px; }
.btn-ghost { background: transparent; }
.btn-block { display: block; width: 100%; text-align: left; margin-bottom: 8px; }

.pill { display: inline-block; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 8px; vertical-align: middle; }
.pill-new { background: var(--green-bg); color: var(--green); }
.pill-beta { background: var(--blue-bg); color: var(--blue); }
.pill-warn { background: var(--amber-bg); color: var(--amber); }
.pill-point { background: var(--blue-bg); color: var(--blue); }

.badge { display: inline-block; font-size: 11px; font-weight: 600; border-radius: 4px; padding: 2px 8px; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-gray { background: #e2e8f0; color: #475569; }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-purple { background: var(--purple-bg); color: var(--purple); }
.badge-line { background: #dcfce7; color: #166534; }
.badge-dashed { background: #fff; border: 1px dashed #94a3b8; color: var(--sub); }

.callout { border-radius: 8px; padding: 12px 16px; font-size: 12.5px; margin: 16px 0; line-height: 1.8; }
.callout-new { background: var(--green-bg); border: 1px solid #86efac; }
.callout-point { background: var(--blue-bg); border: 1px solid #93c5fd; }
.callout-info { background: #fff; border: 1px solid var(--line); color: #475569; }
.callout .pill { margin-right: 6px; }

.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.table th, .table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
.table th { background: #f8fafc; color: var(--sub); font-size: 12px; }
.table-plain { box-shadow: none; border: 1px solid var(--line); margin: 10px 0; }
.td-sub { font-size: 11.5px; color: var(--sub); }

.flow-chip {
  display: inline-block;
  background: var(--primary-pale);
  border: 1px solid #99f6e4;
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.flow-chip:hover { background: #ccfbf1; }

/* ---------- 集客フロー一覧 ---------- */
.flow-cards { display: flex; flex-direction: column; gap: 12px; }
.flow-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 20px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15,23,42,.05);
  transition: border-color .12s;
}
.flow-card:hover { border-color: var(--primary); }
.flow-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.flow-card-head b { font-size: 15px; }
.flow-card-meta { font-size: 11.5px; color: var(--sub); margin-left: auto; }

.mini-chain { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; }
.mini-node { display: flex; align-items: center; }
.mini-node-body {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  min-width: 150px;
}
.mini-node-body .mn-label { color: var(--sub); font-size: 10.5px; }
.mini-node-body .mn-value { font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mini-node-body.mn-empty { border-style: dashed; background: #fff; }
.mini-node-body.mn-empty .mn-value { color: var(--sub); font-weight: 400; }
.mini-arrow { color: #94a3b8; padding: 0 8px; align-self: center; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot-green { background: #22c55e; }
.dot-amber { background: #f59e0b; }
.dot-gray { background: #cbd5e1; }

/* ---------- 検索・絞り込みバー ---------- */
.filter-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.search-input {
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px;
  font-size: 13px; font-family: inherit; width: 220px; background: #fff;
}
.search-input:focus { outline: none; border-color: var(--primary); }

/* ---------- シナリオパネル ---------- */
.scenario-panel {
  margin-top: 26px;
  background: #fff;
  border: 1px dashed #94a3b8;
  border-radius: 10px;
  padding: 16px 20px;
}
.scenario-title { font-weight: 700; margin-bottom: 6px; }
.scenario-panel p { font-size: 12.5px; color: #475569; margin-bottom: 10px; }
.scenario-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- フロー詳細 ---------- */
.flow-detail-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; flex-wrap: wrap; }
.flow-detail-head h1 { font-size: 20px; }
.flow-detail-sub { color: var(--sub); font-size: 12.5px; margin-bottom: 16px; }

.chain { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; margin: 8px 0 4px; }
.chain-step { display: flex; align-items: stretch; }
.step-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  width: 240px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
.step-card.step-empty { border-style: dashed; background: #fafafa; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 11px; font-weight: 700;
  margin-right: 6px;
}
.step-empty .step-num { background: #cbd5e1; }
.step-title { font-weight: 700; font-size: 13px; display: flex; align-items: center; }
.step-body { font-size: 12px; color: #475569; flex: 1; }
.step-body .badge { margin: 2px 4px 2px 0; }
.step-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.chain-arrow { align-self: center; color: #94a3b8; font-size: 18px; padding: 0 10px; }

/* ---------- 現在地チップ ---------- */
.loc-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--primary-pale);
  border: 1px solid #99f6e4;
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 16px;
  font-size: 12.5px;
}
.loc-chip .lc-flow { font-weight: 700; color: var(--primary-dark); }
.lc-step {
  background: #fff;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  padding: 1px 10px;
  font-size: 11.5px;
  color: var(--primary-dark);
  text-decoration: none;
}
a.lc-step:hover { background: #ccfbf1; }
.lc-step.current { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.lc-step.disabled { color: #94a3b8; border-color: var(--line); pointer-events: none; }
.lc-arrow { color: #5eead4; }
.lc-overview { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--primary-dark); text-decoration: none; white-space: nowrap; }
.lc-overview:hover { text-decoration: underline; }
.lc-new { flex-shrink: 0; }

/* ---------- LP編集 ---------- */
.editor-toolbar {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 14px; margin-bottom: 14px; font-size: 13px; flex-wrap: wrap;
}
.editor-toolbar .backlink { margin-bottom: 0; }
.lp-canvas-wrap { display: flex; gap: 16px; align-items: flex-start; }
.lp-canvas { flex: 1; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 24px; min-width: 0; }
.lp-block { border: 1px dashed transparent; border-radius: 8px; padding: 14px; }
.lp-block h2 { font-size: 18px; margin-bottom: 6px; }
.lp-block-event { border-color: var(--primary); background: var(--primary-pale); margin-top: 12px; }
.lp-block-event.selected { box-shadow: 0 0 0 2px #99f6e4; }
.lp-block-label { font-size: 11.5px; font-weight: 700; color: var(--primary-dark); margin-bottom: 8px; }
.lp-block-form p { margin: 8px 0 4px; font-size: 13px; }
.fake-slot { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px; margin: 4px 0; font-size: 12.5px; }
.selected-slot { border-color: var(--primary); background: var(--primary-pale); font-weight: 600; }
.fake-input { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px; margin: 4px 0; font-size: 12.5px; color: #94a3b8; }
.fake-select { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px; font-size: 12.5px; }
.fake-btn { background: var(--primary); color: #fff; text-align: center; border-radius: 6px; padding: 9px; margin-top: 10px; font-weight: 700; font-size: 13px; cursor: pointer; }

.side-panel { width: 290px; flex-shrink: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.side-panel-title { font-weight: 700; font-size: 13px; margin-bottom: 10px; }
.side-panel-row { margin-bottom: 10px; }
.side-panel-row label { display: block; font-size: 11px; color: var(--sub); margin-bottom: 3px; }
.side-panel-divider { border-top: 1px solid var(--line); margin: 14px -16px 10px; padding: 10px 16px 0; font-size: 11.5px; font-weight: 700; color: var(--sub); }
.side-panel-note { font-size: 11px; color: var(--sub); margin-top: 8px; }
.usage-chips { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- イベント編集 ---------- */
.editor-2col { display: flex; gap: 16px; align-items: flex-start; }
.second-sidebar { width: 220px; flex-shrink: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.second-sidebar-title { padding: 12px 14px; font-weight: 700; font-size: 13px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.ss-item { display: block; padding: 9px 14px; font-size: 12.5px; color: var(--ink); text-decoration: none; border-left: 3px solid transparent; }
.ss-item:hover { background: var(--primary-pale); }
.ss-item.active { background: var(--primary-pale); border-left-color: var(--primary); font-weight: 700; color: var(--primary-dark); }
.editor-content { flex: 1; min-width: 0; }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.form-card h5 { font-size: 12px; color: var(--sub); border-bottom: 1px solid var(--line); padding-bottom: 4px; margin: 16px 0 10px; }
.form-card h5:first-child { margin-top: 0; }
.form-row { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.form-row label { width: 150px; flex-shrink: 0; font-size: 12.5px; color: #475569; }
.form-row .fake-input, .form-row .fake-select { flex: 1; }
.form-actions { margin-top: 14px; }

/* ---------- サンクス編集 ---------- */
.thanks-textarea {
  width: 100%; min-height: 110px; border: 1px solid var(--line); border-radius: 8px;
  padding: 12px; font-family: inherit; font-size: 13px; resize: vertical;
}

/* ---------- リマインド ---------- */
.sender-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 14px; }
.sender-label { font-size: 11px; color: var(--sub); margin-bottom: 6px; }
.sender-accounts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; }
.sender-accounts a { color: var(--primary-dark); }
.reminder-row {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 18px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.reminder-row b { font-size: 13px; }
.reminder-empty {
  border: 1px dashed #94a3b8; border-radius: 10px; padding: 20px; text-align: center;
  color: var(--sub); font-size: 13px; background: #fff;
}

/* ---------- 公式LINE ---------- */
.account-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.account-row:last-child { border-bottom: none; }

/* ---------- 公開側プレビュー ---------- */
.preview-head {
  display: flex; align-items: center; gap: 8px;
  background: #0f172a; color: #e2e8f0; border-radius: 8px;
  padding: 10px 16px; font-size: 13px; margin-bottom: 14px; flex-wrap: wrap;
}
.preview-steps { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.pstep { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 14px; font-size: 12px; cursor: pointer; font-family: inherit; }
.pstep.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.preview-stage { display: flex; justify-content: center; }
.pframe {
  display: none; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 28px; width: 460px; max-width: 100%;
  box-shadow: 0 8px 24px rgba(15,23,42,.08);
}
.pframe.active { display: block; }
.pframe h3 { margin-bottom: 10px; font-size: 16px; }
.thanks-check {
  width: 52px; height: 52px; border-radius: 50%; background: var(--green-bg); color: var(--green);
  display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700;
  margin: 0 auto 14px;
}
#preview-thanks-body { text-align: center; font-size: 14px; white-space: pre-wrap; margin-bottom: 12px; }

/* ---------- モーダル ---------- */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(15,23,42,.5);
  align-items: center; justify-content: center; z-index: 50; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 20px 24px; width: 560px; max-width: 100%; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 15px; }
.modal-lead { font-size: 12.5px; color: #475569; margin-bottom: 14px; }
.modal-options { display: flex; flex-direction: column; gap: 10px; }
.modal-option {
  display: flex; align-items: center; gap: 14px; text-align: left;
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 14px 16px; cursor: pointer; font-family: inherit; font-size: 13px;
}
.modal-option:hover { border-color: var(--primary); background: var(--primary-pale); }
.modal-option span { font-size: 12px; color: var(--sub); }
.mo-icon { font-size: 24px; }

/* ---------- ガイドバー / トースト ---------- */
.guide-bar {
  display: none; position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  background: #0f172a; color: #fff; border-radius: 10px; padding: 12px 20px;
  font-size: 13px; z-index: 60; box-shadow: 0 8px 24px rgba(15,23,42,.35);
  max-width: 720px; width: calc(100% - 40px);
  align-items: center; gap: 14px;
}
.guide-bar.show { display: flex; }
.guide-bar.success { background: var(--green); }
.guide-bar .gb-text { flex: 1; }
.guide-bar button { flex-shrink: 0; }
.hint-target { outline: 3px solid #f59e0b; outline-offset: 2px; border-radius: 6px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { outline-color: #f59e0b; } 50% { outline-color: #fde68a; } }

.toast {
  display: none; position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  background: #334155; color: #fff; border-radius: 8px; padding: 10px 18px;
  font-size: 12.5px; z-index: 70; max-width: 640px;
}
.toast.show { display: block; }

@media (max-width: 1000px) {
  .lp-canvas-wrap, .editor-2col { flex-direction: column; }
  .side-panel, .second-sidebar { width: 100%; }
  .chain { flex-direction: column; }
  .chain-arrow { transform: rotate(90deg); padding: 4px 0; align-self: flex-start; margin-left: 110px; }
  .step-card { width: 100%; }
}
