.knmg-auth-body {
	margin: 0;
	background: #111;
}
.knmg-auth-body header,
.knmg-auth-body footer,
.knmg-auth-body #header,
.knmg-auth-body #footer,
.knmg-auth-body .site-header,
.knmg-auth-body .site-footer,
.knmg-auth-body #wpadminbar {
	display: none !important;
}
.knmg-auth-screen {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	min-height: 100vh;
	padding: clamp(32px, 8vh, 80px) 24px 24px;
	background-color: #161616;
	background-image: var(--iaa-auth-bg-desktop, linear-gradient(135deg, #222, #050505));
	background-size: cover;
	background-position: center;
	overflow: auto;
	box-sizing: border-box;
}


.knmg-auth-screen.is-login-mode {
	align-items: center;
	padding-top: 24px;
	padding-bottom: 24px;
}

.knmg-auth-overlay {
	position: fixed;
	inset: 0;
	background:
		radial-gradient(circle at center, rgba(255,255,255,0.08), rgba(0,0,0,0.35) 45%, rgba(0,0,0,0.68) 100%),
		linear-gradient(180deg, rgba(0,0,0,0.08), rgba(0,0,0,0.38));
	pointer-events: none;
}
.knmg-auth-panel {
	position: relative;
	z-index: 2;
	width: min(440px, 100%);
	padding: 34px;
	border-radius: 28px;
	background: rgba(255,255,255,0.90);
	box-shadow: 0 30px 80px rgba(0,0,0,0.38);
	backdrop-filter: blur(14px);
	opacity: 0;
	transform: translateY(18px) scale(0.98);
	pointer-events: none;
	transition: opacity 640ms ease, transform 640ms ease;
	box-sizing: border-box;
	color: #1f1f1f;
}
.knmg-auth-screen.is-ready .knmg-auth-panel {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}
.knmg-brand {
	text-align: center;
	margin-bottom: 22px;
}
.knmg-brand-mark {
	display: none;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	margin-bottom: 12px;
	border-radius: 50%;
	background: #1f1f1f;
	color: #fff;
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
}
.knmg-brand h1 {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: 0.04em;
}
.knmg-switch {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	padding: 5px;
	margin-bottom: 22px;
	border-radius: 999px;
	background: rgba(0,0,0,0.06);
}
.knmg-switch-button {
	border: 0;
	border-radius: 999px;
	padding: 11px 14px;
	background: transparent;
	color: #555;
	font-weight: 700;
	cursor: pointer;
	transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}
.knmg-switch-button.is-active {
	background: #fff;
	color: #111;
	box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.knmg-form-section {
	display: none;
}
.knmg-form-section.is-active {
	display: block;
}
.knmg-auth-panel label,
.knmg-profile-box label {
	display: block;
	margin: 0 0 15px;
	font-weight: 700;
}
.knmg-auth-panel label span,
.knmg-profile-box label span {
	display: block;
	margin-bottom: 7px;
	font-size: 13px;
}
.knmg-auth-panel input[type="text"],
.knmg-auth-panel input[type="email"],
.knmg-auth-panel input[type="password"],
.knmg-auth-panel input[type="tel"],
.knmg-auth-panel input[type="date"],
.knmg-auth-panel input[type="url"],
.knmg-auth-panel input[type="number"],
.knmg-auth-panel select,
.knmg-profile-box input[type="text"],
.knmg-profile-box input[type="email"],
.knmg-profile-box input[type="password"],
.knmg-profile-box input[type="tel"],
.knmg-profile-box input[type="date"],
.knmg-profile-box input[type="url"],
.knmg-profile-box input[type="number"],
.knmg-profile-box select {
	width: 100%;
	min-height: 48px;
	border: 1px solid rgba(0,0,0,0.15);
	border-radius: 14px;
	padding: 0 14px;
	background: #fff;
	box-shadow: none;
	font-size: 16px;
	box-sizing: border-box;
}
.knmg-auth-panel input:focus,
.knmg-auth-panel select:focus,
.knmg-profile-box input:focus,
.knmg-profile-box select:focus {
	border-color: #111;
	outline: 2px solid rgba(0,0,0,0.08);
}
.knmg-check {
	display: flex !important;
	align-items: center;
	gap: 8px;
	font-weight: 400 !important;
}
.knmg-check input {
	width: auto;
}
.knmg-check span {
	display: inline !important;
	margin: 0 !important;
	font-size: 14px !important;
}
.knmg-primary-button,
.knmg-inline-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	width: 100%;
	border: 0;
	border-radius: 999px;
	padding: 0 20px;
	background: #111;
	color: #fff !important;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
	box-sizing: border-box;
}
.knmg-primary-button:hover,
.knmg-inline-button:hover {
	transform: translateY(-1px);
	box-shadow: 0 12px 28px rgba(0,0,0,0.22);
	background: #333;
}
.knmg-note {
	margin: 0 0 16px;
	color: #666;
	font-size: 13px;
	line-height: 1.7;
}
.knmg-message {
	margin: 0 0 18px;
	padding: 12px 14px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.6;
}
.knmg-message p {
	margin: 0;
}
.knmg-message p + p {
	margin-top: 6px;
}
.knmg-message.is-error {
	background: #fff1f1;
	color: #9f1d1d;
}
.knmg-message.is-success {
	background: #eef9f0;
	color: #17642a;
}
.knmg-hp {
	position: absolute !important;
	left: -10000px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}
.knmg-profile-box {
	max-width: 680px;
	margin: 36px auto;
	padding: 28px;
	border-radius: 22px;
	background: #fff;
	box-shadow: 0 14px 40px rgba(0,0,0,0.08);
	box-sizing: border-box;
}
.knmg-profile-box h2 {
	margin-top: 0;
}
.knmg-profile-box hr {
	margin: 24px 0;
	border: 0;
	border-top: 1px solid rgba(0,0,0,0.1);
}
.knmg-profile-links {
	margin-top: 20px;
}
.knmg-profile-links a {
	color: inherit;
}
.knmg-profile-box .knmg-inline-button {
	width: auto;
	margin-right: 10px;
	padding: 0 22px;
}



.knmg-auth-panel {
	max-height: calc(100vh - clamp(56px, 10vh, 104px));
	overflow-y: auto;
	overscroll-behavior: contain;
}


.knmg-auth-screen.is-login-mode .knmg-auth-panel {
	max-height: calc(100vh - 48px);
}


.knmg-auth-screen.is-register-mode {
	align-items: flex-start;
}

.knmg-auth-screen.is-register-mode .knmg-auth-panel {
	width: min(760px, 100%);
	padding: 26px 30px;
}

.knmg-auth-screen.is-register-mode .knmg-brand {
	margin-bottom: 16px;
}

.knmg-auth-screen.is-register-mode .knmg-brand-mark {
	width: 44px;
	height: 44px;
	margin-bottom: 8px;
	font-size: 20px;
}

.knmg-auth-screen.is-register-mode .knmg-switch {
	margin-bottom: 16px;
}

.knmg-member-form {
	width: 100%;
}

.knmg-register-form,
.knmg-profile-form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px 16px;
}

.knmg-register-form .knmg-field,
.knmg-profile-form .knmg-field,
.knmg-register-form .knmg-fieldset,
.knmg-profile-form .knmg-fieldset {
	margin: 0;
}

.knmg-form-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px 16px;
	grid-column: 1 / -1;
}

