/**
 * サクポチ - 共通スタイルシート
 * ツール全体で使用する基本スタイル
 */

/* ========================================
   CSS Variables
   ======================================== */
:root {
	/* Colors */
	--color-primary: #3d5a80;
	--color-primary-dark: #2d4a6f;
	--color-accent: #e07850;
	--color-accent-hover: #c86840;

	--color-bg: #f8f6f3;
	--color-white: #ffffff;
	--color-text: #333333;
	--color-text-secondary: #666666;
	--color-text-muted: #888888;
	--color-border: #e0dcd6;

	/* Typography */
	--font-display: 'M PLUS Rounded 1c', sans-serif;
	--font-body: 'Noto Sans JP', sans-serif;

	/* Spacing */
	--radius: 8px;
}

/* ========================================
   Reset & Base
   ======================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	font-family: var(--font-body);
	font-weight: 400;
	line-height: 1.7;
	color: var(--color-text);
	background-color: var(--color-bg);
	min-height: 100vh;
}

/* ========================================
   Layout
   ======================================== */
.page {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.header {
	background: var(--color-primary);
	padding: 14px 20px;
}

.header-inner {
	max-width: 860px;
	margin: 0 auto;
	display: flex;
	align-items: center;
}

.logo {
	font-family: var(--font-display);
	font-size: 18px;
	font-weight: 700;
	color: var(--color-white);
	text-decoration: none;
}

.logo:hover {
	opacity: 0.9;
}

.main {
	flex: 1;
	padding: 32px 20px 48px;
	max-width: 860px;
	width: 100%;
	margin: 0 auto;
}

.footer {
	background: var(--color-primary-dark);
	padding: 24px 20px;
}

.footer-inner {
	max-width: 860px;
	margin: 0 auto;
	text-align: center;
}

.footer-links {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px 24px;
	margin-bottom: 16px;
}

.footer-link {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.7);
	text-decoration: none;
	transition: color 0.2s;
}

.footer-link:hover {
	color: rgba(255, 255, 255, 1);
}

.footer-copyright {
	font-family: var(--font-display);
	font-size: 13px;
	color: rgba(255, 255, 255, 0.5);
}

.footer-text {
	font-family: var(--font-display);
	font-size: 14px;
	color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   Breadcrumb
   ======================================== */
.breadcrumb {
	margin-bottom: 20px;
}

.breadcrumb-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	list-style: none;
	font-size: 13px;
}

.breadcrumb-item {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--color-text-muted);
}

.breadcrumb-item::after {
	content: '>';
	color: var(--color-text-muted);
}

.breadcrumb-item:last-child::after {
	display: none;
}

.breadcrumb-link {
	color: var(--color-accent);
	text-decoration: none;
}

.breadcrumb-link:hover {
	text-decoration: underline;
}

.breadcrumb-item--current span {
	color: var(--color-text-secondary);
}

/* ========================================
   Page Header
   ======================================== */
.page-header {
	margin-bottom: 24px;
}

.page-title {
	font-family: var(--font-display);
	font-size: 24px;
	font-weight: 700;
	color: var(--color-primary-dark);
	margin-bottom: 8px;
}

.page-description {
	font-size: 14px;
	color: var(--color-text-secondary);
	line-height: 1.7;
}

/* ========================================
   Card Component
   ======================================== */
.card {
	background: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	margin-bottom: 24px;
}

.card-header {
	padding: 14px 20px;
	border-bottom: 1px solid var(--color-border);
}

.card-title {
	font-family: var(--font-display);
	font-size: 15px;
	font-weight: 700;
	color: var(--color-text);
}

.card-body {
	padding: 20px;
}

/* ========================================
   Tool Card
   ======================================== */
.tool-card {
	background: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	/* margin-bottom: 32px; */
}

/* ========================================
   Form Elements
   ======================================== */
.input-section {
	padding: 20px;
	border-bottom: 1px solid var(--color-border);
}

.input-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.input-label {
	font-size: 14px;
	font-weight: 500;
	color: var(--color-text);
}

.input-actions {
	display: flex;
	gap: 12px;
}

.text-input {
	width: 100%;
	min-height: 180px;
	padding: 14px;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.8;
	color: var(--color-text);
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	resize: vertical;
}

.text-input:focus {
	outline: none;
	border-color: var(--color-primary);
}

.text-input::placeholder {
	color: var(--color-text-muted);
}

/* ========================================
   Buttons
   ======================================== */
.btn-text {
	background: none;
	border: none;
	padding: 0;
	font-family: inherit;
	font-size: 13px;
	color: var(--color-accent);
	cursor: pointer;
}

.btn-text:hover {
	text-decoration: underline;
}

.btn-primary {
	padding: 10px 20px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	color: var(--color-white);
	background: var(--color-accent);
	border: none;
	border-radius: var(--radius);
	cursor: pointer;
}

.btn-primary:hover {
	background: var(--color-accent-hover);
}

/* ========================================
   Options
   ======================================== */
.options-section {
	padding: 14px 20px;
	border-bottom: 1px solid var(--color-border);
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.option-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--color-text);
	cursor: pointer;
}

