*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --black: #0f0f0f;
  --white: #ffffff;
  --gray-50: #f8f8f8;
  --gray-100: #f0f0f0;
  --gray-200: #e0e0e0;
  --gray-400: #999;
  --gray-600: #555;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Hiragino Sans', 'Meiryo', sans-serif;
  background: var(--white);
  color: var(--black);
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }

/* ナビ */
.navbar {
  position: sticky;
  top: 0;
  background: rgba(15,15,15,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  z-index: 100;
}
.nav-inner {
  max-width: 100%;
  padding: 0 2.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo { font-size: 16px; font-weight: 700; letter-spacing: 0.05em; }
.nav-links { display: flex; gap: 1.5rem; font-size: 14px; color: rgba(255,255,255,0.7); align-items: center; flex-wrap: nowrap; }
.nav-links a { color: rgba(255,255,255,0.7); }
.nav-links a:hover { color: #fff; }

/* ヒーロー */
.hero {
  background: var(--black);
  color: var(--white);
  text-align: center;
  padding: 6rem 1.5rem;
}
.hero-inner { max-width: 640px; margin: 0 auto; }
.hero-badge {
  display: inline-block;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 100px;
  padding: 4px 14px;
  margin-bottom: 1.5rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.05em;
}
.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 1rem;
}
.hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 2rem;
  line-height: 1.8;
}
.btn-primary {
  display: inline-block;
  background: var(--white);
  color: var(--black);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 36px;
  border-radius: 100px;
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.85; }

/* How */
.how { padding: 5rem 1.5rem; background: var(--gray-50); }
.section-inner { max-width: 1200px; margin: 0 auto; }
.how h2, .editor-section h2 {
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2.5rem;
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.step-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  border: 1px solid var(--gray-200);
}
.step-num {
  width: 32px;
  height: 32px;
  background: var(--black);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.step-text strong { display: block; font-size: 14px; margin-bottom: 4px; }
.step-text p { font-size: 13px; color: var(--gray-600); }

/* エディター */
.editor-section {
  padding: 3rem 0 5rem;
}

.editor-section h2,
.editor-section .section-sub {
  padding: 0 1.5rem;
}

.editor-section > .section-inner {
  max-width: 100%;
  padding: 0;
}

.section-sub {
  text-align: center;
  font-size: 14px;
  color: var(--gray-400);
  margin-top: -1.5rem;
  margin-bottom: 2.5rem;
}

.editor-layout {
  display: grid;
  grid-template-columns: 210px minmax(300px, 0.75fr) 1.25fr;
  gap: 1.25rem;
  align-items: start;
  padding: 0 1rem;
}

/* サイドバー */
.sidebar {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1rem;
  position: sticky;
  top: 72px;
}
.sidebar-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gray-400);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.block-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.add-block-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 4px 8px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
  color: var(--black);
  text-align: center;
  white-space: nowrap;
  overflow: visible;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.add-block-btn:hover {
  background: var(--gray-50);
  border-color: var(--black);
  transform: translateY(-1px);
}
.add-block-btn:active { transform: translateY(0); }
.add-block-icon { font-size: 14px; width: 20px; height: 16px; display: flex; align-items: center; justify-content: center; }

/* キャンバス */
.canvas-wrap { display: flex; flex-direction: column; gap: 10px; }
.canvas {
  background: #f0f2f5;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 12px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.canvas-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--gray-400);
  text-align: center;
  padding: 2rem;
}

/* 行・列 */
.row-wrap {
  background: var(--white);
  border: 1.5px solid #d0d5dd;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.row-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: #f8f9fa;
  border-bottom: 1.5px solid #e4e7ec;
}
.row-bar-left {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #475467;
  font-weight: 600;
}
.row-bar-right { display: flex; gap: 4px; }

.col-wrap {
  overflow: hidden;
  transition: border 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
}
.col-size-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: #f2f4f7;
  border-bottom: 1px solid #e4e7ec;
  flex-wrap: wrap;
  cursor: pointer;
}
.col-size-bar:hover {
  background: #e4e7ec;
}

.col-block-item {
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  overflow: hidden;
  margin: 6px;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.col-block-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: #f8f9fa;
  border-bottom: 1px solid #e4e7ec;
  min-height: 34px;
}
.col-block { padding: 10px; }

.col-add-block { margin: 6px; }
.col-add-block select {
  width: 100%;
  padding: 6px 8px;
  border: 1px dashed var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: inherit;
  background: var(--white);
  color: var(--gray-600);
  cursor: pointer;
}
.col-add-block select:hover {
  border-color: var(--black);
  color: var(--black);
}

