/* ============================================================
   フォーム画面のモック職人ノエル — style.css
   ============================================================ */

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

:root {
  --bg:           #FDF4EA;
  --surface:      #FFFFFF;
  --surface2:     #F5EAD8;
  --border:       rgba(73,167,206,0.15);
  --border2:      rgba(73,167,206,0.30);
  --text:         #2C2C2C;
  --muted:        #7A7A7A;
  --accent:       #49A7CE;
  --accent-dark:  #3388AD;
  --accent-light: rgba(73,167,206,0.10);
  --accent-glow:  rgba(73,167,206,0.20);
  --success:      #2DA870;
  --warning:      #D48A10;
  --danger:       #D64545;
  --danger-bg:    rgba(214,69,69,0.09);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  min-height: 100vh;
  line-height: 1.7;
}

/* ── ヘッダー ── */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border2);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-link { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.logo-img { width: 38px; height: 38px; border-radius: var(--radius-sm); display: block; }
.logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.logo-text small {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
  font-family: 'Noto Sans JP', sans-serif;
  letter-spacing: 0;
}
.header-free-badge {
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
  font-family: 'Noto Sans JP', sans-serif;
}

.header-usage-count {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
  font-family: 'Noto Sans JP', sans-serif;
  white-space: nowrap;
}

.header-usage-count strong {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--accent-dark);
}

/* ── ヒーロー ── */
.hero {
  background: linear-gradient(135deg, #FDF4EA 0%, #FEF1DA 50%, #FDF4EA 100%);
  border-bottom: 2px solid rgba(73,167,206,0.15);
  overflow: hidden;
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.8rem 2rem 0;
  display: flex;
  align-items: flex-end;
  gap: 1rem;
}
.hero-text { flex: 1; padding-bottom: 2.5rem; }
.hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-lead { font-size: 0.92rem; color: var(--muted); line-height: 1.8; max-width: 560px; margin-bottom: 1.4rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hero-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  border: 1px solid var(--border2);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  color: var(--text);
  font-weight: 500;
}
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: #AAAAAA; flex-shrink: 0; display: inline-block; }
.hero-chara { flex-shrink: 0; width: 300px; height: 300px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.hero-chara img { width: 300px; height: 300px; object-fit: contain; object-position: bottom; display: block; }

/* ── ツール本体 ── */
.tool-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}
.tool-heading {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-heading::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.1em;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}
.tool-inner { display: flex; gap: 24px; align-items: flex-start; }

/* 左：プレビュー＋DL */
.tool-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.preview-area {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(73,167,206,0.07);
}
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.preview-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.undo-redo { display: flex; gap: 6px; }
.icon-btn {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 0.75rem;
  font-family: 'Outfit', sans-serif;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.icon-btn:hover:not(:disabled) { background: var(--accent-light); border-color: var(--accent); color: var(--accent-dark); }
.icon-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.preview-frame { width: 100%; height: 560px; overflow: hidden; }
#preview-iframe { width: 100%; height: 100%; border: none; background: #fff; }

.dl-panel {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  box-shadow: 0 2px 16px rgba(73,167,206,0.07);
}
.dl-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.85rem;
}
.dl-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 1rem; }
.radio-label { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; cursor: pointer; color: var(--text); }
.radio-label input[type="radio"] { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.dl-btn {
  display: block;
  width: 100%;
  padding: 0.7rem 1.25rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
}
.dl-btn:hover { background: var(--accent-dark); }

/* 右：操作パネル */
.tool-right {
  width: 360px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(73,167,206,0.07);
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 84px);
  overflow-y: auto;
}

/* タブ */
.panel-tabs {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--border);
  background: var(--surface2);
  padding: 0 4px;
}
.tab-btn {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.6rem 0.7rem;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--accent); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); background: transparent; font-weight: 600; }

.tab-panel { display: none; padding: 1.25rem 1.5rem; }
.tab-panel.active { display: block; }

.panel-section-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.panel-note { font-size: 0.72rem; color: var(--muted); margin-top: 6px; line-height: 1.6; }

/* パターングリッド */
.pattern-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 1.25rem; }
.pattern-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 5px;
  background: var(--bg);
  border: 2px solid var(--border2);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Noto Sans JP', sans-serif;
}
.pattern-btn:hover { border-color: var(--accent); background: var(--accent-light); }
.pattern-btn.active { border-color: var(--accent); background: var(--accent-light); }
.pattern-swatch { width: 32px; height: 32px; border-radius: var(--radius-sm); display: block; }
.pattern-name { font-size: 0.65rem; color: var(--text); text-align: center; line-height: 1.3; }

/* カラーグリッド */
.color-grid { display: flex; flex-direction: column; gap: 8px; }
.color-row { display: flex; align-items: center; gap: 8px; }
.color-label { font-size: 0.78rem; color: var(--text); min-width: 110px; flex-shrink: 0; }
.color-row input[type="color"] {
  width: 30px; height: 30px; padding: 2px;
  border: 1px solid var(--border2); border-radius: var(--radius-sm); cursor: pointer; background: none;
  flex-shrink: 0;
}
.color-hex {
  width: 72px; flex: none; border: 1px solid var(--border2); border-radius: var(--radius-sm);
  padding: 3px 5px; font-size: 0.72rem; font-family: 'Outfit', sans-serif;
  color: var(--text); background: var(--surface); outline: none;
}
.color-hex:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.panel-select {
  width: 100%; padding: 0.45rem 0.65rem; border: 1px solid var(--border2);
  border-radius: var(--radius-sm); font-size: 0.84rem;
  font-family: 'Noto Sans JP', sans-serif; color: var(--text); background: var(--surface); outline: none; cursor: pointer;
}
.panel-select:focus { border-color: var(--accent); }

