/*
Theme Name: SWELL Child
Template: swell
*/

/* =====================================================
   診断ツール フォーム
   ===================================================== */

.akiya-container {
  max-width: 720px;
  margin: 40px auto;
  padding: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  line-height: 1.7;
}

.akiya-intro h2 {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 12px;
  color: #1a1a1a;
}

.akiya-intro p {
  font-size: 16px;
  color: #444;
  margin-bottom: 16px;
}

.akiya-features {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.akiya-features li {
  background: #e8f4fd;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  color: #1565c0;
}

/* フォーム */
.akiya-form {
  background: #f9f9f9;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
}

.akiya-q-block {
  margin-bottom: 20px;
}

.akiya-q-label {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
  color: #1a1a1a;
}

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

.akiya-radio-group label {
  padding: 12px 16px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
}

.akiya-radio-group label:hover {
  border-color: #1565c0;
  background: #f0f8ff;
}

.akiya-form input[type="text"],
.akiya-form select {
  width: 100%;
  padding: 12px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  font-size: 16px;
  background: white;
}

.akiya-autocomplete {
  position: absolute;
  z-index: 10;
  background: white;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  max-height: 300px;
  overflow-y: auto;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.akiya-autocomplete .suggestion-item {
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

.akiya-autocomplete .suggestion-item:hover {
  background: #f0f8ff;
}

.akiya-blocked-message {
  background: #fff3cd;
  padding: 16px;
  border-radius: 8px;
  border-left: 4px solid #ff9800;
  color: #5d4037;
}

.akiya-privacy-block {
  margin: 24px 0;
  padding: 16px;
  background: #f0f0f0;
  border-radius: 8px;
}

.akiya-privacy-block label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.akiya-submit-block {
  text-align: center;
  margin-top: 24px;
}

.akiya-submit-button {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  color: white;
  border: none;
  padding: 16px 40px;
  font-size: 18px;
  font-weight: bold;
  border-radius: 30px;
  cursor: pointer;
  width: 100%;
  max-width: 360px;
  transition: transform 0.1s;
  box-shadow: 0 4px 12px rgba(21,101,192,0.3);
}

.akiya-submit-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(21,101,192,0.4);
}

.akiya-submit-button:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.akiya-submit-note {
  margin-top: 12px;
  font-size: 12px;
  color: #666;
}

/* =====================================================
   診断結果エリア
   ===================================================== */

.akiya-result {
  margin: 32px 0;
}

.akiya-loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.akiya-loading::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid #1565c0;
  border-top-color: transparent;
  border-radius: 50%;
  margin-left: 8px;
  animation: akiya-spin 0.8s linear infinite;
  vertical-align: middle;
}

@keyframes akiya-spin {
  to { transform: rotate(360deg); }
}

.akiya-error {
  background: #ffebee;
  border-left: 4px solid #c62828;
  padding: 16px;
  border-radius: 8px;
  color: #c62828;
}

.akiya-result h1,
.akiya-result h2,
.akiya-result h3 {
  color: #1a1a1a;
  margin-top: 28px;
  margin-bottom: 12px;
}

.akiya-result table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

.akiya-result th,
.akiya-result td {
  padding: 10px;
  border: 1px solid #e0e0e0;
  text-align: left;
}

.akiya-result th {
  background: #f5f5f5;
  font-weight: bold;
}

/* =====================================================
   診断後の固定訴求セクション
   ===================================================== */

.akiya-post-result {
  margin: 60px auto;
  max-width: 720px;
  padding: 0 24px;
}

.akiya-divider {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, #1565c0, transparent);
  margin: 60px 0;
}

.akiya-section {
  margin-bottom: 48px;
}

.akiya-section h3 {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 16px;
  color: #1a1a1a;
  border-left: 4px solid #1565c0;
  padding-left: 12px;
}

.akiya-section-bridge {
  background: #fff8e1;
  padding: 24px;
  border-radius: 12px;
}

.akiya-emphasis {
  font-size: 18px;
  margin-top: 16px;
  color: #1565c0;
}

/* 事例カード */
.akiya-section-cases {
  background: #f5f5f5;
  padding: 24px;
  border-radius: 12px;
}

.akiya-section-lead {
  font-size: 13px;
  color: #666;
  margin-bottom: 20px;
}

.akiya-case-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.akiya-case {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.akiya-case-title {
  font-weight: bold;
  margin-bottom: 12px;
  color: #1a1a1a;
}

.akiya-case-comparison {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.akiya-case-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 6px;
}

.akiya-case-general {
  background: #f5f5f5;
  color: #757575;
}

.akiya-case-pro {
  background: #e3f2fd;
  color: #1565c0;
}

.akiya-case-pro strong {
  font-size: 18px;
}

.akiya-case-diff {
  margin-top: 12px;
  padding: 10px;
  background: #fff8e1;
  text-align: center;
  font-weight: bold;
  color: #ef6c00;
  border-radius: 6px;
}

/* タウンライフ実績 */
.akiya-section-townlife {
  background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
  color: white;
  padding: 32px 24px;
  border-radius: 12px;
}

.akiya-section-townlife h3 {
  color: white;
  border-color: white;
}

.akiya-townlife-pitch {
  font-size: 18px;
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.8;
}

.akiya-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.akiya-stat {
  text-align: center;
  padding: 16px 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
}

.akiya-stat-num {
  font-size: 32px;
  font-weight: bold;
  line-height: 1.2;
}

.akiya-stat-unit {
  font-size: 14px;
  font-weight: normal;
}

.akiya-stat-label {
  font-size: 12px;
  margin-top: 4px;
}

.akiya-stats-note {
  font-size: 12px;
  text-align: center;
  margin-top: 16px;
  opacity: 0.8;
}

/* 安心ポイント */
.akiya-trust-list {
  list-style: none;
  padding: 0;
}

.akiya-trust-list li {
  padding: 16px;
  margin-bottom: 12px;
  background: #e8f5e9;
  border-radius: 8px;
  border-left: 4px solid #43a047;
}

.akiya-trust-list strong {
  color: #1b5e20;
}

/* 特典冊子 */
.akiya-bonus-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.akiya-bonus {
  background: #fff3e0;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  border: 2px solid #ff9800;
}

.akiya-bonus-title {
  background: #ff9800;
  color: white;
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 12px;
}

.akiya-bonus-name {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #1a1a1a;
}

.akiya-bonus-desc {
  font-size: 13px;
  color: #555;
  margin: 0;
}

.akiya-bonus-note {
  font-size: 12px;
  color: #888;
  text-align: right;
  margin-top: 8px;
}

/* CTA */
.akiya-section-cta {
  text-align: center;
}

.akiya-cta-box {
  background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
  padding: 40px 24px;
  border-radius: 16px;
  color: white;
}

.akiya-cta-headline {
  font-size: 20px;
  font-weight: bold;
  line-height: 1.6;
  margin-bottom: 24px;
}

.akiya-cta-button {
  display: inline-block;
  background: white;
  color: #2e7d32;
  font-size: 18px;
  font-weight: bold;
  padding: 18px 32px;
  border-radius: 30px;
  text-decoration: none;
  transition: transform 0.1s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.akiya-cta-button:hover {
  transform: translateY(-2px);
  text-decoration: none;
  color: #1b5e20;
}

.akiya-cta-arrow {
  margin-left: 8px;
}

.akiya-cta-sub {
  margin-top: 16px;
  font-size: 13px;
  opacity: 0.95;
}

/* フッター */
.akiya-footer {
  margin-top: 48px;
  padding: 24px;
  background: #fafafa;
  border-radius: 8px;
  text-align: center;
  font-size: 12px;
  color: #666;
}

.akiya-footer-pr {
  font-weight: bold;
  margin-bottom: 4px;
}

.akiya-footer-operator {
  margin-bottom: 16px;
}

.akiya-footer-source {
  margin-top: 16px;
  text-align: left;
  font-size: 11px;
  color: #888;
}

.akiya-footer-disclaimer {
  margin-top: 12px;
  text-align: left;
  font-size: 11px;
  color: #888;
}

/* =====================================================
   レスポンシブ
   ===================================================== */
@media (max-width: 600px) {
  .akiya-container {
    padding: 16px;
    margin: 16px auto;
  }

  .akiya-intro h2 {
    font-size: 20px;
  }

  .akiya-stats-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .akiya-stat-num {
    font-size: 28px;
  }

  .akiya-bonus-grid {
    grid-template-columns: 1fr;
  }

  .akiya-cta-headline {
    font-size: 18px;
  }
}

/* =====================================================
   v3.1: ローディング進捗表示
   ===================================================== */
.akiya-loading {
  text-align: center;
  padding: 32px 16px;
  background: #f8f9fb;
  border-radius: 12px;
  margin: 24px 0;
}
.akiya-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top-color: #2c5cf5;
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: akiya-spin 0.8s linear infinite;
}
@keyframes akiya-spin {
  to { transform: rotate(360deg); }
}
.akiya-loading-text {
  font-size: 16px;
  font-weight: bold;
  color: #1a1a1a;
  margin-bottom: 16px;
}
.akiya-loading-steps {
  list-style: none;
  padding: 0;
  margin: 16px auto;
  max-width: 360px;
  text-align: left;
}
.akiya-loading-steps li {
  padding: 8px 12px;
  margin: 6px 0;
  border-radius: 8px;
  font-size: 14px;
  color: #999;
  background: #fff;
  transition: all 0.3s;
}
.akiya-loading-steps li.active {
  color: #2c5cf5;
  font-weight: bold;
  background: #eef2ff;
}
.akiya-loading-steps li.done {
  color: #10b981;
  background: #ecfdf5;
  text-decoration: none;
}
.akiya-loading-steps li.done::before {
  content: "✓ ";
  color: #10b981;
  font-weight: bold;
}
.akiya-loading-note {
  font-size: 12px;
  color: #888;
  margin-top: 12px;
}

/* 診断結果のMarkdownレンダリング */
.akiya-result-content h1,
.akiya-result-content h2,
.akiya-result-content h3 {
  color: #1a1a1a;
  margin: 20px 0 10px;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}
.akiya-result-content h1 { font-size: 24px; }
.akiya-result-content h2 { font-size: 20px; border-bottom: 2px solid #e5e7eb !important; padding-bottom: 6px !important; }
.akiya-result-content h3 { font-size: 16px; }
.akiya-result-content p {
  margin: 8px 0;
  line-height: 1.7;
}
.akiya-result-content ul, .akiya-result-content ol {
  margin: 8px 0 16px 20px;
}
.akiya-result-content li {
  margin: 4px 0;
}
.akiya-result-content blockquote {
  border-left: 4px solid #cbd5e1;
  background: #f8fafc;
  padding: 12px 16px;
  margin: 12px 0;
  color: #475569;
  font-size: 14px;
}
.akiya-result-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}
.akiya-result-content th, .akiya-result-content td {
  border: 1px solid #e5e7eb;
  padding: 8px 12px;
  text-align: left;
}
.akiya-result-content th {
  background: #f1f5f9;
  font-weight: bold;
}
.akiya-result-content strong {
  color: #1a1a1a;
  font-weight: bold;
}
.akiya-result-content hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 20px 0;
}

/* Swell側で作成する診断後セクションは初期非表示 */
#akiya-result-section { display: none; }