.col-empty-select {
  padding: 12px;
  text-align: center;
}
.col-empty-select select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  background: var(--white);
}

.block-type-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* ブロック内フォーム */
.block-field { margin-bottom: 8px; }
.block-field:last-child { margin-bottom: 0; }
.block-field label {
  display: block;
  font-size: 11px;
  color: var(--gray-400);
  margin-bottom: 3px;
}
.block-field input[type="text"],
.block-field textarea,
.block-field select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  background: var(--gray-50);
  color: var(--black);
}
.block-field input[type="text"]:focus,
.block-field textarea:focus {
  outline: none;
  border-color: var(--black);
  background: var(--white);
}
.block-field textarea { min-height: 64px; resize: vertical; }

/* ボタン類 */
.block-icon-btn {
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e4e7ec;
  background: var(--white);
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  color: #475467;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-family: inherit;
}
.block-icon-btn:hover { background: #f2f4f7; border-color: #98a2b3; color: var(--black); }

.size-btn {
  font-size: 10px;
  padding: 2px 6px;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  background: var(--white);
  cursor: pointer;
  color: var(--gray-600);
  font-family: inherit;
  transition: all 0.15s;
}
.size-btn:hover { border-color: var(--black); color: var(--black); }
.size-btn.on { background: var(--black); color: var(--white); border-color: var(--black); }

.sub-btn {
  font-size: 12px;
  padding: 5px 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  font-family: inherit;
  margin-top: 4px;
}
.sub-btn:hover { border-color: var(--black); }

/* 写真 */
.file-label {
  display: block;
  border: 1.5px dashed var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
  font-size: 12px;
  color: var(--gray-400);
  cursor: pointer;
}
.file-label:hover { border-color: var(--black); color: var(--black); }
.file-label input { display: none; }
.photo-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.photo-thumb-wrap { position: relative; }
.photo-thumb-wrap img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--gray-200);
  display: block;
}
.photo-thumb-wrap button {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 9px;
  cursor: pointer;
  line-height: 16px;
  text-align: center;
  padding: 0;
}

/* ダウンロードボタン */
#dl-btn {
  width: 100%;
  padding: 13px;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
}
#dl-btn:hover { opacity: 0.8; }

#wp-dl-btn {
  width: 100%;
  padding: 13px;
  background: #21759b;
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
  margin-top: 8px;
}
#wp-dl-btn:hover { opacity: 0.8; }

.dl-note { font-size: 12px; color: var(--gray-400); line-height: 1.7; }
.link { color: var(--black); text-decoration: underline; text-underline-offset: 2px; }

/* プレビュー */
.preview-panel {
  position: sticky;
  top: 68px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--gray-50);
  max-height: 90vh;
}
.preview-header {
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gray-200);
  display: block;
}
.preview-url {
  margin-left: 8px;
  font-size: 12px;
  color: var(--gray-400);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 2px 10px;
}
#preview {
  min-height: 200px;
}

/* フッター */
footer { background: var(--black); color: var(--white); padding: 3rem 1.5rem; }
.footer-inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.footer-logo { font-size: 18px; font-weight: 700; letter-spacing: 0.05em; margin-bottom: 1.2rem; }
.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.footer-links a:hover { color: var(--white); }
.footer-copy { font-size: 12px; color: rgba(255,255,255,0.3); }

/* レスポンシブ */
@media (max-width: 900px) {
  .editor-layout { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .preview-panel, .sidebar { position: static; max-height: none; }
}

/* ツールチップ */
.add-block-btn {
  position: relative;
}

.block-tip {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-300);
  color: var(--gray-400);
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: default;
  opacity: 0;
  transition: opacity 0.15s;
}
.add-block-btn:hover .block-tip { opacity: 1; }

.block-tip::after {
  content: attr(data-tip);
  position: absolute;
  right: 0;
  top: 20px;
  background: #1a1a1a;
  color: #fff;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  padding: 6px 10px;
  border-radius: 6px;
  width: 190px;
  white-space: normal;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.block-tip::before {
  content: '';
  position: absolute;
  right: 4px;
  top: 15px;
  border: 5px solid transparent;
  border-bottom-color: #1a1a1a;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 200;
}

.block-tip:hover::after,
.block-tip:hover::before {
  opacity: 1;
}

/* ===== デザイン済みセクション ===== */
.section-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.add-section-btn {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.15s, transform 0.1s, box-shadow 0.15s;
}
.add-section-btn:hover {
  border-color: #3b82f6;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(59,130,246,0.12);
}
.section-thumb {
  height: 52px;
  background: linear-gradient(135deg, #1c2b33, #2a4250);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.section-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 10px;
}
.section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--black);
}
.section-desc {
  font-size: 10px;
  color: var(--gray-400);
}

