/* Hügelton Instruments Design System - Documentation */
@import url('https://api.fontshare.com/v2/css?f[]=clash-display@400,700&display=swap');

:root {
	/* Grayscale palette - aligned with main site */
	--white: #ffffff;
	--gray-50: #fafafa;
	--gray-100: #f5f5f5;
	--gray-200: #e5e5e5;
	--gray-300: #d4d4d4;
	--gray-400: #a3a3a3;
	--gray-500: #737373;
	--gray-600: #525252;
	--gray-700: #404040;
	--gray-800: #262626;
	--gray-900: #171717;
	--black: #000000;

	/* Applied colors - Light mode */
	--color-bg-primary: var(--white);
	--color-bg-secondary: var(--gray-50);
	--color-bg-tertiary: var(--gray-100);
	--color-text-primary: var(--gray-900);
	--color-text-secondary: var(--gray-600);
	--color-text-tertiary: var(--gray-500);
	--color-border: var(--gray-200);
	--color-accent: var(--gray-600);
	--color-accent-hover: var(--gray-800);
	--color-code-bg: var(--gray-100);
	--color-code-text: #bf4040;
	--color-blockquote-bg: var(--gray-50);
	--color-blockquote-border: var(--gray-200);
	--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
	--shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);

	/* Layout variables - Full column layout */
	--content-max-width: 70rem;
	--header-height: 3.5rem;
	
	/* Link colors */
	--link-color: var(--gray-600);
	--link-hover: var(--gray-800);
	--link-visited: var(--gray-500);
}

/* Dark mode - aligned with main site */
@media (prefers-color-scheme: dark) {
	:root {
		--color-bg-primary: var(--gray-900);
		--color-bg-secondary: var(--gray-800);
		--color-bg-tertiary: var(--gray-700);
		--color-text-primary: var(--gray-100);
		--color-text-secondary: var(--gray-300);
		--color-text-tertiary: var(--gray-400);
		--color-border: var(--gray-700);
		--color-accent: var(--gray-400);
		--color-accent-hover: var(--gray-200);
		--color-code-bg: var(--gray-800);
		--color-code-text: #ff8080;
		--color-blockquote-bg: var(--gray-800);
		--color-blockquote-border: var(--gray-700);
		--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
		--shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
		
		/* Dark mode link colors */
		--link-color: var(--gray-300);
		--link-hover: var(--gray-100);
		--link-visited: var(--gray-400);
	}
}

/* Base styles - aligned with main site */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--color-text-primary);
	line-height: 1.6;
	font-size: 16px;
	font-weight: 400;
	background-color: var(--color-bg-primary);
	transition: background-color 0.3s ease, color 0.3s ease;
	margin: 0;
	padding: 0;
}

/* Float Menu - aligned with main site */
.float-menu {
	position: fixed;
	top: 2rem;
	left: 2rem;
	z-index: 1000;
	animation: fadeInSlide 0.6s ease-out;
}

.menu-container {
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 28px;
	padding: 0.75rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

@media (prefers-color-scheme: dark) {
	.menu-container {
		background: rgba(0, 0, 0, 0.2);
		border-color: rgba(255, 255, 255, 0.1);
	}
}

.menu-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	transition: background-color 0.2s;
}

.menu-logo:hover {
	background-color: rgba(255, 255, 255, 0.1);
}

.logo-icon {
	width: 24px;
	height: 24px;
	color: var(--color-text-primary);
}

