@charset "UTF-8";
/* コンポジットメーカー（standaloneテンプレ専用・テーマ共通CSSに依存しない） */

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

body {
  font-size: clamp(0px, calc(100vw / 80), 16px);
  font-family: 'Google Sans', 'Noto Sans JP', sans-serif;
  color: #1A1A1A;
  line-height: 1.6;
  background: #f4f2ee;
}
@media (max-width: 769px) {
  body { font-size: clamp(0px, calc(100vw / 25), 14px); }
}

img { max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }

/* ---------- ヘッダー ---------- */
.cm-header {
  background: #fff;
  border-bottom: 0.0625em solid #e5e1d8;
}
.cm-header__inner {
  width: min(92%, 80em);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1em;
  padding: 0.75em 0;
}
.cm-header__logo img { width: 8.5em; height: auto; display: block; }
.cm-header__title {
  font-size: 1em;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.cm-header__nav { margin-left: auto; display: flex; gap: 1.25em; }
.cm-header__nav a {
  color: #6b6455;
  text-decoration: none;
  font-size: 0.8125em;
}
.cm-header__nav a:hover { color: #1A1A1A; text-decoration: underline; }
@media (max-width: 769px) {
  .cm-header__title { display: none; }
}

/* ---------- レイアウト ---------- */
.cm-app {
  width: min(92%, 80em);
  margin: 1.25em auto 3em;
  display: grid;
  grid-template-columns: 1fr 24em;
  gap: 1.5em;
  align-items: start;
}
@media (max-width: 769px) {
  .cm-app { grid-template-columns: 1fr; }
}

.cm-lead {
  width: min(92%, 80em);
  margin: 1.5em auto 0;
}
.cm-lead h1 { font-size: 1.375em; letter-spacing: 0.04em; }
.cm-lead p { font-size: 0.8125em; color: #6b6455; margin-top: 0.25em; }

/* ---------- プレビュー ---------- */
.cm-preview {
  background: #fff;
  border: 0.0625em solid #e5e1d8;
  border-radius: 0.375em;
  padding: 1em;
  position: sticky;
  top: 1em;
}
@media (max-width: 769px) {
  .cm-preview { position: static; padding: 0.5em; }
}
.cm-preview canvas {
  width: 100%;
  display: block;
  box-shadow: 0 0.125em 0.75em rgba(0, 0, 0, 0.12);
  touch-action: none;
  cursor: pointer;
}
.cm-preview__hint {
  font-size: 0.75em;
  color: #8a8272;
  margin-top: 0.75em;
  text-align: center;
}

/* ---------- コントロールパネル ---------- */
.cm-panel { display: flex; flex-direction: column; gap: 1em; }

.cm-section {
  background: #fff;
  border: 0.0625em solid #e5e1d8;
  border-radius: 0.375em;
  padding: 1em 1.125em 1.125em;
}
.cm-section > h2 {
  font-size: 0.8125em;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #6b6455;
  margin-bottom: 0.75em;
  padding-bottom: 0.5em;
  border-bottom: 0.0625em solid #efece6;
}

/* テンプレート選択 */
#cm-templates {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5em;
}
.cm-tpl {
  border: 0.125em solid #e5e1d8;
  border-radius: 0.25em;
  background: #fafaf8;
  padding: 0.5em 0.25em 0.375em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25em;
}
.cm-tpl canvas { width: 3.5em; height: auto; }
.cm-tpl span { font-size: 0.625em; color: #6b6455; line-height: 1.3; }
.cm-tpl.is-active { border-color: #b5985a; background: #fbf7ef; }
.cm-tpl.is-active span { color: #1A1A1A; font-weight: 700; }

/* 写真リスト */
.cm-photo-row {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.375em 0.375em;
  border-radius: 0.25em;
}
.cm-photo-row.is-active { background: #fbf7ef; }
.cm-photo-row__label { font-size: 0.8125em; font-weight: 500; }
.cm-photo-row__status { font-size: 0.6875em; color: #8a8272; margin-right: auto; }
.cm-btn {
  border: 0.0625em solid #b5985a;
  background: #b5985a;
  color: #fff;
  border-radius: 0.25em;
  padding: 0.5em 1.25em;
  font-weight: 500;
}
.cm-btn:hover { opacity: 0.85; }
.cm-btn--small { padding: 0.25em 0.75em; font-size: 0.75em; }
.cm-btn--ghost { background: transparent; color: #8a8272; border-color: #d8d4cc; }
.cm-zoom {
  display: flex;
  align-items: center;
  gap: 0.625em;
  margin-top: 0.625em;
  font-size: 0.75em;
  color: #6b6455;
}
.cm-zoom input { flex: 1; }
.cm-zoom.is-disabled { opacity: 0.4; }

/* フォーム */
.cm-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0.625em; }
.cm-form .is-wide { grid-column: 1 / -1; }
.cm-form label {
  display: block;
  font-size: 0.6875em;
  font-weight: 500;
  color: #6b6455;
  margin-bottom: 0.25em;
}
.cm-form input, .cm-form textarea {
  width: 100%;
  border: 0.0625em solid #d8d4cc;
  border-radius: 0.25em;
  padding: 0.5em 0.625em;
  font-size: 0.8125em;
  background: #fff;
}
.cm-form input:focus, .cm-form textarea:focus {
  outline: 0.125em solid #b5985a;
  outline-offset: -0.0625em;
}
.cm-form textarea { resize: vertical; min-height: 4.5em; }

/* デザイン */
.cm-design-row {
  display: flex;
  align-items: center;
  gap: 0.75em;
  margin-bottom: 0.625em;
  font-size: 0.75em;
  color: #6b6455;
  flex-wrap: wrap;
}
.cm-design-row:last-child { margin-bottom: 0; }
.cm-swatch {
  width: 2em;
  height: 2em;
  border-radius: 50%;
  border: 0.125em solid #d8d4cc;
  font-size: 0.875em;
  font-weight: 700;
}
.cm-swatch.is-active { border-color: #b5985a; box-shadow: 0 0 0 0.125em rgba(181, 152, 90, 0.35); }
.cm-color {
  display: flex;
  align-items: center;
  gap: 0.25em;
}
.cm-color input[type='color'] {
  width: 2em;
  height: 1.5em;
  border: 0.0625em solid #d8d4cc;
  border-radius: 0.25em;
  padding: 0.0625em;
  background: #fff;
  cursor: pointer;
}
.cm-font-choice { display: flex; gap: 1em; }
.cm-font-choice label { display: flex; align-items: center; gap: 0.375em; cursor: pointer; }

/* 書き出し */
.cm-export { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5em; }
.cm-export .cm-btn { width: 100%; padding: 0.75em 0; }
.cm-note {
  font-size: 0.6875em;
  color: #8a8272;
  margin-top: 0.75em;
  line-height: 1.7;
}
.cm-note strong { color: #6b6455; }

/* ---------- フッター ---------- */
.cm-footer {
  background: #fff;
  border-top: 0.0625em solid #e5e1d8;
  padding: 1.5em 0 2em;
}
.cm-footer__inner {
  width: min(92%, 80em);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  flex-wrap: wrap;
}
.cm-footer nav { display: flex; gap: 1.25em; flex-wrap: wrap; }
.cm-footer a { color: #6b6455; font-size: 0.75em; text-decoration: none; }
.cm-footer a:hover { text-decoration: underline; }
.cm-footer__copy { font-size: 0.6875em; color: #8a8272; }
