/* ===========================
   Maplit - Top Page Styles
   White base + Terracotta accent
   =========================== */

:root {
  --color-terracotta: #C4704B;
  --color-terracotta-light: #D4896A;
  --color-terracotta-dark: #A85A3A;
  --color-white: #ebe9dd;
  --color-bg: #ebe9dd;
  --color-text: #2C2C2C;
  --color-text-light: #6B6B6B;
  --color-border: #E8E4E0;
  --font-heading: 'Cormorant Garamond', 'Noto Serif JP', serif;
  --font-body: 'Noto Sans JP', sans-serif;
  --max-width: 1100px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: none;  /* iOS のテキスト自動拡大を無効化 */
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-white);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: none;
  text-size-adjust: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y pinch-zoom;
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: none;
  transition: background 0.3s, box-shadow 0.3s;
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  letter-spacing: 2px;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo-pin {
  width: 22px;
  height: 22px;
}

.header.scrolled .logo {
  color: var(--color-text);
}

.header-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.header-nav a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.3s;
}

.header-nav a:hover {
  color: #fff;
}

.header.scrolled .header-nav a {
  color: var(--color-text-light);
}

.header.scrolled .header-nav a:hover {
  color: var(--color-terracotta);
}

.main-content {
  position: relative;
  z-index: 2;
  background: transparent;
}
.main-content::before {
  content: '';
  position: absolute;
  top: -80px;
  left: -2px;
  right: -2px;
  height: 140px;
  background: url('/static/images/rough-edge.svg') no-repeat top center;
  background-size: 102% 80px;
  z-index: 3;
  pointer-events: none;
}

/* --- 境目画像アップロードボタン --- */
.edge-upload-area {
  position: absolute;
  top: -40px;
  left: 12px;
  z-index: 20;
  pointer-events: auto;
}
.edge-upload-hint {
  display: inline-block;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s;
}
.edge-upload-hint:hover {
  opacity: 1;
}