.menu-nav {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.menu-link {
	color: var(--color-text-primary);
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	transition: background-color 0.2s;
	font-size: 24px;
}

.menu-link:hover {
	background-color: rgba(255, 255, 255, 0.1);
	text-decoration: none;
}

@keyframes fadeInSlide {
	from {
		opacity: 0;
		transform: translateX(-20px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* Links - explicit styling */
a {
	color: var(--link-color);
	text-decoration: underline;
	text-decoration-style: wavy;
	text-decoration-color: var(--color-accent);
	text-underline-offset: 4px;
	text-decoration-thickness: 2px;
	transition: all 0.2s;
}

a:hover {
	color: var(--link-hover);
	text-decoration-color: var(--link-hover);
	text-underline-offset: 6px;
}

a:visited {
	color: var(--link-visited);
}

/* Full column layout */
.page-container {
	display: block;
	min-height: 100vh;
	width: 100%;
}

/* サイトヘッダー */
.site-header {
	background: var(--color-bg-secondary);
	color: var(--color-text-primary);
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 50;
	border-bottom: 1px solid var(--color-border);
	box-shadow: var(--shadow-sm);
	height: 3rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 2rem;
	color: currentColor;
}

.header-controls {
	display: none;
}

.language-switcher {
	font-size: 0.875rem;
}

.language-switcher a {
	color: var(--color-text-secondary);
	text-decoration: none;
	padding: 0.25rem 0.5rem;
	border-radius: 0.25rem;
	transition: background-color 0.2s;
}

.language-switcher a:hover {
	background-color: var(--color-bg-tertiary);
	color: var(--color-text-primary);
}

.help-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	color: var(--color-text-secondary);
	text-decoration: none;
	border-radius: 0.25rem;
	transition: all 0.2s ease;
	font-size: 1.125rem;
}

.help-button:hover {
	background-color: var(--color-bg-tertiary);
	color: var(--color-text-primary);
	transform: scale(1.05);
}

.site-header-logo {
	height: 2rem;
	width: 2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	color: currentColor;
}

.site-header-logo a {
	color: currentColor;
}
/* Floating TOC */
.sidebar {
	position: fixed;
	top: 7rem;
	right: 2rem;
	bottom: 2rem;
	width: 280px;
	height: calc(100vh - 9rem);
	overflow-y: auto;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid var(--color-border);
	border-radius: 12px;
	padding: 1rem;
	box-shadow: var(--shadow-md);
	z-index: 100;
	transition: all 0.3s ease;
	transform: translateX(0);
}

@media (min-width: 769px) {
	/* デスクトップでは通常表示 */
	.sidebar {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
	}

	/* デスクトップでhiddenクラス時のみ非表示 */
	.sidebar.hidden {
		transform: translateX(calc(100% + 2rem));
		opacity: 0;
		pointer-events: none;
	}
}

@media (prefers-color-scheme: dark) {
	.sidebar {
		background: rgba(0, 0, 0, 0.85);
		border-color: var(--color-border);
	}
}

/* Floating controls - top right */
.floating-controls {
	position: fixed;
	top: 2rem;
	right: 2rem;
	z-index: 1000;
	display: flex;
	gap: 0.75rem;
	align-items: center;
}

.control-group {
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 28px;
	padding: 0.75rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

@media (prefers-color-scheme: dark) {
	.control-group {
		background: rgba(0, 0, 0, 0.2);
		border-color: rgba(255, 255, 255, 0.1);
	}
}

.control-button {
	color: var(--color-text-primary);
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	transition: background-color 0.2s;
	border: none;
	background: none;
	cursor: pointer;
	font-size: 20px;
}

.control-button:hover {
	background-color: rgba(255, 255, 255, 0.1);
	text-decoration: none;
	color: var(--color-text-primary);
}

/* TOC toggle button - hide on desktop, show on mobile */
.toc-toggle {
	display: none;
}

@media (max-width: 768px) {
	.toc-toggle {
		display: flex;
	}
}

/* Hide old controls */
.desktop-controls,
.mobile-controls {
	display: none !important;
}

/* Main content - adjusted for floating TOC */
.main-content-wrapper {
	width: 100%;
	padding: 6rem 2rem 2rem 3rem;
	min-height: calc(100vh - 8rem);
}

/* Adjust content margin on desktop to avoid TOC overlap */
@media (min-width: 769px) {
	.main-content-wrapper {
		padding-right: 320px;
	}
}

/* Main content container */
.main-content {
	max-width: var(--content-max-width);
	margin: 0 auto;
	padding: 0;
}

/* コンテンツ基本スタイル */
.content {
	width: 100%;
	margin: 0 auto;
	font-size: 1.1rem;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.75);
}

@media (prefers-color-scheme: light) {
	.content {
		color: rgba(23, 23, 23, 0.75);
	}
}

/* 警告ボックス - ライトモード対応 */
.content div[style*="background-color: #fff3cd"] {
	background-color: rgba(255, 194, 0, 0.11) !important;
	border-color: rgba(255, 194, 0, 0.3) !important;
	line-height: 1.4 !important;
	color: rgba(255, 200, 50, 0.95) !important;
}

.content div[style*="background-color: #fff3cd"] p {
	margin: 0 !important;
	color: inherit !important;
}

.content div[style*="background-color: #f8d7da"] {
	background-color: rgba(220, 53, 69, 0.11) !important;
	border-color: rgba(220, 53, 69, 0.3) !important;
	line-height: 1.4 !important;
	color: rgba(255, 120, 120, 0.95) !important;
}

.content div[style*="background-color: #f8d7da"] p {
	margin: 0 !important;
	color: inherit !important;
}

/* 外部リンクアイコン */
.external-link {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	text-decoration: none;
	color: var(--color-accent);
	transition: color 0.2s;
}

.external-link:hover {
	color: var(--color-accent-hover);
	text-decoration: underline;
}

.external-link::after {
	content: "↗";
	font-size: 0.875em;
	opacity: 0.7;
}

/* Light/Dark mode image switching */
img[src$="#light-mode"] {
	display: block;
}

img[src$="#dark-mode"] {
	display: none;
}

@media (prefers-color-scheme: dark) {
	img[src$="#light-mode"] {
		display: none;
	}
	
	img[src$="#dark-mode"] {
		display: block;
	}
}

/* TEM image sizing */
table img[src*="tem_led"], 
table img[alt*="LED"],
table img[alt*="シアン"],
table img[alt*="緑色"],
table img[alt*="青色"],
table img[alt*="オレンジ"],
table img[alt*="ピンク"],
table img[alt*="マゼンタ"],
table img[alt*="Cyan"],
table img[alt*="Green"],
table img[alt*="Blue"],
table img[alt*="Orange"],
table img[alt*="Pink"],
table img[alt*="Magenta"] {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

/* Device back image sizing */
img[src*="tem_back_s"],
img[alt*="個体ID表示位置"],
img[alt*="Individual ID Location"] {
    width: 300px;
    height: auto;
    object-fit: contain;
}

/* TEM screenshot sizing */
img[src*="image_002"],
img[src*="image_003"],
img[src*="image_004"],
img[src*="image_005"],
img[src*="image_006"],
img[src*="image_007"],
img[src*="image_008"],
img[src*="image_009"],
img[src*="image_010"],
img[src*="image_011"],
img[src*="image_012"] {
    max-width: 600px;
    width: 100%;
    height: auto;
    object-fit: contain;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin: 1rem 0;
}

/* PC時のコンテンツパディング */
@media (min-width: 769px) {
	.content {
		padding-right: 1em;
	}
}

/* 段落のスタイリング */
.content p {
	margin: 1.5em 0;
	font-size: 1.1rem;
	line-height: 1.7;
	color: rgba(23, 23, 23, 0.9); /* Light mode */
}

@media (prefers-color-scheme: dark) {
	.content p {
		color: rgba(245, 245, 245, 0.9); /* Dark mode */
	}
}

/* リストのスタイリング */
.content ul,
.content ol {
	margin: 1.5em 0;
	padding-left: 2em;
	line-height: 1.7;
	color: rgba(23, 23, 23, 0.9); /* Light mode */
}

@media (prefers-color-scheme: dark) {
	.content ul,
	.content ol {
		color: rgba(245, 245, 245, 0.9); /* Dark mode */
	}
}

.content li {
	margin: 0.5em 0;
}

/* テーブルの可読性向上 */
.content table {
	margin: 2em 0;
	font-size: 1rem;
	line-height: 1.6;
}

.content td,
.content th {
	padding: 0.75em 1em;
}

/* Remove sticky positioning from first h1 */
.content h1:first-child {
	margin: 2em 0 2rem 0;
	padding: 0;
}

/* メインヘッダー */
.main-header {
	background: var(--color-bg-secondary);
	border-bottom: 1px solid var(--color-border);
	padding: 2rem 1rem;
	margin-bottom: 2rem;
}

/* サイドバーナビゲーション */
#sidebar-toc {
	padding: 0;
}

#sidebar-toc ul {
	list-style: none;
	padding-left: 1rem;
	margin: 0;
	line-height: 1.4;
}

#sidebar-toc a {
	color: var(--color-text-secondary);
	text-decoration: none;
	transition: color 0.2s;
	padding: 0.25rem 0.75rem;
	/* border-radius: 0.375rem; */
	display: block;
	margin: 0.125rem 0;
	line-height: 1.4;
}

#sidebar-toc a:hover {
	color: var(--color-accent);
	background: var(--color-bg-tertiary);
}

