/*
Theme Name: SiteTune
Theme URI: https://sitetune.net/
Author: SiteTune
Author URI: https://sitetune.net/
Description: SiteTune公式オリジナルテーマ。ダーク＆ネオンを基調とし、音楽×テクノロジーの世界観を表現。HTMLSong Player専用に最適化。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GPL v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: theme-sitetune
Tags: dark, music, custom-menu, custom-logo, featured-images, responsive-layout, threaded-comments, translation-ready
*/

/* =========================================
   CSS変数（カラーパレット）
   ========================================= */
:root {
	--color-bg: #0a0e1a;
	--color-bg-2: #11162a;
	--color-bg-3: #1a2138;
	--color-surface: rgba(255, 255, 255, 0.03);
	--color-surface-2: rgba(255, 255, 255, 0.06);
	--color-border: rgba(91, 141, 239, 0.15);
	--color-border-strong: rgba(91, 141, 239, 0.35);

	--color-text: #e8ecf5;
	--color-text-dim: #a8b3cc;
	--color-text-muted: #6b7691;

	--color-accent: #2c6bed;
	--color-accent-2: #5b8def;
	--color-accent-3: #8aa9f5;
	--color-glow: rgba(91, 141, 239, 0.5);

	--gradient-primary: linear-gradient(135deg, #2c6bed 0%, #5b8def 100%);
	--gradient-accent: linear-gradient(135deg, #2c6bed 0%, #8a4fee 100%);
	--gradient-text: linear-gradient(135deg, #5b8def 0%, #8aa9f5 100%);

	--radius-sm: 6px;
	--radius-md: 12px;
	--radius-lg: 18px;
	--radius-xl: 28px;

	--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
	--shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
	--shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
	--shadow-glow: 0 0 32px rgba(91, 141, 239, 0.25);

	--container: 1200px;
	--container-narrow: 820px;

	--font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
	--font-mono: "SF Mono", Menlo, Monaco, Consolas, "Roboto Mono", monospace;
}

/* =========================================
   リセット・ベース
   ========================================= */
*, *::before, *::after { box-sizing: border-box; }

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: var(--font-base);
	font-size: 16px;
	line-height: 1.7;
	color: var(--color-text);
	background-color: var(--color-bg);
	background-image:
		radial-gradient(ellipse at top left, rgba(44, 107, 237, 0.15) 0%, transparent 50%),
		radial-gradient(ellipse at bottom right, rgba(138, 79, 238, 0.1) 0%, transparent 50%);
	background-attachment: fixed;
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a {
	color: var(--color-accent-2);
	text-decoration: none;
	transition: color 0.2s ease;
}
a:hover { color: var(--color-accent-3); }

p { margin: 0 0 1.2em; }

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.6em;
	line-height: 1.3;
	font-weight: 700;
	letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.0rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); }
h4 { font-size: 1.15rem; }

hr {
	border: 0;
	border-top: 1px solid var(--color-border);
	margin: 2em 0;
}

code, pre {
	font-family: var(--font-mono);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
}

code { padding: 0.15em 0.4em; font-size: 0.9em; }
pre { padding: 1em; overflow-x: auto; }
pre code { background: none; border: 0; padding: 0; }

blockquote {
	margin: 1.5em 0;
	padding: 1em 1.5em;
	border-left: 3px solid var(--color-accent);
	background: var(--color-surface);
	border-radius: 0 var(--radius-md) var(--radius-md) 0;
	color: var(--color-text-dim);
}

ul, ol { padding-left: 1.5em; margin: 0 0 1.2em; }
li { margin-bottom: 0.4em; }

table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.5em 0;
	font-size: 0.95em;
}
th, td {
	padding: 0.7em 1em;
	border: 1px solid var(--color-border);
	text-align: left;
}
th {
	background: var(--color-surface-2);
	font-weight: 600;
}

::selection {
	background: var(--color-accent);
	color: #fff;
}

/* =========================================
   レイアウト共通
   ========================================= */
.st-container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 24px;
}
.st-container--narrow { max-width: var(--container-narrow); }

.st-section { padding: clamp(60px, 8vw, 100px) 0; }
.st-section--sm { padding: clamp(40px, 5vw, 60px) 0; }

/* =========================================
   ヘッダー
   ========================================= */
.st-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(10, 14, 26, 0.85);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--color-border);
}

.st-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 64px;
	gap: 24px;
}

