/* デジタル目安箱 - フロントエンドスタイル (melta-ui design system) */

:root {
	/* Primary */
	--mey-primary-50: #f0f5ff;
	--mey-primary-100: #dbe6fe;
	--mey-primary-200: #bdd0fd;
	--mey-primary-500: #2b70ef;
	--mey-primary-700: #1d5bc2;
	--mey-primary-800: #174a9e;
	--mey-primary-900: #07194e;

	/* Neutral (slate) */
	--mey-slate-50: #f8fafc;
	--mey-slate-100: #f1f5f9;
	--mey-slate-200: #e2e8f0;
	--mey-slate-300: #cbd5e1;
	--mey-slate-400: #94a3b8;
	--mey-slate-500: #64748b;
	--mey-slate-700: #334155;
	--mey-slate-900: #0f172a;

	/* Surface */
	--mey-bg-page: #f9fafb;
	--mey-bg-surface: #ffffff;
	--mey-text-heading: #0f172a;
	--mey-text-body: #3d4b5f;
	--mey-text-muted: #64748b;
	--mey-border: #e2e8f0;
	--mey-border-strong: #cbd5e1;

	/* Status */
	--mey-emerald-50: #ecfdf5;
	--mey-emerald-200: #a7f3d0;
	--mey-emerald-600: #059669;
	--mey-emerald-700: #047857;
	--mey-red-50: #fef2f2;
	--mey-red-200: #fecaca;
	--mey-red-500: #ef4444;
	--mey-red-700: #b91c1c;

	/* Shadows */
	--mey-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
	--mey-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
	--mey-focus-ring: 0 0 0 2px rgba(43, 112, 239, 0.3);

	/* Typography */
	--mey-font-sans: Inter, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;

	/* Radius */
	--mey-radius-lg: 8px;
	--mey-radius-xl: 12px;
	--mey-radius-full: 9999px;

	/* Transition */
	--mey-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==============================
   Submission Form
   ============================== */

.meyasubako-form-wrap {
	max-width: 640px;
	margin: 0 auto;
	padding: 32px 24px;
	background: var(--mey-bg-surface);
	border: 1px solid var(--mey-border);
	border-radius: var(--mey-radius-xl);
	box-shadow: var(--mey-shadow-sm);
	font-family: var(--mey-font-sans);
	color: var(--mey-text-body);
}

.meyasubako-description {
	margin-bottom: 24px;
	padding: 16px;
	background: var(--mey-primary-50);
	border: 1px solid var(--mey-primary-200);
	border-radius: var(--mey-radius-lg);
	color: var(--mey-primary-800);
	font-size: 15px;
	line-height: 1.7;
}

.meyasubako-description p {
	margin: 0;
}

.meyasubako-form {
	position: relative;
}

.meyasubako-field {
	margin-bottom: 20px;
}

.meyasubako-field label {
	display: block;
	font-weight: 500;
	margin-bottom: 8px;
	font-size: 15px;
	color: var(--mey-text-heading);
	letter-spacing: 0.02em;
}

.meyasubako-field textarea,
.meyasubako-field input[type="password"],
.meyasubako-field input[type="text"] {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--mey-slate-300);
	border-radius: var(--mey-radius-lg);
	font-size: 16px;
	font-family: var(--mey-font-sans);
	line-height: 1.6;
	color: var(--mey-text-heading);
	background: var(--mey-bg-surface);
	box-sizing: border-box;
	transition: border-color 150ms var(--mey-ease), box-shadow 150ms var(--mey-ease);
}

.meyasubako-field textarea::placeholder,
.meyasubako-field input::placeholder {
	color: var(--mey-slate-400);
}

.meyasubako-field textarea:hover,
.meyasubako-field input:hover {
	border-color: var(--mey-slate-400);
}

.meyasubako-field textarea:focus,
.meyasubako-field input:focus {
	border-color: var(--mey-primary-500);
	outline: none;
	box-shadow: var(--mey-focus-ring);
}