/* ===== ブロック設定の詳細設定（畳み） ===== */
.adv-settings {
  margin-top: 4px;
  border-top: 1px solid var(--gray-100);
  padding-top: 6px;
}
.adv-settings summary {
  font-size: 11px;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px 0;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.adv-settings summary::-webkit-details-marker { display: none; }
.adv-settings summary::before {
  content: '▸';
  font-size: 9px;
  transition: transform 0.15s;
}
.adv-settings[open] summary::before { transform: rotate(90deg); }
.adv-settings summary:hover { color: var(--black); }
.adv-settings[open] { padding-bottom: 4px; }

/* ===== プレビュー内インライン編集 ===== */
#preview [contenteditable="true"] {
  outline: none;
  cursor: text;
  border-radius: 4px;
  transition: box-shadow 0.15s, background 0.15s;
}
#preview [contenteditable="true"]:hover {
  box-shadow: inset 0 0 0 1px rgba(59,130,246,0.4);
}
#preview [contenteditable="true"]:focus {
  box-shadow: inset 0 0 0 2px #3b82f6;
  background: rgba(59,130,246,0.06);
}
#preview [contenteditable="true"]:empty::before {
  content: attr(data-ph);
  opacity: 0.45;
  pointer-events: none;
}

/* ===== ダウンロード完了モーダル ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 2rem 2rem 1.5rem;
  max-width: 440px;
  width: 100%;
  position: relative;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.modal-close:hover { background: var(--gray-200); }

.modal-illust {
  margin-bottom: 0.75rem;
}

.modal-badge {
  display: inline-block;
  background: #dcfce7;
  color: #16a34a;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 100px;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--black);
}

.modal-desc {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.modal-steps {
  background: var(--gray-50);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.25rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.modal-step-num {
  width: 22px;
  height: 22px;
  background: var(--black);
  color: var(--white);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.modal-step-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-step-text strong {
  font-size: 13px;
  color: var(--black);
}

.modal-step-text span {
  font-size: 12px;
  color: var(--gray-600);
}

.modal-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: #fff;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
  box-shadow: 0 4px 16px rgba(255,107,53,0.4);
  margin-bottom: 6px;
}
.modal-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.modal-cta-icon { font-size: 18px; }

.modal-affiliate-note {
  font-size: 11px;
  color: var(--gray-400);
  margin-bottom: 1rem;
}

.modal-guide-btn {
  width: 100%;
  padding: 10px;
  background: none;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-size: 13px;
  color: var(--gray-600);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}
.modal-guide-btn:hover {
  border-color: var(--black);
  color: var(--black);
}

/* ===== 料金説明セクション ===== */
.pricing-info {
  padding: 5rem 1.5rem;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
}

.pricing-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.pricing-head {
  text-align: center;
  margin-bottom: 3rem;
}

.pricing-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gray-400);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.pricing-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 1rem;
  color: var(--black);
}

.pricing-sub {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.8;
}

/* カード */
.pricing-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.pricing-card {
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
  border: 1.5px solid var(--gray-200);
}

.pricing-card.free {
  background: var(--gray-50);
}

.pricing-card.required {
  background: #fffbeb;
  border-color: #fcd34d;
}

.pricing-card-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  background: #dcfce7;
  color: #16a34a;
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
}

.required-badge {
  background: #fef3c7 !important;
  color: #d97706 !important;
}

.pricing-card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.pricing-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--black);
}

.pricing-card-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 0.75rem;
}

.pricing-card.free .pricing-card-price {
  color: #16a34a;
}

.pricing-card.required .pricing-card-price {
  color: #d97706;
}

.pricing-card-desc {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.pricing-card-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pricing-card-list li {
  font-size: 13px;
  color: var(--gray-600);
}

/* 比較表 */
.pricing-compare {
  margin-bottom: 2rem;
}

.pricing-compare-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  text-align: center;
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
}

.pricing-compare-table {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.compare-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  border-bottom: 1px solid var(--gray-100);
}

.compare-row:last-child {
  border-bottom: none;
}

.compare-head {
  background: var(--gray-50);
}

.compare-cell {
  padding: 10px 14px;
  font-size: 12px;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  border-right: 1px solid var(--gray-100);
}

.compare-cell:last-child { border-right: none; }

.compare-head .compare-cell {
  font-weight: 600;
  font-size: 11px;
  color: var(--gray-400);
  letter-spacing: 0.04em;
}

.compare-label {
  font-weight: 500;
  color: var(--black);
  background: var(--gray-50);
}

