:root {
   --brand: #2D6CFB;
   /* ベースアクセント */
   --ink: #0f172a;
   /* 文字色 */
   --muted: #64748b;
   /* 補助文字 */
   --bg: #EFF3F8;
   /* 全体背景 */
   --mani_bg: #fffbec;
   /* メイン背景 */
   --card: #ffffff;
   /* カード背景 */
   --radius: 16px;
   --shadow: 0 10px 30px rgba(2, 8, 23, .06), 0 2px 6px rgba(2, 8, 23, .05);
   --ring: 0 0 0 3px rgba(45, 108, 251, .15);
   --max: 1200px;
}

* {
   box-sizing: border-box;
}

html,
body {
   margin: 0;
   padding: 0;
   font-family: "Noto Sans JP", sans-serif;
   color: var(--ink);
   background: var(--bg);
   line-height: 1.5;
}

.body {
   padding: 12px
}

img {
   width: 100%;
   vertical-align: bottom;
}

a {
   color: inherit;
   text-decoration: none;
}

.container {
   max-width: var(--max);
   margin-inline: auto;
   padding: 24px 16px;
}

@media (max-width:800px) {
   .container {
      padding: 10px;
   }
}

/* ===== Header ===== */
header.site {
   position: sticky;
   top: 0;
   z-index: 50;
   backdrop-filter: saturate(180%) blur(8px);
   background: rgba(255, 255, 255, .7);
   border-bottom: 1px solid rgba(2, 8, 23, .06);
}

.head-inner {
   max-width: var(--max);
   margin: 0 auto;
   padding: 14px 16px;
   display: flex;
   align-items: center;
   gap: 16px;
   justify-content: space-between;
}

.brand {
   display: flex;
   align-items: center;
   gap: 12px;
}

.brand .logo img {
   width: 200px;
}

@media (max-width:800px) {
   .brand .logo img {
      width: 140px;
   }
}


.actions {
   display: flex;
   gap: 10px;
}

.btn {
   display: inline-flex;
   align-items: center;
   gap: 8px;
   padding: 15px 30px;
   background: var(--brand);
   color: #fff;
   border-radius: 12px;
   box-shadow: var(--shadow);
   font-weight: 700;
   border: 0;
   cursor: pointer;
   font-size: 16px;
}
@media (max-width:800px) {
   .btn {
      font-size: 13px;
      padding: 15px;
   } 
}

.btn.secondary {
   background: #e8efff;
   color: #1e293b;
   font-weight: 600;
}

.btn:focus {
   outline: none;
   box-shadow: var(--ring);
}

/* ===== Hero ===== */
.hero {
   position: relative;
   background: url(../img/main_top.webp) var(--mani_bg) no-repeat;
   /*background: url(../img/eee.png) #fff7f4 no-repeat;*/
   background-size: 60%;
   background-position: top right;
   background-attachment: fixed;
   padding: 62px 40px;
}

@media (max-width:1150px) {
   .hero {
      background-size: 70%;
   }
}

@media (max-width:900px) {
   .hero {
      padding: 10px;
      background: url(../img/main_top_sp.webp) var(--mani_bg) no-repeat;
      background-size: cover;
      background-position: bottom left;
      background-attachment: scroll;
   }
   .hero h1{
      margin-bottom: 40px;
   }
}

@media (min-width:1600px) {
   .hero {
      background-size: 50%;
   }
}

@media (max-width:900px) {
   .hero .inner {
      grid-template-columns: 1fr;
      gap: 16px;
   }
}

#bun-title {
  display: block;
  width: 100%;
  height: auto;
  max-width: 620px;
}
.hero h1 span{
   display: inline-block;
   font-size: 18px;
   margin-bottom: 18px;
   background: #213c4f;
   color: #fff;
   padding: 8px 30px;
   line-height: 1;
   border-radius: 999px;
}

@media (max-width:800px) {
   .hero h1 span{
      margin-bottom: 20px;
   }
}


@media (max-width:800px) {
   .hero h2 {
      margin: 20px 0 100px;
   }
}

.hero p {
   color: #334155;
   margin: 0 0 14px;
}

@media (max-width:800px) {
   .hero p {
      margin: 0;
   }
}


/* ===== Search ===== */
#search{
   background: #FFE8B8;
   padding-top: 20px;
}
#search .container{
   padding: 24px 0;
}
#search h2{
   text-align: center;
   font-weight: bold;
   font-size: 18px;
   margin-bottom: 20px;
}
#search ul{
   display: flex;
   justify-content: center;
   gap: 15px;
   flex-wrap: wrap;
   padding-bottom: 20px;
}
#search li > a{
   display: block;
   line-height: 1;
   padding: 10px 20px;
   font-size: 16px;
   border:1px solid var(--muted);
   border-radius: 999px;
}
#search li a.is-active {
   background: var(--brand);
   border-color: var(--brand);
   color:#fff;
}