.meyasubako-char-count {
	text-align: right;
	font-size: 13px;
	color: var(--mey-text-muted);
	margin-top: 6px;
	letter-spacing: 0.02em;
}

.meyasubako-privacy-notice {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 24px;
	padding: 14px 16px;
	background: var(--mey-emerald-50);
	border: 1px solid var(--mey-emerald-200);
	border-radius: var(--mey-radius-lg);
	font-size: 13px;
	color: var(--mey-emerald-700);
	line-height: 1.5;
}

.meyasubako-privacy-notice svg {
	flex-shrink: 0;
	margin-top: 1px;
}

.meyasubako-privacy-notice p {
	margin: 0;
}

.meyasubako-submit {
	text-align: center;
	padding-top: 4px;
}

.meyasubako-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 48px;
	padding: 0 24px;
	background: var(--mey-primary-500);
	color: #fff;
	border: none;
	border-radius: var(--mey-radius-lg);
	font-size: 16px;
	font-weight: 600;
	font-family: var(--mey-font-sans);
	cursor: pointer;
	text-decoration: none;
	transition: background-color 150ms var(--mey-ease), box-shadow 150ms var(--mey-ease);
}

.meyasubako-btn:hover {
	background: var(--mey-primary-700);
	color: #fff;
}

.meyasubako-btn:focus {
	outline: none;
	box-shadow: var(--mey-focus-ring);
}

.meyasubako-btn:active {
	background: var(--mey-primary-800);
}

.meyasubako-btn--secondary {
	background: var(--mey-bg-surface);
	color: var(--mey-text-body);
	border: 1px solid var(--mey-border);
}

.meyasubako-btn--secondary:hover {
	background: var(--mey-slate-50);
	color: var(--mey-text-body);
	border-color: var(--mey-border-strong);
}

/* ==============================
   Error Alert
   ============================== */

.meyasubako-error {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	background: var(--mey-red-50);
	border: 1px solid var(--mey-red-200);
	border-radius: var(--mey-radius-lg);
	color: var(--mey-red-700);
	margin-bottom: 20px;
	font-size: 14px;
	line-height: 1.5;
}

.meyasubako-error p {
	margin: 0;
}

/* ==============================
   Success Screen
   ============================== */

.meyasubako-success {
	max-width: 640px;
	margin: 0 auto;
	padding: 48px 24px;
	text-align: center;
	font-family: var(--mey-font-sans);
	background: var(--mey-bg-surface);
	border: 1px solid var(--mey-border);
	border-radius: var(--mey-radius-xl);
	box-shadow: var(--mey-shadow-sm);
}

.meyasubako-success-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	background: var(--mey-emerald-50);
	color: var(--mey-emerald-600);
	border-radius: 50%;
	margin-bottom: 20px;
}

.meyasubako-success-icon svg {
	width: 32px;
	height: 32px;
}

.meyasubako-success h3 {
	font-size: 22px;
	font-weight: 700;
	color: var(--mey-text-heading);
	margin: 0 0 8px;
	letter-spacing: 0.01em;
}

.meyasubako-success p {
	color: var(--mey-text-muted);
	font-size: 15px;
	margin: 0 0 32px;
	line-height: 1.7;
}

.meyasubako-submitted-content {
	text-align: left;
	margin: 0 auto 32px;
	max-width: 480px;
	background: var(--mey-slate-50);
	border: 1px solid var(--mey-border);
	border-radius: var(--mey-radius-lg);
	padding: 16px;
}

.meyasubako-submitted-label {
	font-size: 13px;
	font-weight: 500;
	color: var(--mey-text-muted);
	margin: 0 0 8px;
	letter-spacing: 0.02em;
}

.meyasubako-submitted-body {
	font-size: 15px;
	line-height: 1.7;
	color: var(--mey-text-heading);
	word-break: break-word;
}