.compare-cell.good {
  color: #16a34a;
  font-weight: 500;
}

.compare-cell.bad {
  color: #dc2626;
}

.compare-cell.mid {
  color: #d97706;
}

/* 注記 */
.pricing-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.pricing-note-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.pricing-note p {
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.7;
}

.pricing-note strong {
  color: var(--black);
}

@media (max-width: 700px) {
  .pricing-cards { grid-template-columns: 1fr; }
  .compare-row { grid-template-columns: 1fr 1fr; }
  .compare-row .compare-cell:nth-child(3),
  .compare-row .compare-cell:nth-child(4) { display: none; }
}

/* フッタータグライン */
.footer-tagline {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 1.2rem;
  letter-spacing: 0.05em;
}

/* ===== 診断モーダル ===== */
.diag-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.diag-modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 2rem;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: slideUp 0.25s ease;
}

.diag-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
}
.diag-close:hover { background: var(--gray-200); }

.diag-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 1.5rem;
}
.diag-progress-dot {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: var(--gray-200);
  transition: background 0.2s;
}
.diag-progress-dot.active { background: var(--black); }

.diag-step { display: none; }
.diag-step.show { display: block; }

.diag-q {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.diag-q-sub {
  font-size: 13px;
  color: var(--gray-600);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.diag-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.diag-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: left;
  background: var(--white);
  font-family: inherit;
  width: 100%;
}
.diag-option:hover {
  border-color: var(--black);
  background: var(--gray-50);
}
.diag-option-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}
.diag-option-text strong {
  display: block;
  font-size: 14px;
  color: var(--black);
  margin-bottom: 2px;
}
.diag-option-text span {
  font-size: 12px;
  color: var(--gray-600);
}

.diag-result {
  text-align: center;
}
.diag-result-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 100px;
  margin-bottom: 0.75rem;
}
.diag-result-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.diag-result-desc {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.diag-result-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.diag-btn-primary {
  width: 100%;
  padding: 13px;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
}
.diag-btn-primary:hover { opacity: 0.8; }
.diag-btn-secondary {
  width: 100%;
  padding: 11px;
  background: none;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--gray-600);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s;
}
.diag-btn-secondary:hover {
  border-color: var(--black);
  color: var(--black);
}

.nav-diag-btn {
  font-size: 13px;
  padding: 6px 14px;
  background: var(--white);
  color: var(--black);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.nav-diag-btn:hover { opacity: 0.8; }


/* 親しみやすさの細部調整 */
.btn-primary {
  box-shadow: 0 4px 16px rgba(255,255,255,0.15);
  letter-spacing: 0.02em;
}
.step-card {
  transition: transform 0.2s, box-shadow 0.2s;
}
.step-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.add-block-btn {
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.add-block-btn:hover {
  transform: translateX(2px);
}
#dl-btn, #wp-dl-btn {
  border-radius: 100px;
  letter-spacing: 0.02em;
}
.modal-cta {
  border-radius: 100px;
}
.nav-diag-btn {
  border-radius: 100px;
}
.pricing-card {
  transition: transform 0.2s, box-shadow 0.2s;
}
.pricing-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}
.diag-option {
  border-radius: 14px;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.diag-option:hover {
  transform: translateX(3px);
}
.hero-badge {
  font-weight: 600;
}
/* ===== ページ管理 ===== */
.page-manager {
  margin-bottom: 0;
}

.sidebar-divider {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 12px 0;
}

#page-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.page-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  border: 1.5px solid transparent;
}

.page-item:hover { background: var(--gray-100); }

.page-item.active {
  background: var(--black);
  border-color: var(--black);
}

.page-item-name {
  flex: 1;
  font-size: 12px;
  color: var(--black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-item.active .page-item-name { color: var(--white); }

.page-item-slug {
  font-size: 10px;
  color: var(--gray-400);
}

.page-item.active .page-item-slug { color: rgba(255,255,255,0.5); }

.page-item-btns {
  display: flex;
  gap: 1px;
  opacity: 0;
  transition: opacity 0.15s;
}

.page-item:hover .page-item-btns { opacity: 1; }
.page-item.active .page-item-btns { opacity: 1; }

.page-item-btn {
  width: 20px;
  height: 20px;
  border: none;
  background: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s, color 0.1s;
}

.page-item-btn:hover { background: rgba(0,0,0,0.1); color: var(--black); }
.page-item.active .page-item-btn { color: rgba(255,255,255,0.6); }
.page-item.active .page-item-btn:hover { background: rgba(255,255,255,0.15); color: var(--white); }

.add-page-btn {
  width: 100%;
  padding: 7px 10px;
  border: 1.5px dashed var(--gray-200);
  border-radius: var(--radius-sm);
  background: none;
  font-size: 12px;
  color: var(--gray-400);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
  text-align: left;
}

.add-page-btn:hover {
  border-color: var(--black);
  color: var(--black);
}

/* ページ名編集モーダル */
.page-edit-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.page-edit-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  max-height: 90vh;
  overflow-y: auto;
}

.page-edit-box h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 1rem;
}

