/* ==========================================================
   TOP 固有：MV（最新の記事 5 件のスライダー）・記事一覧のタブ・YouTube
   ========================================================== */

/* ---------- MV（AI Tools Library と同じ: 画面に貼り付き、下のコンテンツが重なって流れる） ---------- */
.p-hero {
	position: sticky;
	top: 0;
	z-index: 0;
	height: calc(70vh + 50px);
	height: calc(70svh + 50px);
	min-height: 470px;
	background: var(--c-secondary);
	color: var(--c-white);
	overflow: hidden;
	touch-action: pan-y; /* 横のスワイプはスライダー、縦はページのスクロール */
}
.p-hero__slides { position: relative; height: 100%; }
.p-hero__slide {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	overflow: hidden;
	background: var(--c-secondary);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.8s ease, visibility 0s linear 0.8s;
}
.p-hero__slide.is-active { z-index: 1; opacity: 1; visibility: visible; transition: opacity 0.8s ease, visibility 0s; }
/* アイキャッチが無い記事は、紺からオレンジのグラデーション */
.p-hero__slide--1 { background: linear-gradient(135deg, var(--c-secondary) 30%, #8A4A1C); }
.p-hero__slide--2 { background: linear-gradient(135deg, var(--c-secondary) 30%, #5A3A3A); }
.p-hero__slide--3 { background: linear-gradient(135deg, var(--c-secondary) 30%, #2F4A7A); }
.p-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.p-hero__slide.is-active .p-hero__img { animation: p-hero-zoom 7s ease-out both; }
@keyframes p-hero-zoom { from { transform: scale(1.06); } to { transform: none; } }
/* 写真の上に紺を薄くかけ、下からも暗くする（白い文字を読みやすく） */
.p-hero__slide::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(24, 42, 82, 0.85), rgba(24, 42, 82, 0.15) 65%), rgba(24, 42, 82, 0.35);
	pointer-events: none;
}
.p-hero__link { position: absolute; inset: 0; z-index: 2; }
.p-hero__link:focus-visible { box-shadow: inset 0 0 0 4px var(--c-primary); }
.p-hero__content { position: relative; z-index: 3; padding-top: var(--space-3); padding-bottom: 120px; pointer-events: none; }
.p-hero__copy { min-width: 0; max-width: 960px; }
.p-hero__meta { display: flex; align-items: center; gap: 12px; margin: 0 0 var(--space-2); font-size: var(--fz-sm); font-weight: 700; }
.p-hero__title { margin: 0; color: var(--c-white); font-size: 1.5rem; font-weight: 700; line-height: 1.5; text-shadow: 0 2px 14px rgba(24, 42, 82, 0.6); }

/* キャッチコピーのタイピング（AI Tools Library と同じ。1 文字ずつ大きい → 今の大きさ・下線が点滅） */
.p-hero__catch { min-height: 3em; word-break: auto-phrase; }
.p-hero__phrase { display: inline-block; max-width: 100%; }
.p-hero__unit { display: inline-block; white-space: nowrap; }
.p-hero__char { display: inline-block; white-space: pre; animation: p-hero-type 0.3s var(--ease) both; }
.p-hero__char.is-static { animation: none; }
@keyframes p-hero-type { from { opacity: 0; transform: scale(1.9); } to { opacity: 1; transform: none; } }
.p-hero__caret { display: inline-block; width: 0.55em; height: 0.09em; margin-left: 0.06em; background: var(--c-primary); vertical-align: -0.08em; animation: p-hero-caret 1s steps(1, end) infinite; }
@keyframes p-hero-caret { 50% { opacity: 0; } }

/* 送り（左右）とドット */
.p-hero__ui {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 72px;
	z-index: 4;
	display: flex;
	align-items: center;
	gap: var(--space-2);
}
.p-hero__dots { display: flex; align-items: center; gap: 4px; }
.p-hero__dot { position: relative; width: 24px; height: 24px; padding: 0; background: transparent; border: 0; cursor: pointer; }
.p-hero__dot::before { content: ''; position: absolute; top: 50%; left: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: rgba(255, 255, 255, 0.55); transition: background-color 0.3s, transform 0.3s; }
.p-hero__dot:hover::before { background: var(--c-white); }
.p-hero__dot.is-active::before { background: var(--c-primary); transform: scale(1.3); }
.p-hero__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: rgba(24, 42, 82, 0.35);
	color: var(--c-white);
	border: 2px solid var(--c-white);
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.p-hero__nav:hover { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-secondary); }
.p-hero__nav .c-icon { width: 22px; height: 22px; color: currentColor; }

@media (min-width: 768px) {
	.p-hero__title { font-size: 2.25rem; }
	.p-hero__meta { font-size: var(--fz-base); }
}
@media (min-width: 1280px) {
	.p-hero__title { font-size: 2.75rem; }
}
/* SP: MV は少し低く。送りとドットは下から 60px */
@media (max-width: 767px) {
	.p-hero { height: calc(70vh - 30px); height: calc(70svh - 30px); min-height: 420px; }
	.p-hero__content { padding-bottom: 104px; }
	.p-hero__ui { bottom: 60px; justify-content: center; }
	.p-hero__title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
	.p-hero__slide,
	.p-hero__slide.is-active { transition: none; }
	.p-hero__slide.is-active .p-hero__img,
	.p-hero__char,
	.p-hero__caret { animation: none; }
}

/* ---------- 記事一覧のタブ ---------- */
.p-tabs__scroll { position: relative; margin: 0 0 var(--space-3); }
.p-tabs__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.p-tabs__tab {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 18px;
	border: 2px solid var(--c-line);
	border-radius: var(--radius-pill);
	background: var(--c-white);
	color: var(--c-secondary);
	font-size: var(--fz-sm);
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.p-tabs__tab:hover { border-color: var(--c-primary); color: var(--c-primary-dark); }
.p-tabs__tab.is-current { border-color: var(--c-secondary); background: var(--c-secondary); color: var(--c-white); }
.p-tabs__panel { transition: opacity 0.2s; }
.p-tabs__panel:focus { outline: none; }
.p-tabs__panel.is-loading { opacity: 0.45; pointer-events: none; }
.p-tabs__error { margin: 0; padding: var(--space-3); border-radius: var(--radius-md); background: #FBE9E6; color: #A3301F; text-align: center; }

/* SP: タブは横にスクロール（右端を少し薄くして、続きがあることを見せる） */
@media (max-width: 767px) {
	.p-tabs__scroll { margin-right: -16px; margin-left: -16px; }
	.p-tabs__scroll::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 32px; background: linear-gradient(to right, rgba(255, 255, 255, 0), #fff); pointer-events: none; }
	.p-tabs__list { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding: 4px 32px 8px 16px; scrollbar-width: none; scroll-snap-type: x proximity; }
	.p-tabs__list::-webkit-scrollbar { display: none; }
	.p-tabs__tab { flex: 0 0 auto; scroll-snap-align: start; scroll-margin-left: 16px; }
}

/* ---------- YouTube（背景は薄いオレンジ #FFD6AA。2026-11-10 依頼者の指示） ---------- */
#youtube { background: var(--c-accent); }
/* 薄いオレンジの上では、英語の小見出し・見出しの下の線を紺にする（オレンジの文字は読みにくい） */
#youtube .c-section-title__en { color: var(--c-secondary); }
#youtube .c-section-title::after { background: var(--c-secondary); }
.p-youtube__stage { position: relative; overflow: hidden; border-radius: var(--radius-md); box-shadow: var(--shadow-mid); background: var(--c-cream); }
.p-youtube__note { margin: var(--space-2) 0 0; color: var(--c-secondary); font-size: var(--fz-sm); text-align: right; }
.p-youtube__art { position: relative; } /* リンクの位置は、この画像の枠を基準にする */
.p-youtube__bg { width: 100%; height: auto; }
/* 真ん中の枠に動画（画像 1672×941 の左 495・上 305・幅 740 の所） */
.p-youtube__video { position: absolute; top: 32.41%; left: 29.6%; width: 44.26%; box-shadow: 0 6px 24px rgba(24, 42, 82, 0.3); border-radius: var(--radius-sm); }
/* 画像の中の「チャンネル登録」「防災用品をチェック」の上に重ねる本物のリンク（同じ大きさ） */
.p-youtube__hit { position: absolute; top: 86.6%; height: 7.7%; border-radius: var(--radius-pill); transition: box-shadow 0.2s, background-color 0.2s; }
.p-youtube__hit--subscribe { left: 24.8%; width: 23.25%; }
.p-youtube__hit--check { left: 52.2%; width: 22.9%; }
.p-youtube__hit:hover { background: rgba(255, 255, 255, 0.22); box-shadow: 0 0 0 3px var(--c-primary), 0 6px 18px rgba(24, 42, 82, 0.25); }
.p-youtube__hit:focus-visible { box-shadow: 0 0 0 3px var(--c-white), 0 0 0 6px var(--c-primary); }

/* 「チャンネル登録」ボタン（スマホだけ。PC は画像の中のボタンに本物のリンクを重ねている） */
.c-btn--youtube { background: var(--c-error); color: var(--c-white); box-shadow: 0 4px 0 #A3301F; }
.c-btn--youtube:hover { background: #C23526; transform: translateY(-2px); box-shadow: 0 6px 0 #A3301F; }
.p-youtube__sub { display: none; white-space: nowrap; }

/* PR（上のボックスと同じ幅。紺の地・左に「50% OFF」の円・光の帯とボタンの光がゆっくり動く。2026-11-10 依頼者の指示） */
.p-pr {
	position: relative;
	display: flex;
	align-items: center;
	gap: var(--space-4);
	margin: var(--space-4) 0 0;
	padding: var(--space-4);
	overflow: hidden;
	isolation: isolate;
	border-radius: var(--radius-md);
	background: linear-gradient(135deg, #182A52 0%, #22386A 100%);
	box-shadow: var(--shadow-mid), inset 0 0 0 2px rgba(255, 214, 170, 0.35);
	color: var(--c-white);
}
/* 光の帯が左から右へゆっくり横切る */
.p-pr::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 35%, rgba(255, 214, 170, 0.2) 50%, transparent 65%); transform: translateX(-100%); animation: p-pr-sheen 7s ease-in-out infinite; }
/* 右上のオレンジの斜めの帯（飾り） */
.p-pr::after { content: ''; position: absolute; top: -30%; right: 40px; z-index: -1; width: 44px; height: 160%; background: var(--c-primary); opacity: 0.9; transform: skewX(-30deg); }
.p-pr__emblem {
	--ring-r: 77px; /* 回る円の半径（点線の真ん中。星をこの上に並べる） */
	position: relative;
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 132px;
	height: 132px;
	border-radius: 50%;
	/* ゴールドのグラデーション: 左上が明るく、外へ向かって深い金色（文字は紺。中央付近で 4.5:1 以上） */
	background: radial-gradient(circle at 30% 25%, #FFF6C2 0%, #F9D75A 32%, #E3AC1F 68%, #B9810C 100%);
	color: var(--c-secondary);
	font-weight: 700;
	line-height: 1;
	box-shadow: 0 0 0 4px rgba(255, 214, 90, 0.5), 0 0 22px rgba(255, 205, 80, 0.55), inset 0 2px 4px rgba(255, 255, 255, 0.6), inset 0 -4px 8px rgba(150, 90, 0, 0.35);
	animation: p-pr-pulse 2.8s ease-in-out infinite;
}
/* 表面を、光がななめに流れる */
.p-pr__emblem::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.65) 50%, transparent 62%) no-repeat; background-size: 260% 100%; background-position: 120% 0; animation: p-pr-gleam 3.8s ease-in-out infinite; pointer-events: none; }
/* 回る円（点線）。外周に明るい弧が走り、星がきらめく */
.p-pr__ring { position: absolute; inset: -12px; border: 2px dashed #F9D75A; border-radius: 50%; filter: drop-shadow(0 0 5px rgba(255, 214, 90, 0.85)); animation: p-pr-spin 24s linear infinite; pointer-events: none; }
.p-pr__ring::before { content: ''; position: absolute; inset: -2px; border-radius: 50%; background: conic-gradient(transparent 0deg 40deg, rgba(255, 244, 180, 0) 40deg, rgba(255, 244, 180, 0.95) 62deg, #fff 70deg, rgba(255, 244, 180, 0) 92deg, transparent 92deg 220deg, rgba(255, 244, 180, 0) 220deg, rgba(255, 244, 180, 0.95) 242deg, #fff 250deg, rgba(255, 244, 180, 0) 272deg, transparent 272deg 360deg); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); animation: p-pr-spin 3.2s linear infinite reverse; }
.p-pr__ring i { position: absolute; top: 50%; left: 50%; width: 0; height: 0; transform: rotate(var(--a)) translateY(calc(var(--ring-r) * -1)); }
.p-pr__ring i::before { content: ''; position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; background: #FFF9D6; clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); transform: scale(0); opacity: 0; animation: p-pr-twinkle 2.4s ease-in-out infinite; animation-delay: var(--d); }
.p-pr__off-num { position: relative; z-index: 1; font-size: 2.75rem; letter-spacing: -0.02em; }
.p-pr__off-num small { font-size: 1.25rem; margin-left: 1px; }
.p-pr__off-text { position: relative; z-index: 1; margin-top: 4px; font-size: 1.125rem; letter-spacing: 0.2em; }
.p-pr__body { position: relative; flex: 1; min-width: 0; padding-right: 88px; } /* 右の飾りの帯と文が重ならないように */
.p-pr__text { margin: 0 0 var(--space-2); line-height: 1.9; }
.p-pr__label { margin-right: 2px; color: var(--c-accent); font-weight: 700; }
.p-pr__link { margin: 0; }
.p-pr__link .c-icon { width: 18px; height: 18px; }
/* ボタンの上を光が横切る */
.p-pr__btn { position: relative; overflow: hidden; }
.p-pr__btn::after { content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.6), transparent); transform: skewX(-20deg); animation: p-pr-shine 3.6s ease-in-out infinite; }
@keyframes p-pr-sheen { 0%, 20% { transform: translateX(-100%); } 70%, 100% { transform: translateX(100%); } }
@keyframes p-pr-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes p-pr-spin { to { transform: rotate(360deg); } }
@keyframes p-pr-gleam { 0%, 35% { background-position: 120% 0; } 75%, 100% { background-position: -20% 0; } }
@keyframes p-pr-twinkle { 0%, 100% { transform: scale(0) rotate(0deg); opacity: 0; } 45%, 55% { transform: scale(1) rotate(45deg); opacity: 1; } }
@keyframes p-pr-shine { 0%, 55% { left: -60%; } 100% { left: 130%; } }

/* SP: 画像はスマホ用（縦長）。下の「防災用品をチェック」の上に本物のリンクを重ね、画像の下に「チャンネル登録」を 1 行のボタンで置く。
   そのあとに動画。画像・ボタン・動画は同じ幅（480px まで）で真ん中に */
@media (max-width: 767px) {
	.p-youtube__stage { max-width: 480px; margin: 0 auto; overflow: visible; border-radius: 0; box-shadow: none; background: none; }
	.p-youtube__bg { border-radius: var(--radius-md); box-shadow: var(--shadow-mid); }
	.p-youtube__sub { display: flex; width: 100%; margin-top: var(--space-2); }
	.p-youtube__video { position: static; width: auto; margin-top: var(--space-2); }
	.p-youtube__note { max-width: 480px; margin-right: auto; margin-left: auto; text-align: left; }
	/* スマホ用の画像（720×1279）の中のボタン: 左 11.2%・上 88.5%・幅 77.7%・高さ 8.25%（スマホの幅で 44px 以上） */
	.p-youtube__hit--subscribe { display: none; }
	.p-youtube__hit--check { left: 11.2%; top: 88.5%; width: 77.7%; height: 8.25%; }
	.p-pr { flex-direction: column; align-items: stretch; gap: var(--space-3); padding: var(--space-3) var(--space-2); }
	.p-pr::after { display: none; } /* 帯が文字に重なるので、スマホでは出さない */
	.p-pr__body { padding-right: 0; }
	.p-pr__emblem { --ring-r: 65px; align-self: center; width: 108px; height: 108px; }
	.p-pr__off-num { font-size: 2.25rem; }
	.p-pr__off-text { font-size: 1rem; }
	.p-pr__link .c-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.p-tabs__panel,
	.p-youtube__hit { transition: none; }
	.p-pr::before,
	.p-pr__emblem,
	.p-pr__emblem::after,
	.p-pr__ring,
	.p-pr__ring::before,
	.p-pr__btn::after { animation: none; }
	.p-pr__ring i::before { animation: none; transform: scale(1); opacity: 0.85; } /* 動かさず、星は止めて見せる */
}
