/* site.css: サイト共通のスタイル（index.css を統合） */
@import url('https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap');

:root{
  --bg: #f2c6d8;
  --bg-soft: #f8dfe9;
  --text-dark: #2d2a2b;
  --text-muted: #6a5f64;
  --accent: #c85d7a;
  --accent-strong: #a14a63;
  --panel: #ffffff;
  --border: #efd4dc;
}

html,body{
  height:100%;
  background-color:var(--bg);
}
/* 本文: 高齢者にも見やすいフォントサイズとコントラスト */
body {
  font-family: 'Zen Kaku Gothic New','Hiragino Kaku Gothic ProN','Meiryo',sans-serif;
  background-color: var(--bg);
  color: var(--text-dark);
  font-size: 1.3rem;
  line-height: 1.7;
  -webkit-font-smoothing:antialiased;
}

:root.theme-dark{
  --bg: #2a1c22;
  --bg-soft: #3a2530;
  --text-dark: #f4e8ed;
  --text-muted: #d1b7c3;
  --accent: #d47b95;
  --accent-strong: #b96580;
  --panel: #3a252d;
  --border: #5b3a47;
}

.theme-dark .loading-overlay{
  background: rgba(30, 20, 25, 0.9);
}

:root.theme-light{
  --bg: #f2c6d8;
  --bg-soft: #f8dfe9;
  --text-dark: #2d2a2b;
  --text-muted: #6a5f64;
  --accent: #c85d7a;
  --accent-strong: #a14a63;
  --panel: #ffffff;
  --border: #efd4dc;
}

/* header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  position: relative;
}
.logo{
  position: absolute;
  top: 12px;
  left: 12px;
  width: 18%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(20,30,40,0.15);
}

.theme-toggle{
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 2100;
}

.theme-toggle .btn{
  font-size: 0.95rem;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
}

.home-consult-fab{
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: 80px;
  height: 80px;
  border-radius: 999px;
  border: 1px solid rgba(178,79,110,0.35);
  background: linear-gradient(135deg, #fff7fa 0%, #f6d7e2 100%);
  color: var(--accent-strong);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  font-weight: 700;
  box-shadow: 0 14px 24px rgba(178,79,110,0.28);
  z-index: 2150;
  cursor: grab;
  touch-action: none;
}

.home-consult-fab.is-dragging{
  cursor: grabbing;
}

.home-consult-label{
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.home-consult-icon{
  font-size: 1.35rem;
  line-height: 1;
}

.home-consult-panel{
  position: fixed;
  right: 16px;
  bottom: calc(88px + env(safe-area-inset-bottom));
  width: min(320px, 88vw);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem 0.9rem;
  box-shadow: 0 18px 28px rgba(20,30,40,0.2);
  z-index: 2140;
  max-height: 70vh;
  overflow: auto;
}

.home-consult-title{
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-strong);
  margin-bottom: 0.35rem;
}

.home-consult-text{
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.home-consult-accordion{
  display: grid;
  gap: 0.55rem;
}

.home-consult-item{
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff7fa;
  overflow: hidden;
}

.home-consult-item summary{
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent-strong);
  padding: 0.6rem 0.75rem;
  background: rgba(200, 93, 122, 0.08);
}

.home-consult-item summary::-webkit-details-marker{
  display: none;
}

.home-consult-item[open] summary{
  background: rgba(200, 93, 122, 0.16);
}

.home-consult-item-body{
  padding: 0.6rem 0.75rem 0.75rem;
  font-size: 0.98rem;
  color: var(--text-dark);
  line-height: 1.6;
}

.home-consult-item-body h6{
  font-weight: 700;
  margin-top: 0.6rem;
}

.home-consult-item-body ul{
  padding-left: 1.1rem;
}

.theme-dark .home-consult-fab{
  background: linear-gradient(135deg, #3a252d 0%, #5c3a47 100%);
  color: #fff;
  border-color: rgba(255,255,255,0.2);
  box-shadow: 0 16px 26px rgba(0,0,0,0.45);
}

.theme-dark .home-consult-panel{
  background: var(--panel);
  box-shadow: 0 18px 26px rgba(0,0,0,0.45);
}

.theme-dark .home-consult-item{
  background: #3a252d;
  border-color: var(--border);
}

.theme-dark .home-consult-item summary{
  color: var(--text-dark);
}

.theme-dark .home-consult-item[open] summary{
  background: #4a2f3a;
}

@media (max-width: 768px){
  .home-consult-fab{
    width: 70px;
    height: 70px;
  }
  .home-consult-panel{
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
}

/* タイトル */
.title-wrapper{ text-align:center; width:100%; margin-top:3.2rem; }
.title-main{
  font-size:3rem;
  font-family:'Zen Kaku Gothic New','Hiragino Kaku Gothic ProN','Meiryo',sans-serif;
  color:var(--text-dark);
  margin-bottom:0.6rem;
  font-weight:700;
  letter-spacing:0.06em;
}
.title-sub{
  font-size:1.8rem;
  font-family:'Zen Kaku Gothic New','Hiragino Kaku Gothic ProN','Meiryo',sans-serif;
  font-weight:600;
  color:var(--text-muted);
  margin-top:-6px;
  display:block;
}

/* ソーシャル */
.social-icons{ text-align:right; width:100%; margin-top:1rem; }
.social-icons a{ font-size:2rem; color:inherit; }

/* メイン */
main p{ font-size:1.5rem; opacity:0; animation:fadeIn 1.4s forwards; margin-top:3rem; }