.page-edit-field {
  margin-bottom: 12px;
}

.page-edit-field label {
  display: block;
  font-size: 12px;
  color: var(--gray-600);
  margin-bottom: 4px;
}

.page-edit-field input {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
}

.page-edit-field input:focus {
  outline: none;
  border-color: var(--black);
}

.page-edit-btns {
  display: flex;
  gap: 8px;
  margin-top: 1rem;
}

.page-edit-btns button {
  flex: 1;
  padding: 9px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  font-weight: 500;
}

.page-edit-save {
  background: var(--black);
  color: var(--white);
  border: none;
}

.page-edit-cancel {
  background: none;
  border: 1.5px solid var(--gray-200);
  color: var(--gray-600);
}

.page-type-card {
  padding: 10px 12px;
  border: 1.5px solid #e4e7ec;
  border-radius: 10px;
  cursor: pointer;
  background: #fafafa;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}
.page-type-card:hover { border-color: #b2ccff; background: #f5f8ff; }
.page-type-card.selected { border-color: #3b82f6; background: #eff6ff; }

/* プレビューのナビ */
.preview-nav {
  background: #f0f4ff;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid #c7d7fe;
}

.preview-nav-label {
  font-size: 10px;
  font-weight: 700;
  color: #4f6ef7;
  letter-spacing: 0.06em;
  white-space: nowrap;
  margin-right: 4px;
}

.preview-nav-link {
  font-size: 11px;
  color: #4f6ef7;
  padding: 3px 10px;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border: 1px solid #c7d7fe;
  background: #fff;
  font-family: inherit;
}

.preview-nav-link:hover { background: #e0e7ff; border-color: #818cf8; }
.preview-nav-link.active { background: #4f6ef7; color: #fff; border-color: #4f6ef7; }

/* ===== エディタータブ ===== */
.editor-tabs {
  display: flex;
  gap: 4px;
  padding: 0 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.editor-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  border: none;
  background: none;
  color: var(--gray-400);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}

.editor-tab:hover { color: var(--black); }

.editor-tab.active {
  color: var(--black);
  border-bottom-color: var(--black);
}

/* ===== ナビ設定パネル ===== */
.nav-editor-panel {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.nav-editor-section {
  padding: 1rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.nav-editor-section:last-child { border-bottom: none; }

.nav-editor-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.nav-editor-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: nowrap;
}

.nav-editor-row:last-child { margin-bottom: 0; }

.nav-editor-row label {
  font-size: 12px;
  color: var(--gray-600);
  min-width: 80px;
  flex-shrink: 0;
  white-space: nowrap;
}

.nav-editor-row > span,
.nav-editor-row > small {
  font-size: 12px;
  color: var(--gray-400);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-editor-row input[type="text"],
.nav-editor-row input[type="number"],
.nav-editor-row select {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  background: var(--gray-50);
  min-width: 0;
}

.nav-editor-row input[type="color"] {
  width: 40px;
  height: 32px;
  padding: 2px 4px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-unit {
  font-size: 12px;
  color: var(--gray-400);
  flex-shrink: 0;
}

.nav-file-label {
  display: inline-block;
  padding: 5px 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--gray-600);
  cursor: pointer;
  transition: border-color 0.15s;
  white-space: nowrap;
}

.nav-file-label:hover { border-color: var(--black); color: var(--black); }
.nav-file-label input { display: none; }

.nav-clear-btn {
  font-size: 11px;
  padding: 4px 8px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: none;
  color: var(--gray-400);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.nav-clear-btn:hover { border-color: #dc2626; color: #dc2626; }

/* リンク表示設定 */
.nav-link-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--gray-100);
}

.nav-link-item:last-child { border-bottom: none; }

.nav-link-check {
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-link-name {
  flex: 1;
  font-size: 13px;
  color: var(--black);
}

.nav-link-slug {
  font-size: 11px;
  color: var(--gray-400);
}

/* ナビプレビューラップ */
.nav-preview-wrap {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--gray-50);
}

#nav-preview {
  min-height: 60px;
}

/* ===== ナビプリセット ===== */
.nav-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}

.nav-preset-item {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s;
}

.nav-preset-item:hover { border-color: var(--gray-400); }
.nav-preset-item.active { border: 2px solid var(--black); }

.nav-preset-mock {
  background: #1a1a1a;
  height: 36px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 6px;
}

.npm-logo {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.npm-links {
  display: flex;
  gap: 4px;
}

.npm-links span {
  font-size: 8px;
  color: rgba(255,255,255,0.7);
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
}

.npm-links span:first-child {
  color: #fff;
  background: rgba(255,255,255,0.15);
}

.nav-preset-label {
  font-size: 11px;
  text-align: center;
  padding: 5px 4px;
  color: var(--gray-600);
  line-height: 1.3;
}

.nav-preset-item.active .nav-preset-label {
  color: var(--black);
  font-weight: 500;
}

/* 非選択列のコンパクト表示 */
.col-block-mini {
  border-bottom: 1px solid var(--gray-100);
}
.col-block-mini:last-child { border-bottom: none; }

/* ===== 全体の流れバナー ===== */
.flow-banner {
  background: linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 100%);
  padding: 2.5rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.flow-banner-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.flow-banner-text {
  flex: 1;
  min-width: 240px;
}

.flow-banner-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.flow-banner-text h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.4rem;
}

.flow-banner-text p {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
}

.flow-banner-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.flow-banner-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
}

.flow-banner-step.done {
  color: #4ade80;
}

.flow-banner-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
}

.flow-banner-step.done .flow-banner-num {
  background: #16a34a;
  color: #fff;
}

.flow-banner-arrow {
  font-size: 14px;
  color: rgba(255,255,255,0.2);
  margin-bottom: 14px;
}

.flow-banner-btn {
  display: inline-block;
  padding: 10px 20px;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 100px;
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.flow-banner-btn:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255,255,255,0.05);
}

@media (max-width: 700px) {
  .flow-banner-inner { flex-direction: column; align-items: flex-start; }
  .flow-banner-steps { gap: 6px; }
}

/* ===== デバイス切り替え ===== */
.preview-device-toggle {
  display: flex;
  gap: 2px;
  margin-left: auto;
}

.device-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--gray-400);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.device-btn:hover {
  border-color: var(--gray-400);
  color: var(--gray-600);
}

.device-btn.active {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
}

/* スマホプレビュー */
#preview-outer {
  background: var(--gray-100);
  transition: all 0.3s;
  overflow-y: auto;
  max-height: calc(90vh - 48px);
}