.st-logo {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 800;
	font-size: 1.25rem;
	letter-spacing: -0.02em;
	color: var(--color-text);
}
.st-logo:hover { color: var(--color-accent-2); }

.st-logo__mark {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: var(--gradient-primary);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-weight: 900;
	font-size: 14px;
	box-shadow: var(--shadow-glow);
}

.st-logo__text {
	background: var(--gradient-text);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.st-nav { display: flex; align-items: center; gap: 4px; }
.st-nav ul {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 0;
	margin: 0;
}
.st-nav li { margin: 0; }
.st-nav a {
	display: inline-block;
	padding: 8px 14px;
	color: var(--color-text-dim);
	font-size: 0.94rem;
	font-weight: 500;
	border-radius: var(--radius-sm);
	transition: color 0.15s ease, background 0.15s ease;
}
.st-nav a:hover {
	color: var(--color-text);
	background: var(--color-surface);
}
.st-nav .current-menu-item > a,
.st-nav .current_page_item > a {
	color: var(--color-accent-2);
	background: var(--color-surface-2);
}

/* モバイル：ハンバーガー */
.st-menu-toggle {
	display: none;
	width: 40px;
	height: 40px;
	border: 1px solid var(--color-border);
	background: transparent;
	border-radius: var(--radius-sm);
	color: var(--color-text);
	cursor: pointer;
	align-items: center;
	justify-content: center;
	padding: 0;
}
.st-menu-toggle__bar {
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
	position: relative;
	transition: transform 0.2s ease;
}
.st-menu-toggle__bar::before,
.st-menu-toggle__bar::after {
	content: "";
	position: absolute;
	left: 0;
	width: 18px;
	height: 2px;
	background: currentColor;
	transition: transform 0.2s ease;
}
.st-menu-toggle__bar::before { top: -6px; }
.st-menu-toggle__bar::after  { top:  6px; }

@media (max-width: 768px) {
	.st-menu-toggle { display: inline-flex; }
	.st-nav {
		position: absolute;
		top: 64px;
		left: 0;
		right: 0;
		background: var(--color-bg-2);
		border-bottom: 1px solid var(--color-border);
		display: none;
		padding: 12px 16px;
	}
	.st-nav.is-open { display: block; }
	.st-nav ul {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}
	.st-nav a {
		display: block;
		padding: 12px 14px;
		border-bottom: 1px solid var(--color-border);
	}
	.st-nav li:last-child a { border-bottom: 0; }
}

/* =========================================
   ボタン
   ========================================= */
.st-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 28px;
	border-radius: var(--radius-md);
	font-weight: 600;
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
	border: 1px solid transparent;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, color 0.2s ease;
	text-decoration: none;
	white-space: nowrap;
}
.st-btn:hover { transform: translateY(-1px); }
.st-btn:active { transform: translateY(0); }

.st-btn--primary {
	background: var(--gradient-primary);
	color: #fff;
	box-shadow: var(--shadow-glow);
}
.st-btn--primary:hover {
	color: #fff;
	box-shadow: 0 0 40px rgba(91, 141, 239, 0.5);
}

.st-btn--ghost {
	background: var(--color-surface);
	color: var(--color-text);
	border-color: var(--color-border-strong);
}
.st-btn--ghost:hover {
	background: var(--color-surface-2);
	color: var(--color-text);
}

.st-btn--lg { padding: 18px 36px; font-size: 1.05rem; }
.st-btn--sm { padding: 10px 18px; font-size: 0.9rem; }

/* =========================================
   ヒーロー（front-page）
   ========================================= */
.st-hero {
	position: relative;
	padding: clamp(80px, 12vw, 140px) 0 clamp(60px, 8vw, 100px);
	overflow: hidden;
}

.st-hero__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}
.st-hero__bg::before,
.st-hero__bg::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	filter: blur(80px);
	opacity: 0.4;
}
.st-hero__bg::before {
	width: 500px; height: 500px;
	background: var(--color-accent);
	top: -150px; left: -100px;
	animation: floatA 20s ease-in-out infinite;
}
.st-hero__bg::after {
	width: 400px; height: 400px;
	background: #8a4fee;
	bottom: -100px; right: -80px;
	animation: floatB 18s ease-in-out infinite;
}

@keyframes floatA {
	0%, 100% { transform: translate(0, 0) scale(1); }
	50% { transform: translate(40px, 30px) scale(1.1); }
}
@keyframes floatB {
	0%, 100% { transform: translate(0, 0) scale(1); }
	50% { transform: translate(-30px, -40px) scale(1.15); }
}