.slider-row { display: flex; align-items: center; gap: 10px; }
.slider-row input[type="range"] { flex: 1; accent-color: var(--accent); height: 4px; }
.num-input {
  width: 52px; padding: 4px 6px; border: 1px solid var(--border2); border-radius: var(--radius-sm);
  font-size: 0.78rem; font-family: 'Outfit', sans-serif; font-weight: 600;
  text-align: center; color: var(--text); background: var(--surface); outline: none;
}
.num-input:focus { border-color: var(--accent); }
.unit-label { font-size: 0.72rem; color: var(--muted); }

.radio-group { display: flex; flex-direction: column; gap: 8px; }

/* レイアウトサムネイル */
.layout-preview-wrap { display: flex; gap: 12px; margin-top: 1rem; }
.layout-thumb {
  flex: 1; background: var(--bg); border: 1.5px solid var(--border2);
  border-radius: var(--radius-md); padding: 10px 8px 6px; display: flex; flex-direction: column; gap: 5px;
}
.layout-thumb__row { display: flex; align-items: center; gap: 5px; }
.layout-thumb__row--1col { display: block; }
.layout-thumb__label { display: block; width: 38%; height: 7px; background: var(--muted); border-radius: 3px; opacity: 0.4; flex-shrink: 0; }
.layout-thumb__label--full { width: 50%; }
.layout-thumb__input { display: block; flex: 1; height: 13px; background: var(--border2); border-radius: 3px; }
.layout-thumb__input--full { width: 100%; margin-top: 3px; }
.layout-thumb__name { font-size: 0.65rem; color: var(--muted); text-align: center; margin-top: 5px; font-family: 'Outfit', sans-serif; }

/* フィールドリスト */
.field-list { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.field-item {
  display: flex; align-items: center; gap: 7px; padding: 7px 9px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); transition: all 0.15s;
}
.field-item.dragging { opacity: 0.4; }
.field-item.drag-over { border-color: var(--accent); background: var(--accent-light); }
.drag-handle { color: var(--muted); cursor: grab; font-size: 13px; flex-shrink: 0; }
.drag-handle:active { cursor: grabbing; }
.field-toggle { display: flex; align-items: center; gap: 6px; flex: 1; cursor: pointer; }
.field-toggle input[type="checkbox"] { accent-color: var(--accent); width: 14px; height: 14px; cursor: pointer; }
.field-name { font-size: 0.8rem; color: var(--text); }
.required-toggle { display: flex; align-items: center; gap: 4px; cursor: pointer; flex-shrink: 0; }
.required-toggle input[type="checkbox"] { accent-color: var(--danger); width: 13px; height: 13px; cursor: pointer; }
.req-label { font-size: 0.68rem; color: var(--muted); }

.ph-row { display: flex; flex-direction: column; gap: 3px; margin-bottom: 0.75rem; }
.ph-label { font-size: 0.72rem; font-weight: 500; color: var(--muted); }
.ph-input {
  width: 100%; padding: 5px 8px; border: 1px solid var(--border2); border-radius: var(--radius-sm);
  font-size: 0.8rem; font-family: 'Noto Sans JP', sans-serif; color: var(--text); background: var(--surface); outline: none;
}
.ph-input:focus { border-color: var(--accent); }

/* ── コンテンツセクション ── */
.content-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
}
.section-heading {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-heading::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.2em;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}
.section-lead { color: var(--muted); font-size: 0.875rem; margin-bottom: 1.75rem; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
  transition: box-shadow 0.15s;
}
.feature-card:hover { box-shadow: 0 4px 16px rgba(73,167,206,0.10); }
.feature-icon { font-size: 1.5rem; margin-bottom: 0.6rem; }
.feature-title { font-size: 0.92rem; font-weight: 600; color: var(--text); margin-bottom: 0.4rem; }
.feature-desc { font-size: 0.83rem; color: var(--muted); line-height: 1.65; }

.usecase-list { display: flex; flex-direction: column; gap: 1rem; }
.usecase-item {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.usecase-num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700;
  font-family: 'Outfit', sans-serif;
  margin-top: 1px;
}
.usecase-body strong { display: block; font-size: 0.92rem; font-weight: 600; color: var(--text); margin-bottom: 0.3rem; }
.usecase-body p { font-size: 0.84rem; color: var(--muted); line-height: 1.65; margin: 0; }

.cost-table-wrap { overflow-x: auto; }
.cost-table { width: 100%; max-width: 480px; border-collapse: collapse; font-size: 0.9rem; }
.cost-table th, .cost-table td { padding: 0.7rem 1.1rem; text-align: left; border-bottom: 1px solid var(--border); background: var(--surface); }
.cost-table th { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 0.8rem; letter-spacing: 0.05em; color: var(--muted); background: var(--surface2); text-transform: uppercase; }
.cost-table td:nth-child(2), .cost-table td:nth-child(3) { text-align: right; }
.cost-table th:nth-child(2), .cost-table th:nth-child(3) { text-align: right; }
.cost-table-total td { font-weight: 600; color: var(--text); background: var(--accent-light); border-top: 2px solid var(--border2); border-bottom: none; }

/* ── レスポンシブ ── */
@media (max-width: 960px) {
  .tool-inner { flex-direction: column; }
  .tool-right { width: 100%; position: static; max-height: none; }
  .hero-chara { display: none; }
}
@media (max-width: 600px) {
  .hero h1 { font-size: 1.4rem; }
  .hero-inner { padding: 2rem 1.25rem 0; }
  .tool-section { padding: 1.75rem 1.25rem; }
  .content-section { padding: 2rem 1.25rem; }
  .features-grid { grid-template-columns: 1fr; }
  .pattern-grid { grid-template-columns: repeat(2, 1fr); }
  .header-usage-count { display: none; }
}