/* ==============================
   Public View Page
   ============================== */

.meyasubako-public-page {
	background: var(--mey-bg-page);
	font-family: var(--mey-font-sans);
	color: var(--mey-text-body);
	margin: 0;
	padding: 0;
	min-height: 100vh;
}

.meyasubako-public-container {
	max-width: 900px;
	margin: 0 auto;
	padding: 48px 24px;
}

.meyasubako-public-container h1 {
	font-size: 26px;
	font-weight: 700;
	color: var(--mey-text-heading);
	margin: 0 0 8px;
	letter-spacing: 0.01em;
}

.meyasubako-public-container > p {
	color: var(--mey-text-muted);
	font-size: 15px;
	margin: 0 0 24px;
}

.meyasubako-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 12px;
	background: var(--mey-slate-100);
	color: var(--mey-slate-700);
	border-radius: var(--mey-radius-full);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.02em;
}

/* Login Form */
.meyasubako-login-form {
	max-width: 400px;
	margin: 32px auto 0;
	padding: 32px 24px;
	background: var(--mey-bg-surface);
	border: 1px solid var(--mey-border);
	border-radius: var(--mey-radius-xl);
	box-shadow: var(--mey-shadow-sm);
}

.meyasubako-login-header {
	text-align: center;
	margin-bottom: 24px;
}

.meyasubako-login-header svg {
	color: var(--mey-text-muted);
	margin-bottom: 8px;
}

/* Table */
.meyasubako-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	background: var(--mey-bg-surface);
	border: 1px solid var(--mey-border);
	border-radius: var(--mey-radius-xl);
	overflow: hidden;
	box-shadow: var(--mey-shadow-sm);
	margin-top: 16px;
}

.meyasubako-table thead th {
	background: var(--mey-slate-50);
	padding: 12px 16px;
	text-align: left;
	font-weight: 500;
	font-size: 13px;
	color: var(--mey-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	border-bottom: 1px solid var(--mey-border);
}

.meyasubako-table tbody td {
	padding: 14px 16px;
	border-bottom: 1px solid var(--mey-slate-100);
	font-size: 14px;
	line-height: 1.7;
	color: var(--mey-text-body);
	vertical-align: top;
}

.meyasubako-table tbody tr:last-child td {
	border-bottom: none;
}

.meyasubako-table tbody tr {
	transition: background-color 150ms var(--mey-ease);
}

.meyasubako-table tbody tr:hover {
	background: var(--mey-slate-50);
}

.meyasubako-table tbody td:first-child {
	color: var(--mey-text-muted);
	font-size: 13px;
	white-space: nowrap;
}

/* Pagination */
.meyasubako-pagination {
	margin-top: 32px;
	text-align: center;
	display: flex;
	justify-content: center;
	gap: 4px;
}

.meyasubako-page-link,
.meyasubako-page-current {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: var(--mey-radius-lg);
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	transition: all 150ms var(--mey-ease);
}

.meyasubako-page-link {
	background: var(--mey-bg-surface);
	color: var(--mey-text-body);
	border: 1px solid var(--mey-border);
}

.meyasubako-page-link:hover {
	background: var(--mey-primary-50);
	color: var(--mey-primary-700);
	border-color: var(--mey-primary-200);
}

.meyasubako-page-current {
	background: var(--mey-primary-500);
	color: #fff;
	border: 1px solid var(--mey-primary-500);
	font-weight: 600;
}

/* ==============================
   Responsive
   ============================== */

@media (max-width: 640px) {
	.meyasubako-form-wrap,
	.meyasubako-success {
		margin: 0 8px;
		padding: 24px 16px;
	}

	.meyasubako-public-container {
		padding: 32px 16px;
	}

	.meyasubako-table {
		display: block;
		overflow-x: auto;
	}

	.meyasubako-table thead th,
	.meyasubako-table tbody td {
		padding: 10px 12px;
	}
}
