*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

body{
  font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans","Yu Gothic",sans-serif;
  background:#fff8fb;
  color:#333;
}

.hero{
  min-height:620px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  background:
    linear-gradient(rgba(255,190,215,.55),rgba(255,170,205,.55)),
    url("https://images.unsplash.com/photo-1522383225653-ed111181a951?auto=format&fit=crop&w=1600&q=80");
  background-size:cover;
  background-position:center;
}

.hero-inner{
  background:rgba(255,255,255,.78);
  backdrop-filter:blur(10px);
  padding:52px;
  border-radius:28px;
  max-width:760px;
  box-shadow:0 20px 60px rgba(180,40,90,.18);
}

.small-title{
  color:#d81b60;
  letter-spacing:.4em;
  font-weight:bold;
  margin-bottom:10px;
}

.hero h1{
  font-size:70px;
  color:#c2185b;
  margin-bottom:20px;
}

.lead{
  font-size:30px;
  font-weight:bold;
  color:#ad1457;
  margin-bottom:15px;
}

.sub{
  line-height:2;
  color:#444;
}

.hero-btn{
  display:inline-block;
  margin-top:30px;
  padding:18px 50px;
  border-radius:999px;
  background:linear-gradient(135deg,#ff4f8b,#d81b60);
  color:white;
  text-decoration:none;
  font-size:20px;
  font-weight:bold;
}

.layout{
  max-width:1200px;
  margin:-80px auto 50px;
  padding:20px;
  display:grid;
  grid-template-columns:2fr 1fr;
  gap:25px;
  position:relative;
  z-index:2;
}

.card{
  background:white;
  border-radius:24px;
  padding:30px;
  box-shadow:0 10px 35px rgba(0,0,0,.08);
  border:1px solid #f7d3df;
}

.main-card{
  grid-row:span 2;
}

.card h2{
  color:#d81b60;
  margin-bottom:20px;
}

.form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
}

label{
  display:block;
  margin-top:15px;
  font-weight:bold;
  color:#d81b60;
}

input,select,textarea{
  width:100%;
  padding:15px;
  margin-top:8px;
  border-radius:12px;
  border:1px solid #f2c0d5;
  font-size:16px;
}

textarea{
  height:120px;
}

button{
  width:100%;
  margin-top:25px;
  padding:18px;
  border:none;
  border-radius:999px;
  background:linear-gradient(135deg,#ff4f8b,#d81b60);
  color:white;
  font-size:20px;
  font-weight:bold;
  cursor:pointer;
}

.result-card{
  grid-column:1/-1;
}

.result-title{
  text-align:center;
  font-size:24px;
  font-weight:bold;
  color:#c2185b;
  margin-bottom:25px;
}

.result-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:20px;
}

.result-box{
  background:#fff2f7;
  padding:20px;
  border-radius:18px;
  text-align:center;
}

.result-box span{
  display:block;
  color:#999;
  font-size:13px;
}

.result-box strong{
  display:block;
  margin-top:10px;
  font-size:25px;
  color:#d81b60;
}

.advice{
  margin-top:25px;
  background:#fff8fb;
  padding:25px;
  border-radius:18px;
  line-height:2;
}

.note{
  margin-top:15px;
  font-size:13px;
  color:#777;
  text-align:center;
}

footer{
  background:white;
  text-align:center;
  padding:35px;
}

footer a{
  color:#d81b60;
  text-decoration:none;
  margin:0 12px;
}

@media(max-width:900px){
  .layout{
    grid-template-columns:1fr;
  }

  .form-grid{
    grid-template-columns:1fr;
  }

  .hero h1{
    font-size:48px;
  }

  .result-grid{
    grid-template-columns:1fr;
  }
}


.image-card{
  margin-top:25px;
  background:#fff8fb;
  padding:25px;
  border-radius:18px;
  text-align:center;
}

.ai-image{
  width:220px;
  height:220px;
  margin:20px auto;
  border-radius:50%;
  background:linear-gradient(135deg,#ffd1dc,#ff8fb3,#fff0f5);
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  box-shadow:0 12px 30px rgba(216,27,96,.22);
}

.face{
  width:95px;
  height:95px;
  border-radius:50%;
  background:rgba(255,255,255,.75);
  position:absolute;
  top:45px;
}

.face::after{
  content:"";
  position:absolute;
  width:145px;
  height:70px;
  border-radius:70px 70px 35px 35px;
  background:rgba(255,255,255,.7);
  left:-25px;
  top:90px;
}

.image-text{
  position:absolute;
  bottom:28px;
  color:#c2185b;
  font-weight:bold;
}


/* V7 AI画像表示調整 */
.image-card{
  margin-top:28px;
  background:#fff8fb;
  padding:28px;
  border-radius:22px;
  text-align:center;
  border:1px solid #f7d3df;
}

.image-card h3{
  color:#d81b60;
  margin-bottom:18px;
}

.ai-image{
  width:320px;
  height:320px;
  max-width:100%;
  margin:18px auto;
  border-radius:28px;
  overflow:hidden;
  background:#fff0f6;
  box-shadow:0 14px 34px rgba(216,27,96,.22);
  display:flex;
  align-items:center;
  justify-content:center;
}

.ai-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.result-card{
  max-width:900px;
  margin-left:auto;
  margin-right:auto;
}

.result-grid{
  margin-top:20px;
}

.advice{
  white-space:pre-line;
}

@media(max-width:600px){
  .ai-image{
    width:260px;
    height:260px;
    border-radius:22px;
  }
}


/* 強制：AI生成画像をカードサイズに固定 */
#aiImage{
  width:320px !important;
  height:320px !important;
  max-width:90vw !important;
  margin:20px auto !important;
  border-radius:26px !important;
  overflow:hidden !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:#fff0f6 !important;
  box-shadow:0 14px 34px rgba(216,27,96,.22) !important;
}

