:root {
	font-family: Inter,"Microsoft YaHei",system-ui,sans-serif;
	color: #151824;
	background: #f4f6fc;
	font-synthesis: none;
	--primary: #524bff;
	--muted: #9599a7;
	--line: #e9ebf2;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
}

button,input,select,textarea {
	font: inherit;
}

button,a,select {
	-webkit-tap-highlight-color: transparent;
}

button {
	cursor: pointer;
}

button:disabled {
	opacity: .55;
	cursor: wait;
}

a {
	color: inherit;
	text-decoration: none;
}

[hidden] {
	display: none!important;
}

.app-header {
	height: 82px;
	padding: 14px 24px;
	display: flex;
	align-items: center;
	gap: 16px;
	color: white;
	background: #514bff;
	position: relative;
	z-index: 5;
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 29px;
	font-weight: 800;
	letter-spacing: 1px;
	margin-right: auto;
}

.brand-symbol {
	border: 2px solid #c5d2ff;
	border-radius: 50%;
	height: 40px;
	width: 40px;
	font-size: 23px;
	text-align: center;
	line-height: 36px;
}

.icon-button {
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 28px;
	padding: 6px 8px;
}

.wallet-button,.app-header select {
	background: white;
	border: 0;
	border-radius: 7px;
	color: #141625;
	padding: 10px 15px;
	font-weight: 600;
	max-width: 145px;
}

.wallet-logout-button {
	background: transparent;
	border: 1px solid #c5d2ff;
	border-radius: 7px;
	color: inherit;
	padding: 8px 12px;
	font-size: 14px;
	white-space: nowrap;
}

.wallet-login-notice {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	padding: 14px 20px;
	background: #eeedff;
}

.wallet-login-notice p {
	flex: 1 1 240px;
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
}

.wallet-login-notice button {
	flex-shrink: 0;
}

.app-navigation {
	position: absolute;
	top: 78px;
	left: 20px;
	z-index: 10;
	padding: 16px;
	border-radius: 16px;
	background: white;
	box-shadow: 0 18px 50px #20243e30;
	min-width: 220px;
	display: grid;
	gap: 3px;
}

.app-navigation a,.app-navigation button {
	border: 0;
	background: transparent;
	padding: 12px;
	text-align: left;
	color: #31394d;
}

.app-navigation a:hover {
	background: #f1f0ff;
	border-radius: 8px;
}

main {
	max-width: 1040px;
	margin: 0 auto;
	padding-bottom: 60px;
}

.hero {
	height: 305px;
	background: linear-gradient(125deg,#4849ff,#5c47f8);
	color: #fff;
	display: flex;
	align-items: center;
	padding: 40px;
	border-radius: 0 0 38px 38px;
	position: relative;
	overflow: hidden;
}

.hero-copy {
	position: relative;
	z-index: 1;
}

.eyebrow {
	font-size: 12px;
	letter-spacing: 3px;
	opacity: .8;
}

.hero h1 {
	font-size: 48px;
	margin: 13px 0;
	letter-spacing: -1.5px;
}

.hero-copy>p:last-child {
	font-size: 22px;
	margin: 0;
	opacity: .85;
}

.hero-art {
	width: 290px;
	position: absolute;
	right: 15px;
	top: 25px;
	opacity: .85;
}

.overview-card,.content-card,.product-card {
	background: #fff;
	border-radius: 22px;
	padding: 30px;
	box-shadow: 0 10px 40px #30397308;
}

.overview-card {
	margin: -37px 26px 26px;
	position: relative;
	text-align: center;
}

.card-caption {
	font-size: 17px;
	color: #656c7c;
	margin: 0 0 22px;
}

.total-amount {
	font-size: 44px;
	letter-spacing: -1.5px;
	font-weight: 600;
}

.total-amount small {
	font-size: 25px;
	font-weight: 500;
}

.metric-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;
	margin: 38px 0 28px;
}

.metric-grid>div:nth-child(odd) {
	border-right: 1px solid var(--line);
}

.metric-grid p {
	color: var(--muted);
	font-size: 17px;
	margin: 0 0 10px;
}

.metric-grid strong {
	font-size: 27px;
	font-weight: 600;
	letter-spacing: -.5px;
}

.metric-grid small {
	font-size: 13px;
}

.refresh-button {
	color: var(--primary);
	border: 0;
	background: transparent;
	font-size: 24px;
}

.compound-link {
	display: block;
	color: #d99a38;
	text-decoration: underline;
	font-size: 13px;
	margin-top: 6px;
}

.settlement-clock {
	display: inline-block;
	border-radius: 30px;
	padding: 13px 23px;
	background: #f4f5f8;
	font-size: 15px;
	margin: 8px auto 26px;
}