.st-hero__inner {
	position: relative;
	z-index: 1;
	text-align: center;
	max-width: 900px;
	margin: 0 auto;
}

.st-hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	background: var(--color-surface-2);
	border: 1px solid var(--color-border-strong);
	border-radius: 999px;
	font-size: 0.85rem;
	color: var(--color-text-dim);
	margin-bottom: 24px;
}
.st-hero__badge::before {
	content: "";
	width: 8px;
	height: 8px;
	background: #4ade80;
	border-radius: 50%;
	box-shadow: 0 0 12px #4ade80;
}

.st-hero__title {
	font-size: clamp(2rem, 6vw, 3.8rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.15;
	margin-bottom: 24px;
}
.st-hero__title span {
	background: var(--gradient-text);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.st-hero__subtitle {
	font-size: clamp(1rem, 2vw, 1.2rem);
	color: var(--color-text-dim);
	margin-bottom: 40px;
	max-width: 640px;
	margin-left: auto;
	margin-right: auto;
}

.st-hero__form {
	display: flex;
	gap: 8px;
	max-width: 600px;
	margin: 0 auto 16px;
	background: var(--color-surface);
	border: 1px solid var(--color-border-strong);
	border-radius: var(--radius-lg);
	padding: 6px;
	box-shadow: var(--shadow-md);
}
.st-hero__form input[type="url"],
.st-hero__form input[type="text"] {
	flex: 1;
	background: transparent;
	border: 0;
	color: var(--color-text);
	padding: 12px 16px;
	font-size: 1rem;
	outline: none;
	min-width: 0;
}
.st-hero__form input::placeholder { color: var(--color-text-muted); }
.st-hero__form .st-btn {
	padding: 12px 24px;
	border-radius: var(--radius-md);
}

.st-hero__hint {
	font-size: 0.85rem;
	color: var(--color-text-muted);
}

/* =========================================
   セクションヘッダー
   ========================================= */
.st-section-head { text-align: center; margin-bottom: 60px; }
.st-section-head__eyebrow {
	display: inline-block;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--color-accent-2);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin-bottom: 12px;
}
.st-section-head__title {
	font-size: clamp(1.6rem, 3.5vw, 2.4rem);
	margin-bottom: 16px;
}
.st-section-head__lead {
	color: var(--color-text-dim);
	max-width: 640px;
	margin: 0 auto;
}

/* =========================================
   How it Works (3ステップ)
   ========================================= */
.st-steps {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	counter-reset: step;
}
.st-step {
	position: relative;
	padding: 32px 24px;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	transition: transform 0.2s ease, border-color 0.2s ease;
}
.st-step:hover {
	transform: translateY(-4px);
	border-color: var(--color-border-strong);
}
.st-step__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--gradient-primary);
	color: #fff;
	font-weight: 800;
	font-size: 1.2rem;
	margin-bottom: 16px;
	box-shadow: var(--shadow-glow);
}
.st-step h3 { margin-bottom: 8px; }
.st-step p { color: var(--color-text-dim); margin: 0; }

@media (max-width: 768px) {
	.st-steps { grid-template-columns: 1fr; }
}

/* =========================================
   特徴グリッド
   ========================================= */
.st-features {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 20px;
}
.st-feature {
	padding: 28px 24px;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	transition: border-color 0.2s ease, background 0.2s ease;
}
.st-feature:hover {
	border-color: var(--color-border-strong);
	background: var(--color-surface-2);
}
.st-feature__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: var(--radius-md);
	background: linear-gradient(135deg, rgba(44, 107, 237, 0.2), rgba(138, 79, 238, 0.2));
	border: 1px solid var(--color-border-strong);
	color: var(--color-accent-2);
	margin-bottom: 16px;
	font-size: 1.4rem;
}
.st-feature h3 { font-size: 1.1rem; margin-bottom: 8px; }
.st-feature p { color: var(--color-text-dim); margin: 0; font-size: 0.95rem; }

/* =========================================
   サンプル例（カード）
   ========================================= */
.st-examples {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
}
.st-example {
	padding: 24px;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
}
.st-example__url {
	font-family: var(--font-mono);
	font-size: 0.85rem;
	color: var(--color-accent-2);
	margin-bottom: 8px;
	word-break: break-all;
}
.st-example__name { font-weight: 700; margin-bottom: 8px; }
.st-example__genre {
	display: inline-block;
	font-size: 0.8rem;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--color-surface-2);
	border: 1px solid var(--color-border);
	color: var(--color-text-dim);
}

