* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: 'Inter', sans-serif;
	background: #000;
	color: #fff;
	padding: 20px;
	font-size: 18px;
}

a {
	text-decoration: none;
	color: #94ebff;
}

p {
	margin: 20px 0;
}

ul {
	list-style: none;
}

/* ヘッダー */
header {
	text-align: center;
	margin-bottom: 30px;
	padding: 20px;
}

.logo-container {
	display: flex;
	justify-content: center;
	margin-bottom: 10px;
}

.site-logo {
	width: 100px;
	height: auto;
	transition: transform 6s ease-out;
}

.site-logo:hover {
	filter: drop-shadow(0 0 20px rgba(0, 210, 255, 0.6));
	transform: rotate(360deg);
}



.site-title {
	font-size: 2.5rem;
	margin-bottom: 10px;
	font-weight: bold;
}

.site-subtitle {
	font-size: 1rem;
}

/* メインコンテナ */
main.tool-page {
	background: #111;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	padding: 20px;
	position: relative;
	margin: 0 auto;
	max-width: 1100px;
}


.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

h1 {
	font-size: 2rem;
	margin-bottom: 10px;
	font-weight: bold;
}

.category-title {
	text-align: center;
}

.tool-info {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 20px auto;
	max-width: 700px;
}


.tool-tags {
	margin: 20px auto;
	display: inline-flex;
	gap: 8px;
	flex-wrap: wrap;
}

.tool-tags a {
	background: #165766;
	border-radius: 20px;
	padding: 12px;
	text-decoration: none;
	color: #fff;
	transition: all 0.3s ease;
}

.related-tools-title {
	font-size: 1.5rem;
	margin-bottom: 10px;
	font-weight: bold;
	text-align: center;
}


/* ツール一覧 */
.tools-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
	margin: 20px;
}

.tool-card {
	background: rgba(28, 28, 28, 0.5);
	border-radius: 10px;
	padding: 12px;
	transition: all 0.3s ease;
	border: 1px solid rgba(255, 255, 255, 0.1);
	display: flex;
	flex-direction: column;
	align-items: center;
	height: 100%;
}

.tool-card:hover {
	transform: translateY(-5px);
	border-color: #00d2ff;
	background: rgba(255, 255, 255, 0.05);
	box-shadow: 0 10px 30px rgba(0, 210, 255, 0.2);
}

.tool-icon {
	width: 100px;
	height: 100px;
	margin-bottom: 20px;
}

.tools-list .tool-name {
	font-size: 1.1rem;
	font-weight: bold;
	margin-bottom: 12px;
	height: 2.2rem;
	line-height: 1.1rem;
}

.tools-list .tool-desc {
	color: #fff;
	font-size: 0.9rem;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

footer {
	text-align: center;
	margin-top: 20px;
}

footer .site-title {
	font-size: 1.2rem;
}

footer .links {
	margin-top: 30px;
}

footer .links li {
	margin: 20px 10px;
}

#copyright {
	margin: 20px 0px;
	font-size: 1.1rem;
}

/* ボタン */
.buttons {
	margin-top: 20px;
	display: flex;
	gap: 8px;
}


button {
	padding: 10px 20px;
	border: none;
	border-radius: 15px;
	font-size: 1rem;
	font-weight: bold;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	font-family: 'Inter', sans-serif;
	margin: 4px 8px;
	background: #053778;
	color: #fff;
}

button:hover {
	transform: translateY(-2px);
}

.btn-s {
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #fff;
	padding: 10px 15px;
	border-radius: 4px;
	cursor: pointer;
}

.btn-s:hover {
	background: rgba(255, 255, 255, 0.2);
}

.flex-right {
	display: flex;
	justify-content: flex-end;
	margin-top: 1rem;
}

.flex-center {
	display: flex;
	justify-content: center;
	margin-top: 1rem;
}

.copy-btn img {
	margin-right: 8px;
}

/* テーブル */
.table-container {
	overflow-x: auto;
}

table {
	width: 100%;
	border-collapse: collapse;
	font-variant-numeric: tabular-nums;
}

th,
td {
	padding: 0.75rem;
	text-align: right;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	color: #f0f0f0;
}


th {
	font-weight: bold;
	color: #fff;
	background: #165766;
	font-size: 1rem;
	white-space: nowrap;
}

.sub-text {
	font-size: 0.75rem;
	font-weight: 400;
	color: #94a3b8;
}

tbody tr:nth-child(even) {
	background-color: rgba(255, 255, 255, 0.03);
}

tbody tr:hover {
	background-color: rgba(0, 210, 255, 0.1);
}

.highlight td {
	color: #fbbf24;
}



/* 入力項目 */
.input-items {
	width: 100%;
	margin: 20px 0;
}

.input-item {
	flex: 1;
	display: flex;
	flex-direction: column;
	margin-bottom: 20px;
}

input[type="number"],
input[type="text"],
select {
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #fff;
	padding: 0.75rem;
	border-radius: 8px;
	font-size: 1.1rem;
	outline: none;
	transition: all 0.2s;
}