.settlement-clock strong {
	font-variant-numeric: tabular-nums;
	margin-left: 8px;
}

.primary-button {
	background: linear-gradient(100deg,#4c5bff,#7b5bff);
	border: 0;
	color: white;
	border-radius: 24px;
	padding: 13px 27px;
	box-shadow: 0 7px 20px #6052ff22;
	display: inline-block;
}

.start-button {
	display: block;
	width: max-content;
	max-width: 100%;
	min-width: 235px;
	margin: 0 auto 16px;
	font-size: 19px;
}

.muted {
	color: #969bab;
	font-size: 13px;
	line-height: 1.8;
}

.content-card {
	margin: 26px;
}

.content-card h2 {
	font-size: 21px;
	margin: 0 0 24px;
}

.participation-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.participation-grid>a,.participation-grid>button {
	background: #f7f7ff;
	border: 0;
	border-radius: 16px;
	padding: 22px;
	text-align: left;
}

.participation-grid span {
	font-size: 35px;
	color: #7066ff;
}

.participation-grid h3 {
	font-size: 18px;
	margin: 12px 0;
}

.participation-grid p {
	font-size: 13px;
	color: #9296a4;
	line-height: 1.6;
}

.content-panel {
	padding: 20px;
}

.content-panel>h1 {
	font-size: 25px;
	margin: 18px 6px;
}

.content-panel>.content-card {
	margin: 18px 0;
}

.product-list {
	display: grid;
	grid-template-columns: repeat(2,minmax(0,1fr));
	gap: 20px;
	margin-top: 22px;
}

.product-card h2 {
	font-size: 22px;
}

.product-card .rate {
	color: var(--primary);
	font-size: 32px;
	font-weight: 650;
}

.product-card p {
	line-height: 1.8;
	color: #777e90;
}

.product-card .buttons {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 20px;
}

.product-card .product-yield-section,.product-card .product-redemption-section {
	min-width: 0;
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid var(--line);
}

.product-card .product-yield-section h3,.product-card .product-redemption-section h3 {
	margin: 0;
	font-size: 18px;
	line-height: 1.5;
	color: #263047;
}

.product-card .product-tier-list {
	display: grid;
	gap: 12px;
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
}

.product-card .product-tier {
	min-width: 0;
	padding: 16px;
	border: 1px solid #e1e3f1;
	border-radius: 14px;
	background: #f7f7ff;
}

.product-card .product-tier-name {
	margin: 0 0 12px;
	color: #39445e;
	font-size: 16px;
	line-height: 1.5;
}

.product-card .product-tier-facts {
	display: grid;
	grid-template-columns: max-content minmax(0,1fr);
	align-items: baseline;
	gap: 10px 12px;
	margin: 0;
	font-size: 16px;
	line-height: 1.6;
	font-variant-numeric: tabular-nums;
}

.product-card .product-tier-facts dt {
	color: #545e73;
}

.product-card .product-tier-facts dd {
	min-width: 0;
	margin: 0;
	text-align: right;
	color: #263047;
	overflow-wrap: anywhere;
}

.product-card .product-tier-facts .product-tier-rate {
	color: #4540d4;
	font-size: 24px;
	font-weight: 700;
}

.product-card .product-tier-note,.product-card .product-redemption-section p {
	margin: 14px 0 0;
	color: #545e73;
	font-size: 16px;
	line-height: 1.7;
	overflow-wrap: anywhere;
}

.secondary-button {
	border: 1px solid #d6d9ee;
	background: white;
	padding: 11px 17px;
	border-radius: 20px;
}

.support-button {
	position: fixed;
	right: 24px;
	bottom: 28px;
	background: white;
	color: #5351ff;
	border: 0;
	box-shadow: 0 6px 30px #5560a32b;
	border-radius: 50%;
	height: 60px;
	width: 60px;
	font-size: 38px;
	z-index: 8;
}

.account-metrics {
	display: grid;
	grid-template-columns: repeat(3,1fr);
	gap: 12px;
	text-align: center;
}

.account-metrics p {
	font-size: 13px;
	color: #9197a7;
}

.account-metrics strong {
	font-size: 23px;
}

.action-grid {
	display: flex;
	gap: 12px;
	margin: 28px 0;
}

.action-grid>* {
	border: 0;
	border-radius: 17px;
	background: #f0efff;
	color: var(--primary);
	padding: 11px 18px;
	font-size: 14px;
}

.content-card label {
	display: block;
	color: #727a8d;
	margin: 0 0 22px;
	font-size: 14px;
}

.content-card input {
	display: block;
	width: 100%;
	margin-top: 10px;
	padding: 15px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: #f8f9fc;
	color: #1e2944;
	font-size: 15px;
}

.content-card details {
	padding: 20px 0;
	border-bottom: 1px solid var(--line);
}

details summary {
	cursor: pointer;
	font-weight: 600;
}

details p {
	color: #788193;
	line-height: 1.9;
	font-size: 14px;
	white-space: pre-wrap;
}

.empty-state {
	padding: 55px 20px;
	text-align: center;
	color: #9ba3b3;
	background: white;
	border-radius: 20px;
	grid-column: 1/-1;
}

.order-card,.earning-row {
	padding: 20px;
	margin: 12px 0;
	border-radius: 14px;
	background: white;
	font-size: 14px;
}

.order-card dl {
	display: grid;
	grid-template-columns: 1fr 2fr;
	line-height: 1.9;
}

.order-card dt {
	color: #8991a2;
}

.order-card dd {
	margin: 0;
	overflow-wrap: anywhere;
}

.earning-row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
}