.knmg-field-wide,
.knmg-register-form .knmg-hp,
.knmg-profile-form .knmg-hp,
.knmg-register-form .knmg-note,
.knmg-profile-form .knmg-note,
.knmg-register-form .knmg-primary-button,
.knmg-profile-form .knmg-primary-button,
.knmg-register-form hr,
.knmg-profile-form hr {
	grid-column: 1 / -1;
}

.knmg-register-form .knmg-field-password,
.knmg-register-form .knmg-field-confirm-password {
	grid-column: auto;
}

.knmg-profile-form .knmg-field-current-pass {
	grid-column: 1 / -1;
}

.knmg-profile-form .knmg-field-new-pass,
.knmg-profile-form .knmg-field-new-pass-confirm {
	grid-column: auto;
}

.knmg-auth-panel .knmg-register-form input,
.knmg-auth-panel .knmg-register-form select,
.knmg-profile-box .knmg-profile-form input,
.knmg-profile-box .knmg-profile-form select {
	min-height: 44px;
}

.knmg-profile-box {
	max-width: 760px;
}

@media (max-width: 760px) {
	.knmg-register-form,
	.knmg-profile-form,
	.knmg-form-row {
		grid-template-columns: 1fr;
	}

	.knmg-register-form .knmg-field-password,
	.knmg-register-form .knmg-field-confirm-password,
	.knmg-profile-form .knmg-field-new-pass,
	.knmg-profile-form .knmg-field-new-pass-confirm {
		grid-column: 1 / -1;
	}
}

