/* =========================================================
   QUINSEL UI Finish (global override)
   目的：余白・角丸・影・文字・ボタンの統一
   方針：
   - Top（/quinsel/）は top.css が世界観を管理
   - Result / L2 / L2-result は ui.css が可読性を管理
   - Path（/quinsel/path/）は quinsel-path.css（LP専用）に完全委任（ui.cssは触らない）
========================================================= */


/* =========================================================
   Base typography (Top以外 / Path除外)
========================================================= */

/* text */
#quinsel-result p,
#quinsel-l2 p,
#quinsel-l2-result p{
  line-height:1.8;
}


/* =========================================================
   Section & Card (Top以外 / Path除外)
========================================================= */

#quinsel-result .qr-section,
#quinsel-l2 .q2-section,
#quinsel-l2-result .qr-section{
  border-radius:18px;
  border:1px solid rgba(2,6,23,.08);
  box-shadow:0 10px 26px rgba(2,6,23,.06);
}

#quinsel-result .qr-card,
#quinsel-l2-result .qr-card{
  border-radius:16px;
  border:1px solid rgba(2,6,23,.06);
  box-shadow:0 10px 24px rgba(2,6,23,.05);
}


/* =========================================================
   Buttons (共通挙動 / Path除外)
========================================================= */

#quinsel-top .quinsel-btn,
#quinsel-result .qr-btn,
#quinsel-l2 .q2-btn,
#quinsel-l2-result .qr-btn,
#quinsel-l2-result .qr-cta-btn{
  display:inline-flex;
  min-height:48px;
  border-radius:14px;
}

#quinsel-result .qr-btn.primary,
#quinsel-l2 .q2-btn.primary,
#quinsel-l2-result .qr-btn.primary,
#quinsel-l2-result .qr-cta-btn.primary{
  box-shadow:0 10px 26px rgba(2,6,23,.12);
}

#quinsel-top .quinsel-btn:hover,
#quinsel-result .qr-btn:hover,
#quinsel-l2 .q2-btn:hover,
#quinsel-l2-result .qr-btn:hover,
#quinsel-l2-result .qr-cta-btn:hover{
  transform:translateY(-1px);
}

/* notes */
#quinsel-result .qr-note,
#quinsel-l2 .q2-note,
#quinsel-l2-result .qr-note{
  opacity:.82;
}


/* =========================================================
   Mobile spacing (Topは top.css に任せる / Path除外)
========================================================= */

@media (max-width:768px){
  #quinsel-result .qr-wrap,
  #quinsel-l2 .q2-wrap,
  #quinsel-l2-result .qr-wrap{
    padding-left:16px;
    padding-right:16px;
  }
}


/* =========================================================
   QUINSEL Chrome (Header / Footer)
   ※これは “body.is-quinsel” が付与される前提
========================================================= */

body.is-quinsel{
  background:#0b1020;
}

/* 既存テーマのヘッダーフッタを無効化 */
body.is-quinsel .site-header,
body.is-quinsel #header,
body.is-quinsel .l-header,
body.is-quinsel .site-footer,
body.is-quinsel #footer{
  display:none !important;
}

/* ---------- Header ---------- */

.qs-header{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(10,12,18,.62);
  border-bottom:1px solid rgba(255,255,255,.08);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}

.qs-header__inner{
  max-width:1120px;
  margin:0 auto;
  padding:14px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.qs-brand{
  display:flex;
  align-items:baseline;
  gap:10px;
  text-decoration:none;
  color:rgba(255,255,255,.92);
}

.qs-mark{
  width:30px;
  height:30px;
  border-radius:10px;
  display:grid;
  place-items:center;
  font-weight:900;
  letter-spacing:.02em;
  background:linear-gradient(135deg, rgba(120,190,255,.92), rgba(160,120,255,.78));
  color:#0b1020;
}

.qs-name{
  font-weight:900;
  letter-spacing:.06em;
}

.qs-tag{
  opacity:.72;
  font-size:12px;
}

/* nav */

.qs-nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.qs-nav__link{
  text-decoration:none;
  color:rgba(255,255,255,.80);
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
}

.qs-nav__link:hover{
  color:rgba(255,255,255,.95);
  border-color:rgba(255,255,255,.22);
}

/* ---------- Main ---------- */

.qs-main{
  min-height:70vh;
}

/* ---------- Footer ---------- */

.qs-footer{
  margin-top:60px;
  padding:28px 0 34px;
  border-top:1px solid rgba(255,255,255,.08);
  background:rgba(10,12,18,.55);
}

.qs-footer__inner{
  max-width:1120px;
  margin:0 auto;
  padding:0 18px;
  display:flex;
  gap:16px;
  justify-content:space-between;
  align-items:flex-start;
  flex-wrap:wrap;
  color:rgba(255,255,255,.72);
}

.qs-footer__brand{
  font-weight:900;
  letter-spacing:.06em;
  color:rgba(255,255,255,.90);
}

.qs-footer__note{
  margin-top:6px;
  font-size:12.5px;
  line-height:1.7;
  opacity:.82;
}

.qs-footer__right{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.qs-footer__link{
  color:rgba(255,255,255,.72);
  text-decoration:none;
  border-bottom:1px solid rgba(255,255,255,.18);
  padding-bottom:2px;
  font-size:13px;
}

.qs-footer__link:hover{
  color:rgba(255,255,255,.92);
}


/* =========================================================
   5AI rail labels (hover)
========================================================= */

.qs-rail{ position:relative; }
.qs-dot{ position:relative; cursor:default; }

.qs-dot::after{
  content:attr(data-label);
  position:absolute;
  bottom:-34px;
  left:50%;
  transform:translateX(-50%);
  white-space:nowrap;
  padding:6px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.04em;
  color:#0b1020;
  background:rgba(255,255,255,.92);
  box-shadow:0 10px 26px rgba(0,0,0,.25);
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease, transform .2s ease;
}

.qs-dot:hover::after{
  opacity:1;
  transform:translateX(-50%) translateY(-2px);
}


/* =========================================================
   Reset: “余白ゼロ” を狙うのは L2 だけ（副作用防止）
========================================================= */

/* 強制的に冒頭の余白を消す設定（L2限定） */
body.is-quinsel #quinsel-l2{
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.is-quinsel .qs-main{
  padding-top: 0 !important;
}

/* ブラウザとWP管理バーの余白（is-quinselの時のみ） */
html body.is-quinsel{
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* メインコンテナとコンテンツの余白を強制リセット（is-quinselの時のみ） */
body.is-quinsel .qs-main,
body.is-quinsel #quinsel-l2,
body.is-quinsel .entry-content{
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* もしWPが改行を空のPタグに変換している場合の対策（L2限定） */
#quinsel-l2 p:empty{
  display:none !important;
}


/* =====================================================
   Path除外：ここでは何もしない
   - Path（/quinsel/path/）は quinsel-path.css がすべて担当
   - ui.css で #quinsel-path / .qc-* を触らない
===================================================== */
