@charset "utf-8";

:root {
	font-size: 18px;
	--bg-color: #fdfaf6;
	--text-color: #3d3d3d;
	--primary-color: #f59e0b;
	/* Amber 500 */
	--primary-hover-color: #d97706;
	/* Amber 600 */
	--card-bg-color: #ffffff;
	--border-color: #e7e5e4;
	/* Stone 200 */
	--subtle-text-color: #78716c;
	/* Stone 500 */
	--gradient-start: #fbbf24;
	/* Amber 400 */
	--gradient-end: #f97316;
	/* Orange 500 */
	--highlight-bg-color: #fffbeb;
	/* Amber 50 */
	--highlight-border-color: #fef3c7;
	/* Amber 200 */
}

/* Basic Styles */
html {
	scroll-behavior: smooth;
	scroll-padding-top: 120px;
	text-align: justify;
	text-justify: inter-word;
}

body {
	font-family: 'Klee One', 'Inter', 'Noto Sans JP', sans-serif;
	background-color: var(--bg-color);
	color: var(--text-color);
	line-height: 1.7;
	margin: 0;
}

body.mobile-nav-open {
	overflow: hidden;
	/* Prevent background scroll when menu is open */
}

iframe[src^="https://www.youtube.com/embed/"] {
	width: 85%;
	aspect-ratio: 16/9;
	margin-bottom: 1em;
	/* border-radius: 20px; */
}

.breadcrumb-nav {
	margin-top: 1rem;
	margin-bottom: 2rem;
	margin-left: 1rem;
	font-family: 'Noto Sans JP', sans-serif;
}

.breadcrumb-list {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	/* 画面が狭い場合に折り返す */
	list-style: none;
	padding: 0;
	margin: 0;
	font-size: 0.9rem;
}

.breadcrumb-item {
	display: flex;
	align-items: center;
}

.breadcrumb-link {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	color: var(--subtle-text-color);
	text-decoration: none;
	transition: color 0.3s ease;
}

.breadcrumb-link:hover {
	color: var(--primary-color);
	text-decoration: underline;
}

.breadcrumb-link svg {
	width: 1rem;
	height: 1rem;
}

.breadcrumb-separator {
	margin: 0 0.5rem;
	color: var(--border-color);
}

.breadcrumb-separator svg {
	width: 1.25rem;
	height: 1.25rem;
}

.breadcrumb-current {
	color: var(--text-color);
	font-weight: 700;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

/* Header */
.header {
	background-color: rgba(253, 250, 246, 0.8);
	backdrop-filter: blur(10px);
	position: sticky;
	top: 0;
	z-index: 9999;
	border-bottom: 1px solid var(--border-color);
}

.header .container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 1rem;
	padding-bottom: 1rem;
}

.header-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--text-color);
}

.header-nav a {
	color: var(--subtle-text-color);
	text-decoration: none;
	transition: color 0.3s ease;
	margin-left: 1.5rem;
}

.header-nav a:hover {
	color: var(--primary-color);
}

/* Main Content & Sections */
main {
	padding-top: 3rem;
	padding-bottom: 3rem;
}

section {
	margin-bottom: 6rem;
}

.section-title {
	font-size: 2.25rem;
	font-weight: 700;
	text-align: center;
	margin-bottom: 3rem;
}

.section-subtitle {
	font-size: 1.125rem;
	max-width: 48rem;
	margin: -2rem auto 3rem auto;
	text-align: center;
	color: var(--subtle-text-color);
}

/* Hero Section */
.hero {
	text-align: center;
}

.hero-title {
	font-size: 2.5rem;
	font-weight: 700;
	line-height: 1.3;
	margin-bottom: 1rem;
}

.gradient-text {
	background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
	background-clip: text;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.hero-subtitle {
	font-size: 1.125rem;
	max-width: 48rem;
	margin: 0 auto 2rem auto;
	color: var(--subtle-text-color);
}

.hero-premise {
	background-color: var(--highlight-bg-color);
	border: 1px solid var(--highlight-border-color);
	border-radius: 0.75rem;
	padding: 1.5rem;
	max-width: 56rem;
	margin: 0 auto;
	text-align: left;
}

.hero-premise-title {
	font-weight: 700;
	font-size: 1.125rem;
	margin: 0 0 0.5rem 0;
	display: flex;
	align-items: center;
}

.hero-premise-title svg {
	color: var(--primary-color);
	margin-right: 0.5rem;
	flex-shrink: 0;
}

.hero-premise p {
	margin: 0;
	color: var(--subtle-text-color);
}

.hero-img {
	padding: .8rem 1.6rem .5rem;
}

.hero-img img {
	width: 100%;
	max-width: 600px;
	border-radius: 15px;
	overflow: hidden;
}

/* ===== Modal: YouTube ===== */
body.modal-open {
	overflow: hidden;
}

.yt-modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	pointer-events: none;
	/* open前はクリック無効 */
}

