/* smartphone-check 専用の薄いレイアウト調整。ベース色・フォントは ../assets/style.css を利用。 */

:root {
  --sc-max-width: 720px;
}

/* フォント統一: 既存プロジェクトのフォント設定を継承 */
.sc-step {
  font-family: var(--font-jp), sans-serif;
  letter-spacing: 0.03em;
  line-height: 1.8;
}

.sc-lead {
  font-family: var(--font-subtitle), sans-serif;
  letter-spacing: 0.03em;
  line-height: 1.9;
}

.sc-question {
  font-family: var(--font-subtitle), sans-serif;
  letter-spacing: 0.03em;
  line-height: 1.9;
}

.sc-choices {
  font-family: var(--font-jp), sans-serif;
  letter-spacing: 0.03em;
  line-height: 1.8;
}

.result-card p,
.advice-card-content {
  font-family: var(--font-subtitle), sans-serif;
  letter-spacing: 0.03em;
  line-height: 1.9;
}

.result-card h2,
.advice-card-title {
  font-family: var(--font-subtitle), sans-serif;
  font-weight: 600;
  letter-spacing: 0.03em;
}

body.sc-page {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background-color: #faf8f3;
  background-image:
    radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    radial-gradient(rgba(0, 0, 0, 0.02) 2px, transparent 2px),
    radial-gradient(rgba(0, 0, 0, 0.015) 3px, transparent 3px);
  background-repeat: repeat;
  background-size: 3px 3px, 8px 8px, 20px 20px;
  background-position: center top;
  background-attachment: scroll;
  color: var(--text-color, #0f1e2f);
  padding: 20px 0;
}

/* 結果ページとアドバイスページは既に上部揃え */

/* 結果ページのタイトルを中央寄せ */
body.sc-page.sc-result-page .sc-header .sc-title {
  text-align: center;
}

/* final.htmlのタイトルを中央寄せ */
.advice-page .sc-title.final-title {
  text-align: center;
}

/* final.htmlのサポート案内文 */
.final-support-info {
  margin-top: 24px;
  margin-bottom: 16px;
  text-align: center;
}

.final-support-info p {
  font-size: 12px;
  color: #666;
  margin: 0;
  font-family: var(--font-subtitle), sans-serif;
  letter-spacing: 0.03em;
  line-height: 1.8;
}

.final-support-info a {
  color: #666;
  text-decoration: underline;
}

.final-support-info a:hover {
  color: #4a5568;
}

/* ベースCSSで main が初期透明のため上書き */
body.sc-page main {
  opacity: 1 !important;
  transition: none !important;
}

.sc-container {
  width: min(90vw, var(--sc-max-width));
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(4px);
  margin: 0 auto;
}

/* 質問ページとインデックスページのコンテナは白地 */
body.sc-page[data-question-id] .sc-container,
body.sc-page.sc-cover .sc-container {
  background: #ffffff !important;
}

.sc-header {
  text-align: left;
  margin-bottom: 24px;
}

/* インデックスページのタイトルのみ中央寄せ */
body.sc-page.sc-cover .sc-header .sc-title {
  text-align: center;
}

/* 進捗バー */
.sc-progress-container {
  width: 100%;
  height: 4px;
  background-color: #e8e8e8;
  border-radius: 2px;
  margin-bottom: 20px;
  overflow: hidden;
}

.sc-progress-bar {
  height: 4px;
  background: #a8d4c1;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.sc-step {
  font-size: 15px;
  font-weight: 500;
  color: #6a6a6a;
  margin-bottom: 8px;
  text-align: left;
}

/* 質問番号「Q1/7」だけフォントサイズを大きくする */
body[data-question-id] .sc-step {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
}

@media (min-width: 768px) {
  .sc-step {
    font-size: 16px;
  }
  
  body[data-question-id] .sc-step {
    font-size: 18px;
  }
}

.sc-title {
  font-size: clamp(22px, 4vw, 28px);
  margin: 0 0 12px;
  font-family: var(--font-subtitle), sans-serif !important;
  letter-spacing: 0.03em !important;
  font-weight: 600 !important;
  color: var(--color-text-main) !important;
}

.sc-lead {
  font-size: 1.1rem;
  color: #4a5568;
  margin: 0;
}

@media (min-width: 768px) {
  .sc-lead {
    font-size: 1.15rem;
  }
}

.sc-question {
  font-size: 1.1rem;
  color: #4a5568;
  margin: 0 0 20px;
  text-align: left;
}

@media (min-width: 768px) {
  .sc-question {
    font-size: 1.15rem;
  }
}

/* 質問ページの縦並びレイアウト */
.sc-question-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 24px;
}