.earning-row strong {
	color: #37b47a;
}

.dialog-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.dialog-heading h2 {
	font-size: 20px;
}

.dialog-heading .icon-button {
	color: #738099;
}

.dialog-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: flex-end;
	margin-top: 22px;
}

.dialog-buttons>button:first-child {
	background: #f0f2f8;
	border: 0;
	border-radius: 24px;
	padding: 12px 23px;
}

.dialog-error {
	color: #d85166;
	font-size: 13px;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

#customer-application .dialog-error[data-transaction-state="success"] {
	color: var(--bs-success, #198754);
}

#customer-application .dialog-error[data-transaction-state="unknown"] {
	color: var(--bs-secondary-color, #6c757d);
}

.dialog-field {
	display: block;
	margin: 18px 0;
	color: #6f788d;
	font-size: 14px;
}

.dialog-field input,.dialog-field textarea,.dialog-field select {
	display: block;
	width: 100%;
	padding: 12px;
	border: 1px solid #dce1ed;
	border-radius: 9px;
	margin-top: 8px;
}

.consent-facts {
	padding: 16px;
	background: #f5f6fd;
	border-radius: 12px;
	font-size: 13px;
	line-height: 1.8;
	overflow-wrap: anywhere;
}

.consent-facts p {
	margin: 9px 0;
}

.consent-check {
	display: flex;
	gap: 10px;
	font-size: 13px;
	line-height: 1.7;
	margin: 18px 0;
}

.error-page {
	max-width: 600px;
	margin: 90px auto;
	padding: 24px;
}

.loading-hint {
	color: #989fb3;
	text-align: center;
	padding: 36px;
}

@media(min-width:1100px) {
	.app-header {
		padding-left: max(30px,calc((100vw - 1040px)/2));
		padding-right: max(30px,calc((100vw - 1040px)/2));
	}
	.hero {
		border-radius: 0 0 40px 40px;
	}
	.overview-card {
		margin-left: 50px;
		margin-right: 50px;
	}
	.hero-art {
		right: 100px;
		width: 320px;
	}
}

@media(max-width:800px) {
	.app-header {
		height: 128px;
		display: grid;
		grid-template-columns: 44px minmax(0,1fr) 112px;
		grid-template-rows: 44px 44px;
		gap: 12px 9px;
	}
	.app-header .icon-button {
		grid-column: 1;
		grid-row: 1;
	}
	.app-header .brand {
		grid-column: 2;
		grid-row: 1;
		min-width: 0;
		margin-right: 0;
	}
	.app-header [data-field="brand"] {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
	.app-header [data-field="walletType"] {
		grid-column: 1 / 3;
		grid-row: 2;
	}
	.app-header .wallet-button {
		grid-column: 3;
		grid-row: 2;
	}
	.app-header .wallet-logout-button {
		grid-column: 3;
		grid-row: 1;
		justify-self: end;
	}
	.app-header [data-field="network"] {
		grid-column: 3;
		grid-row: 1;
	}
	.app-header .wallet-button,.app-header select {
		min-width: 0;
		width: 100%;
		max-width: none;
	}
	.app-navigation {
		top: 128px;
	}
}

@media(max-width:600px) {
	.app-header {
		height: 113px;
		grid-template-rows: 40px 40px;
		gap: 9px;
		padding: 12px;
	}
	.brand {
		font-size: 21px;
		letter-spacing: 0;
	}
	.brand-symbol {
		width: 31px;
		height: 31px;
		line-height: 27px;
		font-size: 18px;
	}
	.icon-button {
		padding: 2px 4px;
		font-size: 24px;
	}
	.wallet-button,.app-header select {
		font-size: 13px;
		padding: 10px 9px;
	}
	.app-navigation {
		top: 113px;
	}
	.hero {
		height: 256px;
		padding: 27px 21px;
	}
	.hero h1 {
		font-size: 34px;
		letter-spacing: -1px;
		max-width: 235px;
	}
	.hero-copy>p:last-child {
		font-size: 16px;
		max-width: 230px;
		line-height: 1.7;
	}
	.hero-art {
		right: -25px;
		top: 53px;
		width: 205px;
		opacity: .45;
	}
	.overview-card {
		margin: -25px 16px 22px;
		padding: 26px 18px;
	}
	.total-amount {
		font-size: 33px;
	}
	.total-amount small {
		font-size: 18px;
	}
	.card-caption {
		font-size: 15px;
	}
	.metric-grid {
		gap: 30px 10px;
		margin-top: 32px;
	}
	.metric-grid p {
		font-size: 14px;
	}
	.metric-grid strong {
		font-size: 23px;
	}
	.metric-grid small {
		font-size: 10px;
	}
	.content-card {
		margin: 18px 16px;
		padding: 22px;
	}
	.product-list {
		grid-template-columns: 1fr;
	}
	.content-panel {
		padding: 14px 16px;
	}
	.participation-grid {
		gap: 10px;
	}
	.participation-grid>a,.participation-grid>button {
		padding: 16px;
	}
	.participation-grid h3 {
		font-size: 16px;
	}
	.support-button {
		height: 55px;
		width: 55px;
		right: 15px;
		bottom: 20px;
	}
	.account-metrics strong {
		font-size: 18px;
	}
	.account-metrics p {
		font-size: 12px;
	}
	.settlement-clock {
		font-size: 13px;
	}
	.product-card {
		padding: 24px;
	}
	.product-card .product-tier-facts {
		grid-template-columns: minmax(0,1fr);
		gap: 4px;
	}
	.product-card .product-tier-facts dd {
		text-align: left;
	}
	.product-card .product-tier-facts dd:not(:last-child) {
		margin-bottom: 8px;
	}
	.action-grid {
		gap: 8px;
	}
	.action-grid>* {
		padding: 10px 13px;
	}
	.brand {
		min-width: 90px;
	}
	.earning-row {
		font-size: 12px;
	}
}

#customer-application [data-action="ordersMore"],
#customer-application [data-action="earningsMore"],
#customer-application [data-action="historyMore"] {
	display: block;
	margin: 20px auto 28px;
	padding: 12px 24px;
	border: 1px solid #d6d9ee;
	border-radius: 24px;
	background: #fff;
	color: var(--primary);
	min-height: 44px;
}

#customer-application [data-field="historyKind"] {
	display: block;
	width: 100%;
	max-width: 320px;
	margin: 10px 0 20px;
	padding: 12px 14px;
	border: 1px solid #d6d9ee;
	border-radius: 10px;
	background: #fff;
	color: #1e2944;
	min-height: 44px;
}