.yt-modal::before {
	/* 背景の半透明オーバーレイ */
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .55);
	opacity: 0;
	transition: opacity .25s ease;
}

.yt-modal__dialog {
	position: absolute;
	top: 50%;
	left: 50%;
	width: min(92vw, 960px);
	aspect-ratio: 16/9;
	background: var(--bg-color);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
	transform: translate(-50%, -46%) scale(.98);
	opacity: 0;
	transition: opacity .25s ease, transform .25s ease;
}

.yt-modal.open {
	pointer-events: auto;
}

.yt-modal.open::before {
	opacity: 1;
}

.yt-modal.open .yt-modal__dialog {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

.yt-modal__frame,
.yt-modal__frame iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.yt-modal__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 40px;
	height: 40px;
	border: 1px solid var(--border-color);
	background: var(--card-bg-color);
	border-radius: 999px;
	cursor: pointer;
	display: grid;
	place-items: center;
	font-size: 22px;
	line-height: 1;
	color: var(--text-color);
	box-shadow: 0 6px 16px rgba(0, 0, 0, .1);
	transition: transform .12s ease, background-color .2s ease;
}

.yt-modal__close:hover {
	transform: scale(1.06);
	background: #fff;
}

.hero-img {
	cursor: pointer;
}

.hero-img img {
	transition: transform .25s ease;
}

.hero-img:hover img {
	transform: translateY(-1px) scale(1.01);
}

/* （任意）中央の再生バッジ */
.hero-play-badge {
	position: absolute;
	inset: auto;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 72px;
	height: 72px;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
	box-shadow: 0 8px 28px rgba(0, 0, 0, .2);
}

.hero-play-badge::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-45%, -50%);
	border-left: 14px solid white;
	border-top: 10px solid transparent;
	border-bottom: 10px solid transparent;
}

/* 動きを控えたいユーザー配慮 */
@media (prefers-reduced-motion: reduce) {

	.yt-modal::before,
	.yt-modal__dialog,
	.hero-img img {
		transition: none !important;
	}
}

/* Card Styles */
.card {
	background-color: var(--card-bg-color);
	padding: 1.5rem;
	border-radius: 0.75rem;
	border: 1px solid var(--border-color);
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

.card-grid {
	display: grid;
	gap: 2rem;
}

.card h3 {
	font-weight: 700;
	font-size: 1.25rem;
	color: var(--primary-color);
	margin: 0 0 0.75rem 0;
}

.card ul {
	padding-left: 1.25rem;
	margin: 0;
	color: var(--subtle-text-color);
}

.table-scroll-wrapper {
	overflow-x: auto;
	width: 100%;
	margin-top: 1.5rem;
}

.styled-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.styled-table th,
.styled-table td {
	border: 1px solid var(--border-color);
	padding: 0.75rem 1rem;
	text-align: left;
	vertical-align: top;
	white-space: nowrap;
}

.styled-table th {
	background-color: #fefbf8;
	font-weight: 600;
}

.styled-table td:first-child {
	font-weight: 600;
}

.styled-table .highlight {
	background-color: var(--highlight-bg-color);
	font-weight: 700;
	color: var(--primary-hover-color);
}

.tactic-card-grid {
	display: grid;
	gap: 2rem;
}

.tactic-card .example {
	color: var(--subtle-text-color);
	margin-bottom: 1rem;
	font-style: italic;
	border-left: 3px solid var(--border-color);
	padding-left: 1rem;
}

.tactic-card .countermeasure-title {
	font-weight: 600;
	margin-bottom: 0.5rem;
	color: var(--text-color);
}

.tactic-card .countermeasure {
	color: var(--subtle-text-color);
}

.accordion-wrapper {
	max-width: 48rem;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.accordion-item {
	background-color: var(--card-bg-color);
	border-radius: 0.75rem;
	border: 1px solid var(--border-color);
	overflow: hidden;
}

.accordion-header {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.5rem;
	text-align: left;
	background: none;
	border: none;
	cursor: pointer;
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--text-color);
}

.accordion-header .icon {
	transition: transform 0.3s ease;
	flex-shrink: 0;
}

.accordion-item.open .icon {
	transform: rotate(180deg);
}

.accordion-content {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
	padding: 0 1.5rem;
	color: var(--subtle-text-color);
}

.accordion-item.open .accordion-content {
	max-height: 1000px;
	padding: 0 1.5rem 1.5rem 1.5rem;
}

.accordion-content ul {
	padding-left: 1.25rem;
	margin: 1rem 0 0 0;
}

.accordion-content li {
	margin-bottom: 0.5rem;
}

.checklist-item {
	display: flex;
	align-items: flex-start;
	margin-bottom: .5rem;
}

.checklist-item>* {
	cursor: pointer;
}

.checklist-item input {
	margin-top: 0.25rem;
	margin-right: 0.75rem;
	flex-shrink: 0;
}

.template-box {
	background-color: var(--card-bg-color);
	border-radius: 0.75rem;
	padding: 1.5rem;
	border: 1px solid var(--border-color);
	max-width: 56rem;
	margin: 0 auto;
}

.template-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
}