/* --- カタチセクション下の境目＋ヒーロー透過 --- */
.lineup-bottom-edge {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.lineup-bottom-edge-img {
  position: relative;
  height: 80px;
  background: url('/static/images/rough-edge.svg') no-repeat bottom center;
  background-size: 102% 80px;
  z-index: 3;
}

.lineup-bottom-edge-img-flip {
  transform: rotate(180deg);
  -webkit-transform: rotate(180deg);
  background-position: top center;
}

.lineup-bottom-gap {
  height: 50px;
  /* main-contentの背景色を打ち消して、後ろのヒーローを見せる */
}

.edge-upload-area-bottom {
  position: relative;
  z-index: 20;
  margin-top: -60px;
  pointer-events: auto;
}

/* --- テキスト追加ボタン --- */
.add-label-btn {
  position: absolute;
  top: 8px;
  left: 140px;
  z-index: 20;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s;
}
.add-label-btn:hover {
  opacity: 1;
}

/* --- レイアウトロック --- */
.layout-lock-btn {
  position: absolute;
  top: 8px;
  left: 12px;
  z-index: 30;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s;
}
.layout-lock-btn:hover {
  opacity: 1;
}
.layout-lock-btn.unlocked {
  background: var(--color-terracotta);
  opacity: 0.8;
}

/* ロック中: 編集UIを非表示 */
.scenes-grid-5.locked .scene-card-resize,
.scenes-grid-5.locked .scene-label,
.scenes-grid-5.locked .scene-card-5 {
  cursor: default !important;
  touch-action: auto;
}
.scenes-grid-5.locked .scene-card-resize {
  display: none;
}
.layout-locked .add-label-btn,
.layout-locked .edge-upload-area,
.layout-locked .edge-upload-area-bottom {
  display: none;
}

/* --- Hero (fullscreen video/photo) --- */
.hero {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;          /* URLバー収納で拡大しないよう静的vhに固定 */
  overflow: hidden;
  background: #ebe9dd;
  z-index: 1;
  transition: filter 0.4s ease;
}

/* hero画像エリア（自由配置・リサイズ可能なラッパー） */
.hero-media-wrap {
  position: absolute;
  left: 0;
  top: 17.5%;             /* (100% - 65%) / 2 = 縦中央 */
  width: 100%;
  height: 65%;
  z-index: 1;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.hero-media-wrap:active {
  cursor: grabbing;
}
.hero.locked .hero-media-wrap {
  cursor: default;
  touch-action: auto;
}
.hero.locked .hero-media-wrap .scene-card-resize {
  display: none;
}
/* キャッチ（ヒーロー内、自由配置ラベル） */
.hero-label {
  position: absolute;
  z-index: 3;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  padding: 4px 8px;
  min-width: 120px;
  max-width: 90%;
}
.hero-label:active {
  cursor: grabbing;
}
.hero-label.editing {
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
  outline: 2px dashed var(--color-accent);
  outline-offset: 4px;
}
.hero-label.editing [contenteditable="true"] {
  cursor: text;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}
/* heroロック中はリサイズハンドル非表示・カーソルデフォルト */
.hero.locked .hero-label {
  cursor: default;
  touch-action: auto;
}
.hero.locked .hero-label .scene-card-resize {
  display: none;
}
/* hero用ロック/リセットボタン（両方右側に縦並び、ヘッダー下） */
.hero-lock-btn,
.hero-reset-btn {
  position: absolute;
  right: 12px;
  left: auto;            /* 親 .layout-lock-btn の left:12px を打ち消す */
  width: auto;
  z-index: 110;          /* ヘッダー(100)より上に */
}
.hero-lock-btn { top: 72px; }   /* ヘッダー(約56px)の下 */
.hero-reset-btn { top: 112px; } /* ロックの真下 */

.hero-catch-heading {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-text);
  margin: 0;
}
.hero-catch-sub {
  font-size: 15px;
  color: var(--color-text-light);
  line-height: 1.8;
  margin: 0;
}

.hero-media {
  width: 100%;
  height: 100%;
  object-fit: contain;   /* 画像全体表示・カット無し（はみ出ない） */
  display: block;
}

.hero-placeholder {
  width: 100%;
  height: 100%;
  background: var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 16px;
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 24px 80px;
  text-align: center;
  z-index: 2;
}

.hero-heading {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 500;
  line-height: 1.4;
  color: #fff;
  margin-bottom: 12px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-sub {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 32px;
  letter-spacing: 0.5px;
}

.btn-hero {
  display: inline-block;
  background: var(--color-terracotta);
  color: #fff;
  padding: 18px 48px;
  border-radius: 40px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1px;
  transition: background 0.3s, transform 0.2s;
  box-shadow: 0 4px 20px rgba(196, 112, 75, 0.4);
}

.btn-hero:hover {
  background: var(--color-terracotta-dark);
  transform: translateY(-2px);
}

/* btn-primary は他セクションでも使うので残す */
.btn-primary {
  display: inline-block;
  background: var(--color-terracotta);
  color: var(--color-white);
  padding: 16px 40px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 1px;
  transition: background 0.3s, transform 0.2s;
}

.btn-primary:hover {
  background: var(--color-terracotta-dark);
  transform: translateY(-1px);
}

/* placeholder for images */
.img-placeholder {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1;
  background: var(--color-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 14px;
}


/* --- Section Common --- */
.section {
  padding: 100px 24px;
  overflow: visible;
}

.section-bg {
  background: transparent;
}
#lineup {
  padding-top: 0;
}

.section-inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  overflow: visible;
}

.section-label {
  display: block;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--color-terracotta);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 16px;
  font-weight: 500;
}

/* 商品一覧セクションのみクラシック書体に */
#products .section-label {
  font-family: var(--font-heading);
  letter-spacing: 2px;
}

.section-pin {
  width: 24px;
  height: 24px;
  vertical-align: -2px;
  margin-right: 6px;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.4;
}

.section-description {
  font-size: 15px;
  color: var(--color-text-light);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
  line-height: 1.9;
}

/* --- Scenes --- */
.scenes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.scene-card {
  text-align: center;
  padding: 40px 20px;
  background: var(--color-white);
  border-radius: 8px;
  border: 1px solid var(--color-border);
  transition: transform 0.3s, box-shadow 0.3s;
}

.scene-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

.scene-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.scene-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.scene-text {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* #catch は .hero-catch に移動済み */

/* フェードインアニメーション */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay {
  transition-delay: 0.2s;
}

.lineup-title-block {
  background: #fff;
  padding: 40px 24px 56px;
  margin-left: -24px;
  margin-right: -24px;
  text-align: center;
  margin-bottom: 12px;
  position: relative;
}

.scene-label-title {
  width: 80% !important;
  z-index: 25;
}
.lineup-title-script {
  font-family: 'Dancing Script', cursive;
  font-size: 28px;
  color: var(--color-terracotta);
  display: block;
  position: relative;
  top: -65px;
  margin-bottom: -65px;
}
.lineup-title-main {
  font-family: 'Cormorant Garamond', serif;
  font-size: 56px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 3px;
  margin-bottom: 24px;
}
.lineup-title-sub {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-text-light);
}