/* =========================================
   仕組み解説（diagram）
   ========================================= */
.st-pipeline {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	align-items: stretch;
	position: relative;
}
.st-pipeline__node {
	padding: 20px;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	text-align: center;
}
.st-pipeline__node strong {
	display: block;
	color: var(--color-accent-2);
	font-size: 0.85rem;
	margin-bottom: 4px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}
.st-pipeline__node span { color: var(--color-text-dim); font-size: 0.9rem; }

@media (max-width: 768px) {
	.st-pipeline { grid-template-columns: 1fr; }
}

/* =========================================
   最新記事セクション（front-page）
   ========================================= */
.st-recent-posts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
}
.st-recent-post {
	display: flex;
	flex-direction: column;
	padding: 24px;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	color: var(--color-text);
	text-decoration: none;
	transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
	height: 100%;
}
.st-recent-post:hover {
	transform: translateY(-4px);
	border-color: var(--color-border-strong);
	background: var(--color-surface-2);
	color: var(--color-text);
}
.st-recent-post__date {
	font-family: var(--font-mono);
	font-size: 0.8rem;
	color: var(--color-text-muted);
	margin-bottom: 10px;
	letter-spacing: 0.05em;
}
.st-recent-post__title {
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.5;
	margin: 0 0 12px;
	color: var(--color-text);
}
.st-recent-post__excerpt {
	font-size: 0.92rem;
	color: var(--color-text-dim);
	margin: 0 0 16px;
	line-height: 1.6;
	flex: 1;
}
.st-recent-post__more {
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--color-accent-2);
	margin-top: auto;
}

/* =========================================
   CTAセクション
   ========================================= */
.st-cta {
	text-align: center;
	padding: 60px 32px;
	background: linear-gradient(135deg, rgba(44, 107, 237, 0.15), rgba(138, 79, 238, 0.15));
	border: 1px solid var(--color-border-strong);
	border-radius: var(--radius-xl);
	box-shadow: var(--shadow-glow);
}
.st-cta h2 { margin-bottom: 16px; }
.st-cta p { color: var(--color-text-dim); margin-bottom: 32px; }

/* =========================================
   ページ本文（page.php / single.php）
   ========================================= */
.st-page {
	padding: clamp(60px, 8vw, 100px) 0;
}
.st-page__header {
	text-align: center;
	margin-bottom: 48px;
}
.st-page__title {
	font-size: clamp(1.8rem, 4vw, 2.6rem);
	margin-bottom: 12px;
}
.st-page__title span {
	background: var(--gradient-text);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}
.st-page__meta {
	color: var(--color-text-muted);
	font-size: 0.9rem;
}

.st-content {
	max-width: var(--container-narrow);
	margin: 0 auto;
	font-size: 1.05rem;
}
.st-content h2 {
	margin-top: 2.4em;
	padding-bottom: 0.4em;
	border-bottom: 1px solid var(--color-border);
}
.st-content h3 { margin-top: 1.8em; }
.st-content img {
	border-radius: var(--radius-md);
	margin: 1em 0;
}

/* FAQ用 (details/summary) */
.st-content details {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	padding: 0;
	margin-bottom: 12px;
	overflow: hidden;
}
.st-content details summary {
	padding: 18px 24px;
	cursor: pointer;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	list-style: none;
	transition: background 0.15s ease;
}
.st-content details summary::-webkit-details-marker { display: none; }
.st-content details summary::after {
	content: "+";
	font-size: 1.4rem;
	color: var(--color-accent-2);
	transition: transform 0.2s ease;
	flex-shrink: 0;
}
.st-content details[open] summary::after { content: "−"; }
.st-content details summary:hover { background: var(--color-surface-2); }
.st-content details > *:not(summary) {
	padding: 0 24px 18px;
	color: var(--color-text-dim);
}

/* =========================================
   再生ページ
   ========================================= */
.st-play-page {
	padding: clamp(40px, 6vw, 80px) 0 clamp(60px, 8vw, 100px);
}