#sidebar-toc a.active {
	border-left: 2px solid var(--color-accent);
	margin-left: -2px;
}
.main-aside {
	display: flex;
	align-items: center;
	justify-content: start;
	padding: 2em 1em 0 1em;
	padding-left: calc(var(--sidebar-width) + 1rem);
	border-top: 1px solid var(--color-border);
}

/* Footer - aligned with main site */
footer {
	padding: 4rem 2rem;
	border-top: 1px solid var(--color-border);
	width: 100%;
}

.footer-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	max-width: 1200px;
	margin: 0 auto;
}

.footer-left {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.footer-logo {
	font-family: "Clash Display", "ClashDisplay", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-weight: 600;
	font-size: 1.125rem;
	color: var(--color-text-primary);
	letter-spacing: 0.1em;
}

.footer-location {
	font-family: "Clash Display", "ClashDisplay", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 0.875rem;
	opacity: 0.6;
	color: var(--color-text-primary);
	letter-spacing: 0.1em;
}

.footer-right {
	display: flex;
	align-items: center;
}

.social-links {
	display: flex;
	gap: 1rem;
}

.social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	color: var(--color-text-primary);
	text-decoration: none;
	opacity: 0.6;
	transition: all 0.2s;
	font-size: 20px;
}

.social-link:hover {
	opacity: 1;
	background-color: rgba(255, 255, 255, 0.1);
	text-decoration: none;
}

