/* Scoped styles for speech generator */
:root {
  --brand-pink: #E40265;
  --brand-pink-dark: #e00070;
}
.bl_pageTile {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px auto 30px auto;
  background: none;
}
.bl_pageTile img {
  display: block;
  width: 75%;
  max-width: 100%;
  height: auto;
}
.bl_pageTile {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px auto 30px auto;
  background: none;
}
.bl_pageTile img {
  display: block;
  width: 75%;
  max-width: 100%;
  height: auto;
}
.spg-section {
  margin: 20px 0;
}
.spg-group {
  margin: 28px 0 0 0;
}
.spg-legend {
  font-weight: 700;
  margin: 8px 0;
  color: #2e7d32;
}
.spg-options {
  display: grid;
  gap: 8px;
}
.spg-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #cdecc8;
  border-radius: 10px;
  background: #fff;
  transition: border-color .15s, background-color .15s;
}
/* Custom radio: green inner dot when checked */
.spg-option input[type=radio] {
  accent-color: #2e7d32; /* fallback for modern browsers */
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;    /* 追加 */
  min-height: 18px;   /* 追加 */
  flex-shrink: 0;     /* 追加：縮小を防止 */
  border: 2px solid #c7c7c7;
  border-radius: 50%;
  display: inline-grid;
  place-content: center;
  background: #fff;
  margin-right: 6px;
}
.spg-option input[type=radio]::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: scale(0);
  transition: transform .12s ease-in-out, background-color .12s ease-in-out;
  background-color: #2e7d32;
}
.spg-option input[type=radio]:checked::before {
  transform: scale(1);
}

.spg-option.spg-selected {
  background: var(--light-green, #F2FDE9);
  border-color: #2e7d32;
  border-width: 1px;
}
.spg-option:hover {
  border-color: #9ed58d;
}
.spg-option.spg-disabled {
  opacity: .5;
  pointer-events: none;
}
.spg-actions {
  margin: 16px 0;
  max-width: 720px;
}
.spg-btn {
  display: inline-block;
  padding: 12px 18px;
  background: var(--brand-pink);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  box-sizing: border-box;
  transition: opacity .15s ease-in-out;
}
.spg-btn:hover {
  opacity: .7;
}
.spg-actions #submitBtn,
.spg-actions #copyBtn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 20px;
  font-size: 1.5rem;
}
.spg-btn[disabled] {
  opacity: .6;
  cursor: not-allowed;
}
.spg-btn-outline {
  background: #fff;
  color: var(--brand-pink);
  border: 2px solid var(--brand-pink);
  transition: opacity .15s ease-in-out;
}
.spg-btn-outline:hover {
  opacity: .7;
}
.spg-result {
  margin: 24px 0;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}
.spg-result h2 {
  margin-top: 0;
}
.spg-pr {
  margin: 24px 0;
  border: 1px solid #8cd67b;
  border-radius: 10px;
  padding: 16px;
  background: #f7fff4;
}
.spg-pr-title {
  color: #2e7d32;
  margin: 0 0 6px;
  font-weight: 700;
}
.spg-pr-links {
  color: var(--brand-pink);
  font-weight: 700;
}
.spg-pr-links a {
  color: var(--brand-pink);
  text-decoration: none;
}
.spg-pr-links a:hover {
  text-decoration: underline;
}
.spg-muted {
  color: #666;
  font-size: .92rem;
}
.spg-row {
  margin: 8px 0;
}
.spg-text {
  width: 100%;
  max-width: 720px;
  padding: 10px;
  border: 1px solid #cdecc8;
  border-radius: 6px;
}
.spg-text:focus {
  outline: none;
  border-color: #2e7d32;
  box-shadow: 0 0 0 3px rgba(46,125,50,.12);
}
.spg-faq {
  margin: 28px 0;
}
.spg-faq > h2 {
  color: #2e7d32;
  border-bottom: 2px solid #2e7d32;
  padding-bottom: 6px;
}
.spg-faq-q {
  color: #2e7d32;
  font-weight: 700;
  margin-right: 6px;
}
.spg-faq-a {
  font-weight: 700;
  margin-right: 6px;
}
.spg-faq-item {
  border-bottom: 1px solid #d6d5d5;
  padding: 10px 14px;
  background: #fff;
  margin: 12px 0;
}
.spg-faq-item summary {
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  width: 100%;
  position: relative;
  padding-right: 34px;
}
.spg-faq-item summary::after {
  content: "+";
  color: #2e7d32;
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1;
  position: absolute;
  right: 0;
  top: 0;
}
.spg-faq-item[open] summary::after {
  content: "−";
  font-size: 2.5rem;
}
.spg-faq-item[open] {
  background: #fff;
}
.spg-faq-answer {
  margin-top: 16px;
  line-height: 1.7;
  color: #333;
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
}

/* Progress overlay + spinner */
.spg-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.spg-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.spg-spinner img {
  width: 64px;
  height: 64px;
  animation: spg-spin 1.1s linear infinite;
}
.spg-spinner-text {
  color: #333;
  font-size: 15px;
}
@keyframes spg-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
