/* カラーピッカーとラベルを縦 → 横に揃える */
.controls {
  display: flex;
  justify-content: center;
  gap: 2em;
  margin: 1.5em 0;
  flex-wrap: wrap;
}

.controls label {
  display: flex;
  flex-direction: column;  /* ← 縦組み（テキストの下にピッカー） */
  align-items: center;
  font-size: 1em;
}


/* Canvas 調整：左右20pxの余白を確保しつつ中央 */
#logoCanvas {
  display: block;
  margin: 0 auto;
  width: calc(100% - 40px); /* 左右に20pxずつ余白 */
  max-width: 500px;
  height: auto;
  background: white;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

/* ボタン共通スタイル */
button#downloadBtn,
button#backBtn {
  display: block;
  margin: 0.6em auto;
  padding: 12px 20px;
  background-color: #2196f3;
  color: white;
  font-size: 1rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  width: 80%;
  max-width: 300px;
  transition: background-color 0.3s;
}

button#downloadBtn:hover,
button#backBtn:hover {
  background-color: #1976d2;
}

/* AdSense風エリア */
.adsense {
  margin: 2em 0;
  padding: 1em;
  background-color: #ddd;
  text-align: center;
  font-size: 0.9em;
}

/* スマホでも横並びにする（縦並びをやめる） */
@media (max-width: 600px) {
  .controls {
    flex-direction: row;     /* ← column → row に変更 */
    justify-content: center;
    flex-wrap: wrap;         /* 狭い場合は折り返し */
    gap: 1.5em;              /* カラーピッカー間の間隔 */
  }
}

  button#downloadBtn,
  button#backBtn {
    width: 90%;
  }
}


/* アフィリエイト広告 */
.affiliate-box {
  display: flex;
  flex-direction: column; /* 縦に積む */
  align-items: center;    /* 水平方向中央揃え */
  text-align: center;     /* テキスト中央揃え */
  margin: 20px auto;
  padding: 10px;
  width: 100%;            /* 親要素幅をフルに */
}

.affiliate-text, .pr-label {
  width: 100%;            /* 干渉を防ぐ */
  text-align: center;     /* 確実に中央揃え */
  margin: 5px 0;
}

.affiliate-banner-wrapper {
  display: flex;
  justify-content: center; /* バナー画像を中央に */
  width: 100%;
  margin: 10px 0;
}

.affiliate-banner-wrapper a img {
  max-width: 250px;
  height: auto;
}

#backToLetterWrap {
  text-align: center;
}

#backToLetterLink {
  display: inline-block;
  padding: 10px 18px;
  background: #2196f3;
  color: white;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
}

#backToLetterLink:hover {
  background: #1976d2;
}

#logo-description {
  text-align: center;
  margin: 16px 0;
  line-height: 1.6;
  color: #555;
  font-size: 0.95rem;
}

#seoImage {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

#logo-caption {
  text-align: center;
  margin-top: 8px;
  font-size: 0.95rem;
  color: #555;
}

.button-primary {
  display: block;
  margin: 1em auto;
  padding: 12px 20px;
  background-color: #2196f3;
  color: #fff;
  font-size: 1rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  width: 80%;
  max-width: 300px;
  transition: background-color 0.3s;
}

.button-primary:hover {
  background-color: #1976d2;
}