/* ============================================================
   PM45+ MEDIA — 共通追加レイヤー
   深緑 #1A2B4B × 金 #ea580c。動く背景・リビール・カウントアップ・
   cinematicフッター。WebGL不使用・CSSアニメ＋IO中心（軽量必須）。
   ============================================================ */

html, body { overflow-x: hidden; }

/* ===== リビング背景（全ページ共通・ロード時から動く） ===== */
.bg-live { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
/* ブラー全廃：filter:blur大型要素×多重アニメはヘッドレスのタイルメモリ超過（描画落ち）の原因
   → 多段radial-gradientでソフトエッジを代替（pm-si-mediaで実証済みの手法） */
.bg-live .blob { position: absolute; border-radius: 50%; opacity: .85; will-change: transform; }
.bg-live .b1 { width: 46vw; height: 46vw; left: -12vw; top: -14vw; background: radial-gradient(circle, rgba(79,70,229,.11), rgba(79,70,229,.05) 45%, transparent 70%); animation: drift1 26s ease-in-out infinite alternate; }
.bg-live .b2 { width: 38vw; height: 38vw; right: -10vw; top: 18vh; background: radial-gradient(circle, rgba(234,88,12,.10), rgba(234,88,12,.045) 45%, transparent 70%); animation: drift2 31s ease-in-out infinite alternate; }
.bg-live .b3 { width: 34vw; height: 34vw; left: 24vw; bottom: -16vw; background: radial-gradient(circle, rgba(13,148,136,.10), rgba(13,148,136,.045) 45%, transparent 70%); animation: drift3 24s ease-in-out infinite alternate; }
@keyframes drift1 { from { transform: translate(0,0) scale(1);} to { transform: translate(9vw,7vh) scale(1.14);} }
@keyframes drift2 { from { transform: translate(0,0) scale(1.08);} to { transform: translate(-8vw,10vh) scale(.94);} }
@keyframes drift3 { from { transform: translate(0,0);} to { transform: translate(10vw,-7vh) scale(1.1);} }
.bg-live .grid { position: absolute; inset: -80px; opacity: .5;
  background-image: linear-gradient(rgba(26,43,75,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(26,43,75,.05) 1px, transparent 1px);
  background-size: 56px 56px; animation: gridmove 40s linear infinite; }
@keyframes gridmove { from { transform: translate(0,0);} to { transform: translate(56px,56px);} }

/* ===== スクロールリビール ===== */
.rv { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.16,1,.3,1); transition-delay: var(--d, 0s); }
.rv-l { transform: translateX(-30px); }
.rv-r { transform: translateX(30px); }
.rv.on { opacity: 1; transform: translate(0,0); }

/* ===== TextRotate（21st.dev text-rotate バニラ移植） =====
   spring(damping30/stiffness400)近似 = cubic-bezier(.16,1,.3,1) 軽いオーバーシュート */
[data-rotate] { position: relative; display: inline-flex; overflow: hidden; vertical-align: bottom; padding-bottom: .06em; }
.tr-char { display: inline-block; transform: translateY(0); opacity: 1; transition: transform .45s cubic-bezier(.16,1,.3,1), opacity .3s ease; min-width: .08em; }
.tr-char.tr-in { transform: translateY(100%); opacity: 0; transition: none; }
.tr-char.tr-out { transform: translateY(-120%); opacity: 0; }
/* 旧語は絶対配置のゴーストとして上へ退場＝新語の入場と同時進行（空白ゼロ・重なりなし） */
.tr-ghost { position: absolute; left: 0; top: 0; display: inline-flex; pointer-events: none; white-space: nowrap; }

/* ===== Floating（21st.dev parallax-floating バニラ移植） ===== */
.pf-stage { position: absolute; inset: 0; pointer-events: none; }
.pf-el { position: absolute; will-change: transform; }
.pf-el img { object-fit: cover; border-radius: 14px; background: #fff; border: 1px solid rgba(26,43,75,.12); box-shadow: 0 18px 40px -10px rgba(26,43,75,.35); cursor: pointer; transition: transform .2s ease; pointer-events: auto; display: block; }
.pf-el img:hover { transform: scale(1.05); }
/* 定常時0.95（はっきり見える） */
.pf-fadein { opacity: 0; animation: pfIn .6s ease forwards; }
@keyframes pfIn { to { opacity: .95; } }

/* ===== 浮遊カード（ヒーロー） ===== */
.float-stage { position: relative; min-height: 460px; }
.float-el { position: absolute; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 18px 20px; will-change: transform; animation: floaty var(--fd, 7s) ease-in-out infinite alternate; }
@keyframes floaty { from { transform: translateY(0) rotate(var(--rot, 0deg)); } to { transform: translateY(-16px) rotate(var(--rot, 0deg)); } }
.float-el .fe-k { font-size: 10.5px; font-weight: 800; letter-spacing: 2px; color: var(--accent); margin-bottom: 6px; }
.float-el .fe-t { font-size: 15px; font-weight: 900; color: var(--text); line-height: 1.4; }
.float-el .fe-s { font-size: 12px; color: var(--text-sec); margin-top: 6px; line-height: 1.7; }
.float-el .fe-big { font-size: 30px; font-weight: 900; font-family: 'Inter', sans-serif; color: var(--primary); line-height: 1; }
.float-el.fe-green { background: var(--primary); border-color: var(--primary-dk); }
.float-el.fe-green .fe-t, .float-el.fe-green .fe-big { color: #fff; }
.float-el.fe-green .fe-s { color: rgba(255,255,255,.75); }
.float-el.fe-gold { background: linear-gradient(135deg, #ea580c, #c2410c); border: none; }
.float-el.fe-gold .fe-k { color: rgba(255,255,255,.85); }
.float-el.fe-gold .fe-t, .float-el.fe-gold .fe-big { color: #fff; }
.float-el.fe-gold .fe-s { color: rgba(255,255,255,.82); }

/* ===== マーキー ===== */
.marquee { overflow: hidden; white-space: nowrap; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: inline-block; animation: mq 34s linear infinite; }
@keyframes mq { from { transform: translateX(0);} to { transform: translateX(-50%);} }
.marquee span { display: inline-block; margin: 0 28px; font-weight: 800; letter-spacing: 1px; }

/* ===== cinematicフッター ===== */
.cine-footer { position: relative; background: linear-gradient(160deg, var(--primary-dk), var(--primary) 70%); color: #fff; overflow: hidden; padding: 70px 0 0; margin-top: 80px; }
.cine-footer .cf-glow { position: absolute; inset: 0; background: radial-gradient(ellipse 60% 50% at 78% 20%, rgba(234,88,12,.22), transparent 60%); pointer-events: none; }
.cine-footer .container { position: relative; z-index: 1; }
.cf-mq { color: rgba(255,255,255,.28); font-size: 15px; padding: 8px 0 26px; }
.cf-main { display: flex; flex-wrap: wrap; gap: 34px; justify-content: space-between; align-items: flex-start; padding-bottom: 40px; }
.cf-brand p { font-size: 13px; color: rgba(255,255,255,.66); line-height: 1.9; max-width: 420px; margin-top: 12px; }
.cf-links { display: flex; gap: 48px; flex-wrap: wrap; }
.cf-links h4 { font-size: 11px; letter-spacing: 2.5px; color: var(--accent-lt); opacity: .8; margin-bottom: 14px; font-weight: 800; }
.cf-links a { display: block; color: rgba(255,255,255,.78); font-size: 13.5px; text-decoration: none; margin-bottom: 10px; transition: color .15s, transform .15s; }
.cf-links a:hover { color: #fdba74; transform: translateX(3px); }
.cf-pill { display: inline-flex; align-items: center; gap: 10px; background: #ea580c; color: #fff; font-weight: 800; font-size: 15px; padding: 15px 30px; border-radius: 999px; text-decoration: none; box-shadow: 0 14px 34px -8px rgba(0,0,0,.45); transition: transform .18s ease; will-change: transform; }
.cf-giant { font-family: 'Inter', sans-serif; font-weight: 900; font-size: clamp(84px, 17vw, 240px); line-height: .84; letter-spacing: -6px; text-align: center; color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.16); user-select: none; padding: 10px 0 0; }
.cf-giant em { font-style: normal; -webkit-text-stroke: 1.5px rgba(251,146,60,.45); }
.cf-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0 22px; font-size: 12px; color: rgba(255,255,255,.5); }
.cf-bottom a { color: rgba(255,255,255,.6); text-decoration: none; margin-left: 18px; }

/* ===== 記事 ===== */
.art-wrap { max-width: 760px; margin: 0 auto; padding: 56px 24px 30px; }
.art-label { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 2px; color: var(--accent); background: var(--accent-lt); border: 1px solid #fed7aa; padding: 5px 12px; border-radius: 999px; margin-bottom: 16px; }
.art-wrap h1 { font-size: 34px; font-weight: 900; line-height: 1.4; letter-spacing: -0.8px; margin-bottom: 14px; }
.art-meta { font-size: 12.5px; color: var(--text-muted); margin-bottom: 34px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.art-body h2 { font-size: 22px; font-weight: 900; margin: 44px 0 16px; padding-left: 14px; border-left: 4px solid var(--accent); line-height: 1.5; }
.art-body h3 { font-size: 17px; font-weight: 800; margin: 30px 0 12px; }
.art-body p { font-size: 15.5px; line-height: 2.05; color: var(--text); margin-bottom: 18px; }
.art-body ul, .art-body ol { margin: 0 0 18px 22px; }
.art-body li { font-size: 15px; line-height: 2; margin-bottom: 6px; }
.art-body .talk { background: var(--primary-lt); border-left: 4px solid var(--primary); border-radius: 0 10px 10px 0; padding: 16px 20px; font-size: 15px; line-height: 1.95; margin-bottom: 20px; font-weight: 600; }
.art-body table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 10px 0 22px; background: #fff; }
.art-body th { background: var(--primary); color: #fff; padding: 9px 10px; text-align: left; font-size: 12px; letter-spacing: .5px; }
.art-body td { border: 1px solid var(--border); padding: 9px 10px; line-height: 1.7; }
.art-body .tbl-scroll { overflow-x: auto; margin-bottom: 22px; border-radius: 10px; border: 1px solid var(--border); }
.art-body .note-box { background: var(--accent-lt); border: 1px solid #fed7aa; border-radius: 10px; padding: 14px 18px; font-size: 13px; color: #9A3412; line-height: 1.9; margin-bottom: 20px; }
.art-cta { background: linear-gradient(135deg, var(--primary-dk), var(--primary)); border-radius: 18px; padding: 34px 30px; color: #fff; text-align: center; margin: 50px 0 10px; }
.art-cta h2 { font-size: 21px; font-weight: 900; margin-bottom: 10px; border: none; padding: 0; }
.art-cta p { color: rgba(255,255,255,.82); font-size: 14px; line-height: 1.9; margin-bottom: 20px; }
.art-cta a { display: inline-block; background: var(--accent); color: #fff; font-weight: 800; padding: 14px 32px; border-radius: 12px; text-decoration: none; font-size: 15px; margin: 0 6px 8px; }
.art-cta a.ghost { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); }
.art-supervisor { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin: 34px 0; }
.art-supervisor .sv-badge { flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; background: var(--grad-main); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 15px; }
.art-supervisor .sv-name { font-size: 14px; font-weight: 800; }
.art-supervisor .sv-bio { font-size: 12.5px; color: var(--text-sec); line-height: 1.8; margin-top: 4px; }
.art-list { display: grid; gap: 16px; max-width: 860px; margin: 0 auto; }
.art-card { display: block; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 24px 26px; text-decoration: none; color: var(--text); box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
.art-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary-bd); }
.art-card .ac-bundle { font-size: 10.5px; font-weight: 800; letter-spacing: 2px; color: var(--accent); margin-bottom: 8px; }
.art-card h3 { font-size: 18px; font-weight: 900; line-height: 1.5; margin-bottom: 8px; }
.art-card p { font-size: 13.5px; color: var(--text-sec); line-height: 1.85; }
.art-card .ac-why { margin-top: 10px; font-size: 12px; color: var(--primary); font-weight: 700; }

/* ===== 診断 ===== */
.sd-wrap { max-width: 680px; margin: 0 auto; padding: 50px 24px 40px; }
.sd-progress { height: 8px; background: var(--border-light); border-radius: 999px; overflow: hidden; margin: 18px 0 30px; }
.sd-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 999px; transition: width .35s cubic-bezier(.16,1,.3,1); }
.sd-q { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 30px 28px; box-shadow: var(--shadow-md); }
.sd-qnum { font-size: 11px; font-weight: 800; letter-spacing: 2px; color: var(--accent); margin-bottom: 10px; }
.sd-q h2 { font-size: 20px; font-weight: 900; line-height: 1.6; margin-bottom: 20px; }
.sd-opt { display: block; width: 100%; text-align: left; background: var(--bg); border: 1.5px solid var(--border); border-radius: 12px; padding: 15px 18px; font-size: 14.5px; font-weight: 600; color: var(--text); cursor: pointer; margin-bottom: 10px; font-family: inherit; line-height: 1.6; transition: border-color .15s, background .15s, transform .12s; }
.sd-opt:hover { border-color: var(--primary); background: var(--primary-lt); transform: translateX(4px); }
.sd-back { background: none; border: none; color: var(--text-muted); font-size: 13px; cursor: pointer; margin-top: 16px; font-family: inherit; }
.sd-result { background: #fff; border: 1px solid var(--border); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); }
.sd-result-head { background: linear-gradient(135deg, var(--primary-dk), var(--primary)); color: #fff; padding: 34px 30px; }
.sd-result-head .rk { font-size: 11px; letter-spacing: 3px; font-weight: 800; color: #fdba74; margin-bottom: 10px; }
.sd-result-head h2 { font-size: 27px; font-weight: 900; line-height: 1.4; }
.sd-result-head p { margin-top: 12px; font-size: 14px; color: rgba(255,255,255,.85); line-height: 1.9; }
.sd-result-body { padding: 28px 30px 32px; }
.sd-result-body h3 { font-size: 15px; font-weight: 900; color: var(--primary); margin: 20px 0 10px; }
.sd-result-body p, .sd-result-body li { font-size: 14px; line-height: 1.95; color: var(--text); }
.sd-result-body ul { margin: 0 0 6px 20px; }
.sd-target { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 8px; }
.sd-target span { background: var(--primary-lt); border: 1px solid var(--primary-bd); color: var(--primary); font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: 999px; }
.sd-bars { margin: 16px 0 4px; }
.sd-bar { margin-bottom: 12px; }
.sd-bar .lb { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--text-sec); margin-bottom: 5px; }
.sd-bar .tr { height: 9px; background: var(--border-light); border-radius: 999px; overflow: hidden; }
.sd-bar .fl { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 999px; transition: width 1s cubic-bezier(.16,1,.3,1) .2s; }
.sd-reads a { display: block; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; text-decoration: none; color: var(--text); font-size: 13.5px; font-weight: 700; transition: border-color .15s, transform .12s; }
.sd-reads a:hover { border-color: var(--accent); transform: translateX(4px); }
.sd-retry { background: none; border: 1.5px solid var(--border); border-radius: 10px; padding: 10px 20px; font-size: 13px; font-weight: 700; color: var(--text-sec); cursor: pointer; font-family: inherit; margin-top: 18px; }

@media (max-width: 720px) {
  .float-stage { min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 8px; }
  .float-el { position: static; animation: none; }
  .cf-giant { letter-spacing: -2px; }
  .art-wrap h1 { font-size: 26px; }
}

/* ===== reduced motion / ?static=1（fx-off）共通の演出オフ ===== */
@media (prefers-reduced-motion: reduce) {
  .bg-live .blob, .bg-live .grid, .float-el, .marquee-track, .pf-fadein { animation: none !important; }
  .pf-fadein { opacity: 1; }
  .rv { opacity: 1; transform: none; transition: none; }
  .tr-char { transition: none; }
  html { scroll-behavior: auto; }
}
html.fx-off .bg-live .blob, html.fx-off .bg-live .grid, html.fx-off .float-el,
html.fx-off .marquee-track, html.fx-off .pf-fadein { animation: none !important; }
html.fx-off .pf-fadein { opacity: 1; }
html.fx-off .rv { opacity: 1 !important; transform: none !important; transition: none !important; }
html.fx-off .tr-char { transition: none; }
html.fx-off { scroll-behavior: auto; }

/* ===== §10対応：背景を殺さない・カード列の質感 ===== */
.hm-sec-alt { background: rgba(238,242,247,.55) !important; }
.art-card { border-top: 3px solid var(--card-line, var(--primary-bd)); }
.art-card .ac-bundle { color: var(--card-line, var(--accent)); }
.card-coral { --card-line: #ea580c; }
.card-indigo { --card-line: #4f46e5; }
.card-teal { --card-line: #0d9488; }
.card-violet { --card-line: #7c3aed; }
.cf-brandrow { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.cf-brandrow img { height: 22px; width: auto; display: block; opacity: .92; }
.cf-brandrow span { font-size: 11.5px; color: rgba(255,255,255,.55); font-weight: 600; }
.hdr-cobrand { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; font-size: 10px; color: var(--text-muted); font-weight: 700; }
.hdr-cobrand img { height: 16px; width: auto; display: block; }
