#rmApp {
	--rm-ink: #0f172a;
	--rm-line: #e2e8f0;
	--rm-primary: #3b82f6;
	--rm-primary-hover: #2563eb;
	--rm-soft: #eff6ff;
	--rm-mid: #dbeafe;
	--rm-radius: 0.375rem;
	--rm-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
}

#rmApp .rm-shell {
	background:
		radial-gradient(1200px 420px at 10% -10%, rgba(59, 130, 246, 0.16), transparent 55%),
		radial-gradient(900px 360px at 100% 0%, rgba(37, 99, 235, 0.08), transparent 50%);
	border: 1px solid var(--rm-line);
	border-radius: var(--rm-radius);
	box-shadow: var(--rm-shadow);
	overflow: hidden;
	height: 100%;
}

@media (min-width: 1024px) {
	#rmApp .rm-shell-form {
		align-self: start;
		height: auto;
	}

	#rmApp .rm-shell-form .rm-panel {
		height: auto;
	}

	#rmApp .rm-shell-result {
		align-self: start;
		height: auto;
	}
}

#rmApp .rm-shell-result.is-matched {
	min-height: var(--rm-result-min);
	display: flex;
	flex-direction: column;
}

#rmApp .rm-shell-result.is-matched.is-locked {
	height: var(--rm-result-min);
	max-height: var(--rm-result-min);
	overflow: hidden;
}

#rmApp .rm-shell-result.is-matched .rm-result-panel {
	flex: 1 1 auto;
	min-height: 0;
	height: 100%;
}

#rmApp .rm-panel {
	background: rgba(255, 255, 255, 0.92);
	height: 100%;
}

#rmApp .rm-label {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	color: #334155;
	margin-bottom: 0.375rem;
}

#rmApp .rm-input {
	font-variant-numeric: tabular-nums;
}

#rmApp .rm-input:focus {
	border-color: #3b82f6 !important;
	box-shadow: 0 0 0 1px #3b82f6;
}

#rmApp .rm-submit {
	height: 3rem;
	padding: 0 1.5rem;
	border: 0;
	border-radius: 0.5rem;
	background: var(--rm-primary);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
	transition: background-color 200ms ease;
}

#rmApp .rm-submit:hover {
	background: var(--rm-primary-hover);
}

#rmApp .rm-submit:focus-visible {
	outline: 2px solid #1d4ed8;
	outline-offset: 2px;
}

#rmApp .rm-clear {
	height: 3rem;
	padding: 0 1.5rem;
	border: 1px solid #d1d5db;
	border-radius: 0.5rem;
	background: #fff;
	color: #374151;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 200ms ease, border-color 200ms ease;
}

#rmApp .rm-clear:hover {
	background: #f9fafb;
	border-color: #9ca3af;
}

#rmApp .rm-clear:focus-visible {
	outline: 2px solid #9ca3af;
	outline-offset: 2px;
}

#rmApp .rm-result-panel {
	display: flex;
	flex-direction: column;
}

#rmApp .rm-empty {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	border: 1px dashed #e5e7eb;
	background: #f9fafb;
	border-radius: var(--rm-radius);
	color: #9ca3af;
}

#rmApp .rm-result-panel:has(.number-to-rmb-box-1:not(.hidden)) .rm-empty {
	display: none !important;
}

#rmApp .number-to-rmb-box-1 {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	border: 1px solid #bfdbfe;
	border-radius: var(--rm-radius);
	background: var(--rm-soft);
	padding: 1.25rem 1.15rem;
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.45;
	color: var(--rm-primary-hover);
	text-align: center;
	word-break: break-all;
}

#rmApp .number-to-rmb-box-1.hidden {
	display: none !important;
}

#rmApp .rm-note {
	margin-top: 0.85rem;
	font-size: 0.75rem;
	line-height: 1.5;
	color: #64748b;
}

#rmApp .rm-result-panel:has(.number-to-rmb-box-1.hidden) .rm-note {
	display: none;
}

#rmApp .rm-table-card {
	background: #fff;
	border: 1px solid var(--rm-line);
	border-radius: var(--rm-radius);
	box-shadow: var(--rm-shadow);
	padding: 1.25rem 1rem;
	margin-bottom: 2rem;
}

#rmApp .rm-table-title {
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--rm-ink);
	margin-bottom: 1rem;
}

#rmApp .rm-pairs {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.5rem;
}

@media (min-width: 1024px) {
	#rmApp .rm-pairs {
		grid-template-columns: repeat(13, minmax(0, 1fr));
	}
}

#rmApp .rm-pair {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.2rem;
	min-height: 4.25rem;
	border: 1px solid var(--rm-line);
	border-radius: var(--rm-radius);
	background: #fff;
}

#rmApp .rm-pair-num {
	font-size: 0.75rem;
	font-weight: 600;
	color: #64748b;
	line-height: 1.2;
}

#rmApp .rm-pair-char {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--rm-primary-hover);
	line-height: 1.2;
}


#rmApp .rm-notes {
	background: #fff;
	border: 1px solid var(--rm-line);
	border-radius: var(--rm-radius);
	box-shadow: var(--rm-shadow);
}

#rmApp .rm-notes h2 {
	font-size: 1.25rem;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 0.75rem;
}

#rmApp .rm-notes h3 {
	font-size: 1rem;
	font-weight: 600;
	color: #0f172a;
	margin-bottom: 0.75rem;
}

#rmApp .rm-notes p,
#rmApp .rm-notes li {
	font-size: 0.875rem;
	line-height: 1.7;
	color: #475569;
}

#rmApp .rm-notes ol,
#rmApp .rm-notes ul {
	margin-bottom: 2rem;
}

#rmApp .rm-notes p {
	margin-bottom: 2rem;
}

#rmApp .rm-notes p:last-child {
	margin-bottom: 0;
}

@media (min-width: 1024px) {
	#rmApp .rm-table-card {
		padding: 1.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	#rmApp .rm-submit,
	#rmApp .rm-clear {
		transition: none;
	}
}