/* --- Map Tile Grid --- */
.map-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}
.map-cell {
  position: relative;
  overflow: hidden;
  min-height: 180px;
}
.map-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.map-cell-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
  color: #fff;
}
.map-cell-overlay h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.map-cell-overlay p {
  font-size: 12px;
  opacity: 0.85;
  line-height: 1.5;
}
/* タイトルセル */
.map-cell-text {
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
}
.map-cell-script {
  font-family: 'Dancing Script', cursive;
  font-size: 20px;
  color: var(--color-terracotta);
  margin-bottom: 0;
}
.map-cell-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: 40px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 3px;
}
/* ヒーローセル（2列ぶち抜き） */
.map-cell-hero {
  grid-column: 1 / -1;
  min-height: 280px;
}
/* アクセントテキストセル */
.map-cell-accent {
  background: var(--color-terracotta);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.map-cell-copy {
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 2;
  text-align: center;
}
/* 写真セル */
.map-cell-photo {
  min-height: 200px;
}
/* 動画セル */
.map-cell-video {
  background: #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-cell-video-placeholder {
  text-align: center;
  color: #888;
}
.map-cell-video-placeholder span {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  color: #aaa;
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.map-cell-video-placeholder small {
  font-size: 11px;
}
/* ブランドセル */
.map-cell-brand {
  background: #ebe9dd;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
  grid-column: 1 / -1;
}
.map-cell-brand-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--color-terracotta);
  letter-spacing: 3px;
  margin-bottom: 8px;
}
.map-cell-brand p {
  font-size: 13px;
  color: var(--color-text-light);
}

/* --- Scenes 5-card grid (legacy) --- */
.scenes-grid-5 {
  position: relative;
  width: 100%;
  min-height: 600px;
  overflow: visible;
}

.scene-card-5 {
  position: absolute;
  background: #ffffff;
  border-radius: 0;
  border: none;
  overflow: hidden;
  box-shadow: none;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.scene-card-5[data-card-id="lineup-title-img"] {
  z-index: 25;
}
.scene-card-5:active {
  cursor: grabbing;
}

.scene-card-resize {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 24px;
  height: 24px;
  cursor: nwse-resize;
  touch-action: none;
  z-index: 2;
  background: linear-gradient(135deg, transparent 50%, rgba(196,112,75,0.4) 50%);
  border-radius: 0 0 0 0;
}

.scene-card-hero {
  width: 50%;
}

.scene-card-sub {
  width: 23%;
}

.scene-img {
  width: 100%;
  object-fit: contain;
  display: block;
}

.scene-img-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #f5ebe0, #e8d5c0);
  display: flex;
  align-items: center;
  justify-content: center;
}

.scene-img-placeholder span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  color: var(--color-accent);
  opacity: 0.6;
  letter-spacing: 0.05em;
}

.scene-card-body {
  padding: 20px;
  text-align: center;
}

.scene-label {
  position: absolute;
  text-align: center;
  cursor: grab;
  white-space: nowrap;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  padding: 8px 4px;
  z-index: 5;
  width: auto;
  min-width: 180px;
}

.scene-label:active {
  cursor: grabbing;
}

.scene-label.editing {
  cursor: text;
  outline: 2px dashed var(--color-accent);
  outline-offset: 4px;
  white-space: normal;
}

.scene-label.editing [contenteditable="true"] {
  cursor: text;
  outline: none;
}

.scene-title-5 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 4px;
  white-space: nowrap;
  font-variant-numeric: lining-nums;
  font-feature-settings: 'lnum';
}

.scene-title-ja {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  line-height: 1.5;
  letter-spacing: 0.05em;
  white-space: pre-wrap;
  font-variant-numeric: lining-nums;
  font-feature-settings: 'lnum';
  overflow-wrap: normal;
  word-break: keep-all;
}

.scene-subtitle {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-text-light);
  margin-bottom: 10px;
  white-space: pre-wrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.scene-text-5 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  font-style: italic;
  color: var(--color-accent);
  letter-spacing: 0.03em;
  font-variant-numeric: lining-nums;
  font-feature-settings: 'lnum';
}

/* --- Steps --- */
/* --- Steps Free-layout --- */
.steps-grid-free {
  position: relative;
  width: 100%;
  min-height: 500px;
  overflow: visible;
}

