/* ============================================================
   テスト用ダミーPDF作成おちくん — 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);
}
.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.15rem;
  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;
}

/* ── ヒーロー ── */
.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;
}

/* ── エディタカード ── */
.editor-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  box-shadow: 0 2px 16px rgba(73,167,206,0.07);
}

.editor-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}

/* ── プレビューパネル（左） ── */
.preview-panel { display: flex; flex-direction: column; gap: 0.9rem; }

.preview-canvas-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: repeating-conic-gradient(#e8e0d5 0% 25%, #f5ead8 0% 50%) 0 0 / 20px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 390px;
}

#preview {
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
  max-width: 100%;
  max-height: 780px;
  display: block;
}

/* ── 表示する文字オーバーレイ ── */
.vis-overlay {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vis-overlay-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-size: 0.72rem;
  color: var(--text);
  background: rgba(255,255,255,0.88);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.12s;
}
.vis-overlay-item:hover { background: rgba(255,255,255,0.98); }
.vis-overlay-item input[type="checkbox"] { accent-color: var(--accent); width: 13px; height: 13px; cursor: pointer; flex-shrink: 0; }

/* ── プレビュー情報バー ── */
.preview-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0.5rem 0.75rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.preview-info-text {
  font-family: 'Outfit', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}
.btn-dl-sm {
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  flex-shrink: 0;
}
.btn-dl-sm:hover { background: var(--accent-dark); }

/* ── ファイル名入力 ── */
.filename-ext {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.88rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── メインDLボタン ── */
.btn-dl-main {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: 0.02em;
}
.btn-dl-main:hover { background: var(--accent-dark); }
.btn-dl-main:active { transform: scale(0.98); }

/* ── コントロールパネル（右） ── */
.controls-panel { display: flex; flex-direction: column; gap: 0.75rem; }

.ctrl-group {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
}
.ctrl-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  display: block;
}
.ctrl-hint {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.5;
}

/* ── サイズタブ ── */
.size-selector-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 0.6rem;
}
.size-tab {
  flex: 1;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 0.4rem;
  cursor: pointer;
  background: var(--surface);
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  transition: all 0.15s;
}
.size-tab:hover { border-color: var(--accent); color: var(--accent); }
.size-tab.active { border-color: var(--accent); background: var(--accent); color: #fff; }

/* ── サイズグリッド ── */
.size-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 0.5rem;
}
.size-btn {
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 0.45rem 4px;
  cursor: pointer;
  background: var(--surface);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  transition: all 0.15s;
}
.size-btn:hover { border-color: var(--accent); color: var(--accent); }
.size-btn.active { border-color: var(--accent); background: var(--accent); color: #fff; }

/* ── 縦横切り替え ── */
.orientation-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-top: 8px;
  margin-bottom: 2px;
}
.orient-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 0.45rem 4px;
  cursor: pointer;
  background: var(--surface);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
  transition: all 0.15s;
}
.orient-btn:hover { border-color: var(--accent); color: var(--accent); }
.orient-btn.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.orient-icon { font-size: 1rem; line-height: 1; }

.size-mm-hint {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
}

/* range-row */
.range-row { display: flex; align-items: center; gap: 8px; }
.range-row input[type="range"] { flex: 1; accent-color: var(--accent); height: 4px; }
.range-num {
  width: 62px;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.4rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
}
.range-num::-webkit-inner-spin-button,
.range-num::-webkit-outer-spin-button { opacity: 0.4; }
.range-num:focus { border-color: var(--accent); }
.range-unit { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }

/* テキスト入力 */
.text-field-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.text-field-label { font-size: 0.75rem; color: var(--muted); min-width: 48px; flex-shrink: 0; }
.text-input {
  flex: 1;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.6rem;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.88rem;
  color: var(--text);
  background: var(--surface);
  outline: none;
}
.text-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

/* カラーピッカー */
.color-pick-row { display: flex; align-items: center; gap: 8px; flex: 1; }
.color-pick-input {
  width: 40px;
  height: 32px;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 2px;
  cursor: pointer;
  background: var(--surface);
  flex-shrink: 0;
}
.color-pick-val {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ── フォントアコーディオン ── */
.font-accordion {
  margin-top: 8px;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.font-accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: var(--surface);
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}
.font-accordion-trigger:hover { background: var(--accent-light); }
.font-accordion-label { font-size: 0.7rem; color: var(--muted); flex-shrink: 0; }
.font-accordion-current {
  flex: 1;
  font-family: 'Outfit', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.font-accordion-arrow { font-size: 0.6rem; color: var(--muted); flex-shrink: 0; transition: transform 0.2s; }
.font-accordion-trigger[aria-expanded="true"] .font-accordion-arrow { transform: rotate(180deg); }
.font-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.font-accordion-body.open {
  max-height: 240px;
  border-top: 1px solid var(--border);
}
.font-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 6px;
  background: var(--bg);
  max-height: 234px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}
.font-opt {
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.12s;
  background: var(--surface);
}
.font-opt:hover { background: var(--accent-light); border-color: var(--border2); }
.font-opt.active { background: var(--accent-light); border-color: var(--accent); }
.font-opt-name { font-size: 0.65rem; color: var(--muted); margin-bottom: 2px; line-height: 1.2; }
.font-opt-preview { font-size: 0.84rem; color: var(--text); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── コンテンツセクション ── */
.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: 860px) {
  .editor-grid { grid-template-columns: 1fr; }
  .controls-panel { order: -1; }
}
@media (max-width: 600px) {
  .hero h1 { font-size: 1.4rem; }
  .hero-chara { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .size-grid { grid-template-columns: repeat(4, 1fr); }
  .editor-card { padding: 1.25rem 1rem; }
  .tool-section { padding: 1.5rem 1rem; }
}