.st-play-page__head {
	text-align: center;
	max-width: 720px;
	margin: 0 auto clamp(28px, 4vw, 44px);
}
.st-play-page__title-h1 {
	font-size: clamp(1.8rem, 4vw, 2.4rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	margin-bottom: 16px;
}
.st-play-page__title-h1 span {
	background: var(--gradient-text);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}
.st-play-page__title-h1 em {
	font-style: normal;
	font-weight: 600;
	letter-spacing: 0.02em;
}
.st-play-page__lead {
	color: var(--color-text-dim);
	font-size: 1rem;
	margin: 0 auto 20px;
	max-width: 600px;
}
.st-play-page__lead strong {
	color: var(--color-text);
	font-weight: 700;
}

/* 解析対象URLの表示 */
.st-play-page__source {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 6px 14px 6px 6px;
	background: var(--color-surface-2);
	border: 1px solid var(--color-border-strong);
	border-radius: 999px;
	max-width: 100%;
	overflow: hidden;
}
.st-play-page__source-label {
	display: inline-block;
	padding: 4px 12px;
	background: var(--gradient-primary);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	border-radius: 999px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	white-space: nowrap;
}
.st-play-page__source-url {
	font-family: var(--font-mono);
	font-size: 0.85rem;
	color: var(--color-accent-3);
	background: transparent;
	border: 0;
	padding: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 60vw;
}

.st-play-page__container {
	max-width: 980px;
	margin: 0 auto;
}
.st-play-page__content > p:empty { display: none; }

.st-play-page__footer-cta {
	margin-top: 32px;
	text-align: center;
}

/* =========================================
   htmlsong-wp プラグインのダークモードオーバーライド
   プラグイン側CSSは白カード前提なので、ダークテーマに合わせて全面上書き
   ========================================= */

/* 親カード — ライトカードを取り払い、ダークなglass surfaceに */
.htmlsong-app .htmlsong-card {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
	color: var(--color-text);
	padding: clamp(20px, 3vw, 28px);
}
.htmlsong-app .htmlsong-card h2 {
	color: var(--color-text);
}

/* ステータスバッジ */
.htmlsong-app .htmlsong-status {
	background: var(--color-surface-2);
	border: 1px dashed var(--color-border-strong);
	color: var(--color-text-dim);
	border-radius: var(--radius-md);
}

/* ボタン群 */
.htmlsong-app .htmlsong-btn {
	background: var(--color-surface-2);
	border: 1px solid var(--color-border-strong);
	color: var(--color-text);
	border-radius: var(--radius-md);
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.htmlsong-app .htmlsong-btn:hover {
	background: rgba(91, 141, 239, 0.15);
	border-color: var(--color-accent-2);
	filter: none;
}
.htmlsong-app .htmlsong-btn-primary {
	background: var(--gradient-primary);
	border-color: transparent;
	color: #fff;
	box-shadow: var(--shadow-glow);
}
.htmlsong-app .htmlsong-btn-primary:hover {
	color: #fff;
	box-shadow: 0 0 40px rgba(91, 141, 239, 0.4);
}

/* ローディングオーバーレイ */
.htmlsong-app .htmlsong-loading {
	background: rgba(10, 14, 26, 0.85);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-radius: var(--radius-lg);
}
.htmlsong-app .htmlsong-loading-inner {
	background: var(--color-surface);
	border: 1px solid var(--color-border-strong);
	color: var(--color-text);
}
.htmlsong-app .htmlsong-loading-text {
	color: var(--color-text);
}
.htmlsong-app .htmlsong-spinner {
	border-color: var(--color-border-strong);
	border-top-color: var(--color-accent-2);
}

/* サイトカード（解析対象URLの情報表示） */
.htmlsong-app .htmlsong-sitecard {
	background: var(--color-surface-2);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
}
.htmlsong-app .htmlsong-sitecard a { color: inherit; }
.htmlsong-app .htmlsong-sitecard .img { background: var(--color-bg-3); }
.htmlsong-app .htmlsong-sitecard .title { color: var(--color-text); }
.htmlsong-app .htmlsong-sitecard .desc  { color: var(--color-text-dim); }
.htmlsong-app .htmlsong-sitecard .meta  { color: var(--color-text-muted); }
.htmlsong-app .htmlsong-sitecard .favicon { background: var(--color-bg-3); }

/* インラインコントロール（音量スライダー等） */
.htmlsong-app .htmlsong-inline span {
	color: var(--color-text-dim);
}
.htmlsong-app input[type="range"] {
	accent-color: var(--color-accent-2);
}

/* ビジュアライザ */
.htmlsong-app .htmlsong-viz {
	background: var(--color-bg);
	border: 1px solid var(--color-border-strong);
	border-radius: var(--radius-md);
}

/* ===== Explainセクション（解析結果の表示） ===== */

/* ミュージック情報ヘッダーカード */
.htmlsong-app .htmlsong-music-info {
	background: linear-gradient(135deg, rgba(44, 107, 237, 0.18), rgba(138, 79, 238, 0.18));
	border: 1px solid var(--color-border-strong);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	padding: 20px 24px;
}
.htmlsong-app .htmlsong-bpm-num {
	background: var(--gradient-text);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}
.htmlsong-app .htmlsong-bpm-label {
	color: var(--color-text-dim);
}

/* キーバッジ */
.htmlsong-app .htmlsong-key-badge {
	background: var(--color-surface-2);
	border: 1px solid var(--color-border-strong);
	color: var(--color-text);
}

/* セクションカード（HTML→音楽変換テーブル等） */
.htmlsong-app .htmlsong-section-card {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	padding: 22px 24px;
	margin-bottom: 16px;
	color: var(--color-text);
}
.htmlsong-app .htmlsong-section-title {
	color: var(--color-text);
	font-size: 1.05rem;
	margin: 0 0 12px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--color-border);
}
.htmlsong-app .htmlsong-section-desc {
	color: var(--color-text-dim);
}

/* highlight section（この曲の特徴） */
.htmlsong-app .htmlsong-highlight-card {
	background: linear-gradient(135deg, rgba(44, 107, 237, 0.12), rgba(138, 79, 238, 0.12));
	border-color: var(--color-border-strong);
}

/* HTML→音楽 変換テーブル */
.htmlsong-app .htmlsong-convert-table {
	background: transparent;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	overflow: hidden;
}
.htmlsong-app .htmlsong-convert-table thead th {
	background: var(--color-surface-2);
	color: var(--color-text-dim);
	border-bottom: 1px solid var(--color-border);
}
.htmlsong-app .htmlsong-convert-table tbody td {
	background: transparent;
	color: var(--color-text);
	border-bottom: 1px solid var(--color-border);
}
.htmlsong-app .htmlsong-convert-table tbody tr:hover {
	background: var(--color-surface-2);
}
.htmlsong-app .htmlsong-convert-table strong {
	color: var(--color-accent-2);
}

/* 楽曲構成・特徴ボックス */
.htmlsong-app .htmlsong-music-char {
	background: var(--color-surface-2);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
}
.htmlsong-app .htmlsong-music-char h4 {
	color: var(--color-text);
}
.htmlsong-app .htmlsong-music-char ul {
	color: var(--color-text-dim);
}
.htmlsong-app .htmlsong-music-char li b {
	color: var(--color-text);
}

/* コード進行ボックス */
.htmlsong-app .htmlsong-prog-section {
	background: var(--color-surface-2);
	border: 1px solid var(--color-border);
	color: var(--color-text-dim);
}

/* トラック統計 */
.htmlsong-app .htmlsong-track-stat {
	background: var(--color-surface-2);
	border: 1px solid var(--color-border);
}
.htmlsong-app .htmlsong-track-stat:hover {
	border-color: var(--color-border-strong);
	box-shadow: 0 4px 12px rgba(44, 107, 237, 0.15);
}
.htmlsong-app .htmlsong-track-stat-num {
	color: var(--color-text);
}
.htmlsong-app .htmlsong-track-stat-label {
	color: var(--color-text-muted);
}
.htmlsong-app .htmlsong-track-stat-total {
	background: linear-gradient(135deg, rgba(44, 107, 237, 0.18), rgba(91, 141, 239, 0.12));
	border-color: var(--color-border-strong);
}

/* 特徴バー */
.htmlsong-app .htmlsong-feature-bars {
	background: var(--color-surface-2);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
}
.htmlsong-app .htmlsong-feature-bars h4 {
	color: var(--color-text);
}
.htmlsong-app .htmlsong-bar-label {
	color: var(--color-text-dim);
}
.htmlsong-app .htmlsong-bar-track {
	background: var(--color-bg-3);
}
.htmlsong-app .htmlsong-bar-val {
	color: var(--color-text);
}

/* 特徴グリッド */
.htmlsong-app .htmlsong-feature-grid {
	gap: 12px;
}
.htmlsong-app .htmlsong-feature-item {
	background: var(--color-surface-2);
	border: 1px solid var(--color-border);
}
.htmlsong-app .htmlsong-feature-label {
	color: var(--color-text-muted);
}
.htmlsong-app .htmlsong-feature-value {
	color: var(--color-text);
}
.htmlsong-app .htmlsong-feature-reason {
	color: var(--color-text-dim);
}

/* アコーディオン (詳細データ) */
.htmlsong-app .htmlsong-details {
	background: var(--color-surface-2);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
}
.htmlsong-app .htmlsong-details summary {
	background: transparent;
	color: var(--color-accent-2);
}
.htmlsong-app .htmlsong-details summary:hover {
	background: var(--color-surface);
}
.htmlsong-app .htmlsong-details-inner {
	color: var(--color-text-dim);
}
.htmlsong-app .htmlsong-details-inner h4 {
	color: var(--color-text);
}

.htmlsong-app .htmlsong-explain .htmlsong-kv {
	background: var(--color-surface-2);
	border-color: var(--color-border);
}
.htmlsong-app .htmlsong-explain .htmlsong-kv .k {
	color: var(--color-text-muted);
}
.htmlsong-app .htmlsong-explain .htmlsong-kv .v {
	color: var(--color-text);
}

.htmlsong-app .htmlsong-explain table {
	background: transparent;
	border-color: var(--color-border);
}
.htmlsong-app .htmlsong-explain th {
	background: var(--color-surface);
	color: var(--color-text-dim);
}
.htmlsong-app .htmlsong-explain td {
	color: var(--color-text);
	border-color: var(--color-border);
}
.htmlsong-app .htmlsong-explain .htmlsong-badge {
	background: var(--color-surface);
	border-color: var(--color-border-strong);
	color: var(--color-accent-2);
}

/* JSON表示 */
.htmlsong-app .htmlsong-json {
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	color: #cbd5e1;
}

/* "URLパラメータが無い" 旧テーマへ戻すボタンの色補正 */
.htmlsong-app .htmlsong-missing-url a {
	display: inline-block;
}

/* =========================================
   投稿一覧 (archive)
   ========================================= */
.st-posts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 24px;
}
.st-post-card {
	display: flex;
	flex-direction: column;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	overflow: hidden;
	transition: transform 0.2s ease, border-color 0.2s ease;
}
.st-post-card:hover {
	transform: translateY(-4px);
	border-color: var(--color-border-strong);
}
.st-post-card__thumb {
	aspect-ratio: 16/9;
	background: var(--gradient-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-weight: 700;
	font-size: 1.4rem;
}
.st-post-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.st-post-card__body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.st-post-card__title {
	font-size: 1.1rem;
	margin-bottom: 8px;
}
.st-post-card__title a { color: var(--color-text); }
.st-post-card__title a:hover { color: var(--color-accent-2); }
.st-post-card__date {
	color: var(--color-text-muted);
	font-size: 0.85rem;
	margin-bottom: 12px;
}
.st-post-card__excerpt {
	color: var(--color-text-dim);
	font-size: 0.95rem;
	margin-bottom: 16px;
	flex: 1;
}
.st-post-card__more {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--color-accent-2);
	margin-top: auto;
}