#customer-application [data-block="businessHistory"] .content-card {
	margin: 12px 0;
	padding: 20px;
	overflow-wrap: anywhere;
}

#customer-application [data-block="businessHistory"] h3 {
	margin: 0 0 16px;
	font-size: 16px;
}

#customer-application [data-block="businessHistory"] p {
	line-height: 1.8;
	white-space: pre-wrap;
}

#customer-application .order-card>p {
	overflow-wrap: anywhere;
}

#customer-application .earning-row {
	flex-wrap: wrap;
}

#customer-application .earning-row strong {
	margin-left: auto;
	overflow-wrap: anywhere;
}

#customer-application button:focus-visible,#customer-application select:focus-visible {
	outline: 2px solid var(--primary);
	outline-offset: 3px;
}

#customer-application .customer-action-modal .modal-dialog {
	max-width: 560px;
}

#customer-application .customer-action-modal .modal-content {
	border: 0;
	border-radius: 24px;
	box-shadow: 0 24px 80px #19215340;
}

#customer-application .customer-action-modal .modal-header {
	padding: 22px 26px 10px;
	border: 0;
}

#customer-application .customer-action-modal .modal-title {
	font-size: 20px;
}

#customer-application .customer-action-modal .modal-body {
	padding: 0 26px 26px;
}

#customer-application .customer-action-modal .dialog-field label {
	font-size: 14px;
	color: #6f788d;
}

#customer-application .customer-action-modal .dialog-field .form-control {
	padding: 12px;
	border-radius: 9px;
}

#customer-application .customer-action-modal .required>.form-label::after {
	content: " *";
	color: #d85166;
}