/* ===== Sections ===== */
.sec {
   padding: 40px 0;
}

@media (max-width:800px) {
   .sec {
      padding: 24px 20px;
   }
}

.sec-title{
   display: flex;
   align-items: center;
   gap: 40px;
   margin-bottom: 20px;
   background: #fff;
   border-radius: 18px;
   padding: 20px;
}
.sec-title img{
   max-width: 340px;
   border-radius: 16px;
}
.sec-title h3 {
   font-size: 24px;
   margin: 0 0 16px;
   font-weight: bold;
}
.sec-title .sub {
   color: var(--muted);
   font-size: 16px;
}
@media (max-width:800px) {
   .sec-title {
      display: block;
      text-align: center;
      padding: 12px;
   }
   .sec-title h3,
   .sec-title .sub {
      text-align: left;
   }
   .sec-title h3 br,
   .sec-title .sub br{
      display: none;
   }
   .sec-title img{
      margin-bottom: 10px;
      max-width: 100%;
   }
}





/* ===== Cards ===== */
.grid {
   display: grid;
   grid-template-columns: repeat(12, 1fr);
   gap: 16px;
}

.col-3 {
   grid-column: span 3;
}

@media (max-width:1100px) {
   .col-3 {
      grid-column: span 4;
   }
}

@media (max-width:800px) {
   .col-3 {
      grid-column: span 6;
   }
}

@media (max-width:520px) {
   .col-3 {
      grid-column: span 12;
   }
}

.card {
   background: var(--card);
   border: 1px solid rgba(2, 8, 23, .06);
   border-radius: 18px;
   box-shadow: var(--shadow);
   overflow: hidden;
   display: flex;
   flex-direction: column;
   cursor: pointer;
}

.thumb {
   aspect-ratio: 16/9;
   background: linear-gradient(135deg, #dbeafe, #bfdbfe);
   position: relative;
   overflow: hidden;
}

.thumb::after {
   content: "▶";
   position: absolute;
   right: 12px;
   bottom: 10px;
   font-weight: 700;
   font-size: 14px;
   color: #fff;
   border: 2px solid #fff;
   padding: 6px 10px;
   border-radius: 10px;
   box-shadow: var(--shadow);
   background: rgba(0, 0, 0, 0.09);
   backdrop-filter: saturate(180%) blur(2px);
}

.thumb img {
   width: 100%;
}


.corp {
   font-size: 16px;
   color: #0f172a;
   font-weight: 700;
   margin: 0 0 4px;
}

.title {
   font-size: 14px;
   color: #334155;
   margin: 0 0 8px;
}

.meta {
   display: flex;
   gap: 8px;
   flex-wrap: wrap;
   color: #64748b;
   font-size: 12px
}

.meta .dot::before {
   content: "•";
   margin: 0 6px 0 2px;
   color: #94a3b8;
}

/* footer */
footer {
   padding: 40px 16px;
   text-align: center;
   color: #94a3b8;
   font-size: 14px;
}

footer ul {
   display: flex;
   justify-content: center;
   gap: 20px;
   margin-bottom: 20px;
}

@media (max-width:800px) {
   footer ul {
      display: block;
   }
}



/* ===== Scroll-in (boing) ===== */
.card {
   transform-origin: center bottom;
   opacity: 0;
   transform: translateY(24px) scale(.94);
   /* GPUヒント */
   will-change: transform, opacity;
}

.card.inview {
   opacity: 1;
   transform: none;
   animation: boing-in .8s cubic-bezier(.22, .9, .18, 1.3) both;
   animation-delay: var(--stagger, 0ms);
}

@keyframes boing-in {
   0% {
      opacity: 0;
      transform: translateY(24px) scale(.94);
   }

   55% {
      opacity: 1;
      transform: translateY(-6px) scale(1.03);
   }

   75% {
      transform: translateY(2px) scale(.995);
   }

   100% {
      opacity: 1;
      transform: translateY(0) scale(1);
   }
}

/* ===== Hover: 薄い色が下→上に走る ===== */
.card {
   position: relative;
   overflow: hidden;
}

/* 下から上がる薄色のフィルム */
.card::before {
   content: "";
   position: absolute;
   inset: 0;
   background: linear-gradient(to top,
         rgba(45, 108, 251, .10),
         rgba(45, 108, 251, .10));
   transform: translateY(100%);
   transition: transform 600ms ease, opacity 600ms ease;
   opacity: 0;
   pointer-events: none;
}

/* ホバーで下→上にスライド＆うっすら表示 */
.card:hover::before {
   transform: translateY(0%);
   opacity: 1;
}

/* 画像と影に少しだけインタラクション */
.card .thumb img {
   transition: transform 600ms ease, filter 600ms ease;
}
.card:hover .thumb img {
   transform: scale(1.24);
   filter: saturate(1.05);
}
.card:hover {
   box-shadow: 0 18px 40px rgba(2, 8, 23, .10), 0 3px 10px rgba(2, 8, 23, .06);
}


#gotop {
   position: fixed;
   right: 20px;
   bottom: max(20px, calc(env(safe-area-inset-bottom, 0) + 12px));
   width: 75px;
   aspect-ratio: 1 / 1;
   border-radius: 50%;
   opacity: 0;
   transform: translateY(8px);
   pointer-events: none;
   transition: opacity .25s ease, transform .25s ease;
   z-index: 50;
}
#gotop.visible {
   opacity: 1;
   transform: translateY(0);
   pointer-events: auto;
   cursor: pointer;
}
@media (min-width:520px) {
   #gotop.visible:hover {
      opacity: 0.5;
   }
}
#gotop img {
   width: 100%;
   height: 100%;
   object-fit: cover;
   display: block;
   border-radius: 100svh;
}
#gotop:focus-visible {
   outline: 3px solid #0008;
   outline-offset: 4px;
}
#gotop div{
   text-align: center;
   font-size: 12px;
}