.steps-card {
  position: absolute;
  background: #ffffff;
  border-radius: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  box-shadow: none;
}
.steps-card:active { cursor: grabbing; }

.steps-img,
.steps-video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
}

.steps-img-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: #f3f0ea;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 13px;
}

.steps-label {
  position: absolute;
  cursor: grab;
  touch-action: none;
  user-select: none;
  z-index: 5;
}
.steps-label:active { cursor: grabbing; }

.steps-label-title {
  text-align: center;
  z-index: 25;
}
.steps-card[data-steps-id="title-img"] {
  z-index: 25;
}

.steps-title-en {
  font-family: 'Dancing Script', cursive;
  font-size: 28px;
  color: var(--color-terracotta);
  display: block;
  white-space: nowrap;
}

.steps-title-main {
  font-family: 'Noto Serif JP', 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 500;
  font-variant-numeric: lining-nums;
  margin: 0;
}

.steps-subtitle {
  font-size: 15px;
  color: var(--color-text-light);
  margin: 0;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-terracotta);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 20px;
}

.steps-item-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
}

.steps-item-text {
  font-size: 14px;
  color: var(--color-text-light);
  line-height: 1.7;
  margin: 0;
  min-width: 16em;
}

.steps-lock-btn {
  top: 8px;
  left: 12px;
}

/* ロック中: 編集UIを非表示 */
.steps-grid-free.locked .scene-card-resize { display: none; }
.steps-grid-free.locked .steps-card { cursor: default; touch-action: auto; }
.steps-grid-free.locked .steps-label { cursor: default; touch-action: auto; }

/* 編集中ラベル */
.steps-label.editing [contenteditable] {
  outline: 2px solid var(--color-terracotta);
  border-radius: 4px;
  padding: 2px 4px;
}

/* --- Kodawari (こだわり) Free-layout Section --- */
.kodawari-grid {
  position: relative;
  width: 100%;
  min-height: 500px;
  overflow: visible;
}

.kodawari-card {
  position: absolute;
  background: #ffffff;
  border-radius: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  box-shadow: none;
}

.kodawari-card:active { cursor: grabbing; }

.kodawari-img,
.kodawari-video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
}

.kodawari-img-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: #f3f0ea;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 14px;
}

.kodawari-label {
  position: absolute;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transform-origin: top left;
}

.kodawari-label:active { cursor: grabbing; }

.kodawari-label-title {
  text-align: center;
  z-index: 25;
}
.kodawari-card[data-kodawari-id="title-img"] {
  z-index: 25;
}

.kodawari-title-en {
  display: block;
  font-family: 'Dancing Script', cursive;
  font-size: 28px;
  letter-spacing: 0.05em;
  color: var(--color-terracotta);
  margin-bottom: 4px;
  white-space: nowrap;
}

.kodawari-title-main {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 500;
  color: var(--color-text);
}

.kodawari-item-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 0;
  color: var(--color-text);
  white-space: nowrap;
}