.btn-custom{
  color:#fff;
  font-size:1.5rem; /* タッチしやすく少し大きめ */
  font-weight:700;
  background-color:var(--accent);
  border:2px solid var(--accent-strong);
  border-radius:14px;
  display:inline-block;
  margin-top:3rem;
  padding:0.8rem 1.4rem; /* タッチ領域を広げる */
  box-shadow:0 10px 18px rgba(20,30,40,0.18);
}

.btn-custom:hover{ color:#fff; background-color:var(--accent-strong); border-color:var(--accent-strong); }

.img-custom{ width:60%; height:auto; border-top-left-radius:20px; border-top-right-radius:20px; margin-top:3rem; box-shadow:none; background-color:var(--bg); border:none; }
.delayed-text{ margin-top:1.5rem; }

@keyframes fadeIn{ to{ opacity:1; } }
@media (max-width:768px){
  .title-main{ font-size:2.2rem; }
  .title-sub{ font-size:1.5rem; }
  .logo{ width:30%; }
  .img-custom{ width:70%; }
  .btn-custom{ font-size:1.2rem; padding:0.7rem 1.1rem; }
}

.theme-dark body{ color: var(--text-dark); }
.theme-dark .logo{ box-shadow: 0 10px 20px rgba(0,0,0,0.45); }
.theme-dark .btn-custom{ box-shadow: 0 10px 18px rgba(0,0,0,0.45); }

.network-status{
  position:fixed;
  top:0;
  left:0;
  right:0;
  padding:0.6rem 1rem;
  background:#b34d6b;
  color:#fff;
  text-align:center;
  font-weight:700;
  z-index:2200;
  display:none;
}

.loading-overlay{
  position:fixed;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:0.6rem;
  background:rgba(248, 221, 231, 0.88);
  opacity:0;
  visibility:hidden;
  transition:opacity 0.2s ease;
  z-index:2300;
}

.loading-overlay.is-visible{
  opacity:1;
  visibility:visible;
}

.loading-spinner{
  width:48px;
  height:48px;
  border:4px solid rgba(178,79,110,0.35);
  border-top-color: var(--accent-strong);
  border-radius:50%;
  animation:spin 0.9s linear infinite;
}

.loading-text{
  font-weight:700;
  color:var(--text-dark);
}

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

/* 花びら演出（画像なし） */
#petalLayer{
  position:fixed;
  inset:0;
  pointer-events:none;
  overflow:hidden;
  z-index:0;
}

body > :not(#petalLayer):not(.network-status):not(.loading-overlay):not(.theme-toggle):not(.home-consult-fab):not(.home-consult-panel){
  position:relative;
  z-index:1;
}

.petal{
  position:absolute;
  top:-12vh;
  animation:petal-fall var(--fall-duration) linear infinite;
  will-change:transform;
}

.petal-sway{
  display:block;
  width:var(--petal-size);
  height:calc(var(--petal-size) * 1.2);
  background:radial-gradient(circle at 30% 30%, var(--petal-highlight) 0%, var(--petal-color) 55%, var(--petal-shadow) 100%);
  clip-path:polygon(50% 18%, 63% 5%, 80% 6%, 94% 22%, 94% 40%, 80% 60%, 50% 100%, 20% 60%, 6% 40%, 6% 22%, 20% 6%, 37% 5%);
  opacity:var(--petal-opacity);
  animation:petal-sway var(--sway-duration) ease-in-out infinite;
  will-change:transform;
}

@keyframes petal-fall{
  to{ transform:translate3d(var(--fall-x), 110vh, 0); }
}

@keyframes petal-sway{
  0%{ transform:translateX(0) rotate(0deg); }
  50%{ transform:translateX(var(--sway-x)) rotate(var(--sway-rotate)); }
  100%{ transform:translateX(0) rotate(var(--sway-rotate-end)); }
}

/* ==========================
   設問8: 画像表示のスタイル
   高齢者向けに大きめ・高コントラスト・レスポンシブ
   ========================== */
.item-images{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:8px;
}

.item-images img{
  /* モーダル内で目立つ大きさにする */
  width:18%; /* デスクトップでは5枚が横並びになるように */
  height:auto;
  border:3px solid #ffffff; /* 白枠で見切れをはっきり */
  border-radius:12px;
  background-color:#fff; /* コントラスト確保 */
  box-shadow:0 6px 16px rgba(0,0,0,0.15);
  padding:6px; /* 余白でアイテムを見やすく */
}

/* モーダルが狭い場合やタブレット/スマホ: 縦積みにして大きく表示 */
@media (max-width: 992px) {
  .item-images{ flex-direction:row; gap:10px; }
  .item-images img{ width:20%; }
}

@media (max-width: 768px) {
  .item-images{ flex-direction:column; align-items:center; }
  .item-images img{ width:80%; max-width:360px; margin-bottom:8px; }
  /* カウントダウンメッセージを目立たせる */
  #q8CountdownMessage{ font-size:1.1rem; }
}

@media (max-width: 480px) {
  .container {
    max-width: 100%;
    padding-left: 12px;
    padding-right: 12px;
  }

  .title-wrapper {
    margin-top: 2.2rem;
  }

  .title-main {
    font-size: 2.2rem;
  }

  .title-sub {
    font-size: 1.35rem;
  }

  main p {
    font-size: 1.05rem;
    margin-top: 1.6rem;
  }

  .img-custom {
    width: 85%;
    margin-top: 1.8rem;
  }

  .btn-custom {
    width: 100%;
    min-height: 44px;
    font-size: 1.15rem;
    padding: 0.75rem 1rem;
  }

  input,
  select,
  button {
    font-size: 16px;
  }
}