/* =========================================
   ページネーション
   ========================================= */
.st-pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 48px;
}
.st-pagination .page-numbers {
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-sm);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	color: var(--color-text-dim);
	font-weight: 600;
	transition: all 0.15s ease;
}
.st-pagination .page-numbers.current {
	background: var(--gradient-primary);
	color: #fff;
	border-color: transparent;
}
.st-pagination .page-numbers:hover:not(.current) {
	color: var(--color-text);
	background: var(--color-surface-2);
}

/* =========================================
   サイドバー
   ========================================= */
.st-with-sidebar {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 48px;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 24px;
}
.st-sidebar {
	display: flex;
	flex-direction: column;
	gap: 24px;
}
.st-widget {
	padding: 24px;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
}
.st-widget__title {
	font-size: 1rem;
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--color-border);
}
.st-widget ul { list-style: none; padding: 0; margin: 0; }
.st-widget li { margin-bottom: 8px; }

@media (max-width: 900px) {
	.st-with-sidebar { grid-template-columns: 1fr; }
}

/* =========================================
   検索フォーム
   ========================================= */
.st-search-form {
	display: flex;
	gap: 8px;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	padding: 4px;
}
.st-search-form input[type="search"] {
	flex: 1;
	background: transparent;
	border: 0;
	color: var(--color-text);
	padding: 10px 14px;
	font-size: 0.95rem;
	outline: none;
	min-width: 0;
}
.st-search-form input::placeholder { color: var(--color-text-muted); }