#preview-outer.sp-mode {
  padding: 24px 16px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

#preview-outer.sp-mode #preview {
  width: 375px;
  min-width: 375px;
  border-radius: 32px;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(85vh - 96px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 0 0 8px #1a1a1a, 0 0 0 10px #333;
  position: relative;
}

/* ホバー編集ボタン */
.col-block-hover-wrap {
  position: relative;
}
.col-block-hover-wrap:hover > .block-hover-btns {
  opacity: 1;
  pointer-events: auto;
}
.block-hover-btns {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 10;
}
.block-hover-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: background 0.15s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.block-hover-btn-edit { background: #3b82f6; color: #fff; }
.block-hover-btn-edit:hover { background: #2563eb; }
.block-hover-btn-del { background: #ef4444; color: #fff; }
.block-hover-btn-del:hover { background: #dc2626; }
.block-hover-btn-up { background: #fff; color: #374151; border: 1px solid #e4e7ec; }
.block-hover-btn-up:hover { background: #f9fafb; }
.block-hover-btn-down { background: #fff; color: #374151; border: 1px solid #e4e7ec; }
.block-hover-btn-down:hover { background: #f9fafb; }

/* ===== AI自動生成 ===== */
.ai-generate-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  margin-top: 14px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  border-radius: var(--border-radius-md, 8px);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: inherit;
}
.ai-generate-btn:hover { opacity: 0.9; }

.ai-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.ai-modal {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.ai-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}
.ai-modal-header h3 { font-size: 16px; font-weight: 700; margin: 0; }
.ai-modal-close {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #999;
  padding: 4px;
}
.ai-modal-body { padding: 16px 20px; }
.ai-modal-body .block-field { margin-bottom: 14px; }
.ai-modal-body label { font-size: 13px; font-weight: 600; color: #374151; display: block; margin-bottom: 4px; }
.ai-modal-body input,
.ai-modal-body select,
.ai-modal-body textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
}
.ai-modal-body textarea { resize: vertical; }
.ai-block-checks { display: flex; flex-direction: column; gap: 6px; }
.ai-check-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 400;
  color: #374151;
  cursor: pointer;
}
.ai-check-item input { width: auto; }
.ai-omakase-btn {
  width: 100%;
  padding: 8px;
  margin-top: 6px;
  background: #fff;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #6366f1;
  cursor: pointer;
  font-family: inherit;
}
.ai-omakase-btn:hover { background: #eef2ff; }
.ai-usage-note { font-size: 12px; color: #999; margin: 0; }
.ai-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid #eee;
}
.ai-cancel-btn {
  padding: 9px 18px;
  background: #f4f4f4;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.ai-generate-submit-btn {
  padding: 9px 20px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
}
.ai-generate-submit-btn:hover { opacity: 0.9; }
.ai-generate-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ai-generate-submit-btn.loading::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 6px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ai-spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes ai-spin { to { transform: rotate(360deg); } }
.tmpl-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.tmpl-modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 2rem;
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: slideUp 0.25s ease;
}

.tmpl-modal-box h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.tmpl-modal-box p {
  font-size: 13px;
  color: var(--gray-600);
  margin-bottom: 1.5rem;
}

.tmpl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 1.5rem;
}

.tmpl-card {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.tmpl-card:hover {
  border-color: var(--black);
  transform: translateY(-2px);
}

.tmpl-card.selected {
  border: 2px solid #3b82f6;
}

.tmpl-thumb {
  height: 100px;
  display: flex;
  flex-direction: column;
}

.tmpl-thumb-nav {
  height: 18px;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 4px;
}

.tmpl-thumb-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
}

.tmpl-thumb-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tmpl-label {
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--black);
  border-top: 1px solid var(--gray-100);
}

.tmpl-skip-btn {
  width: 100%;
  padding: 11px;
  background: none;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--gray-600);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s;
  margin-bottom: 8px;
}

.tmpl-skip-btn:hover { border-color: var(--black); color: var(--black); }

.tmpl-use-btn {
  width: 100%;
  padding: 13px;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
}

.tmpl-use-btn:hover { opacity: 0.8; }

@media (max-width: 500px) {
  .tmpl-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== プロジェクトファイル読込 ===== */
.project-load-area {
  margin-top: 12px;
  border: 1.5px dashed var(--gray-200);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: var(--gray-50);
}

.project-load-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--black);
  cursor: pointer;
  margin-bottom: 8px;
  transition: color 0.15s;
}

.project-load-btn:hover { color: #3b82f6; }

.project-load-note {
  font-size: 11px;
  color: var(--gray-400);
  line-height: 1.7;
}

.project-load-note strong {
  color: var(--gray-600);
  font-family: monospace;
}

/* ===== 新ランディングページ用スタイル ===== */

/* ナビのCTAリンク */
.nav-cta-link {
  background: var(--black);
  color: var(--white) !important;
  padding: 6px 16px !important;
  border-radius: 100px;
  font-weight: 600;
  font-size: 13px !important;
  transition: opacity 0.2s !important;
}
.nav-cta-link:hover { opacity: 0.8; }

/* ヒーロー改善 */
.hero-badge-wrap {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.hero-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 100px;
  padding: 4px 12px;
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.06);
  letter-spacing: 0.03em;
}
.hero-accent {
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.btn-secondary {
  display: inline-block;
  border: 1.5px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.8);
  font-size: 15px;
  font-weight: 500;
  padding: 13px 28px;
  border-radius: 100px;
  transition: border-color 0.2s, color 0.2s;
}
.btn-secondary:hover {
  border-color: #fff;
  color: #fff;
}
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 1.5rem 2rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  flex-wrap: wrap;
  gap: 0;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 2rem;
}
.hero-stat-num {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}
.hero-stat-label {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  margin-top: 3px;
}
.hero-stat-divider {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.15);
}