.customer-layout>.alert-overlay {
	position: fixed;
	top: 94px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 2000;
	width: max-content;
	max-width: 90vw;
	box-shadow: 0 8px 28px #19215325;
}

.customer-layout>.alert-overlay h4 {
	font-size: 15px;
	margin: 0 30px 6px 0;
}

.customer-layout>.alert-overlay p {
	font-size: 14px;
	margin: 0;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.announcement-content {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

#customer-application .customer-announcement-modal .modal-dialog {
	max-width: 560px;
}

#customer-application .customer-announcement-modal .modal-content {
	max-height: calc(100dvh - 2rem);
	border: 0;
	border-radius: 20px;
	box-shadow: 0 24px 80px #19215340;
}

#customer-application .customer-announcement-modal .modal-title {
	font-size: 20px;
	overflow-wrap: anywhere;
}

#customer-application .customer-announcement-modal .modal-body {
	line-height: 1.8;
	overscroll-behavior: contain;
}

#customer-application .customer-announcement-modal .modal-footer {
	padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
}

.customer-chat {
	position: fixed;
	right: 20px;
	bottom: calc(90px + env(safe-area-inset-bottom, 0px));
	z-index: 1060;
	display: flex;
	flex-direction: column;
	width: 440px;
	max-width: calc(100% - 32px);
	height: min(660px, calc(100vh - 120px));
	height: min(660px, calc(100dvh - 120px - env(safe-area-inset-bottom, 0px)));
	min-height: 0;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 22px;
	box-shadow: 0 18px 60px #19215330;
}

.customer-chat[hidden] {
	display: none;
}

.customer-chat .support-chat-panel__header {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 20px;
	border-bottom: 1px solid var(--line);
	background: #f7f7ff;
}

.customer-chat .support-chat-panel__heading {
	min-width: 0;
}

.customer-chat .support-chat-panel__title {
	margin: 0;
	color: #242541;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.4;
}

.customer-chat .support-chat-panel__subtitle {
	margin: 4px 0 0;
	color: #777b94;
	font-size: 12px;
	line-height: 1.5;
}

.customer-chat .support-chat-panel__close {
	flex-shrink: 0;
	min-height: 36px;
	padding: 7px 10px;
	border: 1px solid #e1e1f1;
	border-radius: 10px;
	background: #fff;
	color: #626780;
	font-size: 12px;
	line-height: 1.5;
}

.customer-chat .support-chat-panel__close:hover {
	border-color: #cfccff;
	color: var(--primary);
}

.customer-chat .support-chat-panel__status {
	flex-shrink: 0;
	max-height: 62px;
	margin: 0;
	padding: 10px 20px;
	overflow: auto;
	border-bottom: 1px solid var(--line);
	color: #777b94;
	font-size: 12px;
	line-height: 1.6;
	overflow-wrap: anywhere;
}

.customer-chat .support-chat-panel__messages {
	flex: 1;
	min-height: 0;
	padding: 20px;
	overflow: auto;
	background: #f8f9fd;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: #d6d7e9 transparent;
}

.customer-chat .support-chat-message {
	width: fit-content;
	max-width: 88%;
	margin: 0 0 16px;
}

.customer-chat .support-chat-message--customer {
	margin-left: auto;
}

.customer-chat .support-chat-message__header {
	display: flex;
	align-items: baseline;
	justify-content: flex-end;
	gap: 8px;
	margin-bottom: 6px;
}

.customer-chat .support-chat-message__bubble {
	padding: 11px 14px;
	border: 1px solid #e7e9f2;
	border-radius: 4px 16px 16px;
	background: #fff;
}

.customer-chat .support-chat-message--customer .support-chat-message__bubble {
	border-color: var(--primary);
	border-radius: 16px 4px 16px 16px;
	background: var(--primary);
}

.customer-chat .support-chat-message__sender {
	flex-shrink: 0;
	color: #72768c;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.5;
}

.customer-chat .support-chat-message__content {
	margin: 5px 0;
	color: #292d43;
	font-size: 14px;
	line-height: 1.75;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.customer-chat .support-chat-message__time {
	min-width: 0;
	color: #72768c;
	font-size: 11px;
	line-height: 1.6;
	text-align: right;
	overflow-wrap: anywhere;
}

.customer-chat .support-chat-message--customer .support-chat-message__content {
	color: #fff;
}

.customer-chat .support-chat-message img {
	display: block;
	max-width: 100%;
	max-height: 240px;
	object-fit: contain;
}

.customer-chat .support-chat-panel__composer {
	flex-shrink: 0;
	margin: 0;
	padding: 0 16px 16px;
	border-top: 1px solid var(--line);
	background: #fff;
}

.customer-chat .support-chat-panel__toolbar {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 50px;
	padding: 8px 0;
}

.customer-chat .support-chat-panel__emoji {
	position: relative;
}

.customer-chat .support-chat-panel__tool-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: 7px 13px;
	border: 1px solid transparent;
	border-radius: 9px;
	background: #f2f3fb;
	color: #626780;
	font-size: 13px;
	line-height: 1.5;
}