.option-checkbox {
	width: 16px;
	height: 16px;
	cursor: pointer;
}

/* ========================================
   Stats
   ======================================== */
.stats-section {
	padding: 16px 20px;
	border-bottom: 1px solid var(--color-border);
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.stat-item {
	display: flex;
	align-items: baseline;
	gap: 6px;
}

.stat-label {
	font-size: 13px;
	color: var(--color-text-muted);
}

.stat-value {
	font-family: var(--font-display);
	font-size: 16px;
	font-weight: 700;
	color: var(--color-text);
}

.stat-unit {
	font-size: 13px;
	color: var(--color-text-muted);
}

/* ========================================
   Count Display
   ======================================== */
.count-section {
	padding: 24px 20px;
	background: var(--color-bg);
	border-bottom: 1px solid var(--color-border);
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 4px;
}

.count-value {
	font-family: var(--font-display);
	font-size: 48px;
	font-weight: 700;
	color: var(--color-primary-dark);
	line-height: 1;
}

.count-unit {
	font-size: 16px;
	font-weight: 500;
	color: var(--color-text-secondary);
}

/* ========================================
   Action Section
   ======================================== */
.action-section {
	padding: 14px 20px;
	display: flex;
	justify-content: flex-end;
	gap: 12px;
}

.btn-secondary {
	padding: 10px 20px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	color: var(--color-text);
	background: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	cursor: pointer;
}

.btn-secondary:hover {
	background: var(--color-bg);
	border-color: var(--color-text-muted);
}

/* ========================================
   Info Content
   ======================================== */
.info-text {
	font-size: 14px;
	line-height: 1.9;
	color: var(--color-text-secondary);
}

.info-text+.info-text {
	margin-top: 12px;
}

/* ========================================
   How to Use
   ======================================== */
.howto-list {
	list-style: none;
}

.howto-item {
	display: flex;
	gap: 12px;
	font-size: 14px;
	color: var(--color-text-secondary);
	line-height: 1.7;
}

.howto-item+.howto-item {
	margin-top: 10px;
}

.howto-number {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-display);
	font-size: 13px;
	font-weight: 700;
	color: var(--color-white);
	background: var(--color-primary);
	border-radius: 50%;
}

/* ========================================
   FAQ
   ======================================== */
.faq-item {
	border-bottom: 1px solid var(--color-border);
	padding: 16px 0;
}

.faq-item:first-child {
	padding-top: 0;
}

.faq-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.faq-question {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 14px;
	font-weight: 500;
	color: var(--color-text);
	cursor: pointer;
	width: 100%;
	text-align: left;
	background: none;
	border: none;
	font-family: inherit;
	padding: 0;
}

.faq-question-icon {
	flex-shrink: 0;
	font-family: var(--font-display);
	font-weight: 700;
	color: var(--color-accent);
}

.faq-question-text {
	flex: 1;
}

.faq-toggle {
	flex-shrink: 0;
	font-size: 18px;
	color: var(--color-text-muted);
	line-height: 1;
	transition: transform 0.2s;
}

.faq-answer {
	display: none;
	margin-top: 10px;
	padding-left: 26px;
	font-size: 14px;
	color: var(--color-text-secondary);
	line-height: 1.8;
}

.faq-item.open .faq-answer {
	display: block;
}

.faq-item.open .faq-toggle {
	transform: rotate(45deg);
}

/* ========================================
   FAQ Static (常時表示)
   ======================================== */
.faq-list {
	margin: 0;
}

.faq-item-static {
	padding: 16px 0;
	border-bottom: 1px solid var(--color-border);
}

.faq-item-static:first-child {
	padding-top: 0;
}

.faq-item-static:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.faq-question-static {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 14px;
	font-weight: 500;
	color: var(--color-text);
	margin-bottom: 8px;
}

.faq-answer-static {
	margin-left: 26px;
	font-size: 14px;
	color: var(--color-text-secondary);
	line-height: 1.8;
}

/* ========================================
   Toast Notification
   ======================================== */
.toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%) translateY(80px);
	background: var(--color-text);
	color: var(--color-white);
	padding: 12px 24px;
	border-radius: var(--radius);
	font-size: 14px;
	opacity: 0;
	visibility: hidden;
	transition: transform 0.2s, opacity 0.2s;
	z-index: 1000;
}

.toast.show {
	transform: translateX(-50%) translateY(0);
	opacity: 1;
	visibility: visible;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 600px) {
	.main {
		padding: 24px 16px 40px;
	}

	.page-title {
		font-size: 20px;
	}

	.input-section,
	.options-section,
	.stats-section,
	.action-section,
	.count-section {
		padding-left: 16px;
		padding-right: 16px;
	}

	.card-header,
	.card-body {
		padding-left: 16px;
		padding-right: 16px;
	}

	.count-value {
		font-size: 40px;
	}

	.stats-section {
		gap: 14px;
	}

	.stat-item {
		min-width: calc(50% - 10px);
	}

	.text-input {
		min-height: 150px;
	}
}