.main-footer {
	display: none;
}

/* Product grid for index pages */
.product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 2rem;
	margin: 2rem 0;
}

.product-card {
	background: var(--color-bg-secondary);
	border: 1px solid var(--color-border);
	border-radius: 12px;
	overflow: hidden;
	transition: transform 0.2s, box-shadow 0.2s;
	text-decoration: none;
	color: inherit;
	display: block;
}

.product-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-md);
	text-decoration: none;
	color: inherit;
}

.product-card-image {
	width: 100%;
	height: 180px;
	background: #1f1e1e;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 3rem;
	color: var(--color-text-tertiary);
	overflow: hidden;
	border-radius: 12px 12px 0 0;
}

.product-card-image img {
	width: auto;
	height: 140px;
	max-width: 90%;
	object-fit: contain;
	transition: transform 0.3s ease;
}

.product-card:hover .product-card-image img {
	transform: scale(1.1);
}

.product-card-content {
	padding: 1.5rem;
}

.product-card-title,
h3.product-card-title {
	font-family: "Clash Display", "ClashDisplay", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 1.25rem;
	font-weight: 600;
	margin: 0 0 0.5rem 0;
	padding: 0 !important;
	color: var(--color-text-primary);
}

.product-card-description {
	font-size: 0.875rem;
	color: var(--color-text-secondary);
	line-height: 1.4;
	margin: 0;
}

@media (max-width: 768px) {
	.product-grid {
		grid-template-columns: 1fr;
		gap: 1rem;
		margin: 1rem 0;
	}
}

@media (max-width: 768px) {
	.float-menu {
		top: 1rem;
		left: 1rem;
	}
	
	.floating-controls {
		top: 1rem;
		right: 1rem;
		flex-direction: column;
		gap: 0.5rem;
	}
	
	.toc-toggle {
		display: flex !important;
	}
	
	.sidebar {
		top: 5rem;
		right: 1rem;
		left: 1rem;
		width: calc(100vw - 2rem);
		max-width: none;
		max-height: 60vh;
	}
	
	.main-content-wrapper {
		padding: 4rem 1rem 2rem 1rem;
	}
	
	footer {
		padding: 2rem 1rem;
	}
	
	.footer-container {
		flex-direction: column;
		gap: 2rem;
		text-align: center;
	}
	
	.footer-left {
		align-items: center;
	}
}