.sc-question-content {
  width: 100%;
}

.sc-question-illustration {
  width: 100%;
  text-align: center;
  margin-top: 24px;
  z-index: 1;
}

.sc-question-illustration img {
  width: 100px;
  height: auto;
  display: inline-block;
  opacity: 0.95;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

/* Q2, Q5のイラストを少し大きく */
body[data-question-id="2"] .sc-question-illustration img,
body[data-question-id="5"] .sc-question-illustration img {
  width: 120px;
}

/* Q6のイラストをもう少し大きく */
body[data-question-id="6"] .sc-question-illustration img {
  width: 140px;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .sc-question-illustration img {
    width: 90px;
  }
  
  body[data-question-id="2"] .sc-question-illustration img,
  body[data-question-id="5"] .sc-question-illustration img {
    width: 110px;
  }
  
  body[data-question-id="6"] .sc-question-illustration img {
    width: 130px;
  }
}

@media (max-width: 480px) {
  .sc-question-illustration img {
    width: 90px;
  }
  
  body[data-question-id="2"] .sc-question-illustration img,
  body[data-question-id="5"] .sc-question-illustration img {
    width: 105px;
  }
  
  body[data-question-id="6"] .sc-question-illustration img {
    width: 120px;
  }
}

/* index.html用の縦並びレイアウト */
.sc-cover-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 24px;
}

.sc-cover-content {
  width: 100%;
}

.sc-cover-illustration {
  width: 100%;
  text-align: center;
  margin-top: 100px;
  z-index: 1;
}