/* アクセシビリティ 考慮 */
@media (prefers-reduced-motion: reduce) {

   .card,
   .card::before,
   .card .thumb img {
      transition: none !important;
      animation: none !important;
      transform: none !important;
      opacity: 1 !important;
   }

   #gotop {
      transition: none;
   }
}

/* ===== 診断モーダル ===== */
.diag-modal {
   position: fixed;
   inset: 0;
   z-index: 200;
   display: none;
}
.diag-modal[aria-hidden="false"] {
   display: block;
}
.diag-backdrop {
   position: absolute;
   inset: 0;
   background: #0008;
   backdrop-filter: blur(2px);
}
.diag-dialog {
   position: relative;
   z-index: 1;
   max-width: 720px;
   margin: 8vh auto;
   background: var(--card);
   border: 1px solid rgba(2, 8, 23, .06);
   border-radius: var(--radius);
   box-shadow: var(--shadow);
   padding: 14px;
}
.diag-head {
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: 8px 6px 6px;
}
.diag-head h2 {
   font-size: 18px;
   margin: 0;
}
.diag-close {
   appearance: none;
   border: 0;
   background: #eef3ff;
   color: #1e293b;
   border-radius: 10px;
   padding: 6px 10px;
   cursor: pointer;
}
.diag-progress {
   display: flex;
   align-items: center;
   gap: 10px;
   padding: 8px 6px;
}
.diag-progress-bar {
   flex: 1;
   height: 8px;
   background: #e5edff;
   border-radius: 999px;
   overflow: hidden;
}
.diag-progress-bar>i {
   display: block;
   height: 100%;
   width: 0;
   background: linear-gradient(90deg, var(--brand), #34d399);
}
.diag-stage {
   padding: 8px 6px 12px;
}
.diag-q {
   padding: 12px;
   border: 1px solid rgba(2, 8, 23, .06);
   border-radius: 14px;
   background: #fff;
}
.diag-q h3 {
   margin: 0 0 10px;
   font-size: 18px;
}
.diag-opts {
   display: grid;
   gap: 8px;
}
.diag-opt {
   display: flex;
   gap: 10px;
   align-items: flex-start;
   padding: 10px 12px;
   border-radius: 12px;
   border: 1px solid rgba(2, 8, 23, .08);
   background: #f8fbff;
   cursor: pointer;
}
.diag-opt:hover {
   border-color: rgba(2, 8, 23, .18);
}
.diag-foot {
   display: flex;
   justify-content: space-between;
   gap: 10px;
   padding: 10px 6px 6px;
}

/* ===== 診断結果 ===== */
.is-hidden { display: none; }
.diag-result {
   max-width: var(--max);
   margin: 24px auto;
}
.diag-videos {
   background: var(--card);
   border: 1px solid rgba(2, 8, 23, .06);
   border-radius: 18px;
   box-shadow: var(--shadow);
   padding: 16px;
}
.pick-grid{
  display:grid;
  grid-template-columns:repeat(12,1fr);/* 12カラム */
  gap:12px;
}
.pick-grid > .cell{ 
   grid-column: span 3;/* 12/3=4列 */
}
@media (max-width:800px){ 
   .pick-grid > .cell{ 
      grid-column:span 12;/* SPは1列 */
   } 
}

.diag-result h4{
   font-weight: bold;
   margin-bottom: 10px;
   font-size: 18px;
}

@media (max-width:800px){ 
   #search-picks{
      padding: 16px;
   }
}