/* =========================================
   404ページ
   ========================================= */
.st-404 {
	text-align: center;
	padding: 100px 24px;
}
.st-404__num {
	font-size: clamp(5rem, 14vw, 9rem);
	font-weight: 900;
	background: var(--gradient-text);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	line-height: 1;
	margin-bottom: 16px;
}

/* =========================================
   フッター
   ========================================= */
.st-footer {
	margin-top: 80px;
	padding: 60px 0 24px;
	background: var(--color-bg-2);
	border-top: 1px solid var(--color-border);
}
.st-footer__grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 48px;
	margin-bottom: 40px;
}
.st-footer__brand p {
	color: var(--color-text-dim);
	font-size: 0.95rem;
	margin: 12px 0 0;
	max-width: 360px;
}
.st-footer__col h4 {
	font-size: 0.9rem;
	color: var(--color-text-muted);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 16px;
}
.st-footer__col ul { list-style: none; padding: 0; margin: 0; }
.st-footer__col li { margin-bottom: 10px; }
.st-footer__col a {
	color: var(--color-text-dim);
	font-size: 0.95rem;
}
.st-footer__col a:hover { color: var(--color-accent-2); }

.st-footer__menu {
	padding: 16px 0;
	border-top: 1px solid var(--color-border);
	margin-bottom: 8px;
}
.st-footer__menu ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 28px;
	justify-content: center;
}
.st-footer__menu li { margin: 0; }
.st-footer__menu a {
	color: var(--color-text-dim);
	font-size: 0.9rem;
	transition: color 0.15s ease;
}
.st-footer__menu a:hover { color: var(--color-accent-2); }