/* セクション共通 */
.section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gray-400);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 0.75rem;
  display: block;
}
.section-title {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 2.5rem;
  line-height: 1.4;
  color: var(--black);
}

/* 特徴セクション */
.features {
  padding: 5rem 1.5rem;
  background: var(--gray-50);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.feature-icon {
  width: 48px;
  height: 48px;
  background: #eff6ff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  flex-shrink: 0;
}
.feature-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--black);
}
.feature-card p {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.7;
}

/* 使い方セクション */
.how-cta {
  text-align: center;
  margin-top: 2rem;
}
.how-guide-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  padding: 8px 16px;
  border-radius: 100px;
  transition: border-color 0.15s, color 0.15s;
}
.how-guide-link:hover {
  border-color: var(--black);
  color: var(--black);
}

/* エディター前誘導 */
.editor-intro {
  background: var(--black);
  padding: 4rem 1.5rem;
}
.editor-intro-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
}
.editor-intro-text h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}
.editor-intro-text p {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  line-height: 1.8;
  margin-bottom: 1rem;
}
.editor-intro-checklist {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.editor-intro-check {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.editor-intro-btn {
  display: inline-block;
  background: var(--white);
  color: var(--black);
  font-size: 15px;
  font-weight: 700;
  padding: 16px 36px;
  border-radius: 100px;
  white-space: nowrap;
  transition: opacity 0.2s, transform 0.15s;
  flex-shrink: 0;
}
.editor-intro-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* how section タイトル更新 */
.how h2, .how .section-title {
  text-align: center;
}

@media (max-width: 900px) {
  .features-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 8px; padding: 1rem; }
  .hero-stat { padding: 0 1rem; }
  .editor-intro-inner { flex-direction: column; text-align: center; }
  .editor-intro-checklist { justify-content: center; }
}

/* ===== モバイルナビ（ハンバーガー） ===== */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  flex-shrink: 0;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.8);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(15,15,15,0.98);
    backdrop-filter: blur(8px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    z-index: 99;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 24px;
    font-size: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  .nav-links a:last-of-type {
    border-bottom: none;
  }

  .nav-cta-link {
    margin: 12px 24px 0 !important;
    padding: 12px 16px !important;
    text-align: center;
    border-radius: 100px !important;
  }

  .nav-diag-btn {
    margin: 4px 24px 0;
    text-align: center;
    border-radius: 100px;
  }
}