.customer-chat .support-chat-panel__tool-button:hover {
	border-color: #dcd9ff;
	background: #efeeff;
	color: var(--primary);
}

.customer-chat .support-chat-panel__emoji-palette:not([hidden]) {
	position: absolute;
	bottom: calc(100% + 10px);
	left: 0;
	z-index: 2;
	width: min(286px, calc(100vw - 64px));
	max-height: min(230px, 48dvh);
	margin: 0;
	padding: 10px;
	overflow: auto;
	border: 1px solid #e0e0ef;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 8px 30px #262b5826;
	overscroll-behavior: contain;
}

.customer-chat .support-chat-panel__emoji-choice {
	width: 38px;
	height: 38px;
	padding: 3px;
	border: 1px solid transparent;
	border-radius: 8px;
	background: transparent;
	font-size: 22px;
	line-height: 1;
}

.customer-chat .support-chat-panel__emoji-choice:hover {
	border-color: #e0ddff;
	background: #f1efff;
}

.customer-chat .support-chat-panel__preview:not([hidden]) {
	max-height: 112px;
	margin-bottom: 10px;
	padding: 8px 10px;
	overflow: auto;
	border: 1px solid #e8e8f4;
	border-radius: 10px;
	background: #f8f9fd;
	overscroll-behavior: contain;
}

.customer-chat .support-chat-panel__image-preview {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	align-items: center;
	gap: 4px 10px;
	margin: 0;
}

.customer-chat .support-chat-panel__preview img {
	grid-row: span 2;
	width: auto;
	max-width: 72px;
	max-height: 72px;
	object-fit: contain;
}

