/* Ascorbic premium prompt unifier. Intentionally scoped to Chapter Coin / myCRED. */
#frm-wp-manga-buy-coin,
.ascorbic-premium-access-card,
.ascorbic-buycred-login,
.content-blocked.premium-block,
#ascorbic-chapter-coin-notice {
	--ascorbic-prompt-primary: var(--primary-color, var(--madara-main-color, #eb3349));
	--ascorbic-prompt-surface: #fff;
	--ascorbic-prompt-text: #333;
	--ascorbic-prompt-heading: #333;
	--ascorbic-prompt-muted: #555;
	--ascorbic-prompt-border: #e5e5e5;
	--ascorbic-prompt-divider: #e8e8e8;
	--ascorbic-prompt-control-border: #cfcfcf;
	--ascorbic-prompt-check-bg: #fff;
	--ascorbic-prompt-danger: #b42318;
	--ascorbic-prompt-success: #16794a;
	--ascorbic-prompt-gutter: 15px;
	--ascorbic-prompt-major-gap: 15px;
	--ascorbic-prompt-radius: 10px;
	--ascorbic-prompt-button-radius: 7px;
}

body.text-ui-light #frm-wp-manga-buy-coin,
body.text-ui-light .ascorbic-premium-access-card,
body.text-ui-light .ascorbic-buycred-login,
body.text-ui-light .content-blocked.premium-block,
body.text-ui-light #ascorbic-chapter-coin-notice {
	--ascorbic-prompt-surface: #262626;
	--ascorbic-prompt-text: #ccc;
	--ascorbic-prompt-heading: #fff;
	--ascorbic-prompt-muted: #ccc;
	--ascorbic-prompt-border: #383838;
	--ascorbic-prompt-divider: #383838;
	--ascorbic-prompt-control-border: #555;
	--ascorbic-prompt-check-bg: #262626;
	--ascorbic-prompt-danger: #ff9188;
	--ascorbic-prompt-success: #72d8a8;
}

/*
 * Keep every Ascorbic Chapter Coin popup safely centered at normal sizes while
 * allowing the whole dialog, rather than its body, to scroll at extreme zoom.
 *
 * The old layout made both the modal shell and .modal-body scroll containers.
 * Browser zoom can preserve a small .modal-body scrollTop during reflow, which
 * clips the first element (the novel title). A single/guest popup therefore
 * has one scroll owner only: the outer Bootstrap modal. Batch Unlock keeps the
 * modal shell fixed and lets only its chapter list scroll.
 */
#frm-wp-manga-buy-coin {
	box-sizing: border-box;
	overflow-x: hidden !important;
	overflow-y: auto !important;
	padding: var(--ascorbic-prompt-gutter) !important;
	overscroll-behavior: contain;
}

/*
 * Bootstrap briefly writes display:block before .in. Use flex in both opening
 * states, but let the dialog's auto margins perform the vertical centering.
 * If zoom makes the dialog taller than the viewport, cross-axis auto margins
 * resolve safely instead of placing the top of the dialog above the viewport.
 */
#frm-wp-manga-buy-coin.in,
#frm-wp-manga-buy-coin[style*="display: block"] {
	display: flex !important;
	align-items: flex-start;
	justify-content: center;
}

#frm-wp-manga-buy-coin.fade .modal-dialog {
	transition: none !important;
}

#frm-wp-manga-buy-coin .modal-dialog {
	position: relative !important;
	top: auto !important;
	left: auto !important;
	flex: 0 0 auto;
	width: min(460px, 100%);
	max-width: 460px !important;
	margin: auto !important;
	background-image: none !important;
	transform: none !important;
}

#frm-wp-manga-buy-coin .modal-content {
	position: relative;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	max-height: none;
	overflow: hidden;
	border: 1px solid var(--ascorbic-prompt-border) !important;
	border-radius: var(--ascorbic-prompt-radius) !important;
	background: var(--ascorbic-prompt-surface) !important;
	box-shadow: 0 12px 32px rgba(0, 0, 0, .16) !important;
	color: var(--ascorbic-prompt-text) !important;
	overflow-anchor: none;
}

/* The footer Go Back control is now the only close affordance. */
#frm-wp-manga-buy-coin .modal-header {
	display: none !important;
}