@media (max-width: 600px) {
	.knmg-auth-screen {
		padding: 44px 16px 16px;
		align-items: flex-start;
		background-image: var(--iaa-auth-bg-mobile, var(--iaa-auth-bg-desktop, linear-gradient(135deg, #222, #050505)));
		background-position: center top;
	}
	.knmg-auth-screen.is-login-mode {
		align-items: center;
		padding-top: 16px;
		padding-bottom: 16px;
	}
	.knmg-auth-panel {
		max-height: calc(100vh - 60px);
		padding: 26px 20px;
		border-radius: 24px;
	}
	.knmg-auth-screen.is-login-mode .knmg-auth-panel {
		max-height: calc(100vh - 32px);
	}
	.knmg-brand h1 {
		font-size: 19px;
	}
}


.knmg-fieldset {
	margin: 0 0 16px;
	padding: 0;
	border: 0;
}
.knmg-fieldset legend {
	display: block;
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 700;
	color: #333;
}
.knmg-fieldset legend em,
.knmg-auth-panel label span em,
.knmg-profile-box label span em {
	margin-left: 4px;
	color: #b32d2e;
	font-style: normal;
	font-size: 12px;
}

.knmg-birth-date-field {
	min-width: 0;
}
.knmg-date-selects {
	display: grid;
	grid-template-columns: 1.25fr 1fr 1fr;
	gap: 8px;
	align-items: center;
}
.knmg-date-select-unit {
	display: flex !important;
	align-items: center;
	gap: 5px;
	margin: 0 !important;
	font-weight: 700 !important;
	min-width: 0;
}
.knmg-date-select-unit select {
	min-width: 0;
}
.knmg-date-select-unit b {
	display: inline-block;
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
}

.knmg-radio-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 14px;
}
.knmg-radio-choice {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	margin: 0 !important;
	font-weight: 400;
}
.knmg-radio-choice input {
	width: auto !important;
	margin: 0;
}
.knmg-auth-panel textarea,
.knmg-profile-box textarea {
	width: 100%;
	box-sizing: border-box;
}
.knmg-auth-panel input[readonly],
.knmg-profile-box input[readonly] {
	background: rgba(0,0,0,0.04);
	color: #555;
}


.knmg-register-form .knmg-field,
.knmg-profile-form .knmg-field,
.knmg-register-form .knmg-fieldset,
.knmg-profile-form .knmg-fieldset {
	margin: 0;
}

.knmg-register-form .knmg-hp,
.knmg-profile-form .knmg-hp {
	position: absolute !important;
}

@media (max-width: 600px) {
	.knmg-auth-screen.is-register-mode {
		align-items: flex-start;
	}
	.knmg-auth-screen.is-register-mode .knmg-auth-panel {
		padding: 22px 18px;
	}
}


.knmg-form-links {
	margin: 14px 0 0;
	text-align: center;
	font-size: 13px;
}
.knmg-form-links a {
	color: inherit;
	text-decoration: underline;
}
.knmg-captcha-help {
	display: block !important;
	margin: 0 0 6px !important;
	font-size: 12px !important;
	line-height: 1.5;
	opacity: 0.78;
}
.knmg-captcha-question {
	display: inline-flex !important;
	align-items: center;
	min-height: 34px;
	margin: 0 0 8px !important;
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(0,0,0,0.06);
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
	font-size: 17px !important;
	font-weight: 700;
	letter-spacing: 0.16em;
}
.knmg-lostpassword-form,
.knmg-resetpassword-form {
	width: 100%;
}