.sc-cover-illustration img {
  width: 140px;
  height: auto;
  display: inline-block;
  opacity: 0.95;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

/* レスポンシブ */
@media (max-width: 768px) {
  .sc-cover-illustration img {
    width: 120px;
  }
}

@media (max-width: 480px) {
  .sc-cover-illustration img {
    width: 110px;
  }
}

/* result.html用のレイアウト */
.sc-result-wrapper {
  margin-top: 24px;
}

.sc-result-content {
  width: 100%;
}

.sc-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.sc-actions .btn-primary {
  text-decoration: none;
  display: inline-block;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-sizing: border-box;
}

.sc-choices {
  display: grid;
  gap: 0;
  margin-top: 8px;
}

.sc-choices .btn-choice {
  width: 90%;
  justify-self: flex-start;
  margin-bottom: 16px;
}

.btn-primary,
.btn-choice {
  background: #c8e2d1;
  color: #1b2d2b;
  border: none;
  border-radius: 9999px;
  padding: 14px 24px;
  font-size: 16px;
  font-family: var(--font-subtitle), sans-serif;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-primary:hover,
.btn-choice:hover {
  background: #b7d8c4;
  transform: translateY(-2px);
}

/* 戻るボタン */
.btn-back {
  background: transparent;
  color: #6a6a6a;
  border: 1px solid #d0d0d0;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
  font-family: var(--font-jp), sans-serif;
  font-weight: 400;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
  width: auto;
  align-self: flex-start;
}

.btn-back:hover {
  background: rgba(152, 185, 168, 0.1);
  border-color: #98b9a8;
  color: #4a5568;
}

.btn-back:active {
  transform: translateY(0);
}

.btn-primary:active,
.btn-choice:active {
  transform: translateY(0);
  opacity: 0.9;
}

.result-card {
  background: #ffffff !important;
  border-radius: 14px;
  padding: 20px;
  border: 1px solid rgba(191, 207, 196, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* アドバイスカードはflexを解除して通常のブロック */
.result-card-advice {
  display: block !important;
}

.result-card-content {
  flex: 1;
}

.result-card h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
  color: #0f1e2f;
  line-height: 1.5;
  font-family: var(--font-subtitle), sans-serif !important;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  white-space: normal;
  word-break: normal;
}

.result-card p {
  margin: 0;
  color: #4a5568;
  line-height: 1.9;
  font-family: var(--font-subtitle), sans-serif !important;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  white-space: normal;
  word-break: normal;
}

/* アドバイスカード内の段落間に余白を追加 */
.result-card-advice p {
  margin-bottom: 16px;
}

.result-card-advice p:last-child {
  margin-bottom: 0;
}

.result-card-illustration {
  flex-shrink: 0;
}

.result-card-illustration img {
  width: 100px;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .result-card {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .result-card-illustration {
    align-self: flex-end;
  }
  
  .result-card-illustration img {
    width: 90px;
  }
}

.result-advice-section {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.advice-card {
  background: #ffffff !important;
  border-radius: 14px;
  padding: 20px;
  border: 1px solid rgba(191, 207, 196, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.advice-card-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
  color: #0f1e2f;
  line-height: 1.5;
  font-family: var(--font-subtitle), sans-serif !important;
}

.advice-card-content {
  color: #4a5568;
  line-height: 1.9;
  font-family: var(--font-subtitle), sans-serif !important;
}

.advice-card-content p {
  margin: 0 0 12px;
  font-family: var(--font-subtitle), sans-serif !important;
  letter-spacing: 0.03em;
  line-height: 1.9;
}

.advice-card-content p:last-child {
  margin-bottom: 0;
}

/* 解説ページ（advice-x.html）用のスタイル */
.advice-page .advice-container {
  background: #ffffff !important;
  border-radius: 14px;
  padding: 20px;
  border: 1px solid rgba(191, 207, 196, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.advice-page .sc-header {
  margin-bottom: 24px;
}

.advice-page .advice-question-subtitle {
  font-size: 0.85rem;
  color: #6a6a6a;
  margin: 8px 0 0;
  font-family: var(--font-subtitle), sans-serif;
  letter-spacing: 0.03em;
  line-height: 1.6;
}

.advice-page .advice-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.advice-page .advice-text {
  font-family: var(--font-subtitle), sans-serif;
  letter-spacing: 0.03em;
  line-height: 1.9;
  color: #4a5568;
}

.advice-page .advice-text p {
  margin: 0 0 16px;
  font-family: var(--font-subtitle), sans-serif !important;
  letter-spacing: 0.03em;
  line-height: 1.9;
}

.advice-page .advice-text p:last-child {
  margin-bottom: 0;
}

.advice-page .advice-text ul {
  margin: 12px 0 16px;
  padding-left: 32px;
  list-style-type: disc;
  list-style-position: outside;
}

.advice-page .advice-text li {
  margin: 8px 0;
  font-family: var(--font-subtitle), sans-serif;
  letter-spacing: 0.03em;
  line-height: 1.9;
}

.advice-page .advice-illustration {
  width: 100%;
  text-align: center;
  margin-top: 24px;
}

.advice-page .advice-illustration img {
  width: 120px;
  height: auto;
  display: inline-block;
  opacity: 0.95;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.advice-page .advice-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  margin-top: 32px;
}

.advice-page .advice-actions a {
  text-decoration: none;
}

.advice-page .advice-actions .btn-primary {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.advice-page .advice-actions .btn-back {
  width: auto;
  align-self: flex-start;
  margin-top: 0;
}

@media (min-width: 768px) {
  .advice-page .advice-illustration img {
    width: 140px;
  }
  
  .advice-page .advice-actions {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  
  .advice-page .advice-actions .btn-primary {
    width: 100%;
    max-width: 400px;
  }
  
  .advice-page .advice-actions .btn-back {
    align-self: flex-start;
  }
}

@media (max-width: 480px) {
  .advice-page .advice-illustration img {
    width: 100px;
  }
}

.support-note {
  font-size: 13px;
  color: #666666;
  text-align: center;
  margin-top: 16px;
  margin-bottom: 8px;
  line-height: 1.7;
  font-family: var(--font-subtitle), sans-serif;
  letter-spacing: 0.03em;
}

.support-note a {
  text-decoration: underline;
  color: #666666;
}

.support-note a:hover {
  color: #4a5568;
}

