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

body {
	font-family: Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
	font-size: 16px;
	color: #333;
	background-color: #f5f5f5;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

main {
	flex: 1;
}

a {
	color: #2563eb;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

/* ── Header ──────────────────────────────────────── */
.header {
	background-color: #fff;
	border-bottom: 1px solid #e0e0e0;
	padding: 0 24px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.header-logo {
	font-size: 20px;
	font-weight: bold;
	color: #333;
	text-decoration: none;
}

.header-logo:hover {
	text-decoration: none;
}

.header-right {
	display: flex;
	align-items: center;
	gap: 12px;
}

.header-user-info {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	line-height: 1.3;
}

.header-user-name {
	font-size: 14px;
	font-weight: 500;
	color: #333;
}

.header-user-university {
	font-size: 11px;
	color: #999;
}

.header-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background-color: #6b21a8;
	color: #fff;
	font-size: 16px;
	font-weight: bold;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

/* ── User Menu Dropdown ─────────────────────────── */
.header-user-menu {
	position: relative;
}

.header-menu-trigger {
	display: flex;
	align-items: center;
	gap: 12px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	border-radius: 8px;
	transition: background-color 0.2s;
}

.header-menu-trigger:hover {
	background-color: #f5f5f5;
}

.header-dropdown {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	min-width: 180px;
	background-color: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	padding: 8px 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
	z-index: 100;
}

.header-dropdown.open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.dropdown-item {
	display: block;
	width: 100%;
	padding: 10px 16px;
	font-size: 14px;
	color: #333;
	text-decoration: none;
	background: none;
	border: none;
	text-align: left;
	cursor: pointer;
	transition: background-color 0.15s;
	font-family: inherit;
}

.dropdown-item:hover {
	background-color: #f5f5f5;
	text-decoration: none;
}

.dropdown-item-danger {
	color: #dc2626;
}

.dropdown-divider {
	height: 1px;
	background-color: #e0e0e0;
	margin: 4px 0;
}

/* ── Page Container ──────────────────────────────── */
.page-container {
	max-width: 700px;
	margin: 0 auto;
	padding: 32px 16px;
}

.page-title {
	font-size: 24px;
	font-weight: bold;
	margin-bottom: 4px;
}

.page-subtitle {
	font-size: 14px;
	color: #666;
}

.page-header {
	margin-bottom: 24px;
}

/* ── Card ────────────────────────────────────────── */
.card {
	background-color: #fff;
	border-radius: 8px;
	padding: 24px;
	margin-bottom: 24px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.card-danger {
	background-color: #fef2f2;
	border: 1px solid #fecaca;
}

.card-danger .section-title-danger {
	color: #dc2626;
	border-bottom: none;
	padding-bottom: 0;
	margin-bottom: 12px;
}

.danger-description {
	font-size: 14px;
	color: #666;
	margin-bottom: 16px;
	line-height: 1.6;
}

.current-email-label {
	font-size: 14px;
	color: #555;
	margin-bottom: 20px;
}

.back-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 14px;
	color: #2563eb;
	margin-bottom: 8px;
}

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

.email-change-link {
	font-size: 13px;
	color: #2563eb;
}

.alert-warning {
	background-color: #fef3c7;
	border: 1px solid #f59e0b;
	color: #92400e;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
	margin-bottom: 16px;
}

.btn-danger {
	display: inline-block;
	font-size: 14px;
	font-weight: bold;
	padding: 10px 24px;
	background-color: #dc2626;
	color: #fff;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.2s;
}

.btn-danger:hover {
	background-color: #b91c1c;
}

.btn-danger:disabled {
	background-color: #f87171;
	cursor: not-allowed;
}

.section-title {
	font-size: 18px;
	font-weight: bold;
	margin-bottom: 20px;
	padding-bottom: 12px;
	border-bottom: 1px solid #e0e0e0;
}

/* ── Form ────────────────────────────────────────── */
.form-group {
	margin-bottom: 16px;
}

.form-row {
	display: flex;
	gap: 12px;
}

.form-row .form-group {
	flex: 1;
}

.form-label {
	display: block;
	font-size: 14px;
	font-weight: 500;
	color: #666;
	margin-bottom: 6px;
}

.required-mark {
	color: #dc2626;
	margin-left: 2px;
}

.form-input {
	width: 100%;
	font-size: 16px;
	padding: 10px 12px;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	outline: none;
	transition: border-color 0.2s;
	font-family: inherit;
}

.form-input:focus {
	border-color: #2563eb;
}

.form-input:read-only {
	background-color: #f5f5f5;
	color: #333;
	cursor: default;
	border-color: transparent;
}

.form-input.placeholder-dash:read-only {
	color: #999;
}

.form-select {
	width: 100%;
	font-size: 16px;
	padding: 10px 12px;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	outline: none;
	background-color: #fff;
	cursor: pointer;
	font-family: inherit;
}

.form-select:focus {
	border-color: #2563eb;
}

.form-select:disabled {
	background-color: #f5f5f5;
	color: #333;
	cursor: default;
	border-color: transparent;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

.form-helper {
	font-size: 12px;
	color: #999;
	margin-top: 4px;
}

/* ── Radio Group ─────────────────────────────────── */
.radio-group {
	display: flex;
	gap: 0;
}

.radio-option {
	flex: 1;
}

.radio-option input[type="radio"] {
	display: none;
}

.radio-option label {
	display: block;
	text-align: center;
	padding: 10px 16px;
	font-size: 16px;
	border: 1px solid #e0e0e0;
	cursor: pointer;
	transition: all 0.2s;
}

.radio-option:first-child label {
	border-radius: 6px 0 0 6px;
}

.radio-option:last-child label {
	border-radius: 0 6px 6px 0;
}

.radio-option input[type="radio"]:checked + label {
	background-color: #2563eb;
	color: #fff;
	border-color: #2563eb;
}

.radio-option input[type="radio"]:disabled + label {
	cursor: default;
	opacity: 0.7;
}

.radio-option input[type="radio"]:disabled:checked + label {
	opacity: 1;
}

/* ── Checkbox ────────────────────────────────────── */
.checkbox-group {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}

.checkbox-group input[type="checkbox"] {
	width: 18px;
	height: 18px;
	accent-color: #2563eb;
	cursor: pointer;
}

.checkbox-group label {
	font-size: 14px;
	color: #333;
	cursor: pointer;
}

/* ── Buttons ─────────────────────────────────────── */
.btn-primary {
	display: inline-block;
	font-size: 16px;
	font-weight: bold;
	padding: 12px 32px;
	background-color: #2563eb;
	color: #fff;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.2s;
	width: 100%;
	text-align: center;
}

.btn-primary:hover {
	background-color: #1d4ed8;
}

.btn-primary:disabled {
	background-color: #93b4f5;
	cursor: not-allowed;
}

.btn-secondary {
	display: inline-block;
	font-size: 16px;
	font-weight: bold;
	padding: 12px 32px;
	background-color: #fff;
	color: #2563eb;
	border: 1px solid #2563eb;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s;
	width: 100%;
	text-align: center;
}

.btn-secondary:hover {
	background-color: #eff6ff;
}

/* ── Messages ────────────────────────────────────── */
.error-message {
	color: #dc2626;
	font-size: 14px;
	margin-top: 8px;
	display: none;
}

.error-message.visible {
	display: block;
}

.success-message {
	color: #16a34a;
	font-size: 14px;
	padding: 12px 16px;
	background-color: #f0fdf4;
	border-radius: 6px;
	margin-bottom: 16px;
	display: none;
}

.success-message.visible {
	display: block;
}

.global-error {
	color: #dc2626;
	font-size: 14px;
	padding: 12px 16px;
	background-color: #fef2f2;
	border-radius: 6px;
	margin-bottom: 16px;
	display: none;
}

.global-error.visible {
	display: block;
}

/* ── Auth Pages (Register, Login, Password Reset) ── */
.auth-container {
	max-width: 460px;
	margin: 60px auto;
	padding: 0 16px;
}

.auth-card {
	background-color: #fff;
	border-radius: 8px;
	padding: 32px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.auth-title {
	font-size: 24px;
	font-weight: bold;
	text-align: center;
	margin-bottom: 8px;
}

.auth-subtitle {
	font-size: 14px;
	color: #666;
	text-align: center;
	margin-bottom: 24px;
}

.auth-agree-text {
	text-align: center;
	margin-top: 12px;
	font-size: 12px;
	color: #999;
	line-height: 1.6;
}

.auth-agree-text a {
	color: #2563eb;
}

.auth-links {
	text-align: center;
	margin-top: 16px;
	font-size: 14px;
}

.auth-links a {
	color: #2563eb;
}

.auth-links p {
	margin-bottom: 12px;
}

.auth-links p:last-child {
	margin-bottom: 0;
}

/* ── LINE Login ──────────────────────────────────── */
.auth-divider {
	display: flex;
	align-items: center;
	margin: 32px 0;
	color: #999;
	font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
	content: "";
	flex: 1;
	border-bottom: 1px solid #e5e7eb;
}

.auth-divider::before {
	margin-right: 16px;
}

.auth-divider::after {
	margin-left: 16px;
}

.btn-line {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	width: 100%;
	padding: 8px 32px;
	background: #06C755;
	color: #fff;
	border: 1px solid #06C755;
	border-radius: 6px;
	cursor: pointer;
	text-decoration: none;
	font-size: 16px;
	font-weight: bold;
	transition: opacity 0.2s;
}

.btn-line:hover {
	opacity: 0.7;
}

.btn-line:active {
	opacity: 0.5;
}

.btn-line-icon {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.btn-line-icon img {
	width: 32px;
	height: 32px;
}

.btn-line-text {
	white-space: nowrap;
}

.auth-line-benefit {
	margin: 10px 0 0;
	text-align: center;
	font-size: 13px;
	font-weight: 600;
	color: #06C755;
}

.btn-line-sm {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 12px 32px;
	background: none;
	color: #333;
	border: 1px solid #ddd;
	border-radius: 6px;
	cursor: pointer;
	text-decoration: none;
	font-size: 15px;
	font-weight: 600;
	transition: opacity 0.2s;
}

.btn-line-sm:hover {
	opacity: 0.7;
}

.btn-line-sm-disabled {
	background: #f5f5f5;
	color: #999;
	border-color: #e0e0e0;
	cursor: not-allowed;
	pointer-events: none;
}

.btn-line-sm img {
	display: block;
	flex-shrink: 0;
}

.btn-line-sm-disabled img {
	filter: grayscale(100%);
	opacity: 0.5;
}



/* ── Disabled Link ──────────────────────────────── */
.link-disabled {
	color: #999;
	pointer-events: none;
	cursor: default;
	text-decoration: underline;
}

/* ── Footer ──────────────────────────────────────── */
.footer {
	background-color: #333;
	color: #ccc;
	padding: 32px 24px;
	margin-top: auto;
}

.footer-inner {
	max-width: 700px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 32px;
}

.footer-logo {
	font-size: 18px;
	font-weight: bold;
	color: #fff;
	margin-bottom: 4px;
}

.footer-tagline {
	font-size: 12px;
	color: #999;
}

.footer-links {
	display: flex;
	gap: 32px;
}

.footer-column h4 {
	font-size: 12px;
	color: #fff;
	margin-bottom: 8px;
}

.footer-column a {
	display: block;
	font-size: 12px;
	color: #ccc;
	margin-bottom: 4px;
	text-decoration: none;
	pointer-events: none;
	cursor: default;
}

.footer-copyright {
	text-align: center;
	font-size: 12px;
	color: #999;
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid #555;
}

/* ── Profile Page Header ─────────────────────────── */
.profile-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
}

.profile-header-left .page-title {
	margin-bottom: 2px;
}

/* ── Profile View ───────────────────────────────── */
.profile-field {
	margin-bottom: 16px;
}

.profile-field-row {
	display: flex;
	gap: 12px;
}

.profile-field-row .profile-field {
	flex: 1;
}

.profile-field-label {
	font-size: 12px;
	color: #999;
	margin-bottom: 4px;
}

.profile-field-value {
	font-size: 16px;
	color: #333;
	padding: 8px 0;
	border-bottom: 1px solid #f0f0f0;
}

.btn-edit {
	display: inline-block;
	font-size: 14px;
	font-weight: bold;
	padding: 8px 20px;
	background-color: #2563eb;
	color: #fff;
	border: none;
	border-radius: 6px;
	text-decoration: none;
	transition: background-color 0.2s;
}

.btn-edit:hover {
	background-color: #1d4ed8;
	text-decoration: none;
}

.btn-secondary-sm {
	display: inline-block;
	font-size: 14px;
	padding: 8px 20px;
	background-color: #fff;
	color: #666;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	text-decoration: none;
	transition: background-color 0.2s;
}

.btn-secondary-sm:hover {
	background-color: #f5f5f5;
	text-decoration: none;
}

/* ── Toast ───────────────────────────────────────── */
.toast {
	position: fixed;
	top: 24px;
	left: 50%;
	transform: translateX(-50%) translateY(-100px);
	padding: 12px 24px;
	border-radius: 8px;
	font-size: 14px;
	color: #fff;
	z-index: 1000;
	opacity: 0;
	transition: transform 0.3s, opacity 0.3s;
	pointer-events: none;
}

.toast.visible {
	transform: translateX(-50%) translateY(0);
	opacity: 1;
	pointer-events: auto;
}

.toast-error {
	background-color: #dc2626;
}

.toast-success {
	background-color: #16a34a;
}

/* ── Password Field ─────────────────────────────── */
.password-field {
	position: relative;
}

.password-field .form-input {
	padding-right: 44px;
}

.password-toggle {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	color: #999;
	padding: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s;
}

.password-toggle:hover,
.password-toggle.active {
	color: #2563eb;
}

/* ── Password Checklist ─────────────────────────── */
.password-checklist {
	margin-top: 8px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.checklist-item {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: #999;
	transition: color 0.2s;
}

.checklist-item.met {
	color: #16a34a;
}

.checklist-icon::before {
	content: "○";
	font-size: 10px;
}

.checklist-item.met .checklist-icon::before {
	content: "✓";
	font-weight: bold;
}

.password-mismatch {
	font-size: 12px;
	color: #dc2626;
	margin-top: 4px;
}

/* ── Section Title with Icon ────────────────────── */
.section-title-icon {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* ── Loading ─────────────────────────────────────── */
.loading {
	text-align: center;
	padding: 32px;
	color: #999;
	font-size: 14px;
}

/* ── Verify Email ───────────────────────────────── */
.verify-email-icon {
	text-align: center;
	font-size: 48px;
	margin-bottom: 16px;
}

/* ── Action Success ─────────────────────────────── */
.action-success {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 48px 0;
}

.success-check-icon {
	width: 64px;
	height: 64px;
	margin-bottom: 24px;
}

.success-check-icon svg {
	width: 100%;
	height: 100%;
}

.action-success .auth-title {
	margin-bottom: 48px;
}

/* ── Onboarding Progress ───────────────────────── */
.onboarding-progress {
	max-width: 460px;
	margin: 32px auto 0;
	padding: 0 16px;
}

.onboarding-steps {
	display: flex;
	justify-content: space-between;
	margin-bottom: 8px;
}

.onboarding-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	flex: 1;
}

.step-indicator {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: bold;
	border: 2px solid #e0e0e0;
	color: #999;
	background-color: #fff;
	transition: all 0.2s;
}

.step-label {
	font-size: 11px;
	color: #999;
	white-space: nowrap;
	transition: color 0.2s;
}

.onboarding-step.active .step-indicator {
	border-color: #2563eb;
	background-color: #2563eb;
	color: #fff;
}

.onboarding-step.active .step-label {
	color: #2563eb;
	font-weight: 600;
}

.onboarding-step.completed .step-indicator {
	border-color: #2563eb;
	background-color: #2563eb;
	color: #fff;
}

.onboarding-step.completed .step-label {
	color: #333;
}

.onboarding-bar {
	height: 4px;
	background-color: #e0e0e0;
	border-radius: 2px;
	overflow: hidden;
}

.onboarding-bar-fill {
	height: 100%;
	background-color: #2563eb;
	border-radius: 2px;
	transition: width 0.3s ease;
}

/* ── Autocomplete ───────────────────────────────── */
.autocomplete-wrapper {
	position: relative;
}

.autocomplete-list {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	max-height: 240px;
	overflow-y: auto;
	background-color: #fff;
	border: 1px solid #e0e0e0;
	border-top: none;
	border-radius: 0 0 6px 6px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	z-index: 50;
	list-style: none;
	margin: 0;
	padding: 0;
}

.autocomplete-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 12px;
	font-size: 14px;
	cursor: pointer;
	transition: background-color 0.1s;
}

.autocomplete-item:hover,
.autocomplete-item-active {
	background-color: #eff6ff;
}

.autocomplete-item-label {
	color: #333;
}

.autocomplete-item-meta {
	color: #999;
	font-size: 12px;
	margin-left: 8px;
	flex-shrink: 0;
}

.autocomplete-no-result {
	color: #999;
	cursor: default;
	font-size: 13px;
	text-align: center;
	padding: 16px 12px;
}

.autocomplete-no-result:hover {
	background-color: transparent;
}

/* ── Legal pages (terms / privacy) ───────────────── */
.legal-article {
	background-color: #fff;
	border-radius: 8px;
	padding: 32px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	line-height: 1.9;
	color: #333;
	font-size: 14px;
}

.legal-article h2 {
	font-size: 16px;
	font-weight: bold;
	margin: 32px 0 12px;
	color: #111;
}

.legal-article h2:first-of-type {
	margin-top: 0;
}

.legal-article p {
	margin: 0 0 6px 0;
}

.legal-lead {
	margin-bottom: 24px;
}

.legal-l1 {
	padding-left: 1.75em;
	text-indent: -1.75em;
}

.legal-l2 {
	padding-left: 3.25em;
	text-indent: -1.5em;
}

.legal-l3 {
	padding-left: 4.75em;
	text-indent: -1.5em;
}

.legal-note {
	margin-top: 12px;
	padding: 12px 16px;
	background-color: #f7f7f7;
	border-left: 3px solid #ccc;
	font-size: 13px;
	color: #555;
}

.legal-important {
	font-weight: bold;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.legal-footer {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid #eee;
	font-size: 13px;
	color: #555;
}

.legal-footer p {
	margin: 0 0 4px 0;
}

@media (max-width: 600px) {
	.legal-article {
		padding: 20px;
		font-size: 13px;
	}
}
