:root {
  --main: #2563EB;
  --main-light: #DBEAFE;
  --text: #1E293B;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --bg: #F1F5F9;
  --white: #FFFFFF;
  --success: #10B981;
  --header-h: 56px;
  --nav-h: 40px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== ツールバー ===== */
.preview-toolbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 200;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.toolbar-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}
.toolbar-title i { color: var(--main); font-size: 15px; }
.toolbar-divider {
  width: 1px; height: 24px;
  background: var(--border);
  flex-shrink: 0;
}

/* ビュー切り替えボタングループ */
.view-switcher {
  display: flex;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.view-btn {
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.18s;
  white-space: nowrap;
}
.view-btn.active {
  background: var(--main);
  color: #fff;
}
.view-btn:not(.active):hover {
  background: var(--main-light);
  color: var(--main);
}

.toolbar-btn {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
  white-space: nowrap;
}
.toolbar-btn:hover { border-color: var(--main); color: var(--main); background: var(--main-light); }
.toolbar-btn.regen { background: var(--main-light); border-color: var(--main); color: var(--main); }
.toolbar-btn.close-btn { color: #EF4444; border-color: #FECACA; }
.toolbar-btn.close-btn:hover { background: #FEE2E2; border-color: #EF4444; }

/* ===== ページナビ ===== */
.page-nav-bar {
  position: fixed;
  top: var(--header-h); left: 0; right: 0;
  height: var(--nav-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  padding: 0 12px;
  overflow-x: auto;
  z-index: 199;
}
.page-nav-bar::-webkit-scrollbar { display: none; }
.page-nav-tab {
  padding: 0 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 100%;
}
.page-nav-tab.active { color: var(--main); border-bottom-color: var(--main); font-weight: 700; }
.page-nav-tab:hover:not(.active) { color: var(--text); background: var(--bg); }

/* ===== プレビューエリア（共通ラッパー） ===== */
.preview-area {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 20px 40px;
  overflow: auto;
  margin-top: calc(var(--header-h) + var(--nav-h));
}

/* ===== スマホフレーム ===== */
.phone-frame {
  background: #1E293B;
  border-radius: 48px;
  padding: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 0 2px #334155;
  position: relative;
  width: 375px;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.phone-notch {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  background: #1E293B;
  width: 100px; height: 26px;
  border-radius: 0 0 18px 18px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.notch-camera { width: 10px; height: 10px; background: #0F172A; border-radius: 50%; border: 2px solid #334155; }
.notch-speaker { width: 40px; height: 5px; background: #0F172A; border-radius: 3px; }
.phone-screen {
  background: var(--white);
  border-radius: 38px;
  overflow: hidden;
  height: 740px;
  position: relative;
}
.phone-screen-inner {
  height: 100%;
  overflow-y: auto;
  padding-top: 34px;
}
.phone-screen-inner::-webkit-scrollbar { display: none; }
.phone-home-indicator {
  position: absolute;
  bottom: 8px; left: 50%;
  transform: translateX(-50%);
  width: 120px; height: 4px;
  background: #CBD5E1;
  border-radius: 2px;
  z-index: 5;
}
.phone-status-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: rgba(30,41,59,0.7);
  backdrop-filter: blur(4px);
  padding: 7px 16px;
  font-size: 10px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 4;
}

/* スマホ非表示時 */
.phone-frame.hidden { display: none; }

/* ===== PCブラウザフレーム ===== */
.pc-frame {
  width: 100%;
  max-width: 1200px;
  background: #1E293B;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  overflow: hidden;
  flex-shrink: 0;
  display: none;
}
.pc-frame.visible { display: block; }
.pc-titlebar {
  background: #2D3748;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pc-dots { display: flex; gap: 6px; }
.pc-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.pc-dot.red   { background: #EF4444; }
.pc-dot.yellow { background: #F59E0B; }
.pc-dot.green  { background: #10B981; }
.pc-address-bar {
  flex: 1;
  background: #1A202C;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 11px;
  color: #94A3B8;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pc-address-bar i { color: #10B981; font-size: 10px; }
.pc-screen {
  background: #fff;
  height: 700px;
  overflow-y: auto;
  overflow-x: hidden;
}
.pc-screen::-webkit-scrollbar { width: 8px; }
.pc-screen::-webkit-scrollbar-track { background: #F1F5F9; }
.pc-screen::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 4px; }

/* ===== ページ切り替えラッパー ===== */
.page-iframe-wrap { display: none; height: 100%; }
.page-iframe-wrap.active { display: block; }
.page-iframe { width: 100%; height: 100%; border: none; display: block; }

/* ===== LP モバイル コンテンツスタイル ===== */
.lp-body { font-size: 14px; }

.lp-hero {
  padding: 24px 18px 28px;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lp-hero h1 {
  font-size: 20px; font-weight: 700; line-height: 1.4; margin-bottom: 8px;
}
.lp-hero p  { font-size: 13px; line-height: 1.7; opacity: 0.85; }

.lp-section {
  padding: 20px 18px;
  border-top: 1px solid var(--border);
  position: relative;
}
.lp-section-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lp-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.lp-feature-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 10px;
  text-align: center;
}
.lp-feature-card i { font-size: 22px; margin-bottom: 6px; display: block; }
.lp-feature-card h4 { font-size: 12px; font-weight: 700; margin-bottom: 3px; }
.lp-feature-card p  { font-size: 11px; color: var(--text-muted); }

/* ===== クリニック画像共通：横幅100%・4:3固定比率 ===== */
.lp-clinic-img-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(135deg,#DBEAFE,#EDE9FE);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
  color: #94A3B8;
}
.lp-clinic-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lp-doctor-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.lp-doctor-img  { display: flex; align-items: center; justify-content: center; font-size: 52px; background: linear-gradient(135deg,#DBEAFE,#EDE9FE); }
.lp-doctor-info { padding: 14px; }
.lp-doctor-info h3 { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.lp-doctor-info p  { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.lp-doctor-msg { font-size: 12px; line-height: 1.7; font-style: italic; border-left: 3px solid; padding-left: 10px; }

.lp-product-list { display: flex; flex-direction: column; gap: 10px; }
.lp-product-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border: 1px solid var(--border); border-radius: 10px;
}
.lp-product-emoji { font-size: 30px; }
.lp-product-info { flex: 1; }
.lp-product-info h4 { font-size: 13px; font-weight: 700; }
.lp-product-info p  { font-size: 11px; color: var(--text-muted); }
.lp-product-price { font-size: 14px; font-weight: 700; white-space: nowrap; }

.lp-dept-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-dept-tag { border: 1.5px solid; border-radius: 20px; padding: 5px 14px; font-size: 12px; font-weight: 600; }

.lp-hours-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.lp-hours-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); }
.lp-hours-table td:first-child { color: var(--text-muted); }
.lp-hours-table td:last-child  { font-weight: 600; text-align: right; }

.lp-cta { padding: 22px 18px; text-align: center; }
.lp-cta h2 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.lp-cta p  { font-size: 12px; margin-bottom: 14px; }
.lp-cta-btn {
  width: 100%; padding: 14px; border-radius: 12px; border: none;
  font-size: 15px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 10px;
}
.lp-footer {
  padding: 16px 18px 30px; text-align: center;
  font-size: 11px; color: var(--text-muted);
  border-top: 1px solid var(--border); line-height: 2;
}
.regen-btn {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,0.9); border: 1.5px solid var(--border);
  border-radius: 6px; padding: 4px 10px; font-size: 11px; font-weight: 600;
  color: var(--main); cursor: pointer;
  display: flex; align-items: center; gap: 4px;
  transition: all 0.2s; z-index: 3;
}
.regen-btn:hover { background: var(--main-light); border-color: var(--main); }

/* ===== LP PC コンテンツスタイル ===== */
.lp-pc {
  font-size: 15px;
  font-family: 'Noto Sans JP', sans-serif;
  color: #1E293B;
  line-height: 1.7;
}

/* PC ヘッダーナビ */
.lp-pc-nav {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #E2E8F0;
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 60px;
  z-index: 10;
}
.lp-pc-nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 17px; font-weight: 800;
  text-decoration: none; color: inherit;
  flex-shrink: 0;
  margin-right: auto;
}
.lp-pc-nav-links {
  display: flex; align-items: center; gap: 24px;
}
.lp-pc-nav-links a {
  font-size: 13px; font-weight: 500;
  color: #475569; text-decoration: none;
  transition: color 0.15s;
}
.lp-pc-nav-links a:hover { color: var(--main); }
.lp-pc-nav-cta {
  padding: 8px 20px; border-radius: 8px;
  font-size: 13px; font-weight: 700;
  border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.2s;
}

/* PC ヒーローセクション */
.lp-pc-hero {
  display: grid;
  /*grid-template-columns: 1fr 440px;*/
  grid-template-columns: 1fr 30%;
  gap: 0;
  min-height: 520px;
  overflow: hidden;
}
.lp-pc-hero-left {
  padding: 64px 56px;
  display: flex; flex-direction: column;
  justify-content: center;
}
.lp-pc-hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 800;
  padding: 5px 14px; border-radius: 20px;
  margin-bottom: 20px; letter-spacing: 0.5px;
  width: fit-content;
}
.lp-pc-hero h1 {
  font-size: 36px;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.lp-pc-hero-sub {
  font-size: 15px; line-height: 1.8;
  opacity: 0.85; margin-bottom: 28px;
}
.lp-pc-hero-btns {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-bottom: 28px;
}
.lp-pc-btn-primary {
  padding: 14px 28px; border-radius: 10px;
  font-size: 15px; font-weight: 800;
  border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.2s; box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.lp-pc-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.22); }
.lp-pc-btn-outline {
  padding: 13px 24px; border-radius: 10px;
  font-size: 14px; font-weight: 700;
  border: 2px solid; cursor: pointer;
  background: transparent;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.2s;
}
.lp-pc-hero-trust {
  display: flex; gap: 20px; flex-wrap: wrap;
}
.lp-pc-trust-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; opacity: 0.7;
}
.lp-pc-hero-right {
  display: flex; align-items: center; justify-content: center;
  padding: 40px 40px 40px 0;
  position: relative;
}
.lp-pc-product-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.22);
  overflow: hidden;
  width: 100%;
  max-width: 360px;
}
.lp-pc-product-img {
  width: 100%;
  aspect-ratio: 1 / 1;   /* 正方形 */
  background: #fff;
  overflow: hidden;
}
.lp-pc-product-img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block; /* 全面表示 */
}
.lp-pc-product-info {
  padding: 20px 22px 22px;
  border-top: 1px solid #F1F5F9;
}
.lp-pc-product-name { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.lp-pc-product-desc { font-size: 12px; color: #64748B; margin-bottom: 12px; }
.lp-pc-product-price { font-size: 28px; font-weight: 900; }
.lp-pc-product-tax  { font-size: 11px; color: #94A3B8; }

/* PC セクション共通 */
.lp-pc-section {
  padding: 64px 80px;
}
.lp-pc-section.bg-light { background: #F8FAFC; }
.lp-pc-section.bg-accent { }
.lp-pc-section-head {
  text-align: center;
  margin-bottom: 40px;
}
.lp-pc-section-label {
  display: inline-block;
  font-size: 11px; font-weight: 800;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 4px 14px; border-radius: 20px;
  margin-bottom: 12px;
}
.lp-pc-section-title {
  font-size: 26px; font-weight: 800;
  line-height: 1.3; margin-bottom: 8px;
}
.lp-pc-section-sub {
  font-size: 14px; color: #64748B;
}

/* PC 特徴グリッド */
.lp-pc-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.lp-pc-feature-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 24px 18px;
  text-align: center;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.lp-pc-feature-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.lp-pc-feature-icon { font-size: 30px; margin-bottom: 12px; }
.lp-pc-feature-card h4 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.lp-pc-feature-card p  { font-size: 12px; color: #64748B; line-height: 1.6; }

/* PC 診療フロー */
.lp-pc-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.lp-pc-flow::before {
  content: '';
  position: absolute;
  top: 28px; left: calc(12.5% + 16px); right: calc(12.5% + 16px);
  height: 2px;
  background: linear-gradient(90deg, transparent, #E2E8F0 10%, #E2E8F0 90%, transparent);
}
.lp-pc-flow-step {
  text-align: center;
  padding: 0 16px;
  position: relative;
}
.lp-pc-flow-num {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800;
  margin: 0 auto 14px;
  position: relative; z-index: 1;
}
.lp-pc-flow-step h4 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.lp-pc-flow-step p  { font-size: 12px; color: #64748B; line-height: 1.6; }

/* PC 医師紹介 */
.lp-pc-doctor {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  align-items: center;
}
.lp-pc-doctor-img {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;   /* 4:3固定 */
  width: 100%;
  background: linear-gradient(135deg, #DBEAFE, #EDE9FE);
  display: flex; align-items: center; justify-content: center;
  font-size: 80px;
}
.lp-pc-doctor-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp-pc-doctor-name { font-size: 28px; font-weight: 800; margin-bottom: 6px; }
.lp-pc-doctor-title { font-size: 14px; color: #64748B; margin-bottom: 20px; }
.lp-pc-doctor-msg {
  font-size: 15px; line-height: 1.9;
  font-style: italic;
  border-left: 4px solid;
  padding-left: 18px;
  color: #475569;
}

/* PC 商品グリッド */
.lp-pc-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.lp-pc-product-tile {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.2s;
}
.lp-pc-product-tile:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,0.12); }
.lp-pc-product-tile-img {
  background: #F8FAFC;
  height: 180px;
  display: flex; align-items: center; justify-content: center;
  font-size: 56px;
}
.lp-pc-product-tile-img img { max-height: 160px; max-width: 90%; object-fit: contain; }
.lp-pc-product-tile-body { padding: 16px 18px 20px; }
.lp-pc-product-tile-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.lp-pc-product-tile-desc { font-size: 12px; color: #64748B; margin-bottom: 10px; line-height: 1.6; }
.lp-pc-product-tile-price { font-size: 20px; font-weight: 800; }

/* PC 診療科目タグ */
.lp-pc-depts {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: center;
}
.lp-pc-dept-tag {
  border: 2px solid; border-radius: 30px;
  padding: 8px 22px; font-size: 14px; font-weight: 600;
}

/* PC 営業時間 */
.lp-pc-hours {
  max-width: 560px;
  margin: 0 auto;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.lp-pc-hours table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lp-pc-hours td { padding: 14px 24px; border-bottom: 1px solid #F1F5F9; }
.lp-pc-hours td:first-child { color: #64748B; font-weight: 500; width: 150px; }
.lp-pc-hours td:last-child  { font-weight: 700; text-align: right; }

/* PC CTA */
.lp-pc-cta {
  padding: 72px 80px;
  text-align: center;
}
.lp-pc-cta h2 { font-size: 32px; font-weight: 800; margin-bottom: 12px; }
.lp-pc-cta p  { font-size: 15px; color: #64748B; margin-bottom: 32px; }
.lp-pc-cta-btns { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* PC フッター */
.lp-pc-footer {
  padding: 32px 80px;
  border-top: 1px solid #E2E8F0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #94A3B8;
  background: #F8FAFC;
}

/* アニメーション */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.lp-section, .lp-hero { animation: fadeIn 0.3s ease; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