#aiImage img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  display:block !important;
}

@media(max-width:600px){
  #aiImage{
    width:260px !important;
    height:260px !important;
  }
}


/* 強制：AI生成画像をカードサイズに固定 */
#aiImage{
  width:320px !important;
  height:320px !important;
  max-width:90vw !important;
  margin:20px auto !important;
  border-radius:26px !important;
  overflow:hidden !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:#fff0f6 !important;
  box-shadow:0 14px 34px rgba(216,27,96,.22) !important;
}

#aiImage img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  display:block !important;
}

@media(max-width:600px){
  #aiImage{
    width:260px !important;
    height:260px !important;
  }
}


/* V7 AI画像表示調整 */
.image-card{
  margin-top:28px;
  background:#fff8fb;
  padding:28px;
  border-radius:22px;
  text-align:center;
  border:1px solid #f7d3df;
}

.image-card h3{
  color:#d81b60;
  margin-bottom:18px;
}

.ai-image{
  width:320px;
  height:320px;
  max-width:100%;
  margin:18px auto;
  border-radius:28px;
  overflow:hidden;
  background:#fff0f6;
  box-shadow:0 14px 34px rgba(216,27,96,.22);
  display:flex;
  align-items:center;
  justify-content:center;
}

.ai-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.result-card{
  max-width:900px;
  margin-left:auto;
  margin-right:auto;
}

.result-grid{
  margin-top:20px;
}

.advice{
  white-space:pre-line;
}

@media(max-width:600px){
  .ai-image{
    width:260px;
    height:260px;
    border-radius:22px;
  }
}


.image-loading{
  color:#d81b60;
  font-weight:bold;
  text-align:center;
  padding:30px;
}


/* V9 profile and match meter */
.profile-card,
.match-card{
  margin-top:24px;
  background:#fff8fb;
  padding:24px;
  border-radius:20px;
  border:1px solid #f7d3df;
}

.profile-card h3,
.match-card h3{
  color:#d81b60;
  margin-bottom:14px;
}

.profile-card p{
  line-height:1.9;
  margin:8px 0;
}

.match-percent{
  text-align:center;
  font-size:42px;
  font-weight:bold;
  color:#d81b60;
  margin:10px 0 16px;
}

.meter{
  width:100%;
  height:18px;
  background:#ffe4ee;
  border-radius:999px;
  overflow:hidden;
}

#matchBar{
  height:100%;
  width:0%;
  background:linear-gradient(135deg,#ff4f8b,#d81b60);
  border-radius:999px;
  transition:width 1s ease;
}


/* V15正式版 */
.v15-section{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:20px;
  margin-top:26px;
}

.v15-section .profile-card{
  margin-top:0;
  background:linear-gradient(180deg,#fff8fb,#ffffff);
  border:1px solid #f7d3df;
  box-shadow:0 8px 24px rgba(216,27,96,.08);
}

.v15-section .profile-card h3{
  font-size:18px;
  border-left:5px solid #d81b60;
  padding-left:10px;
}

.v15-section .profile-card p{
  white-space:pre-line;
}


/* Release 1.1 history and favorite */
.action-buttons{
  display:flex;
  gap:14px;
  margin-top:24px;
  flex-wrap:wrap;
}

.action-buttons button{
  flex:1;
  min-width:180px;
  font-size:16px;
}

.history-area{
  margin-top:24px;
  background:#fff8fb;
  border:1px solid #f7d3df;
  border-radius:20px;
  padding:22px;
}

.history-item{
  display:flex;
  gap:14px;
  align-items:center;
  padding:14px 0;
  border-bottom:1px solid #f3d5df;
}

.history-item:last-child{
  border-bottom:none;
}

.history-item img{
  width:80px;
  height:80px;
  border-radius:14px;
  object-fit:cover;
}

@media(max-width:600px){
  .history-item{
    align-items:flex-start;
  }
}


/* Release 1.2 daily omikuji and share */
.daily-card{
  grid-column:1 / -1;
  background:linear-gradient(135deg,#fff7fb,#ffffff);
  border:1px solid #f7d3df;
  text-align:center;
}

.daily-card h2{
  color:#d81b60;
}

#dailyFortune{
  font-size:28px;
  font-weight:bold;
  color:#d81b60;
  margin:12px 0;
}

#dailyLucky{
  color:#7b4052;
  font-weight:bold;
}

.action-buttons button{
  background:linear-gradient(135deg,#ff77a8,#d81b60);
}


/* Release 1.2 daily omikuji and share */
.daily-card{
  grid-column:1 / -1;
  background:linear-gradient(135deg,#fff7fb,#ffffff);
  border:1px solid #f7d3df;
  text-align:center;
}

.daily-card h2{
  color:#d81b60;
}

#dailyFortune{
  font-size:28px;
  font-weight:bold;
  color:#d81b60;
  margin:12px 0;
}

#dailyLucky{
  color:#7b4052;
  font-weight:bold;
}

.action-buttons button{
  background:linear-gradient(135deg,#ff77a8,#d81b60);
}