.customer-chat .support-chat-panel__preview figcaption {
	min-width: 0;
	overflow: hidden;
	color: #777b94;
	font-size: 12px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.customer-chat [data-action="removeChatImage"] {
	justify-self: start;
	min-height: 30px;
	padding: 4px 9px;
	border-color: #daddec;
	border-radius: 7px;
	color: #626780;
	font-size: 12px;
}

.customer-chat .support-chat-panel__input-row {
	display: flex;
	align-items: stretch;
	gap: 10px;
}

.customer-chat .support-chat-panel__input {
	flex: 1;
	min-width: 0;
	min-height: 88px;
	max-height: 160px;
	padding: 11px 12px;
	border: 1px solid #dedfed;
	border-radius: 12px;
	color: #292d43;
	background: #fff;
	font-size: 16px;
	line-height: 1.6;
	resize: none;
}

.customer-chat .support-chat-panel__input::placeholder {
	color: #a0a3b4;
	font-size: 13px;
}

.customer-chat .support-chat-panel__input:focus {
	border-color: #a09bff;
	outline: 0;
	box-shadow: 0 0 0 3px #524bff14;
}

.customer-chat .support-chat-panel__send {
	--bs-btn-bg: var(--primary);
	--bs-btn-border-color: var(--primary);
	--bs-btn-hover-bg: #4540df;
	--bs-btn-hover-border-color: #4540df;
	--bs-btn-active-bg: #4540df;
	--bs-btn-active-border-color: #4540df;
	--bs-btn-disabled-bg: var(--primary);
	--bs-btn-disabled-border-color: var(--primary);
	flex-shrink: 0;
	width: 86px;
	margin: 0;
	padding: 10px;
	border: 1px solid var(--primary);
	border-radius: 12px;
	background: var(--primary);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.6;
	overflow-wrap: anywhere;
}

.customer-chat .support-chat-panel__send:hover {
	border-color: #4540df;
	background: #4540df;
}

@media (max-width: 575.98px) {
	.customer-chat {
		right: max(12px, env(safe-area-inset-right, 0px));
		bottom: calc(82px + env(safe-area-inset-bottom, 0px));
		left: max(12px, env(safe-area-inset-left, 0px));
		width: auto;
		max-width: none;
		height: min(640px, calc(100vh - 106px));
		height: min(640px, calc(100dvh - 106px - env(safe-area-inset-bottom, 0px) - env(safe-area-inset-top, 0px)));
		border-radius: 18px;
	}
	.customer-chat .support-chat-panel__header {
		padding: 15px 16px;
	}
	.customer-chat .support-chat-panel__status {
		padding-right: 16px;
		padding-left: 16px;
	}
	.customer-chat .support-chat-panel__messages {
		padding: 16px 12px;
	}
	.customer-chat .support-chat-message {
		max-width: 94%;
	}
	.customer-chat .support-chat-message__bubble {
		padding: 10px 12px;
	}
	.customer-chat .support-chat-panel__composer {
		padding-right: 12px;
		padding-left: 12px;
	}
	.customer-chat .support-chat-panel__input-row {
		gap: 8px;
	}
	.customer-chat .support-chat-panel__send {
		width: 74px;
		padding: 8px;
	}
	.customer-chat .support-chat-panel__input {
		padding: 10px;
	}
}

@media (max-height: 600px) {
	.customer-chat {
		top: max(12px, env(safe-area-inset-top, 0px));
		bottom: max(12px, env(safe-area-inset-bottom, 0px));
		height: auto;
	}
	.customer-chat .support-chat-panel__header {
		padding: 10px 14px;
	}
	.customer-chat .support-chat-panel__title {
		font-size: 17px;
	}
	.customer-chat .support-chat-panel__subtitle {
		display: none;
	}
	.customer-chat .support-chat-panel__status {
		max-height: 46px;
		padding: 6px 14px;
	}
	.customer-chat .support-chat-panel__messages {
		padding: 10px 12px;
	}
	.customer-chat .support-chat-panel__composer {
		padding-bottom: 10px;
	}
	.customer-chat .support-chat-panel__toolbar {
		min-height: 42px;
		padding: 5px 0;
	}
	.customer-chat .support-chat-panel__tool-button {
		min-height: 32px;
		padding-top: 4px;
		padding-bottom: 4px;
	}
	.customer-chat .support-chat-panel__emoji-palette:not([hidden]) {
		max-height: min(180px, 28vh);
		max-height: min(180px, 28dvh);
	}
	.customer-chat .support-chat-panel__preview:not([hidden]) {
		max-height: 64px;
		margin-bottom: 8px;
		padding: 5px 8px;
	}
	.customer-chat .support-chat-panel__image-preview {
		grid-template-columns: 44px minmax(0, 1fr) auto;
	}
	.customer-chat .support-chat-panel__preview img {
		grid-row: auto;
		max-width: 44px;
		max-height: 44px;
	}
	.customer-chat [data-action="removeChatImage"] {
		min-height: 28px;
		padding: 4px 8px;
		font-size: 11px;
	}
	.customer-chat .support-chat-panel__input {
		height: 64px;
		min-height: 64px;
		max-height: 88px;
		padding-top: 8px;
		padding-bottom: 8px;
	}
}

/* 软键盘只缩小可视视口时，聊天区域仍应完整落在当前可见范围内。 */
.customer-chat[data-chat-viewport="constrained"] {
	top: calc(var(--customer-chat-viewport-top) + max(12px, env(safe-area-inset-top, 0px)));
	bottom: auto;
	height: min(660px, calc(var(--customer-chat-viewport-height) - max(12px, env(safe-area-inset-top, 0px)) - max(12px, env(safe-area-inset-bottom, 0px))));
}

@media (max-width: 575.98px) {
	.customer-chat[data-chat-viewport="constrained"] {
		height: min(640px, calc(var(--customer-chat-viewport-height) - max(12px, env(safe-area-inset-top, 0px)) - max(12px, env(safe-area-inset-bottom, 0px))));
	}
}

.customer-chat[data-chat-compact="true"] .support-chat-panel__header {
	padding: 8px 12px;
}

.customer-chat[data-chat-compact="true"] .support-chat-panel__title {
	font-size: 17px;
}

.customer-chat[data-chat-compact="true"] .support-chat-panel__subtitle {
	display: none;
}

.customer-chat[data-chat-compact="true"] .support-chat-panel__status {
	max-height: 46px;
	padding: 6px 12px;
}

.customer-chat[data-chat-compact="true"] .support-chat-panel__messages {
	padding: 0 12px;
}

.customer-chat[data-chat-compact="true"] .support-chat-panel__composer {
	padding-bottom: 8px;
}

.customer-chat[data-chat-compact="true"] .support-chat-panel__toolbar {
	min-height: 38px;
	padding: 3px 0;
}

.customer-chat[data-chat-compact="true"] .support-chat-panel__tool-button {
	min-height: 32px;
	padding-top: 4px;
	padding-bottom: 4px;
}

.customer-chat[data-chat-compact="true"] .support-chat-panel__emoji-palette:not([hidden]) {
	max-height: max(46px, min(180px, calc(var(--customer-chat-viewport-height) - 240px)));
}

.customer-chat[data-chat-compact="true"] .support-chat-panel__preview:not([hidden]) {
	max-height: 60px;
	margin-bottom: 6px;
	padding: 5px 8px;
}

.customer-chat[data-chat-compact="true"] .support-chat-panel__image-preview {
	grid-template-columns: 40px minmax(0, 1fr) auto;
}

.customer-chat[data-chat-compact="true"] .support-chat-panel__preview img {
	grid-row: auto;
	max-width: 40px;
	max-height: 40px;
}

.customer-chat[data-chat-compact="true"] [data-action="removeChatImage"] {
	min-height: 28px;
	padding: 4px 8px;
	font-size: 11px;
}

.customer-chat[data-chat-compact="true"] .support-chat-panel__input {
	height: 64px;
	min-height: 64px;
	max-height: 64px;
	padding-top: 8px;
	padding-bottom: 8px;
}

/* 极短可视区域优先保留输入、发送和图片移除操作。 */
.customer-chat[data-chat-cramped="true"] .support-chat-panel__header {
	padding: 0 8px;
}

.customer-chat[data-chat-cramped="true"] .support-chat-panel__title {
	font-size: 16px;
}

.customer-chat[data-chat-cramped="true"] .support-chat-panel__close {
	min-height: 28px;
	padding: 3px 8px;
}

.customer-chat[data-chat-cramped="true"] .support-chat-panel__status {
	display: none;
}

.customer-chat[data-chat-cramped="true"] .support-chat-panel__messages {
	padding: 0 12px;
}

.customer-chat[data-chat-cramped="true"] .support-chat-panel__composer {
	padding-bottom: 0;
}

.customer-chat[data-chat-cramped="true"] .support-chat-panel__toolbar {
	min-height: 32px;
	padding: 0;
}

.customer-chat[data-chat-cramped="true"] .support-chat-panel__emoji-palette:not([hidden]) {
	bottom: calc(100% + 4px);
	max-height: 30px;
	padding: 0;
}

.customer-chat[data-chat-cramped="true"] .support-chat-panel__emoji-choice {
	width: 28px;
	height: 28px;
	padding: 0;
}

.customer-chat[data-chat-cramped="true"] .support-chat-panel__preview:not([hidden]) {
	max-height: 30px;
	margin-bottom: 0;
	padding: 0 4px;
}

.customer-chat[data-chat-cramped="true"] .support-chat-panel__image-preview {
	grid-template-columns: 28px minmax(0, 1fr) auto;
}

.customer-chat[data-chat-cramped="true"] .support-chat-panel__preview img {
	max-width: 28px;
	max-height: 28px;
}

.customer-chat[data-chat-cramped="true"] .support-chat-panel__input {
	height: 44px;
	min-height: 44px;
	max-height: 44px;
	padding-top: 7px;
	padding-bottom: 7px;
}

/* 同时缩小布局视口的浏览器及旧浏览器，也保留极短屏幕的发送操作。 */
@media (max-height: 319.98px) {
	.customer-chat .support-chat-panel__header {
		padding: 0 8px;
	}
	.customer-chat .support-chat-panel__title {
		font-size: 16px;
	}
	.customer-chat .support-chat-panel__close {
		min-height: 28px;
		padding: 3px 8px;
	}
	.customer-chat .support-chat-panel__status {
		display: none;
	}
	.customer-chat .support-chat-panel__messages {
		padding: 0 12px;
	}
	.customer-chat .support-chat-panel__composer {
		padding-bottom: 0;
	}
	.customer-chat .support-chat-panel__toolbar {
		min-height: 32px;
		padding: 0;
	}
	.customer-chat .support-chat-panel__emoji-palette:not([hidden]) {
		bottom: calc(100% + 4px);
		max-height: 30px;
		padding: 0;
	}
	.customer-chat .support-chat-panel__emoji-choice {
		width: 28px;
		height: 28px;
		padding: 0;
	}
	.customer-chat .support-chat-panel__preview:not([hidden]) {
		max-height: 30px;
		margin-bottom: 0;
		padding: 0 4px;
	}
	.customer-chat .support-chat-panel__image-preview {
		grid-template-columns: 28px minmax(0, 1fr) auto;
	}
	.customer-chat .support-chat-panel__preview img {
		max-width: 28px;
		max-height: 28px;
	}
	.customer-chat .support-chat-panel__input {
		height: 44px;
		min-height: 44px;
		max-height: 44px;
		padding-top: 7px;
		padding-bottom: 7px;
	}
}