/*
 * Single-purchase and guest views never create a nested body scroller. If
 * extreme zoom makes them taller than the viewport, #frm-wp-manga-buy-coin is
 * the only element that scrolls, so the novel title cannot be clipped by a
 * preserved inner scroll position.
 */
#frm-wp-manga-buy-coin .modal-body {
	flex: 0 0 auto;
	box-sizing: border-box;
	width: 100%;
	min-height: auto;
	padding: var(--ascorbic-prompt-gutter) var(--ascorbic-prompt-gutter) 0 !important;
	overflow: visible;
	color: var(--ascorbic-prompt-text) !important;
	overflow-anchor: none;
}

#frm-wp-manga-buy-coin .ascorbic-series-title {
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 calc(var(--ascorbic-prompt-major-gap) + 10px);
	color: var(--ascorbic-prompt-heading);
	font-size: 12px;
	font-style: italic;
	font-weight: 500;
	line-height: 1.5;
	text-align: left;
	overflow: visible;
}

#frm-wp-manga-buy-coin .ascorbic-series-title:empty {
	display: none;
}

#frm-wp-manga-buy-coin .ascorbic-series-title-link {
	display: inline-block;
	max-width: 100%;
	color: var(--ascorbic-prompt-heading) !important;
	font: inherit !important;
	line-height: inherit !important;
	text-decoration: none !important;
	overflow: visible;
	overflow-wrap: anywhere;
}

#frm-wp-manga-buy-coin .ascorbic-series-title-link:hover,
#frm-wp-manga-buy-coin .ascorbic-series-title-link:focus {
	color: var(--ascorbic-prompt-primary) !important;
	text-decoration: none !important;
	outline: none;
}

/* Short divider uses a 50%-opacity version of the active theme primary color. */
#frm-wp-manga-buy-coin .ascorbic-series-title::after {
	display: block;
	box-sizing: border-box;
	width: 30%;
	margin-top: 7px;
	border-top: 1px solid var(--ascorbic-prompt-primary);
	content: '';
	opacity: .5;
}

#frm-wp-manga-buy-coin .modal-body h3 {
	margin: 0 0 8px !important;
	color: var(--ascorbic-prompt-heading) !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-heading {
	margin: 0 !important;
	color: var(--ascorbic-prompt-heading) !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
}

#frm-wp-manga-buy-coin .modal-body p {
	margin: 0 !important;
	color: var(--ascorbic-prompt-text) !important;
	font-size: 13px !important;
	line-height: 1.45 !important;
}

#frm-wp-manga-buy-coin .modal-body .coin {
	color: inherit !important;
	font-size: inherit !important;
	font-weight: 700;
}

/* Single unlock copy is intentionally simple. No balance row or separator. */
#frm-wp-manga-buy-coin .ascorbic-single-wallet {
	display: none !important;
}

#frm-wp-manga-buy-coin .message-sufficient {
	min-height: 19px;
}

#frm-wp-manga-buy-coin.ascorbic-prompt-low-balance .message-sufficient {
	color: var(--ascorbic-prompt-text) !important;
}

#frm-wp-manga-buy-coin .ascorbic-single-result {
	margin: 8px 0 0;
	font-size: 12px;
	line-height: 1.4;
}

#frm-wp-manga-buy-coin .ascorbic-single-result:empty {
	display: none;
}

#frm-wp-manga-buy-coin .ascorbic-single-result.is-error {
	color: var(--ascorbic-prompt-danger);
}

#frm-wp-manga-buy-coin .ascorbic-single-result.is-success {
	color: var(--ascorbic-prompt-success);
	font-weight: 600;
}

/* Modal content and actions use a single 15px spacing system. */
#frm-wp-manga-buy-coin .modal-footer {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr);
	gap: 7px;
	box-sizing: border-box;
	width: 100%;
	margin: 0 !important;
	padding: var(--ascorbic-prompt-major-gap) var(--ascorbic-prompt-gutter) var(--ascorbic-prompt-gutter) !important;
	border: 0 !important;
	background: var(--ascorbic-prompt-surface) !important;
	text-align: initial !important;
}

#frm-wp-manga-buy-coin.ascorbic-prompt-modal:not(.ascorbic-prompt-ready) .modal-footer {
	visibility: hidden;
}