/* Headings - Clash Display only for large headings */
.content h1,
.content h2 {
	font-family: "Clash Display", "ClashDisplay", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: rgba(255, 255, 255, 1.0);
	font-weight: 400;
	line-height: 1.2;
	padding-bottom: 0.5rem;
	margin-top: 3rem;
	margin-bottom: 1.5rem;
}

@media (prefers-color-scheme: light) {
	.content h1,
	.content h2 {
		color: rgba(23, 23, 23, 1.0);
	}
}

.content h1 {
	font-weight: 700;
	font-size: 2.5rem;
	margin-top: 2em;
}

.content h2 {
	font-weight: 400;
	font-size: 2rem;
}

/* Regular system font for smaller headings */
.content h3,
.content h4,
.content h5,
.content h6 {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--color-text-primary);
	font-weight: 600;
	line-height: 1.3;
	padding-bottom: 0.5rem;
	margin-top: 2.5rem;
	margin-bottom: 1.25rem;
}

.content h3 {
	font-size: 1.5rem;
}

.content h4 {
	font-size: 1.25rem;
}

/* 製品ヘッダー */
.product-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
}

.product-title {
	margin: 0;
	flex: 1;
}

.product-subtitle {
	font-weight: 300;
	color: var(--color-text-secondary);
	font-size: 0.8em;
	margin: 0;
	text-align: right;
	flex-shrink: 0;
}

/* コードブロック */
.content pre {
	background-color: var(--color-code-bg);
	border: 1px solid var(--color-border);
	border-radius: 0.5rem;
	padding: 1rem;
	margin: 1rem 0;
	overflow-x: auto;
}

.content code {
	font-family: "SF Mono", "Consolas", "Monaco", monospace;
	color: var(--color-code-text);
	background-color: var(--color-code-bg);
	padding: 0.2em 0.4em;
	border-radius: 0.25rem;
}

/* 引用 */
.content blockquote {
	background-color: var(--color-blockquote-bg);
	border-left: 4px solid var(--color-blockquote-border);
	padding: 1rem;
	margin: 1rem 0;
	border-radius: 0 0.5rem 0.5rem 0;
}
.img-fluid {
	width: 50%;
	max-width: 55rem;
}
.img-fluid.--dark {
	background: #fff;
}

/* テーブル */
table {
	width: 100%;
	margin: 1rem 0;
	border: 1px solid var(--color-border);
	border-radius: 0.5rem;
	overflow: hidden;
	border-collapse: collapse;
}

table th {
	background-color: var(--color-bg-secondary);
	border-bottom: 2px solid var(--color-border);
	padding: 0.75rem;
	text-align: left;
}

table td {
	padding: 0.75rem;
	border-bottom: 1px solid var(--color-border);
}

table tbody tr:hover {
	background-color: var(--color-bg-tertiary);
}

.icon-guide {
	object-fit: contain;
	height: 100%;
}

@media (prefers-color-scheme: dark) {
	.icon-guide {
		filter: invert(1);
	}
}

/* Control diagram styling */
.control-diagram {
	display: block;
	width: 100%;
	max-width: 600px;
	height: auto;
	margin: 1.5rem auto;
}

@media (max-width: 768px) {
	.control-diagram {
		max-width: 100%;
		margin: 1rem auto;
	}
}

/* Control diagram dark mode switching */
@media (prefers-color-scheme: dark) {
	img[src$="wren/control-diagram-light.png"] {
		content: url("../assets/wren/control-diagram-dark.png");
	}
	
	img[src$="k102e/control-diagram-light.png"] {
		content: url("../assets/k102e/control-diagram-dark.png");
	}
}