.template-title {
	font-size: 1.125rem;
	font-weight: 600;
}

.copy-button {
	background-color: var(--primary-color);
	color: white;
	font-weight: 700;
	padding: 0.5rem 1rem;
	border-radius: 0.5rem;
	border: none;
	cursor: pointer;
	transition: background-color 0.3s ease;
	display: flex;
	align-items: center;
}

.copy-button:hover {
	background-color: var(--primary-hover-color);
}

.copy-button svg {
	margin-right: 0.5rem;
	flex-shrink: 0;
}

pre#template-content {
	background-color: #f7fafc;
	padding: 1rem;
	border-radius: 0.5rem;
	color: var(--text-color);
	overflow-x: auto;
	white-space: pre-wrap;
	font-family: 'Noto Sans JP', monospace;
	font-size: 0.9rem;
	line-height: 1.6;
}

.support-card {
	background-color: var(--highlight-bg-color);
	border: 1px solid var(--highlight-border-color);
	padding: 1.5rem;
	border-radius: 0.75rem;
}

.support-card ul {
	list-style: none;
	padding: 0;
}

.support-card li {
	margin-bottom: 0.75rem;
}

.footer {
	border-top: 1px solid var(--border-color);
	margin-top: 5rem;
	padding: 2rem 0;
	text-align: center;
	color: var(--subtle-text-color);
}

.footer p {
	margin: 0.5rem 0;
	font-size: 0.9rem;
}

a.external-link {
	text-decoration: underline;
	text-underline-offset: 4px;
	color: var(--primary-color);
	font-weight: 600;
}

a.external-link:hover {
	color: var(--primary-hover-color);
}

.fade-in {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
	opacity: 1;
	transform: translateY(0);
}

/* Hamburger Menu */
.hamburger-menu {
	display: none;
	flex-direction: column;
	justify-content: space-around;
	width: 30px;
	height: 24px;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
	z-index: 9900;
	position: relative;
}

.hamburger-line {
	width: 30px;
	height: 3px;
	background-color: var(--text-color);
	border-radius: 10px;
	transition: all 0.3s linear;
	position: relative;
	transform-origin: 1px;
}

.mobile-nav {
	position: fixed;
	top: 0;
	right: -280px;
	width: 280px;
	height: 100vh;
	background-color: var(--bg-color);
	border-left: 1px solid var(--border-color);
	box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: column;
	padding-top: 5rem;
	transition: right 0.3s ease-in-out;
	z-index: 9999;
}

.mobile-nav a {
	padding: 1rem 2rem;
	text-decoration: none;
	color: var(--text-color);
	font-size: 1.1rem;
	white-space: normal;
	word-break: break-word;
}

.mobile-nav-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 98;
	opacity: 0;
	transition: opacity 0.3s ease-in-out;
}

body.mobile-nav-open .mobile-nav {
	right: 0;
}

body.mobile-nav-open .mobile-nav-overlay {
	display: block;
	opacity: 1;
}

body.mobile-nav-open .hamburger-line:nth-child(1) {
	transform: translateY(-3px) rotate(45deg);
}

body.mobile-nav-open .hamburger-line:nth-child(2) {
	opacity: 0;
	transform: translateX(20px);
}

body.mobile-nav-open .hamburger-line:nth-child(3) {
	transform: rotate(-45deg);
}

/* Responsive Styles */
@media (max-width: 768px) {
	.header-nav {
		display: none;
	}

	.hamburger-menu {
		display: flex;
		z-index: 9999;
	}

	.hero-title {
		font-size: 2rem;
	}

	.section-title {
		font-size: 1.75rem;
	}
}

@media (min-width: 768px) {
	.card-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.tactic-card-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.tactic-card-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}