.kodawari-item-text {
  font-size: 14px;
  color: var(--color-text-light);
  line-height: 1.9;
  min-width: 20em;
  white-space: pre-wrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.kodawari-label.editing {
  outline: 2px dashed var(--color-terracotta);
  outline-offset: 4px;
}

.kodawari-grid.locked .scene-card-resize { display: none; }
.kodawari-grid.locked .kodawari-card { cursor: default; touch-action: auto; }
.kodawari-grid.locked .kodawari-label { cursor: default; touch-action: auto; }

/* --- 削除ボタン（編集中のみ表示） --- */
.delete-btn-x {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #c4704b;
  color: #fff;
  border: 2px solid #fff;
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 30;
  padding: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  font-family: sans-serif;
}
.delete-btn-x:hover { background: #a85d3e; }

#scenes-grid:not(.locked) .delete-btn-x,
.kodawari-grid:not(.locked) .delete-btn-x,
.steps-grid-free:not(.locked) .delete-btn-x {
  display: flex;
}

/* ピンラベルはリサイズハンドル非表示 + ドラッグ領域確保 */
.scene-label-pin .scene-card-resize,
.kodawari-label-pin .scene-card-resize,
.steps-label-pin .scene-card-resize {
  display: none !important;
}
.scene-label-pin,
.kodawari-label-pin,
.steps-label-pin {
  padding: 4px;
}

/* --- kodawari2 スライドショー --- */
.kodawari-slider-card {
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.kodawari-slider {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
  background: #f5f5f5;
}

.kodawari-slider-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.kodawari-slider-item {
  flex: 0 0 100%;
  height: 100%;
  padding: 0;
  box-sizing: border-box;
  position: relative;
}

.kodawari-slider-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 6px;
}

.kodawari-slider-placeholder {
  display: none;
  position: absolute;
  inset: 4px;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
  background: #efefef;
  border-radius: 6px;
}

.kodawari-slider-item.placeholder .kodawari-slider-placeholder {
  display: flex;
}

.kodawari-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  color: #333;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, opacity 0.2s;
  font-family: serif;
}

.kodawari-slider-btn:hover { background: rgba(255, 255, 255, 1); }
.kodawari-slider-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.kodawari-slider-prev { left: 8px; }
.kodawari-slider-next { right: 8px; }

.kodawari-lock-btn {
  top: 8px;
  left: 12px;
}

/* --- Features --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.feature-card {
  text-align: center;
  padding: 40px 24px;
}

.feature-icon {
  font-size: 40px;
  margin-bottom: 20px;
}

.feature-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.feature-text {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.8;
}

/* --- Products --- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.product-card {
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 14px;
}

.product-info {
  padding: 24px;
}

.product-name {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 8px;
}

.product-description {
  font-size: 13px;
  color: var(--color-text-light);
  margin-bottom: 16px;
  line-height: 1.7;
}

.product-size,
.product-leadtime {
  display: block;
  font-size: 12px;
  color: var(--color-text-light);
  margin-top: 4px;
  letter-spacing: 0.3px;
}
.product-size + .product-leadtime {
  margin-top: 2px;
}
.product-leadtime {
  margin-bottom: 8px;
}

.product-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-terracotta);
}

.product-link {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 14px;
  padding: 11px 10px;
  background: #faf3ec;
  color: var(--color-terracotta);
  border: none;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-align: center;
  line-height: 1.4;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(196, 112, 75, 0.18);
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}

.product-link:hover {
  background: #f4e8d8;
  box-shadow: 0 3px 10px rgba(196, 112, 75, 0.25);
}

.product-link:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(196, 112, 75, 0.18);
}

/* === 商品ラインナップ 自由配置 === */
.products-grid-free {
  position: relative;
  min-height: 1200px;
  overflow: visible;
}

.products-grid-free .product-card {
  position: absolute;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.products-grid-free .product-card:active { cursor: grabbing; }

.products-grid-free.locked .product-card {
  cursor: default;
  touch-action: auto;
}
.products-grid-free.locked .scene-card-resize { display: none; }
.products-grid-free.locked .product-href-btn { display: none; }

.products-grid-free.locked .product-card[data-href]:not([data-href="#"]) {
  cursor: pointer;
}

.product-href-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.product-href-btn:hover {
  background: var(--color-terracotta);
  color: #ffffff;
}

.products-grid-free .product-card.editing [contenteditable] {
  outline: 2px solid var(--color-terracotta);
  border-radius: 4px;
  padding: 2px 4px;
}

#products .section-heading-text[contenteditable="true"],
#products .section-description[contenteditable="true"],
#products .section-label[contenteditable="true"] {
  outline: 2px dashed var(--color-terracotta);
  outline-offset: 4px;
  border-radius: 4px;
}
#products .section-heading-text[contenteditable="true"]:focus,
#products .section-description[contenteditable="true"]:focus,
#products .section-label[contenteditable="true"]:focus {
  outline: 2px solid var(--color-terracotta);
}

/* 商品ラインナップ 見出しラベル（自由配置） */
.products-grid-free .product-label {
  position: absolute;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  z-index: 5;
}
.products-grid-free .product-label:active { cursor: grabbing; }
.products-grid-free.locked .product-label {
  cursor: default;
  touch-action: auto;
  user-select: auto;
  -webkit-user-select: auto;
}
.products-grid-free .product-label > .section-label,
.products-grid-free .product-label > .section-heading,
.products-grid-free .product-label > .section-description {
  margin: 0;
}
.products-grid-free .product-label.editing [contenteditable] {
  outline: 2px solid var(--color-terracotta);
  border-radius: 4px;
  padding: 2px 4px;
}
.edit-disabled .product-label {
  cursor: default !important;
  touch-action: auto !important;
  user-select: auto !important;
}

.edit-disabled .product-card {
  cursor: default !important;
  touch-action: auto !important;
  user-select: auto !important;
}
.edit-disabled .product-href-btn { display: none !important; }