/* ===== 共通項目設定レイアウト ===== */
.editor-layout-nav {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.25rem;
  align-items: start;
  padding: 0 1rem;
}

.nav-editor-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-editor-section {
  background: var(--white);
  border: 1.5px solid #d0d5dd;
  border-radius: 12px;
  padding: 1.25rem;
}

.nav-editor-section:last-child { border-bottom: none; }

.nav-editor-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-400);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

.nav-editor-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.nav-editor-row:last-child { margin-bottom: 0; }

.nav-editor-row label {
  font-size: 12px;
  color: var(--gray-600);
  white-space: nowrap;
}

.nav-editor-row input[type="text"],
.nav-editor-row input[type="number"],
.nav-editor-row select {
  padding: 6px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: var(--gray-50);
  width: 100%;
  min-width: 0;
}

.nav-editor-row input[type="color"] {
  width: 40px;
  height: 32px;
  padding: 2px 4px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  cursor: pointer;
}

@media (max-width: 900px) {
  .editor-layout-nav { grid-template-columns: 1fr; }
}

/* ===== ブロックフォームタブ ===== */
.block-form-tabs {
  display: flex;
  gap: 2px;
  padding: 8px 10px 0;
  border-bottom: 1px solid #e4e7ec;
  background: #f8f9fa;
}

.block-form-tab {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  background: none;
  color: #98a2b3;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  border-radius: 4px 4px 0 0;
  transition: color 0.15s;
  white-space: nowrap;
}

.block-form-tab:hover { color: #475467; }
.block-form-tab.active { color: #1570ef; border-bottom-color: #1570ef; }

.block-form-panel { display: none; padding: 10px; }
.block-form-panel.active { display: block; }

.font-select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  background: #f8f9fa;
  color: #0f0f0f;
  cursor: pointer;
}

/* ===== サイドバーダウンロードボタン ===== */
.dl-side-btn {
  display: block;
  width: 100%;
  padding: 9px 12px;
  margin-bottom: 6px;
  background: var(--white);
  color: var(--black);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
}
.dl-side-btn:hover { background: var(--gray-50); border-color: var(--gray-400); }
.dl-side-btn-dark { background: var(--black); color: var(--white); border-color: var(--black); }
.dl-side-btn-dark:hover { background: #333; border-color: #333; }
.accordion-section { border: 1.5px solid #d0d5dd; border-radius: 12px; overflow: hidden; margin-bottom: 8px; }
.accordion-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; cursor: pointer; background: var(--white); user-select: none; transition: background 0.15s; }
.accordion-header:hover { background: var(--gray-50); }
.accordion-header.open { background: #eff6ff; border-bottom: 1px solid #bfdbfe; }
.accordion-title { font-size: 12px; font-weight: 700; color: var(--gray-600); letter-spacing: 0.06em; text-transform: uppercase; }
.accordion-header.open .accordion-title { color: #1d4ed8; }
.accordion-arrow { font-size: 11px; color: var(--gray-400); transition: transform 0.2s; }
.accordion-header.open .accordion-arrow { transform: rotate(180deg); color: #1d4ed8; }
.accordion-body { display: none; padding: 12px 14px; }
.accordion-header.open + .accordion-body { display: block; }