input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
	border-color: #00d2ff;
	background: rgba(255, 255, 255, 0.15);
	box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

select option {
	background: rgba(255, 255, 255, 0.1);

}

input[type="number"] {
	text-align: center;
}

/* ランゲーサー */
input[type="range"] {
	width: 100%;
	height: 6px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 5px;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 20px;
	height: 20px;
	background: #00d2ff;
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
	background: #fff;
}

/* テキストエリア */
textarea {
	background: rgba(42, 146, 113, 0.1);
	border-color: rgba(42, 146, 113, 0.3);
	color: #fff;
	padding: 0.75rem;
	border-radius: 8px;
	font-size: 1rem;
	outline: none;
	transition: all 0.2s;
	font-family: 'Courier New', monospace;
	resize: vertical;
	min-height: 150px;
	width: 100%;
}

textarea:focus {
	border-color: #00d2ff;
	background: rgba(255, 255, 255, 0.15);
	box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

/* 切り替え項目 */
.toggle-items {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 10px;
}

.toggle-item {
	padding: 5px;
	border-radius: 8px;
	display: flex;
	flex-direction: column;
}

.toggle-item input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.toggle-item label {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 10px 5px;
	background: #f8f9fa;
	border-radius: 12px;
	cursor: pointer;
	transition: 0.1s;
	height: 100%;
	margin: 0;
	text-align: center;
	font-weight: bold;
	color: #2b3e50;
	line-height: 1.4;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.toggle-item label span {
	font-size: 0.8rem;
	font-weight: normal;
	color: #444;
	margin-top: 6px;
}

.toggle-item input[type="radio"]:checked+label {
	background: #2a9271;
	color: #fff;
	box-shadow: 0 8px 15px rgba(42, 146, 113, 0.25);
	transform: translateY(-2px);
}

.toggle-item input[type="radio"]:checked+label span {
	color: rgba(255, 255, 255, 0.9);
}

.toggle-item label:hover {
	background: #2a9271;
	color: #fff;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.toggle-item input[type="radio"]:checked+label:hover {
	color: #fff;
}

.toggle-item input[type="radio"]:checked+label .tatami-thumb {
	background: rgba(255, 255, 255, 0.2);
}

/* 切り替え項目（小） */
.toggle-items-s {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.toggle-item-s {
	cursor: pointer;
	flex: 1;
	min-width: 60px;
}

.toggle-item-s input {
	display: none;
}

.toggle-item-s span {
	display: block;
	padding: 8px 5px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 6px;
	font-size: 0.8rem;
	text-align: center;
	transition: all 0.2s;
	color: #ccc;
}

.toggle-item-s input:checked+span {
	background: #2a9271;
	color: #fff;
	box-shadow: 0 4px 10px rgba(42, 146, 113, 0.3);
}

.toggle-item-s:hover span {
	background: rgba(255, 255, 255, 0.2);
}

code {
	font-family: 'Courier New', monospace;
	font-size: 0.9em;
	color: #00d2ff;
}

/* pre code */
.code-container {
	position: relative;
	width: 100%;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.3);
	overflow: hidden;
	margin-top: 5px;
}

pre {
	margin: 0;
	padding: 0;
	overflow: auto;
	font-family: 'Consolas', 'Monaco', 'Andale Mono', 'Ubuntu Mono', monospace;
	font-size: 1rem;
	line-height: 1.5;
	tab-size: 4;
}

pre code {
	background: transparent;
	padding: 1rem;
	border-radius: 0;
	color: #FFF;
	font-family: inherit;
	font-size: inherit;
	outline: none;
	display: block;
	min-height: 150px;
	white-space: pre;
}

pre code:focus {
	color: #FFF;
	background: rgba(255, 255, 255, 0.05);
	box-shadow: inset 0 0 10px rgba(0, 210, 255, 0.1);
}

/* プレビュー */
.preview-area-wrapper {
	margin: 2rem 0;
	position: relative;
	color: #2a9271;
	font-weight: bold;
}

.preview-reload-btn {
	position: absolute;
	bottom: 5px;
	right: 5px;
	cursor: pointer;
	transition: all 0.3s;
	z-index: 10;
	padding: 0;
	margin: 0;
	background-color: transparent;
}

.preview-reload-btn:hover {
	transform: rotate(45deg);
}

.preview-box {
	padding: 40px;
	background-color: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 200px;
	background-image:
		linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
		linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
		linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
	background-size: 20px 20px;
	background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
	overflow: hidden;
}

.preview-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.preview-header p {
	margin: 0;
	font-weight: bold;
}

.preview-bg-switcher {
	display: flex;
	gap: 10px;
}

.bg-btn {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 3px solid rgba(255, 255, 255, 0.3);
	cursor: pointer;
	padding: 0;
	margin: 0;
	outline: none;
	transition: transform 0.2s, border-color 0.2s;
}

.bg-btn:hover {
	transform: scale(1.1);
	border-color: #fff;
}

.bg-btn.active {
	border-color: #00d2ff;
	box-shadow: 0 0 5px rgba(0, 210, 255, 0.5);
}

.bg-grid {
	background-color: #fff;
	background-image:
		linear-gradient(45deg, #ccc 25%, transparent 25%),
		linear-gradient(-45deg, #ccc 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, #ccc 75%),
		linear-gradient(-45deg, transparent 75%, #ccc 75%);
	background-size: 10px 10px;
	background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
}

.bg-white {
	background-color: #ffffff;
}

.bg-black {
	background-color: #000000;
}

.bg-stripe {
	background: repeating-linear-gradient(90deg, #4169e1 0 15px, #87ceeb 15px 30px);
}

.bg-custom {
	background: linear-gradient(135deg, #ff0000, #00ff00, #0000ff);
}

/* オプションカード */
.options-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 20px;
	margin: 30px 0;
}

.option-card {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(42, 146, 113, 0.2);
	border-radius: 12px;
	padding: 15px;
	transition: all 0.3s ease;
}

.option-card:hover {
	border-color: #2a9271;
	background: rgba(42, 146, 113, 0.05);
}

.option-title {
	font-size: 0.9rem;
	font-weight: bold;
	color: #94ebff;
	margin-bottom: 12px;
}

/* 結果項目 */
.result-items {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 20px;
	margin: 20px 0;
}

.result-item {
	background: #fff;
	padding: 15px;
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.result-label {
	color: #000;
}

.result-value {
	font-size: 1.5rem;
	font-weight: bold;
	color: #2a9271;
}

.result-value .unit {
	font-size: 1rem;
	font-weight: normal;
	margin-left: 5px;
	color: #000;
}

/* 情報ボックス */
.info-box {
	margin: 20px 0;
	padding: 15px;
}

.info-title {
	font-weight: bold;
	margin-top: 30px;
	margin-bottom: 10px;
}


.info-box ul {
	margin: 0;
	padding-left: 20px;
}

.info-box li {
	list-style: disc;
	font-size: 1rem;
	margin-bottom: 5px;
}

label {
	display: block;
	margin: 10px 0;
}

.grid-items {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 10px;
}

.flex-row {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
}

.flex-row span {
	min-width: 2rem;
}

.flex-row input[type="number"] {
	min-width: 80px;
}

.adsense {
	width: 100%;
	height: 280px;
	text-align: center;
	margin: 30px auto;
}

.breadcrumb-separator {
	margin: 0 10px;
	color: #666;
}

/* ページネーション */
.pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: 40px;
	gap: 10px;
}

.page-link {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	min-width: 45px;
	height: 45px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	color: #fff;
	text-decoration: none;
	font-weight: bold;
	transition: all 0.3s ease;
	background: rgba(255, 255, 255, 0.05);
}

.page-link:hover:not(.current) {
	background: rgba(0, 210, 255, 0.2);
	border-color: #00d2ff;
	color: #fff;
}

.page-link.current {
	background: #00d2ff;
	color: #000;
	border-color: #00d2ff;
	cursor: default;
}

.page-ellipsis {
	color: #999;
	font-size: 1.2rem;
}


/* チェックボックス・ラジオボタン */
.checkbox-item label {
	cursor: pointer;
}

input[type="checkbox"],
input[type="radio"] {
	accent-color: #2a9271;
	width: 1.2rem;
	height: 1.2rem;
	cursor: pointer;
}



/* ナビゲーションメニュー */
nav {
	margin-bottom: 20px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	padding-bottom: 20px;
}

.nav-menu {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 15px;
	flex-wrap: wrap;
	list-style: none;
	padding: 0;
	margin: 0;
}

.nav-menu li a {
	color: #fff;
	text-decoration: none;
	font-weight: bold;
	padding: 8px 16px;
	border-radius: 20px;
	background: rgba(255, 255, 255, 0.1);
	transition: all 0.3s ease;
	display: block;
}

.nav-menu li a:hover {
	background: #00d2ff;
	color: #000;
	transform: translateY(-2px);
}


/* 子カテゴリ一覧のボタンスタイル */
.child-categories-list {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px;
	margin: 20px auto 30px;
	max-width: 800px;
}

.child-category-link {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 20px;
	background: rgba(42, 146, 113, 0.2);
	border: 1px solid rgba(42, 146, 113, 0.4);
	color: #fff;
	text-decoration: none;
	font-size: 0.9rem;
	transition: all 0.3s ease;
}

.child-category-link:hover {
	background: rgba(42, 146, 113, 0.6);
	border-color: #00d2ff;
	color: #fff;
	transform: translateY(-2px);
}

.child-category-link.current-category {
	background: #00d2ff;
	color: #000;
	border-color: #00d2ff;
	cursor: default;
	pointer-events: none;
}

@media screen and (max-width: 768px) {
	body {
		padding: 0;
	}

	main.tool-page {
		border-radius: 0;
	}
}


/* アニメーション */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}