.st-footer__bottom {
	padding-top: 24px;
	border-top: 1px solid var(--color-border);
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
	color: var(--color-text-muted);
	font-size: 0.85rem;
}

@media (max-width: 768px) {
	.st-footer__grid { grid-template-columns: 1fr; gap: 32px; }
	.st-footer__bottom { justify-content: center; text-align: center; }
}

/* =========================================
   フォーム共通
   ========================================= */
.st-form input[type="text"],
.st-form input[type="email"],
.st-form input[type="url"],
.st-form input[type="tel"],
.st-form textarea,
.st-form select,
input[type="text"].wpcf7-form-control,
input[type="email"].wpcf7-form-control,
input[type="url"].wpcf7-form-control,
textarea.wpcf7-form-control {
	width: 100%;
	padding: 12px 16px;
	background: var(--color-surface);
	border: 1px solid var(--color-border-strong);
	border-radius: var(--radius-md);
	color: var(--color-text);
	font-size: 1rem;
	font-family: inherit;
	outline: none;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.st-form input:focus,
.st-form textarea:focus,
input.wpcf7-form-control:focus,
textarea.wpcf7-form-control:focus {
	border-color: var(--color-accent-2);
	background: var(--color-surface-2);
}
.st-form label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.95rem; }
.st-form .form-row { margin-bottom: 20px; }
.st-form textarea { min-height: 140px; resize: vertical; }

/* =========================================
   ユーティリティ
   ========================================= */
.st-text-center { text-align: center; }
.st-mt-0 { margin-top: 0; }
.st-mb-0 { margin-bottom: 0; }
.st-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* WPコメント関連（最低限） */
.comments-area { margin-top: 60px; }
.comment-list { list-style: none; padding: 0; }
.comment-list li { padding: 16px 0; border-top: 1px solid var(--color-border); }

/* WP標準ブロック微調整 */
.wp-block-image figcaption { color: var(--color-text-muted); font-size: 0.9rem; text-align: center; }
.wp-block-quote { border-left: 3px solid var(--color-accent); padding-left: 1.2em; }
.wp-block-button__link {
	background: var(--gradient-primary);
	border-radius: var(--radius-md);
	padding: 14px 28px;
}

/* スクロールバー（暗色テーマ向け） */
@media (pointer: fine) {
	::-webkit-scrollbar { width: 10px; height: 10px; }
	::-webkit-scrollbar-track { background: var(--color-bg); }
	::-webkit-scrollbar-thumb {
		background: var(--color-bg-3);
		border-radius: 5px;
		border: 2px solid var(--color-bg);
	}
	::-webkit-scrollbar-thumb:hover { background: var(--color-border-strong); }
}