/* 画像のみのカード（装飾用） */
.product-card-img {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  padding: 0;
}
.product-card-img-img {
  width: 100%;
  height: auto;
  display: block;
}
.product-card-img-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f5e9df;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 14px;
}

/* === レビューセクション === */
#reviews .section-inner {
  text-align: center;
}

/* レビュー自由配置 */
.reviews-grid-free {
  position: relative;
  min-height: 800px;
  overflow: visible;
}
.reviews-grid-free .review-label {
  position: absolute;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  z-index: 5;
}
.reviews-grid-free .review-label:active { cursor: grabbing; }
.reviews-grid-free.locked .review-label {
  cursor: default;
  touch-action: auto;
  user-select: auto;
  -webkit-user-select: auto;
}
.reviews-grid-free.locked .scene-card-resize { display: none; }
.reviews-grid-free .review-label.editing [contenteditable] {
  outline: 2px solid var(--color-terracotta);
  border-radius: 4px;
  padding: 2px 4px;
}
.reviews-grid-free.locked .review-label-track .reviews-track {
  /* 横スクロール + ページの縦スクロール 両方許可（ブラウザが指の動きで判断） */
  touch-action: pan-x pan-y;
}
.reviews-grid-free .review-label > .reviews-summary,
.reviews-grid-free .review-label > .reviews-toolbar,
.reviews-grid-free .review-label > .reviews-track,
.reviews-grid-free .review-label > .reviews-cta,
.reviews-grid-free .review-label > .section-heading {
  margin: 0;
}
.edit-disabled .review-label {
  cursor: default !important;
  touch-action: auto !important;
  user-select: auto !important;
}

/* レビュー総数・平均点サマリ */
.reviews-summary {
  margin: 24px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.reviews-summary[hidden] { display: none; }
.reviews-summary-rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.reviews-summary-stars {
  color: #f5a623;
  font-size: 22px;
  letter-spacing: 2px;
}
.reviews-summary-avg {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
}
.reviews-summary-count {
  font-size: 13px;
  color: var(--color-text-light);
}

/* 並び替えツールバー */
.reviews-toolbar {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.reviews-toolbar[hidden] { display: none; }
.reviews-sort-label {
  font-size: 13px;
  color: var(--color-text-light);
}
.reviews-sort {
  font-size: 13px;
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #ffffff;
  font-family: inherit;
  cursor: pointer;
}

.reviews-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 8px 4px 24px;
  margin: 32px -16px 0;
  padding-left: 16px;
  padding-right: 16px;
  scrollbar-width: thin;
}
.reviews-track::-webkit-scrollbar {
  height: 6px;
}
.reviews-track::-webkit-scrollbar-thumb {
  background: rgba(196, 112, 75, 0.3);
  border-radius: 3px;
}

.reviews-empty {
  flex: 0 0 100%;
  text-align: center;
  padding: 40px 16px;
  color: var(--color-text-light);
  font-size: 14px;
}

.review-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.review-card-product {
  font-size: 12px;
  color: var(--color-terracotta);
  letter-spacing: 0.5px;
  font-weight: 600;
}
.review-card-stars-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.review-card-stars {
  color: #f5a623;
  font-size: 16px;
  letter-spacing: 2px;
  flex: 0 0 auto;
}
.review-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  flex: 1 1 auto;
  word-break: break-word;
}
.review-card-comment {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text);
  white-space: pre-wrap;
  word-break: break-word;
}
.review-card-comment.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.review-card-readmore {
  background: transparent;
  border: none;
  color: var(--color-terracotta);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-align: left;
  margin-top: -4px;
  letter-spacing: 0.3px;
}
.review-card-readmore:hover { opacity: 0.7; }
.review-card-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  overflow: hidden;
  background: #f5e9df;
  cursor: zoom-in;
  position: relative;
}
.review-card-media img,
.review-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.review-card-media video {
  pointer-events: none;
}

