.ipao-auth-open {
	overflow: hidden;
}

.gh-register {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 8px;
	color: var(--color, #000);
	text-decoration: none;
	transition: color .2s ease, background-color .2s ease, transform .2s ease;
}

.gh-register:hover,
.gh-register:focus-visible {
	color: var(--ui-action-secondary, #0000ee);
	background: var(--ui-nav-hover-bg, rgba(0, 0, 238, .08));
	outline: none;
}

.gh-register .ipao-svg-icon,
.gh-register i {
	display: inline-grid;
	place-items: center;
	width: 20px;
	height: 20px;
	font-size: 20px;
	line-height: 1;
}

.gh-register .ipao-svg-icon svg {
	width: 20px;
	height: 20px;
}

body.dark-mode .gh-register {
	color: var(--ui-color-text, #fff);
	-webkit-text-fill-color: var(--ui-color-text, #fff);
}

body.dark-mode .gh-head .gh-register,
body.dark-mode .gh-head-brand .gh-register,
body.dark-mode .gh-head-actions .gh-register {
	color: var(--ui-color-text, #fff);
	-webkit-text-fill-color: var(--ui-color-text, #fff);
}

body.dark-mode .gh-register:hover,
body.dark-mode .gh-register:focus-visible {
	color: var(--ui-color-sky, #61b1fb);
	-webkit-text-fill-color: var(--ui-color-sky, #61b1fb);
	background: var(--ui-nav-hover-bg, rgba(97, 177, 251, .24));
}

.ipao-auth-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

body > .ipao-auth-modal {
	width: 100vw;
	height: 100vh;
}

.ipao-auth-modal[aria-hidden="false"] {
	display: flex;
}

.ipao-auth-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .42);
	backdrop-filter: blur(6px);
}

.ipao-auth-dialog {
	position: relative;
	width: min(420px, 100%);
	max-height: calc(100vh - 48px);
	overflow: auto;
	padding: 28px;
	border: 1px solid var(--ui-color-border, #e8edf2);
	border-radius: 8px;
	background: var(--ui-bg-surface, #fff);
	box-shadow: var(--ui-shadow-lg, 0 18px 48px rgba(0, 0, 0, .16));
	color: var(--ui-color-text, #000);
}

.ipao-auth-close {
	position: absolute;
	top: 16px;
	right: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 8px;
	background: var(--ui-bg-subtle, #f5f8fa);
	color: var(--ui-color-text-soft, #323232);
	cursor: pointer;
}

.ipao-auth-close:hover,
.ipao-auth-close:focus-visible {
	color: var(--ui-action-secondary, #0000ee);
	background: var(--ui-nav-hover-bg, rgba(0, 0, 238, .08));
	outline: none;
}

.ipao-auth-head {
	padding-right: 40px;
	margin-bottom: 18px;
}

.ipao-auth-kicker {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--ui-action-primary, #ff6000);
	text-transform: uppercase;
}

.ipao-auth-head h2 {
	margin: 0;
	font-size: 24px;
	line-height: 1.25;
	letter-spacing: 0;
	color: var(--ui-color-text, #000);
}

.ipao-auth-message {
	display: none;
	margin-bottom: 14px;
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.5;
}

.ipao-auth-message.is-error {
	display: block;
	border: 1px solid rgba(255, 96, 0, .24);
	background: rgba(255, 96, 0, .08);
	color: var(--ui-action-primary, #ff6000);
}

.ipao-auth-message.is-success {
	display: block;
	border: 1px solid var(--ui-primary-border-stronger, rgba(0, 0, 238, .18));
	background: var(--ui-primary-bg-faint, rgba(0, 0, 238, .07));
	color: var(--ui-action-secondary, #0000ee);
}

.ipao-auth-tabs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	margin-bottom: 16px;
	padding: 4px;
	border-radius: 8px;
	background: var(--ui-bg-subtle, #f5f8fa);
}

.ipao-auth-tabs button {
	height: 36px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--ui-color-text-soft, #323232);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.ipao-auth-tabs button.is-active {
	background: var(--ui-bg-surface, #fff);
	color: var(--ui-action-primary, #ff6000);
	box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
}

.ipao-auth-form {
	display: none;
	gap: 12px;
}

.ipao-auth-form.is-active {
	display: grid;
}

.ipao-auth-form label {
	display: grid;
	gap: 6px;
	margin: 0;
	color: var(--ui-color-text-soft, #323232);
	font-size: 13px;
	font-weight: 700;
}

.ipao-auth-form input[type="text"],
.ipao-auth-form input[type="email"],
.ipao-auth-form input[type="password"] {
	width: 100%;
	height: 42px;
	padding: 0 12px;
	border: 1px solid var(--ui-color-border, #e8edf2);
	border-radius: 8px;
	background: var(--ui-bg-surface, #fff);
	color: var(--ui-color-text, #000);
	font-size: 14px;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.ipao-auth-form input:focus {
	border-color: var(--ui-action-secondary, #0000ee);
	box-shadow: 0 0 0 3px var(--ui-primary-bg-medium, rgba(0, 0, 238, .12));
	outline: none;
}

.ipao-auth-code-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 104px;
	gap: 8px;
}

.ipao-auth-code-btn {
	height: 42px;
	border: 1px solid var(--ui-primary-border-stronger, rgba(0, 0, 238, .18));
	border-radius: 8px;
	background: var(--ui-nav-hover-bg, rgba(0, 0, 238, .08));
	color: var(--ui-action-secondary, #0000ee);
	font-size: 13px;
	font-weight: 800;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease, opacity .2s ease;
}

.ipao-auth-code-btn:hover,
.ipao-auth-code-btn:focus-visible {
	border-color: var(--ui-primary-border-bold, rgba(0, 0, 238, .28));
	background: var(--ui-primary-bg-medium, rgba(0, 0, 238, .12));
	outline: none;
}

.ipao-auth-code-btn:disabled {
	cursor: wait;
	opacity: .72;
}

.ipao-auth-check {
	display: flex !important;
	grid-template-columns: none;
	align-items: center;
	gap: 8px !important;
	font-weight: 500 !important;
}

.ipao-auth-check input {
	width: 16px;
	height: 16px;
	accent-color: var(--ui-action-primary, #ff6000);
}

.ipao-auth-submit {
	height: 42px;
	border: 0;
	border-radius: 8px;
	background: var(--ui-action-primary, #ff6000);
	color: #fff;
	font-size: 15px;
	font-weight: 800;
	cursor: pointer;
	transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.ipao-auth-submit:hover,
.ipao-auth-submit:focus-visible {
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(255, 96, 0, .24);
	outline: none;
}

.ipao-auth-submit:disabled {
	cursor: wait;
	opacity: .72;
	transform: none;
	box-shadow: none;
}

.ipao-auth-divider {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 20px 0 14px;
	color: var(--ui-color-text-muted, #999);
	font-size: 13px;
}

.ipao-auth-divider::before,
.ipao-auth-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--ui-color-border, #e8edf2);
}

.ipao-oauth-providers {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.ipao-oauth-provider {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 42px;
	padding: 0 12px;
	border: 1px solid var(--ui-color-border, #e8edf2);
	border-radius: 8px;
	background: var(--ui-bg-surface, #fff);
	color: var(--ui-color-text, #000);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: color .2s ease, border-color .2s ease, background-color .2s ease, transform .2s ease;
}

button.ipao-oauth-provider {
	font-family: inherit;
}

.ipao-wechatmp-login-modal .ipao-auth-dialog {
	width: min(440px, 100%);
}

.ipao-wechatmp-qr {
	display: flex;
	justify-content: center;
}

.ipao-wechatmp-qr img {
	display: block;
	width: 184px;
	height: 184px;
	padding: 6px;
	border: 1px solid var(--ui-color-border, #e8edf2);
	border-radius: 8px;
	background: #fff;
	object-fit: contain;
}

.ipao-wechatmp-steps {
	display: grid;
	gap: 5px;
	margin: 0;
	padding-left: 22px;
	color: var(--ui-color-text-soft, #323232);
	font-size: 13px;
	line-height: 1.6;
}

.ipao-wechatmp-intro {
	margin: 0;
	color: var(--ui-color-text-muted, #777);
	font-size: 14px;
	line-height: 1.6;
}

.ipao-oauth-provider i {
	font-size: 18px;
	line-height: 1;
}

.ipao-oauth-provider:hover,
.ipao-oauth-provider:focus-visible {
	transform: translateY(-1px);
	border-color: var(--ui-primary-border-stronger, rgba(0, 0, 238, .24));
	background: var(--ui-nav-hover-bg, rgba(0, 0, 238, .08));
	color: var(--ui-action-secondary, #0000ee);
	outline: none;
}

.ipao-auth-empty {
	margin: 0;
	padding: 12px;
	border-radius: 8px;
	background: var(--ui-bg-subtle, #f5f8fa);
	color: var(--ui-color-text-muted, #999);
	font-size: 14px;
}

.ipao-user-center {
	width: min(var(--content-width, 1280px), calc(100% - 32px));
	margin: 32px auto 48px;
}

.ipao-user-card,
.ipao-user-bindings {
	padding: 24px;
	border: 1px solid var(--ui-color-border, #e8edf2);
	border-radius: 8px;
	background: var(--ui-bg-surface, #fff);
	box-shadow: var(--ui-shadow-sm, 0 8px 24px rgba(0, 0, 0, .06));
}

.ipao-user-card {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 16px;
}

.ipao-user-card img {
	width: 64px;
	height: 64px;
	border-radius: 50%;
}

.ipao-user-card h1 {
	margin: 0 0 4px;
	font-size: 24px;
	line-height: 1.25;
	letter-spacing: 0;
}

.ipao-user-card p {
	margin: 0;
	color: var(--ui-color-text-muted, #999);
}

.ipao-user-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 14px;
}

.ipao-user-actions a,
.ipao-binding-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 36px;
	padding: 0 12px;
	border-radius: 8px;
	background: var(--ui-bg-subtle, #f5f8fa);
	color: var(--ui-action-secondary, #0000ee);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	border: 0;
	cursor: pointer;
	font-family: inherit;
}

.ipao-user-actions a:hover,
.ipao-binding-action:hover {
	background: var(--ui-nav-hover-bg, rgba(0, 0, 238, .08));
	color: var(--ui-action-secondary, #0000ee);
}

.ipao-user-bindings h2 {
	margin: 0 0 16px;
	font-size: 18px;
	letter-spacing: 0;
}

.ipao-binding-list {
	display: grid;
	gap: 10px;
}

.ipao-binding-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px;
	border: 1px solid var(--ui-color-border, #e8edf2);
	border-radius: 8px;
}

.ipao-binding-name {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 800;
}

.ipao-binding-name i {
	font-size: 20px;
	color: var(--ui-action-secondary, #0000ee);
}

.ipao-binding-status {
	color: var(--ui-color-text-muted, #999);
	font-size: 13px;
}

.ipao-binding-action.is-unbind {
	color: var(--ui-action-primary, #ff6000);
	background: rgba(255, 96, 0, .08);
}

.ipao-user-login {
	text-align: center;
}

.ipao-user-login .ipao-auth-trigger {
	width: auto;
	padding: 0 18px;
	background: var(--ui-action-primary, #ff6000);
	color: #fff;
}

body.dark-mode .ipao-auth-dialog,
body.dark-mode .ipao-oauth-provider,
body.dark-mode .ipao-user-card,
body.dark-mode .ipao-user-bindings {
	border-color: rgba(255, 255, 255, .16);
	background: var(--ui-bg-surface, #111827);
	color: var(--ui-color-text, #fff);
}

body.dark-mode .ipao-auth-head h2,
body.dark-mode .ipao-auth-form label,
body.dark-mode .ipao-auth-check,
body.dark-mode .ipao-auth-tabs button,
body.dark-mode .ipao-auth-close,
body.dark-mode .ipao-user-card h1,
body.dark-mode .ipao-user-bindings h2,
body.dark-mode .ipao-binding-name {
	color: var(--ui-color-text, #fff);
}

body.dark-mode .ipao-auth-divider,
body.dark-mode .ipao-auth-empty,
body.dark-mode .ipao-user-card p,
body.dark-mode .ipao-binding-status {
	color: var(--ui-color-text-muted, rgba(255, 255, 255, .68));
}

body.dark-mode .ipao-wechatmp-steps,
body.dark-mode .ipao-wechatmp-intro {
	color: var(--ui-color-text-muted, rgba(255, 255, 255, .68));
}

body.dark-mode .ipao-wechatmp-qr img {
	border-color: rgba(255, 255, 255, .16);
}

body.dark-mode .ipao-auth-divider::before,
body.dark-mode .ipao-auth-divider::after {
	background: rgba(255, 255, 255, .14);
}

body.dark-mode .ipao-auth-close,
body.dark-mode .ipao-auth-tabs,
body.dark-mode .ipao-auth-empty,
body.dark-mode .ipao-user-actions a,
body.dark-mode .ipao-binding-action {
	background: rgba(255, 255, 255, .08);
}

body.dark-mode .ipao-auth-close:hover,
body.dark-mode .ipao-auth-close:focus-visible,
body.dark-mode .ipao-user-actions a:hover,
body.dark-mode .ipao-binding-action:hover {
	color: var(--ui-color-sky, #61b1fb);
	background: var(--ui-nav-hover-bg, rgba(97, 177, 251, .24));
}

body.dark-mode .ipao-auth-form input[type="text"],
body.dark-mode .ipao-auth-form input[type="email"],
body.dark-mode .ipao-auth-form input[type="password"] {
	border-color: rgba(255, 255, 255, .16);
	background: rgba(255, 255, 255, .07);
	color: var(--ui-color-text, #fff);
}

body.dark-mode .ipao-auth-form input::placeholder {
	color: rgba(255, 255, 255, .48);
}

body.dark-mode .ipao-auth-form input:focus {
	border-color: var(--ui-color-sky, #61b1fb);
	box-shadow: 0 0 0 3px rgba(97, 177, 251, .22);
}

body.dark-mode .ipao-auth-code-btn {
	border-color: rgba(255, 255, 255, .12);
	background: rgba(97, 177, 251, .18);
	color: var(--ui-color-sky, #61b1fb);
}

body.dark-mode .ipao-auth-tabs button.is-active {
	background: rgba(255, 255, 255, .14);
	color: var(--ui-action-primary, #ff6000);
	box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
}

body.dark-mode .ipao-oauth-provider {
	background: rgba(255, 255, 255, .06);
	color: var(--ui-color-text, #fff);
}

body.dark-mode .ipao-oauth-provider:hover,
body.dark-mode .ipao-oauth-provider:focus-visible {
	border-color: rgba(97, 177, 251, .38);
	background: var(--ui-nav-hover-bg, rgba(97, 177, 251, .24));
	color: var(--ui-color-sky, #61b1fb);
}

body.dark-mode .ipao-binding-item {
	border-color: rgba(255, 255, 255, .16);
}

@media (max-width: 640px) {
	.ipao-auth-modal {
		align-items: flex-end;
		padding: 0;
	}

	.ipao-auth-dialog {
		width: 100%;
		max-height: calc(100vh - 24px);
		border-radius: 8px 8px 0 0;
		padding: 24px 18px;
	}

	.ipao-oauth-providers {
		grid-template-columns: 1fr;
	}

	.ipao-auth-code-row {
		grid-template-columns: minmax(0, 1fr) 96px;
	}

	.ipao-user-card,
	.ipao-binding-item {
		align-items: flex-start;
		flex-direction: column;
	}
}