#frm-wp-manga-buy-coin .modal-footer::before,
#frm-wp-manga-buy-coin .modal-footer::after {
	display: none !important;
	content: none !important;
}

#frm-wp-manga-buy-coin .ascorbic-auth-row,
#frm-wp-manga-buy-coin .ascorbic-purchase-row,
#frm-wp-manga-buy-coin .ascorbic-insufficient-row,
#frm-wp-manga-buy-coin .ascorbic-bulk-modal-actions {
	display: grid;
	grid-column: 1 / -1;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	justify-self: stretch;
	align-self: stretch;
	box-sizing: border-box;
	gap: 7px;
	width: 100%;
	min-width: 0;
	margin: 0 !important;
	padding: 0 !important;
	transform: none !important;
}

#frm-wp-manga-buy-coin .ascorbic-insufficient-row {
	grid-template-columns: minmax(0, 1fr);
}

#frm-wp-manga-buy-coin .modal-content .modal-footer .button,
#frm-wp-manga-buy-coin .modal-content .modal-footer .ascorbic-prompt-action {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	margin: 0 !important;
	min-height: 44px;
	padding: 8px 13px !important;
	border-radius: var(--ascorbic-prompt-button-radius) !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	line-height: 1.35 !important;
	text-align: center;
	text-decoration: none !important;
	box-shadow: none !important;
	float: none !important;
	position: static !important;
	left: auto !important;
	right: auto !important;
	transform: none !important;
}

#frm-wp-manga-buy-coin .ascorbic-prompt-primary,
#frm-wp-manga-buy-coin .modal-content .modal-footer .ascorbic-signin-action {
	border: 1px solid var(--ascorbic-prompt-primary) !important;
	background: var(--ascorbic-prompt-primary) !important;
	color: #fff !important;
}

#frm-wp-manga-buy-coin .ascorbic-prompt-primary:hover:not(:disabled),
#frm-wp-manga-buy-coin .ascorbic-prompt-primary:focus:not(:disabled),
#frm-wp-manga-buy-coin .modal-content .modal-footer .ascorbic-signin-action:hover,
#frm-wp-manga-buy-coin .modal-content .modal-footer .ascorbic-signin-action:focus {
	filter: brightness(.92);
	color: #fff !important;
	outline: none;
}

#frm-wp-manga-buy-coin .ascorbic-prompt-secondary,
#frm-wp-manga-buy-coin .modal-content .modal-footer .ascorbic-register-action,
#frm-wp-manga-buy-coin .modal-content .modal-footer .ascorbic-go-back {
	border: 1px solid var(--ascorbic-prompt-control-border) !important;
	background: transparent !important;
	color: var(--ascorbic-prompt-text) !important;
}

#frm-wp-manga-buy-coin .ascorbic-prompt-secondary:hover:not(:disabled),
#frm-wp-manga-buy-coin .ascorbic-prompt-secondary:focus:not(:disabled),
#frm-wp-manga-buy-coin .modal-content .modal-footer .ascorbic-register-action:hover,
#frm-wp-manga-buy-coin .modal-content .modal-footer .ascorbic-register-action:focus,
#frm-wp-manga-buy-coin .modal-content .modal-footer .ascorbic-go-back:hover,
#frm-wp-manga-buy-coin .modal-content .modal-footer .ascorbic-go-back:focus {
	border-color: var(--ascorbic-prompt-primary) !important;
	color: var(--ascorbic-prompt-primary) !important;
	outline: none;
}

#frm-wp-manga-buy-coin .ascorbic-prompt-action:disabled {
	opacity: .58;
	cursor: not-allowed;
}

#frm-wp-manga-buy-coin .ascorbic-go-back {
	grid-column: 1 / -1;
}

#frm-wp-manga-buy-coin .modal-footer .ascorbic-action-visible {
	display: flex !important;
}

#frm-wp-manga-buy-coin .modal-footer .ascorbic-action-hidden,
#frm-wp-manga-buy-coin .ascorbic-view-hidden {
	display: none !important;
}

/* Compact Batch Unlock view inside the Chapter Coin modal. */
/*
 * Keep the bulk dialog height stable while selections change. Because the
 * modal is flex-centered in the viewport, a content-driven height made the
 * entire dialog re-center whenever warning text appeared or disappeared.
 * The list now absorbs those height changes instead of moving the popup.
 */