/* --- ライトボックス --- */
.review-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  padding: 24px;
}
.review-lightbox[hidden] { display: none; }
.review-lightbox-content {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.review-lightbox-content img,
.review-lightbox-content video {
  max-width: 100%;
  max-height: calc(100vh - 80px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.review-lightbox-close {
  position: fixed;
  top: max(16px, env(safe-area-inset-top, 16px));
  right: max(16px, env(safe-area-inset-right, 16px));
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2010;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 400;
  -webkit-tap-highlight-color: transparent;
}
.review-lightbox-close[hidden] { display: none; }
.review-lightbox-close:hover,
.review-lightbox-close:active {
  background: rgba(0, 0, 0, 0.9);
}

/* ライトボックス開いてる間は背景スクロール完全停止
   position: fixed を使わない方式（解除時のスクロール位置ジャンプを避けるため） */
body.review-lightbox-open {
  overflow: hidden;
  overscroll-behavior: contain;
}
html.review-lightbox-open {
  overflow: hidden;
}
.review-lightbox {
  touch-action: none;
}
.review-lightbox-content video,
.review-lightbox-content img {
  touch-action: auto;
}
.review-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  color: var(--color-text-light);
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
}
.review-card-name {
  font-weight: 600;
  color: var(--color-text);
}
.review-card-delete-btn,
.review-card-edit-btn {
  position: absolute;
  top: 8px;
  width: 28px;
  height: 28px;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.review-card-delete-btn {
  right: 8px;
  background: rgba(220, 60, 60, 0.95);
  font-size: 16px;
}
.review-card-edit-btn {
  right: 44px;
  background: rgba(50, 110, 200, 0.95);
}
.review-card-delete-btn:hover { background: rgba(180, 40, 40, 1); }
.review-card-edit-btn:hover { background: rgba(30, 80, 170, 1); }
.review-card-delete-btn:disabled,
.review-card-edit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.review-card { position: relative; }

.reviews-cta {
  margin-top: 24px;
  text-align: center;
}
.reviews-open-form-btn {
  background: var(--color-terracotta);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 15px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.reviews-open-form-btn:hover { opacity: 0.85; }

/* --- 投稿モーダル --- */
.reviews-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 16px;
}
.reviews-modal[hidden] { display: none; }
.reviews-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.reviews-modal-content {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  max-width: 480px;
  width: 100%;
  padding: 32px 24px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}
.reviews-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--color-text-light);
  line-height: 1;
  padding: 4px 8px;
}
.reviews-modal-title {
  margin: 0 0 20px;
  font-size: 20px;
  text-align: center;
  font-weight: 500;
}
.reviews-field {
  margin-bottom: 16px;
}
.reviews-label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--color-text);
  font-weight: 600;
}
.reviews-required {
  color: var(--color-terracotta);
  font-weight: bold;
}
.reviews-field input[type="text"],
.reviews-field input[type="email"],
.reviews-field select,
.reviews-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #ffffff;
  box-sizing: border-box;
}
.reviews-field textarea {
  resize: vertical;
  min-height: 80px;
}
.reviews-field input[type="file"] {
  font-size: 13px;
}
.reviews-hint {
  font-size: 11px;
  color: var(--color-text-light);
  margin: 4px 0 0;
}
.reviews-stars-input {
  display: flex;
  gap: 2px;
}
.reviews-star-btn {
  background: transparent;
  border: none;
  font-size: 28px;
  color: #ddd;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
}
.reviews-star-btn.active { color: #f5a623; }
.reviews-submit-btn {
  width: 100%;
  background: var(--color-terracotta);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.reviews-submit-btn:hover { opacity: 0.85; }
.reviews-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.reviews-form-message {
  margin: 12px 0 0;
  font-size: 13px;
  text-align: center;
  min-height: 1.2em;
}
.reviews-form-message.error { color: #c33; }
.reviews-form-message.success { color: #2a7; }

/* --- FAQ --- */
.faq-grid-free {
  position: relative;
  min-height: 600px;
  overflow: visible;
}
.faq-grid-free .faq-label {
  position: absolute;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  z-index: 5;
}
.faq-grid-free .faq-label:active { cursor: grabbing; }
.faq-grid-free.locked .faq-label {
  cursor: default;
  touch-action: auto;
  user-select: auto;
  -webkit-user-select: auto;
}
.faq-grid-free.locked .scene-card-resize { display: none; }
.faq-grid-free .faq-label.editing [contenteditable] {
  outline: 2px solid var(--color-terracotta);
  border-radius: 4px;
  padding: 2px 4px;
}
.faq-grid-free .faq-label > .section-label,
.faq-grid-free .faq-label > .section-heading,
.faq-grid-free .faq-label > .faq-list {
  margin: 0;
}
.edit-disabled .faq-label {
  cursor: default !important;
  touch-action: auto !important;
  user-select: auto !important;
}
.edit-disabled .faq-add-btn,
.edit-disabled .faq-item-controls {
  display: none !important;
}

.faq-list {
  width: 100%;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
  position: relative;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 24px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
}

.faq-q-text {
  flex: 1;
  min-width: 0;
}

.faq-question::after {
  content: '+';
  font-size: 20px;
  color: var(--color-terracotta);
  transition: transform 0.3s;
  flex-shrink: 0;
}

.faq-item.open .faq-question::after {
  content: '−';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer-inner {
  padding: 0 0 24px;
  font-size: 14px;
  color: var(--color-text-light);
  line-height: 1.9;
  white-space: pre-wrap;
}

/* FAQ追加ボタン（編集中のみ表示） */
.faq-add-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  background: #faf7f2;
  border: 1px dashed var(--color-terracotta);
  border-radius: 6px;
  color: var(--color-terracotta);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
}
.faq-add-btn:hover {
  background: #f4ebe0;
}
.faq-add-btn[hidden] { display: none !important; }

/* 各FAQ項目の操作ボタン（▲▼×、編集中のみ） */
.faq-item-controls {
  position: absolute;
  top: 18px;
  right: 32px;
  display: inline-flex;
  gap: 4px;
  z-index: 2;
}
.faq-item-controls button {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  width: 26px;
  height: 26px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  padding: 0;
  line-height: 1;
  font-family: var(--font-body);
}
.faq-item-controls button:hover {
  background: #f7f3ee;
  color: var(--color-text);
}
.faq-item-controls .faq-del-btn:hover {
  background: #fee;
  color: #c33;
  border-color: #c99;
}
.faq-item-controls[hidden] { display: none !important; }

/* --- Footer --- */
.footer {
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 24px 40px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: 13px;
  line-height: 1.7;
}

/* ロゴ + タグラインの横並び（モバイルでは折り返し） */
.footer-brand-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.footer-brand-row .footer-logo {
  margin-bottom: 0;
}
.footer-brand-row .footer-tagline {
  margin: 0;
}

/* 屋号・営業時間・住所 */
.footer-business-info {
  margin-top: 8px;
}
.footer-business-info h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.5px;
}
.footer-business-info p {
  font-size: 13px;
  line-height: 1.7;
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-links {
  display: flex;
  gap: 40px;
}

.footer-links-group h4 {
  color: var(--color-white);
  font-size: 13px;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.footer-links-group a {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 10px;
  transition: color 0.3s;
}

.footer-links-group a:hover {
  color: var(--color-white);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 12px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .header-nav {
    display: none;
  }

  .hero-heading {
    font-size: 26px;
  }

  .hero-sub {
    font-size: 13px;
  }

  .hero-content {
    padding: 0 20px 60px;
  }

  .btn-hero {
    padding: 16px 36px;
    font-size: 14px;
  }

  .section {
    padding: 60px 20px;
  }

  .section-heading {
    font-size: 24px;
  }

  .hero-catch-heading {
    font-size: 26px;
  }

  .scenes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .scenes-grid-5 {
    min-height: 500px;
  }

  .scene-card-hero {
    width: 60%;
  }

  .scene-card-sub {
    width: 45%;
  }

  .steps-title-main {
    font-size: 28px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .kodawari-grid {
    min-height: 400px;
  }

  .kodawari-title-main {
    font-size: 30px;
  }

  .kodawari-item-title {
    font-size: 16px;
  }

  .kodawari-item-text {
    font-size: 13px;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-links {
    gap: 24px;
  }
}

/* ========== 編集モード無効化（本番環境用） ==========
   <html class="edit-disabled"> が付いた時、全セクションの編集UIを非表示にし、
   ドラッグ・リサイズ・テキスト編集も無効化する。
   ローカル開発（localhost）のみ編集モード有効、本番は ?edit=1 で復活可能。 */
.edit-disabled .layout-lock-btn,
.edit-disabled .delete-btn-x,
.edit-disabled .scene-card-resize,
.edit-disabled .edge-upload-area {
  display: none !important;
}
.edit-disabled .scene-card,
.edit-disabled .kodawari-card,
.edit-disabled .steps-card,
.edit-disabled .scene-label,
.edit-disabled .kodawari-label,
.edit-disabled .steps-label,
.edit-disabled .hero-label,
.edit-disabled .hero-media-wrap {
  cursor: default !important;
  touch-action: auto !important;
  user-select: auto !important;
}
.edit-disabled [contenteditable] {
  -webkit-user-modify: read-only !important;
  user-modify: read-only !important;
}