/* Desktop controls (floating) */
.desktop-controls {
	position: fixed;
	bottom: 1rem;
	right: 1rem;
	z-index: 100;
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

.desktop-controls .language-switcher,
.desktop-controls .help-button {
	background: var(--color-bg-secondary);
	border: 1px solid var(--color-border);
	border-radius: 50%;
	width: 3rem;
	height: 3rem;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--shadow-md);
	color: var(--color-text-primary);
	text-decoration: none;
	font-size: 0.875rem;
	transition: all 0.2s ease;
}

.desktop-controls .help-button {
	font-size: 1.575rem;
}

.desktop-controls .language-switcher:hover,
.desktop-controls .help-button:hover {
	background-color: var(--color-bg-tertiary);
	transform: scale(1.05);
}

/* Mobile controls (hidden on desktop) */
.mobile-controls {
	display: none;
}

/* Scroll to top button */
.scroll-to-top {
	position: fixed;
	bottom: 1rem;
	right: 8rem;
	width: 3rem;
	height: 3rem;
	background: var(--color-bg-secondary);
	border: 1px solid var(--color-border);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--shadow-md);
	color: var(--color-text-primary);
	text-decoration: none;
	font-size: 1.5rem;
	transition: all 0.2s ease;
	z-index: 100;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
}

.scroll-to-top.visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.scroll-to-top:hover {
	background-color: var(--color-bg-tertiary);
	transform: scale(1.05);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
	:root {
		--sidebar-width: 0;
	}

	.sidebar {
		position: fixed;
		top: 0;
		left: 0;
		width: 100vw;
		height: 100vh;
		max-height: none;
		z-index: 500;
		transition: opacity 0.3s ease, visibility 0.3s ease;
		padding: 5rem 2rem 2rem 2rem;
		overflow-y: auto;
		border: none;
		border-radius: 0;
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
		background: var(--color-bg-primary);
	}

	/* モバイルでの初期状態: 非表示 */
	.sidebar {
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
	}

	/* モバイルでアクティブ時: 表示 */
	.sidebar.active {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
	}

	.menu-button {
		display: block;
		position: fixed;
		top: 0;
		left: 0;
		z-index: 100;
		background: var(--color-bg-secondary);
		color: var(--color-text-primary);
		border: none;
		padding: 0.5rem;
		width: 3rem;
		height: 3rem;
		justify-content: center;
		align-items: center;
	}

	.site-header {
		justify-content: center;
	}

	.site-header .site-header-logo {
		position: absolute;
		left: 50%;
		transform: translateX(-50%);
	}

	.header-controls {
		display: none;
	}

	.desktop-controls {
		display: none;
	}

	.mobile-controls {
		display: flex;
		position: fixed;
		bottom: 1rem;
		left: 1rem;
		z-index: 100;
		gap: 0.5rem;
	}

	.mobile-controls .language-switcher,
	.mobile-controls .help-button {
		background: var(--color-bg-secondary);
		border: 1px solid var(--color-border);
		border-radius: 50%;
		width: 3rem;
		height: 3rem;
		display: flex;
		align-items: center;
		justify-content: center;
		box-shadow: var(--shadow-md);
		color: var(--color-text-primary);
		text-decoration: none;
		font-size: 0.875rem;
		transition: all 0.2s ease;
	}

	.mobile-controls .help-button {
		font-size: 1.575rem;
	}

	.mobile-controls .language-switcher:hover,
	.mobile-controls .help-button:hover {
		background-color: var(--color-bg-tertiary);
		transform: scale(1.05);
	}

	.main-content {
		padding: 0;
	}

	.scroll-to-top {
		bottom: 1rem;
		right: 1rem;
	}

	.content h1 {
		font-size: 1.75rem !important;
	}
	
	.content h2 {
		font-size: 1.5rem !important;
	}
	
	.content h3 {
		font-size: 1.25rem !important;
	}
	
	.product-card-image {
		height: 150px;
		font-size: 2rem;
	}
	
	.product-card-image img {
		height: 120px;
		max-width: 85%;
	}
	
	.product-card-content {
		padding: 1rem;
	}
	
	/* Mobile adjustments */
	@media (max-width: 768px) {
		.main-content-wrapper {
			padding: 4rem 1em 2rem 1em !important;
		}
	}
}