#frm-wp-manga-buy-coin.ascorbic-bulk-active .modal-content {
	height: 560px;
	max-height: calc(100vh - 30px);
	max-height: calc(100dvh - 30px);
}

#frm-wp-manga-buy-coin.ascorbic-bulk-active .modal-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
	overflow: hidden;
}

#frm-wp-manga-buy-coin.ascorbic-bulk-active .modal-body > h3 {
	display: none !important;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-view {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
	margin-top: 0;
	overflow: hidden;
	overflow-anchor: none;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-toolbar {
	display: grid;
	flex: 0 0 auto;
	gap: var(--ascorbic-prompt-major-gap);
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 var(--ascorbic-prompt-major-gap);
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-heading {
	min-width: 0;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-controls-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) max-content;
	align-items: center;
	column-gap: 12px;
	width: 100%;
}

/* Match the main novel-page Batch Unlock quick-selection controls. */
#frm-wp-manga-buy-coin .ascorbic-bulk-modal-additive {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	flex-wrap: wrap;
	gap: 5px;
	min-width: 0;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-additive button,
#frm-wp-manga-buy-coin .ascorbic-bulk-modal-reverse {
	min-width: 34px;
	margin: 0;
	padding: 4px 8px;
	border: 1px solid var(--ascorbic-prompt-control-border);
	border-radius: var(--ascorbic-prompt-button-radius);
	background: transparent;
	color: var(--ascorbic-prompt-text);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.35;
	cursor: pointer;
	transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-additive button:hover,
#frm-wp-manga-buy-coin .ascorbic-bulk-modal-additive button:focus,
#frm-wp-manga-buy-coin .ascorbic-bulk-modal-reverse:hover,
#frm-wp-manga-buy-coin .ascorbic-bulk-modal-reverse:focus {
	border-color: var(--ascorbic-prompt-primary);
	color: var(--ascorbic-prompt-primary);
	outline: none;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-additive .ascorbic-bulk-modal-clear {
	min-width: 48px;
	margin-left: 2px;
	border-color: transparent;
	font-weight: 500;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-additive .ascorbic-bulk-modal-clear:hover,
#frm-wp-manga-buy-coin .ascorbic-bulk-modal-additive .ascorbic-bulk-modal-clear:focus {
	border-color: var(--ascorbic-prompt-primary);
	color: var(--ascorbic-prompt-primary);
}

/* Reverse order now uses the same compact control design as +5 / +10 / All / Clear. */
#frm-wp-manga-buy-coin .ascorbic-bulk-modal-reverse {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	justify-self: end;
	min-width: 34px;
	vertical-align: middle;
	text-decoration: none;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-reverse > i {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1em;
	height: 1em;
	margin: 0;
	font-size: 1em;
	line-height: 1;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-list {
	flex: 1 1 auto;
	box-sizing: border-box;
	width: 100%;
	min-height: 72px;
	max-height: none;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	overflow-anchor: none;
	border: 1px solid var(--ascorbic-prompt-border);
	border-radius: 8px;
	background: var(--ascorbic-prompt-surface);
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-loading,
#frm-wp-manga-buy-coin .ascorbic-bulk-modal-empty {
	padding: 16px 12px;
	color: var(--ascorbic-prompt-muted);
	font-size: 12px;
	text-align: center;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-item {
	position: relative;
	display: grid;
	grid-template-columns: 17px 16px minmax(0, 1fr) max-content;
	align-items: center;
	gap: 8px;
	box-sizing: border-box;
	width: 100%;
	min-height: 40px;
	margin: 0;
	padding: 8px 10px;
	border: 0;
	border-bottom: 1px solid var(--ascorbic-prompt-divider);
	color: var(--ascorbic-prompt-text);
	cursor: pointer;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-item:last-child {
	border-bottom: 0;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-item:hover {
	background: rgba(127, 127, 127, .055);
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-item.is-unlocked {
	color: var(--ascorbic-prompt-muted);
	cursor: default;
	opacity: .52;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-item.is-unlocked:hover {
	background: transparent;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-group {
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 0;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-group:not(:last-child) {
	border-bottom: 1px solid var(--ascorbic-prompt-divider);
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-group:not(.is-flat) {
	display: flex;
	flex-direction: column;
}

/* Reverse mode mirrors the Series hierarchy: chapters flow upward into a Volume row anchored below them. */
#frm-wp-manga-buy-coin .ascorbic-bulk-modal-list[data-order-direction="reversed"] .ascorbic-bulk-modal-group:not(.is-flat) {
	flex-direction: column-reverse;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-volume-toggle {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 4px;
	box-sizing: border-box;
	width: 100%;
	min-height: 28px;
	margin: 0;
	padding: 4px 10px;
	border: 0;
	border-bottom: 1px solid var(--ascorbic-prompt-divider);
	border-radius: 0;
	background: transparent;
	color: var(--ascorbic-prompt-heading);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	text-align: left;
	cursor: pointer;
	box-shadow: none;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-list[data-order-direction="reversed"] .ascorbic-bulk-modal-volume-toggle {
	border-top: 1px solid var(--ascorbic-prompt-divider);
	border-bottom: 0;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-volume-toggle:hover,
#frm-wp-manga-buy-coin .ascorbic-bulk-modal-volume-toggle:focus {
	background: transparent;
	color: var(--ascorbic-prompt-primary);
	outline: none;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-volume-toggle > span {
	flex: 0 1 auto;
	min-width: 0;
	max-width: calc(100% - 18px);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-volume-toggle > i {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 14px;
	height: 14px;
	font-size: 13px;
	line-height: 1;
	transition: transform 150ms ease;
}

/* Expanded follows reading direction; collapsed points back toward the hidden content. */
#frm-wp-manga-buy-coin .ascorbic-bulk-modal-list:not([data-order-direction="reversed"]) .ascorbic-bulk-modal-volume-toggle[aria-expanded="false"] > i,
#frm-wp-manga-buy-coin .ascorbic-bulk-modal-list[data-order-direction="reversed"] .ascorbic-bulk-modal-volume-toggle[aria-expanded="true"] > i {
	transform: rotate(180deg);
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-volume-panel {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-volume-panel[hidden] {
	display: none !important;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-volume-panel .ascorbic-bulk-modal-item:last-child {
	border-bottom: 0;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-lock-state {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	color: var(--ascorbic-prompt-muted);
	font-size: 11px;
	line-height: 1;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-item:not(.is-unlocked) .ascorbic-bulk-modal-lock-state {
	color: var(--ascorbic-prompt-text);
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-checkbox:disabled + .ascorbic-bulk-modal-checkmark {
	border-color: var(--ascorbic-prompt-divider);
	background: rgba(127, 127, 127, .05);
	box-shadow: none;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-checkbox {
	position: absolute;
	top: 50%;
	left: 10px;
	width: 17px;
	height: 17px;
	margin: 0;
	opacity: 0;
	transform: translateY(-50%);
	clip-path: inset(50%);
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-checkmark {
	display: block;
	box-sizing: border-box;
	width: 17px;
	height: 17px;
	border: 2px solid var(--ascorbic-prompt-control-border);
	border-radius: 3px;
	background: var(--ascorbic-prompt-check-bg);
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-checkbox:checked + .ascorbic-bulk-modal-checkmark {
	border-color: var(--ascorbic-prompt-primary);
	background: var(--ascorbic-prompt-primary);
	box-shadow: inset 0 0 0 3px var(--ascorbic-prompt-check-bg);
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-checkbox:focus + .ascorbic-bulk-modal-checkmark {
	outline: 2px solid var(--ascorbic-prompt-primary);
	outline-offset: 2px;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-label {
	min-width: 0;
	overflow: hidden;
	font-size: 12px;
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-price {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	color: var(--ascorbic-prompt-muted);
	font-size: 11px;
	font-weight: 700;
	line-height: 1.35;
	white-space: nowrap;
}

/* Match the Series chapter list currency treatment: coin mark + numeric amount.
 * The Font Awesome mark is font-sized, not an image box, so it cannot increase
 * the chapter-row line height or add another asset request. */
#frm-wp-manga-buy-coin .ascorbic-bulk-modal-coin-value {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	line-height: inherit;
	white-space: nowrap;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-coin-value > .fa-coins {
	flex: 0 0 auto;
	font-size: 1em;
	line-height: 1;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-coin-number {
	display: inline;
	line-height: inherit;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-summary {
	display: grid;
	flex: 0 0 auto;
	grid-template-columns: minmax(0, 1fr) max-content;
	align-items: center;
	gap: 12px;
	margin-top: var(--ascorbic-prompt-major-gap);
	padding-top: 0;
	border-top: 0;
	overflow-anchor: none;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-selection {
	display: inline-flex;
	align-items: center;
	align-self: center;
	min-width: 0;
	min-height: 18px;
	color: var(--ascorbic-prompt-text);
	font-size: 12px;
	line-height: 18px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-selection > span,
#frm-wp-manga-buy-coin .ascorbic-bulk-modal-selection > strong {
	display: inline-flex;
	align-items: center;
	height: 18px;
	line-height: 18px;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-selection strong {
	color: inherit;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-wallet {
	display: inline-flex;
	align-items: center;
	align-self: center;
	justify-self: end;
	min-height: 18px;
	gap: 12px;
	color: var(--ascorbic-prompt-text);
	font-size: 11px;
	line-height: 18px;
	white-space: nowrap;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-wallet > span {
	display: inline-flex;
	align-items: center;
	height: 18px;
	line-height: 18px;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-wallet strong {
	color: inherit;
	font-size: 12px;
	line-height: inherit;
}

#frm-wp-manga-buy-coin.ascorbic-bulk-insufficient .ascorbic-bulk-modal-after {
	color: var(--ascorbic-prompt-danger);
}

/* Warning consumes space only when it has text; the flexing list yields room for it. */
#frm-wp-manga-buy-coin .ascorbic-bulk-modal-warning {
	display: block;
	flex: 0 0 auto;
	margin: 8px 0 0;
	color: var(--ascorbic-prompt-danger);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.35;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-warning:empty {
	display: none;
}

/* Inline blocked-chapter prompt. */
.content-blocked.premium-block {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 18px;
	padding: 12px 14px !important;
	border: 1px solid var(--ascorbic-prompt-border) !important;
	border-radius: 12px !important;
	background: var(--ascorbic-prompt-surface) !important;
	color: var(--ascorbic-prompt-text) !important;
	font-size: 13px;
	line-height: 1.4;
	text-align: left !important;
}

.content-blocked.premium-block a {
	flex: 0 0 auto;
	min-width: 92px;
	padding: 8px 13px;
	border: 1px solid var(--ascorbic-prompt-primary);
	border-radius: 4px;
	background: var(--ascorbic-prompt-primary);
	color: #fff !important;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.35;
	text-align: center;
	text-decoration: none !important;
}

.content-blocked.premium-block a:hover,
.content-blocked.premium-block a:focus {
	filter: brightness(.92);
	color: #fff !important;
	outline: none;
}

/* myCRED Sell Content: purchasable, logged-out and insufficient-funds states. */
.mycred-sell-this-wrapper.ascorbic-premium-access-card {
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 18px;
	padding: 12px 14px;
	border: 1px solid var(--ascorbic-prompt-border);
	border-radius: 12px;
	background: var(--ascorbic-prompt-surface);
	color: var(--ascorbic-prompt-text);
	text-align: left !important;
}

.mycred-sell-this-wrapper.ascorbic-premium-access-card .text-center {
	text-align: left !important;
}

.mycred-sell-this-wrapper.ascorbic-premium-access-card h1,
.mycred-sell-this-wrapper.ascorbic-premium-access-card h2,
.mycred-sell-this-wrapper.ascorbic-premium-access-card h3,
.mycred-sell-this-wrapper.ascorbic-premium-access-card h4 {
	margin: 0 0 7px !important;
	color: var(--ascorbic-prompt-heading) !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
}

.mycred-sell-this-wrapper.ascorbic-premium-access-card p {
	margin: 0 0 8px !important;
	color: var(--ascorbic-prompt-text) !important;
	font-size: 13px !important;
	line-height: 1.45 !important;
}

.mycred-sell-this-wrapper.ascorbic-premium-access-card p:last-child {
	margin-bottom: 0 !important;
}

.mycred-sell-this-wrapper.ascorbic-premium-access-card p strong {
	color: var(--ascorbic-prompt-danger);
	font-weight: 600;
}

.mycred-sell-this-wrapper.ascorbic-premium-access-card .mycred-buy-this-content-button {
	box-sizing: border-box;
	min-width: 138px;
	margin: 2px 0 0 !important;
	padding: 8px 13px !important;
	border: 1px solid var(--ascorbic-prompt-primary) !important;
	border-radius: 4px !important;
	background: var(--ascorbic-prompt-primary) !important;
	color: #fff !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	line-height: 1.35 !important;
	box-shadow: none !important;
}

.mycred-sell-this-wrapper.ascorbic-premium-access-card .mycred-buy-this-content-button:hover,
.mycred-sell-this-wrapper.ascorbic-premium-access-card .mycred-buy-this-content-button:focus {
	filter: brightness(.92);
	color: #fff !important;
	outline: none;
}

/* Default buyCRED logged-out message. */
.ascorbic-buycred-login {
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 18px;
	padding: 12px 14px;
	border: 1px solid var(--ascorbic-prompt-border);
	border-radius: 12px;
	background: var(--ascorbic-prompt-surface);
	color: var(--ascorbic-prompt-text);
}

.ascorbic-buycred-login-message {
	font-size: 13px;
	line-height: 1.45;
}

/* Replacement for Chapter Coin's native browser alert errors. */
#ascorbic-chapter-coin-notice {
	position: fixed;
	top: 50%;
	left: 50%;
	z-index: 10050;
	box-sizing: border-box;
	width: min(420px, calc(100% - 28px));
	padding: 12px 14px;
	border: 1px solid var(--ascorbic-prompt-border);
	border-radius: 10px;
	background: var(--ascorbic-prompt-surface);
	box-shadow: 0 12px 32px rgba(0, 0, 0, .16);
	color: var(--ascorbic-prompt-text);
	transform: translate(-50%, -50%);
}

#ascorbic-chapter-coin-notice[hidden] {
	display: none !important;
}

#ascorbic-chapter-coin-notice .ascorbic-prompt-notice-title {
	margin: 0 0 4px;
	color: var(--ascorbic-prompt-heading);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
}

#ascorbic-chapter-coin-notice .ascorbic-prompt-notice-message {
	font-size: 12px;
	line-height: 1.45;
}

#ascorbic-chapter-coin-notice.is-error .ascorbic-prompt-notice-message {
	color: var(--ascorbic-prompt-danger);
}

#ascorbic-chapter-coin-notice.is-success .ascorbic-prompt-notice-message {
	color: var(--ascorbic-prompt-success);
	font-weight: 600;
}

@media (max-width: 520px) {
	#frm-wp-manga-buy-coin {
		padding: var(--ascorbic-prompt-gutter) !important;
	}

	#frm-wp-manga-buy-coin .modal-dialog {
		width: 100%;
		max-width: none !important;
		margin: auto !important;
	}

	#frm-wp-manga-buy-coin .modal-content {
		max-height: none;
	}

	#frm-wp-manga-buy-coin.ascorbic-bulk-active .modal-content {
		max-height: calc(100vh - 30px);
		max-height: calc(100dvh - 30px);
	}

	#frm-wp-manga-buy-coin .ascorbic-bulk-modal-summary {
		column-gap: 7px;
	}

	#frm-wp-manga-buy-coin .ascorbic-bulk-modal-wallet {
		gap: 8px;
		font-size: 10px;
	}

	#frm-wp-manga-buy-coin .ascorbic-bulk-modal-selection {
		font-size: 10px;
	}

	.content-blocked.premium-block {
		align-items: stretch;
		flex-direction: column;
	}

	.content-blocked.premium-block a {
		width: 100%;
	}
}

/* C5 client queue status is presentation-only; native Coin remains authority. */
#frm-wp-manga-buy-coin .ascorbic-bulk-modal-item.is-processing {
	outline: 1px solid var(--ascorbic-prompt-primary);
	outline-offset: -1px;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-item.is-failed {
	outline: 1px solid var(--ascorbic-prompt-danger);
	outline-offset: -1px;
}

#frm-wp-manga-buy-coin .ascorbic-bulk-modal-item.is-skipped {
	opacity: .78;
}
